diff --git a/README.md b/README.md index 1c325937..ada2cef5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ AMF is a light-weight, portable multimedia framework that abstracts away most of * Linux * RHEL 8.4 / 7.9 * CentOS 8.4 / 7.9 - * Ubuntu 20.04.2 / 18.04.5 HWE + * Ubuntu 22.04 / 20.04.2 * SLED/SLES 15 SP3 * Driver and AMF component installation instructions are available on the [Wiki page](https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki). * The following table contains the driver versions in which the Linux pro driver started including the AMF runtime, otherwise, the AMF runtime is optional and has to be installed separately. @@ -24,13 +24,14 @@ AMF is a light-weight, portable multimedia framework that abstracts away most of | OS | AMF included starting version: | | ------------- |:-------------: | - | Ubuntu 18.04.1 | 18.30 | | SLE 15 | 18.40 | | Ubuntu 20.04.0 | 20.20 | | \**All supported distros* | 20.40 | * AMF SDK is backward compatible with all previous driver versions. -* Version 1.4.24: AMD Radeon Software Adrenalin Edition 22.3.1 (21.50.02.01) or newer. Added new AMD Direct Capture mode, new HQscaler feature(Bilinear/Bicubic/FSR), new Vulkan HEVC encoder on Navi family, improvements on H264 Vulkan encoding. +* Version 1.4.28: AMD Radeon Software Adrenalin Edition 22.12.1 (22.40.00.24) or newer. Added AV1 encoding support and 12-bit AV1 decoding. New VQEnhancer component. New AVC / HEVC encoder rate control methods. +* Version 1.4.26: AMD Radeon Software Adrenalin Edition 22.7.1 (22.20.15.01) or newer. Added new PAQ, TAQ, and high motion quality boost modes for PreAnalysis. New HQScaler sharpness, low latency decoder and temporal SVC encoder options. +* Version 1.4.24: AMD Radeon Software Adrenalin Edition 22.3.1 (21.50.02.01) or newer. Added new AMD Direct Capture mode, new HQScaler feature(Bilinear/Bicubic/FSR), new Vulkan HEVC encoder on Navi family, improvements on H264 Vulkan encoding. * Version 1.4.23: AMD Radeon Software Adrenalin Edition 21.12.1 (21.40.11.03) or newer. Added new Auto LTR encoder mode, additional encoder usage presets and encoder statistics/feedback. * Version 1.4.21: AMD Radeon Software Adrenalin Edition 21.10.1 (21.30.25.01) or newer. Added PSNR/SSIM score feedback, new QVBR rate control mode and LTR mode for encoders, added HDR support for HEVC encoder and color converter, new EncoderLatency sample app. * Version 1.4.18: AMD Radeon Software Adrenalin Edition 20.11.2 or newer. Added Pre-Encode filter within Pre-Processing component in 1.4.18. diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/ffmpeg b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/ffmpeg new file mode 100644 index 00000000..4c39e034 Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/ffmpeg differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavcodec.so.58 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavcodec.so.58 new file mode 100644 index 00000000..3457b294 Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavcodec.so.58 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavdevice.so.58 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavdevice.so.58 new file mode 100644 index 00000000..c9bf8523 Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavdevice.so.58 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavfilter.so.7 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavfilter.so.7 new file mode 100644 index 00000000..ce5a69c8 Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavfilter.so.7 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavformat.so.58 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavformat.so.58 new file mode 100644 index 00000000..8191a65a Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavformat.so.58 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavresample.so.4 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavresample.so.4 new file mode 100644 index 00000000..ba9cfe5a Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavresample.so.4 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavutil.so.56 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavutil.so.56 new file mode 100644 index 00000000..bbc1af9d Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libavutil.so.56 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswresample.so.3 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswresample.so.3 new file mode 100644 index 00000000..84461a4b Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswresample.so.3 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswscale.so.5 b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswscale.so.5 new file mode 100644 index 00000000..d1be028e Binary files /dev/null and b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/bin/libswscale.so.5 differ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/aix/math.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/aix/math.h new file mode 100644 index 00000000..dee13c8d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/aix/math.h @@ -0,0 +1,31 @@ +/* + * Work around the class() function in AIX math.h clashing with + * identifiers named "class". + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_AIX_MATH_H +#define COMPAT_AIX_MATH_H + +#define class class_in_math_h_causes_problems + +#include_next + +#undef class + +#endif /* COMPAT_AIX_MATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/dummy/stdatomic.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/dummy/stdatomic.h new file mode 100644 index 00000000..59d85f91 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/dummy/stdatomic.h @@ -0,0 +1,176 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * based on vlc_atomic.h from VLC + * Copyright (C) 2010 Rémi Denis-Courmont + */ + +#ifndef COMPAT_ATOMICS_DUMMY_STDATOMIC_H +#define COMPAT_ATOMICS_DUMMY_STDATOMIC_H + +#include + +#define ATOMIC_FLAG_INIT 0 + +#define ATOMIC_VAR_INIT(value) (value) + +#define atomic_init(obj, value) \ +do { \ + *(obj) = (value); \ +} while(0) + +#define kill_dependency(y) ((void)0) + +#define atomic_thread_fence(order) \ + ((void)0) + +#define atomic_signal_fence(order) \ + ((void)0) + +#define atomic_is_lock_free(obj) 0 + +typedef intptr_t atomic_flag; +typedef intptr_t atomic_bool; +typedef intptr_t atomic_char; +typedef intptr_t atomic_schar; +typedef intptr_t atomic_uchar; +typedef intptr_t atomic_short; +typedef intptr_t atomic_ushort; +typedef intptr_t atomic_int; +typedef intptr_t atomic_uint; +typedef intptr_t atomic_long; +typedef intptr_t atomic_ulong; +typedef intptr_t atomic_llong; +typedef intptr_t atomic_ullong; +typedef intptr_t atomic_wchar_t; +typedef intptr_t atomic_int_least8_t; +typedef intptr_t atomic_uint_least8_t; +typedef intptr_t atomic_int_least16_t; +typedef intptr_t atomic_uint_least16_t; +typedef intptr_t atomic_int_least32_t; +typedef intptr_t atomic_uint_least32_t; +typedef intptr_t atomic_int_least64_t; +typedef intptr_t atomic_uint_least64_t; +typedef intptr_t atomic_int_fast8_t; +typedef intptr_t atomic_uint_fast8_t; +typedef intptr_t atomic_int_fast16_t; +typedef intptr_t atomic_uint_fast16_t; +typedef intptr_t atomic_int_fast32_t; +typedef intptr_t atomic_uint_fast32_t; +typedef intptr_t atomic_int_fast64_t; +typedef intptr_t atomic_uint_fast64_t; +typedef intptr_t atomic_intptr_t; +typedef intptr_t atomic_uintptr_t; +typedef intptr_t atomic_size_t; +typedef intptr_t atomic_ptrdiff_t; +typedef intptr_t atomic_intmax_t; +typedef intptr_t atomic_uintmax_t; + +#define atomic_store(object, desired) \ +do { \ + *(object) = (desired); \ +} while (0) + +#define atomic_store_explicit(object, desired, order) \ + atomic_store(object, desired) + +#define atomic_load(object) \ + (*(object)) + +#define atomic_load_explicit(object, order) \ + atomic_load(object) + +static inline intptr_t atomic_exchange(intptr_t *object, intptr_t desired) +{ + intptr_t ret = *object; + *object = desired; + return ret; +} + +#define atomic_exchange_explicit(object, desired, order) \ + atomic_exchange(object, desired) + +static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, + intptr_t desired) +{ + int ret; + if (*object == *expected) { + *object = desired; + ret = 1; + } else { + *expected = *object; + ret = 0; + } + return ret; +} + +#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_weak(object, expected, desired) + +#define FETCH_MODIFY(opname, op) \ +static inline intptr_t atomic_fetch_ ## opname(intptr_t *object, intptr_t operand) \ +{ \ + intptr_t ret; \ + ret = *object; \ + *object = *object op operand; \ + return ret; \ +} + +FETCH_MODIFY(add, +) +FETCH_MODIFY(sub, -) +FETCH_MODIFY(or, |) +FETCH_MODIFY(xor, ^) +FETCH_MODIFY(and, &) + +#undef FETCH_MODIFY + +#define atomic_fetch_add_explicit(object, operand, order) \ + atomic_fetch_add(object, operand) + +#define atomic_fetch_sub_explicit(object, operand, order) \ + atomic_fetch_sub(object, operand) + +#define atomic_fetch_or_explicit(object, operand, order) \ + atomic_fetch_or(object, operand) + +#define atomic_fetch_xor_explicit(object, operand, order) \ + atomic_fetch_xor(object, operand) + +#define atomic_fetch_and_explicit(object, operand, order) \ + atomic_fetch_and(object, operand) + +#define atomic_flag_test_and_set(object) \ + atomic_exchange(object, 1) + +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_flag_test_and_set(object) + +#define atomic_flag_clear(object) \ + atomic_store(object, 0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_flag_clear(object) + +#endif /* COMPAT_ATOMICS_DUMMY_STDATOMIC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/gcc/stdatomic.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/gcc/stdatomic.h new file mode 100644 index 00000000..e13ed0e0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/gcc/stdatomic.h @@ -0,0 +1,173 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * based on vlc_atomic.h from VLC + * Copyright (C) 2010 Rémi Denis-Courmont + */ + +#ifndef COMPAT_ATOMICS_GCC_STDATOMIC_H +#define COMPAT_ATOMICS_GCC_STDATOMIC_H + +#include +#include + +#define ATOMIC_FLAG_INIT 0 + +#define ATOMIC_VAR_INIT(value) (value) + +#define atomic_init(obj, value) \ +do { \ + *(obj) = (value); \ +} while(0) + +#define kill_dependency(y) ((void)0) + +#define atomic_thread_fence(order) \ + __sync_synchronize() + +#define atomic_signal_fence(order) \ + ((void)0) + +#define atomic_is_lock_free(obj) 0 + +typedef _Bool atomic_flag; +typedef _Bool atomic_bool; +typedef char atomic_char; +typedef signed char atomic_schar; +typedef unsigned char atomic_uchar; +typedef short atomic_short; +typedef unsigned short atomic_ushort; +typedef int atomic_int; +typedef unsigned int atomic_uint; +typedef long atomic_long; +typedef unsigned long atomic_ulong; +typedef long long atomic_llong; +typedef unsigned long long atomic_ullong; +typedef wchar_t atomic_wchar_t; +typedef int_least8_t atomic_int_least8_t; +typedef uint_least8_t atomic_uint_least8_t; +typedef int_least16_t atomic_int_least16_t; +typedef uint_least16_t atomic_uint_least16_t; +typedef int_least32_t atomic_int_least32_t; +typedef uint_least32_t atomic_uint_least32_t; +typedef int_least64_t atomic_int_least64_t; +typedef uint_least64_t atomic_uint_least64_t; +typedef int_fast8_t atomic_int_fast8_t; +typedef uint_fast8_t atomic_uint_fast8_t; +typedef int_fast16_t atomic_int_fast16_t; +typedef uint_fast16_t atomic_uint_fast16_t; +typedef int_fast32_t atomic_int_fast32_t; +typedef uint_fast32_t atomic_uint_fast32_t; +typedef int_fast64_t atomic_int_fast64_t; +typedef uint_fast64_t atomic_uint_fast64_t; +typedef intptr_t atomic_intptr_t; +typedef uintptr_t atomic_uintptr_t; +typedef size_t atomic_size_t; +typedef ptrdiff_t atomic_ptrdiff_t; +typedef intmax_t atomic_intmax_t; +typedef uintmax_t atomic_uintmax_t; + +#define atomic_store(object, desired) \ +do { \ + *(object) = (desired); \ + __sync_synchronize(); \ +} while (0) + +#define atomic_store_explicit(object, desired, order) \ + atomic_store(object, desired) + +#define atomic_load(object) \ + (__sync_synchronize(), *(object)) + +#define atomic_load_explicit(object, order) \ + atomic_load(object) + +#define atomic_exchange(object, desired) \ +({ \ + __typeof__(object) _obj = (object); \ + __typeof__(*object) _old; \ + do \ + _old = atomic_load(_obj); \ + while (!__sync_bool_compare_and_swap(_obj, _old, (desired))); \ + _old; \ +}) + +#define atomic_exchange_explicit(object, desired, order) \ + atomic_exchange(object, desired) + +#define atomic_compare_exchange_strong(object, expected, desired) \ +({ \ + __typeof__(object) _exp = (expected); \ + __typeof__(*object) _old = *_exp; \ + *_exp = __sync_val_compare_and_swap((object), _old, (desired)); \ + *_exp == _old; \ +}) + +#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_weak(object, expected, desired) + +#define atomic_fetch_add(object, operand) \ + __sync_fetch_and_add(object, operand) + +#define atomic_fetch_add_explicit(object, operand, order) \ + atomic_fetch_add(object, operand) + +#define atomic_fetch_sub(object, operand) \ + __sync_fetch_and_sub(object, operand) + +#define atomic_fetch_sub_explicit(object, operand, order) \ + atomic_fetch_sub(object, operand) + +#define atomic_fetch_or(object, operand) \ + __sync_fetch_and_or(object, operand) + +#define atomic_fetch_or_explicit(object, operand, order) \ + atomic_fetch_or(object, operand) + +#define atomic_fetch_xor(object, operand) \ + __sync_fetch_and_xor(object, operand) + +#define atomic_fetch_xor_explicit(object, operand, order) \ + atomic_fetch_xor(object, operand) + +#define atomic_fetch_and(object, operand) \ + __sync_fetch_and_and(object, operand) + +#define atomic_fetch_and_explicit(object, operand, order) \ + atomic_fetch_and(object, operand) + +#define atomic_flag_test_and_set(object) \ + atomic_exchange(object, 1) + +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_flag_test_and_set(object) + +#define atomic_flag_clear(object) \ + atomic_store(object, 0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_flag_clear(object) + +#endif /* COMPAT_ATOMICS_GCC_STDATOMIC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/pthread/stdatomic.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/pthread/stdatomic.h new file mode 100644 index 00000000..81a60f10 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/pthread/stdatomic.h @@ -0,0 +1,197 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * based on vlc_atomic.h from VLC + * Copyright (C) 2010 Rémi Denis-Courmont + */ + +#ifndef COMPAT_ATOMICS_PTHREAD_STDATOMIC_H +#define COMPAT_ATOMICS_PTHREAD_STDATOMIC_H + +#include + +#define ATOMIC_FLAG_INIT 0 + +#define ATOMIC_VAR_INIT(value) (value) + +#define atomic_init(obj, value) \ +do { \ + *(obj) = (value); \ +} while(0) + +#define kill_dependency(y) ((void)0) + +#define atomic_signal_fence(order) \ + ((void)0) + +#define atomic_is_lock_free(obj) 0 + +typedef intptr_t atomic_flag; +typedef intptr_t atomic_bool; +typedef intptr_t atomic_char; +typedef intptr_t atomic_schar; +typedef intptr_t atomic_uchar; +typedef intptr_t atomic_short; +typedef intptr_t atomic_ushort; +typedef intptr_t atomic_int; +typedef intptr_t atomic_uint; +typedef intptr_t atomic_long; +typedef intptr_t atomic_ulong; +typedef intptr_t atomic_llong; +typedef intptr_t atomic_ullong; +typedef intptr_t atomic_wchar_t; +typedef intptr_t atomic_int_least8_t; +typedef intptr_t atomic_uint_least8_t; +typedef intptr_t atomic_int_least16_t; +typedef intptr_t atomic_uint_least16_t; +typedef intptr_t atomic_int_least32_t; +typedef intptr_t atomic_uint_least32_t; +typedef intptr_t atomic_int_least64_t; +typedef intptr_t atomic_uint_least64_t; +typedef intptr_t atomic_int_fast8_t; +typedef intptr_t atomic_uint_fast8_t; +typedef intptr_t atomic_int_fast16_t; +typedef intptr_t atomic_uint_fast16_t; +typedef intptr_t atomic_int_fast32_t; +typedef intptr_t atomic_uint_fast32_t; +typedef intptr_t atomic_int_fast64_t; +typedef intptr_t atomic_uint_fast64_t; +typedef intptr_t atomic_intptr_t; +typedef intptr_t atomic_uintptr_t; +typedef intptr_t atomic_size_t; +typedef intptr_t atomic_ptrdiff_t; +typedef intptr_t atomic_intmax_t; +typedef intptr_t atomic_uintmax_t; + +void avpriv_atomic_lock(void); +void avpriv_atomic_unlock(void); + +static inline void atomic_thread_fence(int order) +{ + avpriv_atomic_lock(); + avpriv_atomic_unlock(); +} + +static inline void atomic_store(intptr_t *object, intptr_t desired) +{ + avpriv_atomic_lock(); + *object = desired; + avpriv_atomic_unlock(); +} + +#define atomic_store_explicit(object, desired, order) \ + atomic_store(object, desired) + +static inline intptr_t atomic_load(intptr_t *object) +{ + intptr_t ret; + avpriv_atomic_lock(); + ret = *object; + avpriv_atomic_unlock(); + return ret; +} + +#define atomic_load_explicit(object, order) \ + atomic_load(object) + +static inline intptr_t atomic_exchange(intptr_t *object, intptr_t desired) +{ + intptr_t ret; + avpriv_atomic_lock(); + ret = *object; + *object = desired; + avpriv_atomic_unlock(); + return ret; +} + +#define atomic_exchange_explicit(object, desired, order) \ + atomic_exchange(object, desired) + +static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, + intptr_t desired) +{ + int ret; + avpriv_atomic_lock(); + if (*object == *expected) { + ret = 1; + *object = desired; + } else { + ret = 0; + *expected = *object; + } + avpriv_atomic_unlock(); + return ret; +} + +#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_weak(object, expected, desired) + +#define FETCH_MODIFY(opname, op) \ +static inline intptr_t atomic_fetch_ ## opname(intptr_t *object, intptr_t operand) \ +{ \ + intptr_t ret; \ + avpriv_atomic_lock(); \ + ret = *object; \ + *object = *object op operand; \ + avpriv_atomic_unlock(); \ + return ret; \ +} + +FETCH_MODIFY(add, +) +FETCH_MODIFY(sub, -) +FETCH_MODIFY(or, |) +FETCH_MODIFY(xor, ^) +FETCH_MODIFY(and, &) + +#undef FETCH_MODIFY + +#define atomic_fetch_add_explicit(object, operand, order) \ + atomic_fetch_add(object, operand) + +#define atomic_fetch_sub_explicit(object, operand, order) \ + atomic_fetch_sub(object, operand) + +#define atomic_fetch_or_explicit(object, operand, order) \ + atomic_fetch_or(object, operand) + +#define atomic_fetch_xor_explicit(object, operand, order) \ + atomic_fetch_xor(object, operand) + +#define atomic_fetch_and_explicit(object, operand, order) \ + atomic_fetch_and(object, operand) + +#define atomic_flag_test_and_set(object) \ + atomic_exchange(object, 1) + +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_flag_test_and_set(object) + +#define atomic_flag_clear(object) \ + atomic_store(object, 0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_flag_clear(object) + +#endif /* COMPAT_ATOMICS_PTHREAD_STDATOMIC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/suncc/stdatomic.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/suncc/stdatomic.h new file mode 100644 index 00000000..0cf89e0f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/suncc/stdatomic.h @@ -0,0 +1,186 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_ATOMICS_SUNCC_STDATOMIC_H +#define COMPAT_ATOMICS_SUNCC_STDATOMIC_H + +#include +#include +#include +#include + +#define ATOMIC_FLAG_INIT 0 + +#define ATOMIC_VAR_INIT(value) (value) + +#define atomic_init(obj, value) \ +do { \ + *(obj) = (value); \ +} while(0) + +#define kill_dependency(y) ((void)0) + +#define atomic_thread_fence(order) \ + __machine_rw_barrier(); + +#define atomic_signal_fence(order) \ + ((void)0) + +#define atomic_is_lock_free(obj) 0 + +typedef intptr_t atomic_flag; +typedef intptr_t atomic_bool; +typedef intptr_t atomic_char; +typedef intptr_t atomic_schar; +typedef intptr_t atomic_uchar; +typedef intptr_t atomic_short; +typedef intptr_t atomic_ushort; +typedef intptr_t atomic_int; +typedef intptr_t atomic_uint; +typedef intptr_t atomic_long; +typedef intptr_t atomic_ulong; +typedef intptr_t atomic_llong; +typedef intptr_t atomic_ullong; +typedef intptr_t atomic_wchar_t; +typedef intptr_t atomic_int_least8_t; +typedef intptr_t atomic_uint_least8_t; +typedef intptr_t atomic_int_least16_t; +typedef intptr_t atomic_uint_least16_t; +typedef intptr_t atomic_int_least32_t; +typedef intptr_t atomic_uint_least32_t; +typedef intptr_t atomic_int_least64_t; +typedef intptr_t atomic_uint_least64_t; +typedef intptr_t atomic_int_fast8_t; +typedef intptr_t atomic_uint_fast8_t; +typedef intptr_t atomic_int_fast16_t; +typedef intptr_t atomic_uint_fast16_t; +typedef intptr_t atomic_int_fast32_t; +typedef intptr_t atomic_uint_fast32_t; +typedef intptr_t atomic_int_fast64_t; +typedef intptr_t atomic_uint_fast64_t; +typedef intptr_t atomic_intptr_t; +typedef intptr_t atomic_uintptr_t; +typedef intptr_t atomic_size_t; +typedef intptr_t atomic_ptrdiff_t; +typedef intptr_t atomic_intmax_t; +typedef intptr_t atomic_uintmax_t; + +static inline void atomic_store(intptr_t *object, intptr_t desired) +{ + *object = desired; + __machine_rw_barrier(); +} + +#define atomic_store_explicit(object, desired, order) \ + atomic_store(object, desired) + +static inline intptr_t atomic_load(intptr_t *object) +{ + __machine_rw_barrier(); + return *object; +} + +#define atomic_load_explicit(object, order) \ + atomic_load(object) + +#define atomic_exchange(object, desired) \ + atomic_swap_ptr(object, desired) + +#define atomic_exchange_explicit(object, desired, order) \ + atomic_exchange(object, desired) + +static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, + intptr_t desired) +{ + intptr_t old = *expected; + *expected = (intptr_t)atomic_cas_ptr(object, (void *)old, (void *)desired); + return *expected == old; +} + +#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_weak(object, expected, desired) + +static inline intptr_t atomic_fetch_add(intptr_t *object, intptr_t operand) +{ + return atomic_add_ptr_nv(object, operand) - operand; +} + +#define atomic_fetch_sub(object, operand) \ + atomic_fetch_add(object, -(operand)) + +static inline intptr_t atomic_fetch_or(intptr_t *object, intptr_t operand) +{ + intptr_t old; + do { + old = atomic_load(object); + } while (!atomic_compare_exchange_strong(object, old, old | operand)); + return old; +} + +static inline intptr_t atomic_fetch_xor(intptr_t *object, intptr_t operand) +{ + intptr_t old; + do { + old = atomic_load(object); + } while (!atomic_compare_exchange_strong(object, old, old ^ operand)); + return old; +} + +static inline intptr_t atomic_fetch_and(intptr_t *object, intptr_t operand) +{ + intptr_t old; + do { + old = atomic_load(object); + } while (!atomic_compare_exchange_strong(object, old, old & operand)); + return old; +} + +#define atomic_fetch_add_explicit(object, operand, order) \ + atomic_fetch_add(object, operand) + +#define atomic_fetch_sub_explicit(object, operand, order) \ + atomic_fetch_sub(object, operand) + +#define atomic_fetch_or_explicit(object, operand, order) \ + atomic_fetch_or(object, operand) + +#define atomic_fetch_xor_explicit(object, operand, order) \ + atomic_fetch_xor(object, operand) + +#define atomic_fetch_and_explicit(object, operand, order) \ + atomic_fetch_and(object, operand) + +#define atomic_flag_test_and_set(object) \ + atomic_exchange(object, 1) + +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_flag_test_and_set(object) + +#define atomic_flag_clear(object) \ + atomic_store(object, 0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_flag_clear(object) + +#endif /* COMPAT_ATOMICS_SUNCC_STDATOMIC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/win32/stdatomic.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/win32/stdatomic.h new file mode 100644 index 00000000..bb8e6e7e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/atomics/win32/stdatomic.h @@ -0,0 +1,181 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H +#define COMPAT_ATOMICS_WIN32_STDATOMIC_H + +#define WIN32_LEAN_AND_MEAN +#include +#include +#include + +#define ATOMIC_FLAG_INIT 0 + +#define ATOMIC_VAR_INIT(value) (value) + +#define atomic_init(obj, value) \ +do { \ + *(obj) = (value); \ +} while(0) + +#define kill_dependency(y) ((void)0) + +#define atomic_thread_fence(order) \ + MemoryBarrier(); + +#define atomic_signal_fence(order) \ + ((void)0) + +#define atomic_is_lock_free(obj) 0 + +typedef intptr_t atomic_flag; +typedef intptr_t atomic_bool; +typedef intptr_t atomic_char; +typedef intptr_t atomic_schar; +typedef intptr_t atomic_uchar; +typedef intptr_t atomic_short; +typedef intptr_t atomic_ushort; +typedef intptr_t atomic_int; +typedef intptr_t atomic_uint; +typedef intptr_t atomic_long; +typedef intptr_t atomic_ulong; +typedef intptr_t atomic_llong; +typedef intptr_t atomic_ullong; +typedef intptr_t atomic_wchar_t; +typedef intptr_t atomic_int_least8_t; +typedef intptr_t atomic_uint_least8_t; +typedef intptr_t atomic_int_least16_t; +typedef intptr_t atomic_uint_least16_t; +typedef intptr_t atomic_int_least32_t; +typedef intptr_t atomic_uint_least32_t; +typedef intptr_t atomic_int_least64_t; +typedef intptr_t atomic_uint_least64_t; +typedef intptr_t atomic_int_fast8_t; +typedef intptr_t atomic_uint_fast8_t; +typedef intptr_t atomic_int_fast16_t; +typedef intptr_t atomic_uint_fast16_t; +typedef intptr_t atomic_int_fast32_t; +typedef intptr_t atomic_uint_fast32_t; +typedef intptr_t atomic_int_fast64_t; +typedef intptr_t atomic_uint_fast64_t; +typedef intptr_t atomic_intptr_t; +typedef intptr_t atomic_uintptr_t; +typedef intptr_t atomic_size_t; +typedef intptr_t atomic_ptrdiff_t; +typedef intptr_t atomic_intmax_t; +typedef intptr_t atomic_uintmax_t; + +#define atomic_store(object, desired) \ +do { \ + *(object) = (desired); \ + MemoryBarrier(); \ +} while (0) + +#define atomic_store_explicit(object, desired, order) \ + atomic_store(object, desired) + +#define atomic_load(object) \ + (MemoryBarrier(), *(object)) + +#define atomic_load_explicit(object, order) \ + atomic_load(object) + +#define atomic_exchange(object, desired) \ + InterlockedExchangePointer(object, desired); + +#define atomic_exchange_explicit(object, desired, order) \ + atomic_exchange(object, desired) + +static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, + intptr_t desired) +{ + intptr_t old = *expected; + *expected = (intptr_t)InterlockedCompareExchangePointer( + (PVOID *)object, (PVOID)desired, (PVOID)old); + return *expected == old; +} + +#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_strong(object, expected, desired) + +#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ + atomic_compare_exchange_weak(object, expected, desired) + +#ifdef _WIN64 +#define atomic_fetch_add(object, operand) \ + InterlockedExchangeAdd64(object, operand) + +#define atomic_fetch_sub(object, operand) \ + InterlockedExchangeAdd64(object, -(operand)) + +#define atomic_fetch_or(object, operand) \ + InterlockedOr64(object, operand) + +#define atomic_fetch_xor(object, operand) \ + InterlockedXor64(object, operand) + +#define atomic_fetch_and(object, operand) \ + InterlockedAnd64(object, operand) +#else +#define atomic_fetch_add(object, operand) \ + InterlockedExchangeAdd(object, operand) + +#define atomic_fetch_sub(object, operand) \ + InterlockedExchangeAdd(object, -(operand)) + +#define atomic_fetch_or(object, operand) \ + InterlockedOr(object, operand) + +#define atomic_fetch_xor(object, operand) \ + InterlockedXor(object, operand) + +#define atomic_fetch_and(object, operand) \ + InterlockedAnd(object, operand) +#endif /* _WIN64 */ + +#define atomic_fetch_add_explicit(object, operand, order) \ + atomic_fetch_add(object, operand) + +#define atomic_fetch_sub_explicit(object, operand, order) \ + atomic_fetch_sub(object, operand) + +#define atomic_fetch_or_explicit(object, operand, order) \ + atomic_fetch_or(object, operand) + +#define atomic_fetch_xor_explicit(object, operand, order) \ + atomic_fetch_xor(object, operand) + +#define atomic_fetch_and_explicit(object, operand, order) \ + atomic_fetch_and(object, operand) + +#define atomic_flag_test_and_set(object) \ + atomic_exchange(object, 1) + +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_flag_test_and_set(object) + +#define atomic_flag_clear(object) \ + atomic_store(object, 0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_flag_clear(object) + +#endif /* COMPAT_ATOMICS_WIN32_STDATOMIC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/cuda_runtime.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/cuda_runtime.h new file mode 100644 index 00000000..92c55ad8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/cuda_runtime.h @@ -0,0 +1,131 @@ +/* + * Minimum CUDA compatibility definitions header + * + * Copyright (c) 2019 Rodger Combs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_CUDA_CUDA_RUNTIME_H +#define COMPAT_CUDA_CUDA_RUNTIME_H + +// Common macros +#define __global__ __attribute__((global)) +#define __device__ __attribute__((device)) +#define __device_builtin__ __attribute__((device_builtin)) +#define __align__(N) __attribute__((aligned(N))) +#define __inline__ __inline__ __attribute__((always_inline)) + +#define max(a, b) ((a) > (b) ? (a) : (b)) +#define min(a, b) ((a) < (b) ? (a) : (b)) +#define abs(x) ((x) < 0 ? -(x) : (x)) + +#define atomicAdd(a, b) (__atomic_fetch_add(a, b, __ATOMIC_SEQ_CST)) + +// Basic typedefs +typedef __device_builtin__ unsigned long long cudaTextureObject_t; + +typedef struct __device_builtin__ __align__(2) uchar2 +{ + unsigned char x, y; +} uchar2; + +typedef struct __device_builtin__ __align__(4) ushort2 +{ + unsigned short x, y; +} ushort2; + +typedef struct __device_builtin__ uint3 +{ + unsigned int x, y, z; +} uint3; + +typedef struct uint3 dim3; + +typedef struct __device_builtin__ __align__(8) int2 +{ + int x, y; +} int2; + +typedef struct __device_builtin__ __align__(4) uchar4 +{ + unsigned char x, y, z, w; +} uchar4; + +typedef struct __device_builtin__ __align__(8) ushort4 +{ + unsigned char x, y, z, w; +} ushort4; + +typedef struct __device_builtin__ __align__(16) int4 +{ + int x, y, z, w; +} int4; + +// Accessors for special registers +#define GETCOMP(reg, comp) \ + asm("mov.u32 %0, %%" #reg "." #comp ";" : "=r"(tmp)); \ + ret.comp = tmp; + +#define GET(name, reg) static inline __device__ uint3 name() {\ + uint3 ret; \ + unsigned tmp; \ + GETCOMP(reg, x) \ + GETCOMP(reg, y) \ + GETCOMP(reg, z) \ + return ret; \ +} + +GET(getBlockIdx, ctaid) +GET(getBlockDim, ntid) +GET(getThreadIdx, tid) + +// Instead of externs for these registers, we turn access to them into calls into trivial ASM +#define blockIdx (getBlockIdx()) +#define blockDim (getBlockDim()) +#define threadIdx (getThreadIdx()) + +// Basic initializers (simple macros rather than inline functions) +#define make_uchar2(a, b) ((uchar2){.x = a, .y = b}) +#define make_ushort2(a, b) ((ushort2){.x = a, .y = b}) +#define make_uchar4(a, b, c, d) ((uchar4){.x = a, .y = b, .z = c, .w = d}) +#define make_ushort4(a, b, c, d) ((ushort4){.x = a, .y = b, .z = c, .w = d}) + +// Conversions from the tex instruction's 4-register output to various types +#define TEX2D(type, ret) static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);} + +TEX2D(unsigned char, a & 0xFF) +TEX2D(unsigned short, a & 0xFFFF) +TEX2D(uchar2, make_uchar2(a & 0xFF, b & 0xFF)) +TEX2D(ushort2, make_ushort2(a & 0xFFFF, b & 0xFFFF)) +TEX2D(uchar4, make_uchar4(a & 0xFF, b & 0xFF, c & 0xFF, d & 0xFF)) +TEX2D(ushort4, make_ushort4(a & 0xFFFF, b & 0xFFFF, c & 0xFFFF, d & 0xFFFF)) + +// Template calling tex instruction and converting the output to the selected type +template +static inline __device__ T tex2D(cudaTextureObject_t texObject, float x, float y) +{ + T ret; + unsigned ret1, ret2, ret3, ret4; + asm("tex.2d.v4.u32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" : + "=r"(ret1), "=r"(ret2), "=r"(ret3), "=r"(ret4) : + "l"(texObject), "f"(x), "f"(y)); + conv(&ret, ret1, ret2, ret3, ret4); + return ret; +} + +#endif /* COMPAT_CUDA_CUDA_RUNTIME_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/dynlink_loader.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/dynlink_loader.h new file mode 100644 index 00000000..ca79e604 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/cuda/dynlink_loader.h @@ -0,0 +1,33 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_CUDA_DYNLINK_LOADER_H +#define COMPAT_CUDA_DYNLINK_LOADER_H + +#include "libavutil/log.h" +#include "compat/w32dlfcn.h" + +#define FFNV_LOAD_FUNC(path) dlopen((path), RTLD_LAZY) +#define FFNV_SYM_FUNC(lib, sym) dlsym((lib), (sym)) +#define FFNV_FREE_FUNC(lib) dlclose(lib) +#define FFNV_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_ERROR, msg, __VA_ARGS__) +#define FFNV_DEBUG_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_DEBUG, msg, __VA_ARGS__) + +#include + +#endif /* COMPAT_CUDA_DYNLINK_LOADER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/dispatch_semaphore/semaphore.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/dispatch_semaphore/semaphore.h new file mode 100644 index 00000000..008c637c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/dispatch_semaphore/semaphore.h @@ -0,0 +1,42 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_DISPATCH_SEMAPHORE_SEMAPHORE_H +#define COMPAT_DISPATCH_SEMAPHORE_SEMAPHORE_H + +#include +#include + +#define sem_t dispatch_semaphore_t +#define sem_post(psem) dispatch_semaphore_signal(*psem) +#define sem_wait(psem) dispatch_semaphore_wait(*psem, DISPATCH_TIME_FOREVER) +#define sem_timedwait(psem, val) dispatch_semaphore_wait(*psem, dispatch_walltime(val, 0)) +#define sem_destroy(psem) dispatch_release(*psem) + +static inline int compat_sem_init(dispatch_semaphore_t *psem, + int unused, int val) +{ + int ret = !!(*psem = dispatch_semaphore_create(val)) - 1; + if (ret < 0) + errno = ENOMEM; + return ret; +} + +#define sem_init compat_sem_init + +#endif /* COMPAT_DISPATCH_SEMAPHORE_SEMAPHORE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/djgpp/math.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/djgpp/math.h new file mode 100644 index 00000000..4c02ea9c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/djgpp/math.h @@ -0,0 +1,25 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +double fmin(double, double); +double fmax(double, double); +float fminf(float, float); +float fmaxf(float, float); +long double fmodl(long double, long double); +long double scalbnl(long double, int); +long double copysignl(long double, long double); diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/float.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/float.h new file mode 100644 index 00000000..1f0d3ab4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/float.h @@ -0,0 +1,35 @@ +/* + * Work around broken floating point limits on some systems. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include_next + +#ifdef FLT_MAX +#undef FLT_MAX +#define FLT_MAX 3.40282346638528859812e+38F + +#undef FLT_MIN +#define FLT_MIN 1.17549435082228750797e-38F + +#undef DBL_MAX +#define DBL_MAX ((double)1.79769313486231570815e+308L) + +#undef DBL_MIN +#define DBL_MIN ((double)2.22507385850720138309e-308L) +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/limits.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/limits.h new file mode 100644 index 00000000..7ea374a8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/float/limits.h @@ -0,0 +1,22 @@ +/* + * Work around broken floating point limits on some systems. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include_next +#include diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/msvcrt/snprintf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/msvcrt/snprintf.h new file mode 100644 index 00000000..cd47953e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/msvcrt/snprintf.h @@ -0,0 +1,38 @@ +/* + * C99-compatible snprintf() and vsnprintf() implementations + * Copyright (c) 2012 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_MSVCRT_SNPRINTF_H +#define COMPAT_MSVCRT_SNPRINTF_H + +#include +#include + +int avpriv_snprintf(char *s, size_t n, const char *fmt, ...); +int avpriv_vsnprintf(char *s, size_t n, const char *fmt, va_list ap); + +#undef snprintf +#undef _snprintf +#undef vsnprintf +#define snprintf avpriv_snprintf +#define _snprintf avpriv_snprintf +#define vsnprintf avpriv_vsnprintf + +#endif /* COMPAT_MSVCRT_SNPRINTF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/os2threads.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/os2threads.h new file mode 100644 index 00000000..a061eaa6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/os2threads.h @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2011-2017 KO Myung-Hun + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * os2threads to pthreads wrapper + */ + +#ifndef COMPAT_OS2THREADS_H +#define COMPAT_OS2THREADS_H + +#define INCL_DOS +#define INCL_DOSERRORS +#include + +#undef __STRICT_ANSI__ /* for _beginthread() */ +#include +#include + +#include +#include + +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/time.h" + +typedef struct { + TID tid; + void *(*start_routine)(void *); + void *arg; + void *result; +} pthread_t; + +typedef void pthread_attr_t; + +typedef _fmutex pthread_mutex_t; +typedef void pthread_mutexattr_t; + +#define PTHREAD_MUTEX_INITIALIZER _FMUTEX_INITIALIZER + +typedef struct { + HEV event_sem; + HEV ack_sem; + volatile unsigned wait_count; +} pthread_cond_t; + +typedef void pthread_condattr_t; + +typedef struct { + volatile int done; + _fmutex mtx; +} pthread_once_t; + +#define PTHREAD_ONCE_INIT {0, _FMUTEX_INITIALIZER} + +static void thread_entry(void *arg) +{ + pthread_t *thread = arg; + + thread->result = thread->start_routine(thread->arg); +} + +static av_always_inline int pthread_create(pthread_t *thread, + const pthread_attr_t *attr, + void *(*start_routine)(void*), + void *arg) +{ + thread->start_routine = start_routine; + thread->arg = arg; + thread->result = NULL; + + thread->tid = _beginthread(thread_entry, NULL, 1024 * 1024, thread); + + return 0; +} + +static av_always_inline int pthread_join(pthread_t thread, void **value_ptr) +{ + DosWaitThread(&thread.tid, DCWW_WAIT); + + if (value_ptr) + *value_ptr = thread.result; + + return 0; +} + +static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *attr) +{ + _fmutex_create(mutex, 0); + + return 0; +} + +static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex) +{ + _fmutex_close(mutex); + + return 0; +} + +static av_always_inline int pthread_mutex_lock(pthread_mutex_t *mutex) +{ + _fmutex_request(mutex, 0); + + return 0; +} + +static av_always_inline int pthread_mutex_unlock(pthread_mutex_t *mutex) +{ + _fmutex_release(mutex); + + return 0; +} + +static av_always_inline int pthread_cond_init(pthread_cond_t *cond, + const pthread_condattr_t *attr) +{ + DosCreateEventSem(NULL, &cond->event_sem, DCE_POSTONE, FALSE); + DosCreateEventSem(NULL, &cond->ack_sem, DCE_POSTONE, FALSE); + + cond->wait_count = 0; + + return 0; +} + +static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond) +{ + DosCloseEventSem(cond->event_sem); + DosCloseEventSem(cond->ack_sem); + + return 0; +} + +static av_always_inline int pthread_cond_signal(pthread_cond_t *cond) +{ + if (!__atomic_cmpxchg32(&cond->wait_count, 0, 0)) { + DosPostEventSem(cond->event_sem); + DosWaitEventSem(cond->ack_sem, SEM_INDEFINITE_WAIT); + } + + return 0; +} + +static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond) +{ + while (!__atomic_cmpxchg32(&cond->wait_count, 0, 0)) + pthread_cond_signal(cond); + + return 0; +} + +static av_always_inline int pthread_cond_timedwait(pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec *abstime) +{ + int64_t abs_milli = abstime->tv_sec * 1000LL + abstime->tv_nsec / 1000000; + ULONG t = av_clip64(abs_milli - av_gettime() / 1000, 0, ULONG_MAX); + + __atomic_increment(&cond->wait_count); + + pthread_mutex_unlock(mutex); + + APIRET ret = DosWaitEventSem(cond->event_sem, t); + + __atomic_decrement(&cond->wait_count); + + DosPostEventSem(cond->ack_sem); + + pthread_mutex_lock(mutex); + + return (ret == ERROR_TIMEOUT) ? ETIMEDOUT : 0; +} + +static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, + pthread_mutex_t *mutex) +{ + __atomic_increment(&cond->wait_count); + + pthread_mutex_unlock(mutex); + + DosWaitEventSem(cond->event_sem, SEM_INDEFINITE_WAIT); + + __atomic_decrement(&cond->wait_count); + + DosPostEventSem(cond->ack_sem); + + pthread_mutex_lock(mutex); + + return 0; +} + +static av_always_inline int pthread_once(pthread_once_t *once_control, + void (*init_routine)(void)) +{ + if (!once_control->done) + { + _fmutex_request(&once_control->mtx, 0); + + if (!once_control->done) + { + init_routine(); + + once_control->done = 1; + } + + _fmutex_release(&once_control->mtx); + } + + return 0; +} +#endif /* COMPAT_OS2THREADS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/va_copy.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/va_copy.h new file mode 100644 index 00000000..a40bbe66 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/va_copy.h @@ -0,0 +1,34 @@ +/* + * MSVC Compatible va_copy macro + * Copyright (c) 2012 Derek Buitenhuis + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_VA_COPY_H +#define COMPAT_VA_COPY_H + +#include + +#if !defined(va_copy) && defined(_MSC_VER) +#define va_copy(dst, src) ((dst) = (src)) +#endif +#if !defined(va_copy) && defined(__GNUC__) && __GNUC__ < 3 +#define va_copy(dst, src) __va_copy(dst, src) +#endif + +#endif /* COMPAT_VA_COPY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32dlfcn.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32dlfcn.h new file mode 100644 index 00000000..c83bdc93 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32dlfcn.h @@ -0,0 +1,94 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMPAT_W32DLFCN_H +#define COMPAT_W32DLFCN_H + +#ifdef _WIN32 +#include +#include "config.h" +#if (_WIN32_WINNT < 0x0602) || HAVE_WINRT +#include "libavutil/wchar_filename.h" +#endif +/** + * Safe function used to open dynamic libs. This attempts to improve program security + * by removing the current directory from the dll search path. Only dll's found in the + * executable or system directory are allowed to be loaded. + * @param name The dynamic lib name. + * @return A handle to the opened lib. + */ +static inline HMODULE win32_dlopen(const char *name) +{ +#if _WIN32_WINNT < 0x0602 + // Need to check if KB2533623 is available + if (!GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "SetDefaultDllDirectories")) { + HMODULE module = NULL; + wchar_t *path = NULL, *name_w = NULL; + DWORD pathlen; + if (utf8towchar(name, &name_w)) + goto exit; + path = (wchar_t *)av_mallocz_array(MAX_PATH, sizeof(wchar_t)); + // Try local directory first + pathlen = GetModuleFileNameW(NULL, path, MAX_PATH); + pathlen = wcsrchr(path, '\\') - path; + if (pathlen == 0 || pathlen + wcslen(name_w) + 2 > MAX_PATH) + goto exit; + path[pathlen] = '\\'; + wcscpy(path + pathlen + 1, name_w); + module = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + if (module == NULL) { + // Next try System32 directory + pathlen = GetSystemDirectoryW(path, MAX_PATH); + if (pathlen == 0 || pathlen + wcslen(name_w) + 2 > MAX_PATH) + goto exit; + path[pathlen] = '\\'; + wcscpy(path + pathlen + 1, name_w); + module = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } +exit: + av_free(path); + av_free(name_w); + return module; + } +#endif +#ifndef LOAD_LIBRARY_SEARCH_APPLICATION_DIR +# define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200 +#endif +#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32 +# define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 +#endif +#if HAVE_WINRT + wchar_t *name_w = NULL; + int ret; + if (utf8towchar(name, &name_w)) + return NULL; + ret = LoadPackagedLibrary(name_w, 0); + av_free(name_w); + return ret; +#else + return LoadLibraryExA(name, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32); +#endif +} +#define dlopen(name, flags) win32_dlopen(name) +#define dlclose FreeLibrary +#define dlsym GetProcAddress +#else +#include +#endif + +#endif /* COMPAT_W32DLFCN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32pthreads.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32pthreads.h new file mode 100644 index 00000000..6405e72b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/compat/w32pthreads.h @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2010-2011 x264 project + * + * Authors: Steven Walters + * Pegasys Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * w32threads to pthreads wrapper + */ + +#ifndef COMPAT_W32PTHREADS_H +#define COMPAT_W32PTHREADS_H + +/* Build up a pthread-like API using underlying Windows API. Have only static + * methods so as to not conflict with a potentially linked in pthread-win32 + * library. + * As most functions here are used without checking return values, + * only implement return values as necessary. */ + +#define WIN32_LEAN_AND_MEAN +#include +#include +#include + +#include "libavutil/attributes.h" +#include "libavutil/common.h" +#include "libavutil/internal.h" +#include "libavutil/mem.h" +#include "libavutil/time.h" + +typedef struct pthread_t { + void *handle; + void *(*func)(void* arg); + void *arg; + void *ret; +} pthread_t; + +/* use light weight mutex/condition variable API for Windows Vista and later */ +typedef SRWLOCK pthread_mutex_t; +typedef CONDITION_VARIABLE pthread_cond_t; + +#define PTHREAD_MUTEX_INITIALIZER SRWLOCK_INIT +#define PTHREAD_COND_INITIALIZER CONDITION_VARIABLE_INIT + +#define InitializeCriticalSection(x) InitializeCriticalSectionEx(x, 0, 0) +#define WaitForSingleObject(a, b) WaitForSingleObjectEx(a, b, FALSE) + +#define PTHREAD_CANCEL_ENABLE 1 +#define PTHREAD_CANCEL_DISABLE 0 + +static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) +{ + pthread_t *h = (pthread_t*)arg; + h->ret = h->func(h->arg); + return 0; +} + +static av_unused int pthread_create(pthread_t *thread, const void *unused_attr, + void *(*start_routine)(void*), void *arg) +{ + thread->func = start_routine; + thread->arg = arg; +#if HAVE_WINRT + thread->handle = (void*)CreateThread(NULL, 0, win32thread_worker, thread, + 0, NULL); +#else + thread->handle = (void*)_beginthreadex(NULL, 0, win32thread_worker, thread, + 0, NULL); +#endif + return !thread->handle; +} + +static av_unused int pthread_join(pthread_t thread, void **value_ptr) +{ + DWORD ret = WaitForSingleObject(thread.handle, INFINITE); + if (ret != WAIT_OBJECT_0) { + if (ret == WAIT_ABANDONED) + return EINVAL; + else + return EDEADLK; + } + if (value_ptr) + *value_ptr = thread.ret; + CloseHandle(thread.handle); + return 0; +} + +static inline int pthread_mutex_init(pthread_mutex_t *m, void* attr) +{ + InitializeSRWLock(m); + return 0; +} +static inline int pthread_mutex_destroy(pthread_mutex_t *m) +{ + /* Unlocked SWR locks use no resources */ + return 0; +} +static inline int pthread_mutex_lock(pthread_mutex_t *m) +{ + AcquireSRWLockExclusive(m); + return 0; +} +static inline int pthread_mutex_unlock(pthread_mutex_t *m) +{ + ReleaseSRWLockExclusive(m); + return 0; +} + +typedef INIT_ONCE pthread_once_t; +#define PTHREAD_ONCE_INIT INIT_ONCE_STATIC_INIT + +static av_unused int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) +{ + BOOL pending = FALSE; + InitOnceBeginInitialize(once_control, 0, &pending, NULL); + if (pending) + init_routine(); + InitOnceComplete(once_control, 0, NULL); + return 0; +} + +static inline int pthread_cond_init(pthread_cond_t *cond, const void *unused_attr) +{ + InitializeConditionVariable(cond); + return 0; +} + +/* native condition variables do not destroy */ +static inline int pthread_cond_destroy(pthread_cond_t *cond) +{ + return 0; +} + +static inline int pthread_cond_broadcast(pthread_cond_t *cond) +{ + WakeAllConditionVariable(cond); + return 0; +} + +static inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +{ + SleepConditionVariableSRW(cond, mutex, INFINITE, 0); + return 0; +} + +static inline int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime) +{ + int64_t abs_milli = abstime->tv_sec * 1000LL + abstime->tv_nsec / 1000000; + DWORD t = av_clip64(abs_milli - av_gettime() / 1000, 0, UINT32_MAX); + + if (!SleepConditionVariableSRW(cond, mutex, t, 0)) { + DWORD err = GetLastError(); + if (err == ERROR_TIMEOUT) + return ETIMEDOUT; + else + return EINVAL; + } + return 0; +} + +static inline int pthread_cond_signal(pthread_cond_t *cond) +{ + WakeConditionVariable(cond); + return 0; +} + +static inline int pthread_setcancelstate(int state, int *oldstate) +{ + return 0; +} + +#endif /* COMPAT_W32PTHREADS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/config.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/config.h new file mode 100644 index 00000000..fdbdef0c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/config.h @@ -0,0 +1,2608 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H +#define FFMPEG_CONFIGURATION "--arch=aarch64 --enable-shared --enable-pthreads --enable-avresample --enable-version3 --enable-openssl --enable-libaom --enable-rpath --disable-sndio --extra-cflags='-I/root/ffmpeg/zlib-1.2.11,-I/root/ffmpeg/openssl-3.0.0/arm64/include,-I/root/ffmpeg/aom_bin/include' --extra-ldflags='-Wl,-rpath=$ORIGIN,-L/root/ffmpeg/zlib-1.2.11,-L/root/ffmpeg/openssl-3.0.0/arm64/lib,-L/root/ffmpeg/aom_bin/lib'" +#define FFMPEG_LICENSE "LGPL version 3 or later" +#define CONFIG_THIS_YEAR 2021 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg" +#define AVCONV_DATADIR "/usr/local/share/ffmpeg" +#define CC_IDENT "gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)" +#define av_restrict restrict +#define EXTERN_PREFIX "" +#define EXTERN_ASM +#define BUILDSUF "" +#define SLIBSUF ".so" +#define HAVE_MMX2 HAVE_MMXEXT +#define SWS_MAX_FILTER_SIZE 256 +#define ARCH_AARCH64 1 +#define ARCH_ALPHA 0 +#define ARCH_ARM 0 +#define ARCH_AVR32 0 +#define ARCH_AVR32_AP 0 +#define ARCH_AVR32_UC 0 +#define ARCH_BFIN 0 +#define ARCH_IA64 0 +#define ARCH_M68K 0 +#define ARCH_MIPS 0 +#define ARCH_MIPS64 0 +#define ARCH_PARISC 0 +#define ARCH_PPC 0 +#define ARCH_PPC64 0 +#define ARCH_S390 0 +#define ARCH_SH4 0 +#define ARCH_SPARC 0 +#define ARCH_SPARC64 0 +#define ARCH_TILEGX 0 +#define ARCH_TILEPRO 0 +#define ARCH_TOMI 0 +#define ARCH_X86 0 +#define ARCH_X86_32 0 +#define ARCH_X86_64 0 +#define HAVE_ARMV5TE 0 +#define HAVE_ARMV6 0 +#define HAVE_ARMV6T2 0 +#define HAVE_ARMV8 1 +#define HAVE_NEON 1 +#define HAVE_VFP 1 +#define HAVE_VFPV3 0 +#define HAVE_SETEND 0 +#define HAVE_ALTIVEC 0 +#define HAVE_DCBZL 0 +#define HAVE_LDBRX 0 +#define HAVE_POWER8 0 +#define HAVE_PPC4XX 0 +#define HAVE_VSX 0 +#define HAVE_AESNI 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_AMD3DNOWEXT 0 +#define HAVE_AVX 0 +#define HAVE_AVX2 0 +#define HAVE_AVX512 0 +#define HAVE_FMA3 0 +#define HAVE_FMA4 0 +#define HAVE_MMX 0 +#define HAVE_MMXEXT 0 +#define HAVE_SSE 0 +#define HAVE_SSE2 0 +#define HAVE_SSE3 0 +#define HAVE_SSE4 0 +#define HAVE_SSE42 0 +#define HAVE_SSSE3 0 +#define HAVE_XOP 0 +#define HAVE_CPUNOP 0 +#define HAVE_I686 0 +#define HAVE_MIPSFPU 0 +#define HAVE_MIPS32R2 0 +#define HAVE_MIPS32R5 0 +#define HAVE_MIPS64R2 0 +#define HAVE_MIPS32R6 0 +#define HAVE_MIPS64R6 0 +#define HAVE_MIPSDSP 0 +#define HAVE_MIPSDSPR2 0 +#define HAVE_MSA 0 +#define HAVE_MSA2 0 +#define HAVE_LOONGSON2 0 +#define HAVE_LOONGSON3 0 +#define HAVE_MMI 0 +#define HAVE_ARMV5TE_EXTERNAL 0 +#define HAVE_ARMV6_EXTERNAL 0 +#define HAVE_ARMV6T2_EXTERNAL 0 +#define HAVE_ARMV8_EXTERNAL 1 +#define HAVE_NEON_EXTERNAL 1 +#define HAVE_VFP_EXTERNAL 1 +#define HAVE_VFPV3_EXTERNAL 0 +#define HAVE_SETEND_EXTERNAL 0 +#define HAVE_ALTIVEC_EXTERNAL 0 +#define HAVE_DCBZL_EXTERNAL 0 +#define HAVE_LDBRX_EXTERNAL 0 +#define HAVE_POWER8_EXTERNAL 0 +#define HAVE_PPC4XX_EXTERNAL 0 +#define HAVE_VSX_EXTERNAL 0 +#define HAVE_AESNI_EXTERNAL 0 +#define HAVE_AMD3DNOW_EXTERNAL 0 +#define HAVE_AMD3DNOWEXT_EXTERNAL 0 +#define HAVE_AVX_EXTERNAL 0 +#define HAVE_AVX2_EXTERNAL 0 +#define HAVE_AVX512_EXTERNAL 0 +#define HAVE_FMA3_EXTERNAL 0 +#define HAVE_FMA4_EXTERNAL 0 +#define HAVE_MMX_EXTERNAL 0 +#define HAVE_MMXEXT_EXTERNAL 0 +#define HAVE_SSE_EXTERNAL 0 +#define HAVE_SSE2_EXTERNAL 0 +#define HAVE_SSE3_EXTERNAL 0 +#define HAVE_SSE4_EXTERNAL 0 +#define HAVE_SSE42_EXTERNAL 0 +#define HAVE_SSSE3_EXTERNAL 0 +#define HAVE_XOP_EXTERNAL 0 +#define HAVE_CPUNOP_EXTERNAL 0 +#define HAVE_I686_EXTERNAL 0 +#define HAVE_MIPSFPU_EXTERNAL 0 +#define HAVE_MIPS32R2_EXTERNAL 0 +#define HAVE_MIPS32R5_EXTERNAL 0 +#define HAVE_MIPS64R2_EXTERNAL 0 +#define HAVE_MIPS32R6_EXTERNAL 0 +#define HAVE_MIPS64R6_EXTERNAL 0 +#define HAVE_MIPSDSP_EXTERNAL 0 +#define HAVE_MIPSDSPR2_EXTERNAL 0 +#define HAVE_MSA_EXTERNAL 0 +#define HAVE_MSA2_EXTERNAL 0 +#define HAVE_LOONGSON2_EXTERNAL 0 +#define HAVE_LOONGSON3_EXTERNAL 0 +#define HAVE_MMI_EXTERNAL 0 +#define HAVE_ARMV5TE_INLINE 0 +#define HAVE_ARMV6_INLINE 0 +#define HAVE_ARMV6T2_INLINE 0 +#define HAVE_ARMV8_INLINE 1 +#define HAVE_NEON_INLINE 1 +#define HAVE_VFP_INLINE 1 +#define HAVE_VFPV3_INLINE 0 +#define HAVE_SETEND_INLINE 0 +#define HAVE_ALTIVEC_INLINE 0 +#define HAVE_DCBZL_INLINE 0 +#define HAVE_LDBRX_INLINE 0 +#define HAVE_POWER8_INLINE 0 +#define HAVE_PPC4XX_INLINE 0 +#define HAVE_VSX_INLINE 0 +#define HAVE_AESNI_INLINE 0 +#define HAVE_AMD3DNOW_INLINE 0 +#define HAVE_AMD3DNOWEXT_INLINE 0 +#define HAVE_AVX_INLINE 0 +#define HAVE_AVX2_INLINE 0 +#define HAVE_AVX512_INLINE 0 +#define HAVE_FMA3_INLINE 0 +#define HAVE_FMA4_INLINE 0 +#define HAVE_MMX_INLINE 0 +#define HAVE_MMXEXT_INLINE 0 +#define HAVE_SSE_INLINE 0 +#define HAVE_SSE2_INLINE 0 +#define HAVE_SSE3_INLINE 0 +#define HAVE_SSE4_INLINE 0 +#define HAVE_SSE42_INLINE 0 +#define HAVE_SSSE3_INLINE 0 +#define HAVE_XOP_INLINE 0 +#define HAVE_CPUNOP_INLINE 0 +#define HAVE_I686_INLINE 0 +#define HAVE_MIPSFPU_INLINE 0 +#define HAVE_MIPS32R2_INLINE 0 +#define HAVE_MIPS32R5_INLINE 0 +#define HAVE_MIPS64R2_INLINE 0 +#define HAVE_MIPS32R6_INLINE 0 +#define HAVE_MIPS64R6_INLINE 0 +#define HAVE_MIPSDSP_INLINE 0 +#define HAVE_MIPSDSPR2_INLINE 0 +#define HAVE_MSA_INLINE 0 +#define HAVE_MSA2_INLINE 0 +#define HAVE_LOONGSON2_INLINE 0 +#define HAVE_LOONGSON3_INLINE 0 +#define HAVE_MMI_INLINE 0 +#define HAVE_ALIGNED_STACK 1 +#define HAVE_FAST_64BIT 1 +#define HAVE_FAST_CLZ 1 +#define HAVE_FAST_CMOV 0 +#define HAVE_LOCAL_ALIGNED 0 +#define HAVE_SIMD_ALIGN_16 1 +#define HAVE_SIMD_ALIGN_32 0 +#define HAVE_SIMD_ALIGN_64 0 +#define HAVE_ATOMIC_CAS_PTR 0 +#define HAVE_MACHINE_RW_BARRIER 0 +#define HAVE_MEMORYBARRIER 0 +#define HAVE_MM_EMPTY 0 +#define HAVE_RDTSC 0 +#define HAVE_SEM_TIMEDWAIT 1 +#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1 +#define HAVE_CABS 0 +#define HAVE_CEXP 0 +#define HAVE_INLINE_ASM 1 +#define HAVE_SYMVER 1 +#define HAVE_X86ASM 0 +#define HAVE_BIGENDIAN 0 +#define HAVE_FAST_UNALIGNED 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_ASM_TYPES_H 1 +#define HAVE_CDIO_PARANOIA_H 0 +#define HAVE_CDIO_PARANOIA_PARANOIA_H 0 +#define HAVE_CUDA_H 0 +#define HAVE_DISPATCH_DISPATCH_H 0 +#define HAVE_DEV_BKTR_IOCTL_BT848_H 0 +#define HAVE_DEV_BKTR_IOCTL_METEOR_H 0 +#define HAVE_DEV_IC_BT8XX_H 0 +#define HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0 +#define HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0 +#define HAVE_DIRECT_H 0 +#define HAVE_DIRENT_H 1 +#define HAVE_DXGIDEBUG_H 0 +#define HAVE_DXVA_H 0 +#define HAVE_ES2_GL_H 0 +#define HAVE_GSM_H 0 +#define HAVE_IO_H 0 +#define HAVE_LINUX_PERF_EVENT_H 1 +#define HAVE_MACHINE_IOCTL_BT848_H 0 +#define HAVE_MACHINE_IOCTL_METEOR_H 0 +#define HAVE_MALLOC_H 1 +#define HAVE_OPENCV2_CORE_CORE_C_H 0 +#define HAVE_OPENGL_GL3_H 0 +#define HAVE_POLL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOUNDCARD_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_SYS_VIDEOIO_H 0 +#define HAVE_TERMIOS_H 1 +#define HAVE_UDPLITE_H 0 +#define HAVE_UNISTD_H 1 +#define HAVE_VALGRIND_VALGRIND_H 0 +#define HAVE_WINDOWS_H 0 +#define HAVE_WINSOCK2_H 0 +#define HAVE_INTRINSICS_NEON 1 +#define HAVE_ATANF 1 +#define HAVE_ATAN2F 1 +#define HAVE_CBRT 1 +#define HAVE_CBRTF 1 +#define HAVE_COPYSIGN 1 +#define HAVE_COSF 1 +#define HAVE_ERF 1 +#define HAVE_EXP2 1 +#define HAVE_EXP2F 1 +#define HAVE_EXPF 1 +#define HAVE_HYPOT 1 +#define HAVE_ISFINITE 1 +#define HAVE_ISINF 1 +#define HAVE_ISNAN 1 +#define HAVE_LDEXPF 1 +#define HAVE_LLRINT 1 +#define HAVE_LLRINTF 1 +#define HAVE_LOG2 1 +#define HAVE_LOG2F 1 +#define HAVE_LOG10F 1 +#define HAVE_LRINT 1 +#define HAVE_LRINTF 1 +#define HAVE_POWF 1 +#define HAVE_RINT 1 +#define HAVE_ROUND 1 +#define HAVE_ROUNDF 1 +#define HAVE_SINF 1 +#define HAVE_TRUNC 1 +#define HAVE_TRUNCF 1 +#define HAVE_DOS_PATHS 0 +#define HAVE_LIBC_MSVCRT 0 +#define HAVE_MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS 0 +#define HAVE_SECTION_DATA_REL_RO 1 +#define HAVE_THREADS 1 +#define HAVE_UWP 0 +#define HAVE_WINRT 0 +#define HAVE_ACCESS 1 +#define HAVE_ALIGNED_MALLOC 0 +#define HAVE_ARC4RANDOM 0 +#define HAVE_CLOCK_GETTIME 1 +#define HAVE_CLOSESOCKET 0 +#define HAVE_COMMANDLINETOARGVW 0 +#define HAVE_FCNTL 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETHRTIME 0 +#define HAVE_GETOPT 1 +#define HAVE_GETMODULEHANDLE 0 +#define HAVE_GETPROCESSAFFINITYMASK 0 +#define HAVE_GETPROCESSMEMORYINFO 0 +#define HAVE_GETPROCESSTIMES 0 +#define HAVE_GETRUSAGE 1 +#define HAVE_GETSTDHANDLE 0 +#define HAVE_GETSYSTEMTIMEASFILETIME 0 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GLOB 1 +#define HAVE_GLXGETPROCADDRESS 0 +#define HAVE_GMTIME_R 1 +#define HAVE_INET_ATON 1 +#define HAVE_ISATTY 1 +#define HAVE_KBHIT 0 +#define HAVE_LOCALTIME_R 1 +#define HAVE_LSTAT 1 +#define HAVE_LZO1X_999_COMPRESS 0 +#define HAVE_MACH_ABSOLUTE_TIME 0 +#define HAVE_MAPVIEWOFFILE 0 +#define HAVE_MEMALIGN 1 +#define HAVE_MKSTEMP 1 +#define HAVE_MMAP 1 +#define HAVE_MPROTECT 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_PEEKNAMEDPIPE 0 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PTHREAD_CANCEL 1 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_SECITEMIMPORT 0 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0 +#define HAVE_SETCONSOLECTRLHANDLER 0 +#define HAVE_SETDLLDIRECTORY 0 +#define HAVE_SETMODE 0 +#define HAVE_SETRLIMIT 1 +#define HAVE_SLEEP 0 +#define HAVE_STRERROR_R 1 +#define HAVE_SYSCONF 1 +#define HAVE_SYSCTL 1 +#define HAVE_USLEEP 1 +#define HAVE_UTGETOSTYPEFROMSTRING 0 +#define HAVE_VIRTUALALLOC 0 +#define HAVE_WGLGETPROCADDRESS 0 +#define HAVE_BCRYPT 0 +#define HAVE_VAAPI_DRM 0 +#define HAVE_VAAPI_X11 0 +#define HAVE_VDPAU_X11 0 +#define HAVE_PTHREADS 1 +#define HAVE_OS2THREADS 0 +#define HAVE_W32THREADS 0 +#define HAVE_AS_ARCH_DIRECTIVE 0 +#define HAVE_AS_DN_DIRECTIVE 0 +#define HAVE_AS_FPU_DIRECTIVE 0 +#define HAVE_AS_FUNC 1 +#define HAVE_AS_OBJECT_ARCH 0 +#define HAVE_ASM_MOD_Q 0 +#define HAVE_BLOCKS_EXTENSION 0 +#define HAVE_EBP_AVAILABLE 0 +#define HAVE_EBX_AVAILABLE 0 +#define HAVE_GNU_AS 0 +#define HAVE_GNU_WINDRES 0 +#define HAVE_IBM_ASM 0 +#define HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 0 +#define HAVE_INLINE_ASM_LABELS 1 +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1 +#define HAVE_PRAGMA_DEPRECATED 1 +#define HAVE_RSYNC_CONTIMEOUT 1 +#define HAVE_SYMVER_ASM_LABEL 0 +#define HAVE_SYMVER_GNU_ASM 1 +#define HAVE_VFP_ARGS 0 +#define HAVE_XFORM_ASM 0 +#define HAVE_XMM_CLOBBERS 0 +#define HAVE_KCMVIDEOCODECTYPE_HEVC 0 +#define HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE 0 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_SMPTE_ST_2084_PQ 0 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_ITU_R_2100_HLG 0 +#define HAVE_KCVIMAGEBUFFERTRANSFERFUNCTION_LINEAR 0 +#define HAVE_SOCKLEN_T 1 +#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_GROUP_SOURCE_REQ 1 +#define HAVE_STRUCT_IP_MREQ_SOURCE 1 +#define HAVE_STRUCT_IPV6_MREQ 1 +#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1 +#define HAVE_STRUCT_POLLFD 1 +#define HAVE_STRUCT_RUSAGE_RU_MAXRSS 1 +#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE 0 +#define HAVE_STRUCT_SOCKADDR_IN6 1 +#define HAVE_STRUCT_SOCKADDR_SA_LEN 0 +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 1 +#define HAVE_MAKEINFO 0 +#define HAVE_MAKEINFO_HTML 0 +#define HAVE_OPENCL_D3D11 0 +#define HAVE_OPENCL_DRM_ARM 0 +#define HAVE_OPENCL_DRM_BEIGNET 0 +#define HAVE_OPENCL_DXVA2 0 +#define HAVE_OPENCL_VAAPI_BEIGNET 0 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0 +#define HAVE_PERL 1 +#define HAVE_POD2MAN 1 +#define HAVE_TEXI2HTML 0 +#define CONFIG_DOC 1 +#define CONFIG_HTMLPAGES 0 +#define CONFIG_MANPAGES 1 +#define CONFIG_PODPAGES 1 +#define CONFIG_TXTPAGES 0 +#define CONFIG_AVIO_LIST_DIR_EXAMPLE 1 +#define CONFIG_AVIO_READING_EXAMPLE 1 +#define CONFIG_DECODE_AUDIO_EXAMPLE 1 +#define CONFIG_DECODE_VIDEO_EXAMPLE 1 +#define CONFIG_DEMUXING_DECODING_EXAMPLE 1 +#define CONFIG_ENCODE_AUDIO_EXAMPLE 1 +#define CONFIG_ENCODE_VIDEO_EXAMPLE 1 +#define CONFIG_EXTRACT_MVS_EXAMPLE 1 +#define CONFIG_FILTER_AUDIO_EXAMPLE 1 +#define CONFIG_FILTERING_AUDIO_EXAMPLE 1 +#define CONFIG_FILTERING_VIDEO_EXAMPLE 1 +#define CONFIG_HTTP_MULTICLIENT_EXAMPLE 1 +#define CONFIG_HW_DECODE_EXAMPLE 1 +#define CONFIG_METADATA_EXAMPLE 1 +#define CONFIG_MUXING_EXAMPLE 1 +#define CONFIG_QSVDEC_EXAMPLE 0 +#define CONFIG_REMUXING_EXAMPLE 1 +#define CONFIG_RESAMPLING_AUDIO_EXAMPLE 1 +#define CONFIG_SCALING_VIDEO_EXAMPLE 1 +#define CONFIG_TRANSCODE_AAC_EXAMPLE 1 +#define CONFIG_TRANSCODING_EXAMPLE 1 +#define CONFIG_VAAPI_ENCODE_EXAMPLE 0 +#define CONFIG_VAAPI_TRANSCODE_EXAMPLE 0 +#define CONFIG_AVISYNTH 0 +#define CONFIG_FREI0R 0 +#define CONFIG_LIBCDIO 0 +#define CONFIG_LIBDAVS2 0 +#define CONFIG_LIBRUBBERBAND 0 +#define CONFIG_LIBVIDSTAB 0 +#define CONFIG_LIBX264 0 +#define CONFIG_LIBX265 0 +#define CONFIG_LIBXAVS 0 +#define CONFIG_LIBXAVS2 0 +#define CONFIG_LIBXVID 0 +#define CONFIG_DECKLINK 0 +#define CONFIG_LIBFDK_AAC 0 +#define CONFIG_OPENSSL 1 +#define CONFIG_LIBTLS 0 +#define CONFIG_GMP 0 +#define CONFIG_LIBARIBB24 0 +#define CONFIG_LIBLENSFUN 0 +#define CONFIG_LIBOPENCORE_AMRNB 0 +#define CONFIG_LIBOPENCORE_AMRWB 0 +#define CONFIG_LIBVMAF 0 +#define CONFIG_LIBVO_AMRWBENC 0 +#define CONFIG_MBEDTLS 0 +#define CONFIG_RKMPP 0 +#define CONFIG_LIBSMBCLIENT 0 +#define CONFIG_CHROMAPRINT 0 +#define CONFIG_GCRYPT 0 +#define CONFIG_GNUTLS 0 +#define CONFIG_JNI 0 +#define CONFIG_LADSPA 0 +#define CONFIG_LIBAOM 1 +#define CONFIG_LIBASS 0 +#define CONFIG_LIBBLURAY 0 +#define CONFIG_LIBBS2B 0 +#define CONFIG_LIBCACA 0 +#define CONFIG_LIBCELT 0 +#define CONFIG_LIBCODEC2 0 +#define CONFIG_LIBDAV1D 0 +#define CONFIG_LIBDC1394 0 +#define CONFIG_LIBDRM 0 +#define CONFIG_LIBFLITE 0 +#define CONFIG_LIBFONTCONFIG 0 +#define CONFIG_LIBFREETYPE 0 +#define CONFIG_LIBFRIBIDI 0 +#define CONFIG_LIBGLSLANG 0 +#define CONFIG_LIBGME 0 +#define CONFIG_LIBGSM 0 +#define CONFIG_LIBIEC61883 0 +#define CONFIG_LIBILBC 0 +#define CONFIG_LIBJACK 0 +#define CONFIG_LIBKLVANC 0 +#define CONFIG_LIBKVAZAAR 0 +#define CONFIG_LIBMODPLUG 0 +#define CONFIG_LIBMP3LAME 0 +#define CONFIG_LIBMYSOFA 0 +#define CONFIG_LIBOPENCV 0 +#define CONFIG_LIBOPENH264 0 +#define CONFIG_LIBOPENJPEG 0 +#define CONFIG_LIBOPENMPT 0 +#define CONFIG_LIBOPUS 0 +#define CONFIG_LIBPULSE 0 +#define CONFIG_LIBRABBITMQ 0 +#define CONFIG_LIBRAV1E 0 +#define CONFIG_LIBRSVG 0 +#define CONFIG_LIBRTMP 0 +#define CONFIG_LIBSHINE 0 +#define CONFIG_LIBSMBCLIENT 0 +#define CONFIG_LIBSNAPPY 0 +#define CONFIG_LIBSOXR 0 +#define CONFIG_LIBSPEEX 0 +#define CONFIG_LIBSRT 0 +#define CONFIG_LIBSSH 0 +#define CONFIG_LIBTENSORFLOW 0 +#define CONFIG_LIBTESSERACT 0 +#define CONFIG_LIBTHEORA 0 +#define CONFIG_LIBTWOLAME 0 +#define CONFIG_LIBV4L2 0 +#define CONFIG_LIBVORBIS 0 +#define CONFIG_LIBVPX 0 +#define CONFIG_LIBWAVPACK 0 +#define CONFIG_LIBWEBP 0 +#define CONFIG_LIBXML2 0 +#define CONFIG_LIBZIMG 0 +#define CONFIG_LIBZMQ 0 +#define CONFIG_LIBZVBI 0 +#define CONFIG_LV2 0 +#define CONFIG_MEDIACODEC 0 +#define CONFIG_OPENAL 0 +#define CONFIG_OPENGL 0 +#define CONFIG_POCKETSPHINX 0 +#define CONFIG_VAPOURSYNTH 0 +#define CONFIG_ALSA 1 +#define CONFIG_APPKIT 0 +#define CONFIG_AVFOUNDATION 0 +#define CONFIG_BZLIB 0 +#define CONFIG_COREIMAGE 0 +#define CONFIG_ICONV 1 +#define CONFIG_LIBXCB 1 +#define CONFIG_LIBXCB_SHM 1 +#define CONFIG_LIBXCB_SHAPE 1 +#define CONFIG_LIBXCB_XFIXES 1 +#define CONFIG_LZMA 0 +#define CONFIG_MEDIAFOUNDATION 0 +#define CONFIG_SCHANNEL 0 +#define CONFIG_SDL2 1 +#define CONFIG_SECURETRANSPORT 0 +#define CONFIG_SNDIO 0 +#define CONFIG_XLIB 1 +#define CONFIG_ZLIB 1 +#define CONFIG_CUDA_NVCC 0 +#define CONFIG_CUDA_SDK 0 +#define CONFIG_LIBNPP 0 +#define CONFIG_LIBMFX 0 +#define CONFIG_MMAL 0 +#define CONFIG_OMX 0 +#define CONFIG_OPENCL 0 +#define CONFIG_VULKAN 0 +#define CONFIG_AMF 0 +#define CONFIG_AUDIOTOOLBOX 0 +#define CONFIG_CRYSTALHD 0 +#define CONFIG_CUDA 0 +#define CONFIG_CUDA_LLVM 1 +#define CONFIG_CUVID 0 +#define CONFIG_D3D11VA 0 +#define CONFIG_DXVA2 0 +#define CONFIG_FFNVCODEC 0 +#define CONFIG_NVDEC 0 +#define CONFIG_NVENC 0 +#define CONFIG_VAAPI 0 +#define CONFIG_VDPAU 0 +#define CONFIG_VIDEOTOOLBOX 0 +#define CONFIG_V4L2_M2M 1 +#define CONFIG_XVMC 0 +#define CONFIG_FTRAPV 0 +#define CONFIG_GRAY 0 +#define CONFIG_HARDCODED_TABLES 0 +#define CONFIG_OMX_RPI 0 +#define CONFIG_RUNTIME_CPUDETECT 1 +#define CONFIG_SAFE_BITSTREAM_READER 1 +#define CONFIG_SHARED 1 +#define CONFIG_SMALL 0 +#define CONFIG_STATIC 1 +#define CONFIG_SWSCALE_ALPHA 1 +#define CONFIG_GPL 0 +#define CONFIG_NONFREE 0 +#define CONFIG_VERSION3 1 +#define CONFIG_AVDEVICE 1 +#define CONFIG_AVFILTER 1 +#define CONFIG_SWSCALE 1 +#define CONFIG_POSTPROC 0 +#define CONFIG_AVFORMAT 1 +#define CONFIG_AVCODEC 1 +#define CONFIG_SWRESAMPLE 1 +#define CONFIG_AVRESAMPLE 1 +#define CONFIG_AVUTIL 1 +#define CONFIG_FFPLAY 1 +#define CONFIG_FFPROBE 1 +#define CONFIG_FFMPEG 1 +#define CONFIG_DCT 1 +#define CONFIG_DWT 1 +#define CONFIG_ERROR_RESILIENCE 1 +#define CONFIG_FAAN 1 +#define CONFIG_FAST_UNALIGNED 1 +#define CONFIG_FFT 1 +#define CONFIG_LSP 1 +#define CONFIG_LZO 1 +#define CONFIG_MDCT 1 +#define CONFIG_PIXELUTILS 1 +#define CONFIG_NETWORK 1 +#define CONFIG_RDFT 1 +#define CONFIG_AUTODETECT 0 +#define CONFIG_FONTCONFIG 0 +#define CONFIG_LARGE_TESTS 1 +#define CONFIG_LINUX_PERF 1 +#define CONFIG_MEMORY_POISONING 0 +#define CONFIG_NEON_CLOBBER_TEST 0 +#define CONFIG_OSSFUZZ 0 +#define CONFIG_PIC 1 +#define CONFIG_THUMB 0 +#define CONFIG_VALGRIND_BACKTRACE 0 +#define CONFIG_XMM_CLOBBER_TEST 0 +#define CONFIG_BSFS 1 +#define CONFIG_DECODERS 1 +#define CONFIG_ENCODERS 1 +#define CONFIG_HWACCELS 0 +#define CONFIG_PARSERS 1 +#define CONFIG_INDEVS 1 +#define CONFIG_OUTDEVS 1 +#define CONFIG_FILTERS 1 +#define CONFIG_DEMUXERS 1 +#define CONFIG_MUXERS 1 +#define CONFIG_PROTOCOLS 1 +#define CONFIG_AANDCTTABLES 1 +#define CONFIG_AC3DSP 1 +#define CONFIG_ADTS_HEADER 1 +#define CONFIG_AUDIO_FRAME_QUEUE 1 +#define CONFIG_AUDIODSP 1 +#define CONFIG_BLOCKDSP 1 +#define CONFIG_BSWAPDSP 1 +#define CONFIG_CABAC 1 +#define CONFIG_CBS 1 +#define CONFIG_CBS_AV1 1 +#define CONFIG_CBS_H264 1 +#define CONFIG_CBS_H265 1 +#define CONFIG_CBS_JPEG 0 +#define CONFIG_CBS_MPEG2 1 +#define CONFIG_CBS_VP9 1 +#define CONFIG_DIRAC_PARSE 1 +#define CONFIG_DNN 1 +#define CONFIG_DVPROFILE 1 +#define CONFIG_EXIF 1 +#define CONFIG_FAANDCT 1 +#define CONFIG_FAANIDCT 1 +#define CONFIG_FDCTDSP 1 +#define CONFIG_FLACDSP 1 +#define CONFIG_FMTCONVERT 1 +#define CONFIG_FRAME_THREAD_ENCODER 1 +#define CONFIG_G722DSP 1 +#define CONFIG_GOLOMB 1 +#define CONFIG_GPLV3 0 +#define CONFIG_H263DSP 1 +#define CONFIG_H264CHROMA 1 +#define CONFIG_H264DSP 1 +#define CONFIG_H264PARSE 1 +#define CONFIG_H264PRED 1 +#define CONFIG_H264QPEL 1 +#define CONFIG_HEVCPARSE 1 +#define CONFIG_HPELDSP 1 +#define CONFIG_HUFFMAN 1 +#define CONFIG_HUFFYUVDSP 1 +#define CONFIG_HUFFYUVENCDSP 1 +#define CONFIG_IDCTDSP 1 +#define CONFIG_IIRFILTER 1 +#define CONFIG_MDCT15 1 +#define CONFIG_INTRAX8 1 +#define CONFIG_ISO_MEDIA 1 +#define CONFIG_IVIDSP 1 +#define CONFIG_JPEGTABLES 1 +#define CONFIG_LGPLV3 1 +#define CONFIG_LIBX262 0 +#define CONFIG_LLAUDDSP 1 +#define CONFIG_LLVIDDSP 1 +#define CONFIG_LLVIDENCDSP 1 +#define CONFIG_LPC 1 +#define CONFIG_LZF 1 +#define CONFIG_ME_CMP 1 +#define CONFIG_MPEG_ER 1 +#define CONFIG_MPEGAUDIO 1 +#define CONFIG_MPEGAUDIODSP 1 +#define CONFIG_MPEGAUDIOHEADER 1 +#define CONFIG_MPEGVIDEO 1 +#define CONFIG_MPEGVIDEOENC 1 +#define CONFIG_MSS34DSP 1 +#define CONFIG_PIXBLOCKDSP 1 +#define CONFIG_QPELDSP 1 +#define CONFIG_QSV 0 +#define CONFIG_QSVDEC 0 +#define CONFIG_QSVENC 0 +#define CONFIG_QSVVPP 0 +#define CONFIG_RANGECODER 1 +#define CONFIG_RIFFDEC 1 +#define CONFIG_RIFFENC 1 +#define CONFIG_RTPDEC 1 +#define CONFIG_RTPENC_CHAIN 1 +#define CONFIG_RV34DSP 1 +#define CONFIG_SCENE_SAD 1 +#define CONFIG_SINEWIN 1 +#define CONFIG_SNAPPY 1 +#define CONFIG_SRTP 1 +#define CONFIG_STARTCODE 1 +#define CONFIG_TEXTUREDSP 1 +#define CONFIG_TEXTUREDSPENC 0 +#define CONFIG_TPELDSP 1 +#define CONFIG_VAAPI_1 0 +#define CONFIG_VAAPI_ENCODE 0 +#define CONFIG_VC1DSP 1 +#define CONFIG_VIDEODSP 1 +#define CONFIG_VP3DSP 1 +#define CONFIG_VP56DSP 1 +#define CONFIG_VP8DSP 1 +#define CONFIG_WMA_FREQS 1 +#define CONFIG_WMV2DSP 1 +#define CONFIG_AAC_ADTSTOASC_BSF 1 +#define CONFIG_AV1_FRAME_MERGE_BSF 1 +#define CONFIG_AV1_FRAME_SPLIT_BSF 1 +#define CONFIG_AV1_METADATA_BSF 1 +#define CONFIG_CHOMP_BSF 1 +#define CONFIG_DUMP_EXTRADATA_BSF 1 +#define CONFIG_DCA_CORE_BSF 1 +#define CONFIG_EAC3_CORE_BSF 1 +#define CONFIG_EXTRACT_EXTRADATA_BSF 1 +#define CONFIG_FILTER_UNITS_BSF 1 +#define CONFIG_H264_METADATA_BSF 1 +#define CONFIG_H264_MP4TOANNEXB_BSF 1 +#define CONFIG_H264_REDUNDANT_PPS_BSF 1 +#define CONFIG_HAPQA_EXTRACT_BSF 1 +#define CONFIG_HEVC_METADATA_BSF 1 +#define CONFIG_HEVC_MP4TOANNEXB_BSF 1 +#define CONFIG_IMX_DUMP_HEADER_BSF 1 +#define CONFIG_MJPEG2JPEG_BSF 1 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 1 +#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 1 +#define CONFIG_MPEG2_METADATA_BSF 1 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 1 +#define CONFIG_MOV2TEXTSUB_BSF 1 +#define CONFIG_NOISE_BSF 1 +#define CONFIG_NULL_BSF 1 +#define CONFIG_OPUS_METADATA_BSF 1 +#define CONFIG_PCM_RECHUNK_BSF 1 +#define CONFIG_PRORES_METADATA_BSF 1 +#define CONFIG_REMOVE_EXTRADATA_BSF 1 +#define CONFIG_TEXT2MOVSUB_BSF 1 +#define CONFIG_TRACE_HEADERS_BSF 1 +#define CONFIG_TRUEHD_CORE_BSF 1 +#define CONFIG_VP9_METADATA_BSF 1 +#define CONFIG_VP9_RAW_REORDER_BSF 1 +#define CONFIG_VP9_SUPERFRAME_BSF 1 +#define CONFIG_VP9_SUPERFRAME_SPLIT_BSF 1 +#define CONFIG_AASC_DECODER 1 +#define CONFIG_AIC_DECODER 1 +#define CONFIG_ALIAS_PIX_DECODER 1 +#define CONFIG_AGM_DECODER 1 +#define CONFIG_AMV_DECODER 1 +#define CONFIG_ANM_DECODER 1 +#define CONFIG_ANSI_DECODER 1 +#define CONFIG_APNG_DECODER 1 +#define CONFIG_ARBC_DECODER 1 +#define CONFIG_ASV1_DECODER 1 +#define CONFIG_ASV2_DECODER 1 +#define CONFIG_AURA_DECODER 1 +#define CONFIG_AURA2_DECODER 1 +#define CONFIG_AVRP_DECODER 1 +#define CONFIG_AVRN_DECODER 1 +#define CONFIG_AVS_DECODER 1 +#define CONFIG_AVUI_DECODER 1 +#define CONFIG_AYUV_DECODER 1 +#define CONFIG_BETHSOFTVID_DECODER 1 +#define CONFIG_BFI_DECODER 1 +#define CONFIG_BINK_DECODER 1 +#define CONFIG_BITPACKED_DECODER 1 +#define CONFIG_BMP_DECODER 1 +#define CONFIG_BMV_VIDEO_DECODER 1 +#define CONFIG_BRENDER_PIX_DECODER 1 +#define CONFIG_C93_DECODER 1 +#define CONFIG_CAVS_DECODER 1 +#define CONFIG_CDGRAPHICS_DECODER 1 +#define CONFIG_CDTOONS_DECODER 1 +#define CONFIG_CDXL_DECODER 1 +#define CONFIG_CFHD_DECODER 1 +#define CONFIG_CINEPAK_DECODER 1 +#define CONFIG_CLEARVIDEO_DECODER 1 +#define CONFIG_CLJR_DECODER 1 +#define CONFIG_CLLC_DECODER 1 +#define CONFIG_COMFORTNOISE_DECODER 1 +#define CONFIG_CPIA_DECODER 1 +#define CONFIG_CSCD_DECODER 1 +#define CONFIG_CYUV_DECODER 1 +#define CONFIG_DDS_DECODER 1 +#define CONFIG_DFA_DECODER 1 +#define CONFIG_DIRAC_DECODER 1 +#define CONFIG_DNXHD_DECODER 1 +#define CONFIG_DPX_DECODER 1 +#define CONFIG_DSICINVIDEO_DECODER 1 +#define CONFIG_DVAUDIO_DECODER 1 +#define CONFIG_DVVIDEO_DECODER 1 +#define CONFIG_DXA_DECODER 1 +#define CONFIG_DXTORY_DECODER 1 +#define CONFIG_DXV_DECODER 1 +#define CONFIG_EACMV_DECODER 1 +#define CONFIG_EAMAD_DECODER 1 +#define CONFIG_EATGQ_DECODER 1 +#define CONFIG_EATGV_DECODER 1 +#define CONFIG_EATQI_DECODER 1 +#define CONFIG_EIGHTBPS_DECODER 1 +#define CONFIG_EIGHTSVX_EXP_DECODER 1 +#define CONFIG_EIGHTSVX_FIB_DECODER 1 +#define CONFIG_ESCAPE124_DECODER 1 +#define CONFIG_ESCAPE130_DECODER 1 +#define CONFIG_EXR_DECODER 1 +#define CONFIG_FFV1_DECODER 1 +#define CONFIG_FFVHUFF_DECODER 1 +#define CONFIG_FIC_DECODER 1 +#define CONFIG_FITS_DECODER 1 +#define CONFIG_FLASHSV_DECODER 1 +#define CONFIG_FLASHSV2_DECODER 1 +#define CONFIG_FLIC_DECODER 1 +#define CONFIG_FLV_DECODER 1 +#define CONFIG_FMVC_DECODER 1 +#define CONFIG_FOURXM_DECODER 1 +#define CONFIG_FRAPS_DECODER 1 +#define CONFIG_FRWU_DECODER 1 +#define CONFIG_G2M_DECODER 1 +#define CONFIG_GDV_DECODER 1 +#define CONFIG_GIF_DECODER 1 +#define CONFIG_H261_DECODER 1 +#define CONFIG_H263_DECODER 1 +#define CONFIG_H263I_DECODER 1 +#define CONFIG_H263P_DECODER 1 +#define CONFIG_H263_V4L2M2M_DECODER 1 +#define CONFIG_H264_DECODER 1 +#define CONFIG_H264_CRYSTALHD_DECODER 0 +#define CONFIG_H264_V4L2M2M_DECODER 1 +#define CONFIG_H264_MEDIACODEC_DECODER 0 +#define CONFIG_H264_MMAL_DECODER 0 +#define CONFIG_H264_QSV_DECODER 0 +#define CONFIG_H264_RKMPP_DECODER 0 +#define CONFIG_HAP_DECODER 1 +#define CONFIG_HEVC_DECODER 1 +#define CONFIG_HEVC_QSV_DECODER 0 +#define CONFIG_HEVC_RKMPP_DECODER 0 +#define CONFIG_HEVC_V4L2M2M_DECODER 1 +#define CONFIG_HNM4_VIDEO_DECODER 1 +#define CONFIG_HQ_HQA_DECODER 1 +#define CONFIG_HQX_DECODER 1 +#define CONFIG_HUFFYUV_DECODER 1 +#define CONFIG_HYMT_DECODER 1 +#define CONFIG_IDCIN_DECODER 1 +#define CONFIG_IFF_ILBM_DECODER 1 +#define CONFIG_IMM4_DECODER 1 +#define CONFIG_IMM5_DECODER 1 +#define CONFIG_INDEO2_DECODER 1 +#define CONFIG_INDEO3_DECODER 1 +#define CONFIG_INDEO4_DECODER 1 +#define CONFIG_INDEO5_DECODER 1 +#define CONFIG_INTERPLAY_VIDEO_DECODER 1 +#define CONFIG_JPEG2000_DECODER 1 +#define CONFIG_JPEGLS_DECODER 1 +#define CONFIG_JV_DECODER 1 +#define CONFIG_KGV1_DECODER 1 +#define CONFIG_KMVC_DECODER 1 +#define CONFIG_LAGARITH_DECODER 1 +#define CONFIG_LOCO_DECODER 1 +#define CONFIG_LSCR_DECODER 1 +#define CONFIG_M101_DECODER 1 +#define CONFIG_MAGICYUV_DECODER 1 +#define CONFIG_MDEC_DECODER 1 +#define CONFIG_MIMIC_DECODER 1 +#define CONFIG_MJPEG_DECODER 1 +#define CONFIG_MJPEGB_DECODER 1 +#define CONFIG_MMVIDEO_DECODER 1 +#define CONFIG_MOTIONPIXELS_DECODER 1 +#define CONFIG_MPEG1VIDEO_DECODER 1 +#define CONFIG_MPEG2VIDEO_DECODER 1 +#define CONFIG_MPEG4_DECODER 1 +#define CONFIG_MPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG4_V4L2M2M_DECODER 1 +#define CONFIG_MPEG4_MMAL_DECODER 0 +#define CONFIG_MPEGVIDEO_DECODER 1 +#define CONFIG_MPEG1_V4L2M2M_DECODER 1 +#define CONFIG_MPEG2_MMAL_DECODER 0 +#define CONFIG_MPEG2_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG2_V4L2M2M_DECODER 1 +#define CONFIG_MPEG2_QSV_DECODER 0 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0 +#define CONFIG_MSA1_DECODER 1 +#define CONFIG_MSCC_DECODER 1 +#define CONFIG_MSMPEG4V1_DECODER 1 +#define CONFIG_MSMPEG4V2_DECODER 1 +#define CONFIG_MSMPEG4V3_DECODER 1 +#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MSRLE_DECODER 1 +#define CONFIG_MSS1_DECODER 1 +#define CONFIG_MSS2_DECODER 1 +#define CONFIG_MSVIDEO1_DECODER 1 +#define CONFIG_MSZH_DECODER 1 +#define CONFIG_MTS2_DECODER 1 +#define CONFIG_MV30_DECODER 1 +#define CONFIG_MVC1_DECODER 1 +#define CONFIG_MVC2_DECODER 1 +#define CONFIG_MVDV_DECODER 1 +#define CONFIG_MVHA_DECODER 1 +#define CONFIG_MWSC_DECODER 1 +#define CONFIG_MXPEG_DECODER 1 +#define CONFIG_NOTCHLC_DECODER 1 +#define CONFIG_NUV_DECODER 1 +#define CONFIG_PAF_VIDEO_DECODER 1 +#define CONFIG_PAM_DECODER 1 +#define CONFIG_PBM_DECODER 1 +#define CONFIG_PCX_DECODER 1 +#define CONFIG_PFM_DECODER 1 +#define CONFIG_PGM_DECODER 1 +#define CONFIG_PGMYUV_DECODER 1 +#define CONFIG_PICTOR_DECODER 1 +#define CONFIG_PIXLET_DECODER 1 +#define CONFIG_PNG_DECODER 1 +#define CONFIG_PPM_DECODER 1 +#define CONFIG_PRORES_DECODER 1 +#define CONFIG_PROSUMER_DECODER 1 +#define CONFIG_PSD_DECODER 1 +#define CONFIG_PTX_DECODER 1 +#define CONFIG_QDRAW_DECODER 1 +#define CONFIG_QPEG_DECODER 1 +#define CONFIG_QTRLE_DECODER 1 +#define CONFIG_R10K_DECODER 1 +#define CONFIG_R210_DECODER 1 +#define CONFIG_RASC_DECODER 1 +#define CONFIG_RAWVIDEO_DECODER 1 +#define CONFIG_RL2_DECODER 1 +#define CONFIG_ROQ_DECODER 1 +#define CONFIG_RPZA_DECODER 1 +#define CONFIG_RSCC_DECODER 1 +#define CONFIG_RV10_DECODER 1 +#define CONFIG_RV20_DECODER 1 +#define CONFIG_RV30_DECODER 1 +#define CONFIG_RV40_DECODER 1 +#define CONFIG_S302M_DECODER 1 +#define CONFIG_SANM_DECODER 1 +#define CONFIG_SCPR_DECODER 1 +#define CONFIG_SCREENPRESSO_DECODER 1 +#define CONFIG_SGI_DECODER 1 +#define CONFIG_SGIRLE_DECODER 1 +#define CONFIG_SHEERVIDEO_DECODER 1 +#define CONFIG_SMACKER_DECODER 1 +#define CONFIG_SMC_DECODER 1 +#define CONFIG_SMVJPEG_DECODER 1 +#define CONFIG_SNOW_DECODER 1 +#define CONFIG_SP5X_DECODER 1 +#define CONFIG_SPEEDHQ_DECODER 1 +#define CONFIG_SRGC_DECODER 1 +#define CONFIG_SUNRAST_DECODER 1 +#define CONFIG_SVQ1_DECODER 1 +#define CONFIG_SVQ3_DECODER 1 +#define CONFIG_TARGA_DECODER 1 +#define CONFIG_TARGA_Y216_DECODER 1 +#define CONFIG_TDSC_DECODER 1 +#define CONFIG_THEORA_DECODER 1 +#define CONFIG_THP_DECODER 1 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 1 +#define CONFIG_TIFF_DECODER 1 +#define CONFIG_TMV_DECODER 1 +#define CONFIG_TRUEMOTION1_DECODER 1 +#define CONFIG_TRUEMOTION2_DECODER 1 +#define CONFIG_TRUEMOTION2RT_DECODER 1 +#define CONFIG_TSCC_DECODER 1 +#define CONFIG_TSCC2_DECODER 1 +#define CONFIG_TXD_DECODER 1 +#define CONFIG_ULTI_DECODER 1 +#define CONFIG_UTVIDEO_DECODER 1 +#define CONFIG_V210_DECODER 1 +#define CONFIG_V210X_DECODER 1 +#define CONFIG_V308_DECODER 1 +#define CONFIG_V408_DECODER 1 +#define CONFIG_V410_DECODER 1 +#define CONFIG_VB_DECODER 1 +#define CONFIG_VBLE_DECODER 1 +#define CONFIG_VC1_DECODER 1 +#define CONFIG_VC1_CRYSTALHD_DECODER 0 +#define CONFIG_VC1IMAGE_DECODER 1 +#define CONFIG_VC1_MMAL_DECODER 0 +#define CONFIG_VC1_QSV_DECODER 0 +#define CONFIG_VC1_V4L2M2M_DECODER 1 +#define CONFIG_VCR1_DECODER 1 +#define CONFIG_VMDVIDEO_DECODER 1 +#define CONFIG_VMNC_DECODER 1 +#define CONFIG_VP3_DECODER 1 +#define CONFIG_VP4_DECODER 1 +#define CONFIG_VP5_DECODER 1 +#define CONFIG_VP6_DECODER 1 +#define CONFIG_VP6A_DECODER 1 +#define CONFIG_VP6F_DECODER 1 +#define CONFIG_VP7_DECODER 1 +#define CONFIG_VP8_DECODER 1 +#define CONFIG_VP8_RKMPP_DECODER 0 +#define CONFIG_VP8_V4L2M2M_DECODER 1 +#define CONFIG_VP9_DECODER 1 +#define CONFIG_VP9_RKMPP_DECODER 0 +#define CONFIG_VP9_V4L2M2M_DECODER 1 +#define CONFIG_VQA_DECODER 1 +#define CONFIG_WEBP_DECODER 1 +#define CONFIG_WCMV_DECODER 1 +#define CONFIG_WRAPPED_AVFRAME_DECODER 1 +#define CONFIG_WMV1_DECODER 1 +#define CONFIG_WMV2_DECODER 1 +#define CONFIG_WMV3_DECODER 1 +#define CONFIG_WMV3_CRYSTALHD_DECODER 0 +#define CONFIG_WMV3IMAGE_DECODER 1 +#define CONFIG_WNV1_DECODER 1 +#define CONFIG_XAN_WC3_DECODER 1 +#define CONFIG_XAN_WC4_DECODER 1 +#define CONFIG_XBM_DECODER 1 +#define CONFIG_XFACE_DECODER 1 +#define CONFIG_XL_DECODER 1 +#define CONFIG_XPM_DECODER 1 +#define CONFIG_XWD_DECODER 1 +#define CONFIG_Y41P_DECODER 1 +#define CONFIG_YLC_DECODER 1 +#define CONFIG_YOP_DECODER 1 +#define CONFIG_YUV4_DECODER 1 +#define CONFIG_ZERO12V_DECODER 1 +#define CONFIG_ZEROCODEC_DECODER 1 +#define CONFIG_ZLIB_DECODER 1 +#define CONFIG_ZMBV_DECODER 1 +#define CONFIG_AAC_DECODER 1 +#define CONFIG_AAC_FIXED_DECODER 1 +#define CONFIG_AAC_LATM_DECODER 1 +#define CONFIG_AC3_DECODER 1 +#define CONFIG_AC3_FIXED_DECODER 1 +#define CONFIG_ACELP_KELVIN_DECODER 1 +#define CONFIG_ALAC_DECODER 1 +#define CONFIG_ALS_DECODER 1 +#define CONFIG_AMRNB_DECODER 1 +#define CONFIG_AMRWB_DECODER 1 +#define CONFIG_APE_DECODER 1 +#define CONFIG_APTX_DECODER 1 +#define CONFIG_APTX_HD_DECODER 1 +#define CONFIG_ATRAC1_DECODER 1 +#define CONFIG_ATRAC3_DECODER 1 +#define CONFIG_ATRAC3AL_DECODER 1 +#define CONFIG_ATRAC3P_DECODER 1 +#define CONFIG_ATRAC3PAL_DECODER 1 +#define CONFIG_ATRAC9_DECODER 1 +#define CONFIG_BINKAUDIO_DCT_DECODER 1 +#define CONFIG_BINKAUDIO_RDFT_DECODER 1 +#define CONFIG_BMV_AUDIO_DECODER 1 +#define CONFIG_COOK_DECODER 1 +#define CONFIG_DCA_DECODER 1 +#define CONFIG_DOLBY_E_DECODER 1 +#define CONFIG_DSD_LSBF_DECODER 1 +#define CONFIG_DSD_MSBF_DECODER 1 +#define CONFIG_DSD_LSBF_PLANAR_DECODER 1 +#define CONFIG_DSD_MSBF_PLANAR_DECODER 1 +#define CONFIG_DSICINAUDIO_DECODER 1 +#define CONFIG_DSS_SP_DECODER 1 +#define CONFIG_DST_DECODER 1 +#define CONFIG_EAC3_DECODER 1 +#define CONFIG_EVRC_DECODER 1 +#define CONFIG_FFWAVESYNTH_DECODER 1 +#define CONFIG_FLAC_DECODER 1 +#define CONFIG_G723_1_DECODER 1 +#define CONFIG_G729_DECODER 1 +#define CONFIG_GSM_DECODER 1 +#define CONFIG_GSM_MS_DECODER 1 +#define CONFIG_HCA_DECODER 1 +#define CONFIG_HCOM_DECODER 1 +#define CONFIG_IAC_DECODER 1 +#define CONFIG_ILBC_DECODER 1 +#define CONFIG_IMC_DECODER 1 +#define CONFIG_INTERPLAY_ACM_DECODER 1 +#define CONFIG_MACE3_DECODER 1 +#define CONFIG_MACE6_DECODER 1 +#define CONFIG_METASOUND_DECODER 1 +#define CONFIG_MLP_DECODER 1 +#define CONFIG_MP1_DECODER 1 +#define CONFIG_MP1FLOAT_DECODER 1 +#define CONFIG_MP2_DECODER 1 +#define CONFIG_MP2FLOAT_DECODER 1 +#define CONFIG_MP3FLOAT_DECODER 1 +#define CONFIG_MP3_DECODER 1 +#define CONFIG_MP3ADUFLOAT_DECODER 1 +#define CONFIG_MP3ADU_DECODER 1 +#define CONFIG_MP3ON4FLOAT_DECODER 1 +#define CONFIG_MP3ON4_DECODER 1 +#define CONFIG_MPC7_DECODER 1 +#define CONFIG_MPC8_DECODER 1 +#define CONFIG_NELLYMOSER_DECODER 1 +#define CONFIG_ON2AVC_DECODER 1 +#define CONFIG_OPUS_DECODER 1 +#define CONFIG_PAF_AUDIO_DECODER 1 +#define CONFIG_QCELP_DECODER 1 +#define CONFIG_QDM2_DECODER 1 +#define CONFIG_QDMC_DECODER 1 +#define CONFIG_RA_144_DECODER 1 +#define CONFIG_RA_288_DECODER 1 +#define CONFIG_RALF_DECODER 1 +#define CONFIG_SBC_DECODER 1 +#define CONFIG_SHORTEN_DECODER 1 +#define CONFIG_SIPR_DECODER 1 +#define CONFIG_SIREN_DECODER 1 +#define CONFIG_SMACKAUD_DECODER 1 +#define CONFIG_SONIC_DECODER 1 +#define CONFIG_TAK_DECODER 1 +#define CONFIG_TRUEHD_DECODER 1 +#define CONFIG_TRUESPEECH_DECODER 1 +#define CONFIG_TTA_DECODER 1 +#define CONFIG_TWINVQ_DECODER 1 +#define CONFIG_VMDAUDIO_DECODER 1 +#define CONFIG_VORBIS_DECODER 1 +#define CONFIG_WAVPACK_DECODER 1 +#define CONFIG_WMALOSSLESS_DECODER 1 +#define CONFIG_WMAPRO_DECODER 1 +#define CONFIG_WMAV1_DECODER 1 +#define CONFIG_WMAV2_DECODER 1 +#define CONFIG_WMAVOICE_DECODER 1 +#define CONFIG_WS_SND1_DECODER 1 +#define CONFIG_XMA1_DECODER 1 +#define CONFIG_XMA2_DECODER 1 +#define CONFIG_PCM_ALAW_DECODER 1 +#define CONFIG_PCM_BLURAY_DECODER 1 +#define CONFIG_PCM_DVD_DECODER 1 +#define CONFIG_PCM_F16LE_DECODER 1 +#define CONFIG_PCM_F24LE_DECODER 1 +#define CONFIG_PCM_F32BE_DECODER 1 +#define CONFIG_PCM_F32LE_DECODER 1 +#define CONFIG_PCM_F64BE_DECODER 1 +#define CONFIG_PCM_F64LE_DECODER 1 +#define CONFIG_PCM_LXF_DECODER 1 +#define CONFIG_PCM_MULAW_DECODER 1 +#define CONFIG_PCM_S8_DECODER 1 +#define CONFIG_PCM_S8_PLANAR_DECODER 1 +#define CONFIG_PCM_S16BE_DECODER 1 +#define CONFIG_PCM_S16BE_PLANAR_DECODER 1 +#define CONFIG_PCM_S16LE_DECODER 1 +#define CONFIG_PCM_S16LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S24BE_DECODER 1 +#define CONFIG_PCM_S24DAUD_DECODER 1 +#define CONFIG_PCM_S24LE_DECODER 1 +#define CONFIG_PCM_S24LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S32BE_DECODER 1 +#define CONFIG_PCM_S32LE_DECODER 1 +#define CONFIG_PCM_S32LE_PLANAR_DECODER 1 +#define CONFIG_PCM_S64BE_DECODER 1 +#define CONFIG_PCM_S64LE_DECODER 1 +#define CONFIG_PCM_U8_DECODER 1 +#define CONFIG_PCM_U16BE_DECODER 1 +#define CONFIG_PCM_U16LE_DECODER 1 +#define CONFIG_PCM_U24BE_DECODER 1 +#define CONFIG_PCM_U24LE_DECODER 1 +#define CONFIG_PCM_U32BE_DECODER 1 +#define CONFIG_PCM_U32LE_DECODER 1 +#define CONFIG_PCM_VIDC_DECODER 1 +#define CONFIG_DERF_DPCM_DECODER 1 +#define CONFIG_GREMLIN_DPCM_DECODER 1 +#define CONFIG_INTERPLAY_DPCM_DECODER 1 +#define CONFIG_ROQ_DPCM_DECODER 1 +#define CONFIG_SDX2_DPCM_DECODER 1 +#define CONFIG_SOL_DPCM_DECODER 1 +#define CONFIG_XAN_DPCM_DECODER 1 +#define CONFIG_ADPCM_4XM_DECODER 1 +#define CONFIG_ADPCM_ADX_DECODER 1 +#define CONFIG_ADPCM_AFC_DECODER 1 +#define CONFIG_ADPCM_AGM_DECODER 1 +#define CONFIG_ADPCM_AICA_DECODER 1 +#define CONFIG_ADPCM_ARGO_DECODER 1 +#define CONFIG_ADPCM_CT_DECODER 1 +#define CONFIG_ADPCM_DTK_DECODER 1 +#define CONFIG_ADPCM_EA_DECODER 1 +#define CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1 +#define CONFIG_ADPCM_EA_R1_DECODER 1 +#define CONFIG_ADPCM_EA_R2_DECODER 1 +#define CONFIG_ADPCM_EA_R3_DECODER 1 +#define CONFIG_ADPCM_EA_XAS_DECODER 1 +#define CONFIG_ADPCM_G722_DECODER 1 +#define CONFIG_ADPCM_G726_DECODER 1 +#define CONFIG_ADPCM_G726LE_DECODER 1 +#define CONFIG_ADPCM_IMA_AMV_DECODER 1 +#define CONFIG_ADPCM_IMA_ALP_DECODER 1 +#define CONFIG_ADPCM_IMA_APC_DECODER 1 +#define CONFIG_ADPCM_IMA_APM_DECODER 1 +#define CONFIG_ADPCM_IMA_CUNNING_DECODER 1 +#define CONFIG_ADPCM_IMA_DAT4_DECODER 1 +#define CONFIG_ADPCM_IMA_DK3_DECODER 1 +#define CONFIG_ADPCM_IMA_DK4_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_EACS_DECODER 1 +#define CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1 +#define CONFIG_ADPCM_IMA_ISS_DECODER 1 +#define CONFIG_ADPCM_IMA_MTF_DECODER 1 +#define CONFIG_ADPCM_IMA_OKI_DECODER 1 +#define CONFIG_ADPCM_IMA_QT_DECODER 1 +#define CONFIG_ADPCM_IMA_RAD_DECODER 1 +#define CONFIG_ADPCM_IMA_SSI_DECODER 1 +#define CONFIG_ADPCM_IMA_SMJPEG_DECODER 1 +#define CONFIG_ADPCM_IMA_WAV_DECODER 1 +#define CONFIG_ADPCM_IMA_WS_DECODER 1 +#define CONFIG_ADPCM_MS_DECODER 1 +#define CONFIG_ADPCM_MTAF_DECODER 1 +#define CONFIG_ADPCM_PSX_DECODER 1 +#define CONFIG_ADPCM_SBPRO_2_DECODER 1 +#define CONFIG_ADPCM_SBPRO_3_DECODER 1 +#define CONFIG_ADPCM_SBPRO_4_DECODER 1 +#define CONFIG_ADPCM_SWF_DECODER 1 +#define CONFIG_ADPCM_THP_DECODER 1 +#define CONFIG_ADPCM_THP_LE_DECODER 1 +#define CONFIG_ADPCM_VIMA_DECODER 1 +#define CONFIG_ADPCM_XA_DECODER 1 +#define CONFIG_ADPCM_YAMAHA_DECODER 1 +#define CONFIG_ADPCM_ZORK_DECODER 1 +#define CONFIG_SSA_DECODER 1 +#define CONFIG_ASS_DECODER 1 +#define CONFIG_CCAPTION_DECODER 1 +#define CONFIG_DVBSUB_DECODER 1 +#define CONFIG_DVDSUB_DECODER 1 +#define CONFIG_JACOSUB_DECODER 1 +#define CONFIG_MICRODVD_DECODER 1 +#define CONFIG_MOVTEXT_DECODER 1 +#define CONFIG_MPL2_DECODER 1 +#define CONFIG_PGSSUB_DECODER 1 +#define CONFIG_PJS_DECODER 1 +#define CONFIG_REALTEXT_DECODER 1 +#define CONFIG_SAMI_DECODER 1 +#define CONFIG_SRT_DECODER 1 +#define CONFIG_STL_DECODER 1 +#define CONFIG_SUBRIP_DECODER 1 +#define CONFIG_SUBVIEWER_DECODER 1 +#define CONFIG_SUBVIEWER1_DECODER 1 +#define CONFIG_TEXT_DECODER 1 +#define CONFIG_VPLAYER_DECODER 1 +#define CONFIG_WEBVTT_DECODER 1 +#define CONFIG_XSUB_DECODER 1 +#define CONFIG_AAC_AT_DECODER 0 +#define CONFIG_AC3_AT_DECODER 0 +#define CONFIG_ADPCM_IMA_QT_AT_DECODER 0 +#define CONFIG_ALAC_AT_DECODER 0 +#define CONFIG_AMR_NB_AT_DECODER 0 +#define CONFIG_EAC3_AT_DECODER 0 +#define CONFIG_GSM_MS_AT_DECODER 0 +#define CONFIG_ILBC_AT_DECODER 0 +#define CONFIG_MP1_AT_DECODER 0 +#define CONFIG_MP2_AT_DECODER 0 +#define CONFIG_MP3_AT_DECODER 0 +#define CONFIG_PCM_ALAW_AT_DECODER 0 +#define CONFIG_PCM_MULAW_AT_DECODER 0 +#define CONFIG_QDMC_AT_DECODER 0 +#define CONFIG_QDM2_AT_DECODER 0 +#define CONFIG_LIBARIBB24_DECODER 0 +#define CONFIG_LIBCELT_DECODER 0 +#define CONFIG_LIBCODEC2_DECODER 0 +#define CONFIG_LIBDAV1D_DECODER 0 +#define CONFIG_LIBDAVS2_DECODER 0 +#define CONFIG_LIBFDK_AAC_DECODER 0 +#define CONFIG_LIBGSM_DECODER 0 +#define CONFIG_LIBGSM_MS_DECODER 0 +#define CONFIG_LIBILBC_DECODER 0 +#define CONFIG_LIBOPENCORE_AMRNB_DECODER 0 +#define CONFIG_LIBOPENCORE_AMRWB_DECODER 0 +#define CONFIG_LIBOPENJPEG_DECODER 0 +#define CONFIG_LIBOPUS_DECODER 0 +#define CONFIG_LIBRSVG_DECODER 0 +#define CONFIG_LIBSPEEX_DECODER 0 +#define CONFIG_LIBVORBIS_DECODER 0 +#define CONFIG_LIBVPX_VP8_DECODER 0 +#define CONFIG_LIBVPX_VP9_DECODER 0 +#define CONFIG_LIBZVBI_TELETEXT_DECODER 0 +#define CONFIG_BINTEXT_DECODER 1 +#define CONFIG_XBIN_DECODER 1 +#define CONFIG_IDF_DECODER 1 +#define CONFIG_LIBAOM_AV1_DECODER 1 +#define CONFIG_LIBOPENH264_DECODER 0 +#define CONFIG_H264_CUVID_DECODER 0 +#define CONFIG_HEVC_CUVID_DECODER 0 +#define CONFIG_HEVC_MEDIACODEC_DECODER 0 +#define CONFIG_MJPEG_CUVID_DECODER 0 +#define CONFIG_MJPEG_QSV_DECODER 0 +#define CONFIG_MPEG1_CUVID_DECODER 0 +#define CONFIG_MPEG2_CUVID_DECODER 0 +#define CONFIG_MPEG4_CUVID_DECODER 0 +#define CONFIG_MPEG4_MEDIACODEC_DECODER 0 +#define CONFIG_VC1_CUVID_DECODER 0 +#define CONFIG_VP8_CUVID_DECODER 0 +#define CONFIG_VP8_MEDIACODEC_DECODER 0 +#define CONFIG_VP8_QSV_DECODER 0 +#define CONFIG_VP9_CUVID_DECODER 0 +#define CONFIG_VP9_MEDIACODEC_DECODER 0 +#define CONFIG_VP9_QSV_DECODER 0 +#define CONFIG_A64MULTI_ENCODER 1 +#define CONFIG_A64MULTI5_ENCODER 1 +#define CONFIG_ALIAS_PIX_ENCODER 1 +#define CONFIG_AMV_ENCODER 1 +#define CONFIG_APNG_ENCODER 1 +#define CONFIG_ASV1_ENCODER 1 +#define CONFIG_ASV2_ENCODER 1 +#define CONFIG_AVRP_ENCODER 1 +#define CONFIG_AVUI_ENCODER 1 +#define CONFIG_AYUV_ENCODER 1 +#define CONFIG_BMP_ENCODER 1 +#define CONFIG_CINEPAK_ENCODER 1 +#define CONFIG_CLJR_ENCODER 1 +#define CONFIG_COMFORTNOISE_ENCODER 1 +#define CONFIG_DNXHD_ENCODER 1 +#define CONFIG_DPX_ENCODER 1 +#define CONFIG_DVVIDEO_ENCODER 1 +#define CONFIG_FFV1_ENCODER 1 +#define CONFIG_FFVHUFF_ENCODER 1 +#define CONFIG_FITS_ENCODER 1 +#define CONFIG_FLASHSV_ENCODER 1 +#define CONFIG_FLASHSV2_ENCODER 1 +#define CONFIG_FLV_ENCODER 1 +#define CONFIG_GIF_ENCODER 1 +#define CONFIG_H261_ENCODER 1 +#define CONFIG_H263_ENCODER 1 +#define CONFIG_H263P_ENCODER 1 +#define CONFIG_HAP_ENCODER 0 +#define CONFIG_HUFFYUV_ENCODER 1 +#define CONFIG_JPEG2000_ENCODER 1 +#define CONFIG_JPEGLS_ENCODER 1 +#define CONFIG_LJPEG_ENCODER 1 +#define CONFIG_MAGICYUV_ENCODER 1 +#define CONFIG_MJPEG_ENCODER 1 +#define CONFIG_MPEG1VIDEO_ENCODER 1 +#define CONFIG_MPEG2VIDEO_ENCODER 1 +#define CONFIG_MPEG4_ENCODER 1 +#define CONFIG_MSMPEG4V2_ENCODER 1 +#define CONFIG_MSMPEG4V3_ENCODER 1 +#define CONFIG_MSVIDEO1_ENCODER 1 +#define CONFIG_PAM_ENCODER 1 +#define CONFIG_PBM_ENCODER 1 +#define CONFIG_PCX_ENCODER 1 +#define CONFIG_PGM_ENCODER 1 +#define CONFIG_PGMYUV_ENCODER 1 +#define CONFIG_PNG_ENCODER 1 +#define CONFIG_PPM_ENCODER 1 +#define CONFIG_PRORES_ENCODER 1 +#define CONFIG_PRORES_AW_ENCODER 1 +#define CONFIG_PRORES_KS_ENCODER 1 +#define CONFIG_QTRLE_ENCODER 1 +#define CONFIG_R10K_ENCODER 1 +#define CONFIG_R210_ENCODER 1 +#define CONFIG_RAWVIDEO_ENCODER 1 +#define CONFIG_ROQ_ENCODER 1 +#define CONFIG_RV10_ENCODER 1 +#define CONFIG_RV20_ENCODER 1 +#define CONFIG_S302M_ENCODER 1 +#define CONFIG_SGI_ENCODER 1 +#define CONFIG_SNOW_ENCODER 1 +#define CONFIG_SUNRAST_ENCODER 1 +#define CONFIG_SVQ1_ENCODER 1 +#define CONFIG_TARGA_ENCODER 1 +#define CONFIG_TIFF_ENCODER 1 +#define CONFIG_UTVIDEO_ENCODER 1 +#define CONFIG_V210_ENCODER 1 +#define CONFIG_V308_ENCODER 1 +#define CONFIG_V408_ENCODER 1 +#define CONFIG_V410_ENCODER 1 +#define CONFIG_VC2_ENCODER 1 +#define CONFIG_WRAPPED_AVFRAME_ENCODER 1 +#define CONFIG_WMV1_ENCODER 1 +#define CONFIG_WMV2_ENCODER 1 +#define CONFIG_XBM_ENCODER 1 +#define CONFIG_XFACE_ENCODER 1 +#define CONFIG_XWD_ENCODER 1 +#define CONFIG_Y41P_ENCODER 1 +#define CONFIG_YUV4_ENCODER 1 +#define CONFIG_ZLIB_ENCODER 1 +#define CONFIG_ZMBV_ENCODER 1 +#define CONFIG_AAC_ENCODER 1 +#define CONFIG_AC3_ENCODER 1 +#define CONFIG_AC3_FIXED_ENCODER 1 +#define CONFIG_ALAC_ENCODER 1 +#define CONFIG_APTX_ENCODER 1 +#define CONFIG_APTX_HD_ENCODER 1 +#define CONFIG_DCA_ENCODER 1 +#define CONFIG_EAC3_ENCODER 1 +#define CONFIG_FLAC_ENCODER 1 +#define CONFIG_G723_1_ENCODER 1 +#define CONFIG_MLP_ENCODER 1 +#define CONFIG_MP2_ENCODER 1 +#define CONFIG_MP2FIXED_ENCODER 1 +#define CONFIG_NELLYMOSER_ENCODER 1 +#define CONFIG_OPUS_ENCODER 1 +#define CONFIG_RA_144_ENCODER 1 +#define CONFIG_SBC_ENCODER 1 +#define CONFIG_SONIC_ENCODER 1 +#define CONFIG_SONIC_LS_ENCODER 1 +#define CONFIG_TRUEHD_ENCODER 1 +#define CONFIG_TTA_ENCODER 1 +#define CONFIG_VORBIS_ENCODER 1 +#define CONFIG_WAVPACK_ENCODER 1 +#define CONFIG_WMAV1_ENCODER 1 +#define CONFIG_WMAV2_ENCODER 1 +#define CONFIG_PCM_ALAW_ENCODER 1 +#define CONFIG_PCM_DVD_ENCODER 1 +#define CONFIG_PCM_F32BE_ENCODER 1 +#define CONFIG_PCM_F32LE_ENCODER 1 +#define CONFIG_PCM_F64BE_ENCODER 1 +#define CONFIG_PCM_F64LE_ENCODER 1 +#define CONFIG_PCM_MULAW_ENCODER 1 +#define CONFIG_PCM_S8_ENCODER 1 +#define CONFIG_PCM_S8_PLANAR_ENCODER 1 +#define CONFIG_PCM_S16BE_ENCODER 1 +#define CONFIG_PCM_S16BE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S16LE_ENCODER 1 +#define CONFIG_PCM_S16LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S24BE_ENCODER 1 +#define CONFIG_PCM_S24DAUD_ENCODER 1 +#define CONFIG_PCM_S24LE_ENCODER 1 +#define CONFIG_PCM_S24LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S32BE_ENCODER 1 +#define CONFIG_PCM_S32LE_ENCODER 1 +#define CONFIG_PCM_S32LE_PLANAR_ENCODER 1 +#define CONFIG_PCM_S64BE_ENCODER 1 +#define CONFIG_PCM_S64LE_ENCODER 1 +#define CONFIG_PCM_U8_ENCODER 1 +#define CONFIG_PCM_U16BE_ENCODER 1 +#define CONFIG_PCM_U16LE_ENCODER 1 +#define CONFIG_PCM_U24BE_ENCODER 1 +#define CONFIG_PCM_U24LE_ENCODER 1 +#define CONFIG_PCM_U32BE_ENCODER 1 +#define CONFIG_PCM_U32LE_ENCODER 1 +#define CONFIG_PCM_VIDC_ENCODER 1 +#define CONFIG_ROQ_DPCM_ENCODER 1 +#define CONFIG_ADPCM_ADX_ENCODER 1 +#define CONFIG_ADPCM_G722_ENCODER 1 +#define CONFIG_ADPCM_G726_ENCODER 1 +#define CONFIG_ADPCM_G726LE_ENCODER 1 +#define CONFIG_ADPCM_IMA_QT_ENCODER 1 +#define CONFIG_ADPCM_IMA_SSI_ENCODER 1 +#define CONFIG_ADPCM_IMA_WAV_ENCODER 1 +#define CONFIG_ADPCM_MS_ENCODER 1 +#define CONFIG_ADPCM_SWF_ENCODER 1 +#define CONFIG_ADPCM_YAMAHA_ENCODER 1 +#define CONFIG_SSA_ENCODER 1 +#define CONFIG_ASS_ENCODER 1 +#define CONFIG_DVBSUB_ENCODER 1 +#define CONFIG_DVDSUB_ENCODER 1 +#define CONFIG_MOVTEXT_ENCODER 1 +#define CONFIG_SRT_ENCODER 1 +#define CONFIG_SUBRIP_ENCODER 1 +#define CONFIG_TEXT_ENCODER 1 +#define CONFIG_WEBVTT_ENCODER 1 +#define CONFIG_XSUB_ENCODER 1 +#define CONFIG_AAC_AT_ENCODER 0 +#define CONFIG_ALAC_AT_ENCODER 0 +#define CONFIG_ILBC_AT_ENCODER 0 +#define CONFIG_PCM_ALAW_AT_ENCODER 0 +#define CONFIG_PCM_MULAW_AT_ENCODER 0 +#define CONFIG_LIBAOM_AV1_ENCODER 1 +#define CONFIG_LIBCODEC2_ENCODER 0 +#define CONFIG_LIBFDK_AAC_ENCODER 0 +#define CONFIG_LIBGSM_ENCODER 0 +#define CONFIG_LIBGSM_MS_ENCODER 0 +#define CONFIG_LIBILBC_ENCODER 0 +#define CONFIG_LIBMP3LAME_ENCODER 0 +#define CONFIG_LIBOPENCORE_AMRNB_ENCODER 0 +#define CONFIG_LIBOPENJPEG_ENCODER 0 +#define CONFIG_LIBOPUS_ENCODER 0 +#define CONFIG_LIBRAV1E_ENCODER 0 +#define CONFIG_LIBSHINE_ENCODER 0 +#define CONFIG_LIBSPEEX_ENCODER 0 +#define CONFIG_LIBTHEORA_ENCODER 0 +#define CONFIG_LIBTWOLAME_ENCODER 0 +#define CONFIG_LIBVO_AMRWBENC_ENCODER 0 +#define CONFIG_LIBVORBIS_ENCODER 0 +#define CONFIG_LIBVPX_VP8_ENCODER 0 +#define CONFIG_LIBVPX_VP9_ENCODER 0 +#define CONFIG_LIBWAVPACK_ENCODER 0 +#define CONFIG_LIBWEBP_ANIM_ENCODER 0 +#define CONFIG_LIBWEBP_ENCODER 0 +#define CONFIG_LIBX262_ENCODER 0 +#define CONFIG_LIBX264_ENCODER 0 +#define CONFIG_LIBX264RGB_ENCODER 0 +#define CONFIG_LIBX265_ENCODER 0 +#define CONFIG_LIBXAVS_ENCODER 0 +#define CONFIG_LIBXAVS2_ENCODER 0 +#define CONFIG_LIBXVID_ENCODER 0 +#define CONFIG_AAC_MF_ENCODER 0 +#define CONFIG_AC3_MF_ENCODER 0 +#define CONFIG_H263_V4L2M2M_ENCODER 1 +#define CONFIG_LIBOPENH264_ENCODER 0 +#define CONFIG_H264_AMF_ENCODER 0 +#define CONFIG_H264_MF_ENCODER 0 +#define CONFIG_H264_NVENC_ENCODER 0 +#define CONFIG_H264_OMX_ENCODER 0 +#define CONFIG_H264_QSV_ENCODER 0 +#define CONFIG_H264_V4L2M2M_ENCODER 1 +#define CONFIG_H264_VAAPI_ENCODER 0 +#define CONFIG_H264_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_NVENC_ENCODER 0 +#define CONFIG_NVENC_H264_ENCODER 0 +#define CONFIG_NVENC_HEVC_ENCODER 0 +#define CONFIG_HEVC_AMF_ENCODER 0 +#define CONFIG_HEVC_MF_ENCODER 0 +#define CONFIG_HEVC_NVENC_ENCODER 0 +#define CONFIG_HEVC_QSV_ENCODER 0 +#define CONFIG_HEVC_V4L2M2M_ENCODER 1 +#define CONFIG_HEVC_VAAPI_ENCODER 0 +#define CONFIG_HEVC_VIDEOTOOLBOX_ENCODER 0 +#define CONFIG_LIBKVAZAAR_ENCODER 0 +#define CONFIG_MJPEG_QSV_ENCODER 0 +#define CONFIG_MJPEG_VAAPI_ENCODER 0 +#define CONFIG_MP3_MF_ENCODER 0 +#define CONFIG_MPEG2_QSV_ENCODER 0 +#define CONFIG_MPEG2_VAAPI_ENCODER 0 +#define CONFIG_MPEG4_OMX_ENCODER 0 +#define CONFIG_MPEG4_V4L2M2M_ENCODER 1 +#define CONFIG_VP8_V4L2M2M_ENCODER 1 +#define CONFIG_VP8_VAAPI_ENCODER 0 +#define CONFIG_VP9_VAAPI_ENCODER 0 +#define CONFIG_VP9_QSV_ENCODER 0 +#define CONFIG_H263_VAAPI_HWACCEL 0 +#define CONFIG_H263_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_H264_D3D11VA_HWACCEL 0 +#define CONFIG_H264_D3D11VA2_HWACCEL 0 +#define CONFIG_H264_DXVA2_HWACCEL 0 +#define CONFIG_H264_NVDEC_HWACCEL 0 +#define CONFIG_H264_VAAPI_HWACCEL 0 +#define CONFIG_H264_VDPAU_HWACCEL 0 +#define CONFIG_H264_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_HEVC_D3D11VA_HWACCEL 0 +#define CONFIG_HEVC_D3D11VA2_HWACCEL 0 +#define CONFIG_HEVC_DXVA2_HWACCEL 0 +#define CONFIG_HEVC_NVDEC_HWACCEL 0 +#define CONFIG_HEVC_VAAPI_HWACCEL 0 +#define CONFIG_HEVC_VDPAU_HWACCEL 0 +#define CONFIG_HEVC_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_MJPEG_NVDEC_HWACCEL 0 +#define CONFIG_MJPEG_VAAPI_HWACCEL 0 +#define CONFIG_MPEG1_NVDEC_HWACCEL 0 +#define CONFIG_MPEG1_VDPAU_HWACCEL 0 +#define CONFIG_MPEG1_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_MPEG1_XVMC_HWACCEL 0 +#define CONFIG_MPEG2_D3D11VA_HWACCEL 0 +#define CONFIG_MPEG2_D3D11VA2_HWACCEL 0 +#define CONFIG_MPEG2_NVDEC_HWACCEL 0 +#define CONFIG_MPEG2_DXVA2_HWACCEL 0 +#define CONFIG_MPEG2_VAAPI_HWACCEL 0 +#define CONFIG_MPEG2_VDPAU_HWACCEL 0 +#define CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_MPEG2_XVMC_HWACCEL 0 +#define CONFIG_MPEG4_NVDEC_HWACCEL 0 +#define CONFIG_MPEG4_VAAPI_HWACCEL 0 +#define CONFIG_MPEG4_VDPAU_HWACCEL 0 +#define CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL 0 +#define CONFIG_VC1_D3D11VA_HWACCEL 0 +#define CONFIG_VC1_D3D11VA2_HWACCEL 0 +#define CONFIG_VC1_DXVA2_HWACCEL 0 +#define CONFIG_VC1_NVDEC_HWACCEL 0 +#define CONFIG_VC1_VAAPI_HWACCEL 0 +#define CONFIG_VC1_VDPAU_HWACCEL 0 +#define CONFIG_VP8_NVDEC_HWACCEL 0 +#define CONFIG_VP8_VAAPI_HWACCEL 0 +#define CONFIG_VP9_D3D11VA_HWACCEL 0 +#define CONFIG_VP9_D3D11VA2_HWACCEL 0 +#define CONFIG_VP9_DXVA2_HWACCEL 0 +#define CONFIG_VP9_NVDEC_HWACCEL 0 +#define CONFIG_VP9_VAAPI_HWACCEL 0 +#define CONFIG_VP9_VDPAU_HWACCEL 0 +#define CONFIG_WMV3_D3D11VA_HWACCEL 0 +#define CONFIG_WMV3_D3D11VA2_HWACCEL 0 +#define CONFIG_WMV3_DXVA2_HWACCEL 0 +#define CONFIG_WMV3_NVDEC_HWACCEL 0 +#define CONFIG_WMV3_VAAPI_HWACCEL 0 +#define CONFIG_WMV3_VDPAU_HWACCEL 0 +#define CONFIG_AAC_PARSER 1 +#define CONFIG_AAC_LATM_PARSER 1 +#define CONFIG_AC3_PARSER 1 +#define CONFIG_ADX_PARSER 1 +#define CONFIG_AV1_PARSER 1 +#define CONFIG_AVS2_PARSER 1 +#define CONFIG_BMP_PARSER 1 +#define CONFIG_CAVSVIDEO_PARSER 1 +#define CONFIG_COOK_PARSER 1 +#define CONFIG_DCA_PARSER 1 +#define CONFIG_DIRAC_PARSER 1 +#define CONFIG_DNXHD_PARSER 1 +#define CONFIG_DPX_PARSER 1 +#define CONFIG_DVAUDIO_PARSER 1 +#define CONFIG_DVBSUB_PARSER 1 +#define CONFIG_DVDSUB_PARSER 1 +#define CONFIG_DVD_NAV_PARSER 1 +#define CONFIG_FLAC_PARSER 1 +#define CONFIG_G723_1_PARSER 1 +#define CONFIG_G729_PARSER 1 +#define CONFIG_GIF_PARSER 1 +#define CONFIG_GSM_PARSER 1 +#define CONFIG_H261_PARSER 1 +#define CONFIG_H263_PARSER 1 +#define CONFIG_H264_PARSER 1 +#define CONFIG_HEVC_PARSER 1 +#define CONFIG_JPEG2000_PARSER 1 +#define CONFIG_MJPEG_PARSER 1 +#define CONFIG_MLP_PARSER 1 +#define CONFIG_MPEG4VIDEO_PARSER 1 +#define CONFIG_MPEGAUDIO_PARSER 1 +#define CONFIG_MPEGVIDEO_PARSER 1 +#define CONFIG_OPUS_PARSER 1 +#define CONFIG_PNG_PARSER 1 +#define CONFIG_PNM_PARSER 1 +#define CONFIG_RV30_PARSER 1 +#define CONFIG_RV40_PARSER 1 +#define CONFIG_SBC_PARSER 1 +#define CONFIG_SIPR_PARSER 1 +#define CONFIG_TAK_PARSER 1 +#define CONFIG_VC1_PARSER 1 +#define CONFIG_VORBIS_PARSER 1 +#define CONFIG_VP3_PARSER 1 +#define CONFIG_VP8_PARSER 1 +#define CONFIG_VP9_PARSER 1 +#define CONFIG_WEBP_PARSER 1 +#define CONFIG_XMA_PARSER 1 +#define CONFIG_ALSA_INDEV 1 +#define CONFIG_ANDROID_CAMERA_INDEV 0 +#define CONFIG_AVFOUNDATION_INDEV 0 +#define CONFIG_BKTR_INDEV 0 +#define CONFIG_DECKLINK_INDEV 0 +#define CONFIG_DSHOW_INDEV 0 +#define CONFIG_FBDEV_INDEV 1 +#define CONFIG_GDIGRAB_INDEV 0 +#define CONFIG_IEC61883_INDEV 0 +#define CONFIG_JACK_INDEV 0 +#define CONFIG_KMSGRAB_INDEV 0 +#define CONFIG_LAVFI_INDEV 1 +#define CONFIG_OPENAL_INDEV 0 +#define CONFIG_OSS_INDEV 1 +#define CONFIG_PULSE_INDEV 0 +#define CONFIG_SNDIO_INDEV 0 +#define CONFIG_V4L2_INDEV 1 +#define CONFIG_VFWCAP_INDEV 0 +#define CONFIG_XCBGRAB_INDEV 1 +#define CONFIG_LIBCDIO_INDEV 0 +#define CONFIG_LIBDC1394_INDEV 0 +#define CONFIG_ALSA_OUTDEV 1 +#define CONFIG_CACA_OUTDEV 0 +#define CONFIG_DECKLINK_OUTDEV 0 +#define CONFIG_FBDEV_OUTDEV 1 +#define CONFIG_OPENGL_OUTDEV 0 +#define CONFIG_OSS_OUTDEV 1 +#define CONFIG_PULSE_OUTDEV 0 +#define CONFIG_SDL2_OUTDEV 1 +#define CONFIG_SNDIO_OUTDEV 0 +#define CONFIG_V4L2_OUTDEV 1 +#define CONFIG_XV_OUTDEV 1 +#define CONFIG_ABENCH_FILTER 1 +#define CONFIG_ACOMPRESSOR_FILTER 1 +#define CONFIG_ACONTRAST_FILTER 1 +#define CONFIG_ACOPY_FILTER 1 +#define CONFIG_ACUE_FILTER 1 +#define CONFIG_ACROSSFADE_FILTER 1 +#define CONFIG_ACROSSOVER_FILTER 1 +#define CONFIG_ACRUSHER_FILTER 1 +#define CONFIG_ADECLICK_FILTER 1 +#define CONFIG_ADECLIP_FILTER 1 +#define CONFIG_ADELAY_FILTER 1 +#define CONFIG_ADERIVATIVE_FILTER 1 +#define CONFIG_AECHO_FILTER 1 +#define CONFIG_AEMPHASIS_FILTER 1 +#define CONFIG_AEVAL_FILTER 1 +#define CONFIG_AFADE_FILTER 1 +#define CONFIG_AFFTDN_FILTER 1 +#define CONFIG_AFFTFILT_FILTER 1 +#define CONFIG_AFIR_FILTER 1 +#define CONFIG_AFORMAT_FILTER 1 +#define CONFIG_AGATE_FILTER 1 +#define CONFIG_AIIR_FILTER 1 +#define CONFIG_AINTEGRAL_FILTER 1 +#define CONFIG_AINTERLEAVE_FILTER 1 +#define CONFIG_ALIMITER_FILTER 1 +#define CONFIG_ALLPASS_FILTER 1 +#define CONFIG_ALOOP_FILTER 1 +#define CONFIG_AMERGE_FILTER 1 +#define CONFIG_AMETADATA_FILTER 1 +#define CONFIG_AMIX_FILTER 1 +#define CONFIG_AMULTIPLY_FILTER 1 +#define CONFIG_ANEQUALIZER_FILTER 1 +#define CONFIG_ANLMDN_FILTER 1 +#define CONFIG_ANLMS_FILTER 1 +#define CONFIG_ANULL_FILTER 1 +#define CONFIG_APAD_FILTER 1 +#define CONFIG_APERMS_FILTER 1 +#define CONFIG_APHASER_FILTER 1 +#define CONFIG_APULSATOR_FILTER 1 +#define CONFIG_AREALTIME_FILTER 1 +#define CONFIG_ARESAMPLE_FILTER 1 +#define CONFIG_AREVERSE_FILTER 1 +#define CONFIG_ARNNDN_FILTER 1 +#define CONFIG_ASELECT_FILTER 1 +#define CONFIG_ASENDCMD_FILTER 1 +#define CONFIG_ASETNSAMPLES_FILTER 1 +#define CONFIG_ASETPTS_FILTER 1 +#define CONFIG_ASETRATE_FILTER 1 +#define CONFIG_ASETTB_FILTER 1 +#define CONFIG_ASHOWINFO_FILTER 1 +#define CONFIG_ASIDEDATA_FILTER 1 +#define CONFIG_ASOFTCLIP_FILTER 1 +#define CONFIG_ASPLIT_FILTER 1 +#define CONFIG_ASR_FILTER 0 +#define CONFIG_ASTATS_FILTER 1 +#define CONFIG_ASTREAMSELECT_FILTER 1 +#define CONFIG_ASUBBOOST_FILTER 1 +#define CONFIG_ATEMPO_FILTER 1 +#define CONFIG_ATRIM_FILTER 1 +#define CONFIG_AXCORRELATE_FILTER 1 +#define CONFIG_AZMQ_FILTER 0 +#define CONFIG_BANDPASS_FILTER 1 +#define CONFIG_BANDREJECT_FILTER 1 +#define CONFIG_BASS_FILTER 1 +#define CONFIG_BIQUAD_FILTER 1 +#define CONFIG_BS2B_FILTER 0 +#define CONFIG_CHROMABER_VULKAN_FILTER 0 +#define CONFIG_CHANNELMAP_FILTER 1 +#define CONFIG_CHANNELSPLIT_FILTER 1 +#define CONFIG_CHORUS_FILTER 1 +#define CONFIG_COMPAND_FILTER 1 +#define CONFIG_COMPENSATIONDELAY_FILTER 1 +#define CONFIG_CROSSFEED_FILTER 1 +#define CONFIG_CRYSTALIZER_FILTER 1 +#define CONFIG_DCSHIFT_FILTER 1 +#define CONFIG_DEESSER_FILTER 1 +#define CONFIG_DRMETER_FILTER 1 +#define CONFIG_DYNAUDNORM_FILTER 1 +#define CONFIG_EARWAX_FILTER 1 +#define CONFIG_EBUR128_FILTER 1 +#define CONFIG_EQUALIZER_FILTER 1 +#define CONFIG_EXTRASTEREO_FILTER 1 +#define CONFIG_FIREQUALIZER_FILTER 1 +#define CONFIG_FLANGER_FILTER 1 +#define CONFIG_HAAS_FILTER 1 +#define CONFIG_HDCD_FILTER 1 +#define CONFIG_HEADPHONE_FILTER 1 +#define CONFIG_HIGHPASS_FILTER 1 +#define CONFIG_HIGHSHELF_FILTER 1 +#define CONFIG_JOIN_FILTER 1 +#define CONFIG_LADSPA_FILTER 0 +#define CONFIG_LOUDNORM_FILTER 1 +#define CONFIG_LOWPASS_FILTER 1 +#define CONFIG_LOWSHELF_FILTER 1 +#define CONFIG_LV2_FILTER 0 +#define CONFIG_MCOMPAND_FILTER 1 +#define CONFIG_PAN_FILTER 1 +#define CONFIG_REPLAYGAIN_FILTER 1 +#define CONFIG_RESAMPLE_FILTER 1 +#define CONFIG_RUBBERBAND_FILTER 0 +#define CONFIG_SIDECHAINCOMPRESS_FILTER 1 +#define CONFIG_SIDECHAINGATE_FILTER 1 +#define CONFIG_SILENCEDETECT_FILTER 1 +#define CONFIG_SILENCEREMOVE_FILTER 1 +#define CONFIG_SOFALIZER_FILTER 0 +#define CONFIG_STEREOTOOLS_FILTER 1 +#define CONFIG_STEREOWIDEN_FILTER 1 +#define CONFIG_SUPEREQUALIZER_FILTER 1 +#define CONFIG_SURROUND_FILTER 1 +#define CONFIG_TREBLE_FILTER 1 +#define CONFIG_TREMOLO_FILTER 1 +#define CONFIG_VIBRATO_FILTER 1 +#define CONFIG_VOLUME_FILTER 1 +#define CONFIG_VOLUMEDETECT_FILTER 1 +#define CONFIG_AEVALSRC_FILTER 1 +#define CONFIG_AFIRSRC_FILTER 1 +#define CONFIG_ANOISESRC_FILTER 1 +#define CONFIG_ANULLSRC_FILTER 1 +#define CONFIG_FLITE_FILTER 0 +#define CONFIG_HILBERT_FILTER 1 +#define CONFIG_SINC_FILTER 1 +#define CONFIG_SINE_FILTER 1 +#define CONFIG_ANULLSINK_FILTER 1 +#define CONFIG_ADDROI_FILTER 1 +#define CONFIG_ALPHAEXTRACT_FILTER 1 +#define CONFIG_ALPHAMERGE_FILTER 1 +#define CONFIG_AMPLIFY_FILTER 1 +#define CONFIG_ASS_FILTER 0 +#define CONFIG_ATADENOISE_FILTER 1 +#define CONFIG_AVGBLUR_FILTER 1 +#define CONFIG_AVGBLUR_OPENCL_FILTER 0 +#define CONFIG_AVGBLUR_VULKAN_FILTER 0 +#define CONFIG_BBOX_FILTER 1 +#define CONFIG_BENCH_FILTER 1 +#define CONFIG_BILATERAL_FILTER 1 +#define CONFIG_BITPLANENOISE_FILTER 1 +#define CONFIG_BLACKDETECT_FILTER 1 +#define CONFIG_BLACKFRAME_FILTER 0 +#define CONFIG_BLEND_FILTER 1 +#define CONFIG_BM3D_FILTER 1 +#define CONFIG_BOXBLUR_FILTER 0 +#define CONFIG_BOXBLUR_OPENCL_FILTER 0 +#define CONFIG_BWDIF_FILTER 1 +#define CONFIG_CAS_FILTER 1 +#define CONFIG_CHROMAHOLD_FILTER 1 +#define CONFIG_CHROMAKEY_FILTER 1 +#define CONFIG_CHROMASHIFT_FILTER 1 +#define CONFIG_CIESCOPE_FILTER 1 +#define CONFIG_CODECVIEW_FILTER 1 +#define CONFIG_COLORBALANCE_FILTER 1 +#define CONFIG_COLORCHANNELMIXER_FILTER 1 +#define CONFIG_COLORKEY_FILTER 1 +#define CONFIG_COLORKEY_OPENCL_FILTER 0 +#define CONFIG_COLORHOLD_FILTER 1 +#define CONFIG_COLORLEVELS_FILTER 1 +#define CONFIG_COLORMATRIX_FILTER 0 +#define CONFIG_COLORSPACE_FILTER 1 +#define CONFIG_CONVOLUTION_FILTER 1 +#define CONFIG_CONVOLUTION_OPENCL_FILTER 0 +#define CONFIG_CONVOLVE_FILTER 1 +#define CONFIG_COPY_FILTER 1 +#define CONFIG_COREIMAGE_FILTER 0 +#define CONFIG_COVER_RECT_FILTER 0 +#define CONFIG_CROP_FILTER 1 +#define CONFIG_CROPDETECT_FILTER 0 +#define CONFIG_CUE_FILTER 1 +#define CONFIG_CURVES_FILTER 1 +#define CONFIG_DATASCOPE_FILTER 1 +#define CONFIG_DBLUR_FILTER 1 +#define CONFIG_DCTDNOIZ_FILTER 1 +#define CONFIG_DEBAND_FILTER 1 +#define CONFIG_DEBLOCK_FILTER 1 +#define CONFIG_DECIMATE_FILTER 1 +#define CONFIG_DECONVOLVE_FILTER 1 +#define CONFIG_DEDOT_FILTER 1 +#define CONFIG_DEFLATE_FILTER 1 +#define CONFIG_DEFLICKER_FILTER 1 +#define CONFIG_DEINTERLACE_QSV_FILTER 0 +#define CONFIG_DEINTERLACE_VAAPI_FILTER 0 +#define CONFIG_DEJUDDER_FILTER 1 +#define CONFIG_DELOGO_FILTER 0 +#define CONFIG_DENOISE_VAAPI_FILTER 0 +#define CONFIG_DERAIN_FILTER 1 +#define CONFIG_DESHAKE_FILTER 1 +#define CONFIG_DESHAKE_OPENCL_FILTER 0 +#define CONFIG_DESPILL_FILTER 1 +#define CONFIG_DETELECINE_FILTER 1 +#define CONFIG_DILATION_FILTER 1 +#define CONFIG_DILATION_OPENCL_FILTER 0 +#define CONFIG_DISPLACE_FILTER 1 +#define CONFIG_DNN_PROCESSING_FILTER 1 +#define CONFIG_DOUBLEWEAVE_FILTER 1 +#define CONFIG_DRAWBOX_FILTER 1 +#define CONFIG_DRAWGRAPH_FILTER 1 +#define CONFIG_DRAWGRID_FILTER 1 +#define CONFIG_DRAWTEXT_FILTER 0 +#define CONFIG_EDGEDETECT_FILTER 1 +#define CONFIG_ELBG_FILTER 1 +#define CONFIG_ENTROPY_FILTER 1 +#define CONFIG_EQ_FILTER 0 +#define CONFIG_EROSION_FILTER 1 +#define CONFIG_EROSION_OPENCL_FILTER 0 +#define CONFIG_EXTRACTPLANES_FILTER 1 +#define CONFIG_FADE_FILTER 1 +#define CONFIG_FFTDNOIZ_FILTER 1 +#define CONFIG_FFTFILT_FILTER 1 +#define CONFIG_FIELD_FILTER 1 +#define CONFIG_FIELDHINT_FILTER 1 +#define CONFIG_FIELDMATCH_FILTER 1 +#define CONFIG_FIELDORDER_FILTER 1 +#define CONFIG_FILLBORDERS_FILTER 1 +#define CONFIG_FIND_RECT_FILTER 0 +#define CONFIG_FLOODFILL_FILTER 1 +#define CONFIG_FORMAT_FILTER 1 +#define CONFIG_FPS_FILTER 1 +#define CONFIG_FRAMEPACK_FILTER 1 +#define CONFIG_FRAMERATE_FILTER 1 +#define CONFIG_FRAMESTEP_FILTER 1 +#define CONFIG_FREEZEDETECT_FILTER 1 +#define CONFIG_FREEZEFRAMES_FILTER 1 +#define CONFIG_FREI0R_FILTER 0 +#define CONFIG_FSPP_FILTER 0 +#define CONFIG_GBLUR_FILTER 1 +#define CONFIG_GEQ_FILTER 1 +#define CONFIG_GRADFUN_FILTER 1 +#define CONFIG_GRAPHMONITOR_FILTER 1 +#define CONFIG_GREYEDGE_FILTER 1 +#define CONFIG_HALDCLUT_FILTER 1 +#define CONFIG_HFLIP_FILTER 1 +#define CONFIG_HISTEQ_FILTER 0 +#define CONFIG_HISTOGRAM_FILTER 1 +#define CONFIG_HQDN3D_FILTER 0 +#define CONFIG_HQX_FILTER 1 +#define CONFIG_HSTACK_FILTER 1 +#define CONFIG_HUE_FILTER 1 +#define CONFIG_HWDOWNLOAD_FILTER 1 +#define CONFIG_HWMAP_FILTER 1 +#define CONFIG_HWUPLOAD_FILTER 1 +#define CONFIG_HWUPLOAD_CUDA_FILTER 0 +#define CONFIG_HYSTERESIS_FILTER 1 +#define CONFIG_IDET_FILTER 1 +#define CONFIG_IL_FILTER 1 +#define CONFIG_INFLATE_FILTER 1 +#define CONFIG_INTERLACE_FILTER 0 +#define CONFIG_INTERLEAVE_FILTER 1 +#define CONFIG_KERNDEINT_FILTER 0 +#define CONFIG_LAGFUN_FILTER 1 +#define CONFIG_LENSCORRECTION_FILTER 1 +#define CONFIG_LENSFUN_FILTER 0 +#define CONFIG_LIBVMAF_FILTER 0 +#define CONFIG_LIMITER_FILTER 1 +#define CONFIG_LOOP_FILTER 1 +#define CONFIG_LUMAKEY_FILTER 1 +#define CONFIG_LUT_FILTER 1 +#define CONFIG_LUT1D_FILTER 1 +#define CONFIG_LUT2_FILTER 1 +#define CONFIG_LUT3D_FILTER 1 +#define CONFIG_LUTRGB_FILTER 1 +#define CONFIG_LUTYUV_FILTER 1 +#define CONFIG_MASKEDCLAMP_FILTER 1 +#define CONFIG_MASKEDMAX_FILTER 1 +#define CONFIG_MASKEDMERGE_FILTER 1 +#define CONFIG_MASKEDMIN_FILTER 1 +#define CONFIG_MASKEDTHRESHOLD_FILTER 1 +#define CONFIG_MASKFUN_FILTER 1 +#define CONFIG_MCDEINT_FILTER 0 +#define CONFIG_MEDIAN_FILTER 1 +#define CONFIG_MERGEPLANES_FILTER 1 +#define CONFIG_MESTIMATE_FILTER 1 +#define CONFIG_METADATA_FILTER 1 +#define CONFIG_MIDEQUALIZER_FILTER 1 +#define CONFIG_MINTERPOLATE_FILTER 1 +#define CONFIG_MIX_FILTER 1 +#define CONFIG_MPDECIMATE_FILTER 0 +#define CONFIG_NEGATE_FILTER 1 +#define CONFIG_NLMEANS_FILTER 1 +#define CONFIG_NLMEANS_OPENCL_FILTER 0 +#define CONFIG_NNEDI_FILTER 0 +#define CONFIG_NOFORMAT_FILTER 1 +#define CONFIG_NOISE_FILTER 1 +#define CONFIG_NORMALIZE_FILTER 1 +#define CONFIG_NULL_FILTER 1 +#define CONFIG_OCR_FILTER 0 +#define CONFIG_OCV_FILTER 0 +#define CONFIG_OSCILLOSCOPE_FILTER 1 +#define CONFIG_OVERLAY_FILTER 1 +#define CONFIG_OVERLAY_OPENCL_FILTER 0 +#define CONFIG_OVERLAY_QSV_FILTER 0 +#define CONFIG_OVERLAY_VULKAN_FILTER 0 +#define CONFIG_OVERLAY_CUDA_FILTER 0 +#define CONFIG_OWDENOISE_FILTER 0 +#define CONFIG_PAD_FILTER 1 +#define CONFIG_PAD_OPENCL_FILTER 0 +#define CONFIG_PALETTEGEN_FILTER 1 +#define CONFIG_PALETTEUSE_FILTER 1 +#define CONFIG_PERMS_FILTER 1 +#define CONFIG_PERSPECTIVE_FILTER 0 +#define CONFIG_PHASE_FILTER 0 +#define CONFIG_PHOTOSENSITIVITY_FILTER 1 +#define CONFIG_PIXDESCTEST_FILTER 1 +#define CONFIG_PIXSCOPE_FILTER 1 +#define CONFIG_PP_FILTER 0 +#define CONFIG_PP7_FILTER 0 +#define CONFIG_PREMULTIPLY_FILTER 1 +#define CONFIG_PREWITT_FILTER 1 +#define CONFIG_PREWITT_OPENCL_FILTER 0 +#define CONFIG_PROCAMP_VAAPI_FILTER 0 +#define CONFIG_PROGRAM_OPENCL_FILTER 0 +#define CONFIG_PSEUDOCOLOR_FILTER 1 +#define CONFIG_PSNR_FILTER 1 +#define CONFIG_PULLUP_FILTER 0 +#define CONFIG_QP_FILTER 1 +#define CONFIG_RANDOM_FILTER 1 +#define CONFIG_READEIA608_FILTER 1 +#define CONFIG_READVITC_FILTER 1 +#define CONFIG_REALTIME_FILTER 1 +#define CONFIG_REMAP_FILTER 1 +#define CONFIG_REMOVEGRAIN_FILTER 1 +#define CONFIG_REMOVELOGO_FILTER 1 +#define CONFIG_REPEATFIELDS_FILTER 0 +#define CONFIG_REVERSE_FILTER 1 +#define CONFIG_RGBASHIFT_FILTER 1 +#define CONFIG_ROBERTS_FILTER 1 +#define CONFIG_ROBERTS_OPENCL_FILTER 0 +#define CONFIG_ROTATE_FILTER 1 +#define CONFIG_SAB_FILTER 0 +#define CONFIG_SCALE_FILTER 1 +#define CONFIG_SCALE_CUDA_FILTER 0 +#define CONFIG_SCALE_NPP_FILTER 0 +#define CONFIG_SCALE_QSV_FILTER 0 +#define CONFIG_SCALE_VAAPI_FILTER 0 +#define CONFIG_SCALE_VULKAN_FILTER 0 +#define CONFIG_SCALE2REF_FILTER 1 +#define CONFIG_SCDET_FILTER 1 +#define CONFIG_SCROLL_FILTER 1 +#define CONFIG_SELECT_FILTER 1 +#define CONFIG_SELECTIVECOLOR_FILTER 1 +#define CONFIG_SENDCMD_FILTER 1 +#define CONFIG_SEPARATEFIELDS_FILTER 1 +#define CONFIG_SETDAR_FILTER 1 +#define CONFIG_SETFIELD_FILTER 1 +#define CONFIG_SETPARAMS_FILTER 1 +#define CONFIG_SETPTS_FILTER 1 +#define CONFIG_SETRANGE_FILTER 1 +#define CONFIG_SETSAR_FILTER 1 +#define CONFIG_SETTB_FILTER 1 +#define CONFIG_SHARPNESS_VAAPI_FILTER 0 +#define CONFIG_SHOWINFO_FILTER 1 +#define CONFIG_SHOWPALETTE_FILTER 1 +#define CONFIG_SHUFFLEFRAMES_FILTER 1 +#define CONFIG_SHUFFLEPLANES_FILTER 1 +#define CONFIG_SIDEDATA_FILTER 1 +#define CONFIG_SIGNALSTATS_FILTER 1 +#define CONFIG_SIGNATURE_FILTER 0 +#define CONFIG_SMARTBLUR_FILTER 0 +#define CONFIG_SOBEL_FILTER 1 +#define CONFIG_SOBEL_OPENCL_FILTER 0 +#define CONFIG_SPLIT_FILTER 1 +#define CONFIG_SPP_FILTER 0 +#define CONFIG_SR_FILTER 1 +#define CONFIG_SSIM_FILTER 1 +#define CONFIG_STEREO3D_FILTER 0 +#define CONFIG_STREAMSELECT_FILTER 1 +#define CONFIG_SUBTITLES_FILTER 0 +#define CONFIG_SUPER2XSAI_FILTER 0 +#define CONFIG_SWAPRECT_FILTER 1 +#define CONFIG_SWAPUV_FILTER 1 +#define CONFIG_TBLEND_FILTER 1 +#define CONFIG_TELECINE_FILTER 1 +#define CONFIG_THISTOGRAM_FILTER 1 +#define CONFIG_THRESHOLD_FILTER 1 +#define CONFIG_THUMBNAIL_FILTER 1 +#define CONFIG_THUMBNAIL_CUDA_FILTER 0 +#define CONFIG_TILE_FILTER 1 +#define CONFIG_TINTERLACE_FILTER 0 +#define CONFIG_TLUT2_FILTER 1 +#define CONFIG_TMEDIAN_FILTER 1 +#define CONFIG_TMIX_FILTER 1 +#define CONFIG_TONEMAP_FILTER 1 +#define CONFIG_TONEMAP_OPENCL_FILTER 0 +#define CONFIG_TONEMAP_VAAPI_FILTER 0 +#define CONFIG_TPAD_FILTER 1 +#define CONFIG_TRANSPOSE_FILTER 1 +#define CONFIG_TRANSPOSE_NPP_FILTER 0 +#define CONFIG_TRANSPOSE_OPENCL_FILTER 0 +#define CONFIG_TRANSPOSE_VAAPI_FILTER 0 +#define CONFIG_TRIM_FILTER 1 +#define CONFIG_UNPREMULTIPLY_FILTER 1 +#define CONFIG_UNSHARP_FILTER 1 +#define CONFIG_UNSHARP_OPENCL_FILTER 0 +#define CONFIG_UNTILE_FILTER 1 +#define CONFIG_USPP_FILTER 0 +#define CONFIG_V360_FILTER 1 +#define CONFIG_VAGUEDENOISER_FILTER 0 +#define CONFIG_VECTORSCOPE_FILTER 1 +#define CONFIG_VFLIP_FILTER 1 +#define CONFIG_VFRDET_FILTER 1 +#define CONFIG_VIBRANCE_FILTER 1 +#define CONFIG_VIDSTABDETECT_FILTER 0 +#define CONFIG_VIDSTABTRANSFORM_FILTER 0 +#define CONFIG_VIGNETTE_FILTER 1 +#define CONFIG_VMAFMOTION_FILTER 1 +#define CONFIG_VPP_QSV_FILTER 0 +#define CONFIG_VSTACK_FILTER 1 +#define CONFIG_W3FDIF_FILTER 1 +#define CONFIG_WAVEFORM_FILTER 1 +#define CONFIG_WEAVE_FILTER 1 +#define CONFIG_XBR_FILTER 1 +#define CONFIG_XFADE_FILTER 1 +#define CONFIG_XFADE_OPENCL_FILTER 0 +#define CONFIG_XMEDIAN_FILTER 1 +#define CONFIG_XSTACK_FILTER 1 +#define CONFIG_YADIF_FILTER 1 +#define CONFIG_YADIF_CUDA_FILTER 0 +#define CONFIG_YAEPBLUR_FILTER 1 +#define CONFIG_ZMQ_FILTER 0 +#define CONFIG_ZOOMPAN_FILTER 1 +#define CONFIG_ZSCALE_FILTER 0 +#define CONFIG_ALLRGB_FILTER 1 +#define CONFIG_ALLYUV_FILTER 1 +#define CONFIG_CELLAUTO_FILTER 1 +#define CONFIG_COLOR_FILTER 1 +#define CONFIG_COREIMAGESRC_FILTER 0 +#define CONFIG_FREI0R_SRC_FILTER 0 +#define CONFIG_GRADIENTS_FILTER 1 +#define CONFIG_HALDCLUTSRC_FILTER 1 +#define CONFIG_LIFE_FILTER 1 +#define CONFIG_MANDELBROT_FILTER 1 +#define CONFIG_MPTESTSRC_FILTER 0 +#define CONFIG_NULLSRC_FILTER 1 +#define CONFIG_OPENCLSRC_FILTER 0 +#define CONFIG_PAL75BARS_FILTER 1 +#define CONFIG_PAL100BARS_FILTER 1 +#define CONFIG_RGBTESTSRC_FILTER 1 +#define CONFIG_SIERPINSKI_FILTER 1 +#define CONFIG_SMPTEBARS_FILTER 1 +#define CONFIG_SMPTEHDBARS_FILTER 1 +#define CONFIG_TESTSRC_FILTER 1 +#define CONFIG_TESTSRC2_FILTER 1 +#define CONFIG_YUVTESTSRC_FILTER 1 +#define CONFIG_NULLSINK_FILTER 1 +#define CONFIG_ABITSCOPE_FILTER 1 +#define CONFIG_ADRAWGRAPH_FILTER 1 +#define CONFIG_AGRAPHMONITOR_FILTER 1 +#define CONFIG_AHISTOGRAM_FILTER 1 +#define CONFIG_APHASEMETER_FILTER 1 +#define CONFIG_AVECTORSCOPE_FILTER 1 +#define CONFIG_CONCAT_FILTER 1 +#define CONFIG_SHOWCQT_FILTER 1 +#define CONFIG_SHOWFREQS_FILTER 1 +#define CONFIG_SHOWSPATIAL_FILTER 1 +#define CONFIG_SHOWSPECTRUM_FILTER 1 +#define CONFIG_SHOWSPECTRUMPIC_FILTER 1 +#define CONFIG_SHOWVOLUME_FILTER 1 +#define CONFIG_SHOWWAVES_FILTER 1 +#define CONFIG_SHOWWAVESPIC_FILTER 1 +#define CONFIG_SPECTRUMSYNTH_FILTER 1 +#define CONFIG_AMOVIE_FILTER 1 +#define CONFIG_MOVIE_FILTER 1 +#define CONFIG_AFIFO_FILTER 1 +#define CONFIG_FIFO_FILTER 1 +#define CONFIG_AA_DEMUXER 1 +#define CONFIG_AAC_DEMUXER 1 +#define CONFIG_AC3_DEMUXER 1 +#define CONFIG_ACM_DEMUXER 1 +#define CONFIG_ACT_DEMUXER 1 +#define CONFIG_ADF_DEMUXER 1 +#define CONFIG_ADP_DEMUXER 1 +#define CONFIG_ADS_DEMUXER 1 +#define CONFIG_ADX_DEMUXER 1 +#define CONFIG_AEA_DEMUXER 1 +#define CONFIG_AFC_DEMUXER 1 +#define CONFIG_AIFF_DEMUXER 1 +#define CONFIG_AIX_DEMUXER 1 +#define CONFIG_ALP_DEMUXER 1 +#define CONFIG_AMR_DEMUXER 1 +#define CONFIG_AMRNB_DEMUXER 1 +#define CONFIG_AMRWB_DEMUXER 1 +#define CONFIG_ANM_DEMUXER 1 +#define CONFIG_APC_DEMUXER 1 +#define CONFIG_APE_DEMUXER 1 +#define CONFIG_APM_DEMUXER 1 +#define CONFIG_APNG_DEMUXER 1 +#define CONFIG_APTX_DEMUXER 1 +#define CONFIG_APTX_HD_DEMUXER 1 +#define CONFIG_AQTITLE_DEMUXER 1 +#define CONFIG_ARGO_ASF_DEMUXER 1 +#define CONFIG_ASF_DEMUXER 1 +#define CONFIG_ASF_O_DEMUXER 1 +#define CONFIG_ASS_DEMUXER 1 +#define CONFIG_AST_DEMUXER 1 +#define CONFIG_AU_DEMUXER 1 +#define CONFIG_AV1_DEMUXER 1 +#define CONFIG_AVI_DEMUXER 1 +#define CONFIG_AVISYNTH_DEMUXER 0 +#define CONFIG_AVR_DEMUXER 1 +#define CONFIG_AVS_DEMUXER 1 +#define CONFIG_AVS2_DEMUXER 1 +#define CONFIG_BETHSOFTVID_DEMUXER 1 +#define CONFIG_BFI_DEMUXER 1 +#define CONFIG_BINTEXT_DEMUXER 1 +#define CONFIG_BINK_DEMUXER 1 +#define CONFIG_BIT_DEMUXER 1 +#define CONFIG_BMV_DEMUXER 1 +#define CONFIG_BFSTM_DEMUXER 1 +#define CONFIG_BRSTM_DEMUXER 1 +#define CONFIG_BOA_DEMUXER 1 +#define CONFIG_C93_DEMUXER 1 +#define CONFIG_CAF_DEMUXER 1 +#define CONFIG_CAVSVIDEO_DEMUXER 1 +#define CONFIG_CDG_DEMUXER 1 +#define CONFIG_CDXL_DEMUXER 1 +#define CONFIG_CINE_DEMUXER 1 +#define CONFIG_CODEC2_DEMUXER 1 +#define CONFIG_CODEC2RAW_DEMUXER 1 +#define CONFIG_CONCAT_DEMUXER 1 +#define CONFIG_DASH_DEMUXER 0 +#define CONFIG_DATA_DEMUXER 1 +#define CONFIG_DAUD_DEMUXER 1 +#define CONFIG_DCSTR_DEMUXER 1 +#define CONFIG_DERF_DEMUXER 1 +#define CONFIG_DFA_DEMUXER 1 +#define CONFIG_DHAV_DEMUXER 1 +#define CONFIG_DIRAC_DEMUXER 1 +#define CONFIG_DNXHD_DEMUXER 1 +#define CONFIG_DSF_DEMUXER 1 +#define CONFIG_DSICIN_DEMUXER 1 +#define CONFIG_DSS_DEMUXER 1 +#define CONFIG_DTS_DEMUXER 1 +#define CONFIG_DTSHD_DEMUXER 1 +#define CONFIG_DV_DEMUXER 1 +#define CONFIG_DVBSUB_DEMUXER 1 +#define CONFIG_DVBTXT_DEMUXER 1 +#define CONFIG_DXA_DEMUXER 1 +#define CONFIG_EA_DEMUXER 1 +#define CONFIG_EA_CDATA_DEMUXER 1 +#define CONFIG_EAC3_DEMUXER 1 +#define CONFIG_EPAF_DEMUXER 1 +#define CONFIG_FFMETADATA_DEMUXER 1 +#define CONFIG_FILMSTRIP_DEMUXER 1 +#define CONFIG_FITS_DEMUXER 1 +#define CONFIG_FLAC_DEMUXER 1 +#define CONFIG_FLIC_DEMUXER 1 +#define CONFIG_FLV_DEMUXER 1 +#define CONFIG_LIVE_FLV_DEMUXER 1 +#define CONFIG_FOURXM_DEMUXER 1 +#define CONFIG_FRM_DEMUXER 1 +#define CONFIG_FSB_DEMUXER 1 +#define CONFIG_FWSE_DEMUXER 1 +#define CONFIG_G722_DEMUXER 1 +#define CONFIG_G723_1_DEMUXER 1 +#define CONFIG_G726_DEMUXER 1 +#define CONFIG_G726LE_DEMUXER 1 +#define CONFIG_G729_DEMUXER 1 +#define CONFIG_GDV_DEMUXER 1 +#define CONFIG_GENH_DEMUXER 1 +#define CONFIG_GIF_DEMUXER 1 +#define CONFIG_GSM_DEMUXER 1 +#define CONFIG_GXF_DEMUXER 1 +#define CONFIG_H261_DEMUXER 1 +#define CONFIG_H263_DEMUXER 1 +#define CONFIG_H264_DEMUXER 1 +#define CONFIG_HCA_DEMUXER 1 +#define CONFIG_HCOM_DEMUXER 1 +#define CONFIG_HEVC_DEMUXER 1 +#define CONFIG_HLS_DEMUXER 1 +#define CONFIG_HNM_DEMUXER 1 +#define CONFIG_ICO_DEMUXER 1 +#define CONFIG_IDCIN_DEMUXER 1 +#define CONFIG_IDF_DEMUXER 1 +#define CONFIG_IFF_DEMUXER 1 +#define CONFIG_IFV_DEMUXER 1 +#define CONFIG_ILBC_DEMUXER 1 +#define CONFIG_IMAGE2_DEMUXER 1 +#define CONFIG_IMAGE2PIPE_DEMUXER 1 +#define CONFIG_IMAGE2_ALIAS_PIX_DEMUXER 1 +#define CONFIG_IMAGE2_BRENDER_PIX_DEMUXER 1 +#define CONFIG_INGENIENT_DEMUXER 1 +#define CONFIG_IPMOVIE_DEMUXER 1 +#define CONFIG_IRCAM_DEMUXER 1 +#define CONFIG_ISS_DEMUXER 1 +#define CONFIG_IV8_DEMUXER 1 +#define CONFIG_IVF_DEMUXER 1 +#define CONFIG_IVR_DEMUXER 1 +#define CONFIG_JACOSUB_DEMUXER 1 +#define CONFIG_JV_DEMUXER 1 +#define CONFIG_KUX_DEMUXER 1 +#define CONFIG_KVAG_DEMUXER 1 +#define CONFIG_LMLM4_DEMUXER 1 +#define CONFIG_LOAS_DEMUXER 1 +#define CONFIG_LRC_DEMUXER 1 +#define CONFIG_LVF_DEMUXER 1 +#define CONFIG_LXF_DEMUXER 1 +#define CONFIG_M4V_DEMUXER 1 +#define CONFIG_MATROSKA_DEMUXER 1 +#define CONFIG_MGSTS_DEMUXER 1 +#define CONFIG_MICRODVD_DEMUXER 1 +#define CONFIG_MJPEG_DEMUXER 1 +#define CONFIG_MJPEG_2000_DEMUXER 1 +#define CONFIG_MLP_DEMUXER 1 +#define CONFIG_MLV_DEMUXER 1 +#define CONFIG_MM_DEMUXER 1 +#define CONFIG_MMF_DEMUXER 1 +#define CONFIG_MOV_DEMUXER 1 +#define CONFIG_MP3_DEMUXER 1 +#define CONFIG_MPC_DEMUXER 1 +#define CONFIG_MPC8_DEMUXER 1 +#define CONFIG_MPEGPS_DEMUXER 1 +#define CONFIG_MPEGTS_DEMUXER 1 +#define CONFIG_MPEGTSRAW_DEMUXER 1 +#define CONFIG_MPEGVIDEO_DEMUXER 1 +#define CONFIG_MPJPEG_DEMUXER 1 +#define CONFIG_MPL2_DEMUXER 1 +#define CONFIG_MPSUB_DEMUXER 1 +#define CONFIG_MSF_DEMUXER 1 +#define CONFIG_MSNWC_TCP_DEMUXER 1 +#define CONFIG_MTAF_DEMUXER 1 +#define CONFIG_MTV_DEMUXER 1 +#define CONFIG_MUSX_DEMUXER 1 +#define CONFIG_MV_DEMUXER 1 +#define CONFIG_MVI_DEMUXER 1 +#define CONFIG_MXF_DEMUXER 1 +#define CONFIG_MXG_DEMUXER 1 +#define CONFIG_NC_DEMUXER 1 +#define CONFIG_NISTSPHERE_DEMUXER 1 +#define CONFIG_NSP_DEMUXER 1 +#define CONFIG_NSV_DEMUXER 1 +#define CONFIG_NUT_DEMUXER 1 +#define CONFIG_NUV_DEMUXER 1 +#define CONFIG_OGG_DEMUXER 1 +#define CONFIG_OMA_DEMUXER 1 +#define CONFIG_PAF_DEMUXER 1 +#define CONFIG_PCM_ALAW_DEMUXER 1 +#define CONFIG_PCM_MULAW_DEMUXER 1 +#define CONFIG_PCM_VIDC_DEMUXER 1 +#define CONFIG_PCM_F64BE_DEMUXER 1 +#define CONFIG_PCM_F64LE_DEMUXER 1 +#define CONFIG_PCM_F32BE_DEMUXER 1 +#define CONFIG_PCM_F32LE_DEMUXER 1 +#define CONFIG_PCM_S32BE_DEMUXER 1 +#define CONFIG_PCM_S32LE_DEMUXER 1 +#define CONFIG_PCM_S24BE_DEMUXER 1 +#define CONFIG_PCM_S24LE_DEMUXER 1 +#define CONFIG_PCM_S16BE_DEMUXER 1 +#define CONFIG_PCM_S16LE_DEMUXER 1 +#define CONFIG_PCM_S8_DEMUXER 1 +#define CONFIG_PCM_U32BE_DEMUXER 1 +#define CONFIG_PCM_U32LE_DEMUXER 1 +#define CONFIG_PCM_U24BE_DEMUXER 1 +#define CONFIG_PCM_U24LE_DEMUXER 1 +#define CONFIG_PCM_U16BE_DEMUXER 1 +#define CONFIG_PCM_U16LE_DEMUXER 1 +#define CONFIG_PCM_U8_DEMUXER 1 +#define CONFIG_PJS_DEMUXER 1 +#define CONFIG_PMP_DEMUXER 1 +#define CONFIG_PP_BNK_DEMUXER 1 +#define CONFIG_PVA_DEMUXER 1 +#define CONFIG_PVF_DEMUXER 1 +#define CONFIG_QCP_DEMUXER 1 +#define CONFIG_R3D_DEMUXER 1 +#define CONFIG_RAWVIDEO_DEMUXER 1 +#define CONFIG_REALTEXT_DEMUXER 1 +#define CONFIG_REDSPARK_DEMUXER 1 +#define CONFIG_RL2_DEMUXER 1 +#define CONFIG_RM_DEMUXER 1 +#define CONFIG_ROQ_DEMUXER 1 +#define CONFIG_RPL_DEMUXER 1 +#define CONFIG_RSD_DEMUXER 1 +#define CONFIG_RSO_DEMUXER 1 +#define CONFIG_RTP_DEMUXER 1 +#define CONFIG_RTSP_DEMUXER 1 +#define CONFIG_S337M_DEMUXER 1 +#define CONFIG_SAMI_DEMUXER 1 +#define CONFIG_SAP_DEMUXER 1 +#define CONFIG_SBC_DEMUXER 1 +#define CONFIG_SBG_DEMUXER 1 +#define CONFIG_SCC_DEMUXER 1 +#define CONFIG_SDP_DEMUXER 1 +#define CONFIG_SDR2_DEMUXER 1 +#define CONFIG_SDS_DEMUXER 1 +#define CONFIG_SDX_DEMUXER 1 +#define CONFIG_SEGAFILM_DEMUXER 1 +#define CONFIG_SER_DEMUXER 1 +#define CONFIG_SHORTEN_DEMUXER 1 +#define CONFIG_SIFF_DEMUXER 1 +#define CONFIG_SLN_DEMUXER 1 +#define CONFIG_SMACKER_DEMUXER 1 +#define CONFIG_SMJPEG_DEMUXER 1 +#define CONFIG_SMUSH_DEMUXER 1 +#define CONFIG_SOL_DEMUXER 1 +#define CONFIG_SOX_DEMUXER 1 +#define CONFIG_SPDIF_DEMUXER 1 +#define CONFIG_SRT_DEMUXER 1 +#define CONFIG_STR_DEMUXER 1 +#define CONFIG_STL_DEMUXER 1 +#define CONFIG_SUBVIEWER1_DEMUXER 1 +#define CONFIG_SUBVIEWER_DEMUXER 1 +#define CONFIG_SUP_DEMUXER 1 +#define CONFIG_SVAG_DEMUXER 1 +#define CONFIG_SWF_DEMUXER 1 +#define CONFIG_TAK_DEMUXER 1 +#define CONFIG_TEDCAPTIONS_DEMUXER 1 +#define CONFIG_THP_DEMUXER 1 +#define CONFIG_THREEDOSTR_DEMUXER 1 +#define CONFIG_TIERTEXSEQ_DEMUXER 1 +#define CONFIG_TMV_DEMUXER 1 +#define CONFIG_TRUEHD_DEMUXER 1 +#define CONFIG_TTA_DEMUXER 1 +#define CONFIG_TXD_DEMUXER 1 +#define CONFIG_TTY_DEMUXER 1 +#define CONFIG_TY_DEMUXER 1 +#define CONFIG_V210_DEMUXER 1 +#define CONFIG_V210X_DEMUXER 1 +#define CONFIG_VAG_DEMUXER 1 +#define CONFIG_VC1_DEMUXER 1 +#define CONFIG_VC1T_DEMUXER 1 +#define CONFIG_VIVIDAS_DEMUXER 1 +#define CONFIG_VIVO_DEMUXER 1 +#define CONFIG_VMD_DEMUXER 1 +#define CONFIG_VOBSUB_DEMUXER 1 +#define CONFIG_VOC_DEMUXER 1 +#define CONFIG_VPK_DEMUXER 1 +#define CONFIG_VPLAYER_DEMUXER 1 +#define CONFIG_VQF_DEMUXER 1 +#define CONFIG_W64_DEMUXER 1 +#define CONFIG_WAV_DEMUXER 1 +#define CONFIG_WC3_DEMUXER 1 +#define CONFIG_WEBM_DASH_MANIFEST_DEMUXER 1 +#define CONFIG_WEBVTT_DEMUXER 1 +#define CONFIG_WSAUD_DEMUXER 1 +#define CONFIG_WSD_DEMUXER 1 +#define CONFIG_WSVQA_DEMUXER 1 +#define CONFIG_WTV_DEMUXER 1 +#define CONFIG_WVE_DEMUXER 1 +#define CONFIG_WV_DEMUXER 1 +#define CONFIG_XA_DEMUXER 1 +#define CONFIG_XBIN_DEMUXER 1 +#define CONFIG_XMV_DEMUXER 1 +#define CONFIG_XVAG_DEMUXER 1 +#define CONFIG_XWMA_DEMUXER 1 +#define CONFIG_YOP_DEMUXER 1 +#define CONFIG_YUV4MPEGPIPE_DEMUXER 1 +#define CONFIG_IMAGE_BMP_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_DDS_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_DPX_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_EXR_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_GIF_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_J2K_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_JPEG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PAM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PBM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PCX_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PGMYUV_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PGM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PICTOR_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PNG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PPM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_PSD_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_QDRAW_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SGI_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SVG_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 1 +#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 1 +#define CONFIG_LIBGME_DEMUXER 0 +#define CONFIG_LIBMODPLUG_DEMUXER 0 +#define CONFIG_LIBOPENMPT_DEMUXER 0 +#define CONFIG_VAPOURSYNTH_DEMUXER 0 +#define CONFIG_A64_MUXER 1 +#define CONFIG_AC3_MUXER 1 +#define CONFIG_ADTS_MUXER 1 +#define CONFIG_ADX_MUXER 1 +#define CONFIG_AIFF_MUXER 1 +#define CONFIG_AMR_MUXER 1 +#define CONFIG_APNG_MUXER 1 +#define CONFIG_APTX_MUXER 1 +#define CONFIG_APTX_HD_MUXER 1 +#define CONFIG_ASF_MUXER 1 +#define CONFIG_ASS_MUXER 1 +#define CONFIG_AST_MUXER 1 +#define CONFIG_ASF_STREAM_MUXER 1 +#define CONFIG_AU_MUXER 1 +#define CONFIG_AVI_MUXER 1 +#define CONFIG_AVM2_MUXER 1 +#define CONFIG_AVS2_MUXER 1 +#define CONFIG_BIT_MUXER 1 +#define CONFIG_CAF_MUXER 1 +#define CONFIG_CAVSVIDEO_MUXER 1 +#define CONFIG_CODEC2_MUXER 1 +#define CONFIG_CODEC2RAW_MUXER 1 +#define CONFIG_CRC_MUXER 1 +#define CONFIG_DASH_MUXER 1 +#define CONFIG_DATA_MUXER 1 +#define CONFIG_DAUD_MUXER 1 +#define CONFIG_DIRAC_MUXER 1 +#define CONFIG_DNXHD_MUXER 1 +#define CONFIG_DTS_MUXER 1 +#define CONFIG_DV_MUXER 1 +#define CONFIG_EAC3_MUXER 1 +#define CONFIG_F4V_MUXER 1 +#define CONFIG_FFMETADATA_MUXER 1 +#define CONFIG_FIFO_MUXER 1 +#define CONFIG_FIFO_TEST_MUXER 1 +#define CONFIG_FILMSTRIP_MUXER 1 +#define CONFIG_FITS_MUXER 1 +#define CONFIG_FLAC_MUXER 1 +#define CONFIG_FLV_MUXER 1 +#define CONFIG_FRAMECRC_MUXER 1 +#define CONFIG_FRAMEHASH_MUXER 1 +#define CONFIG_FRAMEMD5_MUXER 1 +#define CONFIG_G722_MUXER 1 +#define CONFIG_G723_1_MUXER 1 +#define CONFIG_G726_MUXER 1 +#define CONFIG_G726LE_MUXER 1 +#define CONFIG_GIF_MUXER 1 +#define CONFIG_GSM_MUXER 1 +#define CONFIG_GXF_MUXER 1 +#define CONFIG_H261_MUXER 1 +#define CONFIG_H263_MUXER 1 +#define CONFIG_H264_MUXER 1 +#define CONFIG_HASH_MUXER 1 +#define CONFIG_HDS_MUXER 1 +#define CONFIG_HEVC_MUXER 1 +#define CONFIG_HLS_MUXER 1 +#define CONFIG_ICO_MUXER 1 +#define CONFIG_ILBC_MUXER 1 +#define CONFIG_IMAGE2_MUXER 1 +#define CONFIG_IMAGE2PIPE_MUXER 1 +#define CONFIG_IPOD_MUXER 1 +#define CONFIG_IRCAM_MUXER 1 +#define CONFIG_ISMV_MUXER 1 +#define CONFIG_IVF_MUXER 1 +#define CONFIG_JACOSUB_MUXER 1 +#define CONFIG_KVAG_MUXER 1 +#define CONFIG_LATM_MUXER 1 +#define CONFIG_LRC_MUXER 1 +#define CONFIG_M4V_MUXER 1 +#define CONFIG_MD5_MUXER 1 +#define CONFIG_MATROSKA_MUXER 1 +#define CONFIG_MATROSKA_AUDIO_MUXER 1 +#define CONFIG_MICRODVD_MUXER 1 +#define CONFIG_MJPEG_MUXER 1 +#define CONFIG_MLP_MUXER 1 +#define CONFIG_MMF_MUXER 1 +#define CONFIG_MOV_MUXER 1 +#define CONFIG_MP2_MUXER 1 +#define CONFIG_MP3_MUXER 1 +#define CONFIG_MP4_MUXER 1 +#define CONFIG_MPEG1SYSTEM_MUXER 1 +#define CONFIG_MPEG1VCD_MUXER 1 +#define CONFIG_MPEG1VIDEO_MUXER 1 +#define CONFIG_MPEG2DVD_MUXER 1 +#define CONFIG_MPEG2SVCD_MUXER 1 +#define CONFIG_MPEG2VIDEO_MUXER 1 +#define CONFIG_MPEG2VOB_MUXER 1 +#define CONFIG_MPEGTS_MUXER 1 +#define CONFIG_MPJPEG_MUXER 1 +#define CONFIG_MXF_MUXER 1 +#define CONFIG_MXF_D10_MUXER 1 +#define CONFIG_MXF_OPATOM_MUXER 1 +#define CONFIG_NULL_MUXER 1 +#define CONFIG_NUT_MUXER 1 +#define CONFIG_OGA_MUXER 1 +#define CONFIG_OGG_MUXER 1 +#define CONFIG_OGV_MUXER 1 +#define CONFIG_OMA_MUXER 1 +#define CONFIG_OPUS_MUXER 1 +#define CONFIG_PCM_ALAW_MUXER 1 +#define CONFIG_PCM_MULAW_MUXER 1 +#define CONFIG_PCM_VIDC_MUXER 1 +#define CONFIG_PCM_F64BE_MUXER 1 +#define CONFIG_PCM_F64LE_MUXER 1 +#define CONFIG_PCM_F32BE_MUXER 1 +#define CONFIG_PCM_F32LE_MUXER 1 +#define CONFIG_PCM_S32BE_MUXER 1 +#define CONFIG_PCM_S32LE_MUXER 1 +#define CONFIG_PCM_S24BE_MUXER 1 +#define CONFIG_PCM_S24LE_MUXER 1 +#define CONFIG_PCM_S16BE_MUXER 1 +#define CONFIG_PCM_S16LE_MUXER 1 +#define CONFIG_PCM_S8_MUXER 1 +#define CONFIG_PCM_U32BE_MUXER 1 +#define CONFIG_PCM_U32LE_MUXER 1 +#define CONFIG_PCM_U24BE_MUXER 1 +#define CONFIG_PCM_U24LE_MUXER 1 +#define CONFIG_PCM_U16BE_MUXER 1 +#define CONFIG_PCM_U16LE_MUXER 1 +#define CONFIG_PCM_U8_MUXER 1 +#define CONFIG_PSP_MUXER 1 +#define CONFIG_RAWVIDEO_MUXER 1 +#define CONFIG_RM_MUXER 1 +#define CONFIG_ROQ_MUXER 1 +#define CONFIG_RSO_MUXER 1 +#define CONFIG_RTP_MUXER 1 +#define CONFIG_RTP_MPEGTS_MUXER 1 +#define CONFIG_RTSP_MUXER 1 +#define CONFIG_SAP_MUXER 1 +#define CONFIG_SBC_MUXER 1 +#define CONFIG_SCC_MUXER 1 +#define CONFIG_SEGAFILM_MUXER 1 +#define CONFIG_SEGMENT_MUXER 1 +#define CONFIG_STREAM_SEGMENT_MUXER 1 +#define CONFIG_SINGLEJPEG_MUXER 1 +#define CONFIG_SMJPEG_MUXER 1 +#define CONFIG_SMOOTHSTREAMING_MUXER 1 +#define CONFIG_SOX_MUXER 1 +#define CONFIG_SPX_MUXER 1 +#define CONFIG_SPDIF_MUXER 1 +#define CONFIG_SRT_MUXER 1 +#define CONFIG_STREAMHASH_MUXER 1 +#define CONFIG_SUP_MUXER 1 +#define CONFIG_SWF_MUXER 1 +#define CONFIG_TEE_MUXER 1 +#define CONFIG_TG2_MUXER 1 +#define CONFIG_TGP_MUXER 1 +#define CONFIG_MKVTIMESTAMP_V2_MUXER 1 +#define CONFIG_TRUEHD_MUXER 1 +#define CONFIG_TTA_MUXER 1 +#define CONFIG_UNCODEDFRAMECRC_MUXER 1 +#define CONFIG_VC1_MUXER 1 +#define CONFIG_VC1T_MUXER 1 +#define CONFIG_VOC_MUXER 1 +#define CONFIG_W64_MUXER 1 +#define CONFIG_WAV_MUXER 1 +#define CONFIG_WEBM_MUXER 1 +#define CONFIG_WEBM_DASH_MANIFEST_MUXER 1 +#define CONFIG_WEBM_CHUNK_MUXER 1 +#define CONFIG_WEBP_MUXER 1 +#define CONFIG_WEBVTT_MUXER 1 +#define CONFIG_WTV_MUXER 1 +#define CONFIG_WV_MUXER 1 +#define CONFIG_YUV4MPEGPIPE_MUXER 1 +#define CONFIG_CHROMAPRINT_MUXER 0 +#define CONFIG_ASYNC_PROTOCOL 1 +#define CONFIG_BLURAY_PROTOCOL 0 +#define CONFIG_CACHE_PROTOCOL 1 +#define CONFIG_CONCAT_PROTOCOL 1 +#define CONFIG_CRYPTO_PROTOCOL 1 +#define CONFIG_DATA_PROTOCOL 1 +#define CONFIG_FFRTMPCRYPT_PROTOCOL 1 +#define CONFIG_FFRTMPHTTP_PROTOCOL 1 +#define CONFIG_FILE_PROTOCOL 1 +#define CONFIG_FTP_PROTOCOL 1 +#define CONFIG_GOPHER_PROTOCOL 1 +#define CONFIG_HLS_PROTOCOL 1 +#define CONFIG_HTTP_PROTOCOL 1 +#define CONFIG_HTTPPROXY_PROTOCOL 1 +#define CONFIG_HTTPS_PROTOCOL 1 +#define CONFIG_ICECAST_PROTOCOL 1 +#define CONFIG_MMSH_PROTOCOL 1 +#define CONFIG_MMST_PROTOCOL 1 +#define CONFIG_MD5_PROTOCOL 1 +#define CONFIG_PIPE_PROTOCOL 1 +#define CONFIG_PROMPEG_PROTOCOL 1 +#define CONFIG_RTMP_PROTOCOL 1 +#define CONFIG_RTMPE_PROTOCOL 1 +#define CONFIG_RTMPS_PROTOCOL 1 +#define CONFIG_RTMPT_PROTOCOL 1 +#define CONFIG_RTMPTE_PROTOCOL 1 +#define CONFIG_RTMPTS_PROTOCOL 1 +#define CONFIG_RTP_PROTOCOL 1 +#define CONFIG_SCTP_PROTOCOL 0 +#define CONFIG_SRTP_PROTOCOL 1 +#define CONFIG_SUBFILE_PROTOCOL 1 +#define CONFIG_TEE_PROTOCOL 1 +#define CONFIG_TCP_PROTOCOL 1 +#define CONFIG_TLS_PROTOCOL 1 +#define CONFIG_UDP_PROTOCOL 1 +#define CONFIG_UDPLITE_PROTOCOL 1 +#define CONFIG_UNIX_PROTOCOL 1 +#define CONFIG_LIBAMQP_PROTOCOL 0 +#define CONFIG_LIBRTMP_PROTOCOL 0 +#define CONFIG_LIBRTMPE_PROTOCOL 0 +#define CONFIG_LIBRTMPS_PROTOCOL 0 +#define CONFIG_LIBRTMPT_PROTOCOL 0 +#define CONFIG_LIBRTMPTE_PROTOCOL 0 +#define CONFIG_LIBSRT_PROTOCOL 0 +#define CONFIG_LIBSSH_PROTOCOL 0 +#define CONFIG_LIBSMBCLIENT_PROTOCOL 0 +#define CONFIG_LIBZMQ_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/cmdutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/cmdutils.h new file mode 100644 index 00000000..19175105 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/cmdutils.h @@ -0,0 +1,648 @@ +/* + * Various utilities for command line tools + * copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef FFTOOLS_CMDUTILS_H +#define FFTOOLS_CMDUTILS_H + +#include + +#include "config.h" +#include "libavcodec/avcodec.h" +#include "libavfilter/avfilter.h" +#include "libavformat/avformat.h" +#include "libswscale/swscale.h" + +#ifdef _WIN32 +#undef main /* We don't want SDL to override our main() */ +#endif + +/** + * program name, defined by the program for show_version(). + */ +extern const char program_name[]; + +/** + * program birth year, defined by the program for show_banner() + */ +extern const int program_birth_year; + +extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; +extern AVFormatContext *avformat_opts; +extern AVDictionary *sws_dict; +extern AVDictionary *swr_opts; +extern AVDictionary *format_opts, *codec_opts, *resample_opts; +extern int hide_banner; + +/** + * Register a program-specific cleanup routine. + */ +void register_exit(void (*cb)(int ret)); + +/** + * Wraps exit with a program-specific cleanup routine. + */ +void exit_program(int ret) av_noreturn; + +/** + * Initialize dynamic library loading + */ +void init_dynload(void); + +/** + * Initialize the cmdutils option system, in particular + * allocate the *_opts contexts. + */ +void init_opts(void); +/** + * Uninitialize the cmdutils option system, in particular + * free the *_opts contexts and their contents. + */ +void uninit_opts(void); + +/** + * Trivial log callback. + * Only suitable for opt_help and similar since it lacks prefix handling. + */ +void log_callback_help(void* ptr, int level, const char* fmt, va_list vl); + +/** + * Override the cpuflags. + */ +int opt_cpuflags(void *optctx, const char *opt, const char *arg); + +/** + * Fallback for options that are not explicitly handled, these will be + * parsed through AVOptions. + */ +int opt_default(void *optctx, const char *opt, const char *arg); + +/** + * Set the libav* libraries log level. + */ +int opt_loglevel(void *optctx, const char *opt, const char *arg); + +int opt_report(void *optctx, const char *opt, const char *arg); + +int opt_max_alloc(void *optctx, const char *opt, const char *arg); + +int opt_codec_debug(void *optctx, const char *opt, const char *arg); + +/** + * Limit the execution time. + */ +int opt_timelimit(void *optctx, const char *opt, const char *arg); + +/** + * Parse a string and return its corresponding value as a double. + * Exit from the application if the string cannot be correctly + * parsed or the corresponding value is invalid. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param numstr the string to be parsed + * @param type the type (OPT_INT64 or OPT_FLOAT) as which the + * string should be parsed + * @param min the minimum valid accepted value + * @param max the maximum valid accepted value + */ +double parse_number_or_die(const char *context, const char *numstr, int type, + double min, double max); + +/** + * Parse a string specifying a time and return its corresponding + * value as a number of microseconds. Exit from the application if + * the string cannot be correctly parsed. + * + * @param context the context of the value to be set (e.g. the + * corresponding command line option name) + * @param timestr the string to be parsed + * @param is_duration a flag which tells how to interpret timestr, if + * not zero timestr is interpreted as a duration, otherwise as a + * date + * + * @see av_parse_time() + */ +int64_t parse_time_or_die(const char *context, const char *timestr, + int is_duration); + +typedef struct SpecifierOpt { + char *specifier; /**< stream/chapter/program/... specifier */ + union { + uint8_t *str; + int i; + int64_t i64; + uint64_t ui64; + float f; + double dbl; + } u; +} SpecifierOpt; + +typedef struct OptionDef { + const char *name; + int flags; +#define HAS_ARG 0x0001 +#define OPT_BOOL 0x0002 +#define OPT_EXPERT 0x0004 +#define OPT_STRING 0x0008 +#define OPT_VIDEO 0x0010 +#define OPT_AUDIO 0x0020 +#define OPT_INT 0x0080 +#define OPT_FLOAT 0x0100 +#define OPT_SUBTITLE 0x0200 +#define OPT_INT64 0x0400 +#define OPT_EXIT 0x0800 +#define OPT_DATA 0x1000 +#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only). + implied by OPT_OFFSET or OPT_SPEC */ +#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ +#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. + Implies OPT_OFFSET. Next element after the offset is + an int containing element count in the array. */ +#define OPT_TIME 0x10000 +#define OPT_DOUBLE 0x20000 +#define OPT_INPUT 0x40000 +#define OPT_OUTPUT 0x80000 + union { + void *dst_ptr; + int (*func_arg)(void *, const char *, const char *); + size_t off; + } u; + const char *help; + const char *argname; +} OptionDef; + +/** + * Print help for all options matching specified flags. + * + * @param options a list of options + * @param msg title of this group. Only printed if at least one option matches. + * @param req_flags print only options which have all those flags set. + * @param rej_flags don't print options which have any of those flags set. + * @param alt_flags print only options that have at least one of those flags set + */ +void show_help_options(const OptionDef *options, const char *msg, int req_flags, + int rej_flags, int alt_flags); + +#if CONFIG_AVDEVICE +#define CMDUTILS_COMMON_OPTIONS_AVDEVICE \ + { "sources" , OPT_EXIT | HAS_ARG, { .func_arg = show_sources }, \ + "list sources of the input device", "device" }, \ + { "sinks" , OPT_EXIT | HAS_ARG, { .func_arg = show_sinks }, \ + "list sinks of the output device", "device" }, \ + +#else +#define CMDUTILS_COMMON_OPTIONS_AVDEVICE +#endif + +#define CMDUTILS_COMMON_OPTIONS \ + { "L", OPT_EXIT, { .func_arg = show_license }, "show license" }, \ + { "h", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "?", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "-help", OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \ + { "version", OPT_EXIT, { .func_arg = show_version }, "show version" }, \ + { "buildconf", OPT_EXIT, { .func_arg = show_buildconf }, "show build configuration" }, \ + { "formats", OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \ + { "muxers", OPT_EXIT, { .func_arg = show_muxers }, "show available muxers" }, \ + { "demuxers", OPT_EXIT, { .func_arg = show_demuxers }, "show available demuxers" }, \ + { "devices", OPT_EXIT, { .func_arg = show_devices }, "show available devices" }, \ + { "codecs", OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \ + { "decoders", OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \ + { "encoders", OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \ + { "bsfs", OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \ + { "protocols", OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \ + { "filters", OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \ + { "pix_fmts", OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \ + { "layouts", OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \ + { "sample_fmts", OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \ + { "colors", OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \ + { "loglevel", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ + { "v", HAS_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \ + { "report", 0, { .func_arg = opt_report }, "generate a report" }, \ + { "max_alloc", HAS_ARG, { .func_arg = opt_max_alloc }, "set maximum size of a single allocated block", "bytes" }, \ + { "cpuflags", HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" }, \ + { "hide_banner", OPT_BOOL | OPT_EXPERT, {&hide_banner}, "do not show program banner", "hide_banner" }, \ + CMDUTILS_COMMON_OPTIONS_AVDEVICE \ + +/** + * Show help for all options with given flags in class and all its + * children. + */ +void show_help_children(const AVClass *class, int flags); + +/** + * Per-fftool specific help handler. Implemented in each + * fftool, called by show_help(). + */ +void show_help_default(const char *opt, const char *arg); + +/** + * Generic -h handler common to all fftools. + */ +int show_help(void *optctx, const char *opt, const char *arg); + +/** + * Parse the command line arguments. + * + * @param optctx an opaque options context + * @param argc number of command line arguments + * @param argv values of command line arguments + * @param options Array with the definitions required to interpret every + * option of the form: -option_name [argument] + * @param parse_arg_function Name of the function called to process every + * argument without a leading option name flag. NULL if such arguments do + * not have to be processed. + */ +void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + void (* parse_arg_function)(void *optctx, const char*)); + +/** + * Parse one given option. + * + * @return on success 1 if arg was consumed, 0 otherwise; negative number on error + */ +int parse_option(void *optctx, const char *opt, const char *arg, + const OptionDef *options); + +/** + * An option extracted from the commandline. + * Cannot use AVDictionary because of options like -map which can be + * used multiple times. + */ +typedef struct Option { + const OptionDef *opt; + const char *key; + const char *val; +} Option; + +typedef struct OptionGroupDef { + /**< group name */ + const char *name; + /** + * Option to be used as group separator. Can be NULL for groups which + * are terminated by a non-option argument (e.g. ffmpeg output files) + */ + const char *sep; + /** + * Option flags that must be set on each option that is + * applied to this group + */ + int flags; +} OptionGroupDef; + +typedef struct OptionGroup { + const OptionGroupDef *group_def; + const char *arg; + + Option *opts; + int nb_opts; + + AVDictionary *codec_opts; + AVDictionary *format_opts; + AVDictionary *resample_opts; + AVDictionary *sws_dict; + AVDictionary *swr_opts; +} OptionGroup; + +/** + * A list of option groups that all have the same group type + * (e.g. input files or output files) + */ +typedef struct OptionGroupList { + const OptionGroupDef *group_def; + + OptionGroup *groups; + int nb_groups; +} OptionGroupList; + +typedef struct OptionParseContext { + OptionGroup global_opts; + + OptionGroupList *groups; + int nb_groups; + + /* parsing state */ + OptionGroup cur_group; +} OptionParseContext; + +/** + * Parse an options group and write results into optctx. + * + * @param optctx an app-specific options context. NULL for global options group + */ +int parse_optgroup(void *optctx, OptionGroup *g); + +/** + * Split the commandline into an intermediate form convenient for further + * processing. + * + * The commandline is assumed to be composed of options which either belong to a + * group (those with OPT_SPEC, OPT_OFFSET or OPT_PERFILE) or are global + * (everything else). + * + * A group (defined by an OptionGroupDef struct) is a sequence of options + * terminated by either a group separator option (e.g. -i) or a parameter that + * is not an option (doesn't start with -). A group without a separator option + * must always be first in the supplied groups list. + * + * All options within the same group are stored in one OptionGroup struct in an + * OptionGroupList, all groups with the same group definition are stored in one + * OptionGroupList in OptionParseContext.groups. The order of group lists is the + * same as the order of group definitions. + */ +int split_commandline(OptionParseContext *octx, int argc, char *argv[], + const OptionDef *options, + const OptionGroupDef *groups, int nb_groups); + +/** + * Free all allocated memory in an OptionParseContext. + */ +void uninit_parse_context(OptionParseContext *octx); + +/** + * Find the '-loglevel' option in the command line args and apply it. + */ +void parse_loglevel(int argc, char **argv, const OptionDef *options); + +/** + * Return index of option opt in argv or 0 if not found. + */ +int locate_option(int argc, char **argv, const OptionDef *options, + const char *optname); + +/** + * Check if the given stream matches a stream specifier. + * + * @param s Corresponding format context. + * @param st Stream from s to be checked. + * @param spec A stream specifier of the [v|a|s|d]:[\] form. + * + * @return 1 if the stream matches, 0 if it doesn't, <0 on error + */ +int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); + +/** + * Filter out options for given codec. + * + * Create a new options dictionary containing only the options from + * opts which apply to the codec with ID codec_id. + * + * @param opts dictionary to place options in + * @param codec_id ID of the codec that should be filtered for + * @param s Corresponding format context. + * @param st A stream from s for which the options should be filtered. + * @param codec The particular codec for which the options should be filtered. + * If null, the default one is looked up according to the codec id. + * @return a pointer to the created dictionary + */ +AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, AVCodec *codec); + +/** + * Setup AVCodecContext options for avformat_find_stream_info(). + * + * Create an array of dictionaries, one dictionary for each stream + * contained in s. + * Each dictionary will contain the options from codec_opts which can + * be applied to the corresponding stream codec context. + * + * @return pointer to the created array of dictionaries, NULL if it + * cannot be created + */ +AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts); + +/** + * Print an error message to stderr, indicating filename and a human + * readable description of the error code err. + * + * If strerror_r() is not available the use of this function in a + * multithreaded application may be unsafe. + * + * @see av_strerror() + */ +void print_error(const char *filename, int err); + +/** + * Print the program banner to stderr. The banner contents depend on the + * current version of the repository and of the libav* libraries used by + * the program. + */ +void show_banner(int argc, char **argv, const OptionDef *options); + +/** + * Print the version of the program to stdout. The version message + * depends on the current versions of the repository and of the libav* + * libraries. + * This option processing function does not utilize the arguments. + */ +int show_version(void *optctx, const char *opt, const char *arg); + +/** + * Print the build configuration of the program to stdout. The contents + * depend on the definition of FFMPEG_CONFIGURATION. + * This option processing function does not utilize the arguments. + */ +int show_buildconf(void *optctx, const char *opt, const char *arg); + +/** + * Print the license of the program to stdout. The license depends on + * the license of the libraries compiled into the program. + * This option processing function does not utilize the arguments. + */ +int show_license(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the formats supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_formats(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the muxers supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_muxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the demuxer supported by the + * program (including devices). + * This option processing function does not utilize the arguments. + */ +int show_demuxers(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the devices supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_devices(void *optctx, const char *opt, const char *arg); + +#if CONFIG_AVDEVICE +/** + * Print a listing containing autodetected sinks of the output device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sinks(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing autodetected sources of the input device. + * Device name with options may be passed as an argument to limit results. + */ +int show_sources(void *optctx, const char *opt, const char *arg); +#endif + +/** + * Print a listing containing all the codecs supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_codecs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the decoders supported by the + * program. + */ +int show_decoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the encoders supported by the + * program. + */ +int show_encoders(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_filters(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the bit stream filters supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_bsfs(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the protocols supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_protocols(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the pixel formats supported by the + * program. + * This option processing function does not utilize the arguments. + */ +int show_pix_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the standard channel layouts supported by + * the program. + * This option processing function does not utilize the arguments. + */ +int show_layouts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the sample formats supported by the + * program. + */ +int show_sample_fmts(void *optctx, const char *opt, const char *arg); + +/** + * Print a listing containing all the color names and values recognized + * by the program. + */ +int show_colors(void *optctx, const char *opt, const char *arg); + +/** + * Return a positive value if a line read from standard input + * starts with [yY], otherwise return 0. + */ +int read_yesno(void); + +/** + * Get a file corresponding to a preset file. + * + * If is_path is non-zero, look for the file in the path preset_name. + * Otherwise search for a file named arg.ffpreset in the directories + * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined + * at configuration time or in a "ffpresets" folder along the executable + * on win32, in that order. If no such file is found and + * codec_name is defined, then search for a file named + * codec_name-preset_name.avpreset in the above-mentioned directories. + * + * @param filename buffer where the name of the found filename is written + * @param filename_size size in bytes of the filename buffer + * @param preset_name name of the preset to search + * @param is_path tell if preset_name is a filename path + * @param codec_name name of the codec for which to look for the + * preset, may be NULL + */ +FILE *get_preset_file(char *filename, size_t filename_size, + const char *preset_name, int is_path, const char *codec_name); + +/** + * Realloc array to hold new_size elements of elem_size. + * Calls exit() on failure. + * + * @param array array to reallocate + * @param elem_size size in bytes of each element + * @param size new element count will be written here + * @param new_size number of elements to place in reallocated array + * @return reallocated array + */ +void *grow_array(void *array, int elem_size, int *size, int new_size); + +#define media_type_string av_get_media_type_string + +#define GROW_ARRAY(array, nb_elems)\ + array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) + +#define GET_PIX_FMT_NAME(pix_fmt)\ + const char *name = av_get_pix_fmt_name(pix_fmt); + +#define GET_CODEC_NAME(id)\ + const char *name = avcodec_descriptor_get(id)->name; + +#define GET_SAMPLE_FMT_NAME(sample_fmt)\ + const char *name = av_get_sample_fmt_name(sample_fmt) + +#define GET_SAMPLE_RATE_NAME(rate)\ + char name[16];\ + snprintf(name, sizeof(name), "%d", rate); + +#define GET_CH_LAYOUT_NAME(ch_layout)\ + char name[16];\ + snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); + +#define GET_CH_LAYOUT_DESC(ch_layout)\ + char name[128];\ + av_get_channel_layout_string(name, sizeof(name), 0, ch_layout); + +double get_rotation(AVStream *st); + +#endif /* FFTOOLS_CMDUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/ffmpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/ffmpeg.h new file mode 100644 index 00000000..828cb2a4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/fftools/ffmpeg.h @@ -0,0 +1,667 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef FFTOOLS_FFMPEG_H +#define FFTOOLS_FFMPEG_H + +#include "config.h" + +#include +#include +#include + +#include "cmdutils.h" + +#include "libavformat/avformat.h" +#include "libavformat/avio.h" + +#include "libavcodec/avcodec.h" + +#include "libavfilter/avfilter.h" + +#include "libavutil/avutil.h" +#include "libavutil/dict.h" +#include "libavutil/eval.h" +#include "libavutil/fifo.h" +#include "libavutil/hwcontext.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "libavutil/thread.h" +#include "libavutil/threadmessage.h" + +#include "libswresample/swresample.h" + +#define VSYNC_AUTO -1 +#define VSYNC_PASSTHROUGH 0 +#define VSYNC_CFR 1 +#define VSYNC_VFR 2 +#define VSYNC_VSCFR 0xfe +#define VSYNC_DROP 0xff + +#define MAX_STREAMS 1024 /* arbitrary sanity check value */ + +enum HWAccelID { + HWACCEL_NONE = 0, + HWACCEL_AUTO, + HWACCEL_GENERIC, + HWACCEL_VIDEOTOOLBOX, + HWACCEL_QSV, +}; + +typedef struct HWAccel { + const char *name; + int (*init)(AVCodecContext *s); + enum HWAccelID id; + enum AVPixelFormat pix_fmt; +} HWAccel; + +typedef struct HWDevice { + const char *name; + enum AVHWDeviceType type; + AVBufferRef *device_ref; +} HWDevice; + +/* select an input stream for an output stream */ +typedef struct StreamMap { + int disabled; /* 1 is this mapping is disabled by a negative map */ + int file_index; + int stream_index; + int sync_file_index; + int sync_stream_index; + char *linklabel; /* name of an output link, for mapping lavfi outputs */ +} StreamMap; + +typedef struct { + int file_idx, stream_idx, channel_idx; // input + int ofile_idx, ostream_idx; // output +} AudioChannelMap; + +typedef struct OptionsContext { + OptionGroup *g; + + /* input/output options */ + int64_t start_time; + int64_t start_time_eof; + int seek_timestamp; + const char *format; + + SpecifierOpt *codec_names; + int nb_codec_names; + SpecifierOpt *audio_channels; + int nb_audio_channels; + SpecifierOpt *audio_sample_rate; + int nb_audio_sample_rate; + SpecifierOpt *frame_rates; + int nb_frame_rates; + SpecifierOpt *frame_sizes; + int nb_frame_sizes; + SpecifierOpt *frame_pix_fmts; + int nb_frame_pix_fmts; + + /* input options */ + int64_t input_ts_offset; + int loop; + int rate_emu; + int accurate_seek; + int thread_queue_size; + + SpecifierOpt *ts_scale; + int nb_ts_scale; + SpecifierOpt *dump_attachment; + int nb_dump_attachment; + SpecifierOpt *hwaccels; + int nb_hwaccels; + SpecifierOpt *hwaccel_devices; + int nb_hwaccel_devices; + SpecifierOpt *hwaccel_output_formats; + int nb_hwaccel_output_formats; + SpecifierOpt *autorotate; + int nb_autorotate; + + /* output options */ + StreamMap *stream_maps; + int nb_stream_maps; + AudioChannelMap *audio_channel_maps; /* one info entry per -map_channel */ + int nb_audio_channel_maps; /* number of (valid) -map_channel settings */ + int metadata_global_manual; + int metadata_streams_manual; + int metadata_chapters_manual; + const char **attachments; + int nb_attachments; + + int chapters_input_file; + + int64_t recording_time; + int64_t stop_time; + uint64_t limit_filesize; + float mux_preload; + float mux_max_delay; + int shortest; + int bitexact; + + int video_disable; + int audio_disable; + int subtitle_disable; + int data_disable; + + /* indexed by output file stream index */ + int *streamid_map; + int nb_streamid_map; + + SpecifierOpt *metadata; + int nb_metadata; + SpecifierOpt *max_frames; + int nb_max_frames; + SpecifierOpt *bitstream_filters; + int nb_bitstream_filters; + SpecifierOpt *codec_tags; + int nb_codec_tags; + SpecifierOpt *sample_fmts; + int nb_sample_fmts; + SpecifierOpt *qscale; + int nb_qscale; + SpecifierOpt *forced_key_frames; + int nb_forced_key_frames; + SpecifierOpt *force_fps; + int nb_force_fps; + SpecifierOpt *frame_aspect_ratios; + int nb_frame_aspect_ratios; + SpecifierOpt *rc_overrides; + int nb_rc_overrides; + SpecifierOpt *intra_matrices; + int nb_intra_matrices; + SpecifierOpt *inter_matrices; + int nb_inter_matrices; + SpecifierOpt *chroma_intra_matrices; + int nb_chroma_intra_matrices; + SpecifierOpt *top_field_first; + int nb_top_field_first; + SpecifierOpt *metadata_map; + int nb_metadata_map; + SpecifierOpt *presets; + int nb_presets; + SpecifierOpt *copy_initial_nonkeyframes; + int nb_copy_initial_nonkeyframes; + SpecifierOpt *copy_prior_start; + int nb_copy_prior_start; + SpecifierOpt *filters; + int nb_filters; + SpecifierOpt *filter_scripts; + int nb_filter_scripts; + SpecifierOpt *reinit_filters; + int nb_reinit_filters; + SpecifierOpt *fix_sub_duration; + int nb_fix_sub_duration; + SpecifierOpt *canvas_sizes; + int nb_canvas_sizes; + SpecifierOpt *pass; + int nb_pass; + SpecifierOpt *passlogfiles; + int nb_passlogfiles; + SpecifierOpt *max_muxing_queue_size; + int nb_max_muxing_queue_size; + SpecifierOpt *guess_layout_max; + int nb_guess_layout_max; + SpecifierOpt *apad; + int nb_apad; + SpecifierOpt *discard; + int nb_discard; + SpecifierOpt *disposition; + int nb_disposition; + SpecifierOpt *program; + int nb_program; + SpecifierOpt *time_bases; + int nb_time_bases; + SpecifierOpt *enc_time_bases; + int nb_enc_time_bases; +} OptionsContext; + +typedef struct InputFilter { + AVFilterContext *filter; + struct InputStream *ist; + struct FilterGraph *graph; + uint8_t *name; + enum AVMediaType type; // AVMEDIA_TYPE_SUBTITLE for sub2video + + AVFifoBuffer *frame_queue; + + // parameters configured for this input + int format; + + int width, height; + AVRational sample_aspect_ratio; + + int sample_rate; + int channels; + uint64_t channel_layout; + + AVBufferRef *hw_frames_ctx; + + int eof; +} InputFilter; + +typedef struct OutputFilter { + AVFilterContext *filter; + struct OutputStream *ost; + struct FilterGraph *graph; + uint8_t *name; + + /* temporary storage until stream maps are processed */ + AVFilterInOut *out_tmp; + enum AVMediaType type; + + /* desired output stream properties */ + int width, height; + AVRational frame_rate; + int format; + int sample_rate; + uint64_t channel_layout; + + // those are only set if no format is specified and the encoder gives us multiple options + int *formats; + uint64_t *channel_layouts; + int *sample_rates; +} OutputFilter; + +typedef struct FilterGraph { + int index; + const char *graph_desc; + + AVFilterGraph *graph; + int reconfiguration; + + InputFilter **inputs; + int nb_inputs; + OutputFilter **outputs; + int nb_outputs; +} FilterGraph; + +typedef struct InputStream { + int file_index; + AVStream *st; + int discard; /* true if stream data should be discarded */ + int user_set_discard; + int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ +#define DECODING_FOR_OST 1 +#define DECODING_FOR_FILTER 2 + + AVCodecContext *dec_ctx; + AVCodec *dec; + AVFrame *decoded_frame; + AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */ + + int64_t start; /* time when read started */ + /* predicted dts of the next packet read for this stream or (when there are + * several frames in a packet) of the next frame in current packet (in AV_TIME_BASE units) */ + int64_t next_dts; + int64_t dts; ///< dts of the last packet read for this stream (in AV_TIME_BASE units) + + int64_t next_pts; ///< synthetic pts for the next decode frame (in AV_TIME_BASE units) + int64_t pts; ///< current pts of the decoded frame (in AV_TIME_BASE units) + int wrap_correction_done; + + int64_t filter_in_rescale_delta_last; + + int64_t min_pts; /* pts with the smallest value in a current stream */ + int64_t max_pts; /* pts with the higher value in a current stream */ + + // when forcing constant input framerate through -r, + // this contains the pts that will be given to the next decoded frame + int64_t cfr_next_pts; + + int64_t nb_samples; /* number of samples in the last decoded audio frame before looping */ + + double ts_scale; + int saw_first_ts; + AVDictionary *decoder_opts; + AVRational framerate; /* framerate forced with -r */ + int top_field_first; + int guess_layout_max; + + int autorotate; + + int fix_sub_duration; + struct { /* previous decoded subtitle and related variables */ + int got_output; + int ret; + AVSubtitle subtitle; + } prev_sub; + + struct sub2video { + int64_t last_pts; + int64_t end_pts; + AVFifoBuffer *sub_queue; ///< queue of AVSubtitle* before filter init + AVFrame *frame; + int w, h; + unsigned int initialize; ///< marks if sub2video_update should force an initialization + } sub2video; + + int dr1; + + /* decoded data from this stream goes into all those filters + * currently video and audio only */ + InputFilter **filters; + int nb_filters; + + int reinit_filters; + + /* hwaccel options */ + enum HWAccelID hwaccel_id; + enum AVHWDeviceType hwaccel_device_type; + char *hwaccel_device; + enum AVPixelFormat hwaccel_output_format; + + /* hwaccel context */ + void *hwaccel_ctx; + void (*hwaccel_uninit)(AVCodecContext *s); + int (*hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags); + int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame); + enum AVPixelFormat hwaccel_pix_fmt; + enum AVPixelFormat hwaccel_retrieved_pix_fmt; + AVBufferRef *hw_frames_ctx; + + /* stats */ + // combined size of all the packets read + uint64_t data_size; + /* number of packets successfully read for this stream */ + uint64_t nb_packets; + // number of frames/samples retrieved from the decoder + uint64_t frames_decoded; + uint64_t samples_decoded; + + int64_t *dts_buffer; + int nb_dts_buffer; + + int got_output; +} InputStream; + +typedef struct InputFile { + AVFormatContext *ctx; + int eof_reached; /* true if eof reached */ + int eagain; /* true if last read attempt returned EAGAIN */ + int ist_index; /* index of first stream in input_streams */ + int loop; /* set number of times input stream should be looped */ + int64_t duration; /* actual duration of the longest stream in a file + at the moment when looping happens */ + AVRational time_base; /* time base of the duration */ + int64_t input_ts_offset; + + int64_t ts_offset; + int64_t last_ts; + int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */ + int seek_timestamp; + int64_t recording_time; + int nb_streams; /* number of stream that ffmpeg is aware of; may be different + from ctx.nb_streams if new streams appear during av_read_frame() */ + int nb_streams_warn; /* number of streams that the user was warned of */ + int rate_emu; + int accurate_seek; + +#if HAVE_THREADS + AVThreadMessageQueue *in_thread_queue; + pthread_t thread; /* thread reading from this file */ + int non_blocking; /* reading packets from the thread should not block */ + int joined; /* the thread has been joined */ + int thread_queue_size; /* maximum number of queued packets */ +#endif +} InputFile; + +enum forced_keyframes_const { + FKF_N, + FKF_N_FORCED, + FKF_PREV_FORCED_N, + FKF_PREV_FORCED_T, + FKF_T, + FKF_NB +}; + +#define ABORT_ON_FLAG_EMPTY_OUTPUT (1 << 0) +#define ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM (1 << 1) + +extern const char *const forced_keyframes_const_names[]; + +typedef enum { + ENCODER_FINISHED = 1, + MUXER_FINISHED = 2, +} OSTFinished ; + +typedef struct OutputStream { + int file_index; /* file index */ + int index; /* stream index in the output file */ + int source_index; /* InputStream index */ + AVStream *st; /* stream in the output file */ + int encoding_needed; /* true if encoding needed for this stream */ + int frame_number; + /* input pts and corresponding output pts + for A/V sync */ + struct InputStream *sync_ist; /* input stream to sync against */ + int64_t sync_opts; /* output frame counter, could be changed to some true timestamp */ // FIXME look at frame_number + /* pts of the first frame encoded for this stream, used for limiting + * recording time */ + int64_t first_pts; + /* dts of the last packet sent to the muxer */ + int64_t last_mux_dts; + // the timebase of the packets sent to the muxer + AVRational mux_timebase; + AVRational enc_timebase; + + AVBSFContext *bsf_ctx; + + AVCodecContext *enc_ctx; + AVCodecParameters *ref_par; /* associated input codec parameters with encoders options applied */ + AVCodec *enc; + int64_t max_frames; + AVFrame *filtered_frame; + AVFrame *last_frame; + int last_dropped; + int last_nb0_frames[3]; + + void *hwaccel_ctx; + + /* video only */ + AVRational frame_rate; + int is_cfr; + int force_fps; + int top_field_first; + int rotate_overridden; + double rotate_override_value; + + AVRational frame_aspect_ratio; + + /* forced key frames */ + int64_t forced_kf_ref_pts; + int64_t *forced_kf_pts; + int forced_kf_count; + int forced_kf_index; + char *forced_keyframes; + AVExpr *forced_keyframes_pexpr; + double forced_keyframes_expr_const_values[FKF_NB]; + + /* audio only */ + int *audio_channels_map; /* list of the channels id to pick from the source stream */ + int audio_channels_mapped; /* number of channels in audio_channels_map */ + + char *logfile_prefix; + FILE *logfile; + + OutputFilter *filter; + char *avfilter; + char *filters; ///< filtergraph associated to the -filter option + char *filters_script; ///< filtergraph script associated to the -filter_script option + + AVDictionary *encoder_opts; + AVDictionary *sws_dict; + AVDictionary *swr_opts; + AVDictionary *resample_opts; + char *apad; + OSTFinished finished; /* no more packets should be written for this stream */ + int unavailable; /* true if the steram is unavailable (possibly temporarily) */ + int stream_copy; + + // init_output_stream() has been called for this stream + // The encoder and the bitstream filters have been initialized and the stream + // parameters are set in the AVStream. + int initialized; + + int inputs_done; + + const char *attachment_filename; + int copy_initial_nonkeyframes; + int copy_prior_start; + char *disposition; + + int keep_pix_fmt; + + /* stats */ + // combined size of all the packets written + uint64_t data_size; + // number of packets send to the muxer + uint64_t packets_written; + // number of frames/samples sent to the encoder + uint64_t frames_encoded; + uint64_t samples_encoded; + + /* packet quality factor */ + int quality; + + int max_muxing_queue_size; + + /* the packets are buffered here until the muxer is ready to be initialized */ + AVFifoBuffer *muxing_queue; + + /* packet picture type */ + int pict_type; + + /* frame encode sum of squared error values */ + int64_t error[4]; +} OutputStream; + +typedef struct OutputFile { + AVFormatContext *ctx; + AVDictionary *opts; + int ost_index; /* index of the first stream in output_streams */ + int64_t recording_time; ///< desired length of the resulting file in microseconds == AV_TIME_BASE units + int64_t start_time; ///< start time in microseconds == AV_TIME_BASE units + uint64_t limit_filesize; /* filesize limit expressed in bytes */ + + int shortest; + + int header_written; +} OutputFile; + +extern InputStream **input_streams; +extern int nb_input_streams; +extern InputFile **input_files; +extern int nb_input_files; + +extern OutputStream **output_streams; +extern int nb_output_streams; +extern OutputFile **output_files; +extern int nb_output_files; + +extern FilterGraph **filtergraphs; +extern int nb_filtergraphs; + +extern char *vstats_filename; +extern char *sdp_filename; + +extern float audio_drift_threshold; +extern float dts_delta_threshold; +extern float dts_error_threshold; + +extern int audio_volume; +extern int audio_sync_method; +extern int video_sync_method; +extern float frame_drop_threshold; +extern int do_benchmark; +extern int do_benchmark_all; +extern int do_deinterlace; +extern int do_hex_dump; +extern int do_pkt_dump; +extern int copy_ts; +extern int start_at_zero; +extern int copy_tb; +extern int debug_ts; +extern int exit_on_error; +extern int abort_on_flags; +extern int print_stats; +extern int qp_hist; +extern int stdin_interaction; +extern int frame_bits_per_raw_sample; +extern AVIOContext *progress_avio; +extern float max_error_rate; +extern char *videotoolbox_pixfmt; + +extern int filter_nbthreads; +extern int filter_complex_nbthreads; +extern int vstats_version; + +extern const AVIOInterruptCB int_cb; + +extern const OptionDef options[]; +extern const HWAccel hwaccels[]; +#if CONFIG_QSV +extern char *qsv_device; +#endif +extern HWDevice *filter_hw_device; + + +void term_init(void); +void term_exit(void); + +void reset_options(OptionsContext *o, int is_input); +void show_usage(void); + +void opt_output_file(void *optctx, const char *filename); + +void remove_avoptions(AVDictionary **a, AVDictionary *b); +void assert_avoptions(AVDictionary *m); + +int guess_input_channel_layout(InputStream *ist); + +enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx, AVCodec *codec, enum AVPixelFormat target); +void choose_sample_fmt(AVStream *st, AVCodec *codec); + +int configure_filtergraph(FilterGraph *fg); +int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out); +void check_filter_outputs(void); +int ist_in_filtergraph(FilterGraph *fg, InputStream *ist); +int filtergraph_is_simple(FilterGraph *fg); +int init_simple_filtergraph(InputStream *ist, OutputStream *ost); +int init_complex_filtergraph(FilterGraph *fg); + +void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub); + +int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); + +int ffmpeg_parse_options(int argc, char **argv); + +int videotoolbox_init(AVCodecContext *s); +int qsv_init(AVCodecContext *s); + +HWDevice *hw_device_get_by_name(const char *name); +int hw_device_init_from_string(const char *arg, HWDevice **dev); +void hw_device_free_all(void); + +int hw_device_setup_for_decode(InputStream *ist); +int hw_device_setup_for_encode(OutputStream *ost); +int hw_device_setup_for_filter(FilterGraph *fg); + +int hwaccel_decode_init(AVCodecContext *avctx); + +#endif /* FFTOOLS_FFMPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64colors.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64colors.h new file mode 100644 index 00000000..a9cdb6fa --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64colors.h @@ -0,0 +1,52 @@ +/* + * a64 video encoder - c64 colors in rgb (Pepto) + * Copyright (c) 2009 Tobias Bindhammer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * a64 video encoder - c64 colors in rgb + */ + +#ifndef AVCODEC_A64COLORS_H +#define AVCODEC_A64COLORS_H + +#include + +/* c64 palette in RGB */ +static const uint8_t a64_palette[16][3] = { + {0x00, 0x00, 0x00}, + {0xff, 0xff, 0xff}, + {0x68, 0x37, 0x2b}, + {0x70, 0xa4, 0xb2}, + {0x6f, 0x3d, 0x86}, + {0x58, 0x8d, 0x43}, + {0x35, 0x28, 0x79}, + {0xb8, 0xc7, 0x6f}, + {0x6f, 0x4f, 0x25}, + {0x43, 0x39, 0x00}, + {0x9a, 0x67, 0x59}, + {0x44, 0x44, 0x44}, + {0x6c, 0x6c, 0x6c}, + {0x9a, 0xd2, 0x84}, + {0x6c, 0x5e, 0xb5}, + {0x95, 0x95, 0x95}, +}; + +#endif /* AVCODEC_A64COLORS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64tables.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64tables.h new file mode 100644 index 00000000..a955ef4c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/a64tables.h @@ -0,0 +1,150 @@ +/* + * a64 video encoder - tables used by a64 encoders + * Copyright (c) 2009 Tobias Bindhammer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * a64 video encoder - tables used by a64 encoders + */ + +#ifndef AVCODEC_A64TABLES_H +#define AVCODEC_A64TABLES_H + +#include + +/** + * dither patterns used vor rendering the multicolor charset + */ + +static const uint8_t multi_dither_patterns[9][4][4] = { + { + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0} + }, + { + {1, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 1, 0}, + {0, 0, 0, 0} + }, + { + {1, 0, 0, 0}, + {0, 0, 1, 0}, + {0, 1, 0, 0}, + {0, 0, 0, 1} + }, + { + {1, 0, 0, 0}, + {0, 1, 0, 1}, + {0, 0, 1, 0}, + {0, 1, 0, 1} + }, + { + {1, 0, 1, 0}, + {0, 1, 0, 1}, + {1, 0, 1, 0}, + {0, 1, 0, 1} + }, + { + {1, 1, 1, 0}, + {0, 1, 0, 1}, + {1, 0, 1, 1}, + {0, 1, 0, 1} + }, + { + {0, 1, 1, 1}, + {1, 1, 0, 1}, + {1, 0, 1, 1}, + {1, 1, 1, 0} + }, + { + {0, 1, 1, 1}, + {1, 1, 1, 1}, + {1, 1, 0, 1}, + {1, 1, 1, 1} + }, + { + {1, 1, 1, 1}, + {1, 1, 1, 1}, + {1, 1, 1, 1}, + {1, 1, 1, 1} + }, +}; + +static const uint8_t interlaced_dither_patterns[9][8][4] = { + { + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + }, + { + {1, 0, 1, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + {1, 0, 1, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 0, 0, 0}, + }, + { + {1, 0, 1, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 1, 0, 1}, + {1, 0, 1, 0}, {0, 0, 0, 0}, + {0, 0, 0, 0}, {0, 1, 0, 1}, + }, + { + {1, 0, 1, 0}, {0, 1, 0, 1}, + {0, 1, 0, 1}, {0, 0, 0, 0}, + {1, 0, 1, 0}, {0, 1, 0, 1}, + {0, 1, 0, 1}, {0, 0, 0, 0}, + }, + { + {1, 0, 1, 0}, {0, 1, 0, 1}, + {0, 1, 0, 1}, {1, 0, 1, 0}, + {1, 0, 1, 0}, {0, 1, 0, 1}, + {0, 1, 0, 1}, {1, 0, 1, 0}, + }, + { + {1, 0, 1, 0}, {0, 1, 0, 1}, + {1, 1, 1, 1}, {1, 0, 1, 0}, + {1, 0, 1, 0}, {0, 1, 0, 1}, + {1, 1, 1, 1}, {1, 0, 1, 0}, + }, + { + {1, 0, 1, 0}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {0, 1, 0, 1}, + {1, 0, 1, 0}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {0, 1, 0, 1}, + }, + { + {1, 1, 1, 1}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {0, 1, 0, 1}, + {1, 1, 1, 1}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {0, 1, 0, 1}, + }, + { + {1, 1, 1, 1}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {1, 1, 1, 1}, + {1, 1, 1, 1}, {1, 1, 1, 1}, + } +}; + +#endif /* AVCODEC_A64TABLES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac.h new file mode 100644 index 00000000..d422ea5b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac.h @@ -0,0 +1,377 @@ +/* + * AAC definitions and structures + * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) + * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC definitions and structures + * @author Oded Shimon ( ods15 ods15 dyndns org ) + * @author Maxim Gavrilov ( maxim.gavrilov gmail com ) + */ + +#ifndef AVCODEC_AAC_H +#define AVCODEC_AAC_H + + +#include "aac_defines.h" +#include "libavutil/float_dsp.h" +#include "libavutil/fixed_dsp.h" +#include "avcodec.h" +#if !USE_FIXED +#include "mdct15.h" +#endif +#include "fft.h" +#include "mpeg4audio.h" +#include "sbr.h" + +#include + +#define MAX_CHANNELS 64 +#define MAX_ELEM_ID 16 + +#define TNS_MAX_ORDER 20 +#define MAX_LTP_LONG_SFB 40 + +#define CLIP_AVOIDANCE_FACTOR 0.95f + +enum RawDataBlockType { + TYPE_SCE, + TYPE_CPE, + TYPE_CCE, + TYPE_LFE, + TYPE_DSE, + TYPE_PCE, + TYPE_FIL, + TYPE_END, +}; + +enum ExtensionPayloadID { + EXT_FILL, + EXT_FILL_DATA, + EXT_DATA_ELEMENT, + EXT_DYNAMIC_RANGE = 0xb, + EXT_SBR_DATA = 0xd, + EXT_SBR_DATA_CRC = 0xe, +}; + +enum WindowSequence { + ONLY_LONG_SEQUENCE, + LONG_START_SEQUENCE, + EIGHT_SHORT_SEQUENCE, + LONG_STOP_SEQUENCE, +}; + +enum BandType { + ZERO_BT = 0, ///< Scalefactors and spectral data are all zero. + FIRST_PAIR_BT = 5, ///< This and later band types encode two values (rather than four) with one code word. + ESC_BT = 11, ///< Spectral data are coded with an escape sequence. + RESERVED_BT = 12, ///< Band types following are encoded differently from others. + NOISE_BT = 13, ///< Spectral data are scaled white noise not coded in the bitstream. + INTENSITY_BT2 = 14, ///< Scalefactor data are intensity stereo positions (out of phase). + INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions (in phase). +}; + +#define IS_CODEBOOK_UNSIGNED(x) (((x) - 1) & 10) + +enum ChannelPosition { + AAC_CHANNEL_OFF = 0, + AAC_CHANNEL_FRONT = 1, + AAC_CHANNEL_SIDE = 2, + AAC_CHANNEL_BACK = 3, + AAC_CHANNEL_LFE = 4, + AAC_CHANNEL_CC = 5, +}; + +/** + * The point during decoding at which channel coupling is applied. + */ +enum CouplingPoint { + BEFORE_TNS, + BETWEEN_TNS_AND_IMDCT, + AFTER_IMDCT = 3, +}; + +/** + * Output configuration status + */ +enum OCStatus { + OC_NONE, ///< Output unconfigured + OC_TRIAL_PCE, ///< Output configuration under trial specified by an inband PCE + OC_TRIAL_FRAME, ///< Output configuration under trial specified by a frame header + OC_GLOBAL_HDR, ///< Output configuration set in a global header but not yet locked + OC_LOCKED, ///< Output configuration locked in place +}; + +typedef struct OutputConfiguration { + MPEG4AudioConfig m4ac; + uint8_t layout_map[MAX_ELEM_ID*4][3]; + int layout_map_tags; + int channels; + uint64_t channel_layout; + enum OCStatus status; +} OutputConfiguration; + +/** + * Predictor State + */ +typedef struct PredictorState { + AAC_FLOAT cor0; + AAC_FLOAT cor1; + AAC_FLOAT var0; + AAC_FLOAT var1; + AAC_FLOAT r0; + AAC_FLOAT r1; + AAC_FLOAT k1; + AAC_FLOAT x_est; +} PredictorState; + +#define MAX_PREDICTORS 672 + +#define SCALE_DIV_512 36 ///< scalefactor difference that corresponds to scale difference in 512 times +#define SCALE_ONE_POS 140 ///< scalefactor index that corresponds to scale=1.0 +#define SCALE_MAX_POS 255 ///< scalefactor index maximum value +#define SCALE_MAX_DIFF 60 ///< maximum scalefactor difference allowed by standard +#define SCALE_DIFF_ZERO 60 ///< codebook index corresponding to zero scalefactor indices difference + +#define POW_SF2_ZERO 200 ///< ff_aac_pow2sf_tab index corresponding to pow(2, 0); + +#define NOISE_PRE 256 ///< preamble for NOISE_BT, put in bitstream with the first noise band +#define NOISE_PRE_BITS 9 ///< length of preamble +#define NOISE_OFFSET 90 ///< subtracted from global gain, used as offset for the preamble + +/** + * Long Term Prediction + */ +typedef struct LongTermPrediction { + int8_t present; + int16_t lag; + int coef_idx; + INTFLOAT coef; + int8_t used[MAX_LTP_LONG_SFB]; +} LongTermPrediction; + +/** + * Individual Channel Stream + */ +typedef struct IndividualChannelStream { + uint8_t max_sfb; ///< number of scalefactor bands per group + enum WindowSequence window_sequence[2]; + uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window. + int num_window_groups; + uint8_t group_len[8]; + LongTermPrediction ltp; + const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window + const uint8_t *swb_sizes; ///< table of scalefactor band sizes for a particular window + int num_swb; ///< number of scalefactor window bands + int num_windows; + int tns_max_bands; + int predictor_present; + int predictor_initialized; + int predictor_reset_group; + int predictor_reset_count[31]; ///< used by encoder to count prediction resets + uint8_t prediction_used[41]; + uint8_t window_clipping[8]; ///< set if a certain window is near clipping + float clip_avoidance_factor; ///< set if any window is near clipping to the necessary atennuation factor to avoid it +} IndividualChannelStream; + +/** + * Temporal Noise Shaping + */ +typedef struct TemporalNoiseShaping { + int present; + int n_filt[8]; + int length[8][4]; + int direction[8][4]; + int order[8][4]; + int coef_idx[8][4][TNS_MAX_ORDER]; + INTFLOAT coef[8][4][TNS_MAX_ORDER]; +} TemporalNoiseShaping; + +/** + * Dynamic Range Control - decoded from the bitstream but not processed further. + */ +typedef struct DynamicRangeControl { + int pce_instance_tag; ///< Indicates with which program the DRC info is associated. + int dyn_rng_sgn[17]; ///< DRC sign information; 0 - positive, 1 - negative + int dyn_rng_ctl[17]; ///< DRC magnitude information + int exclude_mask[MAX_CHANNELS]; ///< Channels to be excluded from DRC processing. + int band_incr; ///< Number of DRC bands greater than 1 having DRC info. + int interpolation_scheme; ///< Indicates the interpolation scheme used in the SBR QMF domain. + int band_top[17]; ///< Indicates the top of the i-th DRC band in units of 4 spectral lines. + int prog_ref_level; /**< A reference level for the long-term program audio level for all + * channels combined. + */ +} DynamicRangeControl; + +typedef struct Pulse { + int num_pulse; + int start; + int pos[4]; + int amp[4]; +} Pulse; + +/** + * coupling parameters + */ +typedef struct ChannelCoupling { + enum CouplingPoint coupling_point; ///< The point during decoding at which coupling is applied. + int num_coupled; ///< number of target elements + enum RawDataBlockType type[8]; ///< Type of channel element to be coupled - SCE or CPE. + int id_select[8]; ///< element id + int ch_select[8]; /**< [0] shared list of gains; [1] list of gains for right channel; + * [2] list of gains for left channel; [3] lists of gains for both channels + */ + INTFLOAT gain[16][120]; +} ChannelCoupling; + +/** + * Single Channel Element - used for both SCE and LFE elements. + */ +typedef struct SingleChannelElement { + IndividualChannelStream ics; + TemporalNoiseShaping tns; + Pulse pulse; + enum BandType band_type[128]; ///< band types + enum BandType band_alt[128]; ///< alternative band type (used by encoder) + int band_type_run_end[120]; ///< band type run end points + INTFLOAT sf[120]; ///< scalefactors + int sf_idx[128]; ///< scalefactor indices (used by encoder) + uint8_t zeroes[128]; ///< band is not coded (used by encoder) + uint8_t can_pns[128]; ///< band is allowed to PNS (informative) + float is_ener[128]; ///< Intensity stereo pos (used by encoder) + float pns_ener[128]; ///< Noise energy values (used by encoder) + DECLARE_ALIGNED(32, INTFLOAT, pcoeffs)[1024]; ///< coefficients for IMDCT, pristine + DECLARE_ALIGNED(32, INTFLOAT, coeffs)[1024]; ///< coefficients for IMDCT, maybe processed + DECLARE_ALIGNED(32, INTFLOAT, saved)[1536]; ///< overlap + DECLARE_ALIGNED(32, INTFLOAT, ret_buf)[2048]; ///< PCM output buffer + DECLARE_ALIGNED(16, INTFLOAT, ltp_state)[3072]; ///< time signal for LTP + DECLARE_ALIGNED(32, AAC_FLOAT, lcoeffs)[1024]; ///< MDCT of LTP coefficients (used by encoder) + DECLARE_ALIGNED(32, AAC_FLOAT, prcoeffs)[1024]; ///< Main prediction coefs (used by encoder) + PredictorState predictor_state[MAX_PREDICTORS]; + INTFLOAT *ret; ///< PCM output +} SingleChannelElement; + +/** + * channel element - generic struct for SCE/CPE/CCE/LFE + */ +typedef struct ChannelElement { + int present; + // CPE specific + int common_window; ///< Set if channels share a common 'IndividualChannelStream' in bitstream. + int ms_mode; ///< Signals mid/side stereo flags coding mode (used by encoder) + uint8_t is_mode; ///< Set if any bands have been encoded using intensity stereo (used by encoder) + uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band + uint8_t is_mask[128]; ///< Set if intensity stereo is used (used by encoder) + // shared + SingleChannelElement ch[2]; + // CCE specific + ChannelCoupling coup; + SpectralBandReplication sbr; +} ChannelElement; + +/** + * main AAC context + */ +struct AACContext { + AVClass *class; + AVCodecContext *avctx; + AVFrame *frame; + + int is_saved; ///< Set if elements have stored overlap from previous frame. + DynamicRangeControl che_drc; + + /** + * @name Channel element related data + * @{ + */ + ChannelElement *che[4][MAX_ELEM_ID]; + ChannelElement *tag_che_map[4][MAX_ELEM_ID]; + int tags_mapped; + int warned_remapping_once; + /** @} */ + + /** + * @name temporary aligned temporary buffers + * (We do not want to have these on the stack.) + * @{ + */ + DECLARE_ALIGNED(32, INTFLOAT, buf_mdct)[1024]; + /** @} */ + + /** + * @name Computed / set up during initialization + * @{ + */ + FFTContext mdct; + FFTContext mdct_small; + FFTContext mdct_ld; + FFTContext mdct_ltp; +#if USE_FIXED + AVFixedDSPContext *fdsp; +#else + MDCT15Context *mdct120; + MDCT15Context *mdct480; + MDCT15Context *mdct960; + AVFloatDSPContext *fdsp; +#endif /* USE_FIXED */ + int random_state; + /** @} */ + + /** + * @name Members used for output + * @{ + */ + SingleChannelElement *output_element[MAX_CHANNELS]; ///< Points to each SingleChannelElement + /** @} */ + + + /** + * @name Japanese DTV specific extension + * @{ + */ + int force_dmono_mode;///< 0->not dmono, 1->use first channel, 2->use second channel + int dmono_mode; ///< 0->not dmono, 1->use first channel, 2->use second channel + /** @} */ + + DECLARE_ALIGNED(32, INTFLOAT, temp)[128]; + + OutputConfiguration oc[2]; + int warned_num_aac_frames; + int warned_960_sbr; + unsigned warned_71_wide; + int warned_gain_control; + + /* aacdec functions pointers */ + void (*imdct_and_windowing)(AACContext *ac, SingleChannelElement *sce); + void (*apply_ltp)(AACContext *ac, SingleChannelElement *sce); + void (*apply_tns)(INTFLOAT coef[1024], TemporalNoiseShaping *tns, + IndividualChannelStream *ics, int decode); + void (*windowing_and_mdct_ltp)(AACContext *ac, INTFLOAT *out, + INTFLOAT *in, IndividualChannelStream *ics); + void (*update_ltp)(AACContext *ac, SingleChannelElement *sce); + void (*vector_pow43)(int *coefs, int len); + void (*subband_scale)(int *dst, int *src, int scale, int offset, int len, void *log_context); + +}; + +void ff_aacdec_init_mips(AACContext *c); + +#endif /* AVCODEC_AAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_ac3_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_ac3_parser.h new file mode 100644 index 00000000..c2506a5b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_ac3_parser.h @@ -0,0 +1,66 @@ +/* + * Common AAC and AC-3 parser prototypes + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AAC_AC3_PARSER_H +#define AVCODEC_AAC_AC3_PARSER_H + +#include +#include "avcodec.h" +#include "parser.h" + +typedef enum { + AAC_AC3_PARSE_ERROR_SYNC = -0x1030c0a, + AAC_AC3_PARSE_ERROR_BSID = -0x2030c0a, + AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a, + AAC_AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a, + AAC_AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a, + AAC_AC3_PARSE_ERROR_CRC = -0x6030c0a, + AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -0x7030c0a, +} AACAC3ParseError; + +typedef struct AACAC3ParseContext { + ParseContext pc; + int frame_size; + int header_size; + int (*sync)(uint64_t state, struct AACAC3ParseContext *hdr_info, + int *need_next_header, int *new_frame_start); + + int channels; + int sample_rate; + int bit_rate; + int samples; + uint64_t channel_layout; + int service_type; + + int remaining_size; + uint64_t state; + + int need_next_header; + enum AVCodecID codec_id; +} AACAC3ParseContext; + +int ff_aac_ac3_parse(AVCodecParserContext *s1, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size); + +#endif /* AVCODEC_AAC_AC3_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_defines.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_defines.h new file mode 100644 index 00000000..438d78a7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aac_defines.h @@ -0,0 +1,116 @@ +/* + * AAC defines + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AAC_DEFINES_H +#define AVCODEC_AAC_DEFINES_H + +#ifndef USE_FIXED +#define USE_FIXED 0 +#endif + +#if USE_FIXED + +#include "libavutil/softfloat.h" + +#define FFT_FLOAT 0 +#define FFT_FIXED_32 1 + +#define AAC_RENAME(x) x ## _fixed +#define AAC_RENAME_32(x) x ## _fixed_32 +typedef int INTFLOAT; +typedef unsigned UINTFLOAT; ///< Equivalent to INTFLOAT, Used as temporal cast to avoid undefined sign overflow operations. +typedef int64_t INT64FLOAT; +typedef int16_t SHORTFLOAT; +typedef SoftFloat AAC_FLOAT; +typedef int AAC_SIGNE; +#define FIXR(a) ((int)((a) * 1 + 0.5)) +#define FIXR10(a) ((int)((a) * 1024.0 + 0.5)) +#define Q23(a) (int)((a) * 8388608.0 + 0.5) +#define Q30(x) (int)((x)*1073741824.0 + 0.5) +#define Q31(x) (int)((x)*2147483648.0 + 0.5) +#define RANGE15(x) x +#define GET_GAIN(x, y) (-(y) * (1 << (x))) + 1024 +#define AAC_MUL16(x, y) (int)(((int64_t)(x) * (y) + 0x8000) >> 16) +#define AAC_MUL26(x, y) (int)(((int64_t)(x) * (y) + 0x2000000) >> 26) +#define AAC_MUL30(x, y) (int)(((int64_t)(x) * (y) + 0x20000000) >> 30) +#define AAC_MUL31(x, y) (int)(((int64_t)(x) * (y) + 0x40000000) >> 31) +#define AAC_MADD28(x, y, a, b) (int)((((int64_t)(x) * (y)) + \ + ((int64_t)(a) * (b)) + \ + 0x8000000) >> 28) +#define AAC_MADD30(x, y, a, b) (int)((((int64_t)(x) * (y)) + \ + ((int64_t)(a) * (b)) + \ + 0x20000000) >> 30) +#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \ + ((int64_t)(a) * (b)) + \ + ((int64_t)(c) * (d)) + \ + ((int64_t)(e) * (f)) + \ + 0x20000000) >> 30) +#define AAC_MSUB30(x, y, a, b) (int)((((int64_t)(x) * (y)) - \ + ((int64_t)(a) * (b)) + \ + 0x20000000) >> 30) +#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \ + ((int64_t)(a) * (b)) - \ + ((int64_t)(c) * (d)) - \ + ((int64_t)(e) * (f)) + \ + 0x20000000) >> 30) +#define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \ + ((int64_t)(y) * (z)) + \ + 0x40000000) >> 31) +#define AAC_HALF_SUM(x, y) (((x) >> 1) + ((y) >> 1)) +#define AAC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y)) + +#else + +#define FFT_FLOAT 1 +#define FFT_FIXED_32 0 + +#define AAC_RENAME(x) x +#define AAC_RENAME_32(x) x +typedef float INTFLOAT; +typedef float UINTFLOAT; +typedef float INT64FLOAT; +typedef float SHORTFLOAT; +typedef float AAC_FLOAT; +typedef unsigned AAC_SIGNE; +#define FIXR(x) ((float)(x)) +#define FIXR10(x) ((float)(x)) +#define Q23(x) ((float)(x)) +#define Q30(x) ((float)(x)) +#define Q31(x) ((float)(x)) +#define RANGE15(x) (32768.0 * (x)) +#define GET_GAIN(x, y) powf((x), -(y)) +#define AAC_MUL16(x, y) ((x) * (y)) +#define AAC_MUL26(x, y) ((x) * (y)) +#define AAC_MUL30(x, y) ((x) * (y)) +#define AAC_MUL31(x, y) ((x) * (y)) +#define AAC_MADD28(x, y, a, b) ((x) * (y) + (a) * (b)) +#define AAC_MADD30(x, y, a, b) ((x) * (y) + (a) * (b)) +#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) + \ + (c) * (d) + (e) * (f)) +#define AAC_MSUB30(x, y, a, b) ((x) * (y) - (a) * (b)) +#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) - \ + (c) * (d) - (e) * (f)) +#define AAC_MSUB31_V3(x, y, z) ((x) - (y)) * (z) +#define AAC_HALF_SUM(x, y) ((x) + (y)) * 0.5f +#define AAC_SRA_R(x, y) (x) + +#endif /* USE_FIXED */ + +#endif /* AVCODEC_AAC_DEFINES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_trellis.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_trellis.h new file mode 100644 index 00000000..940ebf02 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_trellis.h @@ -0,0 +1,192 @@ +/* + * AAC encoder trellis codebook selector + * Copyright (C) 2008-2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder trellis codebook selector + * @author Konstantin Shishkov + */ + +/** + * This file contains a template for the codebook_trellis_rate selector function. + * It needs to be provided, externally, as an already included declaration, + * the following functions from aacenc_quantization/util.h. They're not included + * explicitly here to make it possible to provide alternative implementations: + * - quantize_band_cost_bits + * - abs_pow34_v + */ + +#ifndef AVCODEC_AACCODER_TRELLIS_H +#define AVCODEC_AACCODER_TRELLIS_H + +#include +#include "libavutil/mathematics.h" +#include "avcodec.h" +#include "put_bits.h" +#include "aac.h" +#include "aacenc.h" +#include "aactab.h" +#include "aacenctab.h" + +/** + * structure used in optimal codebook search + */ +typedef struct TrellisBandCodingPath { + int prev_idx; ///< pointer to the previous path point + float cost; ///< path cost + int run; +} TrellisBandCodingPath; + + +static void codebook_trellis_rate(AACEncContext *s, SingleChannelElement *sce, + int win, int group_len, const float lambda) +{ + TrellisBandCodingPath path[120][CB_TOT_ALL]; + int w, swb, cb, start, size; + int i, j; + const int max_sfb = sce->ics.max_sfb; + const int run_bits = sce->ics.num_windows == 1 ? 5 : 3; + const int run_esc = (1 << run_bits) - 1; + int idx, ppos, count; + int stackrun[120], stackcb[120], stack_len; + float next_minbits = INFINITY; + int next_mincb = 0; + + s->abs_pow34(s->scoefs, sce->coeffs, 1024); + start = win*128; + for (cb = 0; cb < CB_TOT_ALL; cb++) { + path[0][cb].cost = run_bits+4; + path[0][cb].prev_idx = -1; + path[0][cb].run = 0; + } + for (swb = 0; swb < max_sfb; swb++) { + size = sce->ics.swb_sizes[swb]; + if (sce->zeroes[win*16 + swb]) { + float cost_stay_here = path[swb][0].cost; + float cost_get_here = next_minbits + run_bits + 4; + if ( run_value_bits[sce->ics.num_windows == 8][path[swb][0].run] + != run_value_bits[sce->ics.num_windows == 8][path[swb][0].run+1]) + cost_stay_here += run_bits; + if (cost_get_here < cost_stay_here) { + path[swb+1][0].prev_idx = next_mincb; + path[swb+1][0].cost = cost_get_here; + path[swb+1][0].run = 1; + } else { + path[swb+1][0].prev_idx = 0; + path[swb+1][0].cost = cost_stay_here; + path[swb+1][0].run = path[swb][0].run + 1; + } + next_minbits = path[swb+1][0].cost; + next_mincb = 0; + for (cb = 1; cb < CB_TOT_ALL; cb++) { + path[swb+1][cb].cost = 61450; + path[swb+1][cb].prev_idx = -1; + path[swb+1][cb].run = 0; + } + } else { + float minbits = next_minbits; + int mincb = next_mincb; + int startcb = sce->band_type[win*16+swb]; + startcb = aac_cb_in_map[startcb]; + next_minbits = INFINITY; + next_mincb = 0; + for (cb = 0; cb < startcb; cb++) { + path[swb+1][cb].cost = 61450; + path[swb+1][cb].prev_idx = -1; + path[swb+1][cb].run = 0; + } + for (cb = startcb; cb < CB_TOT_ALL; cb++) { + float cost_stay_here, cost_get_here; + float bits = 0.0f; + if (cb >= 12 && sce->band_type[win*16+swb] != aac_cb_out_map[cb]) { + path[swb+1][cb].cost = 61450; + path[swb+1][cb].prev_idx = -1; + path[swb+1][cb].run = 0; + continue; + } + for (w = 0; w < group_len; w++) { + bits += quantize_band_cost_bits(s, &sce->coeffs[start + w*128], + &s->scoefs[start + w*128], size, + sce->sf_idx[win*16+swb], + aac_cb_out_map[cb], + 0, INFINITY, NULL, NULL, 0); + } + cost_stay_here = path[swb][cb].cost + bits; + cost_get_here = minbits + bits + run_bits + 4; + if ( run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run] + != run_value_bits[sce->ics.num_windows == 8][path[swb][cb].run+1]) + cost_stay_here += run_bits; + if (cost_get_here < cost_stay_here) { + path[swb+1][cb].prev_idx = mincb; + path[swb+1][cb].cost = cost_get_here; + path[swb+1][cb].run = 1; + } else { + path[swb+1][cb].prev_idx = cb; + path[swb+1][cb].cost = cost_stay_here; + path[swb+1][cb].run = path[swb][cb].run + 1; + } + if (path[swb+1][cb].cost < next_minbits) { + next_minbits = path[swb+1][cb].cost; + next_mincb = cb; + } + } + } + start += sce->ics.swb_sizes[swb]; + } + + //convert resulting path from backward-linked list + stack_len = 0; + idx = 0; + for (cb = 1; cb < CB_TOT_ALL; cb++) + if (path[max_sfb][cb].cost < path[max_sfb][idx].cost) + idx = cb; + ppos = max_sfb; + while (ppos > 0) { + av_assert1(idx >= 0); + cb = idx; + stackrun[stack_len] = path[ppos][cb].run; + stackcb [stack_len] = cb; + idx = path[ppos-path[ppos][cb].run+1][cb].prev_idx; + ppos -= path[ppos][cb].run; + stack_len++; + } + //perform actual band info encoding + start = 0; + for (i = stack_len - 1; i >= 0; i--) { + cb = aac_cb_out_map[stackcb[i]]; + put_bits(&s->pb, 4, cb); + count = stackrun[i]; + memset(sce->zeroes + win*16 + start, !cb, count); + //XXX: memset when band_type is also uint8_t + for (j = 0; j < count; j++) { + sce->band_type[win*16 + start] = cb; + start++; + } + while (count >= run_esc) { + put_bits(&s->pb, run_bits, run_esc); + count -= run_esc; + } + put_bits(&s->pb, run_bits, count); + } +} + + +#endif /* AVCODEC_AACCODER_TRELLIS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_twoloop.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_twoloop.h new file mode 100644 index 00000000..8e1bc88a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aaccoder_twoloop.h @@ -0,0 +1,763 @@ +/* + * AAC encoder twoloop coder + * Copyright (C) 2008-2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder twoloop coder + * @author Konstantin Shishkov, Claudio Freire + */ + +/** + * This file contains a template for the twoloop coder function. + * It needs to be provided, externally, as an already included declaration, + * the following functions from aacenc_quantization/util.h. They're not included + * explicitly here to make it possible to provide alternative implementations: + * - quantize_band_cost + * - abs_pow34_v + * - find_max_val + * - find_min_book + * - find_form_factor + */ + +#ifndef AVCODEC_AACCODER_TWOLOOP_H +#define AVCODEC_AACCODER_TWOLOOP_H + +#include +#include "libavutil/mathematics.h" +#include "mathops.h" +#include "avcodec.h" +#include "put_bits.h" +#include "aac.h" +#include "aacenc.h" +#include "aactab.h" +#include "aacenctab.h" + +/** Frequency in Hz for lower limit of noise substitution **/ +#define NOISE_LOW_LIMIT 4000 + +#define sclip(x) av_clip(x,60,218) + +/* Reflects the cost to change codebooks */ +static inline int ff_pns_bits(SingleChannelElement *sce, int w, int g) +{ + return (!g || !sce->zeroes[w*16+g-1] || !sce->can_pns[w*16+g-1]) ? 9 : 5; +} + +/** + * two-loop quantizers search taken from ISO 13818-7 Appendix C + */ +static void search_for_quantizers_twoloop(AVCodecContext *avctx, + AACEncContext *s, + SingleChannelElement *sce, + const float lambda) +{ + int start = 0, i, w, w2, g, recomprd; + int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate + / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->channels) + * (lambda / 120.f); + int refbits = destbits; + int toomanybits, toofewbits; + char nzs[128]; + uint8_t nextband[128]; + int maxsf[128], minsf[128]; + float dists[128] = { 0 }, qenergies[128] = { 0 }, uplims[128], euplims[128], energies[128]; + float maxvals[128], spread_thr_r[128]; + float min_spread_thr_r, max_spread_thr_r; + + /** + * rdlambda controls the maximum tolerated distortion. Twoloop + * will keep iterating until it fails to lower it or it reaches + * ulimit * rdlambda. Keeping it low increases quality on difficult + * signals, but lower it too much, and bits will be taken from weak + * signals, creating "holes". A balance is necessary. + * rdmax and rdmin specify the relative deviation from rdlambda + * allowed for tonality compensation + */ + float rdlambda = av_clipf(2.0f * 120.f / lambda, 0.0625f, 16.0f); + const float nzslope = 1.5f; + float rdmin = 0.03125f; + float rdmax = 1.0f; + + /** + * sfoffs controls an offset of optmium allocation that will be + * applied based on lambda. Keep it real and modest, the loop + * will take care of the rest, this just accelerates convergence + */ + float sfoffs = av_clipf(log2f(120.0f / lambda) * 4.0f, -5, 10); + + int fflag, minscaler, maxscaler, nminscaler; + int its = 0; + int maxits = 30; + int allz = 0; + int tbits; + int cutoff = 1024; + int pns_start_pos; + int prev; + + /** + * zeroscale controls a multiplier of the threshold, if band energy + * is below this, a zero is forced. Keep it lower than 1, unless + * low lambda is used, because energy < threshold doesn't mean there's + * no audible signal outright, it's just energy. Also make it rise + * slower than rdlambda, as rdscale has due compensation with + * noisy band depriorization below, whereas zeroing logic is rather dumb + */ + float zeroscale; + if (lambda > 120.f) { + zeroscale = av_clipf(powf(120.f / lambda, 0.25f), 0.0625f, 1.0f); + } else { + zeroscale = 1.f; + } + + if (s->psy.bitres.alloc >= 0) { + /** + * Psy granted us extra bits to use, from the reservoire + * adjust for lambda except what psy already did + */ + destbits = s->psy.bitres.alloc + * (lambda / (avctx->global_quality ? avctx->global_quality : 120)); + } + + if (avctx->flags & AV_CODEC_FLAG_QSCALE) { + /** + * Constant Q-scale doesn't compensate MS coding on its own + * No need to be overly precise, this only controls RD + * adjustment CB limits when going overboard + */ + if (s->options.mid_side && s->cur_type == TYPE_CPE) + destbits *= 2; + + /** + * When using a constant Q-scale, don't adjust bits, just use RD + * Don't let it go overboard, though... 8x psy target is enough + */ + toomanybits = 5800; + toofewbits = destbits / 16; + + /** Don't offset scalers, just RD */ + sfoffs = sce->ics.num_windows - 1; + rdlambda = sqrtf(rdlambda); + + /** search further */ + maxits *= 2; + } else { + /* When using ABR, be strict, but a reasonable leeway is + * critical to allow RC to smoothly track desired bitrate + * without sudden quality drops that cause audible artifacts. + * Symmetry is also desirable, to avoid systematic bias. + */ + toomanybits = destbits + destbits/8; + toofewbits = destbits - destbits/8; + + sfoffs = 0; + rdlambda = sqrtf(rdlambda); + } + + /** and zero out above cutoff frequency */ + { + int wlen = 1024 / sce->ics.num_windows; + int bandwidth; + + /** + * Scale, psy gives us constant quality, this LP only scales + * bitrate by lambda, so we save bits on subjectively unimportant HF + * rather than increase quantization noise. Adjust nominal bitrate + * to effective bitrate according to encoding parameters, + * AAC_CUTOFF_FROM_BITRATE is calibrated for effective bitrate. + */ + float rate_bandwidth_multiplier = 1.5f; + int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE) + ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024) + : (avctx->bit_rate / avctx->channels); + + /** Compensate for extensions that increase efficiency */ + if (s->options.pns || s->options.intensity_stereo) + frame_bit_rate *= 1.15f; + + if (avctx->cutoff > 0) { + bandwidth = avctx->cutoff; + } else { + bandwidth = FFMAX(3000, AAC_CUTOFF_FROM_BITRATE(frame_bit_rate, 1, avctx->sample_rate)); + s->psy.cutoff = bandwidth; + } + + cutoff = bandwidth * 2 * wlen / avctx->sample_rate; + pns_start_pos = NOISE_LOW_LIMIT * 2 * wlen / avctx->sample_rate; + } + + /** + * for values above this the decoder might end up in an endless loop + * due to always having more bits than what can be encoded. + */ + destbits = FFMIN(destbits, 5800); + toomanybits = FFMIN(toomanybits, 5800); + toofewbits = FFMIN(toofewbits, 5800); + /** + * XXX: some heuristic to determine initial quantizers will reduce search time + * determine zero bands and upper distortion limits + */ + min_spread_thr_r = -1; + max_spread_thr_r = -1; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = start = 0; g < sce->ics.num_swb; start += sce->ics.swb_sizes[g++]) { + int nz = 0; + float uplim = 0.0f, energy = 0.0f, spread = 0.0f; + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; + if (start >= cutoff || band->energy <= (band->threshold * zeroscale) || band->threshold == 0.0f) { + sce->zeroes[(w+w2)*16+g] = 1; + continue; + } + nz = 1; + } + if (!nz) { + uplim = 0.0f; + } else { + nz = 0; + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; + if (band->energy <= (band->threshold * zeroscale) || band->threshold == 0.0f) + continue; + uplim += band->threshold; + energy += band->energy; + spread += band->spread; + nz++; + } + } + uplims[w*16+g] = uplim; + energies[w*16+g] = energy; + nzs[w*16+g] = nz; + sce->zeroes[w*16+g] = !nz; + allz |= nz; + if (nz && sce->can_pns[w*16+g]) { + spread_thr_r[w*16+g] = energy * nz / (uplim * spread); + if (min_spread_thr_r < 0) { + min_spread_thr_r = max_spread_thr_r = spread_thr_r[w*16+g]; + } else { + min_spread_thr_r = FFMIN(min_spread_thr_r, spread_thr_r[w*16+g]); + max_spread_thr_r = FFMAX(max_spread_thr_r, spread_thr_r[w*16+g]); + } + } + } + } + + /** Compute initial scalers */ + minscaler = 65535; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = 0; g < sce->ics.num_swb; g++) { + if (sce->zeroes[w*16+g]) { + sce->sf_idx[w*16+g] = SCALE_ONE_POS; + continue; + } + /** + * log2f-to-distortion ratio is, technically, 2 (1.5db = 4, but it's power vs level so it's 2). + * But, as offsets are applied, low-frequency signals are too sensitive to the induced distortion, + * so we make scaling more conservative by choosing a lower log2f-to-distortion ratio, and thus + * more robust. + */ + sce->sf_idx[w*16+g] = av_clip( + SCALE_ONE_POS + + 1.75*log2f(FFMAX(0.00125f,uplims[w*16+g]) / sce->ics.swb_sizes[g]) + + sfoffs, + 60, SCALE_MAX_POS); + minscaler = FFMIN(minscaler, sce->sf_idx[w*16+g]); + } + } + + /** Clip */ + minscaler = av_clip(minscaler, SCALE_ONE_POS - SCALE_DIV_512, SCALE_MAX_POS - SCALE_DIV_512); + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) + for (g = 0; g < sce->ics.num_swb; g++) + if (!sce->zeroes[w*16+g]) + sce->sf_idx[w*16+g] = av_clip(sce->sf_idx[w*16+g], minscaler, minscaler + SCALE_MAX_DIFF - 1); + + if (!allz) + return; + s->abs_pow34(s->scoefs, sce->coeffs, 1024); + ff_quantize_band_cost_cache_init(s); + + for (i = 0; i < sizeof(minsf) / sizeof(minsf[0]); ++i) + minsf[i] = 0; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + start = w*128; + for (g = 0; g < sce->ics.num_swb; g++) { + const float *scaled = s->scoefs + start; + int minsfidx; + maxvals[w*16+g] = find_max_val(sce->ics.group_len[w], sce->ics.swb_sizes[g], scaled); + if (maxvals[w*16+g] > 0) { + minsfidx = coef2minsf(maxvals[w*16+g]); + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) + minsf[(w+w2)*16+g] = minsfidx; + } + start += sce->ics.swb_sizes[g]; + } + } + + /** + * Scale uplims to match rate distortion to quality + * bu applying noisy band depriorization and tonal band priorization. + * Maxval-energy ratio gives us an idea of how noisy/tonal the band is. + * If maxval^2 ~ energy, then that band is mostly noise, and we can relax + * rate distortion requirements. + */ + memcpy(euplims, uplims, sizeof(euplims)); + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + /** psy already priorizes transients to some extent */ + float de_psy_factor = (sce->ics.num_windows > 1) ? 8.0f / sce->ics.group_len[w] : 1.0f; + start = w*128; + for (g = 0; g < sce->ics.num_swb; g++) { + if (nzs[g] > 0) { + float cleanup_factor = ff_sqrf(av_clipf(start / (cutoff * 0.75f), 1.0f, 2.0f)); + float energy2uplim = find_form_factor( + sce->ics.group_len[w], sce->ics.swb_sizes[g], + uplims[w*16+g] / (nzs[g] * sce->ics.swb_sizes[w]), + sce->coeffs + start, + nzslope * cleanup_factor); + energy2uplim *= de_psy_factor; + if (!(avctx->flags & AV_CODEC_FLAG_QSCALE)) { + /** In ABR, we need to priorize less and let rate control do its thing */ + energy2uplim = sqrtf(energy2uplim); + } + energy2uplim = FFMAX(0.015625f, FFMIN(1.0f, energy2uplim)); + uplims[w*16+g] *= av_clipf(rdlambda * energy2uplim, rdmin, rdmax) + * sce->ics.group_len[w]; + + energy2uplim = find_form_factor( + sce->ics.group_len[w], sce->ics.swb_sizes[g], + uplims[w*16+g] / (nzs[g] * sce->ics.swb_sizes[w]), + sce->coeffs + start, + 2.0f); + energy2uplim *= de_psy_factor; + if (!(avctx->flags & AV_CODEC_FLAG_QSCALE)) { + /** In ABR, we need to priorize less and let rate control do its thing */ + energy2uplim = sqrtf(energy2uplim); + } + energy2uplim = FFMAX(0.015625f, FFMIN(1.0f, energy2uplim)); + euplims[w*16+g] *= av_clipf(rdlambda * energy2uplim * sce->ics.group_len[w], + 0.5f, 1.0f); + } + start += sce->ics.swb_sizes[g]; + } + } + + for (i = 0; i < sizeof(maxsf) / sizeof(maxsf[0]); ++i) + maxsf[i] = SCALE_MAX_POS; + + //perform two-loop search + //outer loop - improve quality + do { + //inner loop - quantize spectrum to fit into given number of bits + int overdist; + int qstep = its ? 1 : 32; + do { + int changed = 0; + prev = -1; + recomprd = 0; + tbits = 0; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + start = w*128; + for (g = 0; g < sce->ics.num_swb; g++) { + const float *coefs = &sce->coeffs[start]; + const float *scaled = &s->scoefs[start]; + int bits = 0; + int cb; + float dist = 0.0f; + float qenergy = 0.0f; + + if (sce->zeroes[w*16+g] || sce->sf_idx[w*16+g] >= 218) { + start += sce->ics.swb_sizes[g]; + if (sce->can_pns[w*16+g]) { + /** PNS isn't free */ + tbits += ff_pns_bits(sce, w, g); + } + continue; + } + cb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + int b; + float sqenergy; + dist += quantize_band_cost_cached(s, w + w2, g, coefs + w2*128, + scaled + w2*128, + sce->ics.swb_sizes[g], + sce->sf_idx[w*16+g], + cb, + 1.0f, + INFINITY, + &b, &sqenergy, + 0); + bits += b; + qenergy += sqenergy; + } + dists[w*16+g] = dist - bits; + qenergies[w*16+g] = qenergy; + if (prev != -1) { + int sfdiff = av_clip(sce->sf_idx[w*16+g] - prev + SCALE_DIFF_ZERO, 0, 2*SCALE_MAX_DIFF); + bits += ff_aac_scalefactor_bits[sfdiff]; + } + tbits += bits; + start += sce->ics.swb_sizes[g]; + prev = sce->sf_idx[w*16+g]; + } + } + if (tbits > toomanybits) { + recomprd = 1; + for (i = 0; i < 128; i++) { + if (sce->sf_idx[i] < (SCALE_MAX_POS - SCALE_DIV_512)) { + int maxsf_i = (tbits > 5800) ? SCALE_MAX_POS : maxsf[i]; + int new_sf = FFMIN(maxsf_i, sce->sf_idx[i] + qstep); + if (new_sf != sce->sf_idx[i]) { + sce->sf_idx[i] = new_sf; + changed = 1; + } + } + } + } else if (tbits < toofewbits) { + recomprd = 1; + for (i = 0; i < 128; i++) { + if (sce->sf_idx[i] > SCALE_ONE_POS) { + int new_sf = FFMAX3(minsf[i], SCALE_ONE_POS, sce->sf_idx[i] - qstep); + if (new_sf != sce->sf_idx[i]) { + sce->sf_idx[i] = new_sf; + changed = 1; + } + } + } + } + qstep >>= 1; + if (!qstep && tbits > toomanybits && sce->sf_idx[0] < 217 && changed) + qstep = 1; + } while (qstep); + + overdist = 1; + fflag = tbits < toofewbits; + for (i = 0; i < 2 && (overdist || recomprd); ++i) { + if (recomprd) { + /** Must recompute distortion */ + prev = -1; + tbits = 0; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + start = w*128; + for (g = 0; g < sce->ics.num_swb; g++) { + const float *coefs = sce->coeffs + start; + const float *scaled = s->scoefs + start; + int bits = 0; + int cb; + float dist = 0.0f; + float qenergy = 0.0f; + + if (sce->zeroes[w*16+g] || sce->sf_idx[w*16+g] >= 218) { + start += sce->ics.swb_sizes[g]; + if (sce->can_pns[w*16+g]) { + /** PNS isn't free */ + tbits += ff_pns_bits(sce, w, g); + } + continue; + } + cb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + int b; + float sqenergy; + dist += quantize_band_cost_cached(s, w + w2, g, coefs + w2*128, + scaled + w2*128, + sce->ics.swb_sizes[g], + sce->sf_idx[w*16+g], + cb, + 1.0f, + INFINITY, + &b, &sqenergy, + 0); + bits += b; + qenergy += sqenergy; + } + dists[w*16+g] = dist - bits; + qenergies[w*16+g] = qenergy; + if (prev != -1) { + int sfdiff = av_clip(sce->sf_idx[w*16+g] - prev + SCALE_DIFF_ZERO, 0, 2*SCALE_MAX_DIFF); + bits += ff_aac_scalefactor_bits[sfdiff]; + } + tbits += bits; + start += sce->ics.swb_sizes[g]; + prev = sce->sf_idx[w*16+g]; + } + } + } + if (!i && s->options.pns && its > maxits/2 && tbits > toofewbits) { + float maxoverdist = 0.0f; + float ovrfactor = 1.f+(maxits-its)*16.f/maxits; + overdist = recomprd = 0; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = start = 0; g < sce->ics.num_swb; start += sce->ics.swb_sizes[g++]) { + if (!sce->zeroes[w*16+g] && sce->sf_idx[w*16+g] > SCALE_ONE_POS && dists[w*16+g] > uplims[w*16+g]*ovrfactor) { + float ovrdist = dists[w*16+g] / FFMAX(uplims[w*16+g],euplims[w*16+g]); + maxoverdist = FFMAX(maxoverdist, ovrdist); + overdist++; + } + } + } + if (overdist) { + /* We have overdistorted bands, trade for zeroes (that can be noise) + * Zero the bands in the lowest 1.25% spread-energy-threshold ranking + */ + float minspread = max_spread_thr_r; + float maxspread = min_spread_thr_r; + float zspread; + int zeroable = 0; + int zeroed = 0; + int maxzeroed, zloop; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = start = 0; g < sce->ics.num_swb; start += sce->ics.swb_sizes[g++]) { + if (start >= pns_start_pos && !sce->zeroes[w*16+g] && sce->can_pns[w*16+g]) { + minspread = FFMIN(minspread, spread_thr_r[w*16+g]); + maxspread = FFMAX(maxspread, spread_thr_r[w*16+g]); + zeroable++; + } + } + } + zspread = (maxspread-minspread) * 0.0125f + minspread; + /* Don't PNS everything even if allowed. It suppresses bit starvation signals from RC, + * and forced the hand of the later search_for_pns step. + * Instead, PNS a fraction of the spread_thr_r range depending on how starved for bits we are, + * and leave further PNSing to search_for_pns if worthwhile. + */ + zspread = FFMIN3(min_spread_thr_r * 8.f, zspread, + ((toomanybits - tbits) * min_spread_thr_r + (tbits - toofewbits) * max_spread_thr_r) / (toomanybits - toofewbits + 1)); + maxzeroed = FFMIN(zeroable, FFMAX(1, (zeroable * its + maxits - 1) / (2 * maxits))); + for (zloop = 0; zloop < 2; zloop++) { + /* Two passes: first distorted stuff - two birds in one shot and all that, + * then anything viable. Viable means not zero, but either CB=zero-able + * (too high SF), not SF <= 1 (that means we'd be operating at very high + * quality, we don't want PNS when doing VHQ), PNS allowed, and within + * the lowest ranking percentile. + */ + float loopovrfactor = (zloop) ? 1.0f : ovrfactor; + int loopminsf = (zloop) ? (SCALE_ONE_POS - SCALE_DIV_512) : SCALE_ONE_POS; + int mcb; + for (g = sce->ics.num_swb-1; g > 0 && zeroed < maxzeroed; g--) { + if (sce->ics.swb_offset[g] < pns_start_pos) + continue; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + if (!sce->zeroes[w*16+g] && sce->can_pns[w*16+g] && spread_thr_r[w*16+g] <= zspread + && sce->sf_idx[w*16+g] > loopminsf + && (dists[w*16+g] > loopovrfactor*uplims[w*16+g] || !(mcb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g])) + || (mcb <= 1 && dists[w*16+g] > FFMIN(uplims[w*16+g], euplims[w*16+g]))) ) { + sce->zeroes[w*16+g] = 1; + sce->band_type[w*16+g] = 0; + zeroed++; + } + } + } + } + if (zeroed) + recomprd = fflag = 1; + } else { + overdist = 0; + } + } + } + + minscaler = SCALE_MAX_POS; + maxscaler = 0; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = 0; g < sce->ics.num_swb; g++) { + if (!sce->zeroes[w*16+g]) { + minscaler = FFMIN(minscaler, sce->sf_idx[w*16+g]); + maxscaler = FFMAX(maxscaler, sce->sf_idx[w*16+g]); + } + } + } + + minscaler = nminscaler = av_clip(minscaler, SCALE_ONE_POS - SCALE_DIV_512, SCALE_MAX_POS - SCALE_DIV_512); + prev = -1; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + /** Start with big steps, end up fine-tunning */ + int depth = (its > maxits/2) ? ((its > maxits*2/3) ? 1 : 3) : 10; + int edepth = depth+2; + float uplmax = its / (maxits*0.25f) + 1.0f; + uplmax *= (tbits > destbits) ? FFMIN(2.0f, tbits / (float)FFMAX(1,destbits)) : 1.0f; + start = w * 128; + for (g = 0; g < sce->ics.num_swb; g++) { + int prevsc = sce->sf_idx[w*16+g]; + if (prev < 0 && !sce->zeroes[w*16+g]) + prev = sce->sf_idx[0]; + if (!sce->zeroes[w*16+g]) { + const float *coefs = sce->coeffs + start; + const float *scaled = s->scoefs + start; + int cmb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + int mindeltasf = FFMAX(0, prev - SCALE_MAX_DIFF); + int maxdeltasf = FFMIN(SCALE_MAX_POS - SCALE_DIV_512, prev + SCALE_MAX_DIFF); + if ((!cmb || dists[w*16+g] > uplims[w*16+g]) && sce->sf_idx[w*16+g] > FFMAX(mindeltasf, minsf[w*16+g])) { + /* Try to make sure there is some energy in every nonzero band + * NOTE: This algorithm must be forcibly imbalanced, pushing harder + * on holes or more distorted bands at first, otherwise there's + * no net gain (since the next iteration will offset all bands + * on the opposite direction to compensate for extra bits) + */ + for (i = 0; i < edepth && sce->sf_idx[w*16+g] > mindeltasf; ++i) { + int cb, bits; + float dist, qenergy; + int mb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]-1); + cb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + dist = qenergy = 0.f; + bits = 0; + if (!cb) { + maxsf[w*16+g] = FFMIN(sce->sf_idx[w*16+g]-1, maxsf[w*16+g]); + } else if (i >= depth && dists[w*16+g] < euplims[w*16+g]) { + break; + } + /* !g is the DC band, it's important, since quantization error here + * applies to less than a cycle, it creates horrible intermodulation + * distortion if it doesn't stick to what psy requests + */ + if (!g && sce->ics.num_windows > 1 && dists[w*16+g] >= euplims[w*16+g]) + maxsf[w*16+g] = FFMIN(sce->sf_idx[w*16+g], maxsf[w*16+g]); + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + int b; + float sqenergy; + dist += quantize_band_cost_cached(s, w + w2, g, coefs + w2*128, + scaled + w2*128, + sce->ics.swb_sizes[g], + sce->sf_idx[w*16+g]-1, + cb, + 1.0f, + INFINITY, + &b, &sqenergy, + 0); + bits += b; + qenergy += sqenergy; + } + sce->sf_idx[w*16+g]--; + dists[w*16+g] = dist - bits; + qenergies[w*16+g] = qenergy; + if (mb && (sce->sf_idx[w*16+g] < mindeltasf || ( + (dists[w*16+g] < FFMIN(uplmax*uplims[w*16+g], euplims[w*16+g])) + && (fabsf(qenergies[w*16+g]-energies[w*16+g]) < euplims[w*16+g]) + ) )) { + break; + } + } + } else if (tbits > toofewbits && sce->sf_idx[w*16+g] < FFMIN(maxdeltasf, maxsf[w*16+g]) + && (dists[w*16+g] < FFMIN(euplims[w*16+g], uplims[w*16+g])) + && (fabsf(qenergies[w*16+g]-energies[w*16+g]) < euplims[w*16+g]) + ) { + /** Um... over target. Save bits for more important stuff. */ + for (i = 0; i < depth && sce->sf_idx[w*16+g] < maxdeltasf; ++i) { + int cb, bits; + float dist, qenergy; + cb = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]+1); + if (cb > 0) { + dist = qenergy = 0.f; + bits = 0; + for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { + int b; + float sqenergy; + dist += quantize_band_cost_cached(s, w + w2, g, coefs + w2*128, + scaled + w2*128, + sce->ics.swb_sizes[g], + sce->sf_idx[w*16+g]+1, + cb, + 1.0f, + INFINITY, + &b, &sqenergy, + 0); + bits += b; + qenergy += sqenergy; + } + dist -= bits; + if (dist < FFMIN(euplims[w*16+g], uplims[w*16+g])) { + sce->sf_idx[w*16+g]++; + dists[w*16+g] = dist; + qenergies[w*16+g] = qenergy; + } else { + break; + } + } else { + maxsf[w*16+g] = FFMIN(sce->sf_idx[w*16+g], maxsf[w*16+g]); + break; + } + } + } + prev = sce->sf_idx[w*16+g] = av_clip(sce->sf_idx[w*16+g], mindeltasf, maxdeltasf); + if (sce->sf_idx[w*16+g] != prevsc) + fflag = 1; + nminscaler = FFMIN(nminscaler, sce->sf_idx[w*16+g]); + sce->band_type[w*16+g] = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + } + start += sce->ics.swb_sizes[g]; + } + } + + /** SF difference limit violation risk. Must re-clamp. */ + prev = -1; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = 0; g < sce->ics.num_swb; g++) { + if (!sce->zeroes[w*16+g]) { + int prevsf = sce->sf_idx[w*16+g]; + if (prev < 0) + prev = prevsf; + sce->sf_idx[w*16+g] = av_clip(sce->sf_idx[w*16+g], prev - SCALE_MAX_DIFF, prev + SCALE_MAX_DIFF); + sce->band_type[w*16+g] = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + prev = sce->sf_idx[w*16+g]; + if (!fflag && prevsf != sce->sf_idx[w*16+g]) + fflag = 1; + } + } + } + + its++; + } while (fflag && its < maxits); + + /** Scout out next nonzero bands */ + ff_init_nextband_map(sce, nextband); + + prev = -1; + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + /** Make sure proper codebooks are set */ + for (g = 0; g < sce->ics.num_swb; g++) { + if (!sce->zeroes[w*16+g]) { + sce->band_type[w*16+g] = find_min_book(maxvals[w*16+g], sce->sf_idx[w*16+g]); + if (sce->band_type[w*16+g] <= 0) { + if (!ff_sfdelta_can_remove_band(sce, nextband, prev, w*16+g)) { + /** Cannot zero out, make sure it's not attempted */ + sce->band_type[w*16+g] = 1; + } else { + sce->zeroes[w*16+g] = 1; + sce->band_type[w*16+g] = 0; + } + } + } else { + sce->band_type[w*16+g] = 0; + } + /** Check that there's no SF delta range violations */ + if (!sce->zeroes[w*16+g]) { + if (prev != -1) { + av_unused int sfdiff = sce->sf_idx[w*16+g] - prev + SCALE_DIFF_ZERO; + av_assert1(sfdiff >= 0 && sfdiff <= 2*SCALE_MAX_DIFF); + } else if (sce->zeroes[0]) { + /** Set global gain to something useful */ + sce->sf_idx[0] = sce->sf_idx[w*16+g]; + } + prev = sce->sf_idx[w*16+g]; + } + } + } +} + +#endif /* AVCODEC_AACCODER_TWOLOOP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacdectab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacdectab.h new file mode 100644 index 00000000..baf51a74 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacdectab.h @@ -0,0 +1,74 @@ +/* + * AAC decoder data + * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) + * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC decoder data + * @author Oded Shimon ( ods15 ods15 dyndns org ) + * @author Maxim Gavrilov ( maxim.gavrilov gmail com ) + */ + +#ifndef AVCODEC_AACDECTAB_H +#define AVCODEC_AACDECTAB_H + +#include "libavutil/channel_layout.h" +#include "aac.h" + +#include + +static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 4, 5, 0, 5, 0 }; + +static const uint8_t aac_channel_layout_map[16][5][3] = { + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, }, + { { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_SCE, 1, AAC_CHANNEL_BACK }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_FRONT }, { TYPE_CPE, 2, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, + { { 0, } }, + { { 0, } }, + { { 0, } }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, { TYPE_SCE, 1, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, + { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_SIDE }, { TYPE_CPE, 2, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, + { { 0, } }, + /* TODO: Add 7+1 TOP configuration */ +}; + +static const uint64_t aac_channel_layout[16] = { + AV_CH_LAYOUT_MONO, + AV_CH_LAYOUT_STEREO, + AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_4POINT0, + AV_CH_LAYOUT_5POINT0_BACK, + AV_CH_LAYOUT_5POINT1_BACK, + AV_CH_LAYOUT_7POINT1_WIDE_BACK, + 0, + 0, + 0, + AV_CH_LAYOUT_6POINT1, + AV_CH_LAYOUT_7POINT1, + 0, + /* AV_CH_LAYOUT_7POINT1_TOP, */ +}; + +#endif /* AVCODEC_AACDECTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc.h new file mode 100644 index 00000000..5a015ca9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc.h @@ -0,0 +1,428 @@ +/* + * AAC encoder + * Copyright (C) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACENC_H +#define AVCODEC_AACENC_H + +#include "libavutil/float_dsp.h" +#include "avcodec.h" +#include "put_bits.h" + +#include "aac.h" +#include "audio_frame_queue.h" +#include "psymodel.h" + +#include "lpc.h" + +typedef enum AACCoder { + AAC_CODER_ANMR = 0, + AAC_CODER_TWOLOOP, + AAC_CODER_FAST, + + AAC_CODER_NB, +}AACCoder; + +typedef struct AACEncOptions { + int coder; + int pns; + int tns; + int ltp; + int pce; + int pred; + int mid_side; + int intensity_stereo; +} AACEncOptions; + +struct AACEncContext; + +typedef struct AACCoefficientsEncoder { + void (*search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s, + SingleChannelElement *sce, const float lambda); + void (*encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce, + int win, int group_len, const float lambda); + void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, + int scale_idx, int cb, const float lambda, int rtz); + void (*encode_tns_info)(struct AACEncContext *s, SingleChannelElement *sce); + void (*encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window); + void (*encode_main_pred)(struct AACEncContext *s, SingleChannelElement *sce); + void (*adjust_common_pred)(struct AACEncContext *s, ChannelElement *cpe); + void (*adjust_common_ltp)(struct AACEncContext *s, ChannelElement *cpe); + void (*apply_main_pred)(struct AACEncContext *s, SingleChannelElement *sce); + void (*apply_tns_filt)(struct AACEncContext *s, SingleChannelElement *sce); + void (*update_ltp)(struct AACEncContext *s, SingleChannelElement *sce); + void (*ltp_insert_new_frame)(struct AACEncContext *s); + void (*set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce); + void (*search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce); + void (*mark_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce); + void (*search_for_tns)(struct AACEncContext *s, SingleChannelElement *sce); + void (*search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window); + void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe); + void (*search_for_is)(struct AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe); + void (*search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce); +} AACCoefficientsEncoder; + +extern const AACCoefficientsEncoder ff_aac_coders[]; + +typedef struct AACQuantizeBandCostCacheEntry { + float rd; + float energy; + int bits; + char cb; + char rtz; + uint16_t generation; +} AACQuantizeBandCostCacheEntry; + +typedef struct AACPCEInfo { + int64_t layout; + int num_ele[4]; ///< front, side, back, lfe + int pairing[3][8]; ///< front, side, back + int index[4][8]; ///< front, side, back, lfe + uint8_t config_map[16]; ///< configs the encoder's channel specific settings + uint8_t reorder_map[16]; ///< maps channels from lavc to aac order +} AACPCEInfo; + +/** + * List of PCE (Program Configuration Element) for the channel layouts listed + * in channel_layout.h + * + * For those wishing in the future to add other layouts: + * + * - num_ele: number of elements in each group of front, side, back, lfe channels + * (an element is of type SCE (single channel), CPE (channel pair) for + * the first 3 groups; and is LFE for LFE group). + * + * - pairing: 0 for an SCE element or 1 for a CPE; does not apply to LFE group + * + * - index: there are three independent indices for SCE, CPE and LFE; + * they are incremented irrespective of the group to which the element belongs; + * they are not reset when going from one group to another + * + * Example: for 7.0 channel layout, + * .pairing = { { 1, 0 }, { 1 }, { 1 }, }, (3 CPE and 1 SCE in front group) + * .index = { { 0, 0 }, { 1 }, { 2 }, }, + * (index is 0 for the single SCE but goes from 0 to 2 for the CPEs) + * + * The index order impacts the channel ordering. But is otherwise arbitrary + * (the sequence could have been 2, 0, 1 instead of 0, 1, 2). + * + * Spec allows for discontinuous indices, e.g. if one has a total of two SCE, + * SCE.0 SCE.15 is OK per spec; BUT it won't be decoded by our AAC decoder + * which at this time requires that indices fully cover some range starting + * from 0 (SCE.1 SCE.0 is OK but not SCE.0 SCE.15). + * + * - config_map: total number of elements and their types. Beware, the way the + * types are ordered impacts the final channel ordering. + * + * - reorder_map: reorders the channels. + * + */ +static const AACPCEInfo aac_pce_configs[] = { + { + .layout = AV_CH_LAYOUT_MONO, + .num_ele = { 1, 0, 0, 0 }, + .pairing = { { 0 }, }, + .index = { { 0 }, }, + .config_map = { 1, TYPE_SCE, }, + .reorder_map = { 0 }, + }, + { + .layout = AV_CH_LAYOUT_STEREO, + .num_ele = { 1, 0, 0, 0 }, + .pairing = { { 1 }, }, + .index = { { 0 }, }, + .config_map = { 1, TYPE_CPE, }, + .reorder_map = { 0, 1 }, + }, + { + .layout = AV_CH_LAYOUT_2POINT1, + .num_ele = { 1, 0, 0, 1 }, + .pairing = { { 1 }, }, + .index = { { 0 },{ 0 },{ 0 },{ 0 } }, + .config_map = { 2, TYPE_CPE, TYPE_LFE }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CH_LAYOUT_2_1, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 },{ 0 },{ 0 } }, + .index = { { 0 },{ 0 },{ 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CH_LAYOUT_SURROUND, + .num_ele = { 2, 0, 0, 0 }, + .pairing = { { 1, 0 }, }, + .index = { { 0, 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CH_LAYOUT_3POINT1, + .num_ele = { 2, 0, 0, 1 }, + .pairing = { { 1, 0 }, }, + .index = { { 0, 0 }, { 0 }, { 0 }, { 0 }, }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_LFE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_4POINT0, + .num_ele = { 2, 0, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 0 }, }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_4POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, { 0 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_2_2, + .num_ele = { 1, 1, 0, 0 }, + .pairing = { { 1 }, { 1 }, }, + .index = { { 0 }, { 1 }, }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_QUAD, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 }, { 0 }, { 1 }, }, + .index = { { 0 }, { 0 }, { 1 } }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT0, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT0_BACK, + .num_ele = { 2, 0, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 } }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT1_BACK, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT0_FRONT, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 1 }, { 1 } }, + .index = { { 1, 0 }, { 2 }, }, + .config_map = { 3, TYPE_CPE, TYPE_CPE, TYPE_CPE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_HEXAGONAL, + .num_ele = { 2, 0, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 0 },{ 1, 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 1 },{ 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1_FRONT, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT0_FRONT, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1_WIDE, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 },{ 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1_WIDE_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_OCTAGONAL, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2, 1 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { /* Meant for order 2/mixed ambisonics */ + .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER, + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 0 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1, 1 }, { 2, 2 } }, + .config_map = { 6, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, + }, + { /* Meant for order 2/mixed ambisonics */ + .layout = AV_CH_LAYOUT_6POINT0_FRONT | AV_CH_BACK_CENTER | + AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT | AV_CH_TOP_CENTER, + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 1 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 1 }, { 2, 0 }, { 3, 1 } }, + .config_map = { 6, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, + }, + { + .layout = AV_CH_LAYOUT_HEXADECAGONAL, + .num_ele = { 4, 2, 4, 0 }, + .pairing = { { 1, 0, 1, 0 }, { 1, 1 }, { 1, 0, 1, 0 }, }, + .index = { { 0, 0, 1, 1 }, { 2, 3 }, { 4, 2, 5, 3 } }, + .config_map = { 10, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + }, +}; + +/** + * AAC encoder context + */ +typedef struct AACEncContext { + AVClass *av_class; + AACEncOptions options; ///< encoding options + PutBitContext pb; + FFTContext mdct1024; ///< long (1024 samples) frame transform context + FFTContext mdct128; ///< short (128 samples) frame transform context + AVFloatDSPContext *fdsp; + AACPCEInfo pce; ///< PCE data, if needed + float *planar_samples[16]; ///< saved preprocessed input + + int profile; ///< copied from avctx + int needs_pce; ///< flag for non-standard layout + LPCContext lpc; ///< used by TNS + int samplerate_index; ///< MPEG-4 samplerate index + int channels; ///< channel count + const uint8_t *reorder_map; ///< lavc to aac reorder map + const uint8_t *chan_map; ///< channel configuration map + + ChannelElement *cpe; ///< channel elements + FFPsyContext psy; + struct FFPsyPreprocessContext* psypp; + const AACCoefficientsEncoder *coder; + int cur_channel; ///< current channel for coder context + int random_state; + float lambda; + int last_frame_pb_count; ///< number of bits for the previous frame + float lambda_sum; ///< sum(lambda), for Qvg reporting + int lambda_count; ///< count(lambda), for Qvg reporting + enum RawDataBlockType cur_type; ///< channel group type cur_channel belongs to + + AudioFrameQueue afq; + DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients + DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients + + uint16_t quantize_band_cost_cache_generation; + AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]; ///< memoization area for quantize_band_cost + + void (*abs_pow34)(float *out, const float *in, const int size); + void (*quant_bands)(int *out, const float *in, const float *scaled, + int size, int is_signed, int maxval, const float Q34, + const float rounding); + + struct { + float *samples; + } buffer; +} AACEncContext; + +void ff_aac_dsp_init_x86(AACEncContext *s); +void ff_aac_coder_init_mips(AACEncContext *c); +void ff_quantize_band_cost_cache_init(struct AACEncContext *s); + + +#endif /* AVCODEC_AACENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_is.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_is.h new file mode 100644 index 00000000..269fd1a9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_is.h @@ -0,0 +1,51 @@ +/* + * AAC encoder intensity stereo + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder Intensity Stereo + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_IS_H +#define AVCODEC_AACENC_IS_H + +#include "aacenc.h" + +/** Frequency in Hz for lower limit of intensity stereo **/ +#define INT_STEREO_LOW_LIMIT 6100 + +struct AACISError { + int pass; /* 1 if dist2 <= dist1 */ + int phase; /* -1 or +1 */ + float error; /* fabs(dist1 - dist2) */ + float dist1; /* From original coeffs */ + float dist2; /* From IS'd coeffs */ + float ener01; +}; + +struct AACISError ff_aac_is_encoding_err(AACEncContext *s, ChannelElement *cpe, + int start, int w, int g, float ener0, + float ener1, float ener01, + int use_pcoeffs, int phase); +void ff_aac_search_for_is(AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe); + +#endif /* AVCODEC_AACENC_IS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_ltp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_ltp.h new file mode 100644 index 00000000..72768784 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_ltp.h @@ -0,0 +1,41 @@ +/* + * AAC encoder long term prediction extension + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder long term prediction extension + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_LTP_H +#define AVCODEC_AACENC_LTP_H + +#include "aacenc.h" + +void ff_aac_encode_ltp_info(AACEncContext *s, SingleChannelElement *sce, + int common_window); +void ff_aac_update_ltp(AACEncContext *s, SingleChannelElement *sce); +void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe); +void ff_aac_ltp_insert_new_frame(AACEncContext *s); +void ff_aac_search_for_ltp(AACEncContext *s, SingleChannelElement *sce, + int common_window); + +#endif /* AVCODEC_AACENC_LTP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_pred.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_pred.h new file mode 100644 index 00000000..aa305f45 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_pred.h @@ -0,0 +1,47 @@ +/* + * AAC encoder main-type prediction + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder main-type prediction + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_PRED_H +#define AVCODEC_AACENC_PRED_H + +#include "aacenc.h" + +/* Every predictor group needs to get reset at least once in this many frames */ +#define PRED_RESET_FRAME_MIN 240 + +/* Any frame with less than this amount of frames since last reset is ok */ +#define PRED_RESET_MIN 64 + +/* Raise to filter any low frequency artifacts due to prediction */ +#define PRED_SFB_START 10 + +void ff_aac_apply_main_pred(AACEncContext *s, SingleChannelElement *sce); +void ff_aac_adjust_common_pred(AACEncContext *s, ChannelElement *cpe); +void ff_aac_search_for_pred(AACEncContext *s, SingleChannelElement *sce); +void ff_aac_encode_main_pred(AACEncContext *s, SingleChannelElement *sce); + +#endif /* AVCODEC_AACENC_PRED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization.h new file mode 100644 index 00000000..fc5a46b8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization.h @@ -0,0 +1,283 @@ +/* + * AAC encoder quantizer + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder quantizer + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_QUANTIZATION_H +#define AVCODEC_AACENC_QUANTIZATION_H + +#include "aactab.h" +#include "aacenc.h" +#include "aacenctab.h" +#include "aacenc_utils.h" + +/** + * Calculate rate distortion cost for quantizing with given codebook + * + * @return quantization distortion + */ +static av_always_inline float quantize_and_encode_band_cost_template( + struct AACEncContext *s, + PutBitContext *pb, const float *in, float *out, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy, int BT_ZERO, int BT_UNSIGNED, + int BT_PAIR, int BT_ESC, int BT_NOISE, int BT_STEREO, + const float ROUNDING) +{ + const int q_idx = POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512; + const float Q = ff_aac_pow2sf_tab [q_idx]; + const float Q34 = ff_aac_pow34sf_tab[q_idx]; + const float IQ = ff_aac_pow2sf_tab [POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; + const float CLIPPED_ESCAPE = 165140.0f*IQ; + int i, j; + float cost = 0; + float qenergy = 0; + const int dim = BT_PAIR ? 2 : 4; + int resbits = 0; + int off; + + if (BT_ZERO || BT_NOISE || BT_STEREO) { + for (i = 0; i < size; i++) + cost += in[i]*in[i]; + if (bits) + *bits = 0; + if (energy) + *energy = qenergy; + if (out) { + for (i = 0; i < size; i += dim) + for (j = 0; j < dim; j++) + out[i+j] = 0.0f; + } + return cost * lambda; + } + if (!scaled) { + s->abs_pow34(s->scoefs, in, size); + scaled = s->scoefs; + } + s->quant_bands(s->qcoefs, in, scaled, size, !BT_UNSIGNED, aac_cb_maxval[cb], Q34, ROUNDING); + if (BT_UNSIGNED) { + off = 0; + } else { + off = aac_cb_maxval[cb]; + } + for (i = 0; i < size; i += dim) { + const float *vec; + int *quants = s->qcoefs + i; + int curidx = 0; + int curbits; + float quantized, rd = 0.0f; + for (j = 0; j < dim; j++) { + curidx *= aac_cb_range[cb]; + curidx += quants[j] + off; + } + curbits = ff_aac_spectral_bits[cb-1][curidx]; + vec = &ff_aac_codebook_vectors[cb-1][curidx*dim]; + if (BT_UNSIGNED) { + for (j = 0; j < dim; j++) { + float t = fabsf(in[i+j]); + float di; + if (BT_ESC && vec[j] == 64.0f) { //FIXME: slow + if (t >= CLIPPED_ESCAPE) { + quantized = CLIPPED_ESCAPE; + curbits += 21; + } else { + int c = av_clip_uintp2(quant(t, Q, ROUNDING), 13); + quantized = c*cbrtf(c)*IQ; + curbits += av_log2(c)*2 - 4 + 1; + } + } else { + quantized = vec[j]*IQ; + } + di = t - quantized; + if (out) + out[i+j] = in[i+j] >= 0 ? quantized : -quantized; + if (vec[j] != 0.0f) + curbits++; + qenergy += quantized*quantized; + rd += di*di; + } + } else { + for (j = 0; j < dim; j++) { + quantized = vec[j]*IQ; + qenergy += quantized*quantized; + if (out) + out[i+j] = quantized; + rd += (in[i+j] - quantized)*(in[i+j] - quantized); + } + } + cost += rd * lambda + curbits; + resbits += curbits; + if (cost >= uplim) + return uplim; + if (pb) { + put_bits(pb, ff_aac_spectral_bits[cb-1][curidx], ff_aac_spectral_codes[cb-1][curidx]); + if (BT_UNSIGNED) + for (j = 0; j < dim; j++) + if (ff_aac_codebook_vectors[cb-1][curidx*dim+j] != 0.0f) + put_bits(pb, 1, in[i+j] < 0.0f); + if (BT_ESC) { + for (j = 0; j < 2; j++) { + if (ff_aac_codebook_vectors[cb-1][curidx*2+j] == 64.0f) { + int coef = av_clip_uintp2(quant(fabsf(in[i+j]), Q, ROUNDING), 13); + int len = av_log2(coef); + + put_bits(pb, len - 4 + 1, (1 << (len - 4 + 1)) - 2); + put_sbits(pb, len, coef); + } + } + } + } + } + + if (bits) + *bits = resbits; + if (energy) + *energy = qenergy; + return cost; +} + +static inline float quantize_and_encode_band_cost_NONE(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *quant, const float *scaled, + int size, int scale_idx, int cb, + const float lambda, const float uplim, + int *bits, float *energy) { + av_assert0(0); + return 0.0f; +} + +#define QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NAME, BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, ROUNDING) \ +static float quantize_and_encode_band_cost_ ## NAME( \ + struct AACEncContext *s, \ + PutBitContext *pb, const float *in, float *quant, \ + const float *scaled, int size, int scale_idx, \ + int cb, const float lambda, const float uplim, \ + int *bits, float *energy) { \ + return quantize_and_encode_band_cost_template( \ + s, pb, in, quant, scaled, size, scale_idx, \ + BT_ESC ? ESC_BT : cb, lambda, uplim, bits, energy, \ + BT_ZERO, BT_UNSIGNED, BT_PAIR, BT_ESC, BT_NOISE, BT_STEREO, \ + ROUNDING); \ +} + +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ZERO, 1, 0, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SQUAD, 0, 0, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UQUAD, 0, 1, 0, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(SPAIR, 0, 0, 1, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(UPAIR, 0, 1, 1, 0, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC, 0, 1, 1, 1, 0, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC_RTZ, 0, 1, 1, 1, 0, 0, ROUND_TO_ZERO) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NOISE, 0, 0, 0, 0, 1, 0, ROUND_STANDARD) +QUANTIZE_AND_ENCODE_BAND_COST_FUNC(STEREO,0, 0, 0, 0, 0, 1, ROUND_STANDARD) + +static float (*const quantize_and_encode_band_cost_arr[])( + struct AACEncContext *s, + PutBitContext *pb, const float *in, float *quant, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy) = { + quantize_and_encode_band_cost_ZERO, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_ESC, + quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ + quantize_and_encode_band_cost_NOISE, + quantize_and_encode_band_cost_STEREO, + quantize_and_encode_band_cost_STEREO, +}; + +static float (*const quantize_and_encode_band_cost_rtz_arr[])( + struct AACEncContext *s, + PutBitContext *pb, const float *in, float *quant, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy) = { + quantize_and_encode_band_cost_ZERO, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_SQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_UQUAD, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_SPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_UPAIR, + quantize_and_encode_band_cost_ESC_RTZ, + quantize_and_encode_band_cost_NONE, /* CB 12 doesn't exist */ + quantize_and_encode_band_cost_NOISE, + quantize_and_encode_band_cost_STEREO, + quantize_and_encode_band_cost_STEREO, +}; + +#define quantize_and_encode_band_cost( \ + s, pb, in, quant, scaled, size, scale_idx, cb, \ + lambda, uplim, bits, energy, rtz) \ + ((rtz) ? quantize_and_encode_band_cost_rtz_arr : quantize_and_encode_band_cost_arr)[cb]( \ + s, pb, in, quant, scaled, size, scale_idx, cb, \ + lambda, uplim, bits, energy) + +static inline float quantize_band_cost(struct AACEncContext *s, const float *in, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy, int rtz) +{ + return quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, + cb, lambda, uplim, bits, energy, rtz); +} + +static inline int quantize_band_cost_bits(struct AACEncContext *s, const float *in, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy, int rtz) +{ + int auxbits; + quantize_and_encode_band_cost(s, NULL, in, NULL, scaled, size, scale_idx, + cb, 0.0f, uplim, &auxbits, energy, rtz); + if (bits) { + *bits = auxbits; + } + return auxbits; +} + +static inline void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb, + const float *in, float *out, int size, int scale_idx, + int cb, const float lambda, int rtz) +{ + quantize_and_encode_band_cost(s, pb, in, out, NULL, size, scale_idx, cb, lambda, + INFINITY, NULL, NULL, rtz); +} + +#include "aacenc_quantization_misc.h" + +#endif /* AVCODEC_AACENC_QUANTIZATION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization_misc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization_misc.h new file mode 100644 index 00000000..28676ca8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_quantization_misc.h @@ -0,0 +1,53 @@ +/* + * AAC encoder quantization + * Copyright (C) 2015 Claudio Freire + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder quantization misc reusable function templates + * @author Claudio Freire ( klaussfreire gmail com ) + */ + +#ifndef AVCODEC_AACENC_QUANTIZATION_MISC_H +#define AVCODEC_AACENC_QUANTIZATION_MISC_H + +static inline float quantize_band_cost_cached(struct AACEncContext *s, int w, int g, const float *in, + const float *scaled, int size, int scale_idx, + int cb, const float lambda, const float uplim, + int *bits, float *energy, int rtz) +{ + AACQuantizeBandCostCacheEntry *entry; + av_assert1(scale_idx >= 0 && scale_idx < 256); + entry = &s->quantize_band_cost_cache[scale_idx][w*16+g]; + if (entry->generation != s->quantize_band_cost_cache_generation || entry->cb != cb || entry->rtz != rtz) { + entry->rd = quantize_band_cost(s, in, scaled, size, scale_idx, + cb, lambda, uplim, &entry->bits, &entry->energy, rtz); + entry->cb = cb; + entry->rtz = rtz; + entry->generation = s->quantize_band_cost_cache_generation; + } + if (bits) + *bits = entry->bits; + if (energy) + *energy = entry->energy; + return entry->rd; +} + +#endif /* AVCODEC_AACENC_QUANTIZATION_MISC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_tns.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_tns.h new file mode 100644 index 00000000..466738dd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_tns.h @@ -0,0 +1,37 @@ +/* + * AAC encoder TNS + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder temporal noise shaping + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_TNS_H +#define AVCODEC_AACENC_TNS_H + +#include "aacenc.h" + +void ff_aac_encode_tns_info(AACEncContext *s, SingleChannelElement *sce); +void ff_aac_apply_tns(AACEncContext *s, SingleChannelElement *sce); +void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce); + +#endif /* AVCODEC_AACENC_TNS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_utils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_utils.h new file mode 100644 index 00000000..bef4c103 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenc_utils.h @@ -0,0 +1,279 @@ +/* + * AAC encoder utilities + * Copyright (C) 2015 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder utilities + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENC_UTILS_H +#define AVCODEC_AACENC_UTILS_H + +#include "libavutil/ffmath.h" +#include "aac.h" +#include "aacenctab.h" +#include "aactab.h" + +#define ROUND_STANDARD 0.4054f +#define ROUND_TO_ZERO 0.1054f +#define C_QUANT 0.4054f + +static inline void abs_pow34_v(float *out, const float *in, const int size) +{ + int i; + for (i = 0; i < size; i++) { + float a = fabsf(in[i]); + out[i] = sqrtf(a * sqrtf(a)); + } +} + +static inline float pos_pow34(float a) +{ + return sqrtf(a * sqrtf(a)); +} + +/** + * Quantize one coefficient. + * @return absolute value of the quantized coefficient + * @see 3GPP TS26.403 5.6.2 "Scalefactor determination" + */ +static inline int quant(float coef, const float Q, const float rounding) +{ + float a = coef * Q; + return sqrtf(a * sqrtf(a)) + rounding; +} + +static inline void quantize_bands(int *out, const float *in, const float *scaled, + int size, int is_signed, int maxval, const float Q34, + const float rounding) +{ + int i; + for (i = 0; i < size; i++) { + float qc = scaled[i] * Q34; + int tmp = (int)FFMIN(qc + rounding, (float)maxval); + if (is_signed && in[i] < 0.0f) { + tmp = -tmp; + } + out[i] = tmp; + } +} + +static inline float find_max_val(int group_len, int swb_size, const float *scaled) +{ + float maxval = 0.0f; + int w2, i; + for (w2 = 0; w2 < group_len; w2++) { + for (i = 0; i < swb_size; i++) { + maxval = FFMAX(maxval, scaled[w2*128+i]); + } + } + return maxval; +} + +static inline int find_min_book(float maxval, int sf) +{ + float Q34 = ff_aac_pow34sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - SCALE_DIV_512]; + int qmaxval, cb; + qmaxval = maxval * Q34 + C_QUANT; + if (qmaxval >= (FF_ARRAY_ELEMS(aac_maxval_cb))) + cb = 11; + else + cb = aac_maxval_cb[qmaxval]; + return cb; +} + +static inline float find_form_factor(int group_len, int swb_size, float thresh, + const float *scaled, float nzslope) { + const float iswb_size = 1.0f / swb_size; + const float iswb_sizem1 = 1.0f / (swb_size - 1); + const float ethresh = thresh; + float form = 0.0f, weight = 0.0f; + int w2, i; + for (w2 = 0; w2 < group_len; w2++) { + float e = 0.0f, e2 = 0.0f, var = 0.0f, maxval = 0.0f; + float nzl = 0; + for (i = 0; i < swb_size; i++) { + float s = fabsf(scaled[w2*128+i]); + maxval = FFMAX(maxval, s); + e += s; + e2 += s *= s; + /* We really don't want a hard non-zero-line count, since + * even below-threshold lines do add up towards band spectral power. + * So, fall steeply towards zero, but smoothly + */ + if (s >= ethresh) { + nzl += 1.0f; + } else { + if (nzslope == 2.f) + nzl += (s / ethresh) * (s / ethresh); + else + nzl += ff_fast_powf(s / ethresh, nzslope); + } + } + if (e2 > thresh) { + float frm; + e *= iswb_size; + + /** compute variance */ + for (i = 0; i < swb_size; i++) { + float d = fabsf(scaled[w2*128+i]) - e; + var += d*d; + } + var = sqrtf(var * iswb_sizem1); + + e2 *= iswb_size; + frm = e / FFMIN(e+4*var,maxval); + form += e2 * sqrtf(frm) / FFMAX(0.5f,nzl); + weight += e2; + } + } + if (weight > 0) { + return form / weight; + } else { + return 1.0f; + } +} + +/** Return the minimum scalefactor where the quantized coef does not clip. */ +static inline uint8_t coef2minsf(float coef) +{ + return av_clip_uint8(log2f(coef)*4 - 69 + SCALE_ONE_POS - SCALE_DIV_512); +} + +/** Return the maximum scalefactor where the quantized coef is not zero. */ +static inline uint8_t coef2maxsf(float coef) +{ + return av_clip_uint8(log2f(coef)*4 + 6 + SCALE_ONE_POS - SCALE_DIV_512); +} + +/* + * Returns the closest possible index to an array of float values, given a value. + */ +static inline int quant_array_idx(const float val, const float *arr, const int num) +{ + int i, index = 0; + float quant_min_err = INFINITY; + for (i = 0; i < num; i++) { + float error = (val - arr[i])*(val - arr[i]); + if (error < quant_min_err) { + quant_min_err = error; + index = i; + } + } + return index; +} + +/** + * approximates exp10f(-3.0f*(0.5f + 0.5f * cosf(FFMIN(b,15.5f) / 15.5f))) + */ +static av_always_inline float bval2bmax(float b) +{ + return 0.001f + 0.0035f * (b*b*b) / (15.5f*15.5f*15.5f); +} + +/* + * Compute a nextband map to be used with SF delta constraint utilities. + * The nextband array should contain 128 elements, and positions that don't + * map to valid, nonzero bands of the form w*16+g (with w being the initial + * window of the window group, only) are left indetermined. + */ +static inline void ff_init_nextband_map(const SingleChannelElement *sce, uint8_t *nextband) +{ + unsigned char prevband = 0; + int w, g; + /** Just a safe default */ + for (g = 0; g < 128; g++) + nextband[g] = g; + + /** Now really navigate the nonzero band chain */ + for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) { + for (g = 0; g < sce->ics.num_swb; g++) { + if (!sce->zeroes[w*16+g] && sce->band_type[w*16+g] < RESERVED_BT) + prevband = nextband[prevband] = w*16+g; + } + } + nextband[prevband] = prevband; /* terminate */ +} + +/* + * Updates nextband to reflect a removed band (equivalent to + * calling ff_init_nextband_map after marking a band as zero) + */ +static inline void ff_nextband_remove(uint8_t *nextband, int prevband, int band) +{ + nextband[prevband] = nextband[band]; +} + +/* + * Checks whether the specified band could be removed without inducing + * scalefactor delta that violates SF delta encoding constraints. + * prev_sf has to be the scalefactor of the previous nonzero, nonspecial + * band, in encoding order, or negative if there was no such band. + */ +static inline int ff_sfdelta_can_remove_band(const SingleChannelElement *sce, + const uint8_t *nextband, int prev_sf, int band) +{ + return prev_sf >= 0 + && sce->sf_idx[nextband[band]] >= (prev_sf - SCALE_MAX_DIFF) + && sce->sf_idx[nextband[band]] <= (prev_sf + SCALE_MAX_DIFF); +} + +/* + * Checks whether the specified band's scalefactor could be replaced + * with another one without violating SF delta encoding constraints. + * prev_sf has to be the scalefactor of the previous nonzero, nonsepcial + * band, in encoding order, or negative if there was no such band. + */ +static inline int ff_sfdelta_can_replace(const SingleChannelElement *sce, + const uint8_t *nextband, int prev_sf, int new_sf, int band) +{ + return new_sf >= (prev_sf - SCALE_MAX_DIFF) + && new_sf <= (prev_sf + SCALE_MAX_DIFF) + && sce->sf_idx[nextband[band]] >= (new_sf - SCALE_MAX_DIFF) + && sce->sf_idx[nextband[band]] <= (new_sf + SCALE_MAX_DIFF); +} + +/** + * linear congruential pseudorandom number generator + * + * @param previous_val pointer to the current state of the generator + * + * @return Returns a 32-bit pseudorandom integer + */ +static av_always_inline int lcg_random(unsigned previous_val) +{ + union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 }; + return v.s; +} + +#define ERROR_IF(cond, ...) \ + if (cond) { \ + av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \ + return AVERROR(EINVAL); \ + } + +#define WARN_IF(cond, ...) \ + if (cond) { \ + av_log(avctx, AV_LOG_WARNING, __VA_ARGS__); \ + } + +#endif /* AVCODEC_AACENC_UTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenctab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenctab.h new file mode 100644 index 00000000..64932d70 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacenctab.h @@ -0,0 +1,139 @@ +/* + * AAC encoder data + * Copyright (c) 2015 Rostislav Pehlivanov ( atomnuker gmail com ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC encoder data + * @author Rostislav Pehlivanov ( atomnuker gmail com ) + */ + +#ifndef AVCODEC_AACENCTAB_H +#define AVCODEC_AACENCTAB_H + +#include "aac.h" + +/** Total number of usable codebooks **/ +#define CB_TOT 12 + +/** Total number of codebooks, including special ones **/ +#define CB_TOT_ALL 15 + +#define AAC_MAX_CHANNELS 16 + +extern const uint8_t *ff_aac_swb_size_1024[]; +extern const int ff_aac_swb_size_1024_len; +extern const uint8_t *ff_aac_swb_size_128[]; +extern const int ff_aac_swb_size_128_len; + +/* Supported layouts without using a PCE */ +static const int64_t aac_normal_chan_layouts[7] = { + AV_CH_LAYOUT_MONO, + AV_CH_LAYOUT_STEREO, + AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_4POINT0, + AV_CH_LAYOUT_5POINT0_BACK, + AV_CH_LAYOUT_5POINT1_BACK, + AV_CH_LAYOUT_7POINT1, +}; + +/** default channel configurations */ +static const uint8_t aac_chan_configs[AAC_MAX_CHANNELS][6] = { + {1, TYPE_SCE}, // 1 channel - single channel element + {1, TYPE_CPE}, // 2 channels - channel pair + {2, TYPE_SCE, TYPE_CPE}, // 3 channels - center + stereo + {3, TYPE_SCE, TYPE_CPE, TYPE_SCE}, // 4 channels - front center + stereo + back center + {3, TYPE_SCE, TYPE_CPE, TYPE_CPE}, // 5 channels - front center + stereo + back stereo + {4, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_LFE}, // 6 channels - front center + stereo + back stereo + LFE + {0}, // 7 channels - invalid without PCE + {5, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_LFE}, // 8 channels - front center + front stereo + side stereo + back stereo + LFE +}; + +/** + * Table to remap channels from libavcodec's default order to AAC order. + */ +static const uint8_t aac_chan_maps[AAC_MAX_CHANNELS][AAC_MAX_CHANNELS] = { + { 0 }, + { 0, 1 }, + { 2, 0, 1 }, + { 2, 0, 1, 3 }, + { 2, 0, 1, 3, 4 }, + { 2, 0, 1, 4, 5, 3 }, + { 0 }, + { 2, 0, 1, 6, 7, 4, 5, 3 }, +}; + +/* duplicated from avpriv_mpeg4audio_sample_rates to avoid shared build + * failures */ +static const int mpeg4audio_sample_rates[16] = { + 96000, 88200, 64000, 48000, 44100, 32000, + 24000, 22050, 16000, 12000, 11025, 8000, 7350 +}; + +/** bits needed to code codebook run value for long windows */ +static const uint8_t run_value_bits_long[64] = { + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 15 +}; + +/** bits needed to code codebook run value for short windows */ +static const uint8_t run_value_bits_short[16] = { + 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 9 +}; + +/* TNS starting SFBs for long and short windows */ +static const uint8_t tns_min_sfb_short[16] = { + 2, 2, 2, 3, 3, 4, 6, 6, 8, 10, 10, 12, 12, 12, 12, 12 +}; + +static const uint8_t tns_min_sfb_long[16] = { + 12, 13, 15, 16, 17, 20, 25, 26, 24, 28, 30, 31, 31, 31, 31, 31 +}; + +static const uint8_t * const tns_min_sfb[2] = { + tns_min_sfb_long, tns_min_sfb_short +}; + +static const uint8_t * const run_value_bits[2] = { + run_value_bits_long, run_value_bits_short +}; + +/** Map to convert values from BandCodingPath index to a codebook index **/ +static const uint8_t aac_cb_out_map[CB_TOT_ALL] = {0,1,2,3,4,5,6,7,8,9,10,11,13,14,15}; +/** Inverse map to convert from codebooks to BandCodingPath indices **/ +static const uint8_t aac_cb_in_map[CB_TOT_ALL+1] = {0,1,2,3,4,5,6,7,8,9,10,11,0,12,13,14}; + +static const uint8_t aac_cb_range [12] = {0, 3, 3, 3, 3, 9, 9, 8, 8, 13, 13, 17}; +static const uint8_t aac_cb_maxval[12] = {0, 1, 1, 2, 2, 4, 4, 7, 7, 12, 12, 16}; + +static const unsigned char aac_maxval_cb[] = { + 0, 1, 3, 5, 5, 7, 7, 7, 9, 9, 9, 9, 9, 11 +}; + +static const int aacenc_profiles[] = { + FF_PROFILE_AAC_MAIN, + FF_PROFILE_AAC_LOW, + FF_PROFILE_AAC_LTP, + FF_PROFILE_MPEG2_AAC_LOW, +}; + +#endif /* AVCODEC_AACENCTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps.h new file mode 100644 index 00000000..61edce35 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps.h @@ -0,0 +1,86 @@ +/* + * MPEG-4 Parametric Stereo definitions and declarations + * Copyright (c) 2010 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACPS_H +#define AVCODEC_AACPS_H + +#include + +#include "aacpsdsp.h" +#include "avcodec.h" +#include "get_bits.h" + +#define PS_MAX_NUM_ENV 5 +#define PS_MAX_NR_IIDICC 34 +#define PS_MAX_NR_IPDOPD 17 +#define PS_MAX_SSB 91 +#define PS_MAX_AP_BANDS 50 +#define PS_QMF_TIME_SLOTS 32 +#define PS_MAX_DELAY 14 +#define PS_AP_LINKS 3 +#define PS_MAX_AP_DELAY 5 + +typedef struct PSContext { + int start; + int enable_iid; + int iid_quant; + int nr_iid_par; + int nr_ipdopd_par; + int enable_icc; + int icc_mode; + int nr_icc_par; + int enable_ext; + int frame_class; + int num_env_old; + int num_env; + int enable_ipdopd; + int border_position[PS_MAX_NUM_ENV+1]; + int8_t iid_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Intensity Difference Parameters + int8_t icc_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-Channel Coherence Parameters + /* ipd/opd is iid/icc sized so that the same functions can handle both */ + int8_t ipd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Inter-channel Phase Difference Parameters + int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Overall Phase Difference Parameters + int is34bands; + int is34bands_old; + + DECLARE_ALIGNED(16, INTFLOAT, in_buf)[5][44][2]; + DECLARE_ALIGNED(16, INTFLOAT, delay)[PS_MAX_SSB][PS_QMF_TIME_SLOTS + PS_MAX_DELAY][2]; + DECLARE_ALIGNED(16, INTFLOAT, ap_delay)[PS_MAX_AP_BANDS][PS_AP_LINKS][PS_QMF_TIME_SLOTS + PS_MAX_AP_DELAY][2]; + DECLARE_ALIGNED(16, INTFLOAT, peak_decay_nrg)[34]; + DECLARE_ALIGNED(16, INTFLOAT, power_smooth)[34]; + DECLARE_ALIGNED(16, INTFLOAT, peak_decay_diff_smooth)[34]; + DECLARE_ALIGNED(16, INTFLOAT, H11)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC]; + DECLARE_ALIGNED(16, INTFLOAT, H12)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC]; + DECLARE_ALIGNED(16, INTFLOAT, H21)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC]; + DECLARE_ALIGNED(16, INTFLOAT, H22)[2][PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC]; + DECLARE_ALIGNED(16, INTFLOAT, Lbuf)[91][32][2]; + DECLARE_ALIGNED(16, INTFLOAT, Rbuf)[91][32][2]; + int8_t opd_hist[PS_MAX_NR_IIDICC]; + int8_t ipd_hist[PS_MAX_NR_IIDICC]; + PSDSPContext dsp; +} PSContext; + +void AAC_RENAME(ff_ps_init)(void); +void AAC_RENAME(ff_ps_ctx_init)(PSContext *ps); +int AAC_RENAME(ff_ps_read_data)(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int bits_left); +int AAC_RENAME(ff_ps_apply)(AVCodecContext *avctx, PSContext *ps, INTFLOAT L[2][38][64], INTFLOAT R[2][38][64], int top); + +#endif /* AVCODEC_AACPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_fixed_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_fixed_tablegen.h new file mode 100644 index 00000000..8b82deb5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_fixed_tablegen.h @@ -0,0 +1,403 @@ +/* + * Header file for hardcoded Parametric Stereo tables + * + * Copyright (c) 2010 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Note: Rounding-to-nearest used unless otherwise stated + * + */ + +#ifndef AVCODEC_AACPS_FIXED_TABLEGEN_H +#define AVCODEC_AACPS_FIXED_TABLEGEN_H + +#include +#include + +#if CONFIG_HARDCODED_TABLES +#define ps_tableinit() +#define TABLE_CONST const +#include "libavcodec/aacps_fixed_tables.h" +#else +#include "libavutil/common.h" +#include "libavutil/mathematics.h" +#include "libavutil/mem.h" + +#include "aac_defines.h" +#include "libavutil/softfloat.h" +#define NR_ALLPASS_BANDS20 30 +#define NR_ALLPASS_BANDS34 50 +#define PS_AP_LINKS 3 +#define TABLE_CONST +static int pd_re_smooth[8*8*8]; +static int pd_im_smooth[8*8*8]; +static int HA[46][8][4]; +static int HB[46][8][4]; +static DECLARE_ALIGNED(16, int, f20_0_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, int, f34_0_12)[12][8][2]; +static DECLARE_ALIGNED(16, int, f34_1_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, int, f34_2_4) [ 4][8][2]; +static TABLE_CONST DECLARE_ALIGNED(16, int, Q_fract_allpass)[2][50][3][2]; +static DECLARE_ALIGNED(16, int, phi_fract)[2][50][2]; + +static const int g0_Q8[] = { + Q31(0.00746082949812f), Q31(0.02270420949825f), Q31(0.04546865930473f), Q31(0.07266113929591f), + Q31(0.09885108575264f), Q31(0.11793710567217f), Q31(0.125f) +}; + +static const int g0_Q12[] = { + Q31(0.04081179924692f), Q31(0.03812810994926f), Q31(0.05144908135699f), Q31(0.06399831151592f), + Q31(0.07428313801106f), Q31(0.08100347892914f), Q31(0.08333333333333f) +}; + +static const int g1_Q8[] = { + Q31(0.01565675600122f), Q31(0.03752716391991f), Q31(0.05417891378782f), Q31(0.08417044116767f), + Q31(0.10307344158036f), Q31(0.12222452249753f), Q31(0.125f) +}; + +static const int g2_Q4[] = { + Q31(-0.05908211155639f), Q31(-0.04871498374946f), Q31(0.0f), Q31(0.07778723915851f), + Q31( 0.16486303567403f), Q31( 0.23279856662996f), Q31(0.25f) +}; + +static const int sintbl_4[4] = { 0, 1073741824, 0, -1073741824 }; +static const int costbl_4[4] = { 1073741824, 0, -1073741824, 0 }; +static const int sintbl_8[8] = { 0, 759250125, 1073741824, 759250125, + 0, -759250125, -1073741824, -759250125 }; +static const int costbl_8[8] = { 1073741824, 759250125, 0, -759250125, + -1073741824, -759250125, 0, 759250125 }; +static const int sintbl_12[12] = { 0, 536870912, 929887697, 1073741824, + 929887697, 536870912, 0, -536870912, + -929887697, -1073741824, -929887697, -536870912 }; +static const int costbl_12[12] = { 1073741824, 929887697, 536870912, 0, + -536870912, -929887697, -1073741824, -929887697, + -536870912, 0, 536870912, 929887697 }; + +static void make_filters_from_proto(int (*filter)[8][2], const int *proto, int bands) +{ + + const int *sinptr, *cosptr; + int s, c, sinhalf, coshalf; + int q, n; + + if (bands == 4) { + sinptr = sintbl_4; + cosptr = costbl_4; + sinhalf = 759250125; + coshalf = 759250125; + } else if (bands == 8) { + sinptr = sintbl_8; + cosptr = costbl_8; + sinhalf = 410903207; + coshalf = 992008094; + } else { + sinptr = sintbl_12; + cosptr = costbl_12; + sinhalf = 277904834; + coshalf = 1037154959; + } + + for (q = 0; q < bands; q++) { + for (n = 0; n < 7; n++) { + int theta = (q*(n-6) + (n>>1) - 3) % bands; + + if (theta < 0) + theta += bands; + s = sinptr[theta]; + c = cosptr[theta]; + + if (n & 1) { + theta = (int)(((int64_t)c * coshalf - (int64_t)s * sinhalf + 0x20000000) >> 30); + s = (int)(((int64_t)s * coshalf + (int64_t)c * sinhalf + 0x20000000) >> 30); + c = theta; + } + filter[q][n][0] = (int)(((int64_t)proto[n] * c + 0x20000000) >> 30); + filter[q][n][1] = -(int)(((int64_t)proto[n] * s + 0x20000000) >> 30); + } + } +} + +static void ps_tableinit(void) +{ + static const int ipdopd_sin[] = { Q30(0), Q30(M_SQRT1_2), Q30(1), Q30( M_SQRT1_2), Q30( 0), Q30(-M_SQRT1_2), Q30(-1), Q30(-M_SQRT1_2) }; + static const int ipdopd_cos[] = { Q30(1), Q30(M_SQRT1_2), Q30(0), Q30(-M_SQRT1_2), Q30(-1), Q30(-M_SQRT1_2), Q30( 0), Q30( M_SQRT1_2) }; + int pd0, pd1, pd2; + int idx; + + static const int alpha_tab[] = + { + Q30(1.5146213770f/M_PI), Q30(1.5181334019f/M_PI), Q30(1.5234849453f/M_PI), Q30(1.5369486809f/M_PI), Q30(1.5500687361f/M_PI), Q30(1.5679757595f/M_PI), + Q30(1.4455626011f/M_PI), Q30(1.4531552792f/M_PI), Q30(1.4648091793f/M_PI), Q30(1.4945238829f/M_PI), Q30(1.5239057541f/M_PI), Q30(1.5644006729f/M_PI), + Q30(1.3738563061f/M_PI), Q30(1.3851221800f/M_PI), Q30(1.4026404619f/M_PI), Q30(1.4484288692f/M_PI), Q30(1.4949874878f/M_PI), Q30(1.5604078770f/M_PI), + Q30(1.2645189762f/M_PI), Q30(1.2796478271f/M_PI), Q30(1.3038636446f/M_PI), Q30(1.3710125685f/M_PI), Q30(1.4443849325f/M_PI), Q30(1.5532352924f/M_PI), + Q30(1.1507037878f/M_PI), Q30(1.1669205427f/M_PI), Q30(1.1938756704f/M_PI), Q30(1.2754167318f/M_PI), Q30(1.3761177063f/M_PI), Q30(1.5429240465f/M_PI), + Q30(1.0079245567f/M_PI), Q30(1.0208238363f/M_PI), Q30(1.0433073044f/M_PI), Q30(1.1208510399f/M_PI), Q30(1.2424604893f/M_PI), Q30(1.5185726881f/M_PI), + Q30(0.8995233774f/M_PI), Q30(0.9069069624f/M_PI), Q30(0.9201194048f/M_PI), Q30(0.9698365927f/M_PI), Q30(1.0671583414f/M_PI), Q30(1.4647934437f/M_PI), + Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), + Q30(0.6712729335f/M_PI), Q30(0.6638893485f/M_PI), Q30(0.6506769061f/M_PI), Q30(0.6009597182f/M_PI), Q30(0.5036380291f/M_PI), Q30(0.1060028747f/M_PI), + Q30(0.5628717542f/M_PI), Q30(0.5499725342f/M_PI), Q30(0.5274890065f/M_PI), Q30(0.4499453008f/M_PI), Q30(0.3283358216f/M_PI), Q30(0.0522236861f/M_PI), + Q30(0.4200925827f/M_PI), Q30(0.4038758278f/M_PI), Q30(0.3769206405f/M_PI), Q30(0.2953795493f/M_PI), Q30(0.1946786791f/M_PI), Q30(0.0278722942f/M_PI), + Q30(0.3062773645f/M_PI), Q30(0.2911485136f/M_PI), Q30(0.2669326365f/M_PI), Q30(0.1997837722f/M_PI), Q30(0.1264114529f/M_PI), Q30(0.0175609849f/M_PI), + Q30(0.1969399750f/M_PI), Q30(0.1856741160f/M_PI), Q30(0.1681558639f/M_PI), Q30(0.1223674342f/M_PI), Q30(0.0758088827f/M_PI), Q30(0.0103884479f/M_PI), + Q30(0.1252337098f/M_PI), Q30(0.1176410317f/M_PI), Q30(0.1059871912f/M_PI), Q30(0.0762724727f/M_PI), Q30(0.0468905345f/M_PI), Q30(0.0063956482f/M_PI), + Q30(0.0561749674f/M_PI), Q30(0.0526629239f/M_PI), Q30(0.0473113805f/M_PI), Q30(0.0338476151f/M_PI), Q30(0.0207276177f/M_PI), Q30(0.0028205961f/M_PI), + Q30(1.5676341057f/M_PI), Q30(1.5678333044f/M_PI), Q30(1.5681363344f/M_PI), Q30(1.5688960552f/M_PI), Q30(1.5696337223f/M_PI), Q30(1.5706381798f/M_PI), + Q30(1.5651730299f/M_PI), Q30(1.5655272007f/M_PI), Q30(1.5660660267f/M_PI), Q30(1.5674170256f/M_PI), Q30(1.5687289238f/M_PI), Q30(1.5705151558f/M_PI), + Q30(1.5607966185f/M_PI), Q30(1.5614265203f/M_PI), Q30(1.5623844862f/M_PI), Q30(1.5647867918f/M_PI), Q30(1.5671195984f/M_PI), Q30(1.5702962875f/M_PI), + Q30(1.5530153513f/M_PI), Q30(1.5541347265f/M_PI), Q30(1.5558375120f/M_PI), Q30(1.5601085424f/M_PI), Q30(1.5642569065f/M_PI), Q30(1.5699069500f/M_PI), + Q30(1.5391840935f/M_PI), Q30(1.5411708355f/M_PI), Q30(1.5441943407f/M_PI), Q30(1.5517836809f/M_PI), Q30(1.5591609478f/M_PI), Q30(1.5692136288f/M_PI), + Q30(1.5146213770f/M_PI), Q30(1.5181334019f/M_PI), Q30(1.5234849453f/M_PI), Q30(1.5369486809f/M_PI), Q30(1.5500687361f/M_PI), Q30(1.5679757595f/M_PI), + Q30(1.4915299416f/M_PI), Q30(1.4964480400f/M_PI), Q30(1.5039558411f/M_PI), Q30(1.5229074955f/M_PI), Q30(1.5414420366f/M_PI), Q30(1.5667995214f/M_PI), + Q30(1.4590617418f/M_PI), Q30(1.4658898115f/M_PI), Q30(1.4763505459f/M_PI), Q30(1.5029321909f/M_PI), Q30(1.5291173458f/M_PI), Q30(1.5651149750f/M_PI), + Q30(1.4136143923f/M_PI), Q30(1.4229322672f/M_PI), Q30(1.4373078346f/M_PI), Q30(1.4743183851f/M_PI), Q30(1.5113102198f/M_PI), Q30(1.5626684427f/M_PI), + Q30(1.3505556583f/M_PI), Q30(1.3628427982f/M_PI), Q30(1.3820509911f/M_PI), Q30(1.4327841997f/M_PI), Q30(1.4850014448f/M_PI), Q30(1.5590143204f/M_PI), + Q30(1.2645189762f/M_PI), Q30(1.2796478271f/M_PI), Q30(1.3038636446f/M_PI), Q30(1.3710125685f/M_PI), Q30(1.4443849325f/M_PI), Q30(1.5532352924f/M_PI), + Q30(1.1919227839f/M_PI), Q30(1.2081253529f/M_PI), Q30(1.2346779108f/M_PI), Q30(1.3123005629f/M_PI), Q30(1.4034168720f/M_PI), Q30(1.5471596718f/M_PI), + Q30(1.1061993837f/M_PI), Q30(1.1219338179f/M_PI), Q30(1.1484941244f/M_PI), Q30(1.2320860624f/M_PI), Q30(1.3421301842f/M_PI), Q30(1.5373806953f/M_PI), + Q30(1.0079245567f/M_PI), Q30(1.0208238363f/M_PI), Q30(1.0433073044f/M_PI), Q30(1.1208510399f/M_PI), Q30(1.2424604893f/M_PI), Q30(1.5185726881f/M_PI), + Q30(0.8995233774f/M_PI), Q30(0.9069069624f/M_PI), Q30(0.9201194048f/M_PI), Q30(0.9698365927f/M_PI), Q30(1.0671583414f/M_PI), Q30(1.4647934437f/M_PI), + Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), Q30(0.7853981853f/M_PI), + Q30(0.6712729335f/M_PI), Q30(0.6638893485f/M_PI), Q30(0.6506769061f/M_PI), Q30(0.6009597182f/M_PI), Q30(0.5036380291f/M_PI), Q30(0.1060028747f/M_PI), + Q30(0.5628717542f/M_PI), Q30(0.5499725342f/M_PI), Q30(0.5274890065f/M_PI), Q30(0.4499453008f/M_PI), Q30(0.3283358216f/M_PI), Q30(0.0522236861f/M_PI), + Q30(0.4645969570f/M_PI), Q30(0.4488625824f/M_PI), Q30(0.4223022461f/M_PI), Q30(0.3387103081f/M_PI), Q30(0.2286661267f/M_PI), Q30(0.0334156826f/M_PI), + Q30(0.3788735867f/M_PI), Q30(0.3626709878f/M_PI), Q30(0.3361184299f/M_PI), Q30(0.2584958076f/M_PI), Q30(0.1673794836f/M_PI), Q30(0.0236366931f/M_PI), + Q30(0.3062773645f/M_PI), Q30(0.2911485136f/M_PI), Q30(0.2669326365f/M_PI), Q30(0.1997837722f/M_PI), Q30(0.1264114529f/M_PI), Q30(0.0175609849f/M_PI), + Q30(0.2202406377f/M_PI), Q30(0.2079535723f/M_PI), Q30(0.1887452900f/M_PI), Q30(0.1380121708f/M_PI), Q30(0.0857949182f/M_PI), Q30(0.0117820343f/M_PI), + Q30(0.1571819335f/M_PI), Q30(0.1478640437f/M_PI), Q30(0.1334884763f/M_PI), Q30(0.0964778885f/M_PI), Q30(0.0594860613f/M_PI), Q30(0.0081279324f/M_PI), + Q30(0.1117345318f/M_PI), Q30(0.1049065739f/M_PI), Q30(0.0944457650f/M_PI), Q30(0.0678641573f/M_PI), Q30(0.0416790098f/M_PI), Q30(0.0056813755f/M_PI), + Q30(0.0792663917f/M_PI), Q30(0.0743482932f/M_PI), Q30(0.0668405443f/M_PI), Q30(0.0478888862f/M_PI), Q30(0.0293543357f/M_PI), Q30(0.0039967746f/M_PI), + Q30(0.0561749674f/M_PI), Q30(0.0526629239f/M_PI), Q30(0.0473113805f/M_PI), Q30(0.0338476151f/M_PI), Q30(0.0207276177f/M_PI), Q30(0.0028205961f/M_PI), + Q30(0.0316122435f/M_PI), Q30(0.0296254847f/M_PI), Q30(0.0266019460f/M_PI), Q30(0.0190126132f/M_PI), Q30(0.0116353342f/M_PI), Q30(0.0015827164f/M_PI), + Q30(0.0177809205f/M_PI), Q30(0.0166615788f/M_PI), Q30(0.0149587989f/M_PI), Q30(0.0106877899f/M_PI), Q30(0.0065393616f/M_PI), Q30(0.0008894200f/M_PI), + Q30(0.0099996664f/M_PI), Q30(0.0093698399f/M_PI), Q30(0.0084118480f/M_PI), Q30(0.0060095116f/M_PI), Q30(0.0036767013f/M_PI), Q30(0.0005000498f/M_PI), + Q30(0.0056233541f/M_PI), Q30(0.0052691097f/M_PI), Q30(0.0047303112f/M_PI), Q30(0.0033792770f/M_PI), Q30(0.0020674451f/M_PI), Q30(0.0002811795f/M_PI), + Q30(0.0031622672f/M_PI), Q30(0.0029630491f/M_PI), Q30(0.0026600463f/M_PI), Q30(0.0019002859f/M_PI), Q30(0.0011625893f/M_PI), Q30(0.0001581155f/M_PI) + }; + + static const int gamma_tab[] = + { + Q30(0.0000000000f/M_PI), Q30(0.0195873566f/M_PI), Q30(0.0303316917f/M_PI), Q30(0.0448668823f/M_PI), Q30(0.0522258915f/M_PI), Q30(0.0561044961f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0433459543f/M_PI), Q30(0.0672172382f/M_PI), Q30(0.0997167900f/M_PI), Q30(0.1162951663f/M_PI), Q30(0.1250736862f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0672341362f/M_PI), Q30(0.1045235619f/M_PI), Q30(0.1558904350f/M_PI), Q30(0.1824723780f/M_PI), Q30(0.1966800541f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1011129096f/M_PI), Q30(0.1580764502f/M_PI), Q30(0.2387557179f/M_PI), Q30(0.2820728719f/M_PI), Q30(0.3058380187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1315985769f/M_PI), Q30(0.2072522491f/M_PI), Q30(0.3188187480f/M_PI), Q30(0.3825501204f/M_PI), Q30(0.4193951190f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1603866369f/M_PI), Q30(0.2549437582f/M_PI), Q30(0.4029446840f/M_PI), Q30(0.4980689585f/M_PI), Q30(0.5615641475f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1736015975f/M_PI), Q30(0.2773745656f/M_PI), Q30(0.4461984038f/M_PI), Q30(0.5666890144f/M_PI), Q30(0.6686112881f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1784276664f/M_PI), Q30(0.2856673002f/M_PI), Q30(0.4630723596f/M_PI), Q30(0.5971632004f/M_PI), Q30(0.7603877187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1736015975f/M_PI), Q30(0.2773745656f/M_PI), Q30(0.4461984038f/M_PI), Q30(0.5666890144f/M_PI), Q30(0.6686112881f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1603866369f/M_PI), Q30(0.2549437582f/M_PI), Q30(0.4029446840f/M_PI), Q30(0.4980689585f/M_PI), Q30(0.5615641475f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1315985769f/M_PI), Q30(0.2072522491f/M_PI), Q30(0.3188187480f/M_PI), Q30(0.3825501204f/M_PI), Q30(0.4193951190f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1011129096f/M_PI), Q30(0.1580764502f/M_PI), Q30(0.2387557179f/M_PI), Q30(0.2820728719f/M_PI), Q30(0.3058380187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0672341362f/M_PI), Q30(0.1045235619f/M_PI), Q30(0.1558904350f/M_PI), Q30(0.1824723780f/M_PI), Q30(0.1966800541f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0433459543f/M_PI), Q30(0.0672172382f/M_PI), Q30(0.0997167900f/M_PI), Q30(0.1162951663f/M_PI), Q30(0.1250736862f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0195873566f/M_PI), Q30(0.0303316917f/M_PI), Q30(0.0448668823f/M_PI), Q30(0.0522258915f/M_PI), Q30(0.0561044961f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0011053939f/M_PI), Q30(0.0017089852f/M_PI), Q30(0.0025254129f/M_PI), Q30(0.0029398468f/M_PI), Q30(0.0031597170f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0019607407f/M_PI), Q30(0.0030395309f/M_PI), Q30(0.0044951206f/M_PI), Q30(0.0052305623f/M_PI), Q30(0.0056152637f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0034913034f/M_PI), Q30(0.0054070661f/M_PI), Q30(0.0079917293f/M_PI), Q30(0.0092999367f/M_PI), Q30(0.0099875759f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0062100487f/M_PI), Q30(0.0096135242f/M_PI), Q30(0.0142110568f/M_PI), Q30(0.0165348612f/M_PI), Q30(0.0177587029f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0110366223f/M_PI), Q30(0.0170863140f/M_PI), Q30(0.0252620988f/M_PI), Q30(0.0293955617f/M_PI), Q30(0.0315726399f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0195873566f/M_PI), Q30(0.0303316917f/M_PI), Q30(0.0448668823f/M_PI), Q30(0.0522258915f/M_PI), Q30(0.0561044961f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0275881495f/M_PI), Q30(0.0427365713f/M_PI), Q30(0.0632618815f/M_PI), Q30(0.0736731067f/M_PI), Q30(0.0791663304f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0387469754f/M_PI), Q30(0.0600636788f/M_PI), Q30(0.0890387669f/M_PI), Q30(0.1037906483f/M_PI), Q30(0.1115923747f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0541138873f/M_PI), Q30(0.0839984417f/M_PI), Q30(0.1248718798f/M_PI), Q30(0.1458375156f/M_PI), Q30(0.1569785923f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0747506917f/M_PI), Q30(0.1163287833f/M_PI), Q30(0.1738867164f/M_PI), Q30(0.2038587779f/M_PI), Q30(0.2199459076f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1011129096f/M_PI), Q30(0.1580764502f/M_PI), Q30(0.2387557179f/M_PI), Q30(0.2820728719f/M_PI), Q30(0.3058380187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1212290376f/M_PI), Q30(0.1903949380f/M_PI), Q30(0.2907958031f/M_PI), Q30(0.3466993868f/M_PI), Q30(0.3782821596f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1418247074f/M_PI), Q30(0.2240308374f/M_PI), Q30(0.3474813402f/M_PI), Q30(0.4202919006f/M_PI), Q30(0.4637607038f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1603866369f/M_PI), Q30(0.2549437582f/M_PI), Q30(0.4029446840f/M_PI), Q30(0.4980689585f/M_PI), Q30(0.5615641475f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1736015975f/M_PI), Q30(0.2773745656f/M_PI), Q30(0.4461984038f/M_PI), Q30(0.5666890144f/M_PI), Q30(0.6686112881f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1784276664f/M_PI), Q30(0.2856673002f/M_PI), Q30(0.4630723596f/M_PI), Q30(0.5971632004f/M_PI), Q30(0.7603877187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1736015975f/M_PI), Q30(0.2773745656f/M_PI), Q30(0.4461984038f/M_PI), Q30(0.5666890144f/M_PI), Q30(0.6686112881f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1603866369f/M_PI), Q30(0.2549437582f/M_PI), Q30(0.4029446840f/M_PI), Q30(0.4980689585f/M_PI), Q30(0.5615641475f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1418247074f/M_PI), Q30(0.2240308374f/M_PI), Q30(0.3474813402f/M_PI), Q30(0.4202919006f/M_PI), Q30(0.4637607038f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1212290376f/M_PI), Q30(0.1903949380f/M_PI), Q30(0.2907958031f/M_PI), Q30(0.3466993868f/M_PI), Q30(0.3782821596f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.1011129096f/M_PI), Q30(0.1580764502f/M_PI), Q30(0.2387557179f/M_PI), Q30(0.2820728719f/M_PI), Q30(0.3058380187f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0747506917f/M_PI), Q30(0.1163287833f/M_PI), Q30(0.1738867164f/M_PI), Q30(0.2038587779f/M_PI), Q30(0.2199459076f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0541138873f/M_PI), Q30(0.0839984417f/M_PI), Q30(0.1248718798f/M_PI), Q30(0.1458375156f/M_PI), Q30(0.1569785923f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0387469754f/M_PI), Q30(0.0600636788f/M_PI), Q30(0.0890387669f/M_PI), Q30(0.1037906483f/M_PI), Q30(0.1115923747f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0275881495f/M_PI), Q30(0.0427365713f/M_PI), Q30(0.0632618815f/M_PI), Q30(0.0736731067f/M_PI), Q30(0.0791663304f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0195873566f/M_PI), Q30(0.0303316917f/M_PI), Q30(0.0448668823f/M_PI), Q30(0.0522258915f/M_PI), Q30(0.0561044961f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0110366223f/M_PI), Q30(0.0170863140f/M_PI), Q30(0.0252620988f/M_PI), Q30(0.0293955617f/M_PI), Q30(0.0315726399f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0062100487f/M_PI), Q30(0.0096135242f/M_PI), Q30(0.0142110568f/M_PI), Q30(0.0165348612f/M_PI), Q30(0.0177587029f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0034913034f/M_PI), Q30(0.0054070661f/M_PI), Q30(0.0079917293f/M_PI), Q30(0.0092999367f/M_PI), Q30(0.0099875759f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0019607407f/M_PI), Q30(0.0030395309f/M_PI), Q30(0.0044951206f/M_PI), Q30(0.0052305623f/M_PI), Q30(0.0056152637f/M_PI), + Q30(0.0000000000f/M_PI), Q30(0.0011053939f/M_PI), Q30(0.0017089852f/M_PI), Q30(0.0025254129f/M_PI), Q30(0.0029398468f/M_PI), Q30(0.0031597170f/M_PI) + }; + + static const int iid_par_dequant_c1[] = { + //iid_par_dequant_default + Q30(1.41198278375959f), Q30(1.40313815268360f), Q30(1.38687670404960f), Q30(1.34839972492648f), + Q30(1.29124937110028f), Q30(1.19603741667993f), Q30(1.10737240362323f), Q30(1), + Q30(0.87961716655242f), Q30(0.75464859232732f), Q30(0.57677990744575f), Q30(0.42640143271122f), + Q30(0.27671828230984f), Q30(0.17664462766713f), Q30(0.07940162697653f), + //iid_par_dequant_fine + Q30(1.41420649135832f), Q30(1.41419120222364f), Q30(1.41414285699784f), Q30(1.41399000859438f), + Q30(1.41350698548044f), Q30(1.41198278375959f), Q30(1.40977302262355f), Q30(1.40539479488545f), + Q30(1.39677960498402f), Q30(1.38005309967827f), Q30(1.34839972492648f), Q30(1.31392017367631f), + Q30(1.26431008149654f), Q30(1.19603741667993f), Q30(1.10737240362323f), Q30(1), + Q30(0.87961716655242f), Q30(0.75464859232732f), Q30(0.63365607219232f), Q30(0.52308104267543f), + Q30(0.42640143271122f), Q30(0.30895540465965f), Q30(0.22137464873077f), Q30(0.15768788954414f), + Q30(0.11198225164225f), Q30(0.07940162697653f), Q30(0.04469901562677f), Q30(0.02514469318284f), + Q30(0.01414142856998f), Q30(0.00795258154731f), Q30(0.00447211359449f), + }; + + static const int acos_icc_invq[] = { + Q31(0), Q31(0.178427635f/M_PI), Q31(0.28566733f/M_PI), Q31(0.46307236f/M_PI), Q31(0.59716315f/M_PI), Q31(0.78539816f/M_PI), Q31(1.10030855f/M_PI), Q31(1.57079633f/M_PI) + }; + int iid, icc; + + int k, m; + static const int8_t f_center_20[] = { + -3, -1, 1, 3, 5, 7, 10, 14, 18, 22, + }; + static const int32_t f_center_34[] = { + Q31( 2/768.0),Q31( 6/768.0),Q31(10/768.0),Q31(14/768.0),Q31( 18/768.0),Q31( 22/768.0),Q31( 26/768.0),Q31(30/768.0), + Q31( 34/768.0),Q31(-10/768.0),Q31(-6/768.0),Q31(-2/768.0),Q31( 51/768.0),Q31( 57/768.0),Q31( 15/768.0),Q31(21/768.0), + Q31( 27/768.0),Q31( 33/768.0),Q31(39/768.0),Q31(45/768.0),Q31( 54/768.0),Q31( 66/768.0),Q31( 78/768.0),Q31(42/768.0), + Q31(102/768.0),Q31( 66/768.0),Q31(78/768.0),Q31(90/768.0),Q31(102/768.0),Q31(114/768.0),Q31(126/768.0),Q31(90/768.0) + }; + static const int fractional_delay_links[] = { Q31(0.43f), Q31(0.75f), Q31(0.347f) }; + const int fractional_delay_gain = Q31(0.39f); + + for (pd0 = 0; pd0 < 8; pd0++) { + int pd0_re = (ipdopd_cos[pd0]+2)>>2; + int pd0_im = (ipdopd_sin[pd0]+2)>>2; + for (pd1 = 0; pd1 < 8; pd1++) { + int pd1_re = ipdopd_cos[pd1] >> 1; + int pd1_im = ipdopd_sin[pd1] >> 1; + for (pd2 = 0; pd2 < 8; pd2++) { + int shift, round; + int pd2_re = ipdopd_cos[pd2]; + int pd2_im = ipdopd_sin[pd2]; + int re_smooth = pd0_re + pd1_re + pd2_re; + int im_smooth = pd0_im + pd1_im + pd2_im; + + SoftFloat pd_mag = av_int2sf(((ipdopd_cos[(pd0-pd1)&7]+8)>>4) + ((ipdopd_cos[(pd0-pd2)&7]+4)>>3) + + ((ipdopd_cos[(pd1-pd2)&7]+2)>>2) + 0x15000000, 28); + pd_mag = av_div_sf(FLOAT_1, av_sqrt_sf(pd_mag)); + shift = 30 - pd_mag.exp; + round = 1 << (shift-1); + pd_re_smooth[pd0*64+pd1*8+pd2] = (int)(((int64_t)re_smooth * pd_mag.mant + round) >> shift); + pd_im_smooth[pd0*64+pd1*8+pd2] = (int)(((int64_t)im_smooth * pd_mag.mant + round) >> shift); + } + } + } + + idx = 0; + for (iid = 0; iid < 46; iid++) { + int c1, c2; + + c1 = iid_par_dequant_c1[iid]; + if (iid < 15) + c2 = iid_par_dequant_c1[14-iid]; + else + c2 = iid_par_dequant_c1[60-iid]; + + for (icc = 0; icc < 8; icc++) { + /*if (PS_BASELINE || ps->icc_mode < 3)*/{ + int alpha, beta; + int ca, sa, cb, sb; + + alpha = acos_icc_invq[icc]; + beta = (int)(((int64_t)alpha * 1518500250 + 0x40000000) >> 31); + alpha >>= 1; + beta = (int)(((int64_t)beta * (c1 - c2) + 0x40000000) >> 31); + av_sincos_sf(beta + alpha, &sa, &ca); + av_sincos_sf(beta - alpha, &sb, &cb); + + HA[iid][icc][0] = (int)(((int64_t)c2 * ca + 0x20000000) >> 30); + HA[iid][icc][1] = (int)(((int64_t)c1 * cb + 0x20000000) >> 30); + HA[iid][icc][2] = (int)(((int64_t)c2 * sa + 0x20000000) >> 30); + HA[iid][icc][3] = (int)(((int64_t)c1 * sb + 0x20000000) >> 30); + } /* else */ { + int alpha_int, gamma_int; + int alpha_c_int, alpha_s_int, gamma_c_int, gamma_s_int; + + alpha_int = alpha_tab[idx]; + gamma_int = gamma_tab[idx]; + + av_sincos_sf(alpha_int, &alpha_s_int, &alpha_c_int); + av_sincos_sf(gamma_int, &gamma_s_int, &gamma_c_int); + + alpha_c_int = (int)(((int64_t)alpha_c_int * 1518500250 + 0x20000000) >> 30); + alpha_s_int = (int)(((int64_t)alpha_s_int * 1518500250 + 0x20000000) >> 30); + + HB[iid][icc][0] = (int)(((int64_t)alpha_c_int * gamma_c_int + 0x20000000) >> 30); + HB[iid][icc][1] = (int)(((int64_t)alpha_s_int * gamma_c_int + 0x20000000) >> 30); + HB[iid][icc][2] = -(int)(((int64_t)alpha_s_int * gamma_s_int + 0x20000000) >> 30); + HB[iid][icc][3] = (int)(((int64_t)alpha_c_int * gamma_s_int + 0x20000000) >> 30); + } + + if (icc < 5 || icc > 6) + idx++; + } + } + + for (k = 0; k < NR_ALLPASS_BANDS20; k++) { + int theta; + int64_t f_center; + int c, s; + + if (k < FF_ARRAY_ELEMS(f_center_20)) + f_center = f_center_20[k]; + else + f_center = (k << 3) - 52; + + for (m = 0; m < PS_AP_LINKS; m++) { + theta = (int)(((int64_t)fractional_delay_links[m] * f_center + 8) >> 4); + av_sincos_sf(-theta, &s, &c); + Q_fract_allpass[0][k][m][0] = c; + Q_fract_allpass[0][k][m][1] = s; + } + + theta = (int)(((int64_t)fractional_delay_gain * f_center + 8) >> 4); + av_sincos_sf(-theta, &s, &c); + phi_fract[0][k][0] = c; + phi_fract[0][k][1] = s; + } + + for (k = 0; k < NR_ALLPASS_BANDS34; k++) { + int theta, f_center; + int c, s; + + if (k < FF_ARRAY_ELEMS(f_center_34)) + f_center = f_center_34[k]; + else + f_center = ((int64_t)k << 26) - (53 << 25); + + for (m = 0; m < PS_AP_LINKS; m++) { + theta = (int)(((int64_t)fractional_delay_links[m] * f_center + 0x10000000) >> 27); + av_sincos_sf(-theta, &s, &c); + Q_fract_allpass[1][k][m][0] = c; + Q_fract_allpass[1][k][m][1] = s; + } + + theta = (int)(((int64_t)fractional_delay_gain * f_center + 0x10000000) >> 27); + av_sincos_sf(-theta, &s, &c); + phi_fract[1][k][0] = c; + phi_fract[1][k][1] = s; + } + + make_filters_from_proto(f20_0_8, g0_Q8, 8); + make_filters_from_proto(f34_0_12, g0_Q12, 12); + make_filters_from_proto(f34_1_8, g1_Q8, 8); + make_filters_from_proto(f34_2_4, g2_Q4, 4); +} +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_AACPS_FIXED_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_tablegen.h new file mode 100644 index 00000000..0ac4f68d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacps_tablegen.h @@ -0,0 +1,217 @@ +/* + * Header file for hardcoded Parametric Stereo tables + * + * Copyright (c) 2010 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACPS_TABLEGEN_H +#define AVCODEC_AACPS_TABLEGEN_H + +#include +#include + +#if CONFIG_HARDCODED_TABLES +#define ps_tableinit() +#define TABLE_CONST const +#include "libavcodec/aacps_tables.h" +#else +#include "libavutil/common.h" +#include "libavutil/libm.h" +#include "libavutil/mathematics.h" +#include "libavutil/mem.h" +#define NR_ALLPASS_BANDS20 30 +#define NR_ALLPASS_BANDS34 50 +#define PS_AP_LINKS 3 +#define TABLE_CONST +static float pd_re_smooth[8*8*8]; +static float pd_im_smooth[8*8*8]; +static float HA[46][8][4]; +static float HB[46][8][4]; +static DECLARE_ALIGNED(16, float, f20_0_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, float, f34_0_12)[12][8][2]; +static DECLARE_ALIGNED(16, float, f34_1_8) [ 8][8][2]; +static DECLARE_ALIGNED(16, float, f34_2_4) [ 4][8][2]; +static TABLE_CONST DECLARE_ALIGNED(16, float, Q_fract_allpass)[2][50][3][2]; +static DECLARE_ALIGNED(16, float, phi_fract)[2][50][2]; + +static const float g0_Q8[] = { + 0.00746082949812f, 0.02270420949825f, 0.04546865930473f, 0.07266113929591f, + 0.09885108575264f, 0.11793710567217f, 0.125f +}; + +static const float g0_Q12[] = { + 0.04081179924692f, 0.03812810994926f, 0.05144908135699f, 0.06399831151592f, + 0.07428313801106f, 0.08100347892914f, 0.08333333333333f +}; + +static const float g1_Q8[] = { + 0.01565675600122f, 0.03752716391991f, 0.05417891378782f, 0.08417044116767f, + 0.10307344158036f, 0.12222452249753f, 0.125f +}; + +static const float g2_Q4[] = { + -0.05908211155639f, -0.04871498374946f, 0.0f, 0.07778723915851f, + 0.16486303567403f, 0.23279856662996f, 0.25f +}; + +static av_cold void make_filters_from_proto(float (*filter)[8][2], const float *proto, int bands) +{ + int q, n; + for (q = 0; q < bands; q++) { + for (n = 0; n < 7; n++) { + double theta = 2 * M_PI * (q + 0.5) * (n - 6) / bands; + filter[q][n][0] = proto[n] * cos(theta); + filter[q][n][1] = proto[n] * -sin(theta); + } + } +} + +static av_cold void ps_tableinit(void) +{ + static const float ipdopd_sin[] = { 0, M_SQRT1_2, 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, -M_SQRT1_2 }; + static const float ipdopd_cos[] = { 1, M_SQRT1_2, 0, -M_SQRT1_2, -1, -M_SQRT1_2, 0, M_SQRT1_2 }; + int pd0, pd1, pd2; + + static const float iid_par_dequant[] = { + //iid_par_dequant_default + 0.05623413251903, 0.12589254117942, 0.19952623149689, 0.31622776601684, + 0.44668359215096, 0.63095734448019, 0.79432823472428, 1, + 1.25892541179417, 1.58489319246111, 2.23872113856834, 3.16227766016838, + 5.01187233627272, 7.94328234724282, 17.7827941003892, + //iid_par_dequant_fine + 0.00316227766017, 0.00562341325190, 0.01, 0.01778279410039, + 0.03162277660168, 0.05623413251903, 0.07943282347243, 0.11220184543020, + 0.15848931924611, 0.22387211385683, 0.31622776601684, 0.39810717055350, + 0.50118723362727, 0.63095734448019, 0.79432823472428, 1, + 1.25892541179417, 1.58489319246111, 1.99526231496888, 2.51188643150958, + 3.16227766016838, 4.46683592150963, 6.30957344480193, 8.91250938133745, + 12.5892541179417, 17.7827941003892, 31.6227766016838, 56.2341325190349, + 100, 177.827941003892, 316.227766016837, + }; + static const float icc_invq[] = { + 1, 0.937, 0.84118, 0.60092, 0.36764, 0, -0.589, -1 + }; + static const float acos_icc_invq[] = { + 0, 0.35685527, 0.57133466, 0.92614472, 1.1943263, M_PI/2, 2.2006171, M_PI + }; + int iid, icc; + + int k, m; + static const int8_t f_center_20[] = { + -3, -1, 1, 3, 5, 7, 10, 14, 18, 22, + }; + static const int8_t f_center_34[] = { + 2, 6, 10, 14, 18, 22, 26, 30, + 34,-10, -6, -2, 51, 57, 15, 21, + 27, 33, 39, 45, 54, 66, 78, 42, + 102, 66, 78, 90,102,114,126, 90, + }; + static const float fractional_delay_links[] = { 0.43f, 0.75f, 0.347f }; + const float fractional_delay_gain = 0.39f; + + for (pd0 = 0; pd0 < 8; pd0++) { + float pd0_re = ipdopd_cos[pd0]; + float pd0_im = ipdopd_sin[pd0]; + for (pd1 = 0; pd1 < 8; pd1++) { + float pd1_re = ipdopd_cos[pd1]; + float pd1_im = ipdopd_sin[pd1]; + for (pd2 = 0; pd2 < 8; pd2++) { + float pd2_re = ipdopd_cos[pd2]; + float pd2_im = ipdopd_sin[pd2]; + float re_smooth = 0.25f * pd0_re + 0.5f * pd1_re + pd2_re; + float im_smooth = 0.25f * pd0_im + 0.5f * pd1_im + pd2_im; + float pd_mag = 1 / hypot(im_smooth, re_smooth); + pd_re_smooth[pd0*64+pd1*8+pd2] = re_smooth * pd_mag; + pd_im_smooth[pd0*64+pd1*8+pd2] = im_smooth * pd_mag; + } + } + } + + for (iid = 0; iid < 46; iid++) { + float c = iid_par_dequant[iid]; ///< Linear Inter-channel Intensity Difference + float c1 = (float)M_SQRT2 / sqrtf(1.0f + c*c); + float c2 = c * c1; + for (icc = 0; icc < 8; icc++) { + /*if (PS_BASELINE || ps->icc_mode < 3)*/ { + float alpha = 0.5f * acos_icc_invq[icc]; + float beta = alpha * (c1 - c2) * (float)M_SQRT1_2; + HA[iid][icc][0] = c2 * cosf(beta + alpha); + HA[iid][icc][1] = c1 * cosf(beta - alpha); + HA[iid][icc][2] = c2 * sinf(beta + alpha); + HA[iid][icc][3] = c1 * sinf(beta - alpha); + } /* else */ { + float alpha, gamma, mu, rho; + float alpha_c, alpha_s, gamma_c, gamma_s; + rho = FFMAX(icc_invq[icc], 0.05f); + alpha = 0.5f * atan2f(2.0f * c * rho, c*c - 1.0f); + mu = c + 1.0f / c; + mu = sqrtf(1 + (4 * rho * rho - 4)/(mu * mu)); + gamma = atanf(sqrtf((1.0f - mu)/(1.0f + mu))); + if (alpha < 0) alpha += M_PI/2; + alpha_c = cosf(alpha); + alpha_s = sinf(alpha); + gamma_c = cosf(gamma); + gamma_s = sinf(gamma); + HB[iid][icc][0] = M_SQRT2 * alpha_c * gamma_c; + HB[iid][icc][1] = M_SQRT2 * alpha_s * gamma_c; + HB[iid][icc][2] = -M_SQRT2 * alpha_s * gamma_s; + HB[iid][icc][3] = M_SQRT2 * alpha_c * gamma_s; + } + } + } + + for (k = 0; k < NR_ALLPASS_BANDS20; k++) { + double f_center, theta; + if (k < FF_ARRAY_ELEMS(f_center_20)) + f_center = f_center_20[k] * 0.125; + else + f_center = k - 6.5f; + for (m = 0; m < PS_AP_LINKS; m++) { + theta = -M_PI * fractional_delay_links[m] * f_center; + Q_fract_allpass[0][k][m][0] = cos(theta); + Q_fract_allpass[0][k][m][1] = sin(theta); + } + theta = -M_PI*fractional_delay_gain*f_center; + phi_fract[0][k][0] = cos(theta); + phi_fract[0][k][1] = sin(theta); + } + for (k = 0; k < NR_ALLPASS_BANDS34; k++) { + double f_center, theta; + if (k < FF_ARRAY_ELEMS(f_center_34)) + f_center = f_center_34[k] / 24.0; + else + f_center = k - 26.5f; + for (m = 0; m < PS_AP_LINKS; m++) { + theta = -M_PI * fractional_delay_links[m] * f_center; + Q_fract_allpass[1][k][m][0] = cos(theta); + Q_fract_allpass[1][k][m][1] = sin(theta); + } + theta = -M_PI*fractional_delay_gain*f_center; + phi_fract[1][k][0] = cos(theta); + phi_fract[1][k][1] = sin(theta); + } + + make_filters_from_proto(f20_0_8, g0_Q8, 8); + make_filters_from_proto(f34_0_12, g0_Q12, 12); + make_filters_from_proto(f34_1_8, g1_Q8, 8); + make_filters_from_proto(f34_2_4, g2_Q4, 4); +} +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_AACPS_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacpsdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacpsdsp.h new file mode 100644 index 00000000..917ac530 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacpsdsp.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2012 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACPSDSP_H +#define AVCODEC_AACPSDSP_H + +#include + +#include "aac_defines.h" + +#define PS_QMF_TIME_SLOTS 32 +#define PS_AP_LINKS 3 +#define PS_MAX_AP_DELAY 5 + +typedef struct PSDSPContext { + void (*add_squares)(INTFLOAT *dst, const INTFLOAT (*src)[2], int n); + void (*mul_pair_single)(INTFLOAT (*dst)[2], INTFLOAT (*src0)[2], INTFLOAT *src1, + int n); + void (*hybrid_analysis)(INTFLOAT (*out)[2], INTFLOAT (*in)[2], + const INTFLOAT (*filter)[8][2], + ptrdiff_t stride, int n); + void (*hybrid_analysis_ileave)(INTFLOAT (*out)[32][2], INTFLOAT L[2][38][64], + int i, int len); + void (*hybrid_synthesis_deint)(INTFLOAT out[2][38][64], INTFLOAT (*in)[32][2], + int i, int len); + void (*decorrelate)(INTFLOAT (*out)[2], INTFLOAT (*delay)[2], + INTFLOAT (*ap_delay)[PS_QMF_TIME_SLOTS+PS_MAX_AP_DELAY][2], + const INTFLOAT phi_fract[2], const INTFLOAT (*Q_fract)[2], + const INTFLOAT *transient_gain, + INTFLOAT g_decay_slope, + int len); + void (*stereo_interpolate[2])(INTFLOAT (*l)[2], INTFLOAT (*r)[2], + INTFLOAT h[2][4], INTFLOAT h_step[2][4], + int len); +} PSDSPContext; + +void AAC_RENAME(ff_psdsp_init)(PSDSPContext *s); +void ff_psdsp_init_arm(PSDSPContext *s); +void ff_psdsp_init_aarch64(PSDSPContext *s); +void ff_psdsp_init_mips(PSDSPContext *s); +void ff_psdsp_init_x86(PSDSPContext *s); + +#endif /* AVCODEC_AACPSDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr.h new file mode 100644 index 00000000..dd8b66c7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr.h @@ -0,0 +1,96 @@ +/* + * AAC Spectral Band Replication function declarations + * Copyright (c) 2008-2009 Robert Swain ( rob opendot cl ) + * Copyright (c) 2010 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC Spectral Band Replication function declarations + * @author Robert Swain ( rob opendot cl ) + */ + +#ifndef AVCODEC_AACSBR_H +#define AVCODEC_AACSBR_H + +#include "get_bits.h" +#include "aac.h" +#include "sbr.h" + +#define ENVELOPE_ADJUSTMENT_OFFSET 2 +#define NOISE_FLOOR_OFFSET 6 + +/** + * SBR VLC tables + */ +enum { + T_HUFFMAN_ENV_1_5DB, + F_HUFFMAN_ENV_1_5DB, + T_HUFFMAN_ENV_BAL_1_5DB, + F_HUFFMAN_ENV_BAL_1_5DB, + T_HUFFMAN_ENV_3_0DB, + F_HUFFMAN_ENV_3_0DB, + T_HUFFMAN_ENV_BAL_3_0DB, + F_HUFFMAN_ENV_BAL_3_0DB, + T_HUFFMAN_NOISE_3_0DB, + T_HUFFMAN_NOISE_BAL_3_0DB, +}; + +/** + * bs_frame_class - frame class of current SBR frame (14496-3 sp04 p98) + */ +enum { + FIXFIX, + FIXVAR, + VARFIX, + VARVAR, +}; + +enum { + EXTENSION_ID_PS = 2, +}; + +static const int8_t vlc_sbr_lav[10] = + { 60, 60, 24, 24, 31, 31, 12, 12, 31, 12 }; + +#define SBR_INIT_VLC_STATIC(num, size) \ + INIT_VLC_STATIC(&vlc_sbr[num], 9, sbr_tmp[num].table_size / sbr_tmp[num].elem_size, \ + sbr_tmp[num].sbr_bits , 1, 1, \ + sbr_tmp[num].sbr_codes, sbr_tmp[num].elem_size, sbr_tmp[num].elem_size, \ + size) + +#define SBR_VLC_ROW(name) \ + { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) } + +/** Initialize SBR. */ +void AAC_RENAME(ff_aac_sbr_init)(void); +/** Initialize one SBR context. */ +void AAC_RENAME(ff_aac_sbr_ctx_init)(AACContext *ac, SpectralBandReplication *sbr, int id_aac); +/** Close one SBR context. */ +void AAC_RENAME(ff_aac_sbr_ctx_close)(SpectralBandReplication *sbr); +/** Decode one SBR element. */ +int AAC_RENAME(ff_decode_sbr_extension)(AACContext *ac, SpectralBandReplication *sbr, + GetBitContext *gb, int crc, int cnt, int id_aac); +/** Apply one SBR element to one AAC element. */ +void AAC_RENAME(ff_sbr_apply)(AACContext *ac, SpectralBandReplication *sbr, int id_aac, + INTFLOAT* L, INTFLOAT *R); + +void ff_aacsbr_func_ptr_init_mips(AACSBRContext *c); + +#endif /* AVCODEC_AACSBR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_fixed_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_fixed_tablegen.h new file mode 100644 index 00000000..3fcf0204 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_fixed_tablegen.h @@ -0,0 +1,28 @@ +/* + * Header file for hardcoded AAC SBR windows + * + * Copyright (c) 2014 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACSBR_FIXED_TABLEGEN_H +#define AVCODEC_AACSBR_FIXED_TABLEGEN_H + +#include "aacsbr_tablegen_common.h" + +#endif /* AVCODEC_AACSBR_FIXED_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen.h new file mode 100644 index 00000000..242a9635 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen.h @@ -0,0 +1,28 @@ +/* + * Header file for hardcoded AAC SBR windows + * + * Copyright (c) 2014 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACSBR_TABLEGEN_H +#define AVCODEC_AACSBR_TABLEGEN_H + +#include "aacsbr_tablegen_common.h" + +#endif /* AVCODEC_AACSBR_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen_common.h new file mode 100644 index 00000000..8e0dd9e1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbr_tablegen_common.h @@ -0,0 +1,114 @@ +/* + * Header file for hardcoded AAC SBR windows + * + * Copyright (c) 2014 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AACSBR_TABLEGEN_COMMON_H +#define AVCODEC_AACSBR_TABLEGEN_COMMON_H +#include "aac_defines.h" +#include "libavutil/mem.h" + +///< window coefficients for analysis/synthesis QMF banks +static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320]; +static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_us)[640] = { + Q31( 0.0000000000f), Q31(-0.0005525286f), Q31(-0.0005617692f), Q31(-0.0004947518f), + Q31(-0.0004875227f), Q31(-0.0004893791f), Q31(-0.0005040714f), Q31(-0.0005226564f), + Q31(-0.0005466565f), Q31(-0.0005677802f), Q31(-0.0005870930f), Q31(-0.0006132747f), + Q31(-0.0006312493f), Q31(-0.0006540333f), Q31(-0.0006777690f), Q31(-0.0006941614f), + Q31(-0.0007157736f), Q31(-0.0007255043f), Q31(-0.0007440941f), Q31(-0.0007490598f), + Q31(-0.0007681371f), Q31(-0.0007724848f), Q31(-0.0007834332f), Q31(-0.0007779869f), + Q31(-0.0007803664f), Q31(-0.0007801449f), Q31(-0.0007757977f), Q31(-0.0007630793f), + Q31(-0.0007530001f), Q31(-0.0007319357f), Q31(-0.0007215391f), Q31(-0.0006917937f), + Q31(-0.0006650415f), Q31(-0.0006341594f), Q31(-0.0005946118f), Q31(-0.0005564576f), + Q31(-0.0005145572f), Q31(-0.0004606325f), Q31(-0.0004095121f), Q31(-0.0003501175f), + Q31(-0.0002896981f), Q31(-0.0002098337f), Q31(-0.0001446380f), Q31(-0.0000617334f), + Q31( 0.0000134949f), Q31( 0.0001094383f), Q31( 0.0002043017f), Q31( 0.0002949531f), + Q31( 0.0004026540f), Q31( 0.0005107388f), Q31( 0.0006239376f), Q31( 0.0007458025f), + Q31( 0.0008608443f), Q31( 0.0009885988f), Q31( 0.0011250155f), Q31( 0.0012577884f), + Q31( 0.0013902494f), Q31( 0.0015443219f), Q31( 0.0016868083f), Q31( 0.0018348265f), + Q31( 0.0019841140f), Q31( 0.0021461583f), Q31( 0.0023017254f), Q31( 0.0024625616f), + Q31( 0.0026201758f), Q31( 0.0027870464f), Q31( 0.0029469447f), Q31( 0.0031125420f), + Q31( 0.0032739613f), Q31( 0.0034418874f), Q31( 0.0036008268f), Q31( 0.0037603922f), + Q31( 0.0039207432f), Q31( 0.0040819753f), Q31( 0.0042264269f), Q31( 0.0043730719f), + Q31( 0.0045209852f), Q31( 0.0046606460f), Q31( 0.0047932560f), Q31( 0.0049137603f), + Q31( 0.0050393022f), Q31( 0.0051407353f), Q31( 0.0052461166f), Q31( 0.0053471681f), + Q31( 0.0054196775f), Q31( 0.0054876040f), Q31( 0.0055475714f), Q31( 0.0055938023f), + Q31( 0.0056220643f), Q31( 0.0056455196f), Q31( 0.0056389199f), Q31( 0.0056266114f), + Q31( 0.0055917128f), Q31( 0.0055404363f), Q31( 0.0054753783f), Q31( 0.0053838975f), + Q31( 0.0052715758f), Q31( 0.0051382275f), Q31( 0.0049839687f), Q31( 0.0048109469f), + Q31( 0.0046039530f), Q31( 0.0043801861f), Q31( 0.0041251642f), Q31( 0.0038456408f), + Q31( 0.0035401246f), Q31( 0.0032091885f), Q31( 0.0028446757f), Q31( 0.0024508540f), + Q31( 0.0020274176f), Q31( 0.0015784682f), Q31( 0.0010902329f), Q31( 0.0005832264f), + Q31( 0.0000276045f), Q31(-0.0005464280f), Q31(-0.0011568135f), Q31(-0.0018039472f), + Q31(-0.0024826723f), Q31(-0.0031933778f), Q31(-0.0039401124f), Q31(-0.0047222596f), + Q31(-0.0055337211f), Q31(-0.0063792293f), Q31(-0.0072615816f), Q31(-0.0081798233f), + Q31(-0.0091325329f), Q31(-0.0101150215f), Q31(-0.0111315548f), Q31(-0.0121849995f), + Q31( 0.0132718220f), Q31( 0.0143904666f), Q31( 0.0155405553f), Q31( 0.0167324712f), + Q31( 0.0179433381f), Q31( 0.0191872431f), Q31( 0.0204531793f), Q31( 0.0217467550f), + Q31( 0.0230680169f), Q31( 0.0244160992f), Q31( 0.0257875847f), Q31( 0.0271859429f), + Q31( 0.0286072173f), Q31( 0.0300502657f), Q31( 0.0315017608f), Q31( 0.0329754081f), + Q31( 0.0344620948f), Q31( 0.0359697560f), Q31( 0.0374812850f), Q31( 0.0390053679f), + Q31( 0.0405349170f), Q31( 0.0420649094f), Q31( 0.0436097542f), Q31( 0.0451488405f), + Q31( 0.0466843027f), Q31( 0.0482165720f), Q31( 0.0497385755f), Q31( 0.0512556155f), + Q31( 0.0527630746f), Q31( 0.0542452768f), Q31( 0.0557173648f), Q31( 0.0571616450f), + Q31( 0.0585915683f), Q31( 0.0599837480f), Q31( 0.0613455171f), Q31( 0.0626857808f), + Q31( 0.0639715898f), Q31( 0.0652247106f), Q31( 0.0664367512f), Q31( 0.0676075985f), + Q31( 0.0687043828f), Q31( 0.0697630244f), Q31( 0.0707628710f), Q31( 0.0717002673f), + Q31( 0.0725682583f), Q31( 0.0733620255f), Q31( 0.0741003642f), Q31( 0.0747452558f), + Q31( 0.0753137336f), Q31( 0.0758008358f), Q31( 0.0761992479f), Q31( 0.0764992170f), + Q31( 0.0767093490f), Q31( 0.0768173975f), Q31( 0.0768230011f), Q31( 0.0767204924f), + Q31( 0.0765050718f), Q31( 0.0761748321f), Q31( 0.0757305756f), Q31( 0.0751576255f), + Q31( 0.0744664394f), Q31( 0.0736406005f), Q31( 0.0726774642f), Q31( 0.0715826364f), + Q31( 0.0703533073f), Q31( 0.0689664013f), Q31( 0.0674525021f), Q31( 0.0657690668f), + Q31( 0.0639444805f), Q31( 0.0619602779f), Q31( 0.0598166570f), Q31( 0.0575152691f), + Q31( 0.0550460034f), Q31( 0.0524093821f), Q31( 0.0495978676f), Q31( 0.0466303305f), + Q31( 0.0434768782f), Q31( 0.0401458278f), Q31( 0.0366418116f), Q31( 0.0329583930f), + Q31( 0.0290824006f), Q31( 0.0250307561f), Q31( 0.0207997072f), Q31( 0.0163701258f), + Q31( 0.0117623832f), Q31( 0.0069636862f), Q31( 0.0019765601f), Q31(-0.0032086896f), + Q31(-0.0085711749f), Q31(-0.0141288827f), Q31(-0.0198834129f), Q31(-0.0258227288f), + Q31(-0.0319531274f), Q31(-0.0382776572f), Q31(-0.0447806821f), Q31(-0.0514804176f), + Q31(-0.0583705326f), Q31(-0.0654409853f), Q31(-0.0726943300f), Q31(-0.0801372934f), + Q31(-0.0877547536f), Q31(-0.0955533352f), Q31(-0.1035329531f), Q31(-0.1116826931f), + Q31(-0.1200077984f), Q31(-0.1285002850f), Q31(-0.1371551761f), Q31(-0.1459766491f), + Q31(-0.1549607071f), Q31(-0.1640958855f), Q31(-0.1733808172f), Q31(-0.1828172548f), + Q31(-0.1923966745f), Q31(-0.2021250176f), Q31(-0.2119735853f), Q31(-0.2219652696f), + Q31(-0.2320690870f), Q31(-0.2423016884f), Q31(-0.2526480309f), Q31(-0.2631053299f), + Q31(-0.2736634040f), Q31(-0.2843214189f), Q31(-0.2950716717f), Q31(-0.3059098575f), + Q31(-0.3168278913f), Q31(-0.3278113727f), Q31(-0.3388722693f), Q31(-0.3499914122f), + Q31( 0.3611589903f), Q31( 0.3723795546f), Q31( 0.3836350013f), Q31( 0.3949211761f), + Q31( 0.4062317676f), Q31( 0.4175696896f), Q31( 0.4289119920f), Q31( 0.4402553754f), + Q31( 0.4515996535f), Q31( 0.4629308085f), Q31( 0.4742453214f), Q31( 0.4855253091f), + Q31( 0.4967708254f), Q31( 0.5079817500f), Q31( 0.5191234970f), Q31( 0.5302240895f), + Q31( 0.5412553448f), Q31( 0.5522051258f), Q31( 0.5630789140f), Q31( 0.5738524131f), + Q31( 0.5845403235f), Q31( 0.5951123086f), Q31( 0.6055783538f), Q31( 0.6159109932f), + Q31( 0.6261242695f), Q31( 0.6361980107f), Q31( 0.6461269695f), Q31( 0.6559016302f), + Q31( 0.6655139880f), Q31( 0.6749663190f), Q31( 0.6842353293f), Q31( 0.6933282376f), + Q31( 0.7022388719f), Q31( 0.7109410426f), Q31( 0.7194462634f), Q31( 0.7277448900f), + Q31( 0.7358211758f), Q31( 0.7436827863f), Q31( 0.7513137456f), Q31( 0.7587080760f), + Q31( 0.7658674865f), Q31( 0.7727780881f), Q31( 0.7794287519f), Q31( 0.7858353120f), + Q31( 0.7919735841f), Q31( 0.7978466413f), Q31( 0.8034485751f), Q31( 0.8087695004f), + Q31( 0.8138191270f), Q31( 0.8185776004f), Q31( 0.8230419890f), Q31( 0.8272275347f), + Q31( 0.8311038457f), Q31( 0.8346937361f), Q31( 0.8379717337f), Q31( 0.8409541392f), + Q31( 0.8436238281f), Q31( 0.8459818469f), Q31( 0.8480315777f), Q31( 0.8497805198f), + Q31( 0.8511971524f), Q31( 0.8523047035f), Q31( 0.8531020949f), Q31( 0.8535720573f), + Q31( 0.8537385600f), +}; + +#endif /* AVCODEC_AACSBR_TABLEGEN_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbrdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbrdata.h new file mode 100644 index 00000000..4ff8fae9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aacsbrdata.h @@ -0,0 +1,535 @@ +/* + * AAC Spectral Band Replication decoding data + * Copyright (c) 2008-2009 Robert Swain ( rob opendot cl ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC Spectral Band Replication decoding data + * @author Robert Swain ( rob opendot cl ) + */ + +#ifndef AVCODEC_AACSBRDATA_H +#define AVCODEC_AACSBRDATA_H + +#include +#include "libavutil/mem.h" +#include "aac_defines.h" + +///< Huffman tables for SBR + +static const uint8_t t_huffman_env_1_5dB_bits[121] = { + 18, 18, 18, 18, 18, 18, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 17, 18, 16, 17, 18, 17, + 16, 16, 16, 16, 15, 14, 14, 13, + 13, 12, 11, 10, 9, 8, 7, 6, + 5, 4, 3, 2, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 12, 13, 14, + 14, 15, 16, 17, 16, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, +}; + +static const uint32_t t_huffman_env_1_5dB_codes[121] = { + 0x3ffd6, 0x3ffd7, 0x3ffd8, 0x3ffd9, 0x3ffda, 0x3ffdb, 0x7ffb8, 0x7ffb9, + 0x7ffba, 0x7ffbb, 0x7ffbc, 0x7ffbd, 0x7ffbe, 0x7ffbf, 0x7ffc0, 0x7ffc1, + 0x7ffc2, 0x7ffc3, 0x7ffc4, 0x7ffc5, 0x7ffc6, 0x7ffc7, 0x7ffc8, 0x7ffc9, + 0x7ffca, 0x7ffcb, 0x7ffcc, 0x7ffcd, 0x7ffce, 0x7ffcf, 0x7ffd0, 0x7ffd1, + 0x7ffd2, 0x7ffd3, 0x1ffe6, 0x3ffd4, 0x0fff0, 0x1ffe9, 0x3ffd5, 0x1ffe7, + 0x0fff1, 0x0ffec, 0x0ffed, 0x0ffee, 0x07ff4, 0x03ff9, 0x03ff7, 0x01ffa, + 0x01ff9, 0x00ffb, 0x007fc, 0x003fc, 0x001fd, 0x000fd, 0x0007d, 0x0003d, + 0x0001d, 0x0000d, 0x00005, 0x00001, 0x00000, 0x00004, 0x0000c, 0x0001c, + 0x0003c, 0x0007c, 0x000fc, 0x001fc, 0x003fd, 0x00ffa, 0x01ff8, 0x03ff6, + 0x03ff8, 0x07ff5, 0x0ffef, 0x1ffe8, 0x0fff2, 0x7ffd4, 0x7ffd5, 0x7ffd6, + 0x7ffd7, 0x7ffd8, 0x7ffd9, 0x7ffda, 0x7ffdb, 0x7ffdc, 0x7ffdd, 0x7ffde, + 0x7ffdf, 0x7ffe0, 0x7ffe1, 0x7ffe2, 0x7ffe3, 0x7ffe4, 0x7ffe5, 0x7ffe6, + 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, 0x7ffec, 0x7ffed, 0x7ffee, + 0x7ffef, 0x7fff0, 0x7fff1, 0x7fff2, 0x7fff3, 0x7fff4, 0x7fff5, 0x7fff6, + 0x7fff7, 0x7fff8, 0x7fff9, 0x7fffa, 0x7fffb, 0x7fffc, 0x7fffd, 0x7fffe, + 0x7ffff, +}; + +static const uint8_t f_huffman_env_1_5dB_bits[121] = { + 19, 19, 20, 20, 20, 20, 20, 20, + 20, 19, 20, 20, 20, 20, 19, 20, + 19, 19, 20, 18, 20, 20, 20, 19, + 20, 20, 20, 19, 20, 19, 18, 19, + 18, 18, 17, 18, 17, 17, 17, 16, + 16, 16, 15, 15, 14, 13, 13, 12, + 12, 11, 10, 9, 9, 8, 7, 6, + 5, 4, 3, 2, 2, 3, 4, 5, + 6, 8, 8, 9, 10, 11, 11, 11, + 12, 12, 13, 13, 14, 14, 16, 16, + 17, 17, 18, 18, 18, 18, 18, 18, + 18, 20, 19, 20, 20, 20, 20, 20, + 20, 19, 20, 20, 20, 20, 19, 20, + 18, 20, 20, 19, 19, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, + 20, +}; + +static const uint32_t f_huffman_env_1_5dB_codes[121] = { + 0x7ffe7, 0x7ffe8, 0xfffd2, 0xfffd3, 0xfffd4, 0xfffd5, 0xfffd6, 0xfffd7, + 0xfffd8, 0x7ffda, 0xfffd9, 0xfffda, 0xfffdb, 0xfffdc, 0x7ffdb, 0xfffdd, + 0x7ffdc, 0x7ffdd, 0xfffde, 0x3ffe4, 0xfffdf, 0xfffe0, 0xfffe1, 0x7ffde, + 0xfffe2, 0xfffe3, 0xfffe4, 0x7ffdf, 0xfffe5, 0x7ffe0, 0x3ffe8, 0x7ffe1, + 0x3ffe0, 0x3ffe9, 0x1ffef, 0x3ffe5, 0x1ffec, 0x1ffed, 0x1ffee, 0x0fff4, + 0x0fff3, 0x0fff0, 0x07ff7, 0x07ff6, 0x03ffa, 0x01ffa, 0x01ff9, 0x00ffa, + 0x00ff8, 0x007f9, 0x003fb, 0x001fc, 0x001fa, 0x000fb, 0x0007c, 0x0003c, + 0x0001c, 0x0000c, 0x00005, 0x00001, 0x00000, 0x00004, 0x0000d, 0x0001d, + 0x0003d, 0x000fa, 0x000fc, 0x001fb, 0x003fa, 0x007f8, 0x007fa, 0x007fb, + 0x00ff9, 0x00ffb, 0x01ff8, 0x01ffb, 0x03ff8, 0x03ff9, 0x0fff1, 0x0fff2, + 0x1ffea, 0x1ffeb, 0x3ffe1, 0x3ffe2, 0x3ffea, 0x3ffe3, 0x3ffe6, 0x3ffe7, + 0x3ffeb, 0xfffe6, 0x7ffe2, 0xfffe7, 0xfffe8, 0xfffe9, 0xfffea, 0xfffeb, + 0xfffec, 0x7ffe3, 0xfffed, 0xfffee, 0xfffef, 0xffff0, 0x7ffe4, 0xffff1, + 0x3ffec, 0xffff2, 0xffff3, 0x7ffe5, 0x7ffe6, 0xffff4, 0xffff5, 0xffff6, + 0xffff7, 0xffff8, 0xffff9, 0xffffa, 0xffffb, 0xffffc, 0xffffd, 0xffffe, + 0xfffff, +}; + +static const uint8_t t_huffman_env_bal_1_5dB_bits[49] = { + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 12, 11, 9, 7, 5, 3, + 1, 2, 4, 6, 8, 11, 12, 15, + 16, 16, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, +}; + +static const uint32_t t_huffman_env_bal_1_5dB_codes[49] = { + 0x0ffe4, 0x0ffe5, 0x0ffe6, 0x0ffe7, 0x0ffe8, 0x0ffe9, 0x0ffea, 0x0ffeb, + 0x0ffec, 0x0ffed, 0x0ffee, 0x0ffef, 0x0fff0, 0x0fff1, 0x0fff2, 0x0fff3, + 0x0fff4, 0x0ffe2, 0x00ffc, 0x007fc, 0x001fe, 0x0007e, 0x0001e, 0x00006, + 0x00000, 0x00002, 0x0000e, 0x0003e, 0x000fe, 0x007fd, 0x00ffd, 0x07ff0, + 0x0ffe3, 0x0fff5, 0x0fff6, 0x0fff7, 0x0fff8, 0x0fff9, 0x0fffa, 0x1fff6, + 0x1fff7, 0x1fff8, 0x1fff9, 0x1fffa, 0x1fffb, 0x1fffc, 0x1fffd, 0x1fffe, + 0x1ffff, +}; + +static const uint8_t f_huffman_env_bal_1_5dB_bits[49] = { + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 16, + 17, 14, 11, 11, 8, 7, 4, 2, + 1, 3, 5, 6, 9, 11, 12, 15, + 16, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 19, + 19, +}; + +static const uint32_t f_huffman_env_bal_1_5dB_codes[49] = { + 0x3ffe2, 0x3ffe3, 0x3ffe4, 0x3ffe5, 0x3ffe6, 0x3ffe7, 0x3ffe8, 0x3ffe9, + 0x3ffea, 0x3ffeb, 0x3ffec, 0x3ffed, 0x3ffee, 0x3ffef, 0x3fff0, 0x0fff7, + 0x1fff0, 0x03ffc, 0x007fe, 0x007fc, 0x000fe, 0x0007e, 0x0000e, 0x00002, + 0x00000, 0x00006, 0x0001e, 0x0003e, 0x001fe, 0x007fd, 0x00ffe, 0x07ffa, + 0x0fff6, 0x3fff1, 0x3fff2, 0x3fff3, 0x3fff4, 0x3fff5, 0x3fff6, 0x3fff7, + 0x3fff8, 0x3fff9, 0x3fffa, 0x3fffb, 0x3fffc, 0x3fffd, 0x3fffe, 0x7fffe, + 0x7ffff, +}; + +static const uint8_t t_huffman_env_3_0dB_bits[63] = { + 18, 18, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 17, 16, 16, 16, 14, 14, 14, + 13, 12, 11, 8, 6, 4, 2, 1, + 3, 5, 7, 9, 11, 13, 14, 14, + 15, 16, 17, 18, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, +}; + +static const uint32_t t_huffman_env_3_0dB_codes[63] = { + 0x3ffed, 0x3ffee, 0x7ffde, 0x7ffdf, 0x7ffe0, 0x7ffe1, 0x7ffe2, 0x7ffe3, + 0x7ffe4, 0x7ffe5, 0x7ffe6, 0x7ffe7, 0x7ffe8, 0x7ffe9, 0x7ffea, 0x7ffeb, + 0x7ffec, 0x1fff4, 0x0fff7, 0x0fff9, 0x0fff8, 0x03ffb, 0x03ffa, 0x03ff8, + 0x01ffa, 0x00ffc, 0x007fc, 0x000fe, 0x0003e, 0x0000e, 0x00002, 0x00000, + 0x00006, 0x0001e, 0x0007e, 0x001fe, 0x007fd, 0x01ffb, 0x03ff9, 0x03ffc, + 0x07ffa, 0x0fff6, 0x1fff5, 0x3ffec, 0x7ffed, 0x7ffee, 0x7ffef, 0x7fff0, + 0x7fff1, 0x7fff2, 0x7fff3, 0x7fff4, 0x7fff5, 0x7fff6, 0x7fff7, 0x7fff8, + 0x7fff9, 0x7fffa, 0x7fffb, 0x7fffc, 0x7fffd, 0x7fffe, 0x7ffff, +}; + +static const uint8_t f_huffman_env_3_0dB_bits[63] = { + 20, 20, 20, 20, 20, 20, 20, 18, + 19, 19, 19, 19, 18, 18, 20, 19, + 17, 18, 17, 16, 16, 15, 14, 12, + 11, 10, 9, 8, 6, 4, 2, 1, + 3, 5, 8, 9, 10, 11, 12, 13, + 14, 15, 15, 16, 16, 17, 17, 18, + 18, 18, 20, 19, 19, 19, 20, 19, + 19, 20, 20, 20, 20, 20, 20, +}; + +static const uint32_t f_huffman_env_3_0dB_codes[63] = { + 0xffff0, 0xffff1, 0xffff2, 0xffff3, 0xffff4, 0xffff5, 0xffff6, 0x3fff3, + 0x7fff5, 0x7ffee, 0x7ffef, 0x7fff6, 0x3fff4, 0x3fff2, 0xffff7, 0x7fff0, + 0x1fff5, 0x3fff0, 0x1fff4, 0x0fff7, 0x0fff6, 0x07ff8, 0x03ffb, 0x00ffd, + 0x007fd, 0x003fd, 0x001fd, 0x000fd, 0x0003e, 0x0000e, 0x00002, 0x00000, + 0x00006, 0x0001e, 0x000fc, 0x001fc, 0x003fc, 0x007fc, 0x00ffc, 0x01ffc, + 0x03ffa, 0x07ff9, 0x07ffa, 0x0fff8, 0x0fff9, 0x1fff6, 0x1fff7, 0x3fff5, + 0x3fff6, 0x3fff1, 0xffff8, 0x7fff1, 0x7fff2, 0x7fff3, 0xffff9, 0x7fff7, + 0x7fff4, 0xffffa, 0xffffb, 0xffffc, 0xffffd, 0xffffe, 0xfffff, +}; + +static const uint8_t t_huffman_env_bal_3_0dB_bits[25] = { + 13, 13, 13, 13, 13, 13, 13, 12, + 8, 7, 4, 3, 1, 2, 5, 6, + 9, 13, 13, 13, 13, 13, 13, 14, + 14, +}; + +static const uint16_t t_huffman_env_bal_3_0dB_codes[25] = { + 0x1ff2, 0x1ff3, 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7, 0x1ff8, 0x0ff8, + 0x00fe, 0x007e, 0x000e, 0x0006, 0x0000, 0x0002, 0x001e, 0x003e, + 0x01fe, 0x1ff9, 0x1ffa, 0x1ffb, 0x1ffc, 0x1ffd, 0x1ffe, 0x3ffe, + 0x3fff, +}; + +static const uint8_t f_huffman_env_bal_3_0dB_bits[25] = { + 13, 13, 13, 13, 13, 14, 14, 11, + 8, 7, 4, 2, 1, 3, 5, 6, + 9, 12, 13, 14, 14, 14, 14, 14, + 14, +}; + +static const uint16_t f_huffman_env_bal_3_0dB_codes[25] = { + 0x1ff7, 0x1ff8, 0x1ff9, 0x1ffa, 0x1ffb, 0x3ff8, 0x3ff9, 0x07fc, + 0x00fe, 0x007e, 0x000e, 0x0002, 0x0000, 0x0006, 0x001e, 0x003e, + 0x01fe, 0x0ffa, 0x1ff6, 0x3ffa, 0x3ffb, 0x3ffc, 0x3ffd, 0x3ffe, + 0x3fff, +}; + +static const uint8_t t_huffman_noise_3_0dB_bits[63] = { + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 11, 8, 6, 4, 3, 1, + 2, 5, 8, 10, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 14, +}; + +static const uint16_t t_huffman_noise_3_0dB_codes[63] = { + 0x1fce, 0x1fcf, 0x1fd0, 0x1fd1, 0x1fd2, 0x1fd3, 0x1fd4, 0x1fd5, + 0x1fd6, 0x1fd7, 0x1fd8, 0x1fd9, 0x1fda, 0x1fdb, 0x1fdc, 0x1fdd, + 0x1fde, 0x1fdf, 0x1fe0, 0x1fe1, 0x1fe2, 0x1fe3, 0x1fe4, 0x1fe5, + 0x1fe6, 0x1fe7, 0x07f2, 0x00fd, 0x003e, 0x000e, 0x0006, 0x0000, + 0x0002, 0x001e, 0x00fc, 0x03f8, 0x1fcc, 0x1fe8, 0x1fe9, 0x1fea, + 0x1feb, 0x1fec, 0x1fcd, 0x1fed, 0x1fee, 0x1fef, 0x1ff0, 0x1ff1, + 0x1ff2, 0x1ff3, 0x1ff4, 0x1ff5, 0x1ff6, 0x1ff7, 0x1ff8, 0x1ff9, + 0x1ffa, 0x1ffb, 0x1ffc, 0x1ffd, 0x1ffe, 0x3ffe, 0x3fff, +}; + +static const uint8_t t_huffman_noise_bal_3_0dB_bits[25] = { + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 5, 2, 1, 3, 6, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, +}; + +static const uint8_t t_huffman_noise_bal_3_0dB_codes[25] = { + 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, + 0xf4, 0xf5, 0x1c, 0x02, 0x00, 0x06, 0x3a, 0xf6, + 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, + 0xff, +}; + +static const int8_t sbr_offset[6][16] = { + {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7}, // fs_sbr = 16000 Hz + {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13}, // fs_sbr = 22050 Hz + {-5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16}, // fs_sbr = 24000 Hz + {-6, -4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16}, // fs_sbr = 32000 Hz + {-4, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20}, // 44100 Hz <= fs_sbr <= 64000 Hz + {-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 16, 20, 24}, // 64000 Hz < fs_sbr +}; + +/* First eight entries repeated at end to simplify SIMD implementations. */ +const DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sbr_noise_table))[][2] = { +{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, +{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, +{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, +{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, +{Q31( 0.54840422910309f), Q31( 0.75221367176302f)}, {Q31( 0.40009252867955f), Q31(-0.98929400334421f)}, +{Q31(-0.99867974711855f), Q31(-0.88147068645358f)}, {Q31(-0.95531076805040f), Q31( 0.90908757154593f)}, +{Q31(-0.45725933317144f), Q31(-0.56716323646760f)}, {Q31(-0.72929675029275f), Q31(-0.98008272727324f)}, +{Q31( 0.75622801399036f), Q31( 0.20950329995549f)}, {Q31( 0.07069442601050f), Q31(-0.78247898470706f)}, +{Q31( 0.74496252926055f), Q31(-0.91169004445807f)}, {Q31(-0.96440182703856f), Q31(-0.94739918296622f)}, +{Q31( 0.30424629369539f), Q31(-0.49438267012479f)}, {Q31( 0.66565033746925f), Q31( 0.64652935542491f)}, +{Q31( 0.91697008020594f), Q31( 0.17514097332009f)}, {Q31(-0.70774918760427f), Q31( 0.52548653416543f)}, +{Q31(-0.70051415345560f), Q31(-0.45340028808763f)}, {Q31(-0.99496513054797f), Q31(-0.90071908066973f)}, +{Q31( 0.98164490790123f), Q31(-0.77463155528697f)}, {Q31(-0.54671580548181f), Q31(-0.02570928536004f)}, +{Q31(-0.01689629065389f), Q31( 0.00287506445732f)}, {Q31(-0.86110349531986f), Q31( 0.42548583726477f)}, +{Q31(-0.98892980586032f), Q31(-0.87881132267556f)}, {Q31( 0.51756627678691f), Q31( 0.66926784710139f)}, +{Q31(-0.99635026409640f), Q31(-0.58107730574765f)}, {Q31(-0.99969370862163f), Q31( 0.98369989360250f)}, +{Q31( 0.55266258627194f), Q31( 0.59449057465591f)}, {Q31( 0.34581177741673f), Q31( 0.94879421061866f)}, +{Q31( 0.62664209577999f), Q31(-0.74402970906471f)}, {Q31(-0.77149701404973f), Q31(-0.33883658042801f)}, +{Q31(-0.91592244254432f), Q31( 0.03687901376713f)}, {Q31(-0.76285492357887f), Q31(-0.91371867919124f)}, +{Q31( 0.79788337195331f), Q31(-0.93180971199849f)}, {Q31( 0.54473080610200f), Q31(-0.11919206037186f)}, +{Q31(-0.85639281671058f), Q31( 0.42429854760451f)}, {Q31(-0.92882402971423f), Q31( 0.27871809078609f)}, +{Q31(-0.11708371046774f), Q31(-0.99800843444966f)}, {Q31( 0.21356749817493f), Q31(-0.90716295627033f)}, +{Q31(-0.76191692573909f), Q31( 0.99768118356265f)}, {Q31( 0.98111043100884f), Q31(-0.95854459734407f)}, +{Q31(-0.85913269895572f), Q31( 0.95766566168880f)}, {Q31(-0.93307242253692f), Q31( 0.49431757696466f)}, +{Q31( 0.30485754879632f), Q31(-0.70540034357529f)}, {Q31( 0.85289650925190f), Q31( 0.46766131791044f)}, +{Q31( 0.91328082618125f), Q31(-0.99839597361769f)}, {Q31(-0.05890199924154f), Q31( 0.70741827819497f)}, +{Q31( 0.28398686150148f), Q31( 0.34633555702188f)}, {Q31( 0.95258164539612f), Q31(-0.54893416026939f)}, +{Q31(-0.78566324168507f), Q31(-0.75568541079691f)}, {Q31(-0.95789495447877f), Q31(-0.20423194696966f)}, +{Q31( 0.82411158711197f), Q31( 0.96654618432562f)}, {Q31(-0.65185446735885f), Q31(-0.88734990773289f)}, +{Q31(-0.93643603134666f), Q31( 0.99870790442385f)}, {Q31( 0.91427159529618f), Q31(-0.98290505544444f)}, +{Q31(-0.70395684036886f), Q31( 0.58796798221039f)}, {Q31( 0.00563771969365f), Q31( 0.61768196727244f)}, +{Q31( 0.89065051931895f), Q31( 0.52783352697585f)}, {Q31(-0.68683707712762f), Q31( 0.80806944710339f)}, +{Q31( 0.72165342518718f), Q31(-0.69259857349564f)}, {Q31(-0.62928247730667f), Q31( 0.13627037407335f)}, +{Q31( 0.29938434065514f), Q31(-0.46051329682246f)}, {Q31(-0.91781958879280f), Q31(-0.74012716684186f)}, +{Q31( 0.99298717043688f), Q31( 0.40816610075661f)}, {Q31( 0.82368298622748f), Q31(-0.74036047190173f)}, +{Q31(-0.98512833386833f), Q31(-0.99972330709594f)}, {Q31(-0.95915368242257f), Q31(-0.99237800466040f)}, +{Q31(-0.21411126572790f), Q31(-0.93424819052545f)}, {Q31(-0.68821476106884f), Q31(-0.26892306315457f)}, +{Q31( 0.91851997982317f), Q31( 0.09358228901785f)}, {Q31(-0.96062769559127f), Q31( 0.36099095133739f)}, +{Q31( 0.51646184922287f), Q31(-0.71373332873917f)}, {Q31( 0.61130721139669f), Q31( 0.46950141175917f)}, +{Q31( 0.47336129371299f), Q31(-0.27333178296162f)}, {Q31( 0.90998308703519f), Q31( 0.96715662938132f)}, +{Q31( 0.44844799194357f), Q31( 0.99211574628306f)}, {Q31( 0.66614891079092f), Q31( 0.96590176169121f)}, +{Q31( 0.74922239129237f), Q31(-0.89879858826087f)}, {Q31(-0.99571588506485f), Q31( 0.52785521494349f)}, +{Q31( 0.97401082477563f), Q31(-0.16855870075190f)}, {Q31( 0.72683747733879f), Q31(-0.48060774432251f)}, +{Q31( 0.95432193457128f), Q31( 0.68849603408441f)}, {Q31(-0.72962208425191f), Q31(-0.76608443420917f)}, +{Q31(-0.85359479233537f), Q31( 0.88738125901579f)}, {Q31(-0.81412430338535f), Q31(-0.97480768049637f)}, +{Q31(-0.87930772356786f), Q31( 0.74748307690436f)}, {Q31(-0.71573331064977f), Q31(-0.98570608178923f)}, +{Q31( 0.83524300028228f), Q31( 0.83702537075163f)}, {Q31(-0.48086065601423f), Q31(-0.98848504923531f)}, +{Q31( 0.97139128574778f), Q31( 0.80093621198236f)}, {Q31( 0.51992825347895f), Q31( 0.80247631400510f)}, +{Q31(-0.00848591195325f), Q31(-0.76670128000486f)}, {Q31(-0.70294374303036f), Q31( 0.55359910445577f)}, +{Q31(-0.95894428168140f), Q31(-0.43265504344783f)}, {Q31( 0.97079252950321f), Q31( 0.09325857238682f)}, +{Q31(-0.92404293670797f), Q31( 0.85507704027855f)}, {Q31(-0.69506469500450f), Q31( 0.98633412625459f)}, +{Q31( 0.26559203620024f), Q31( 0.73314307966524f)}, {Q31( 0.28038443336943f), Q31( 0.14537913654427f)}, +{Q31(-0.74138124825523f), Q31( 0.99310339807762f)}, {Q31(-0.01752795995444f), Q31(-0.82616635284178f)}, +{Q31(-0.55126773094930f), Q31(-0.98898543862153f)}, {Q31( 0.97960898850996f), Q31(-0.94021446752851f)}, +{Q31(-0.99196309146936f), Q31( 0.67019017358456f)}, {Q31(-0.67684928085260f), Q31( 0.12631491649378f)}, +{Q31( 0.09140039465500f), Q31(-0.20537731453108f)}, {Q31(-0.71658965751996f), Q31(-0.97788200391224f)}, +{Q31( 0.81014640078925f), Q31( 0.53722648362443f)}, {Q31( 0.40616991671205f), Q31(-0.26469008598449f)}, +{Q31(-0.67680188682972f), Q31( 0.94502052337695f)}, {Q31( 0.86849774348749f), Q31(-0.18333598647899f)}, +{Q31(-0.99500381284851f), Q31(-0.02634122068550f)}, {Q31( 0.84329189340667f), Q31( 0.10406957462213f)}, +{Q31(-0.09215968531446f), Q31( 0.69540012101253f)}, {Q31( 0.99956173327206f), Q31(-0.12358542001404f)}, +{Q31(-0.79732779473535f), Q31(-0.91582524736159f)}, {Q31( 0.96349973642406f), Q31( 0.96640458041000f)}, +{Q31(-0.79942778496547f), Q31( 0.64323902822857f)}, {Q31(-0.11566039853896f), Q31( 0.28587846253726f)}, +{Q31(-0.39922954514662f), Q31( 0.94129601616966f)}, {Q31( 0.99089197565987f), Q31(-0.92062625581587f)}, +{Q31( 0.28631285179909f), Q31(-0.91035047143603f)}, {Q31(-0.83302725605608f), Q31(-0.67330410892084f)}, +{Q31( 0.95404443402072f), Q31( 0.49162765398743f)}, {Q31(-0.06449863579434f), Q31( 0.03250560813135f)}, +{Q31(-0.99575054486311f), Q31( 0.42389784469507f)}, {Q31(-0.65501142790847f), Q31( 0.82546114655624f)}, +{Q31(-0.81254441908887f), Q31(-0.51627234660629f)}, {Q31(-0.99646369485481f), Q31( 0.84490533520752f)}, +{Q31( 0.00287840603348f), Q31( 0.64768261158166f)}, {Q31( 0.70176989408455f), Q31(-0.20453028573322f)}, +{Q31( 0.96361882270190f), Q31( 0.40706967140989f)}, {Q31(-0.68883758192426f), Q31( 0.91338958840772f)}, +{Q31(-0.34875585502238f), Q31( 0.71472290693300f)}, {Q31( 0.91980081243087f), Q31( 0.66507455644919f)}, +{Q31(-0.99009048343881f), Q31( 0.85868021604848f)}, {Q31( 0.68865791458395f), Q31( 0.55660316809678f)}, +{Q31(-0.99484402129368f), Q31(-0.20052559254934f)}, {Q31( 0.94214511408023f), Q31(-0.99696425367461f)}, +{Q31(-0.67414626793544f), Q31( 0.49548221180078f)}, {Q31(-0.47339353684664f), Q31(-0.85904328834047f)}, +{Q31( 0.14323651387360f), Q31(-0.94145598222488f)}, {Q31(-0.29268293575672f), Q31( 0.05759224927952f)}, +{Q31( 0.43793861458754f), Q31(-0.78904969892724f)}, {Q31(-0.36345126374441f), Q31( 0.64874435357162f)}, +{Q31(-0.08750604656825f), Q31( 0.97686944362527f)}, {Q31(-0.96495267812511f), Q31(-0.53960305946511f)}, +{Q31( 0.55526940659947f), Q31( 0.78891523734774f)}, {Q31( 0.73538215752630f), Q31( 0.96452072373404f)}, +{Q31(-0.30889773919437f), Q31(-0.80664389776860f)}, {Q31( 0.03574995626194f), Q31(-0.97325616900959f)}, +{Q31( 0.98720684660488f), Q31( 0.48409133691962f)}, {Q31(-0.81689296271203f), Q31(-0.90827703628298f)}, +{Q31( 0.67866860118215f), Q31( 0.81284503870856f)}, {Q31(-0.15808569732583f), Q31( 0.85279555024382f)}, +{Q31( 0.80723395114371f), Q31(-0.24717418514605f)}, {Q31( 0.47788757329038f), Q31(-0.46333147839295f)}, +{Q31( 0.96367554763201f), Q31( 0.38486749303242f)}, {Q31(-0.99143875716818f), Q31(-0.24945277239809f)}, +{Q31( 0.83081876925833f), Q31(-0.94780851414763f)}, {Q31(-0.58753191905341f), Q31( 0.01290772389163f)}, +{Q31( 0.95538108220960f), Q31(-0.85557052096538f)}, {Q31(-0.96490920476211f), Q31(-0.64020970923102f)}, +{Q31(-0.97327101028521f), Q31( 0.12378128133110f)}, {Q31( 0.91400366022124f), Q31( 0.57972471346930f)}, +{Q31(-0.99925837363824f), Q31( 0.71084847864067f)}, {Q31(-0.86875903507313f), Q31(-0.20291699203564f)}, +{Q31(-0.26240034795124f), Q31(-0.68264554369108f)}, {Q31(-0.24664412953388f), Q31(-0.87642273115183f)}, +{Q31( 0.02416275806869f), Q31( 0.27192914288905f)}, {Q31( 0.82068619590515f), Q31(-0.85087787994476f)}, +{Q31( 0.88547373760759f), Q31(-0.89636802901469f)}, {Q31(-0.18173078152226f), Q31(-0.26152145156800f)}, +{Q31( 0.09355476558534f), Q31( 0.54845123045604f)}, {Q31(-0.54668414224090f), Q31( 0.95980774020221f)}, +{Q31( 0.37050990604091f), Q31(-0.59910140383171f)}, {Q31(-0.70373594262891f), Q31( 0.91227665827081f)}, +{Q31(-0.34600785879594f), Q31(-0.99441426144200f)}, {Q31(-0.68774481731008f), Q31(-0.30238837956299f)}, +{Q31(-0.26843291251234f), Q31( 0.83115668004362f)}, {Q31( 0.49072334613242f), Q31(-0.45359708737775f)}, +{Q31( 0.38975993093975f), Q31( 0.95515358099121f)}, {Q31(-0.97757125224150f), Q31( 0.05305894580606f)}, +{Q31(-0.17325552859616f), Q31(-0.92770672250494f)}, {Q31( 0.99948035025744f), Q31( 0.58285545563426f)}, +{Q31(-0.64946246527458f), Q31( 0.68645507104960f)}, {Q31(-0.12016920576437f), Q31(-0.57147322153312f)}, +{Q31(-0.58947456517751f), Q31(-0.34847132454388f)}, {Q31(-0.41815140454465f), Q31( 0.16276422358861f)}, +{Q31( 0.99885650204884f), Q31( 0.11136095490444f)}, {Q31(-0.56649614128386f), Q31(-0.90494866361587f)}, +{Q31( 0.94138021032330f), Q31( 0.35281916733018f)}, {Q31(-0.75725076534641f), Q31( 0.53650549640587f)}, +{Q31( 0.20541973692630f), Q31(-0.94435144369918f)}, {Q31( 0.99980371023351f), Q31( 0.79835913565599f)}, +{Q31( 0.29078277605775f), Q31( 0.35393777921520f)}, {Q31(-0.62858772103030f), Q31( 0.38765693387102f)}, +{Q31( 0.43440904467688f), Q31(-0.98546330463232f)}, {Q31(-0.98298583762390f), Q31( 0.21021524625209f)}, +{Q31( 0.19513029146934f), Q31(-0.94239832251867f)}, {Q31(-0.95476662400101f), Q31( 0.98364554179143f)}, +{Q31( 0.93379635304810f), Q31(-0.70881994583682f)}, {Q31(-0.85235410573336f), Q31(-0.08342347966410f)}, +{Q31(-0.86425093011245f), Q31(-0.45795025029466f)}, {Q31( 0.38879779059045f), Q31( 0.97274429344593f)}, +{Q31( 0.92045124735495f), Q31(-0.62433652524220f)}, {Q31( 0.89162532251878f), Q31( 0.54950955570563f)}, +{Q31(-0.36834336949252f), Q31( 0.96458298020975f)}, {Q31( 0.93891760988045f), Q31(-0.89968353740388f)}, +{Q31( 0.99267657565094f), Q31(-0.03757034316958f)}, {Q31(-0.94063471614176f), Q31( 0.41332338538963f)}, +{Q31( 0.99740224117019f), Q31(-0.16830494996370f)}, {Q31(-0.35899413170555f), Q31(-0.46633226649613f)}, +{Q31( 0.05237237274947f), Q31(-0.25640361602661f)}, {Q31( 0.36703583957424f), Q31(-0.38653265641875f)}, +{Q31( 0.91653180367913f), Q31(-0.30587628726597f)}, {Q31( 0.69000803499316f), Q31( 0.90952171386132f)}, +{Q31(-0.38658751133527f), Q31( 0.99501571208985f)}, {Q31(-0.29250814029851f), Q31( 0.37444994344615f)}, +{Q31(-0.60182204677608f), Q31( 0.86779651036123f)}, {Q31(-0.97418588163217f), Q31( 0.96468523666475f)}, +{Q31( 0.88461574003963f), Q31( 0.57508405276414f)}, {Q31( 0.05198933055162f), Q31( 0.21269661669964f)}, +{Q31(-0.53499621979720f), Q31( 0.97241553731237f)}, {Q31(-0.49429560226497f), Q31( 0.98183865291903f)}, +{Q31(-0.98935142339139f), Q31(-0.40249159006933f)}, {Q31(-0.98081380091130f), Q31(-0.72856895534041f)}, +{Q31(-0.27338148835532f), Q31( 0.99950922447209f)}, {Q31( 0.06310802338302f), Q31(-0.54539587529618f)}, +{Q31(-0.20461677199539f), Q31(-0.14209977628489f)}, {Q31( 0.66223843141647f), Q31( 0.72528579940326f)}, +{Q31(-0.84764345483665f), Q31( 0.02372316801261f)}, {Q31(-0.89039863483811f), Q31( 0.88866581484602f)}, +{Q31( 0.95903308477986f), Q31( 0.76744927173873f)}, {Q31( 0.73504123909879f), Q31(-0.03747203173192f)}, +{Q31(-0.31744434966056f), Q31(-0.36834111883652f)}, {Q31(-0.34110827591623f), Q31( 0.40211222807691f)}, +{Q31( 0.47803883714199f), Q31(-0.39423219786288f)}, {Q31( 0.98299195879514f), Q31( 0.01989791390047f)}, +{Q31(-0.30963073129751f), Q31(-0.18076720599336f)}, {Q31( 0.99992588229018f), Q31(-0.26281872094289f)}, +{Q31(-0.93149731080767f), Q31(-0.98313162570490f)}, {Q31( 0.99923472302773f), Q31(-0.80142993767554f)}, +{Q31(-0.26024169633417f), Q31(-0.75999759855752f)}, {Q31(-0.35712514743563f), Q31( 0.19298963768574f)}, +{Q31(-0.99899084509530f), Q31( 0.74645156992493f)}, {Q31( 0.86557171579452f), Q31( 0.55593866696299f)}, +{Q31( 0.33408042438752f), Q31( 0.86185953874709f)}, {Q31( 0.99010736374716f), Q31( 0.04602397576623f)}, +{Q31(-0.66694269691195f), Q31(-0.91643611810148f)}, {Q31( 0.64016792079480f), Q31( 0.15649530836856f)}, +{Q31( 0.99570534804836f), Q31( 0.45844586038111f)}, {Q31(-0.63431466947340f), Q31( 0.21079116459234f)}, +{Q31(-0.07706847005931f), Q31(-0.89581437101329f)}, {Q31( 0.98590090577724f), Q31( 0.88241721133981f)}, +{Q31( 0.80099335254678f), Q31(-0.36851896710853f)}, {Q31( 0.78368131392666f), Q31( 0.45506999802597f)}, +{Q31( 0.08707806671691f), Q31( 0.80938994918745f)}, {Q31(-0.86811883080712f), Q31( 0.39347308654705f)}, +{Q31(-0.39466529740375f), Q31(-0.66809432114456f)}, {Q31( 0.97875325649683f), Q31(-0.72467840967746f)}, +{Q31(-0.95038560288864f), Q31( 0.89563219587625f)}, {Q31( 0.17005239424212f), Q31( 0.54683053962658f)}, +{Q31(-0.76910792026848f), Q31(-0.96226617549298f)}, {Q31( 0.99743281016846f), Q31( 0.42697157037567f)}, +{Q31( 0.95437383549973f), Q31( 0.97002324109952f)}, {Q31( 0.99578905365569f), Q31(-0.54106826257356f)}, +{Q31( 0.28058259829990f), Q31(-0.85361420634036f)}, {Q31( 0.85256524470573f), Q31(-0.64567607735589f)}, +{Q31(-0.50608540105128f), Q31(-0.65846015480300f)}, {Q31(-0.97210735183243f), Q31(-0.23095213067791f)}, +{Q31( 0.95424048234441f), Q31(-0.99240147091219f)}, {Q31(-0.96926570524023f), Q31( 0.73775654896574f)}, +{Q31( 0.30872163214726f), Q31( 0.41514960556126f)}, {Q31(-0.24523839572639f), Q31( 0.63206633394807f)}, +{Q31(-0.33813265086024f), Q31(-0.38661779441897f)}, {Q31(-0.05826828420146f), Q31(-0.06940774188029f)}, +{Q31(-0.22898461455054f), Q31( 0.97054853316316f)}, {Q31(-0.18509915019881f), Q31( 0.47565762892084f)}, +{Q31(-0.10488238045009f), Q31(-0.87769947402394f)}, {Q31(-0.71886586182037f), Q31( 0.78030982480538f)}, +{Q31( 0.99793873738654f), Q31( 0.90041310491497f)}, {Q31( 0.57563307626120f), Q31(-0.91034337352097f)}, +{Q31( 0.28909646383717f), Q31( 0.96307783970534f)}, {Q31( 0.42188998312520f), Q31( 0.48148651230437f)}, +{Q31( 0.93335049681047f), Q31(-0.43537023883588f)}, {Q31(-0.97087374418267f), Q31( 0.86636445711364f)}, +{Q31( 0.36722871286923f), Q31( 0.65291654172961f)}, {Q31(-0.81093025665696f), Q31( 0.08778370229363f)}, +{Q31(-0.26240603062237f), Q31(-0.92774095379098f)}, {Q31( 0.83996497984604f), Q31( 0.55839849139647f)}, +{Q31(-0.99909615720225f), Q31(-0.96024605713970f)}, {Q31( 0.74649464155061f), Q31( 0.12144893606462f)}, +{Q31(-0.74774595569805f), Q31(-0.26898062008959f)}, {Q31( 0.95781667469567f), Q31(-0.79047927052628f)}, +{Q31( 0.95472308713099f), Q31(-0.08588776019550f)}, {Q31( 0.48708332746299f), Q31( 0.99999041579432f)}, +{Q31( 0.46332038247497f), Q31( 0.10964126185063f)}, {Q31(-0.76497004940162f), Q31( 0.89210929242238f)}, +{Q31( 0.57397389364339f), Q31( 0.35289703373760f)}, {Q31( 0.75374316974495f), Q31( 0.96705214651335f)}, +{Q31(-0.59174397685714f), Q31(-0.89405370422752f)}, {Q31( 0.75087906691890f), Q31(-0.29612672982396f)}, +{Q31(-0.98607857336230f), Q31( 0.25034911730023f)}, {Q31(-0.40761056640505f), Q31(-0.90045573444695f)}, +{Q31( 0.66929266740477f), Q31( 0.98629493401748f)}, {Q31(-0.97463695257310f), Q31(-0.00190223301301f)}, +{Q31( 0.90145509409859f), Q31( 0.99781390365446f)}, {Q31(-0.87259289048043f), Q31( 0.99233587353666f)}, +{Q31(-0.91529461447692f), Q31(-0.15698707534206f)}, {Q31(-0.03305738840705f), Q31(-0.37205262859764f)}, +{Q31( 0.07223051368337f), Q31(-0.88805001733626f)}, {Q31( 0.99498012188353f), Q31( 0.97094358113387f)}, +{Q31(-0.74904939500519f), Q31( 0.99985483641521f)}, {Q31( 0.04585228574211f), Q31( 0.99812337444082f)}, +{Q31(-0.89054954257993f), Q31(-0.31791913188064f)}, {Q31(-0.83782144651251f), Q31( 0.97637632547466f)}, +{Q31( 0.33454804933804f), Q31(-0.86231516800408f)}, {Q31(-0.99707579362824f), Q31( 0.93237990079441f)}, +{Q31(-0.22827527843994f), Q31( 0.18874759397997f)}, {Q31( 0.67248046289143f), Q31(-0.03646211390569f)}, +{Q31(-0.05146538187944f), Q31(-0.92599700120679f)}, {Q31( 0.99947295749905f), Q31( 0.93625229707912f)}, +{Q31( 0.66951124390363f), Q31( 0.98905825623893f)}, {Q31(-0.99602956559179f), Q31(-0.44654715757688f)}, +{Q31( 0.82104905483590f), Q31( 0.99540741724928f)}, {Q31( 0.99186510988782f), Q31( 0.72023001312947f)}, +{Q31(-0.65284592392918f), Q31( 0.52186723253637f)}, {Q31( 0.93885443798188f), Q31(-0.74895312615259f)}, +{Q31( 0.96735248738388f), Q31( 0.90891816978629f)}, {Q31(-0.22225968841114f), Q31( 0.57124029781228f)}, +{Q31(-0.44132783753414f), Q31(-0.92688840659280f)}, {Q31(-0.85694974219574f), Q31( 0.88844532719844f)}, +{Q31( 0.91783042091762f), Q31(-0.46356892383970f)}, {Q31( 0.72556974415690f), Q31(-0.99899555770747f)}, +{Q31(-0.99711581834508f), Q31( 0.58211560180426f)}, {Q31( 0.77638976371966f), Q31( 0.94321834873819f)}, +{Q31( 0.07717324253925f), Q31( 0.58638399856595f)}, {Q31(-0.56049829194163f), Q31( 0.82522301569036f)}, +{Q31( 0.98398893639988f), Q31( 0.39467440420569f)}, {Q31( 0.47546946844938f), Q31( 0.68613044836811f)}, +{Q31( 0.65675089314631f), Q31( 0.18331637134880f)}, {Q31( 0.03273375457980f), Q31(-0.74933109564108f)}, +{Q31(-0.38684144784738f), Q31( 0.51337349030406f)}, {Q31(-0.97346267944545f), Q31(-0.96549364384098f)}, +{Q31(-0.53282156061942f), Q31(-0.91423265091354f)}, {Q31( 0.99817310731176f), Q31( 0.61133572482148f)}, +{Q31(-0.50254500772635f), Q31(-0.88829338134294f)}, {Q31( 0.01995873238855f), Q31( 0.85223515096765f)}, +{Q31( 0.99930381973804f), Q31( 0.94578896296649f)}, {Q31( 0.82907767600783f), Q31(-0.06323442598128f)}, +{Q31(-0.58660709669728f), Q31( 0.96840773806582f)}, {Q31(-0.17573736667267f), Q31(-0.48166920859485f)}, +{Q31( 0.83434292401346f), Q31(-0.13023450646997f)}, {Q31( 0.05946491307025f), Q31( 0.20511047074866f)}, +{Q31( 0.81505484574602f), Q31(-0.94685947861369f)}, {Q31(-0.44976380954860f), Q31( 0.40894572671545f)}, +{Q31(-0.89746474625671f), Q31( 0.99846578838537f)}, {Q31( 0.39677256130792f), Q31(-0.74854668609359f)}, +{Q31(-0.07588948563079f), Q31( 0.74096214084170f)}, {Q31( 0.76343198951445f), Q31( 0.41746629422634f)}, +{Q31(-0.74490104699626f), Q31( 0.94725911744610f)}, {Q31( 0.64880119792759f), Q31( 0.41336660830571f)}, +{Q31( 0.62319537462542f), Q31(-0.93098313552599f)}, {Q31( 0.42215817594807f), Q31(-0.07712787385208f)}, +{Q31( 0.02704554141885f), Q31(-0.05417518053666f)}, {Q31( 0.80001773566818f), Q31( 0.91542195141039f)}, +{Q31(-0.79351832348816f), Q31(-0.36208897989136f)}, {Q31( 0.63872359151636f), Q31( 0.08128252493444f)}, +{Q31( 0.52890520960295f), Q31( 0.60048872455592f)}, {Q31( 0.74238552914587f), Q31( 0.04491915291044f)}, +{Q31( 0.99096131449250f), Q31(-0.19451182854402f)}, {Q31(-0.80412329643109f), Q31(-0.88513818199457f)}, +{Q31(-0.64612616129736f), Q31( 0.72198674804544f)}, {Q31( 0.11657770663191f), Q31(-0.83662833815041f)}, +{Q31(-0.95053182488101f), Q31(-0.96939905138082f)}, {Q31(-0.62228872928622f), Q31( 0.82767262846661f)}, +{Q31( 0.03004475787316f), Q31(-0.99738896333384f)}, {Q31(-0.97987214341034f), Q31( 0.36526129686425f)}, +{Q31(-0.99986980746200f), Q31(-0.36021610299715f)}, {Q31( 0.89110648599879f), Q31(-0.97894250343044f)}, +{Q31( 0.10407960510582f), Q31( 0.77357793811619f)}, {Q31( 0.95964737821728f), Q31(-0.35435818285502f)}, +{Q31( 0.50843233159162f), Q31( 0.96107691266205f)}, {Q31( 0.17006334670615f), Q31(-0.76854025314829f)}, +{Q31( 0.25872675063360f), Q31( 0.99893303933816f)}, {Q31(-0.01115998681937f), Q31( 0.98496019742444f)}, +{Q31(-0.79598702973261f), Q31( 0.97138411318894f)}, {Q31(-0.99264708948101f), Q31(-0.99542822402536f)}, +{Q31(-0.99829663752818f), Q31( 0.01877138824311f)}, {Q31(-0.70801016548184f), Q31( 0.33680685948117f)}, +{Q31(-0.70467057786826f), Q31( 0.93272777501857f)}, {Q31( 0.99846021905254f), Q31(-0.98725746254433f)}, +{Q31(-0.63364968534650f), Q31(-0.16473594423746f)}, {Q31(-0.16258217500792f), Q31(-0.95939125400802f)}, +{Q31(-0.43645594360633f), Q31(-0.94805030113284f)}, {Q31(-0.99848471702976f), Q31( 0.96245166923809f)}, +{Q31(-0.16796458968998f), Q31(-0.98987511890470f)}, {Q31(-0.87979225745213f), Q31(-0.71725725041680f)}, +{Q31( 0.44183099021786f), Q31(-0.93568974498761f)}, {Q31( 0.93310180125532f), Q31(-0.99913308068246f)}, +{Q31(-0.93941931782002f), Q31(-0.56409379640356f)}, {Q31(-0.88590003188677f), Q31( 0.47624600491382f)}, +{Q31( 0.99971463703691f), Q31(-0.83889954253462f)}, {Q31(-0.75376385639978f), Q31( 0.00814643438625f)}, +{Q31( 0.93887685615875f), Q31(-0.11284528204636f)}, {Q31( 0.85126435782309f), Q31( 0.52349251543547f)}, +{Q31( 0.39701421446381f), Q31( 0.81779634174316f)}, {Q31(-0.37024464187437f), Q31(-0.87071656222959f)}, +{Q31(-0.36024828242896f), Q31( 0.34655735648287f)}, {Q31(-0.93388812549209f), Q31(-0.84476541096429f)}, +{Q31(-0.65298804552119f), Q31(-0.18439575450921f)}, {Q31( 0.11960319006843f), Q31( 0.99899346780168f)}, +{Q31( 0.94292565553160f), Q31( 0.83163906518293f)}, {Q31( 0.75081145286948f), Q31(-0.35533223142265f)}, +{Q31( 0.56721979748394f), Q31(-0.24076836414499f)}, {Q31( 0.46857766746029f), Q31(-0.30140233457198f)}, +{Q31( 0.97312313923635f), Q31(-0.99548191630031f)}, {Q31(-0.38299976567017f), Q31( 0.98516909715427f)}, +{Q31( 0.41025800019463f), Q31( 0.02116736935734f)}, {Q31( 0.09638062008048f), Q31( 0.04411984381457f)}, +{Q31(-0.85283249275397f), Q31( 0.91475563922421f)}, {Q31( 0.88866808958124f), Q31(-0.99735267083226f)}, +{Q31(-0.48202429536989f), Q31(-0.96805608884164f)}, {Q31( 0.27572582416567f), Q31( 0.58634753335832f)}, +{Q31(-0.65889129659168f), Q31( 0.58835634138583f)}, {Q31( 0.98838086953732f), Q31( 0.99994349600236f)}, +{Q31(-0.20651349620689f), Q31( 0.54593044066355f)}, {Q31(-0.62126416356920f), Q31(-0.59893681700392f)}, +{Q31( 0.20320105410437f), Q31(-0.86879180355289f)}, {Q31(-0.97790548600584f), Q31( 0.96290806999242f)}, +{Q31( 0.11112534735126f), Q31( 0.21484763313301f)}, {Q31(-0.41368337314182f), Q31( 0.28216837680365f)}, +{Q31( 0.24133038992960f), Q31( 0.51294362630238f)}, {Q31(-0.66393410674885f), Q31(-0.08249679629081f)}, +{Q31(-0.53697829178752f), Q31(-0.97649903936228f)}, {Q31(-0.97224737889348f), Q31( 0.22081333579837f)}, +{Q31( 0.87392477144549f), Q31(-0.12796173740361f)}, {Q31( 0.19050361015753f), Q31( 0.01602615387195f)}, +{Q31(-0.46353441212724f), Q31(-0.95249041539006f)}, {Q31(-0.07064096339021f), Q31(-0.94479803205886f)}, +{Q31(-0.92444085484466f), Q31(-0.10457590187436f)}, {Q31(-0.83822593578728f), Q31(-0.01695043208885f)}, +{Q31( 0.75214681811150f), Q31(-0.99955681042665f)}, {Q31(-0.42102998829339f), Q31( 0.99720941999394f)}, +{Q31(-0.72094786237696f), Q31(-0.35008961934255f)}, {Q31( 0.78843311019251f), Q31( 0.52851398958271f)}, +{Q31( 0.97394027897442f), Q31(-0.26695944086561f)}, {Q31( 0.99206463477946f), Q31(-0.57010120849429f)}, +{Q31( 0.76789609461795f), Q31(-0.76519356730966f)}, {Q31(-0.82002421836409f), Q31(-0.73530179553767f)}, +{Q31( 0.81924990025724f), Q31( 0.99698425250579f)}, {Q31(-0.26719850873357f), Q31( 0.68903369776193f)}, +{Q31(-0.43311260380975f), Q31( 0.85321815947490f)}, {Q31( 0.99194979673836f), Q31( 0.91876249766422f)}, +{Q31(-0.80692001248487f), Q31(-0.32627540663214f)}, {Q31( 0.43080003649976f), Q31(-0.21919095636638f)}, +{Q31( 0.67709491937357f), Q31(-0.95478075822906f)}, {Q31( 0.56151770568316f), Q31(-0.70693811747778f)}, +{Q31( 0.10831862810749f), Q31(-0.08628837174592f)}, {Q31( 0.91229417540436f), Q31(-0.65987351408410f)}, +{Q31(-0.48972893932274f), Q31( 0.56289246362686f)}, {Q31(-0.89033658689697f), Q31(-0.71656563987082f)}, +{Q31( 0.65269447475094f), Q31( 0.65916004833932f)}, {Q31( 0.67439478141121f), Q31(-0.81684380846796f)}, +{Q31(-0.47770832416973f), Q31(-0.16789556203025f)}, {Q31(-0.99715979260878f), Q31(-0.93565784007648f)}, +{Q31(-0.90889593602546f), Q31( 0.62034397054380f)}, {Q31(-0.06618622548177f), Q31(-0.23812217221359f)}, +{Q31( 0.99430266919728f), Q31( 0.18812555317553f)}, {Q31( 0.97686402381843f), Q31(-0.28664534366620f)}, +{Q31( 0.94813650221268f), Q31(-0.97506640027128f)}, {Q31(-0.95434497492853f), Q31(-0.79607978501983f)}, +{Q31(-0.49104783137150f), Q31( 0.32895214359663f)}, {Q31( 0.99881175120751f), Q31( 0.88993983831354f)}, +{Q31( 0.50449166760303f), Q31(-0.85995072408434f)}, {Q31( 0.47162891065108f), Q31(-0.18680204049569f)}, +{Q31(-0.62081581361840f), Q31( 0.75000676218956f)}, {Q31(-0.43867015250812f), Q31( 0.99998069244322f)}, +{Q31( 0.98630563232075f), Q31(-0.53578899600662f)}, {Q31(-0.61510362277374f), Q31(-0.89515019899997f)}, +{Q31(-0.03841517601843f), Q31(-0.69888815681179f)}, {Q31(-0.30102157304644f), Q31(-0.07667808922205f)}, +{Q31( 0.41881284182683f), Q31( 0.02188098922282f)}, {Q31(-0.86135454941237f), Q31( 0.98947480909359f)}, +{Q31( 0.67226861393788f), Q31(-0.13494389011014f)}, {Q31(-0.70737398842068f), Q31(-0.76547349325992f)}, +{Q31( 0.94044946687963f), Q31( 0.09026201157416f)}, {Q31(-0.82386352534327f), Q31( 0.08924768823676f)}, +{Q31(-0.32070666698656f), Q31( 0.50143421908753f)}, {Q31( 0.57593163224487f), Q31(-0.98966422921509f)}, +{Q31(-0.36326018419965f), Q31( 0.07440243123228f)}, {Q31( 0.99979044674350f), Q31(-0.14130287347405f)}, +{Q31(-0.92366023326932f), Q31(-0.97979298068180f)}, {Q31(-0.44607178518598f), Q31(-0.54233252016394f)}, +{Q31( 0.44226800932956f), Q31( 0.71326756742752f)}, {Q31( 0.03671907158312f), Q31( 0.63606389366675f)}, +{Q31( 0.52175424682195f), Q31(-0.85396826735705f)}, {Q31(-0.94701139690956f), Q31(-0.01826348194255f)}, +{Q31(-0.98759606946049f), Q31( 0.82288714303073f)}, {Q31( 0.87434794743625f), Q31( 0.89399495655433f)}, +{Q31(-0.93412041758744f), Q31( 0.41374052024363f)}, {Q31( 0.96063943315511f), Q31( 0.93116709541280f)}, +{Q31( 0.97534253457837f), Q31( 0.86150930812689f)}, {Q31( 0.99642466504163f), Q31( 0.70190043427512f)}, +{Q31(-0.94705089665984f), Q31(-0.29580042814306f)}, {Q31( 0.91599807087376f), Q31(-0.98147830385781f)}, +// Start of duplicated table +{Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, +{Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, +{Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, +{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, +}; + +#endif /* AVCODEC_AACSBRDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aactab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aactab.h new file mode 100644 index 00000000..7cd81282 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aactab.h @@ -0,0 +1,186 @@ +/* + * AAC data declarations + * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) + * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAC data declarations + * @author Oded Shimon ( ods15 ods15 dyndns org ) + * @author Maxim Gavrilov ( maxim.gavrilov gmail com ) + */ + +#ifndef AVCODEC_AACTAB_H +#define AVCODEC_AACTAB_H + +#include "libavutil/mem.h" +#include "aac.h" + +#include + +/* NOTE: + * Tables in this file are shared by the AAC decoders and encoder + */ + +extern float ff_aac_pow2sf_tab[428]; +extern float ff_aac_pow34sf_tab[428]; + +static inline void ff_aac_tableinit(void) +{ + int i; + + /* 2^(i/16) for 0 <= i <= 15 */ + static const float exp2_lut[] = { + 1.00000000000000000000, + 1.04427378242741384032, + 1.09050773266525765921, + 1.13878863475669165370, + 1.18920711500272106672, + 1.24185781207348404859, + 1.29683955465100966593, + 1.35425554693689272830, + 1.41421356237309504880, + 1.47682614593949931139, + 1.54221082540794082361, + 1.61049033194925430818, + 1.68179283050742908606, + 1.75625216037329948311, + 1.83400808640934246349, + 1.91520656139714729387, + }; + float t1 = 8.8817841970012523233890533447265625e-16; // 2^(-50) + float t2 = 3.63797880709171295166015625e-12; // 2^(-38) + int t1_inc_cur, t2_inc_cur; + int t1_inc_prev = 0; + int t2_inc_prev = 8; + + for (i = 0; i < 428; i++) { + t1_inc_cur = 4 * (i % 4); + t2_inc_cur = (8 + 3*i) % 16; + if (t1_inc_cur < t1_inc_prev) + t1 *= 2; + if (t2_inc_cur < t2_inc_prev) + t2 *= 2; + // A much more efficient and accurate way of doing: + // ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0); + // ff_aac_pow34sf_tab[i] = pow(ff_aac_pow2sf_tab[i], 3.0/4.0); + ff_aac_pow2sf_tab[i] = t1 * exp2_lut[t1_inc_cur]; + ff_aac_pow34sf_tab[i] = t2 * exp2_lut[t2_inc_cur]; + t1_inc_prev = t1_inc_cur; + t2_inc_prev = t2_inc_cur; + } +} + +/* @name ltp_coef + * Table of the LTP coefficients + */ +static const INTFLOAT ltp_coef[8] = { + Q30(0.570829), Q30(0.696616), Q30(0.813004), Q30(0.911304), + Q30(0.984900), Q30(1.067894), Q30(1.194601), Q30(1.369533), +}; + +/* @name tns_tmp2_map + * Tables of the tmp2[] arrays of LPC coefficients used for TNS. + * The suffix _M_N[] indicate the values of coef_compress and coef_res + * respectively. + * @{ + */ +static const INTFLOAT tns_tmp2_map_1_3[4] = { + Q31(0.00000000), Q31(-0.43388373), Q31(0.64278758), Q31(0.34202015), +}; + +static const INTFLOAT tns_tmp2_map_0_3[8] = { + Q31(0.00000000), Q31(-0.43388373), Q31(-0.78183150), Q31(-0.97492790), + Q31(0.98480773), Q31( 0.86602539), Q31( 0.64278758), Q31( 0.34202015), +}; + +static const INTFLOAT tns_tmp2_map_1_4[8] = { + Q31(0.00000000), Q31(-0.20791170), Q31(-0.40673664), Q31(-0.58778524), + Q31(0.67369562), Q31( 0.52643216), Q31( 0.36124167), Q31( 0.18374951), +}; + +static const INTFLOAT tns_tmp2_map_0_4[16] = { + Q31( 0.00000000), Q31(-0.20791170), Q31(-0.40673664), Q31(-0.58778524), + Q31(-0.74314481), Q31(-0.86602539), Q31(-0.95105654), Q31(-0.99452192), + Q31( 0.99573416), Q31( 0.96182561), Q31( 0.89516330), Q31( 0.79801720), + Q31( 0.67369562), Q31( 0.52643216), Q31( 0.36124167), Q31( 0.18374951), +}; + +static const INTFLOAT * const tns_tmp2_map[4] = { + tns_tmp2_map_0_3, + tns_tmp2_map_0_4, + tns_tmp2_map_1_3, + tns_tmp2_map_1_4 +}; +// @} + +/* @name window coefficients + * @{ + */ +DECLARE_ALIGNED(32, extern float, ff_aac_kbd_long_1024)[1024]; +DECLARE_ALIGNED(32, extern float, ff_aac_kbd_short_128)[128]; +DECLARE_ALIGNED(32, extern float, ff_aac_kbd_long_960)[960]; +DECLARE_ALIGNED(32, extern float, ff_aac_kbd_short_120)[120]; +DECLARE_ALIGNED(32, extern int, ff_aac_kbd_long_1024_fixed)[1024]; +DECLARE_ALIGNED(32, extern int, ff_aac_kbd_long_512_fixed)[512]; +DECLARE_ALIGNED(32, extern int, ff_aac_kbd_short_128_fixed)[128]; +DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_512)[1920]; +DECLARE_ALIGNED(32, extern const int, ff_aac_eld_window_512_fixed)[1920]; +DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_480)[1800]; +DECLARE_ALIGNED(32, extern const int, ff_aac_eld_window_480_fixed)[1800]; +// @} + +/* @name number of scalefactor window bands for long and short transform windows respectively + * @{ + */ +extern const uint8_t ff_aac_num_swb_1024[]; +extern const uint8_t ff_aac_num_swb_960 []; +extern const uint8_t ff_aac_num_swb_512 []; +extern const uint8_t ff_aac_num_swb_480 []; +extern const uint8_t ff_aac_num_swb_128 []; +extern const uint8_t ff_aac_num_swb_120 []; +// @} + +extern const uint8_t ff_aac_pred_sfb_max []; + +extern const uint32_t ff_aac_scalefactor_code[121]; +extern const uint8_t ff_aac_scalefactor_bits[121]; + +extern const uint16_t * const ff_aac_spectral_codes[11]; +extern const uint8_t * const ff_aac_spectral_bits [11]; +extern const uint16_t ff_aac_spectral_sizes[11]; + +extern const float *ff_aac_codebook_vectors[]; +extern const float *ff_aac_codebook_vector_vals[]; +extern const uint16_t *ff_aac_codebook_vector_idx[]; + +extern const uint16_t * const ff_swb_offset_1024[13]; +extern const uint16_t * const ff_swb_offset_960 [13]; +extern const uint16_t * const ff_swb_offset_512 [13]; +extern const uint16_t * const ff_swb_offset_480 [13]; +extern const uint16_t * const ff_swb_offset_128 [13]; +extern const uint16_t * const ff_swb_offset_120 [13]; + +extern const uint8_t ff_tns_max_bands_1024[13]; +extern const uint8_t ff_tns_max_bands_512 [13]; +extern const uint8_t ff_tns_max_bands_480 [13]; +extern const uint8_t ff_tns_max_bands_128 [13]; + +#endif /* AVCODEC_AACTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aandcttab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aandcttab.h new file mode 100644 index 00000000..b0a2f44e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aandcttab.h @@ -0,0 +1,32 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AAN (Arai, Agui and Nakajima) (I)DCT tables + */ + +#ifndef AVCODEC_AANDCTTAB_H +#define AVCODEC_AANDCTTAB_H + +#include + +extern const uint16_t ff_aanscales[64]; +extern const uint16_t ff_inv_aanscales[64]; + +#endif /* AVCODEC_AANDCTTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/asm-offsets.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/asm-offsets.h new file mode 100644 index 00000000..fc38eed2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/asm-offsets.h @@ -0,0 +1,25 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_ASM_OFFSETS_H +#define AVCODEC_AARCH64_ASM_OFFSETS_H + +/* FFTContext */ +#define IMDCT_HALF 0x48 + +#endif /* AVCODEC_AARCH64_ASM_OFFSETS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/cabac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/cabac.h new file mode 100644 index 00000000..6b9b77eb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/cabac.h @@ -0,0 +1,104 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_CABAC_H +#define AVCODEC_AARCH64_CABAC_H + +#include "config.h" +#if HAVE_INLINE_ASM + +#include "libavutil/attributes.h" +#include "libavutil/internal.h" +#include "libavcodec/cabac.h" + +#define get_cabac_inline get_cabac_inline_aarch64 +static av_always_inline int get_cabac_inline_aarch64(CABACContext *c, + uint8_t *const state) +{ + int bit; + void *reg_a, *reg_b, *reg_c, *tmp; + + __asm__ volatile( + "ldrb %w[bit] , [%[state]] \n\t" + "add %[r_b] , %[tables] , %[lps_off] \n\t" + "mov %w[tmp] , %w[range] \n\t" + "and %w[range] , %w[range] , #0xC0 \n\t" + "lsl %w[r_c] , %w[range] , #1 \n\t" + "add %[r_b] , %[r_b] , %w[bit], UXTW \n\t" + "ldrb %w[range] , [%[r_b], %w[r_c], SXTW] \n\t" + "sub %w[r_c] , %w[tmp] , %w[range] \n\t" + "lsl %w[tmp] , %w[r_c] , #17 \n\t" + "cmp %w[tmp] , %w[low] \n\t" + "csel %w[tmp] , %w[tmp] , wzr , cc \n\t" + "csel %w[range] , %w[r_c] , %w[range], gt \n\t" + "cinv %w[bit] , %w[bit] , cc \n\t" + "sub %w[low] , %w[low] , %w[tmp] \n\t" + "add %[r_b] , %[tables] , %[norm_off] \n\t" + "add %[r_a] , %[tables] , %[mlps_off] \n\t" + "ldrb %w[tmp] , [%[r_b], %w[range], SXTW] \n\t" + "ldrb %w[r_a] , [%[r_a], %w[bit], SXTW] \n\t" + "lsl %w[low] , %w[low] , %w[tmp] \n\t" + "lsl %w[range] , %w[range] , %w[tmp] \n\t" + "uxth %w[r_c] , %w[low] \n\t" + "strb %w[r_a] , [%[state]] \n\t" + "cbnz %w[r_c] , 2f \n\t" + "ldr %[r_c] , [%[c], %[byte]] \n\t" + "ldr %[r_a] , [%[c], %[end]] \n\t" + "ldrh %w[tmp] , [%[r_c]] \n\t" + "cmp %[r_c] , %[r_a] \n\t" + "b.ge 1f \n\t" + "add %[r_a] , %[r_c] , #2 \n\t" + "str %[r_a] , [%[c], %[byte]] \n\t" + "1: \n\t" + "sub %w[r_c] , %w[low] , #1 \n\t" + "eor %w[r_c] , %w[r_c] , %w[low] \n\t" + "rev %w[tmp] , %w[tmp] \n\t" + "lsr %w[r_c] , %w[r_c] , #15 \n\t" + "lsr %w[tmp] , %w[tmp] , #15 \n\t" + "ldrb %w[r_c] , [%[r_b], %w[r_c], SXTW] \n\t" + "mov %w[r_b] , #0xFFFF \n\t" + "mov %w[r_a] , #7 \n\t" + "sub %w[tmp] , %w[tmp] , %w[r_b] \n\t" + "sub %w[r_c] , %w[r_a] , %w[r_c] \n\t" + "lsl %w[tmp] , %w[tmp] , %w[r_c] \n\t" + "add %w[low] , %w[low] , %w[tmp] \n\t" + "2: \n\t" + : [bit]"=&r"(bit), + [low]"+&r"(c->low), + [range]"+&r"(c->range), + [r_a]"=&r"(reg_a), + [r_b]"=&r"(reg_b), + [r_c]"=&r"(reg_c), + [tmp]"=&r"(tmp) + : [c]"r"(c), + [state]"r"(state), + [tables]"r"(ff_h264_cabac_tables), + [byte]"i"(offsetof(CABACContext, bytestream)), + [end]"i"(offsetof(CABACContext, bytestream_end)), + [norm_off]"I"(H264_NORM_SHIFT_OFFSET), + [lps_off]"I"(H264_LPS_RANGE_OFFSET), + [mlps_off]"I"(H264_MLPS_STATE_OFFSET + 128) + : "memory", "cc" + ); + + return bit & 1; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_AARCH64_CABAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/idct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/idct.h new file mode 100644 index 00000000..5c490461 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/idct.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_IDCT_H +#define AVCODEC_AARCH64_IDCT_H + +#include + +void ff_simple_idct_neon(int16_t *data); +void ff_simple_idct_put_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); + +#endif /* AVCODEC_AARCH64_IDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp8dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp8dsp.h new file mode 100644 index 00000000..871fed7a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp8dsp.h @@ -0,0 +1,75 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_VP8DSP_H +#define AVCODEC_AARCH64_VP8DSP_H + +#include "libavcodec/vp8dsp.h" + +#define VP8_LF_Y(hv, inner, opt) \ + void ff_vp8_##hv##_loop_filter16##inner##_##opt(uint8_t *dst, \ + ptrdiff_t stride, \ + int flim_E, int flim_I, \ + int hev_thresh) + +#define VP8_LF_UV(hv, inner, opt) \ + void ff_vp8_##hv##_loop_filter8uv##inner##_##opt(uint8_t *dstU, \ + uint8_t *dstV, \ + ptrdiff_t stride, \ + int flim_E, int flim_I, \ + int hev_thresh) + +#define VP8_LF_SIMPLE(hv, opt) \ + void ff_vp8_##hv##_loop_filter16_simple_##opt(uint8_t *dst, \ + ptrdiff_t stride, \ + int flim) + +#define VP8_LF_HV(inner, opt) \ + VP8_LF_Y(h, inner, opt); \ + VP8_LF_Y(v, inner, opt); \ + VP8_LF_UV(h, inner, opt); \ + VP8_LF_UV(v, inner, opt) + +#define VP8_LF(opt) \ + VP8_LF_HV(, opt); \ + VP8_LF_HV(_inner, opt); \ + VP8_LF_SIMPLE(h, opt); \ + VP8_LF_SIMPLE(v, opt) + +#define VP8_MC(n, opt) \ + void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ + uint8_t *src, ptrdiff_t srcstride, \ + int h, int x, int y) + +#define VP8_EPEL(w, opt) \ + VP8_MC(pixels ## w, opt); \ + VP8_MC(epel ## w ## _h4, opt); \ + VP8_MC(epel ## w ## _h6, opt); \ + VP8_MC(epel ## w ## _v4, opt); \ + VP8_MC(epel ## w ## _h4v4, opt); \ + VP8_MC(epel ## w ## _h6v4, opt); \ + VP8_MC(epel ## w ## _v6, opt); \ + VP8_MC(epel ## w ## _h4v6, opt); \ + VP8_MC(epel ## w ## _h6v6, opt) + +#define VP8_BILIN(w, opt) \ + VP8_MC(bilin ## w ## _h, opt); \ + VP8_MC(bilin ## w ## _v, opt); \ + VP8_MC(bilin ## w ## _hv, opt) + +#endif /* AVCODEC_AARCH64_VP8DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp9dsp_init.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp9dsp_init.h new file mode 100644 index 00000000..9df1752c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aarch64/vp9dsp_init.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017 Google Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AARCH64_VP9DSP_INIT_H +#define AVCODEC_AARCH64_VP9DSP_INIT_H + +#include "libavcodec/vp9dsp.h" + +void ff_vp9dsp_init_10bpp_aarch64(VP9DSPContext *dsp); +void ff_vp9dsp_init_12bpp_aarch64(VP9DSPContext *dsp); + +#endif /* AVCODEC_AARCH64_VP9DSP_INIT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3.h new file mode 100644 index 00000000..f8f6a81f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3.h @@ -0,0 +1,263 @@ +/* + * Common code between the AC-3 encoder and decoder + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Common code between the AC-3 encoder and decoder. + */ + +#ifndef AVCODEC_AC3_H +#define AVCODEC_AC3_H + +#define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */ +#define EAC3_MAX_CHANNELS 16 /**< maximum number of channels in EAC3 */ +#define AC3_MAX_CHANNELS 7 /**< maximum number of channels, including coupling channel */ +#define CPL_CH 0 /**< coupling channel index */ + +#define AC3_MAX_COEFS 256 +#define AC3_BLOCK_SIZE 256 +#define AC3_MAX_BLOCKS 6 +#define AC3_FRAME_SIZE (AC3_MAX_BLOCKS * 256) +#define AC3_WINDOW_SIZE (AC3_BLOCK_SIZE * 2) +#define AC3_CRITICAL_BANDS 50 +#define AC3_MAX_CPL_BANDS 18 + +#include "libavutil/opt.h" +#include "avcodec.h" +#include "ac3tab.h" + +/* exponent encoding strategy */ +#define EXP_REUSE 0 +#define EXP_NEW 1 + +#define EXP_D15 1 +#define EXP_D25 2 +#define EXP_D45 3 + +#ifndef USE_FIXED +#define USE_FIXED 0 +#endif + +#if USE_FIXED + +#define FFT_FLOAT 0 + +#define FIXR(a) ((int)((a) * 0 + 0.5)) +#define FIXR12(a) ((int)((a) * 4096 + 0.5)) +#define FIXR15(a) ((int)((a) * 32768 + 0.5)) +#define ROUND15(x) ((x) + 16384) >> 15 + +#define AC3_RENAME(x) x ## _fixed +#define AC3_NORM(norm) (1<<24)/(norm) +#define AC3_MUL(a,b) ((((int64_t) (a)) * (b))>>12) +#define AC3_RANGE(x) ((x)|(((x)&128)<<1)) +#define AC3_HEAVY_RANGE(x) ((x)<<1) +#define AC3_DYNAMIC_RANGE(x) (x) +#define AC3_SPX_BLEND(x) (x) +#define AC3_DYNAMIC_RANGE1 0 + +typedef int INTFLOAT; +typedef int16_t SHORTFLOAT; + +#else /* USE_FIXED */ + +#define FIXR(x) ((float)(x)) +#define FIXR12(x) ((float)(x)) +#define FIXR15(x) ((float)(x)) +#define ROUND15(x) (x) + +#define AC3_RENAME(x) x +#define AC3_NORM(norm) (1.0f/(norm)) +#define AC3_MUL(a,b) ((a) * (b)) +#define AC3_RANGE(x) (dynamic_range_tab[(x)]) +#define AC3_HEAVY_RANGE(x) (ff_ac3_heavy_dynamic_range_tab[(x)]) +#define AC3_DYNAMIC_RANGE(x) (powf(x, s->drc_scale)) +#define AC3_SPX_BLEND(x) (x)* (1.0f/32) +#define AC3_DYNAMIC_RANGE1 1.0f + +typedef float INTFLOAT; +typedef float SHORTFLOAT; + +#endif /* USE_FIXED */ + +#define AC3_LEVEL(x) ROUND15((x) * FIXR15(M_SQRT1_2)) + +/* pre-defined gain values */ +#define LEVEL_PLUS_3DB M_SQRT2 +#define LEVEL_PLUS_1POINT5DB 1.1892071150027209 +#define LEVEL_MINUS_1POINT5DB 0.8408964152537145 +#define LEVEL_MINUS_3DB M_SQRT1_2 +#define LEVEL_MINUS_4POINT5DB 0.5946035575013605 +#define LEVEL_MINUS_6DB 0.5000000000000000 +#define LEVEL_MINUS_9DB 0.3535533905932738 +#define LEVEL_ZERO 0.0000000000000000 +#define LEVEL_ONE 1.0000000000000000 + +/** Delta bit allocation strategy */ +typedef enum { + DBA_REUSE = 0, + DBA_NEW, + DBA_NONE, + DBA_RESERVED +} AC3DeltaStrategy; + +/** Channel mode (audio coding mode) */ +typedef enum { + AC3_CHMODE_DUALMONO = 0, + AC3_CHMODE_MONO, + AC3_CHMODE_STEREO, + AC3_CHMODE_3F, + AC3_CHMODE_2F1R, + AC3_CHMODE_3F1R, + AC3_CHMODE_2F2R, + AC3_CHMODE_3F2R +} AC3ChannelMode; + +/** Dolby Surround mode */ +typedef enum AC3DolbySurroundMode { + AC3_DSURMOD_NOTINDICATED = 0, + AC3_DSURMOD_OFF, + AC3_DSURMOD_ON, + AC3_DSURMOD_RESERVED +} AC3DolbySurroundMode; + +/** Dolby Surround EX mode */ +typedef enum AC3DolbySurroundEXMode { + AC3_DSUREXMOD_NOTINDICATED = 0, + AC3_DSUREXMOD_OFF, + AC3_DSUREXMOD_ON, + AC3_DSUREXMOD_PLIIZ +} AC3DolbySurroundEXMode; + +/** Dolby Headphone mode */ +typedef enum AC3DolbyHeadphoneMode { + AC3_DHEADPHONMOD_NOTINDICATED = 0, + AC3_DHEADPHONMOD_OFF, + AC3_DHEADPHONMOD_ON, + AC3_DHEADPHONMOD_RESERVED +} AC3DolbyHeadphoneMode; + +/** Preferred Stereo Downmix mode */ +typedef enum AC3PreferredStereoDownmixMode { + AC3_DMIXMOD_NOTINDICATED = 0, + AC3_DMIXMOD_LTRT, + AC3_DMIXMOD_LORO, + AC3_DMIXMOD_DPLII // reserved value in A/52, but used by encoders to indicate DPL2 +} AC3PreferredStereoDownmixMode; + +typedef struct AC3BitAllocParameters { + int sr_code; + int sr_shift; + int slow_gain, slow_decay, fast_decay, db_per_bit, floor; + int cpl_fast_leak, cpl_slow_leak; +} AC3BitAllocParameters; + +/** + * @struct AC3HeaderInfo + * Coded AC-3 header values up to the lfeon element, plus derived values. + */ +typedef struct AC3HeaderInfo { + /** @name Coded elements + * @{ + */ + uint16_t sync_word; + uint16_t crc1; + uint8_t sr_code; + uint8_t bitstream_id; + uint8_t bitstream_mode; + uint8_t channel_mode; + uint8_t lfe_on; + uint8_t frame_type; + int substreamid; ///< substream identification + int center_mix_level; ///< Center mix level index + int surround_mix_level; ///< Surround mix level index + uint16_t channel_map; + int num_blocks; ///< number of audio blocks + int dolby_surround_mode; + /** @} */ + + /** @name Derived values + * @{ + */ + uint8_t sr_shift; + uint16_t sample_rate; + uint32_t bit_rate; + uint8_t channels; + uint16_t frame_size; + uint64_t channel_layout; + /** @} */ +} AC3HeaderInfo; + +typedef enum { + EAC3_FRAME_TYPE_INDEPENDENT = 0, + EAC3_FRAME_TYPE_DEPENDENT, + EAC3_FRAME_TYPE_AC3_CONVERT, + EAC3_FRAME_TYPE_RESERVED +} EAC3FrameType; + +void ff_ac3_common_init(void); + +/** + * Calculate the log power-spectral density of the input signal. + * This gives a rough estimate of signal power in the frequency domain by using + * the spectral envelope (exponents). The psd is also separately grouped + * into critical bands for use in the calculating the masking curve. + * 128 units in psd = -6 dB. The dbknee parameter in AC3BitAllocParameters + * determines the reference level. + * + * @param[in] exp frequency coefficient exponents + * @param[in] start starting bin location + * @param[in] end ending bin location + * @param[out] psd signal power for each frequency bin + * @param[out] band_psd signal power for each critical band + */ +void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd, + int16_t *band_psd); + +/** + * Calculate the masking curve. + * First, the excitation is calculated using parameters in s and the signal + * power in each critical band. The excitation is compared with a predefined + * hearing threshold table to produce the masking curve. If delta bit + * allocation information is provided, it is used for adjusting the masking + * curve, usually to give a closer match to a better psychoacoustic model. + * + * @param[in] s adjustable bit allocation parameters + * @param[in] band_psd signal power for each critical band + * @param[in] start starting bin location + * @param[in] end ending bin location + * @param[in] fast_gain fast gain (estimated signal-to-mask ratio) + * @param[in] is_lfe whether or not the channel being processed is the LFE + * @param[in] dba_mode delta bit allocation mode (none, reuse, or new) + * @param[in] dba_nsegs number of delta segments + * @param[in] dba_offsets location offsets for each segment + * @param[in] dba_lengths length of each segment + * @param[in] dba_values delta bit allocation for each segment + * @param[out] mask calculated masking curve + * @return returns 0 for success, non-zero for error + */ +int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, + int start, int end, int fast_gain, int is_lfe, + int dba_mode, int dba_nsegs, uint8_t *dba_offsets, + uint8_t *dba_lengths, uint8_t *dba_values, + int16_t *mask); + +#endif /* AVCODEC_AC3_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser.h new file mode 100644 index 00000000..ff8cc4cf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser.h @@ -0,0 +1,36 @@ +/* + * AC-3 parser prototypes + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3_PARSER_H +#define AVCODEC_AC3_PARSER_H + +#include +#include + +/** + * Extract the bitstream ID and the frame size from AC-3 data. + */ +int av_ac3_parse_header(const uint8_t *buf, size_t size, + uint8_t *bitstream_id, uint16_t *frame_size); + + +#endif /* AVCODEC_AC3_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser_internal.h new file mode 100644 index 00000000..3648802a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3_parser_internal.h @@ -0,0 +1,42 @@ +/* + * AC-3 parser internal code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3_PARSER_INTERNAL_H +#define AVCODEC_AC3_PARSER_INTERNAL_H + +#include "ac3.h" +#include "get_bits.h" + +/** + * Parse AC-3 frame header. + * Parse the header up to the lfeon element, which is the first 52 or 54 bits + * depending on the audio coding mode. + * @param[in] gbc BitContext containing the first 54 bits of the frame. + * @param[out] hdr Pointer to struct where header info is written. + * @return Returns 0 on success, -1 if there is a sync word mismatch, + * -2 if the bsid (version) element is invalid, -3 if the fscod (sample rate) + * element is invalid, or -4 if the frmsizecod (bit rate) element is invalid. + */ +int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr); + +int avpriv_ac3_parse_header(AC3HeaderInfo **hdr, const uint8_t *buf, + size_t size); + +#endif /* AVCODEC_AC3_PARSER_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec.h new file mode 100644 index 00000000..ce1434b5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec.h @@ -0,0 +1,277 @@ +/* + * Common code between the AC-3 and E-AC-3 decoders + * Copyright (c) 2007 Bartlomiej Wolowiec + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Common code between the AC-3 and E-AC-3 decoders. + * + * Summary of MDCT Coefficient Grouping: + * The individual MDCT coefficient indices are often referred to in the + * (E-)AC-3 specification as frequency bins. These bins are grouped together + * into subbands of 12 coefficients each. The subbands are grouped together + * into bands as defined in the bitstream by the band structures, which + * determine the number of bands and the size of each band. The full spectrum + * of 256 frequency bins is divided into 1 DC bin + 21 subbands = 253 bins. + * This system of grouping coefficients is used for channel bandwidth, stereo + * rematrixing, channel coupling, enhanced coupling, and spectral extension. + * + * +-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-+ + * |1| |12| | [12|12|12|12] | | | | | | | | | | | | |3| + * +-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-+ + * ~~~ ~~~~ ~~~~~~~~~~~~~ ~~~ + * | | | | + * | | | 3 unused frequency bins--+ + * | | | + * | | +--1 band containing 4 subbands + * | | + * | +--1 subband of 12 frequency bins + * | + * +--DC frequency bin + */ + +#ifndef AVCODEC_AC3DEC_H +#define AVCODEC_AC3DEC_H + +#include "libavutil/float_dsp.h" +#include "libavutil/fixed_dsp.h" +#include "libavutil/lfg.h" +#include "ac3.h" +#include "ac3dsp.h" +#include "bswapdsp.h" +#include "get_bits.h" +#include "fft.h" +#include "fmtconvert.h" + +#define AC3_OUTPUT_LFEON 8 + +#define SPX_MAX_BANDS 17 + +/** Large enough for maximum possible frame size when the specification limit is ignored */ +#define AC3_FRAME_BUFFER_SIZE 32768 + +typedef struct AC3DecodeContext { + AVClass *class; ///< class for AVOptions + AVCodecContext *avctx; ///< parent context + GetBitContext gbc; ///< bitstream reader + +///@name Bit stream information +///@{ + int frame_type; ///< frame type (strmtyp) + int substreamid; ///< substream identification + int superframe_size; ///< current superframe size, in bytes + int frame_size; ///< current frame size, in bytes + int bit_rate; ///< stream bit rate, in bits-per-second + int sample_rate; ///< sample frequency, in Hz + int num_blocks; ///< number of audio blocks + int bitstream_id; ///< bitstream id (bsid) + int bitstream_mode; ///< bitstream mode (bsmod) + int channel_mode; ///< channel mode (acmod) + int lfe_on; ///< lfe channel in use + int dialog_normalization[2]; ///< dialog level in dBFS (dialnorm) + int compression_exists[2]; ///< compression field is valid for frame (compre) + int compression_gain[2]; ///< gain to apply for heavy compression (compr) + int channel_map; ///< custom channel map (chanmap) + int preferred_downmix; ///< Preferred 2-channel downmix mode (dmixmod) + int center_mix_level; ///< Center mix level index + int center_mix_level_ltrt; ///< Center mix level index for Lt/Rt (ltrtcmixlev) + int surround_mix_level; ///< Surround mix level index + int surround_mix_level_ltrt; ///< Surround mix level index for Lt/Rt (ltrtsurmixlev) + int lfe_mix_level_exists; ///< indicates if lfemixlevcod is specified (lfemixlevcode) + int lfe_mix_level; ///< LFE mix level index (lfemixlevcod) + int eac3; ///< indicates if current frame is E-AC-3 + int eac3_frame_dependent_found; ///< bitstream has E-AC-3 dependent frame(s) + int eac3_subsbtreamid_found; ///< bitstream has E-AC-3 additional substream(s) + int dolby_surround_mode; ///< dolby surround mode (dsurmod) + int dolby_surround_ex_mode; ///< dolby surround ex mode (dsurexmod) + int dolby_headphone_mode; ///< dolby headphone mode (dheadphonmod) +///@} + + int preferred_stereo_downmix; + float ltrt_center_mix_level; + float ltrt_surround_mix_level; + float loro_center_mix_level; + float loro_surround_mix_level; + int target_level; ///< target level in dBFS + float level_gain[2]; + +///@name Frame syntax parameters + int snr_offset_strategy; ///< SNR offset strategy (snroffststr) + int block_switch_syntax; ///< block switch syntax enabled (blkswe) + int dither_flag_syntax; ///< dither flag syntax enabled (dithflage) + int bit_allocation_syntax; ///< bit allocation model syntax enabled (bamode) + int fast_gain_syntax; ///< fast gain codes enabled (frmfgaincode) + int dba_syntax; ///< delta bit allocation syntax enabled (dbaflde) + int skip_syntax; ///< skip field syntax enabled (skipflde) + ///@} + +///@name Standard coupling + int cpl_in_use[AC3_MAX_BLOCKS]; ///< coupling in use (cplinu) + int cpl_strategy_exists[AC3_MAX_BLOCKS];///< coupling strategy exists (cplstre) + int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl) + int phase_flags_in_use; ///< phase flags in use (phsflginu) + int phase_flags[AC3_MAX_CPL_BANDS]; ///< phase flags (phsflg) + int num_cpl_bands; ///< number of coupling bands (ncplbnd) + uint8_t cpl_band_struct[AC3_MAX_CPL_BANDS]; + uint8_t cpl_band_sizes[AC3_MAX_CPL_BANDS]; ///< number of coeffs in each coupling band + int firstchincpl; ///< first channel in coupling + int first_cpl_coords[AC3_MAX_CHANNELS]; ///< first coupling coordinates states (firstcplcos) + int cpl_coords[AC3_MAX_CHANNELS][AC3_MAX_CPL_BANDS]; ///< coupling coordinates (cplco) +///@} + +///@name Spectral extension +///@{ + int spx_in_use; ///< spectral extension in use (spxinu) + uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx) + int8_t spx_atten_code[AC3_MAX_CHANNELS]; ///< spx attenuation code (spxattencod) + int spx_src_start_freq; ///< spx start frequency bin + int spx_dst_end_freq; ///< spx end frequency bin + int spx_dst_start_freq; ///< spx starting frequency bin for copying (copystartmant) + ///< the copy region ends at the start of the spx region. + int num_spx_bands; ///< number of spx bands (nspxbnds) + uint8_t spx_band_struct[SPX_MAX_BANDS]; + uint8_t spx_band_sizes[SPX_MAX_BANDS]; ///< number of bins in each spx band + uint8_t first_spx_coords[AC3_MAX_CHANNELS]; ///< first spx coordinates states (firstspxcos) + INTFLOAT spx_noise_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS]; ///< spx noise blending factor (nblendfact) + INTFLOAT spx_signal_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS];///< spx signal blending factor (sblendfact) +///@} + +///@name Adaptive hybrid transform + int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu) + int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][AC3_MAX_BLOCKS]; ///< pre-IDCT mantissas +///@} + +///@name Channel + int fbw_channels; ///< number of full-bandwidth channels + int channels; ///< number of total channels + int lfe_ch; ///< index of LFE channel + SHORTFLOAT *downmix_coeffs[2]; ///< stereo downmix coefficients + int downmixed; ///< indicates if coeffs are currently downmixed + int output_mode; ///< output channel configuration + int prev_output_mode; ///< output channel configuration for previous frame + int out_channels; ///< number of output channels + int prev_bit_rate; ///< stream bit rate, in bits-per-second for previous frame +///@} + +///@name Dynamic range + INTFLOAT dynamic_range[2]; ///< dynamic range + INTFLOAT drc_scale; ///< percentage of dynamic range compression to be applied + int heavy_compression; ///< apply heavy compression + INTFLOAT heavy_dynamic_range[2]; ///< heavy dynamic range compression +///@} + +///@name Bandwidth + int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant) + int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant) +///@} + +///@name Consistent noise generation + int consistent_noise_generation; ///< seed noise generation with AC-3 frame on decode +///@} + +///@name Rematrixing + int num_rematrixing_bands; ///< number of rematrixing bands (nrematbnd) + int rematrixing_flags[4]; ///< rematrixing flags (rematflg) +///@} + +///@name Exponents + int num_exp_groups[AC3_MAX_CHANNELS]; ///< Number of exponent groups (nexpgrp) + int8_t dexps[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< decoded exponents + int exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS]; ///< exponent strategies (expstr) +///@} + +///@name Bit allocation + AC3BitAllocParameters bit_alloc_params; ///< bit allocation parameters + int first_cpl_leak; ///< first coupling leak state (firstcplleak) + int snr_offset[AC3_MAX_CHANNELS]; ///< signal-to-noise ratio offsets (snroffst) + int fast_gain[AC3_MAX_CHANNELS]; ///< fast gain values/SMR's (fgain) + uint8_t bap[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< bit allocation pointers + int16_t psd[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< scaled exponents + int16_t band_psd[AC3_MAX_CHANNELS][AC3_CRITICAL_BANDS]; ///< interpolated exponents + int16_t mask[AC3_MAX_CHANNELS][AC3_CRITICAL_BANDS]; ///< masking curve values + int dba_mode[AC3_MAX_CHANNELS]; ///< delta bit allocation mode + int dba_nsegs[AC3_MAX_CHANNELS]; ///< number of delta segments + uint8_t dba_offsets[AC3_MAX_CHANNELS][8]; ///< delta segment offsets + uint8_t dba_lengths[AC3_MAX_CHANNELS][8]; ///< delta segment lengths + uint8_t dba_values[AC3_MAX_CHANNELS][8]; ///< delta values for each segment +///@} + +///@name Zero-mantissa dithering + int dither_flag[AC3_MAX_CHANNELS]; ///< dither flags (dithflg) + AVLFG dith_state; ///< for dither generation +///@} + +///@name IMDCT + int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags (blksw) + FFTContext imdct_512; ///< for 512 sample IMDCT + FFTContext imdct_256; ///< for 256 sample IMDCT +///@} + +///@name Optimization + BswapDSPContext bdsp; +#if USE_FIXED + AVFixedDSPContext *fdsp; +#else + AVFloatDSPContext *fdsp; +#endif + AC3DSPContext ac3dsp; + FmtConvertContext fmt_conv; ///< optimized conversion functions +///@} + + SHORTFLOAT *outptr[AC3_MAX_CHANNELS]; + INTFLOAT *xcfptr[AC3_MAX_CHANNELS]; + INTFLOAT *dlyptr[AC3_MAX_CHANNELS]; + +///@name Aligned arrays + DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients + DECLARE_ALIGNED(32, INTFLOAT, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients + DECLARE_ALIGNED(32, INTFLOAT, delay)[EAC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block + DECLARE_ALIGNED(32, INTFLOAT, window)[AC3_BLOCK_SIZE]; ///< window coefficients + DECLARE_ALIGNED(32, INTFLOAT, tmp_output)[AC3_BLOCK_SIZE]; ///< temporary storage for output before windowing + DECLARE_ALIGNED(32, SHORTFLOAT, output)[EAC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< output after imdct transform and windowing + DECLARE_ALIGNED(32, uint8_t, input_buffer)[AC3_FRAME_BUFFER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; ///< temp buffer to prevent overread + DECLARE_ALIGNED(32, SHORTFLOAT, output_buffer)[EAC3_MAX_CHANNELS][AC3_BLOCK_SIZE * 6]; ///< final output buffer +///@} +} AC3DecodeContext; + +/** + * Parse the E-AC-3 frame header. + * This parses both the bit stream info and audio frame header. + */ +static int ff_eac3_parse_header(AC3DecodeContext *s); + +/** + * Decode mantissas in a single channel for the entire frame. + * This is used when AHT mode is enabled. + */ +static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); + +/** + * Apply spectral extension to each channel by copying lower frequency + * coefficients to higher frequency bins and applying side information to + * approximate the original high frequency signal. + */ +static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s); + +#if (!USE_FIXED) +extern float ff_ac3_heavy_dynamic_range_tab[256]; +#endif + +#endif /* AVCODEC_AC3DEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec_data.h new file mode 100644 index 00000000..975b52ef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dec_data.h @@ -0,0 +1,32 @@ +/* + * AC-3 and E-AC-3 decoder tables + * Copyright (c) 2007 Bartlomiej Wolowiec + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3DEC_DATA_H +#define AVCODEC_AC3DEC_DATA_H + +#include + +extern const uint8_t ff_ac3_ungroup_3_in_5_bits_tab[32][3]; + +extern const uint8_t ff_eac3_hebap_tab[64]; +extern const uint8_t ff_eac3_default_spx_band_struct[17]; + +#endif /* AVCODEC_AC3DEC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dsp.h new file mode 100644 index 00000000..161de4cb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3dsp.h @@ -0,0 +1,167 @@ +/* + * AC-3 DSP functions + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3DSP_H +#define AVCODEC_AC3DSP_H + +#include + +/** + * Number of mantissa bits written for each bap value. + * bap values with fractional bits are set to 0 and are calculated separately. + */ +extern const uint16_t ff_ac3_bap_bits[16]; + +typedef struct AC3DSPContext { + /** + * Set each encoded exponent in a block to the minimum of itself and the + * exponents in the same frequency bin of up to 5 following blocks. + * @param exp pointer to the start of the current block of exponents. + * constraints: align 16 + * @param num_reuse_blocks number of blocks that will reuse exponents from the current block. + * constraints: range 0 to 5 + * @param nb_coefs number of frequency coefficients. + */ + void (*ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs); + + /** + * Calculate the maximum MSB of the absolute value of each element in an + * array of int16_t. + * @param src input array + * constraints: align 16. values must be in range [-32767,32767] + * @param len number of values in the array + * constraints: multiple of 16 greater than 0 + * @return a value with the same MSB as max(abs(src[])) + */ + int (*ac3_max_msb_abs_int16)(const int16_t *src, int len); + + /** + * Left-shift each value in an array of int16_t by a specified amount. + * @param src input array + * constraints: align 16 + * @param len number of values in the array + * constraints: multiple of 32 greater than 0 + * @param shift left shift amount + * constraints: range [0,15] + */ + void (*ac3_lshift_int16)(int16_t *src, unsigned int len, unsigned int shift); + + /** + * Right-shift each value in an array of int32_t by a specified amount. + * @param src input array + * constraints: align 16 + * @param len number of values in the array + * constraints: multiple of 16 greater than 0 + * @param shift right shift amount + * constraints: range [0,31] + */ + void (*ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift); + + /** + * Convert an array of float in range [-1.0,1.0] to int32_t with range + * [-(1<<24),(1<<24)] + * + * @param dst destination array of int32_t. + * constraints: 16-byte aligned + * @param src source array of float. + * constraints: 16-byte aligned + * @param len number of elements to convert. + * constraints: multiple of 32 greater than zero + */ + void (*float_to_fixed24)(int32_t *dst, const float *src, unsigned int len); + + /** + * Calculate bit allocation pointers. + * The SNR is the difference between the masking curve and the signal. AC-3 + * uses this value for each frequency bin to allocate bits. The snroffset + * parameter is a global adjustment to the SNR for all bins. + * + * @param[in] mask masking curve + * @param[in] psd signal power for each frequency bin + * @param[in] start starting bin location + * @param[in] end ending bin location + * @param[in] snr_offset SNR adjustment + * @param[in] floor noise floor + * @param[in] bap_tab look-up table for bit allocation pointers + * @param[out] bap bit allocation pointers + */ + void (*bit_alloc_calc_bap)(int16_t *mask, int16_t *psd, int start, int end, + int snr_offset, int floor, + const uint8_t *bap_tab, uint8_t *bap); + + /** + * Update bap counts using the supplied array of bap. + * + * @param[out] mant_cnt bap counts for 1 block + * @param[in] bap array of bap, pointing to start coef bin + * @param[in] len number of elements to process + */ + void (*update_bap_counts)(uint16_t mant_cnt[16], uint8_t *bap, int len); + + /** + * Calculate the number of bits needed to encode a set of mantissas. + * + * @param[in] mant_cnt bap counts for all blocks + * @return mantissa bit count + */ + int (*compute_mantissa_size)(uint16_t mant_cnt[6][16]); + + void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs); + + void (*sum_square_butterfly_int32)(int64_t sum[4], const int32_t *coef0, + const int32_t *coef1, int len); + + void (*sum_square_butterfly_float)(float sum[4], const float *coef0, + const float *coef1, int len); + + int out_channels; + int in_channels; + void (*downmix)(float **samples, float **matrix, int len); + void (*downmix_fixed)(int32_t **samples, int16_t **matrix, int len); + + /** + * Apply symmetric window in 16-bit fixed-point. + * @param output destination array + * constraints: 16-byte aligned + * @param input source array + * constraints: 16-byte aligned + * @param window window array + * constraints: 16-byte aligned, at least len/2 elements + * @param len full window length + * constraints: multiple of ? greater than zero + */ + void (*apply_window_int16)(int16_t *output, const int16_t *input, + const int16_t *window, unsigned int len); +} AC3DSPContext; + +void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact); +void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact); +void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact); +void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact); + +void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix, + int out_ch, int in_ch, int len); +void ff_ac3dsp_downmix_fixed(AC3DSPContext *c, int32_t **samples, int16_t **matrix, + int out_ch, int in_ch, int len); + +void ff_ac3dsp_set_downmix_x86(AC3DSPContext *c); + +#endif /* AVCODEC_AC3DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3enc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3enc.h new file mode 100644 index 00000000..1e4a7405 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3enc.h @@ -0,0 +1,317 @@ +/* + * AC-3 encoder & E-AC-3 encoder common header + * Copyright (c) 2000 Fabrice Bellard + * Copyright (c) 2006-2010 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AC-3 encoder & E-AC-3 encoder common header + */ + +#ifndef AVCODEC_AC3ENC_H +#define AVCODEC_AC3ENC_H + +#include + +#include "libavutil/float_dsp.h" + +#include "ac3.h" +#include "ac3dsp.h" +#include "avcodec.h" +#include "fft.h" +#include "mathops.h" +#include "me_cmp.h" +#include "put_bits.h" +#include "audiodsp.h" + +#ifndef CONFIG_AC3ENC_FLOAT +#define CONFIG_AC3ENC_FLOAT 0 +#endif + +#define OFFSET(param) offsetof(AC3EncodeContext, options.param) +#define AC3ENC_PARAM (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) + +#define AC3ENC_TYPE_AC3_FIXED 0 +#define AC3ENC_TYPE_AC3 1 +#define AC3ENC_TYPE_EAC3 2 + +#if CONFIG_AC3ENC_FLOAT +#define AC3_NAME(x) ff_ac3_float_ ## x +#define MAC_COEF(d,a,b) ((d)+=(a)*(b)) +#define COEF_MIN (-16777215.0/16777216.0) +#define COEF_MAX ( 16777215.0/16777216.0) +#define NEW_CPL_COORD_THRESHOLD 0.03 +typedef float SampleType; +typedef float CoefType; +typedef float CoefSumType; +#else +#define AC3_NAME(x) ff_ac3_fixed_ ## x +#define MAC_COEF(d,a,b) MAC64(d,a,b) +#define COEF_MIN -16777215 +#define COEF_MAX 16777215 +#define NEW_CPL_COORD_THRESHOLD 503317 +typedef int16_t SampleType; +typedef int32_t CoefType; +typedef int64_t CoefSumType; +#endif + +/* common option values */ +#define AC3ENC_OPT_NONE -1 +#define AC3ENC_OPT_AUTO -1 +#define AC3ENC_OPT_OFF 0 +#define AC3ENC_OPT_ON 1 +#define AC3ENC_OPT_NOT_INDICATED 0 +#define AC3ENC_OPT_MODE_ON 2 +#define AC3ENC_OPT_MODE_OFF 1 +#define AC3ENC_OPT_DSUREX_DPLIIZ 3 + +/* specific option values */ +#define AC3ENC_OPT_LARGE_ROOM 1 +#define AC3ENC_OPT_SMALL_ROOM 2 +#define AC3ENC_OPT_DOWNMIX_LTRT 1 +#define AC3ENC_OPT_DOWNMIX_LORO 2 +#define AC3ENC_OPT_DOWNMIX_DPLII 3 // reserved value in A/52, but used by encoders to indicate DPL2 +#define AC3ENC_OPT_ADCONV_STANDARD 0 +#define AC3ENC_OPT_ADCONV_HDCD 1 + + +/** + * Encoding Options used by AVOption. + */ +typedef struct AC3EncOptions { + /* AC-3 metadata options*/ + int dialogue_level; + int bitstream_mode; + float center_mix_level; + float surround_mix_level; + int dolby_surround_mode; + int audio_production_info; + int mixing_level; + int room_type; + int copyright; + int original; + int extended_bsi_1; + int preferred_stereo_downmix; + float ltrt_center_mix_level; + float ltrt_surround_mix_level; + float loro_center_mix_level; + float loro_surround_mix_level; + int extended_bsi_2; + int dolby_surround_ex_mode; + int dolby_headphone_mode; + int ad_converter_type; + int eac3_mixing_metadata; + int eac3_info_metadata; + + /* other encoding options */ + int allow_per_frame_metadata; + int stereo_rematrixing; + int channel_coupling; + int cpl_start; +} AC3EncOptions; + +/** + * Data for a single audio block. + */ +typedef struct AC3Block { + CoefType **mdct_coef; ///< MDCT coefficients + int32_t **fixed_coef; ///< fixed-point MDCT coefficients + uint8_t **exp; ///< original exponents + uint8_t **grouped_exp; ///< grouped exponents + int16_t **psd; ///< psd per frequency bin + int16_t **band_psd; ///< psd per critical band + int16_t **mask; ///< masking curve + uint16_t **qmant; ///< quantized mantissas + uint8_t **cpl_coord_exp; ///< coupling coord exponents (cplcoexp) + uint8_t **cpl_coord_mant; ///< coupling coord mantissas (cplcomant) + uint8_t coeff_shift[AC3_MAX_CHANNELS]; ///< fixed-point coefficient shift values + uint8_t new_rematrixing_strategy; ///< send new rematrixing flags in this block + int num_rematrixing_bands; ///< number of rematrixing bands + uint8_t rematrixing_flags[4]; ///< rematrixing flags + int new_cpl_strategy; ///< send new coupling strategy + int cpl_in_use; ///< coupling in use for this block (cplinu) + uint8_t channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl) + int num_cpl_channels; ///< number of channels in coupling + uint8_t new_cpl_coords[AC3_MAX_CHANNELS]; ///< send new coupling coordinates (cplcoe) + uint8_t cpl_master_exp[AC3_MAX_CHANNELS]; ///< coupling coord master exponents (mstrcplco) + int new_snr_offsets; ///< send new SNR offsets + int new_cpl_leak; ///< send new coupling leak info + int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant) +} AC3Block; + +/** + * AC-3 encoder private context. + */ +typedef struct AC3EncodeContext { + AVClass *av_class; ///< AVClass used for AVOption + AC3EncOptions options; ///< encoding options + AVCodecContext *avctx; ///< parent AVCodecContext + PutBitContext pb; ///< bitstream writer context + AudioDSPContext adsp; + AVFloatDSPContext *fdsp; + MECmpContext mecc; + AC3DSPContext ac3dsp; ///< AC-3 optimized functions + FFTContext mdct; ///< FFT context for MDCT calculation + const SampleType *mdct_window; ///< MDCT window function array + + AC3Block blocks[AC3_MAX_BLOCKS]; ///< per-block info + + int fixed_point; ///< indicates if fixed-point encoder is being used + int eac3; ///< indicates if this is E-AC-3 vs. AC-3 + int bitstream_id; ///< bitstream id (bsid) + int bitstream_mode; ///< bitstream mode (bsmod) + + int bit_rate; ///< target bit rate, in bits-per-second + int sample_rate; ///< sampling frequency, in Hz + + int num_blks_code; ///< number of blocks code (numblkscod) + int num_blocks; ///< number of blocks per frame + int frame_size_min; ///< minimum frame size in case rounding is necessary + int frame_size; ///< current frame size in bytes + int frame_size_code; ///< frame size code (frmsizecod) + uint16_t crc_inv[2]; + int64_t bits_written; ///< bit count (used to avg. bitrate) + int64_t samples_written; ///< sample count (used to avg. bitrate) + + int fbw_channels; ///< number of full-bandwidth channels (nfchans) + int channels; ///< total number of channels (nchans) + int lfe_on; ///< indicates if there is an LFE channel (lfeon) + int lfe_channel; ///< channel index of the LFE channel + int has_center; ///< indicates if there is a center channel + int has_surround; ///< indicates if there are one or more surround channels + int channel_mode; ///< channel mode (acmod) + const uint8_t *channel_map; ///< channel map used to reorder channels + + int center_mix_level; ///< center mix level code + int surround_mix_level; ///< surround mix level code + int ltrt_center_mix_level; ///< Lt/Rt center mix level code + int ltrt_surround_mix_level; ///< Lt/Rt surround mix level code + int loro_center_mix_level; ///< Lo/Ro center mix level code + int loro_surround_mix_level; ///< Lo/Ro surround mix level code + + int cutoff; ///< user-specified cutoff frequency, in Hz + int bandwidth_code; ///< bandwidth code (0 to 60) (chbwcod) + int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant) + int cpl_end_freq; ///< coupling channel end frequency bin + + int cpl_on; ///< coupling turned on for this frame + int cpl_enabled; ///< coupling enabled for all frames + int num_cpl_subbands; ///< number of coupling subbands (ncplsubnd) + int num_cpl_bands; ///< number of coupling bands (ncplbnd) + uint8_t cpl_band_sizes[AC3_MAX_CPL_BANDS]; ///< number of coeffs in each coupling band + + int rematrixing_enabled; ///< stereo rematrixing enabled + + /* bitrate allocation control */ + int slow_gain_code; ///< slow gain code (sgaincod) + int slow_decay_code; ///< slow decay code (sdcycod) + int fast_decay_code; ///< fast decay code (fdcycod) + int db_per_bit_code; ///< dB/bit code (dbpbcod) + int floor_code; ///< floor code (floorcod) + AC3BitAllocParameters bit_alloc; ///< bit allocation parameters + int coarse_snr_offset; ///< coarse SNR offsets (csnroffst) + int fast_gain_code[AC3_MAX_CHANNELS]; ///< fast gain codes (signal-to-mask ratio) (fgaincod) + int fine_snr_offset[AC3_MAX_CHANNELS]; ///< fine SNR offsets (fsnroffst) + int frame_bits_fixed; ///< number of non-coefficient bits for fixed parameters + int frame_bits; ///< all frame bits except exponents and mantissas + int exponent_bits; ///< number of bits used for exponents + + SampleType *windowed_samples; + SampleType **planar_samples; + uint8_t *bap_buffer; + uint8_t *bap1_buffer; + CoefType *mdct_coef_buffer; + int32_t *fixed_coef_buffer; + uint8_t *exp_buffer; + uint8_t *grouped_exp_buffer; + int16_t *psd_buffer; + int16_t *band_psd_buffer; + int16_t *mask_buffer; + int16_t *qmant_buffer; + uint8_t *cpl_coord_exp_buffer; + uint8_t *cpl_coord_mant_buffer; + + uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< exponent strategies + uint8_t frame_exp_strategy[AC3_MAX_CHANNELS]; ///< frame exp strategy index + int use_frame_exp_strategy; ///< indicates use of frame exp strategy + uint8_t exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< reference blocks for EXP_REUSE + uint8_t *ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]; ///< bit allocation pointers (bap) + int ref_bap_set; ///< indicates if ref_bap pointers have been set + + int warned_alternate_bitstream; + + /* fixed vs. float function pointers */ + void (*mdct_end)(struct AC3EncodeContext *s); + int (*mdct_init)(struct AC3EncodeContext *s); + + /* fixed vs. float templated function pointers */ + int (*allocate_sample_buffers)(struct AC3EncodeContext *s); + + /* AC-3 vs. E-AC-3 function pointers */ + void (*output_frame_header)(struct AC3EncodeContext *s); +} AC3EncodeContext; + + +extern const uint64_t ff_ac3_channel_layouts[19]; + +int ff_ac3_encode_init(AVCodecContext *avctx); +int ff_ac3_float_encode_init(AVCodecContext *avctx); + +int ff_ac3_encode_close(AVCodecContext *avctx); + +int ff_ac3_validate_metadata(AC3EncodeContext *s); + +void ff_ac3_adjust_frame_size(AC3EncodeContext *s); + +void ff_ac3_compute_coupling_strategy(AC3EncodeContext *s); + +void ff_ac3_apply_rematrixing(AC3EncodeContext *s); + +void ff_ac3_process_exponents(AC3EncodeContext *s); + +int ff_ac3_compute_bit_allocation(AC3EncodeContext *s); + +void ff_ac3_group_exponents(AC3EncodeContext *s); + +void ff_ac3_quantize_mantissas(AC3EncodeContext *s); + +void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame); + + +/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */ + +void ff_ac3_fixed_mdct_end(AC3EncodeContext *s); +void ff_ac3_float_mdct_end(AC3EncodeContext *s); + +int ff_ac3_fixed_mdct_init(AC3EncodeContext *s); +int ff_ac3_float_mdct_init(AC3EncodeContext *s); + + +/* prototypes for functions in ac3enc_template.c */ + +int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s); +int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s); + +int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); +int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); + +#endif /* AVCODEC_AC3ENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3tab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3tab.h new file mode 100644 index 00000000..1d1264e3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ac3tab.h @@ -0,0 +1,71 @@ +/* + * AC-3 tables + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3TAB_H +#define AVCODEC_AC3TAB_H + +#include + +#include "libavutil/internal.h" +#include "ac3.h" +#include "internal.h" + +extern const uint16_t ff_ac3_frame_size_tab[38][3]; +extern const uint8_t ff_ac3_channels_tab[8]; +extern av_export_avcodec const uint16_t avpriv_ac3_channel_layout_tab[8]; +extern const uint8_t ff_ac3_enc_channel_map[8][2][6]; +extern const uint8_t ff_ac3_dec_channel_map[8][2][6]; +extern const int ff_ac3_sample_rate_tab[]; +extern const uint16_t ff_ac3_bitrate_tab[19]; +extern const uint8_t ff_ac3_rematrix_band_tab[5]; +extern const uint8_t ff_eac3_default_cpl_band_struct[18]; +extern const int16_t ff_ac3_window[AC3_WINDOW_SIZE/2]; +extern const uint8_t ff_ac3_log_add_tab[260]; +extern const uint16_t ff_ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3]; +extern const uint8_t ff_ac3_bap_tab[64]; +extern const uint8_t ff_ac3_slow_decay_tab[4]; +extern const uint8_t ff_ac3_fast_decay_tab[4]; +extern const uint16_t ff_ac3_slow_gain_tab[4]; +extern const uint16_t ff_ac3_db_per_bit_tab[4]; +extern const int16_t ff_ac3_floor_tab[8]; +extern const uint16_t ff_ac3_fast_gain_tab[8]; +extern const uint16_t ff_eac3_default_chmap[8]; +extern const uint8_t ff_ac3_band_start_tab[AC3_CRITICAL_BANDS+1]; +extern const uint8_t ff_ac3_bin_to_band_tab[253]; +extern const uint64_t ff_eac3_custom_channel_map_locations[16][2]; + + +/** Custom channel map locations bitmask + * Other channels described in documentation: + * Lc/Rc pair, Lrs/Rrs pair, Ts, Lsd/Rsd pair, + * Lw/Rw pair, Lvh/Rvh pair, Cvh, Reserved, LFE2 + */ +enum CustomChannelMapLocation{ + AC3_CHMAP_L= 1<<(15-0), + AC3_CHMAP_C= 1<<(15-1), + AC3_CHMAP_R= 1<<(15-2), + AC3_CHMAP_L_SUR= 1<<(15-3), + AC3_CHMAP_R_SUR = 1<<(15-4), + AC3_CHMAP_C_SUR= 1<<(15-7), + AC3_CHMAP_LFE = 1<<(15-15) +}; + +#endif /* AVCODEC_AC3TAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_filters.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_filters.h new file mode 100644 index 00000000..fe86cb20 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_filters.h @@ -0,0 +1,152 @@ +/* + * various filters for ACELP-based codecs + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ACELP_FILTERS_H +#define AVCODEC_ACELP_FILTERS_H + +#include + +typedef struct ACELPFContext { + /** + * Floating point version of ff_acelp_interpolate() + */ + void (*acelp_interpolatef)(float *out, const float *in, + const float *filter_coeffs, int precision, + int frac_pos, int filter_length, int length); + + /** + * Apply an order 2 rational transfer function in-place. + * + * @param out output buffer for filtered speech samples + * @param in input buffer containing speech data (may be the same as out) + * @param zero_coeffs z^-1 and z^-2 coefficients of the numerator + * @param pole_coeffs z^-1 and z^-2 coefficients of the denominator + * @param gain scale factor for final output + * @param mem intermediate values used by filter (should be 0 initially) + * @param n number of samples (should be a multiple of eight) + */ + void (*acelp_apply_order_2_transfer_function)(float *out, const float *in, + const float zero_coeffs[2], + const float pole_coeffs[2], + float gain, + float mem[2], int n); + +}ACELPFContext; + +/** + * Initialize ACELPFContext. + */ +void ff_acelp_filter_init(ACELPFContext *c); +void ff_acelp_filter_init_mips(ACELPFContext *c); + +/** + * low-pass Finite Impulse Response filter coefficients. + * + * Hamming windowed sinc filter with cutoff freq 3/40 of the sampling freq, + * the coefficients are scaled by 2^15. + * This array only contains the right half of the filter. + * This filter is likely identical to the one used in G.729, though this + * could not be determined from the original comments with certainty. + */ +extern const int16_t ff_acelp_interp_filter[61]; + +/** + * Generic FIR interpolation routine. + * @param[out] out buffer for interpolated data + * @param in input data + * @param filter_coeffs interpolation filter coefficients (0.15) + * @param precision sub sample factor, that is the precision of the position + * @param frac_pos fractional part of position [0..precision-1] + * @param filter_length filter length + * @param length length of output + * + * filter_coeffs contains coefficients of the right half of the symmetric + * interpolation filter. filter_coeffs[0] should the central (unpaired) coefficient. + * See ff_acelp_interp_filter for an example. + */ +void ff_acelp_interpolate(int16_t* out, const int16_t* in, + const int16_t* filter_coeffs, int precision, + int frac_pos, int filter_length, int length); + +/** + * Floating point version of ff_acelp_interpolate() + */ +void ff_acelp_interpolatef(float *out, const float *in, + const float *filter_coeffs, int precision, + int frac_pos, int filter_length, int length); + + +/** + * high-pass filtering and upscaling (4.2.5 of G.729). + * @param[out] out output buffer for filtered speech data + * @param[in,out] hpf_f past filtered data from previous (2 items long) + * frames (-0x20000000 <= (14.13) < 0x20000000) + * @param in speech data to process + * @param length input data size + * + * out[i] = 0.93980581 * in[i] - 1.8795834 * in[i-1] + 0.93980581 * in[i-2] + + * 1.9330735 * out[i-1] - 0.93589199 * out[i-2] + * + * The filter has a cut-off frequency of 1/80 of the sampling freq + * + * @note Two items before the top of the in buffer must contain two items from the + * tail of the previous subframe. + * + * @remark It is safe to pass the same array in in and out parameters. + * + * @remark AMR uses mostly the same filter (cut-off frequency 60Hz, same formula, + * but constants differs in 5th sign after comma). Fortunately in + * fixed-point all coefficients are the same as in G.729. Thus this + * routine can be used for the fixed-point AMR decoder, too. + */ +void ff_acelp_high_pass_filter(int16_t* out, int hpf_f[2], + const int16_t* in, int length); + +/** + * Apply an order 2 rational transfer function in-place. + * + * @param out output buffer for filtered speech samples + * @param in input buffer containing speech data (may be the same as out) + * @param zero_coeffs z^-1 and z^-2 coefficients of the numerator + * @param pole_coeffs z^-1 and z^-2 coefficients of the denominator + * @param gain scale factor for final output + * @param mem intermediate values used by filter (should be 0 initially) + * @param n number of samples + */ +void ff_acelp_apply_order_2_transfer_function(float *out, const float *in, + const float zero_coeffs[2], + const float pole_coeffs[2], + float gain, + float mem[2], int n); + +/** + * Apply tilt compensation filter, 1 - tilt * z-1. + * + * @param mem pointer to the filter's state (one single float) + * @param tilt tilt factor + * @param samples array where the filter is applied + * @param size the size of the samples array + */ +void ff_tilt_compensation(float *mem, float tilt, float *samples, int size); + + +#endif /* AVCODEC_ACELP_FILTERS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_pitch_delay.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_pitch_delay.h new file mode 100644 index 00000000..2aade2f2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_pitch_delay.h @@ -0,0 +1,253 @@ +/* + * gain code, gain pitch and pitch delay decoding + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ACELP_PITCH_DELAY_H +#define AVCODEC_ACELP_PITCH_DELAY_H + +#include + +#include "audiodsp.h" + +#define PITCH_DELAY_MIN 20 +#define PITCH_DELAY_MAX 143 + +/** + * @brief Decode pitch delay of the first subframe encoded by 8 bits with 1/3 + * resolution. + * @param ac_index adaptive codebook index (8 bits) + * + * @return pitch delay in 1/3 units + * + * Pitch delay is coded: + * with 1/3 resolution, 19 < pitch_delay < 85 + * integers only, 85 <= pitch_delay <= 143 + */ +int ff_acelp_decode_8bit_to_1st_delay3(int ac_index); + +/** + * @brief Decode pitch delay of the second subframe encoded by 5 or 6 bits + * with 1/3 precision. + * @param ac_index adaptive codebook index (5 or 6 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval + * for second subframe + * + * @return pitch delay in 1/3 units + * + * Pitch delay is coded: + * with 1/3 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5 + * + * @remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k, + * AMR @@7.4k for the second subframe. + */ +int ff_acelp_decode_5_6_bit_to_2nd_delay3( + int ac_index, + int pitch_delay_min); + +/** + * @brief Decode pitch delay with 1/3 precision. + * @param ac_index adaptive codebook index (4 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval for + * second subframe + * + * @return pitch delay in 1/3 units + * + * Pitch delay is coded: + * integers only, -6 < pitch_delay - int(prev_pitch_delay) <= -2 + * with 1/3 resolution, -2 < pitch_delay - int(prev_pitch_delay) < 1 + * integers only, 1 <= pitch_delay - int(prev_pitch_delay) < 5 + * + * @remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k, + * AMR @@5.15k, AMR @@4.75k for the second subframe. + */ +int ff_acelp_decode_4bit_to_2nd_delay3( + int ac_index, + int pitch_delay_min); + +/** + * @brief Decode pitch delay of the first subframe encoded by 9 bits + * with 1/6 precision. + * @param ac_index adaptive codebook index (9 bits) + * + * @return pitch delay in 1/6 units + * + * Pitch delay is coded: + * with 1/6 resolution, 17 < pitch_delay < 95 + * integers only, 95 <= pitch_delay <= 143 + * + * @remark The routine is used in AMR @@12.2k for the first and third subframes. + */ +int ff_acelp_decode_9bit_to_1st_delay6(int ac_index); + +/** + * @brief Decode pitch delay of the second subframe encoded by 6 bits + * with 1/6 precision. + * @param ac_index adaptive codebook index (6 bits) + * @param pitch_delay_min lower bound (integer) of pitch delay interval for + * second subframe + * + * @return pitch delay in 1/6 units + * + * Pitch delay is coded: + * with 1/6 resolution, -6 < pitch_delay - int(prev_pitch_delay) < 5 + * + * @remark The routine is used in AMR @@12.2k for the second and fourth subframes. + */ +int ff_acelp_decode_6bit_to_2nd_delay6( + int ac_index, + int pitch_delay_min); + +/** + * @brief Update past quantized energies + * @param[in,out] quant_energy past quantized energies (5.10) + * @param gain_corr_factor gain correction factor + * @param log2_ma_pred_order log2() of MA prediction order + * @param erasure frame erasure flag + * + * If frame erasure flag is not equal to zero, memory is updated with + * averaged energy, attenuated by 4dB: + * max(avg(quant_energy[i])-4, -14), i=0,ma_pred_order + * + * In normal mode memory is updated with + * Er - Ep = 20 * log10(gain_corr_factor) + * + * @remark The routine is used in G.729 and AMR (all modes). + */ +void ff_acelp_update_past_gain( + int16_t* quant_energy, + int gain_corr_factor, + int log2_ma_pred_order, + int erasure); + +/** + * @brief Decode the adaptive codebook gain and add + * correction (4.1.5 and 3.9.1 of G.729). + * @param adsp initialized audio DSP context + * @param gain_corr_factor gain correction factor (2.13) + * @param fc_v fixed-codebook vector (2.13) + * @param mr_energy mean innovation energy and fixed-point correction (7.13) + * @param[in,out] quant_energy past quantized energies (5.10) + * @param subframe_size length of subframe + * + * @return quantized fixed-codebook gain (14.1) + * + * The routine implements equations 69, 66 and 71 of the G.729 specification (3.9.1) + * + * Em - mean innovation energy (dB, constant, depends on decoding algorithm) + * Ep - mean-removed predicted energy (dB) + * Er - mean-removed innovation energy (dB) + * Ei - mean energy of the fixed-codebook contribution (dB) + * N - subframe_size + * M - MA (Moving Average) prediction order + * gc - fixed-codebook gain + * gc_p - predicted fixed-codebook gain + * + * Fixed codebook gain is computed using predicted gain gc_p and + * correction factor gain_corr_factor as shown below: + * + * gc = gc_p * gain_corr_factor + * + * The predicted fixed codebook gain gc_p is found by predicting + * the energy of the fixed-codebook contribution from the energy + * of previous fixed-codebook contributions. + * + * mean = 1/N * sum(i,0,N){ fc_v[i] * fc_v[i] } + * + * Ei = 10log(mean) + * + * Er = 10log(1/N * gc^2 * mean) - Em = 20log(gc) + Ei - Em + * + * Replacing Er with Ep and gc with gc_p we will receive: + * + * Ep = 10log(1/N * gc_p^2 * mean) - Em = 20log(gc_p) + Ei - Em + * + * and from above: + * + * gc_p = 10^((Ep - Ei + Em) / 20) + * + * Ep is predicted using past energies and prediction coefficients: + * + * Ep = sum(i,0,M){ ma_prediction_coeff[i] * quant_energy[i] } + * + * gc_p in fixed-point arithmetic is calculated as following: + * + * mean = 1/N * sum(i,0,N){ (fc_v[i] / 2^13) * (fc_v[i] / 2^13) } = + * = 1/N * sum(i,0,N) { fc_v[i] * fc_v[i] } / 2^26 + * + * Ei = 10log(mean) = -10log(N) - 10log(2^26) + + * + 10log(sum(i,0,N) { fc_v[i] * fc_v[i] }) + * + * Ep - Ei + Em = Ep + Em + 10log(N) + 10log(2^26) - + * - 10log(sum(i,0,N) { fc_v[i] * fc_v[i] }) = + * = Ep + mr_energy - 10log(sum(i,0,N) { fc_v[i] * fc_v[i] }) + * + * gc_p = 10 ^ ((Ep - Ei + Em) / 20) = + * = 2 ^ (3.3219 * (Ep - Ei + Em) / 20) = 2 ^ (0.166 * (Ep - Ei + Em)) + * + * where + * + * mr_energy = Em + 10log(N) + 10log(2^26) + * + * @remark The routine is used in G.729 and AMR (all modes). + */ +int16_t ff_acelp_decode_gain_code( + AudioDSPContext *adsp, + int gain_corr_factor, + const int16_t* fc_v, + int mr_energy, + const int16_t* quant_energy, + const int16_t* ma_prediction_coeff, + int subframe_size, + int max_pred_order); + +/** + * Calculate fixed gain (part of section 6.1.3 of AMR spec) + * + * @param fixed_gain_factor gain correction factor + * @param fixed_mean_energy mean decoded algebraic codebook vector energy + * @param prediction_error vector of the quantified predictor errors of + * the four previous subframes. It is updated by this function. + * @param energy_mean desired mean innovation energy + * @param pred_table table of four moving average coefficients + */ +float ff_amr_set_fixed_gain(float fixed_gain_factor, float fixed_mean_energy, + float *prediction_error, float energy_mean, + const float *pred_table); + + +/** + * Decode the adaptive codebook index to the integer and fractional parts + * of the pitch lag for one subframe at 1/3 fractional precision. + * + * The choice of pitch lag is described in 3GPP TS 26.090 section 5.6.1. + * + * @param lag_int integer part of pitch lag of the current subframe + * @param lag_frac fractional part of pitch lag of the current subframe + * @param pitch_index parsed adaptive codebook (pitch) index + * @param prev_lag_int integer part of pitch lag for the previous subframe + * @param subframe current subframe number + * @param third_as_first treat the third frame the same way as the first + */ +void ff_decode_pitch_lag(int *lag_int, int *lag_frac, int pitch_index, + const int prev_lag_int, const int subframe, + int third_as_first, int resolution); + +#endif /* AVCODEC_ACELP_PITCH_DELAY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_vectors.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_vectors.h new file mode 100644 index 00000000..fae834da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/acelp_vectors.h @@ -0,0 +1,288 @@ +/* + * adaptive and fixed codebook vector operations for ACELP-based codecs + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ACELP_VECTORS_H +#define AVCODEC_ACELP_VECTORS_H + +#include + +typedef struct ACELPVContext { + /** + * float implementation of weighted sum of two vectors. + * @param[out] out result of addition + * @param in_a first vector + * @param in_b second vector + * @param weight_coeff_a first vector weight coefficient + * @param weight_coeff_a second vector weight coefficient + * @param length vectors length (should be a multiple of two) + * + * @note It is safe to pass the same buffer for out and in_a or in_b. + */ + void (*weighted_vector_sumf)(float *out, const float *in_a, const float *in_b, + float weight_coeff_a, float weight_coeff_b, + int length); + +}ACELPVContext; + +/** + * Initialize ACELPVContext. + */ +void ff_acelp_vectors_init(ACELPVContext *c); +void ff_acelp_vectors_init_mips(ACELPVContext *c); + +/** Sparse representation for the algebraic codebook (fixed) vector */ +typedef struct AMRFixed { + int n; + int x[10]; + float y[10]; + int no_repeat_mask; + int pitch_lag; + float pitch_fac; +} AMRFixed; + +/** + * Track|Pulse| Positions + * ------------------------------------------------------------------------- + * 1 | 0 | 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75 + * ------------------------------------------------------------------------- + * 2 | 1 | 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76 + * ------------------------------------------------------------------------- + * 3 | 2 | 2, 7, 12, 17, 22, 27, 32, 37, 42, 47, 52, 57, 62, 67, 72, 77 + * ------------------------------------------------------------------------- + * + * Table contains only first the pulse indexes. + * + * Used in G.729 @@8k, G.729 @@4.4k, AMR @@7.95k, AMR @@7.40k + */ +extern const uint8_t ff_fc_4pulses_8bits_tracks_13[16]; + +/** + * Track|Pulse| Positions + * ------------------------------------------------------------------------- + * 4 | 3 | 3, 8, 13, 18, 23, 28, 33, 38, 43, 48, 53, 58, 63, 68, 73, 78 + * | | 4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79 + * ------------------------------------------------------------------------- + * + * @remark Track in the table should be read top-to-bottom, left-to-right. + * + * Used in G.729 @@8k, G.729 @@4.4k, AMR @@7.95k, AMR @@7.40k + */ +extern const uint8_t ff_fc_4pulses_8bits_track_4[32]; + +/** + * Track|Pulse| Positions + * ----------------------------------------- + * 1 | 0 | 1, 6, 11, 16, 21, 26, 31, 36 + * | | 3, 8, 13, 18, 23, 28, 33, 38 + * ----------------------------------------- + * + * @remark Track in the table should be read top-to-bottom, left-to-right. + * + * @note (EE) Reference G.729D code also uses gray decoding for each + * pulse index before looking up the value in the table. + * + * Used in G.729 @@6.4k (with gray coding), AMR @@5.9k (without gray coding) + */ +extern const uint8_t ff_fc_2pulses_9bits_track1[16]; +extern const uint8_t ff_fc_2pulses_9bits_track1_gray[16]; + +/** + * Track|Pulse| Positions + * ----------------------------------------- + * 2 | 1 | 0, 7, 14, 20, 27, 34, 1, 21 + * | | 2, 9, 15, 22, 29, 35, 6, 26 + * | | 4,10, 17, 24, 30, 37, 11, 31 + * | | 5,12, 19, 25, 32, 39, 16, 36 + * ----------------------------------------- + * + * @remark Track in the table should be read top-to-bottom, left-to-right. + * + * @note (EE.1) This table (from the reference code) does not comply with + * the specification. + * The specification contains the following table: + * + * Track|Pulse| Positions + * ----------------------------------------- + * 2 | 1 | 0, 5, 10, 15, 20, 25, 30, 35 + * | | 1, 6, 11, 16, 21, 26, 31, 36 + * | | 2, 7, 12, 17, 22, 27, 32, 37 + * | | 4, 9, 14, 19, 24, 29, 34, 39 + * + * ----------------------------------------- + * + * @note (EE.2) Reference G.729D code also uses gray decoding for each + * pulse index before looking up the value in the table. + * + * Used in G.729 @@6.4k (with gray coding) + */ +extern const uint8_t ff_fc_2pulses_9bits_track2_gray[32]; + +/** + * b60 hamming windowed sinc function coefficients + */ +extern const float ff_b60_sinc[61]; + +/** + * Table of pow(0.7,n) + */ +extern const float ff_pow_0_7[10]; + +/** + * Table of pow(0.75,n) + */ +extern const float ff_pow_0_75[10]; + +/** + * Table of pow(0.55,n) + */ +extern const float ff_pow_0_55[10]; + +/** + * Decode fixed-codebook vector (3.8 and D.5.8 of G.729, 5.7.1 of AMR). + * @param[out] fc_v decoded fixed codebook vector (2.13) + * @param tab1 table used for first pulse_count pulses + * @param tab2 table used for last pulse + * @param pulse_indexes fixed codebook indexes + * @param pulse_signs signs of the excitation pulses (0 bit value + * means negative sign) + * @param bits number of bits per one pulse index + * @param pulse_count number of pulses decoded using first table + * @param bits length of one pulse index in bits + * + * Used in G.729 @@8k, G.729 @@4.4k, G.729 @@6.4k, AMR @@7.95k, AMR @@7.40k + */ +void ff_acelp_fc_pulse_per_track(int16_t* fc_v, + const uint8_t *tab1, + const uint8_t *tab2, + int pulse_indexes, + int pulse_signs, + int pulse_count, + int bits); + +/** + * Decode the algebraic codebook index to pulse positions and signs and + * construct the algebraic codebook vector for MODE_12k2. + * + * @note: The positions and signs are explicitly coded in MODE_12k2. + * + * @param fixed_index positions of the ten pulses + * @param fixed_sparse pointer to the algebraic codebook vector + * @param gray_decode gray decoding table + * @param half_pulse_count number of couples of pulses + * @param bits length of one pulse index in bits + */ +void ff_decode_10_pulses_35bits(const int16_t *fixed_index, + AMRFixed *fixed_sparse, + const uint8_t *gray_decode, + int half_pulse_count, int bits); + + +/** + * weighted sum of two vectors with rounding. + * @param[out] out result of addition + * @param in_a first vector + * @param in_b second vector + * @param weight_coeff_a first vector weight coefficient + * @param weight_coeff_a second vector weight coefficient + * @param rounder this value will be added to the sum of the two vectors + * @param shift result will be shifted to right by this value + * @param length vectors length + * + * @note It is safe to pass the same buffer for out and in_a or in_b. + * + * out[i] = (in_a[i]*weight_a + in_b[i]*weight_b + rounder) >> shift + */ +void ff_acelp_weighted_vector_sum(int16_t* out, + const int16_t *in_a, + const int16_t *in_b, + int16_t weight_coeff_a, + int16_t weight_coeff_b, + int16_t rounder, + int shift, + int length); + +/** + * float implementation of weighted sum of two vectors. + * @param[out] out result of addition + * @param in_a first vector + * @param in_b second vector + * @param weight_coeff_a first vector weight coefficient + * @param weight_coeff_a second vector weight coefficient + * @param length vectors length + * + * @note It is safe to pass the same buffer for out and in_a or in_b. + */ +void ff_weighted_vector_sumf(float *out, const float *in_a, const float *in_b, + float weight_coeff_a, float weight_coeff_b, + int length); + +/** + * Adaptive gain control (as used in AMR postfiltering) + * + * @param out output buffer for filtered speech data + * @param in the input speech buffer (may be the same as out) + * @param speech_energ input energy + * @param size the input buffer size + * @param alpha exponential filter factor + * @param gain_mem a pointer to the filter memory (single float of size) + */ +void ff_adaptive_gain_control(float *out, const float *in, float speech_energ, + int size, float alpha, float *gain_mem); + +/** + * Set the sum of squares of a signal by scaling + * + * @param out output samples + * @param in input samples + * @param sum_of_squares new sum of squares + * @param n number of samples + * + * @note If the input is zero (or its energy underflows), the output is zero. + * This is the behavior of AGC in the AMR reference decoder. The QCELP + * reference decoder seems to have undefined behavior. + * + * TIA/EIA/IS-733 2.4.8.3-2/3/4/5, 2.4.8.6 + * 3GPP TS 26.090 6.1 (6) + */ +void ff_scale_vector_to_given_sum_of_squares(float *out, const float *in, + float sum_of_squares, const int n); + +/** + * Add fixed vector to an array from a sparse representation + * + * @param out fixed vector with pitch sharpening + * @param in sparse fixed vector + * @param scale number to multiply the fixed vector by + * @param size the output vector size + */ +void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size); + +/** + * Clear array values set by set_fixed_vector + * + * @param out fixed vector to be cleared + * @param in sparse fixed vector + * @param size the output vector size + */ +void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size); + +#endif /* AVCODEC_ACELP_VECTORS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm.h new file mode 100644 index 00000000..580db7df --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2001-2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADPCM encoder/decoder common header. + */ + +#ifndef AVCODEC_ADPCM_H +#define AVCODEC_ADPCM_H + +#include + +#define BLKSIZE 1024 + +typedef struct ADPCMChannelStatus { + int predictor; + int16_t step_index; + int step; + /* for encoding */ + int prev_sample; + + /* MS version */ + int sample1; + int sample2; + int coeff1; + int coeff2; + int idelta; +} ADPCMChannelStatus; + +#endif /* AVCODEC_ADPCM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm_data.h new file mode 100644 index 00000000..d678bfc7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adpcm_data.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2001-2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ADPCM tables + */ + +#ifndef AVCODEC_ADPCM_DATA_H +#define AVCODEC_ADPCM_DATA_H + +#include + +static const uint8_t ff_adpcm_ima_block_sizes[4] = { 4, 12, 4, 20 }; +static const uint8_t ff_adpcm_ima_block_samples[4] = { 16, 32, 8, 32 }; + +extern const int8_t * const ff_adpcm_index_tables[4]; +extern const int8_t ff_adpcm_index_table[16]; +extern const int16_t ff_adpcm_step_table[89]; +extern const int16_t ff_adpcm_oki_step_table[49]; +extern const int16_t ff_adpcm_AdaptationTable[]; +extern const uint8_t ff_adpcm_AdaptCoeff1[]; +extern const int8_t ff_adpcm_AdaptCoeff2[]; +extern const int16_t ff_adpcm_yamaha_indexscale[]; +extern const int8_t ff_adpcm_yamaha_difflookup[]; +extern const int16_t ff_adpcm_afc_coeffs[2][16]; +extern const int16_t ff_adpcm_mtaf_stepsize[32][16]; +extern const int8_t ff_adpcm_ima_cunning_index_table[9]; +extern const int16_t ff_adpcm_ima_cunning_step_table[61]; + +#endif /* AVCODEC_ADPCM_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_header.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_header.h new file mode 100644 index 00000000..f615f6a9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_header.h @@ -0,0 +1,50 @@ +/* + * AAC ADTS header decoding prototypes and structures + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ADTS_HEADER_H +#define AVCODEC_ADTS_HEADER_H + +#include "get_bits.h" + +typedef struct AACADTSHeaderInfo { + uint32_t sample_rate; + uint32_t samples; + uint32_t bit_rate; + uint8_t crc_absent; + uint8_t object_type; + uint8_t sampling_index; + uint8_t chan_config; + uint8_t num_aac_frames; +} AACADTSHeaderInfo; + +/** + * Parse the ADTS frame header to the end of the variable header, which is + * the first 54 bits. + * @param[in] gbc BitContext containing the first 54 bits of the frame. + * @param[out] hdr Pointer to struct where header info is written. + * @return Returns 0 on success, -1 if there is a sync word mismatch, + * -2 if the version element is invalid, -3 if the sample rate + * element is invalid, or -4 if the bit rate element is invalid. + */ +int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr); + +#endif /* AVCODEC_ADTS_HEADER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_parser.h new file mode 100644 index 00000000..f85becd1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adts_parser.h @@ -0,0 +1,37 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ADTS_PARSER_H +#define AVCODEC_ADTS_PARSER_H + +#include +#include + +#define AV_AAC_ADTS_HEADER_SIZE 7 + +/** + * Extract the number of samples and frames from AAC data. + * @param[in] buf pointer to AAC data buffer + * @param[out] samples Pointer to where number of samples is written + * @param[out] frames Pointer to where number of frames is written + * @return Returns 0 on success, error code on failure. + */ +int av_adts_header_parse(const uint8_t *buf, uint32_t *samples, + uint8_t *frames); + +#endif /* AVCODEC_ADTS_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adx.h new file mode 100644 index 00000000..08f749a0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/adx.h @@ -0,0 +1,80 @@ +/* + * ADX ADPCM codecs + * Copyright (c) 2001,2003 BERO + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SEGA CRI adx codecs. + * + * Reference documents: + * http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html + * adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/ + */ + +#ifndef AVCODEC_ADX_H +#define AVCODEC_ADX_H + +#include + +#include "avcodec.h" + +typedef struct ADXChannelState { + int s1,s2; +} ADXChannelState; + +typedef struct ADXContext { + int channels; + ADXChannelState prev[2]; + int header_parsed; + int eof; + int cutoff; + int coeff[2]; +} ADXContext; + +#define COEFF_BITS 12 + +#define BLOCK_SIZE 18 +#define BLOCK_SAMPLES 32 + +/** + * Calculate LPC coefficients based on cutoff frequency and sample rate. + * + * @param cutoff cutoff frequency + * @param sample_rate sample rate + * @param bits number of bits used to quantize coefficients + * @param[out] coeff 2 quantized LPC coefficients + */ +void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff); + +/** + * Decode ADX stream header. + * Sets avctx->channels and avctx->sample_rate. + * + * @param avctx codec context + * @param buf header data + * @param bufsize data size, should be at least 24 bytes + * @param[out] header_size size of ADX header + * @param[out] coeff 2 LPC coefficients, can be NULL + * @return data offset or negative error code if header is invalid + */ +int ff_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, + int bufsize, int *header_size, int *coeff); + +#endif /* AVCODEC_ADX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alac_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alac_data.h new file mode 100644 index 00000000..650d6dcd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alac_data.h @@ -0,0 +1,46 @@ +/* + * ALAC encoder and decoder common data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ALAC_DATA_H +#define AVCODEC_ALAC_DATA_H + +#include + +enum AlacRawDataBlockType { + /* At the moment, only SCE, CPE, LFE, and END are recognized. */ + TYPE_SCE, + TYPE_CPE, + TYPE_CCE, + TYPE_LFE, + TYPE_DSE, + TYPE_PCE, + TYPE_FIL, + TYPE_END +}; + +#define ALAC_MAX_CHANNELS 8 + +extern const uint8_t ff_alac_channel_layout_offsets[ALAC_MAX_CHANNELS][ALAC_MAX_CHANNELS]; + +extern const uint64_t ff_alac_channel_layouts[ALAC_MAX_CHANNELS + 1]; + +extern const enum AlacRawDataBlockType ff_alac_channel_elements[ALAC_MAX_CHANNELS][5]; + +#endif /* AVCODEC_ALAC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alacdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alacdsp.h new file mode 100644 index 00000000..f8b56dd5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alacdsp.h @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ALACDSP_H +#define AVCODEC_ALACDSP_H + +#include + +typedef struct ALACDSPContext { + void (*decorrelate_stereo)(int32_t *buffer[2], int nb_samples, + int decorr_shift, int decorr_left_weight); + void (*append_extra_bits[2])(int32_t *buffer[2], int32_t *extra_bits_buffer[2], + int extra_bits, int channels, int nb_samples); +} ALACDSPContext; + +void ff_alacdsp_init(ALACDSPContext *c); +void ff_alacdsp_init_x86(ALACDSPContext *c); + +#endif /* AVCODEC_ALACDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/asm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/asm.h new file mode 100644 index 00000000..6d850cec --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/asm.h @@ -0,0 +1,153 @@ +/* + * Alpha optimized DSP utils + * Copyright (c) 2002 Falk Hueffner + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ALPHA_ASM_H +#define AVCODEC_ALPHA_ASM_H + +#include + +#include "libavutil/common.h" + +#if AV_GCC_VERSION_AT_LEAST(2,96) +# define likely(x) __builtin_expect((x) != 0, 1) +# define unlikely(x) __builtin_expect((x) != 0, 0) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif + +#define AMASK_BWX (1 << 0) +#define AMASK_FIX (1 << 1) +#define AMASK_CIX (1 << 2) +#define AMASK_MVI (1 << 8) + +static inline uint64_t BYTE_VEC(uint64_t x) +{ + x |= x << 8; + x |= x << 16; + x |= x << 32; + return x; +} +static inline uint64_t WORD_VEC(uint64_t x) +{ + x |= x << 16; + x |= x << 32; + return x; +} + +#define sextw(x) ((int16_t) (x)) + +#ifdef __GNUC__ +#define ldq(p) \ + (((const union { \ + uint64_t __l; \ + __typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \ + } *) (p))->__l) +#define ldl(p) \ + (((const union { \ + int32_t __l; \ + __typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \ + } *) (p))->__l) +#define stq(l, p) \ + do { \ + (((union { \ + uint64_t __l; \ + __typeof__(*(p)) __s[sizeof (uint64_t) / sizeof *(p)]; \ + } *) (p))->__l) = l; \ + } while (0) +#define stl(l, p) \ + do { \ + (((union { \ + int32_t __l; \ + __typeof__(*(p)) __s[sizeof (int32_t) / sizeof *(p)]; \ + } *) (p))->__l) = l; \ + } while (0) +struct unaligned_long { uint64_t l; } __attribute__((packed)); +#define ldq_u(p) (*(const uint64_t *) (((uint64_t) (p)) & ~7ul)) +#define uldq(a) (((const struct unaligned_long *) (a))->l) + +#if AV_GCC_VERSION_AT_LEAST(3,3) +#define prefetch(p) __builtin_prefetch((p), 0, 1) +#define prefetch_en(p) __builtin_prefetch((p), 0, 0) +#define prefetch_m(p) __builtin_prefetch((p), 1, 1) +#define prefetch_men(p) __builtin_prefetch((p), 1, 0) +#define cmpbge __builtin_alpha_cmpbge +/* Avoid warnings. */ +#define extql(a, b) __builtin_alpha_extql(a, (uint64_t) (b)) +#define extwl(a, b) __builtin_alpha_extwl(a, (uint64_t) (b)) +#define extqh(a, b) __builtin_alpha_extqh(a, (uint64_t) (b)) +#define zap __builtin_alpha_zap +#define zapnot __builtin_alpha_zapnot +#define amask __builtin_alpha_amask +#define implver __builtin_alpha_implver +#define rpcc __builtin_alpha_rpcc +#else +#define prefetch(p) __asm__ volatile("ldl $31,%0" : : "m"(*(const char *) (p)) : "memory") +#define prefetch_en(p) __asm__ volatile("ldq $31,%0" : : "m"(*(const char *) (p)) : "memory") +#define prefetch_m(p) __asm__ volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory") +#define prefetch_men(p) __asm__ volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory") +#define cmpbge(a, b) ({ uint64_t __r; __asm__ ("cmpbge %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define extql(a, b) ({ uint64_t __r; __asm__ ("extql %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define extwl(a, b) ({ uint64_t __r; __asm__ ("extwl %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define extqh(a, b) ({ uint64_t __r; __asm__ ("extqh %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define zap(a, b) ({ uint64_t __r; __asm__ ("zap %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define zapnot(a, b) ({ uint64_t __r; __asm__ ("zapnot %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; }) +#define amask(a) ({ uint64_t __r; __asm__ ("amask %1,%0" : "=r" (__r) : "rI" (a)); __r; }) +#define implver() ({ uint64_t __r; __asm__ ("implver %0" : "=r" (__r)); __r; }) +#define rpcc() ({ uint64_t __r; __asm__ volatile ("rpcc %0" : "=r" (__r)); __r; }) +#endif +#define wh64(p) __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory") + +#if AV_GCC_VERSION_AT_LEAST(3,3) && defined(__alpha_max__) +#define minub8 __builtin_alpha_minub8 +#define minsb8 __builtin_alpha_minsb8 +#define minuw4 __builtin_alpha_minuw4 +#define minsw4 __builtin_alpha_minsw4 +#define maxub8 __builtin_alpha_maxub8 +#define maxsb8 __builtin_alpha_maxsb8 +#define maxuw4 __builtin_alpha_maxuw4 +#define maxsw4 __builtin_alpha_maxsw4 +#define perr __builtin_alpha_perr +#define pklb __builtin_alpha_pklb +#define pkwb __builtin_alpha_pkwb +#define unpkbl __builtin_alpha_unpkbl +#define unpkbw __builtin_alpha_unpkbw +#else +#define minub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define minsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define minuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define minsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define maxub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define maxsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define maxuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define maxsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; }) +#define perr(a, b) ({ uint64_t __r; __asm__ (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; }) +#define pklb(a) ({ uint64_t __r; __asm__ (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) +#define pkwb(a) ({ uint64_t __r; __asm__ (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) +#define unpkbl(a) ({ uint64_t __r; __asm__ (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) +#define unpkbw(a) ({ uint64_t __r; __asm__ (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; }) +#endif + +#else +#error "Unknown compiler!" +#endif + +#endif /* AVCODEC_ALPHA_ASM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/hpeldsp_alpha.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/hpeldsp_alpha.h new file mode 100644 index 00000000..985182c6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/hpeldsp_alpha.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ALPHA_HPELDSP_ALPHA_H +#define AVCODEC_ALPHA_HPELDSP_ALPHA_H + +#include +#include + +void put_pixels_axp_asm(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +#endif /* AVCODEC_ALPHA_HPELDSP_ALPHA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/idctdsp_alpha.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/idctdsp_alpha.h new file mode 100644 index 00000000..8cc969d7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/idctdsp_alpha.h @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ALPHA_IDCTDSP_ALPHA_H +#define AVCODEC_ALPHA_IDCTDSP_ALPHA_H + +#include +#include + +extern void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +extern void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); + +void ff_simple_idct_axp(int16_t *block); +void ff_simple_idct_put_axp(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_axp(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +#endif /* AVCODEC_ALPHA_IDCTDSP_ALPHA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/regdef.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/regdef.h new file mode 100644 index 00000000..f05577a8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/alpha/regdef.h @@ -0,0 +1,77 @@ +/* + * Alpha optimized DSP utils + * copyright (c) 2002 Falk Hueffner + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* Some BSDs don't seem to have regdef.h... sigh */ +#ifndef AVCODEC_ALPHA_REGDEF_H +#define AVCODEC_ALPHA_REGDEF_H + +#define v0 $0 /* function return value */ + +#define t0 $1 /* temporary registers (caller-saved) */ +#define t1 $2 +#define t2 $3 +#define t3 $4 +#define t4 $5 +#define t5 $6 +#define t6 $7 +#define t7 $8 + +#define s0 $9 /* saved-registers (callee-saved registers) */ +#define s1 $10 +#define s2 $11 +#define s3 $12 +#define s4 $13 +#define s5 $14 +#define s6 $15 +#define fp s6 /* frame-pointer (s6 in frame-less procedures) */ + +#define a0 $16 /* argument registers (caller-saved) */ +#define a1 $17 +#define a2 $18 +#define a3 $19 +#define a4 $20 +#define a5 $21 + +#define t8 $22 /* more temps (caller-saved) */ +#define t9 $23 +#define t10 $24 +#define t11 $25 +#define ra $26 /* return address register */ +#define t12 $27 + +#define pv t12 /* procedure-variable register */ +#define AT $at /* assembler temporary */ +#define gp $29 /* global pointer */ +#define sp $30 /* stack pointer */ +#define zero $31 /* reads as zero, writes are noops */ + +/* Some nicer register names. */ +#define ta t10 +#define tb t11 +#define tc t12 +#define td AT +/* Danger: these overlap with the argument list and the return value */ +#define te a5 +#define tf a4 +#define tg a3 +#define th v0 + +#endif /* AVCODEC_ALPHA_REGDEF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amfenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amfenc.h new file mode 100644 index 00000000..b1361842 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amfenc.h @@ -0,0 +1,150 @@ +/* +* This file is part of FFmpeg. +* +* FFmpeg is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* FFmpeg is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with FFmpeg; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef AVCODEC_AMFENC_H +#define AVCODEC_AMFENC_H + +#include + +#include +#include + +#include "libavutil/fifo.h" + +#include "avcodec.h" + + +/** +* AMF trace writer callback class +* Used to capture all AMF logging +*/ + +typedef struct AmfTraceWriter { + AMFTraceWriterVtbl *vtbl; + AVCodecContext *avctx; +} AmfTraceWriter; + +/** +* AMF encoder context +*/ + +typedef struct AmfContext { + AVClass *avclass; + // access to AMF runtime + amf_handle library; ///< handle to DLL library + AMFFactory *factory; ///< pointer to AMF factory + AMFDebug *debug; ///< pointer to AMF debug interface + AMFTrace *trace; ///< pointer to AMF trace interface + + amf_uint64 version; ///< version of AMF runtime + AmfTraceWriter tracer; ///< AMF writer registered with AMF + AMFContext *context; ///< AMF context + //encoder + AMFComponent *encoder; ///< AMF encoder object + amf_bool eof; ///< flag indicating EOF happened + AMF_SURFACE_FORMAT format; ///< AMF surface format + + AVBufferRef *hw_device_ctx; ///< pointer to HW accelerator (decoder) + AVBufferRef *hw_frames_ctx; ///< pointer to HW accelerator (frame allocator) + + int hwsurfaces_in_queue; + int hwsurfaces_in_queue_max; + + // helpers to handle async calls + int delayed_drain; + AMFSurface *delayed_surface; + AVFrame *delayed_frame; + + // shift dts back by max_b_frames in timing + AVFifoBuffer *timestamp_list; + int64_t dts_delay; + + // common encoder option options + + int log_to_dbg; + + // Static options, have to be set before Init() call + int usage; + int profile; + int level; + int preanalysis; + int quality; + int b_frame_delta_qp; + int ref_b_frame_delta_qp; + + // Dynamic options, can be set after Init() call + + int rate_control_mode; + int enforce_hrd; + int filler_data; + int enable_vbaq; + int skip_frame; + int qp_i; + int qp_p; + int qp_b; + int max_au_size; + int header_spacing; + int b_frame_ref; + int intra_refresh_mb; + int coding_mode; + int me_half_pel; + int me_quarter_pel; + int aud; + + // HEVC - specific options + + int gops_per_idr; + int header_insertion_mode; + int min_qp_i; + int max_qp_i; + int min_qp_p; + int max_qp_p; + int tier; +} AmfContext; + +/** +* Common encoder initization function +*/ +int ff_amf_encode_init(AVCodecContext *avctx); +/** +* Common encoder termination function +*/ +int ff_amf_encode_close(AVCodecContext *avctx); + +/** +* Ecoding one frame - common function for all AMF encoders +*/ + +int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame); +int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); + +/** +* Supported formats +*/ +extern const enum AVPixelFormat ff_amf_pix_fmts[]; + +/** +* Error handling helper +*/ +#define AMF_RETURN_IF_FALSE(avctx, exp, ret_value, /*message,*/ ...) \ + if (!(exp)) { \ + av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \ + return ret_value; \ + } + +#endif //AVCODEC_AMFENC_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amr.h new file mode 100644 index 00000000..727f8c34 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amr.h @@ -0,0 +1,70 @@ +/* + * Shared functions between AMR codecs + * + * Copyright (c) 2010 Marcelo Galvao Povoa + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AMR_H +#define AVCODEC_AMR_H + +#include + +#include "avcodec.h" + +#ifdef AMR_USE_16BIT_TABLES +typedef uint16_t R_TABLE_TYPE; +#else +typedef uint8_t R_TABLE_TYPE; +#endif + +/** + * Fill the frame structure variables from bitstream by parsing the + * given reordering table that uses the following format: + * + * Each field (16 bits) in the AMR Frame is stored as: + * - one byte for the number of bits in the field + * - one byte for the field index + * - then, one byte for each bit of the field (from most-significant to least) + * of the position of that bit in the AMR frame. + * + * @param out pointer to the frame struct + * @param size the size in bytes of the frame struct + * @param data input bitstream after the frame header + * @param ord_table the reordering table as above + */ +static inline void ff_amr_bit_reorder(uint16_t *out, int size, + const uint8_t *data, + const R_TABLE_TYPE *ord_table) +{ + int field_size; + + memset(out, 0, size); + while ((field_size = *ord_table++)) { + int field = 0; + int field_offset = *ord_table++; + while (field_size--) { + int bit = *ord_table++; + field <<= 1; + field |= data[bit >> 3] >> (bit & 7) & 1; + } + out[field_offset >> 1] = field; + } +} + +#endif /* AVCODEC_AMR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrnbdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrnbdata.h new file mode 100644 index 00000000..435fd992 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrnbdata.h @@ -0,0 +1,1671 @@ +/* + * AMR narrowband data and definitions + * Copyright (c) 2006-2007 Robert Swain + * Copyright (c) 2009 Colin McQuillan + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +/** + * @file + * AMR narrowband data and definitions + */ + +#ifndef AVCODEC_AMRNBDATA_H +#define AVCODEC_AMRNBDATA_H + +#include + +#include "libavutil/common.h" /* offsetof */ + +#define AMR_SUBFRAME_SIZE 40 ///< samples per subframe + +/** Frame type (Table 1a in 3GPP TS 26.101) */ +enum Mode { + MODE_4k75 = 0, ///< 4.75 kbit/s + MODE_5k15, ///< 5.15 kbit/s + MODE_5k9, ///< 5.90 kbit/s + MODE_6k7, ///< 6.70 kbit/s + MODE_7k4, ///< 7.40 kbit/s + MODE_7k95, ///< 7.95 kbit/s + MODE_10k2, ///< 10.2 kbit/s + MODE_12k2, ///< 12.2 kbit/s + MODE_DTX, ///< silent frame + N_MODES, ///< number of modes + NO_DATA = 15 ///< no transmission +}; + +#define LP_FILTER_ORDER 10 ///< linear predictive coding filter order + +/** + * AMRNB unpacked data subframe + */ +typedef struct AMRNBSubframe { + uint16_t p_lag; ///< index to decode the pitch lag + uint16_t p_gain; ///< index to decode the pitch gain + uint16_t fixed_gain; ///< index to decode the fixed gain factor, for MODE_12k2 and MODE_7k95 + uint16_t pulses[10]; ///< pulses: 10 for MODE_12k2, 7 for MODE_10k2, and index and sign for others +} AMRNBSubframe; + +/** + * AMRNB unpacked data frame + */ +typedef struct AMRNBFrame { + uint16_t lsf[5]; ///< lsf parameters: 5 parameters for MODE_12k2, only 3 for other modes + AMRNBSubframe subframe[4]; ///< unpacked data for each subframe +} AMRNBFrame; + +/** The index of a frame parameter */ +#define AMR_BIT(field) (offsetof(AMRNBFrame, field)) +/** The index of a subframe-specific parameter */ +#define AMR_OF(frame_num, variable) AMR_BIT(subframe[frame_num].variable) + +// The following order* tables are used to convert AMR frame parameters to and +// from a bitstream. See 3GPP TS 26.101 for more information. +// Each field in AMRNBFrame is stored as: +// * one byte for the number of bits in the field +// * one byte for the field index +// * then, one byte for each bit of the field (from most-significant to least) +// of the position of that bit in the AMR frame. +static const uint8_t order_MODE_4k75[] = { + 8, AMR_BIT(lsf[0]), 7, 6, 5, 4, 3, 2, 1, 0, + 8, AMR_BIT(lsf[1]), 15, 14, 13, 12, 11, 10, 9, 8, + 7, AMR_BIT(lsf[2]), 51, 35, 34, 50, 33, 49, 32, + 8, AMR_OF(0,p_lag), 23, 22, 21, 20, 19, 18, 43, 42, + 8, AMR_OF(0,p_gain), 54, 55, 40, 41, 24, 25, 26, 27, + 7, AMR_OF(0,pulses[0]), 92, 68, 67, 84, 66, 65, 80, + 2, AMR_OF(0,pulses[1]), 53, 52, + 4, AMR_OF(1,p_lag), 17, 16, 48, 63, + 7, AMR_OF(1,pulses[0]), 91, 64, 79, 83, 78, 77, 95, + 2, AMR_OF(1,pulses[1]), 62, 61, + 4, AMR_OF(2,p_lag), 31, 30, 60, 59, + 8, AMR_OF(2,p_gain), 44, 45, 46, 47, 36, 37, 38, 39, + 7, AMR_OF(2,pulses[0]), 90, 76, 75, 82, 74, 73, 94, + 2, AMR_OF(2,pulses[1]), 58, 57, + 4, AMR_OF(3,p_lag), 29, 28, 56, 71, + 7, AMR_OF(3,pulses[0]), 89, 72, 87, 81, 86, 85, 93, + 2, AMR_OF(3,pulses[1]), 70, 69, + 0 +}; + +static const uint8_t order_MODE_5k15[] = { + 8, AMR_BIT(lsf[0]), 0, 1, 2, 3, 4, 5, 6, 7, + 8, AMR_BIT(lsf[1]), 8, 9, 10, 11, 12, 13, 14, 15, + 7, AMR_BIT(lsf[2]), 70, 51, 43, 71, 50, 60, 49, + 8, AMR_OF(0,p_lag), 23, 22, 21, 20, 19, 47, 54, 59, + 6, AMR_OF(0,p_gain), 48, 42, 35, 29, 30, 31, + 7, AMR_OF(0,pulses[0]), 92, 84, 82, 100, 79, 72, 88, + 2, AMR_OF(0,pulses[1]), 67, 68, + 4, AMR_OF(1,p_lag), 18, 46, 53, 58, + 6, AMR_OF(1,p_gain), 63, 41, 34, 26, 27, 28, + 7, AMR_OF(1,pulses[0]), 91, 83, 81, 99, 78, 87, 103, + 2, AMR_OF(1,pulses[1]), 65, 66, + 4, AMR_OF(2,p_lag), 17, 45, 52, 57, + 6, AMR_OF(2,p_gain), 62, 40, 33, 39, 24, 25, + 7, AMR_OF(2,pulses[0]), 90, 80, 95, 98, 77, 86, 102, + 2, AMR_OF(2,pulses[1]), 75, 64, + 4, AMR_OF(3,p_lag), 16, 44, 56, 69, + 6, AMR_OF(3,p_gain), 61, 55, 32, 36, 37, 38, + 7, AMR_OF(3,pulses[0]), 89, 94, 93, 97, 76, 85, 101, + 2, AMR_OF(3,pulses[1]), 73, 74, + 0 +}; + +static const uint8_t order_MODE_5k9[] = { + 8, AMR_BIT(lsf[0]), 7, 6, 0, 3, 5, 4, 2, 1, + 9, AMR_BIT(lsf[1]), 13, 12, 8, 11, 10, 15, 9, 14, 23, + 9, AMR_BIT(lsf[2]), 71, 56, 60, 70, 59, 57, 58, 69, 76, + 8, AMR_OF(0,p_lag), 16, 18, 22, 20, 30, 38, 44, 42, + 6, AMR_OF(0,p_gain), 75, 48, 52, 40, 34, 26, + 9, AMR_OF(0,pulses[0]), 101, 89, 93, 117, 105, 81, 85, 109, 97, + 2, AMR_OF(0,pulses[1]), 67, 78, + 4, AMR_OF(1,p_lag), 28, 36, 46, 87, + 6, AMR_OF(1,p_gain), 74, 63, 51, 55, 33, 25, + 9, AMR_OF(1,pulses[0]), 100, 88, 92, 116, 104, 80, 84, 108, 96, + 2, AMR_OF(1,pulses[1]), 64, 79, + 8, AMR_OF(2,p_lag), 31, 17, 21, 19, 29, 37, 43, 41, + 6, AMR_OF(2,p_gain), 73, 62, 50, 54, 32, 24, + 9, AMR_OF(2,pulses[0]), 99, 103, 91, 115, 119, 95, 83, 107, 111, + 2, AMR_OF(2,pulses[1]), 66, 77, + 4, AMR_OF(3,p_lag), 27, 35, 45, 86, + 6, AMR_OF(3,p_gain), 72, 61, 49, 53, 47, 39, + 9, AMR_OF(3,pulses[0]), 98, 102, 90, 114, 118, 94, 82, 106, 110, + 2, AMR_OF(3,pulses[1]), 65, 68, + 0 +}; + +static const uint8_t order_MODE_6k7[] = { + 8, AMR_BIT(lsf[0]), 7, 6, 15, 4, 5, 3, 2, 0, + 9, AMR_BIT(lsf[1]), 14, 13, 8, 12, 10, 1, 9, 11, 29, + 9, AMR_BIT(lsf[2]), 57, 58, 50, 56, 60, 59, 49, 71, 70, + 8, AMR_OF(0,p_lag), 17, 19, 23, 21, 31, 24, 32, 52, + 7, AMR_OF(0,p_gain), 36, 82, 69, 46, 42, 48, 77, + 11, AMR_OF(0,pulses[0]), 109, 97, 133, 121, 101, 89, 125, 113, 93, 117, + 105, + 3, AMR_OF(0,pulses[1]), 81, 73, 65, + 4, AMR_OF(1,p_lag), 28, 26, 38, 54, + 7, AMR_OF(1,p_gain), 35, 83, 68, 45, 41, 63, 76, + 11, AMR_OF(1,pulses[0]), 108, 96, 132, 120, 100, 88, 124, 112, 92, 116, + 104, + 3, AMR_OF(1,pulses[1]), 80, 72, 64, + 8, AMR_OF(2,p_lag), 16, 18, 22, 20, 30, 39, 47, 51, + 7, AMR_OF(2,p_gain), 34, 84, 67, 44, 40, 62, 75, + 11, AMR_OF(2,pulses[0]), 107, 111, 131, 135, 99, 103, 123, 127, 91, 115, + 119, + 3, AMR_OF(2,pulses[1]), 95, 87, 79, + 4, AMR_OF(3,p_lag), 27, 25, 37, 53, + 7, AMR_OF(3,p_gain), 33, 85, 66, 43, 55, 61, 74, + 11, AMR_OF(3,pulses[0]), 106, 110, 130, 134, 98, 102, 122, 126, 90, 114, + 118, + 3, AMR_OF(3,pulses[1]), 94, 86, 78, + 0 +}; + +static const uint8_t order_MODE_7k4[] = { + 8, AMR_BIT(lsf[0]), 7, 6, 5, 4, 3, 2, 1, 0, + 9, AMR_BIT(lsf[1]), 15, 14, 13, 12, 11, 10, 9, 8, 23, + 9, AMR_BIT(lsf[2]), 53, 52, 51, 58, 40, 55, 54, 57, 56, + 8, AMR_OF(0,p_lag), 22, 20, 18, 16, 30, 50, 95, 94, + 7, AMR_OF(0,p_gain), 28, 24, 73, 36, 32, 62, 67, + 13, AMR_OF(0,pulses[0]), 127, 123, 135, 131, 143, 139, 151, 103, 102, 101, + 100, 99, 98, + 4, AMR_OF(0,pulses[1]), 83, 75, 79, 71, + 5, AMR_OF(1,p_lag), 44, 42, 49, 93, 92, + 7, AMR_OF(1,p_gain), 27, 39, 72, 35, 47, 61, 66, + 13, AMR_OF(1,pulses[0]), 126, 122, 134, 130, 142, 138, 150, 97, 96, 111, + 110, 109, 108, + 4, AMR_OF(1,pulses[1]), 82, 74, 78, 70, + 8, AMR_OF(2,p_lag), 21, 19, 17, 31, 29, 48, 91, 90, + 7, AMR_OF(2,p_gain), 26, 38, 87, 34, 46, 60, 65, + 13, AMR_OF(2,pulses[0]), 125, 121, 133, 129, 141, 137, 149, 107, 106, 105, + 104, 119, 118, + 4, AMR_OF(2,pulses[1]), 81, 85, 77, 69, + 5, AMR_OF(3,p_lag), 43, 41, 63, 89, 88, + 7, AMR_OF(3,p_gain), 25, 37, 86, 33, 45, 59, 64, + 13, AMR_OF(3,pulses[0]), 124, 120, 132, 128, 140, 136, 148, 117, 116, 115, + 114, 113, 112, + 4, AMR_OF(3,pulses[1]), 80, 84, 76, 68, + 0 +}; + +static const uint8_t order_MODE_7k95[] = { + 9, AMR_BIT(lsf[0]), 67, 68, 1, 2, 3, 4, 5, 6, 7, + 9, AMR_BIT(lsf[1]), 14, 13, 9, 12, 11, 0, 10, 15, 8, + 9, AMR_BIT(lsf[2]), 18, 19, 23, 17, 22, 20, 21, 66, 65, + 8, AMR_OF(0,p_lag), 44, 42, 40, 54, 52, 56, 64, 78, + 4, AMR_OF(0,p_gain), 36, 32, 72, 80, + 5, AMR_OF(0,fixed_gain), 16, 28, 24, 60, 84, + 13, AMR_OF(0,pulses[0]), 135, 109, 144, 156, 120, 97, 148, 121, 101, 122, + 123, 89, 124, + 4, AMR_OF(0,pulses[1]), 125, 126, 127, 112, + 6, AMR_OF(1,p_lag), 50, 48, 62, 70, 76, 74, + 4, AMR_OF(1,p_gain), 35, 47, 87, 95, + 5, AMR_OF(1,fixed_gain), 31, 27, 39, 59, 83, + 13, AMR_OF(1,pulses[0]), 129, 108, 159, 155, 130, 96, 147, 131, 100, 132, + 133, 88, 134, + 4, AMR_OF(1,pulses[1]), 113, 114, 115, 116, + 8, AMR_OF(2,p_lag), 43, 41, 55, 53, 51, 71, 79, 77, + 4, AMR_OF(2,p_gain), 34, 46, 86, 94, + 5, AMR_OF(2,fixed_gain), 30, 26, 38, 58, 82, + 13, AMR_OF(2,pulses[0]), 139, 107, 158, 154, 140, 111, 146, 141, 99, 142, + 143, 103, 128, + 4, AMR_OF(2,pulses[1]), 105, 90, 91, 92, + 6, AMR_OF(3,p_lag), 49, 63, 61, 69, 75, 73, + 4, AMR_OF(3,p_gain), 33, 45, 85, 93, + 5, AMR_OF(3,fixed_gain), 29, 25, 37, 57, 81, + 13, AMR_OF(3,pulses[0]), 149, 106, 157, 153, 150, 110, 145, 151, 98, 136, + 137, 102, 138, + 4, AMR_OF(3,pulses[1]), 117, 118, 119, 104, + 0 +}; + +static const uint8_t order_MODE_10k2[] = { + 8, AMR_BIT(lsf[0]), 0, 1, 2, 3, 4, 5, 6, 7, + 9, AMR_BIT(lsf[1]), 23, 8, 9, 10, 11, 12, 13, 14, 15, + 9, AMR_BIT(lsf[2]), 57, 58, 62, 56, 60, 59, 61, 71, 70, + 8, AMR_OF(0,p_lag), 22, 21, 20, 19, 18, 17, 42, 41, + 7, AMR_OF(0,p_gain), 38, 50, 84, 37, 36, 85, 83, + 1, AMR_OF(0,pulses[0]), 66, + 1, AMR_OF(0,pulses[1]), 67, + 1, AMR_OF(0,pulses[2]), 68, + 1, AMR_OF(0,pulses[3]), 69, + 10, AMR_OF(0,pulses[4]), 145, 144, 156, 153, 154, 163, 161, 192, 206, 195, + 10, AMR_OF(0,pulses[5]), 158, 159, 157, 152, 155, 165, 160, 205, 204, 194, + 7, AMR_OF(0,pulses[6]), 167, 166, 162, 164, 196, 207, 193, + 5, AMR_OF(1,p_lag), 26, 25, 54, 53, 89, + 7, AMR_OF(1,p_gain), 35, 49, 81, 34, 33, 82, 80, + 1, AMR_OF(1,pulses[0]), 78, + 1, AMR_OF(1,pulses[1]), 79, + 1, AMR_OF(1,pulses[2]), 64, + 1, AMR_OF(1,pulses[3]), 65, + 10, AMR_OF(1,pulses[4]), 103, 102, 98, 111, 96, 105, 119, 185, 199, 188, + 10, AMR_OF(1,pulses[5]), 100, 101, 99, 110, 97, 107, 118, 198, 197, 187, + 7, AMR_OF(1,pulses[6]), 109, 108, 104, 106, 189, 184, 186, + 8, AMR_OF(2,p_lag), 16, 31, 30, 29, 28, 27, 40, 55, + 7, AMR_OF(2,p_gain), 32, 48, 94, 47, 46, 95, 93, + 1, AMR_OF(2,pulses[0]), 74, + 1, AMR_OF(2,pulses[1]), 75, + 1, AMR_OF(2,pulses[2]), 76, + 1, AMR_OF(2,pulses[3]), 77, + 10, AMR_OF(2,pulses[4]), 117, 116, 112, 125, 126, 135, 133, 178, 176, 181, + 10, AMR_OF(2,pulses[5]), 114, 115, 113, 124, 127, 121, 132, 191, 190, 180, + 7, AMR_OF(2,pulses[6]), 123, 122, 134, 120, 182, 177, 179, + 5, AMR_OF(3,p_lag), 24, 39, 52, 51, 88, + 7, AMR_OF(3,p_gain), 45, 63, 91, 44, 43, 92, 90, + 1, AMR_OF(3,pulses[0]), 86, + 1, AMR_OF(3,pulses[1]), 87, + 1, AMR_OF(3,pulses[2]), 72, + 1, AMR_OF(3,pulses[3]), 73, + 10, AMR_OF(3,pulses[4]), 131, 130, 142, 139, 140, 149, 147, 171, 169, 174, + 10, AMR_OF(3,pulses[5]), 128, 129, 143, 138, 141, 151, 146, 168, 183, 173, + 7, AMR_OF(3,pulses[6]), 137, 136, 148, 150, 175, 170, 172, + 0 +}; + +static const uint8_t order_MODE_12k2[] = { + 7, AMR_BIT(lsf[0]), 7, 6, 5, 4, 3, 2, 1, + 8, AMR_BIT(lsf[1]), 0, 15, 14, 13, 12, 11, 10, 9, + 9, AMR_BIT(lsf[2]), 23, 22, 21, 20, 19, 18, 17, 16, 8, + 8, AMR_BIT(lsf[3]), 31, 30, 29, 28, 27, 86, 85, 84, + 6, AMR_BIT(lsf[4]), 83, 82, 81, 80, 127, 126, + 9, AMR_OF(0,p_lag), 26, 24, 38, 36, 34, 32, 46, 44, 42, + 4, AMR_OF(0,p_gain), 40, 52, 48, 95, + 5, AMR_OF(0,fixed_gain), 60, 56, 68, 91, 111, + 3, AMR_OF(0,pulses[0]), 191, 176, 177, + 4, AMR_OF(0,pulses[1]), 103, 123, 124, 125, + 3, AMR_OF(0,pulses[2]), 188, 189, 190, + 4, AMR_OF(0,pulses[3]), 99, 120, 121, 122, + 3, AMR_OF(0,pulses[4]), 185, 186, 187, + 4, AMR_OF(0,pulses[5]), 107, 133, 134, 135, + 3, AMR_OF(0,pulses[6]), 198, 199, 184, + 4, AMR_OF(0,pulses[7]), 119, 130, 131, 132, + 3, AMR_OF(0,pulses[8]), 195, 196, 197, + 4, AMR_OF(0,pulses[9]), 115, 143, 128, 129, + 6, AMR_OF(1,p_lag), 64, 78, 76, 74, 72, 245, + 4, AMR_OF(1,p_gain), 55, 51, 63, 94, + 5, AMR_OF(1,fixed_gain), 59, 71, 67, 90, 110, + 3, AMR_OF(1,pulses[0]), 192, 193, 194, + 4, AMR_OF(1,pulses[1]), 102, 140, 141, 142, + 3, AMR_OF(1,pulses[2]), 205, 206, 207, + 4, AMR_OF(1,pulses[3]), 98, 137, 138, 139, + 3, AMR_OF(1,pulses[4]), 202, 203, 204, + 4, AMR_OF(1,pulses[5]), 106, 150, 151, 136, + 3, AMR_OF(1,pulses[6]), 215, 200, 201, + 4, AMR_OF(1,pulses[7]), 118, 147, 148, 149, + 3, AMR_OF(1,pulses[8]), 212, 213, 214, + 4, AMR_OF(1,pulses[9]), 114, 144, 145, 146, + 9, AMR_OF(2,p_lag), 25, 39, 37, 35, 33, 47, 45, 43, 41, + 4, AMR_OF(2,p_gain), 54, 50, 62, 93, + 5, AMR_OF(2,fixed_gain), 58, 70, 66, 89, 109, + 3, AMR_OF(2,pulses[0]), 209, 210, 211, + 4, AMR_OF(2,pulses[1]), 101, 157, 158, 159, + 3, AMR_OF(2,pulses[2]), 222, 223, 208, + 4, AMR_OF(2,pulses[3]), 97, 154, 155, 156, + 3, AMR_OF(2,pulses[4]), 219, 220, 221, + 4, AMR_OF(2,pulses[5]), 105, 167, 152, 153, + 3, AMR_OF(2,pulses[6]), 216, 217, 218, + 4, AMR_OF(2,pulses[7]), 117, 164, 165, 166, + 3, AMR_OF(2,pulses[8]), 229, 230, 231, + 4, AMR_OF(2,pulses[9]), 113, 161, 162, 163, + 6, AMR_OF(3,p_lag), 79, 77, 75, 73, 87, 244, + 4, AMR_OF(3,p_gain), 53, 49, 61, 92, + 5, AMR_OF(3,fixed_gain), 57, 69, 65, 88, 108, + 3, AMR_OF(3,pulses[0]), 226, 227, 228, + 4, AMR_OF(3,pulses[1]), 100, 174, 175, 160, + 3, AMR_OF(3,pulses[2]), 239, 224, 225, + 4, AMR_OF(3,pulses[3]), 96, 171, 172, 173, + 3, AMR_OF(3,pulses[4]), 236, 237, 238, + 4, AMR_OF(3,pulses[5]), 104, 168, 169, 170, + 3, AMR_OF(3,pulses[6]), 233, 234, 235, + 4, AMR_OF(3,pulses[7]), 116, 181, 182, 183, + 3, AMR_OF(3,pulses[8]), 246, 247, 232, + 4, AMR_OF(3,pulses[9]), 112, 178, 179, 180, + 0 +}; + +/** + * position of the bitmapping data for each packet type in + * the AMRNBFrame + */ +static const uint8_t * const amr_unpacking_bitmaps_per_mode[N_MODES] = { + order_MODE_4k75, + order_MODE_5k15, + order_MODE_5k9, + order_MODE_6k7, + order_MODE_7k4, + order_MODE_7k95, + order_MODE_10k2, + order_MODE_12k2, +}; + +/** number of bytes for each mode */ +static const uint8_t frame_sizes_nb[N_MODES] = { + 12, 13, 15, 17, 19, 20, 26, 31, 5 +}; + +/** + * Base-5 representation for values 0-124 + * + * This is useful for decoding pulse positions in 10.2 kbit/s frames. + * Safe values are provided for out of range positions 125-127. + */ +static const uint8_t base_five_table[128][3] = { + {0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 0, 3}, {0, 0, 4}, {0, 1, 0}, {0, 1, 1}, + {0, 1, 2}, {0, 1, 3}, {0, 1, 4}, {0, 2, 0}, {0, 2, 1}, {0, 2, 2}, {0, 2, 3}, + {0, 2, 4}, {0, 3, 0}, {0, 3, 1}, {0, 3, 2}, {0, 3, 3}, {0, 3, 4}, {0, 4, 0}, + {0, 4, 1}, {0, 4, 2}, {0, 4, 3}, {0, 4, 4}, {1, 0, 0}, {1, 0, 1}, {1, 0, 2}, + {1, 0, 3}, {1, 0, 4}, {1, 1, 0}, {1, 1, 1}, {1, 1, 2}, {1, 1, 3}, {1, 1, 4}, + {1, 2, 0}, {1, 2, 1}, {1, 2, 2}, {1, 2, 3}, {1, 2, 4}, {1, 3, 0}, {1, 3, 1}, + {1, 3, 2}, {1, 3, 3}, {1, 3, 4}, {1, 4, 0}, {1, 4, 1}, {1, 4, 2}, {1, 4, 3}, + {1, 4, 4}, {2, 0, 0}, {2, 0, 1}, {2, 0, 2}, {2, 0, 3}, {2, 0, 4}, {2, 1, 0}, + {2, 1, 1}, {2, 1, 2}, {2, 1, 3}, {2, 1, 4}, {2, 2, 0}, {2, 2, 1}, {2, 2, 2}, + {2, 2, 3}, {2, 2, 4}, {2, 3, 0}, {2, 3, 1}, {2, 3, 2}, {2, 3, 3}, {2, 3, 4}, + {2, 4, 0}, {2, 4, 1}, {2, 4, 2}, {2, 4, 3}, {2, 4, 4}, {3, 0, 0}, {3, 0, 1}, + {3, 0, 2}, {3, 0, 3}, {3, 0, 4}, {3, 1, 0}, {3, 1, 1}, {3, 1, 2}, {3, 1, 3}, + {3, 1, 4}, {3, 2, 0}, {3, 2, 1}, {3, 2, 2}, {3, 2, 3}, {3, 2, 4}, {3, 3, 0}, + {3, 3, 1}, {3, 3, 2}, {3, 3, 3}, {3, 3, 4}, {3, 4, 0}, {3, 4, 1}, {3, 4, 2}, + {3, 4, 3}, {3, 4, 4}, {4, 0, 0}, {4, 0, 1}, {4, 0, 2}, {4, 0, 3}, {4, 0, 4}, + {4, 1, 0}, {4, 1, 1}, {4, 1, 2}, {4, 1, 3}, {4, 1, 4}, {4, 2, 0}, {4, 2, 1}, + {4, 2, 2}, {4, 2, 3}, {4, 2, 4}, {4, 3, 0}, {4, 3, 1}, {4, 3, 2}, {4, 3, 3}, + {4, 3, 4}, {4, 4, 0}, {4, 4, 1}, {4, 4, 2}, {4, 4, 3}, {4, 4, 4}, {0, 0, 0}, + {0, 0, 0}, {0, 0, 0} +}; + +/** + * Values for the lsp vector from the 4th subframe of the + * previous subframe values. + * + * @note: Taken from Decoder_amr_reset in Q15 using val/1000 + */ +static const int8_t lsp_sub4_init[LP_FILTER_ORDER] = { + 30, 26, 21, 15, 8, 0, -8, -15, -21, -26 +}; + +/** + * Mean lsp values. + * + * @note: Taken from Decoder_amr_reset in Q15 + */ +static const int16_t lsp_avg_init[LP_FILTER_ORDER] = { + 1384, 2077, 3420, 5108, 6742, 8122, 9863, 11092, 12714, 13701 +}; + +// LSF tables + +// These are stored as integers to save space. The values are taken from +// q_plsf_3.tab and q_plsf_5.tab in 3GPP TS 26.090. + +static const int16_t lsf_3_3_MODE_5k15[128][4] = { +{ 419, 163, -30, -262}, { -455, -789,-1430, -721}, { 1006, 664, 269, 25}, +{ 619, 260, 183, 96}, { -968,-1358, -388, 135}, { -693, 835, 456, 154}, +{ 1105, 703, 569, 363}, { 1625, 1326, 985, 748}, { -220, 219, 76, -208}, +{-1455,-1662, 49, 149}, { -964, -172, -752, -336}, { 625, 209, -250, -66}, +{-1017, -838, -2, 317}, {-2168,-1485, -138, 123}, {-1876,-2099, -521, 85}, +{ -967, -366, -695, -881}, { -921,-1011, -763, -949}, { -124, -256, -352, -660}, +{ 178, 463, 354, 304}, {-1744, -591, -282, 79}, {-2249, 175, 867, 499}, +{ -138, -180, -181, -21}, {-2291,-1241, -460, -520}, { -771, 451, -10, -308}, +{ 271, -65, 4, 214}, { -279, -435, -43, -348}, { -670, 35, -65, -211}, +{ 806, 535, 85, 297}, { 57, 239, 722, 493}, { 225, 661, 840, 547}, +{ -540, -376, 14, 349}, { 469, 721, 331, 162}, { -544, -752, -62, -10}, +{ 398, -88, 724, 701}, { -19, -533, -94, 601}, { 136, -71, -681, -747}, +{ -166, -344, 261, -50}, { 161, -52, 485, 337}, {-1675, 50, 190, -93}, +{-2282, -231, -194, -82}, { -95, -595, -154, 128}, { 894, 501, 588, 457}, +{ -345, 206, 122, 110}, { -631, -227, -569, 3}, { 408, 239, 397, 226}, +{ -197, -2, 128, 491}, { 1281, 904, 292, 215}, { 538, 306, 259, 509}, +{ -677,-1047, 13, 321}, { -679, -588, -358, -212}, { -558, 243, 646, 479}, +{ 486, 342, 634, 532}, { 107, 802, 331, 136}, { -112, -398,-1031, -286}, +{ -326, -705, 288, 272}, { 1299, 1144, 1178, 860}, { -423, 121, -385, -148}, +{ -295, -302, -834, -819}, { 16, -24, -201, -476}, { 555, 91, -245, 294}, +{ -38, -379, -962,-1221}, {-1191,-1518, -273, -395}, { -390,-1013, -645, 573}, +{-1843,-1030, 505, 468}, { 744, 947, 609, 493}, { -689,-1172, -628, -135}, +{-1026, 195, 411, 196}, { 1582, 1147, 575, 337}, {-1239, -777, -648, -142}, +{ 595, 825, 967, 735}, {-1206, -970, -81, -342}, { -745, 13, -72, 375}, +{ 454, 19, 1407, 921}, {-1647, -172, 861, 562}, { 928, 1537, 1063, 740}, +{-2472, -952, 264, 82}, { -502, -965,-1334, 123}, { 867, 1236, 534, 171}, +{-2320, -460, 780, 363}, {-1190, -617, 252, -61}, { -174, 34, 1011, 788}, +{-2333, 247, 423, 153}, { -16, -355, 262, 449}, {-1576,-1073, -544, -371}, +{ -615, -305, 1051, 805}, { 687, 528, 6, -182}, { 935, 875, 1002, 809}, +{ 199, 257, 126, 76}, { -584,-1138, 599, 556}, {-1105,-1391,-1591, -519}, +{ -977,-1325, 108, 347}, { -722, -975, 365, 101}, { -145, 681, 249, -153}, +{ 0, -334, -570, 159}, { 412, 285, -336, -617}, { -953, -966, 887, 689}, +{-1251, 84, -185, -398}, { -592, 433, 1044, 653}, { 85, 329, -40, 361}, +{ -433, -705, 466, 574}, { -154, 654, 592, 290}, { -167, 72, 349, 175}, +{ 674, 297, 977, 720}, { 1235, 1204, 757, 488}, { -400, -269, 538, 372}, +{-1350,-1387,-1194, -91}, { 1262, 876, 775, 700}, { -599, -38, -430, -722}, +{ 1976, 1630, 991, 608}, { 111, 276, -226, -96}, { -947, -388, -11, -7}, +{ -303, -531, -839, 338}, { 1734, 1710, 1405, 1013}, { -516, -855, -645, 210}, +{ -688, -416, 513, 230}, { -822, -637,-1146, -320}, { -952, -658, -694, 183}, +{ -114, -623, 818, 674}, { -191, -204, 731, 635}, { 51, 1221, 883, 576}, +{ -954, -431, 826, 598}, { -342, -755, -900, -407}, {-1126, -354, -206, -512}, +{ -547, -810, -357, -620}, { 66, 515, -73, -410}, { -872, -945,-1444,-1227}, +{ 191, -17, -544, -231}, {-1540, -544, -901, -886} +}; + +static const int16_t lsf_3_1_MODE_7k95[512][3] = { +{ -890,-1550,-2541}, { -819, -970, 175}, { -826,-1234, -762}, +{ -599, -22, 634}, { -811, -987, -902}, { -323, 203, 26}, +{ -383, -235, -781}, { -399, 1262, 906}, { -932,-1399,-1380}, +{ -624, 93, 87}, { -414, -539, -691}, { 37, 633, 510}, +{ -387, -476,-1330}, { 399, 66, 263}, { -407, -49, -335}, +{ -417, 1041, 1865}, { -779,-1089,-1440}, { -746, -858, 832}, +{ -581, -759, -371}, { -673, -506, 2088}, { -560, -634,-1179}, +{ 271, 241, 14}, { -438, -244, -397}, { 463, 1202, 1047}, +{ -606, -797,-1438}, { -51, -323, 481}, { -224, -584, -527}, +{ 494, 881, 682}, { -433, -306,-1002}, { 554, 659, 222}, +{ 171, -160, -353}, { 681, 1798, 1565}, { -852,-1181,-1695}, +{ -336, -666, 114}, { -581, -756, -744}, { -195, 375, 497}, +{ -465, -804,-1098}, { 154, 282, -131}, { -50, -191, -719}, +{ 323, 732, 1542}, { -722, -819,-1404}, { 105, -250, 185}, +{ -178, -502, -742}, { 321, 510, 1111}, { -323, -567, -966}, +{ 127, 484, 338}, { -160, 52, -338}, { 732, 1367, 1554}, +{ -626, -802,-1696}, { -286, -586, 676}, { -695, -343, -370}, +{ -490, 295, 1893}, { -630, -574,-1014}, { -80, 645, -69}, +{ -6, -318, -364}, { 782, 1450, 1038}, { -313, -733,-1395}, +{ 120, 60, 477}, { -264, -585, -123}, { 711, 1245, 633}, +{ -91, -355,-1016}, { 771, 758, 261}, { 253, 81, -474}, +{ 930, 2215, 1720}, { -808,-1099,-1925}, { -560, -782, 169}, +{ -804,-1074, -188}, { -626, -55, 1405}, { -694, -716,-1194}, +{ -660, 354, 329}, { -514, -55, -543}, { 366, 1033, 1182}, +{ -658, -959,-1357}, { -55, -184, 93}, { -605, -286, -662}, +{ 404, 449, 827}, { -286, -350,-1263}, { 628, 306, 227}, +{ -16, 147, -623}, { 186, 923, 2146}, { -674, -890,-1606}, +{ -443, -228, 339}, { -369, -790, -409}, { 231, 86, 1469}, +{ -448, -581,-1061}, { 594, 450, -177}, { -124, -170, -447}, +{ 671, 1159, 1404}, { -476, -667,-1511}, { -77, -138, 716}, +{ -177, -372, -381}, { 451, 934, 915}, { -250, -432, -822}, +{ 272, 828, 446}, { 26, 19, -31}, { 698, 1692, 2168}, +{ -646, -977,-1924}, { -179, -473, 268}, { -379, -745, -691}, +{ 11, 127, 1033}, { -488, -917, -825}, { 61, 323, 135}, +{ 147, -145, -686}, { 685, 786, 1682}, { -506, -848,-1297}, +{ 35, 90, 222}, { -23, -346, -670}, { 455, 591, 1287}, +{ -203, -593,-1086}, { 652, 352, 437}, { 39, 63, -457}, +{ 841, 1265, 2105}, { -520, -882,-1584}, { -328, -711, 1421}, +{ -596, -342, -70}, { 209, 173, 1928}, { -423, -598, -921}, +{ 421, 605, -38}, { -2, -245, -127}, { 896, 1969, 1135}, +{ -379, -518,-1579}, { 173, 118, 753}, { -55, -381, -52}, +{ 985, 1021, 753}, { -2, -291, -891}, { 753, 992, 423}, +{ 264, 131, -196}, { 895, 2274, 2543}, { -635,-1088,-2499}, +{ -529, -982, 526}, { -764, -830, -548}, { -436, 316, 599}, +{ -675, -940, -746}, { -57, 236, -11}, { -201, -81, -798}, +{ 16, 845, 1558}, { -737, -985,-1212}, { -468, 17, 290}, +{ -279, -584, -700}, { 183, 822, 705}, { -265, -492,-1187}, +{ 421, 152, 468}, { -390, 166, -268}, { 39, 1550, 1868}, +{ -635, -966,-1571}, { -453, -492, 910}, { -284,-1027, -75}, +{ -181, -133, 1852}, { -445, -624,-1174}, { 420, 367, -49}, +{ -389, -212, -169}, { 707, 1073, 1208}, { -539, -710,-1449}, +{ 83, -163, 484}, { -236, -543, -355}, { 338, 1175, 814}, +{ -246, -309, -958}, { 606, 760, 60}, { 166, -8, -163}, +{ -306, 1849, 2563}, { -747,-1025,-1783}, { -419, -446, 209}, +{ -718, -566, -534}, { -506, 693, 857}, { -463, -697,-1082}, +{ 325, 431, -206}, { -15, -8, -763}, { 545, 919, 1518}, +{ -611, -783,-1313}, { 256, -55, 208}, { -165, -348, -662}, +{ 321, 680, 930}, { -326, -429, -951}, { 484, 446, 570}, +{ -197, 72, -73}, { 909, 1455, 1741}, { -563, -737,-1974}, +{ -124, -416, 718}, { -478, -404, -314}, { -16, 446, 1636}, +{ -551, -537, -750}, { -58, 638, 214}, { 55, -185, -271}, +{ 1148, 1301, 1212}, { -483, -671,-1264}, { 117, 285, 543}, +{ -204, -391, -111}, { 513, 1538, 854}, { -114, -190, -978}, +{ 877, 595, 464}, { 260, 260, -311}, { 748, 2283, 2216}, +{ -517, -945,-2171}, { -326, -708, 378}, { -812, -691, -232}, +{ -560, 687, 1409}, { -732, -690, -836}, { -359, 645, 386}, +{ -265, 62, -678}, { 145, 1644, 1208}, { -555, -988,-1233}, +{ -78, 14, 114}, { -327, -358, -489}, { 392, 677, 697}, +{ -201, -236,-1140}, { 693, 449, 178}, { -243, 256, -433}, +{ 611, 1385, 2456}, { -612, -901,-1464}, { -307, -17, 499}, +{ -315, -667, -254}, { 256, 428, 1463}, { -486, -422,-1056}, +{ 655, 370, 18}, { -102, -185, -276}, { 755, 1578, 1335}, +{ -488, -603,-1418}, { 182, -93, 870}, { -73, -458, -348}, +{ 835, 862, 957}, { -282, -333, -746}, { 547, 839, 428}, +{ 273, -89, 13}, { 940, 1708, 2576}, { -418,-1084,-1758}, +{ -44, -358, 259}, { -497, -643, -560}, { 99, 557, 961}, +{ -421, -766, -917}, { 295, 326, 184}, { 175, 15, -626}, +{ 532, 878, 1981}, { -443, -768,-1275}, { 221, 156, 268}, +{ 39, -363, -505}, { 695, 772, 1140}, { -162, -459, -912}, +{ 709, 444, 658}, { 25, 303, -312}, { 1268, 1410, 1715}, +{ -297, -766,-1836}, { -263, -108, 1070}, { -406, -13, -129}, +{ 57, 438, 2734}, { -374, -487, -835}, { 304, 696, 164}, +{ 104, -235, 5}, { 1611, 1900, 1399}, { -229, -582,-1325}, +{ 405, 192, 817}, { -87, -438, 111}, { 1028, 1199, 993}, +{ 68, -175, -934}, { 1033, 1117, 451}, { 478, 200, -248}, +{ 2127, 2696, 2042}, { -835,-1323,-2131}, { -799, -692, 466}, +{ -812,-1032, -469}, { -622, 288, 920}, { -701, -841,-1070}, +{ -411, 512, 8}, { -390, -91, -744}, { -30, 1043, 1161}, +{ -822,-1148,-1156}, { -294, -46, 110}, { -411, -374, -678}, +{ 214, 531, 668}, { -406, -420,-1194}, { 487, 232, 303}, +{ -318, 91, -472}, { 123, 1232, 2445}, { -722, -952,-1495}, +{ -738, -675, 1332}, { -543, -606, -211}, { -95, -98, 1508}, +{ -549, -514,-1193}, { 473, 211, 73}, { -288, -112, -389}, +{ 537, 1332, 1258}, { -567, -755,-1545}, { 71, -283, 632}, +{ -170, -481, -493}, { 681, 1002, 817}, { -356, -331, -877}, +{ 419, 706, 346}, { 241, -34, -326}, { 377, 1950, 1883}, +{ -727,-1075,-1625}, { -233, -543, 116}, { -524, -806, -585}, +{ -73, 478, 729}, { -288, -925,-1143}, { 173, 447, -52}, +{ 68, -229, -606}, { 449, 529, 1797}, { -591, -875,-1363}, +{ 183, -144, 324}, { -103, -452, -666}, { 623, 488, 1176}, +{ -238, -511,-1004}, { 326, 552, 458}, { 136, 108, -319}, +{ 626, 1343, 1883}, { -490, -646,-1730}, { -186, -449, 984}, +{ -738, -76, -170}, { -550, 755, 2560}, { -496, -510, -947}, +{ 210, 694, -52}, { 84, -322, -199}, { 1090, 1625, 1224}, +{ -376, -603,-1396}, { 343, 74, 632}, { -175, -502, -32}, +{ 972, 1332, 734}, { 52, -295,-1113}, { 1065, 918, 160}, +{ 393, 107, -397}, { 1214, 2649, 1741}, { -632,-1201,-1891}, +{ -719, -277, 353}, { -651, -880, -122}, { -211, 209, 1338}, +{ -562, -714,-1059}, { -208, 388, 159}, { -320, -61, -551}, +{ 293, 1092, 1443}, { -648, -865,-1253}, { -49, -143, 305}, +{ -401, -227, -585}, { 561, 532, 927}, { -117, -443,-1188}, +{ 507, 436, 292}, { -79, 233, -458}, { 671, 1025, 2396}, +{ -633, -842,-1525}, { -308, -286, 640}, { -373, -621, -407}, +{ 418, 253, 1305}, { -315, -581,-1137}, { 572, 685, -281}, +{ 61, -68, -371}, { 991, 1101, 1498}, { -493, -683,-1362}, +{ -47, 164, 704}, { -256, -314, -268}, { 631, 949, 1052}, +{ -118, -348, -833}, { 68, 1180, 568}, { 152, 117, 34}, +{ 1113, 1902, 2239}, { -601, -959,-1706}, { -143, -489, 480}, +{ -332, -655, -574}, { 54, 353, 1192}, { -462, -652, -796}, +{ 150, 549, 112}, { 195, -111, -515}, { 679, 1108, 1647}, +{ -558, -749,-1217}, { -9, 272, 341}, { -53, -265, -535}, +{ 489, 843, 1298}, { -120, -482,-1032}, { 632, 543, 408}, +{ 179, 306, -526}, { 1124, 1464, 2244}, { -417, -786,-1562}, +{ -224, -384, 1364}, { -377, -459, -25}, { 385, 489, 2174}, +{ -332, -651, -829}, { 544, 553, 61}, { 22, -113, -89}, +{ 1128, 1725, 1524}, { -216, -373,-1653}, { 161, 316, 908}, +{ -165, -222, -67}, { 1362, 1175, 789}, { 73, -252, -767}, +{ 738, 932, 616}, { 362, 246, -126}, { 787, 2654, 3027}, +{ -691,-1106,-2190}, { -565, -588, 524}, { -590, -979, -490}, +{ -263, 397, 982}, { -577, -837, -945}, { -22, 435, -49}, +{ -190, -118, -629}, { -88, 1240, 1513}, { -636,-1051,-1019}, +{ -291, 189, 259}, { -257, -470, -629}, { 145, 945, 894}, +{ -326, -364,-1094}, { 543, 260, 630}, { -202, 189, -209}, +{ 357, 1379, 2091}, { -569,-1075,-1449}, { -714, -239, 919}, +{ -420, -705, -84}, { -109, -114, 2407}, { -413, -529,-1177}, +{ 482, 368, 131}, { -186, -72, -131}, { 861, 1255, 1220}, +{ -611, -658,-1341}, { 227, -121, 631}, { -176, -489, -218}, +{ 745, 1175, 957}, { -321, -148, -936}, { 671, 966, 216}, +{ 340, -3, -143}, { 469, 1848, 2437}, { -729, -961,-1683}, +{ -213, -254, 321}, { -511, -438, -521}, { -126, 725, 903}, +{ -340, -685,-1032}, { 316, 480, 20}, { 23, -89, -551}, +{ 353, 1051, 1789}, { -544, -757,-1364}, { 298, -25, 436}, +{ -100, -392, -519}, { 467, 754, 1078}, { -210, -398,-1078}, +{ 620, 658, 630}, { 33, 147, -178}, { 921, 1687, 1921}, +{ -325, -528,-1978}, { 2, -285, 910}, { -371, -490, -230}, +{ 0, 597, 2010}, { -496, -395, -834}, { 37, 945, 245}, +{ 181, -160, -144}, { 1481, 1373, 1357}, { -355, -601,-1270}, +{ 298, 322, 672}, { -193, -336, 77}, { 1089, 1533, 922}, +{ 177, -39,-1125}, { 996, 781, 536}, { 456, 366, -432}, +{ 1415, 2440, 2279}, { -466, -758,-2325}, { -303, -509, 387}, +{ -727, -557, 66}, { -145, 643, 1248}, { -544, -676, -916}, +{ -225, 862, 588}, { -152, 40, -533}, { 423, 1423, 1558}, +{ -572, -843,-1145}, { -128, 85, 461}, { -238, -257, -584}, +{ 605, 748, 861}, { 24, -202,-1409}, { 797, 487, 303}, +{ -181, 364, -182}, { 616, 1378, 2942}, { -494, -852,-1441}, +{ -292, 61, 812}, { -84, -723, -182}, { 555, 532, 1506}, +{ -365, -493,-1057}, { 822, 588, 11}, { -14, -18, -230}, +{ 1001, 1401, 1451}, { -474, -569,-1292}, { 302, 62, 1062}, +{ -70, -376, -222}, { 982, 974, 1149}, { -196, -234, -795}, +{ 479, 1098, 499}, { 362, 58, 70}, { 1147, 2069, 2857}, +{ -487, -878,-1824}, { 73, -288, 348}, { -358, -500, -508}, +{ 199, 721, 1242}, { -78, -697, -795}, { 361, 536, 196}, +{ 374, 110, -735}, { 847, 1051, 1896}, { -366, -713,-1182}, +{ 315, 320, 429}, { 72, -215, -450}, { 759, 886, 1363}, +{ -30, -428, -834}, { 861, 627, 796}, { 118, 468, -279}, +{ 1355, 1883, 1893}, { -188, -642,-1612}, { 63, -175, 1198}, +{ -418, -211, 51}, { 414, 587, 2601}, { -234, -557, -858}, +{ 424, 889, 222}, { 136, -101, 83}, { 1413, 2278, 1383}, +{ -84, -445,-1389}, { 414, 313, 1045}, { 29, -343, 65}, +{ 1552, 1647, 980}, { 183, -91, -829}, { 1273, 1413, 360}, +{ 553, 272, -107}, { 1587, 3149, 2603} +}; + +static const int16_t lsf_3_1[256][3] = { +{ 6, 82, -131}, { 154, -56, -735}, { 183, -65, -265}, +{ 9, -210, -361}, { 113, 718, 1817}, { 1010, 1214, 1573}, +{ 857, 1333, 2276}, { 827, 1568, 1933}, { 717, 1989, 2206}, +{ 838, 1172, 1823}, { 721, 1000, 2154}, { 286, 476, 1509}, +{ -247, -531, 230}, { 147, -82, 569}, { 26, -177, -944}, +{ -27, -273, 692}, { -164, -264, -183}, { 224, 790, 1039}, +{ 899, 946, 601}, { 485, 771, 1150}, { 524, 677, 903}, +{ -140, 375, 778}, { 410, 676, 429}, { 301, 530, 1009}, +{ 719, 646, 38}, { 226, 367, 40}, { 145, -45, -505}, +{ 290, 121, -121}, { 302, 127, 166}, { -124, -383, -956}, +{ -358, -455, -977}, { 715, 878, 894}, { 978, 923, 211}, +{ 477, 272, 64}, { 188, -78, 17}, { -143, -65, 38}, +{ 643, 586, 621}, { -134, -426, -651}, { 347, 545, 2820}, +{ 1188, 2726, 2442}, { 142, -80, 1735}, { 283, 130, 461}, +{ -262, -399,-1145}, { -411, 155, 430}, { 329, 375, 779}, +{ 53, -226, -139}, { -129, -236, 1682}, { 285, 744, 1327}, +{ 738, 697, 1664}, { 312, 409, 266}, { 325, 720, 135}, +{ 1, 221, 453}, { 8, 203, 145}, { 299, 640, 760}, +{ 29, 468, 638}, { 103, 429, 379}, { 420, 954, 932}, +{ 1326, 1210, 1258}, { 704, 1012, 1152}, { -166, -444, -266}, +{ -316, -130, -376}, { 191, 1151, 1904}, { -240, -543,-1260}, +{ -112, 268, 1207}, { 70, 1062, 1583}, { 278, 1360, 1574}, +{ -258, -272, -768}, { 19, 563, 2240}, { -3, -265, 135}, +{ -295, -591, -388}, { 140, 354, -206}, { -260, -504, -795}, +{ -433, -718,-1319}, { 109, 331, 962}, { -429, -87, 652}, +{ -296, 426, 1019}, { -239, 775, 851}, { 489, 1334, 1073}, +{ -334, -332, 25}, { 543, 1206, 1807}, { 326, 61, 727}, +{ 578, 849, 1405}, { -208, -277, 329}, { -152, 64, 669}, +{ -434, -678, -727}, { -454, -71, 251}, { 605, 480, 254}, +{ -482, 11, 996}, { -289, 395, 486}, { 722, 1049, 1440}, +{ -30, -316, -786}, { -106, -115, -619}, { 861, 1474, 1412}, +{ 1055, 1366, 1184}, { 812, 1237, 925}, { 42, -251, -576}, +{ 342, 141, -454}, { -168, -80, 1359}, { -342, -656,-1763}, +{ 100, 821, 725}, { 990, 747, 800}, { 332, 440, 568}, +{ 663, 379, 852}, { 112, 165, -369}, { 597, 910, 282}, +{ -8, 834, 1281}, { -352, 572, 695}, { 462, 2246, 1806}, +{ 345, 190, 1374}, { 416, 915, 2166}, { 168, -82, 280}, +{ -516, -446, 840}, { 47, 533, 44}, { -362, -711,-1143}, +{ 22, 193, 1472}, { -85, 233, 1813}, { -62, 579, 1504}, +{ 550, 944, 1749}, { 723, 650, 1148}, { 972, 884, 1395}, +{ -425, 643, 0}, { 1000, 952, 1098}, { 249, 1446, 672}, +{ -334, -87, 2172}, { -554, 1882, 2672}, { 140, 1826, 1853}, +{ 920, 1749, 2590}, { 1076, 1933, 2038}, { -137, -443,-1555}, +{ 1269, 1174, 468}, { -493, -122, 1521}, { -451, 1033, 1214}, +{ 482, 1695, 1118}, { 815, 649, 384}, { -446, -692, 107}, +{ -319, -605, -118}, { -207, -505, 525}, { -468, -12, 2736}, +{ 75, 1934, 1305}, { 880, 2358, 2267}, { 1285, 1575, 2004}, +{ -48, -304,-1186}, { -435, -461, -251}, { -366, -404, -547}, +{ -289, -605, -597}, { -538, -810, -165}, { -120, 3, 356}, +{ 639, 1241, 1502}, { 96, 177, 750}, { -435, -585,-1174}, +{ -356, 109, -79}, { -485, 288, 2005}, { 9, 1116, 731}, +{ 880, 2134, 946}, { -265, 1585, 1065}, { 1157, 1210, 843}, +{ -498, -668, 431}, { 374, 321, -229}, { 1440, 2101, 1381}, +{ 449, 461, 1155}, { -105, 39, -384}, { -263, 367, 182}, +{ -371, -660, 773}, { -188, 1151, 971}, { 1333, 1632, 1435}, +{ 774, 1267, 1221}, { -482, -832,-1489}, { -237, -210, 860}, +{ 890, 1615, 1064}, { 472, 1062, 1192}, { 185, 1077, 989}, +{ -568, -992,-1704}, { -449, -902,-2043}, { -142, -377, -458}, +{ -210, -554,-1029}, { -11, 1133, 2265}, { -329, -675, -893}, +{ -250, 657, 1187}, { 519, 1510, 1779}, { 520, 539, 1403}, +{ 527, 1421, 1302}, { -563, -871,-1248}, { -147, -463, 879}, +{ -76, 2334, 2840}, { 563, 2573, 2385}, { 632, 1926, 2920}, +{ 719, 2023, 1840}, { -545, -723, 1108}, { 129, -125, 884}, +{ 1417, 1632, 925}, { -94, 1566, 1751}, { -341, 1533, 1551}, +{ 591, 395, -274}, { -76, 981, 2831}, { 153, 2985, 1844}, +{ 1032, 2565, 2749}, { 1508, 2832, 1879}, { 791, 1199, 538}, +{ -190, -453, 1489}, { -278, -548, 1158}, { -245, 1941, 2044}, +{ 1024, 1560, 1650}, { 512, 253, 466}, { -62, -323, 1151}, +{ -473, -376, 507}, { -433, 1380, 2162}, { 899, 1943, 1445}, +{ 134, 704, 440}, { 460, 525, -28}, { -450, 279, 1338}, +{ 0, 971, 252}, { -445, -627, -991}, { -348, -602,-1424}, +{ 398, 712, 1656}, { -107, 314, -178}, { 93, 2226, 2238}, +{ 518, 849, 656}, { -462, -711, -447}, { 174, -34, 1191}, +{ -119, 42, 1005}, { -372, 274, 758}, { 1036, 2352, 1838}, +{ 675, 1724, 1498}, { 430, 1286, 2133}, { -129, -439, 0}, +{ -373, 800, 2144}, { 6, 1587, 2478}, { 478, 596, 2128}, +{ -428, -736, 1505}, { 385, 178, 980}, { 139, 449, 1225}, +{ -526, -842, -982}, { 145, 1554, 1242}, { 623, 1448, 656}, +{ 349, 1016, 1482}, { 31, -280, 415}, { -316, 724, 1641}, +{ 360, 1058, 556}, { -436, -358, 1201}, { -355, 1123, 1939}, +{ 401, 1584, 2248}, { -527,-1012, 355}, { 233, 238, 2233}, +{ -550, -897, -639}, { -365, -501, 1957}, { 389, 1860, 1621}, +{ 162, 1132, 1264}, { -237, 1174, 1390}, { -640, -411, 116}, +{ -228, 1694, 2298}, { 1639, 2186, 2267}, { 562, 1273, 2658}, +{ 323, 338, 1774}, { 578, 1107, 852}, { 22, 594, 934}, +{ -143, 718, 446} +}; + + +static const int16_t lsf_3_2[512][3] = { +{ 50, 71, -9}, { -338, -698,-1407}, { 102, -138, -820}, +{ -310, -469,-1147}, { 414, 67, -267}, { 1060, 814, 1441}, +{ 1548, 1360, 1272}, { 1754, 1895, 1661}, { 2019, 2133, 1820}, +{ 1808, 2318, 1845}, { 644, -93, 454}, { 858, 329, -136}, +{ 489, -258, -128}, { -198, -745, -41}, { -52, -265, -985}, +{ 346, 137, 479}, {-1741, -748, -684}, {-1163,-1725, -367}, +{ -895,-1145, -784}, { -488, -946, -968}, { -85, -390, -725}, +{ 215, -340, -171}, { 1020, 916, 1969}, { 564, 179, 746}, +{ 662, 977, 1734}, { 887, 622, 914}, { 939, 856, 1165}, +{ 309, 688, 803}, { 917, 161, 570}, { 118, -20, -283}, +{ -816, -42, 204}, {-1228, -325, -462}, { -963, -202, -143}, +{ -988, -484, -361}, { -702, -978, -477}, { -302, -790,-1188}, +{ -100, -786,-1088}, {-1054, -947,-1684}, { -202, -843, -782}, +{-1039,-1378, -901}, { -624, -110, -85}, { 356, 213, -10}, +{ -493, 364, 774}, { 425, 822, 479}, { -83, 557, 520}, +{ -992,-1560, -572}, { -603, -741, -26}, { -502, -638, -903}, +{ 209, 306, 147}, { -316, -593, -596}, { -85, -211, -225}, +{ -918, -529, 117}, { 233, -439, -738}, { 1101, 751, 633}, +{ 1457, 1716, 1511}, { 1765, 1457, 910}, { 1122, 1156, 849}, +{ 1354, 868, 470}, { -871,-1150,-1796}, { -871, -861, -992}, +{ -118, 155, 212}, {-1051, -849, -606}, {-1117,-1849,-2750}, +{-1019,-1427,-1869}, { 370, -184, -414}, { 959, 493, 104}, +{ 958, 1039, 543}, { 154, 653, 201}, { 1249, 507, 150}, +{ 663, 503, 230}, { 623, 777, 675}, { 659, 88, -110}, +{ 843, 244, 224}, { 382, 541, 302}, { 724, 433, 666}, +{ 1166, 734, 341}, { -138, 20, -397}, {-1183, -424, -46}, +{ -321, -352, -124}, { 1333, 1021, 1080}, { 262, 366, 723}, +{ 922, 283, -551}, { 31, -636, -611}, { -689, -697, -415}, +{ -952, -779, -201}, {-1329, -598, -359}, { -953,-1285, 166}, +{ 493, 305, 221}, { 846, 703, 610}, { 840, 936, 774}, +{ -723,-1324,-1261}, { -357,-1025,-1388}, {-1096,-1376, -365}, +{-1416,-1881, -608}, {-1798,-1727, -674}, { -545,-1173, -703}, +{ 678, 786, 148}, { -123, 696, 1288}, { 644, 350, -10}, +{ 414, 614, 15}, { 137, 344, -211}, { -814,-1512, -819}, +{ -391, -930, -588}, { 47, -591, -898}, { -909,-1097, -163}, +{-1272,-1167, -157}, {-1464,-1525, -389}, {-1274,-1188, -624}, +{ 671, 213, 454}, { 124, -274, -525}, { -729, -496, -152}, +{-1344, 122, 135}, {-2905, -589, -394}, {-1728, 441, -50}, +{ 1476, 904, 787}, { 316, 236, -440}, { -347, 217, 413}, +{ -911, -917, 121}, { -455, -932, 202}, { -92, -465, -375}, +{ 488, 390, 474}, { 876, 729, 316}, {-1815,-1312, -669}, +{ 87, 962, 432}, { 563, -249,-1058}, { 250, 285, 1105}, +{ 1141, 427, 696}, {-1038,-1664,-1582}, { -948, 346, 160}, +{ -309, -272, -858}, { 670, 624, 1250}, { -944, -408, -666}, +{ -606, -320, -384}, { -492, 230, 65}, { 334, -50, -16}, +{ -16, -690,-1397}, { 1791, 1716, 1399}, { 2478, 2063, 1404}, +{ 1245, 1471, 1426}, { -382,-1037, -2}, { 173, -398, 1145}, +{ 1491, 2024, 1801}, { 772, 1274, 1506}, { 1429, 1735, 2001}, +{ 1079, 1218, 1273}, {-1154,-1851,-1329}, { -808,-1133,-1096}, +{ -451,-1033,-1722}, { 65, 578, -84}, {-1476,-2434,-1778}, +{ -765,-1366, -494}, { -218, -594, -931}, { 337, -236, 562}, +{ 2357, 2662, 1938}, { 1489, 1276, 874}, { 189, 358, 374}, +{-1519,-2281,-2346}, { -967,-1271,-2095}, { -628,-1188,-1542}, +{ 1661, 1043, 546}, { 565, 1061, 732}, { -64, -836, -434}, +{ -436, -96, 203}, { 1078, 1216, 1636}, { 907, 1534, 986}, +{ 326, 965, 845}, { 142, -84, 197}, { 470, 2379, 1570}, +{ 1133, 470, 1214}, { 395, 1376, 1200}, { 1125, 1042, 348}, +{ -543,-1234, -376}, { -215, -181, 481}, {-1947,-1621, -210}, +{ -750,-1185, 390}, { 29, -399, 27}, { 820, 1236, 755}, +{ 695, 979, 409}, { -174, 1197, 1035}, { 912, 1356, 1846}, +{ -992,-1437, 484}, {-1485,-1700, 208}, { -412, 1204, 1432}, +{ -271, 896, 1144}, { -416, 1777, 1434}, {-1696,-2644, -204}, +{-1789,-1551, 1033}, {-1656,-1559, 1303}, {-1253,-1589, 1081}, +{ -669,-1095, -66}, { -682, 320, -345}, { 659, 305, 1069}, +{-1292, -804, -19}, {-1635,-1291, 29}, {-1683, -497, 71}, +{ -287, -7, -100}, { -494, -962, -237}, { 852, 1881, 1740}, +{-1217,-1387, 227}, { -660, 302, 373}, { 96, 1087, 1257}, +{-1074,-1669, 160}, { 485, 2076, 1798}, { -934, -220, 552}, +{ -596, -612, 237}, { 336, 1720, 879}, { 643, 629, 434}, +{ 1267, 522, 1633}, { 15, 244, -441}, { 1475, 717, 184}, +{ 1819, 1590, 1709}, { 988, 261, 937}, { 2093, 2345, 1520}, +{ 2139, 1858, 1606}, { -577, -579,-1203}, { -956, 135, -488}, +{ -464, 51, -338}, { -629, -348, -723}, { 1146, 2073, 1442}, +{ 2192, 1466, 911}, {-1444,-1572,-2278}, { 1400, 710, 1297}, +{ 1335, 633, 928}, { 1434, 2194, 2594}, { 2422, 2204, 1881}, +{ 982, 2242, 1854}, { 380, 792, 1145}, { -63, -539, 414}, +{ -252, -964, -314}, {-1261, -683, -780}, { -831, -526,-1005}, +{-1666,-1135, -424}, {-1611, -452, -299}, { 1268, 1048, 642}, +{ 1147, 853, 856}, { -675, -336, 139}, { 2268, 1343, 1418}, +{ 29, 768, 797}, {-1224, 423, 564}, {-1318,-1082, 245}, +{-1302, -812, 573}, {-1298,-1617, 646}, { -968, 834, 723}, +{ 993, 1652, 2027}, { -191, -817, 432}, { 662, 60, 198}, +{ 626, 997, 1330}, { 1648, 1963, 1289}, {-1597, -93, -45}, +{-1088, 37, -84}, { 1653, 2607, 2337}, { 1065, 2040, 2377}, +{ 1139, 2326, 2118}, { 859, 357, 1510}, { 664, 1227, 1099}, +{ 479, 1360, 912}, { 1897, 1754, 2019}, { 1168, 1909, 1784}, +{ 399, 34, 256}, { -593, -304,-1053}, { 547, 1694, 1407}, +{ 647, -99, -341}, { 1492, 1647, 1190}, { 38, -644, -212}, +{ 395, 846, 222}, { -704, -765, -716}, { -724,-1964,-2804}, +{ -150, 291, -82}, { 1233, 1459, 1007}, { -140, -155, 153}, +{ 439, 297, 1568}, {-1529, -410, -636}, { 1536, 455, -237}, +{-1328, -139, -260}, { 531, 554, 868}, { 269, 1264, 606}, +{ -233, 883, 463}, { 742, 600, -120}, { -73, 421, 212}, +{ -439, -58, 804}, {-1286,-1241, 728}, { 294, -490, 50}, +{ -591, -905,-1254}, { 42, -687, 147}, { -25, 273, 596}, +{ -311, 1213, 601}, { -754, 849, 584}, { 429, 607, 587}, +{ -602, -166, 461}, { -796, -823, 777}, { 1380, 910, 1755}, +{ 119, 1417, 972}, { -219, -880,-1596}, {-1049,-1010, 438}, +{ -713,-1379, 78}, { 0, -447,-1179}, {-1136,-1319,-1573}, +{ 2248, 1767, 1309}, { 946, 1583, 1432}, { 1150, 482, 436}, +{ -469,-1108, 618}, { -447, -966, 1088}, {-1252,-1515, -114}, +{-1104,-2008, -579}, { 210, 613, 497}, {-1975,-1437, 642}, +{-1269, -856, 1011}, {-1646,-1185, 1063}, {-1555, -672, 1204}, +{-1692,-1114, 623}, { -979,-1326,-1277}, { 539, -147, 894}, +{-1354, -897, -434}, { 888, 475, 428}, { 153, -384, 338}, +{-1492, -511, 359}, { -974,-1115, -470}, { 105, -550, 677}, +{ -937,-1145, 877}, { 380, -260, 210}, { 1685, 924, 1256}, +{ 1775, 1190, 1095}, { 1419, 631, 533}, { 627, 299, -347}, +{ -411, -534, 647}, { -650, 29, -595}, { -378,-1367, 1563}, +{ 1402, 1121, 1465}, { 1089, 1410, 648}, {-2096,-1090, -6}, +{ 311, -194, -869}, { -639, -831, 416}, {-1162,-1224, 1349}, +{-1247, -941, 1813}, {-2193,-1987, 453}, { -619,-1367, -956}, +{-1606,-1972,-1507}, {-1175,-1057,-1104}, { -377, 601, 201}, +{ 1876, 825, 374}, { -430,-1323, 29}, {-1397,-1249,-1331}, +{-1007,-1504, 960}, {-1401,-2009, 197}, {-1379,-1949, -236}, +{-1077, 123, 422}, { 615, 1269, 546}, { -306, 1526, 904}, +{ 1194, 1788, 1177}, { -626, -884,-1526}, { 199, 766, 1504}, +{-1065, 862, 197}, {-1034,-1773, -887}, { -800, 145, 599}, +{-1134, -519, 626}, {-1205,-1926, 500}, { -910,-1041,-1395}, +{-1476,-1567, -969}, { -523, 842, 34}, { 1794, 646, 862}, +{-1207,-1888,-1002}, { -78, -9, -672}, { 1044, 759, 80}, +{ -600, 1139, 1019}, { 57, 2000, 1422}, { -833, 1414, 1121}, +{-1202, 1630, 1260}, { -461, 1420, 1244}, { 1537, 975, 253}, +{ -283, 324, -359}, { 599, -195, 106}, { 588, 62, -587}, +{ -757, 645, 205}, { 51, 1201, 758}, {-1209, 673, -390}, +{ -624, 1581, 941}, { -151, 1023, 735}, { 2820, 1301, 690}, +{ -302, 524, -99}, { -900,-1588,-1189}, { 1084, 251, 238}, +{ 2014, 1792, 1010}, { 1245, 1633, 1741}, {-1227,-1540,-1208}, +{ -621, 456, -109}, { 40, -65, 788}, { -805, -699,-1350}, +{ -583, 904, 832}, { -801, 532, 594}, { 1972, 1408, 1351}, +{-1177,-1880,-2114}, { -773, 568, 948}, {-1015, 1079, 1260}, +{-1111, 482, -130}, { 1778, 1044, 780}, {-1491, 245, 912}, +{ -316,-1141, -917}, { -536,-1442,-2346}, { -785,-1546,-1988}, +{-2003, 257, 909}, {-1849, -633,-1209}, {-1538,-1918,-1054}, +{ 1606, 2239, 1576}, { -567,-1500,-1544}, {-1279, 195, 1369}, +{ -817, 293, 1219}, { -525, 630, 1197}, {-1698,-2425,-1840}, +{ -303, 731, 747}, {-1169, -251, 269}, { -950, -75, 1684}, +{-1182, -453, 1005}, {-1599, 585, 378}, {-2075, -571, -427}, +{ -529,-1159,-1171}, { -283, -205, -564}, { -796, 1246, 717}, +{ 2277, 927, 539}, { -454, 559, 440}, { -717, 1460, 1615}, +{-1030, 1052, 1610}, {-1169, -138, 847}, { 226, 39, -612}, +{-1251, -106, -729}, { -651, 968, 1302}, { -714, -636, 1727}, +{ 353, 1069, 410}, { -798, -156, 1099}, { -574, 918, 446}, +{-1310, 1012, 466}, { 1408, 1591, 765}, { 1429, 1380, 1757}, +{ 1949, 1956, 2378}, { 1578, 2047, 2148}, { 916, 98, -7}, +{ 1893, 1418, 2141}, { 348, 1405, 1579}, { 152, 1134, 1801}, +{ -267, 154, 1395}, {-1166, 469, 1054}, {-1142, -405,-1073}, +{-1341,-2264,-1581}, { -364, 869, 1706}, {-1162, 549, 1550}, +{-1225,-1932,-1666}, {-1485,-1977,-2055}, {-1727, -906, -98}, +{-1897, 233, 1492}, { 892, 108, -331}, {-1728,-1170,-1700}, +{-1060, 1980, 1790}, {-1070,-1741,-1909}, { -11, 1539, 1317}, +{-1600, 94, 497}, { 421, 443, -197}, {-1578, -349, -994}, +{ -599, -539, 1140}, { -965,-1419, -129}, {-1341, 175, -447}, +{ -375, 1311, 2055}, { -371, -650, -307}, {-1073, 605, 365}, +{-2057, -113, 430}, { 652, 914, 967}, {-1012,-1586,-2323}, +{ 1505, 1248, 559}, { 262, -486, -401}, {-1727, 1342, 1546}, +{ 50, 56, 432}, { -330, 119, -604}, {-1517,-1080, -810}, +{ 946, 1127, 1055}, {-1400,-1703,-1712}, {-1270, -704,-1317}, +{ 807, 1821, 1143}, { 2760, 1606, 2171}, { 1120, 409, -150}, +{ -147, 404, 959}, { 2439, 1911, 2189}, { -906, -141, -866}, +{ -904, -142, -458}, { -557, -708,-1679}, { -830,-1431,-1583}, +{-1842,-1346,-1086}, {-1604, -272, 915}, {-1196, 772, 1056}, +{ -638,-1234,-1897}, { -500, -81, -822}, {-1289,-1613, -735}, +{ -117, 785, 168}, {-1090, 1133, 922}, {-1096, -746, 1384}, +{ 287, -547,-1063}, {-1376,-2201,-1204}, {-2176,-1570,-1757}, +{-1511,-2241, -771}, {-1737, 1099, 830}, {-1588, 724, 1243}, +{-1542, 693, 805}, {-1690, -240, 1665}, {-1700, -4, -668}, +{ 2149, 816, 1042}, { -818,-1841, 22}, { -764, -507, 449}, +{-1151, -617, 289}, { -843,-1596, -240}, { 498, -234, -657}, +{ -752, 480, 1678}, { -319, -481, 193}, { -811, 171, -119}, +{-2128, -202, -848}, { 1717, 1140, 1700} +}; + +static const int16_t lsf_3_3[512][4] = { +{ 67, -17, 66, -12}, {-1690, -581, -104, -272}, {-1076,-1186,-1845, -376}, +{-1140, -926, -420, -58}, { -259, -656,-1134, -553}, { 1788, 1227, 455, 129}, +{ 462, 441, -240, -528}, { 840, 514, 130, -75}, { 1114, 623, 153, 216}, +{ 1068, 564, -6, -276}, { 1119, 727, 190, -68}, { 704, 306, 119, -264}, +{ 329, 61, -100, 156}, { 364, 123, 183, -208}, { -171, -123, 220, -65}, +{ -306, -62, 402, 17}, { -660, -938, -266, 0}, { 385, 235, 276, 285}, +{ 320, 268, -336, -200}, { -724, 17, -84, 381}, { -544, 429, 494, 519}, +{ -117, 288, 304, 329}, { 643, 157, 701, 508}, { 1200, 625, 796, 608}, +{ 998, 421, 492, 632}, { 1204, 780, 446, 132}, { 1257, 844, 547, 449}, +{ 829, 658, 541, 470}, { 1132, 1258, 918, 639}, { 547, 51, 423, 279}, +{ 9, 392, 83, 94}, { 542, 543, 229, -147}, { -198, 129, 194, -185}, +{ -863,-1321, -302, 30}, { -597, -629, -19, 114}, { -900,-1081, 466, 353}, +{-1483,-1573, 15, -143}, {-1708,-2059, -751, 196}, {-1876,-2067, -642, -258}, +{-2335,-1470, -450, -564}, { -584, -186, -872, -414}, {-1805, -988,-1125,-1310}, +{ -726,-1129, 28, 169}, {-1039, -864, -718, -246}, { 484, 36, -233, -49}, +{ 265, 67, 289, 467}, { 178, 543, 810, 540}, { 84, 282, 672, 703}, +{ -975, -777, 129, 287}, { -938, -227, 955, 595}, {-1617, -289, 836, 649}, +{-1847, -215, 1106, 718}, {-2034,-1085, 650, 440}, {-2101, -529, 907, 575}, +{-2011, -336, 670, 204}, {-2389, -692, 360, 137}, {-2156,-2204, -9, 280}, +{ -266, 119, 39, 193}, { 78, -59, -120, 226}, { -975, -858, -781,-1095}, +{ -619, -413, -451, -842}, {-1216,-1321, -813, -883}, {-1376,-1615, -394, -428}, +{ -737,-1113, -549, -790}, { -880, -975, -967, -642}, { -985, -886,-1273,-1361}, +{ -473, -804,-1401,-1407}, { 160, -265, -919, -275}, { -248, -250, -718, -380}, +{ 97, -103, -375, -229}, { -415, -193, -135, -555}, { 628, 361, 119, 216}, +{ 579, 364, 391, 209}, { 634, 522, -154, -148}, { 526, 389, 170, 33}, +{ 105, 267, 64, 380}, {-1503,-1000, -30, -369}, {-1070, 58, 647, 223}, +{-1520, -291, 621, 307}, {-1531, 156, 762, 404}, {-2029, 141, 734, 499}, +{-1849, -650, 306, 512}, { -187, -104, -59, 438}, { 134, -230, 156, -186}, +{ -61, -260, -16, 10}, { -569, -3, -421, -297}, {-1725, -521, -346, 178}, +{-1362, -59, -44, 157}, {-2146, -461, -470, -349}, {-2170, -1, -369, -121}, +{-1579, -373, -900,-1015}, {-1117, -591, -613, -784}, { -561, 122, -75, -449}, +{ -4, -171, -123, -372}, { 192, 168, -76, -132}, { 252, -107, 340, 210}, +{ 392, 509, 272, 181}, { -109, 145, 218, 119}, { -416, -263, 485, 265}, +{ -181, -8, -286, 226}, { -244, -218, 69, -290}, { -158, 191, -1, -64}, +{ -592, -90, 213, -96}, { 255, 435, 178, -80}, { -369, -18, -33, -80}, +{ -42, 415, 140, -222}, { 1143, 651, 649, 329}, { 767, 556, 249, 235}, +{ 948, 413, 442, 279}, { 141, 339, 356, 557}, { -470, -170, 99, 237}, +{ -569, -800, 352, 565}, { 282, 473, 470, 332}, { -199, -690,-1284, -917}, +{ -193, -426, -800,-1122}, { -26, -371, -490, -193}, { 637, 595, 519, 330}, +{ 408, -115, 79, 12}, { 477, 87, -103, -376}, { -666, -347, -277, -291}, +{ -510, -481, 169, 297}, { -829, -738, -205, -171}, { -320, -540, 328, 283}, +{ -859, -958, 442, -2}, { 556, 686, 130, 56}, { 1383, 1012, 755, 427}, +{ 612, 741, 628, 553}, { -339, -796, 134, 277}, { -633,-1085, -2, -246}, +{ -880,-1035,-1607,-1064}, { -994, -474,-1138, -488}, { -414, -795, 73, -206}, +{ -8, -139, 439, 204}, { -176, -578, 23, 131}, { -269, -757, -191, 245}, +{ -109, -338, 112, 316}, { 120, -406, -118, 611}, { -180, -186, -645, 115}, +{ -173, 34, -518, -489}, { -151, 61, -583, -844}, { 220, -138, -681,-1020}, +{ 391, -17, -598, -321}, { 157, -295, 129, 155}, { -926, -875, -987, 285}, +{ 241, -83, -125, -125}, { 620, 597, 432, 92}, { 393, 78, 409, 61}, +{ -393, -739, -413, -748}, { 83, 54, 361, 27}, {-1084, 130, -337, -694}, +{-1565, 297, 318, -19}, {-1873, 36, 51, -317}, {-2323, -246, 231, -84}, +{-2306, -783, 40, -179}, {-2233, -930, -474, -462}, { -754, -86, -288, -626}, +{-2411, -455, -63, 171}, {-1099,-1094, -26, -143}, {-1193, -455, -406, -381}, +{ -605, -210, -96, -51}, { -580, -476, -276, -15}, {-1195, -634,-1203, -881}, +{ -378, -221, -669, -952}, { 594, 178, -403, -676}, { 763, 327, 601, 290}, +{ 172, 300, 203, 157}, { -56, -336, 356, 24}, { -228, -296, -259, -29}, +{ -186, 263, 416, 14}, { -353, 373, -12, -216}, { 257, 96, 174, 57}, +{-1526, -616, -954, -499}, { -497, -152, -333, 125}, { 105, 200, 179, -97}, +{ -331, -224, 765, 697}, { 760, 256, 301, 59}, { 455, -85, 204, 288}, +{ -514, 240, 251, -109}, { 256, 417, -34, -413}, { 101, 430, 384, 156}, +{ -31, -10, 206, 426}, { 589, 145, 143, 71}, { 808, 906, 333, 349}, +{ 986, 938, 589, 331}, { 1300, 824, 187, 509}, { 1062, 653, 379, 466}, +{ 1462, 937, 401, 274}, { 787, 861, 265, 2}, { 609, 553, 28, 305}, +{ 926, 340, 106, 386}, { 241, -267, -147, 225}, { -178, -534, 347, 502}, +{ -643, -381, 397, 30}, { -651, -733, -435, 398}, { -407, -726, -484, -248}, +{ -789, -914, -438, -476}, { -498, -390, 75, -295}, { -964, -590, -606, 150}, +{ -121, -49, -155, -78}, { 935, 550, 389, 38}, { -321, 127, 424, 315}, +{ -285, -113, 283, 259}, { 658, 203, 322, 486}, { 903, 505, 748, 417}, +{ 611, 423, 555, 512}, { 239, -83, -578, -19}, { -339, -731, 349, 13}, +{ -934,-1399, -114, -360}, { 107, 692, 182, 90}, {-1243,-1538,-1551, -725}, +{ -568, -903,-1363, -525}, { -517, -853, -861,-1004}, { -168, -690, -835, 63}, +{ -137, -556, -547, 144}, { -286, -817, 485, 319}, { -147, -408, 526, 246}, +{ -347, -434, 297, -28}, { -290, -471,-1110,-1285}, { -460, -359, -988, -794}, +{ 1347, 1299, 690, 523}, { 1216, 1068, 1094, 757}, { 825, 1140, 752, 494}, +{ 1252, 1365, 1195, 898}, { 521, 1053, 532, 432}, { -334, -216, -313, -263}, +{ -160, 52, -472, -155}, { 127, 136, -380, 44}, { 851, 410, -162, -489}, +{ 123, -255, -796, -667}, { 1090, 917, 789, 493}, { 1397, 1197, 558, 202}, +{ -51, -118, -342, -701}, { 83, 108, -42, -441}, { 61, 95, 287, 256}, +{ -27, 89, 524, 531}, { 351, 227, 592, 545}, { 697, 155, -164, 307}, +{ 638, 274, -489, -50}, { 754, 240, -166, -124}, { -116, -579,-1212, -63}, +{ 190, -295,-1040,-1296}, { 147, -376, -177, -113}, { 841, 1241, 1051, 668}, +{ 2, 293, 551, 304}, {-1096, -953, -248, 376}, { -750, -965, 87, 516}, +{ -275, -516, 689, 391}, { -379, -643, 876, 594}, { -390,-1013, -645, 573}, +{ -107, -568, -689, -826}, {-1025, -27, -328, -203}, { 861, 749, 548, 233}, +{-1660,-1043, 451, 108}, { -660, -620, 430, 236}, { 21, -396,-1158, -631}, +{ 1372, 1298, 967, 577}, { 1125, 1125, 589, 454}, { -323, -865, -467, 153}, +{ -468, -699, -804, -509}, { -392, -718, -204, -35}, { -603,-1093, -567, -162}, +{ -505,-1004, -102, 350}, { 219, 224, 423, 252}, { 395, 591, 608, 363}, +{ -746, -96, 373, 172}, { 171, 295, 714, 339}, { 233, 77, 107, 277}, +{ 157, 153, -499, -356}, { 1547, 1073, 576, 494}, { -292, -339, -504, -592}, +{ -903, -72, -619, -481}, {-1594,-1117, -567, -254}, { -793, -507, -564, -291}, +{ -492, -532, 502, 560}, { -382, 427, 600, 230}, { -227, 477, 251, 75}, +{ 285, 842, 813, 476}, {-1310,-1333, 186, 377}, { -587, -917, 643, 381}, +{-1186, -553, 411, 82}, {-1127, -820, -174, -540}, { -604, 119, 543, 205}, +{ -380, 657, 909, 567}, { 112, -298, -374, 114}, { -857, -251, 56, 159}, +{ 401, 345, -34, -140}, { -111, -607, 41, 614}, { 355, -114, -77, 474}, +{ 578, 56, 1450, 924}, { 1098, 1420, 741, 400}, { 246, 22, 588, 313}, +{ -121, 327, 831, 472}, {-1138, -608, 856, 552}, {-1241,-1072, 638, 600}, +{ -358, 254, -333, -303}, { -646, 739, 358, 74}, { 1226, 1671, 1221, 849}, +{ 2241, 1624, 983, 636}, { 1841, 1477, 749, 384}, { 350, 263, 87, 128}, +{-1902, -941, -144, -64}, {-1734, -255, 288, -31}, {-2644,-1238, 366, 235}, +{-1643,-1092,-1344, -304}, { -541,-1075,-1116, 123}, {-1178, -252, -816, -180}, +{-1016, 533, 565, 233}, { -487, -430, -188, 334}, { 867, 1236, 534, 171}, +{-1590,-1607, 635, 630}, {-2196, 310, 924, 412}, {-2358, -328, 956, 529}, +{-2639, -377, 630, 278}, {-2602, 317, 799, 299}, {-2406, 133, 340, 31}, +{-2156,-1468, 131, 125}, {-1184, -490, -139, 46}, { -744, 447, 891, 564}, +{ 67, -451, 646, 604}, { -553, -429, -876, 396}, { 162, -66, 1305, 915}, +{ 479, 579, 1088, 794}, { 450, 278, 566, 324}, {-1057, -154, 148, -177}, +{-2545, 168, 1070, 592}, {-2351, -42, 819, 345}, {-2344, -707, 721, 250}, +{-2175,-1497, -309, 122}, { -78, -73, 120, 173}, { -4, 262, -263, -261}, +{ -431, -64, -405, -732}, {-2609, 116, -83, -193}, {-1525, -944, -477, -725}, +{ -508, 307, 170, 172}, { 832, 417, 832, 686}, { -225, 177, 894, 818}, +{ -482, -389, 1279, 1039}, { -383, 201, -350, 40}, { 730, 635, 226, 526}, +{ 503, 462, 338, 398}, { 535, 714, 40, -282}, { 1482, 1471, 1085, 731}, +{ 1561, 1072, 909, 693}, { 1419, 1282, 889, 879}, { 1153, 728, 1186, 840}, +{ -226, 1130, 949, 689}, { -494, -986,-1556, -128}, { -568, -721, -713, -26}, +{ 317, 524, 70, 135}, { -405, -865,-1766, -652}, { -174, -801, 885, 773}, +{ -153, -91, 1099, 751}, { -506,-1149, 853, 646}, { 241, 782, 519, 539}, +{ 1853, 1700, 1101, 684}, {-1249,-1486, -464, 188}, { -893,-1409,-1312, -341}, +{ -135, 438, -175, 18}, { 1111, 976, 319, 208}, {-1430,-1768, 83, 458}, +{ -530,-1000, 307, 129}, { -840, -15, -29, -356}, { -911, -924,-1147, -242}, +{ -119, -528, 127, -133}, { -761, -765, 190, -83}, { -315, 895, 522, 231}, +{ -222, 102, -63, -428}, { 316, 699, 379, 70}, { 25, 716, 314, -108}, +{ 507, 874, 566, 238}, { 108, 941, 519, 195}, { 425, -60, -427, 257}, +{ 139, -103, -630, 446}, { 334, 370, 412, 48}, { -172, -690, -283, 557}, +{ 187, -286, 158, 483}, { 140, 270, -344, -631}, { 924, 579, -116, 132}, +{ 142, 466, -68, -64}, { 230, -145, -302, -542}, { -803, -912, 1018, 737}, +{ -773, 1015, 630, 297}, {-2596, 95, 445, 336}, {-2122, 491, 510, 191}, +{-1253, 161, -2, -324}, {-1450, -633, -712, -105}, { -842, -254, -411, 100}, +{ -640, -290, 1010, 763}, { -650, 313, 1169, 730}, { 140, 505, 1030, 766}, +{ 772, 287, 1067, 823}, { 495, 749, 305, 323}, { -164, 462, 78, 399}, +{ -342, -874, 69, 597}, { -16, 620, 621, 337}, { -138, -444, -265, 218}, +{ 84, -450, 953, 666}, { -222, -803, 541, 604}, { -921,-1376, 244, 116}, +{ -841, -723, 630, 588}, { 140, 663, 294, 368}, { 935, 1046, 881, 759}, +{ 1746, 1464, 916, 628}, { 436, 963, 281, 1}, { -119, 74, 542, 213}, +{ 1, -567, 301, 241}, { 260, 435, 222, 396}, { 936, 957, 1108, 703}, +{ 510, 506, 808, 478}, { 601, 694, 960, 620}, { 972, 741, 980, 600}, +{ 834, 717, 767, 684}, { 643, 972, 935, 638}, { 501, 661, 720, 851}, +{ -105, -632, -303, -117}, { -429, 130, 789, 442}, { -522, -188, 704, 373}, +{ -759, 42, 814, 523}, { -531,-1137, 373, 578}, { -682,-1203, -455, 285}, +{-1163,-1577,-1098, 44}, { 81, -82, 712, 363}, { 477, 246, 954, 622}, +{ 1604, 1622, 1277, 891}, { 1409, 859, 924, 892}, { 774, 1041, 947, 1142}, +{ 40, -546, -75, 288}, { -616, -106, -697, -26}, { -169, -160, -891, -739}, +{ -279, -384,-1029, -350}, { 1781, 1308, 1046, 816}, { 1580, 1533, 1472, 1178}, +{ 1505, 1076, 1216, 899}, { 890, 904, 564, 654}, { 920, 692, 1021, 856}, +{ -493, 132, 177, 505}, { 71, 195, -28, 97}, { 456, 351, -164, 88}, +{ 439, 278, -40, 350}, { 1395, 949, 234, -95}, { -805, -472, 38, -163}, +{ 367, -98, 489, 523}, { 1025, 1178, 1212, 906}, { 319, 1314, 814, 461}, +{ -123, -543, -804, 447}, { -748, -324, -897,-1127}, { -737, -501, -789, -713}, +{ 715, 777, 1239, 922}, { 1949, 1939, 1368, 865}, { 730, 880, 758, 388}, +{ -871, 454, 17, -251}, { -381, -810,-1583, 239}, { -521, -966, -792, 259}, +{ -890,-1358, -770, -73}, { 166, 349, -212, 323}, { -840, -301, 473, 435}, +{ -679, -464, 728, 351}, { -156, -199, 667, 432}, { 29, -252, 415, 480}, +{ -731, -379, 145, 559}, { -528, -631,-1158, -159}, { 445, 273, 123, 639}, +{ 373, -126, 800, 568}, { 84, -162, 720, 712}, { -830, -536, -185, 222}, +{ 408, 452, 501, 771}, { -897,-1355, -67, 442}, { -792,-1406, 566, 602}, +{ 167, -326, 509, 330}, { -95, -626, -730, -344}, { 1668, 1217, 779, 455}, +{ 1316, 828, 584, 719}, { 404, -31, 1013, 789}, { 89, 107, 891, 549}, +{ 871, 1581, 917, 671}, { 866, 1479, 1289, 854}, { 391, 1068, 1122, 812}, +{ 78, -562, 345, 563}, { 429, -103, 417, 787}, { -122, -437, 411, 788}, +{ -913, -417, 602, 754}, { -226, -16, 151, 760}, { -700, 118, -104, -14}, +{-1128, 48, 284, 393}, { -390, -419, -639, -116}, { -910, 306, 316, -13}, +{ 1207, 984, 821, 669}, {-1195, -693, 140, -213}, { -884, -416, -199, -558}, +{ -616, 245, -404, -664}, { 262, 56, -617, -724}, { -85, -491, -320, -656}, +{ -570, -831, -129, -528}, {-1506, -63, -367, -385}, { -358, -321, 4, 51}, +{ -366, -214, 319, 511}, { 146, 671, -17, -291}, { -110, 464, -139, -496}, +{ -202, 220, -312, -631}, { -660, -73, -655, -820}, { -662, -653,-1288, -857}, +{ -430, -953, -959, -264}, { -49, -468, -72, -381}, { -350, -563, -193, -407}, +{ 55, -408, -803, 11}, { -309, 649, 188, -198}, { -512, 461, -79, -458}, +{-1318, -263, -134, -523}, {-1657, -435, -495, -765}, { 57, -347, -414, 434}, +{-1141, -242, -664, -857}, { 34, -68, -707, -338} +}; + +static const int16_t lsf_5_1[128][4] = { +{ -451,-1065, -529,-1305}, { -450, -756, -497, -863}, { -384, -619, -413, -669}, +{ -317, -538, -331, -556}, { -414, -508, -424, -378}, { -274, -324, -434, -614}, +{ -226, -500, -232, -514}, { -263, -377, -298, -410}, { -151, -710, -174, -818}, +{ -149, -412, -156, -429}, { -288, -462, -186, -203}, { -170, -302, -191, -321}, +{ -131, -147, -297, -395}, { -228, -214, -245, -192}, { -67, -316, -71, -327}, +{ -104, -205, -94, -183}, { -143, -38, -193, -95}, { 16, -76, -124, -248}, +{ 23, -237, 24, -244}, { 18, -136, 44, -111}, { -33, -24, -25, 0}, +{ 149, 19, 23, -143}, { 158, -169, 174, -181}, { 133, -55, 165, -26}, +{ 111, 84, 98, 75}, { 87, 183, -115, -11}, { -8, 130, 11, 170}, +{ 254, 77, 205, 17}, { 183, 112, 262, 194}, { 202, 287, 95, 189}, +{ -42, -105, 234, 179}, { 39, 186, 163, 345}, { 332, 199, 299, 161}, +{ -54, 285, -78, 281}, { -133, 141, -182, 111}, { 249, 341, 271, 364}, +{ 93, 403, 75, 391}, { 92, 510, -138, 220}, { -185, -29, -34, 361}, +{ -115, 320, 3, 554}, { 99, 286, 218, 591}, { -245, 406, -268, 453}, +{ 0, 580, 25, 606}, { 275, 532, 148, 450}, { -73, 739, -285, 518}, +{ -288, 94, -203, 674}, { -140, -74, 205, 714}, { -114, 299, 176, 923}, +{ 182, 557, 240, 705}, { -16, 513, 485, 593}, { 293, 384, 451, 617}, +{ -38, 50, 563, 529}, { 303, 209, 459, 363}, { 433, 452, 450, 454}, +{ 367, 606, 477, 741}, { 432, 353, 368, 267}, { 361, 716, 273, 583}, +{ 453, 166, 510, 172}, { 201, 629, 274, 191}, { 568, 639, 302, 298}, +{ 634, 387, 643, 350}, { 587, 560, 612, 565}, { 600, 788, 487, 672}, +{ 512, 1015, 321, 333}, { 357, 854, -125, 413}, { 474, 712, 17, -151}, +{ 564, 285, 270, -241}, { 971, 889, 489, 220}, { 510, 896, 549, 924}, +{ 327, 825, 290, 911}, { 540, 1108, 158, 805}, { 199, 957, 511, 730}, +{ 100, 874, 13, 791}, { 435, 632, 676, 972}, { 249, 900, 467, 1218}, +{ 781, 1074, 585, 785}, { -23, 669, 267, 1043}, { 619, 1084, 615, 1145}, +{ 622, 905, 916, 1049}, { 80, 331, 584, 1075}, { 89, 639, 988, 961}, +{ 770, 720, 798, 699}, { 492, 447, 899, 627}, { 271, 1188, 725, 1333}, +{ 87, 603, 832, 1603}, { 616, 1127, 890, 1505}, { 1000, 1156, 866, 1009}, +{ 995, 827, 1149, 858}, { 817, 1450, 773, 1320}, { 500, 1389, 312, 1153}, +{ -20, 1084, 64, 1283}, { 2, 1172, 399, 1869}, { 514, 1706, 502, 1636}, +{ 886, 1522, 416, 600}, { 1131, 1350, 1275, 1390}, { 889, 1795, 914, 1766}, +{ 227, 1183, 1250, 1826}, { 505, 1854, 919, 2353}, { -199, 431, 152, 1735}, +{ -213, -28, 392, 1334}, { -153, -52, 978, 1151}, { -323, -400, 813, 1703}, +{ -136, 84, 1449, 2015}, { -331, -143, -137, 1192}, { -256, 534, -157, 1031}, +{ -307, -439, 542, 731}, { -329, -420, -97, 616}, { -362, -168, -322, 366}, +{ -247, -110, -211, 89}, { -196, -309, 20, 59}, { -364, -463, -286, 89}, +{ -336, 175, -432, 141}, { -379, -190, -434, -196}, { -79, 150, -278, -227}, +{ -280, 166, -555, -422}, { -155, 541, -366, 54}, { -29, -83, -301, -774}, +{ 186, 628, -397, -264}, { 242, 293, -197, -585}, { 124, 410, 53, -133}, +{ 10, 340, -570,-1065}, { 65, -446, 68, -493}, { 383, 937, -357, -711}, +{ -359, -250, -677,-1068}, { 292, -26, 363, 6}, { 607, 1313, -127, -10}, +{ 1513, 1886, 713, 972}, { 1469, 2181, 1443, 2016} +}; + +static const int16_t lsf_5_2[256][4] = { +{-1631,-1600,-1796,-2290}, {-1027,-1770,-1100,-2025}, {-1277,-1388,-1367,-1534}, +{ -947,-1461, -972,-1524}, { -999,-1222,-1020,-1172}, { -815, -987, -992,-1371}, +{-1216,-1006,-1289,-1094}, { -744,-1268, -755,-1293}, { -862, -923, -905, -984}, +{ -678,-1051, -685,-1050}, {-1087, -985,-1062, -679}, { -989, -641,-1127, -976}, +{ -762, -654, -890, -806}, { -833,-1091, -706, -629}, { -621, -806, -640, -812}, +{ -775, -634, -779, -543}, { -996, -565,-1075, -580}, { -546, -611, -572, -619}, +{ -760, -290, -879, -526}, { -823, -462, -795, -253}, { -553, -415, -589, -439}, +{ -533, -340, -692, -935}, { -505, -772, -702,-1131}, { -263, -306, -971, -483}, +{ -445, -74, -555, -548}, { -614, -129, -693, -234}, { -396, -246, -475, -250}, +{ -265, -404, -376, -514}, { -417, -510, -300, -313}, { -334, -664, -463, -814}, +{ -386, -704, -337, -615}, { -234, -201, -233, -239}, { -167, -567, -203, -619}, +{ -147, -415, -115, -352}, { -166, -750, -171, -761}, { -270, -879, -264, -903}, +{ -367, -744, 43, -475}, { 14, -653, 43, -670}, { 11, -448, -59, -521}, +{ -126, -119, -155, -613}, { -42, -863, -27, -931}, { 136, -483, 183, -468}, +{ 55, -298, 55, -304}, { 313, -609, 313, -720}, { 322, -167, 100, -541}, +{ -3, -119, -111, -187}, { 233, -236, 260, -234}, { 26, -165, 134, -45}, +{ -40, -549, 360, -203}, { 378, -388, 450, -383}, { 275, 20, 182, -103}, +{ 246, -111, 431, 37}, { 462, -146, 487, -157}, { -284, -59, 503, -184}, +{ 24, 53, -3, 54}, { 122, 259, 333, 66}, { 484, 104, 436, 68}, +{ 195, 116, 190, 206}, { 269, -9, 482, 352}, { 382, 285, 399, 277}, +{ 452, 256, 69, 186}, { 13, 297, -13, 259}, { -95, 30, 56, 394}, +{ 196, 425, 205, 456}, { 281, 577, 15, 191}, { 375, 290, 407, 576}, +{ -56, 227, 544, 405}, { 0, 549, -92, 528}, { -229, 351, -245, 338}, +{ -362, 435, 167, 527}, { -75, 302, 91, 824}, { 129, 599, 496, 679}, +{ 186, 749, 153, 737}, { -281, 600, -348, 615}, { -236, 769, 41, 881}, +{ 38, 890, -220, 841}, { -357, 883, -393, 903}, { -634, 474, -444, 850}, +{ -175, 678, -493, 242}, { -519, 785, -714, 582}, { -541, 366, -543, 434}, +{ -597, 500, -765, 222}, { -702, 917, -743, 962}, { -869, 501, -899, 548}, +{ -379, 200, -435, 157}, { -819, 214, -861, 157}, { -614, 40, -632, 94}, +{ -883, -54, -741, 516}, { -501, 298, -614, -171}, { -870, -161, -865, -23}, +{ -818, 93,-1015, -267}, { -662, -359, -549, 2}, { -442, -121, -377, 0}, +{ -227, 33, -414, -126}, { -129, 212, -934, 34}, {-1082, -282,-1119, -268}, +{ -710, -825, -420, -191}, {-1076, -928, -917, -93}, { -628, -358, 97, 7}, +{ -206, -393, -101, 24}, { -203, 38, -168, 83}, { -599, -423, -279, 426}, +{ -700, 118, -75, 206}, { -981, -673, -680, 417}, { -367, 37, -279, 474}, +{ -129, -318, 319, 296}, { -626, -39, 343, 602}, { -696, -39, -303, 940}, +{ 104, 233, -380, 137}, { -36, 269, -75, -214}, { 120, 43, -529, -477}, +{ 459, 164, -202, -229}, { -49, -167, 609, 792}, { 98, -220, 915, 148}, +{ 293, 283, 869, 91}, { 575, 394, 326, -78}, { 717, 67, 365, -323}, +{ 616, -36, 731, 27}, { 619, 238, 632, 273}, { 448, 99, 801, 476}, +{ 869, 273, 685, 64}, { 789, 72, 1021, 217}, { 793, 459, 734, 360}, +{ 646, 480, 360, 322}, { 429, 464, 638, 430}, { 756, 363, 1000, 404}, +{ 683, 528, 602, 615}, { 655, 413, 946, 687}, { 937, 602, 904, 604}, +{ 555, 737, 786, 662}, { 467, 654, 362, 589}, { 929, 710, 498, 478}, +{ 415, 420, 693, 883}, { 813, 683, 781, 925}, { 913, 939, 726, 732}, +{ 491, 853, 531, 948}, { 734, 963, 315, 808}, { 761, 755, 1144, 760}, +{ 655, 1076, 826, 1057}, { 1091, 838, 1003, 808}, { 1047, 1133, 659, 1101}, +{ 992, 1050, 1074, 1075}, { 971, 694, 1226, 1054}, { 571, 841, 884, 1404}, +{ 1379, 1096, 1080, 861}, { 1231, 735, 1284, 760}, { 1272, 991, 1367, 1053}, +{ 1257, 700, 1050, 534}, { 988, 453, 1264, 599}, { 1140, 679, 1621, 815}, +{ 1384, 521, 1317, 393}, { 1564, 805, 1448, 686}, { 1068, 648, 875, 307}, +{ 1083, 361, 1047, 317}, { 1417, 964, 675, 571}, { 1152, 79, 1114, -47}, +{ 1530, 311, 1721, 314}, { 1166, 689, 514, -94}, { 349, 282, 1412, 328}, +{ 1025, 487, -65, 57}, { 805, 970, 36, 62}, { 769, -263, 791, -346}, +{ 637, 699, -137, 620}, { 534, 541, -735, 194}, { 711, 300, -268, -863}, +{ 926, 769, -708, -428}, { 506, 174, -892, -630}, { 435, 547,-1435, -258}, +{ 621, 471,-1018,-1368}, { -393, 521, -920, -686}, { -25, 20, -982,-1156}, +{ 340, 9,-1558,-1135}, { -352, 48,-1579, -402}, { -887, 6,-1156, -888}, +{ -548, -352,-1643,-1168}, { -159, 610,-2024, -963}, { -225, 193,-1656,-1960}, +{ -245, -493, -964,-1680}, { -936, -635,-1299,-1744}, {-1388, -604,-1540, -835}, +{-1397, -135,-1588, -290}, {-1670, -712,-2011,-1632}, {-1663, -27,-2258, -811}, +{-1157, 184,-1265, 189}, {-1367, 586,-2011, 201}, { -790, 712,-1210, 3}, +{-1033, 808,-1251, 830}, { -111, 635,-1636, 447}, { -463, -949, -445, -928}, +{ -504,-1162, -501,-1211}, { 144, -351, -372,-1052}, { -283,-1059, -279,-1123}, +{ -575,-1438, -587,-1614}, { -935, -984, 229, 690}, { -921, -719, -403, 1362}, +{ -685, -465, 874, 397}, { -509, -46, 317, 1334}, { -485, 456, 813, 439}, +{ -411, 339, 898, 1067}, { -425, 46, 1441, 497}, { -909, -800, 1465, 1046}, +{ -254, -321, 1430, 1165}, { 68, 350, 1034, 666}, { 370, 11, 1311, 790}, +{ 143, 232, 1041, 1562}, { -114, 663, 1616, 1078}, { 454, 579, 1275, 1040}, +{ -76, 909, 752, 1067}, { 153, 512, 348, 1214}, { 614, 385, 1843, 808}, +{ 269, 1034, 203, 1086}, { 652, 1017, 1783, 1130}, { 429, 1327, 387, 1384}, +{ -49, 1183, -72, 1215}, { -416, 1001, 544, 1749}, { -352, 1223, -502, 1199}, +{ -589, 569, -227, 1630}, { -142, 1578, -230, 1715}, { -714, 1288, -838, 1398}, +{ 1131, 1357, -208, 1232}, { 437, 965, -929, 818}, { 811, 1410, 859, 1507}, +{ 164, 1212, 1387, 1793}, { 484, 1874, 456, 2063}, { 996, 1170, 1326, 1402}, +{ 1316, 1360, 1135, 1262}, { 1234, 1618, 1361, 1768}, { 1421, 1227, 1584, 1347}, +{ 854, 672, 1685, 1566}, { 1139, 1270, 2016, 1825}, { 1773, 1581, 1532, 1460}, +{ 1487, 946, 1659, 1021}, { 1744, 1212, 1392, 977}, { 1772, 1161, 1826, 1164}, +{ 1718, 1429, 1973, 1591}, { 1185, 864, 2132, 1061}, { 1799, 814, 1838, 757}, +{ 2104, 1315, 2054, 1258}, { 2113, 915, 2331, 930}, { 1467, 1147, 2590, 1439}, +{ 2245, 1744, 2090, 1620}, { 2358, 1454, 2666, 1506}, { 1876, 1837, 2070, 1975}, +{ 1739, 1577, 682, 1289}, { 1584, 2045, 1454, 2098}, { 2498, 2004, 2711, 2066}, +{ 726, 1588, 2756, 2336}, { 228, 847, 2456, 1659}, { 36, 301, 1942, 1957}, +{ -446, -96, 2154, 1396}, { 1533, 1101, 14, 608}, { -923, -732, 1383, 1982}, +{ 1345, 952, -680, 321}, { 1281, 1268,-1594, 365}, { 941, 946,-1737, -822}, +{ 2374, 2787, 1821, 2788} +}; + +static const int16_t lsf_5_3[256][4] = { +{-1812,-2275,-1879,-2537}, {-1640,-1848,-1695,-2004}, {-1220,-1912,-1221,-2106}, +{-1559,-1588,-1573,-1556}, {-1195,-1615,-1224,-1727}, {-1359,-1151,-1616,-1948}, +{-1274,-1391,-1305,-1403}, {-1607,-1179,-1676,-1311}, {-1443,-1478,-1367, -898}, +{-1256,-1059,-1331,-1134}, { -982,-1133,-1149,-1504}, {-1080,-1308,-1020,-1183}, +{ -980,-1486, -967,-1495}, { -988, -922,-1047,-1077}, { -838,-1179, -858,-1222}, +{-1131,-1041,-1064, -767}, { -872,-1157, -701, -880}, { -706, -906, -774,-1016}, +{ -578,-1080, -801,-1478}, { -591,-1111, -592,-1146}, { -713,-1388, -640,-1376}, +{ -597,-1059, -416, -903}, { -686, -832, -661, -708}, { -444, -868, -490, -921}, +{ -374, -776, -619,-1170}, { -585, -549, -769, -795}, { -435, -659, -530, -741}, +{ -498, -837, -357, -597}, { -279, -871, -243, -887}, { -282, -665, -280, -667}, +{ -165, -560, -394, -903}, { -362, -410, -448, -583}, { -409, -574, -313, -357}, +{ -637, -548, -570, -436}, { -896, -504, -382, -757}, { -58, -481, -165, -618}, +{ -191, -374, -234, -382}, { -222, -683, -25, -480}, { -418, -359, -730, -353}, +{ -324, -157, -432, -322}, { -394, -303, -284, -104}, { -601, -289, -556, -196}, +{ -588, -150, -659, -608}, { -473, -24, -68, -448}, { -474, -8, -506, -45}, +{ -748, -184, -844, -252}, { -901, -91, -584, -97}, { -652, 138, -764, -131}, +{ -678, -12, -670, 165}, { -259, -3, -840, -107}, { -909, 37, -992, 44}, +{ -854, -415, -839, 13}, {-1001, -271,-1026, -309}, { -798, -478, -832, -488}, +{ -943, 168,-1112, -387}, {-1185, -101,-1183, -40}, { -941, -316,-1030, -770}, +{-1044, -625,-1081, -538}, {-1224, -299,-1312, -436}, {-1197, -663,-1167, -161}, +{-1216, -690,-1237, -831}, {-1432, -720,-1403, -493}, { -898, -740, -922, -801}, +{-1102, -402,-1579, -964}, {-1061, -638,-1269,-1438}, {-1499, -934,-1502, -895}, +{-1598, -564,-1723, -717}, { -606, -597,-1166,-1085}, {-1369, -468,-1946,-1493}, +{-1838, -953,-1932, -931}, {-1499, -188,-1635, -421}, {-1457, -338,-1448, -22}, +{-1942, -422,-2006, -249}, { -496, -114,-1910, -755}, {-1289, 174,-1451, -109}, +{ -482, -257,-1221, -508}, {-1617, 151,-1694, 208}, { -654, 107,-1651, 29}, +{-1141, 279,-1215, 306}, {-1228, -506, -730, -175}, {-1236, -101, -969, 551}, +{ -870, 278, -823, 315}, { -563, 376,-1051, 228}, { -507, 280, -599, 281}, +{ -758, 253, -305, 379}, { -755, -134, -611, 660}, { -824, 536, -817, 646}, +{ -413, 49, -341, 177}, { -453, 526, -482, 589}, { -71, 339, -657, 264}, +{ -244, 295, -237, 315}, { -387, 569, -506, -9}, { -377, 14, -160, 661}, +{ -216, 40, -308, -46}, { 95, 214, -242, 167}, { -86, 192, -56, 27}, +{ -76, 31, 36, 309}, { -106, -182, -113, 74}, { -441, -22, 23, 139}, +{ 81, -11, 44, 15}, { -87, -137, -118, -207}, { -158, -58, 272, -92}, +{ -156, -441, 8, -136}, { 128, -221, 101, -218}, { 40, -197, -76, -456}, +{ 9, -445, 33, -423}, { 226, 60, 73, -222}, { 156, -399, 280, -318}, +{ 245, -341, 166, -499}, { 339, -190, 327, -219}, { 325, -137, -89, -596}, +{ 100, -627, 144, -677}, { 487, 28, 252, -391}, { 214, -41, 282, -28}, +{ 99, -286, 331, 49}, { 459, -388, 565, -369}, { 436, 28, 336, -9}, +{ 397, -167, 618, 34}, { 596, -17, 561, -140}, { 299, 79, 522, 125}, +{ 203, 2, 244, 288}, { 255, 211, 175, 82}, { 596, 187, 517, 108}, +{ 381, 255, 365, 297}, { 497, 352, 327, -82}, { 25, 210, 371, 245}, +{ 261, 3, 545, 449}, { 140, 294, 44, 295}, { 212, 347, 244, 494}, +{ 331, 528, 201, 307}, { 349, 411, 613, 284}, { 614, 413, 464, 322}, +{ 624, 397, 97, 200}, { -160, 384, 149, 362}, { 495, 525, 269, 585}, +{ 33, 491, -121, 433}, { 427, 611, 498, 516}, { 171, 443, 497, 666}, +{ 440, 275, 566, 575}, { 146, 639, 155, 670}, { -33, 173, 212, 696}, +{ -166, 601, -191, 695}, { -489, 503, 175, 742}, { 214, 476, 372, 1083}, +{ 578, 530, 586, 777}, { 425, 874, 315, 841}, { 374, 848, -165, 565}, +{ 35, 991, -39, 1062}, { 329, 712, 786, 840}, { 645, 795, 661, 676}, +{ 571, 918, 632, 1079}, { 673, 817, 318, 388}, { 874, 1012, 564, 848}, +{ 880, 620, 557, 479}, { 671, 453, 692, 468}, { 840, 642, 844, 645}, +{ 506, 428, 897, 567}, { 837, 387, 962, 499}, { 691, 561, 939, 926}, +{ 783, 296, 790, 268}, { 1028, 530, 874, 329}, { 548, 143, 675, 291}, +{ 503, 66, 1041, 359}, { 786, 97, 805, 33}, { 837, 470, 511, 49}, +{ 1092, 327, 1174, 323}, { 3, 242, 872, 474}, { 689, 429, 1329, 678}, +{ 1042, 620, 1109, 664}, { 321, 193, 889, 950}, { 1153, 874, 893, 635}, +{ 877, 862, 948, 913}, { 1293, 665, 1320, 639}, { 997, 793, 1402, 1030}, +{ 1176, 1012, 1110, 959}, { 1410, 925, 1403, 915}, { 543, 862, 1116, 1222}, +{ 835, 1190, 835, 1190}, { 959, 1148, 1147, 1376}, { 1300, 1193, 1415, 1231}, +{ 1335, 1341, 746, 1092}, { 1711, 1283, 1389, 1073}, { 1334, 1566, 1153, 1475}, +{ 1645, 1137, 1825, 1220}, { 1056, 1382, 1521, 1730}, { 1632, 1545, 1620, 1542}, +{ 855, 1596, 865, 1667}, { 693, 885, 1716, 1519}, { 1167, 1296, 2209, 1760}, +{ 1952, 1493, 2020, 1482}, { 1534, 1866, 1694, 2008}, { 1566, 748, 1761, 825}, +{ 294, 1392, 1084, 2058}, { 621, 1315, 365, 1287}, { 198, 1028, 488, 1408}, +{ 249, 403, 1014, 1561}, { 324, 363, 1645, 1044}, { 193, 367, 2034, 1859}, +{ -251, 579, 750, 994}, { -243, 30, 1325, 879}, { -28, -169, 624, 917}, +{ -453, 159, 186, 1370}, { -614, 6, 537, 392}, { -94, -291, 781, 229}, +{ -128, -298, 245, 491}, { -701, -648, 972, 789}, { -501, -640, 178, 255}, +{ -365, -390, -255, 317}, { -958, -294, -191, 228}, { -775, -447, 157, -237}, +{ -657, -720, -407, 92}, { -117, -611, 334, -230}, { -679,-1084, -144, -317}, +{ -901, -861, -738, -360}, { -85, -727, -90, -787}, { 100, -22, -391, -263}, +{ -56, -73, -337, -754}, { 5, -189, -706, -624}, { 89, -344, -135,-1113}, +{ -353, -237, -684,-1135}, { -275,-1102, -269,-1203}, { 152, 145, -722,-1232}, +{ 49, 80,-1248, -776}, { -248, 391, -732, -547}, { 469, 218, -255, -864}, +{ 69, 366, -166, -485}, { -688, 191,-1212,-1196}, { -170, -169,-1308,-1631}, +{ 321, 470,-1419,-1243}, { -64, 272,-1361, -248}, { 492, 565, -721, -609}, +{ 195, 485, -573, -133}, { 427, 202, -171, -118}, { 199, 575, 2, -31}, +{ 694, 755,-1366, -39}, { 552, 557, -489, 271}, { 680, 537, 13, -453}, +{ 855, 954, -133, -52}, { -81, 738,-1169, 637}, { 1055, 1059, -95, 676}, +{ 1259, 1081, 489, 305}, { -449, 954, -534, 996}, { -969, 866,-1058, 1059}, +{-1294, 618,-1416, 617}, { -458, 1366, -159, 1821}, { -774, -528, -14, 1110}, +{-1202, -901, -772, 433}, {-1256,-1255,-1011, -302}, { -602, -585, -759,-1618}, +{ -760,-1549, -840,-1921}, { -816, -539,-1769,-2235}, { -227, -36,-2034,-1831}, +{-2107,-1126,-2471,-1816}, {-1470, 252,-2701, -415}, { -571, -467, 1509, 1554}, +{ 2180, 1975, 2326, 2020} +}; + +static const int16_t lsf_5_4[256][4] = { +{-1857,-1681,-1857,-1755}, {-2056,-1150,-2134,-1654}, {-1619,-1099,-1704,-1131}, +{-1345,-1608,-1359,-1638}, {-1338,-1293,-1325,-1265}, {-1664,-1649,-1487, -851}, +{-1346,-1832,-1413,-2188}, {-1282, -681,-1785,-1649}, { -966,-1082,-1183,-1676}, +{-1054,-1073,-1142,-1158}, {-1207, -744,-1274, -997}, { -934,-1383, -927,-1416}, +{-1010,-1305, -783, -955}, {-1049, -900, -993, -817}, { -737, -823, -972,-1189}, +{ -738,-1094, -738,-1154}, { -784, -801, -810, -786}, { -892, -520,-1000, -818}, +{ -644, -965, -577, -882}, { -541, -694, -671, -917}, { -595, -642, -646, -615}, +{ -956, -621, -925, -515}, { -727, -483, -815, -485}, { -840, -578, -440, -713}, +{ -578, -325, -657, -670}, { -386, -570, -441, -666}, { -514, -787, -392, -529}, +{ -522, -453, -487, -423}, { -616, -585, -617, -157}, { -662, -268, -680, -348}, +{ -322, -323, -632, -444}, { -304, -430, -332, -458}, { -277, -468, -659, -793}, +{ -319, -636, -227, -554}, { -373, -347, -334, -210}, { -456, -192, -530, -242}, +{ -216, -198, -366, -370}, { -338, -161, -409, -748}, { -107, -380, -294, -643}, +{ -223, -665, -234, -741}, { -141, -496, -130, -510}, { -139, -327, -172, -305}, +{ -306, -580, -164, -263}, { -262, -172, -67, -402}, { 31, -366, -10, -436}, +{ -86, -527, 71, -377}, { -22, -609, -12, -678}, { -67, -319, 63, -191}, +{ 35, -181, -39, -242}, { 126, -167, -140, -544}, { 155, -297, 174, -297}, +{ 38, -8, 117, -380}, { 197, -452, 240, -522}, { 223, -103, 110, -187}, +{ 87, -155, 169, -47}, { 157, 26, -83, -100}, { 128, 80, 209, -62}, +{ 6, 7, 22, 5}, { 318, -20, 248, -45}, { -200, -63, 156, -69}, +{ 250, -183, 369, -126}, { -113, -76, -142, -122}, { -64, -254, -31, 35}, +{ -177, -71, -7, 171}, { 93, 27, 108, 212}, { -330, -209, -123, -70}, +{ -279, 95, -96, 20}, { -188, -61, -314, 87}, { -300, -78, -354, -134}, +{ 11, 122, -140, 122}, { -275, 152, -293, 140}, { -82, 138, -321, -111}, +{ -480, -156, -359, 76}, { -254, -40, -635, -96}, { -522, 79, -507, 8}, +{ -268, 303, -539, 68}, { -446, 61, -522, 306}, { 111, 189, -435, 122}, +{ -379, 166, -571, -398}, { -632, -74, -747, -95}, { -455, 194, -952, 83}, +{ -798, 192, -755, 192}, { -781, -162, -619, 234}, { -663, -297, -488, -109}, +{ -964, -132, -838, -68}, { -843, 58,-1112, -86}, { -805, -299, -944, -253}, +{ -778, -50, -965, -549}, { -352, -98, -992, -343}, {-1117, -315,-1117, -307}, +{-1155, -374, -637, -230}, {-1166, -43,-1299, -100}, { -925, -393,-1274, -600}, +{ -689, -130,-1479, -312}, {-1321, -254,-1464, -442}, {-1292, -613,-1261, -503}, +{-1501, -368,-1322, 26}, {-1432, -66,-1743, -161}, {-1644, -467,-1760, -548}, +{-1393, -568,-1556, -871}, {-1495,-1034,-1387, -571}, {-1917, -528,-1783, -123}, +{-1897, -231,-2054, -323}, {-2052, -906,-1976, -567}, {-1917, -620,-2047, -989}, +{-1077, -370,-2031, -704}, {-2355, -749,-2740,-1089}, {-1909, 159,-2012, 248}, +{ -626, -123,-2339, -962}, { -669, -408,-1379,-1174}, { -452, -364,-1044, -735}, +{ -132, 183,-1620, -752}, { -547, -307, -777,-1261}, { -98, 41, -880,-1091}, +{ -257, 97,-1602,-1833}, { 31, -26, -644, -561}, { -180, -546, -385,-1095}, +{ -410, -802, -414, -827}, { -457, -970, -490,-1109}, { -215, -916, -144, -937}, +{ -493,-1269, -517,-1507}, { 181, 101, -332, -889}, { -836, -937, -559, -429}, +{ -629, -547, -183, -337}, { -545, -82, -250, -286}, { 5, -132, -348, -252}, +{ -293, -472, -158, 100}, { -29, 197, -236, -424}, { -861, -213, -140, -7}, +{ -427, -443, 187, -97}, { -684, -736, -293, 258}, { -368, -152, -150, 392}, +{ -609, 175, -142, 299}, { -138, 152, -119, 329}, { -486, -52, 293, 198}, +{ -183, 117, 175, 331}, { -58, -274, 231, 300}, { -288, 330, -305, 372}, +{ -111, 409, -9, 423}, { 83, 256, 67, 367}, { -19, 248, 91, 113}, +{ -35, 406, -191, 154}, { 238, 296, 5, 197}, { 141, 221, 313, 198}, +{ 211, 421, 244, 334}, { 88, 426, -243, 454}, { 202, 552, -5, 403}, +{ 291, 185, 219, 301}, { 251, 138, 128, 69}, { 197, 288, -140, -61}, +{ 188, 361, 197, 598}, { 442, 273, 290, 143}, { 472, 482, 157, 370}, +{ 415, 321, 372, 385}, { 402, 552, 155, 24}, { 550, 263, -11, 21}, +{ 360, 227, 147, -254}, { 424, 97, 366, -13}, { 375, 141, 449, 232}, +{ 396, 507, 474, 272}, { 701, 324, 362, -47}, { 587, 148, 543, 69}, +{ 400, -51, 561, 59}, { 220, -10, 352, 147}, { 206, 211, 653, 185}, +{ 563, 297, 565, 284}, { 594, 121, 766, 192}, { 398, 118, 642, 434}, +{ 233, 264, 481, 467}, { 129, -165, 699, 239}, { 90, 26, 342, 474}, +{ -55, 27, 388, 94}, { -172, 0, 725, 379}, { -60, 337, 370, 465}, +{ 95, 319, 806, 595}, { 78, 260, 497, 851}, { 210, 560, 458, 574}, +{ -464, 202, 497, 625}, { -202, 152, 48, 712}, { -20, 566, 100, 715}, +{ 455, 468, 411, 605}, { 319, 646, 195, 615}, { 401, 538, 680, 739}, +{ 201, 667, 434, 954}, { 454, 425, 646, 491}, { 606, 681, 416, 508}, +{ 497, 822, 426, 815}, { 660, 647, 628, 716}, { 697, 466, 618, 457}, +{ 685, 460, 365, 309}, { 721, 567, 836, 601}, { 609, 300, 825, 459}, +{ 943, 687, 681, 533}, { 915, 598, 591, 243}, { 876, 451, 874, 420}, +{ 786, 317, 732, 220}, { 922, 317, 1108, 367}, { 531, 466, 1028, 649}, +{ 1053, 615, 1034, 553}, { 829, 602, 1021, 799}, { 927, 803, 878, 763}, +{ 799, 496, 1373, 773}, { 585, 770, 803, 930}, { 1099, 793, 1222, 862}, +{ 1209, 895, 1025, 727}, { 772, 845, 1172, 1115}, { 867, 1021, 830, 1013}, +{ 841, 910, 506, 703}, { 1239, 1077, 620, 819}, { 1196, 1083, 1155, 1081}, +{ 1142, 907, 1547, 1121}, { 1309, 648, 1343, 612}, { 1484, 988, 1479, 937}, +{ 985, 1328, 955, 1341}, { 429, 910, 841, 1338}, { 564, 1179, 412, 1156}, +{ 1427, 1320, 1434, 1330}, { 640, 760, 1726, 1410}, { 190, 555, 1073, 1005}, +{ 426, 257, 839, 980}, { 235, 231, 1520, 1167}, { 109, 293, 1014, 1569}, +{ 305, 142, 1148, 539}, { -291, -108, 1213, 972}, { 22, -216, 667, 828}, +{ -482, 438, 453, 1431}, { -581, -422, 789, 387}, { -358, -454, 174, 780}, +{ -36, -372, 390, -134}, { -629, 160, -306, 751}, {-1258, -331, 177, 522}, +{ -248, 574, -251, 639}, { -531, 407, -596, 394}, { -419, 789, -617, 801}, +{ -986, 399, -857, 727}, { -7, 518, -703, 310}, {-1143, -24,-1002, 287}, +{ -960, 363,-1299, 312}, {-1534, 245,-1557, 305}, { 28, 153, -859, -175}, +{ -33, 332,-1398, -154}, { 212, 410, -593, -197}, {-1092, -704, -904, -65}, +{ 282, 367, -918, -686}, { 345, 93, -258, -357}, { 696, 644, -693, -28}, +{ 448, 493, -273, 193}, { 527, 546, -243, -513}, { 384, -136, 273, -353}, +{ 512, -142, 537, -198}, { 941, 750, 83, 248}, { 578, 861, -56, 592}, +{ 842, 44, 892, 24}, { 33, 890, -16, 982}, { 831, 1398, 1535, 1898}, +{ 1716, 1376, 1948, 1465} +}; + +static const int16_t lsf_5_5[64][4] = { +{-1002, -929,-1096,-1203}, { -641, -931, -604, -961}, { -779, -673, -835, -788}, +{ -416, -664, -458, -766}, { -652, -521, -662, -495}, {-1023, -509,-1023, -428}, +{ -444, -552, -368, -449}, { -479, -211,-1054, -903}, { -316, -249, -569, -591}, +{ -569, -275, -541, -191}, { -716, -188, -842, -264}, { -333, -248, -318, -228}, +{ -275, 1, -567, -228}, { -115, -221, -238, -374}, { -197, -507, -222, -579}, +{ -258, -432, -61, -244}, { -345, 2, -338, 39}, { -215, -169, -58, 0}, +{ -56, -6, -203, -131}, { 1, -186, -5, -211}, { 6, -380, 11, -418}, +{ -116, 131, -134, 113}, { 89, -4, 71, -2}, { -19, -192, 262, 24}, +{ 189, 151, -133, -109}, { 186, -153, 166, -219}, { 37, 139, 193, 171}, +{ 337, 124, 158, -61}, { 141, 226, -13, 190}, { 231, 34, 354, 109}, +{ 316, 201, 244, 164}, { 330, -85, 390, -84}, { 254, 327, 257, 335}, +{ 491, 147, 476, 105}, { 54, 77, 437, 370}, { 421, 314, 449, 342}, +{ 329, 126, 673, 292}, { 571, 388, 243, 193}, { 653, 320, 621, 280}, +{ 194, 380, 517, 581}, { 45, 323, 111, 422}, { 489, 395, 734, 534}, +{ 622, 546, 486, 502}, { 318, 572, 189, 550}, { 385, 422, -157, 153}, +{ -125, 382, -197, 386}, { -263, 334, 228, 697}, { -188, 1, 51, 297}, +{ -507, 213, -376, 397}, { -24, 255, -547, 89}, { -502, -94, 387, 179}, +{ -620, 68, -684, 112}, { -642, -350, -260, 172}, { -438, -324, 264, 648}, +{ -964, -4,-1121, 7}, { -134, 134,-1133, -306}, { 143, 96, -420, -497}, +{-1221, -350,-1527, -685}, { -161, 72, 873, 691}, { 732, 283, 921, 353}, +{ 334, 475, 1095, 821}, { 864, 524, 843, 497}, { 714, 711, 788, 750}, +{ 1076, 714, 1204, 753} +}; + +static const float lsf_3_mean[LP_FILTER_ORDER] = { + 377.441, 554.688, 922.363, 1339.84, 1702.15, + 2046.390, 2452.880, 2741.460, 3116.70, 3348.14 +}; + +static const float lsf_5_mean[LP_FILTER_ORDER] = { + 337.891, 507.080, 834.961, 1247.07, 1646.00, + 1982.910, 2407.960, 2708.010, 3104.00, 3344.97 +}; + +/** Prediction factor table for modes other than 12.2kbit/s */ +static const float pred_fac[LP_FILTER_ORDER] = { + 0.291626, 0.328644, 0.383636, 0.405640, 0.438873, + 0.355560, 0.323120, 0.298065, 0.262238, 0.197876, +}; + +// fixed tables + +/** + * number of pulses per mode + */ +static const uint8_t pulses_nb_per_mode[] = {2, 2, 2, 3, 4, 4, 8, 10}; + +/** track start positions for algebraic code book routines */ +static const uint8_t track_position[16] = { + 0, 2, 0, 3, 0, 2, 0, 3, 1, 3, 2, 4, 1, 4, 1, 4 +}; + +/** 3-bit Gray code to binary lookup table */ +static const uint8_t gray_decode[8] = { 0, 5, 15, 10, 25, 30, 20, 35 }; + + +// gain tables + +/** scalar quantized pitch gain table for 7.95 and 12.2 kbps modes */ +static const uint16_t qua_gain_pit[16] = { + 0, 3277, 6556, 8192, 9830, 11469, 12288, 13107, + 13926, 14746, 15565, 16384, 17203, 18022, 18842, 19661 +}; + +/** scalar quantized fixed gain table for 7.95 and 12.2 kbps modes */ +static const uint16_t qua_gain_code[32] = { + 159, 206, 268, 349, 419, 482, 554, 637, + 733, 842, 969, 1114, 1281, 1473, 1694, 1948, + 2241, 2577, 2963, 3408, 3919, 4507, 5183, 5960, + 6855, 7883, 9065, 10425, 12510, 16263, 21142, 27485 +}; + +/** desired mean innovation energy, indexed by active mode */ +static const float energy_mean[8] = { + 33.0, 33.0, 33.0, 28.75, 30.0, 36.0, 33.0, 36.0 +}; + +/** 4-tap moving average prediction coefficients in reverse order */ +static const float energy_pred_fac[4] = { 0.19, 0.34, 0.58, 0.68 }; + +/** gain table for 4.75 kbps mode + * + * first index has even/odd indexes for subframes 0,2/1,3 + * second index is {pitch_gain, fixed_gain_factor} */ +static const uint16_t gains_MODE_4k75[512][2] = { +{ 812, 128}, { 542, 140}, { 2873, 1135}, { 2266, 3402}, { 2067, 563}, +{12677, 647}, { 4132, 1798}, { 5601, 5285}, { 7689, 374}, { 3735, 441}, +{10912, 2638}, {11807, 2494}, {20490, 797}, { 5218, 675}, { 6724, 8354}, +{ 5282, 1696}, { 1488, 428}, { 5882, 452}, { 5332, 4072}, { 3583, 1268}, +{ 2469, 901}, {15894, 1005}, {14982, 3271}, {10331, 4858}, { 3635, 2021}, +{ 2596, 835}, {12360, 4892}, {12206, 1704}, {13432, 1604}, { 9118, 2341}, +{ 3968, 1538}, { 5479, 9936}, { 3795, 417}, { 1359, 414}, { 3640, 1569}, +{ 7995, 3541}, {11405, 645}, { 8552, 635}, { 4056, 1377}, {16608, 6124}, +{11420, 700}, { 2007, 607}, {12415, 1578}, {11119, 4654}, {13680, 1708}, +{11990, 1229}, { 7996, 7297}, {13231, 5715}, { 2428, 1159}, { 2073, 1941}, +{ 6218, 6121}, { 3546, 1804}, { 8925, 1802}, { 8679, 1580}, {13935, 3576}, +{13313, 6237}, { 6142, 1130}, { 5994, 1734}, {14141, 4662}, {11271, 3321}, +{12226, 1551}, {13931, 3015}, { 5081,10464}, { 9444, 6706}, { 1689, 683}, +{ 1436, 1306}, { 7212, 3933}, { 4082, 2713}, { 7793, 704}, {15070, 802}, +{ 6299, 5212}, { 4337, 5357}, { 6676, 541}, { 6062, 626}, {13651, 3700}, +{11498, 2408}, {16156, 716}, {12177, 751}, { 8065,11489}, { 6314, 2256}, +{ 4466, 496}, { 7293, 523}, {10213, 3833}, { 8394, 3037}, { 8403, 966}, +{14228, 1880}, { 8703, 5409}, {16395, 4863}, { 7420, 1979}, { 6089, 1230}, +{ 9371, 4398}, {14558, 3363}, {13559, 2873}, {13163, 1465}, { 5534, 1678}, +{13138,14771}, { 7338, 600}, { 1318, 548}, { 4252, 3539}, {10044, 2364}, +{10587, 622}, {13088, 669}, {14126, 3526}, { 5039, 9784}, {15338, 619}, +{ 3115, 590}, {16442, 3013}, {15542, 4168}, {15537, 1611}, {15405, 1228}, +{16023, 9299}, { 7534, 4976}, { 1990, 1213}, {11447, 1157}, {12512, 5519}, +{ 9475, 2644}, { 7716, 2034}, {13280, 2239}, {16011, 5093}, { 8066, 6761}, +{10083, 1413}, { 5002, 2347}, {12523, 5975}, {15126, 2899}, {18264, 2289}, +{15827, 2527}, {16265,10254}, {14651,11319}, { 1797, 337}, { 3115, 397}, +{ 3510, 2928}, { 4592, 2670}, { 7519, 628}, {11415, 656}, { 5946, 2435}, +{ 6544, 7367}, { 8238, 829}, { 4000, 863}, {10032, 2492}, {16057, 3551}, +{18204, 1054}, { 6103, 1454}, { 5884, 7900}, {18752, 3468}, { 1864, 544}, +{ 9198, 683}, {11623, 4160}, { 4594, 1644}, { 3158, 1157}, {15953, 2560}, +{12349, 3733}, {17420, 5260}, { 6106, 2004}, { 2917, 1742}, {16467, 5257}, +{16787, 1680}, {17205, 1759}, { 4773, 3231}, { 7386, 6035}, {14342,10012}, +{ 4035, 442}, { 4194, 458}, { 9214, 2242}, { 7427, 4217}, {12860, 801}, +{11186, 825}, {12648, 2084}, {12956, 6554}, { 9505, 996}, { 6629, 985}, +{10537, 2502}, {15289, 5006}, {12602, 2055}, {15484, 1653}, {16194, 6921}, +{14231, 5790}, { 2626, 828}, { 5615, 1686}, {13663, 5778}, { 3668, 1554}, +{11313, 2633}, { 9770, 1459}, {14003, 4733}, {15897, 6291}, { 6278, 1870}, +{ 7910, 2285}, {16978, 4571}, {16576, 3849}, {15248, 2311}, {16023, 3244}, +{14459,17808}, {11847, 2763}, { 1981, 1407}, { 1400, 876}, { 4335, 3547}, +{ 4391, 4210}, { 5405, 680}, {17461, 781}, { 6501, 5118}, { 8091, 7677}, +{ 7355, 794}, { 8333, 1182}, {15041, 3160}, {14928, 3039}, {20421, 880}, +{14545, 852}, {12337,14708}, { 6904, 1920}, { 4225, 933}, { 8218, 1087}, +{10659, 4084}, {10082, 4533}, { 2735, 840}, {20657, 1081}, {16711, 5966}, +{15873, 4578}, {10871, 2574}, { 3773, 1166}, {14519, 4044}, {20699, 2627}, +{15219, 2734}, {15274, 2186}, { 6257, 3226}, {13125,19480}, { 7196, 930}, +{ 2462, 1618}, { 4515, 3092}, {13852, 4277}, {10460, 833}, {17339, 810}, +{16891, 2289}, {15546, 8217}, {13603, 1684}, { 3197, 1834}, {15948, 2820}, +{15812, 5327}, {17006, 2438}, {16788, 1326}, {15671, 8156}, {11726, 8556}, +{ 3762, 2053}, { 9563, 1317}, {13561, 6790}, {12227, 1936}, { 8180, 3550}, +{13287, 1778}, {16299, 6599}, {16291, 7758}, { 8521, 2551}, { 7225, 2645}, +{18269, 7489}, {16885, 2248}, {17882, 2884}, {17265, 3328}, { 9417,20162}, +{11042, 8320}, { 1286, 620}, { 1431, 583}, { 5993, 2289}, { 3978, 3626}, +{ 5144, 752}, {13409, 830}, { 5553, 2860}, {11764, 5908}, {10737, 560}, +{ 5446, 564}, {13321, 3008}, {11946, 3683}, {19887, 798}, { 9825, 728}, +{13663, 8748}, { 7391, 3053}, { 2515, 778}, { 6050, 833}, { 6469, 5074}, +{ 8305, 2463}, { 6141, 1865}, {15308, 1262}, {14408, 4547}, {13663, 4515}, +{ 3137, 2983}, { 2479, 1259}, {15088, 4647}, {15382, 2607}, {14492, 2392}, +{12462, 2537}, { 7539, 2949}, {12909,12060}, { 5468, 684}, { 3141, 722}, +{ 5081, 1274}, {12732, 4200}, {15302, 681}, { 7819, 592}, { 6534, 2021}, +{16478, 8737}, {13364, 882}, { 5397, 899}, {14656, 2178}, {14741, 4227}, +{14270, 1298}, {13929, 2029}, {15477, 7482}, {15815, 4572}, { 2521, 2013}, +{ 5062, 1804}, { 5159, 6582}, { 7130, 3597}, {10920, 1611}, {11729, 1708}, +{16903, 3455}, {16268, 6640}, { 9306, 1007}, { 9369, 2106}, {19182, 5037}, +{12441, 4269}, {15919, 1332}, {15357, 3512}, {11898,14141}, {16101, 6854}, +{ 2010, 737}, { 3779, 861}, {11454, 2880}, { 3564, 3540}, { 9057, 1241}, +{12391, 896}, { 8546, 4629}, {11561, 5776}, { 8129, 589}, { 8218, 588}, +{18728, 3755}, {12973, 3149}, {15729, 758}, {16634, 754}, {15222,11138}, +{15871, 2208}, { 4673, 610}, {10218, 678}, {15257, 4146}, { 5729, 3327}, +{ 8377, 1670}, {19862, 2321}, {15450, 5511}, {14054, 5481}, { 5728, 2888}, +{ 7580, 1346}, {14384, 5325}, {16236, 3950}, {15118, 3744}, {15306, 1435}, +{14597, 4070}, {12301,15696}, { 7617, 1699}, { 2170, 884}, { 4459, 4567}, +{18094, 3306}, {12742, 815}, {14926, 907}, {15016, 4281}, {15518, 8368}, +{17994, 1087}, { 2358, 865}, {16281, 3787}, {15679, 4596}, {16356, 1534}, +{16584, 2210}, {16833, 9697}, {15929, 4513}, { 3277, 1085}, { 9643, 2187}, +{11973, 6068}, { 9199, 4462}, { 8955, 1629}, {10289, 3062}, {16481, 5155}, +{15466, 7066}, {13678, 2543}, { 5273, 2277}, {16746, 6213}, {16655, 3408}, +{20304, 3363}, {18688, 1985}, {14172,12867}, {15154,15703}, { 4473, 1020}, +{ 1681, 886}, { 4311, 4301}, { 8952, 3657}, { 5893, 1147}, {11647, 1452}, +{15886, 2227}, { 4582, 6644}, { 6929, 1205}, { 6220, 799}, {12415, 3409}, +{15968, 3877}, {19859, 2109}, { 9689, 2141}, {14742, 8830}, {14480, 2599}, +{ 1817, 1238}, { 7771, 813}, {19079, 4410}, { 5554, 2064}, { 3687, 2844}, +{17435, 2256}, {16697, 4486}, {16199, 5388}, { 8028, 2763}, { 3405, 2119}, +{17426, 5477}, {13698, 2786}, {19879, 2720}, { 9098, 3880}, {18172, 4833}, +{17336,12207}, { 5116, 996}, { 4935, 988}, { 9888, 3081}, { 6014, 5371}, +{15881, 1667}, { 8405, 1183}, {15087, 2366}, {19777, 7002}, {11963, 1562}, +{ 7279, 1128}, {16859, 1532}, {15762, 5381}, {14708, 2065}, {20105, 2155}, +{17158, 8245}, {17911, 6318}, { 5467, 1504}, { 4100, 2574}, {17421, 6810}, +{ 5673, 2888}, {16636, 3382}, { 8975, 1831}, {20159, 4737}, {19550, 7294}, +{ 6658, 2781}, {11472, 3321}, {19397, 5054}, {18878, 4722}, {16439, 2373}, +{20430, 4386}, {11353,26526}, {11593, 3068}, { 2866, 1566}, { 5108, 1070}, +{ 9614, 4915}, { 4939, 3536}, { 7541, 878}, {20717, 851}, { 6938, 4395}, +{16799, 7733}, {10137, 1019}, { 9845, 964}, {15494, 3955}, {15459, 3430}, +{18863, 982}, {20120, 963}, {16876,12887}, {14334, 4200}, { 6599, 1220}, +{ 9222, 814}, {16942, 5134}, { 5661, 4898}, { 5488, 1798}, {20258, 3962}, +{17005, 6178}, {17929, 5929}, { 9365, 3420}, { 7474, 1971}, {19537, 5177}, +{19003, 3006}, {16454, 3788}, {16070, 2367}, { 8664, 2743}, { 9445,26358}, +{10856, 1287}, { 3555, 1009}, { 5606, 3622}, {19453, 5512}, {12453, 797}, +{20634, 911}, {15427, 3066}, {17037,10275}, {18883, 2633}, { 3913, 1268}, +{19519, 3371}, {18052, 5230}, {19291, 1678}, {19508, 3172}, {18072,10754}, +{16625, 6845}, { 3134, 2298}, {10869, 2437}, {15580, 6913}, {12597, 3381}, +{11116, 3297}, {16762, 2424}, {18853, 6715}, {17171, 9887}, {12743, 2605}, +{ 8937, 3140}, {19033, 7764}, {18347, 3880}, {20475, 3682}, {19602, 3380}, +{13044,19373}, {10526,23124} +}; + +/** gain table for 6.70, 7.40 and 10.2 kbps modes + * + * second index is {pitch_gain, fixed_gain_factor} */ +static const uint16_t gains_high[128][2] = { +{ 577, 662}, { 806, 1836}, { 3109, 1052}, { 4181, 1387}, { 2373, 1425}, +{ 3248, 1985}, { 1827, 2320}, { 941, 3314}, { 2351, 2977}, { 3616, 2420}, +{ 3451, 3096}, { 2955, 4301}, { 1848, 4500}, { 3884, 5416}, { 1187, 7210}, +{ 3083, 9000}, { 7384, 883}, { 5962, 1506}, { 5155, 2134}, { 7944, 2009}, +{ 6507, 2250}, { 7670, 2752}, { 5952, 3016}, { 4898, 3764}, { 6989, 3588}, +{ 8174, 3978}, { 6064, 4404}, { 7709, 5087}, { 5523, 6021}, { 7769, 7126}, +{ 6060, 7938}, { 5594,11487}, {10581, 1356}, { 9049, 1597}, { 9794, 2035}, +{ 8946, 2415}, {10296, 2584}, { 9407, 2734}, { 8700, 3218}, { 9757, 3395}, +{10177, 3892}, { 9170, 4528}, {10152, 5004}, { 9114, 5735}, {10500, 6266}, +{10110, 7631}, { 8844, 8727}, { 8956,12496}, {12924, 976}, {11435, 1755}, +{12138, 2328}, {11388, 2368}, {10700, 3064}, {12332, 2861}, {11722, 3327}, +{11270, 3700}, {10861, 4413}, {12082, 4533}, {11283, 5205}, {11960, 6305}, +{11167, 7534}, {12128, 8329}, {10969,10777}, {10300,17376}, {13899, 1681}, +{12580, 2045}, {13265, 2439}, {14033, 2989}, {13452, 3098}, {12396, 3658}, +{13510, 3780}, {12880, 4272}, {13533, 4861}, {12667, 5457}, {13854, 6106}, +{13031, 6483}, {13557, 7721}, {12957, 9311}, {13714,11551}, {12591,15206}, +{15113, 1540}, {15072, 2333}, {14527, 2511}, {14692, 3199}, {15382, 3560}, +{14133, 3960}, {15102, 4236}, {14332, 4824}, {14846, 5451}, {15306, 6083}, +{14329, 6888}, {15060, 7689}, {14406, 9426}, {15387, 9741}, {14824,14271}, +{13600,24939}, {16396, 1969}, {16817, 2832}, {15713, 2843}, {16104, 3336}, +{16384, 3963}, {16940, 4579}, {15711, 4599}, {16222, 5448}, {16832, 6382}, +{15745, 7141}, {16326, 7469}, {16611, 8624}, {17028,10418}, {15905,11817}, +{16878,14690}, {16515,20870}, {18142, 2083}, {19401, 3178}, {17508, 3426}, +{20054, 4027}, {18069, 4249}, {18952, 5066}, {17711, 5402}, {19835, 6192}, +{17950, 7014}, {21318, 7877}, {17910, 9289}, {19144, 9290}, {20517,11381}, +{18075,14485}, {19999,17882}, {18842,32764} +}; + +/** gain table for 5.15 and 5.90 kbps modes + * + * second index is {pitch_gain, fixed_gain_factor} */ +static const uint16_t gains_low[64][2] = { +{10813,28753}, {20480, 2785}, {18841, 6594}, { 6225, 7413}, {17203,10444}, +{21626, 1269}, {21135, 4423}, {11304, 1556}, {19005,12820}, {17367, 2498}, +{17858, 4833}, { 9994, 2498}, {17530, 7864}, {14254, 1884}, {15892, 3153}, +{ 6717, 1802}, {18186,20193}, {18022, 3031}, {16711, 5857}, { 8847, 4014}, +{15892, 8970}, {18022, 1392}, {16711, 4096}, { 8192, 655}, {15237,13926}, +{14254, 3112}, {14090, 4669}, { 5406, 2703}, {13434, 6553}, {12451, 901}, +{12451, 2662}, { 3768, 655}, {14745,23511}, {19169, 2457}, {20152, 5079}, +{ 6881, 4096}, {20480, 8560}, {19660, 737}, {19005, 4259}, { 7864, 2088}, +{11468,12288}, {15892, 1474}, {15728, 4628}, { 9175, 1433}, {16056, 7004}, +{14827, 737}, {15073, 2252}, { 5079, 1228}, {13271,17326}, {16547, 2334}, +{15073, 5816}, { 3932, 3686}, {14254, 8601}, {16875, 778}, {15073, 3809}, +{ 6062, 614}, { 9338, 9256}, {13271, 1761}, {13271, 3522}, { 2457, 1966}, +{11468, 5529}, {10485, 737}, {11632, 3194}, { 1474, 778} +}; + + +// pre-processing tables + +/** impulse response filter tables converted to float from Q15 int32_t + * used for anti-sparseness processing */ +static const float ir_filter_strong_MODE_7k95[AMR_SUBFRAME_SIZE] = { + 0.817169, 0.024445, 0.076447, -0.020844, -0.042175, 0.017761, 0.018433, +-0.038879, 0.107147, -0.179871, 0.138367, -0.015228, -0.059204, 0.091888, +-0.154358, 0.171326, -0.060730, -0.032379, -0.044525, 0.135559, -0.021362, +-0.162811, 0.140656, 0.013794, -0.017975, -0.102295, 0.090118, 0.038666, +-0.036987, -0.079041, 0.052826, 0.112000, -0.136566, -0.029755, 0.134003, +-0.077423, 0.028961, -0.041595, -0.029877, 0.174988, +}; + +static const float ir_filter_strong[AMR_SUBFRAME_SIZE] = { + 0.448303, 0.351501, 0.038696, -0.084259, -0.173065, 0.229309, -0.001068, +-0.085663, -0.092773, 0.147186, 0.090088, -0.257080, 0.115509, 0.044403, + 0.066498, -0.263580, 0.245697, -0.064178, -0.044373, 0.023712, 0.033813, +-0.072784, 0.068787, -0.011078, -0.020569, -0.064178, 0.184509, -0.173370, + 0.032715, 0.095306, -0.154358, 0.162109, -0.071075, -0.113770, 0.211304, +-0.118683, 0.020599, -0.054169, 0.000885, 0.309601, +}; + +static const float ir_filter_medium[AMR_SUBFRAME_SIZE] = { + 0.923889, 0.116913, -0.123169, 0.090698, -0.031982, -0.030579, 0.075592, +-0.092865, 0.085907, -0.068085, 0.053497, -0.049164, 0.052307, -0.054169, + 0.047089, -0.030762, 0.013092, -0.005157, 0.014404, -0.038574, 0.066406, +-0.082581, 0.076996, -0.049469, 0.010498, 0.025208, -0.046661, 0.052612, +-0.050568, 0.051910, -0.062958, 0.080688, -0.093384, 0.088409, -0.060364, + 0.016998, 0.023804, -0.041779, 0.025696, 0.019989, +}; + +static const float * const ir_filters_lookup[2] = { + ir_filter_strong, ir_filter_medium +}; +static const float * const ir_filters_lookup_MODE_7k95[2] = { + ir_filter_strong_MODE_7k95, ir_filter_medium +}; + +// High-pass coefficients + +static const float highpass_zeros[2] = { -2.0, 1.0 }; +static const float highpass_poles[2] = { -1.933105469, 0.935913085 }; +static const float highpass_gain = 0.939819335; + +#endif /* AVCODEC_AMRNBDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrwbdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrwbdata.h new file mode 100644 index 00000000..95c0aaa3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/amrwbdata.h @@ -0,0 +1,1890 @@ +/* + * AMR wideband data and definitions + * Copyright (c) 2010 Marcelo Galvao Povoa + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AMR wideband data and definitions + */ + +#ifndef AVCODEC_AMRWBDATA_H +#define AVCODEC_AMRWBDATA_H + +#include +#include + +#define LP_ORDER 16 ///< linear predictive coding filter order +#define LP_ORDER_16k 20 ///< lpc filter order at 16kHz +#define HB_FIR_SIZE 30 ///< amount of past data needed by HB filters +#define UPS_FIR_SIZE 12 ///< upsampling filter size +#define UPS_MEM_SIZE (2 * UPS_FIR_SIZE) + +#define MIN_ISF_SPACING (128.0 / 32768.0) ///< minimum isf gap +#define PRED_FACTOR (1.0 / 3.0) +#define MIN_ENERGY -14.0 ///< initial innovation energy (dB) +#define ENERGY_MEAN 30.0 ///< mean innovation energy (dB) in all modes +#define PREEMPH_FAC 0.68 ///< factor used to de-emphasize synthesis + +#define AMRWB_SFR_SIZE 64 ///< samples per subframe at 12.8 kHz +#define AMRWB_SFR_SIZE_16k 80 ///< samples per subframe at 16 kHz +#define AMRWB_P_DELAY_MAX 231 ///< maximum pitch delay value +#define AMRWB_P_DELAY_MIN 34 + +/* Relative mode ordering is sensitive */ +enum Mode { + MODE_6k60 = 0, ///< 6.60 kbit/s + MODE_8k85, ///< 8.85 kbit/s + MODE_12k65, ///< 12.65 kbit/s + MODE_14k25, ///< 14.25 kbit/s + MODE_15k85, ///< 15.85 kbit/s + MODE_18k25, ///< 18.25 kbit/s + MODE_19k85, ///< 19.85 kbit/s + MODE_23k05, ///< 23.05 kbit/s + MODE_23k85, ///< 23.85 kbit/s + MODE_SID, ///< comfort noise frame + /* 10-13: Future use */ + SP_LOST = 14, ///< speech lost + NO_DATA ///< no transmission +}; + +/* All decoded parameters in these structs must be 2 bytes long + * because of the direct indexing at the frame parsing */ +typedef struct AMRWBSubFrame { + uint16_t adap; ///< adaptive codebook index + uint16_t ltp; ///< ltp-filtering flag + uint16_t vq_gain; ///< VQ adaptive and innovative gains + uint16_t hb_gain; ///< high-band energy index (mode 23k85 only) + uint16_t pul_ih[4]; ///< MSBs part of codebook index (high modes only) + uint16_t pul_il[4]; ///< LSBs part of codebook index +} AMRWBSubFrame; + +typedef struct AMRWBFrame { + uint16_t vad; ///< voice activity detection flag + uint16_t isp_id[7]; ///< index of ISP subvectors + AMRWBSubFrame subframe[4]; ///< data for subframes +} AMRWBFrame; + +/** The index of a frame parameter */ +#define AMR_BIT(field) (offsetof(AMRWBFrame, field)) +/** The index of a subframe-specific parameter */ +#define AMR_OF(frame_num, variable) AMR_BIT(subframe[frame_num].variable) + +//As defined in 3GPP TS 26.201 V9.0.0 +//Tables for bit parsing in Core Frame speech frames +//The reordered bits are in order of decreasing importance and +//may be contiguously separated in Class A, B and C bits. + +// Each field in AMRWBFrame is stored as: +// * one byte for the number of bits in the field +// * one byte for the field index +// * then, one byte for each bit of the field (from most-significant to least) +// of the position of that bit in the AMR frame. +static const uint16_t order_MODE_6k60[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 24, 33, 39, 12, 6, 5, 4, 13, + 8, AMR_BIT(isp_id[1]), 65, 79, 64, 78, 51, 61, 71, 70, + 7, AMR_BIT(isp_id[2]), 52, 55, 44, 54, 53, 43, 42, + 7, AMR_BIT(isp_id[3]), 60, 59, 58, 57, 56, 75, 74, + 6, AMR_BIT(isp_id[4]), 73, 72, 86, 87, 85, 84, + 8, AMR_OF(0, adap), 11, 10, 9, 8, 28, 27, 49, 69, + 6, AMR_OF(0, pul_il[0]), 83, 91, 99, 107, 115, 123, + 6, AMR_OF(0, pul_il[1]), 82, 103, 111, 119, 127, 135, + 6, AMR_OF(0, vq_gain), 38, 23, 34, 19, 3, 15, + 5, AMR_OF(1, adap), 32, 41, 63, 67, 77, + 6, AMR_OF(1, pul_il[0]), 81, 90, 98, 106, 114, 122, + 6, AMR_OF(1, pul_il[1]), 80, 102, 110, 118, 126, 134, + 6, AMR_OF(1, vq_gain), 26, 22, 36, 18, 2, 14, + 5, AMR_OF(2, adap), 45, 40, 50, 48, 68, + 6, AMR_OF(2, pul_il[0]), 95, 89, 97, 105, 113, 121, + 6, AMR_OF(2, pul_il[1]), 94, 101, 109, 117, 125, 133, + 6, AMR_OF(2, vq_gain), 37, 21, 35, 17, 1, 31, + 5, AMR_OF(3, adap), 47, 46, 62, 66, 76, + 6, AMR_OF(3, pul_il[0]), 93, 88, 96, 104, 112, 120, + 6, AMR_OF(3, pul_il[1]), 92, 100, 108, 116, 124, 132, + 6, AMR_OF(3, vq_gain), 25, 20, 29, 16, 0, 30, + 0 +}; + +static const uint16_t order_MODE_8k85[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 47, 32, 2, 6, 3, 5, 4, 60, + 8, AMR_BIT(isp_id[1]), 69, 50, 67, 41, 51, 49, 59, 53, + 6, AMR_BIT(isp_id[2]), 40, 55, 43, 54, 42, 62, + 7, AMR_BIT(isp_id[3]), 63, 48, 52, 61, 77, 78, 72, + 7, AMR_BIT(isp_id[4]), 85, 56, 86, 68, 74, 73, 81, + 5, AMR_BIT(isp_id[5]), 82, 95, 80, 94, 91, + 5, AMR_BIT(isp_id[6]), 90, 89, 88, 103, 87, + 8, AMR_OF(0, adap), 1, 0, 15, 35, 33, 58, 64, 84, + 5, AMR_OF(0, pul_il[0]), 102, 118, 134, 150, 166, + 5, AMR_OF(0, pul_il[1]), 101, 114, 130, 146, 162, + 5, AMR_OF(0, pul_il[2]), 100, 126, 142, 158, 174, + 5, AMR_OF(0, pul_il[3]), 99, 122, 138, 154, 170, + 6, AMR_OF(0, vq_gain), 11, 39, 19, 31, 27, 23, + 5, AMR_OF(1, adap), 46, 71, 66, 76, 93, + 5, AMR_OF(1, pul_il[0]), 98, 117, 133, 149, 165, + 5, AMR_OF(1, pul_il[1]), 97, 113, 129, 145, 161, + 5, AMR_OF(1, pul_il[2]), 96, 125, 141, 157, 173, + 5, AMR_OF(1, pul_il[3]), 111, 121, 137, 153, 169, + 6, AMR_OF(1, vq_gain), 10, 38, 18, 30, 26, 22, + 8, AMR_OF(2, adap), 14, 13, 12, 34, 45, 57, 79, 83, + 5, AMR_OF(2, pul_il[0]), 110, 116, 132, 148, 164, + 5, AMR_OF(2, pul_il[1]), 109, 112, 128, 144, 160, + 5, AMR_OF(2, pul_il[2]), 108, 124, 140, 156, 172, + 5, AMR_OF(2, pul_il[3]), 107, 120, 136, 152, 168, + 6, AMR_OF(2, vq_gain), 9, 37, 17, 29, 25, 21, + 5, AMR_OF(3, adap), 44, 70, 65, 75, 92, + 5, AMR_OF(3, pul_il[0]), 106, 115, 131, 147, 163, + 5, AMR_OF(3, pul_il[1]), 105, 127, 143, 159, 175, + 5, AMR_OF(3, pul_il[2]), 104, 123, 139, 155, 171, + 5, AMR_OF(3, pul_il[3]), 119, 135, 151, 167, 183, + 6, AMR_OF(3, vq_gain), 8, 36, 16, 28, 24, 20, + 0 +}; + +static const uint16_t order_MODE_12k65[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 9, AMR_OF(0, pul_il[0]), 106, 122, 154, 186, 218, 134, 166, 198, + 230, + 9, AMR_OF(0, pul_il[1]), 105, 130, 162, 194, 226, 142, 174, 206, + 238, + 9, AMR_OF(0, pul_il[2]), 104, 138, 170, 202, 234, 150, 182, 214, + 246, + 9, AMR_OF(0, pul_il[3]), 119, 146, 178, 210, 242, 158, 190, 222, + 254, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 9, AMR_OF(1, pul_il[0]), 118, 121, 153, 185, 217, 133, 165, 197, + 229, + 9, AMR_OF(1, pul_il[1]), 117, 129, 161, 193, 225, 141, 173, 205, + 237, + 9, AMR_OF(1, pul_il[2]), 116, 137, 169, 201, 233, 149, 181, 213, + 245, + 9, AMR_OF(1, pul_il[3]), 115, 145, 177, 209, 241, 157, 189, 221, + 253, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 9, AMR_OF(2, pul_il[0]), 114, 120, 152, 184, 216, 132, 164, 196, + 228, + 9, AMR_OF(2, pul_il[1]), 113, 128, 160, 192, 224, 140, 172, 204, + 236, + 9, AMR_OF(2, pul_il[2]), 112, 136, 168, 200, 232, 148, 180, 212, + 244, + 9, AMR_OF(2, pul_il[3]), 127, 144, 176, 208, 240, 156, 188, 220, + 252, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 9, AMR_OF(3, pul_il[0]), 126, 135, 167, 199, 231, 131, 163, 195, + 227, + 9, AMR_OF(3, pul_il[1]), 125, 143, 175, 207, 239, 139, 171, 203, + 235, + 9, AMR_OF(3, pul_il[2]), 124, 151, 183, 215, 247, 147, 179, 211, + 243, + 9, AMR_OF(3, pul_il[3]), 123, 159, 191, 223, 255, 155, 187, 219, + 251, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_14k25[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 13, AMR_OF(0, pul_il[0]), 114, 186, 210, 234, 258, 106, 126, 162, + 170, 198, 222, 246, 270, + 13, AMR_OF(0, pul_il[1]), 122, 194, 218, 242, 266, 118, 134, 174, + 182, 206, 230, 254, 278, + 9, AMR_OF(0, pul_il[2]), 130, 138, 146, 154, 178, 202, 226, 250, + 274, + 9, AMR_OF(0, pul_il[3]), 142, 150, 158, 166, 190, 214, 238, 262, + 286, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 13, AMR_OF(1, pul_il[0]), 113, 185, 209, 233, 257, 105, 125, 161, + 169, 197, 221, 245, 269, + 13, AMR_OF(1, pul_il[1]), 121, 193, 217, 241, 265, 117, 133, 173, + 181, 205, 229, 253, 277, + 9, AMR_OF(1, pul_il[2]), 129, 137, 145, 153, 177, 201, 225, 249, + 273, + 9, AMR_OF(1, pul_il[3]), 141, 149, 157, 165, 189, 213, 237, 261, + 285, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 13, AMR_OF(2, pul_il[0]), 112, 184, 208, 232, 256, 104, 124, 160, + 168, 196, 220, 244, 268, + 13, AMR_OF(2, pul_il[1]), 120, 192, 216, 240, 264, 116, 132, 172, + 180, 204, 228, 252, 276, + 9, AMR_OF(2, pul_il[2]), 128, 136, 144, 152, 176, 200, 224, 248, + 272, + 9, AMR_OF(2, pul_il[3]), 140, 148, 156, 164, 188, 212, 236, 260, + 284, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 13, AMR_OF(3, pul_il[0]), 127, 199, 223, 247, 271, 119, 123, 175, + 183, 195, 219, 243, 267, + 13, AMR_OF(3, pul_il[1]), 135, 207, 231, 255, 279, 115, 131, 171, + 179, 203, 227, 251, 275, + 9, AMR_OF(3, pul_il[2]), 143, 151, 159, 167, 191, 215, 239, 263, + 287, + 9, AMR_OF(3, pul_il[3]), 139, 147, 155, 163, 187, 211, 235, 259, + 283, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_15k85[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 13, AMR_OF(0, pul_il[0]), 122, 154, 170, 218, 266, 138, 106, 182, + 230, 278, 178, 226, 274, + 13, AMR_OF(0, pul_il[1]), 134, 166, 190, 238, 286, 150, 118, 186, + 234, 282, 198, 246, 294, + 13, AMR_OF(0, pul_il[2]), 130, 162, 194, 242, 290, 146, 114, 206, + 254, 302, 202, 250, 298, + 13, AMR_OF(0, pul_il[3]), 142, 174, 214, 262, 310, 158, 126, 210, + 258, 306, 222, 270, 318, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 13, AMR_OF(1, pul_il[0]), 121, 153, 169, 217, 265, 137, 105, 181, + 229, 277, 177, 225, 273, + 13, AMR_OF(1, pul_il[1]), 133, 165, 189, 237, 285, 149, 117, 185, + 233, 281, 197, 245, 293, + 13, AMR_OF(1, pul_il[2]), 129, 161, 193, 241, 289, 145, 113, 205, + 253, 301, 201, 249, 297, + 13, AMR_OF(1, pul_il[3]), 141, 173, 213, 261, 309, 157, 125, 209, + 257, 305, 221, 269, 317, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 13, AMR_OF(2, pul_il[0]), 120, 152, 168, 216, 264, 136, 104, 180, + 228, 276, 176, 224, 272, + 13, AMR_OF(2, pul_il[1]), 132, 164, 188, 236, 284, 148, 116, 184, + 232, 280, 196, 244, 292, + 13, AMR_OF(2, pul_il[2]), 128, 160, 192, 240, 288, 144, 112, 204, + 252, 300, 200, 248, 296, + 13, AMR_OF(2, pul_il[3]), 140, 172, 212, 260, 308, 156, 124, 208, + 256, 304, 220, 268, 316, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 13, AMR_OF(3, pul_il[0]), 135, 167, 183, 231, 279, 151, 119, 179, + 227, 275, 191, 239, 287, + 13, AMR_OF(3, pul_il[1]), 131, 163, 187, 235, 283, 147, 115, 199, + 247, 295, 195, 243, 291, + 13, AMR_OF(3, pul_il[2]), 143, 175, 207, 255, 303, 159, 127, 203, + 251, 299, 215, 263, 311, + 13, AMR_OF(3, pul_il[3]), 139, 171, 211, 259, 307, 155, 123, 223, + 271, 319, 219, 267, 315, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_18k25[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 2, AMR_OF(0, pul_ih[0]), 124, 115, + 2, AMR_OF(0, pul_ih[1]), 150, 117, + 2, AMR_OF(0, pul_ih[2]), 129, 114, + 2, AMR_OF(0, pul_ih[3]), 121, 131, + 14, AMR_OF(0, pul_il[0]), 161, 257, 343, 199, 177, 303, 204, 173, + 168, 260, 277, 307, 338, 128, + 14, AMR_OF(0, pul_il[1]), 194, 286, 347, 222, 214, 316, 236, 152, + 166, 242, 284, 308, 344, 142, + 14, AMR_OF(0, pul_il[2]), 169, 273, 353, 202, 189, 311, 240, 200, + 171, 261, 309, 296, 345, 130, + 14, AMR_OF(0, pul_il[3]), 198, 275, 349, 187, 163, 282, 193, 195, + 175, 234, 265, 289, 328, 119, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 2, AMR_OF(1, pul_ih[0]), 139, 104, + 2, AMR_OF(1, pul_ih[1]), 135, 118, + 2, AMR_OF(1, pul_ih[2]), 112, 127, + 2, AMR_OF(1, pul_ih[3]), 140, 141, + 14, AMR_OF(1, pul_il[0]), 179, 276, 340, 225, 223, 321, 235, 190, + 182, 271, 310, 315, 352, 125, + 14, AMR_OF(1, pul_il[1]), 153, 264, 329, 232, 209, 323, 231, 165, + 191, 279, 290, 312, 367, 134, + 14, AMR_OF(1, pul_il[2]), 167, 269, 341, 205, 197, 298, 224, 160, + 170, 259, 280, 317, 357, 148, + 14, AMR_OF(1, pul_il[3]), 203, 272, 342, 227, 192, 299, 233, 172, + 183, 256, 283, 326, 355, 106, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 2, AMR_OF(2, pul_ih[0]), 144, 120, + 2, AMR_OF(2, pul_ih[1]), 157, 123, + 2, AMR_OF(2, pul_ih[2]), 145, 138, + 2, AMR_OF(2, pul_ih[3]), 132, 154, + 14, AMR_OF(2, pul_il[0]), 241, 319, 365, 252, 253, 331, 254, 230, + 220, 263, 285, 314, 364, 156, + 14, AMR_OF(2, pul_il[1]), 247, 291, 339, 249, 250, 332, 267, 196, + 207, 268, 304, 324, 356, 158, + 14, AMR_OF(2, pul_il[2]), 210, 300, 348, 243, 237, 333, 246, 206, + 219, 266, 318, 335, 363, 159, + 14, AMR_OF(2, pul_il[3]), 239, 306, 366, 221, 226, 297, 251, 184, + 178, 258, 292, 305, 346, 116, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 2, AMR_OF(3, pul_ih[0]), 143, 126, + 2, AMR_OF(3, pul_ih[1]), 137, 122, + 2, AMR_OF(3, pul_ih[2]), 149, 105, + 2, AMR_OF(3, pul_ih[3]), 133, 136, + 14, AMR_OF(3, pul_il[0]), 162, 287, 337, 244, 229, 322, 218, 180, + 186, 262, 274, 288, 351, 146, + 14, AMR_OF(3, pul_il[1]), 212, 294, 358, 248, 228, 334, 215, 174, + 176, 270, 293, 301, 354, 147, + 14, AMR_OF(3, pul_il[2]), 185, 327, 336, 211, 213, 313, 245, 181, + 188, 255, 281, 325, 350, 151, + 14, AMR_OF(3, pul_il[3]), 201, 295, 359, 216, 208, 320, 238, 164, + 155, 217, 278, 302, 330, 113, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_19k85[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 10, AMR_OF(0, pul_ih[0]), 134, 153, 263, 342, 399, 154, 106, 177, + 317, 265, + 10, AMR_OF(0, pul_ih[1]), 128, 167, 270, 351, 385, 160, 105, 213, + 329, 259, + 2, AMR_OF(0, pul_ih[2]), 123, 147, + 2, AMR_OF(0, pul_ih[3]), 131, 143, + 10, AMR_OF(0, pul_il[0]), 346, 118, 170, 201, 296, 368, 250, 284, + 341, 391, + 10, AMR_OF(0, pul_il[1]), 345, 104, 166, 196, 281, 374, 242, 269, + 327, 390, + 14, AMR_OF(0, pul_il[2]), 141, 171, 291, 364, 229, 210, 308, 228, + 206, 200, 258, 295, 313, 361, + 14, AMR_OF(0, pul_il[3]), 144, 188, 282, 366, 217, 216, 309, 218, + 193, 182, 245, 287, 300, 367, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 10, AMR_OF(1, pul_ih[0]), 139, 169, 267, 348, 389, 163, 116, 189, + 343, 268, + 10, AMR_OF(1, pul_ih[1]), 120, 161, 249, 339, 397, 152, 114, 230, + 334, 303, + 2, AMR_OF(1, pul_ih[2]), 125, 138, + 2, AMR_OF(1, pul_ih[3]), 112, 129, + 10, AMR_OF(1, pul_il[0]), 349, 122, 162, 203, 288, 372, 278, 274, + 312, 377, + 10, AMR_OF(1, pul_il[1]), 357, 126, 165, 214, 298, 362, 252, 260, + 321, 378, + 14, AMR_OF(1, pul_il[2]), 150, 199, 266, 355, 211, 180, 285, 241, + 195, 198, 243, 275, 323, 375, + 14, AMR_OF(1, pul_il[3]), 142, 191, 256, 353, 208, 220, 314, 237, + 190, 212, 255, 304, 318, 371, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 10, AMR_OF(2, pul_ih[0]), 159, 168, 302, 356, 395, 178, 132, 185, + 330, 286, + 10, AMR_OF(2, pul_ih[1]), 158, 181, 292, 358, 396, 176, 133, 235, + 331, 276, + 2, AMR_OF(2, pul_ih[2]), 130, 157, + 2, AMR_OF(2, pul_ih[3]), 124, 136, + 10, AMR_OF(2, pul_il[0]), 354, 121, 194, 246, 322, 379, 272, 273, + 332, 398, + 10, AMR_OF(2, pul_il[1]), 359, 140, 186, 236, 333, 376, 290, 301, + 338, 387, + 14, AMR_OF(2, pul_il[2]), 155, 227, 319, 369, 253, 254, 350, 248, + 224, 239, 240, 293, 315, 383, + 14, AMR_OF(2, pul_il[3]), 156, 209, 297, 373, 225, 215, 326, 247, + 197, 184, 232, 289, 310, 365, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 10, AMR_OF(3, pul_ih[0]), 148, 164, 264, 340, 388, 183, 117, 205, + 336, 261, + 10, AMR_OF(3, pul_ih[1]), 146, 174, 257, 335, 384, 173, 113, 187, + 320, 279, + 2, AMR_OF(3, pul_ih[2]), 127, 151, + 2, AMR_OF(3, pul_ih[3]), 119, 137, + 10, AMR_OF(3, pul_il[0]), 352, 135, 172, 238, 306, 381, 262, 271, + 328, 382, + 10, AMR_OF(3, pul_il[1]), 347, 115, 179, 219, 305, 380, 277, 294, + 337, 386, + 14, AMR_OF(3, pul_il[2]), 145, 192, 307, 370, 234, 223, 324, 244, + 202, 204, 251, 299, 325, 360, + 14, AMR_OF(3, pul_il[3]), 149, 221, 311, 363, 226, 222, 316, 231, + 207, 175, 233, 280, 283, 344, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_23k05[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 77, 58, 75, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 85, 86, 80, + 7, AMR_BIT(isp_id[4]), 93, 64, 94, 76, 82, 81, 89, + 5, AMR_BIT(isp_id[5]), 90, 103, 88, 102, 99, + 5, AMR_BIT(isp_id[6]), 98, 97, 96, 111, 95, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 72, + 92, + 1, AMR_OF(0, ltp), 110, + 11, AMR_OF(0, pul_ih[0]), 118, 129, 131, 153, 170, 282, 298, 210, + 191, 357, 317, + 11, AMR_OF(0, pul_ih[1]), 126, 146, 135, 165, 187, 273, 345, 295, + 172, 338, 340, + 11, AMR_OF(0, pul_ih[2]), 119, 137, 141, 167, 208, 304, 366, 256, + 177, 339, 328, + 11, AMR_OF(0, pul_ih[3]), 116, 130, 120, 166, 190, 252, 311, 239, + 173, 343, 318, + 11, AMR_OF(0, pul_il[0]), 245, 180, 342, 424, 259, 277, 266, 380, + 398, 423, 440, + 11, AMR_OF(0, pul_il[1]), 218, 207, 367, 434, 201, 240, 275, 363, + 399, 419, 452, + 11, AMR_OF(0, pul_il[2]), 274, 188, 348, 425, 242, 204, 262, 365, + 402, 431, 463, + 11, AMR_OF(0, pul_il[3]), 221, 183, 337, 439, 243, 216, 251, 354, + 390, 411, 462, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 6, AMR_OF(1, adap), 35, 54, 79, 74, 84, 101, + 1, AMR_OF(1, ltp), 109, + 11, AMR_OF(1, pul_ih[0]), 115, 140, 142, 161, 230, 291, 351, 235, + 181, 293, 310, + 11, AMR_OF(1, pul_ih[1]), 104, 138, 132, 162, 211, 315, 347, 233, + 176, 320, 329, + 11, AMR_OF(1, pul_ih[2]), 106, 134, 125, 154, 205, 267, 306, 220, + 185, 330, 297, + 11, AMR_OF(1, pul_ih[3]), 105, 148, 122, 152, 215, 302, 350, 254, + 178, 319, 313, + 11, AMR_OF(1, pul_il[0]), 269, 189, 382, 432, 272, 228, 263, 383, + 406, 422, 453, + 11, AMR_OF(1, pul_il[1]), 286, 206, 377, 446, 226, 222, 265, 368, + 404, 416, 454, + 11, AMR_OF(1, pul_il[2]), 247, 195, 358, 445, 224, 236, 309, 341, + 375, 408, 449, + 11, AMR_OF(1, pul_il[3]), 225, 192, 359, 436, 250, 258, 290, 389, + 400, 420, 448, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 87, + 91, + 1, AMR_OF(2, ltp), 108, + 11, AMR_OF(2, pul_ih[0]), 139, 144, 145, 169, 234, 327, 395, 299, + 244, 356, 379, + 11, AMR_OF(2, pul_ih[1]), 127, 156, 158, 171, 231, 308, 397, 355, + 261, 371, 335, + 11, AMR_OF(2, pul_ih[2]), 123, 155, 157, 193, 241, 362, 384, 323, + 238, 392, 361, + 11, AMR_OF(2, pul_ih[3]), 114, 147, 121, 175, 196, 333, 373, 303, + 184, 353, 322, + 11, AMR_OF(2, pul_il[0]), 271, 203, 385, 442, 307, 276, 334, 405, + 412, 427, 459, + 11, AMR_OF(2, pul_il[1]), 278, 200, 388, 447, 292, 288, 296, 403, + 415, 429, 460, + 11, AMR_OF(2, pul_il[2]), 312, 214, 393, 433, 279, 301, 314, 391, + 410, 426, 450, + 11, AMR_OF(2, pul_il[3]), 280, 186, 376, 437, 268, 260, 255, 364, + 414, 417, 441, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 6, AMR_OF(3, adap), 34, 53, 78, 73, 83, 100, + 1, AMR_OF(3, ltp), 107, + 11, AMR_OF(3, pul_ih[0]), 112, 159, 143, 164, 213, 281, 332, 284, + 168, 344, 325, + 11, AMR_OF(3, pul_ih[1]), 113, 150, 149, 179, 199, 316, 324, 285, + 237, 360, 336, + 11, AMR_OF(3, pul_ih[2]), 124, 136, 151, 174, 209, 326, 349, 248, + 198, 374, 331, + 11, AMR_OF(3, pul_ih[3]), 117, 128, 133, 163, 202, 300, 372, 305, + 194, 387, 321, + 11, AMR_OF(3, pul_il[0]), 249, 182, 352, 428, 253, 264, 289, 413, + 407, 418, 461, + 11, AMR_OF(3, pul_il[1]), 287, 212, 369, 444, 223, 246, 217, 346, + 394, 401, 451, + 11, AMR_OF(3, pul_il[2]), 219, 197, 378, 435, 229, 257, 283, 396, + 409, 430, 455, + 11, AMR_OF(3, pul_il[3]), 232, 160, 370, 438, 227, 270, 294, 381, + 386, 421, 443, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 0 +}; + +static const uint16_t order_MODE_23k85[] = { + 1, AMR_BIT(vad), 7, + 8, AMR_BIT(isp_id[0]), 55, 40, 14, 6, 15, 5, 0, 68, + 8, AMR_BIT(isp_id[1]), 93, 58, 91, 49, 59, 57, 67, 61, + 6, AMR_BIT(isp_id[2]), 48, 63, 51, 62, 50, 70, + 7, AMR_BIT(isp_id[3]), 71, 56, 60, 69, 101, 102, 96, + 7, AMR_BIT(isp_id[4]), 109, 64, 110, 92, 98, 97, 105, + 5, AMR_BIT(isp_id[5]), 106, 119, 104, 118, 115, + 5, AMR_BIT(isp_id[6]), 114, 113, 112, 127, 111, + 9, AMR_OF(0, adap), 13, 12, 11, 10, 9, 41, 66, 88, + 108, + 1, AMR_OF(0, ltp), 126, + 11, AMR_OF(0, pul_ih[0]), 134, 145, 147, 169, 186, 298, 314, 226, + 207, 373, 333, + 11, AMR_OF(0, pul_ih[1]), 142, 162, 151, 181, 203, 289, 361, 311, + 188, 354, 356, + 11, AMR_OF(0, pul_ih[2]), 135, 153, 157, 183, 224, 320, 382, 272, + 193, 355, 344, + 11, AMR_OF(0, pul_ih[3]), 132, 146, 136, 182, 206, 268, 327, 255, + 189, 359, 334, + 11, AMR_OF(0, pul_il[0]), 261, 196, 358, 440, 275, 293, 282, 396, + 414, 439, 456, + 11, AMR_OF(0, pul_il[1]), 234, 223, 383, 450, 217, 256, 291, 379, + 415, 435, 468, + 11, AMR_OF(0, pul_il[2]), 290, 204, 364, 441, 258, 220, 278, 381, + 418, 447, 479, + 11, AMR_OF(0, pul_il[3]), 237, 199, 353, 455, 259, 232, 267, 370, + 406, 427, 478, + 7, AMR_OF(0, vq_gain), 4, 19, 45, 27, 39, 33, 31, + 4, AMR_OF(0, hb_gain), 79, 78, 77, 76, + 6, AMR_OF(1, adap), 35, 54, 95, 90, 100, 117, + 1, AMR_OF(1, ltp), 125, + 11, AMR_OF(1, pul_ih[0]), 131, 156, 158, 177, 246, 307, 367, 251, + 197, 309, 326, + 11, AMR_OF(1, pul_ih[1]), 120, 154, 148, 178, 227, 331, 363, 249, + 192, 336, 345, + 11, AMR_OF(1, pul_ih[2]), 122, 150, 141, 170, 221, 283, 322, 236, + 201, 346, 313, + 11, AMR_OF(1, pul_ih[3]), 121, 164, 138, 168, 231, 318, 366, 270, + 194, 335, 329, + 11, AMR_OF(1, pul_il[0]), 285, 205, 398, 448, 288, 244, 279, 399, + 422, 438, 469, + 11, AMR_OF(1, pul_il[1]), 302, 222, 393, 462, 242, 238, 281, 384, + 420, 432, 470, + 11, AMR_OF(1, pul_il[2]), 263, 211, 374, 461, 240, 252, 325, 357, + 391, 424, 465, + 11, AMR_OF(1, pul_il[3]), 241, 208, 375, 452, 266, 274, 306, 405, + 416, 436, 464, + 7, AMR_OF(1, vq_gain), 3, 18, 44, 26, 38, 32, 30, + 4, AMR_OF(1, hb_gain), 75, 74, 73, 72, + 9, AMR_OF(2, adap), 8, 23, 22, 21, 20, 52, 65, 103, + 107, + 1, AMR_OF(2, ltp), 124, + 11, AMR_OF(2, pul_ih[0]), 155, 160, 161, 185, 250, 343, 411, 315, + 260, 372, 395, + 11, AMR_OF(2, pul_ih[1]), 143, 172, 174, 187, 247, 324, 413, 371, + 277, 387, 351, + 11, AMR_OF(2, pul_ih[2]), 139, 171, 173, 209, 257, 378, 400, 339, + 254, 408, 377, + 11, AMR_OF(2, pul_ih[3]), 130, 163, 137, 191, 212, 349, 389, 319, + 200, 369, 338, + 11, AMR_OF(2, pul_il[0]), 287, 219, 401, 458, 323, 292, 350, 421, + 428, 443, 475, + 11, AMR_OF(2, pul_il[1]), 294, 216, 404, 463, 308, 304, 312, 419, + 431, 445, 476, + 11, AMR_OF(2, pul_il[2]), 328, 230, 409, 449, 295, 317, 330, 407, + 426, 442, 466, + 11, AMR_OF(2, pul_il[3]), 296, 202, 392, 453, 284, 276, 271, 380, + 430, 433, 457, + 7, AMR_OF(2, vq_gain), 2, 17, 43, 25, 37, 47, 29, + 4, AMR_OF(2, hb_gain), 87, 86, 85, 84, + 6, AMR_OF(3, adap), 34, 53, 94, 89, 99, 116, + 1, AMR_OF(3, ltp), 123, + 11, AMR_OF(3, pul_ih[0]), 128, 175, 159, 180, 229, 297, 348, 300, + 184, 360, 341, + 11, AMR_OF(3, pul_ih[1]), 129, 166, 165, 195, 215, 332, 340, 301, + 253, 376, 352, + 11, AMR_OF(3, pul_ih[2]), 140, 152, 167, 190, 225, 342, 365, 264, + 214, 390, 347, + 11, AMR_OF(3, pul_ih[3]), 133, 144, 149, 179, 218, 316, 388, 321, + 210, 403, 337, + 11, AMR_OF(3, pul_il[0]), 265, 198, 368, 444, 269, 280, 305, 429, + 423, 434, 477, + 11, AMR_OF(3, pul_il[1]), 303, 228, 385, 460, 239, 262, 233, 362, + 410, 417, 467, + 11, AMR_OF(3, pul_il[2]), 235, 213, 394, 451, 245, 273, 299, 412, + 425, 446, 471, + 11, AMR_OF(3, pul_il[3]), 248, 176, 386, 454, 243, 286, 310, 397, + 402, 437, 459, + 7, AMR_OF(3, vq_gain), 1, 16, 42, 24, 36, 46, 28, + 4, AMR_OF(3, hb_gain), 83, 82, 81, 80, + 0 +}; + +/** Reordering array addresses for each mode */ +static const uint16_t * const amr_bit_orderings_by_mode[] = { + order_MODE_6k60, + order_MODE_8k85, + order_MODE_12k65, + order_MODE_14k25, + order_MODE_15k85, + order_MODE_18k25, + order_MODE_19k85, + order_MODE_23k05, + order_MODE_23k85 +}; + +// Extracted from 3GPP TS 26.173 V9.0.0 (qpisf_2s.tab) +// The *_36b tables are used in 6k60 mode +// Stored in fixed-point to save some space +/** Indexed tables for retrieval of quantized ISF vectors in Q15 */ +static const int16_t dico1_isf[256][9] = { + { 579, 1081, 1035, 390, 3, -263, -198, -82, 38}, + { 18, -68, -12, 313, 761, 405, 249, 111, -76}, + { 740, 1263, 1292, 1006, 997, 1019, 1017, 976, 923}, + { -91, 827, 948, 648, 613, 535, 522, 490, 421}, + { 41, -44, -281, -472, 652, 534, 193, 135, -90}, + { 41, -121, -356, -60, 663, 307, 61, -48, -344}, + { 557, 946, 1049, 867, 846, 990, 1112, 1262, 1241}, + { -118, -204, 328, 512, 870, 793, 610, 402, 186}, + { 156, 293, 74, -338, -475, -897, -594, -161, -497}, + { 226, 131, -138, 307, 169, -271, -164, -387, -624}, + { 62, -32, -61, -252, -541, -828, -1027, -523, -662}, + { 102, -61, 141, 112, -270, -251, -541, 25, -150}, + { 6, -132, -356, -686, -96, -322, -522, -31, -326}, + { -36, -209, -521, -229, 307, -132, -5, -99, -384}, + { 60, -51, -237, -668, -973, -407, -708, -75, -172}, + { 26, -138, -266, 111, -302, 43, -278, -356, -359}, + { 570, 822, 496, -154, -312, -92, 137, 279, 371}, + { -146, 368, 409, 68, 6, 77, 167, 202, 162}, + { 633, 898, 996, 756, 662, 683, 783, 909, 996}, + { -103, 294, 607, 415, 483, 462, 480, 431, 408}, + { -120, -338, -612, -524, 584, 331, 92, 433, 276}, + { -178, -293, -154, -41, 269, 100, -9, 213, 160}, + { 830, 736, 278, 820, 1254, 686, 712, 1039, 473}, + { -218, -304, 463, 454, 397, 273, 202, 286, 273}, + { -232, 7, 6, -388, -472, -427, -378, -167, -100}, + { -294, -183, 134, -47, 101, -88, -84, -117, -3}, + { 57, 17, -202, -634, -989, -1119, -533, 176, -36}, + { 120, -28, 23, 111, -319, 318, -22, -77, 266}, + { -271, -464, -434, -658, -640, -385, -385, -99, -69}, + { -198, -259, -266, -44, -39, -139, -137, 171, 66}, + { 9, -145, -377, -846, -1000, -111, -325, 342, 135}, + { -81, -286, -380, 192, -57, 307, 76, -24, -140}, + { 677, 702, 247, 56, 249, 141, -105, -236, -99}, + { 36, -39, -69, 348, 198, -93, 322, 91, -72}, + { 503, 885, 1508, 1307, 1282, 1172, 1119, 1209, 1061}, + { 416, 719, 989, 1227, 1001, 1052, 954, 741, 1044}, + { -127, -376, -657, 139, 623, 223, 501, 306, 220}, + { -113, -384, -796, 504, 438, 85, 213, -83, -194}, + { 585, 1132, 1233, 1091, 1247, 1433, 1512, 1448, 1314}, + { -174, -422, 7, 1155, 1089, 1182, 1003, 945, 806}, + { 8, -126, -317, -103, -351, -695, -98, -268, -537}, + { 33, -103, -290, 167, -39, -407, 44, -208, -375}, + { 104, -23, -64, -291, -637, -851, -1084, -61, -112}, + { -75, -306, -434, 218, -148, -354, -680, -133, -216}, + { -121, -377, -718, -97, -130, -361, -156, -379, -599}, + { -56, -254, -586, 235, 157, -214, 11, -260, -149}, + { -124, -267, -397, -580, -593, -527, -805, -385, 346}, + { -193, -440, -708, -351, -141, -255, -499, -147, -185}, + { 448, 660, 494, 208, 509, 461, 338, 291, 149}, + { -223, 88, 335, 159, 212, 191, 286, 308, 205}, + { -31, 469, 803, 659, 619, 658, 843, 987, 1113}, + { -171, -242, 514, 362, 295, 524, 552, 694, 585}, + { -64, -308, -448, -21, 284, 786, 446, 289, 92}, + { -218, -390, -7, 169, 206, 330, 352, 408, 358}, + { -36, 702, 959, 859, 861, 1115, 1269, 1357, 1305}, + { -133, -341, -65, 678, 417, 440, 486, 518, 780}, + { 33, -44, -191, -344, -461, -755, -201, 217, -31}, + { -353, -547, -44, 123, -61, -68, -79, 29, 60}, + { 73, -57, -406, -766, -1243, -1203, 240, 400, 165}, + { -73, -282, -601, -213, -171, -375, 332, 35, -103}, + { -29, -207, -553, -476, -638, -908, 172, -22, -135}, + { -192, -239, -164, -103, -111, -47, 153, 125, 110}, + { -1, -203, -570, -1030, -1424, -535, 155, 1, 147}, + { -333, -653, -865, -197, -158, -21, -44, 95, 108}, + { 389, 588, 490, 33, -237, -524, -628, -136, -260}, + { 40, -177, -462, 453, 862, 380, 131, -130, -405}, + { 842, 1678, 1841, 1549, 1474, 1256, 1082, 905, 742}, + { 370, 1216, 1768, 1633, 1212, 636, 22, -330, 71}, + { -76, -281, -741, -742, 898, 619, 277, 71, -222}, + { -32, -265, -556, -25, 994, 682, 305, 126, -165}, + { 73, 738, 893, 968, 993, 1768, 2273, 1840, 1391}, + { -69, -349, -585, 234, 1158, 903, 626, 510, 251}, + { -1, -99, -272, -210, -603, -351, -540, -811, -383}, + { -16, -230, -504, 410, 149, -205, -343, -651, -639}, + { 103, -9, -227, -205, -562, -781, -1079, -1208, -156}, + { 143, 63, -135, -67, -317, -602, -784, -1154, -640}, + { -144, -391, -674, -622, -200, -254, -660, -947, -395}, + { -40, -250, -625, 27, 543, 94, -131, -386, -673}, + { -123, -371, -757, -451, -564, -614, -415, -711, -35}, + { -116, -309, -593, -268, 239, -33, -338, -650, -135}, + { 94, 251, 554, 57, -312, -423, -154, -57, 235}, + { -268, -71, 381, 114, -44, -87, 125, 173, 133}, + { 1513, 1714, 1238, 534, 276, 315, 461, 459, 508}, + { -131, -19, 1149, 670, 486, 356, 309, 369, 296}, + { -223, -501, -899, -722, -70, 6, 131, 310, 394}, + { -99, -303, -517, 249, 64, -53, 135, -11, 453}, + { -147, -399, -730, -401, 817, 738, 802, 749, 575}, + { -154, -435, -739, 800, 593, 366, 529, 318, 326}, + { -224, 45, -39, -387, -515, -518, -608, -384, -321}, + { -315, -377, 143, -101, -113, -377, -177, -144, -12}, + { 117, 40, -239, -651, -1051, -581, -737, -990, -328}, + { 26, -50, -157, -23, -453, -283, -531, -546, 192}, + { -252, -501, -743, -589, -627, -499, -328, -118, -72}, + { -324, -494, -244, -306, -144, -177, -262, -135, -78}, + { -36, -234, -519, -961, -1290, -314, -479, -371, -45}, + { -95, -292, -535, -8, -300, 112, -164, -277, 198}, + { -99, -128, 880, 836, 579, 351, 23, -95, -217}, + { -27, -258, 124, 1011, 597, 425, 144, 7, -73}, + { 421, 1293, 1640, 1623, 1742, 1617, 1499, 1284, 1006}, + { -95, 752, 1680, 1569, 1618, 1436, 1200, 980, 712}, + { -69, -300, -683, -435, 1132, 899, 504, 332, 109}, + { -74, -323, -637, 563, 1074, 608, 371, 105, -49}, + { -78, 831, 1194, 1110, 1378, 1481, 1492, 1365, 1217}, + { -259, -121, 1440, 1334, 1628, 1490, 1438, 1223, 933}, + { -82, -306, -613, -222, -378, -675, -545, -671, -845}, + { 53, -124, -347, 422, 52, -125, -270, -529, 9}, + { 79, -89, -320, -662, -999, -1199, -1243, -676, -297}, + { -68, -273, -611, 137, -146, -397, -627, -845, -220}, + { -112, -346, -797, -826, 234, -132, -188, -278, -522}, + { -159, -405, -734, -419, 293, 74, -167, -167, 184}, + { -153, -437, -833, -1080, -336, -472, -561, -340, -253}, + { -169, -423, -820, -904, -131, -19, -346, -604, 31}, + { 33, -31, 312, 62, -148, 49, -59, 564, 486}, + { -306, -333, 194, -44, 67, 72, 147, 205, 243}, + { -207, -49, 1360, 983, 969, 991, 1014, 1110, 973}, + { -211, -172, 883, 627, 711, 674, 705, 798, 746}, + { -88, -325, -763, -974, 687, 908, 514, 382, 172}, + { -292, -612, -805, 63, 131, 270, 259, 352, 348}, + { -235, -84, 955, 818, 1120, 1289, 1559, 1480, 1285}, + { -180, -461, -614, 657, 691, 745, 854, 783, 713}, + { -97, -309, -477, -614, -777, -734, -768, -526, -472}, + { -344, -476, -35, -169, 49, -77, -150, -240, -141}, + { -52, -268, -639, -919, -1278, -1113, -342, -333, -151}, + { -68, -242, -585, -73, -209, -478, -159, -429, 133}, + { -197, -499, -1005, -1268, -272, -224, -105, -67, 17}, + { -363, -618, -414, -116, -62, 20, 10, 116, 108}, + { -195, -475, -906, -1260, -891, -441, -277, -142, -28}, + { -226, -519, -950, -700, -275, -266, -116, -105, 82}, + { 404, 511, 520, 327, 17, -194, -333, -536, -586}, + { -114, -130, 276, 237, 204, 342, 135, -16, -111}, + { 670, 1208, 1168, 860, 742, 601, 528, 403, 309}, + { 397, 621, 966, 752, 579, 398, 400, 329, 252}, + { 191, 180, -137, -467, 272, 106, -95, 17, -192}, + { -80, -290, -626, 194, 598, 196, 21, -281, 77}, + { 510, 864, 1108, 807, 939, 902, 925, 717, 481}, + { 137, 367, 534, 764, 670, 382, 296, 153, 84}, + { 303, 497, 144, -85, -125, -539, -482, -464, -764}, + { 233, 347, 68, -147, 169, -210, -242, -226, -482}, + { 307, 422, 154, -175, -386, -722, -724, -904, -1015}, + { 309, 308, 160, -60, -470, -420, -598, -791, -219}, + { 68, 121, -137, -560, -146, -446, -515, -494, -729}, + { 130, 53, -227, 46, 474, 32, -161, -192, -490}, + { 213, 164, -71, -465, -876, -161, -456, -587, -48}, + { 218, 117, 39, 177, -194, -88, -226, -418, 50}, + { 210, 547, 569, 279, 121, -44, -50, 10, -84}, + { 58, 140, 182, -5, 267, 117, 106, 211, 198}, + { 539, 835, 913, 719, 617, 544, 591, 565, 642}, + { 153, 559, 872, 460, 222, 108, 188, 180, 183}, + { 158, 119, 284, -153, -271, 229, 87, 110, -57}, + { -183, 82, 118, 21, 13, 40, 118, 191, 185}, + { 162, 889, 654, 108, -34, 244, 488, 561, 532}, + { 163, 56, 609, 341, 50, 329, 68, 266, 218}, + { 100, 206, 18, -304, -107, -436, -487, -65, -306}, + { -86, 154, 134, -30, -45, -73, -104, -80, -96}, + { 245, 330, 10, -440, -849, -1082, 79, 40, -265}, + { 196, 372, 272, -181, -493, -389, 275, 80, -59}, + { 2, -12, -246, -505, -100, -436, 21, -187, -431}, + { -221, -48, 36, -271, -186, -147, -109, 26, 71}, + { 213, 140, 72, -351, -620, -84, -363, 69, 46}, + { 91, 167, -3, -95, -99, -105, -48, 114, 147}, + { 259, 249, 172, 607, 406, 52, 59, -189, -320}, + { 115, -85, -54, 574, 128, 226, -59, -253, 130}, + { -62, 1033, 1308, 1035, 1127, 1098, 1029, 961, 823}, + { 39, 364, 757, 940, 728, 660, 659, 583, 770}, + { -115, -338, -760, -471, 394, 37, 441, 178, 6}, + { -57, -305, -525, 796, 453, 188, -4, -114, 248}, + { 71, 444, 797, 731, 1096, 1157, 1222, 1029, 811}, + { 135, 359, 551, 425, 749, 815, 874, 704, 502}, + { 132, 247, 0, -206, -449, -750, -258, -514, -633}, + { 248, 249, 91, 121, -195, -499, -90, -282, -435}, + { 78, 20, -277, -623, -983, -1224, -415, -458, -639}, + { 347, 509, 208, -179, -464, -728, -76, -237, -486}, + { -103, -343, -756, -713, -265, -609, -191, -398, -636}, + { -121, -383, -749, 567, 252, -36, -354, -417, -50}, + { 204, 100, -149, -650, -1081, -47, -7, -263, 111}, + { -46, -180, -267, -324, -562, -394, -692, 398, 292}, + { 482, 670, 683, 624, 442, 165, 116, 36, -149}, + { 108, 247, 291, 247, 355, 122, 109, 224, 296}, + { -14, 945, 990, 801, 755, 815, 847, 913, 892}, + { 292, 349, 725, 482, 388, 329, 429, 620, 667}, + { -34, 197, 213, -127, 84, 494, 620, 575, 375}, + { 126, 207, 172, 167, 362, 202, 296, 395, 455}, + { -6, 250, 539, 467, 636, 801, 1149, 1287, 1118}, + { 27, 240, 369, 280, 440, 411, 634, 892, 953}, + { 159, 170, -58, -395, -797, -690, 77, -211, -334}, + { -5, -28, -13, -74, -335, -603, 300, 88, -205}, + { 82, -33, -364, -698, -1203, -1153, 110, -146, -289}, + { 113, 1, -243, -588, -994, -496, 414, 160, 42}, + { -56, -247, -440, -693, -996, -479, 11, -178, -357}, + { -151, -353, -327, -211, -340, 141, 65, 425, 453}, + { 34, -169, -455, -932, -1215, 138, 499, 256, 324}, + { 68, 139, -15, -547, -478, 17, 306, 502, 481}, + { -32, -134, 445, 129, -143, -244, -503, -507, -599}, + { 61, -140, -345, 496, 458, -2, 20, -227, -514}, + { 394, 1765, 1666, 1339, 1117, 806, 642, 479, 380}, + { 215, 519, 920, 1053, 1090, 791, 528, 290, 155}, + { -54, -233, -647, -602, 639, 294, -2, -167, -442}, + { -78, -315, -791, -113, 820, 403, 158, -116, -356}, + { 529, 1851, 2003, 1228, 622, -41, -416, 344, 819}, + { -105, -379, -236, 1224, 893, 749, 568, 356, 214}, + { -17, -199, -144, 50, -283, -247, -578, -846, -1087}, + { 69, -11, -381, -206, 209, -284, -387, -416, -716}, + { 39, -5, -145, -374, -682, -909, -1074, -1169, -1066}, + { 287, 226, 67, -221, -662, -171, -421, -642, -707}, + { -132, -348, -538, -448, -20, -4, -354, -748, -933}, + { 4, -75, -289, -598, 317, 52, -208, -297, -559}, + { -88, -264, -358, -589, -631, -248, -523, -822, -1071}, + { 70, -8, 54, -314, -515, 92, -146, -274, -493}, + { 199, 62, 391, 158, -141, 71, -219, -203, -207}, + { 152, 40, 329, 162, -29, 48, -149, 108, 127}, + { 635, 1058, 883, 492, 372, 312, 317, 274, 241}, + { 267, 722, 1256, 882, 625, 248, 8, -81, -60}, + { -58, -138, -291, -600, -12, -2, -39, 147, 117}, + { -107, -345, -513, 459, 76, 92, -272, 388, 262}, + { 362, 516, 203, -409, -716, -831, -331, 185, 209}, + { -117, -391, -298, 671, 292, 538, 257, 166, -38}, + { -102, -319, -194, -283, -573, -262, -579, -219, -444}, + { -235, 78, 11, -168, -101, -229, -263, -321, -123}, + { 70, 50, -170, -599, -996, -588, -263, -516, -455}, + { 394, 363, 229, -136, -538, 21, -183, -348, -201}, + { -124, -368, -640, -879, -847, -209, -409, -494, -515}, + { -127, -341, -541, -425, -510, -10, -252, -473, -291}, + { 84, -69, -201, -676, -868, 103, -311, -132, -320}, + { 5, -173, -188, -297, -628, 197, -57, 7, -11}, + { 49, -160, 56, 558, 111, 33, -311, -440, -463}, + { -1, -246, -307, 862, 453, 139, -170, -355, -232}, + { 279, 966, 1642, 1478, 1463, 1123, 795, 525, 339}, + { -197, -38, 1702, 1331, 1252, 950, 692, 504, 426}, + { -108, -344, -861, -1172, 444, 354, 88, -46, -220}, + { -53, -321, -494, 1113, 744, 364, 198, -34, -75}, + { 457, 955, 1177, 1214, 1427, 1457, 1345, 917, 539}, + { -69, 199, 897, 1140, 1343, 1183, 977, 742, 522}, + { 122, 44, -269, 27, -155, -562, -307, -590, -773}, + { 154, 42, -160, 252, -129, -305, -471, -733, -371}, + { 135, 185, -82, -416, -722, -913, -504, -743, -880}, + { 149, 214, -84, -329, -680, -835, -426, -661, -81}, + { -128, -380, -735, -998, -337, 17, -182, -467, -697}, + { -84, -290, -510, -592, 13, 440, 154, -38, -279}, + { 70, -61, -246, -727, -1047, -80, -381, -535, -704}, + { 178, -2, -146, -670, -938, 482, 138, 63, 65}, + { -11, 15, 772, 443, 142, -20, -209, -126, -161}, + { -32, -249, 95, 552, 124, 30, -343, 82, -86}, + { 148, 751, 1515, 1105, 867, 606, 474, 448, 399}, + { -163, -257, 899, 1097, 906, 751, 502, 390, 294}, + { -51, -258, -447, -806, -368, 763, 464, 364, 183}, + { -166, -374, -367, 87, 35, 399, 418, 856, 833}, + { -205, -310, 588, 778, 785, 1065, 1118, 1245, 1157}, + { -173, -312, 107, 345, 400, 790, 870, 1113, 1001}, + { -7, -120, -387, -410, -614, -943, -226, -384, -491}, + { -203, -288, -51, -331, -90, -178, -408, -573, -338}, + { 56, -29, -273, -627, -1041, -798, -247, -467, 148}, + { 66, -2, -205, -205, -575, -349, -57, -352, -58}, + { -45, -225, -471, -924, -497, 77, -32, 44, -135}, + { -277, -491, -497, -502, -424, -202, -137, 77, 96}, + { 26, -179, -469, -1008, -1260, 262, -35, -132, -259}, + { -66, -232, -447, -533, -789, -191, -100, -267, 364} +}; + +static const int16_t dico2_isf[256][7] = { + { 1357, 1313, 1136, 784, 438, 181, 145}, + { 636, 648, 667, 568, 442, 217, 362}, + { 427, 440, 674, 524, 332, 117, -417}, + { 121, 295, 468, 465, 230, 44, -221}, + { -147, -240, 149, 80, 390, 278, 106}, + { -418, -556, 552, 511, 235, 144, -95}, + { 43, 193, 274, 150, 67, 34, -273}, + { -43, -126, 171, 416, 282, 63, -354}, + { -372, -86, -344, -108, -94, -182, -89}, + { -600, -840, -200, 465, 258, -11, -253}, + { -48, 329, 97, -290, -543, -795, -354}, + { -570, -117, 187, 10, -133, -416, -76}, + { -618, -129, -247, -371, 45, -76, 277}, + { -1022, -1079, 126, 474, 254, 127, 52}, + { -281, 76, -167, -361, -283, -551, -283}, + { -119, -52, -1, 134, -32, -204, -415}, + { 1064, 827, 637, 684, 464, 209, 12}, + { 482, 416, 449, 371, 335, 294, 194}, + { 719, 576, 365, 135, 113, 91, -199}, + { 298, 176, 493, 366, 194, 163, 36}, + { -35, -236, -259, -36, -4, 99, 152}, + { -98, -306, -27, 228, 90, 111, -86}, + { 91, 13, -211, -258, -106, 86, -64}, + { 73, -35, -57, -31, 162, 35, -192}, + { -109, -335, -629, -66, -61, -128, 322}, + { -495, -669, -728, 193, 31, -220, 122}, + { 324, 95, -89, -91, -409, -710, -154}, + { 0, -234, 92, 33, -343, -609, -220}, + { -343, -408, -476, -655, -153, 82, 222}, + { -490, -745, -255, 49, -48, 135, -127}, + { 119, -67, -328, -390, -272, -545, -56}, + { -57, -130, -10, -7, -164, -47, -22}, + { 984, 1064, 961, 568, 210, -27, 16}, + { 811, 691, 754, 514, 224, -35, 166}, + { 662, 704, 618, 386, 57, -211, -257}, + { 510, 359, 418, 393, 91, -144, -18}, + { -193, -31, -27, 223, 89, -143, 24}, + { -112, -98, 471, 319, 185, 3, 175}, + { 252, 146, -47, 272, 48, -211, -234}, + { 146, 69, 203, 364, 68, -52, 51}, + { -259, -478, -697, -349, -758, -501, 63}, + { -501, -769, -289, 79, -311, -497, -106}, + { 251, 53, -235, -469, -895, -884, 145}, + { -416, -551, 140, -133, -523, -775, 44}, + { -326, -423, -713, -497, -86, -431, 99}, + { -757, -772, -160, -76, -46, -32, 379}, + { 85, -35, -200, -401, -663, -1040, -247}, + { -180, -330, -92, -376, 27, -183, -110}, + { 1279, 1086, 781, 502, 324, 164, 157}, + { 682, 466, 449, 277, 146, 28, 409}, + { 635, 472, 390, 107, -232, -538, -139}, + { 196, 396, 332, 213, 209, -29, -81}, + { 150, -95, -312, 76, -77, -320, -50}, + { 46, 9, 47, 175, 139, 30, 384}, + { 218, 206, -24, -250, -96, -276, -183}, + { 26, 119, 38, 14, -4, -133, -52}, + { -477, -614, -987, -715, -631, -813, 200}, + { -744, -1009, -1065, -745, -631, -171, 18}, + { -137, -251, -483, -613, -980, -1203, 12}, + { -605, -767, -562, -686, -1088, -515, 58}, + { -202, -428, -782, -1072, -96, -234, -179}, + { -480, -709, -1070, -897, -131, -92, 321}, + { -145, -193, -512, -729, -572, -765, -210}, + { -331, -585, -525, -631, -281, -208, -303}, + { 1165, 1104, 939, 828, 716, 426, 155}, + { 6, -109, 820, 778, 415, 113, -27}, + { 381, 339, 314, 265, 121, -9, -474}, + { -373, 47, 584, 442, 99, -231, -113}, + { -496, -38, -285, 262, 305, 170, 4}, + { -587, -556, 69, 66, 471, 354, 13}, + { -138, 70, -18, 106, 67, 167, -302}, + { -445, -141, 185, 191, 151, 83, -133}, + { -257, -521, -720, -198, 134, -46, -182}, + { -819, -1168, -777, 512, 359, 95, -113}, + { 137, -2, -74, -138, -401, -114, -371}, + { -242, -466, 204, 223, -31, -212, -192}, + { -532, -637, -466, -686, 256, 277, -139}, + { -1141, -1244, -381, -75, -54, 14, 88}, + { -311, 115, -143, -499, -343, 124, -416}, + { -616, -147, -135, 43, -4, 121, -369}, + { 835, 783, 641, 390, 355, 350, 64}, + { 72, 194, 443, 467, 436, 219, 372}, + { 464, 369, 192, 4, -156, -72, -226}, + { 57, 206, 303, 205, 188, 101, 265}, + { -40, -205, -488, -184, 276, 64, -26}, + { -217, -433, -297, 137, 328, 308, -289}, + { 378, 81, -308, -465, 57, -37, 227}, + { -100, 24, -36, -151, 199, 8, 143}, + { -426, -697, -1059, -133, 388, 161, 321}, + { -644, -1023, -1271, 39, 66, -123, 70}, + { 372, 177, -173, -556, -553, -304, -189}, + { -117, -369, -425, -122, -462, -152, -73}, + { -649, -850, -1189, -767, 497, 360, 222}, + { -798, -1139, -1455, -190, 430, 234, 179}, + { 42, -94, -405, -692, 38, -202, -246}, + { -169, -366, -290, -88, -64, 32, -292}, + { 1010, 923, 938, 710, 465, 230, 342}, + { 217, 300, 1054, 675, 68, -458, -179}, + { 78, 453, 316, 18, -237, -496, -243}, + { 167, 21, 424, 215, -91, -303, -170}, + { -290, -81, -70, -67, 40, 54, -59}, + { -353, -427, -90, 53, 94, 9, 54}, + { -28, 318, 283, 15, -240, -58, 79}, + { -75, -121, 229, 35, 58, 6, -133}, + { -351, -514, -744, -834, -705, -137, 164}, + { -1124, -1388, -1055, -230, -73, 40, 36}, + { -163, -233, -532, -785, -1170, -697, 96}, + { -788, -959, -246, -430, -624, -165, -8}, + { -856, -540, -630, -907, -337, -70, 76}, + { -937, -1042, -659, -733, -208, 199, -26}, + { -523, 78, -98, -501, -869, -890, -81}, + { -624, -703, -45, -348, -25, 87, -186}, + { 1005, 823, 546, 249, 90, -22, 207}, + { 298, 397, 381, 319, 200, 62, 303}, + { 473, 379, 133, -247, -632, -441, 75}, + { 284, 208, 391, 115, -25, 44, 95}, + { -72, 79, -95, -63, -129, -293, 203}, + { -164, -349, 115, 122, 69, -1, 378}, + { 348, 170, 99, 58, -179, -302, 188}, + { -190, -2, 150, 23, -51, -11, 216}, + { -615, -863, -1090, -1427, -802, -48, -6}, + { -961, -1276, -1548, -727, -58, 56, 223}, + { -124, -255, -561, -988, -1277, -148, -82}, + { -480, -660, -891, -1191, -1339, -325, 20}, + { -621, -917, -1296, -1350, 264, 289, 50}, + { -844, -1022, -1345, -1329, -293, 46, 278}, + { -260, -468, -829, -1176, -533, -560, -78}, + { -215, -484, -822, -1233, -791, 15, -138}, + { 1301, 1317, 1262, 1048, 716, 357, -64}, + { 578, 824, 925, 802, 630, 362, 102}, + { 470, 925, 767, 514, 327, 190, -112}, + { 225, 492, 495, 437, 598, 384, -45}, + { 43, 82, -42, 175, 519, 342, -64}, + { -304, -154, 159, 576, 403, 221, 327}, + { 214, 244, 122, -62, 312, 92, -160}, + { 218, 208, 310, 268, 306, 323, -199}, + { -285, -269, -79, -124, -143, -153, 236}, + { -205, -384, -426, 344, 59, -185, -184}, + { -272, 247, 126, -210, -518, -468, 78}, + { -99, -120, 502, 160, -280, -557, 304}, + { -423, -17, -283, -443, 215, 212, -140}, + { -564, -684, -228, 510, 361, 130, 323}, + { -428, 335, 98, -65, 36, -215, -246}, + { -362, 51, 364, -16, -234, 150, -165}, + { 914, 883, 751, 653, 676, 464, -153}, + { 631, 545, 535, 720, 596, 360, -81}, + { 783, 712, 512, 439, 341, 251, -391}, + { 497, 417, 249, 372, 295, 173, -193}, + { 128, -110, -385, 93, 39, 173, -231}, + { 216, -59, -253, 462, 389, 154, 69}, + { 455, 270, -4, -337, -49, 233, -322}, + { 307, 143, 53, 218, 128, 236, -156}, + { -37, -186, -240, -411, -110, 9, 399}, + { -140, -365, -628, 258, 380, 214, 277}, + { 131, 454, 177, -285, -520, 108, -214}, + { 77, -141, 201, -123, -490, -131, 60}, + { -14, -194, -521, -741, 273, 362, -33}, + { -362, -566, -287, -228, 161, 237, 317}, + { -269, 195, -75, -375, -204, 11, 77}, + { -128, -264, -156, -223, -475, 265, 27}, + { 1238, 1147, 916, 689, 432, 210, -280}, + { 800, 664, 879, 726, 411, 160, -164}, + { 454, 686, 536, 275, 147, 46, 111}, + { 303, 486, 512, 355, 241, 181, -69}, + { 79, 92, 29, 147, 233, 52, 17}, + { -171, 289, 131, 439, 271, 3, -10}, + { 413, 241, 144, 174, 155, -2, 14}, + { 58, 217, 247, 219, 149, 175, -18}, + { 228, -8, -240, -206, -513, -191, 202}, + { -96, -272, -454, 33, -300, -575, 46}, + { -10, -108, -246, -347, -770, -535, 9}, + { -326, -430, -61, -321, -704, -299, 201}, + { -1, -280, -603, -419, -185, 18, -36}, + { -516, -522, -379, -291, -181, -97, 27}, + { -159, -313, -525, -224, -510, -831, -197}, + { -292, -459, -59, -310, -562, -143, -351}, + { 1066, 912, 631, 389, 207, 86, -224}, + { 596, 512, 596, 505, 314, 122, -48}, + { 787, 861, 441, -93, -303, 33, -190}, + { 257, 469, 337, 51, 15, 298, -93}, + { 295, 73, -119, 25, 36, 23, 108}, + { -28, -3, -32, 114, 21, 185, 107}, + { 482, 305, 15, -279, -319, 52, 96}, + { 226, 46, 115, 72, -136, 133, -125}, + { 18, -207, -559, -590, -503, -482, 321}, + { -571, -789, -951, -172, -441, -538, 113}, + { 181, 14, -310, -641, -1001, -202, 159}, + { -136, -393, -433, -513, -911, -144, -22}, + { 72, -265, -706, -954, -159, 53, 332}, + { -338, -591, -852, -383, -395, 56, 44}, + { 43, -158, -464, -897, -631, -157, -294}, + { -161, -128, -328, -573, -483, -125, 11}, + { 1017, 906, 1051, 1005, 679, 341, -102}, + { 359, 334, 1567, 1314, 723, 105, 10}, + { -65, 726, 529, 301, 220, 43, -273}, + { -510, 436, 719, 566, 358, 179, 114}, + { -560, 298, 133, -120, 342, 225, 14}, + { -899, -101, 217, 617, 400, 146, -58}, + { -41, 352, 82, -196, 39, 121, -167}, + { -212, 59, 447, 284, 423, 250, -169}, + { -371, -484, -596, 30, -41, 249, 22}, + { -372, -650, -794, 477, 445, 216, -79}, + { -352, 275, 17, -443, -929, 92, 19}, + { -699, -696, 431, 264, -49, -310, 182}, + { -978, -217, -430, -400, 101, 261, 72}, + { -929, -889, -357, -13, 463, 378, 236}, + { -826, 56, 30, -299, -360, -128, -51}, + { -878, -299, -111, 75, 65, 36, 3}, + { 817, 368, -25, 354, 697, 591, -173}, + { 309, 212, 222, 751, 484, 140, -56}, + { 593, 379, 70, -8, 258, 180, 110}, + { 165, -46, 255, 297, 219, 273, 105}, + { 160, -70, -358, -181, 379, 330, 319}, + { -238, -369, -198, 740, 580, 319, -143}, + { 201, 109, -202, -456, 328, 276, -141}, + { 203, 170, 111, 42, 207, 360, 188}, + { -345, -399, -513, -233, 650, 422, 81}, + { -635, -961, -1220, 463, 539, 204, 209}, + { 202, -25, -194, -498, -787, 193, -143}, + { -449, -538, 195, -106, -331, 68, 62}, + { -228, -477, -840, -576, 317, 128, 283}, + { -671, -937, -807, -114, 391, 335, -62}, + { 246, 2, -314, -679, -303, 180, -88}, + { -107, -272, 90, -198, -28, 290, -112}, + { 885, 1149, 1021, 712, 496, 281, -83}, + { 269, 492, 787, 643, 347, 70, 124}, + { 336, 636, 499, 92, -229, -179, 191}, + { 26, 402, 564, 340, 149, -11, 135}, + { -440, 561, 470, 204, -72, -186, 140}, + { -720, 14, 355, 229, 68, -133, 465}, + { 110, 310, 103, 12, 106, 29, 158}, + { -178, 113, 161, 142, 121, 115, 27}, + { -651, -414, -645, -152, -164, -13, -429}, + { -639, -944, -681, -104, -81, 52, -189}, + { -663, -164, -316, -683, -954, -205, -83}, + { -609, -669, -172, -517, -694, 283, -80}, + { -646, -152, -383, -678, -246, -40, -143}, + { -747, -796, -745, -390, -98, 43, 275}, + { -599, -199, -398, -433, -436, -538, 31}, + { -1107, -568, -376, -265, -126, -21, 1}, + { 847, 573, 308, 392, 305, 101, 55}, + { 273, 293, 201, 267, 346, 201, 123}, + { 727, 480, 226, 2, -65, -138, 164}, + { 273, 208, 173, 292, 12, 253, 174}, + { 340, 207, 180, 88, 116, 46, 475}, + { -460, -166, -30, 13, 110, 173, 396}, + { 137, 88, 43, -137, -94, 34, 284}, + { 96, -14, 226, 40, 63, 70, 130}, + { -467, -735, -1012, -1174, -307, 305, -67}, + { -612, -920, -1146, -567, -8, 92, -25}, + { -182, -271, -492, -754, -857, 287, -75}, + { -494, -787, -689, -683, -709, 137, -326}, + { -288, -550, -903, -1105, 334, 321, -62}, + { -354, -653, -834, -445, 1, 377, -152}, + { -162, -306, -608, -937, -297, 247, -192}, + { -234, -477, -244, -488, -266, 342, -332} +}; + +static const int16_t dico21_isf[64][3] = { + { 329, 409, 249}, { -33, 505, 160}, + { -29, -14, 582}, { -262, 127, 354}, + { 145, 237, 175}, { -152, 245, 122}, + { 27, 42, 340}, { -84, -93, 311}, + { 285, 222, -156}, { 47, -43, -504}, + { 234, 121, 385}, { 104, -317, 45}, + { 176, 195, 8}, { 104, -59, -94}, + { 177, 53, 192}, { -34, -127, 152}, + { 570, 277, -34}, { -67, -329, -639}, + { -157, -272, 462}, { -177, -462, 198}, + { 322, 179, 115}, { -386, 171, 19}, + { 19, -12, 195}, { -120, -252, 201}, + { 304, 36, -336}, { -128, -221, -380}, + { 171, -185, 296}, { -242, -312, 23}, + { 198, 39, 16}, { -3, -177, -111}, + { 111, -93, 76}, { -92, -223, 4}, + { 177, 406, -44}, { -168, 380, -149}, + { -4, 273, 331}, { -420, 513, 277}, + { 21, 247, 47}, { -58, 131, -2}, + { -3, 134, 180}, { -145, 40, 175}, + { 189, 74, -145}, { -27, -45, -325}, + { 370, -114, -21}, { -83, -415, -173}, + { 77, 95, -51}, { -40, -30, -67}, + { 71, 88, 86}, { -35, -98, 14}, + { 69, 197, -334}, { -196, 79, -231}, + { -348, -137, 218}, { -352, -89, -85}, + { 47, 201, -130}, { -165, 37, -15}, + { -43, 3, 86}, { -161, -108, 79}, + { 83, 21, -237}, { -81, -149, -238}, + { 150, -186, -251}, { -186, -249, -162}, + { -19, 66, -139}, { -26, -50, -181}, + { 24, 11, 0}, { -130, -105, -98} +}; + +static const int16_t dico22_isf[128][3] = { + { -127, 310, 42}, { -242, 197, 5}, + { -151, 84, -17}, { -214, 127, -149}, + { -247, -131, 159}, { -268, -267, -95}, + { -217, 1, -79}, { -271, -80, -185}, + { -45, 436, 159}, { 165, 199, 391}, + { -33, 81, 187}, { -66, -42, 355}, + { -298, -57, 343}, { -108, -537, 226}, + { -144, -23, 193}, { 176, -402, 87}, + { 53, 296, 25}, { -84, 253, -104}, + { -58, 105, -126}, { -169, 174, -314}, + { -48, 44, -294}, { -164, -417, -242}, + { -139, 3, -194}, { -155, -207, -211}, + { 119, 322, 213}, { 333, 50, 380}, + { 237, 247, -2}, { 466, -16, 201}, + { 238, -255, -107}, { 67, -440, -149}, + { 122, -88, -139}, { 88, -247, -73}, + { -41, 231, 167}, { -62, 155, 16}, + { -65, 16, 77}, { -68, -2, -63}, + { -151, -300, 160}, { -18, -333, 54}, + { -56, -94, 5}, { 2, -190, 14}, + { 92, 148, 209}, { 108, 9, 272}, + { 108, 35, 110}, { 142, -85, 145}, + { 47, -157, 279}, { 3, -320, 246}, + { 43, -72, 68}, { 86, -217, 135}, + { 36, 140, 79}, { 56, 175, -49}, + { 26, 45, 3}, { 73, 55, -101}, + { 109, -183, -242}, { -4, -283, -242}, + { 48, -68, -48}, { -6, -153, -122}, + { 161, 196, 96}, { 232, 80, 190}, + { 165, 97, 11}, { 258, -31, 71}, + { 267, -77, -91}, { 311, -209, 87}, + { 152, -14, -22}, { 150, -149, 9}, + { -324, 557, 187}, { -384, 307, 46}, + { -251, 27, 77}, { -365, 77, -52}, + { -482, -84, 160}, { -424, -515, -64}, + { -294, -120, -4}, { -476, -116, -109}, + { -97, 318, 365}, { 106, 627, 445}, + { -190, 120, 287}, { -146, 65, 619}, + { -427, 242, 363}, { -361, -371, 432}, + { -347, 102, 168}, { -629, 195, -14}, + { -65, 476, -47}, { -297, 320, -168}, + { -55, 356, -264}, { -391, 82, -286}, + { -51, -31, -556}, { -178, -399, -586}, + { -205, -49, -360}, { -343, -238, -337}, + { 220, 457, 58}, { 561, 467, 259}, + { 340, 270, -168}, { 450, 77, -280}, + { 60, 167, -413}, { 133, -252, -492}, + { 216, 157, -290}, { 282, 0, -495}, + { -226, 293, 183}, { -157, 135, 122}, + { -158, -59, 39}, { -133, -118, -97}, + { -332, -309, 113}, { -160, -425, -6}, + { -149, -211, 24}, { -80, -277, -90}, + { -11, 125, 338}, { 130, -71, 465}, + { 5, -45, 184}, { 237, -95, 253}, + { -139, -197, 297}, { -19, -300, 511}, + { -63, -152, 139}, { 250, -289, 336}, + { 124, 339, -150}, { 34, 176, -208}, + { 171, 166, -116}, { 94, 38, -229}, + { 75, -65, -339}, { -78, -205, -385}, + { 0, -30, -163}, { -56, -110, -242}, + { 321, 244, 194}, { 505, 238, -1}, + { 317, 116, 65}, { 309, 88, -74}, + { 452, -51, -50}, { 334, -217, -290}, + { 211, 41, -152}, { 238, -55, -260} +}; + +static const int16_t dico23_isf[128][3] = { + { -10, 151, 359}, { 136, 298, 223}, + { 255, -104, 290}, { 423, 6, 183}, + { -270, -269, -98}, { -52, -82, 13}, + { -82, -274, -97}, { 90, -246, -72}, + { -299, -70, 421}, { -88, 365, 430}, + { 187, -318, 381}, { 380, 37, 488}, + { -373, -316, 79}, { -308, -101, 5}, + { -135, -451, 8}, { 72, -421, -154}, + { 180, 170, -121}, { 62, 177, -40}, + { 326, 80, -105}, { 248, 263, -5}, + { -168, -181, -221}, { -2, -23, -158}, + { -14, -149, -121}, { 119, -91, -147}, + { 119, 332, -153}, { 49, 303, 34}, + { 442, -55, -69}, { 217, 454, 58}, + { -359, -187, -375}, { -42, 50, -274}, + { -8, -267, -249}, { 85, -86, -346}, + { -77, -40, 345}, { 89, 134, 219}, + { 156, -80, 160}, { 108, 40, 116}, + { -158, -206, 29}, { 5, -32, 175}, + { -65, -158, 146}, { 55, -78, 73}, + { -114, -222, 353}, { -47, 81, 211}, + { 49, -151, 268}, { 105, 4, 302}, + { -263, -132, 183}, { -151, -28, 201}, + { -177, -307, 166}, { 101, -221, 130}, + { 74, 58, -98}, { 32, 44, 13}, + { 194, 30, -142}, { 170, 96, 8}, + { -136, -119, -91}, { -65, 8, -55}, + { 3, -188, 12}, { 45, -63, -49}, + { 149, -21, -19}, { 24, 144, 95}, + { 254, -22, 60}, { 161, 196, 96}, + { -158, -61, 48}, { -70, 33, 82}, + { -23, -321, 58}, { 155, -147, 5}, + { -364, 328, 77}, { -21, 453, 173}, + { -108, 82, 630}, { 367, 263, 208}, + { -300, -62, -176}, { -205, 143, -158}, + { -169, -410, -264}, { 257, -269, -100}, + { -636, 289, -2}, { -292, 627, 173}, + { -382, -363, 387}, { 248, 524, 447}, + { -521, -111, -107}, { -395, 118, -274}, + { -343, -680, -125}, { -172, -447, -663}, + { 75, 148, -367}, { -79, 263, -94}, + { 249, 148, -286}, { 380, 271, -162}, + { -142, -4, -186}, { -57, 111, -125}, + { -35, -108, -254}, { 100, 29, -242}, + { -80, 303, -264}, { -78, 464, -57}, + { 248, -22, -494}, { 661, 662, 44}, + { -193, -40, -330}, { -178, 145, -337}, + { -90, -199, -400}, { -40, -23, -498}, + { -192, 114, 315}, { -41, 244, 190}, + { 88, -97, 485}, { 241, 80, 212}, + { -246, 40, 87}, { -156, 147, 134}, + { -2, -334, 239}, { 308, -203, 110}, + { -459, 251, 422}, { -218, 310, 228}, + { -86, -346, 654}, { 184, 175, 425}, + { -481, -63, 169}, { -349, 117, 188}, + { -125, -560, 310}, { 158, -416, 94}, + { 46, 171, -192}, { -63, 157, 14}, + { 256, -35, -271}, { 322, 123, 53}, + { -214, 4, -76}, { -156, 86, -18}, + { 128, -197, -232}, { 265, -90, -98}, + { -308, 332, -145}, { -131, 308, 58}, + { 509, 59, -339}, { 562, 196, -14}, + { -378, 100, -47}, { -234, 202, 1}, + { 104, -270, -493}, { 319, -210, -325} +}; + +static const int16_t dico24_isf[32][3] = { + { -79, -89, -4}, { -171, 77, -211}, + { 160, -193, 98}, { 120, -103, 323}, + { 32, -22, -129}, { 72, 78, -268}, + { 182, -76, -66}, { 309, 99, -145}, + { -229, -157, -84}, { -383, 98, -71}, + { -90, -352, 12}, { -284, -178, 178}, + { -65, -125, -166}, { -87, -175, -351}, + { 42, -198, -48}, { 154, -140, -243}, + { -77, 18, 108}, { -39, 355, 91}, + { 87, 8, 155}, { -4, 158, 239}, + { 128, 95, -54}, { 7, 246, -124}, + { 258, 15, 89}, { 206, 216, 98}, + { -201, 9, 18}, { -312, 233, 204}, + { -39, -174, 155}, { -144, -9, 284}, + { -57, 70, -69}, { -157, 187, 18}, + { 54, -30, 23}, { 24, 135, 55} +}; + +static const int16_t dico25_isf[32][4] = { + { 169, 142, -119, 115}, { 206, -20, 94, 226}, + { -106, 313, -21, 16}, { -62, 161, 71, 255}, + { -89, 101, -185, 125}, { 72, -30, -201, 344}, + { -258, 33, -8, 81}, { -104, -154, 72, 296}, + { 144, -68, -268, -25}, { 81, -78, -87, 106}, + { 22, 155, -186, -119}, { -46, -28, 27, 91}, + { -114, -37, -175, -33}, { -94, -222, -189, 122}, + { -132, -119, -191, -270}, { -172, -173, 18, -43}, + { 279, 135, -42, -128}, { 187, -86, 229, -138}, + { 159, 240, 140, 46}, { 69, 25, 227, 77}, + { 21, 115, 13, 8}, { 68, -248, 126, 81}, + { -150, 137, 207, -9}, { -154, -133, 289, 67}, + { 143, -37, -86, -326}, { 180, -32, 19, -23}, + { 26, 168, 116, -233}, { -32, -26, 118, -78}, + { 3, -8, -45, -115}, { 57, -215, -54, -83}, + { -209, 112, -22, -167}, { -91, -151, 168, -262} +}; + +static const int16_t dico21_isf_36b[128][5] = { + { -52, -96, 212, 315, -73}, { 82, -204, 363, 136, -197}, + { -126, -331, 183, 218, 143}, { -49, -41, 557, 230, 72}, + { 2, -73, 163, 377, 221}, { 133, 111, 278, 215, -110}, + { -102, -20, 284, 113, 273}, { 84, 319, 290, 18, 85}, + { -25, -5, 125, 132, -204}, { -38, -5, 286, -9, -356}, + { -140, -256, 92, 117, -189}, { -144, 191, 313, 51, -98}, + { 167, -10, 44, 247, 36}, { 381, 197, 238, 74, 6}, + { 38, -408, 29, -3, -85}, { 92, 266, 157, -25, -200}, + { 161, -121, 70, 84, -140}, { -16, -86, 112, -94, -189}, + { -269, -270, 351, 107, -24}, { -68, -67, 492, -103, -155}, + { -53, -131, 62, 122, 10}, { 135, 84, 283, -55, -120}, + { -12, -219, 331, -81, 167}, { 220, -136, 147, -172, -42}, + { 140, -95, -109, -88, -194}, { 0, -2, -4, -33, -381}, + { -66, -217, 152, -186, -402}, { 244, 108, 156, -140, -395}, + { 113, -136, -196, 110, -24}, { 214, 118, 11, -64, -131}, + { -110, -286, -6, -332, 16}, { 94, 97, 79, -291, -205}, + { -5, -39, -20, 252, -96}, { 76, 174, 101, 163, 61}, + { -69, -239, -55, 399, 6}, { -115, 319, 164, 275, 196}, + { -15, 36, -47, 331, 121}, { 226, 209, 271, 325, 184}, + { 13, -80, -218, 471, 353}, { 288, 378, 16, -51, 251}, + { 174, 116, 52, 149, -279}, { 235, 276, 39, 120, -48}, + { 0, -108, -108, 241, -339}, { -93, 534, 45, 33, -87}, + { 194, 149, -71, 405, -44}, { 409, 370, 81, -186, -154}, + { 25, -102, -448, 124, -173}, { 22, 408, -110, -310, -214}, + { -26, 23, -83, 114, 14}, { -110, 164, 52, 223, -82}, + { 37, -25, -263, 306, -15}, { -466, 415, 292, 165, -18}, + { 29, -19, -171, 155, 182}, { 179, 144, -27, 231, 258}, + { -103, -247, -396, 238, 113}, { 375, -154, -109, -4, 156}, + { 98, 85, -292, -5, -124}, { 116, 139, -116, -98, -294}, + { -14, -83, -278, -117, -378}, { 106, 33, -106, -344, -484}, + { 119, 17, -412, 138, 166}, { 384, 101, -204, 88, -156}, + { -121, -284, -300, -1, -166}, { 280, 33, -152, -313, -81}, + { -37, 22, 229, 153, 37}, { -60, -83, 236, -8, -41}, + { -169, -228, 126, -20, 363}, { -235, 17, 364, -156, 156}, + { -25, -30, 72, 144, 156}, { 153, -26, 256, 97, 144}, + { -21, -37, 48, -65, 250}, { 63, 77, 273, -128, 124}, + { -129, -26, 40, 9, -115}, { -6, 82, 38, -90, -182}, + { -336, -13, 28, 158, 91}, { -30, 241, 137, -170, -17}, + { 146, 14, -11, 33, 61}, { 192, 197, 54, -84, 85}, + { 23, -200, -78, -29, 140}, { 122, 237, 106, -341, 136}, + { -57, -142, -85, -16, -74}, { -59, -90, -8, -187, -20}, + { -211, -267, 216, -179, -110}, { -50, -7, 220, -267, -70}, + { -57, -42, -17, -15, 71}, { 32, 21, 63, -137, 33}, + { -137, -175, 104, -68, 97}, { -67, -43, 133, -301, 221}, + { -116, -200, -81, -92, -272}, { -64, -41, -54, -244, -220}, + { -287, -242, -50, -87, -89}, { -245, 236, 102, -166, -295}, + { 66, 24, -162, -71, 95}, { 66, 136, -90, -220, -36}, + { -98, -161, -222, -188, 29}, { -18, 18, -19, -415, 9}, + { 49, 61, 100, 39, -56}, { -111, 82, 135, -31, 52}, + { -90, -153, -93, 189, 182}, { -214, 295, 119, -74, 284}, + { 2, 137, 37, 47, 182}, { 92, 117, 184, -53, 373}, + { -21, -14, -35, 136, 391}, { 146, 129, -164, -28, 333}, + { 92, 80, -84, 100, -134}, { -8, 217, -32, 3, -47}, + { -151, 251, -215, 142, 92}, { -224, 310, -172, -275, 98}, + { 159, 155, -177, 112, 53}, { 205, 27, 8, -240, 192}, + { 169, 120, -319, -201, 106}, { 11, 36, -86, -237, 455}, + { -109, -154, -163, 174, -55}, { -38, 32, -101, -78, -59}, + { -205, -321, -97, 69, 79}, { -310, 44, 18, -185, 34}, + { -115, -20, -148, -39, 203}, { -29, 154, -30, -158, 166}, + { -45, -131, -317, -24, 363}, { -165, -205, -112, -222, 265}, + { -32, -44, -150, 54, -193}, { -6, -38, -255, -169, -115}, + { -266, 87, -189, -36, -169}, { -60, -87, -266, -436, -170}, + { -68, -81, -278, 24, 38}, { -23, -19, -155, -256, 141}, + { -61, -226, -565, -175, 71}, { 9, -29, -237, -515, 263} +}; + +static const int16_t dico22_isf_36b[128][4] = { + { -298, -6, 95, 31}, { -213, -87, -122, 261}, + { 4, -49, 208, 14}, { -129, -110, 30, 118}, + { -214, 258, 110, -235}, { -41, -18, -126, 120}, + { 103, 65, 127, -37}, { 126, -36, -24, 25}, + { -138, -67, -278, -186}, { -164, -194, -201, 78}, + { -211, -87, -51, -221}, { -174, -79, -94, -39}, + { 23, -6, -157, -240}, { 22, -110, -153, -68}, + { 148, -5, -2, -149}, { -1, -135, -39, -179}, + { 68, 360, -117, -15}, { 137, 47, -278, 146}, + { 136, 260, 135, 65}, { 61, 116, -45, 97}, + { 231, 379, 87, -120}, { 338, 177, -272, 3}, + { 266, 156, 28, -69}, { 260, 84, -85, 86}, + { -266, 154, -256, -182}, { -17, -65, -304, -6}, + { -40, 175, -151, -180}, { -27, 27, -87, -63}, + { 121, 114, -166, -469}, { 159, -66, -323, -231}, + { 214, 152, -141, -212}, { 137, 36, -184, -51}, + { -282, -237, 40, 10}, { -48, -235, -37, 251}, + { -54, -323, 136, 29}, { -88, -174, 213, 198}, + { -390, 99, -63, -375}, { 107, -169, -164, 424}, + { 69, -111, 141, -167}, { 74, -129, 65, 144}, + { -353, -207, -205, -109}, { -160, -386, -355, 98}, + { -176, -493, -20, -143}, { -252, -432, -2, 216}, + { -90, -174, -168, -411}, { 13, -284, -229, -160}, + { -87, -279, 34, -251}, { -75, -263, -58, -42}, + { 420, 53, -211, -358}, { 384, -35, -374, 396}, + { 68, -228, 323, -2}, { 167, -307, 192, 194}, + { 459, 329, -5, -332}, { 375, 79, -7, 313}, + { 282, -124, 200, -92}, { 271, -162, -70, 180}, + { -157, -298, -514, -309}, { 58, -163, -546, 18}, + { 124, -364, 167, -238}, { 83, -411, -117, 96}, + { 140, -112, -388, -624}, { 259, -133, -317, 41}, + { 163, -130, -64, -334}, { 226, -165, -124, -110}, + { -466, -61, 6, 229}, { -153, 205, -145, 242}, + { -159, 48, 195, 148}, { -58, 28, 31, 279}, + { -303, 185, 279, -4}, { -61, 197, 59, 86}, + { -114, 123, 168, -52}, { 35, 36, 100, 126}, + { -407, 102, -77, -40}, { -338, -1, -342, 156}, + { -179, 105, -34, -97}, { -185, 84, -35, 108}, + { -133, 107, -91, -357}, { -180, 54, -229, 24}, + { -44, 47, 47, -182}, { -66, 13, 45, 4}, + { -339, 251, 64, 226}, { -42, 101, -350, 275}, + { -99, 398, 142, 121}, { 111, 12, -102, 260}, + { 0, 505, 260, -94}, { 161, 285, -96, 224}, + { -4, 206, 314, 33}, { 167, 139, 88, 204}, + { -235, 316, -60, -25}, { -8, -150, -312, 201}, + { -36, 292, 61, -104}, { -40, 174, -162, 42}, + { -21, 402, -29, -351}, { 21, 152, -360, -93}, + { 57, 191, 212, -196}, { 76, 158, -21, -69}, + { -328, -185, 331, 119}, { -53, 285, 56, 337}, + { -107, -24, 405, 29}, { -18, 137, 272, 277}, + { -255, 22, 173, -191}, { 295, 322, 325, 302}, + { 21, -27, 332, -178}, { 119, 13, 271, 129}, + { -455, -180, 116, -191}, { -227, 62, -148, 524}, + { -176, -287, 282, -157}, { -243, 13, 199, 430}, + { -59, -49, 115, -365}, { 72, -172, -137, 93}, + { -138, -126, 141, -84}, { 5, -124, 38, -20}, + { -258, 311, 601, 213}, { 94, 130, -61, 502}, + { -1, -157, 485, 313}, { 146, -74, 158, 345}, + { 276, 135, 280, -57}, { 490, 252, 99, 43}, + { 267, -74, 429, 105}, { 278, -23, 119, 94}, + { -542, 488, 257, -115}, { -84, -244, -438, 478}, + { -113, -545, 387, 101}, { -95, -306, 111, 498}, + { 95, 166, 22, -301}, { 420, -15, -58, -78}, + { 270, 29, 122, -282}, { 160, -240, 50, -38} +}; + +static const int16_t dico23_isf_36b[64][7] = { + { 81, -18, 68, -27, -122, -280, -4}, + { 45, -177, 209, -30, -136, -74, 131}, + { -44, 101, -75, -88, -48, -137, -54}, + { -245, -28, 63, -18, -112, -103, 58}, + { -79, -6, 220, -65, 114, -35, -50}, + { 109, -65, 143, -114, 129, 76, 125}, + { 166, 90, -61, -242, 186, -74, -43}, + { -46, -92, 49, -227, 24, -155, 39}, + { 67, 85, 99, -42, 53, -184, -281}, + { 142, -122, 0, 21, -142, -15, -17}, + { 223, 92, -21, -48, -82, -14, -167}, + { 51, -37, -243, -30, -90, 18, -56}, + { 54, 105, 74, 86, 69, 13, -101}, + { 196, 72, -89, 43, 65, 19, 39}, + { 121, 34, 131, -82, 25, 213, -156}, + { 101, -102, -136, -21, 57, 214, 22}, + { 36, -124, 205, 204, 58, -156, -83}, + { 83, -117, 137, 137, 85, 116, 44}, + { -92, -148, -68, 11, -102, -197, -220}, + { -76, -185, -58, 132, -26, -183, 85}, + { -7, -31, -2, 23, 205, -151, 10}, + { -27, -37, -5, -18, 292, 131, 1}, + { 117, -168, 9, -93, 80, -59, -125}, + { -182, -244, 98, -24, 135, -22, 94}, + { 221, 97, 106, 42, 43, -160, 83}, + { 25, -64, -21, 6, 14, -15, 154}, + { 126, 15, -140, 150, -10, -207, -114}, + { 79, -63, -211, -70, -28, -217, 165}, + { 46, 38, -22, 281, 132, -62, 109}, + { 112, 54, -112, -93, 208, 27, 296}, + { 115, 10, -147, 41, 216, 42, -276}, + { 50, -115, -254, 167, 117, -2, 61}, + { 17, 144, 34, -72, -186, -150, 272}, + { -29, -66, -89, -95, -149, 129, 251}, + { 122, 0, -50, -234, -91, 36, 26}, + { -105, -102, -88, -121, -236, -7, -11}, + { -204, 109, 5, -191, 105, -15, 163}, + { -80, 32, -24, -209, 41, 294, 70}, + { -106, -94, -204, -118, 120, -50, -37}, + { -82, -241, 46, -131, -29, 150, -55}, + { 33, 155, 120, -89, -8, 7, 62}, + { 213, 82, 61, 18, -161, 144, 152}, + { 30, 131, 65, -87, -255, -17, -107}, + { -8, 85, -64, 51, -162, 223, -53}, + { -134, 261, 69, -56, 218, 72, -111}, + { 2, 155, -113, -87, 49, 85, -28}, + { -163, 42, -1, -196, 7, 39, -245}, + { 14, -137, -79, 11, -160, 202, -293}, + { -94, 33, 208, 100, 56, -44, 326}, + { -78, -41, 232, 13, -142, 227, 80}, + { -16, -87, 201, 33, -133, 15, -183}, + { -58, -192, -47, 184, -128, 133, 99}, + { -205, 11, -155, 78, 52, 72, 141}, + { -246, 26, 99, 151, 59, 115, -64}, + { -79, -47, -16, -14, 6, 47, -43}, + { -72, -178, -27, 162, 112, 43, -174}, + { -175, 238, 186, 71, -54, -188, -76}, + { -225, 233, 39, -39, -158, 122, 44}, + { -26, 43, 84, 130, -93, -51, 22}, + { 3, 92, -150, 136, -182, -57, 97}, + { -131, 179, -78, 80, 91, -165, 90}, + { -2, 148, 15, 130, 65, 175, 117}, + { -138, 114, -137, 132, 3, -10, -186}, + { 140, -4, -37, 254, -62, 92, -109} +}; + +/** Means of ISF vectors in Q15 */ +static const int16_t isf_mean[LP_ORDER] = { + 738, 1326, 2336, 3578, 4596, 5662, 6711, 7730, + 8750, 9753, 10705, 11728, 12833, 13971, 15043, 4037 +}; + +/** Initialization tables for the processed ISF vector in Q15 */ +static const int16_t isf_init[LP_ORDER] = { + 1024, 2048, 3072, 4096, 5120, 6144, 7168, 8192, + 9216, 10240, 11264, 12288, 13312, 14336, 15360, 3840 +}; + +/** ISF/ISP interpolation coefficients for each subframe */ +static const float isfp_inter[4] = { 0.45, 0.8, 0.96, 1.0 }; + +/** Coefficients for FIR interpolation of excitation vector + * at pitch lag resulting the adaptive codebook vector */ +static const float ac_inter[65] = { + 9.400024e-01, + 8.563843e-01, 6.322632e-01, 3.375854e-01, 5.908203e-02, + -1.310425e-01, -1.994019e-01, -1.585693e-01, -5.633545e-02, + 4.760742e-02, 1.067505e-01, 1.036987e-01, 5.206299e-02, + -1.519775e-02, -6.372070e-02, -7.366943e-02, -4.650879e-02, + -9.765625e-04, 3.820801e-02, 5.316162e-02, 4.003906e-02, + 9.338379e-03, -2.166748e-02, -3.778076e-02, -3.320312e-02, + -1.300049e-02, 1.068115e-02, 2.587891e-02, 2.630615e-02, + 1.379395e-02, -3.662109e-03, -1.678467e-02, -1.983643e-02, + -1.275635e-02, -5.493164e-04, 1.007080e-02, 1.409912e-02, + 1.068115e-02, 2.624512e-03, -5.371094e-03, -9.338379e-03, + -8.117676e-03, -3.173828e-03, 2.319336e-03, 5.615234e-03, + 5.554199e-03, 2.868652e-03, -6.103516e-04, -2.990723e-03, + -3.356934e-03, -2.014160e-03, -1.220703e-04, 1.342773e-03, + 1.708984e-03, 1.159668e-03, 2.441406e-04, -4.272461e-04, + -6.103516e-04, -4.272461e-04, -1.220703e-04, 6.103516e-05, + 1.220703e-04, 6.103516e-05, 0.000000e+00, 0.000000e+00 +}; + +/** [i][j] is the number of pulses present in track j at mode i */ +static const uint8_t pulses_nb_per_mode_tr[][4] = { + {1, 1, 0, 0}, {1, 1, 1, 1}, {2, 2, 2, 2}, + {3, 3, 2, 2}, {3, 3, 3, 3}, {4, 4, 4, 4}, + {5, 5, 4, 4}, {6, 6, 6, 6}, {6, 6, 6, 6} +}; + +/** Tables for decoding quantized gains { pitch (Q14), fixed factor (Q11) } */ +static const int16_t qua_gain_6b[64][2] = { + { 1566, 1332}, { 1577, 3557}, + { 3071, 6490}, { 4193, 10163}, + { 4496, 2534}, { 5019, 4488}, + { 5586, 15614}, { 5725, 1422}, + { 6453, 580}, { 6724, 6831}, + { 7657, 3527}, { 8072, 2099}, + { 8232, 5319}, { 8827, 8775}, + { 9740, 2868}, { 9856, 1465}, + { 10087, 12488}, { 10241, 4453}, + { 10859, 6618}, { 11321, 3587}, + { 11417, 1800}, { 11643, 2428}, + { 11718, 988}, { 12312, 5093}, + { 12523, 8413}, { 12574, 26214}, + { 12601, 3396}, { 13172, 1623}, + { 13285, 2423}, { 13418, 6087}, + { 13459, 12810}, { 13656, 3607}, + { 14111, 4521}, { 14144, 1229}, + { 14425, 1871}, { 14431, 7234}, + { 14445, 2834}, { 14628, 10036}, + { 14860, 17496}, { 15161, 3629}, + { 15209, 5819}, { 15299, 2256}, + { 15518, 4722}, { 15663, 1060}, + { 15759, 7972}, { 15939, 11964}, + { 16020, 2996}, { 16086, 1707}, + { 16521, 4254}, { 16576, 6224}, + { 16894, 2380}, { 16906, 681}, + { 17213, 8406}, { 17610, 3418}, + { 17895, 5269}, { 18168, 11748}, + { 18230, 1575}, { 18607, 32767}, + { 18728, 21684}, { 19137, 2543}, + { 19422, 6577}, { 19446, 4097}, + { 19450, 9056}, { 20371, 14885} +}; + +static const int16_t qua_gain_7b[128][2] = { + { 204, 441}, { 464, 1977}, + { 869, 1077}, { 1072, 3062}, + { 1281, 4759}, { 1647, 1539}, + { 1845, 7020}, { 1853, 634}, + { 1995, 2336}, { 2351, 15400}, + { 2661, 1165}, { 2702, 3900}, + { 2710, 10133}, { 3195, 1752}, + { 3498, 2624}, { 3663, 849}, + { 3984, 5697}, { 4214, 3399}, + { 4415, 1304}, { 4695, 2056}, + { 5376, 4558}, { 5386, 676}, + { 5518, 23554}, { 5567, 7794}, + { 5644, 3061}, { 5672, 1513}, + { 5957, 2338}, { 6533, 1060}, + { 6804, 5998}, { 6820, 1767}, + { 6937, 3837}, { 7277, 414}, + { 7305, 2665}, { 7466, 11304}, + { 7942, 794}, { 8007, 1982}, + { 8007, 1366}, { 8326, 3105}, + { 8336, 4810}, { 8708, 7954}, + { 8989, 2279}, { 9031, 1055}, + { 9247, 3568}, { 9283, 1631}, + { 9654, 6311}, { 9811, 2605}, + { 10120, 683}, { 10143, 4179}, + { 10245, 1946}, { 10335, 1218}, + { 10468, 9960}, { 10651, 3000}, + { 10951, 1530}, { 10969, 5290}, + { 11203, 2305}, { 11325, 3562}, + { 11771, 6754}, { 11839, 1849}, + { 11941, 4495}, { 11954, 1298}, + { 11975, 15223}, { 11977, 883}, + { 11986, 2842}, { 12438, 2141}, + { 12593, 3665}, { 12636, 8367}, + { 12658, 1594}, { 12886, 2628}, + { 12984, 4942}, { 13146, 1115}, + { 13224, 524}, { 13341, 3163}, + { 13399, 1923}, { 13549, 5961}, + { 13606, 1401}, { 13655, 2399}, + { 13782, 3909}, { 13868, 10923}, + { 14226, 1723}, { 14232, 2939}, + { 14278, 7528}, { 14439, 4598}, + { 14451, 984}, { 14458, 2265}, + { 14792, 1403}, { 14818, 3445}, + { 14899, 5709}, { 15017, 15362}, + { 15048, 1946}, { 15069, 2655}, + { 15405, 9591}, { 15405, 4079}, + { 15570, 7183}, { 15687, 2286}, + { 15691, 1624}, { 15699, 3068}, + { 15772, 5149}, { 15868, 1205}, + { 15970, 696}, { 16249, 3584}, + { 16338, 1917}, { 16424, 2560}, + { 16483, 4438}, { 16529, 6410}, + { 16620, 11966}, { 16839, 8780}, + { 17030, 3050}, { 17033, 18325}, + { 17092, 1568}, { 17123, 5197}, + { 17351, 2113}, { 17374, 980}, + { 17566, 26214}, { 17609, 3912}, + { 17639, 32767}, { 18151, 7871}, + { 18197, 2516}, { 18202, 5649}, + { 18679, 3283}, { 18930, 1370}, + { 19271, 13757}, { 19317, 4120}, + { 19460, 1973}, { 19654, 10018}, + { 19764, 6792}, { 19912, 5135}, + { 20040, 2841}, { 21234, 19833} +}; + +/** 4-tap moving average prediction coefficients in reverse order */ +static const float energy_pred_fac[4] = { 0.2, 0.3, 0.4, 0.5 }; + +/** impulse response filter tables converted to float from Q15 + * used for anti-sparseness processing */ +static const float ir_filter_str[64] = { + 6.159058e-01, 2.958069e-01, 9.979248e-02, -1.048889e-01, + 8.740234e-02, -1.599121e-01, 4.849243e-02, -4.141235e-02, + 1.831055e-02, 1.188049e-01, -4.568481e-02, -2.130127e-02, + 3.671265e-02, -1.601868e-01, 3.659058e-02, 1.639099e-01, + -4.541016e-02, -2.151489e-02, -8.810425e-02, 6.030273e-02, + 2.740479e-02, 2.200317e-02, -1.182861e-01, 1.289978e-01, + -1.560059e-01, 1.953125e-01, -3.149414e-02, -1.441956e-01, + 1.249084e-01, -1.328125e-01, 9.780884e-02, 6.500244e-02, + -6.091309e-02, -5.599976e-02, 8.081055e-02, -5.450439e-02, + -1.239014e-02, 1.748657e-02, 7.580566e-02, -1.101074e-01, + 9.579468e-02, -4.159546e-02, -7.830811e-02, 1.162109e-01, + -1.950073e-02, -6.259155e-02, -1.651001e-02, 7.250977e-02, + 1.199951e-01, -1.911011e-01, 4.370117e-02, -1.098938e-01, + 1.492004e-01, 1.129150e-02, 1.730347e-02, -3.549194e-02, + -8.709717e-02, 5.841064e-02, 1.190186e-03, -7.379150e-02, + 1.054077e-01, 9.078979e-02, -1.227112e-01, 1.047058e-01 +}; + +static const float ir_filter_mid[64] = { + 7.354126e-01, 3.192139e-01, -1.606140e-01, -2.328491e-02, + 6.250000e-02, -2.828979e-02, 5.349731e-02, -1.014099e-01, + 6.750488e-02, 1.989746e-02, -6.549072e-02, 7.589722e-02, + -1.080017e-01, 1.253967e-01, -6.430054e-02, -1.141357e-02, + -1.910400e-02, 1.303101e-01, -1.673889e-01, 6.820679e-02, + 5.670166e-02, -8.450317e-02, 2.270508e-02, 3.479004e-02, + -2.328491e-02, -4.928589e-02, 1.239014e-01, -1.395874e-01, + 9.100342e-02, -3.549194e-02, 2.230835e-02, -3.350830e-02, + 2.450562e-02, 5.096436e-03, -2.178955e-02, 1.849365e-02, + -1.708984e-02, 1.950073e-02, 1.312256e-03, -5.389404e-02, + 9.851074e-02, -8.489990e-02, 2.029419e-02, 2.328491e-02, + 7.110596e-03, -6.109619e-02, 3.939819e-02, 5.709839e-02, + -1.058960e-01, 3.149414e-02, 8.270264e-02, -1.232910e-01, + 1.105957e-01, -1.286011e-01, 1.614990e-01, -1.303101e-01, + 4.769897e-02, 3.295898e-03, -1.770020e-02, 5.010986e-02, + -7.501221e-02, 2.920532e-02, 1.660156e-02, 7.751465e-02 +}; + +static const float * const ir_filters_lookup[2] = { + ir_filter_str, ir_filter_mid +}; + +/** High-pass filters coefficients for 31 Hz and 400 Hz cutoff */ +static const float hpf_zeros[2] = { -2.0, 1.0 }; +static const float hpf_31_poles[2] = { -1.978881836, 0.979125977 }; +static const float hpf_31_gain = 0.989501953; + +static const float hpf_400_poles[2] = { -1.787109375, 0.864257812 }; +static const float hpf_400_gain = 0.893554687; + +/** Interpolation coefficients for 5/4 signal upsampling + * Table from the reference source was reordered for efficiency */ +static const float upsample_fir[4][24] = { + { -6.103516e-05, 7.324219e-04, -2.014160e-03, 4.150391e-03, + -7.263184e-03, 1.165771e-02, -1.776123e-02, 2.624512e-02, + -3.869629e-02, 5.877686e-02, -9.863281e-02, 2.314453e-01, + 9.348755e-01, -1.523438e-01, 7.861328e-02, -4.937744e-02, + 3.308105e-02, -2.252197e-02, 1.507568e-02, -9.765625e-03, + 5.859375e-03, -3.173828e-03, 1.403809e-03, -3.662109e-04 }, + { -2.441406e-04, 1.464844e-03, -3.784180e-03, 7.568359e-03, + -1.300049e-02, 2.062988e-02, -3.112793e-02, 4.589844e-02, + -6.781006e-02, 1.042480e-01, -1.815186e-01, 5.016479e-01, + 7.548828e-01, -2.094727e-01, 1.148071e-01, -7.348633e-02, + 4.956055e-02, -3.369141e-02, 2.246094e-02, -1.434326e-02, + 8.483887e-03, -4.455566e-03, 1.831055e-03, -4.272461e-04 }, + { -4.272461e-04, 1.831055e-03, -4.455566e-03, 8.483887e-03, + -1.434326e-02, 2.246094e-02, -3.369141e-02, 4.956055e-02, + -7.348633e-02, 1.148071e-01, -2.094727e-01, 7.548828e-01, + 5.016479e-01, -1.815186e-01, 1.042480e-01, -6.781006e-02, + 4.589844e-02, -3.112793e-02, 2.062988e-02, -1.300049e-02, + 7.568359e-03, -3.784180e-03, 1.464844e-03, -2.441406e-04 }, + { -3.662109e-04, 1.403809e-03, -3.173828e-03, 5.859375e-03, + -9.765625e-03, 1.507568e-02, -2.252197e-02, 3.308105e-02, + -4.937744e-02, 7.861328e-02, -1.523438e-01, 9.348755e-01, + 2.314453e-01, -9.863281e-02, 5.877686e-02, -3.869629e-02, + 2.624512e-02, -1.776123e-02, 1.165771e-02, -7.263184e-03, + 4.150391e-03, -2.014160e-03, 7.324219e-04, -6.103516e-05 } +}; + +/** High band quantized gains for 23k85 in Q14 */ +static const uint16_t qua_hb_gain[16] = { + 3624, 4673, 5597, 6479, 7425, 8378, 9324, 10264, + 11210, 12206, 13391, 14844, 16770, 19655, 24289, 32728 +}; + +/** High-band post-processing FIR filters coefficients from Q15 */ +static const float bpf_6_7_coef[31] = { // band pass, 6kHz and 7kHz cutoffs + -2.441406e-04, 3.585815e-04, 2.441406e-04, + -2.059937e-04, -2.815248e-03, 8.560180e-03, + -1.084137e-02, 0.000000e+00, 2.897645e-02, + -6.774902e-02, 9.421540e-02, -8.380128e-02, + 2.706910e-02, 5.924987e-02, -1.373367e-01, + 1.687469e-01, + -1.373367e-01, 5.924987e-02, 2.706910e-02, + -8.380128e-02, 9.421540e-02, -6.774902e-02, + 2.897645e-02, 0.000000e+00, -1.084137e-02, + 8.560180e-03, -2.815248e-03, -2.059937e-04, + 2.441406e-04, 3.585815e-04, -2.441406e-04 +}; + +static const float lpf_7_coef[31] = { // low pass, 7kHz cutoff + -6.408691e-04, 1.434326e-03, -2.716064e-03, + 4.455566e-03, -6.195068e-03, 6.988525e-03, + -5.401611e-03, 0.000000e+00, 1.022339e-02, + -2.560425e-02, 4.531860e-02, -6.747437e-02, + 8.944702e-02, -1.080933e-01, 1.206360e-01, + 8.753052e-01, + 1.206360e-01, -1.080933e-01, 8.944702e-02, + -6.747437e-02, 4.531860e-02, -2.560425e-02, + 1.022339e-02, 0.000000e+00, -5.401611e-03, + 6.988525e-03, -6.195068e-03, 4.455566e-03, + -2.716064e-03, 1.434326e-03, -6.408691e-04 +}; + +/** Core frame sizes in each mode */ +static const uint16_t cf_sizes_wb[] = { + 132, 177, 253, 285, 317, 365, 397, 461, 477, + 40, 0, 0, 0, 0, 0, 0 +}; + +#endif /* AVCODEC_AMRWBDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/apng.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/apng.h new file mode 100644 index 00000000..41249e0d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/apng.h @@ -0,0 +1,41 @@ +/* + * APNG common header + * Copyright (c) 2014 Benoit Fouet + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * APNG common header + */ + +#ifndef AVCODEC_APNG_H +#define AVCODEC_APNG_H + +enum { + APNG_DISPOSE_OP_NONE = 0, + APNG_DISPOSE_OP_BACKGROUND = 1, + APNG_DISPOSE_OP_PREVIOUS = 2, +}; + +enum { + APNG_BLEND_OP_SOURCE = 0, + APNG_BLEND_OP_OVER = 1, +}; + +#endif /* AVCODEC_APNG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aptx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aptx.h new file mode 100644 index 00000000..ce3d7dc6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/aptx.h @@ -0,0 +1,220 @@ +/* + * Audio Processing Technology codec for Bluetooth (aptX) + * + * Copyright (C) 2017 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_APTX_H +#define AVCODEC_APTX_H + +#include "libavutil/intreadwrite.h" +#include "avcodec.h" +#include "internal.h" +#include "mathops.h" +#include "audio_frame_queue.h" + + +enum channels { + LEFT, + RIGHT, + NB_CHANNELS +}; + +enum subbands { + LF, // Low Frequency (0-5.5 kHz) + MLF, // Medium-Low Frequency (5.5-11kHz) + MHF, // Medium-High Frequency (11-16.5kHz) + HF, // High Frequency (16.5-22kHz) + NB_SUBBANDS +}; + +#define NB_FILTERS 2 +#define FILTER_TAPS 16 + +typedef struct { + int pos; + int32_t buffer[2*FILTER_TAPS]; +} FilterSignal; + +typedef struct { + FilterSignal outer_filter_signal[NB_FILTERS]; + FilterSignal inner_filter_signal[NB_FILTERS][NB_FILTERS]; +} QMFAnalysis; + +typedef struct { + int32_t quantized_sample; + int32_t quantized_sample_parity_change; + int32_t error; +} Quantize; + +typedef struct { + int32_t quantization_factor; + int32_t factor_select; + int32_t reconstructed_difference; +} InvertQuantize; + +typedef struct { + int32_t prev_sign[2]; + int32_t s_weight[2]; + int32_t d_weight[24]; + int32_t pos; + int32_t reconstructed_differences[48]; + int32_t previous_reconstructed_sample; + int32_t predicted_difference; + int32_t predicted_sample; +} Prediction; + +typedef struct { + int32_t codeword_history; + int32_t dither_parity; + int32_t dither[NB_SUBBANDS]; + + QMFAnalysis qmf; + Quantize quantize[NB_SUBBANDS]; + InvertQuantize invert_quantize[NB_SUBBANDS]; + Prediction prediction[NB_SUBBANDS]; +} Channel; + +typedef struct { + int hd; + int block_size; + int32_t sync_idx; + Channel channels[NB_CHANNELS]; + AudioFrameQueue afq; +} AptXContext; + +typedef const struct { + const int32_t *quantize_intervals; + const int32_t *invert_quantize_dither_factors; + const int32_t *quantize_dither_factors; + const int16_t *quantize_factor_select_offset; + int tables_size; + int32_t factor_max; + int32_t prediction_order; +} ConstTables; + +extern ConstTables ff_aptx_quant_tables[2][NB_SUBBANDS]; + +/* Rounded right shift with optionnal clipping */ +#define RSHIFT_SIZE(size) \ +av_always_inline \ +static int##size##_t rshift##size(int##size##_t value, int shift) \ +{ \ + int##size##_t rounding = (int##size##_t)1 << (shift - 1); \ + int##size##_t mask = ((int##size##_t)1 << (shift + 1)) - 1; \ + return ((value + rounding) >> shift) - ((value & mask) == rounding); \ +} \ +av_always_inline \ +static int##size##_t rshift##size##_clip24(int##size##_t value, int shift) \ +{ \ + return av_clip_intp2(rshift##size(value, shift), 23); \ +} +RSHIFT_SIZE(32) +RSHIFT_SIZE(64) + +/* + * Convolution filter coefficients for the outer QMF of the QMF tree. + * The 2 sets are a mirror of each other. + */ +static const int32_t aptx_qmf_outer_coeffs[NB_FILTERS][FILTER_TAPS] = { + { + 730, -413, -9611, 43626, -121026, 269973, -585547, 2801966, + 697128, -160481, 27611, 8478, -10043, 3511, 688, -897, + }, + { + -897, 688, 3511, -10043, 8478, 27611, -160481, 697128, + 2801966, -585547, 269973, -121026, 43626, -9611, -413, 730, + }, +}; + +/* + * Convolution filter coefficients for the inner QMF of the QMF tree. + * The 2 sets are a mirror of each other. + */ +static const int32_t aptx_qmf_inner_coeffs[NB_FILTERS][FILTER_TAPS] = { + { + 1033, -584, -13592, 61697, -171156, 381799, -828088, 3962579, + 985888, -226954, 39048, 11990, -14203, 4966, 973, -1268, + }, + { + -1268, 973, 4966, -14203, 11990, 39048, -226954, 985888, + 3962579, -828088, 381799, -171156, 61697, -13592, -584, 1033, + }, +}; + +/* + * Push one sample into a circular signal buffer. + */ +av_always_inline +static void aptx_qmf_filter_signal_push(FilterSignal *signal, int32_t sample) +{ + signal->buffer[signal->pos ] = sample; + signal->buffer[signal->pos+FILTER_TAPS] = sample; + signal->pos = (signal->pos + 1) & (FILTER_TAPS - 1); +} + +/* + * Compute the convolution of the signal with the coefficients, and reduce + * to 24 bits by applying the specified right shifting. + */ +av_always_inline +static int32_t aptx_qmf_convolution(FilterSignal *signal, + const int32_t coeffs[FILTER_TAPS], + int shift) +{ + int32_t *sig = &signal->buffer[signal->pos]; + int64_t e = 0; + int i; + + for (i = 0; i < FILTER_TAPS; i++) + e += MUL64(sig[i], coeffs[i]); + + return rshift64_clip24(e, shift); +} + +static inline int32_t aptx_quantized_parity(Channel *channel) +{ + int32_t parity = channel->dither_parity; + int subband; + + for (subband = 0; subband < NB_SUBBANDS; subband++) + parity ^= channel->quantize[subband].quantized_sample; + + return parity & 1; +} + +/* For each sample, ensure that the parity of all subbands of all channels + * is 0 except once every 8 samples where the parity is forced to 1. */ +static inline int aptx_check_parity(Channel channels[NB_CHANNELS], int32_t *idx) +{ + int32_t parity = aptx_quantized_parity(&channels[LEFT]) + ^ aptx_quantized_parity(&channels[RIGHT]); + + int eighth = *idx == 7; + *idx = (*idx + 1) & 7; + + return parity ^ eighth; +} + +void ff_aptx_invert_quantize_and_prediction(Channel *channel, int hd); +void ff_aptx_generate_dither(Channel *channel); + +int ff_aptx_init(AVCodecContext *avctx); + +#endif /* AVCODEC_APTX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/aac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/aac.h new file mode 100644 index 00000000..cafa881f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/aac.h @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_AAC_H +#define AVCODEC_ARM_AAC_H + +#include "config.h" + +#if HAVE_NEON_INLINE + +#define VMUL2 VMUL2 +static inline float *VMUL2(float *dst, const float *v, unsigned idx, + const float *scale) +{ + unsigned v0, v1; + __asm__ ("ubfx %0, %6, #0, #4 \n\t" + "ubfx %1, %6, #4, #4 \n\t" + "ldr %0, [%5, %0, lsl #2] \n\t" + "ldr %1, [%5, %1, lsl #2] \n\t" + "vld1.32 {d1[]}, [%7,:32] \n\t" + "vmov d0, %0, %1 \n\t" + "vmul.f32 d0, d0, d1 \n\t" + "vst1.32 {d0}, [%2,:64]! \n\t" + : "=&r"(v0), "=&r"(v1), "+r"(dst), "=m"(dst[0]), "=m"(dst[1]) + : "r"(v), "r"(idx), "r"(scale) + : "d0", "d1"); + return dst; +} + +#define VMUL4 VMUL4 +static inline float *VMUL4(float *dst, const float *v, unsigned idx, + const float *scale) +{ + unsigned v0, v1, v2, v3; + __asm__ ("ubfx %0, %10, #0, #2 \n\t" + "ubfx %1, %10, #2, #2 \n\t" + "ldr %0, [%9, %0, lsl #2] \n\t" + "ubfx %2, %10, #4, #2 \n\t" + "ldr %1, [%9, %1, lsl #2] \n\t" + "ubfx %3, %10, #6, #2 \n\t" + "ldr %2, [%9, %2, lsl #2] \n\t" + "vmov d0, %0, %1 \n\t" + "ldr %3, [%9, %3, lsl #2] \n\t" + "vld1.32 {d2[],d3[]},[%11,:32] \n\t" + "vmov d1, %2, %3 \n\t" + "vmul.f32 q0, q0, q1 \n\t" + "vst1.32 {q0}, [%4,:128]! \n\t" + : "=&r"(v0), "=&r"(v1), "=&r"(v2), "=&r"(v3), "+r"(dst), + "=m"(dst[0]), "=m"(dst[1]), "=m"(dst[2]), "=m"(dst[3]) + : "r"(v), "r"(idx), "r"(scale) + : "d0", "d1", "d2", "d3"); + return dst; +} + +#define VMUL2S VMUL2S +static inline float *VMUL2S(float *dst, const float *v, unsigned idx, + unsigned sign, const float *scale) +{ + unsigned v0, v1, v2, v3; + __asm__ ("ubfx %0, %8, #0, #4 \n\t" + "ubfx %1, %8, #4, #4 \n\t" + "ldr %0, [%7, %0, lsl #2] \n\t" + "lsl %2, %10, #30 \n\t" + "ldr %1, [%7, %1, lsl #2] \n\t" + "lsl %3, %10, #31 \n\t" + "vmov d0, %0, %1 \n\t" + "bic %2, %2, #1<<30 \n\t" + "vld1.32 {d1[]}, [%9,:32] \n\t" + "vmov d2, %2, %3 \n\t" + "veor d0, d0, d2 \n\t" + "vmul.f32 d0, d0, d1 \n\t" + "vst1.32 {d0}, [%4,:64]! \n\t" + : "=&r"(v0), "=&r"(v1), "=&r"(v2), "=&r"(v3), "+r"(dst), + "=m"(dst[0]), "=m"(dst[1]) + : "r"(v), "r"(idx), "r"(scale), "r"(sign) + : "d0", "d1", "d2"); + return dst; +} + +#define VMUL4S VMUL4S +static inline float *VMUL4S(float *dst, const float *v, unsigned idx, + unsigned sign, const float *scale) +{ + unsigned v0, v1, v2, v3, nz; + __asm__ ("vld1.32 {d2[],d3[]},[%13,:32] \n\t" + "ubfx %0, %12, #0, #2 \n\t" + "ubfx %1, %12, #2, #2 \n\t" + "ldr %0, [%11,%0, lsl #2] \n\t" + "ubfx %2, %12, #4, #2 \n\t" + "ldr %1, [%11,%1, lsl #2] \n\t" + "ubfx %3, %12, #6, #2 \n\t" + "ldr %2, [%11,%2, lsl #2] \n\t" + "vmov d0, %0, %1 \n\t" + "ldr %3, [%11,%3, lsl #2] \n\t" + "lsr %6, %12, #12 \n\t" + "rbit %6, %6 \n\t" + "vmov d1, %2, %3 \n\t" + "lsls %6, %6, #1 \n\t" + "and %0, %5, #1<<31 \n\t" + "it cs \n\t" + "lslcs %5, %5, #1 \n\t" + "lsls %6, %6, #1 \n\t" + "and %1, %5, #1<<31 \n\t" + "it cs \n\t" + "lslcs %5, %5, #1 \n\t" + "lsls %6, %6, #1 \n\t" + "and %2, %5, #1<<31 \n\t" + "it cs \n\t" + "lslcs %5, %5, #1 \n\t" + "vmov d4, %0, %1 \n\t" + "and %3, %5, #1<<31 \n\t" + "vmov d5, %2, %3 \n\t" + "veor q0, q0, q2 \n\t" + "vmul.f32 q0, q0, q1 \n\t" + "vst1.32 {q0}, [%4,:128]! \n\t" + : "=&r"(v0), "=&r"(v1), "=&r"(v2), "=&r"(v3), "+r"(dst), + "+r"(sign), "=r"(nz), + "=m"(dst[0]), "=m"(dst[1]), "=m"(dst[2]), "=m"(dst[3]) + : "r"(v), "r"(idx), "r"(scale) + : "cc", "d0", "d1", "d2", "d3", "d4", "d5"); + return dst; +} + +#endif /* HAVE_NEON_INLINE */ + +#endif /* AVCODEC_ARM_AAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/asm-offsets.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/asm-offsets.h new file mode 100644 index 00000000..a2174b0a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/asm-offsets.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_ASM_OFFSETS_H +#define AVCODEC_ARM_ASM_OFFSETS_H + +/* MpegEncContext */ +#define Y_DC_SCALE 0x04 +#define C_DC_SCALE 0x08 +#define AC_PRED 0x0c +#define BLOCK_LAST_INDEX 0x10 +#define H263_AIC 0x40 +#define INTER_SCANTAB_RASTER_END 0x88 + +#endif /* AVCODEC_ARM_ASM_OFFSETS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/audiodsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/audiodsp_arm.h new file mode 100644 index 00000000..213660da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/audiodsp_arm.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_AUDIODSP_ARM_H +#define AVCODEC_ARM_AUDIODSP_ARM_H + +#include "libavcodec/audiodsp.h" + +void ff_audiodsp_init_neon(AudioDSPContext *c); + +#endif /* AVCODEC_ARM_AUDIODSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/blockdsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/blockdsp_arm.h new file mode 100644 index 00000000..59ebeb84 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/blockdsp_arm.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_BLOCKDSP_ARM_H +#define AVCODEC_ARM_BLOCKDSP_ARM_H + +#include "libavcodec/blockdsp.h" + +void ff_blockdsp_init_neon(BlockDSPContext *c); + +#endif /* AVCODEC_ARM_BLOCKDSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/cabac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/cabac.h new file mode 100644 index 00000000..fdbf86b4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/cabac.h @@ -0,0 +1,108 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_CABAC_H +#define AVCODEC_ARM_CABAC_H + +#include "config.h" +#if HAVE_ARMV6T2_INLINE + +#include "libavutil/attributes.h" +#include "libavutil/internal.h" +#include "libavcodec/cabac.h" + +#define get_cabac_inline get_cabac_inline_arm +static av_always_inline int get_cabac_inline_arm(CABACContext *c, + uint8_t *const state) +{ + int bit; + void *reg_b, *reg_c, *tmp; + + __asm__ volatile( + "ldrb %[bit] , [%[state]] \n\t" + "add %[r_b] , %[tables] , %[lps_off] \n\t" + "mov %[tmp] , %[range] \n\t" + "and %[range] , %[range] , #0xC0 \n\t" + "add %[r_b] , %[r_b] , %[bit] \n\t" + "ldrb %[range] , [%[r_b], %[range], lsl #1] \n\t" + "add %[r_b] , %[tables] , %[norm_off] \n\t" + "sub %[r_c] , %[tmp] , %[range] \n\t" + "lsl %[tmp] , %[r_c] , #17 \n\t" + "cmp %[tmp] , %[low] \n\t" + "it gt \n\t" + "movgt %[range] , %[r_c] \n\t" + "itt cc \n\t" + "mvncc %[bit] , %[bit] \n\t" + "subcc %[low] , %[low] , %[tmp] \n\t" + "add %[r_c] , %[tables] , %[mlps_off] \n\t" + "ldrb %[tmp] , [%[r_b], %[range]] \n\t" + "ldrb %[r_b] , [%[r_c], %[bit]] \n\t" + "lsl %[low] , %[low] , %[tmp] \n\t" + "lsl %[range] , %[range] , %[tmp] \n\t" + "uxth %[r_c] , %[low] \n\t" + "strb %[r_b] , [%[state]] \n\t" + "tst %[r_c] , %[r_c] \n\t" + "bne 2f \n\t" + "ldr %[r_c] , [%[c], %[byte]] \n\t" +#if UNCHECKED_BITSTREAM_READER + "ldrh %[tmp] , [%[r_c]] \n\t" + "add %[r_c] , %[r_c] , #2 \n\t" + "str %[r_c] , [%[c], %[byte]] \n\t" +#else + "ldr %[r_b] , [%[c], %[end]] \n\t" + "ldrh %[tmp] , [%[r_c]] \n\t" + "cmp %[r_c] , %[r_b] \n\t" + "itt lt \n\t" + "addlt %[r_c] , %[r_c] , #2 \n\t" + "strlt %[r_c] , [%[c], %[byte]] \n\t" +#endif + "sub %[r_c] , %[low] , #1 \n\t" + "add %[r_b] , %[tables] , %[norm_off] \n\t" + "eor %[r_c] , %[low] , %[r_c] \n\t" + "rev %[tmp] , %[tmp] \n\t" + "lsr %[r_c] , %[r_c] , #15 \n\t" + "lsr %[tmp] , %[tmp] , #15 \n\t" + "ldrb %[r_c] , [%[r_b], %[r_c]] \n\t" + "movw %[r_b] , #0xFFFF \n\t" + "sub %[tmp] , %[tmp] , %[r_b] \n\t" + "rsb %[r_c] , %[r_c] , #7 \n\t" + "lsl %[tmp] , %[tmp] , %[r_c] \n\t" + "add %[low] , %[low] , %[tmp] \n\t" + "2: \n\t" + : [bit]"=&r"(bit), + [low]"+&r"(c->low), + [range]"+&r"(c->range), + [r_b]"=&r"(reg_b), + [r_c]"=&r"(reg_c), + [tmp]"=&r"(tmp) + : [c]"r"(c), + [state]"r"(state), + [tables]"r"(ff_h264_cabac_tables), + [byte]"M"(offsetof(CABACContext, bytestream)), + [end]"M"(offsetof(CABACContext, bytestream_end)), + [norm_off]"I"(H264_NORM_SHIFT_OFFSET), + [lps_off]"I"(H264_LPS_RANGE_OFFSET), + [mlps_off]"I"(H264_MLPS_STATE_OFFSET + 128) + : "memory", "cc" + ); + + return bit & 1; +} +#endif /* HAVE_ARMV6T2_INLINE */ + +#endif /* AVCODEC_ARM_CABAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/dca.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/dca.h new file mode 100644 index 00000000..ae4b730a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/dca.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2011 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_DCA_H +#define AVCODEC_ARM_DCA_H + +#include + +#include "config.h" +#include "libavcodec/mathops.h" + +#if HAVE_ARMV6_INLINE && AV_GCC_VERSION_AT_LEAST(4,4) && !CONFIG_THUMB + +#define decode_blockcodes decode_blockcodes +static inline int decode_blockcodes(int code1, int code2, int levels, + int32_t *values) +{ + int32_t v0, v1, v2, v3, v4, v5; + + __asm__ ("smmul %0, %6, %10 \n" + "smmul %3, %7, %10 \n" + "smlabb %6, %0, %9, %6 \n" + "smlabb %7, %3, %9, %7 \n" + "smmul %1, %0, %10 \n" + "smmul %4, %3, %10 \n" + "sub %6, %6, %8, lsr #1 \n" + "sub %7, %7, %8, lsr #1 \n" + "smlabb %0, %1, %9, %0 \n" + "smlabb %3, %4, %9, %3 \n" + "smmul %2, %1, %10 \n" + "smmul %5, %4, %10 \n" + "str %6, [%11, #0] \n" + "str %7, [%11, #16] \n" + "sub %0, %0, %8, lsr #1 \n" + "sub %3, %3, %8, lsr #1 \n" + "smlabb %1, %2, %9, %1 \n" + "smlabb %4, %5, %9, %4 \n" + "smmul %6, %2, %10 \n" + "smmul %7, %5, %10 \n" + "str %0, [%11, #4] \n" + "str %3, [%11, #20] \n" + "sub %1, %1, %8, lsr #1 \n" + "sub %4, %4, %8, lsr #1 \n" + "smlabb %2, %6, %9, %2 \n" + "smlabb %5, %7, %9, %5 \n" + "str %1, [%11, #8] \n" + "str %4, [%11, #24] \n" + "sub %2, %2, %8, lsr #1 \n" + "sub %5, %5, %8, lsr #1 \n" + "str %2, [%11, #12] \n" + "str %5, [%11, #28] \n" + : "=&r"(v0), "=&r"(v1), "=&r"(v2), + "=&r"(v3), "=&r"(v4), "=&r"(v5), + "+&r"(code1), "+&r"(code2) + : "r"(levels - 1), "r"(-levels), + "r"(ff_inverse[levels]), "r"(values) + : "memory"); + + return code1 | code2; +} + +#endif + +#endif /* AVCODEC_ARM_DCA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hevcdsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hevcdsp_arm.h new file mode 100644 index 00000000..47cdfa57 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hevcdsp_arm.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_HEVCDSP_ARM_H +#define AVCODEC_ARM_HEVCDSP_ARM_H + +#include "libavcodec/hevcdsp.h" + +void ff_hevc_dsp_init_neon(HEVCDSPContext *c, const int bit_depth); + +#endif /* AVCODEC_ARM_HEVCDSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hpeldsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hpeldsp_arm.h new file mode 100644 index 00000000..5f3c7741 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/hpeldsp_arm.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_HPELDSP_ARM_H +#define AVCODEC_ARM_HPELDSP_ARM_H + +#include "libavcodec/hpeldsp.h" + +void ff_hpeldsp_init_armv6(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_neon(HpelDSPContext *c, int flags); + +#endif /* AVCODEC_ARM_HPELDSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idct.h new file mode 100644 index 00000000..6c79a69c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idct.h @@ -0,0 +1,41 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_IDCT_H +#define AVCODEC_ARM_IDCT_H + +#include +#include + +void ff_j_rev_dct_arm(int16_t *data); + +void ff_simple_idct_arm(int16_t *data); + +void ff_simple_idct_armv5te(int16_t *data); +void ff_simple_idct_put_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_armv5te(uint8_t *dest, ptrdiff_t line_size, int16_t *data); + +void ff_simple_idct_armv6(int16_t *data); +void ff_simple_idct_put_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_armv6(uint8_t *dest, ptrdiff_t line_size, int16_t *data); + +void ff_simple_idct_neon(int16_t *data); +void ff_simple_idct_put_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); +void ff_simple_idct_add_neon(uint8_t *dest, ptrdiff_t line_size, int16_t *data); + +#endif /* AVCODEC_ARM_IDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idctdsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idctdsp_arm.h new file mode 100644 index 00000000..d7bc5cd0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/idctdsp_arm.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_IDCTDSP_ARM_H +#define AVCODEC_ARM_IDCTDSP_ARM_H + +#include "libavcodec/avcodec.h" +#include "libavcodec/idctdsp.h" + +void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); + +#endif /* AVCODEC_ARM_IDCTDSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mathops.h new file mode 100644 index 00000000..dc57c557 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mathops.h @@ -0,0 +1,108 @@ +/* + * simple math operations + * Copyright (c) 2006 Michael Niedermayer et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_MATHOPS_H +#define AVCODEC_ARM_MATHOPS_H + +#include +#include "config.h" +#include "libavutil/common.h" + +#if HAVE_INLINE_ASM + +#if HAVE_ARMV6_INLINE +#define MULH MULH +static inline av_const int MULH(int a, int b) +{ + int r; + __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#define FASTDIV FASTDIV +static av_always_inline av_const int FASTDIV(int a, int b) +{ + int r; + __asm__ ("cmp %2, #2 \n\t" + "ldr %0, [%3, %2, lsl #2] \n\t" + "ite le \n\t" + "lsrle %0, %1, #1 \n\t" + "smmulgt %0, %0, %1 \n\t" + : "=&r"(r) : "r"(a), "r"(b), "r"(ff_inverse) : "cc"); + return r; +} + +#else /* HAVE_ARMV6_INLINE */ + +#define FASTDIV FASTDIV +static av_always_inline av_const int FASTDIV(int a, int b) +{ + int r, t; + __asm__ ("umull %1, %0, %2, %3" + : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b])); + return r; +} +#endif + +#define MLS64(d, a, b) MAC64(d, -(a), b) + +#if HAVE_ARMV5TE_INLINE + +/* signed 16x16 -> 32 multiply add accumulate */ +# define MAC16(rt, ra, rb) \ + __asm__ ("smlabb %0, %1, %2, %0" : "+r"(rt) : "r"(ra), "r"(rb)); + +/* signed 16x16 -> 32 multiply */ +# define MUL16 MUL16 +static inline av_const int MUL16(int ra, int rb) +{ + int rt; + __asm__ ("smulbb %0, %1, %2" : "=r"(rt) : "r"(ra), "r"(rb)); + return rt; +} + +#endif + +#define mid_pred mid_pred +static inline av_const int mid_pred(int a, int b, int c) +{ + int m; + __asm__ ( + "mov %0, %2 \n\t" + "cmp %1, %2 \n\t" + "itt gt \n\t" + "movgt %0, %1 \n\t" + "movgt %1, %2 \n\t" + "cmp %1, %3 \n\t" + "it le \n\t" + "movle %1, %3 \n\t" + "cmp %0, %1 \n\t" + "it gt \n\t" + "movgt %0, %1 \n\t" + : "=&r"(m), "+r"(a) + : "r"(b), "r"(c) + : "cc"); + return m; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_ARM_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mpegvideo_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mpegvideo_arm.h new file mode 100644 index 00000000..709ae6b2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/mpegvideo_arm.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_MPEGVIDEO_ARM_H +#define AVCODEC_ARM_MPEGVIDEO_ARM_H + +#include "libavcodec/mpegvideo.h" + +void ff_mpv_common_init_armv5te(MpegEncContext *s); + +#endif /* AVCODEC_ARM_MPEGVIDEO_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/startcode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/startcode.h new file mode 100644 index 00000000..cf25d9d4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/startcode.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_STARTCODE_H +#define AVCODEC_ARM_STARTCODE_H + +#include + +int ff_startcode_find_candidate_armv6(const uint8_t *buf, int size); + +#endif /* AVCODEC_ARM_STARTCODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vc1dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vc1dsp.h new file mode 100644 index 00000000..cd01ac53 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vc1dsp.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VC1DSP_H +#define AVCODEC_ARM_VC1DSP_H + +#include "libavcodec/vc1dsp.h" + +void ff_vc1dsp_init_neon(VC1DSPContext *dsp); + +#endif /* AVCODEC_ARM_VC1DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/videodsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/videodsp_arm.h new file mode 100644 index 00000000..112cbb86 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/videodsp_arm.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VIDEODSP_ARM_H +#define AVCODEC_ARM_VIDEODSP_ARM_H + +#include "libavcodec/avcodec.h" +#include "libavcodec/videodsp.h" + +void ff_videodsp_init_armv5te(VideoDSPContext* ctx, int bpc); + +#endif /* AVCODEC_ARM_VIDEODSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp56_arith.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp56_arith.h new file mode 100644 index 00000000..feb12479 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp56_arith.h @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VP56_ARITH_H +#define AVCODEC_ARM_VP56_ARITH_H + +#if CONFIG_THUMB +# define A(x) +# define T(x) x +#else +# define A(x) x +# define T(x) +#endif + +#if CONFIG_THUMB || defined __clang__ +# define L(x) +# define U(x) x +#else +# define L(x) x +# define U(x) +#endif + +#if HAVE_ARMV6_INLINE + +#define vp56_rac_get_prob vp56_rac_get_prob_armv6 +static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr) +{ + unsigned shift = ff_vp56_norm_shift[c->high]; + unsigned code_word = c->code_word << shift; + unsigned high = c->high << shift; + unsigned bit; + + __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" + "cmpcs %7, %4 \n" + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") + "rsb %0, %6, #256 \n" + "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") + "rev16cs %2, %2 \n" + T("lslcs %2, %2, %3 \n") + T("orrcs %1, %1, %2 \n") + A("orrcs %1, %1, %2, lsl %3 \n") + "subcs %3, %3, #16 \n" + "lsr %0, %0, #8 \n" + "cmp %1, %0, lsl #16 \n" + "ittte ge \n" + "subge %1, %1, %0, lsl #16 \n" + "subge %0, %5, %0 \n" + "movge %2, #1 \n" + "movlt %2, #0 \n" + : "=&r"(c->high), "=&r"(c->code_word), "=&r"(bit), + "+&r"(c->bits), "+&r"(c->buffer) + : "r"(high), "r"(pr), "r"(c->end - 1), + "0"(shift), "1"(code_word) + : "cc"); + + return bit; +} + +#define vp56_rac_get_prob_branchy vp56_rac_get_prob_branchy_armv6 +static inline int vp56_rac_get_prob_branchy_armv6(VP56RangeCoder *c, int pr) +{ + unsigned shift = ff_vp56_norm_shift[c->high]; + unsigned code_word = c->code_word << shift; + unsigned high = c->high << shift; + unsigned low; + unsigned tmp; + + __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" + "cmpcs %7, %4 \n" + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") + "rsb %0, %6, #256 \n" + "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") + "rev16cs %2, %2 \n" + T("lslcs %2, %2, %3 \n") + T("orrcs %1, %1, %2 \n") + A("orrcs %1, %1, %2, lsl %3 \n") + "subcs %3, %3, #16 \n" + "lsr %0, %0, #8 \n" + "lsl %2, %0, #16 \n" + : "=&r"(low), "+&r"(code_word), "=&r"(tmp), + "+&r"(c->bits), "+&r"(c->buffer) + : "r"(high), "r"(pr), "r"(c->end - 1), "0"(shift) + : "cc"); + + if (code_word >= tmp) { + c->high = high - low; + c->code_word = code_word - tmp; + return 1; + } + + c->high = low; + c->code_word = code_word; + return 0; +} + +#endif + +#endif /* AVCODEC_ARM_VP56_ARITH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8.h new file mode 100644 index 00000000..965342d9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VP8_H +#define AVCODEC_ARM_VP8_H + +#include + +#include "config.h" +#include "libavcodec/vp56.h" +#include "libavcodec/vp8.h" + +#if HAVE_ARMV6_EXTERNAL +#define vp8_decode_block_coeffs_internal ff_decode_block_coeffs_armv6 +int ff_decode_block_coeffs_armv6(VP56RangeCoder *rc, int16_t block[16], + uint8_t probs[8][3][NUM_DCT_TOKENS-1], + int i, uint8_t *token_prob, int16_t qmul[2]); +#endif + +#endif /* AVCODEC_ARM_VP8_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8dsp.h new file mode 100644 index 00000000..7281d0bf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp8dsp.h @@ -0,0 +1,80 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VP8DSP_H +#define AVCODEC_ARM_VP8DSP_H + +#include "libavcodec/vp8dsp.h" + +void ff_vp78dsp_init_armv6(VP8DSPContext *dsp); +void ff_vp78dsp_init_neon(VP8DSPContext *dsp); +void ff_vp8dsp_init_armv6(VP8DSPContext *dsp); +void ff_vp8dsp_init_neon(VP8DSPContext *dsp); + +#define VP8_LF_Y(hv, inner, opt) \ + void ff_vp8_##hv##_loop_filter16##inner##_##opt(uint8_t *dst, \ + ptrdiff_t stride, \ + int flim_E, int flim_I, \ + int hev_thresh) + +#define VP8_LF_UV(hv, inner, opt) \ + void ff_vp8_##hv##_loop_filter8uv##inner##_##opt(uint8_t *dstU, \ + uint8_t *dstV, \ + ptrdiff_t stride, \ + int flim_E, int flim_I, \ + int hev_thresh) + +#define VP8_LF_SIMPLE(hv, opt) \ + void ff_vp8_##hv##_loop_filter16_simple_##opt(uint8_t *dst, \ + ptrdiff_t stride, \ + int flim) + +#define VP8_LF_HV(inner, opt) \ + VP8_LF_Y(h, inner, opt); \ + VP8_LF_Y(v, inner, opt); \ + VP8_LF_UV(h, inner, opt); \ + VP8_LF_UV(v, inner, opt) + +#define VP8_LF(opt) \ + VP8_LF_HV(, opt); \ + VP8_LF_HV(_inner, opt); \ + VP8_LF_SIMPLE(h, opt); \ + VP8_LF_SIMPLE(v, opt) + +#define VP8_MC(n, opt) \ + void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ + uint8_t *src, ptrdiff_t srcstride, \ + int h, int x, int y) + +#define VP8_EPEL(w, opt) \ + VP8_MC(pixels ## w, opt); \ + VP8_MC(epel ## w ## _h4, opt); \ + VP8_MC(epel ## w ## _h6, opt); \ + VP8_MC(epel ## w ## _v4, opt); \ + VP8_MC(epel ## w ## _h4v4, opt); \ + VP8_MC(epel ## w ## _h6v4, opt); \ + VP8_MC(epel ## w ## _v6, opt); \ + VP8_MC(epel ## w ## _h4v6, opt); \ + VP8_MC(epel ## w ## _h6v6, opt) + +#define VP8_BILIN(w, opt) \ + VP8_MC(bilin ## w ## _h, opt); \ + VP8_MC(bilin ## w ## _v, opt); \ + VP8_MC(bilin ## w ## _hv, opt) + +#endif /* AVCODEC_ARM_VP8DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp9dsp_init.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp9dsp_init.h new file mode 100644 index 00000000..0dc1c2dc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/arm/vp9dsp_init.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017 Google Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VP9DSP_INIT_H +#define AVCODEC_ARM_VP9DSP_INIT_H + +#include "libavcodec/vp9dsp.h" + +void ff_vp9dsp_init_10bpp_arm(VP9DSPContext *dsp); +void ff_vp9dsp_init_12bpp_arm(VP9DSPContext *dsp); + +#endif /* AVCODEC_ARM_VP9DSP_INIT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass.h new file mode 100644 index 00000000..2c260e4e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass.h @@ -0,0 +1,139 @@ +/* + * SSA/ASS common functions + * Copyright (c) 2010 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ASS_H +#define AVCODEC_ASS_H + +#include "avcodec.h" +#include "libavutil/bprint.h" + +#define ASS_DEFAULT_PLAYRESX 384 +#define ASS_DEFAULT_PLAYRESY 288 + +/** + * @name Default values for ASS style + * @{ + */ +#define ASS_DEFAULT_FONT "Arial" +#define ASS_DEFAULT_FONT_SIZE 16 +#define ASS_DEFAULT_COLOR 0xffffff +#define ASS_DEFAULT_BACK_COLOR 0 +#define ASS_DEFAULT_BOLD 0 +#define ASS_DEFAULT_ITALIC 0 +#define ASS_DEFAULT_UNDERLINE 0 +#define ASS_DEFAULT_ALIGNMENT 2 +#define ASS_DEFAULT_BORDERSTYLE 1 +/** @} */ + +typedef struct FFASSDecoderContext { + int readorder; +} FFASSDecoderContext; + +/** + * Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS. + * Can specify all fields explicitly + * + * @param avctx pointer to the AVCodecContext + * @param play_res_x subtitle frame width + * @param play_res_y subtitle frame height + * @param font name of the default font face to use + * @param font_size default font size to use + * @param primary_color default text color to use (ABGR) + * @param secondary_color default secondary text color to use (ABGR) + * @param outline_color default outline color to use (ABGR) + * @param back_color default background color to use (ABGR) + * @param bold 1 for bold text, 0 for normal text + * @param italic 1 for italic text, 0 for normal text + * @param underline 1 for underline text, 0 for normal text + * @param border_style 1 for outline, 3 for opaque box + * @param alignment position of the text (left, center, top...), defined after + * the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top) + * @return >= 0 on success otherwise an error code <0 + */ +int ff_ass_subtitle_header_full(AVCodecContext *avctx, + int play_res_x, int play_res_y, + const char *font, int font_size, + int primary_color, int secondary_color, + int outline_color, int back_color, + int bold, int italic, int underline, + int border_style, int alignment); +/** + * Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS. + * + * @param avctx pointer to the AVCodecContext + * @param font name of the default font face to use + * @param font_size default font size to use + * @param color default text color to use (ABGR) + * @param back_color default background color to use (ABGR) + * @param bold 1 for bold text, 0 for normal text + * @param italic 1 for italic text, 0 for normal text + * @param underline 1 for underline text, 0 for normal text + * @param alignment position of the text (left, center, top...), defined after + * the layout of the numpad (1-3 sub, 4-6 mid, 7-9 top) + * @return >= 0 on success otherwise an error code <0 + */ +int ff_ass_subtitle_header(AVCodecContext *avctx, + const char *font, int font_size, + int color, int back_color, + int bold, int italic, int underline, + int border_style, int alignment); + +/** + * Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS + * with default style. + * + * @param avctx pointer to the AVCodecContext + * @return >= 0 on success otherwise an error code <0 + */ +int ff_ass_subtitle_header_default(AVCodecContext *avctx); + +/** + * Craft an ASS dialog string. + */ +char *ff_ass_get_dialog(int readorder, int layer, const char *style, + const char *speaker, const char *text); + +/** + * Add an ASS dialog to a subtitle. + */ +int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, + int readorder, int layer, const char *style, + const char *speaker); + +/** + * Helper to flush a text subtitles decoder making use of the + * FFASSDecoderContext. + */ +void ff_ass_decoder_flush(AVCodecContext *avctx); + +/** + * Escape a text subtitle using ASS syntax into an AVBPrint buffer. + * Newline characters will be escaped to \N. + * + * @param buf pointer to an initialized AVBPrint buffer + * @param p source text + * @param size size of the source text + * @param linebreaks additional newline chars, which will be escaped to \N + * @param keep_ass_markup braces and backslash will not be escaped if set + */ +void ff_ass_bprint_text_event(AVBPrint *buf, const char *p, int size, + const char *linebreaks, int keep_ass_markup); +#endif /* AVCODEC_ASS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass_split.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass_split.h new file mode 100644 index 00000000..30ce7725 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ass_split.h @@ -0,0 +1,207 @@ +/* + * SSA/ASS spliting functions + * Copyright (c) 2010 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ASS_SPLIT_H +#define AVCODEC_ASS_SPLIT_H + +/** + * fields extracted from the [Script Info] section + */ +typedef struct { + char *script_type; /**< SSA script format version (eg. v4.00) */ + char *collisions; /**< how subtitles are moved to prevent collisions */ + int play_res_x; /**< video width that ASS coords are referring to */ + int play_res_y; /**< video height that ASS coords are referring to */ + float timer; /**< time multiplier to apply to SSA clock (in %) */ +} ASSScriptInfo; + +/** + * fields extracted from the [V4(+) Styles] section + */ +typedef struct { + char *name; /**< name of the tyle (case sensitive) */ + char *font_name; /**< font face (case sensitive) */ + int font_size; /**< font height */ + int primary_color; /**< color that a subtitle will normally appear in */ + int secondary_color; + int outline_color; /**< color for outline in ASS, called tertiary in SSA */ + int back_color; /**< color of the subtitle outline or shadow */ + int bold; /**< whether text is bold (1) or not (0) */ + int italic; /**< whether text is italic (1) or not (0) */ + int underline; /**< whether text is underlined (1) or not (0) */ + int strikeout; + float scalex; + float scaley; + float spacing; + float angle; + int border_style; + float outline; + float shadow; + int alignment; /**< position of the text (left, center, top...), + defined after the layout of the numpad + (1-3 sub, 4-6 mid, 7-9 top) */ + int margin_l; + int margin_r; + int margin_v; + int alpha_level; + int encoding; +} ASSStyle; + +/** + * fields extracted from the [Events] section + */ +typedef struct { + int readorder; + int layer; /**< higher numbered layers are drawn over lower numbered */ + int start; /**< start time of the dialog in centiseconds */ + int end; /**< end time of the dialog in centiseconds */ + char *style; /**< name of the ASSStyle to use with this dialog */ + char *name; + int margin_l; + int margin_r; + int margin_v; + char *effect; + char *text; /**< actual text which will be displayed as a subtitle, + can include style override control codes (see + ff_ass_split_override_codes()) */ +} ASSDialog; + +/** + * structure containing the whole split ASS data + */ +typedef struct { + ASSScriptInfo script_info; /**< general information about the SSA script*/ + ASSStyle *styles; /**< array of split out styles */ + int styles_count; /**< number of ASSStyle in the styles array */ + ASSDialog *dialogs; /**< array of split out dialogs */ + int dialogs_count; /**< number of ASSDialog in the dialogs array*/ +} ASS; + +/** + * This struct can be casted to ASS to access to the split data. + */ +typedef struct ASSSplitContext ASSSplitContext; + +/** + * Split a full ASS file or a ASS header from a string buffer and store + * the split structure in a newly allocated context. + * + * @param buf String containing the ASS formatted data. + * @return Newly allocated struct containing split data. + */ +ASSSplitContext *ff_ass_split(const char *buf); + +/** + * Split one or several ASS "Dialogue" lines from a string buffer and store + * them in an already initialized context. + * + * @param ctx Context previously initialized by ff_ass_split(). + * @param buf String containing the ASS "Dialogue" lines. + * @param cache Set to 1 to keep all the previously split ASSDialog in + * the context, or set to 0 to free all the previously split + * ASSDialog. + * @param number If not NULL, the pointed integer will be set to the number + * of split ASSDialog. + * @return Pointer to the first split ASSDialog. + */ +ASSDialog *ff_ass_split_dialog(ASSSplitContext *ctx, const char *buf, + int cache, int *number); + +/** + * Free a dialogue obtained from ff_ass_split_dialog2(). + */ +void ff_ass_free_dialog(ASSDialog **dialogp); + +/** + * Split one ASS Dialogue line from a string buffer. + * + * @param ctx Context previously initialized by ff_ass_split(). + * @param buf String containing the ASS "Dialogue" line. + * @return Pointer to the split ASSDialog. Must be freed with ff_ass_free_dialog() + */ +ASSDialog *ff_ass_split_dialog2(ASSSplitContext *ctx, const char *buf); + +/** + * Free all the memory allocated for an ASSSplitContext. + * + * @param ctx Context previously initialized by ff_ass_split(). + */ +void ff_ass_split_free(ASSSplitContext *ctx); + + +/** + * Set of callback functions corresponding to each override codes that can + * be encountered in a "Dialogue" Text field. + */ +typedef struct { + /** + * @defgroup ass_styles ASS styles + * @{ + */ + void (*text)(void *priv, const char *text, int len); + void (*new_line)(void *priv, int forced); + void (*style)(void *priv, char style, int close); + void (*color)(void *priv, unsigned int /* color */, unsigned int color_id); + void (*alpha)(void *priv, int alpha, int alpha_id); + void (*font_name)(void *priv, const char *name); + void (*font_size)(void *priv, int size); + void (*alignment)(void *priv, int alignment); + void (*cancel_overrides)(void *priv, const char *style); + /** @} */ + + /** + * @defgroup ass_functions ASS functions + * @{ + */ + void (*move)(void *priv, int x1, int y1, int x2, int y2, int t1, int t2); + void (*origin)(void *priv, int x, int y); + /** @} */ + + /** + * @defgroup ass_end end of Dialogue Event + * @{ + */ + void (*end)(void *priv); + /** @} */ +} ASSCodesCallbacks; + +/** + * Split override codes out of a ASS "Dialogue" Text field. + * + * @param callbacks Set of callback functions called for each override code + * encountered. + * @param priv Opaque pointer passed to the callback functions. + * @param buf The ASS "Dialogue" Text field to split. + * @return >= 0 on success otherwise an error code <0 + */ +int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, + const char *buf); + +/** + * Find an ASSStyle structure by its name. + * + * @param ctx Context previously initialized by ff_ass_split(). + * @param style name of the style to search for. + * @return the ASSStyle corresponding to style, or NULL if style can't be found + */ +ASSStyle *ff_ass_style_get(ASSSplitContext *ctx, const char *style); + +#endif /* AVCODEC_ASS_SPLIT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/asv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/asv.h new file mode 100644 index 00000000..a1366b6f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/asv.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ASUS V1/V2 encoder/decoder common data. + */ + +#ifndef AVCODEC_ASV_H +#define AVCODEC_ASV_H + +#include + +#include "libavutil/mem.h" + +#include "avcodec.h" +#include "blockdsp.h" +#include "bswapdsp.h" +#include "fdctdsp.h" +#include "idctdsp.h" +#include "get_bits.h" +#include "pixblockdsp.h" +#include "put_bits.h" + +typedef struct ASV1Context { + AVCodecContext *avctx; + BlockDSPContext bdsp; + BswapDSPContext bbdsp; + FDCTDSPContext fdsp; + IDCTDSPContext idsp; + PixblockDSPContext pdsp; + PutBitContext pb; + GetBitContext gb; + ScanTable scantable; + int inv_qscale; + int mb_width; + int mb_height; + int mb_width2; + int mb_height2; + DECLARE_ALIGNED(32, int16_t, block)[6][64]; + uint16_t intra_matrix[64]; + int q_intra_matrix[64]; + uint8_t *bitstream_buffer; + unsigned int bitstream_buffer_size; +} ASV1Context; + +extern const uint8_t ff_asv_scantab[64]; +extern const uint8_t ff_asv_ccp_tab[17][2]; +extern const uint8_t ff_asv_level_tab[7][2]; +extern const uint8_t ff_asv_dc_ccp_tab[8][2]; +extern const uint8_t ff_asv_ac_ccp_tab[16][2]; +extern const uint8_t ff_asv2_level_tab[63][2]; + +void ff_asv_common_init(AVCodecContext *avctx); + +#endif /* AVCODEC_ASV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac.h new file mode 100644 index 00000000..05208bbe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac.h @@ -0,0 +1,97 @@ +/* + * common functions for the ATRAC family of decoders + * + * Copyright (c) 2009-2013 Maxim Poliakovski + * Copyright (c) 2009 Benjamin Larsson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ATRAC common header + */ + +#ifndef AVCODEC_ATRAC_H +#define AVCODEC_ATRAC_H + +/** + * Gain control parameters for one subband. + */ +typedef struct AtracGainInfo { + int num_points; ///< number of gain control points + int lev_code[7]; ///< level at corresponding control point + int loc_code[7]; ///< location of gain control points +} AtracGainInfo; + +/** + * Gain compensation context structure. + */ +typedef struct AtracGCContext { + float gain_tab1[16]; ///< gain compensation level table + float gain_tab2[31]; ///< gain compensation interpolation table + int id2exp_offset; ///< offset for converting level index into level exponent + int loc_scale; ///< scale of location code = 2^loc_scale samples + int loc_size; ///< size of location code in samples +} AtracGCContext; + +extern float ff_atrac_sf_table[64]; + +/** + * Generate common tables. + */ +void ff_atrac_generate_tables(void); + +/** + * Initialize gain compensation context. + * + * @param gctx pointer to gain compensation context to initialize + * @param id2exp_offset offset for converting level index into level exponent + * @param loc_scale location size factor + */ +void ff_atrac_init_gain_compensation(AtracGCContext *gctx, int id2exp_offset, + int loc_scale); + +/** + * Apply gain compensation and perform the MDCT overlapping part. + * + * @param gctx pointer to gain compensation context + * @param in input buffer + * @param prev previous buffer to perform overlap against + * @param gc_now gain control information for current frame + * @param gc_next gain control information for next frame + * @param num_samples number of samples to process + * @param out output data goes here + */ +void ff_atrac_gain_compensation(AtracGCContext *gctx, float *in, float *prev, + AtracGainInfo *gc_now, AtracGainInfo *gc_next, + int num_samples, float *out); + +/** + * Quadrature mirror synthesis filter. + * + * @param inlo lower part of spectrum + * @param inhi higher part of spectrum + * @param nIn size of spectrum buffer + * @param pOut out buffer + * @param delayBuf delayBuf buffer + * @param temp temp buffer + */ +void ff_atrac_iqmf(float *inlo, float *inhi, unsigned int nIn, float *pOut, + float *delayBuf, float *temp); + +#endif /* AVCODEC_ATRAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac1data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac1data.h new file mode 100644 index 00000000..62c218b7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac1data.h @@ -0,0 +1,64 @@ +/* + * ATRAC 1 compatible decoder data + * Copyright (c) 2009 Maxim Poliakovski + * Copyright (c) 2009 Benjamin Larsson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ATRAC1 compatible decoder data + */ + +#ifndef AVCODEC_ATRAC1DATA_H +#define AVCODEC_ATRAC1DATA_H + +#include + +static const uint8_t bfu_amount_tab1[8] = {20, 28, 32, 36, 40, 44, 48, 52}; +static const uint8_t bfu_amount_tab2[4] = { 0, 112, 176, 208}; +static const uint8_t bfu_amount_tab3[8] = { 0, 24, 36, 48, 72, 108, 132, 156}; + +/** number of BFUs in each QMF band */ +static const uint8_t bfu_bands_t[4] = {0, 20, 36, 52}; + +/** number of spectral lines in each BFU + * block floating unit = group of spectral frequencies having the + * same quantization parameters like word length and scale factor + */ +static const uint8_t specs_per_bfu[52] = { + 8, 8, 8, 8, 4, 4, 4, 4, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, // low band + 6, 6, 6, 6, 7, 7, 7, 7, 9, 9, 9, 9, 10, 10, 10, 10, // middle band + 12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20 // high band +}; + +/** start position of each BFU in the MDCT spectrum for the long mode */ +static const uint16_t bfu_start_long[52] = { + 0, 8, 16, 24, 32, 36, 40, 44, 48, 56, 64, 72, 80, 86, 92, 98, 104, 110, 116, 122, + 128, 134, 140, 146, 152, 159, 166, 173, 180, 189, 198, 207, 216, 226, 236, 246, + 256, 268, 280, 292, 304, 316, 328, 340, 352, 372, 392, 412, 432, 452, 472, 492, +}; + +/** start position of each BFU in the MDCT spectrum for the short mode */ +static const uint16_t bfu_start_short[52] = { + 0, 32, 64, 96, 8, 40, 72, 104, 12, 44, 76, 108, 20, 52, 84, 116, 26, 58, 90, 122, + 128, 160, 192, 224, 134, 166, 198, 230, 141, 173, 205, 237, 150, 182, 214, 246, + 256, 288, 320, 352, 384, 416, 448, 480, 268, 300, 332, 364, 396, 428, 460, 492 +}; + +#endif /* AVCODEC_ATRAC1DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3data.h new file mode 100644 index 00000000..5d91274f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3data.h @@ -0,0 +1,141 @@ +/* + * ATRAC3 compatible decoder data + * Copyright (c) 2006-2007 Maxim Poliakovski + * Copyright (c) 2006-2007 Benjamin Larsson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ATRAC3 AKA RealAudio 8 compatible decoder data + */ + +#ifndef AVCODEC_ATRAC3DATA_H +#define AVCODEC_ATRAC3DATA_H + +#include + +/* VLC tables */ + +static const uint8_t huffcode1[9] = { + 0x0, 0x4, 0x5, 0xC, 0xD, 0x1C, 0x1D, 0x1E, 0x1F +}; + +static const uint8_t huffbits1[9] = { 1, 3, 3, 4, 4, 5, 5, 5, 5 }; + +static const uint8_t huffcode2[5] = { 0x0, 0x4, 0x5, 0x6, 0x7 }; + +static const uint8_t huffbits2[5] = { 1, 3, 3, 3, 3 }; + +static const uint8_t huffcode3[7] = { 0x0, 0x4, 0x5, 0xC, 0xD, 0xE, 0xF }; + +static const uint8_t huffbits3[7] = { 1, 3, 3, 4, 4, 4, 4 }; + +static const uint8_t huffcode4[9] = { + 0x0, 0x4, 0x5, 0xC, 0xD, 0x1C, 0x1D, 0x1E, 0x1F +}; + +static const uint8_t huffbits4[9] = { 1, 3, 3, 4, 4, 5, 5, 5, 5 }; + +static const uint8_t huffcode5[15] = { + 0x00, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, 0x1C, + 0x1D, 0x3C, 0x3D, 0x3E, 0x3F, 0x0C, 0x0D +}; + +static const uint8_t huffbits5[15] = { + 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 4, 4 +}; + +static const uint8_t huffcode6[31] = { + 0x00, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x78, 0x79, 0x7A, + 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, 0x08, 0x09 +}; + +static const uint8_t huffbits6[31] = { + 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4 +}; + +static const uint8_t huffcode7[63] = { + 0x00, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0F, 0x10, 0x11, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, + 0x31, 0x32, 0x33, 0x68, 0x69, 0x6A, 0x6B, 0x6C, + 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, + 0x75, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0xF1, 0xF2, + 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, + 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x02, 0x03 +}; + +static const uint8_t huffbits7[63] = { + 3, 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, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4 +}; + +static const uint8_t huff_tab_sizes[7] = { + 9, 5, 7, 9, 15, 31, 63, +}; + +static const uint8_t* const huff_codes[7] = { + huffcode1, huffcode2, huffcode3, huffcode4, huffcode5, huffcode6, huffcode7 +}; + +static const uint8_t* const huff_bits[7] = { + huffbits1, huffbits2, huffbits3, huffbits4, huffbits5, huffbits6, huffbits7, +}; + +static const uint16_t atrac3_vlc_offs[9] = { + 0, 512, 1024, 1536, 2048, 2560, 3072, 3584, 4096 +}; + +/* selector tables */ + +static const uint8_t clc_length_tab[8] = { 0, 4, 3, 3, 4, 4, 5, 6 }; + +static const int8_t mantissa_clc_tab[4] = { 0, 1, -2, -1 }; + +static const int8_t mantissa_vlc_tab[18] = { + 0, 0, 0, 1, 0, -1, 1, 0, -1, 0, 1, 1, 1, -1, -1, 1, -1, -1 +}; + + +/* tables for the scalefactor decoding */ + +static const float inv_max_quant[8] = { + 0.0, 1.0 / 1.5, 1.0 / 2.5, 1.0 / 3.5, + 1.0 / 4.5, 1.0 / 7.5, 1.0 / 15.5, 1.0 / 31.5 +}; + +static const uint16_t subband_tab[33] = { + 0, 8, 16, 24, 32, 40, 48, 56, + 64, 80, 96, 112, 128, 144, 160, 176, + 192, 224, 256, 288, 320, 352, 384, 416, + 448, 480, 512, 576, 640, 704, 768, 896, + 1024 +}; + +/* joint stereo related tables */ +static const float matrix_coeffs[8] = { + 0.0, 2.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0 +}; + +#endif /* AVCODEC_ATRAC3DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus.h new file mode 100644 index 00000000..3c39e293 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus.h @@ -0,0 +1,241 @@ +/* + * ATRAC3+ compatible decoder + * + * Copyright (c) 2010-2013 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Global structures, constants and data for ATRAC3+ decoder. + */ + +#ifndef AVCODEC_ATRAC3PLUS_H +#define AVCODEC_ATRAC3PLUS_H + +#include + +#include "libavutil/float_dsp.h" +#include "atrac.h" +#include "avcodec.h" +#include "fft.h" +#include "get_bits.h" + +/** Global unit sizes */ +#define ATRAC3P_SUBBANDS 16 ///< number of PQF subbands +#define ATRAC3P_SUBBAND_SAMPLES 128 ///< number of samples per subband +#define ATRAC3P_FRAME_SAMPLES (ATRAC3P_SUBBAND_SAMPLES * ATRAC3P_SUBBANDS) + +#define ATRAC3P_PQF_FIR_LEN 12 ///< length of the prototype FIR of the PQF + +/** Global constants */ +#define ATRAC3P_POWER_COMP_OFF 15 ///< disable power compensation + +/** ATRAC3+ channel unit types */ +enum Atrac3pChannelUnitTypes { + CH_UNIT_MONO = 0, ///< unit containing one coded channel + CH_UNIT_STEREO = 1, ///< unit containing two jointly-coded channels + CH_UNIT_EXTENSION = 2, ///< unit containing extension information + CH_UNIT_TERMINATOR = 3 ///< unit sequence terminator +}; + +/** Per-channel IPQF history */ +typedef struct Atrac3pIPQFChannelCtx { + DECLARE_ALIGNED(32, float, buf1)[ATRAC3P_PQF_FIR_LEN * 2][8]; + DECLARE_ALIGNED(32, float, buf2)[ATRAC3P_PQF_FIR_LEN * 2][8]; + int pos; +} Atrac3pIPQFChannelCtx; + +/** Amplitude envelope of a group of sine waves */ +typedef struct Atrac3pWaveEnvelope { + int has_start_point; ///< indicates start point within the GHA window + int has_stop_point; ///< indicates stop point within the GHA window + int start_pos; ///< start position expressed in n*4 samples + int stop_pos; ///< stop position expressed in n*4 samples +} Atrac3pWaveEnvelope; + +/** Parameters of a group of sine waves */ +typedef struct Atrac3pWavesData { + Atrac3pWaveEnvelope pend_env; ///< pending envelope from the previous frame + Atrac3pWaveEnvelope curr_env; ///< group envelope from the current frame + int num_wavs; ///< number of sine waves in the group + int start_index; ///< start index into global tones table for that subband +} Atrac3pWavesData; + +/** Parameters of a single sine wave */ +typedef struct Atrac3pWaveParam { + int freq_index; ///< wave frequency index + int amp_sf; ///< quantized amplitude scale factor + int amp_index; ///< quantized amplitude index + int phase_index; ///< quantized phase index +} Atrac3pWaveParam; + +/** Sound channel parameters */ +typedef struct Atrac3pChanParams { + int ch_num; + int num_coded_vals; ///< number of transmitted quant unit values + int fill_mode; + int split_point; + int table_type; ///< table type: 0 - tone?, 1- noise? + int qu_wordlen[32]; ///< array of word lengths for each quant unit + int qu_sf_idx[32]; ///< array of scale factor indexes for each quant unit + int qu_tab_idx[32]; ///< array of code table indexes for each quant unit + int16_t spectrum[2048]; ///< decoded IMDCT spectrum + uint8_t power_levs[5]; ///< power compensation levels + + /* imdct window shape history (2 frames) for overlapping. */ + uint8_t wnd_shape_hist[2][ATRAC3P_SUBBANDS]; ///< IMDCT window shape, 0=sine/1=steep + uint8_t *wnd_shape; ///< IMDCT window shape for current frame + uint8_t *wnd_shape_prev; ///< IMDCT window shape for previous frame + + /* gain control data history (2 frames) for overlapping. */ + AtracGainInfo gain_data_hist[2][ATRAC3P_SUBBANDS]; ///< gain control data for all subbands + AtracGainInfo *gain_data; ///< gain control data for next frame + AtracGainInfo *gain_data_prev; ///< gain control data for previous frame + int num_gain_subbands; ///< number of subbands with gain control data + + /* tones data history (2 frames) for overlapping. */ + Atrac3pWavesData tones_info_hist[2][ATRAC3P_SUBBANDS]; + Atrac3pWavesData *tones_info; + Atrac3pWavesData *tones_info_prev; +} Atrac3pChanParams; + +/* Per-unit sine wave parameters */ +typedef struct Atrac3pWaveSynthParams { + int tones_present; ///< 1 - tones info present + int amplitude_mode; ///< 1 - low range, 0 - high range + int num_tone_bands; ///< number of PQF bands with tones + uint8_t tone_sharing[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise tone sharing flags + uint8_t tone_master[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise tone channel swapping + uint8_t invert_phase[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise phase inversion + int tones_index; ///< total sum of tones in this unit + Atrac3pWaveParam waves[48]; +} Atrac3pWaveSynthParams; + +/** Channel unit parameters */ +typedef struct Atrac3pChanUnitCtx { + /* channel unit variables */ + int unit_type; ///< unit type (mono/stereo) + int num_quant_units; + int num_subbands; + int used_quant_units; ///< number of quant units with coded spectrum + int num_coded_subbands; ///< number of subbands with coded spectrum + int mute_flag; ///< mute flag + int use_full_table; ///< 1 - full table list, 0 - restricted one + int noise_present; ///< 1 - global noise info present + int noise_level_index; ///< global noise level index + int noise_table_index; ///< global noise RNG table index + uint8_t swap_channels[ATRAC3P_SUBBANDS]; ///< 1 - perform subband-wise channel swapping + uint8_t negate_coeffs[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise IMDCT coefficients negation + Atrac3pChanParams channels[2]; + + /* Variables related to GHA tones */ + Atrac3pWaveSynthParams wave_synth_hist[2]; ///< waves synth history for two frames + Atrac3pWaveSynthParams *waves_info; + Atrac3pWaveSynthParams *waves_info_prev; + + Atrac3pIPQFChannelCtx ipqf_ctx[2]; + DECLARE_ALIGNED(32, float, prev_buf)[2][ATRAC3P_FRAME_SAMPLES]; ///< overlapping buffer +} Atrac3pChanUnitCtx; + +/** + * Initialize VLC tables for bitstream parsing. + */ +void ff_atrac3p_init_vlcs(void); + +/** + * Decode bitstream data of a channel unit. + * + * @param[in] gb the GetBit context + * @param[in,out] ctx ptr to the channel unit context + * @param[in] num_channels number of channels to process + * @param[in] avctx ptr to the AVCodecContext + * @return result code: 0 = OK, otherwise - error code + */ +int ff_atrac3p_decode_channel_unit(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, + int num_channels, AVCodecContext *avctx); + +/** + * Initialize IMDCT transform. + * + * @param[in] avctx ptr to the AVCodecContext + * @param[in] mdct_ctx pointer to MDCT transform context + */ +void ff_atrac3p_init_imdct(AVCodecContext *avctx, FFTContext *mdct_ctx); + +/** + * Initialize sine waves synthesizer. + */ +void ff_atrac3p_init_wave_synth(void); + +/** + * Synthesize sine waves for a particular subband. + * + * @param[in] ch_unit pointer to the channel unit context + * @param[in] fdsp pointer to float DSP context + * @param[in] ch_num which channel to process + * @param[in] sb which subband to process + * @param[out] out receives processed data + */ +void ff_atrac3p_generate_tones(Atrac3pChanUnitCtx *ch_unit, AVFloatDSPContext *fdsp, + int ch_num, int sb, float *out); + +/** + * Perform power compensation aka noise dithering. + * + * @param[in] ctx ptr to the channel context + * @param[in] fdsp pointer to float DSP context + * @param[in] ch_index which channel to process + * @param[in,out] sp ptr to channel spectrum to process + * @param[in] rng_index indicates which RNG table to use + * @param[in] sb_num which subband to process + */ +void ff_atrac3p_power_compensation(Atrac3pChanUnitCtx *ctx, AVFloatDSPContext *fdsp, + int ch_index, float *sp, int rng_index, int sb_num); + +/** + * Regular IMDCT and windowing without overlapping, + * with spectrum reversal in the odd subbands. + * + * @param[in] fdsp pointer to float DSP context + * @param[in] mdct_ctx pointer to MDCT transform context + * @param[in] pIn float input + * @param[out] pOut float output + * @param[in] wind_id which MDCT window to apply + * @param[in] sb subband number + */ +void ff_atrac3p_imdct(AVFloatDSPContext *fdsp, FFTContext *mdct_ctx, float *pIn, + float *pOut, int wind_id, int sb); + +/** + * Subband synthesis filter based on the polyphase quadrature (pseudo-QMF) + * filter bank. + * + * @param[in] dct_ctx ptr to the pre-initialized IDCT context + * @param[in,out] hist ptr to the filter history + * @param[in] in input data to process + * @param[out] out receives processed data + */ +void ff_atrac3p_ipqf(FFTContext *dct_ctx, Atrac3pIPQFChannelCtx *hist, + const float *in, float *out); + +extern const uint16_t ff_atrac3p_qu_to_spec_pos[33]; +extern const float ff_atrac3p_sf_tab[64]; +extern const float ff_atrac3p_mant_tab[8]; + +#endif /* AVCODEC_ATRAC3PLUS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus_data.h new file mode 100644 index 00000000..2a107eef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac3plus_data.h @@ -0,0 +1,1914 @@ +/* + * ATRAC3+ compatible decoder + * + * Copyright (c) 2010-2013 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ATRAC3PLUS_DATA_H +#define AVCODEC_ATRAC3PLUS_DATA_H + +#include +#include + +/** VLC tables for wordlen */ +static const uint8_t atrac3p_wl_huff_code1[3] = { 0, 2, 3 }; + +static const uint8_t atrac3p_wl_huff_bits1[3] = { 1, 2, 2 }; + +static const uint8_t atrac3p_wl_huff_xlat1[3] = { 0, 1, 7 }; + +static const uint8_t atrac3p_wl_huff_code2[5] = { 0, 4, 5, 6, 7 }; + +static const uint8_t atrac3p_wl_huff_bits2[5] = { 1, 3, 3, 3, 3 }; + +static const uint8_t atrac3p_wl_huff_xlat2[5] = { 0, 1, 2, 6, 7 }; + +static const uint8_t atrac3p_wl_huff_code3[8] = { + 0, 4, 0xC, 0x1E, 0x1F, 0xD, 0xE, 5 +}; + +static const uint8_t atrac3p_wl_huff_bits3[8] = { 1, 3, 4, 5, 5, 4, 4, 3 }; + +static const uint8_t atrac3p_wl_huff_code4[8] = { + 0, 4, 0xC, 0xD, 0x1E, 0x1F, 0xE, 5 +}; + +static const uint8_t atrac3p_wl_huff_bits4[8] = { 1, 3, 4, 4, 5, 5, 4, 3 }; + +/** VLC tables for scale factor indexes */ +static const uint16_t atrac3p_sf_huff_code1[64] = { + 0, 2, 3, 4, 5, 0xC, 0xD, 0xE0, + 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0x1CE, 0x1CF, + 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, 0x1D5, 0x1D6, 0x1D7, + 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, 0x1DD, 0x1DE, 0x1DF, + 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, 0x1E5, 0x1E6, 0x1E7, + 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, 0x1ED, 0x1EE, 0x1EF, + 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, 0x1F5, 0x1F6, 0x1F7, + 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, 0x1FD, 0x1FE, 0x1FF +}; + +static const uint8_t atrac3p_sf_huff_bits1[64] = { + 2, 3, 3, 3, 3, 4, 4, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 +}; + +static const uint8_t atrac3p_sf_huff_xlat1[64] = { + 0, 1, 61, 62, 63, 2, 60, 3, 4, 5, 6, 57, 58, 59, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 +}; + +static const uint8_t atrac3p_sf_huff_xlat2[64] = { + 0, 1, 2, 62, 63, 3, 61, 4, 5, 6, 57, 58, 59, 60, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 +}; + +static const uint16_t atrac3p_sf_huff_code2[64] = { + 0, 4, 0x18, 0x19, 0x70, 0x1CA, 0x1CB, 0x1CC, + 0x1CD, 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, + 0x1D5, 0x1D6, 0x1D7, 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, + 0x1DD, 0x1DE, 0x1DF, 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, + 0x1E5, 0x1E6, 0x1E7, 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, + 0x1ED, 0x1EE, 0x1EF, 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, + 0x1F5, 0x1F6, 0x1F7, 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, + 0x1FD, 0x1FE, 0x1FF, 0xE4, 0x71, 0x1A, 0x1B, 5 +}; + +static const uint8_t atrac3p_sf_huff_bits2[64] = { + 1, 3, 5, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 7, 5, 5, 3 +}; + +static const uint16_t atrac3p_sf_huff_code3[64] = { + 0, 2, 3, 0x18, 0x19, 0x70, 0x1CC, 0x1CD, + 0x1CE, 0x1CF, 0x1D0, 0x1D1, 0x1D2, 0x1D3, 0x1D4, 0x1D5, + 0x1D6, 0x1D7, 0x1D8, 0x1D9, 0x1DA, 0x1DB, 0x1DC, 0x1DD, + 0x1DE, 0x1DF, 0x1E0, 0x1E1, 0x1E2, 0x1E3, 0x1E4, 0x1E5, + 0x1E6, 0x1E7, 0x1E8, 0x1E9, 0x1EA, 0x1EB, 0x1EC, 0x1ED, + 0x1EE, 0x1EF, 0x1F0, 0x1F1, 0x1F2, 0x1F3, 0x1F4, 0x1F5, + 0x1F6, 0x1F7, 0x1F8, 0x1F9, 0x1FA, 0x1FB, 0x1FC, 0x1FD, + 0x1FE, 0x1FF, 0x71, 0x72, 0x1A, 0x1B, 4, 5 +}; + +static const uint8_t atrac3p_sf_huff_bits3[64] = { + 2, 3, 3, 5, 5, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 5, 5, 3, 3 +}; + +static const uint16_t atrac3p_sf_huff_code4[16] = { + 0, 2, 3, 4, 5, 0xC, 0xD, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0, 0x3D, 0x3E, 0x3F +}; + +static const uint8_t atrac3p_sf_huff_bits4[16] = { + 2, 3, 3, 3, 3, 4, 4, 6, 6, 6, 6, 6, 0, 6, 6, 6 +}; + +static const uint8_t atrac3p_sf_huff_xlat4[16] = { + 0, 1, 13, 14, 15, 2, 12, 3, 4, 5, 6, 7, 8, 9, 10, 11 +}; + +static const uint8_t atrac3p_sf_huff_xlat5[16] = { + 0, 1, 2, 14, 15, 3, 13, 4, 5, 6, 7, 9, 8, 10, 11, 12 +}; + +static const uint16_t atrac3p_sf_huff_code5[16] = { + 0, 4, 0xC, 0x1C, 0x78, 0x79, 0x7A, 0x7B, + 0, 0x7C, 0x7D, 0x7E, 0x7F, 0x1D, 0xD, 5 +}; + +static const uint8_t atrac3p_sf_huff_bits5[16] = { + 1, 3, 4, 5, 7, 7, 7, 7, 0, 7, 7, 7, 7, 5, 4, 3 +}; + +static const uint16_t atrac3p_sf_huff_code6[16] = { + 0, 2, 3, 0xC, 0x1C, 0x3C, 0x7C, 0x7D, 0, 0x7E, 0x7F, 0x3D, 0x1D, 0xD, 4, 5 +}; + +static const uint8_t atrac3p_sf_huff_bits6[16] = { + 2, 3, 3, 4, 5, 6, 7, 7, 0, 7, 7, 6, 5, 4, 3, 3 +}; + +/** VLC tables for code table indexes */ +static const uint8_t atrac3p_ct_huff_code1[4] = { 0, 2, 6, 7 }; + +static const uint8_t atrac3p_ct_huff_bits1[4] = { 1, 2, 3, 3 }; + +static const uint8_t atrac3p_ct_huff_code2[8] = { 0, 2, 3, 4, 5, 6, 0xE, 0xF }; + +static const uint8_t atrac3p_ct_huff_bits2[8] = { 2, 3, 3, 3, 3, 3, 4, 4 }; + +static const uint8_t atrac3p_ct_huff_xlat1[8] = { 0, 1, 2, 3, 6, 7, 4, 5 }; + +static const uint8_t atrac3p_ct_huff_code3[8] = { + 0, 4, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF +}; + +static const uint8_t atrac3p_ct_huff_bits3[8] = { 1, 3, 4, 4, 4, 4, 4, 4 }; + +/* weights for quantized word lengths */ +static const int8_t atrac3p_wl_weights[6][32] = { + { 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, + { 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 6, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 2, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +/* weights for quantized scale factors + * sf_weights[i] = i / (tab_idx + 1) + * where tab_idx = [1,2] */ +static const int8_t atrac3p_sf_weights[2][32] = { + { 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15 }, + { 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, + 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 } +}; + +/** Ungroup table for word length segments. + * Numbers in this table tell which coeff belongs to which segment. */ +static const uint8_t atrac3p_qu_num_to_seg[32] = { + 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, + 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9 +}; + +/** Map quant unit number to subband number */ +static const uint8_t atrac3p_qu_to_subband[32] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +/** Map subband number to number of power compensation groups */ +static const int atrac3p_subband_to_num_powgrps[16] = { + 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5 +}; + +/** 3D base shape tables. The values are grouped together as follows: + * [num_start_values = 8][num_shape_tables = 16][num_seg_coeffs = 9] + * For each of the 8 start values there are 16 different shapes each + * 9 coefficients long. */ +static const int8_t atrac3p_wl_shapes[8][16][9] = { + { { 0, 0, 0, 0, 0, 0, 0, -2, -1 }, + { 0, 0, 0, 0, 0, 0, 0, -5, -1 }, + { 0, 0, 0, -7, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, -7, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, -5, 0, 0 }, + { 0, 0, 0, 0, -5, 0, 0, 0, 0 }, + { -7, -7, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -7, 0, 0, 0, 0, 0, 0, 0 }, + { -2, -2, -5, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, -2, -5, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, -2, -5, 0, 0 }, + { 0, 0, 0, -5, 0, 0, 0, 0, 0 }, + { 0, -2, -7, -2, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, -2, -5, 0, 0, 0 }, + { 0, 0, 0, -5, -5, 0, 0, 0, 0 }, + { 0, 0, 0, -5, -2, 0, 0, 0, 0 } }, + { { -1, -5, -3, -2, -1, -1, 0, 0, 0 }, + { -2, -5, -3, -3, -2, -1, -1, 0, 0 }, + { 0, -1, -1, -1, 0, 0, 0, 0, 0 }, + { -1, -3, 0, 0, 0, 0, 0, 0, 0 }, + { -1, -2, 0, 0, 0, 0, 0, 0, 0 }, + { -1, -3, -1, 0, 0, 0, 0, 1, 1 }, + { -1, -5, -3, -3, -2, -1, 0, 0, 0 }, + { -1, -1, -4, -2, -2, -1, -1, 0, 0 }, + { -1, -1, -3, -2, -3, -1, -1, -1, 0 }, + { -1, -4, -2, -3, -1, 0, 0, 0, 0 }, + { 0, -1, -2, -2, -1, -1, 0, 0, 0 }, + { 0, -2, -1, 0, 0, 0, 0, 0, 0 }, + { -1, -1, 0, 0, 0, 0, 0, 0, 0 }, + { -1, -1, -3, -2, -2, -1, -1, -1, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -1, -3, -2, -2, -1, -1, -1, 0 }, }, + { { -1, -2, 0, 1, 1, 1, 1, 1, 1 }, + { 0, -1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, -2, 1, 1, 1, 1, 1, 1, 1 }, + { 0, -2, 0, 1, 1, 1, 1, 1, 1 }, + { -1, -1, 0, 1, 1, 1, 1, 1, 1 }, + { 0, 0, -1, 0, 1, 1, 1, 1, 1 }, + { -1, -1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, -1, 1, 1, 1, 1, 1, 1 }, + { 0, -1, 0, 1, 1, 1, 1, 1, 1 }, + { -1, -1, -1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 1 }, + { 0, 0, 0, 1, 1, 1, 1, 1, 1 }, + { 0, -1, -1, 1, 1, 1, 1, 1, 1 }, + { 0, 1, 0, 1, 1, 1, 1, 1, 1 }, + { 0, -3, -2, 1, 1, 1, 1, 2, 2 }, + { -3, -5, -3, 2, 2, 2, 2, 2, 2 }, }, + { { -1, -2, 0, 2, 2, 2, 2, 2, 2 }, + { -1, -2, 0, 1, 2, 2, 2, 2, 2 }, + { 0, -2, 0, 2, 2, 2, 2, 2, 2 }, + { -1, 0, 1, 2, 2, 2, 2, 2, 2 }, + { 0, 0, 1, 2, 2, 2, 2, 2, 2 }, + { 0, -2, 0, 1, 2, 2, 2, 2, 2 }, + { 0, -1, 1, 2, 2, 2, 2, 2, 2 }, + { -1, -1, 0, 2, 2, 2, 2, 2, 2 }, + { -1, -1, 0, 1, 2, 2, 2, 2, 2 }, + { -1, -2, -1, 2, 2, 2, 2, 2, 2 }, + { 0, -1, 0, 2, 2, 2, 2, 2, 2 }, + { 1, 1, 0, 1, 2, 2, 2, 2, 2 }, + { 0, 1, 2, 2, 2, 2, 2, 2, 2 }, + { 1, 0, 0, 1, 2, 2, 2, 2, 2 }, + { 0, 0, 0, 1, 2, 2, 2, 2, 2 }, + { -1, -1, -1, 1, 2, 2, 2, 2, 2 }, }, + { { 0, 1, 2, 3, 3, 3, 3, 3, 3 }, + { 1, 1, 2, 3, 3, 3, 3, 3, 3 }, + { -1, 0, 1, 2, 3, 3, 3, 3, 3 }, + { 0, 0, 2, 3, 3, 3, 3, 3, 3 }, + { -1, 0, 1, 3, 3, 3, 3, 3, 3 }, + { 0, 0, 1, 3, 3, 3, 3, 3, 3 }, + { 1, 2, 3, 3, 3, 3, 3, 3, 3 }, + { 1, 2, 2, 3, 3, 3, 3, 3, 3 }, + { 0, 1, 1, 3, 3, 3, 3, 3, 3 }, + { 0, 0, 1, 2, 3, 3, 3, 3, 3 }, + { -1, 1, 2, 3, 3, 3, 3, 3, 3 }, + { -1, 0, 2, 3, 3, 3, 3, 3, 3 }, + { 2, 2, 3, 3, 3, 3, 3, 3, 3 }, + { 1, 1, 3, 3, 3, 3, 3, 3, 3 }, + { 0, 2, 3, 3, 3, 3, 3, 3, 3 }, + { 0, 1, 1, 2, 3, 3, 3, 3, 3 }, }, + { { 0, 1, 2, 3, 4, 4, 4, 4, 4 }, + { 1, 2, 3, 4, 4, 4, 4, 4, 4 }, + { 0, 0, 2, 3, 4, 4, 4, 4, 4 }, + { 1, 1, 2, 4, 4, 4, 4, 4, 4 }, + { 0, 1, 2, 4, 4, 4, 4, 4, 4 }, + { -1, 0, 1, 3, 4, 4, 4, 4, 4 }, + { 0, 0, 1, 3, 4, 4, 4, 4, 4 }, + { 1, 1, 2, 3, 4, 4, 4, 4, 4 }, + { 0, 1, 1, 3, 4, 4, 4, 4, 4 }, + { 2, 2, 3, 4, 4, 4, 4, 4, 4 }, + { 1, 1, 3, 4, 4, 4, 4, 4, 4 }, + { 1, 2, 2, 4, 4, 4, 4, 4, 4 }, + { -1, 0, 2, 3, 4, 4, 4, 4, 4 }, + { 0, 1, 3, 4, 4, 4, 4, 4, 4 }, + { 1, 2, 2, 3, 4, 4, 4, 4, 4 }, + { 0, 2, 3, 4, 4, 4, 4, 4, 4 }, }, + { { 1, 2, 3, 4, 5, 5, 5, 5, 5 }, + { 0, 1, 2, 3, 4, 5, 5, 5, 5 }, + { 0, 1, 2, 3, 5, 5, 5, 5, 5 }, + { 1, 1, 3, 4, 5, 5, 5, 5, 5 }, + { 1, 1, 2, 4, 5, 5, 5, 5, 5 }, + { 1, 2, 2, 4, 5, 5, 5, 5, 5 }, + { 1, 1, 2, 3, 5, 5, 5, 5, 5 }, + { 2, 2, 3, 4, 5, 5, 5, 5, 5 }, + { 0, 1, 2, 4, 5, 5, 5, 5, 5 }, + { 2, 2, 3, 5, 5, 5, 5, 5, 5 }, + { 1, 2, 3, 5, 5, 5, 5, 5, 5 }, + { 0, 1, 3, 4, 5, 5, 5, 5, 5 }, + { 1, 2, 2, 3, 5, 5, 5, 5, 5 }, + { 2, 3, 4, 5, 5, 5, 5, 5, 5 }, + { 0, 2, 3, 4, 5, 5, 5, 5, 5 }, + { 1, 1, 1, 3, 4, 5, 5, 5, 5 }, }, + { { 1, 2, 3, 4, 5, 5, 5, 6, 6 }, + { 1, 2, 3, 4, 5, 6, 6, 6, 6 }, + { 2, 3, 4, 5, 6, 6, 6, 6, 6 }, + { 1, 2, 3, 4, 6, 6, 6, 6, 6 }, + { 2, 2, 3, 4, 5, 5, 5, 6, 6 }, + { 1, 2, 3, 4, 5, 5, 6, 6, 6 }, + { 2, 2, 3, 4, 6, 6, 6, 6, 6 }, + { 2, 2, 3, 4, 5, 6, 6, 6, 6 }, + { 2, 2, 4, 5, 6, 6, 6, 6, 6 }, + { 2, 2, 3, 5, 6, 6, 6, 6, 6 }, + { 1, 2, 3, 5, 6, 6, 6, 6, 6 }, + { 2, 3, 3, 5, 6, 6, 6, 6, 6 }, + { 1, 2, 4, 5, 6, 6, 6, 6, 6 }, + { 2, 2, 3, 4, 5, 5, 6, 6, 6 }, + { 2, 3, 3, 4, 6, 6, 6, 6, 6 }, + { 1, 3, 4, 5, 6, 6, 6, 6, 6 } } +}; + +/** 2D base shape tables for scale factor coding. + * The values are grouped together as follows: + * [num_shape_tables = 64][num_seg_coeffs = 9] */ +static const int8_t atrac3p_sf_shapes[64][9] = { + { -3, -2, -1, 0, 3, 5, 6, 8, 40 }, + { -3, -2, 0, 1, 7, 9, 11, 13, 20 }, + { -1, 0, 0, 1, 6, 8, 10, 13, 41 }, + { 0, 0, 0, 2, 5, 5, 6, 8, 14 }, + { 0, 0, 0, 2, 6, 7, 8, 11, 47 }, + { 0, 0, 1, 2, 5, 7, 8, 10, 32 }, + { 0, 0, 1, 3, 8, 10, 12, 14, 47 }, + { 0, 0, 2, 4, 9, 10, 12, 14, 40 }, + { 0, 0, 3, 5, 9, 10, 12, 14, 22 }, + { 0, 1, 3, 5, 10, 14, 18, 22, 31 }, + { 0, 2, 5, 6, 10, 10, 10, 12, 46 }, + { 0, 2, 5, 7, 12, 14, 15, 18, 44 }, + { 1, 1, 4, 5, 7, 7, 8, 9, 15 }, + { 1, 2, 2, 2, 4, 5, 7, 9, 26 }, + { 1, 2, 2, 3, 6, 7, 7, 8, 47 }, + { 1, 2, 2, 3, 6, 8, 10, 13, 22 }, + { 1, 3, 4, 7, 13, 17, 21, 24, 41 }, + { 1, 4, 0, 4, 10, 12, 13, 14, 17 }, + { 2, 3, 3, 3, 6, 8, 10, 13, 48 }, + { 2, 3, 3, 4, 9, 12, 14, 17, 47 }, + { 2, 3, 3, 5, 10, 12, 14, 17, 25 }, + { 2, 3, 5, 7, 8, 9, 9, 9, 13 }, + { 2, 3, 5, 9, 16, 21, 25, 28, 33 }, + { 2, 4, 5, 8, 12, 14, 17, 19, 26 }, + { 2, 4, 6, 8, 12, 13, 13, 15, 20 }, + { 2, 4, 7, 12, 20, 26, 30, 32, 35 }, + { 3, 3, 5, 6, 12, 14, 16, 19, 34 }, + { 3, 4, 4, 5, 7, 9, 10, 11, 48 }, + { 3, 4, 5, 6, 8, 9, 10, 11, 16 }, + { 3, 5, 5, 5, 7, 9, 10, 13, 35 }, + { 3, 5, 5, 7, 10, 12, 13, 15, 49 }, + { 3, 5, 7, 7, 8, 7, 9, 12, 21 }, + { 3, 5, 7, 8, 12, 14, 15, 15, 24 }, + { 3, 5, 7, 10, 16, 21, 24, 27, 44 }, + { 3, 5, 8, 14, 21, 26, 28, 29, 42 }, + { 3, 6, 10, 13, 18, 19, 20, 22, 27 }, + { 3, 6, 11, 16, 24, 27, 28, 29, 31 }, + { 4, 5, 4, 3, 4, 6, 8, 11, 18 }, + { 4, 6, 5, 6, 9, 10, 12, 14, 20 }, + { 4, 6, 7, 6, 6, 6, 7, 8, 46 }, + { 4, 6, 7, 9, 13, 16, 18, 20, 48 }, + { 4, 6, 7, 9, 14, 17, 20, 23, 31 }, + { 4, 6, 9, 11, 14, 15, 15, 17, 21 }, + { 4, 8, 13, 20, 27, 32, 35, 36, 38 }, + { 5, 6, 6, 4, 5, 6, 7, 6, 6 }, + { 5, 7, 7, 8, 9, 9, 10, 12, 49 }, + { 5, 8, 9, 9, 10, 11, 12, 13, 42 }, + { 5, 8, 10, 12, 15, 16, 17, 19, 42 }, + { 5, 8, 12, 17, 26, 31, 32, 33, 44 }, + { 5, 9, 13, 16, 20, 22, 23, 23, 35 }, + { 6, 8, 8, 7, 6, 5, 6, 8, 15 }, + { 6, 8, 8, 8, 9, 10, 12, 16, 24 }, + { 6, 8, 8, 9, 10, 10, 11, 11, 13 }, + { 6, 8, 10, 13, 19, 21, 24, 26, 32 }, + { 6, 9, 10, 11, 13, 13, 14, 16, 49 }, + { 7, 9, 9, 10, 13, 14, 16, 19, 27 }, + { 7, 10, 12, 13, 16, 16, 17, 17, 27 }, + { 7, 10, 12, 14, 17, 19, 20, 22, 48 }, + { 8, 9, 10, 9, 10, 11, 11, 11, 19 }, + { 8, 11, 12, 12, 13, 13, 13, 13, 17 }, + { 8, 11, 13, 14, 16, 17, 19, 20, 27 }, + { 8, 12, 17, 22, 26, 28, 29, 30, 33 }, + { 10, 14, 16, 19, 21, 22, 22, 24, 28 }, + { 10, 15, 17, 18, 21, 22, 23, 25, 43 } +}; + +static const uint8_t atrac3p_ct_restricted_to_full[2][7][4] = { + { { 0, 5, 4, 1 }, + { 0, 1, 2, 3 }, + { 3, 0, 4, 2 }, + { 4, 0, 1, 2 }, + { 1, 0, 4, 3 }, + { 3, 0, 2, 1 }, + { 0, 3, 1, 2 } }, + { { 4, 0, 1, 2 }, + { 0, 3, 2, 1 }, + { 0, 1, 2, 3 }, + { 0, 1, 2, 4 }, + { 0, 1, 2, 3 }, + { 1, 4, 2, 0 }, + { 0, 1, 2, 3 } } +}; + +/** Tables for spectrum coding */ +static const uint8_t huff_a01_cb[14] = { + 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 21, 6, 8 +}; + +static const uint8_t huff_a01_xlat[81] = { + 0x00, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x50, 0xD0, 0x70, + 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0x41, 0xC1, 0x31, 0x05, 0x0D, + 0xC3, 0x13, 0x07, 0x0F, 0x44, 0xCC, 0x11, 0x43, 0x33, 0x54, 0x74, 0xDC, + 0xFC, 0x71, 0x15, 0x4D, 0xCD, 0x1D, 0xD3, 0xC7, 0x37, 0x3F, 0xD4, 0xF4, + 0x5C, 0x7C, 0x51, 0xD1, 0xF1, 0x45, 0xC5, 0x35, 0xDD, 0x3D, 0x53, 0x73, + 0xF3, 0x47, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0x55, 0xF5, 0x7D, 0xD7, 0x5F, + 0xFF, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F +}; + +static const uint8_t huff_a02_cb[13] = { + 2, 12, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 +}; + +static const uint8_t huff_a02_xlat[81] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x90, 0x80, 0x20, 0x60, 0x84, 0x94, 0x24, 0x64, + 0x08, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x85, 0x95, 0x65, 0x09, 0x49, + 0x19, 0x59, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, 0x88, 0x61, + 0x25, 0x29, 0x69, 0x5A, 0xA0, 0xA4, 0x98, 0x28, 0x68, 0xA1, 0xA5, 0x89, + 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x96, 0x26, 0x66, 0x0A, 0x4A, 0x1A, + 0xA8, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0x6A, 0xA2, 0xAA +}; + +static const uint8_t huff_a03_cb[9] = { 3, 9, 1, 8, 0, 13, 18, 7, 2 }; + +static const uint8_t huff_a03_xlat[49] = { + 0x00, 0x08, 0x38, 0x01, 0x09, 0x39, 0x07, 0x0F, 0x3F, 0x10, 0x30, 0x11, + 0x31, 0x02, 0x0A, 0x3A, 0x05, 0x06, 0x0E, 0x3E, 0x17, 0x37, 0x18, 0x28, + 0x19, 0x29, 0x2A, 0x32, 0x03, 0x0B, 0x33, 0x3B, 0x0D, 0x15, 0x3D, 0x16, + 0x1E, 0x36, 0x1F, 0x2F, 0x12, 0x1A, 0x13, 0x2B, 0x1D, 0x35, 0x2E, 0x1B, + 0x2D +}; + +static const uint8_t huff_a04_cb[4] = { 2, 3, 2, 4 }; +static const uint8_t huff_a04_xlat[6] = { 1, 2, 0, 3, 4, 5 }; + +static const uint8_t huff_a05_cb[12] = { + 3, 12, 1, 3, 5, 8, 12, 23, 72, 68, 31, 2 +}; + +static const uint8_t huff_a05_xlat[225] = { + 0x00, 0x10, 0xF0, 0x01, 0x11, 0xF1, 0x0F, 0x1F, 0xFF, 0x20, 0xE0, 0xE1, + 0x02, 0xF2, 0x0E, 0x1E, 0x2F, 0x30, 0xD0, 0x21, 0x12, 0x22, 0xE2, 0x03, + 0x0D, 0x2E, 0xEE, 0xFE, 0xEF, 0x40, 0xC0, 0x31, 0xC1, 0xD1, 0x32, 0xD2, + 0x13, 0x23, 0xE3, 0xF3, 0x04, 0xF4, 0x0C, 0x1C, 0x1D, 0x2D, 0xED, 0xFD, + 0x3E, 0xDE, 0x3F, 0xDF, 0x50, 0x60, 0x70, 0x90, 0xA0, 0xB0, 0x41, 0x51, + 0x61, 0x71, 0x91, 0xA1, 0xB1, 0x42, 0x62, 0x92, 0xA2, 0xC2, 0x33, 0xC3, + 0xD3, 0x14, 0x24, 0x34, 0xD4, 0xE4, 0x05, 0x15, 0xF5, 0x06, 0x16, 0x26, + 0xE6, 0xF6, 0x07, 0x17, 0xE7, 0xF7, 0x09, 0x19, 0x29, 0xF9, 0x0A, 0x1A, + 0x2A, 0xEA, 0xFA, 0x0B, 0x1B, 0xFB, 0x2C, 0x3C, 0xDC, 0xEC, 0xFC, 0x3D, + 0x4D, 0xCD, 0xDD, 0x4E, 0x6E, 0x7E, 0xAE, 0xCE, 0x4F, 0x5F, 0x6F, 0x7F, + 0x9F, 0xAF, 0xBF, 0xCF, 0x52, 0x72, 0xB2, 0x43, 0x53, 0x63, 0x73, 0x93, + 0xA3, 0xB3, 0x44, 0x64, 0x74, 0x94, 0xA4, 0xB4, 0xC4, 0x25, 0x35, 0xA5, + 0xC5, 0xD5, 0xE5, 0x36, 0x46, 0xB6, 0xC6, 0xD6, 0x27, 0x37, 0x47, 0xB7, + 0xC7, 0xD7, 0x39, 0x49, 0x59, 0xC9, 0xD9, 0xE9, 0x3A, 0x4A, 0x5A, 0xCA, + 0xDA, 0x2B, 0x3B, 0x4B, 0x6B, 0x7B, 0xDB, 0xEB, 0x4C, 0x5C, 0x6C, 0x7C, + 0x9C, 0xAC, 0xCC, 0x5D, 0x6D, 0x7D, 0x9D, 0xAD, 0xBD, 0x5E, 0x9E, 0xBE, + 0x54, 0x45, 0x55, 0x65, 0x75, 0x95, 0xB5, 0x56, 0x66, 0x76, 0x96, 0xA6, + 0x57, 0x67, 0x97, 0xA7, 0x69, 0x79, 0xA9, 0xB9, 0x6A, 0x7A, 0x9A, 0xAA, + 0xBA, 0x5B, 0x9B, 0xAB, 0xBB, 0xCB, 0xBC, 0x77, 0x99 +}; + +static const uint8_t huff_a06_cb[7] = { + 2, 6, 1, 3, 2, 6, 4 +}; + +static const uint8_t huff_a06_xlat[16] = { + 1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 10, 11, 12, 15 +}; + +static const uint8_t huff_a07_cb[11] = { + 2, 10, 1, 2, 2, 2, 6, 14, 21, 13, 2 +}; + +static const uint8_t huff_a07_xlat[63] = { + 0, 1, 63, 2, 62, 3, 61, 4, 5, 6, 58, 59, 60, 7, 8, 9, + 10, 26, 27, 28, 36, 37, 38, 54, 55, 56, 57, 11, 12, 13, 14, 15, + 16, 25, 29, 30, 31, 33, 34, 35, 39, 47, 48, 49, 50, 51, 52, 53, + 17, 18, 19, 20, 21, 22, 23, 41, 42, 43, 44, 45, 46, 24, 40 +}; + +static const uint8_t huff_a11_cb[13] = { + 1, 11, 1, 0, 0, 0, 8, 1, 18, 9, 22, 10, 12 +}; + +static const uint8_t huff_a11_xlat[81] = { + 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0xD0, 0x50, 0x70, + 0xF0, 0xC4, 0x34, 0x4C, 0xCC, 0x1C, 0x41, 0xC1, 0x31, 0x05, 0x0D, 0x43, + 0xC3, 0x13, 0x07, 0x0F, 0x44, 0x14, 0x74, 0xDC, 0x3C, 0x11, 0x1D, 0x33, + 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0x15, 0x35, + 0x4D, 0xCD, 0xDD, 0x3D, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, 0x3F, 0x51, + 0x45, 0xC5, 0x55, 0x53, 0xF3, 0x4F, 0xCF, 0x1F, 0xFF, 0xD5, 0x75, 0xF5, + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F +}; + +static const uint8_t huff_a12_cb[8] = { 5, 10, 16, 11, 32, 19, 1, 2 }; + +static const uint8_t huff_a12_xlat[81] = { + 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54, 0x01, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x90, 0x94, 0x58, 0x91, 0x95, 0x19, 0x59, 0x06, + 0x46, 0x16, 0x56, 0x80, 0x60, 0x84, 0x24, 0x64, 0xA4, 0x08, 0x48, 0x18, + 0x68, 0x81, 0x21, 0x61, 0xA1, 0x85, 0x25, 0x65, 0xA5, 0x09, 0x49, 0x99, + 0x69, 0xA9, 0x02, 0x42, 0x12, 0x52, 0x96, 0x26, 0x66, 0x1A, 0x5A, 0x20, + 0xA0, 0x88, 0x98, 0x28, 0xA8, 0x89, 0x29, 0x82, 0x92, 0x22, 0x62, 0x86, + 0xA6, 0x0A, 0x4A, 0x9A, 0x6A, 0xAA, 0xA2, 0x8A, 0x2A +}; + +static const uint8_t huff_a13_cb[12] = { + 1, 10, 1, 0, 0, 4, 2, 2, 9, 15, 12, 4 +}; + +static const uint8_t huff_a13_xlat[49] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x39, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x3E, 0x17, 0x18, 0x28, 0x11, 0x29, 0x0A, 0x32, + 0x03, 0x0B, 0x3B, 0x05, 0x0D, 0x3D, 0x16, 0x1F, 0x37, 0x19, 0x12, 0x1A, + 0x2A, 0x13, 0x33, 0x15, 0x35, 0x1E, 0x2E, 0x36, 0x2F, 0x1B, 0x2B, 0x1D, + 0x2D +}; + +static const uint8_t huff_a14_cb[12] = { + 2, 11, 1, 0, 4, 3, 5, 16, 28, 34, 26, 4 +}; + +static const uint8_t huff_a14_xlat[121] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x11, 0x02, + 0x0E, 0x30, 0x50, 0xB0, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x05, 0x0B, + 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x40, 0xC0, 0x31, 0x51, 0xB1, 0xC1, 0xD1, + 0x22, 0x52, 0xE2, 0x13, 0xF3, 0x04, 0x15, 0xF5, 0x1B, 0xEB, 0xFB, 0x0C, + 0x1D, 0xFD, 0x2E, 0x5E, 0xEE, 0x3F, 0x5F, 0xBF, 0xDF, 0x41, 0x32, 0x42, + 0xB2, 0xD2, 0x23, 0x53, 0xB3, 0xE3, 0x14, 0x24, 0xE4, 0xF4, 0x25, 0x35, + 0xD5, 0xE5, 0x2B, 0x3B, 0xDB, 0x1C, 0x2C, 0xBC, 0xEC, 0xFC, 0x2D, 0xBD, + 0xED, 0x3E, 0x4E, 0xBE, 0xDE, 0x4F, 0xCF, 0xC2, 0x33, 0x43, 0xC3, 0xD3, + 0x34, 0x44, 0x54, 0xB4, 0xD4, 0x45, 0x55, 0xC5, 0x4B, 0xCB, 0x3C, 0x4C, + 0x5C, 0xCC, 0xDC, 0x3D, 0x4D, 0x5D, 0xCD, 0xDD, 0xCE, 0xC4, 0xB5, 0x5B, + 0xBB +}; + +static const uint8_t huff_a15_cb[9] = { 5, 11, 9, 12, 16, 44, 98, 42, 4 }; + +static const uint8_t huff_a15_xlat[225] = { + 0x00, 0x10, 0xF0, 0x01, 0x11, 0xF1, 0x0F, 0x1F, 0xFF, 0x20, 0xE0, 0x21, + 0xE1, 0x02, 0x12, 0xF2, 0x0E, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0xD0, 0x31, + 0xD1, 0x22, 0xE2, 0x03, 0x13, 0xF3, 0x0D, 0x1D, 0xFD, 0x2E, 0xEE, 0x3F, + 0xDF, 0x40, 0x60, 0x70, 0x90, 0xA0, 0xC0, 0x41, 0xC1, 0x32, 0x42, 0xC2, + 0xD2, 0x23, 0x33, 0xD3, 0xE3, 0x04, 0x14, 0x24, 0xE4, 0xF4, 0x06, 0x16, + 0xF6, 0x07, 0x09, 0x0A, 0x1A, 0xFA, 0x0C, 0x1C, 0x2C, 0xEC, 0xFC, 0x2D, + 0x3D, 0xDD, 0xED, 0x3E, 0x4E, 0xCE, 0xDE, 0x4F, 0xCF, 0x50, 0xB0, 0x51, + 0x61, 0x71, 0x91, 0xA1, 0xB1, 0x52, 0x62, 0x72, 0x92, 0xA2, 0xB2, 0x43, + 0x53, 0x63, 0x73, 0x93, 0xA3, 0xC3, 0x34, 0x44, 0x64, 0xA4, 0xC4, 0xD4, + 0x05, 0x15, 0x25, 0x35, 0xD5, 0xE5, 0xF5, 0x26, 0x36, 0x46, 0xC6, 0xD6, + 0xE6, 0x17, 0x27, 0x37, 0xC7, 0xD7, 0xE7, 0xF7, 0x19, 0x29, 0x39, 0xC9, + 0xD9, 0xE9, 0xF9, 0x2A, 0x3A, 0x4A, 0x5A, 0xCA, 0xDA, 0xEA, 0x0B, 0x1B, + 0x2B, 0x3B, 0xCB, 0xDB, 0xEB, 0xFB, 0x3C, 0x4C, 0x6C, 0x7C, 0x9C, 0xAC, + 0xBC, 0xCC, 0xDC, 0x4D, 0x5D, 0x6D, 0x7D, 0x9D, 0xAD, 0xBD, 0xCD, 0x5E, + 0x6E, 0x7E, 0x9E, 0xAE, 0xBE, 0x5F, 0x6F, 0x7F, 0x9F, 0xAF, 0xBF, 0xB3, + 0x54, 0x74, 0x94, 0xB4, 0x45, 0x55, 0x65, 0x75, 0x95, 0xA5, 0xB5, 0xC5, + 0x56, 0x66, 0x76, 0x96, 0xA6, 0xB6, 0x47, 0x57, 0x67, 0xA7, 0xB7, 0x49, + 0x59, 0x69, 0xA9, 0xB9, 0x6A, 0x7A, 0x9A, 0xAA, 0xBA, 0x4B, 0x5B, 0x6B, + 0x7B, 0x9B, 0xAB, 0xBB, 0x5C, 0x77, 0x97, 0x79, 0x99 +}; + +static const uint8_t huff_a16_cb[13] = { + 2, 12, 1, 1, 2, 2, 5, 7, 21, 54, 85, 62, 16 +}; + +static const uint8_t huff_a16_xlat[256] = { + 0x00, 0x01, 0x10, 0x11, 0x21, 0x12, 0x20, 0x31, 0x02, 0x22, 0x13, 0x30, + 0x41, 0x32, 0x03, 0x23, 0x14, 0x24, 0x40, 0x51, 0x61, 0xD1, 0xE1, 0x42, + 0x52, 0xD2, 0x33, 0x43, 0xD3, 0x04, 0x34, 0x05, 0x15, 0x25, 0x16, 0x1D, + 0x2D, 0x1E, 0x2E, 0x50, 0x60, 0xD0, 0xE0, 0xF0, 0x71, 0x81, 0xF1, 0x62, + 0x72, 0xE2, 0xF2, 0x53, 0x63, 0xE3, 0xF3, 0x44, 0x54, 0xD4, 0xE4, 0xF4, + 0x35, 0x45, 0x55, 0xD5, 0xE5, 0xF5, 0x06, 0x26, 0x36, 0xD6, 0x07, 0x17, + 0x27, 0x37, 0xD7, 0x18, 0x28, 0x1C, 0x0D, 0x3D, 0x4D, 0x5D, 0x6D, 0x8D, + 0x0E, 0x3E, 0x4E, 0x5E, 0x0F, 0x1F, 0x2F, 0x3F, 0x5F, 0x70, 0x80, 0x90, + 0xC0, 0x91, 0xA1, 0xB1, 0xC1, 0x82, 0x92, 0xA2, 0xC2, 0x73, 0x83, 0x93, + 0xA3, 0xC3, 0x64, 0x74, 0x84, 0x94, 0xA4, 0xC4, 0x65, 0x75, 0x85, 0x46, + 0x56, 0x66, 0xC6, 0xE6, 0xF6, 0x47, 0x57, 0xE7, 0xF7, 0x08, 0x38, 0x48, + 0x58, 0x68, 0xD8, 0xE8, 0xF8, 0x09, 0x19, 0x29, 0x39, 0x59, 0xD9, 0xE9, + 0xF9, 0x1A, 0x2A, 0x3A, 0xDA, 0xEA, 0xFA, 0x1B, 0x2B, 0xDB, 0xEB, 0xFB, + 0x0C, 0x2C, 0x3C, 0xDC, 0xEC, 0x7D, 0x9D, 0xAD, 0xBD, 0xCD, 0x6E, 0x7E, + 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0x4F, 0x6F, 0x7F, 0x8F, 0xAF, 0xA0, 0xB2, + 0xB3, 0xB4, 0x95, 0xA5, 0xB5, 0xC5, 0x76, 0x86, 0x96, 0xA6, 0xB6, 0x67, + 0x77, 0x87, 0x97, 0xC7, 0x78, 0x88, 0x98, 0xC8, 0x49, 0x69, 0x79, 0x89, + 0x99, 0xC9, 0x0A, 0x4A, 0x5A, 0x6A, 0x7A, 0xCA, 0x0B, 0x3B, 0x4B, 0x5B, + 0x6B, 0xCB, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xFC, + 0xDD, 0xED, 0xFD, 0xDE, 0xEE, 0xFE, 0x9F, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF, + 0xB0, 0xA7, 0xB7, 0xA8, 0xB8, 0xA9, 0xB9, 0x8A, 0x9A, 0xAA, 0xBA, 0x7B, + 0x8B, 0x9B, 0xAB, 0xBB +}; + +static const uint8_t huff_a17_cb[9] = { 3, 9, 3, 2, 5, 7, 17, 23, 6 }; + +static const uint8_t huff_a17_xlat[63] = { + 0, 1, 63, 2, 62, 3, 4, 59, 60, 61, 5, 6, 7, 8, 56, 57, + 58, 9, 10, 11, 12, 13, 14, 26, 27, 36, 37, 38, 50, 51, 52, 53, + 54, 55, 15, 16, 17, 18, 19, 20, 21, 25, 28, 29, 30, 31, 33, 34, + 35, 39, 43, 44, 45, 46, 47, 48, 49, 22, 23, 24, 40, 41, 42 +}; + +static const uint8_t huff_a21_cb[14] = { + 1, 12, 1, 0, 0, 2, 6, 0, 7, 21, 15, 17, 8, 4 +}; + +static const uint8_t huff_a21_xlat[81] = { + 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0xD0, 0x70, 0x34, + 0x1C, 0x0D, 0x13, 0x07, 0x50, 0xF0, 0x44, 0xC4, 0x14, 0x74, 0x4C, 0xCC, + 0xDC, 0x3C, 0x41, 0xC1, 0x11, 0x31, 0x05, 0x1D, 0x43, 0xC3, 0x33, 0x37, + 0x0F, 0x54, 0xF4, 0xFC, 0xD1, 0x71, 0x15, 0x4D, 0xCD, 0xDD, 0xD3, 0x73, + 0x47, 0xC7, 0x77, 0x3F, 0xD4, 0x5C, 0x7C, 0x51, 0xF1, 0x45, 0xC5, 0x55, + 0x35, 0x3D, 0x53, 0xF3, 0x17, 0x4F, 0xCF, 0x1F, 0xFF, 0x75, 0xF5, 0x5D, + 0x7D, 0xD7, 0xF7, 0x5F, 0xDF, 0xD5, 0xFD, 0x57, 0x7F +}; + +static const uint8_t huff_a22_cb[10] = { 2, 9, 1, 4, 0, 4, 3, 8, 3, 2 }; + +static const uint8_t huff_a22_xlat[25] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x02, 0x06, + 0x30, 0x11, 0x31, 0x0A, 0x3A, 0x0E, 0x17, 0x37, 0x32, 0x16, 0x3E, 0x12, + 0x36 +}; + +static const uint8_t huff_a23_cb[9] = { 3, 9, 5, 0, 4, 6, 10, 16, 8 }; + +static const uint8_t huff_a23_xlat[49] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x30, 0x02, + 0x3A, 0x06, 0x0E, 0x18, 0x28, 0x11, 0x31, 0x0A, 0x03, 0x05, 0x3E, 0x17, + 0x37, 0x19, 0x29, 0x12, 0x2A, 0x32, 0x0B, 0x33, 0x3B, 0x0D, 0x15, 0x3D, + 0x16, 0x1E, 0x36, 0x1F, 0x2F, 0x1A, 0x13, 0x1B, 0x2B, 0x1D, 0x2D, 0x35, + 0x2E +}; + +static const uint8_t huff_a24_cb[5] = { 2, 4, 3, 1, 2 }; + +static const uint8_t huff_a25_cb[5] = { 2, 4, 1, 5, 2 }; + +static const uint8_t huff_a25_xlat[8] = { 1, 0, 2, 3, 4, 5, 6, 7 }; + +static const uint8_t huff_a26_cb[10] = { 4, 11, 3, 4, 12, 15, 34, 83, 75, 30 }; + +static const uint8_t huff_a26_xlat[256] = { + 0x00, 0x01, 0x11, 0x10, 0x21, 0x12, 0x22, 0x20, 0x30, 0x31, 0x41, 0x02, + 0x32, 0x03, 0x13, 0x23, 0x33, 0x14, 0x24, 0x40, 0x51, 0x61, 0x42, 0x52, + 0x43, 0x53, 0x04, 0x34, 0x44, 0x15, 0x25, 0x35, 0x16, 0x26, 0x50, 0x60, + 0x71, 0x81, 0xD1, 0x62, 0x72, 0x82, 0xD2, 0x63, 0x73, 0xD3, 0x54, 0x64, + 0x05, 0x45, 0x55, 0x65, 0x06, 0x36, 0x46, 0x56, 0x17, 0x27, 0x37, 0x47, + 0x18, 0x28, 0x38, 0x19, 0x1D, 0x2D, 0x3D, 0x1E, 0x70, 0x80, 0x90, 0xD0, + 0xE0, 0x91, 0xA1, 0xB1, 0xC1, 0xE1, 0xF1, 0x92, 0xA2, 0xC2, 0xE2, 0xF2, + 0x83, 0x93, 0xA3, 0xC3, 0xE3, 0xF3, 0x74, 0x84, 0x94, 0xA4, 0xC4, 0xD4, + 0xE4, 0xF4, 0x75, 0x85, 0x95, 0xD5, 0xE5, 0x66, 0x76, 0x86, 0xD6, 0xE6, + 0x07, 0x57, 0x67, 0x77, 0xD7, 0x08, 0x48, 0x58, 0x68, 0xD8, 0x09, 0x29, + 0x39, 0x49, 0x59, 0x69, 0x1A, 0x2A, 0x3A, 0x4A, 0x1B, 0x2B, 0x1C, 0x2C, + 0x3C, 0x4C, 0x0D, 0x4D, 0x5D, 0x6D, 0x7D, 0x8D, 0x0E, 0x2E, 0x3E, 0x4E, + 0x5E, 0x6E, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0xA0, 0xB0, 0xC0, 0xF0, 0xB2, + 0xB3, 0xB4, 0xA5, 0xB5, 0xC5, 0xF5, 0x96, 0xA6, 0xB6, 0xC6, 0xF6, 0x87, + 0x97, 0xA7, 0xB7, 0xC7, 0xE7, 0xF7, 0x78, 0x88, 0x98, 0xA8, 0xC8, 0xE8, + 0xF8, 0x79, 0x89, 0x99, 0xC9, 0xD9, 0xE9, 0xF9, 0x0A, 0x5A, 0x6A, 0x7A, + 0x8A, 0xDA, 0xEA, 0xFA, 0x0B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0x8B, 0xDB, + 0x0C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xDC, 0x9D, 0xAD, 0xBD, 0xCD, 0x7E, + 0x8E, 0x9E, 0xAE, 0xBE, 0x0F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xB8, 0xA9, + 0xB9, 0x9A, 0xAA, 0xBA, 0xCA, 0x9B, 0xAB, 0xBB, 0xCB, 0xEB, 0xFB, 0xAC, + 0xBC, 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, + 0xCF, 0xDF, 0xEF, 0xFF +}; + +static const uint8_t huff_a27_cb[7] = { 4, 8, 3, 14, 10, 20, 16 }; + +static const uint8_t huff_a27_xlat[63] = { + 0, 2, 3, 1, 5, 6, 7, 9, 54, 55, 56, 58, 59, 60, 61, 62, + 63, 4, 8, 10, 11, 12, 14, 49, 52, 53, 57, 13, 15, 16, 17, 18, + 19, 22, 23, 25, 26, 30, 39, 43, 44, 45, 46, 47, 48, 50, 51, 20, + 21, 24, 27, 28, 29, 31, 33, 34, 35, 36, 37, 38, 40, 41, 42 +}; + +static const uint8_t huff_a31_cb[8] = { 1, 6, 1, 0, 3, 1, 0, 4 }; + +static const uint8_t huff_a31_xlat[9] = { + 0x00, 0x04, 0x0C, 0x01, 0x03, 0x05, 0x0D, 0x07, 0x0F +}; + +static const uint8_t huff_a32_cb[13] = { + 1, 11, 1, 0, 0, 2, 2, 6, 12, 18, 19, 15, 6 +}; + +static const uint8_t huff_a32_xlat[81] = { + 0x00, 0x40, 0x01, 0x10, 0x04, 0x80, 0x50, 0x20, 0x14, 0x05, 0x02, 0x90, + 0x60, 0x44, 0x54, 0x24, 0x08, 0x18, 0x41, 0x11, 0x15, 0x09, 0x06, 0xA0, + 0x84, 0x94, 0x64, 0xA4, 0x48, 0x58, 0x28, 0x51, 0x21, 0x45, 0x55, 0x25, + 0x19, 0x12, 0x16, 0x0A, 0x1A, 0x68, 0xA8, 0x81, 0x91, 0x61, 0xA1, 0x85, + 0x95, 0x65, 0xA5, 0x49, 0x59, 0x29, 0x69, 0x42, 0x52, 0x46, 0x56, 0x2A, + 0x88, 0x98, 0x89, 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, 0x26, 0x66, + 0x4A, 0x5A, 0x6A, 0xA2, 0x96, 0xA6, 0x8A, 0x9A, 0xAA +}; + +static const uint8_t huff_a33_cb[12] = { + 3, 12, 1, 1, 13, 1, 14, 28, 33, 81, 32, 52 +}; + +static const uint8_t huff_a33_xlat[256] = { + 0x00, 0x10, 0x40, 0x50, 0x04, 0x44, 0x14, 0x54, 0x01, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x90, 0x20, 0x94, 0x64, 0x18, 0x21, 0x95, 0x19, + 0x69, 0x02, 0x52, 0x06, 0x46, 0x16, 0x80, 0x60, 0x84, 0xD4, 0x24, 0x08, + 0x48, 0x58, 0x68, 0x81, 0x91, 0x61, 0x85, 0x25, 0x65, 0xA5, 0x09, 0x49, + 0x59, 0x29, 0x42, 0x12, 0x56, 0x96, 0xA6, 0x0A, 0x17, 0x1B, 0xD0, 0xC4, + 0x74, 0xF4, 0x88, 0xC8, 0x28, 0xA1, 0x71, 0xC5, 0xD5, 0x75, 0x99, 0xB9, + 0x4D, 0x1D, 0x2D, 0x6D, 0x22, 0x62, 0x66, 0x4A, 0x1A, 0x9A, 0x6A, 0x8E, + 0x5E, 0x43, 0x23, 0x07, 0x47, 0x57, 0x6B, 0xC0, 0xA0, 0xE0, 0x70, 0xB0, + 0xA4, 0xE4, 0x34, 0xB4, 0x98, 0xD8, 0xA8, 0x38, 0x78, 0x0C, 0x4C, 0x1C, + 0x5C, 0x9C, 0x6C, 0x7C, 0xC1, 0xD1, 0xE1, 0x31, 0xE5, 0x35, 0xB5, 0xF5, + 0x89, 0xA9, 0x79, 0xF9, 0x0D, 0xCD, 0x9D, 0xDD, 0xAD, 0x3D, 0x7D, 0x82, + 0xC2, 0x92, 0xD2, 0xE2, 0x72, 0xF2, 0x86, 0xD6, 0xE6, 0x76, 0xB6, 0x8A, + 0x5A, 0xDA, 0xEA, 0xFA, 0x4E, 0x1E, 0x9E, 0xEE, 0x03, 0x13, 0x53, 0x97, + 0xB7, 0x0B, 0x4B, 0x8B, 0x5B, 0x9B, 0xEB, 0x7B, 0x0F, 0x4F, 0x1F, 0x5F, + 0x9F, 0x2F, 0x3F, 0xBF, 0xE8, 0xB8, 0xF8, 0x8C, 0x2C, 0x3C, 0xFC, 0xB1, + 0xC9, 0xD9, 0xE9, 0x39, 0x5D, 0xED, 0xBD, 0xA2, 0x32, 0x26, 0x36, 0x2A, + 0xAA, 0xBA, 0x0E, 0x2E, 0x6E, 0x83, 0xC3, 0x93, 0x63, 0xB3, 0xA7, 0x37, + 0x30, 0xF0, 0xCC, 0xDC, 0xAC, 0xEC, 0xBC, 0xF1, 0x8D, 0xFD, 0xB2, 0xC6, + 0xF6, 0xCA, 0x3A, 0x7A, 0xCE, 0xDE, 0xAE, 0x3E, 0x7E, 0xBE, 0xFE, 0xD3, + 0xA3, 0xE3, 0x33, 0x73, 0xF3, 0x87, 0xC7, 0xD7, 0x27, 0x67, 0xE7, 0x77, + 0xF7, 0xCB, 0xDB, 0x2B, 0xAB, 0x3B, 0xBB, 0xFB, 0x8F, 0xCF, 0xDF, 0x6F, + 0xAF, 0xEF, 0x7F, 0xFF +}; + +static const uint8_t huff_a34_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; + +static const uint8_t huff_a34_xlat[6] = { 1, 0, 2, 3, 4, 5 }; + +static const uint8_t huff_a35_cb[11] = { 2, 10, 1, 0, 2, 3, 6, 19, 9, 75, 110 }; + +static const uint8_t huff_a35_xlat[225] = { + 0x00, 0xF0, 0x0F, 0x10, 0x01, 0xFF, 0x20, 0xE0, 0x11, 0xF1, 0x0E, 0x1F, + 0x30, 0x40, 0xD0, 0x21, 0xE1, 0x02, 0x12, 0x22, 0xE2, 0xF2, 0x03, 0x13, + 0x1E, 0x2E, 0x3E, 0xEE, 0xFE, 0x2F, 0xEF, 0xD2, 0x43, 0xF3, 0x04, 0x0D, + 0x2D, 0x3D, 0x3F, 0xDF, 0x50, 0x60, 0x70, 0x90, 0xB0, 0x31, 0x41, 0x91, + 0xA1, 0xC1, 0xD1, 0x42, 0xA2, 0xC2, 0x23, 0x33, 0xE3, 0x24, 0x34, 0xB4, + 0xD4, 0xF4, 0x05, 0x15, 0x45, 0xE5, 0x16, 0x36, 0x56, 0xA6, 0xC6, 0xD6, + 0xF6, 0x57, 0xC7, 0xF7, 0x09, 0x29, 0x49, 0x59, 0x69, 0xF9, 0x0A, 0x2A, + 0x3A, 0x4A, 0xDA, 0xEA, 0xFA, 0x0B, 0x2B, 0xAB, 0xEB, 0xFB, 0x0C, 0x1C, + 0x2C, 0x3C, 0x4C, 0x5C, 0xCC, 0xDC, 0xFC, 0x1D, 0x4D, 0x6D, 0xBD, 0xCD, + 0xED, 0xFD, 0x4E, 0x6E, 0xCE, 0xDE, 0x7F, 0xA0, 0xC0, 0x51, 0x61, 0x71, + 0xB1, 0x32, 0x52, 0x62, 0x72, 0x92, 0xB2, 0x53, 0x63, 0x73, 0x93, 0xA3, + 0xB3, 0xC3, 0xD3, 0x14, 0x44, 0x54, 0x64, 0x74, 0x94, 0xA4, 0xC4, 0xE4, + 0x25, 0x35, 0x55, 0x65, 0x75, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xF5, 0x06, + 0x26, 0x46, 0x66, 0x76, 0x96, 0xB6, 0xE6, 0x07, 0x17, 0x27, 0x37, 0x47, + 0x67, 0x77, 0x97, 0xA7, 0xB7, 0xD7, 0xE7, 0x19, 0x39, 0x79, 0x99, 0xA9, + 0xB9, 0xC9, 0xD9, 0xE9, 0x1A, 0x5A, 0x6A, 0x7A, 0x9A, 0xAA, 0xBA, 0xCA, + 0x1B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0x9B, 0xBB, 0xCB, 0xDB, 0x6C, 0x7C, + 0x9C, 0xAC, 0xBC, 0xEC, 0x5D, 0x7D, 0x9D, 0xAD, 0xDD, 0x5E, 0x7E, 0x9E, + 0xAE, 0xBE, 0x4F, 0x5F, 0x6F, 0x9F, 0xAF, 0xBF, 0xCF +}; + +static const uint8_t huff_a36_cb[12] = { + 3, 12, 1, 3, 5, 5, 13, 27, 69, 96, 35, 2 +}; + +static const uint8_t huff_a36_xlat[256] = { + 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x22, 0x31, 0x41, 0x32, + 0x13, 0x23, 0x30, 0x40, 0x51, 0x42, 0x03, 0x33, 0x43, 0x04, 0x14, 0x24, + 0x34, 0x15, 0x25, 0x50, 0x61, 0x71, 0xD1, 0x52, 0x62, 0x72, 0xD2, 0x53, + 0x63, 0xD3, 0x44, 0x54, 0x64, 0x05, 0x35, 0x45, 0x55, 0x16, 0x26, 0x36, + 0x46, 0x17, 0x27, 0x1D, 0x2D, 0x3D, 0x60, 0x70, 0xD0, 0x81, 0x91, 0xA1, + 0xC1, 0xE1, 0xF1, 0x82, 0x92, 0xC2, 0xE2, 0xF2, 0x73, 0x83, 0xE3, 0xF3, + 0x74, 0x84, 0xC4, 0xD4, 0xE4, 0xF4, 0x65, 0x75, 0x85, 0xD5, 0xE5, 0x06, + 0x56, 0x66, 0xD6, 0xE6, 0x07, 0x37, 0x47, 0x57, 0x67, 0xD7, 0xE7, 0x18, + 0x28, 0x38, 0x48, 0x58, 0xD8, 0x19, 0x29, 0x2A, 0x1C, 0x2C, 0x0D, 0x4D, + 0x5D, 0x6D, 0x7D, 0x8D, 0x9D, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, + 0x1F, 0x2F, 0x3F, 0x80, 0x90, 0xA0, 0xC0, 0xE0, 0xF0, 0xB1, 0xA2, 0xB2, + 0x93, 0xA3, 0xB3, 0xC3, 0x94, 0xA4, 0xB4, 0x95, 0xA5, 0xB5, 0xC5, 0xF5, + 0x76, 0x86, 0x96, 0xA6, 0xC6, 0xF6, 0x77, 0x87, 0x97, 0xA7, 0xC7, 0xF7, + 0x08, 0x68, 0x78, 0x88, 0x98, 0xC8, 0xE8, 0xF8, 0x09, 0x39, 0x49, 0x59, + 0x69, 0x79, 0x89, 0xD9, 0xE9, 0xF9, 0x0A, 0x1A, 0x3A, 0x4A, 0x5A, 0x6A, + 0xDA, 0xEA, 0xFA, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0xDB, 0xEB, 0xFB, 0x0C, + 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xDC, 0xEC, 0xAD, 0xBD, 0xCD, + 0xDD, 0xED, 0x0E, 0x8E, 0x9E, 0xAE, 0xBE, 0x0F, 0x4F, 0x5F, 0x6F, 0x7F, + 0x8F, 0x9F, 0xAF, 0xB0, 0xB6, 0xB7, 0xA8, 0xB8, 0x99, 0xA9, 0xB9, 0xC9, + 0x7A, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0x0B, 0x6B, 0x7B, 0x8B, 0x9B, 0xCB, + 0xAC, 0xBC, 0xCC, 0xFC, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, + 0xEF, 0xFF, 0xAB, 0xBB +}; + +static const uint8_t huff_a37_cb[7] = { 4, 8, 7, 6, 8, 22, 20 }; + +static const uint8_t huff_a37_xlat[63] = { + 0, 1, 2, 3, 61, 62, 63, 4, 5, 6, 58, 59, 60, 7, 8, 9, + 10, 54, 55, 56, 57, 11, 12, 13, 14, 15, 16, 25, 26, 27, 28, 29, + 30, 35, 36, 37, 38, 48, 49, 50, 51, 52, 53, 17, 18, 19, 20, 21, + 22, 23, 24, 31, 33, 34, 39, 40, 41, 42, 43, 44, 45, 46, 47 +}; + +static const uint8_t huff_a41_cb[14] = { + 1, 12, 1, 0, 0, 6, 2, 0, 0, 0, 19, 9, 24, 20 +}; + +static const uint8_t huff_a41_xlat[81] = { + 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0x50, 0xD0, 0x70, + 0xF0, 0xC4, 0x34, 0x4C, 0xCC, 0x1C, 0x41, 0xC1, 0x31, 0x05, 0x0D, 0x43, + 0xC3, 0x13, 0x07, 0x0F, 0x44, 0x14, 0x74, 0xDC, 0x3C, 0x11, 0x1D, 0x33, + 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0xC5, 0x15, + 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, 0x1F, + 0x3F, 0x51, 0x45, 0x55, 0xD5, 0x75, 0xF5, 0x5D, 0x7D, 0xFD, 0x53, 0xF3, + 0x57, 0xD7, 0xF7, 0x4F, 0xCF, 0x5F, 0xDF, 0x7F, 0xFF +}; + +static const uint8_t huff_a42_cb[10] = { 3, 10, 1, 2, 13, 1, 31, 13, 16, 4 }; + +static const uint8_t huff_a42_xlat[81] = { + 0x00, 0x40, 0x01, 0x10, 0x50, 0x04, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x59, 0x80, 0x90, 0x20, 0x60, 0x84, 0x94, 0x24, + 0x64, 0x08, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, + 0x65, 0x09, 0x49, 0x19, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, + 0xA0, 0xA4, 0x68, 0xA1, 0xA5, 0x99, 0x29, 0x69, 0x96, 0x66, 0x4A, 0x1A, + 0x5A, 0x88, 0x98, 0x28, 0x89, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, 0x26, + 0xA6, 0x0A, 0x9A, 0x2A, 0x6A, 0xA8, 0xA2, 0x8A, 0xAA +}; + +static const uint8_t huff_a43_cb[5] = { 2, 4, 2, 3, 2 }; + +static const uint8_t huff_a43_xlat[7] = { 0, 7, 1, 2, 6, 3, 5 }; + +static const uint8_t huff_a44_cb[9] = { 4, 10, 5, 4, 12, 17, 47, 24, 12 }; + +static const uint8_t huff_a44_xlat[121] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x21, + 0xE1, 0x02, 0x12, 0xF2, 0x0E, 0x1E, 0xFE, 0x2F, 0xEF, 0x30, 0x50, 0xD0, + 0xD1, 0x22, 0xE2, 0x03, 0x13, 0xF3, 0x0D, 0x1D, 0x2D, 0xFD, 0x2E, 0xEE, + 0x3F, 0xDF, 0x40, 0xB0, 0xC0, 0x31, 0x41, 0x51, 0xB1, 0xC1, 0x32, 0xB2, + 0xC2, 0xD2, 0x23, 0xB3, 0xD3, 0xE3, 0x04, 0x14, 0xE4, 0xF4, 0x05, 0x15, + 0xD5, 0xE5, 0xF5, 0x0B, 0x1B, 0x2B, 0x3B, 0xEB, 0xFB, 0x0C, 0x1C, 0x2C, + 0xFC, 0x3D, 0x5D, 0xED, 0x3E, 0x4E, 0x5E, 0xBE, 0xDE, 0x4F, 0x5F, 0xBF, + 0xCF, 0x42, 0x52, 0x33, 0x53, 0xC3, 0x24, 0xB4, 0xD4, 0x25, 0x35, 0xC5, + 0x4B, 0xCB, 0xDB, 0x3C, 0x4C, 0x5C, 0xDC, 0xEC, 0x4D, 0xBD, 0xCD, 0xDD, + 0xCE, 0x43, 0x34, 0x44, 0x54, 0xC4, 0x45, 0x55, 0xB5, 0x5B, 0xBB, 0xBC, + 0xCC +}; + +static const uint8_t huff_a45_cb[5] = { 2, 4, 2, 2, 4 }; + +static const uint8_t huff_a45_xlat[8] = { 1, 2, 0, 3, 4, 5, 6, 7 }; + +static const uint8_t huff_a46_cb[7] = { 5, 9, 1, 16, 31, 36, 172 }; + +static const uint8_t huff_a46_xlat[256] = { + 0x02, 0x00, 0x30, 0x21, 0x31, 0x41, 0x61, 0x12, 0x22, 0x42, 0x62, 0x43, + 0x53, 0x24, 0x45, 0x26, 0x27, 0x10, 0x40, 0xB0, 0x01, 0x11, 0x81, 0x32, + 0x52, 0x72, 0x92, 0x03, 0x13, 0x33, 0x63, 0x14, 0x34, 0x54, 0x64, 0x74, + 0x05, 0x15, 0x25, 0x35, 0x55, 0x65, 0x06, 0x46, 0x56, 0x57, 0x67, 0x88, + 0x20, 0x51, 0x91, 0xD1, 0xF2, 0x23, 0x83, 0x93, 0x04, 0x44, 0x84, 0x94, + 0x75, 0x85, 0xC5, 0x36, 0x66, 0x96, 0xB6, 0x07, 0x37, 0x97, 0x08, 0x28, + 0x38, 0x48, 0x68, 0x09, 0x69, 0x79, 0x0A, 0x2A, 0x1B, 0x9B, 0x2C, 0x4D, + 0x50, 0x60, 0x70, 0x80, 0x90, 0xA0, 0xC0, 0xD0, 0xE0, 0xF0, 0x71, 0xA1, + 0xB1, 0xC1, 0xE1, 0xF1, 0x82, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0x73, 0xA3, + 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, 0x95, + 0xA5, 0xB5, 0xD5, 0xE5, 0xF5, 0x16, 0x76, 0x86, 0xA6, 0xC6, 0xD6, 0xE6, + 0xF6, 0x17, 0x47, 0x77, 0x87, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, 0x18, + 0x58, 0x78, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, 0x19, 0x29, 0x39, + 0x49, 0x59, 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, 0x1A, 0x3A, + 0x4A, 0x5A, 0x6A, 0x7A, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, + 0x0B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0x8B, 0xAB, 0xBB, 0xCB, 0xDB, + 0xEB, 0xFB, 0x0C, 0x1C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0x9C, 0xAC, + 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, 0x0D, 0x1D, 0x2D, 0x3D, 0x5D, 0x6D, 0x7D, + 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, 0x0E, 0x1E, 0x2E, 0x3E, + 0x4E, 0x5E, 0x6E, 0x7E, 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, + 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xBF, + 0xCF, 0xDF, 0xEF, 0xFF +}; + +static const uint8_t huff_a47_cb[8] = { 4, 9, 5, 12, 9, 12, 15, 10 }; + +static const uint8_t huff_a47_xlat[63] = { + 0, 1, 2, 62, 63, 3, 4, 5, 6, 8, 54, 56, 57, 58, 59, 60, + 61, 7, 9, 10, 11, 12, 13, 14, 53, 55, 15, 16, 17, 18, 19, 20, + 21, 36, 37, 39, 42, 52, 22, 25, 28, 35, 38, 40, 41, 43, 45, 46, + 47, 48, 49, 50, 51, 23, 24, 26, 27, 29, 30, 31, 33, 34, 44 +}; + +static const uint8_t huff_a51_cb[12] = { + 2, 11, 1, 0, 6, 2, 6, 18, 4, 26, 6, 12 +}; + +static const uint8_t huff_a51_xlat[81] = { + 0x00, 0x40, 0xC0, 0x30, 0x04, 0x01, 0x03, 0x10, 0x0C, 0xD0, 0x70, 0x34, + 0x1C, 0x0D, 0x07, 0x50, 0xF0, 0x44, 0xC4, 0x14, 0x4C, 0xCC, 0x3C, 0x41, + 0xC1, 0x11, 0x31, 0x05, 0x43, 0xC3, 0x13, 0x33, 0x0F, 0x74, 0xDC, 0x1D, + 0x37, 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0xFC, 0xD1, 0x71, 0xF1, 0xC5, 0x15, + 0x35, 0x4D, 0xCD, 0xDD, 0x3D, 0x53, 0xD3, 0x73, 0x47, 0xC7, 0x17, 0x77, + 0x4F, 0x1F, 0x3F, 0x51, 0x45, 0x55, 0xF3, 0xCF, 0xFF, 0xD5, 0x75, 0xF5, + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F +}; + +static const uint8_t huff_a52_cb[12] = { 1, 10, 1, 0, 2, 2, 0, 4, 3, 8, 3, 2 }; + +static const uint8_t huff_a52_xlat[25] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x02, 0x06, + 0x30, 0x11, 0x31, 0x0A, 0x3A, 0x0E, 0x17, 0x37, 0x32, 0x16, 0x3E, 0x12, + 0x36 +}; + +static const uint8_t huff_a53_xlat[7] = { 0, 1, 2, 6, 7, 3, 5 }; + +static const uint8_t huff_a54_cb[8] = { 4, 9, 4, 7, 12, 19, 21, 58 }; + +static const uint8_t huff_a54_xlat[121] = { + 0x00, 0x01, 0x0F, 0x1F, 0x10, 0xE0, 0xF0, 0x11, 0xF1, 0x2F, 0xFF, 0x20, + 0x21, 0xE1, 0x02, 0x12, 0xF2, 0x03, 0xF3, 0x0E, 0x2E, 0xFE, 0x3F, 0x30, + 0x40, 0xD0, 0xC1, 0xD1, 0x22, 0xC2, 0x33, 0xE3, 0x0C, 0xCC, 0x0D, 0x1D, + 0x2D, 0xFD, 0x1E, 0x3E, 0x5E, 0xEF, 0xC0, 0x52, 0xB2, 0xD2, 0x43, 0xC3, + 0xD3, 0x24, 0x45, 0xF5, 0x4B, 0x5B, 0xFB, 0x1C, 0x3D, 0xBD, 0xDD, 0xEE, + 0xBF, 0xCF, 0xDF, 0x50, 0xB0, 0x31, 0x41, 0x51, 0xB1, 0x32, 0x42, 0xE2, + 0x13, 0x23, 0x53, 0xB3, 0x04, 0x14, 0x34, 0x44, 0x54, 0xB4, 0xC4, 0xD4, + 0xE4, 0xF4, 0x05, 0x15, 0x25, 0x35, 0x55, 0xB5, 0xC5, 0xD5, 0xE5, 0x0B, + 0x1B, 0x2B, 0x3B, 0xBB, 0xCB, 0xDB, 0xEB, 0x2C, 0x3C, 0x4C, 0x5C, 0xBC, + 0xDC, 0xEC, 0xFC, 0x4D, 0x5D, 0xCD, 0xED, 0x4E, 0xBE, 0xCE, 0xDE, 0x4F, + 0x5F +}; + +static const uint8_t huff_a55_cb[8] = { 1, 6, 1, 1, 1, 0, 3, 2 }; + +static const uint8_t huff_a55_xlat[8] = { 0, 1, 2, 3, 6, 7, 4, 5 }; + +static const uint8_t huff_a56_cb[7] = { 3, 7, 1, 8, 6, 8, 8 }; + +static const uint8_t huff_a56_xlat[31] = { + 4, 0, 1, 2, 3, 28, 29, 30, 31, 5, 6, 7, 24, 25, 27, 8, + 9, 14, 19, 21, 22, 23, 26, 10, 11, 12, 13, 15, 17, 18, 20 +}; + +static const uint8_t huff_a57_cb[9] = { 3, 9, 1, 5, 7, 8, 16, 22, 4 }; + +static const uint8_t huff_a57_xlat[63] = { + 0, 1, 2, 61, 62, 63, 3, 4, 5, 6, 58, 59, + 60, 7, 8, 9, 10, 54, 55, 56, 57, 11, 12, 13, + 14, 15, 26, 27, 28, 36, 37, 38, 49, 50, 51, 52, + 53, 16, 17, 18, 19, 20, 21, 23, 24, 25, 29, 30, + 31, 33, 34, 35, 39, 43, 44, 45, 46, 47, 48, 22, + 40, 41, 42 +}; + +static const uint8_t huff_a61_cb[12] = { + 2, 11, 1, 0, 8, 0, 1, 16, 10, 29, 12, 4 +}; + +static const uint8_t huff_a61_xlat[81] = { + 0x00, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x03, 0x70, 0x50, 0xD0, + 0xF0, 0x44, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0x31, 0x05, 0x0D, 0x13, + 0x07, 0x0F, 0x74, 0xCC, 0xDC, 0xFC, 0x41, 0xC1, 0x11, 0x43, 0xC3, 0x33, + 0x54, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, 0xD1, 0x71, 0xF1, 0x45, 0xC5, 0x15, + 0x35, 0x4D, 0xCD, 0x1D, 0x3D, 0x53, 0xD3, 0x73, 0xF3, 0x47, 0xC7, 0x17, + 0x37, 0x4F, 0xCF, 0x1F, 0x3F, 0x55, 0xD5, 0x75, 0xF5, 0x5D, 0xDD, 0xFD, + 0x57, 0xD7, 0x77, 0xF7, 0xFF, 0x7D, 0x5F, 0xDF, 0x7F +}; + +static const uint8_t huff_a62_cb[8] = { 3, 8, 5, 2, 2, 9, 5, 2 }; + +static const uint8_t huff_a62_xlat[25] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x39, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x37, 0x11, 0x0A, 0x32, 0x16, 0x3E, 0x12, + 0x36 +}; + +static const uint8_t huff_a63_cb[11] = { + 3, 11, 1, 1, 10, 4, 16, 29, 46, 75, 74 +}; + +static const uint8_t huff_a63_xlat[256] = { + 0x00, 0x40, 0x10, 0x50, 0x04, 0x44, 0x14, 0x01, 0x41, 0x05, 0x45, 0x55, + 0x54, 0x11, 0x51, 0x15, 0x80, 0x90, 0x60, 0x24, 0x64, 0xA4, 0x48, 0x61, + 0x95, 0x25, 0xA5, 0x02, 0x42, 0x52, 0x16, 0x56, 0x20, 0x84, 0x94, 0x18, + 0x58, 0x81, 0x91, 0x85, 0x65, 0x09, 0x49, 0x19, 0x59, 0x99, 0x29, 0x69, + 0x79, 0x5D, 0x12, 0x62, 0x06, 0x46, 0x86, 0x66, 0x1A, 0x5A, 0x6A, 0x47, + 0x17, 0xC0, 0xA0, 0xE0, 0xC4, 0xD4, 0x74, 0x08, 0x78, 0x0C, 0x4C, 0x1C, + 0x5C, 0xD1, 0x21, 0xE1, 0x71, 0xC5, 0xE5, 0x75, 0xB5, 0x89, 0xBD, 0x92, + 0x22, 0x96, 0xA6, 0x36, 0x0A, 0x4A, 0x8A, 0x9A, 0x2A, 0x7A, 0xDE, 0x6E, + 0x43, 0x13, 0x53, 0x23, 0x07, 0x77, 0x4B, 0x1B, 0x9B, 0x6B, 0x2F, 0xD0, + 0x30, 0x70, 0xE4, 0x34, 0xF4, 0xC8, 0x98, 0x28, 0x68, 0xA8, 0xE8, 0x38, + 0xB8, 0xF8, 0x9C, 0x2C, 0x6C, 0x7C, 0xA1, 0xB1, 0xD5, 0x35, 0xC9, 0xD9, + 0xA9, 0xE9, 0x39, 0xB9, 0xF9, 0xCD, 0x1D, 0x2D, 0xAD, 0x7D, 0xC2, 0xD2, + 0xA2, 0xB2, 0xF2, 0xC6, 0x26, 0x76, 0xB6, 0xDA, 0xAA, 0xEA, 0x3A, 0xFA, + 0x0E, 0x4E, 0x2E, 0x7E, 0xBE, 0xFE, 0x03, 0x83, 0x63, 0xA3, 0xB3, 0x87, + 0x57, 0x97, 0xD7, 0x27, 0x0B, 0x8B, 0x5B, 0x2B, 0xAB, 0xCF, 0x1F, 0x9F, + 0x7F, 0xBF, 0xB0, 0xF0, 0xB4, 0x88, 0xD8, 0x8C, 0xCC, 0xDC, 0xAC, 0xEC, + 0x3C, 0xBC, 0xFC, 0xC1, 0x31, 0xF1, 0xF5, 0x0D, 0x4D, 0x8D, 0x9D, 0xDD, + 0x6D, 0xED, 0x3D, 0xFD, 0x82, 0xE2, 0x32, 0x72, 0xD6, 0xE6, 0xF6, 0xCA, + 0xBA, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xAE, 0xEE, 0x3E, 0xC3, 0x93, 0xD3, + 0xE3, 0x33, 0x73, 0xF3, 0xC7, 0x67, 0xA7, 0xE7, 0x37, 0xB7, 0xF7, 0xCB, + 0xDB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, 0x0F, 0x4F, 0x8F, 0x5F, 0xDF, 0x6F, + 0xAF, 0xEF, 0x3F, 0xFF +}; + +static const uint8_t huff_a64_cb[8] = { 4, 9, 1, 7, 12, 36, 63, 2 }; + +static const uint8_t huff_a64_xlat[121] = { + 0x00, 0x10, 0x20, 0xE0, 0xF0, 0x02, 0x0E, 0xEF, 0x30, 0x01, 0x11, 0x21, + 0x31, 0xF1, 0x12, 0xF2, 0x1E, 0xEE, 0xDF, 0xFF, 0x40, 0xC0, 0xD0, 0xD1, + 0xE1, 0x22, 0x32, 0x42, 0xD2, 0xE2, 0x03, 0x13, 0x23, 0xB3, 0xC3, 0xE3, + 0xF3, 0xE4, 0x05, 0xF5, 0x2B, 0x0C, 0xFC, 0x1D, 0x2D, 0xBD, 0xDD, 0xFD, + 0x2E, 0x4E, 0xDE, 0xFE, 0x0F, 0x1F, 0x2F, 0x3F, 0x50, 0xB0, 0x41, 0x51, + 0xB1, 0xC1, 0x52, 0xB2, 0xC2, 0x33, 0x43, 0x53, 0xD3, 0x04, 0x14, 0x24, + 0x34, 0x44, 0x54, 0xB4, 0xC4, 0xD4, 0xF4, 0x15, 0x25, 0x35, 0x45, 0x55, + 0xB5, 0xC5, 0xD5, 0xE5, 0x0B, 0x1B, 0x3B, 0x4B, 0x5B, 0xBB, 0xCB, 0xDB, + 0xEB, 0xFB, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0xBC, 0xCC, 0xDC, 0xEC, 0x0D, + 0x3D, 0x4D, 0x5D, 0xCD, 0xED, 0x3E, 0x5E, 0xBE, 0xCE, 0x4F, 0xCF, 0x5F, + 0xBF +}; + +static const uint8_t huff_a65_cb[8] = { 2, 7, 3, 0, 1, 3, 4, 4 }; + +static const uint8_t huff_a65_xlat[15] = { + 0, 1, 15, 14, 2, 3, 13, 4, 6, 10, 12, 5, 7, 9, 11 +}; + +static const uint8_t huff_a66_cb[11] = { 2, 10, 1, 2, 2, 6, 8, 6, 3, 1, 2 }; + +static const uint8_t huff_a66_xlat[31] = { + 0, 1, 31, 2, 30, 3, 4, 15, 17, 28, 29, 5, 6, 7, 8, 24, + 25, 26, 27, 9, 10, 11, 21, 22, 23, 12, 19, 20, 13, 14, 18 +}; + +static const uint8_t huff_a67_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 13, 25, 10 }; + +static const uint8_t huff_a67_xlat[63] = { + 0, 1, 2, 62, 63, 3, 4, 60, 61, 5, 6, 7, 57, 58, 59, 8, + 9, 10, 11, 12, 13, 26, 38, 52, 53, 54, 55, 56, 14, 15, 16, 17, + 18, 19, 25, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 39, 45, 46, + 47, 48, 49, 50, 51, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44 +}; + +static const uint8_t huff_a71_cb[5] = { 1, 3, 1, 1, 2 }; + +static const uint8_t huff_a72_cb[12] = { + 2, 11, 1, 0, 4, 8, 3, 8, 24, 17, 12, 4 +}; + +static const uint8_t huff_a72_xlat[81] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x05, + 0x15, 0x51, 0x45, 0x55, 0x80, 0x90, 0x20, 0x64, 0x08, 0x19, 0x02, 0x06, + 0x60, 0x84, 0x94, 0x24, 0x48, 0x18, 0x58, 0x81, 0x91, 0x21, 0x61, 0x85, + 0x95, 0x25, 0x65, 0x09, 0x49, 0x59, 0x42, 0x12, 0x52, 0x46, 0x16, 0x56, + 0xA0, 0xA4, 0x98, 0x28, 0x68, 0xA1, 0xA5, 0x99, 0x29, 0x69, 0x96, 0x26, + 0x66, 0x0A, 0x4A, 0x1A, 0x5A, 0x88, 0xA8, 0x89, 0xA9, 0x82, 0x92, 0x22, + 0x62, 0x86, 0xA6, 0x2A, 0x6A, 0xA2, 0x8A, 0x9A, 0xAA +}; + +static const uint8_t huff_a73_cb[11] = { 2, 10, 1, 1, 5, 2, 8, 7, 13, 8, 4 }; + +static const uint8_t huff_a73_xlat[49] = { + 0x00, 0x08, 0x38, 0x01, 0x39, 0x07, 0x0F, 0x09, 0x3F, 0x10, 0x30, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x32, 0x0D, 0x16, 0x3E, 0x37, + 0x18, 0x28, 0x19, 0x29, 0x12, 0x2A, 0x03, 0x3B, 0x05, 0x15, 0x1E, 0x1F, + 0x2F, 0x1A, 0x0B, 0x2B, 0x33, 0x35, 0x3D, 0x2E, 0x36, 0x13, 0x1B, 0x1D, + 0x2D +}; + +static const uint8_t huff_a74_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 4, 5, 9, 30, 45, 21, 2 +}; + +static const uint8_t huff_a74_xlat[121] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, + 0xF2, 0x0E, 0x21, 0xE1, 0x12, 0xE2, 0x1E, 0x2E, 0xFE, 0x2F, 0xEF, 0x30, + 0x50, 0xB0, 0xC0, 0xD0, 0x31, 0xB1, 0xD1, 0x22, 0xD2, 0x03, 0x13, 0xE3, + 0xF3, 0xF4, 0x05, 0xE5, 0xF5, 0x0B, 0x1B, 0x0C, 0x0D, 0x1D, 0x2D, 0xFD, + 0x3E, 0xEE, 0x3F, 0x5F, 0xDF, 0x40, 0x41, 0x51, 0xC1, 0x32, 0x42, 0x52, + 0xB2, 0xC2, 0x23, 0x33, 0xB3, 0xC3, 0xD3, 0x04, 0x14, 0x24, 0xD4, 0xE4, + 0x15, 0x25, 0xC5, 0xD5, 0x2B, 0x3B, 0xEB, 0xFB, 0x1C, 0x2C, 0x3C, 0x5C, + 0xEC, 0xFC, 0x3D, 0x5D, 0xDD, 0xED, 0x4E, 0x5E, 0xBE, 0xCE, 0xDE, 0x4F, + 0xBF, 0xCF, 0x43, 0x53, 0x34, 0x54, 0xB4, 0xC4, 0x35, 0x45, 0x55, 0xB5, + 0x4B, 0x5B, 0xCB, 0xDB, 0x4C, 0xBC, 0xCC, 0xDC, 0x4D, 0xBD, 0xCD, 0x44, + 0xBB +}; + +static const uint8_t huff_a75_cb[7] = { 2, 6, 1, 3, 3, 4, 4 }; + +static const uint8_t huff_a75_xlat[15] = { + 0, 1, 14, 15, 2, 3, 13, 4, 6, 10, 12, 5, 7, 9, 11 +}; + +static const uint8_t huff_a76_cb[12] = { + 3, 12, 1, 3, 4, 8, 10, 36, 60, 78, 48, 8 +}; + +static const uint8_t huff_a76_xlat[256] = { + 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x41, 0x22, + 0x03, 0x13, 0x23, 0x14, 0x40, 0x51, 0x61, 0x32, 0x42, 0x33, 0x04, 0x24, + 0x15, 0x16, 0x50, 0x60, 0xD0, 0x71, 0x81, 0xD1, 0xE1, 0xF1, 0x52, 0x62, + 0x72, 0xD2, 0x43, 0x53, 0x63, 0xD3, 0x34, 0x44, 0x54, 0x05, 0x25, 0x35, + 0x45, 0x06, 0x26, 0x36, 0x17, 0x27, 0x18, 0x0D, 0x1D, 0x2D, 0x3D, 0x1E, + 0x2E, 0x1F, 0x70, 0x80, 0xE0, 0xF0, 0x91, 0xA1, 0xC1, 0x82, 0x92, 0xC2, + 0xE2, 0xF2, 0x73, 0x83, 0x93, 0xE3, 0xF3, 0x64, 0x74, 0x84, 0xD4, 0xE4, + 0xF4, 0x55, 0x65, 0xD5, 0xE5, 0xF5, 0x46, 0x56, 0x66, 0xD6, 0x07, 0x37, + 0x47, 0x57, 0x08, 0x28, 0x38, 0x48, 0x19, 0x29, 0x39, 0x1A, 0x2A, 0x1B, + 0x1C, 0x2C, 0x3C, 0x4D, 0x5D, 0x6D, 0x0E, 0x3E, 0x4E, 0x5E, 0x0F, 0x2F, + 0x3F, 0x4F, 0x90, 0xA0, 0xB0, 0xC0, 0xB1, 0xA2, 0xB2, 0xA3, 0xB3, 0xC3, + 0x94, 0xA4, 0xB4, 0xC4, 0x75, 0x85, 0x95, 0xA5, 0xC5, 0x76, 0x86, 0x96, + 0xE6, 0xF6, 0x67, 0x77, 0x87, 0xD7, 0xE7, 0xF7, 0x58, 0x68, 0x78, 0x88, + 0xD8, 0xE8, 0xF8, 0x09, 0x49, 0x59, 0x69, 0xD9, 0xE9, 0xF9, 0x0A, 0x3A, + 0x4A, 0x5A, 0xDA, 0xEA, 0x0B, 0x2B, 0x3B, 0x4B, 0xDB, 0x0C, 0x4C, 0x5C, + 0x6C, 0xDC, 0x7D, 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0x6E, 0x7E, 0x8E, 0x9E, + 0xAE, 0xBE, 0x5F, 0x6F, 0x7F, 0x8F, 0x9F, 0xAF, 0xB5, 0xA6, 0xB6, 0xC6, + 0x97, 0xA7, 0xC7, 0x98, 0xA8, 0xB8, 0xC8, 0x79, 0x89, 0x99, 0xA9, 0xB9, + 0xC9, 0x6A, 0x7A, 0x8A, 0x9A, 0xAA, 0xCA, 0xFA, 0x5B, 0x6B, 0x7B, 0x8B, + 0xCB, 0xEB, 0xFB, 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xEC, 0xFC, 0xDD, 0xED, + 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, 0xB7, 0xBA, 0x9B, 0xAB, + 0xBB, 0xCC, 0xEF, 0xFF +}; + +static const uint8_t huff_b01_cb[14] = { + 1, 12, 1, 0, 0, 2, 6, 0, 11, 13, 12, 24, 4, 8 +}; + +static const uint8_t huff_b01_xlat[81] = { + 0x00, 0x01, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x50, 0xD0, 0x70, + 0xF0, 0x34, 0x1C, 0x05, 0x0D, 0x13, 0x07, 0x0F, 0x44, 0xC4, 0x14, 0x4C, + 0xCC, 0x3C, 0x41, 0xC1, 0x11, 0x31, 0x43, 0xC3, 0x33, 0x54, 0x74, 0xDC, + 0xFC, 0x71, 0x15, 0x4D, 0x1D, 0xD3, 0xC7, 0x37, 0x3F, 0xD4, 0xF4, 0x5C, + 0x7C, 0x51, 0xD1, 0xF1, 0x45, 0xC5, 0x55, 0x35, 0xCD, 0xDD, 0x3D, 0x53, + 0x73, 0xF3, 0x47, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0xFF, 0xF5, 0x7D, 0xD7, + 0x5F, 0xD5, 0x75, 0x5D, 0xFD, 0x57, 0xF7, 0xDF, 0x7F +}; + +static const uint8_t huff_b02_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 8, 4, 9, 19, 13, 13, 10 +}; + +static const uint8_t huff_b02_xlat[81] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x05, + 0x15, 0x80, 0x51, 0x45, 0x55, 0x90, 0x20, 0x60, 0x24, 0x08, 0x18, 0x09, + 0x02, 0x06, 0x84, 0x94, 0x64, 0x48, 0x58, 0x81, 0x91, 0x21, 0x61, 0x95, + 0x25, 0x65, 0x19, 0x59, 0x42, 0x12, 0x46, 0x16, 0x56, 0xA0, 0xA4, 0x28, + 0x68, 0x85, 0xA5, 0x49, 0x29, 0x69, 0x52, 0x0A, 0x1A, 0x5A, 0x88, 0x98, + 0xA1, 0x89, 0x99, 0xA9, 0x22, 0x62, 0x96, 0x26, 0x66, 0x4A, 0x6A, 0xA8, + 0x82, 0x92, 0xA2, 0x86, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA +}; + +static const uint8_t huff_b03_cb[11] = { 1, 9, 1, 0, 0, 4, 0, 5, 12, 13, 14 }; + +static const uint8_t huff_b03_xlat[49] = { + 0x00, 0x08, 0x38, 0x01, 0x07, 0x30, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x18, + 0x28, 0x31, 0x02, 0x3A, 0x03, 0x05, 0x06, 0x0E, 0x17, 0x37, 0x11, 0x19, + 0x29, 0x0A, 0x32, 0x0B, 0x3B, 0x0D, 0x15, 0x3D, 0x3E, 0x1F, 0x2F, 0x12, + 0x1A, 0x2A, 0x13, 0x1B, 0x2B, 0x33, 0x1D, 0x2D, 0x35, 0x16, 0x1E, 0x2E, + 0x36 +}; + +static const uint8_t huff_b04_cb[12] = { + 2, 11, 1, 0, 4, 4, 5, 9, 30, 45, 21, 2 +}; + +static const uint8_t huff_b04_xlat[121] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, + 0xF2, 0x0E, 0x21, 0xE1, 0x12, 0xE2, 0x1E, 0x2E, 0xFE, 0x2F, 0xEF, 0x30, + 0x50, 0xB0, 0xC0, 0xD0, 0x31, 0xB1, 0xD1, 0x22, 0xD2, 0x03, 0x13, 0xE3, + 0xF3, 0xF4, 0x05, 0xE5, 0xF5, 0x0B, 0x1B, 0x0C, 0x0D, 0x1D, 0x2D, 0xFD, + 0x3E, 0xEE, 0x3F, 0x5F, 0xDF, 0x40, 0x41, 0x51, 0xC1, 0x32, 0x42, 0x52, + 0xB2, 0xC2, 0x23, 0x33, 0xB3, 0xC3, 0xD3, 0x04, 0x14, 0x24, 0xD4, 0xE4, + 0x15, 0x25, 0xC5, 0xD5, 0x2B, 0x3B, 0xEB, 0xFB, 0x1C, 0x2C, 0x3C, 0x5C, + 0xEC, 0xFC, 0x3D, 0x5D, 0xDD, 0xED, 0x4E, 0x5E, 0xBE, 0xCE, 0xDE, 0x4F, + 0xBF, 0xCF, 0x43, 0x53, 0x34, 0x54, 0xB4, 0xC4, 0x35, 0x45, 0x55, 0xB5, + 0x4B, 0x5B, 0xCB, 0xDB, 0x4C, 0xBC, 0xCC, 0xDC, 0x4D, 0xBD, 0xCD, 0x44, + 0xBB +}; + +static const uint8_t huff_b05_cb[11] = { + 3, 11, 1, 4, 4, 4, 12, 30, 73, 75, 22 +}; + +static const uint8_t huff_b05_xlat[225] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x02, + 0x0E, 0x30, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x0D, 0x1E, 0xFE, 0x2F, + 0xEF, 0x40, 0x60, 0x70, 0x90, 0xA0, 0xC0, 0x31, 0xD1, 0x22, 0x32, 0xD2, + 0xE2, 0x13, 0x23, 0xE3, 0xF3, 0x04, 0x06, 0x07, 0x09, 0x0A, 0x0C, 0x1D, + 0x2D, 0xFD, 0x2E, 0x3E, 0xEE, 0x3F, 0xDF, 0x50, 0xB0, 0x41, 0x51, 0x61, + 0x71, 0x91, 0xA1, 0xB1, 0xC1, 0x42, 0x62, 0x72, 0x92, 0xA2, 0xC2, 0x33, + 0x93, 0xA3, 0xD3, 0x14, 0x24, 0xE4, 0xF4, 0x05, 0x15, 0xF5, 0x16, 0x26, + 0xD6, 0xE6, 0xF6, 0x17, 0x27, 0xD7, 0xE7, 0xF7, 0x19, 0x29, 0x39, 0xE9, + 0xF9, 0x1A, 0x2A, 0xEA, 0xFA, 0x0B, 0x1B, 0xFB, 0x1C, 0x2C, 0xEC, 0xFC, + 0x3D, 0x7D, 0x9D, 0xDD, 0xED, 0x4E, 0x6E, 0x7E, 0x9E, 0xAE, 0xCE, 0xDE, + 0x4F, 0x5F, 0x6F, 0x7F, 0x9F, 0xAF, 0xBF, 0xCF, 0x52, 0xB2, 0x43, 0x53, + 0x63, 0x73, 0xB3, 0xC3, 0x34, 0x44, 0x64, 0x74, 0x94, 0xA4, 0xB4, 0xC4, + 0xD4, 0x25, 0x35, 0x65, 0x75, 0x95, 0xA5, 0xD5, 0xE5, 0x36, 0x46, 0x56, + 0x66, 0xA6, 0xB6, 0xC6, 0x37, 0x47, 0x57, 0xB7, 0xC7, 0x49, 0x59, 0x69, + 0xB9, 0xC9, 0xD9, 0x3A, 0x4A, 0x5A, 0x6A, 0xAA, 0xBA, 0xCA, 0xDA, 0x2B, + 0x3B, 0x6B, 0x7B, 0x9B, 0xAB, 0xDB, 0xEB, 0x3C, 0x4C, 0x6C, 0x7C, 0x9C, + 0xAC, 0xCC, 0xDC, 0x4D, 0x5D, 0x6D, 0xAD, 0xBD, 0xCD, 0x5E, 0xBE, 0x54, + 0x45, 0x55, 0xB5, 0xC5, 0x76, 0x96, 0x67, 0x77, 0x97, 0xA7, 0x79, 0x99, + 0xA9, 0x7A, 0x9A, 0x4B, 0x5B, 0xBB, 0xCB, 0x5C, 0xBC +}; + +static const uint8_t huff_b07_cb[9] = { 3, 9, 3, 2, 4, 8, 23, 13, 10 }; + +static const uint8_t huff_b07_xlat[63] = { + 0, 1, 63, 2, 62, 3, 4, 60, 61, 5, 6, 7, 8, 56, 57, 58, + 59, 9, 10, 11, 12, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, + 37, 38, 39, 51, 52, 53, 54, 55, 13, 14, 15, 16, 17, 18, 19, 45, + 46, 47, 48, 49, 50, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44 +}; + +static const uint8_t huff_b12_cb[10] = { 3, 10, 1, 3, 12, 0, 30, 9, 18, 8 }; + +static const uint8_t huff_b12_xlat[81] = { + 0x00, 0x40, 0x04, 0x01, 0x10, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x80, 0x90, 0x20, 0x60, 0x84, 0x94, 0x24, 0x64, + 0x08, 0x48, 0x18, 0x81, 0x91, 0x61, 0x85, 0x95, 0x25, 0x65, 0x09, 0x49, + 0x19, 0x59, 0x02, 0x42, 0x12, 0x52, 0x06, 0x46, 0x16, 0x56, 0xA4, 0x58, + 0x68, 0x21, 0xA5, 0x29, 0x69, 0x1A, 0x5A, 0xA0, 0x88, 0x98, 0x28, 0xA1, + 0x89, 0x99, 0xA9, 0x92, 0x22, 0x62, 0x86, 0x96, 0x26, 0x66, 0x0A, 0x4A, + 0x6A, 0xA8, 0x82, 0xA2, 0xA6, 0x8A, 0x9A, 0x2A, 0xAA +}; + +static const uint8_t huff_b14_cb[14] = { + 1, 12, 1, 0, 0, 4, 0, 3, 5, 16, 28, 34, 26, 4 +}; + +static const uint8_t huff_b14_xlat[121] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0xF1, 0x1F, 0xFF, 0x20, 0xE0, 0x11, 0x02, + 0x0E, 0x30, 0x50, 0xB0, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x05, 0x0B, + 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, 0x40, 0xC0, 0x31, 0x51, 0xB1, 0xC1, 0xD1, + 0x22, 0x52, 0xE2, 0x13, 0xF3, 0x04, 0x15, 0xF5, 0x1B, 0xEB, 0xFB, 0x0C, + 0x1D, 0xFD, 0x2E, 0x5E, 0xEE, 0x3F, 0x5F, 0xBF, 0xDF, 0x41, 0x32, 0x42, + 0xB2, 0xD2, 0x23, 0x53, 0xB3, 0xE3, 0x14, 0x24, 0xE4, 0xF4, 0x25, 0x35, + 0xD5, 0xE5, 0x2B, 0x3B, 0xDB, 0x1C, 0x2C, 0xBC, 0xEC, 0xFC, 0x2D, 0xBD, + 0xED, 0x3E, 0x4E, 0xBE, 0xDE, 0x4F, 0xCF, 0xC2, 0x33, 0x43, 0xC3, 0xD3, + 0x34, 0x44, 0x54, 0xB4, 0xD4, 0x45, 0x55, 0xC5, 0x4B, 0xCB, 0x3C, 0x4C, + 0x5C, 0xCC, 0xDC, 0x3D, 0x4D, 0x5D, 0xCD, 0xDD, 0xCE, 0xC4, 0xB5, 0x5B, + 0xBB +}; + +static const uint8_t huff_b16_cb[11] = { + 4, 12, 4, 4, 9, 13, 37, 76, 72, 39, 2 +}; + +static const uint8_t huff_b16_xlat[256] = { + 0x00, 0x10, 0x01, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x41, 0x22, + 0x32, 0x03, 0x13, 0x23, 0x14, 0x40, 0x51, 0x61, 0x42, 0x52, 0x33, 0x43, + 0x04, 0x24, 0x34, 0x15, 0x25, 0x16, 0x50, 0x60, 0x70, 0x71, 0x81, 0xD1, + 0xE1, 0x62, 0x72, 0x82, 0xD2, 0x53, 0x63, 0x73, 0xD3, 0x44, 0x54, 0x05, + 0x35, 0x45, 0x55, 0x06, 0x26, 0x36, 0x07, 0x17, 0x27, 0x37, 0x18, 0x28, + 0x19, 0x1D, 0x2D, 0x3D, 0x1E, 0x2E, 0x1F, 0x80, 0x90, 0xD0, 0xE0, 0xF0, + 0x91, 0xA1, 0xB1, 0xC1, 0xF1, 0x92, 0xA2, 0xB2, 0xC2, 0xE2, 0xF2, 0x83, + 0x93, 0xA3, 0xC3, 0xE3, 0xF3, 0x64, 0x74, 0x84, 0x94, 0xD4, 0xE4, 0xF4, + 0x65, 0x75, 0x85, 0xD5, 0xE5, 0x46, 0x56, 0x66, 0x76, 0xD6, 0xE6, 0x47, + 0x57, 0x67, 0xD7, 0x08, 0x38, 0x48, 0x58, 0x09, 0x29, 0x39, 0x49, 0x0A, + 0x1A, 0x2A, 0x3A, 0x1B, 0x2B, 0x0C, 0x1C, 0x2C, 0x3C, 0x0D, 0x4D, 0x5D, + 0x6D, 0x7D, 0x0E, 0x3E, 0x4E, 0x5E, 0x6E, 0x0F, 0x2F, 0x3F, 0x4F, 0xA0, + 0xB0, 0xC0, 0xB3, 0xA4, 0xB4, 0xC4, 0x95, 0xA5, 0xB5, 0xC5, 0xF5, 0x86, + 0x96, 0xA6, 0xB6, 0xC6, 0xF6, 0x77, 0x87, 0x97, 0xA7, 0xC7, 0xE7, 0xF7, + 0x68, 0x78, 0x88, 0x98, 0xD8, 0xE8, 0xF8, 0x59, 0x69, 0x79, 0x89, 0xD9, + 0xE9, 0xF9, 0x4A, 0x5A, 0x6A, 0x7A, 0xDA, 0xEA, 0x0B, 0x3B, 0x4B, 0x5B, + 0xDB, 0xEB, 0x4C, 0x5C, 0x6C, 0x7C, 0x8C, 0xDC, 0x8D, 0x9D, 0xAD, 0xBD, + 0xCD, 0x7E, 0x8E, 0x9E, 0xAE, 0xBE, 0x5F, 0x6F, 0x7F, 0x8F, 0x9F, 0xB7, + 0xA8, 0xB8, 0xC8, 0x99, 0xA9, 0xB9, 0xC9, 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, + 0xFA, 0x6B, 0x7B, 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xFB, 0x9C, 0xAC, 0xBC, + 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xCE, 0xDE, 0xEE, 0xFE, 0xAF, 0xBF, + 0xCF, 0xDF, 0xEF, 0xFF +}; + +static const uint8_t huff_b26_cb[12] = { + 3, 12, 2, 2, 4, 5, 11, 26, 67, 78, 51, 10 +}; + +static const uint8_t huff_b26_xlat[256] = { + 0x00, 0x01, 0x10, 0x11, 0x20, 0x21, 0x02, 0x12, 0x30, 0x31, 0x22, 0x03, + 0x13, 0x40, 0x41, 0x51, 0x32, 0x42, 0x23, 0x33, 0x04, 0x14, 0x24, 0x15, + 0x50, 0x61, 0x71, 0xD1, 0xE1, 0x52, 0x62, 0xD2, 0x43, 0x53, 0xD3, 0x34, + 0x44, 0x05, 0x25, 0x35, 0x06, 0x16, 0x26, 0x17, 0x18, 0x1D, 0x2D, 0x3D, + 0x1E, 0x2E, 0x60, 0x70, 0x80, 0xD0, 0xE0, 0xF0, 0x81, 0x91, 0xA1, 0xC1, + 0xF1, 0x72, 0x82, 0x92, 0xC2, 0xE2, 0xF2, 0x63, 0x73, 0xE3, 0xF3, 0x54, + 0x64, 0x74, 0xD4, 0xE4, 0xF4, 0x45, 0x55, 0x65, 0xD5, 0xE5, 0xF5, 0x36, + 0x46, 0x56, 0xD6, 0xE6, 0x07, 0x27, 0x37, 0x47, 0xD7, 0x08, 0x28, 0x38, + 0x19, 0x29, 0x1A, 0x1B, 0x1C, 0x2C, 0x0D, 0x4D, 0x5D, 0x6D, 0x7D, 0x0E, + 0x3E, 0x4E, 0x5E, 0x6E, 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x90, 0xA0, 0xC0, + 0xB1, 0xA2, 0xB2, 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0x84, 0x94, 0xA4, 0xC4, + 0x75, 0x85, 0x95, 0xC5, 0x66, 0x76, 0x86, 0x96, 0xC6, 0xF6, 0x57, 0x67, + 0x77, 0xE7, 0xF7, 0x48, 0x58, 0x68, 0x78, 0xD8, 0xE8, 0xF8, 0x09, 0x39, + 0x49, 0x59, 0xD9, 0xE9, 0xF9, 0x0A, 0x2A, 0x3A, 0x4A, 0xDA, 0xEA, 0x0B, + 0x2B, 0x3B, 0xDB, 0xEB, 0x0C, 0x3C, 0x4C, 0x5C, 0x6C, 0xDC, 0x8D, 0x9D, + 0xAD, 0xBD, 0xCD, 0x7E, 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0x5F, 0x6F, 0x7F, + 0x8F, 0x9F, 0xAF, 0xB0, 0xB4, 0xA5, 0xB5, 0xA6, 0xB6, 0x87, 0x97, 0xA7, + 0xB7, 0xC7, 0x88, 0x98, 0xA8, 0xC8, 0x69, 0x79, 0x89, 0x99, 0xA9, 0xC9, + 0x5A, 0x6A, 0x7A, 0x9A, 0xCA, 0xFA, 0x4B, 0x5B, 0x6B, 0x7B, 0xCB, 0xFB, + 0x7C, 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xEC, 0xFC, 0xDD, 0xED, 0xFD, 0xDE, + 0xEE, 0xFE, 0xBF, 0xCF, 0xDF, 0xEF, 0xB8, 0xB9, 0x8A, 0xAA, 0xBA, 0x8B, + 0x9B, 0xAB, 0xBB, 0xFF +}; + +static const uint8_t huff_b32_cb[12] = { + 2, 11, 1, 0, 4, 6, 7, 10, 22, 11, 16, 4 +}; + +static const uint8_t huff_b32_xlat[81] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x41, 0x11, 0x05, 0x80, + 0x54, 0x51, 0x45, 0x15, 0x55, 0x02, 0x90, 0x20, 0x60, 0x84, 0x24, 0x08, + 0x18, 0x09, 0x12, 0x06, 0xA0, 0x94, 0x64, 0x48, 0x58, 0x81, 0x91, 0x21, + 0x61, 0x85, 0x95, 0x25, 0x65, 0x49, 0x19, 0x59, 0x42, 0x52, 0x46, 0x16, + 0x56, 0x0A, 0xA4, 0x28, 0x68, 0xA1, 0xA5, 0x29, 0x69, 0x26, 0x4A, 0x1A, + 0x5A, 0x88, 0x98, 0xA8, 0x89, 0x99, 0xA9, 0x82, 0x92, 0x22, 0x62, 0x86, + 0x96, 0x66, 0x9A, 0x2A, 0x6A, 0xA2, 0xA6, 0x8A, 0xAA +}; + +static const uint8_t huff_b33_cb[13] = { + 2, 12, 1, 0, 0, 4, 11, 8, 28, 92, 97, 13, 2 +}; + +static const uint8_t huff_b33_xlat[256] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x50, 0x44, 0x14, 0x54, 0x41, 0x11, 0x51, + 0x05, 0x45, 0x15, 0x55, 0x20, 0x95, 0x65, 0x49, 0x59, 0x52, 0x46, 0x16, + 0x80, 0x90, 0x60, 0x84, 0x94, 0x24, 0x64, 0xA4, 0x08, 0x48, 0x18, 0x58, + 0x81, 0x91, 0x21, 0x61, 0x85, 0x25, 0x09, 0x19, 0x69, 0x02, 0x42, 0x12, + 0x06, 0x56, 0x5A, 0x57, 0xD0, 0x74, 0x68, 0x5C, 0xC1, 0xD5, 0xA5, 0xE5, + 0x75, 0xB5, 0xF5, 0x99, 0xD9, 0xA9, 0xE9, 0x79, 0xB9, 0xF9, 0x1D, 0x5D, + 0x9D, 0xDD, 0x6D, 0xAD, 0xED, 0x7D, 0xBD, 0xFD, 0x82, 0x92, 0xD2, 0x62, + 0x96, 0xD6, 0x26, 0x66, 0xA6, 0xE6, 0x76, 0xB6, 0xF6, 0x0A, 0x4A, 0x1A, + 0x9A, 0xDA, 0x2A, 0x6A, 0xAA, 0xEA, 0x7A, 0xBA, 0xFA, 0x5E, 0x9E, 0xDE, + 0x6E, 0xAE, 0xEE, 0x7E, 0xBE, 0xFE, 0x03, 0x13, 0x53, 0x17, 0x97, 0xD7, + 0x67, 0xA7, 0xE7, 0x77, 0xB7, 0xF7, 0x5B, 0x9B, 0xDB, 0x6B, 0xAB, 0xEB, + 0x7B, 0xBB, 0xFB, 0x5F, 0x9F, 0xDF, 0x6F, 0xAF, 0xEF, 0x7F, 0xBF, 0xFF, + 0xC0, 0xA0, 0xE0, 0x30, 0xC4, 0xD4, 0xE4, 0x34, 0xB4, 0xF4, 0x88, 0xC8, + 0x98, 0xD8, 0x28, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8, 0x0C, 0x4C, 0x1C, + 0x9C, 0xDC, 0x6C, 0xAC, 0xEC, 0x7C, 0xBC, 0xFC, 0xD1, 0xA1, 0xE1, 0x31, + 0x71, 0xB1, 0xF1, 0xC5, 0x35, 0x89, 0xC9, 0x29, 0x39, 0x0D, 0x4D, 0x8D, + 0xCD, 0x2D, 0x3D, 0x22, 0xA2, 0xE2, 0x72, 0xB2, 0xF2, 0x86, 0xC6, 0x36, + 0x8A, 0xCA, 0x3A, 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x2E, 0x3E, 0x43, 0x83, + 0x93, 0xD3, 0x23, 0x63, 0xA3, 0xE3, 0x73, 0xB3, 0xF3, 0x07, 0x47, 0x87, + 0xC7, 0x27, 0x37, 0x4B, 0x8B, 0xCB, 0x1B, 0x2B, 0x3B, 0x4F, 0x8F, 0xCF, + 0x1F, 0x70, 0xB0, 0xF0, 0x8C, 0xCC, 0x2C, 0x3C, 0xC2, 0x32, 0xC3, 0x0F, + 0x2F, 0x3F, 0x33, 0x0B +}; + +static const uint8_t huff_b35_cb[14] = { + 1, 12, 1, 0, 0, 0, 4, 6, 6, 14, 42, 63, 59, 30 +}; + +static const uint8_t huff_b35_xlat[225] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x11, 0xF1, 0x02, 0x0E, 0x1F, 0xFF, 0x20, + 0xE0, 0x21, 0xF2, 0xFE, 0xEF, 0x30, 0xD0, 0xE1, 0x12, 0x22, 0xE2, 0x03, + 0x0D, 0x1D, 0x1E, 0x2E, 0xEE, 0x2F, 0xDF, 0x40, 0x60, 0x70, 0x90, 0xA0, + 0xB0, 0xC0, 0x31, 0x71, 0x91, 0xC1, 0xD1, 0x32, 0xD2, 0x13, 0xE3, 0xF3, + 0x04, 0x05, 0x06, 0x07, 0x17, 0xF7, 0x09, 0x19, 0x0A, 0x1A, 0xFA, 0x0C, + 0x1C, 0x2D, 0xED, 0xFD, 0x3E, 0x7E, 0xDE, 0x3F, 0x6F, 0x7F, 0x9F, 0xAF, + 0xCF, 0x50, 0x41, 0x51, 0x61, 0xA1, 0xB1, 0x62, 0x72, 0x92, 0xA2, 0xC2, + 0x23, 0x33, 0x63, 0x73, 0x93, 0xA3, 0xD3, 0x14, 0x24, 0x34, 0xD4, 0xE4, + 0xF4, 0x15, 0xF5, 0x16, 0x26, 0xD6, 0xE6, 0xF6, 0x27, 0x37, 0x47, 0xE7, + 0x29, 0x39, 0xC9, 0xD9, 0xE9, 0xF9, 0x2A, 0xEA, 0x0B, 0x1B, 0xFB, 0x2C, + 0x7C, 0xEC, 0xFC, 0x3D, 0x4D, 0x6D, 0x7D, 0xDD, 0x4E, 0x5E, 0x6E, 0x9E, + 0xAE, 0xCE, 0x4F, 0x5F, 0x42, 0x52, 0xB2, 0x43, 0xB3, 0xC3, 0x44, 0x64, + 0x74, 0x94, 0xA4, 0x25, 0x35, 0x65, 0x75, 0x95, 0xA5, 0xE5, 0x36, 0x46, + 0x66, 0x76, 0x96, 0xA6, 0xB6, 0xC6, 0x57, 0xA7, 0xB7, 0xC7, 0xD7, 0x59, + 0xA9, 0xB9, 0x3A, 0x4A, 0x6A, 0xCA, 0xDA, 0x2B, 0x3B, 0x6B, 0x9B, 0xAB, + 0xDB, 0xEB, 0x3C, 0x6C, 0x9C, 0xAC, 0xCC, 0xDC, 0x5D, 0x9D, 0xAD, 0xBD, + 0xCD, 0xBE, 0xBF, 0x53, 0x54, 0xB4, 0xC4, 0x45, 0x55, 0xB5, 0xC5, 0xD5, + 0x56, 0x67, 0x77, 0x97, 0x49, 0x69, 0x79, 0x99, 0x5A, 0x7A, 0x9A, 0xAA, + 0xBA, 0x4B, 0x5B, 0x7B, 0xBB, 0xCB, 0x4C, 0x5C, 0xBC +}; + +static const uint8_t huff_b37_cb[13] = { + 1, 11, 1, 0, 2, 0, 2, 2, 6, 17, 14, 13, 6 +}; + +static const uint8_t huff_b37_xlat[63] = { + 0, 1, 63, 2, 62, 3, 61, 4, 5, 6, 58, 59, 60, 7, 8, 9, + 10, 25, 26, 27, 28, 29, 34, 35, 37, 38, 39, 55, 56, 57, 11, 13, + 14, 15, 30, 31, 33, 36, 49, 50, 51, 52, 53, 54, 12, 16, 17, 18, + 19, 21, 41, 43, 44, 45, 46, 47, 48, 20, 22, 23, 24, 40, 42 +}; + +static const uint8_t huff_b41_cb[14] = { + 1, 12, 1, 0, 0, 1, 7, 0, 20, 4, 10, 24, 2, 12 +}; + +static const uint8_t huff_b41_xlat[81] = { + 0x00, 0x01, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x03, 0x50, 0xD0, 0x70, + 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0xC1, 0x11, 0x31, 0x05, 0x0D, + 0xC3, 0x13, 0x33, 0x07, 0x0F, 0x44, 0xCC, 0x41, 0x43, 0x54, 0x74, 0xDC, + 0xFC, 0x71, 0x15, 0x4D, 0x1D, 0x37, 0x3F, 0xD4, 0xF4, 0x5C, 0x7C, 0x51, + 0xD1, 0xF1, 0x45, 0xC5, 0x35, 0xCD, 0xDD, 0x3D, 0x53, 0xD3, 0x73, 0xF3, + 0x47, 0xC7, 0x17, 0x77, 0x4F, 0xCF, 0x1F, 0x55, 0xFF, 0xD5, 0x75, 0xF5, + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F +}; + +static const uint8_t huff_b42_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; + +static const uint8_t huff_b42_xlat[25] = { + 0x00, 0x07, 0x08, 0x38, 0x01, 0x39, 0x0F, 0x10, 0x09, 0x3F, 0x30, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x3E, 0x37, 0x12, 0x32, 0x16, + 0x36 +}; + +static const uint8_t huff_b43_cb[10] = { 2, 9, 1, 1, 3, 4, 9, 15, 12, 4 }; + +static const uint8_t huff_b43_xlat[49] = { + 0x00, 0x07, 0x08, 0x38, 0x01, 0x09, 0x39, 0x0F, 0x3F, 0x10, 0x30, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x37, 0x18, 0x28, 0x11, 0x19, 0x29, 0x0A, + 0x03, 0x0B, 0x3B, 0x05, 0x0D, 0x3D, 0x3E, 0x1F, 0x2F, 0x12, 0x1A, 0x2A, + 0x32, 0x13, 0x33, 0x15, 0x35, 0x16, 0x1E, 0x2E, 0x36, 0x1B, 0x2B, 0x1D, + 0x2D +}; + +static const uint8_t huff_b47_cb[10] = { 2, 9, 1, 1, 3, 4, 6, 14, 22, 12 }; + +static const uint8_t huff_b47_xlat[63] = { + 0, 1, 2, 62, 63, 3, 4, 60, 61, 5, 6, 7, 57, 58, 59, 8, + 9, 10, 11, 12, 26, 27, 37, 38, 52, 53, 54, 55, 56, 13, 14, 15, + 16, 17, 18, 25, 28, 29, 30, 31, 33, 34, 35, 36, 39, 46, 47, 48, + 49, 50, 51, 19, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 45 +}; + +static const uint8_t huff_b52_cb[11] = { 1, 9, 1, 0, 1, 3, 2, 3, 7, 4, 4 }; + +static const uint8_t huff_b52_xlat[25] = { + 0x00, 0x01, 0x08, 0x38, 0x07, 0x39, 0x0F, 0x30, 0x09, 0x3F, 0x10, 0x31, + 0x02, 0x3A, 0x06, 0x0E, 0x17, 0x11, 0x0A, 0x3E, 0x37, 0x12, 0x32, 0x16, + 0x36 +}; + +static const uint8_t huff_b53_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; // same as b63!!! + +static const uint8_t huff_b53_xlat[7] = { 0, 7, 1, 2, 3, 5, 6 }; + +static const uint8_t huff_b56_cb[11] = { 1, 9, 1, 0, 2, 0, 2, 4, 11, 9, 2 }; + +static const uint8_t huff_b56_xlat[31] = { + 0, 1, 31, 2, 30, 3, 4, 13, 29, 5, 6, 7, 14, 15, 17, 18, + 19, 26, 27, 28, 8, 9, 12, 20, 21, 22, 23, 24, 25, 10, 11 +}; + +static const uint8_t huff_b62_cb[14] = { + 1, 12, 1, 0, 0, 2, 3, 5, 12, 14, 18, 15, 9, 2 +}; + +static const uint8_t huff_b62_xlat[81] = { + 0x00, 0x40, 0x01, 0x10, 0x04, 0x02, 0x80, 0x50, 0x90, 0x05, 0x06, 0x20, + 0x60, 0x44, 0x14, 0x54, 0x24, 0x08, 0x18, 0x41, 0x11, 0x15, 0x09, 0xA0, + 0x84, 0x94, 0x64, 0xA4, 0x28, 0x51, 0x45, 0x55, 0x19, 0x12, 0x16, 0x0A, + 0x1A, 0x48, 0x58, 0x68, 0x81, 0x91, 0x21, 0x61, 0x85, 0x95, 0x25, 0x65, + 0x49, 0x59, 0x29, 0x69, 0x42, 0x46, 0x56, 0x88, 0x98, 0xA8, 0xA1, 0xA5, + 0x99, 0xA9, 0x52, 0x22, 0x26, 0x66, 0x4A, 0x5A, 0x2A, 0x6A, 0x89, 0x82, + 0x92, 0x62, 0x86, 0x96, 0xA6, 0x8A, 0xAA, 0xA2, 0x9A +}; + +static const uint8_t huff_b63_cb[7] = { 1, 5, 1, 1, 1, 0, 4 }; + +static const uint8_t huff_b63_xlat[7] = { 0, 1, 7, 2, 3, 5, 6 }; + +static const uint8_t huff_b64_cb[7] = { 1, 5, 1, 1, 1, 1, 2 }; + +static const uint8_t huff_b64_xlat[6] = { 1, 0, 2, 5, 3, 4 }; + +static const uint8_t huff_b65_cb[14] = { + 1, 12, 1, 0, 0, 2, 2, 2, 6, 12, 34, 92, 54, 20 +}; + +static const uint8_t huff_b65_xlat[225] = { + 0x00, 0xF0, 0x01, 0x10, 0x0F, 0x11, 0xF1, 0x20, 0xE0, 0x02, 0x0E, 0x1F, + 0xFF, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x07, 0x0A, 0x0D, 0x1E, 0xFE, 0x2F, + 0xEF, 0x30, 0x70, 0x90, 0xA0, 0xC0, 0x71, 0x91, 0xC1, 0xD1, 0x32, 0x92, + 0xE2, 0x03, 0x13, 0x63, 0x04, 0x06, 0xE6, 0xE7, 0xF7, 0x09, 0x19, 0x39, + 0xFA, 0x0C, 0x1C, 0xDD, 0xED, 0xFD, 0x2E, 0x7E, 0x9E, 0x3F, 0x9F, 0x40, + 0x50, 0x60, 0xB0, 0x31, 0x41, 0x61, 0xA1, 0xB1, 0x22, 0x42, 0x72, 0xA2, + 0xB2, 0xC2, 0xD2, 0x23, 0x33, 0x73, 0xA3, 0xC3, 0xD3, 0xE3, 0xF3, 0x14, + 0x24, 0x34, 0x44, 0x74, 0xD4, 0xE4, 0x05, 0x25, 0x45, 0x65, 0x95, 0xA5, + 0x16, 0x26, 0x46, 0x76, 0xA6, 0xB6, 0xC6, 0xD6, 0xF6, 0x17, 0x27, 0x37, + 0x47, 0x67, 0xA7, 0xD7, 0x29, 0x69, 0xB9, 0xD9, 0xE9, 0xF9, 0x1A, 0x2A, + 0x3A, 0x9A, 0xCA, 0xDA, 0xEA, 0x0B, 0x1B, 0x3B, 0x6B, 0xEB, 0xFB, 0x2C, + 0x6C, 0xEC, 0xFC, 0x1D, 0x2D, 0x4D, 0x6D, 0x9D, 0xAD, 0x3E, 0x4E, 0x6E, + 0xAE, 0xCE, 0xEE, 0x4F, 0x5F, 0x6F, 0xDF, 0x51, 0x52, 0x62, 0x43, 0x93, + 0xB3, 0x54, 0x94, 0xA4, 0xF4, 0x15, 0x75, 0xB5, 0xE5, 0xF5, 0x36, 0x56, + 0x66, 0x96, 0x57, 0x77, 0x49, 0x59, 0xA9, 0xC9, 0x4A, 0x5A, 0x6A, 0x7A, + 0xAA, 0xBA, 0x2B, 0x4B, 0x7B, 0x9B, 0xAB, 0xDB, 0x3C, 0x4C, 0x7C, 0x9C, + 0xAC, 0xBC, 0xCC, 0x3D, 0x5D, 0x7D, 0xBD, 0xCD, 0x5E, 0xBE, 0xDE, 0xBF, + 0xCF, 0x53, 0x64, 0xB4, 0xC4, 0x35, 0x55, 0xC5, 0xD5, 0x97, 0xB7, 0xC7, + 0x79, 0x99, 0x5B, 0xBB, 0xCB, 0x5C, 0xDC, 0x7F, 0xAF +}; + +static const uint8_t huff_b66_cb[14] = { + 1, 12, 1, 0, 0, 3, 0, 3, 3, 10, 40, 85, 61, 50 +}; + +static const uint8_t huff_b66_xlat[256] = { + 0x00, 0x10, 0x01, 0x11, 0x21, 0x02, 0x12, 0x20, 0x22, 0x13, 0x30, 0x31, + 0x41, 0xD1, 0xE1, 0x32, 0x52, 0x03, 0x23, 0x2D, 0x40, 0x50, 0x60, 0x80, + 0xD0, 0xE0, 0x51, 0x61, 0xF1, 0x42, 0x62, 0xD2, 0xE2, 0xF2, 0x33, 0x43, + 0xC3, 0xD3, 0xE3, 0x04, 0x14, 0xD4, 0xF4, 0x25, 0x35, 0x16, 0x17, 0xF7, + 0xD8, 0x1C, 0x3C, 0x0D, 0x1D, 0x3D, 0x5D, 0x0E, 0x1E, 0x2E, 0x7E, 0x2F, + 0xC0, 0xF0, 0x71, 0x81, 0x91, 0xC1, 0x72, 0x82, 0x92, 0xB2, 0xC2, 0x53, + 0x63, 0x73, 0x93, 0xA3, 0xF3, 0x24, 0x44, 0x64, 0x84, 0xA4, 0xB4, 0x05, + 0x15, 0x95, 0xD5, 0x06, 0x26, 0x36, 0x46, 0x96, 0xD6, 0xE6, 0xF6, 0x07, + 0x27, 0x37, 0xD7, 0xE7, 0x08, 0x18, 0x28, 0x38, 0xE8, 0xF8, 0x09, 0x19, + 0x29, 0xE9, 0xF9, 0x0A, 0x1A, 0xCA, 0xDA, 0xEA, 0x0B, 0x1B, 0xDB, 0xEB, + 0xFB, 0x2C, 0x4C, 0x5C, 0x7C, 0x8C, 0x4D, 0x6D, 0x8D, 0x9D, 0xFD, 0x3E, + 0x5E, 0x6E, 0x8E, 0x9E, 0xEE, 0x0F, 0x1F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, + 0xCF, 0x70, 0xA1, 0xA2, 0x83, 0xB3, 0x34, 0x74, 0xC4, 0xE4, 0x55, 0x65, + 0x85, 0xA5, 0xC5, 0xE5, 0xF5, 0x56, 0x66, 0x76, 0x86, 0xA6, 0xC6, 0x57, + 0x67, 0x77, 0x97, 0xA7, 0x48, 0x88, 0x98, 0x49, 0x59, 0x79, 0x99, 0x3A, + 0x4A, 0x8A, 0xBA, 0xFA, 0x2B, 0x7B, 0x0C, 0xAC, 0xBC, 0xCC, 0xEC, 0x7D, + 0xAD, 0xBD, 0xDD, 0x4E, 0xBE, 0xCE, 0xFE, 0x8F, 0x9F, 0xAF, 0xBF, 0xDF, + 0xEF, 0xFF, 0x90, 0xA0, 0xB0, 0xB1, 0x54, 0x94, 0x45, 0x75, 0xB5, 0xB6, + 0x47, 0x87, 0xB7, 0xC7, 0x58, 0x68, 0x78, 0xA8, 0xB8, 0xC8, 0x39, 0x69, + 0x89, 0xA9, 0xB9, 0xC9, 0xD9, 0x2A, 0x5A, 0x6A, 0x7A, 0x9A, 0xAA, 0x3B, + 0x4B, 0x5B, 0x6B, 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0x6C, 0x9C, 0xDC, 0xFC, + 0xCD, 0xED, 0xAE, 0xDE +}; + +static const uint8_t huff_b67_cb[10] = { 2, 9, 1, 2, 1, 4, 7, 10, 26, 12 }; + +static const uint8_t huff_b67_xlat[63] = { + 0, 1, 63, 62, 2, 3, 60, 61, 4, 5, 6, 7, 57, 58, 59, 8, + 9, 10, 11, 12, 52, 53, 54, 55, 56, 13, 14, 15, 16, 17, 18, 25, + 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 46, 47, 48, + 49, 50, 51, 19, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 45 +}; + +static const uint8_t huff_b71_cb[14] = { + 1, 12, 1, 0, 0, 1, 7, 0, 19, 5, 13, 23, 0, 12 +}; + +static const uint8_t huff_b71_xlat[81] = { + 0x00, 0x03, 0x40, 0xC0, 0x10, 0x30, 0x04, 0x0C, 0x01, 0x50, 0xD0, 0x70, + 0xF0, 0xC4, 0x14, 0x34, 0x4C, 0x1C, 0x3C, 0xC1, 0x11, 0x31, 0x05, 0x0D, + 0x13, 0x33, 0x07, 0x0F, 0x44, 0xCC, 0x41, 0x43, 0xC3, 0x54, 0x74, 0xDC, + 0xFC, 0xF1, 0xC5, 0x15, 0x1D, 0x53, 0xC7, 0x37, 0x4F, 0x3F, 0xD4, 0xF4, + 0x5C, 0x7C, 0x51, 0xD1, 0x71, 0x45, 0x55, 0x35, 0x4D, 0xCD, 0xDD, 0x3D, + 0xD3, 0x73, 0xF3, 0x47, 0x17, 0x77, 0xCF, 0x1F, 0xFF, 0xD5, 0x75, 0xF5, + 0x5D, 0x7D, 0xFD, 0x57, 0xD7, 0xF7, 0x5F, 0xDF, 0x7F +}; + +static const uint8_t huff_b73_cb[13] = { + 1, 11, 1, 0, 0, 0, 1, 4, 9, 4, 103, 110, 24 +}; + +static const uint8_t huff_b73_xlat[256] = { + 0x00, 0x40, 0x10, 0x04, 0x01, 0x05, 0x50, 0x14, 0x54, 0x41, 0x11, 0x51, + 0x45, 0x15, 0x55, 0x44, 0x95, 0x6A, 0x03, 0x80, 0xC0, 0x90, 0xD0, 0x94, + 0xD4, 0x24, 0x64, 0x58, 0x91, 0xA1, 0x85, 0xD5, 0x25, 0x65, 0xA5, 0xE5, + 0x75, 0xB5, 0xF5, 0x19, 0x59, 0x99, 0xD9, 0x69, 0xA9, 0xE9, 0x79, 0xB9, + 0xF9, 0x4D, 0x5D, 0x9D, 0xDD, 0x6D, 0xAD, 0xED, 0x7D, 0xBD, 0xFD, 0x02, + 0x42, 0x52, 0x06, 0x46, 0x16, 0x56, 0x96, 0xD6, 0x26, 0x66, 0xA6, 0xE6, + 0x76, 0xB6, 0xF6, 0x1A, 0x5A, 0x9A, 0xDA, 0xAA, 0xEA, 0x7A, 0xBA, 0xFA, + 0x5E, 0x9E, 0xDE, 0x6E, 0xAE, 0xEE, 0x7E, 0xBE, 0xFE, 0x07, 0x47, 0x57, + 0x97, 0xD7, 0x67, 0xA7, 0xE7, 0x77, 0xB7, 0xF7, 0x5B, 0x9B, 0xDB, 0x6B, + 0xAB, 0xEB, 0x7B, 0xBB, 0xFB, 0x5F, 0x9F, 0xDF, 0x6F, 0xAF, 0xEF, 0x7F, + 0xBF, 0xFF, 0x20, 0x60, 0x70, 0xB0, 0xF0, 0x84, 0xC4, 0xA4, 0xE4, 0x74, + 0xB4, 0xF4, 0x08, 0x88, 0x18, 0x98, 0xD8, 0x68, 0xA8, 0xE8, 0x78, 0xB8, + 0xF8, 0x1C, 0x5C, 0x9C, 0xDC, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC, + 0x81, 0xD1, 0x21, 0x61, 0xE1, 0x71, 0xB1, 0xF1, 0xC5, 0x35, 0x09, 0x49, + 0x89, 0xC9, 0x29, 0x39, 0x0D, 0x8D, 0xCD, 0x1D, 0x2D, 0x3D, 0x92, 0xD2, + 0x22, 0x62, 0xA2, 0xE2, 0x72, 0xB2, 0xF2, 0x86, 0xC6, 0x36, 0x0A, 0x4A, + 0x8A, 0xCA, 0x2A, 0x3A, 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x2E, 0x3E, 0x13, + 0x53, 0x93, 0xD3, 0x63, 0xA3, 0xE3, 0x73, 0xB3, 0xF3, 0x87, 0xC7, 0x17, + 0x27, 0x37, 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x2B, 0x3B, 0x0F, 0x4F, 0x8F, + 0xCF, 0x1F, 0x2F, 0x3F, 0xA0, 0xE0, 0x30, 0x34, 0x48, 0xC8, 0x28, 0x38, + 0x0C, 0x4C, 0x8C, 0xCC, 0x2C, 0xC1, 0x31, 0x82, 0xC2, 0x12, 0x32, 0x43, + 0x83, 0xC3, 0x23, 0x33 +}; + +static const uint8_t huff_b74_cb[8] = { 1, 6, 1, 0, 2, 2, 2, 4 }; + +static const uint8_t huff_b74_xlat[11] = { + 0, 1, 15, 2, 14, 5, 13, 3, 4, 11, 12 +}; + +static const uint8_t huff_b75_cb[13] = { + 2, 12, 1, 4, 0, 0, 0, 8, 11, 24, 53, 64, 60 +}; + +static const uint8_t huff_b75_xlat[225] = { + 0x00, 0x10, 0xF0, 0x01, 0x0F, 0x20, 0xE0, 0x11, 0xF1, 0x02, 0x0E, 0x1F, + 0xFF, 0xD0, 0x21, 0xE1, 0x12, 0xF2, 0x03, 0x0D, 0x1E, 0xFE, 0x2F, 0xEF, + 0x30, 0x40, 0x60, 0x70, 0x90, 0xA0, 0xC0, 0x31, 0xD1, 0x22, 0xE2, 0x13, + 0xF3, 0x04, 0x06, 0x07, 0x09, 0x0C, 0x1D, 0xFD, 0x2E, 0xEE, 0x3F, 0xDF, + 0x50, 0xB0, 0x41, 0x61, 0x71, 0x91, 0xA1, 0xC1, 0x32, 0x62, 0x72, 0x92, + 0xA2, 0xD2, 0x23, 0xD3, 0xE3, 0x14, 0xF4, 0x05, 0x16, 0x26, 0xE6, 0xF6, + 0x17, 0x27, 0xE7, 0xF7, 0x19, 0x29, 0xF9, 0x0A, 0x1A, 0x2A, 0xFA, 0x0B, + 0x1C, 0x2C, 0xFC, 0x2D, 0x3D, 0xED, 0x3E, 0x4E, 0x7E, 0x9E, 0xDE, 0x4F, + 0x6F, 0x7F, 0x9F, 0xAF, 0xCF, 0x51, 0xB1, 0x42, 0x52, 0xB2, 0xC2, 0x33, + 0x63, 0x73, 0x93, 0xA3, 0xB3, 0xC3, 0x24, 0x34, 0x74, 0xA4, 0xD4, 0xE4, + 0x15, 0x25, 0x65, 0x95, 0xE5, 0xF5, 0x36, 0xD6, 0x37, 0x47, 0xC7, 0xD7, + 0x39, 0x59, 0xB9, 0xC9, 0xD9, 0xE9, 0x3A, 0x6A, 0xDA, 0xEA, 0x1B, 0x2B, + 0x9B, 0xAB, 0xEB, 0xFB, 0x6C, 0x7C, 0x9C, 0xAC, 0xEC, 0x4D, 0x6D, 0x7D, + 0x9D, 0xAD, 0xBD, 0xDD, 0x5E, 0x6E, 0xAE, 0xCE, 0x5F, 0x43, 0x53, 0x44, + 0x54, 0x64, 0x94, 0xB4, 0xC4, 0x35, 0x45, 0x55, 0x75, 0xA5, 0xB5, 0xC5, + 0xD5, 0x46, 0x56, 0x66, 0x76, 0x96, 0xA6, 0xB6, 0xC6, 0x57, 0x67, 0x77, + 0x97, 0xA7, 0xB7, 0x49, 0x69, 0x79, 0x99, 0xA9, 0x4A, 0x5A, 0x7A, 0x9A, + 0xAA, 0xBA, 0xCA, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, 0xBB, 0xCB, 0xDB, 0x3C, + 0x4C, 0x5C, 0xBC, 0xCC, 0xDC, 0x5D, 0xCD, 0xBE, 0xBF +}; + +static const uint8_t huff_b77_cb[12] = { + 2, 11, 1, 0, 4, 6, 10, 12, 7, 15, 4, 4 +}; + +static const uint8_t huff_b77_xlat[63] = { + 0, 1, 2, 62, 63, 3, 4, 5, 59, 60, 61, 6, 7, 8, 9, 10, + 54, 55, 56, 57, 58, 11, 12, 13, 14, 15, 16, 47, 49, 50, 51, 52, + 53, 17, 18, 19, 20, 45, 46, 48, 21, 22, 23, 24, 25, 26, 27, 37, + 38, 39, 40, 41, 42, 43, 44, 28, 29, 30, 35, 31, 33, 34, 36 +}; + +/** Tables for spectrum coding. */ +typedef struct Atrac3pSpecCodeTab { + uint8_t group_size; ///< number of coefficients grouped together + uint8_t num_coeffs; ///< 1 - map index to a single value, > 1 - map index to a vector of values + uint8_t bits; ///< number of bits a single coefficient occupy + uint8_t is_signed; ///< 1 - values in that table are signed ones, otherwise - absolute ones + + int redirect; ///< if >= 0: tells which huffman table must be reused + const uint8_t *cb; ///< pointer to the codebook descriptor + const uint8_t *xlat; ///< pointer to the translation table or NULL if none +} Atrac3pSpecCodeTab; + +static const Atrac3pSpecCodeTab atrac3p_spectra_tabs[112] = { + /* table set = A */ + /* code table = 0 */ + { 1, 4, 2, 1, -1, huff_a01_cb, huff_a01_xlat }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a02_cb, huff_a02_xlat }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a03_cb, huff_a03_xlat }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a04_cb, huff_a04_xlat }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a05_cb, huff_a05_xlat }, // wordlen = 5 + { 1, 1, 4, 0, -1, huff_a06_cb, huff_a06_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a07_cb, huff_a07_xlat }, // wordlen = 7 + + /* code table = 1 */ + { 4, 4, 2, 1, -1, huff_a11_cb, huff_a11_xlat }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a12_cb, huff_a12_xlat }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a13_cb, huff_a13_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a14_cb, huff_a14_xlat }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a15_cb, huff_a15_xlat }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a16_cb, huff_a16_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a17_cb, huff_a17_xlat }, // wordlen = 7 + + /* code table = 2 */ + { 1, 4, 2, 1, -1, huff_a21_cb, huff_a21_xlat }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a22_cb, huff_a22_xlat }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a23_cb, huff_a23_xlat }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a24_cb, NULL }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a25_cb, huff_a25_xlat }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a26_cb, huff_a26_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a27_cb, huff_a27_xlat }, // wordlen = 7 + + /* code table = 3 */ + { 1, 2, 2, 1, -1, huff_a31_cb, huff_a31_xlat }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a32_cb, huff_a32_xlat }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_a33_cb, huff_a33_xlat }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_a34_cb, huff_a34_xlat }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_a35_cb, huff_a35_xlat }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a36_cb, huff_a36_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a37_cb, huff_a37_xlat }, // wordlen = 7 + + /* code table = 4 */ + { 1, 4, 2, 1, -1, huff_a41_cb, huff_a41_xlat }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_a42_cb, huff_a42_xlat }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_a43_cb, huff_a43_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a44_cb, huff_a44_xlat }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a45_cb, huff_a45_xlat }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_a46_cb, huff_a46_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a47_cb, huff_a47_xlat }, // wordlen = 7 + + /* code table = 5 */ + { 1, 4, 2, 1, -1, huff_a51_cb, huff_a51_xlat }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a52_cb, huff_a52_xlat }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_a43_cb, huff_a53_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a54_cb, huff_a54_xlat }, // wordlen = 4 + { 1, 1, 3, 0, -1, huff_a55_cb, huff_a55_xlat }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_a56_cb, huff_a56_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a57_cb, huff_a57_xlat }, // wordlen = 7 + + /* code table = 6 */ + { 2, 4, 2, 1, -1, huff_a61_cb, huff_a61_xlat }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_a62_cb, huff_a62_xlat }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_a63_cb, huff_a63_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a64_cb, huff_a64_xlat }, // wordlen = 4 + { 1, 1, 4, 1, -1, huff_a65_cb, huff_a65_xlat }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_a66_cb, huff_a66_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_a67_cb, huff_a67_xlat }, // wordlen = 7 + + /* code table = 7 */ + { 1, 2, 1, 0, -1, huff_a71_cb, NULL }, // wordlen = 1 + { 2, 4, 2, 0, -1, huff_a72_cb, huff_a72_xlat }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_a73_cb, huff_a73_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_a74_cb, huff_a74_xlat }, // wordlen = 4 + { 1, 1, 4, 1, -1, huff_a75_cb, huff_a75_xlat }, // wordlen = 5 + { 2, 2, 4, 0, -1, huff_a76_cb, huff_a76_xlat }, // wordlen = 6 + { 4, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + + /* table set = B */ + /* code table = 0 */ + { 4, 4, 2, 1, -1, huff_b01_cb, huff_b01_xlat }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b02_cb, huff_b02_xlat }, // wordlen = 2 + { 4, 2, 3, 1, -1, huff_b03_cb, huff_b03_xlat }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_b04_cb, huff_b04_xlat }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b05_cb, huff_b05_xlat }, // wordlen = 5 + { 1, 1, 4, 0, 5, NULL, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b07_cb, huff_b07_xlat }, // wordlen = 7 + + /* code table = 1 */ + { 1, 4, 2, 1, 14, NULL, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b12_cb, huff_b12_xlat }, // wordlen = 2 + { 1, 2, 3, 1, 9, NULL, NULL }, // wordlen = 3 + { 1, 2, 4, 1, -1, huff_b14_cb, huff_b14_xlat }, // wordlen = 4 + { 1, 2, 4, 1, 11, NULL, NULL }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_b16_cb, huff_b16_xlat }, // wordlen = 6 + { 1, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + + /* code table = 2 */ + { 4, 4, 2, 1, 28, NULL, NULL }, // wordlen = 1 + { 4, 4, 2, 0, 22, NULL, NULL }, // wordlen = 2 + { 1, 2, 3, 1, 2, NULL, NULL }, // wordlen = 3 + { 1, 2, 4, 1, 31, NULL, NULL }, // wordlen = 4 + { 2, 2, 4, 1, 60, NULL, NULL }, // wordlen = 5 + { 2, 2, 4, 0, -1, huff_b26_cb, huff_b26_xlat }, // wordlen = 6 + { 4, 1, 6, 1, 6, NULL, NULL }, // wordlen = 7 + + /* code table = 3 */ + { 1, 4, 2, 1, 35, NULL, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b32_cb, huff_b32_xlat }, // wordlen = 2 + { 1, 4, 2, 0, -1, huff_b33_cb, huff_b33_xlat }, // wordlen = 3 + { 2, 2, 4, 1, 59, NULL, NULL }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b35_cb, huff_b35_xlat }, // wordlen = 5 + { 1, 2, 4, 0, 75, NULL, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b37_cb, huff_b37_xlat }, // wordlen = 7 + + /* code table = 4 */ + { 1, 4, 2, 1, -1, huff_b41_cb, huff_b41_xlat }, // wordlen = 1 + { 4, 2, 3, 1, -1, huff_b42_cb, huff_b42_xlat }, // wordlen = 2 + { 1, 2, 3, 1, -1, huff_b43_cb, huff_b43_xlat }, // wordlen = 3 + { 4, 2, 4, 1, 66, NULL, NULL }, // wordlen = 4 + { 1, 1, 3, 0, 32, NULL, NULL }, // wordlen = 5 + { 1, 2, 4, 0, 12, NULL, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b47_cb, huff_b47_xlat }, // wordlen = 7 + + /* code table = 5 */ + { 2, 4, 2, 1, 42, NULL, NULL }, // wordlen = 1 + { 1, 2, 3, 1, -1, huff_b52_cb, huff_b52_xlat }, // wordlen = 2 + { 4, 1, 3, 1, -1, huff_b53_cb, huff_b53_xlat }, // wordlen = 3 + { 1, 1, 3, 0, 17, NULL, NULL }, // wordlen = 4 + { 1, 1, 3, 0, 39, NULL, NULL }, // wordlen = 5 + { 1, 1, 5, 1, -1, huff_b56_cb, huff_b56_xlat }, // wordlen = 6 + { 2, 1, 6, 1, 62, NULL, NULL }, // wordlen = 7 + + /* code table = 6 */ + { 1, 4, 2, 1, 28, NULL, NULL }, // wordlen = 1 + { 1, 4, 2, 0, -1, huff_b62_cb, huff_b62_xlat }, // wordlen = 2 + { 1, 1, 3, 1, -1, huff_b63_cb, huff_b63_xlat }, // wordlen = 3 + { 1, 1, 3, 0, -1, huff_b64_cb, huff_b64_xlat }, // wordlen = 4 + { 4, 2, 4, 1, -1, huff_b65_cb, huff_b65_xlat }, // wordlen = 5 + { 1, 2, 4, 0, -1, huff_b66_cb, huff_b66_xlat }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b67_cb, huff_b67_xlat }, // wordlen = 7 + + /* code table = 7 */ + { 1, 4, 2, 1, -1, huff_b71_cb, huff_b71_xlat }, // wordlen = 1 + { 4, 4, 2, 0, 78, NULL, NULL }, // wordlen = 2 + { 4, 4, 2, 0, -1, huff_b73_cb, huff_b73_xlat }, // wordlen = 3 + { 1, 1, 4, 1, -1, huff_b74_cb, huff_b74_xlat }, // wordlen = 4 + { 1, 2, 4, 1, -1, huff_b75_cb, huff_b75_xlat }, // wordlen = 5 + { 1, 1, 5, 1, 47, NULL, NULL }, // wordlen = 6 + { 1, 1, 6, 1, -1, huff_b77_cb, huff_b77_xlat }, // wordlen = 7 +}; + +/* Huffman tables for gain control data. */ +static const uint8_t atrac3p_huff_gain_npoints1_cb[9] = { + 1, 7, 1, 1, 1, 1, 1, 1, 2 +}; + +static const uint8_t atrac3p_huff_gain_npoints2_xlat[8] = { + 0, 1, 7, 2, 6, 3, 4, 5 +}; + +static const uint8_t atrac3p_huff_gain_lev1_cb[9] = { 1, 7, 1, 0, 2, 2, 1, 2, 8 }; +static const uint8_t atrac3p_huff_gain_lev1_xlat[16] = { + 7, 5, 8, 6, 9, 4, 10, 11, 0, 1, 2, 3, 12, 13, 14, 15 +}; + +static const uint8_t atrac3p_huff_gain_lev2_cb[11] = { + 1, 9, 1, 1, 1, 1, 1, 0, 2, 0, 8 +}; + +static const uint8_t atrac3p_huff_gain_lev2_xlat[15] = { + 15, 14, 1, 13, 2, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 +}; + +static const uint8_t atrac3p_huff_gain_lev3_cb[11] = { + 1, 9, 1, 0, 3, 1, 1, 0, 2, 0, 8 +}; + +static const uint8_t atrac3p_huff_gain_lev3_xlat[16] = { + 0, 1, 14, 15, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 +}; + +static const uint8_t atrac3p_huff_gain_lev4_cb[11] = { + 1, 9, 1, 1, 1, 1, 1, 0, 1, 2, 8 +}; + +static const uint8_t atrac3p_huff_gain_lev4_xlat[16] = { + 0, 1, 15, 14, 2, 13, 3, 12, 4, 5, 6, 7, 8, 9, 10, 11 +}; + +static const uint8_t atrac3p_huff_gain_loc1_cb[9] = { 2, 8, 1, 2, 4, 4, 4, 0, 16 }; +static const uint8_t atrac3p_huff_gain_loc1_xlat[31] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 +}; + +static const uint8_t atrac3p_huff_gain_loc2_cb[8] = { 3, 8, 5, 3, 2, 3, 2, 16 }; +static const uint8_t atrac3p_huff_gain_loc2_xlat[31] = { + 2, 3, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 +}; + +static const uint8_t atrac3p_huff_gain_loc3_cb[7] = { 2, 6, 1, 0, 2, 11, 18 }; +static const uint8_t atrac3p_huff_gain_loc3_xlat[32] = { + 0, 1, 31, 2, 3, 4, 5, 6, 7, 26, 27, 28, 29, 30, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 +}; + +static const uint8_t atrac3p_huff_gain_loc4_cb[5] = { 4, 6, 3, 23, 6 }; +static const uint8_t atrac3p_huff_gain_loc4_xlat[32] = { + 0, 28, 29, 1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 5, 6, 7, 8, 9, 10 +}; + +static const uint8_t atrac3p_huff_gain_loc5_cb[9] = { 1, 7, 1, 0, 0, 3, 2, 6, 20 }; +static const uint8_t atrac3p_huff_gain_loc5_xlat[32] = { + 0, 1, 2, 31, 3, 4, 5, 6, 7, 8, 29, 30, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 +}; + +/* Huffman tables for GHA waves data. */ +static const uint8_t atrac3p_huff_tonebands_cb[8] = { 1, 6, 1, 0, 1, 2, 4, 8 }; +static const uint8_t atrac3p_huff_numwavs1_cb[9] = { 1, 7, 1, 1, 1, 1, 1, 1, 2 }; +static const uint8_t atrac3p_huff_numwavs2_cb[8] = { 1, 6, 1, 1, 1, 1, 0, 4 }; +static const uint8_t atrac3p_huff_numwavs2_xlat[8] = { 0, 1, 7, 2, 3, 4, 5, 6 }; +static const uint8_t atrac3p_huff_wav_ampsf1_cb[7] = { 4, 8, 10, 8, 6, 0, 8 }; +static const uint8_t atrac3p_huff_wav_ampsf1_xlat[32] = { + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 5, 6, 7, 18, 19, 20, + 21, 22, 4, 23, 24, 25, 26, 27, 0, 1, 2, 3, 28, 29, 30, 31 +}; + +static const uint8_t atrac3p_huff_wav_ampsf2_cb[7] = { 4, 8, 11, 5, 6, 6, 4 }; +static const uint8_t atrac3p_huff_wav_ampsf2_xlat[32] = { + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 14, 15, 16, 17, 29, + 9, 10, 11, 12, 13, 30, 4, 5, 6, 7, 8, 31, 0, 1, 2, 3 +}; + +static const uint8_t atrac3p_huff_wav_ampsf3_cb[9] = { 2, 8, 1, 3, 3, 1, 4, 4, 16 }; +static const uint8_t atrac3p_huff_wav_ampsf3_xlat[32] = { + 0, 1, 2, 31, 3, 29, 30, 4, 5, 6, 27, 28, 7, 24, 25, 26, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 +}; + +static const uint8_t atrac3p_huff_freq_cb[13] = { + 1, 11, 1, 0, 0, 2, 2, 0, 9, 9, 29, 104, 100 +}; + +static const uint8_t atrac3p_huff_freq_xlat[256] = { + 0, 1, 255, 2, 254, 3, 4, 5, 6, 7, 8, 251, 252, 253, 9, 10, + 11, 12, 246, 247, 248, 249, 250, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 243, 244, 245, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193 +}; + +#endif /* AVCODEC_ATRAC3PLUS_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac9tab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac9tab.h new file mode 100644 index 00000000..8f290f15 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/atrac9tab.h @@ -0,0 +1,1620 @@ +/* + * ATRAC9 decoder + * Copyright (c) 2018 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ATRAC9TAB_H +#define AVCODEC_ATRAC9TAB_H + +#include + +#include "libavutil/channel_layout.h" + +enum ATRAC9BlockType { + ATRAC9_BLOCK_TYPE_SCE, /* Single channel */ + ATRAC9_BLOCK_TYPE_CPE, /* 2 coupled channels */ + ATRAC9_BLOCK_TYPE_LFE, /* Single LFE channel */ +}; + +typedef struct ATRAC9BlockConfig { + uint64_t channel_layout; + enum ATRAC9BlockType type[5]; + int plane_map[5][2]; + int count; +} ATRAC9BlockConfig; + +static const ATRAC9BlockConfig at9_block_layout[] = { + { /* Mono */ + .channel_layout = AV_CH_LAYOUT_MONO, + .type = { ATRAC9_BLOCK_TYPE_SCE, }, + .count = 1, + }, + { /* Dual Mono */ + .channel_layout = AV_CH_LAYOUT_STEREO, + .type = { ATRAC9_BLOCK_TYPE_SCE, + ATRAC9_BLOCK_TYPE_SCE, }, + .plane_map = { { 0 }, { 1 }, }, + .count = 2, + }, + { /* Stereo */ + .channel_layout = AV_CH_LAYOUT_STEREO, + .type = { ATRAC9_BLOCK_TYPE_CPE, }, + .plane_map = { { 0, 1 }, }, + .count = 1, + }, + { /* 5.1 */ + .channel_layout = AV_CH_LAYOUT_5POINT1, + .type = { ATRAC9_BLOCK_TYPE_CPE, + ATRAC9_BLOCK_TYPE_SCE, + ATRAC9_BLOCK_TYPE_LFE, + ATRAC9_BLOCK_TYPE_CPE, }, + .plane_map = { { 0, 1 }, { 2 }, { 3 }, { 4, 5 }, }, + .count = 4, + }, + { /* 7.1 */ + .channel_layout = AV_CH_LAYOUT_7POINT1, + .type = { ATRAC9_BLOCK_TYPE_CPE, + ATRAC9_BLOCK_TYPE_SCE, + ATRAC9_BLOCK_TYPE_LFE, + ATRAC9_BLOCK_TYPE_CPE, + ATRAC9_BLOCK_TYPE_CPE, }, + .plane_map = { { 0, 1 }, { 2 }, { 3 }, { 4, 5 }, { 6, 7 }, }, + .count = 5, + }, + { /* Quad */ + .channel_layout = AV_CH_LAYOUT_QUAD, + .type = { ATRAC9_BLOCK_TYPE_CPE, + ATRAC9_BLOCK_TYPE_CPE, }, + .plane_map = { { 0, 1 }, { 2, 3 }, }, + .count = 2, + }, +}; + +static const uint8_t at9_tab_sri_frame_log2[] = { + 6, 6, 7, 7, 7, 8, 8, 8, 6, 6, 7, 7, 7, 8, 8, 8, +}; + +static const uint8_t at9_tab_band_q_unit_map[] = { + 0, 4, 8, 10, 12, 13, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 28, 30, +}; + +static const uint8_t at9_q_unit_to_coeff_cnt[] = { + 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 8, 8, 8, + 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +}; + +static const int at9_q_unit_to_coeff_idx[] = { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, + 72, 80, 88, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256 +}; + +const uint8_t at9_q_unit_to_codebookidx[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +}; + +static const uint8_t at9_tab_sri_max_bands[] = { + 8, 8, 12, 12, 12, 18, 18, 18, 8, 8, 12, 12, 12, 16, 16, 16, +}; + +static const int at9_tab_samplerates[] = { + 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 44100, 48000, + 64000, 88200, 96000, 128000, 176400, 192000, +}; + +static const uint8_t at9_tab_band_ext_cnt[][6] = { + { 0, 0, 0, 4, 4, 2 }, + { 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 2, 2, 1 }, + { 0, 0, 0, 2, 2, 2 }, + { 1, 1, 1, 0, 0, 0 }, +}; + +/* B unit, C unit, Band count */ +static const uint8_t at9_tab_band_ext_group[][3] = { + { 16, 21, 0 }, + { 18, 22, 1 }, + { 20, 22, 2 }, + { 21, 22, 3 }, + { 21, 22, 3 }, + { 23, 24, 4 }, + { 23, 24, 4 }, + { 24, 24, 5 }, +}; + +static const uint8_t at9_tab_band_ext_lengths[][6][4] = { + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 5, 4, 3, 3 }, + { 4, 4, 3, 4 }, + { 4, 5, 0, 0 }, + }, + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + }, + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 6, 6, 0, 0 }, + { 6, 6, 0, 0 }, + { 6, 0, 0, 0 }, + }, + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 4, 4, 0, 0 }, + { 4, 4, 0, 0 }, + { 4, 4, 0, 0 }, + }, + { + { 3, 0, 0, 0 }, + { 3, 0, 0, 0 }, + { 3, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + }, +}; + +static const float at9_band_ext_scales_m0[][5][32] = { + { + { + 0.000000e+0f, 1.988220e-1f, 2.514343e-1f, 2.960510e-1f, + 3.263550e-1f, 3.771362e-1f, 3.786926e-1f, 4.540405e-1f, + 4.877625e-1f, 5.262451e-1f, 5.447083e-1f, 5.737000e-1f, + 6.212158e-1f, 6.222839e-1f, 6.560974e-1f, 6.896667e-1f, + 7.555542e-1f, 7.677917e-1f, 7.918091e-1f, 7.971497e-1f, + 8.188171e-1f, 8.446045e-1f, 9.790649e-1f, 9.822083e-1f, + 9.846191e-1f, 9.859314e-1f, 9.863586e-1f, 9.863892e-1f, + 9.873352e-1f, 9.881287e-1f, 9.898682e-1f, 9.913330e-1f, + }, { + 0.000000e+0f, 9.982910e-1f, 7.592773e-2f, 7.179565e-1f, + 9.851379e-1f, 5.340271e-1f, 9.013672e-1f, 6.349182e-1f, + 7.226257e-1f, 1.948547e-1f, 7.628174e-1f, 9.873657e-1f, + 8.112183e-1f, 2.715454e-1f, 9.734192e-1f, 1.443787e-1f, + 4.640198e-1f, 3.249207e-1f, 3.790894e-1f, 8.276367e-2f, + 5.954590e-1f, 2.864380e-1f, 9.806824e-1f, 7.929077e-1f, + 6.292114e-1f, 4.887085e-1f, 2.905273e-1f, 1.301880e-1f, + 3.140869e-1f, 5.482483e-1f, 4.210815e-1f, 1.182861e-1f, + }, { + 0.000000e+0f, 3.155518e-2f, 8.581543e-2f, 1.364746e-1f, + 1.858826e-1f, 2.368469e-1f, 2.888184e-1f, 3.432617e-1f, + 4.012451e-1f, 4.623108e-1f, 5.271301e-1f, 5.954895e-1f, + 6.681213e-1f, 7.448425e-1f, 8.245239e-1f, 9.097290e-1f, + }, { + 0.000000e+0f, 4.418945e-2f, 1.303711e-1f, 2.273560e-1f, + 3.395996e-1f, 4.735718e-1f, 6.267090e-1f, 8.003845e-1f, + }, { + 0.000000e+0f, 2.804565e-2f, 9.683228e-2f, 1.849976e-1f, + 3.005981e-1f, 4.470520e-1f, 6.168518e-1f, 8.007813e-1f, + }, + }, + { + { + 0.000000e+0f, 2.708740e-1f, 3.479614e-1f, 3.578186e-1f, + 5.083618e-1f, 5.299072e-1f, 5.819092e-1f, 6.381836e-1f, + 7.276917e-1f, 7.595520e-1f, 7.878723e-1f, 9.707336e-1f, + 9.713135e-1f, 9.736023e-1f, 9.759827e-1f, 9.832458e-1f, + }, { + 0.000000e+0f, 2.330627e-1f, 5.891418e-1f, 7.170410e-1f, + 2.036438e-1f, 1.613464e-1f, 6.668701e-1f, 9.481201e-1f, + 9.769897e-1f, 5.111694e-1f, 3.522644e-1f, 8.209534e-1f, + 2.933960e-1f, 9.757690e-1f, 5.289917e-1f, 4.372253e-1f, + }, { + 0.000000e+0f, 4.360962e-2f, 1.056519e-1f, 1.590576e-1f, + 2.078857e-1f, 2.572937e-1f, 3.082581e-1f, 3.616028e-1f, + 4.191589e-1f, 4.792175e-1f, 5.438538e-1f, 6.125183e-1f, + 6.841125e-1f, 7.589417e-1f, 8.365173e-1f, 9.148254e-1f, + }, { + 0.000000e+0f, 4.074097e-2f, 1.164551e-1f, 2.077026e-1f, + 3.184509e-1f, 4.532166e-1f, 6.124268e-1f, 7.932129e-1f, + }, { + 0.000000e+0f, 8.880615e-3f, 2.932739e-2f, 5.593872e-2f, + 8.825684e-2f, 1.259155e-1f, 1.721497e-1f, 2.270813e-1f, + 2.901611e-1f, 3.579712e-1f, 4.334106e-1f, 5.147095e-1f, + 6.023254e-1f, 6.956177e-1f, 7.952881e-1f, 8.977356e-1f, + }, + }, + { + { + 0.000000e+0f, 7.379150e-2f, 1.806335e-1f, 2.687073e-1f, + 3.407898e-1f, 4.047546e-1f, 4.621887e-1f, 5.168762e-1f, + 5.703125e-1f, 6.237488e-1f, 6.763611e-1f, 7.288208e-1f, + 7.808533e-1f, 8.337708e-1f, 8.874512e-1f, 9.418030e-1f, + }, { + 0.000000e+0f, 7.980347e-2f, 1.615295e-1f, 1.665649e-1f, + 1.822205e-1f, 2.185669e-1f, 2.292175e-1f, 2.456665e-1f, + 2.666321e-1f, 3.306580e-1f, 3.330688e-1f, 3.765259e-1f, + 4.085083e-1f, 4.400024e-1f, 4.407654e-1f, 4.817505e-1f, + 4.924011e-1f, 5.320740e-1f, 5.893860e-1f, 6.131287e-1f, + 6.212463e-1f, 6.278076e-1f, 6.308899e-1f, 7.660828e-1f, + 7.850647e-1f, 7.910461e-1f, 7.929382e-1f, 8.038330e-1f, + 9.834900e-1f, 9.846191e-1f, 9.852295e-1f, 9.862671e-1f, + }, { + 0.000000e+0f, 6.084290e-1f, 3.672791e-1f, 3.151855e-1f, + 1.488953e-1f, 2.571716e-1f, 5.103455e-1f, 3.311157e-1f, + 5.426025e-2f, 4.254456e-1f, 7.998352e-1f, 7.873230e-1f, + 5.418701e-1f, 2.925110e-1f, 8.468628e-2f, 1.410522e-1f, + 9.819641e-1f, 9.609070e-1f, 3.530884e-2f, 9.729004e-2f, + 5.758362e-1f, 9.941711e-1f, 7.215576e-1f, 7.183228e-1f, + 2.028809e-1f, 9.588623e-2f, 2.032166e-1f, 1.338806e-1f, + 5.003357e-1f, 1.874390e-1f, 9.804993e-1f, 1.107788e-1f, + }, + }, +}; + +static const float at9_band_ext_scales_m2[] = { + 4.272461e-4f, 1.312256e-3f, 2.441406e-3f, 3.692627e-3f, + 4.913330e-3f, 6.134033e-3f, 7.507324e-3f, 8.972168e-3f, + 1.049805e-2f, 1.223755e-2f, 1.406860e-2f, 1.599121e-2f, + 1.800537e-2f, 2.026367e-2f, 2.264404e-2f, 2.517700e-2f, + 2.792358e-2f, 3.073120e-2f, 3.344727e-2f, 3.631592e-2f, + 3.952026e-2f, 4.275513e-2f, 4.608154e-2f, 4.968262e-2f, + 5.355835e-2f, 5.783081e-2f, 6.195068e-2f, 6.677246e-2f, + 7.196045e-2f, 7.745361e-2f, 8.319092e-2f, 8.993530e-2f, + 9.759521e-2f, 1.056213e-1f, 1.138916e-1f, 1.236267e-1f, + 1.348267e-1f, 1.470337e-1f, 1.603394e-1f, 1.755676e-1f, + 1.905823e-1f, 2.071228e-1f, 2.245178e-1f, 2.444153e-1f, + 2.658997e-1f, 2.897644e-1f, 3.146057e-1f, 3.450012e-1f, + 3.766174e-1f, 4.122620e-1f, 4.505615e-1f, 4.893799e-1f, + 5.305481e-1f, 5.731201e-1f, 6.157837e-1f, 6.580811e-1f, + 6.985168e-1f, 7.435303e-1f, 7.865906e-1f, 8.302612e-1f, + 8.718567e-1f, 9.125671e-1f, 9.575806e-1f, 9.996643e-1f, +}; + +static const float at9_band_ext_scales_m3[][2] = { + { 3.491211e-1f, -2.913818e-1f, }, { 5.371094e-1f, -2.541504e-1f, }, + { 6.782227e-1f, -1.664429e-1f, }, { 7.910156e-1f, -1.476440e-1f, }, + { 9.057617e-1f, -1.342163e-1f, }, { 1.024902e+0f, -1.220703e-1f, }, + { 1.156250e+0f, -1.117554e-1f, }, { 1.290527e+0f, -1.026611e-1f, }, + { 1.458984e+0f, -9.436035e-2f, }, { 1.664551e+0f, -8.483887e-2f, }, + { 1.929688e+0f, -7.476807e-2f, }, { 2.278320e+0f, -6.304932e-2f, }, + { 2.831543e+0f, -4.492188e-2f, }, { 3.659180e+0f, -2.447510e-2f, }, + { 5.257813e+0f, +1.831055e-4f, }, { 8.373047e+0f, +4.174805e-2f, }, +}; + +static const float at9_band_ext_scales_m4[] = { + 3.610229e-2f, 1.260681e-1f, 2.227478e-1f, 3.338318e-1f, + 4.662170e-1f, 6.221313e-1f, 7.989197e-1f, 9.939575e-1f, +}; + +static const float at9_quant_step_coarse[] = { + 2.0000000000000000e+0f, 6.6666666666666663e-1f, 2.8571428571428570e-1f, + 1.3333333333333333e-1f, 6.4516129032258063e-2f, 3.1746031746031744e-2f, + 1.5748031496062992e-2f, 7.8431372549019607e-3f, 3.9138943248532287e-3f, + 1.9550342130987292e-3f, 9.7703957010258913e-4f, 4.8840048840048840e-4f, + 2.4417043096081065e-4f, 1.2207776353537203e-4f, 6.1037018951994385e-5f, + 3.0518043793392844e-5f, +}; + +static const float at9_quant_step_fine[] = { + 3.0518043793392844e-05f, 1.0172681264464281e-05f, 4.3597205419132631e-06f, + 2.0345362528928561e-06f, 9.8445302559331759e-07f, 4.8441339354591809e-07f, + 2.4029955742829012e-07f, 1.1967860311134448e-07f, 5.9722199204291275e-08f, + 2.9831909866464167e-08f, 1.4908668194134265e-08f, 7.4525137468602791e-09f, + 3.7258019525568114e-09f, 1.8627872668859698e-09f, 9.3136520869755679e-10f, + 4.6567549848772173e-10f, +}; + +static const float at9_scalefactor_c[] = { + 3.0517578125e-5f, 6.1035156250e-5f, 1.2207031250e-4f, 2.4414062500e-4f, + 4.8828125000e-4f, 9.7656250000e-4f, 1.9531250000e-3f, 3.9062500000e-3f, + 7.8125000000e-3f, 1.5625000000e-2f, 3.1250000000e-2f, 6.2500000000e-2f, + 1.2500000000e-1f, 2.5000000000e-1f, 5.0000000000e-1f, 1.0000000000e+0f, + 2.0000000000e+0f, 4.0000000000e+0f, 8.0000000000e+0f, 1.6000000000e+1f, + 3.2000000000e+1f, 6.4000000000e+1f, 1.2800000000e+2f, 2.5600000000e+2f, + 5.1200000000e+2f, 1.0240000000e+3f, 2.0480000000e+3f, 4.0960000000e+3f, + 8.1920000000e+3f, 1.6384000000e+4f, 3.2768000000e+4f, 6.5536000000e+4f, +}; + +static const uint8_t at9_tab_sf_weights[][32] = { + { + 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 3, 4, 4, 4, + 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 10, 12, 12, 12, + }, + { + 3, 2, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, + 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 10, 10, 10, + }, + { + 0, 2, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 9, 12, 12, 12, + }, + { + 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, + 6, 6, 6, 7, 8, 8, 10, 11, 11, 12, 13, 13, 13, 13, + }, + { + 0, 2, 2, 3, 3, 4, 4, 5, 4, 5, 5, 5, 5, 6, 7, 8, 8, 8, + 8, 9, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, + }, + { + 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 3, 3, 3, 4, 4, 5, 6, 7, 7, 9, 11, 11, 11, + }, + { + 0, 5, 8, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 13, 15, 15, 15, + }, + { + 0, 2, 3, 4, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, + 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 15, 15, 15, + }, +}; + +static const uint8_t at9_tab_b_dist[] = { + 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 15, 6, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 27, + 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, +}; + +static const uint8_t huff_sfb_a1_bits[] = { + 1, 1, +}; + +static const uint16_t huff_sfb_a1_codes[] = { + 0x00, 0x01, +}; + +static const uint8_t huff_sfb_a2_bits[] = { + 1, 3, 3, 2, +}; + +static const uint16_t huff_sfb_a2_codes[] = { + 0x00, 0x06, 0x07, 0x02, +}; + +static const uint8_t huff_sfb_a3_bits[] = { + 2, 2, 4, 6, 6, 5, 3, 2, +}; + +static const uint16_t huff_sfb_a3_codes[] = { + 0x00, 0x01, 0x0E, 0x3E, 0x3F, 0x1E, 0x06, 0x02, +}; + +static const uint8_t huff_sfb_a4_bits[] = { + 2, 2, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 6, 5, 4, 2, +}; + +static const uint16_t huff_sfb_a4_codes[] = { + 0x01, 0x02, 0x00, 0x06, 0x0F, 0x13, 0x23, 0x24, + 0x25, 0x22, 0x21, 0x20, 0x0E, 0x05, 0x01, 0x03, +}; + +static const uint8_t huff_sfb_a5_bits[] = { + 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 6, 5, 5, 4, 3, +}; + +static const uint16_t huff_sfb_a5_codes[] = { + 0x02, 0x01, 0x07, 0x0D, 0x0C, 0x18, 0x1B, 0x21, 0x3F, 0x6A, 0x6B, 0x68, + 0x73, 0x79, 0x7C, 0x7D, 0x7A, 0x7B, 0x78, 0x72, 0x44, 0x45, 0x47, 0x46, + 0x69, 0x38, 0x20, 0x1D, 0x19, 0x09, 0x05, 0x00, +}; + +static const uint8_t huff_sfb_a6_bits[] = { + 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, +}; + +static const uint16_t huff_sfb_a6_codes[] = { + 0x00, 0x01, 0x04, 0x05, 0x12, 0x13, 0x2E, 0x2F, 0x30, 0x66, 0x67, 0xD6, + 0xD7, 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, 0xE0, 0xE1, 0xE2, + 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, + 0xEF, 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, + 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, 0x68, 0x69, 0x6A, 0x31, 0x32, 0x14, 0x15, + 0x16, 0x06, 0x07, 0x08, +}; + +static const uint8_t huff_sfb_b2_bits[] = { + 1, 2, 0, 2, +}; + +static const uint16_t huff_sfb_b2_codes[] = { + 0x00, 0x03, 0x00, 0x02, +}; + +static const uint8_t huff_sfb_b3_bits[] = { + 1, 3, 5, 6, 0, 6, 4, 2, +}; + +static const uint16_t huff_sfb_b3_codes[] = { + 0x01, 0x00, 0x04, 0x0B, 0x00, 0x0A, 0x03, 0x01, +}; + +static const uint8_t huff_sfb_b4_bits[] = { + 1, 3, 4, 5, 5, 7, 8, 8, 0, 8, 8, 7, 6, 6, 4, 3, +}; + +static const uint16_t huff_sfb_b4_codes[] = { + 0x01, 0x01, 0x04, 0x0E, 0x0F, 0x2C, 0x5A, 0x5D, 0x00, 0x5C, 0x5B, 0x2F, + 0x15, 0x14, 0x06, 0x00, +}; + +static const uint8_t huff_sfb_b5_bits[] = { + 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 3, +}; + +static const uint16_t huff_sfb_b5_codes[] = { + 0x00, 0x05, 0x07, 0x0C, 0x04, 0x02, 0x03, 0x05, 0x09, 0x10, 0x23, 0x33, + 0x36, 0x6E, 0x60, 0x65, 0x62, 0x61, 0x63, 0x64, 0x6F, 0x6D, 0x6C, 0x6B, + 0x6A, 0x68, 0x69, 0x45, 0x44, 0x37, 0x1A, 0x07, +}; + +typedef struct HuffmanCodebook { + const uint8_t *bits; + const uint16_t *codes; + const int size; + const int value_cnt; + const int value_cnt_pow; + const int value_bits; + const int max_bit_size; +} HuffmanCodebook; + +static const HuffmanCodebook at9_huffman_sf_unsigned[] = { + { 0 }, + { huff_sfb_a1_bits, huff_sfb_a1_codes, 2, 1, 0, 1, 1, }, + { huff_sfb_a2_bits, huff_sfb_a2_codes, 4, 1, 0, 2, 3, }, + { huff_sfb_a3_bits, huff_sfb_a3_codes, 8, 1, 0, 3, 6, }, + { huff_sfb_a4_bits, huff_sfb_a4_codes, 16, 1, 0, 4, 8, }, + { huff_sfb_a5_bits, huff_sfb_a5_codes, 32, 1, 0, 5, 8, }, + { huff_sfb_a6_bits, huff_sfb_a6_codes, 64, 1, 0, 6, 8, }, +}; + +static const HuffmanCodebook at9_huffman_sf_signed[] = { + { 0 }, + { 0 }, + { huff_sfb_b2_bits, huff_sfb_b2_codes, 4, 1, 0, 2, 2, }, + { huff_sfb_b3_bits, huff_sfb_b3_codes, 8, 1, 0, 3, 6, }, + { huff_sfb_b4_bits, huff_sfb_b4_codes, 16, 1, 0, 4, 8, }, + { huff_sfb_b5_bits, huff_sfb_b5_codes, 32, 1, 0, 5, 8, }, +}; + +static const uint8_t huff_spec_a21_bits[] = { + 0, 3, 0, 3, 3, 3, 0, 3, 0, 0, 0, 0, 3, 3, 0, 3, +}; + +static const uint16_t huff_spec_a21_codes[] = { + 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x06, +}; + +static const uint8_t huff_spec_a22_bits[] = { + 0, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, + 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, + 5, 6, 0, 6, 7, 7, 0, 7, 0, 0, 0, 0, 6, 7, 0, 7, + 6, 7, 0, 7, 7, 8, 0, 8, 0, 0, 0, 0, 7, 8, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 7, 0, 7, 7, 8, 0, 8, 0, 0, 0, 0, 7, 7, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 7, 7, 0, 7, + 6, 7, 0, 7, 7, 8, 0, 7, 0, 0, 0, 0, 7, 8, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 7, 0, 7, 7, 7, 0, 8, 0, 0, 0, 0, 7, 8, 0, 8, +}; + +static const uint16_t huff_spec_a22_codes[] = { + 0x00, 0x02, 0x00, 0x03, 0x10, 0x3C, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x11, 0x3E, 0x00, 0x3D, + 0x0E, 0x00, 0x00, 0x39, 0x18, 0x26, 0x00, 0x75, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x24, 0x00, 0x6D, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x38, 0x00, 0x01, 0x1A, 0x6C, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x19, 0x74, 0x00, 0x27, + 0x16, 0x14, 0x00, 0x17, 0x76, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x35, 0x64, 0x00, 0x6F, + 0x26, 0x04, 0x00, 0x63, 0x22, 0xA2, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x67, 0xA0, 0x00, 0x0D, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2B, 0x52, 0x00, 0x0B, 0x20, 0x92, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x61, 0x0E, 0x00, 0x95, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x17, 0x16, 0x00, 0x15, 0x34, 0x6E, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x77, 0x08, 0x00, 0x07, + 0x2A, 0x0A, 0x00, 0x53, 0x60, 0x94, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x21, 0x90, 0x00, 0x93, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x27, 0x62, 0x00, 0x05, 0x66, 0x0C, 0x00, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x23, 0x96, 0x00, 0xA3, +}; + +static const uint8_t huff_spec_a23_bits[] = { + 3, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, + 5, 7, 0, 6, 6, 8, 0, 7, 0, 0, 0, 0, 6, 8, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 0, 7, 6, 7, 0, 8, 0, 0, 0, 0, 6, 7, 0, 8, + 5, 6, 0, 6, 7, 8, 0, 8, 0, 0, 0, 0, 6, 7, 0, 7, + 6, 8, 0, 7, 8, 9, 0, 9, 0, 0, 0, 0, 7, 9, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 8, 0, 8, 8, 9, 0, 9, 0, 0, 0, 0, 7, 8, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 0, 6, 6, 7, 0, 7, 0, 0, 0, 0, 7, 8, 0, 8, + 6, 8, 0, 8, 7, 9, 0, 8, 0, 0, 0, 0, 8, 9, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 7, 0, 8, 7, 8, 0, 9, 0, 0, 0, 0, 8, 9, 0, 9, +}; + +static const uint16_t huff_spec_a23_codes[] = { + 0x006, 0x002, 0x000, 0x003, 0x016, 0x01E, 0x000, 0x021, 0x000, 0x000, 0x000, 0x000, + 0x017, 0x020, 0x000, 0x01F, 0x01C, 0x054, 0x000, 0x027, 0x010, 0x0A6, 0x000, 0x027, + 0x000, 0x000, 0x000, 0x000, 0x015, 0x0A4, 0x000, 0x02D, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x01D, 0x026, 0x000, 0x055, 0x014, 0x02C, 0x000, 0x0A5, 0x000, 0x000, 0x000, 0x000, + 0x011, 0x026, 0x000, 0x0A7, 0x01E, 0x000, 0x000, 0x003, 0x04A, 0x074, 0x000, 0x071, + 0x000, 0x000, 0x000, 0x000, 0x023, 0x00A, 0x000, 0x009, 0x018, 0x072, 0x000, 0x00D, + 0x0A2, 0x15A, 0x000, 0x123, 0x000, 0x000, 0x000, 0x000, 0x00F, 0x158, 0x000, 0x05D, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x01B, 0x0AE, 0x000, 0x077, 0x092, 0x140, 0x000, 0x121, + 0x000, 0x000, 0x000, 0x000, 0x025, 0x05E, 0x000, 0x143, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x01F, 0x002, 0x000, 0x001, 0x022, 0x008, 0x000, 0x00B, 0x000, 0x000, 0x000, 0x000, + 0x04B, 0x070, 0x000, 0x075, 0x01A, 0x076, 0x000, 0x0AF, 0x024, 0x142, 0x000, 0x05F, + 0x000, 0x000, 0x000, 0x000, 0x093, 0x120, 0x000, 0x141, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x019, 0x00C, 0x000, 0x073, 0x00E, 0x05C, 0x000, 0x159, 0x000, 0x000, 0x000, 0x000, + 0x0A3, 0x122, 0x000, 0x15B, +}; + +static const uint8_t huff_spec_a24_bits[] = { + 2, 4, 0, 4, 5, 6, 0, 6, 0, 0, 0, 0, 5, 6, 0, 6, + 5, 7, 0, 6, 6, 8, 0, 8, 0, 0, 0, 0, 6, 8, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 6, 0, 7, 6, 8, 0, 8, 0, 0, 0, 0, 6, 8, 0, 8, + 5, 7, 0, 7, 7, 9, 0, 9, 0, 0, 0, 0, 6, 8, 0, 8, + 6, 9, 0, 8, 8, 10, 0, 10, 0, 0, 0, 0, 8, 10, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 8, 0, 9, 9, 10, 0, 10, 0, 0, 0, 0, 8, 9, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 7, 0, 7, 6, 8, 0, 8, 0, 0, 0, 0, 7, 9, 0, 9, + 6, 9, 0, 8, 8, 10, 0, 9, 0, 0, 0, 0, 9, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 8, 0, 9, 8, 9, 0, 10, 0, 0, 0, 0, 8, 10, 0, 10, +}; + +static const uint16_t huff_spec_a24_codes[] = { + 0x002, 0x002, 0x000, 0x003, 0x01E, 0x010, 0x000, 0x013, 0x000, 0x000, 0x000, 0x000, + 0x01F, 0x012, 0x000, 0x011, 0x01A, 0x030, 0x000, 0x01B, 0x000, 0x064, 0x000, 0x0C1, + 0x000, 0x000, 0x000, 0x000, 0x003, 0x052, 0x000, 0x07D, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x01B, 0x01A, 0x000, 0x031, 0x002, 0x07C, 0x000, 0x053, 0x000, 0x000, 0x000, 0x000, + 0x001, 0x0C0, 0x000, 0x065, 0x01C, 0x062, 0x000, 0x065, 0x02A, 0x198, 0x000, 0x19B, + 0x000, 0x000, 0x000, 0x000, 0x017, 0x078, 0x000, 0x07B, 0x004, 0x0FE, 0x000, 0x077, + 0x050, 0x33A, 0x000, 0x1F9, 0x000, 0x000, 0x000, 0x000, 0x073, 0x338, 0x000, 0x0E1, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x007, 0x066, 0x000, 0x187, 0x19E, 0x308, 0x000, 0x30B, + 0x000, 0x000, 0x000, 0x000, 0x075, 0x0E2, 0x000, 0x1FB, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x01D, 0x064, 0x000, 0x063, 0x016, 0x07A, 0x000, 0x079, 0x000, 0x000, 0x000, 0x000, + 0x02B, 0x19A, 0x000, 0x199, 0x006, 0x186, 0x000, 0x067, 0x074, 0x1FA, 0x000, 0x0E3, + 0x000, 0x000, 0x000, 0x000, 0x19F, 0x30A, 0x000, 0x309, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x005, 0x076, 0x000, 0x0FF, 0x072, 0x0E0, 0x000, 0x339, 0x000, 0x000, 0x000, 0x000, + 0x051, 0x1F8, 0x000, 0x33B, +}; + +static const uint8_t huff_spec_a31_bits[] = { + 0, 0, 4, 5, 0, 5, 4, 0, 0, 0, 5, 5, 0, 5, 5, 0, + 5, 5, 6, 6, 0, 6, 5, 5, 5, 6, 6, 7, 0, 7, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 7, 0, 7, 6, 6, + 5, 5, 5, 6, 0, 6, 6, 5, 0, 0, 5, 5, 0, 5, 5, 0, +}; + +static const uint16_t huff_spec_a31_codes[] = { + 0x00, 0x00, 0x02, 0x18, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x12, 0x02, 0x00, 0x09, 0x15, 0x00, + 0x1A, 0x0A, 0x3E, 0x2C, 0x00, 0x2F, 0x01, 0x0D, 0x0E, 0x38, 0x20, 0x78, 0x00, 0x7B, 0x23, 0x3B, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x3A, 0x22, 0x7A, 0x00, 0x79, 0x21, 0x39, + 0x1B, 0x0C, 0x00, 0x2E, 0x00, 0x2D, 0x3F, 0x0B, 0x00, 0x00, 0x14, 0x08, 0x00, 0x03, 0x13, 0x00, +}; + +static const uint8_t huff_spec_a32_bits[] = { + 4, 5, 5, 6, 0, 6, 5, 5, 5, 6, 5, 6, 0, 6, 5, 5, + 5, 5, 6, 7, 0, 7, 6, 5, 6, 6, 7, 7, 0, 7, 7, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 7, 7, 0, 7, 7, 6, + 5, 5, 6, 7, 0, 7, 6, 5, 5, 5, 5, 6, 0, 6, 5, 6, +}; + +static const uint16_t huff_spec_a32_codes[] = { + 0x0D, 0x18, 0x16, 0x3A, 0x00, 0x3B, 0x17, 0x19, 0x12, 0x3E, 0x08, 0x1C, 0x00, 0x1B, 0x07, 0x01, + 0x10, 0x02, 0x28, 0x78, 0x00, 0x7B, 0x1F, 0x05, 0x2A, 0x16, 0x72, 0x2A, 0x00, 0x29, 0x71, 0x19, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x18, 0x70, 0x28, 0x00, 0x2B, 0x73, 0x17, + 0x11, 0x04, 0x1E, 0x7A, 0x00, 0x79, 0x29, 0x03, 0x13, 0x00, 0x06, 0x1A, 0x00, 0x1D, 0x09, 0x3F, +}; + +static const uint8_t huff_spec_a33_bits[] = { + 3, 4, 5, 6, 0, 6, 5, 4, 4, 5, 6, 7, 0, 7, 6, 5, + 5, 6, 6, 7, 0, 7, 6, 6, 6, 7, 8, 8, 0, 8, 8, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 8, 0, 8, 8, 7, + 5, 6, 6, 7, 0, 7, 6, 6, 4, 5, 6, 7, 0, 7, 6, 5, +}; + +static const uint16_t huff_spec_a33_codes[] = { + 0x05, 0x06, 0x10, 0x08, 0x00, 0x09, 0x11, 0x07, 0x04, 0x12, 0x3E, 0x6A, 0x00, 0x6D, 0x3D, 0x19, + 0x06, 0x3A, 0x06, 0x02, 0x00, 0x01, 0x05, 0x39, 0x02, 0x16, 0xDC, 0x2A, 0x00, 0x29, 0xDF, 0x69, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x68, 0xDE, 0x28, 0x00, 0x2B, 0xDD, 0x17, + 0x07, 0x38, 0x04, 0x00, 0x00, 0x03, 0x07, 0x3B, 0x05, 0x18, 0x3C, 0x6C, 0x00, 0x6B, 0x3F, 0x13, +}; + +static const uint8_t huff_spec_a34_bits[] = { + 2, 4, 5, 7, 0, 7, 5, 4, 4, 5, 6, 8, 0, 8, 6, 5, + 5, 6, 7, 8, 0, 8, 7, 6, 7, 8, 8, 10, 0, 10, 9, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, 10, 8, 8, + 5, 6, 7, 8, 0, 8, 7, 6, 4, 5, 6, 8, 0, 8, 6, 5, +}; + +static const uint16_t huff_spec_a34_codes[] = { + 0x000, 0x00A, 0x00A, 0x034, 0x000, 0x035, 0x00B, 0x00B, 0x008, 0x01C, 0x032, 0x0DA, + 0x000, 0x0DD, 0x035, 0x01F, 0x008, 0x01E, 0x03A, 0x06C, 0x000, 0x063, 0x039, 0x031, + 0x032, 0x06E, 0x060, 0x37A, 0x000, 0x379, 0x1BF, 0x0D9, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x033, 0x0D8, 0x1BE, 0x378, 0x000, 0x37B, 0x061, 0x06F, + 0x009, 0x030, 0x038, 0x062, 0x000, 0x06D, 0x03B, 0x01F, 0x009, 0x01E, 0x034, 0x0DC, + 0x000, 0x0DB, 0x033, 0x01D, +}; + +static const uint8_t huff_spec_a41_bits[] = { + 0, 0, 0, 0, 6, 6, 7, 7, 0, 7, 7, 6, 6, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 7, 0, 7, 7, 7, 6, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 8, 0, 8, 7, 7, 7, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 8, 8, 0, 8, 8, 7, 7, 0, 0, 0, + 7, 7, 7, 8, 7, 8, 8, 8, 0, 8, 8, 8, 7, 8, 7, 7, + 7, 7, 7, 7, 8, 8, 8, 9, 0, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 8, 8, 8, 8, 9, 9, 0, 9, 8, 8, 8, 8, 8, 7, + 8, 8, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 8, + 7, 7, 8, 8, 8, 8, 8, 9, 0, 9, 9, 8, 8, 8, 8, 7, + 7, 7, 7, 7, 8, 8, 8, 8, 0, 9, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 8, 7, 8, 8, 8, 0, 8, 8, 8, 7, 8, 7, 7, + 0, 0, 0, 0, 7, 7, 8, 8, 0, 8, 8, 7, 7, 0, 0, 0, + 0, 0, 0, 0, 7, 7, 7, 8, 0, 8, 7, 7, 7, 0, 0, 0, + 0, 0, 0, 0, 6, 7, 7, 7, 0, 7, 7, 7, 7, 0, 0, 0, +}; + +static const uint16_t huff_spec_a41_codes[] = { + 0x000, 0x000, 0x000, 0x000, 0x018, 0x00E, 0x05E, 0x028, 0x000, 0x029, 0x05F, 0x00F, + 0x019, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x076, 0x06E, 0x03E, 0x004, + 0x000, 0x017, 0x045, 0x07B, 0x013, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x04A, 0x048, 0x010, 0x0CE, 0x000, 0x0E1, 0x023, 0x055, 0x053, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x008, 0x018, 0x0D6, 0x09E, 0x000, 0x09D, 0x0E5, 0x02B, + 0x01B, 0x000, 0x000, 0x000, 0x07C, 0x05C, 0x038, 0x0FC, 0x002, 0x0D2, 0x09A, 0x05C, + 0x000, 0x06B, 0x0A3, 0x0D9, 0x00F, 0x0FF, 0x03D, 0x061, 0x074, 0x056, 0x036, 0x000, + 0x0CC, 0x08C, 0x058, 0x1E2, 0x000, 0x00F, 0x05F, 0x0A1, 0x0D5, 0x00D, 0x03B, 0x059, + 0x040, 0x014, 0x0DA, 0x0B6, 0x084, 0x040, 0x1E0, 0x196, 0x000, 0x1A1, 0x00D, 0x043, + 0x087, 0x0C7, 0x0E3, 0x00B, 0x0F2, 0x0C4, 0x08E, 0x05A, 0x024, 0x1CC, 0x194, 0x168, + 0x000, 0x16B, 0x1A3, 0x1CF, 0x027, 0x069, 0x099, 0x0C9, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x0F3, 0x0C8, 0x098, 0x068, 0x026, 0x1CE, 0x1A2, 0x16A, 0x000, 0x169, 0x195, 0x1CD, + 0x025, 0x05B, 0x08F, 0x0C5, 0x041, 0x00A, 0x0E2, 0x0C6, 0x086, 0x042, 0x00C, 0x1A0, + 0x000, 0x197, 0x1E1, 0x041, 0x085, 0x0B7, 0x0DB, 0x015, 0x075, 0x058, 0x03A, 0x00C, + 0x0D4, 0x0A0, 0x05E, 0x00E, 0x000, 0x1E3, 0x059, 0x08D, 0x0CD, 0x001, 0x037, 0x057, + 0x07D, 0x060, 0x03C, 0x0FE, 0x00E, 0x0D8, 0x0A2, 0x06A, 0x000, 0x05D, 0x09B, 0x0D3, + 0x003, 0x0FD, 0x039, 0x05D, 0x000, 0x000, 0x000, 0x000, 0x01A, 0x02A, 0x0E4, 0x09C, + 0x000, 0x09F, 0x0D7, 0x019, 0x009, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x052, 0x054, 0x022, 0x0E0, 0x000, 0x0CF, 0x011, 0x049, 0x04B, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x012, 0x07A, 0x044, 0x016, 0x000, 0x005, 0x03F, 0x06F, + 0x077, 0x000, 0x000, 0x000, +}; + +static const uint8_t huff_spec_a42_bits[] = { + 5, 6, 7, 7, 7, 7, 8, 8, 0, 8, 8, 7, 7, 7, 7, 6, + 6, 7, 7, 8, 7, 7, 8, 8, 0, 8, 8, 7, 7, 8, 7, 7, + 7, 7, 8, 8, 7, 8, 8, 9, 0, 9, 8, 8, 7, 8, 8, 7, + 8, 8, 8, 8, 8, 8, 8, 9, 0, 9, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 8, 8, 8, 9, 9, 0, 9, 9, 8, 8, 8, 7, 7, + 7, 7, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 7, + 8, 8, 8, 8, 9, 9, 9, 10, 0, 10, 9, 9, 9, 8, 8, 8, + 8, 8, 9, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 9, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 9, 8, + 8, 8, 8, 8, 9, 9, 9, 10, 0, 10, 9, 9, 9, 8, 8, 8, + 7, 7, 8, 8, 8, 9, 9, 9, 0, 9, 9, 9, 8, 8, 8, 7, + 7, 7, 7, 8, 8, 8, 9, 9, 0, 9, 9, 8, 8, 8, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 9, 0, 9, 8, 8, 8, 8, 8, 8, + 7, 7, 8, 8, 7, 8, 8, 9, 0, 9, 8, 8, 7, 8, 8, 7, + 6, 7, 7, 8, 7, 7, 8, 8, 0, 8, 8, 7, 7, 8, 7, 7, +}; + +static const uint16_t huff_spec_a42_codes[] = { + 0x003, 0x018, 0x058, 0x000, 0x066, 0x03C, 0x0D6, 0x07C, 0x000, 0x07D, 0x0D7, 0x03D, + 0x067, 0x001, 0x059, 0x019, 0x002, 0x064, 0x036, 0x0DA, 0x04C, 0x01C, 0x0BE, 0x02C, + 0x000, 0x037, 0x0C5, 0x029, 0x04B, 0x0E7, 0x03B, 0x069, 0x044, 0x02E, 0x0FA, 0x092, + 0x020, 0x0F8, 0x086, 0x1FC, 0x000, 0x1E7, 0x07F, 0x0F5, 0x023, 0x0AD, 0x0FD, 0x02D, + 0x0F6, 0x0DC, 0x09C, 0x03E, 0x0F0, 0x0B6, 0x026, 0x186, 0x000, 0x18D, 0x02F, 0x0B5, + 0x0E1, 0x03D, 0x0AF, 0x0D9, 0x054, 0x040, 0x014, 0x0EC, 0x0BC, 0x054, 0x1C6, 0x108, + 0x000, 0x10B, 0x1C5, 0x069, 0x0B9, 0x0DF, 0x019, 0x047, 0x026, 0x008, 0x0E4, 0x0A2, + 0x056, 0x1DC, 0x142, 0x06A, 0x000, 0x091, 0x123, 0x1DF, 0x04B, 0x0A7, 0x0EB, 0x00B, + 0x0C0, 0x09E, 0x06A, 0x022, 0x1AA, 0x140, 0x092, 0x3CA, 0x000, 0x3A7, 0x04B, 0x121, + 0x18F, 0x007, 0x071, 0x0A5, 0x020, 0x004, 0x1A8, 0x174, 0x0E4, 0x068, 0x3A4, 0x2EE, + 0x000, 0x2ED, 0x3C9, 0x049, 0x0E7, 0x185, 0x1D1, 0x1FF, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x021, 0x1FE, 0x1D0, 0x184, 0x0E6, 0x048, 0x3C8, 0x2EC, 0x000, 0x2EF, 0x3A5, 0x069, + 0x0E5, 0x175, 0x1A9, 0x005, 0x0C1, 0x0A4, 0x070, 0x006, 0x18E, 0x120, 0x04A, 0x3A6, + 0x000, 0x3CB, 0x093, 0x141, 0x1AB, 0x023, 0x06B, 0x09F, 0x027, 0x00A, 0x0EA, 0x0A6, + 0x04A, 0x1DE, 0x122, 0x090, 0x000, 0x06B, 0x143, 0x1DD, 0x057, 0x0A3, 0x0E5, 0x009, + 0x055, 0x046, 0x018, 0x0DE, 0x0B8, 0x068, 0x1C4, 0x10A, 0x000, 0x109, 0x1C7, 0x055, + 0x0BD, 0x0ED, 0x015, 0x041, 0x0F7, 0x0D8, 0x0AE, 0x03C, 0x0E0, 0x0B4, 0x02E, 0x18C, + 0x000, 0x187, 0x027, 0x0B7, 0x0F1, 0x03F, 0x09D, 0x0DD, 0x045, 0x02C, 0x0FC, 0x0AC, + 0x022, 0x0F4, 0x07E, 0x1E6, 0x000, 0x1FD, 0x087, 0x0F9, 0x021, 0x093, 0x0FB, 0x02F, + 0x003, 0x068, 0x03A, 0x0E6, 0x04A, 0x028, 0x0C4, 0x036, 0x000, 0x02D, 0x0BF, 0x01D, + 0x04D, 0x0DB, 0x037, 0x065, +}; + +static const uint8_t huff_spec_a43_bits[] = { + 4, 6, 6, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 6, 6, + 5, 6, 7, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 7, 6, + 6, 7, 7, 7, 8, 8, 9, 9, 0, 9, 9, 8, 8, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 9, 10, 0, 10, 9, 9, 8, 8, 7, 7, + 7, 7, 8, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 8, 7, + 8, 8, 8, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 8, 8, + 8, 9, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 8, 9, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 9, + 8, 8, 8, 9, 9, 9, 10, 10, 0, 10, 10, 9, 9, 9, 8, 8, + 7, 7, 8, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 8, 7, + 7, 7, 7, 8, 8, 9, 9, 10, 0, 10, 9, 8, 8, 8, 7, 7, + 6, 7, 7, 7, 8, 8, 9, 9, 0, 9, 9, 8, 8, 7, 7, 7, + 5, 6, 7, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 7, 6, +}; + +static const uint16_t huff_spec_a43_codes[] = { + 0x002, 0x03E, 0x016, 0x060, 0x04E, 0x0DC, 0x04A, 0x130, 0x000, 0x131, 0x04B, 0x0DD, + 0x04F, 0x061, 0x017, 0x03F, 0x002, 0x02C, 0x076, 0x042, 0x034, 0x0CE, 0x002, 0x0E8, + 0x000, 0x0CF, 0x001, 0x0D1, 0x037, 0x045, 0x07B, 0x02F, 0x014, 0x072, 0x052, 0x01A, + 0x0E0, 0x080, 0x198, 0x01E, 0x000, 0x01D, 0x19B, 0x083, 0x0DF, 0x019, 0x055, 0x079, + 0x050, 0x03C, 0x004, 0x0C4, 0x096, 0x00C, 0x0EA, 0x34A, 0x000, 0x34F, 0x0ED, 0x1D7, + 0x095, 0x0AF, 0x003, 0x03F, 0x046, 0x026, 0x0D6, 0x092, 0x046, 0x15A, 0x3A8, 0x108, + 0x000, 0x10F, 0x3A3, 0x135, 0x039, 0x091, 0x0D9, 0x031, 0x0D4, 0x0CA, 0x072, 0x1C6, + 0x136, 0x090, 0x2B2, 0x104, 0x000, 0x103, 0x111, 0x08B, 0x133, 0x1D3, 0x071, 0x0C9, + 0x03E, 0x1B4, 0x18C, 0x0CC, 0x38A, 0x2B0, 0x106, 0x0F2, 0x000, 0x0EF, 0x101, 0x113, + 0x3A1, 0x0CB, 0x18F, 0x1B7, 0x0EE, 0x092, 0x388, 0x348, 0x10A, 0x0F4, 0x0F0, 0x0EA, + 0x000, 0x0E9, 0x0ED, 0x0F7, 0x10D, 0x34D, 0x3AB, 0x0C9, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x0EF, 0x0C8, 0x3AA, 0x34C, 0x10C, 0x0F6, 0x0EC, 0x0E8, 0x000, 0x0EB, 0x0F1, 0x0F5, + 0x10B, 0x349, 0x389, 0x093, 0x03F, 0x1B6, 0x18E, 0x0CA, 0x3A0, 0x112, 0x100, 0x0EE, + 0x000, 0x0F3, 0x107, 0x2B1, 0x38B, 0x0CD, 0x18D, 0x1B5, 0x0D5, 0x0C8, 0x070, 0x1D2, + 0x132, 0x08A, 0x110, 0x102, 0x000, 0x105, 0x2B3, 0x091, 0x137, 0x1C7, 0x073, 0x0CB, + 0x047, 0x030, 0x0D8, 0x090, 0x038, 0x134, 0x3A2, 0x10E, 0x000, 0x109, 0x3A9, 0x15B, + 0x047, 0x093, 0x0D7, 0x027, 0x051, 0x03E, 0x002, 0x0AE, 0x094, 0x1D6, 0x0EC, 0x34E, + 0x000, 0x34B, 0x0EB, 0x00D, 0x097, 0x0C5, 0x005, 0x03D, 0x015, 0x078, 0x054, 0x018, + 0x0DE, 0x082, 0x19A, 0x01C, 0x000, 0x01F, 0x199, 0x081, 0x0E1, 0x01B, 0x053, 0x073, + 0x003, 0x02E, 0x07A, 0x044, 0x036, 0x0D0, 0x000, 0x0CE, 0x000, 0x0E9, 0x003, 0x0CF, + 0x035, 0x043, 0x077, 0x02D, +}; + +static const uint8_t huff_spec_a44_bits[] = { + 4, 5, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 5, + 5, 6, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 6, + 6, 6, 7, 7, 8, 9, 10, 10, 0, 10, 10, 9, 8, 7, 7, 6, + 7, 7, 7, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 7, 7, + 7, 8, 8, 8, 9, 10, 10, 10, 0, 10, 10, 10, 9, 8, 8, 7, + 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, + 7, 7, 8, 8, 9, 10, 10, 10, 0, 10, 10, 10, 9, 8, 8, 8, + 7, 7, 7, 8, 8, 9, 10, 10, 0, 10, 10, 9, 8, 8, 7, 7, + 6, 6, 7, 7, 8, 9, 10, 10, 0, 10, 10, 9, 8, 7, 7, 6, + 5, 6, 6, 7, 7, 8, 9, 10, 0, 10, 9, 8, 7, 7, 6, 6, +}; + +static const uint16_t huff_spec_a44_codes[] = { + 0x00A, 0x012, 0x030, 0x06E, 0x024, 0x074, 0x0EC, 0x07E, 0x000, 0x07F, 0x0ED, 0x075, + 0x025, 0x06F, 0x031, 0x013, 0x010, 0x03C, 0x018, 0x05A, 0x002, 0x046, 0x09E, 0x07C, + 0x000, 0x079, 0x0E5, 0x04D, 0x007, 0x065, 0x01B, 0x03F, 0x02E, 0x016, 0x072, 0x01A, + 0x0D6, 0x1C6, 0x3B4, 0x066, 0x000, 0x06B, 0x3B7, 0x1D9, 0x0D5, 0x021, 0x075, 0x015, + 0x06C, 0x03E, 0x01E, 0x0CC, 0x044, 0x0F2, 0x082, 0x05C, 0x000, 0x05F, 0x087, 0x0F5, + 0x031, 0x0CF, 0x017, 0x059, 0x01C, 0x0EE, 0x0D0, 0x024, 0x1C0, 0x08E, 0x06E, 0x048, + 0x000, 0x04D, 0x06D, 0x089, 0x0F7, 0x033, 0x0D3, 0x001, 0x070, 0x028, 0x1C2, 0x0F0, + 0x08A, 0x074, 0x054, 0x040, 0x000, 0x043, 0x053, 0x073, 0x099, 0x0EF, 0x1C5, 0x02B, + 0x0E6, 0x04E, 0x08C, 0x080, 0x068, 0x058, 0x046, 0x02A, 0x000, 0x029, 0x045, 0x051, + 0x065, 0x085, 0x09B, 0x09D, 0x07A, 0x076, 0x060, 0x056, 0x04E, 0x02C, 0x024, 0x022, + 0x000, 0x021, 0x027, 0x02F, 0x04B, 0x05B, 0x063, 0x071, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x07B, 0x070, 0x062, 0x05A, 0x04A, 0x02E, 0x026, 0x020, 0x000, 0x023, 0x025, 0x02D, + 0x04F, 0x057, 0x061, 0x077, 0x0E7, 0x09C, 0x09A, 0x084, 0x064, 0x050, 0x044, 0x028, + 0x000, 0x02B, 0x047, 0x059, 0x069, 0x081, 0x08D, 0x04F, 0x071, 0x02A, 0x1C4, 0x0EE, + 0x098, 0x072, 0x052, 0x042, 0x000, 0x041, 0x055, 0x075, 0x08B, 0x0F1, 0x1C3, 0x029, + 0x01D, 0x000, 0x0D2, 0x032, 0x0F6, 0x088, 0x06C, 0x04C, 0x000, 0x049, 0x06F, 0x08F, + 0x1C1, 0x025, 0x0D1, 0x0EF, 0x06D, 0x058, 0x016, 0x0CE, 0x030, 0x0F4, 0x086, 0x05E, + 0x000, 0x05D, 0x083, 0x0F3, 0x045, 0x0CD, 0x01F, 0x03F, 0x02F, 0x014, 0x074, 0x020, + 0x0D4, 0x1D8, 0x3B6, 0x06A, 0x000, 0x067, 0x3B5, 0x1C7, 0x0D7, 0x01B, 0x073, 0x017, + 0x011, 0x03E, 0x01A, 0x064, 0x006, 0x04C, 0x0E4, 0x078, 0x000, 0x07D, 0x09F, 0x047, + 0x003, 0x05B, 0x019, 0x03D, +}; + +static const uint8_t huff_spec_a51_bits[] = { + 5, 5, 5, 5, 5, 6, 6, 6, 4, 4, 5, 5, 5, 5, 5, 5, + 0, 5, 5, 5, 5, 5, 5, 4, 4, 6, 6, 6, 5, 5, 5, 5, +}; + +static const uint16_t huff_spec_a51_codes[] = { + 0x19, 0x16, 0x12, 0x0E, 0x06, 0x3A, 0x38, 0x30, 0x00, 0x04, 0x1E, 0x1A, + 0x14, 0x10, 0x0C, 0x04, 0x00, 0x05, 0x0D, 0x11, 0x15, 0x1B, 0x1F, 0x05, + 0x01, 0x31, 0x39, 0x3B, 0x07, 0x0F, 0x13, 0x17, +}; + +static const uint8_t huff_spec_a52_bits[] = { + 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, + 0, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, +}; + +static const uint16_t huff_spec_a52_codes[] = { + 0x09, 0x04, 0x00, 0x1E, 0x1A, 0x14, 0x0C, 0x06, 0x18, 0x16, 0x0E, 0x04, + 0x3A, 0x38, 0x22, 0x20, 0x00, 0x21, 0x23, 0x39, 0x3B, 0x05, 0x0F, 0x17, + 0x19, 0x07, 0x0D, 0x15, 0x1B, 0x1F, 0x01, 0x05, +}; + +static const uint8_t huff_spec_a53_bits[] = { + 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, + 0, 7, 7, 7, 7, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, +}; + +static const uint16_t huff_spec_a53_codes[] = { + 0x00, 0x0C, 0x08, 0x04, 0x1E, 0x16, 0x14, 0x06, 0x0C, 0x04, 0x38, 0x1E, + 0x76, 0x74, 0x3A, 0x38, 0x00, 0x39, 0x3B, 0x75, 0x77, 0x1F, 0x39, 0x05, + 0x0D, 0x07, 0x15, 0x17, 0x1F, 0x05, 0x09, 0x0D, +}; + +static const uint8_t huff_spec_a54_bits[] = { + 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, + 0, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, +}; + +static const uint16_t huff_spec_a54_codes[] = { + 0x02, 0x0E, 0x0A, 0x08, 0x02, 0x1A, 0x0E, 0x02, 0x00, 0x30, 0x18, 0x66, + 0x36, 0x34, 0xCA, 0xC8, 0x00, 0xC9, 0xCB, 0x35, 0x37, 0x67, 0x19, 0x31, + 0x01, 0x03, 0x0F, 0x1B, 0x03, 0x09, 0x0B, 0x0F, +}; + +static const uint8_t huff_spec_a61_bits[] = { + 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, + 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, + 5, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const uint16_t huff_spec_a61_codes[] = { + 0x35, 0x30, 0x2A, 0x28, 0x24, 0x20, 0x18, 0x0E, 0x0C, 0x7E, 0x7C, 0x72, + 0x70, 0x68, 0x5E, 0x5C, 0x04, 0x0E, 0x08, 0x00, 0x3C, 0x3A, 0x36, 0x32, + 0x2C, 0x26, 0x22, 0x1A, 0x16, 0x14, 0x06, 0x04, 0x00, 0x05, 0x07, 0x15, + 0x17, 0x1B, 0x23, 0x27, 0x2D, 0x33, 0x37, 0x3B, 0x3D, 0x01, 0x09, 0x0F, + 0x05, 0x5D, 0x5F, 0x69, 0x71, 0x73, 0x7D, 0x7F, 0x0D, 0x0F, 0x19, 0x21, + 0x25, 0x29, 0x2B, 0x31, +}; + +static const uint8_t huff_spec_a62_bits[] = { + 5, 5, 5, 5, 5, 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, + 0, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, +}; + +static const uint16_t huff_spec_a62_codes[] = { + 0x14, 0x0E, 0x08, 0x04, 0x02, 0x3E, 0x3C, 0x38, 0x34, 0x30, 0x2A, 0x24, + 0x1A, 0x18, 0x0E, 0x02, 0x32, 0x36, 0x2C, 0x26, 0x20, 0x16, 0x0C, 0x00, + 0x76, 0x74, 0x5E, 0x5C, 0x46, 0x44, 0x2A, 0x28, 0x00, 0x29, 0x2B, 0x45, + 0x47, 0x5D, 0x5F, 0x75, 0x77, 0x01, 0x0D, 0x17, 0x21, 0x27, 0x2D, 0x37, + 0x33, 0x03, 0x0F, 0x19, 0x1B, 0x25, 0x2B, 0x31, 0x35, 0x39, 0x3D, 0x3F, + 0x03, 0x05, 0x09, 0x0F, +}; + +static const uint8_t huff_spec_a63_bits[] = { + 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, + 0, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, +}; + +static const uint16_t huff_spec_a63_codes[] = { + 0x00, 0x1C, 0x18, 0x14, 0x10, 0x0A, 0x08, 0x02, 0x3E, 0x36, 0x2E, 0x2C, + 0x24, 0x1C, 0x0E, 0x08, 0x1E, 0x1A, 0x0C, 0x7A, 0x6A, 0x68, 0x4C, 0x32, + 0x16, 0x14, 0xF2, 0xF0, 0x9E, 0x9C, 0x62, 0x60, 0x00, 0x61, 0x63, 0x9D, + 0x9F, 0xF1, 0xF3, 0x15, 0x17, 0x33, 0x4D, 0x69, 0x6B, 0x7B, 0x0D, 0x1B, + 0x1F, 0x09, 0x0F, 0x1D, 0x25, 0x2D, 0x2F, 0x37, 0x3F, 0x03, 0x09, 0x0B, + 0x11, 0x15, 0x19, 0x1D, +}; + +static const uint8_t huff_spec_a64_bits[] = { + 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, + 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, + 0, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, + 6, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, +}; + +static const uint16_t huff_spec_a64_codes[] = { + 0x006, 0x002, 0x01C, 0x01A, 0x016, 0x012, 0x00E, 0x00A, 0x002, 0x03E, + 0x032, 0x02A, 0x022, 0x020, 0x010, 0x07A, 0x000, 0x078, 0x060, 0x050, + 0x024, 0x006, 0x0C6, 0x0C4, 0x0A4, 0x04E, 0x00A, 0x008, 0x14E, 0x14C, + 0x09A, 0x098, 0x000, 0x099, 0x09B, 0x14D, 0x14F, 0x009, 0x00B, 0x04F, + 0x0A5, 0x0C5, 0x0C7, 0x007, 0x025, 0x051, 0x061, 0x079, 0x001, 0x07B, + 0x011, 0x021, 0x023, 0x02B, 0x033, 0x03F, 0x003, 0x00B, 0x00F, 0x013, + 0x017, 0x01B, 0x01D, 0x003, +}; + +static const uint8_t huff_spec_a71_bits[] = { + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 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, + 0, 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, 6, 6, 6, 6, 6, 6, + 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +}; + +static const uint16_t huff_spec_a71_codes[] = { + 0x6C, 0x66, 0x62, 0x5C, 0x56, 0x50, 0x52, 0x4E, 0x48, 0x3E, 0x36, 0x34, 0x2A, 0x26, 0x1E, 0x16, + 0x0E, 0x08, 0x00, 0xF6, 0xF4, 0xEE, 0xEC, 0xE2, 0xE0, 0xDA, 0xD2, 0xD0, 0xBE, 0xBC, 0xB2, 0xB0, + 0x0C, 0x20, 0x1C, 0x16, 0x10, 0x08, 0x02, 0x7E, 0x7C, 0x78, 0x74, 0x72, 0x6E, 0x6A, 0x64, 0x60, + 0x5A, 0x54, 0x4C, 0x4A, 0x46, 0x44, 0x3C, 0x32, 0x30, 0x28, 0x24, 0x1C, 0x14, 0x0C, 0x0A, 0x02, + 0x00, 0x03, 0x0B, 0x0D, 0x15, 0x1D, 0x25, 0x29, 0x31, 0x33, 0x3D, 0x45, 0x47, 0x4B, 0x4D, 0x55, + 0x5B, 0x61, 0x65, 0x6B, 0x6F, 0x73, 0x75, 0x79, 0x7D, 0x7F, 0x03, 0x09, 0x11, 0x17, 0x1D, 0x21, + 0x0D, 0xB1, 0xB3, 0xBD, 0xBF, 0xD1, 0xD3, 0xDB, 0xE1, 0xE3, 0xED, 0xEF, 0xF5, 0xF7, 0x01, 0x09, + 0x0F, 0x17, 0x1F, 0x27, 0x2B, 0x35, 0x37, 0x3F, 0x49, 0x4F, 0x53, 0x51, 0x57, 0x5D, 0x63, 0x67, +}; + +static const uint8_t huff_spec_a72_bits[] = { + 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, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 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, 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const uint16_t huff_spec_a72_codes[] = { + 0x2A, 0x24, 0x1C, 0x18, 0x12, 0x0E, 0x0A, 0x06, 0x02, 0x7E, 0x7C, 0x7A, 0x76, 0x72, 0x70, 0x6A, + 0x68, 0x62, 0x5C, 0x5A, 0x52, 0x4E, 0x46, 0x42, 0x3C, 0x34, 0x2A, 0x28, 0x20, 0x12, 0x10, 0x08, + 0x66, 0x74, 0x6C, 0x64, 0x5E, 0x58, 0x50, 0x44, 0x40, 0x36, 0x2C, 0x22, 0x1A, 0x0A, 0x02, 0x00, + 0xF2, 0xF0, 0xDE, 0xDC, 0xC2, 0xC0, 0xAE, 0xAC, 0x9A, 0x98, 0x7E, 0x7C, 0x5E, 0x5C, 0x32, 0x30, + 0x00, 0x31, 0x33, 0x5D, 0x5F, 0x7D, 0x7F, 0x99, 0x9B, 0xAD, 0xAF, 0xC1, 0xC3, 0xDD, 0xDF, 0xF1, + 0xF3, 0x01, 0x03, 0x0B, 0x1B, 0x23, 0x2D, 0x37, 0x41, 0x45, 0x51, 0x59, 0x5F, 0x65, 0x6D, 0x75, + 0x67, 0x09, 0x11, 0x13, 0x21, 0x29, 0x2B, 0x35, 0x3D, 0x43, 0x47, 0x4F, 0x53, 0x5B, 0x5D, 0x63, + 0x69, 0x6B, 0x71, 0x73, 0x77, 0x7B, 0x7D, 0x7F, 0x03, 0x07, 0x0B, 0x0F, 0x13, 0x19, 0x1D, 0x25, +}; + +static const uint8_t huff_spec_a73_bits[] = { + 5, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const uint16_t huff_spec_a73_codes[] = { + 0x003, 0x03E, 0x038, 0x034, 0x030, 0x02C, 0x028, 0x024, 0x020, 0x01C, 0x016, 0x014, + 0x00E, 0x00A, 0x004, 0x000, 0x07A, 0x076, 0x06E, 0x06C, 0x064, 0x05E, 0x056, 0x04E, + 0x04C, 0x044, 0x036, 0x030, 0x022, 0x018, 0x012, 0x004, 0x03C, 0x03E, 0x032, 0x024, + 0x020, 0x010, 0x0F2, 0x0F0, 0x0E8, 0x0CE, 0x0BA, 0x0B8, 0x0A8, 0x08C, 0x06A, 0x04E, + 0x04C, 0x034, 0x00E, 0x00C, 0x1D6, 0x1D4, 0x19A, 0x198, 0x156, 0x154, 0x11E, 0x11C, + 0x0D2, 0x0D0, 0x06E, 0x06C, 0x000, 0x06D, 0x06F, 0x0D1, 0x0D3, 0x11D, 0x11F, 0x155, + 0x157, 0x199, 0x19B, 0x1D5, 0x1D7, 0x00D, 0x00F, 0x035, 0x04D, 0x04F, 0x06B, 0x08D, + 0x0A9, 0x0B9, 0x0BB, 0x0CF, 0x0E9, 0x0F1, 0x0F3, 0x011, 0x021, 0x025, 0x033, 0x03F, + 0x03D, 0x005, 0x013, 0x019, 0x023, 0x031, 0x037, 0x045, 0x04D, 0x04F, 0x057, 0x05F, + 0x065, 0x06D, 0x06F, 0x077, 0x07B, 0x001, 0x005, 0x00B, 0x00F, 0x015, 0x017, 0x01D, + 0x021, 0x025, 0x029, 0x02D, 0x031, 0x035, 0x039, 0x03F, +}; + +static const uint8_t huff_spec_a74_bits[] = { + 5, 5, 5, 5, 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, 8, 8, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, +}; + +static const uint16_t huff_spec_a74_codes[] = { + 0x00D, 0x00A, 0x004, 0x000, 0x03A, 0x036, 0x032, 0x030, 0x02C, 0x028, 0x026, 0x022, + 0x01E, 0x018, 0x012, 0x00E, 0x006, 0x07E, 0x07A, 0x070, 0x06A, 0x05E, 0x056, 0x054, + 0x048, 0x040, 0x038, 0x022, 0x01A, 0x00A, 0x0F8, 0x0E6, 0x008, 0x0FA, 0x0F0, 0x0D2, + 0x0BA, 0x0B8, 0x094, 0x084, 0x074, 0x042, 0x032, 0x1E6, 0x1CA, 0x1C8, 0x1A2, 0x12E, + 0x10E, 0x10C, 0x0EC, 0x082, 0x062, 0x060, 0x3CA, 0x3C8, 0x342, 0x340, 0x25A, 0x258, + 0x1DE, 0x1DC, 0x102, 0x100, 0x000, 0x101, 0x103, 0x1DD, 0x1DF, 0x259, 0x25B, 0x341, + 0x343, 0x3C9, 0x3CB, 0x061, 0x063, 0x083, 0x0ED, 0x10D, 0x10F, 0x12F, 0x1A3, 0x1C9, + 0x1CB, 0x1E7, 0x033, 0x043, 0x075, 0x085, 0x095, 0x0B9, 0x0BB, 0x0D3, 0x0F1, 0x0FB, + 0x009, 0x0E7, 0x0F9, 0x00B, 0x01B, 0x023, 0x039, 0x041, 0x049, 0x055, 0x057, 0x05F, + 0x06B, 0x071, 0x07B, 0x07F, 0x007, 0x00F, 0x013, 0x019, 0x01F, 0x023, 0x027, 0x029, + 0x02D, 0x031, 0x033, 0x037, 0x03B, 0x001, 0x005, 0x00B, +}; + +static const uint8_t huff_spec_b22_bits[] = { + 0, 4, 0, 4, 4, 5, 0, 5, 0, 0, 0, 0, 4, 5, 0, 5, + 4, 7, 0, 6, 6, 9, 0, 7, 0, 0, 0, 0, 6, 9, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 6, 0, 7, 6, 7, 0, 9, 0, 0, 0, 0, 6, 7, 0, 9, + 4, 8, 0, 8, 8, 10, 0, 10, 0, 0, 0, 0, 6, 9, 0, 9, + 5, 10, 0, 9, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 9, 0, 10, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 8, 0, 8, 6, 9, 0, 9, 0, 0, 0, 0, 8, 10, 0, 10, + 6, 10, 0, 9, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 9, 0, 10, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, +}; + +static const uint16_t huff_spec_b22_codes[] = { + 0x000, 0x00E, 0x000, 0x00F, 0x008, 0x006, 0x000, 0x00B, 0x000, 0x000, 0x000, 0x000, + 0x009, 0x00A, 0x000, 0x007, 0x006, 0x00A, 0x000, 0x029, 0x006, 0x158, 0x000, 0x023, + 0x000, 0x000, 0x000, 0x000, 0x013, 0x174, 0x000, 0x021, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x007, 0x028, 0x000, 0x00B, 0x012, 0x020, 0x000, 0x175, 0x000, 0x000, 0x000, 0x000, + 0x007, 0x022, 0x000, 0x159, 0x00C, 0x0BC, 0x000, 0x0BF, 0x022, 0x2B8, 0x000, 0x2BB, + 0x000, 0x000, 0x000, 0x000, 0x00B, 0x170, 0x000, 0x15B, 0x000, 0x04E, 0x000, 0x15F, + 0x042, 0x04A, 0x000, 0x041, 0x000, 0x000, 0x000, 0x000, 0x055, 0x044, 0x000, 0x04D, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x02D, 0x172, 0x000, 0x2ED, 0x040, 0x042, 0x000, 0x047, + 0x000, 0x000, 0x000, 0x000, 0x013, 0x2EE, 0x000, 0x049, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x00D, 0x0BE, 0x000, 0x0BD, 0x00A, 0x15A, 0x000, 0x171, 0x000, 0x000, 0x000, 0x000, + 0x023, 0x2BA, 0x000, 0x2B9, 0x02C, 0x2EC, 0x000, 0x173, 0x012, 0x048, 0x000, 0x2EF, + 0x000, 0x000, 0x000, 0x000, 0x041, 0x046, 0x000, 0x043, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x001, 0x15E, 0x000, 0x04F, 0x054, 0x04C, 0x000, 0x045, 0x000, 0x000, 0x000, 0x000, + 0x043, 0x040, 0x000, 0x04B, +}; + +static const uint8_t huff_spec_b23_bits[] = { + 2, 4, 0, 4, 4, 6, 0, 6, 0, 0, 0, 0, 4, 6, 0, 6, + 4, 9, 0, 7, 7, 9, 0, 8, 0, 0, 0, 0, 7, 9, 0, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 7, 0, 9, 7, 8, 0, 9, 0, 0, 0, 0, 7, 8, 0, 9, + 4, 8, 0, 8, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 8, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 8, 0, 8, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, + 7, 10, 0, 10, 8, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 10, 0, 10, 9, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, +}; + +static const uint16_t huff_spec_b23_codes[] = { + 0x003, 0x008, 0x000, 0x009, 0x002, 0x018, 0x000, 0x01B, 0x000, 0x000, 0x000, 0x000, + 0x003, 0x01A, 0x000, 0x019, 0x000, 0x17C, 0x000, 0x055, 0x056, 0x0E8, 0x000, 0x07D, + 0x000, 0x000, 0x000, 0x000, 0x059, 0x0F6, 0x000, 0x07F, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x001, 0x054, 0x000, 0x17D, 0x058, 0x07E, 0x000, 0x0F7, 0x000, 0x000, 0x000, 0x000, + 0x057, 0x07C, 0x000, 0x0E9, 0x004, 0x0A2, 0x000, 0x0A1, 0x17A, 0x1DA, 0x000, 0x1D9, + 0x000, 0x000, 0x000, 0x000, 0x053, 0x1E8, 0x000, 0x2F3, 0x05C, 0x1D6, 0x000, 0x1E7, + 0x1EA, 0x1E2, 0x000, 0x1CF, 0x000, 0x000, 0x000, 0x000, 0x17F, 0x1CA, 0x000, 0x1DD, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x05B, 0x2F0, 0x000, 0x1DF, 0x1E4, 0x1CC, 0x000, 0x1D5, + 0x000, 0x000, 0x000, 0x000, 0x071, 0x1E0, 0x000, 0x1C9, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x005, 0x0A0, 0x000, 0x0A3, 0x052, 0x2F2, 0x000, 0x1E9, 0x000, 0x000, 0x000, 0x000, + 0x17B, 0x1D8, 0x000, 0x1DB, 0x05A, 0x1DE, 0x000, 0x2F1, 0x070, 0x1C8, 0x000, 0x1E1, + 0x000, 0x000, 0x000, 0x000, 0x1E5, 0x1D4, 0x000, 0x1CD, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x05D, 0x1E6, 0x000, 0x1D7, 0x17E, 0x1DC, 0x000, 0x1CB, 0x000, 0x000, 0x000, 0x000, + 0x1EB, 0x1CE, 0x000, 0x1E3, +}; + +static const uint8_t huff_spec_b24_bits[] = { + 1, 4, 0, 4, 5, 7, 0, 7, 0, 0, 0, 0, 5, 7, 0, 7, + 5, 9, 0, 7, 8, 10, 0, 9, 0, 0, 0, 0, 7, 10, 0, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 7, 0, 9, 7, 9, 0, 10, 0, 0, 0, 0, 8, 9, 0, 10, + 5, 9, 0, 8, 9, 10, 0, 10, 0, 0, 0, 0, 7, 10, 0, 10, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 8, 0, 9, 7, 10, 0, 10, 0, 0, 0, 0, 9, 10, 0, 10, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 10, 0, 10, 10, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, +}; + +static const uint16_t huff_spec_b24_codes[] = { + 0x001, 0x000, 0x000, 0x001, 0x00A, 0x01C, 0x000, 0x033, 0x000, 0x000, 0x000, 0x000, + 0x00B, 0x032, 0x000, 0x01D, 0x008, 0x0D8, 0x000, 0x031, 0x06E, 0x0FA, 0x000, 0x0D7, + 0x000, 0x000, 0x000, 0x000, 0x011, 0x0F4, 0x000, 0x0D5, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x009, 0x030, 0x000, 0x0D9, 0x010, 0x0D4, 0x000, 0x0F5, 0x000, 0x000, 0x000, 0x000, + 0x06F, 0x0D6, 0x000, 0x0FB, 0x00E, 0x0DA, 0x000, 0x025, 0x0D2, 0x0D4, 0x000, 0x0DB, + 0x000, 0x000, 0x000, 0x000, 0x017, 0x0FE, 0x000, 0x0FD, 0x014, 0x0DC, 0x000, 0x0F9, + 0x0F2, 0x0D6, 0x000, 0x09B, 0x000, 0x000, 0x000, 0x000, 0x1A3, 0x09C, 0x000, 0x0D3, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x019, 0x0F6, 0x000, 0x0D9, 0x0F0, 0x09E, 0x000, 0x0D1, + 0x000, 0x000, 0x000, 0x000, 0x1A1, 0x0DE, 0x000, 0x099, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x00F, 0x024, 0x000, 0x0DB, 0x016, 0x0FC, 0x000, 0x0FF, 0x000, 0x000, 0x000, 0x000, + 0x0D3, 0x0DA, 0x000, 0x0D5, 0x018, 0x0D8, 0x000, 0x0F7, 0x1A0, 0x098, 0x000, 0x0DF, + 0x000, 0x000, 0x000, 0x000, 0x0F1, 0x0D0, 0x000, 0x09F, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x015, 0x0F8, 0x000, 0x0DD, 0x1A2, 0x0D2, 0x000, 0x09D, 0x000, 0x000, 0x000, 0x000, + 0x0F3, 0x09A, 0x000, 0x0D7 +}; + +static const uint8_t huff_spec_b32_bits[] = { + 2, 4, 5, 6, 0, 6, 5, 4, 5, 6, 6, 7, 0, 6, 5, 6, + 5, 6, 7, 7, 0, 8, 7, 6, 6, 7, 8, 9, 0, 9, 8, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 9, 8, 7, + 5, 6, 7, 8, 0, 7, 7, 6, 5, 6, 5, 6, 0, 7, 6, 6, +}; + +static const uint16_t huff_spec_b32_codes[] = { + 0x001, 0x002, 0x01E, 0x02A, 0x000, 0x02B, 0x01F, 0x003, 0x016, 0x020, 0x03A, 0x064, + 0x000, 0x005, 0x001, 0x023, 0x01A, 0x026, 0x070, 0x00C, 0x000, 0x0CF, 0x073, 0x031, + 0x024, 0x00E, 0x0CC, 0x146, 0x000, 0x145, 0x0A1, 0x053, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x025, 0x052, 0x0A0, 0x144, 0x000, 0x147, 0x0CD, 0x00F, + 0x01B, 0x030, 0x072, 0x0CE, 0x000, 0x00D, 0x071, 0x027, 0x017, 0x022, 0x000, 0x004, + 0x000, 0x065, 0x03B, 0x021, +}; + +static const uint8_t huff_spec_b33_bits[] = { + 2, 4, 5, 7, 0, 7, 5, 4, 4, 5, 6, 8, 0, 7, 6, 5, + 5, 6, 7, 9, 0, 8, 7, 6, 7, 8, 9, 10, 0, 10, 9, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 0, 10, 9, 8, + 5, 6, 7, 8, 0, 9, 7, 6, 4, 5, 6, 7, 0, 8, 6, 5, +}; + +static const uint16_t huff_spec_b33_codes[] = { + 0x003, 0x008, 0x014, 0x05E, 0x000, 0x05F, 0x015, 0x009, 0x004, 0x002, 0x01C, 0x0BA, + 0x000, 0x011, 0x01F, 0x001, 0x00C, 0x00C, 0x014, 0x166, 0x000, 0x02D, 0x013, 0x00F, + 0x05A, 0x0B0, 0x05E, 0x0B8, 0x000, 0x0BB, 0x165, 0x0B9, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x05B, 0x0B8, 0x164, 0x0BA, 0x000, 0x0B9, 0x05F, 0x0B1, + 0x00D, 0x00E, 0x012, 0x02C, 0x000, 0x167, 0x015, 0x00D, 0x005, 0x000, 0x01E, 0x010, + 0x000, 0x0BB, 0x01D, 0x003 +}; + +static const uint8_t huff_spec_b34_bits[] = { + 1, 4, 6, 8, 0, 8, 6, 4, 4, 6, 7, 9, 0, 8, 7, 6, + 6, 7, 8, 10, 0, 10, 8, 7, 8, 9, 10, 10, 0, 10, 10, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 10, 0, 10, 10, 9, + 6, 7, 8, 10, 0, 10, 8, 7, 4, 6, 7, 8, 0, 9, 7, 6, +}; + +static const uint16_t huff_spec_b34_codes[] = { + 0x000, 0x00A, 0x038, 0x0EE, 0x000, 0x0EF, 0x039, 0x00B, 0x008, 0x03C, 0x06E, 0x1D8, + 0x000, 0x0C1, 0x075, 0x03F, 0x032, 0x068, 0x0C4, 0x358, 0x000, 0x30F, 0x0C7, 0x06D, + 0x0D4, 0x1AE, 0x30C, 0x308, 0x000, 0x30B, 0x35B, 0x1DB, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x0D5, 0x1DA, 0x35A, 0x30A, 0x000, 0x309, 0x30D, 0x1AF, + 0x033, 0x06C, 0x0C6, 0x30E, 0x000, 0x359, 0x0C5, 0x069, 0x009, 0x03E, 0x074, 0x0C0, + 0x000, 0x1D9, 0x06F, 0x03D, +}; + +static const uint8_t huff_spec_b42_bits[] = { + 4, 5, 6, 8, 6, 7, 8, 8, 0, 8, 8, 7, 6, 8, 6, 5, + 5, 6, 7, 8, 7, 7, 8, 9, 0, 8, 8, 7, 7, 8, 7, 6, + 7, 7, 8, 9, 7, 8, 9, 9, 0, 9, 9, 8, 7, 9, 8, 7, + 8, 9, 9, 10, 8, 8, 9, 10, 0, 10, 9, 8, 8, 10, 9, 8, + 6, 7, 8, 8, 9, 9, 10, 10, 0, 10, 10, 9, 9, 8, 8, 7, + 7, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, + 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, + 8, 9, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 9, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 9, + 8, 8, 9, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 9, 8, + 7, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, + 6, 7, 8, 8, 9, 9, 10, 10, 0, 10, 10, 9, 9, 8, 8, 7, + 8, 8, 9, 10, 8, 8, 9, 10, 0, 10, 9, 8, 8, 10, 9, 9, + 7, 7, 8, 9, 7, 8, 9, 9, 0, 9, 9, 8, 7, 9, 8, 7, + 5, 6, 7, 8, 7, 7, 8, 8, 0, 9, 8, 7, 7, 8, 7, 6, +}; + +static const uint16_t huff_spec_b42_codes[] = { + 0x00E, 0x018, 0x010, 0x0F0, 0x024, 0x05A, 0x0F6, 0x078, 0x000, 0x079, 0x0F7, 0x05B, + 0x025, 0x0F1, 0x011, 0x019, 0x00C, 0x014, 0x01C, 0x036, 0x05C, 0x012, 0x09E, 0x1E4, + 0x000, 0x00B, 0x0A9, 0x03B, 0x05F, 0x071, 0x019, 0x017, 0x06E, 0x000, 0x03E, 0x114, + 0x002, 0x0B0, 0x1AA, 0x07A, 0x000, 0x099, 0x1E7, 0x0B3, 0x00B, 0x131, 0x07F, 0x00D, + 0x0D8, 0x1FE, 0x112, 0x22E, 0x086, 0x010, 0x134, 0x35C, 0x000, 0x35F, 0x133, 0x013, + 0x081, 0x22D, 0x119, 0x07B, 0x00A, 0x050, 0x0F8, 0x04E, 0x1B4, 0x154, 0x3EC, 0x0D2, + 0x000, 0x0D7, 0x3D7, 0x137, 0x1FD, 0x073, 0x0FD, 0x057, 0x052, 0x010, 0x08E, 0x1E8, + 0x11A, 0x3EE, 0x0F2, 0x03C, 0x000, 0x03F, 0x0F1, 0x3D5, 0x111, 0x1F5, 0x09D, 0x025, + 0x0D2, 0x082, 0x1A0, 0x0F8, 0x36E, 0x0D4, 0x072, 0x03A, 0x000, 0x027, 0x071, 0x07D, + 0x36D, 0x0FB, 0x1AD, 0x085, 0x00C, 0x1A8, 0x03C, 0x346, 0x0D0, 0x076, 0x024, 0x020, + 0x000, 0x023, 0x039, 0x075, 0x07F, 0x345, 0x09B, 0x157, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x00D, 0x156, 0x09A, 0x344, 0x07E, 0x074, 0x038, 0x022, 0x000, 0x021, 0x025, 0x077, + 0x0D1, 0x347, 0x03D, 0x1A9, 0x0D3, 0x084, 0x1AC, 0x0FA, 0x36C, 0x07C, 0x070, 0x026, + 0x000, 0x03B, 0x073, 0x0D5, 0x36F, 0x0F9, 0x1A1, 0x083, 0x053, 0x024, 0x09C, 0x1F4, + 0x110, 0x3D4, 0x0F0, 0x03E, 0x000, 0x03D, 0x0F3, 0x3EF, 0x11B, 0x1E9, 0x08F, 0x011, + 0x00B, 0x056, 0x0FC, 0x072, 0x1FC, 0x136, 0x3D6, 0x0D6, 0x000, 0x0D3, 0x3ED, 0x155, + 0x1B5, 0x04F, 0x0F9, 0x051, 0x0D9, 0x07A, 0x118, 0x22C, 0x080, 0x012, 0x132, 0x35E, + 0x000, 0x35D, 0x135, 0x011, 0x087, 0x22F, 0x113, 0x1FF, 0x06F, 0x00C, 0x07E, 0x130, + 0x00A, 0x0B2, 0x1E6, 0x098, 0x000, 0x07B, 0x1AB, 0x0B1, 0x003, 0x115, 0x03F, 0x001, + 0x00D, 0x016, 0x018, 0x070, 0x05E, 0x03A, 0x0A8, 0x00A, 0x000, 0x1E5, 0x09F, 0x013, + 0x05D, 0x037, 0x01D, 0x015, +}; + +static const uint8_t huff_spec_b43_bits[] = { + 2, 5, 6, 7, 7, 8, 8, 9, 0, 9, 8, 8, 7, 7, 6, 5, + 5, 6, 7, 8, 7, 8, 9, 10, 0, 10, 9, 8, 7, 8, 7, 6, + 6, 7, 8, 9, 8, 9, 10, 10, 0, 10, 10, 9, 8, 9, 8, 7, + 7, 8, 9, 10, 9, 9, 10, 10, 0, 10, 10, 10, 9, 10, 9, 8, + 7, 8, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 7, + 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 9, 9, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 9, + 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, + 7, 7, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 8, + 7, 8, 9, 10, 9, 10, 10, 10, 0, 10, 10, 9, 9, 10, 9, 8, + 6, 7, 8, 9, 8, 9, 10, 10, 0, 10, 10, 9, 8, 9, 8, 7, + 5, 6, 7, 8, 7, 8, 9, 10, 0, 10, 9, 8, 7, 8, 7, 6, +}; + +static const uint16_t huff_spec_b43_codes[] = { + 0x001, 0x01E, 0x022, 0x018, 0x064, 0x0EC, 0x008, 0x100, 0x000, 0x101, 0x009, 0x0ED, + 0x065, 0x019, 0x023, 0x01F, 0x01A, 0x030, 0x056, 0x09A, 0x00A, 0x090, 0x12C, 0x0A6, + 0x000, 0x0A9, 0x12F, 0x093, 0x00F, 0x09F, 0x059, 0x039, 0x00E, 0x054, 0x0BC, 0x19E, + 0x082, 0x176, 0x0AC, 0x088, 0x000, 0x08B, 0x0AF, 0x19D, 0x095, 0x1D1, 0x0BF, 0x051, + 0x002, 0x098, 0x1D4, 0x0B8, 0x170, 0x046, 0x090, 0x060, 0x000, 0x067, 0x095, 0x0BD, + 0x173, 0x0B5, 0x1D3, 0x09D, 0x052, 0x0EE, 0x034, 0x174, 0x0BA, 0x09C, 0x080, 0x044, + 0x000, 0x047, 0x06D, 0x099, 0x0BF, 0x16F, 0x085, 0x001, 0x0CC, 0x036, 0x16C, 0x0B0, + 0x09A, 0x084, 0x04E, 0x03E, 0x000, 0x037, 0x04B, 0x06B, 0x0A1, 0x0B3, 0x16B, 0x087, + 0x1D6, 0x102, 0x0A4, 0x092, 0x068, 0x04C, 0x034, 0x030, 0x000, 0x02D, 0x03D, 0x049, + 0x083, 0x097, 0x0AB, 0x169, 0x0B6, 0x09E, 0x06E, 0x064, 0x040, 0x038, 0x02E, 0x02A, + 0x000, 0x029, 0x033, 0x03B, 0x043, 0x063, 0x087, 0x0A3, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x0B7, 0x0A2, 0x086, 0x062, 0x042, 0x03A, 0x032, 0x028, 0x000, 0x02B, 0x02F, 0x039, + 0x041, 0x065, 0x06F, 0x09F, 0x1D7, 0x168, 0x0AA, 0x096, 0x082, 0x048, 0x03C, 0x02C, + 0x000, 0x031, 0x035, 0x04D, 0x069, 0x093, 0x0A5, 0x103, 0x0CD, 0x086, 0x16A, 0x0B2, + 0x0A0, 0x06A, 0x04A, 0x036, 0x000, 0x03F, 0x04F, 0x085, 0x09B, 0x0B1, 0x16D, 0x037, + 0x053, 0x000, 0x084, 0x16E, 0x0BE, 0x098, 0x06C, 0x046, 0x000, 0x045, 0x081, 0x09D, + 0x0BB, 0x175, 0x035, 0x0EF, 0x003, 0x09C, 0x1D2, 0x0B4, 0x172, 0x0BC, 0x094, 0x066, + 0x000, 0x061, 0x091, 0x047, 0x171, 0x0B9, 0x1D5, 0x099, 0x00F, 0x050, 0x0BE, 0x1D0, + 0x094, 0x19C, 0x0AE, 0x08A, 0x000, 0x089, 0x0AD, 0x177, 0x083, 0x19F, 0x0BD, 0x055, + 0x01B, 0x038, 0x058, 0x09E, 0x00E, 0x092, 0x12E, 0x0A8, 0x000, 0x0A7, 0x12D, 0x091, + 0x00B, 0x09B, 0x057, 0x031, +}; + +static const uint8_t huff_spec_b44_bits[] = { + 2, 4, 6, 7, 7, 8, 10, 10, 0, 10, 10, 8, 7, 7, 6, 4, + 5, 5, 7, 8, 8, 10, 10, 10, 0, 10, 10, 10, 8, 8, 7, 5, + 6, 7, 8, 9, 9, 10, 10, 10, 0, 10, 10, 10, 10, 9, 8, 7, + 8, 8, 9, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, + 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, + 9, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 9, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, + 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 8, + 8, 8, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 9, 8, + 6, 7, 8, 9, 10, 10, 10, 10, 0, 10, 10, 10, 9, 9, 8, 7, + 5, 5, 7, 8, 8, 10, 10, 10, 0, 10, 10, 10, 8, 8, 7, 5, +}; + +static const uint16_t huff_spec_b44_codes[] = { + 0x002, 0x002, 0x030, 0x000, 0x002, 0x00C, 0x1D2, 0x1AE, 0x000, 0x1AF, 0x1D3, 0x00D, + 0x003, 0x001, 0x031, 0x003, 0x01E, 0x002, 0x070, 0x0C8, 0x07E, 0x1E8, 0x1C0, 0x176, + 0x000, 0x17F, 0x1C3, 0x1EB, 0x0CF, 0x0D3, 0x073, 0x009, 0x018, 0x06A, 0x0EC, 0x1DE, + 0x1A2, 0x1CA, 0x1AA, 0x164, 0x000, 0x16D, 0x1AD, 0x1D1, 0x1EF, 0x1DD, 0x0EB, 0x06D, + 0x0E8, 0x0CA, 0x1BE, 0x1CE, 0x1DA, 0x1B6, 0x170, 0x154, 0x000, 0x153, 0x173, 0x1B1, + 0x1D7, 0x1D5, 0x343, 0x0CD, 0x0DC, 0x078, 0x340, 0x1CC, 0x1BA, 0x1A8, 0x156, 0x148, + 0x000, 0x145, 0x15F, 0x1A1, 0x1BD, 0x1D9, 0x1ED, 0x07D, 0x1BC, 0x1DC, 0x1C4, 0x1B2, + 0x17C, 0x15A, 0x14A, 0x03A, 0x000, 0x039, 0x147, 0x16B, 0x17B, 0x1B5, 0x1C9, 0x1DF, + 0x1C6, 0x1B8, 0x1A2, 0x168, 0x160, 0x14C, 0x02E, 0x024, 0x000, 0x027, 0x03D, 0x151, + 0x15D, 0x16F, 0x1A7, 0x1BF, 0x1A4, 0x174, 0x162, 0x14E, 0x140, 0x02C, 0x02A, 0x022, + 0x000, 0x021, 0x029, 0x03F, 0x143, 0x159, 0x167, 0x179, 0x000, 0x000, 0x000, 0x000, + 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, + 0x1A5, 0x178, 0x166, 0x158, 0x142, 0x03E, 0x028, 0x020, 0x000, 0x023, 0x02B, 0x02D, + 0x141, 0x14F, 0x163, 0x175, 0x1C7, 0x1BE, 0x1A6, 0x16E, 0x15C, 0x150, 0x03C, 0x026, + 0x000, 0x025, 0x02F, 0x14D, 0x161, 0x169, 0x1A3, 0x1B9, 0x1BD, 0x1DE, 0x1C8, 0x1B4, + 0x17A, 0x16A, 0x146, 0x038, 0x000, 0x03B, 0x14B, 0x15B, 0x17D, 0x1B3, 0x1C5, 0x1DD, + 0x0DD, 0x07C, 0x1EC, 0x1D8, 0x1BC, 0x1A0, 0x15E, 0x144, 0x000, 0x149, 0x157, 0x1A9, + 0x1BB, 0x1CD, 0x341, 0x079, 0x0E9, 0x0CC, 0x342, 0x1D4, 0x1D6, 0x1B0, 0x172, 0x152, + 0x000, 0x155, 0x171, 0x1B7, 0x1DB, 0x1CF, 0x1BF, 0x0CB, 0x019, 0x06C, 0x0EA, 0x1DC, + 0x1EE, 0x1D0, 0x1AC, 0x16C, 0x000, 0x165, 0x1AB, 0x1CB, 0x1A3, 0x1DF, 0x0ED, 0x06B, + 0x01F, 0x008, 0x072, 0x0D2, 0x0CE, 0x1EA, 0x1C2, 0x17E, 0x000, 0x177, 0x1C1, 0x1E9, + 0x07F, 0x0C9, 0x071, 0x003, +}; + +static const uint8_t huff_spec_b52_bits[] = { + 3, 4, 4, 4, 5, 5, 6, 6, 5, 5, 5, 6, 6, 6, 7, 7, + 0, 7, 7, 6, 6, 6, 5, 5, 5, 6, 6, 5, 5, 4, 4, 4, +}; + +static const uint16_t huff_spec_b52_codes[] = { + 0x06, 0x0E, 0x06, 0x00, 0x0A, 0x04, 0x2C, 0x12, 0x14, 0x10, 0x06, 0x2E, 0x24, 0x10, 0x4E, 0x4C, + 0x00, 0x4D, 0x4F, 0x11, 0x25, 0x2F, 0x07, 0x11, 0x15, 0x13, 0x2D, 0x05, 0x0B, 0x01, 0x07, 0x0F, +}; + +static const uint8_t huff_spec_b53_bits[] = { + 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, + 0, 8, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 4, 3, +}; + +static const uint16_t huff_spec_b53_codes[] = { + 0x02, 0x00, 0x06, 0x1C, 0x18, 0x3E, 0x16, 0x10, 0x3C, 0x36, 0x14, 0x6A, 0x26, 0x24, 0xD2, 0xD0, + 0x00, 0xD1, 0xD3, 0x25, 0x27, 0x6B, 0x15, 0x37, 0x3D, 0x11, 0x17, 0x3F, 0x19, 0x1D, 0x07, 0x01, +}; + +static const uint8_t huff_spec_b54_bits[] = { + 2, 3, 4, 4, 5, 6, 6, 7, 6, 6, 7, 8, 8, 8, 9, 9, + 0, 9, 9, 8, 8, 8, 7, 6, 6, 7, 6, 6, 5, 4, 4, 3, +}; + +static const uint16_t huff_spec_b54_codes[] = { + 0x003, 0x002, 0x008, 0x000, 0x014, 0x02E, 0x00E, 0x05A, 0x00A, 0x008, 0x01A, 0x0B2, + 0x032, 0x030, 0x162, 0x160, 0x000, 0x161, 0x163, 0x031, 0x033, 0x0B3, 0x01B, 0x009, + 0x00B, 0x05B, 0x00F, 0x02F, 0x015, 0x001, 0x009, 0x003, +}; + +static const uint8_t huff_spec_b62_bits[] = { + 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 0, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, +}; + +static const uint16_t huff_spec_b62_codes[] = { + 0x0D, 0x06, 0x1C, 0x14, 0x0A, 0x04, 0x3E, 0x2E, 0x22, 0x0E, 0x06, 0x00, 0x5A, 0x4E, 0x40, 0x20, + 0x30, 0x32, 0x24, 0x12, 0x0C, 0x02, 0x78, 0x58, 0x42, 0x22, 0x0A, 0x08, 0xF6, 0xF4, 0x9A, 0x98, + 0x00, 0x99, 0x9B, 0xF5, 0xF7, 0x09, 0x0B, 0x23, 0x43, 0x59, 0x79, 0x03, 0x0D, 0x13, 0x25, 0x33, + 0x31, 0x21, 0x41, 0x4F, 0x5B, 0x01, 0x07, 0x0F, 0x23, 0x2F, 0x3F, 0x05, 0x0B, 0x15, 0x1D, 0x07, +}; + +static const uint8_t huff_spec_b63_bits[] = { + 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, + 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 0, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, + 6, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, +}; + +static const uint16_t huff_spec_b63_codes[] = { + 0x006, 0x00E, 0x004, 0x014, 0x010, 0x006, 0x000, 0x026, 0x01C, 0x018, 0x004, 0x05C, + 0x04A, 0x03C, 0x016, 0x0BC, 0x006, 0x008, 0x058, 0x03E, 0x036, 0x014, 0x0B6, 0x0B4, + 0x090, 0x068, 0x17E, 0x17C, 0x126, 0x124, 0x0D6, 0x0D4, 0x000, 0x0D5, 0x0D7, 0x125, + 0x127, 0x17D, 0x17F, 0x069, 0x091, 0x0B5, 0x0B7, 0x015, 0x037, 0x03F, 0x059, 0x009, + 0x007, 0x0BD, 0x017, 0x03D, 0x04B, 0x05D, 0x005, 0x019, 0x01D, 0x027, 0x001, 0x007, + 0x011, 0x015, 0x005, 0x00F, +}; + +static const uint8_t huff_spec_b64_bits[] = { + 3, 3, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, + 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, 8, 7, 7, + 7, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 4, 3, +}; + +static const uint16_t huff_spec_b64_codes[] = { + 0x007, 0x000, 0x008, 0x01A, 0x014, 0x00C, 0x032, 0x02E, 0x01E, 0x014, 0x062, 0x05A, + 0x03A, 0x026, 0x020, 0x0B2, 0x038, 0x02C, 0x022, 0x0C0, 0x05E, 0x04A, 0x186, 0x184, + 0x160, 0x0BA, 0x092, 0x090, 0x2C6, 0x2C4, 0x172, 0x170, 0x000, 0x171, 0x173, 0x2C5, + 0x2C7, 0x091, 0x093, 0x0BB, 0x161, 0x185, 0x187, 0x04B, 0x05F, 0x0C1, 0x023, 0x02D, + 0x039, 0x0B3, 0x021, 0x027, 0x03B, 0x05B, 0x063, 0x015, 0x01F, 0x02F, 0x033, 0x00D, + 0x015, 0x01B, 0x009, 0x001, +}; + +static const uint8_t huff_spec_b72_bits[] = { + 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, +}; + +static const uint16_t huff_spec_b72_codes[] = { + 0x01E, 0x016, 0x00C, 0x000, 0x038, 0x032, 0x028, 0x022, 0x01C, 0x012, 0x00E, 0x006, + 0x076, 0x06C, 0x060, 0x04E, 0x03E, 0x02A, 0x022, 0x01A, 0x012, 0x00A, 0x0FC, 0x0DC, + 0x0C6, 0x0A8, 0x094, 0x086, 0x058, 0x042, 0x040, 0x02A, 0x068, 0x07C, 0x06A, 0x056, + 0x048, 0x040, 0x02E, 0x028, 0x016, 0x010, 0x008, 0x0EA, 0x0DE, 0x0AA, 0x09A, 0x096, + 0x07A, 0x078, 0x05A, 0x032, 0x030, 0x028, 0x1FE, 0x1FC, 0x1D2, 0x1D0, 0x18A, 0x188, + 0x132, 0x130, 0x10A, 0x108, 0x000, 0x109, 0x10B, 0x131, 0x133, 0x189, 0x18B, 0x1D1, + 0x1D3, 0x1FD, 0x1FF, 0x029, 0x031, 0x033, 0x05B, 0x079, 0x07B, 0x097, 0x09B, 0x0AB, + 0x0DF, 0x0EB, 0x009, 0x011, 0x017, 0x029, 0x02F, 0x041, 0x049, 0x057, 0x06B, 0x07D, + 0x069, 0x02B, 0x041, 0x043, 0x059, 0x087, 0x095, 0x0A9, 0x0C7, 0x0DD, 0x0FD, 0x00B, + 0x013, 0x01B, 0x023, 0x02B, 0x03F, 0x04F, 0x061, 0x06D, 0x077, 0x007, 0x00F, 0x013, + 0x01D, 0x023, 0x029, 0x033, 0x039, 0x001, 0x00D, 0x017, +}; + +static const uint8_t huff_spec_b73_bits[] = { + 3, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, + 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, + 8, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, +}; + +static const uint16_t huff_spec_b73_codes[] = { + 0x000, 0x006, 0x018, 0x010, 0x004, 0x03A, 0x034, 0x02A, 0x026, 0x014, 0x010, 0x07E, + 0x072, 0x06E, 0x05C, 0x052, 0x04A, 0x02C, 0x024, 0x018, 0x0F4, 0x0E0, 0x0DA, 0x0B6, + 0x0B2, 0x0A0, 0x05E, 0x04E, 0x038, 0x034, 0x1E6, 0x1B2, 0x0FA, 0x01E, 0x0F8, 0x0F0, + 0x0BE, 0x0B4, 0x0A2, 0x090, 0x04C, 0x03A, 0x1EE, 0x1E4, 0x1C6, 0x1B0, 0x178, 0x162, + 0x126, 0x124, 0x0B8, 0x06C, 0x3DA, 0x3D8, 0x38A, 0x388, 0x2F6, 0x2F4, 0x2C2, 0x2C0, + 0x176, 0x174, 0x0DC, 0x0DE, 0x000, 0x0DF, 0x0DD, 0x175, 0x177, 0x2C1, 0x2C3, 0x2F5, + 0x2F7, 0x389, 0x38B, 0x3D9, 0x3DB, 0x06D, 0x0B9, 0x125, 0x127, 0x163, 0x179, 0x1B1, + 0x1C7, 0x1E5, 0x1EF, 0x03B, 0x04D, 0x091, 0x0A3, 0x0B5, 0x0BF, 0x0F1, 0x0F9, 0x01F, + 0x0FB, 0x1B3, 0x1E7, 0x035, 0x039, 0x04F, 0x05F, 0x0A1, 0x0B3, 0x0B7, 0x0DB, 0x0E1, + 0x0F5, 0x019, 0x025, 0x02D, 0x04B, 0x053, 0x05D, 0x06F, 0x073, 0x07F, 0x011, 0x015, + 0x027, 0x02B, 0x035, 0x03B, 0x005, 0x011, 0x019, 0x007, +}; + +static const uint8_t huff_spec_b74_bits[] = { + 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, + 8, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, +}; + +static const uint16_t huff_spec_b74_codes[] = { + 0x001, 0x008, 0x01E, 0x018, 0x00C, 0x002, 0x03A, 0x034, 0x02C, 0x01E, 0x016, 0x012, + 0x072, 0x06E, 0x05E, 0x056, 0x050, 0x038, 0x022, 0x004, 0x0E2, 0x0DA, 0x0BA, 0x0A8, + 0x076, 0x054, 0x050, 0x002, 0x000, 0x1C0, 0x1B0, 0x156, 0x0A4, 0x0A6, 0x074, 0x052, + 0x004, 0x1C2, 0x1B2, 0x170, 0x154, 0x0AE, 0x0AC, 0x086, 0x2E6, 0x2E4, 0x10A, 0x108, + 0x106, 0x104, 0x102, 0x100, 0x03E, 0x03A, 0x03C, 0x038, 0x036, 0x034, 0x032, 0x030, + 0x01E, 0x01A, 0x01C, 0x018, 0x000, 0x019, 0x01D, 0x01B, 0x01F, 0x031, 0x033, 0x035, + 0x037, 0x039, 0x03D, 0x03B, 0x03F, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x2E5, + 0x2E7, 0x087, 0x0AD, 0x0AF, 0x155, 0x171, 0x1B3, 0x1C3, 0x005, 0x053, 0x075, 0x0A7, + 0x0A5, 0x157, 0x1B1, 0x1C1, 0x001, 0x003, 0x051, 0x055, 0x077, 0x0A9, 0x0BB, 0x0DB, + 0x0E3, 0x005, 0x023, 0x039, 0x051, 0x057, 0x05F, 0x06F, 0x073, 0x013, 0x017, 0x01F, + 0x02D, 0x035, 0x03B, 0x003, 0x00D, 0x019, 0x01F, 0x009, +}; + +static const HuffmanCodebook at9_huffman_coeffs[][8][4] = { + { + { { 0 } }, + { { 0 } }, + { + { huff_spec_a21_bits, huff_spec_a21_codes, 16, 2, 1, 2, 3, }, + { huff_spec_a22_bits, huff_spec_a22_codes, 256, 4, 2, 2, 8, }, + { huff_spec_a23_bits, huff_spec_a23_codes, 256, 4, 2, 2, 9, }, + { huff_spec_a24_bits, huff_spec_a24_codes, 256, 4, 2, 2, 10, }, + }, + { + { huff_spec_a31_bits, huff_spec_a31_codes, 64, 2, 1, 3, 7, }, + { huff_spec_a32_bits, huff_spec_a32_codes, 64, 2, 1, 3, 7, }, + { huff_spec_a33_bits, huff_spec_a33_codes, 64, 2, 1, 3, 8, }, + { huff_spec_a34_bits, huff_spec_a34_codes, 64, 2, 1, 3, 10, }, + }, + { + { huff_spec_a41_bits, huff_spec_a41_codes, 256, 2, 1, 4, 9, }, + { huff_spec_a42_bits, huff_spec_a42_codes, 256, 2, 1, 4, 10, }, + { huff_spec_a43_bits, huff_spec_a43_codes, 256, 2, 1, 4, 10, }, + { huff_spec_a44_bits, huff_spec_a44_codes, 256, 2, 1, 4, 10, }, + }, + { + { huff_spec_a51_bits, huff_spec_a51_codes, 32, 1, 0, 5, 6, }, + { huff_spec_a52_bits, huff_spec_a52_codes, 32, 1, 0, 5, 6, }, + { huff_spec_a53_bits, huff_spec_a53_codes, 32, 1, 0, 5, 7, }, + { huff_spec_a54_bits, huff_spec_a54_codes, 32, 1, 0, 5, 8, }, + }, + { + { huff_spec_a61_bits, huff_spec_a61_codes, 64, 1, 0, 6, 7, }, + { huff_spec_a62_bits, huff_spec_a62_codes, 64, 1, 0, 6, 7, }, + { huff_spec_a63_bits, huff_spec_a63_codes, 64, 1, 0, 6, 8, }, + { huff_spec_a64_bits, huff_spec_a64_codes, 64, 1, 0, 6, 9, }, + }, + { + { huff_spec_a71_bits, huff_spec_a71_codes, 128, 1, 0, 7, 8, }, + { huff_spec_a72_bits, huff_spec_a72_codes, 128, 1, 0, 7, 8, }, + { huff_spec_a73_bits, huff_spec_a73_codes, 128, 1, 0, 7, 9, }, + { huff_spec_a74_bits, huff_spec_a74_codes, 128, 1, 0, 7, 10, }, + }, + }, + { + { { 0 } }, + { { 0 } }, + { + { 0 }, + { huff_spec_b22_bits, huff_spec_b22_codes, 256, 4, 2, 2, 10, }, + { huff_spec_b23_bits, huff_spec_b23_codes, 256, 4, 2, 2, 10, }, + { huff_spec_b24_bits, huff_spec_b24_codes, 256, 4, 2, 2, 10, }, + }, + { + { 0 }, + { huff_spec_b32_bits, huff_spec_b32_codes, 64, 2, 1, 3, 9, }, + { huff_spec_b33_bits, huff_spec_b33_codes, 64, 2, 1, 3, 10, }, + { huff_spec_b34_bits, huff_spec_b34_codes, 64, 2, 1, 3, 10, }, + }, + { + { 0 }, + { huff_spec_b42_bits, huff_spec_b42_codes, 256, 2, 1, 4, 10, }, + { huff_spec_b43_bits, huff_spec_b43_codes, 256, 2, 1, 4, 10, }, + { huff_spec_b44_bits, huff_spec_b44_codes, 256, 2, 1, 4, 10, }, + }, + { + { 0 }, + { huff_spec_b52_bits, huff_spec_b52_codes, 32, 1, 0, 5, 7, }, + { huff_spec_b53_bits, huff_spec_b53_codes, 32, 1, 0, 5, 8, }, + { huff_spec_b54_bits, huff_spec_b54_codes, 32, 1, 0, 5, 9, }, + }, + { + { 0 }, + { huff_spec_b62_bits, huff_spec_b62_codes, 64, 1, 0, 6, 8, }, + { huff_spec_b63_bits, huff_spec_b63_codes, 64, 1, 0, 6, 9, }, + { huff_spec_b64_bits, huff_spec_b64_codes, 64, 1, 0, 6, 10, }, + }, + { + { 0 }, + { huff_spec_b72_bits, huff_spec_b72_codes, 128, 1, 0, 7, 9, }, + { huff_spec_b73_bits, huff_spec_b73_codes, 128, 1, 0, 7, 10, }, + { huff_spec_b74_bits, huff_spec_b74_codes, 128, 1, 0, 7, 10, }, + }, + }, +}; + +#endif /* AVCODEC_ATRAC9TAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audio_frame_queue.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audio_frame_queue.h new file mode 100644 index 00000000..d8076eae --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audio_frame_queue.h @@ -0,0 +1,83 @@ +/* + * Audio Frame Queue + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AUDIO_FRAME_QUEUE_H +#define AVCODEC_AUDIO_FRAME_QUEUE_H + +#include "avcodec.h" + +typedef struct AudioFrame { + int64_t pts; + int duration; +} AudioFrame; + +typedef struct AudioFrameQueue { + AVCodecContext *avctx; + int remaining_delay; + int remaining_samples; + AudioFrame *frames; + unsigned frame_count; + unsigned frame_alloc; +} AudioFrameQueue; + +/** + * Initialize AudioFrameQueue. + * + * @param avctx context to use for time_base and av_log + * @param afq queue context + */ +void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq); + +/** + * Close AudioFrameQueue. + * + * Frees memory if needed. + * + * @param afq queue context + */ +void ff_af_queue_close(AudioFrameQueue *afq); + +/** + * Add a frame to the queue. + * + * @param afq queue context + * @param f frame to add to the queue + */ +int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f); + +/** + * Remove frame(s) from the queue. + * + * Retrieves the pts of the next available frame, or a generated pts based on + * the last frame duration if there are no frames left in the queue. The number + * of requested samples should be the full number of samples represented by the + * packet that will be output by the encoder. If fewer samples are available + * in the queue, a smaller value will be used for the output duration. + * + * @param afq queue context + * @param nb_samples number of samples to remove from the queue + * @param[out] pts output packet pts + * @param[out] duration output packet duration + */ +void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts, + int64_t *duration); + +#endif /* AVCODEC_AUDIO_FRAME_QUEUE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audiodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audiodsp.h new file mode 100644 index 00000000..aa6fa789 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/audiodsp.h @@ -0,0 +1,60 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AUDIODSP_H +#define AVCODEC_AUDIODSP_H + +#include + +typedef struct AudioDSPContext { + /** + * Calculate scalar product of two vectors. + * @param len length of vectors, should be multiple of 16 + */ + int32_t (*scalarproduct_int16)(const int16_t *v1, + const int16_t *v2 /* align 16 */, int len); + + /** + * Clip each element in an array of int32_t to a given minimum and + * maximum value. + * @param dst destination array + * constraints: 16-byte aligned + * @param src source array + * constraints: 16-byte aligned + * @param min minimum value + * constraints: must be in the range [-(1 << 24), 1 << 24] + * @param max maximum value + * constraints: must be in the range [-(1 << 24), 1 << 24] + * @param len number of elements in the array + * constraints: multiple of 32 greater than zero + */ + void (*vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min, + int32_t max, unsigned int len); + /* assume len is a multiple of 16, and arrays are 16-byte aligned */ + void (*vector_clipf)(float *dst /* align 16 */, + const float *src /* align 16 */, + int len /* align 16 */, + float min, float max); +} AudioDSPContext; + +void ff_audiodsp_init(AudioDSPContext *c); +void ff_audiodsp_init_arm(AudioDSPContext *c); +void ff_audiodsp_init_ppc(AudioDSPContext *c); +void ff_audiodsp_init_x86(AudioDSPContext *c); + +#endif /* AVCODEC_AUDIODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1.h new file mode 100644 index 00000000..6c0e3248 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1.h @@ -0,0 +1,163 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * AV1 common definitions + */ + +#ifndef AVCODEC_AV1_H +#define AVCODEC_AV1_H + +// OBU types (section 6.2.2). +typedef enum { + // 0 reserved. + AV1_OBU_SEQUENCE_HEADER = 1, + AV1_OBU_TEMPORAL_DELIMITER = 2, + AV1_OBU_FRAME_HEADER = 3, + AV1_OBU_TILE_GROUP = 4, + AV1_OBU_METADATA = 5, + AV1_OBU_FRAME = 6, + AV1_OBU_REDUNDANT_FRAME_HEADER = 7, + AV1_OBU_TILE_LIST = 8, + // 9-14 reserved. + AV1_OBU_PADDING = 15, +} AV1_OBU_Type; + +// Metadata types (section 6.7.1). +enum { + AV1_METADATA_TYPE_HDR_CLL = 1, + AV1_METADATA_TYPE_HDR_MDCV = 2, + AV1_METADATA_TYPE_SCALABILITY = 3, + AV1_METADATA_TYPE_ITUT_T35 = 4, + AV1_METADATA_TYPE_TIMECODE = 5, +}; + +// Frame types (section 6.8.2). +enum { + AV1_FRAME_KEY = 0, + AV1_FRAME_INTER = 1, + AV1_FRAME_INTRA_ONLY = 2, + AV1_FRAME_SWITCH = 3, +}; + +// Reference frames (section 6.10.24). +enum { + AV1_REF_FRAME_INTRA = 0, + AV1_REF_FRAME_LAST = 1, + AV1_REF_FRAME_LAST2 = 2, + AV1_REF_FRAME_LAST3 = 3, + AV1_REF_FRAME_GOLDEN = 4, + AV1_REF_FRAME_BWDREF = 5, + AV1_REF_FRAME_ALTREF2 = 6, + AV1_REF_FRAME_ALTREF = 7, +}; + +// Constants (section 3). +enum { + AV1_MAX_OPERATING_POINTS = 32, + + AV1_MAX_SB_SIZE = 128, + AV1_MI_SIZE = 4, + + AV1_MAX_TILE_WIDTH = 4096, + AV1_MAX_TILE_AREA = 4096 * 2304, + AV1_MAX_TILE_ROWS = 64, + AV1_MAX_TILE_COLS = 64, + + AV1_NUM_REF_FRAMES = 8, + AV1_REFS_PER_FRAME = 7, + AV1_TOTAL_REFS_PER_FRAME = 8, + AV1_PRIMARY_REF_NONE = 7, + + AV1_MAX_SEGMENTS = 8, + AV1_SEG_LVL_MAX = 8, + + AV1_SEG_LVL_ALT_Q = 0, + AV1_SEG_LVL_ALT_LF_Y_V = 1, + AV1_SEG_LVL_REF_FRAME = 5, + AV1_SEG_LVL_SKIP = 6, + AV1_SEG_LVL_GLOBAL_MV = 7, + + AV1_SELECT_SCREEN_CONTENT_TOOLS = 2, + AV1_SELECT_INTEGER_MV = 2, + + AV1_SUPERRES_NUM = 8, + AV1_SUPERRES_DENOM_MIN = 9, + + AV1_INTERPOLATION_FILTER_SWITCHABLE = 4, + + AV1_GM_ABS_ALPHA_BITS = 12, + AV1_GM_ALPHA_PREC_BITS = 15, + AV1_GM_ABS_TRANS_ONLY_BITS = 9, + AV1_GM_TRANS_ONLY_PREC_BITS = 3, + AV1_GM_ABS_TRANS_BITS = 12, + AV1_GM_TRANS_PREC_BITS = 6, + AV1_WARPEDMODEL_PREC_BITS = 16, + + AV1_WARP_MODEL_IDENTITY = 0, + AV1_WARP_MODEL_TRANSLATION = 1, + AV1_WARP_MODEL_ROTZOOM = 2, + AV1_WARP_MODEL_AFFINE = 3, +}; + + +// The main colour configuration information uses the same ISO/IEC 23001-8 +// (H.273) enums as FFmpeg does, so separate definitions are not required. + +// Chroma sample position. +enum { + AV1_CSP_UNKNOWN = 0, + AV1_CSP_VERTICAL = 1, // -> AVCHROMA_LOC_LEFT. + AV1_CSP_COLOCATED = 2, // -> AVCHROMA_LOC_TOPLEFT. +}; + +// Scalability modes (section 6.7.5) +enum { + AV1_SCALABILITY_L1T2 = 0, + AV1_SCALABILITY_L1T3 = 1, + AV1_SCALABILITY_L2T1 = 2, + AV1_SCALABILITY_L2T2 = 3, + AV1_SCALABILITY_L2T3 = 4, + AV1_SCALABILITY_S2T1 = 5, + AV1_SCALABILITY_S2T2 = 6, + AV1_SCALABILITY_S2T3 = 7, + AV1_SCALABILITY_L2T1h = 8, + AV1_SCALABILITY_L2T2h = 9, + AV1_SCALABILITY_L2T3h = 10, + AV1_SCALABILITY_S2T1h = 11, + AV1_SCALABILITY_S2T2h = 12, + AV1_SCALABILITY_S2T3h = 13, + AV1_SCALABILITY_SS = 14, + AV1_SCALABILITY_L3T1 = 15, + AV1_SCALABILITY_L3T2 = 16, + AV1_SCALABILITY_L3T3 = 17, + AV1_SCALABILITY_S3T1 = 18, + AV1_SCALABILITY_S3T2 = 19, + AV1_SCALABILITY_S3T3 = 20, + AV1_SCALABILITY_L3T2_KEY = 21, + AV1_SCALABILITY_L3T3_KEY = 22, + AV1_SCALABILITY_L4T5_KEY = 23, + AV1_SCALABILITY_L4T7_KEY = 24, + AV1_SCALABILITY_L3T2_KEY_SHIFT = 25, + AV1_SCALABILITY_L3T3_KEY_SHIFT = 26, + AV1_SCALABILITY_L4T5_KEY_SHIFT = 27, + AV1_SCALABILITY_L4T7_KEY_SHIFT = 28, +}; + +#endif /* AVCODEC_AV1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1_parse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1_parse.h new file mode 100644 index 00000000..01bcd646 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/av1_parse.h @@ -0,0 +1,177 @@ +/* + * AV1 common parsing code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AV1_PARSE_H +#define AVCODEC_AV1_PARSE_H + +#include + +#include "av1.h" +#include "avcodec.h" +#include "get_bits.h" + +typedef struct AV1OBU { + /** Size of payload */ + int size; + const uint8_t *data; + + /** + * Size, in bits, of just the data, excluding the trailing_one_bit and + * any trailing padding. + */ + int size_bits; + + /** Size of entire OBU, including header */ + int raw_size; + const uint8_t *raw_data; + + /** GetBitContext initialized to the start of the payload */ + GetBitContext gb; + + int type; + + int temporal_id; + int spatial_id; +} AV1OBU; + +/** An input packet split into OBUs */ +typedef struct AV1Packet { + AV1OBU *obus; + int nb_obus; + int obus_allocated; + unsigned obus_allocated_size; +} AV1Packet; + +/** + * Extract an OBU from a raw bitstream. + * + * @note This function does not copy or store any bitstream data. All + * the pointers in the AV1OBU structure will be valid as long + * as the input buffer also is. + */ +int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, + void *logctx); + +/** + * Split an input packet into OBUs. + * + * @note This function does not copy or store any bitstream data. All + * the pointers in the AV1Packet structure will be valid as + * long as the input buffer also is. + */ +int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, + void *logctx); + +/** + * Free all the allocated memory in the packet. + */ +void ff_av1_packet_uninit(AV1Packet *pkt); + +static inline int64_t leb128(GetBitContext *gb) { + int64_t ret = 0; + int i; + + for (i = 0; i < 8; i++) { + int byte = get_bits(gb, 8); + ret |= (int64_t)(byte & 0x7f) << (i * 7); + if (!(byte & 0x80)) + break; + } + return ret; +} + +static inline int parse_obu_header(const uint8_t *buf, int buf_size, + int64_t *obu_size, int *start_pos, int *type, + int *temporal_id, int *spatial_id) +{ + GetBitContext gb; + int ret, extension_flag, has_size_flag; + int64_t size; + + ret = init_get_bits8(&gb, buf, FFMIN(buf_size, 2 + 8)); // OBU header fields + max leb128 length + if (ret < 0) + return ret; + + if (get_bits1(&gb) != 0) // obu_forbidden_bit + return AVERROR_INVALIDDATA; + + *type = get_bits(&gb, 4); + extension_flag = get_bits1(&gb); + has_size_flag = get_bits1(&gb); + skip_bits1(&gb); // obu_reserved_1bit + + if (extension_flag) { + *temporal_id = get_bits(&gb, 3); + *spatial_id = get_bits(&gb, 2); + skip_bits(&gb, 3); // extension_header_reserved_3bits + } else { + *temporal_id = *spatial_id = 0; + } + + *obu_size = has_size_flag ? leb128(&gb) + : buf_size - 1 - extension_flag; + + if (get_bits_left(&gb) < 0) + return AVERROR_INVALIDDATA; + + *start_pos = get_bits_count(&gb) / 8; + + size = *obu_size + *start_pos; + + if (size > buf_size) + return AVERROR_INVALIDDATA; + + return size; +} + +static inline int get_obu_bit_length(const uint8_t *buf, int size, int type) +{ + int v; + + /* There are no trailing bits on these */ + if (type == AV1_OBU_TILE_GROUP || + type == AV1_OBU_TILE_LIST || + type == AV1_OBU_FRAME) { + if (size > INT_MAX / 8) + return AVERROR(ERANGE); + else + return size * 8; + } + + while (size > 0 && buf[size - 1] == 0) + size--; + + if (!size) + return 0; + + v = buf[size - 1]; + + if (size > INT_MAX / 8) + return AVERROR(ERANGE); + size *= 8; + + /* Remove the trailing_one_bit and following trailing zeros */ + if (v) + size -= ff_ctz(v) + 1; + + return size; +} + +#endif /* AVCODEC_AV1_PARSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avcodec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avcodec.h new file mode 100644 index 00000000..c91b2fd1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avcodec.h @@ -0,0 +1,4142 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AVCODEC_H +#define AVCODEC_AVCODEC_H + +/** + * @file + * @ingroup libavc + * Libavcodec external API header + */ + +#include +#include "libavutil/samplefmt.h" +#include "libavutil/attributes.h" +#include "libavutil/avutil.h" +#include "libavutil/buffer.h" +#include "libavutil/cpu.h" +#include "libavutil/channel_layout.h" +#include "libavutil/dict.h" +#include "libavutil/frame.h" +#include "libavutil/hwcontext.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" + +#include "bsf.h" +#include "codec.h" +#include "codec_desc.h" +#include "codec_par.h" +#include "codec_id.h" +#include "packet.h" +#include "version.h" + +/** + * @defgroup libavc libavcodec + * Encoding/Decoding Library + * + * @{ + * + * @defgroup lavc_decoding Decoding + * @{ + * @} + * + * @defgroup lavc_encoding Encoding + * @{ + * @} + * + * @defgroup lavc_codec Codecs + * @{ + * @defgroup lavc_codec_native Native Codecs + * @{ + * @} + * @defgroup lavc_codec_wrappers External library wrappers + * @{ + * @} + * @defgroup lavc_codec_hwaccel Hardware Accelerators bridge + * @{ + * @} + * @} + * @defgroup lavc_internal Internal + * @{ + * @} + * @} + */ + +/** + * @ingroup libavc + * @defgroup lavc_encdec send/receive encoding and decoding API overview + * @{ + * + * The avcodec_send_packet()/avcodec_receive_frame()/avcodec_send_frame()/ + * avcodec_receive_packet() functions provide an encode/decode API, which + * decouples input and output. + * + * The API is very similar for encoding/decoding and audio/video, and works as + * follows: + * - Set up and open the AVCodecContext as usual. + * - Send valid input: + * - For decoding, call avcodec_send_packet() to give the decoder raw + * compressed data in an AVPacket. + * - For encoding, call avcodec_send_frame() to give the encoder an AVFrame + * containing uncompressed audio or video. + * + * In both cases, it is recommended that AVPackets and AVFrames are + * refcounted, or libavcodec might have to copy the input data. (libavformat + * always returns refcounted AVPackets, and av_frame_get_buffer() allocates + * refcounted AVFrames.) + * - Receive output in a loop. Periodically call one of the avcodec_receive_*() + * functions and process their output: + * - For decoding, call avcodec_receive_frame(). On success, it will return + * an AVFrame containing uncompressed audio or video data. + * - For encoding, call avcodec_receive_packet(). On success, it will return + * an AVPacket with a compressed frame. + * + * Repeat this call until it returns AVERROR(EAGAIN) or an error. The + * AVERROR(EAGAIN) return value means that new input data is required to + * return new output. In this case, continue with sending input. For each + * input frame/packet, the codec will typically return 1 output frame/packet, + * but it can also be 0 or more than 1. + * + * At the beginning of decoding or encoding, the codec might accept multiple + * input frames/packets without returning a frame, until its internal buffers + * are filled. This situation is handled transparently if you follow the steps + * outlined above. + * + * In theory, sending input can result in EAGAIN - this should happen only if + * not all output was received. You can use this to structure alternative decode + * or encode loops other than the one suggested above. For example, you could + * try sending new input on each iteration, and try to receive output if that + * returns EAGAIN. + * + * End of stream situations. These require "flushing" (aka draining) the codec, + * as the codec might buffer multiple frames or packets internally for + * performance or out of necessity (consider B-frames). + * This is handled as follows: + * - Instead of valid input, send NULL to the avcodec_send_packet() (decoding) + * or avcodec_send_frame() (encoding) functions. This will enter draining + * mode. + * - Call avcodec_receive_frame() (decoding) or avcodec_receive_packet() + * (encoding) in a loop until AVERROR_EOF is returned. The functions will + * not return AVERROR(EAGAIN), unless you forgot to enter draining mode. + * - Before decoding can be resumed again, the codec has to be reset with + * avcodec_flush_buffers(). + * + * Using the API as outlined above is highly recommended. But it is also + * possible to call functions outside of this rigid schema. For example, you can + * call avcodec_send_packet() repeatedly without calling + * avcodec_receive_frame(). In this case, avcodec_send_packet() will succeed + * until the codec's internal buffer has been filled up (which is typically of + * size 1 per output frame, after initial input), and then reject input with + * AVERROR(EAGAIN). Once it starts rejecting input, you have no choice but to + * read at least some output. + * + * Not all codecs will follow a rigid and predictable dataflow; the only + * guarantee is that an AVERROR(EAGAIN) return value on a send/receive call on + * one end implies that a receive/send call on the other end will succeed, or + * at least will not fail with AVERROR(EAGAIN). In general, no codec will + * permit unlimited buffering of input or output. + * + * This API replaces the following legacy functions: + * - avcodec_decode_video2() and avcodec_decode_audio4(): + * Use avcodec_send_packet() to feed input to the decoder, then use + * avcodec_receive_frame() to receive decoded frames after each packet. + * Unlike with the old video decoding API, multiple frames might result from + * a packet. For audio, splitting the input packet into frames by partially + * decoding packets becomes transparent to the API user. You never need to + * feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then + * no data was read from the packet). + * Additionally, sending a flush/draining packet is required only once. + * - avcodec_encode_video2()/avcodec_encode_audio2(): + * Use avcodec_send_frame() to feed input to the encoder, then use + * avcodec_receive_packet() to receive encoded packets. + * Providing user-allocated buffers for avcodec_receive_packet() is not + * possible. + * - The new API does not handle subtitles yet. + * + * Mixing new and old function calls on the same AVCodecContext is not allowed, + * and will result in undefined behavior. + * + * Some codecs might require using the new API; using the old API will return + * an error when calling it. All codecs support the new API. + * + * A codec is not allowed to return AVERROR(EAGAIN) for both sending and receiving. This + * would be an invalid state, which could put the codec user into an endless + * loop. The API has no concept of time either: it cannot happen that trying to + * do avcodec_send_packet() results in AVERROR(EAGAIN), but a repeated call 1 second + * later accepts the packet (with no other receive/flush API calls involved). + * The API is a strict state machine, and the passage of time is not supposed + * to influence it. Some timing-dependent behavior might still be deemed + * acceptable in certain cases. But it must never result in both send/receive + * returning EAGAIN at the same time at any point. It must also absolutely be + * avoided that the current state is "unstable" and can "flip-flop" between + * the send/receive APIs allowing progress. For example, it's not allowed that + * the codec randomly decides that it actually wants to consume a packet now + * instead of returning a frame, after it just returned AVERROR(EAGAIN) on an + * avcodec_send_packet() call. + * @} + */ + +/** + * @defgroup lavc_core Core functions/structures. + * @ingroup libavc + * + * Basic definitions, functions for querying libavcodec capabilities, + * allocating core structures, etc. + * @{ + */ + +/** + * @ingroup lavc_decoding + * Required number of additionally allocated bytes at the end of the input bitstream for decoding. + * This is mainly needed because some optimized bitstream readers read + * 32 or 64 bit at once and could read over the end.
+ * Note: If the first 23 bits of the additional bytes are not 0, then damaged + * MPEG bitstreams could cause overread and segfault. + */ +#define AV_INPUT_BUFFER_PADDING_SIZE 64 + +/** + * @ingroup lavc_encoding + * minimum encoding buffer size + * Used to avoid some checks during header writing. + */ +#define AV_INPUT_BUFFER_MIN_SIZE 16384 + +/** + * @ingroup lavc_decoding + */ +enum AVDiscard{ + /* We leave some space between them for extensions (drop some + * keyframes for intra-only or drop just some bidir frames). */ + AVDISCARD_NONE =-16, ///< discard nothing + AVDISCARD_DEFAULT = 0, ///< discard useless packets like 0 size packets in avi + AVDISCARD_NONREF = 8, ///< discard all non reference + AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames + AVDISCARD_NONINTRA= 24, ///< discard all non intra frames + AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes + AVDISCARD_ALL = 48, ///< discard all +}; + +enum AVAudioServiceType { + AV_AUDIO_SERVICE_TYPE_MAIN = 0, + AV_AUDIO_SERVICE_TYPE_EFFECTS = 1, + AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2, + AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3, + AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4, + AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5, + AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6, + AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7, + AV_AUDIO_SERVICE_TYPE_KARAOKE = 8, + AV_AUDIO_SERVICE_TYPE_NB , ///< Not part of ABI +}; + +/** + * @ingroup lavc_encoding + */ +typedef struct RcOverride{ + int start_frame; + int end_frame; + int qscale; // If this is 0 then quality_factor will be used instead. + float quality_factor; +} RcOverride; + +/* encoding support + These flags can be passed in AVCodecContext.flags before initialization. + Note: Not everything is supported yet. +*/ + +/** + * Allow decoders to produce frames with data planes that are not aligned + * to CPU requirements (e.g. due to cropping). + */ +#define AV_CODEC_FLAG_UNALIGNED (1 << 0) +/** + * Use fixed qscale. + */ +#define AV_CODEC_FLAG_QSCALE (1 << 1) +/** + * 4 MV per MB allowed / advanced prediction for H.263. + */ +#define AV_CODEC_FLAG_4MV (1 << 2) +/** + * Output even those frames that might be corrupted. + */ +#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3) +/** + * Use qpel MC. + */ +#define AV_CODEC_FLAG_QPEL (1 << 4) +/** + * Don't output frames whose parameters differ from first + * decoded frame in stream. + */ +#define AV_CODEC_FLAG_DROPCHANGED (1 << 5) +/** + * Use internal 2pass ratecontrol in first pass mode. + */ +#define AV_CODEC_FLAG_PASS1 (1 << 9) +/** + * Use internal 2pass ratecontrol in second pass mode. + */ +#define AV_CODEC_FLAG_PASS2 (1 << 10) +/** + * loop filter. + */ +#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11) +/** + * Only decode/encode grayscale. + */ +#define AV_CODEC_FLAG_GRAY (1 << 13) +/** + * error[?] variables will be set during encoding. + */ +#define AV_CODEC_FLAG_PSNR (1 << 15) +/** + * Input bitstream might be truncated at a random location + * instead of only at frame boundaries. + */ +#define AV_CODEC_FLAG_TRUNCATED (1 << 16) +/** + * Use interlaced DCT. + */ +#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18) +/** + * Force low delay. + */ +#define AV_CODEC_FLAG_LOW_DELAY (1 << 19) +/** + * Place global headers in extradata instead of every keyframe. + */ +#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22) +/** + * Use only bitexact stuff (except (I)DCT). + */ +#define AV_CODEC_FLAG_BITEXACT (1 << 23) +/* Fx : Flag for H.263+ extra options */ +/** + * H.263 advanced intra coding / MPEG-4 AC prediction + */ +#define AV_CODEC_FLAG_AC_PRED (1 << 24) +/** + * interlaced motion estimation + */ +#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29) +#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31) + +/** + * Allow non spec compliant speedup tricks. + */ +#define AV_CODEC_FLAG2_FAST (1 << 0) +/** + * Skip bitstream encoding. + */ +#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2) +/** + * Place global headers at every keyframe instead of in extradata. + */ +#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3) + +/** + * timecode is in drop frame format. DEPRECATED!!!! + */ +#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13) + +/** + * Input bitstream might be truncated at a packet boundaries + * instead of only at frame boundaries. + */ +#define AV_CODEC_FLAG2_CHUNKS (1 << 15) +/** + * Discard cropping information from SPS. + */ +#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16) + +/** + * Show all frames before the first keyframe + */ +#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22) +/** + * Export motion vectors through frame side data + */ +#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28) +/** + * Do not skip samples and export skip information as frame side data + */ +#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29) +/** + * Do not reset ASS ReadOrder field on flush (subtitles decoding) + */ +#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30) + +/* Unsupported options : + * Syntax Arithmetic coding (SAC) + * Reference Picture Selection + * Independent Segment Decoding */ +/* /Fx */ +/* codec capabilities */ + +/* Exported side data. + These flags can be passed in AVCodecContext.export_side_data before initialization. +*/ +/** + * Export motion vectors through frame side data + */ +#define AV_CODEC_EXPORT_DATA_MVS (1 << 0) +/** + * Export encoder Producer Reference Time through packet side data + */ +#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1) +/** + * Decoding only. + * Export the AVVideoEncParams structure through frame side data. + */ +#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2) + +/** + * Pan Scan area. + * This specifies the area which should be displayed. + * Note there may be multiple such areas for one frame. + */ +typedef struct AVPanScan { + /** + * id + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int id; + + /** + * width and height in 1/16 pel + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int width; + int height; + + /** + * position of the top left corner in 1/16 pel for up to 3 fields/frames + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int16_t position[3][2]; +} AVPanScan; + +/** + * This structure describes the bitrate properties of an encoded bitstream. It + * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD + * parameters for H.264/HEVC. + */ +typedef struct AVCPBProperties { + /** + * Maximum bitrate of the stream, in bits per second. + * Zero if unknown or unspecified. + */ +#if FF_API_UNSANITIZED_BITRATES + int max_bitrate; +#else + int64_t max_bitrate; +#endif + /** + * Minimum bitrate of the stream, in bits per second. + * Zero if unknown or unspecified. + */ +#if FF_API_UNSANITIZED_BITRATES + int min_bitrate; +#else + int64_t min_bitrate; +#endif + /** + * Average bitrate of the stream, in bits per second. + * Zero if unknown or unspecified. + */ +#if FF_API_UNSANITIZED_BITRATES + int avg_bitrate; +#else + int64_t avg_bitrate; +#endif + + /** + * The size of the buffer to which the ratecontrol is applied, in bits. + * Zero if unknown or unspecified. + */ + int buffer_size; + + /** + * The delay between the time the packet this structure is associated with + * is received and the time when it should be decoded, in periods of a 27MHz + * clock. + * + * UINT64_MAX when unknown or unspecified. + */ + uint64_t vbv_delay; +} AVCPBProperties; + +/** + * This structure supplies correlation between a packet timestamp and a wall clock + * production time. The definition follows the Producer Reference Time ('prft') + * as defined in ISO/IEC 14496-12 + */ +typedef struct AVProducerReferenceTime { + /** + * A UTC timestamp, in microseconds, since Unix epoch (e.g, av_gettime()). + */ + int64_t wallclock; + int flags; +} AVProducerReferenceTime; + +/** + * The decoder will keep a reference to the frame and may reuse it later. + */ +#define AV_GET_BUFFER_FLAG_REF (1 << 0) + +struct AVCodecInternal; + +/** + * main external API structure. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user + * applications. + * The name string for AVOptions options matches the associated command line + * parameter name and can be found in libavcodec/options_table.h + * The AVOption/command line parameter names differ in some cases from the C + * structure field names for historic reasons or brevity. + * sizeof(AVCodecContext) must not be used outside libav*. + */ +typedef struct AVCodecContext { + /** + * information on struct for av_log + * - set by avcodec_alloc_context3 + */ + const AVClass *av_class; + int log_level_offset; + + enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ + const struct AVCodec *codec; + enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */ + + /** + * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). + * This is used to work around some encoder bugs. + * A demuxer should set this to what is stored in the field used to identify the codec. + * If there are multiple such fields in a container then the demuxer should choose the one + * which maximizes the information about the used codec. + * If the codec tag field in a container is larger than 32 bits then the demuxer should + * remap the longer ID to 32 bits with a table or other structure. Alternatively a new + * extra_codec_tag + size could be added but for this a clear advantage must be demonstrated + * first. + * - encoding: Set by user, if not then the default based on codec_id will be used. + * - decoding: Set by user, will be converted to uppercase by libavcodec during init. + */ + unsigned int codec_tag; + + void *priv_data; + + /** + * Private context used for internal data. + * + * Unlike priv_data, this is not codec-specific. It is used in general + * libavcodec functions. + */ + struct AVCodecInternal *internal; + + /** + * Private data of the user, can be used to carry app specific stuff. + * - encoding: Set by user. + * - decoding: Set by user. + */ + void *opaque; + + /** + * the average bitrate + * - encoding: Set by user; unused for constant quantizer encoding. + * - decoding: Set by user, may be overwritten by libavcodec + * if this info is available in the stream + */ + int64_t bit_rate; + + /** + * number of bits the bitstream is allowed to diverge from the reference. + * the reference can be CBR (for CBR pass1) or VBR (for pass2) + * - encoding: Set by user; unused for constant quantizer encoding. + * - decoding: unused + */ + int bit_rate_tolerance; + + /** + * Global quality for codecs which cannot change it per frame. + * This should be proportional to MPEG-1/2/4 qscale. + * - encoding: Set by user. + * - decoding: unused + */ + int global_quality; + + /** + * - encoding: Set by user. + * - decoding: unused + */ + int compression_level; +#define FF_COMPRESSION_DEFAULT -1 + + /** + * AV_CODEC_FLAG_*. + * - encoding: Set by user. + * - decoding: Set by user. + */ + int flags; + + /** + * AV_CODEC_FLAG2_* + * - encoding: Set by user. + * - decoding: Set by user. + */ + int flags2; + + /** + * some codecs need / can use extradata like Huffman tables. + * MJPEG: Huffman tables + * rv10: additional flags + * MPEG-4: global headers (they can be in the bitstream or here) + * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger + * than extradata_size to avoid problems if it is read with the bitstream reader. + * The bytewise contents of extradata must not depend on the architecture or CPU endianness. + * Must be allocated with the av_malloc() family of functions. + * - encoding: Set/allocated/freed by libavcodec. + * - decoding: Set/allocated/freed by user. + */ + uint8_t *extradata; + int extradata_size; + + /** + * This is the fundamental unit of time (in seconds) in terms + * of which frame timestamps are represented. For fixed-fps content, + * timebase should be 1/framerate and timestamp increments should be + * identically 1. + * This often, but not always is the inverse of the frame rate or field rate + * for video. 1/time_base is not the average frame rate if the frame rate is not + * constant. + * + * Like containers, elementary streams also can store timestamps, 1/time_base + * is the unit in which these timestamps are specified. + * As example of such codec time base see ISO/IEC 14496-2:2001(E) + * vop_time_increment_resolution and fixed_vop_rate + * (fixed_vop_rate == 0 implies that it is different from the framerate) + * + * - encoding: MUST be set by user. + * - decoding: the use of this field for decoding is deprecated. + * Use framerate instead. + */ + AVRational time_base; + + /** + * For some codecs, the time base is closer to the field rate than the frame rate. + * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration + * if no telecine is used ... + * + * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2. + */ + int ticks_per_frame; + + /** + * Codec delay. + * + * Encoding: Number of frames delay there will be from the encoder input to + * the decoder output. (we assume the decoder matches the spec) + * Decoding: Number of frames delay in addition to what a standard decoder + * as specified in the spec would produce. + * + * Video: + * Number of frames the decoded output will be delayed relative to the + * encoded input. + * + * Audio: + * For encoding, this field is unused (see initial_padding). + * + * For decoding, this is the number of samples the decoder needs to + * output before the decoder's output is valid. When seeking, you should + * start decoding this many samples prior to your desired seek point. + * + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + int delay; + + + /* video only */ + /** + * picture width / height. + * + * @note Those fields may not match the values of the last + * AVFrame output by avcodec_decode_video2 due frame + * reordering. + * + * - encoding: MUST be set by user. + * - decoding: May be set by the user before opening the decoder if known e.g. + * from the container. Some decoders will require the dimensions + * to be set by the caller. During decoding, the decoder may + * overwrite those values as required while parsing the data. + */ + int width, height; + + /** + * Bitstream width / height, may be different from width/height e.g. when + * the decoded frame is cropped before being output or lowres is enabled. + * + * @note Those field may not match the value of the last + * AVFrame output by avcodec_receive_frame() due frame + * reordering. + * + * - encoding: unused + * - decoding: May be set by the user before opening the decoder if known + * e.g. from the container. During decoding, the decoder may + * overwrite those values as required while parsing the data. + */ + int coded_width, coded_height; + + /** + * the number of pictures in a group of pictures, or 0 for intra_only + * - encoding: Set by user. + * - decoding: unused + */ + int gop_size; + + /** + * Pixel format, see AV_PIX_FMT_xxx. + * May be set by the demuxer if known from headers. + * May be overridden by the decoder if it knows better. + * + * @note This field may not match the value of the last + * AVFrame output by avcodec_receive_frame() due frame + * reordering. + * + * - encoding: Set by user. + * - decoding: Set by user if known, overridden by libavcodec while + * parsing the data. + */ + enum AVPixelFormat pix_fmt; + + /** + * If non NULL, 'draw_horiz_band' is called by the libavcodec + * decoder to draw a horizontal band. It improves cache usage. Not + * all codecs can do that. You must check the codec capabilities + * beforehand. + * When multithreading is used, it may be called from multiple threads + * at the same time; threads might draw different parts of the same AVFrame, + * or multiple AVFrames, and there is no guarantee that slices will be drawn + * in order. + * The function is also used by hardware acceleration APIs. + * It is called at least once during frame decoding to pass + * the data needed for hardware render. + * In that mode instead of pixel data, AVFrame points to + * a structure specific to the acceleration API. The application + * reads the structure and can change some fields to indicate progress + * or mark state. + * - encoding: unused + * - decoding: Set by user. + * @param height the height of the slice + * @param y the y position of the slice + * @param type 1->top field, 2->bottom field, 3->frame + * @param offset offset into the AVFrame.data from which the slice should be read + */ + void (*draw_horiz_band)(struct AVCodecContext *s, + const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], + int y, int type, int height); + + /** + * callback to negotiate the pixelFormat + * @param fmt is the list of formats which are supported by the codec, + * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. + * The first is always the native one. + * @note The callback may be called again immediately if initialization for + * the selected (hardware-accelerated) pixel format failed. + * @warning Behavior is undefined if the callback returns a value not + * in the fmt list of formats. + * @return the chosen format + * - encoding: unused + * - decoding: Set by user, if not set the native format will be chosen. + */ + enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt); + + /** + * maximum number of B-frames between non-B-frames + * Note: The output will be delayed by max_b_frames+1 relative to the input. + * - encoding: Set by user. + * - decoding: unused + */ + int max_b_frames; + + /** + * qscale factor between IP and B-frames + * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset). + * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). + * - encoding: Set by user. + * - decoding: unused + */ + float b_quant_factor; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int b_frame_strategy; +#endif + + /** + * qscale offset between IP and B-frames + * - encoding: Set by user. + * - decoding: unused + */ + float b_quant_offset; + + /** + * Size of the frame reordering buffer in the decoder. + * For MPEG-2 it is 1 IPB or 0 low delay IP. + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + int has_b_frames; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int mpeg_quant; +#endif + + /** + * qscale factor between P- and I-frames + * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset). + * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). + * - encoding: Set by user. + * - decoding: unused + */ + float i_quant_factor; + + /** + * qscale offset between P and I-frames + * - encoding: Set by user. + * - decoding: unused + */ + float i_quant_offset; + + /** + * luminance masking (0-> disabled) + * - encoding: Set by user. + * - decoding: unused + */ + float lumi_masking; + + /** + * temporary complexity masking (0-> disabled) + * - encoding: Set by user. + * - decoding: unused + */ + float temporal_cplx_masking; + + /** + * spatial complexity masking (0-> disabled) + * - encoding: Set by user. + * - decoding: unused + */ + float spatial_cplx_masking; + + /** + * p block masking (0-> disabled) + * - encoding: Set by user. + * - decoding: unused + */ + float p_masking; + + /** + * darkness masking (0-> disabled) + * - encoding: Set by user. + * - decoding: unused + */ + float dark_masking; + + /** + * slice count + * - encoding: Set by libavcodec. + * - decoding: Set by user (or 0). + */ + int slice_count; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int prediction_method; +#define FF_PRED_LEFT 0 +#define FF_PRED_PLANE 1 +#define FF_PRED_MEDIAN 2 +#endif + + /** + * slice offsets in the frame in bytes + * - encoding: Set/allocated by libavcodec. + * - decoding: Set/allocated by user (or NULL). + */ + int *slice_offset; + + /** + * sample aspect ratio (0 if unknown) + * That is the width of a pixel divided by the height of the pixel. + * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + AVRational sample_aspect_ratio; + + /** + * motion estimation comparison function + * - encoding: Set by user. + * - decoding: unused + */ + int me_cmp; + /** + * subpixel motion estimation comparison function + * - encoding: Set by user. + * - decoding: unused + */ + int me_sub_cmp; + /** + * macroblock comparison function (not supported yet) + * - encoding: Set by user. + * - decoding: unused + */ + int mb_cmp; + /** + * interlaced DCT comparison function + * - encoding: Set by user. + * - decoding: unused + */ + int ildct_cmp; +#define FF_CMP_SAD 0 +#define FF_CMP_SSE 1 +#define FF_CMP_SATD 2 +#define FF_CMP_DCT 3 +#define FF_CMP_PSNR 4 +#define FF_CMP_BIT 5 +#define FF_CMP_RD 6 +#define FF_CMP_ZERO 7 +#define FF_CMP_VSAD 8 +#define FF_CMP_VSSE 9 +#define FF_CMP_NSSE 10 +#define FF_CMP_W53 11 +#define FF_CMP_W97 12 +#define FF_CMP_DCTMAX 13 +#define FF_CMP_DCT264 14 +#define FF_CMP_MEDIAN_SAD 15 +#define FF_CMP_CHROMA 256 + + /** + * ME diamond size & shape + * - encoding: Set by user. + * - decoding: unused + */ + int dia_size; + + /** + * amount of previous MV predictors (2a+1 x 2a+1 square) + * - encoding: Set by user. + * - decoding: unused + */ + int last_predictor_count; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int pre_me; +#endif + + /** + * motion estimation prepass comparison function + * - encoding: Set by user. + * - decoding: unused + */ + int me_pre_cmp; + + /** + * ME prepass diamond size & shape + * - encoding: Set by user. + * - decoding: unused + */ + int pre_dia_size; + + /** + * subpel ME quality + * - encoding: Set by user. + * - decoding: unused + */ + int me_subpel_quality; + + /** + * maximum motion estimation search range in subpel units + * If 0 then no limit. + * + * - encoding: Set by user. + * - decoding: unused + */ + int me_range; + + /** + * slice flags + * - encoding: unused + * - decoding: Set by user. + */ + int slice_flags; +#define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of display +#define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics) +#define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1) + + /** + * macroblock decision mode + * - encoding: Set by user. + * - decoding: unused + */ + int mb_decision; +#define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp +#define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits +#define FF_MB_DECISION_RD 2 ///< rate distortion + + /** + * custom intra quantization matrix + * Must be allocated with the av_malloc() family of functions, and will be freed in + * avcodec_free_context(). + * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. + * - decoding: Set/allocated/freed by libavcodec. + */ + uint16_t *intra_matrix; + + /** + * custom inter quantization matrix + * Must be allocated with the av_malloc() family of functions, and will be freed in + * avcodec_free_context(). + * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL. + * - decoding: Set/allocated/freed by libavcodec. + */ + uint16_t *inter_matrix; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int scenechange_threshold; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int noise_reduction; +#endif + + /** + * precision of the intra DC coefficient - 8 + * - encoding: Set by user. + * - decoding: Set by libavcodec + */ + int intra_dc_precision; + + /** + * Number of macroblock rows at the top which are skipped. + * - encoding: unused + * - decoding: Set by user. + */ + int skip_top; + + /** + * Number of macroblock rows at the bottom which are skipped. + * - encoding: unused + * - decoding: Set by user. + */ + int skip_bottom; + + /** + * minimum MB Lagrange multiplier + * - encoding: Set by user. + * - decoding: unused + */ + int mb_lmin; + + /** + * maximum MB Lagrange multiplier + * - encoding: Set by user. + * - decoding: unused + */ + int mb_lmax; + +#if FF_API_PRIVATE_OPT + /** + * @deprecated use encoder private options instead + */ + attribute_deprecated + int me_penalty_compensation; +#endif + + /** + * - encoding: Set by user. + * - decoding: unused + */ + int bidir_refine; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int brd_scale; +#endif + + /** + * minimum GOP size + * - encoding: Set by user. + * - decoding: unused + */ + int keyint_min; + + /** + * number of reference frames + * - encoding: Set by user. + * - decoding: Set by lavc. + */ + int refs; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int chromaoffset; +#endif + + /** + * Note: Value depends upon the compare function used for fullpel ME. + * - encoding: Set by user. + * - decoding: unused + */ + int mv0_threshold; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int b_sensitivity; +#endif + + /** + * Chromaticity coordinates of the source primaries. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorPrimaries color_primaries; + + /** + * Color Transfer Characteristic. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorTransferCharacteristic color_trc; + + /** + * YUV colorspace type. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorSpace colorspace; + + /** + * MPEG vs JPEG YUV range. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorRange color_range; + + /** + * This defines the location of chroma samples. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVChromaLocation chroma_sample_location; + + /** + * Number of slices. + * Indicates number of picture subdivisions. Used for parallelized + * decoding. + * - encoding: Set by user + * - decoding: unused + */ + int slices; + + /** Field order + * - encoding: set by libavcodec + * - decoding: Set by user. + */ + enum AVFieldOrder field_order; + + /* audio only */ + int sample_rate; ///< samples per second + int channels; ///< number of audio channels + + /** + * audio sample format + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + enum AVSampleFormat sample_fmt; ///< sample format + + /* The following data should not be initialized. */ + /** + * Number of samples per channel in an audio frame. + * + * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame + * except the last must contain exactly frame_size samples per channel. + * May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the + * frame size is not restricted. + * - decoding: may be set by some decoders to indicate constant frame size + */ + int frame_size; + + /** + * Frame counter, set by libavcodec. + * + * - decoding: total number of frames returned from the decoder so far. + * - encoding: total number of frames passed to the encoder so far. + * + * @note the counter is not incremented if encoding/decoding resulted in + * an error. + */ + int frame_number; + + /** + * number of bytes per packet if constant and known or 0 + * Used by some WAV based audio codecs. + */ + int block_align; + + /** + * Audio cutoff bandwidth (0 means "automatic") + * - encoding: Set by user. + * - decoding: unused + */ + int cutoff; + + /** + * Audio channel layout. + * - encoding: set by user. + * - decoding: set by user, may be overwritten by libavcodec. + */ + uint64_t channel_layout; + + /** + * Request decoder to use this channel layout if it can (0 for default) + * - encoding: unused + * - decoding: Set by user. + */ + uint64_t request_channel_layout; + + /** + * Type of service that the audio stream conveys. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + enum AVAudioServiceType audio_service_type; + + /** + * desired sample format + * - encoding: Not used. + * - decoding: Set by user. + * Decoder will decode to this format if it can. + */ + enum AVSampleFormat request_sample_fmt; + + /** + * This callback is called at the beginning of each frame to get data + * buffer(s) for it. There may be one contiguous buffer for all the data or + * there may be a buffer per each data plane or anything in between. What + * this means is, you may set however many entries in buf[] you feel necessary. + * Each buffer must be reference-counted using the AVBuffer API (see description + * of buf[] below). + * + * The following fields will be set in the frame before this callback is + * called: + * - format + * - width, height (video only) + * - sample_rate, channel_layout, nb_samples (audio only) + * Their values may differ from the corresponding values in + * AVCodecContext. This callback must use the frame values, not the codec + * context values, to calculate the required buffer size. + * + * This callback must fill the following fields in the frame: + * - data[] + * - linesize[] + * - extended_data: + * * if the data is planar audio with more than 8 channels, then this + * callback must allocate and fill extended_data to contain all pointers + * to all data planes. data[] must hold as many pointers as it can. + * extended_data must be allocated with av_malloc() and will be freed in + * av_frame_unref(). + * * otherwise extended_data must point to data + * - buf[] must contain one or more pointers to AVBufferRef structures. Each of + * the frame's data and extended_data pointers must be contained in these. That + * is, one AVBufferRef for each allocated chunk of memory, not necessarily one + * AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(), + * and av_buffer_ref(). + * - extended_buf and nb_extended_buf must be allocated with av_malloc() by + * this callback and filled with the extra buffers if there are more + * buffers than buf[] can hold. extended_buf will be freed in + * av_frame_unref(). + * + * If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call + * avcodec_default_get_buffer2() instead of providing buffers allocated by + * some other means. + * + * Each data plane must be aligned to the maximum required by the target + * CPU. + * + * @see avcodec_default_get_buffer2() + * + * Video: + * + * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused + * (read and/or written to if it is writable) later by libavcodec. + * + * avcodec_align_dimensions2() should be used to find the required width and + * height, as they normally need to be rounded up to the next multiple of 16. + * + * Some decoders do not support linesizes changing between frames. + * + * If frame multithreading is used and thread_safe_callbacks is set, + * this callback may be called from a different thread, but not from more + * than one at once. Does not need to be reentrant. + * + * @see avcodec_align_dimensions2() + * + * Audio: + * + * Decoders request a buffer of a particular size by setting + * AVFrame.nb_samples prior to calling get_buffer2(). The decoder may, + * however, utilize only part of the buffer by setting AVFrame.nb_samples + * to a smaller value in the output frame. + * + * As a convenience, av_samples_get_buffer_size() and + * av_samples_fill_arrays() in libavutil may be used by custom get_buffer2() + * functions to find the required data size and to fill data pointers and + * linesize. In AVFrame.linesize, only linesize[0] may be set for audio + * since all planes must be the same size. + * + * @see av_samples_get_buffer_size(), av_samples_fill_arrays() + * + * - encoding: unused + * - decoding: Set by libavcodec, user can override. + */ + int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags); + + /** + * If non-zero, the decoded audio and video frames returned from + * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted + * and are valid indefinitely. The caller must free them with + * av_frame_unref() when they are not needed anymore. + * Otherwise, the decoded frames must not be freed by the caller and are + * only valid until the next decode call. + * + * This is always automatically enabled if avcodec_receive_frame() is used. + * + * - encoding: unused + * - decoding: set by the caller before avcodec_open2(). + */ + attribute_deprecated + int refcounted_frames; + + /* - encoding parameters */ + float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0) + float qblur; ///< amount of qscale smoothing over time (0.0-1.0) + + /** + * minimum quantizer + * - encoding: Set by user. + * - decoding: unused + */ + int qmin; + + /** + * maximum quantizer + * - encoding: Set by user. + * - decoding: unused + */ + int qmax; + + /** + * maximum quantizer difference between frames + * - encoding: Set by user. + * - decoding: unused + */ + int max_qdiff; + + /** + * decoder bitstream buffer size + * - encoding: Set by user. + * - decoding: unused + */ + int rc_buffer_size; + + /** + * ratecontrol override, see RcOverride + * - encoding: Allocated/set/freed by user. + * - decoding: unused + */ + int rc_override_count; + RcOverride *rc_override; + + /** + * maximum bitrate + * - encoding: Set by user. + * - decoding: Set by user, may be overwritten by libavcodec. + */ + int64_t rc_max_rate; + + /** + * minimum bitrate + * - encoding: Set by user. + * - decoding: unused + */ + int64_t rc_min_rate; + + /** + * Ratecontrol attempt to use, at maximum, of what can be used without an underflow. + * - encoding: Set by user. + * - decoding: unused. + */ + float rc_max_available_vbv_use; + + /** + * Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow. + * - encoding: Set by user. + * - decoding: unused. + */ + float rc_min_vbv_overflow_use; + + /** + * Number of bits which should be loaded into the rc buffer before decoding starts. + * - encoding: Set by user. + * - decoding: unused + */ + int rc_initial_buffer_occupancy; + +#if FF_API_CODER_TYPE +#define FF_CODER_TYPE_VLC 0 +#define FF_CODER_TYPE_AC 1 +#define FF_CODER_TYPE_RAW 2 +#define FF_CODER_TYPE_RLE 3 + /** + * @deprecated use encoder private options instead + */ + attribute_deprecated + int coder_type; +#endif /* FF_API_CODER_TYPE */ + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int context_model; +#endif + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int frame_skip_threshold; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int frame_skip_factor; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int frame_skip_exp; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int frame_skip_cmp; +#endif /* FF_API_PRIVATE_OPT */ + + /** + * trellis RD quantization + * - encoding: Set by user. + * - decoding: unused + */ + int trellis; + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int min_prediction_order; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int max_prediction_order; + + /** @deprecated use encoder private options instead */ + attribute_deprecated + int64_t timecode_frame_start; +#endif + +#if FF_API_RTP_CALLBACK + /** + * @deprecated unused + */ + /* The RTP callback: This function is called */ + /* every time the encoder has a packet to send. */ + /* It depends on the encoder if the data starts */ + /* with a Start Code (it should). H.263 does. */ + /* mb_nb contains the number of macroblocks */ + /* encoded in the RTP payload. */ + attribute_deprecated + void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); +#endif + +#if FF_API_PRIVATE_OPT + /** @deprecated use encoder private options instead */ + attribute_deprecated + int rtp_payload_size; /* The size of the RTP payload: the coder will */ + /* do its best to deliver a chunk with size */ + /* below rtp_payload_size, the chunk will start */ + /* with a start code on some codecs like H.263. */ + /* This doesn't take account of any particular */ + /* headers inside the transmitted RTP payload. */ +#endif + +#if FF_API_STAT_BITS + /* statistics, used for 2-pass encoding */ + attribute_deprecated + int mv_bits; + attribute_deprecated + int header_bits; + attribute_deprecated + int i_tex_bits; + attribute_deprecated + int p_tex_bits; + attribute_deprecated + int i_count; + attribute_deprecated + int p_count; + attribute_deprecated + int skip_count; + attribute_deprecated + int misc_bits; + + /** @deprecated this field is unused */ + attribute_deprecated + int frame_bits; +#endif + + /** + * pass1 encoding statistics output buffer + * - encoding: Set by libavcodec. + * - decoding: unused + */ + char *stats_out; + + /** + * pass2 encoding statistics input buffer + * Concatenated stuff from stats_out of pass1 should be placed here. + * - encoding: Allocated/set/freed by user. + * - decoding: unused + */ + char *stats_in; + + /** + * Work around bugs in encoders which sometimes cannot be detected automatically. + * - encoding: Set by user + * - decoding: Set by user + */ + int workaround_bugs; +#define FF_BUG_AUTODETECT 1 ///< autodetection +#define FF_BUG_XVID_ILACE 4 +#define FF_BUG_UMP4 8 +#define FF_BUG_NO_PADDING 16 +#define FF_BUG_AMV 32 +#define FF_BUG_QPEL_CHROMA 64 +#define FF_BUG_STD_QPEL 128 +#define FF_BUG_QPEL_CHROMA2 256 +#define FF_BUG_DIRECT_BLOCKSIZE 512 +#define FF_BUG_EDGE 1024 +#define FF_BUG_HPEL_CHROMA 2048 +#define FF_BUG_DC_CLIP 4096 +#define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders. +#define FF_BUG_TRUNCATED 16384 +#define FF_BUG_IEDGE 32768 + + /** + * strictly follow the standard (MPEG-4, ...). + * - encoding: Set by user. + * - decoding: Set by user. + * Setting this to STRICT or higher means the encoder and decoder will + * generally do stupid things, whereas setting it to unofficial or lower + * will mean the encoder might produce output that is not supported by all + * spec-compliant decoders. Decoders don't differentiate between normal, + * unofficial and experimental (that is, they always try to decode things + * when they can) unless they are explicitly asked to behave stupidly + * (=strictly conform to the specs) + */ + int strict_std_compliance; +#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software. +#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences. +#define FF_COMPLIANCE_NORMAL 0 +#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions +#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things. + + /** + * error concealment flags + * - encoding: unused + * - decoding: Set by user. + */ + int error_concealment; +#define FF_EC_GUESS_MVS 1 +#define FF_EC_DEBLOCK 2 +#define FF_EC_FAVOR_INTER 256 + + /** + * debug + * - encoding: Set by user. + * - decoding: Set by user. + */ + int debug; +#define FF_DEBUG_PICT_INFO 1 +#define FF_DEBUG_RC 2 +#define FF_DEBUG_BITSTREAM 4 +#define FF_DEBUG_MB_TYPE 8 +#define FF_DEBUG_QP 16 +#if FF_API_DEBUG_MV +/** + * @deprecated this option does nothing + */ +#define FF_DEBUG_MV 32 +#endif +#define FF_DEBUG_DCT_COEFF 0x00000040 +#define FF_DEBUG_SKIP 0x00000080 +#define FF_DEBUG_STARTCODE 0x00000100 +#define FF_DEBUG_ER 0x00000400 +#define FF_DEBUG_MMCO 0x00000800 +#define FF_DEBUG_BUGS 0x00001000 +#if FF_API_DEBUG_MV +#define FF_DEBUG_VIS_QP 0x00002000 +#define FF_DEBUG_VIS_MB_TYPE 0x00004000 +#endif +#define FF_DEBUG_BUFFERS 0x00008000 +#define FF_DEBUG_THREADS 0x00010000 +#define FF_DEBUG_GREEN_MD 0x00800000 +#define FF_DEBUG_NOMC 0x01000000 + +#if FF_API_DEBUG_MV + /** + * debug + * - encoding: Set by user. + * - decoding: Set by user. + */ + int debug_mv; +#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 // visualize forward predicted MVs of P-frames +#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 // visualize forward predicted MVs of B-frames +#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames +#endif + + /** + * Error recognition; may misdetect some more or less valid parts as errors. + * - encoding: unused + * - decoding: Set by user. + */ + int err_recognition; + +/** + * Verify checksums embedded in the bitstream (could be of either encoded or + * decoded data, depending on the codec) and print an error message on mismatch. + * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the + * decoder returning an error. + */ +#define AV_EF_CRCCHECK (1<<0) +#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations +#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length +#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection + +#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue +#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors +#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors +#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error + + + /** + * opaque 64-bit number (generally a PTS) that will be reordered and + * output in AVFrame.reordered_opaque + * - encoding: Set by libavcodec to the reordered_opaque of the input + * frame corresponding to the last returned packet. Only + * supported by encoders with the + * AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability. + * - decoding: Set by user. + */ + int64_t reordered_opaque; + + /** + * Hardware accelerator in use + * - encoding: unused. + * - decoding: Set by libavcodec + */ + const struct AVHWAccel *hwaccel; + + /** + * Hardware accelerator context. + * For some hardware accelerators, a global context needs to be + * provided by the user. In that case, this holds display-dependent + * data FFmpeg cannot instantiate itself. Please refer to the + * FFmpeg HW accelerator documentation to know how to fill this + * is. e.g. for VA API, this is a struct vaapi_context. + * - encoding: unused + * - decoding: Set by user + */ + void *hwaccel_context; + + /** + * error + * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR. + * - decoding: unused + */ + uint64_t error[AV_NUM_DATA_POINTERS]; + + /** + * DCT algorithm, see FF_DCT_* below + * - encoding: Set by user. + * - decoding: unused + */ + int dct_algo; +#define FF_DCT_AUTO 0 +#define FF_DCT_FASTINT 1 +#define FF_DCT_INT 2 +#define FF_DCT_MMX 3 +#define FF_DCT_ALTIVEC 5 +#define FF_DCT_FAAN 6 + + /** + * IDCT algorithm, see FF_IDCT_* below. + * - encoding: Set by user. + * - decoding: Set by user. + */ + int idct_algo; +#define FF_IDCT_AUTO 0 +#define FF_IDCT_INT 1 +#define FF_IDCT_SIMPLE 2 +#define FF_IDCT_SIMPLEMMX 3 +#define FF_IDCT_ARM 7 +#define FF_IDCT_ALTIVEC 8 +#define FF_IDCT_SIMPLEARM 10 +#define FF_IDCT_XVID 14 +#define FF_IDCT_SIMPLEARMV5TE 16 +#define FF_IDCT_SIMPLEARMV6 17 +#define FF_IDCT_FAAN 20 +#define FF_IDCT_SIMPLENEON 22 +#define FF_IDCT_NONE 24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */ +#define FF_IDCT_SIMPLEAUTO 128 + + /** + * bits per sample/pixel from the demuxer (needed for huffyuv). + * - encoding: Set by libavcodec. + * - decoding: Set by user. + */ + int bits_per_coded_sample; + + /** + * Bits per sample/pixel of internal libavcodec pixel/sample format. + * - encoding: set by user. + * - decoding: set by libavcodec. + */ + int bits_per_raw_sample; + +#if FF_API_LOWRES + /** + * low resolution decoding, 1-> 1/2 size, 2->1/4 size + * - encoding: unused + * - decoding: Set by user. + */ + int lowres; +#endif + +#if FF_API_CODED_FRAME + /** + * the picture in the bitstream + * - encoding: Set by libavcodec. + * - decoding: unused + * + * @deprecated use the quality factor packet side data instead + */ + attribute_deprecated AVFrame *coded_frame; +#endif + + /** + * thread count + * is used to decide how many independent tasks should be passed to execute() + * - encoding: Set by user. + * - decoding: Set by user. + */ + int thread_count; + + /** + * Which multithreading methods to use. + * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread, + * so clients which cannot provide future frames should not use it. + * + * - encoding: Set by user, otherwise the default is used. + * - decoding: Set by user, otherwise the default is used. + */ + int thread_type; +#define FF_THREAD_FRAME 1 ///< Decode more than one frame at once +#define FF_THREAD_SLICE 2 ///< Decode more than one part of a single frame at once + + /** + * Which multithreading methods are in use by the codec. + * - encoding: Set by libavcodec. + * - decoding: Set by libavcodec. + */ + int active_thread_type; + + /** + * Set by the client if its custom get_buffer() callback can be called + * synchronously from another thread, which allows faster multithreaded decoding. + * draw_horiz_band() will be called from other threads regardless of this setting. + * Ignored if the default get_buffer() is used. + * - encoding: Set by user. + * - decoding: Set by user. + */ + int thread_safe_callbacks; + + /** + * The codec may call this to execute several independent things. + * It will return only after finishing all tasks. + * The user may replace this with some multithreaded implementation, + * the default implementation will execute the parts serially. + * @param count the number of things to execute + * - encoding: Set by libavcodec, user can override. + * - decoding: Set by libavcodec, user can override. + */ + int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size); + + /** + * The codec may call this to execute several independent things. + * It will return only after finishing all tasks. + * The user may replace this with some multithreaded implementation, + * the default implementation will execute the parts serially. + * Also see avcodec_thread_init and e.g. the --enable-pthread configure option. + * @param c context passed also to func + * @param count the number of things to execute + * @param arg2 argument passed unchanged to func + * @param ret return values of executed functions, must have space for "count" values. May be NULL. + * @param func function that will be called count times, with jobnr from 0 to count-1. + * threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no + * two instances of func executing at the same time will have the same threadnr. + * @return always 0 currently, but code should handle a future improvement where when any call to func + * returns < 0 no further calls to func may be done and < 0 is returned. + * - encoding: Set by libavcodec, user can override. + * - decoding: Set by libavcodec, user can override. + */ + int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count); + + /** + * noise vs. sse weight for the nsse comparison function + * - encoding: Set by user. + * - decoding: unused + */ + int nsse_weight; + + /** + * profile + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int profile; +#define FF_PROFILE_UNKNOWN -99 +#define FF_PROFILE_RESERVED -100 + +#define FF_PROFILE_AAC_MAIN 0 +#define FF_PROFILE_AAC_LOW 1 +#define FF_PROFILE_AAC_SSR 2 +#define FF_PROFILE_AAC_LTP 3 +#define FF_PROFILE_AAC_HE 4 +#define FF_PROFILE_AAC_HE_V2 28 +#define FF_PROFILE_AAC_LD 22 +#define FF_PROFILE_AAC_ELD 38 +#define FF_PROFILE_MPEG2_AAC_LOW 128 +#define FF_PROFILE_MPEG2_AAC_HE 131 + +#define FF_PROFILE_DNXHD 0 +#define FF_PROFILE_DNXHR_LB 1 +#define FF_PROFILE_DNXHR_SQ 2 +#define FF_PROFILE_DNXHR_HQ 3 +#define FF_PROFILE_DNXHR_HQX 4 +#define FF_PROFILE_DNXHR_444 5 + +#define FF_PROFILE_DTS 20 +#define FF_PROFILE_DTS_ES 30 +#define FF_PROFILE_DTS_96_24 40 +#define FF_PROFILE_DTS_HD_HRA 50 +#define FF_PROFILE_DTS_HD_MA 60 +#define FF_PROFILE_DTS_EXPRESS 70 + +#define FF_PROFILE_MPEG2_422 0 +#define FF_PROFILE_MPEG2_HIGH 1 +#define FF_PROFILE_MPEG2_SS 2 +#define FF_PROFILE_MPEG2_SNR_SCALABLE 3 +#define FF_PROFILE_MPEG2_MAIN 4 +#define FF_PROFILE_MPEG2_SIMPLE 5 + +#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag +#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag + +#define FF_PROFILE_H264_BASELINE 66 +#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED) +#define FF_PROFILE_H264_MAIN 77 +#define FF_PROFILE_H264_EXTENDED 88 +#define FF_PROFILE_H264_HIGH 100 +#define FF_PROFILE_H264_HIGH_10 110 +#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA) +#define FF_PROFILE_H264_MULTIVIEW_HIGH 118 +#define FF_PROFILE_H264_HIGH_422 122 +#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA) +#define FF_PROFILE_H264_STEREO_HIGH 128 +#define FF_PROFILE_H264_HIGH_444 144 +#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244 +#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA) +#define FF_PROFILE_H264_CAVLC_444 44 + +#define FF_PROFILE_VC1_SIMPLE 0 +#define FF_PROFILE_VC1_MAIN 1 +#define FF_PROFILE_VC1_COMPLEX 2 +#define FF_PROFILE_VC1_ADVANCED 3 + +#define FF_PROFILE_MPEG4_SIMPLE 0 +#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1 +#define FF_PROFILE_MPEG4_CORE 2 +#define FF_PROFILE_MPEG4_MAIN 3 +#define FF_PROFILE_MPEG4_N_BIT 4 +#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5 +#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6 +#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7 +#define FF_PROFILE_MPEG4_HYBRID 8 +#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9 +#define FF_PROFILE_MPEG4_CORE_SCALABLE 10 +#define FF_PROFILE_MPEG4_ADVANCED_CODING 11 +#define FF_PROFILE_MPEG4_ADVANCED_CORE 12 +#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13 +#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14 +#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15 + +#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1 +#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2 +#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768 +#define FF_PROFILE_JPEG2000_DCINEMA_2K 3 +#define FF_PROFILE_JPEG2000_DCINEMA_4K 4 + +#define FF_PROFILE_VP9_0 0 +#define FF_PROFILE_VP9_1 1 +#define FF_PROFILE_VP9_2 2 +#define FF_PROFILE_VP9_3 3 + +#define FF_PROFILE_HEVC_MAIN 1 +#define FF_PROFILE_HEVC_MAIN_10 2 +#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3 +#define FF_PROFILE_HEVC_REXT 4 + +#define FF_PROFILE_AV1_MAIN 0 +#define FF_PROFILE_AV1_HIGH 1 +#define FF_PROFILE_AV1_PROFESSIONAL 2 + +#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0 +#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1 +#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2 +#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3 +#define FF_PROFILE_MJPEG_JPEG_LS 0xf7 + +#define FF_PROFILE_SBC_MSBC 1 + +#define FF_PROFILE_PRORES_PROXY 0 +#define FF_PROFILE_PRORES_LT 1 +#define FF_PROFILE_PRORES_STANDARD 2 +#define FF_PROFILE_PRORES_HQ 3 +#define FF_PROFILE_PRORES_4444 4 +#define FF_PROFILE_PRORES_XQ 5 + +#define FF_PROFILE_ARIB_PROFILE_A 0 +#define FF_PROFILE_ARIB_PROFILE_C 1 + +#define FF_PROFILE_KLVA_SYNC 0 +#define FF_PROFILE_KLVA_ASYNC 1 + + /** + * level + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + int level; +#define FF_LEVEL_UNKNOWN -99 + + /** + * Skip loop filtering for selected frames. + * - encoding: unused + * - decoding: Set by user. + */ + enum AVDiscard skip_loop_filter; + + /** + * Skip IDCT/dequantization for selected frames. + * - encoding: unused + * - decoding: Set by user. + */ + enum AVDiscard skip_idct; + + /** + * Skip decoding for selected frames. + * - encoding: unused + * - decoding: Set by user. + */ + enum AVDiscard skip_frame; + + /** + * Header containing style information for text subtitles. + * For SUBTITLE_ASS subtitle type, it should contain the whole ASS + * [Script Info] and [V4+ Styles] section, plus the [Events] line and + * the Format line following. It shouldn't include any Dialogue line. + * - encoding: Set/allocated/freed by user (before avcodec_open2()) + * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2()) + */ + uint8_t *subtitle_header; + int subtitle_header_size; + +#if FF_API_VBV_DELAY + /** + * VBV delay coded in the last frame (in periods of a 27 MHz clock). + * Used for compliant TS muxing. + * - encoding: Set by libavcodec. + * - decoding: unused. + * @deprecated this value is now exported as a part of + * AV_PKT_DATA_CPB_PROPERTIES packet side data + */ + attribute_deprecated + uint64_t vbv_delay; +#endif + +#if FF_API_SIDEDATA_ONLY_PKT + /** + * Encoding only and set by default. Allow encoders to output packets + * that do not contain any encoded data, only side data. + * + * Some encoders need to output such packets, e.g. to update some stream + * parameters at the end of encoding. + * + * @deprecated this field disables the default behaviour and + * it is kept only for compatibility. + */ + attribute_deprecated + int side_data_only_packets; +#endif + + /** + * Audio only. The number of "priming" samples (padding) inserted by the + * encoder at the beginning of the audio. I.e. this number of leading + * decoded samples must be discarded by the caller to get the original audio + * without leading padding. + * + * - decoding: unused + * - encoding: Set by libavcodec. The timestamps on the output packets are + * adjusted by the encoder so that they always refer to the + * first sample of the data actually contained in the packet, + * including any added padding. E.g. if the timebase is + * 1/samplerate and the timestamp of the first input sample is + * 0, the timestamp of the first output packet will be + * -initial_padding. + */ + int initial_padding; + + /** + * - decoding: For codecs that store a framerate value in the compressed + * bitstream, the decoder may export it here. { 0, 1} when + * unknown. + * - encoding: May be used to signal the framerate of CFR content to an + * encoder. + */ + AVRational framerate; + + /** + * Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx. + * - encoding: unused. + * - decoding: Set by libavcodec before calling get_format() + */ + enum AVPixelFormat sw_pix_fmt; + + /** + * Timebase in which pkt_dts/pts and AVPacket.dts/pts are. + * - encoding unused. + * - decoding set by user. + */ + AVRational pkt_timebase; + + /** + * AVCodecDescriptor + * - encoding: unused. + * - decoding: set by libavcodec. + */ + const AVCodecDescriptor *codec_descriptor; + +#if !FF_API_LOWRES + /** + * low resolution decoding, 1-> 1/2 size, 2->1/4 size + * - encoding: unused + * - decoding: Set by user. + */ + int lowres; +#endif + + /** + * Current statistics for PTS correction. + * - decoding: maintained and used by libavcodec, not intended to be used by user apps + * - encoding: unused + */ + int64_t pts_correction_num_faulty_pts; /// Number of incorrect PTS values so far + int64_t pts_correction_num_faulty_dts; /// Number of incorrect DTS values so far + int64_t pts_correction_last_pts; /// PTS of the last frame + int64_t pts_correction_last_dts; /// DTS of the last frame + + /** + * Character encoding of the input subtitles file. + * - decoding: set by user + * - encoding: unused + */ + char *sub_charenc; + + /** + * Subtitles character encoding mode. Formats or codecs might be adjusting + * this setting (if they are doing the conversion themselves for instance). + * - decoding: set by libavcodec + * - encoding: unused + */ + int sub_charenc_mode; +#define FF_SUB_CHARENC_MODE_DO_NOTHING -1 ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance) +#define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself +#define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv +#define FF_SUB_CHARENC_MODE_IGNORE 2 ///< neither convert the subtitles, nor check them for valid UTF-8 + + /** + * Skip processing alpha if supported by codec. + * Note that if the format uses pre-multiplied alpha (common with VP6, + * and recommended due to better video quality/compression) + * the image will look as if alpha-blended onto a black background. + * However for formats that do not use pre-multiplied alpha + * there might be serious artefacts (though e.g. libswscale currently + * assumes pre-multiplied alpha anyway). + * + * - decoding: set by user + * - encoding: unused + */ + int skip_alpha; + + /** + * Number of samples to skip after a discontinuity + * - decoding: unused + * - encoding: set by libavcodec + */ + int seek_preroll; + +#if !FF_API_DEBUG_MV + /** + * debug motion vectors + * - encoding: Set by user. + * - decoding: Set by user. + */ + int debug_mv; +#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames +#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames +#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames +#endif + + /** + * custom intra quantization matrix + * - encoding: Set by user, can be NULL. + * - decoding: unused. + */ + uint16_t *chroma_intra_matrix; + + /** + * dump format separator. + * can be ", " or "\n " or anything else + * - encoding: Set by user. + * - decoding: Set by user. + */ + uint8_t *dump_separator; + + /** + * ',' separated list of allowed decoders. + * If NULL then all are allowed + * - encoding: unused + * - decoding: set by user + */ + char *codec_whitelist; + + /** + * Properties of the stream that gets decoded + * - encoding: unused + * - decoding: set by libavcodec + */ + unsigned properties; +#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001 +#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002 + + /** + * Additional data associated with the entire coded stream. + * + * - decoding: unused + * - encoding: may be set by libavcodec after avcodec_open2(). + */ + AVPacketSideData *coded_side_data; + int nb_coded_side_data; + + /** + * A reference to the AVHWFramesContext describing the input (for encoding) + * or output (decoding) frames. The reference is set by the caller and + * afterwards owned (and freed) by libavcodec - it should never be read by + * the caller after being set. + * + * - decoding: This field should be set by the caller from the get_format() + * callback. The previous reference (if any) will always be + * unreffed by libavcodec before the get_format() call. + * + * If the default get_buffer2() is used with a hwaccel pixel + * format, then this AVHWFramesContext will be used for + * allocating the frame buffers. + * + * - encoding: For hardware encoders configured to use a hwaccel pixel + * format, this field should be set by the caller to a reference + * to the AVHWFramesContext describing input frames. + * AVHWFramesContext.format must be equal to + * AVCodecContext.pix_fmt. + * + * This field should be set before avcodec_open2() is called. + */ + AVBufferRef *hw_frames_ctx; + + /** + * Control the form of AVSubtitle.rects[N]->ass + * - decoding: set by user + * - encoding: unused + */ + int sub_text_format; +#define FF_SUB_TEXT_FMT_ASS 0 +#if FF_API_ASS_TIMING +#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1 +#endif + + /** + * Audio only. The amount of padding (in samples) appended by the encoder to + * the end of the audio. I.e. this number of decoded samples must be + * discarded by the caller from the end of the stream to get the original + * audio without any trailing padding. + * + * - decoding: unused + * - encoding: unused + */ + int trailing_padding; + + /** + * The number of pixels per image to maximally accept. + * + * - decoding: set by user + * - encoding: set by user + */ + int64_t max_pixels; + + /** + * A reference to the AVHWDeviceContext describing the device which will + * be used by a hardware encoder/decoder. The reference is set by the + * caller and afterwards owned (and freed) by libavcodec. + * + * This should be used if either the codec device does not require + * hardware frames or any that are used are to be allocated internally by + * libavcodec. If the user wishes to supply any of the frames used as + * encoder input or decoder output then hw_frames_ctx should be used + * instead. When hw_frames_ctx is set in get_format() for a decoder, this + * field will be ignored while decoding the associated stream segment, but + * may again be used on a following one after another get_format() call. + * + * For both encoders and decoders this field should be set before + * avcodec_open2() is called and must not be written to thereafter. + * + * Note that some decoders may require this field to be set initially in + * order to support hw_frames_ctx at all - in that case, all frames + * contexts used must be created on the same device. + */ + AVBufferRef *hw_device_ctx; + + /** + * Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated + * decoding (if active). + * - encoding: unused + * - decoding: Set by user (either before avcodec_open2(), or in the + * AVCodecContext.get_format callback) + */ + int hwaccel_flags; + + /** + * Video decoding only. Certain video codecs support cropping, meaning that + * only a sub-rectangle of the decoded frame is intended for display. This + * option controls how cropping is handled by libavcodec. + * + * When set to 1 (the default), libavcodec will apply cropping internally. + * I.e. it will modify the output frame width/height fields and offset the + * data pointers (only by as much as possible while preserving alignment, or + * by the full amount if the AV_CODEC_FLAG_UNALIGNED flag is set) so that + * the frames output by the decoder refer only to the cropped area. The + * crop_* fields of the output frames will be zero. + * + * When set to 0, the width/height fields of the output frames will be set + * to the coded dimensions and the crop_* fields will describe the cropping + * rectangle. Applying the cropping is left to the caller. + * + * @warning When hardware acceleration with opaque output frames is used, + * libavcodec is unable to apply cropping from the top/left border. + * + * @note when this option is set to zero, the width/height fields of the + * AVCodecContext and output AVFrames have different meanings. The codec + * context fields store display dimensions (with the coded dimensions in + * coded_width/height), while the frame fields store the coded dimensions + * (with the display dimensions being determined by the crop_* fields). + */ + int apply_cropping; + + /* + * Video decoding only. Sets the number of extra hardware frames which + * the decoder will allocate for use by the caller. This must be set + * before avcodec_open2() is called. + * + * Some hardware decoders require all frames that they will use for + * output to be defined in advance before decoding starts. For such + * decoders, the hardware frame pool must therefore be of a fixed size. + * The extra frames set here are on top of any number that the decoder + * needs internally in order to operate normally (for example, frames + * used as reference pictures). + */ + int extra_hw_frames; + + /** + * The percentage of damaged samples to discard a frame. + * + * - decoding: set by user + * - encoding: unused + */ + int discard_damaged_percentage; + + /** + * The number of samples per frame to maximally accept. + * + * - decoding: set by user + * - encoding: set by user + */ + int64_t max_samples; + + /** + * Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of + * metadata exported in frame, packet, or coded stream side data by + * decoders and encoders. + * + * - decoding: set by user + * - encoding: set by user + */ + int export_side_data; +} AVCodecContext; + +#if FF_API_CODEC_GET_SET +/** + * Accessors for some AVCodecContext fields. These used to be provided for ABI + * compatibility, and do not need to be used anymore. + */ +attribute_deprecated +AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); +attribute_deprecated +void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val); + +attribute_deprecated +const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx); +attribute_deprecated +void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc); + +attribute_deprecated +unsigned av_codec_get_codec_properties(const AVCodecContext *avctx); + +#if FF_API_LOWRES +attribute_deprecated +int av_codec_get_lowres(const AVCodecContext *avctx); +attribute_deprecated +void av_codec_set_lowres(AVCodecContext *avctx, int val); +#endif + +attribute_deprecated +int av_codec_get_seek_preroll(const AVCodecContext *avctx); +attribute_deprecated +void av_codec_set_seek_preroll(AVCodecContext *avctx, int val); + +attribute_deprecated +uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx); +attribute_deprecated +void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val); +#endif + +struct AVSubtitle; + +#if FF_API_CODEC_GET_SET +attribute_deprecated +int av_codec_get_max_lowres(const AVCodec *codec); +#endif + +struct MpegEncContext; + +/** + * @defgroup lavc_hwaccel AVHWAccel + * + * @note Nothing in this structure should be accessed by the user. At some + * point in future it will not be externally visible at all. + * + * @{ + */ +typedef struct AVHWAccel { + /** + * Name of the hardware accelerated codec. + * The name is globally unique among encoders and among decoders (but an + * encoder and a decoder can share the same name). + */ + const char *name; + + /** + * Type of codec implemented by the hardware accelerator. + * + * See AVMEDIA_TYPE_xxx + */ + enum AVMediaType type; + + /** + * Codec implemented by the hardware accelerator. + * + * See AV_CODEC_ID_xxx + */ + enum AVCodecID id; + + /** + * Supported pixel format. + * + * Only hardware accelerated formats are supported here. + */ + enum AVPixelFormat pix_fmt; + + /** + * Hardware accelerated codec capabilities. + * see AV_HWACCEL_CODEC_CAP_* + */ + int capabilities; + + /***************************************************************** + * No fields below this line are part of the public API. They + * may not be used outside of libavcodec and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + + /** + * Allocate a custom buffer + */ + int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame); + + /** + * Called at the beginning of each frame or field picture. + * + * Meaningful frame information (codec specific) is guaranteed to + * be parsed at this point. This function is mandatory. + * + * Note that buf can be NULL along with buf_size set to 0. + * Otherwise, this means the whole frame is available at this point. + * + * @param avctx the codec context + * @param buf the frame data buffer base + * @param buf_size the size of the frame in bytes + * @return zero if successful, a negative value otherwise + */ + int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); + + /** + * Callback for parameter data (SPS/PPS/VPS etc). + * + * Useful for hardware decoders which keep persistent state about the + * video parameters, and need to receive any changes to update that state. + * + * @param avctx the codec context + * @param type the nal unit type + * @param buf the nal unit data buffer + * @param buf_size the size of the nal unit in bytes + * @return zero if successful, a negative value otherwise + */ + int (*decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size); + + /** + * Callback for each slice. + * + * Meaningful slice information (codec specific) is guaranteed to + * be parsed at this point. This function is mandatory. + * The only exception is XvMC, that works on MB level. + * + * @param avctx the codec context + * @param buf the slice data buffer base + * @param buf_size the size of the slice in bytes + * @return zero if successful, a negative value otherwise + */ + int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size); + + /** + * Called at the end of each frame or field picture. + * + * The whole picture is parsed at this point and can now be sent + * to the hardware accelerator. This function is mandatory. + * + * @param avctx the codec context + * @return zero if successful, a negative value otherwise + */ + int (*end_frame)(AVCodecContext *avctx); + + /** + * Size of per-frame hardware accelerator private data. + * + * Private data is allocated with av_mallocz() before + * AVCodecContext.get_buffer() and deallocated after + * AVCodecContext.release_buffer(). + */ + int frame_priv_data_size; + + /** + * Called for every Macroblock in a slice. + * + * XvMC uses it to replace the ff_mpv_reconstruct_mb(). + * Instead of decoding to raw picture, MB parameters are + * stored in an array provided by the video driver. + * + * @param s the mpeg context + */ + void (*decode_mb)(struct MpegEncContext *s); + + /** + * Initialize the hwaccel private data. + * + * This will be called from ff_get_format(), after hwaccel and + * hwaccel_context are set and the hwaccel private data in AVCodecInternal + * is allocated. + */ + int (*init)(AVCodecContext *avctx); + + /** + * Uninitialize the hwaccel private data. + * + * This will be called from get_format() or avcodec_close(), after hwaccel + * and hwaccel_context are already uninitialized. + */ + int (*uninit)(AVCodecContext *avctx); + + /** + * Size of the private data to allocate in + * AVCodecInternal.hwaccel_priv_data. + */ + int priv_data_size; + + /** + * Internal hwaccel capabilities. + */ + int caps_internal; + + /** + * Fill the given hw_frames context with current codec parameters. Called + * from get_format. Refer to avcodec_get_hw_frames_parameters() for + * details. + * + * This CAN be called before AVHWAccel.init is called, and you must assume + * that avctx->hwaccel_priv_data is invalid. + */ + int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx); +} AVHWAccel; + +/** + * HWAccel is experimental and is thus avoided in favor of non experimental + * codecs + */ +#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200 + +/** + * Hardware acceleration should be used for decoding even if the codec level + * used is unknown or higher than the maximum supported level reported by the + * hardware driver. + * + * It's generally a good idea to pass this flag unless you have a specific + * reason not to, as hardware tends to under-report supported levels. + */ +#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0) + +/** + * Hardware acceleration can output YUV pixel formats with a different chroma + * sampling than 4:2:0 and/or other than 8 bits per component. + */ +#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1) + +/** + * Hardware acceleration should still be attempted for decoding when the + * codec profile does not match the reported capabilities of the hardware. + * + * For example, this can be used to try to decode baseline profile H.264 + * streams in hardware - it will often succeed, because many streams marked + * as baseline profile actually conform to constrained baseline profile. + * + * @warning If the stream is actually not supported then the behaviour is + * undefined, and may include returning entirely incorrect output + * while indicating success. + */ +#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2) + +/** + * @} + */ + +#if FF_API_AVPICTURE +/** + * @defgroup lavc_picture AVPicture + * + * Functions for working with AVPicture + * @{ + */ + +/** + * Picture data structure. + * + * Up to four components can be stored into it, the last component is + * alpha. + * @deprecated use AVFrame or imgutils functions instead + */ +typedef struct AVPicture { + attribute_deprecated + uint8_t *data[AV_NUM_DATA_POINTERS]; ///< pointers to the image data planes + attribute_deprecated + int linesize[AV_NUM_DATA_POINTERS]; ///< number of bytes per line +} AVPicture; + +/** + * @} + */ +#endif + +enum AVSubtitleType { + SUBTITLE_NONE, + + SUBTITLE_BITMAP, ///< A bitmap, pict will be set + + /** + * Plain text, the text field must be set by the decoder and is + * authoritative. ass and pict fields may contain approximations. + */ + SUBTITLE_TEXT, + + /** + * Formatted text, the ass field must be set by the decoder and is + * authoritative. pict and text fields may contain approximations. + */ + SUBTITLE_ASS, +}; + +#define AV_SUBTITLE_FLAG_FORCED 0x00000001 + +typedef struct AVSubtitleRect { + int x; ///< top left corner of pict, undefined when pict is not set + int y; ///< top left corner of pict, undefined when pict is not set + int w; ///< width of pict, undefined when pict is not set + int h; ///< height of pict, undefined when pict is not set + int nb_colors; ///< number of colors in pict, undefined when pict is not set + +#if FF_API_AVPICTURE + /** + * @deprecated unused + */ + attribute_deprecated + AVPicture pict; +#endif + /** + * data+linesize for the bitmap of this subtitle. + * Can be set for text/ass as well once they are rendered. + */ + uint8_t *data[4]; + int linesize[4]; + + enum AVSubtitleType type; + + char *text; ///< 0 terminated plain UTF-8 text + + /** + * 0 terminated ASS/SSA compatible event line. + * The presentation of this is unaffected by the other values in this + * struct. + */ + char *ass; + + int flags; +} AVSubtitleRect; + +typedef struct AVSubtitle { + uint16_t format; /* 0 = graphics */ + uint32_t start_display_time; /* relative to packet pts, in ms */ + uint32_t end_display_time; /* relative to packet pts, in ms */ + unsigned num_rects; + AVSubtitleRect **rects; + int64_t pts; ///< Same as packet pts, in AV_TIME_BASE +} AVSubtitle; + +#if FF_API_NEXT +/** + * If c is NULL, returns the first registered codec, + * if c is non-NULL, returns the next registered codec after c, + * or NULL if c is the last one. + */ +attribute_deprecated +AVCodec *av_codec_next(const AVCodec *c); +#endif + +/** + * Return the LIBAVCODEC_VERSION_INT constant. + */ +unsigned avcodec_version(void); + +/** + * Return the libavcodec build-time configuration. + */ +const char *avcodec_configuration(void); + +/** + * Return the libavcodec license. + */ +const char *avcodec_license(void); + +#if FF_API_NEXT +/** + * Register the codec codec and initialize libavcodec. + * + * @warning either this function or avcodec_register_all() must be called + * before any other libavcodec functions. + * + * @see avcodec_register_all() + */ +attribute_deprecated +void avcodec_register(AVCodec *codec); + +/** + * Register all the codecs, parsers and bitstream filters which were enabled at + * configuration time. If you do not call this function you can select exactly + * which formats you want to support, by using the individual registration + * functions. + * + * @see avcodec_register + * @see av_register_codec_parser + * @see av_register_bitstream_filter + */ +attribute_deprecated +void avcodec_register_all(void); +#endif + +/** + * Allocate an AVCodecContext and set its fields to default values. The + * resulting struct should be freed with avcodec_free_context(). + * + * @param codec if non-NULL, allocate private data and initialize defaults + * for the given codec. It is illegal to then call avcodec_open2() + * with a different codec. + * If NULL, then the codec-specific defaults won't be initialized, + * which may result in suboptimal default settings (this is + * important mainly for encoders, e.g. libx264). + * + * @return An AVCodecContext filled with default values or NULL on failure. + */ +AVCodecContext *avcodec_alloc_context3(const AVCodec *codec); + +/** + * Free the codec context and everything associated with it and write NULL to + * the provided pointer. + */ +void avcodec_free_context(AVCodecContext **avctx); + +#if FF_API_GET_CONTEXT_DEFAULTS +/** + * @deprecated This function should not be used, as closing and opening a codec + * context multiple time is not supported. A new codec context should be + * allocated for each new use. + */ +int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec); +#endif + +/** + * Get the AVClass for AVCodecContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_class(void); + +#if FF_API_COPY_CONTEXT +/** + * Get the AVClass for AVFrame. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_frame_class(void); + +/** + * Get the AVClass for AVSubtitleRect. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avcodec_get_subtitle_rect_class(void); + +/** + * Copy the settings of the source AVCodecContext into the destination + * AVCodecContext. The resulting destination codec context will be + * unopened, i.e. you are required to call avcodec_open2() before you + * can use this AVCodecContext to decode/encode video/audio data. + * + * @param dest target codec context, should be initialized with + * avcodec_alloc_context3(NULL), but otherwise uninitialized + * @param src source codec context + * @return AVERROR() on error (e.g. memory allocation error), 0 on success + * + * @deprecated The semantics of this function are ill-defined and it should not + * be used. If you need to transfer the stream parameters from one codec context + * to another, use an intermediate AVCodecParameters instance and the + * avcodec_parameters_from_context() / avcodec_parameters_to_context() + * functions. + */ +attribute_deprecated +int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src); +#endif + +/** + * Fill the parameters struct based on the values from the supplied codec + * context. Any allocated fields in par are freed and replaced with duplicates + * of the corresponding fields in codec. + * + * @return >= 0 on success, a negative AVERROR code on failure + */ +int avcodec_parameters_from_context(AVCodecParameters *par, + const AVCodecContext *codec); + +/** + * Fill the codec context based on the values from the supplied codec + * parameters. Any allocated fields in codec that have a corresponding field in + * par are freed and replaced with duplicates of the corresponding field in par. + * Fields in codec that do not have a counterpart in par are not touched. + * + * @return >= 0 on success, a negative AVERROR code on failure. + */ +int avcodec_parameters_to_context(AVCodecContext *codec, + const AVCodecParameters *par); + +/** + * Initialize the AVCodecContext to use the given AVCodec. Prior to using this + * function the context has to be allocated with avcodec_alloc_context3(). + * + * The functions avcodec_find_decoder_by_name(), avcodec_find_encoder_by_name(), + * avcodec_find_decoder() and avcodec_find_encoder() provide an easy way for + * retrieving a codec. + * + * @warning This function is not thread safe! + * + * @note Always call this function before using decoding routines (such as + * @ref avcodec_receive_frame()). + * + * @code + * avcodec_register_all(); + * av_dict_set(&opts, "b", "2.5M", 0); + * codec = avcodec_find_decoder(AV_CODEC_ID_H264); + * if (!codec) + * exit(1); + * + * context = avcodec_alloc_context3(codec); + * + * if (avcodec_open2(context, codec, opts) < 0) + * exit(1); + * @endcode + * + * @param avctx The context to initialize. + * @param codec The codec to open this context for. If a non-NULL codec has been + * previously passed to avcodec_alloc_context3() or + * for this context, then this parameter MUST be either NULL or + * equal to the previously passed codec. + * @param options A dictionary filled with AVCodecContext and codec-private options. + * On return this object will be filled with options that were not found. + * + * @return zero on success, a negative value on error + * @see avcodec_alloc_context3(), avcodec_find_decoder(), avcodec_find_encoder(), + * av_dict_set(), av_opt_find(). + */ +int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options); + +/** + * Close a given AVCodecContext and free all the data associated with it + * (but not the AVCodecContext itself). + * + * Calling this function on an AVCodecContext that hasn't been opened will free + * the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL + * codec. Subsequent calls will do nothing. + * + * @note Do not use this function. Use avcodec_free_context() to destroy a + * codec context (either open or closed). Opening and closing a codec context + * multiple times is not supported anymore -- use multiple codec contexts + * instead. + */ +int avcodec_close(AVCodecContext *avctx); + +/** + * Free all allocated data in the given subtitle struct. + * + * @param sub AVSubtitle to free. + */ +void avsubtitle_free(AVSubtitle *sub); + +/** + * @} + */ + +/** + * @addtogroup lavc_decoding + * @{ + */ + +/** + * The default callback for AVCodecContext.get_buffer2(). It is made public so + * it can be called by custom get_buffer2() implementations for decoders without + * AV_CODEC_CAP_DR1 set. + */ +int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags); + +/** + * Modify width and height values so that they will result in a memory + * buffer that is acceptable for the codec if you do not use any horizontal + * padding. + * + * May only be used if a codec with AV_CODEC_CAP_DR1 has been opened. + */ +void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height); + +/** + * Modify width and height values so that they will result in a memory + * buffer that is acceptable for the codec if you also ensure that all + * line sizes are a multiple of the respective linesize_align[i]. + * + * May only be used if a codec with AV_CODEC_CAP_DR1 has been opened. + */ +void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, + int linesize_align[AV_NUM_DATA_POINTERS]); + +/** + * Converts AVChromaLocation to swscale x/y chroma position. + * + * The positions represent the chroma (0,0) position in a coordinates system + * with luma (0,0) representing the origin and luma(1,1) representing 256,256 + * + * @param xpos horizontal chroma sample position + * @param ypos vertical chroma sample position + */ +int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); + +/** + * Converts swscale x/y chroma position to AVChromaLocation. + * + * The positions represent the chroma (0,0) position in a coordinates system + * with luma (0,0) representing the origin and luma(1,1) representing 256,256 + * + * @param xpos horizontal chroma sample position + * @param ypos vertical chroma sample position + */ +enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); + +/** + * Decode the audio frame of size avpkt->size from avpkt->data into frame. + * + * Some decoders may support multiple frames in a single AVPacket. Such + * decoders would then just decode the first frame and the return value would be + * less than the packet size. In this case, avcodec_decode_audio4 has to be + * called again with an AVPacket containing the remaining data in order to + * decode the second frame, etc... Even if no frames are returned, the packet + * needs to be fed to the decoder with remaining data until it is completely + * consumed or an error occurs. + * + * Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input + * and output. This means that for some packets they will not immediately + * produce decoded output and need to be flushed at the end of decoding to get + * all the decoded data. Flushing is done by calling this function with packets + * with avpkt->data set to NULL and avpkt->size set to 0 until it stops + * returning samples. It is safe to flush even those decoders that are not + * marked with AV_CODEC_CAP_DELAY, then no samples will be returned. + * + * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE + * larger than the actual read bytes because some optimized bitstream + * readers read 32 or 64 bits at once and could read over the end. + * + * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() + * before packets may be fed to the decoder. + * + * @param avctx the codec context + * @param[out] frame The AVFrame in which to store decoded audio samples. + * The decoder will allocate a buffer for the decoded frame by + * calling the AVCodecContext.get_buffer2() callback. + * When AVCodecContext.refcounted_frames is set to 1, the frame is + * reference counted and the returned reference belongs to the + * caller. The caller must release the frame using av_frame_unref() + * when the frame is no longer needed. The caller may safely write + * to the frame if av_frame_is_writable() returns 1. + * When AVCodecContext.refcounted_frames is set to 0, the returned + * reference belongs to the decoder and is valid only until the + * next call to this function or until closing or flushing the + * decoder. The caller may not write to it. + * @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is + * non-zero. Note that this field being set to zero + * does not mean that an error has occurred. For + * decoders with AV_CODEC_CAP_DELAY set, no given decode + * call is guaranteed to produce a frame. + * @param[in] avpkt The input AVPacket containing the input buffer. + * At least avpkt->data and avpkt->size should be set. Some + * decoders might also require additional fields to be set. + * @return A negative error code is returned if an error occurred during + * decoding, otherwise the number of bytes consumed from the input + * AVPacket is returned. + * +* @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). + */ +attribute_deprecated +int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, + int *got_frame_ptr, const AVPacket *avpkt); + +/** + * Decode the video frame of size avpkt->size from avpkt->data into picture. + * Some decoders may support multiple frames in a single AVPacket, such + * decoders would then just decode the first frame. + * + * @warning The input buffer must be AV_INPUT_BUFFER_PADDING_SIZE larger than + * the actual read bytes because some optimized bitstream readers read 32 or 64 + * bits at once and could read over the end. + * + * @warning The end of the input buffer buf should be set to 0 to ensure that + * no overreading happens for damaged MPEG streams. + * + * @note Codecs which have the AV_CODEC_CAP_DELAY capability set have a delay + * between input and output, these need to be fed with avpkt->data=NULL, + * avpkt->size=0 at the end to return the remaining frames. + * + * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() + * before packets may be fed to the decoder. + * + * @param avctx the codec context + * @param[out] picture The AVFrame in which the decoded video frame will be stored. + * Use av_frame_alloc() to get an AVFrame. The codec will + * allocate memory for the actual bitmap by calling the + * AVCodecContext.get_buffer2() callback. + * When AVCodecContext.refcounted_frames is set to 1, the frame is + * reference counted and the returned reference belongs to the + * caller. The caller must release the frame using av_frame_unref() + * when the frame is no longer needed. The caller may safely write + * to the frame if av_frame_is_writable() returns 1. + * When AVCodecContext.refcounted_frames is set to 0, the returned + * reference belongs to the decoder and is valid only until the + * next call to this function or until closing or flushing the + * decoder. The caller may not write to it. + * + * @param[in] avpkt The input AVPacket containing the input buffer. + * You can create such packet with av_init_packet() and by then setting + * data and size, some decoders might in addition need other fields like + * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least + * fields possible. + * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. + * @return On error a negative value is returned, otherwise the number of bytes + * used or zero if no frame could be decompressed. + * + * @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). + */ +attribute_deprecated +int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, + int *got_picture_ptr, + const AVPacket *avpkt); + +/** + * Decode a subtitle message. + * Return a negative value on error, otherwise return the number of bytes used. + * If no subtitle could be decompressed, got_sub_ptr is zero. + * Otherwise, the subtitle is stored in *sub. + * Note that AV_CODEC_CAP_DR1 is not available for subtitle codecs. This is for + * simplicity, because the performance difference is expected to be negligible + * and reusing a get_buffer written for video codecs would probably perform badly + * due to a potentially very different allocation pattern. + * + * Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input + * and output. This means that for some packets they will not immediately + * produce decoded output and need to be flushed at the end of decoding to get + * all the decoded data. Flushing is done by calling this function with packets + * with avpkt->data set to NULL and avpkt->size set to 0 until it stops + * returning subtitles. It is safe to flush even those decoders that are not + * marked with AV_CODEC_CAP_DELAY, then no subtitles will be returned. + * + * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() + * before packets may be fed to the decoder. + * + * @param avctx the codec context + * @param[out] sub The preallocated AVSubtitle in which the decoded subtitle will be stored, + * must be freed with avsubtitle_free if *got_sub_ptr is set. + * @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero. + * @param[in] avpkt The input AVPacket containing the input buffer. + */ +int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, + int *got_sub_ptr, + AVPacket *avpkt); + +/** + * Supply raw packet data as input to a decoder. + * + * Internally, this call will copy relevant AVCodecContext fields, which can + * influence decoding per-packet, and apply them when the packet is actually + * decoded. (For example AVCodecContext.skip_frame, which might direct the + * decoder to drop the frame contained by the packet sent with this function.) + * + * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE + * larger than the actual read bytes because some optimized bitstream + * readers read 32 or 64 bits at once and could read over the end. + * + * @warning Do not mix this API with the legacy API (like avcodec_decode_video2()) + * on the same AVCodecContext. It will return unexpected results now + * or in future libavcodec versions. + * + * @note The AVCodecContext MUST have been opened with @ref avcodec_open2() + * before packets may be fed to the decoder. + * + * @param avctx codec context + * @param[in] avpkt The input AVPacket. Usually, this will be a single video + * frame, or several complete audio frames. + * Ownership of the packet remains with the caller, and the + * decoder will not write to the packet. The decoder may create + * a reference to the packet data (or copy it if the packet is + * not reference-counted). + * Unlike with older APIs, the packet is always fully consumed, + * and if it contains multiple frames (e.g. some audio codecs), + * will require you to call avcodec_receive_frame() multiple + * times afterwards before you can send a new packet. + * It can be NULL (or an AVPacket with data set to NULL and + * size set to 0); in this case, it is considered a flush + * packet, which signals the end of the stream. Sending the + * first flush packet will return success. Subsequent ones are + * unnecessary and will return AVERROR_EOF. If the decoder + * still has frames buffered, it will return them after sending + * a flush packet. + * + * @return 0 on success, otherwise negative error code: + * AVERROR(EAGAIN): input is not accepted in the current state - user + * must read output with avcodec_receive_frame() (once + * all output is read, the packet should be resent, and + * the call will not fail with EAGAIN). + * AVERROR_EOF: the decoder has been flushed, and no new packets can + * be sent to it (also returned if more than 1 flush + * packet is sent) + * AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush + * AVERROR(ENOMEM): failed to add packet to internal queue, or similar + * other errors: legitimate decoding errors + */ +int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt); + +/** + * Return decoded output data from a decoder. + * + * @param avctx codec context + * @param frame This will be set to a reference-counted video or audio + * frame (depending on the decoder type) allocated by the + * decoder. Note that the function will always call + * av_frame_unref(frame) before doing anything else. + * + * @return + * 0: success, a frame was returned + * AVERROR(EAGAIN): output is not available in this state - user must try + * to send new input + * AVERROR_EOF: the decoder has been fully flushed, and there will be + * no more output frames + * AVERROR(EINVAL): codec not opened, or it is an encoder + * AVERROR_INPUT_CHANGED: current decoded frame has changed parameters + * with respect to first decoded frame. Applicable + * when flag AV_CODEC_FLAG_DROPCHANGED is set. + * other negative values: legitimate decoding errors + */ +int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); + +/** + * Supply a raw video or audio frame to the encoder. Use avcodec_receive_packet() + * to retrieve buffered output packets. + * + * @param avctx codec context + * @param[in] frame AVFrame containing the raw audio or video frame to be encoded. + * Ownership of the frame remains with the caller, and the + * encoder will not write to the frame. The encoder may create + * a reference to the frame data (or copy it if the frame is + * not reference-counted). + * It can be NULL, in which case it is considered a flush + * packet. This signals the end of the stream. If the encoder + * still has packets buffered, it will return them after this + * call. Once flushing mode has been entered, additional flush + * packets are ignored, and sending frames will return + * AVERROR_EOF. + * + * For audio: + * If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame + * can have any number of samples. + * If it is not set, frame->nb_samples must be equal to + * avctx->frame_size for all frames except the last. + * The final frame may be smaller than avctx->frame_size. + * @return 0 on success, otherwise negative error code: + * AVERROR(EAGAIN): input is not accepted in the current state - user + * must read output with avcodec_receive_packet() (once + * all output is read, the packet should be resent, and + * the call will not fail with EAGAIN). + * AVERROR_EOF: the encoder has been flushed, and no new frames can + * be sent to it + * AVERROR(EINVAL): codec not opened, refcounted_frames not set, it is a + * decoder, or requires flush + * AVERROR(ENOMEM): failed to add packet to internal queue, or similar + * other errors: legitimate encoding errors + */ +int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame); + +/** + * Read encoded data from the encoder. + * + * @param avctx codec context + * @param avpkt This will be set to a reference-counted packet allocated by the + * encoder. Note that the function will always call + * av_packet_unref(avpkt) before doing anything else. + * @return 0 on success, otherwise negative error code: + * AVERROR(EAGAIN): output is not available in the current state - user + * must try to send input + * AVERROR_EOF: the encoder has been fully flushed, and there will be + * no more output packets + * AVERROR(EINVAL): codec not opened, or it is a decoder + * other errors: legitimate encoding errors + */ +int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); + +/** + * Create and return a AVHWFramesContext with values adequate for hardware + * decoding. This is meant to get called from the get_format callback, and is + * a helper for preparing a AVHWFramesContext for AVCodecContext.hw_frames_ctx. + * This API is for decoding with certain hardware acceleration modes/APIs only. + * + * The returned AVHWFramesContext is not initialized. The caller must do this + * with av_hwframe_ctx_init(). + * + * Calling this function is not a requirement, but makes it simpler to avoid + * codec or hardware API specific details when manually allocating frames. + * + * Alternatively to this, an API user can set AVCodecContext.hw_device_ctx, + * which sets up AVCodecContext.hw_frames_ctx fully automatically, and makes + * it unnecessary to call this function or having to care about + * AVHWFramesContext initialization at all. + * + * There are a number of requirements for calling this function: + * + * - It must be called from get_format with the same avctx parameter that was + * passed to get_format. Calling it outside of get_format is not allowed, and + * can trigger undefined behavior. + * - The function is not always supported (see description of return values). + * Even if this function returns successfully, hwaccel initialization could + * fail later. (The degree to which implementations check whether the stream + * is actually supported varies. Some do this check only after the user's + * get_format callback returns.) + * - The hw_pix_fmt must be one of the choices suggested by get_format. If the + * user decides to use a AVHWFramesContext prepared with this API function, + * the user must return the same hw_pix_fmt from get_format. + * - The device_ref passed to this function must support the given hw_pix_fmt. + * - After calling this API function, it is the user's responsibility to + * initialize the AVHWFramesContext (returned by the out_frames_ref parameter), + * and to set AVCodecContext.hw_frames_ctx to it. If done, this must be done + * before returning from get_format (this is implied by the normal + * AVCodecContext.hw_frames_ctx API rules). + * - The AVHWFramesContext parameters may change every time time get_format is + * called. Also, AVCodecContext.hw_frames_ctx is reset before get_format. So + * you are inherently required to go through this process again on every + * get_format call. + * - It is perfectly possible to call this function without actually using + * the resulting AVHWFramesContext. One use-case might be trying to reuse a + * previously initialized AVHWFramesContext, and calling this API function + * only to test whether the required frame parameters have changed. + * - Fields that use dynamically allocated values of any kind must not be set + * by the user unless setting them is explicitly allowed by the documentation. + * If the user sets AVHWFramesContext.free and AVHWFramesContext.user_opaque, + * the new free callback must call the potentially set previous free callback. + * This API call may set any dynamically allocated fields, including the free + * callback. + * + * The function will set at least the following fields on AVHWFramesContext + * (potentially more, depending on hwaccel API): + * + * - All fields set by av_hwframe_ctx_alloc(). + * - Set the format field to hw_pix_fmt. + * - Set the sw_format field to the most suited and most versatile format. (An + * implication is that this will prefer generic formats over opaque formats + * with arbitrary restrictions, if possible.) + * - Set the width/height fields to the coded frame size, rounded up to the + * API-specific minimum alignment. + * - Only _if_ the hwaccel requires a pre-allocated pool: set the initial_pool_size + * field to the number of maximum reference surfaces possible with the codec, + * plus 1 surface for the user to work (meaning the user can safely reference + * at most 1 decoded surface at a time), plus additional buffering introduced + * by frame threading. If the hwaccel does not require pre-allocation, the + * field is left to 0, and the decoder will allocate new surfaces on demand + * during decoding. + * - Possibly AVHWFramesContext.hwctx fields, depending on the underlying + * hardware API. + * + * Essentially, out_frames_ref returns the same as av_hwframe_ctx_alloc(), but + * with basic frame parameters set. + * + * The function is stateless, and does not change the AVCodecContext or the + * device_ref AVHWDeviceContext. + * + * @param avctx The context which is currently calling get_format, and which + * implicitly contains all state needed for filling the returned + * AVHWFramesContext properly. + * @param device_ref A reference to the AVHWDeviceContext describing the device + * which will be used by the hardware decoder. + * @param hw_pix_fmt The hwaccel format you are going to return from get_format. + * @param out_frames_ref On success, set to a reference to an _uninitialized_ + * AVHWFramesContext, created from the given device_ref. + * Fields will be set to values required for decoding. + * Not changed if an error is returned. + * @return zero on success, a negative value on error. The following error codes + * have special semantics: + * AVERROR(ENOENT): the decoder does not support this functionality. Setup + * is always manual, or it is a decoder which does not + * support setting AVCodecContext.hw_frames_ctx at all, + * or it is a software format. + * AVERROR(EINVAL): it is known that hardware decoding is not supported for + * this configuration, or the device_ref is not supported + * for the hwaccel referenced by hw_pix_fmt. + */ +int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, + AVBufferRef *device_ref, + enum AVPixelFormat hw_pix_fmt, + AVBufferRef **out_frames_ref); + + + +/** + * @defgroup lavc_parsing Frame parsing + * @{ + */ + +enum AVPictureStructure { + AV_PICTURE_STRUCTURE_UNKNOWN, //< unknown + AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field + AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field + AV_PICTURE_STRUCTURE_FRAME, //< coded as frame +}; + +typedef struct AVCodecParserContext { + void *priv_data; + struct AVCodecParser *parser; + int64_t frame_offset; /* offset of the current frame */ + int64_t cur_offset; /* current offset + (incremented by each av_parser_parse()) */ + int64_t next_frame_offset; /* offset of the next frame */ + /* video info */ + int pict_type; /* XXX: Put it back in AVCodecContext. */ + /** + * This field is used for proper frame duration computation in lavf. + * It signals, how much longer the frame duration of the current frame + * is compared to normal frame duration. + * + * frame_duration = (1 + repeat_pict) * time_base + * + * It is used by codecs like H.264 to display telecined material. + */ + int repeat_pict; /* XXX: Put it back in AVCodecContext. */ + int64_t pts; /* pts of the current frame */ + int64_t dts; /* dts of the current frame */ + + /* private data */ + int64_t last_pts; + int64_t last_dts; + int fetch_timestamp; + +#define AV_PARSER_PTS_NB 4 + int cur_frame_start_index; + int64_t cur_frame_offset[AV_PARSER_PTS_NB]; + int64_t cur_frame_pts[AV_PARSER_PTS_NB]; + int64_t cur_frame_dts[AV_PARSER_PTS_NB]; + + int flags; +#define PARSER_FLAG_COMPLETE_FRAMES 0x0001 +#define PARSER_FLAG_ONCE 0x0002 +/// Set if the parser has a valid file offset +#define PARSER_FLAG_FETCHED_OFFSET 0x0004 +#define PARSER_FLAG_USE_CODEC_TS 0x1000 + + int64_t offset; ///< byte offset from starting packet start + int64_t cur_frame_end[AV_PARSER_PTS_NB]; + + /** + * Set by parser to 1 for key frames and 0 for non-key frames. + * It is initialized to -1, so if the parser doesn't set this flag, + * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames + * will be used. + */ + int key_frame; + +#if FF_API_CONVERGENCE_DURATION + /** + * @deprecated unused + */ + attribute_deprecated + int64_t convergence_duration; +#endif + + // Timestamp generation support: + /** + * Synchronization point for start of timestamp generation. + * + * Set to >0 for sync point, 0 for no sync point and <0 for undefined + * (default). + * + * For example, this corresponds to presence of H.264 buffering period + * SEI message. + */ + int dts_sync_point; + + /** + * Offset of the current timestamp against last timestamp sync point in + * units of AVCodecContext.time_base. + * + * Set to INT_MIN when dts_sync_point unused. Otherwise, it must + * contain a valid timestamp offset. + * + * Note that the timestamp of sync point has usually a nonzero + * dts_ref_dts_delta, which refers to the previous sync point. Offset of + * the next frame after timestamp sync point will be usually 1. + * + * For example, this corresponds to H.264 cpb_removal_delay. + */ + int dts_ref_dts_delta; + + /** + * Presentation delay of current frame in units of AVCodecContext.time_base. + * + * Set to INT_MIN when dts_sync_point unused. Otherwise, it must + * contain valid non-negative timestamp delta (presentation time of a frame + * must not lie in the past). + * + * This delay represents the difference between decoding and presentation + * time of the frame. + * + * For example, this corresponds to H.264 dpb_output_delay. + */ + int pts_dts_delta; + + /** + * Position of the packet in file. + * + * Analogous to cur_frame_pts/dts + */ + int64_t cur_frame_pos[AV_PARSER_PTS_NB]; + + /** + * Byte position of currently parsed frame in stream. + */ + int64_t pos; + + /** + * Previous frame byte position. + */ + int64_t last_pos; + + /** + * Duration of the current frame. + * For audio, this is in units of 1 / AVCodecContext.sample_rate. + * For all other types, this is in units of AVCodecContext.time_base. + */ + int duration; + + enum AVFieldOrder field_order; + + /** + * Indicate whether a picture is coded as a frame, top field or bottom field. + * + * For example, H.264 field_pic_flag equal to 0 corresponds to + * AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag + * equal to 1 and bottom_field_flag equal to 0 corresponds to + * AV_PICTURE_STRUCTURE_TOP_FIELD. + */ + enum AVPictureStructure picture_structure; + + /** + * Picture number incremented in presentation or output order. + * This field may be reinitialized at the first picture of a new sequence. + * + * For example, this corresponds to H.264 PicOrderCnt. + */ + int output_picture_number; + + /** + * Dimensions of the decoded video intended for presentation. + */ + int width; + int height; + + /** + * Dimensions of the coded video. + */ + int coded_width; + int coded_height; + + /** + * The format of the coded data, corresponds to enum AVPixelFormat for video + * and for enum AVSampleFormat for audio. + * + * Note that a decoder can have considerable freedom in how exactly it + * decodes the data, so the format reported here might be different from the + * one returned by a decoder. + */ + int format; +} AVCodecParserContext; + +typedef struct AVCodecParser { + int codec_ids[5]; /* several codec IDs are permitted */ + int priv_data_size; + int (*parser_init)(AVCodecParserContext *s); + /* This callback never returns an error, a negative value means that + * the frame start was in a previous packet. */ + int (*parser_parse)(AVCodecParserContext *s, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size); + void (*parser_close)(AVCodecParserContext *s); + int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); + struct AVCodecParser *next; +} AVCodecParser; + +/** + * Iterate over all registered codec parsers. + * + * @param opaque a pointer where libavcodec will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered codec parser or NULL when the iteration is + * finished + */ +const AVCodecParser *av_parser_iterate(void **opaque); + +attribute_deprecated +AVCodecParser *av_parser_next(const AVCodecParser *c); + +attribute_deprecated +void av_register_codec_parser(AVCodecParser *parser); +AVCodecParserContext *av_parser_init(int codec_id); + +/** + * Parse a packet. + * + * @param s parser context. + * @param avctx codec context. + * @param poutbuf set to pointer to parsed buffer or NULL if not yet finished. + * @param poutbuf_size set to size of parsed buffer or zero if not yet finished. + * @param buf input buffer. + * @param buf_size buffer size in bytes without the padding. I.e. the full buffer + size is assumed to be buf_size + AV_INPUT_BUFFER_PADDING_SIZE. + To signal EOF, this should be 0 (so that the last frame + can be output). + * @param pts input presentation timestamp. + * @param dts input decoding timestamp. + * @param pos input byte position in stream. + * @return the number of bytes of the input bitstream used. + * + * Example: + * @code + * while(in_len){ + * len = av_parser_parse2(myparser, AVCodecContext, &data, &size, + * in_data, in_len, + * pts, dts, pos); + * in_data += len; + * in_len -= len; + * + * if(size) + * decode_frame(data, size); + * } + * @endcode + */ +int av_parser_parse2(AVCodecParserContext *s, + AVCodecContext *avctx, + uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size, + int64_t pts, int64_t dts, + int64_t pos); + +/** + * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed + * @deprecated use AVBitStreamFilter + */ +int av_parser_change(AVCodecParserContext *s, + AVCodecContext *avctx, + uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size, int keyframe); +void av_parser_close(AVCodecParserContext *s); + +/** + * @} + * @} + */ + +/** + * @addtogroup lavc_encoding + * @{ + */ + +/** + * Encode a frame of audio. + * + * Takes input samples from frame and writes the next output packet, if + * available, to avpkt. The output packet does not necessarily contain data for + * the most recent frame, as encoders can delay, split, and combine input frames + * internally as needed. + * + * @param avctx codec context + * @param avpkt output AVPacket. + * The user can supply an output buffer by setting + * avpkt->data and avpkt->size prior to calling the + * function, but if the size of the user-provided data is not + * large enough, encoding will fail. If avpkt->data and + * avpkt->size are set, avpkt->destruct must also be set. All + * other AVPacket fields will be reset by the encoder using + * av_init_packet(). If avpkt->data is NULL, the encoder will + * allocate it. The encoder will set avpkt->size to the size + * of the output packet. + * + * If this function fails or produces no output, avpkt will be + * freed using av_packet_unref(). + * @param[in] frame AVFrame containing the raw audio data to be encoded. + * May be NULL when flushing an encoder that has the + * AV_CODEC_CAP_DELAY capability set. + * If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame + * can have any number of samples. + * If it is not set, frame->nb_samples must be equal to + * avctx->frame_size for all frames except the last. + * The final frame may be smaller than avctx->frame_size. + * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the + * output packet is non-empty, and to 0 if it is + * empty. If the function returns an error, the + * packet can be assumed to be invalid, and the + * value of got_packet_ptr is undefined and should + * not be used. + * @return 0 on success, negative error code on failure + * + * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead + */ +attribute_deprecated +int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); + +/** + * Encode a frame of video. + * + * Takes input raw video data from frame and writes the next output packet, if + * available, to avpkt. The output packet does not necessarily contain data for + * the most recent frame, as encoders can delay and reorder input frames + * internally as needed. + * + * @param avctx codec context + * @param avpkt output AVPacket. + * The user can supply an output buffer by setting + * avpkt->data and avpkt->size prior to calling the + * function, but if the size of the user-provided data is not + * large enough, encoding will fail. All other AVPacket fields + * will be reset by the encoder using av_init_packet(). If + * avpkt->data is NULL, the encoder will allocate it. + * The encoder will set avpkt->size to the size of the + * output packet. The returned data (if any) belongs to the + * caller, he is responsible for freeing it. + * + * If this function fails or produces no output, avpkt will be + * freed using av_packet_unref(). + * @param[in] frame AVFrame containing the raw video data to be encoded. + * May be NULL when flushing an encoder that has the + * AV_CODEC_CAP_DELAY capability set. + * @param[out] got_packet_ptr This field is set to 1 by libavcodec if the + * output packet is non-empty, and to 0 if it is + * empty. If the function returns an error, the + * packet can be assumed to be invalid, and the + * value of got_packet_ptr is undefined and should + * not be used. + * @return 0 on success, negative error code on failure + * + * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead + */ +attribute_deprecated +int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); + +int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, + const AVSubtitle *sub); + + +/** + * @} + */ + +#if FF_API_AVPICTURE +/** + * @addtogroup lavc_picture + * @{ + */ + +/** + * @deprecated unused + */ +attribute_deprecated +int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height); + +/** + * @deprecated unused + */ +attribute_deprecated +void avpicture_free(AVPicture *picture); + +/** + * @deprecated use av_image_fill_arrays() instead. + */ +attribute_deprecated +int avpicture_fill(AVPicture *picture, const uint8_t *ptr, + enum AVPixelFormat pix_fmt, int width, int height); + +/** + * @deprecated use av_image_copy_to_buffer() instead. + */ +attribute_deprecated +int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, + int width, int height, + unsigned char *dest, int dest_size); + +/** + * @deprecated use av_image_get_buffer_size() instead. + */ +attribute_deprecated +int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); + +/** + * @deprecated av_image_copy() instead. + */ +attribute_deprecated +void av_picture_copy(AVPicture *dst, const AVPicture *src, + enum AVPixelFormat pix_fmt, int width, int height); + +/** + * @deprecated unused + */ +attribute_deprecated +int av_picture_crop(AVPicture *dst, const AVPicture *src, + enum AVPixelFormat pix_fmt, int top_band, int left_band); + +/** + * @deprecated unused + */ +attribute_deprecated +int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, + int padtop, int padbottom, int padleft, int padright, int *color); + +/** + * @} + */ +#endif + +/** + * @defgroup lavc_misc Utility functions + * @ingroup libavc + * + * Miscellaneous utility functions related to both encoding and decoding + * (or neither). + * @{ + */ + +/** + * @defgroup lavc_misc_pixfmt Pixel formats + * + * Functions for working with pixel formats. + * @{ + */ + +#if FF_API_GETCHROMA +/** + * @deprecated Use av_pix_fmt_get_chroma_sub_sample + */ + +attribute_deprecated +void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift); +#endif + +/** + * Return a value representing the fourCC code associated to the + * pixel format pix_fmt, or 0 if no associated fourCC code can be + * found. + */ +unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt); + +/** + * @deprecated see av_get_pix_fmt_loss() + */ +int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, + int has_alpha); + +/** + * Find the best pixel format to convert to given a certain source pixel + * format. When converting from one pixel format to another, information loss + * may occur. For example, when converting from RGB24 to GRAY, the color + * information will be lost. Similarly, other losses occur when converting from + * some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of + * the given pixel formats should be used to suffer the least amount of loss. + * The pixel formats from which it chooses one, are determined by the + * pix_fmt_list parameter. + * + * + * @param[in] pix_fmt_list AV_PIX_FMT_NONE terminated array of pixel formats to choose from + * @param[in] src_pix_fmt source pixel format + * @param[in] has_alpha Whether the source pixel format alpha channel is used. + * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. + * @return The best pixel format to convert to or -1 if none was found. + */ +enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list, + enum AVPixelFormat src_pix_fmt, + int has_alpha, int *loss_ptr); + +/** + * @deprecated see av_find_best_pix_fmt_of_2() + */ +enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, + enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); + +attribute_deprecated +enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, + enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); + +enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt); + +/** + * @} + */ + +#if FF_API_TAG_STRING +/** + * Put a string representing the codec tag codec_tag in buf. + * + * @param buf buffer to place codec tag in + * @param buf_size size in bytes of buf + * @param codec_tag codec tag to assign + * @return the length of the string that would have been generated if + * enough space had been available, excluding the trailing null + * + * @deprecated see av_fourcc_make_string() and av_fourcc2str(). + */ +attribute_deprecated +size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag); +#endif + +void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); + +/** + * Return a name for the specified profile, if available. + * + * @param codec the codec that is searched for the given profile + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + */ +const char *av_get_profile_name(const AVCodec *codec, int profile); + +/** + * Return a name for the specified profile, if available. + * + * @param codec_id the ID of the codec to which the requested profile belongs + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + * + * @note unlike av_get_profile_name(), which searches a list of profiles + * supported by a specific decoder or encoder implementation, this + * function searches the list of profiles from the AVCodecDescriptor + */ +const char *avcodec_profile_name(enum AVCodecID codec_id, int profile); + +int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size); +int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); +//FIXME func typedef + +/** + * Fill AVFrame audio data and linesize pointers. + * + * The buffer buf must be a preallocated buffer with a size big enough + * to contain the specified samples amount. The filled AVFrame data + * pointers will point to this buffer. + * + * AVFrame extended_data channel pointers are allocated if necessary for + * planar audio. + * + * @param frame the AVFrame + * frame->nb_samples must be set prior to calling the + * function. This function fills in frame->data, + * frame->extended_data, frame->linesize[0]. + * @param nb_channels channel count + * @param sample_fmt sample format + * @param buf buffer to use for frame data + * @param buf_size size of buffer + * @param align plane size sample alignment (0 = default) + * @return >=0 on success, negative error code on failure + * @todo return the size in bytes required to store the samples in + * case of success, at the next libavutil bump + */ +int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, + enum AVSampleFormat sample_fmt, const uint8_t *buf, + int buf_size, int align); + +/** + * Reset the internal codec state / flush internal buffers. Should be called + * e.g. when seeking or when switching to a different stream. + * + * @note for decoders, when refcounted frames are not used + * (i.e. avctx->refcounted_frames is 0), this invalidates the frames previously + * returned from the decoder. When refcounted frames are used, the decoder just + * releases any references it might keep internally, but the caller's reference + * remains valid. + * + * @note for encoders, this function will only do something if the encoder + * declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder + * will drain any remaining packets, and can then be re-used for a different + * stream (as opposed to sending a null frame which will leave the encoder + * in a permanent EOF state after draining). This can be desirable if the + * cost of tearing down and replacing the encoder instance is high. + */ +void avcodec_flush_buffers(AVCodecContext *avctx); + +/** + * Return codec bits per sample. + * + * @param[in] codec_id the codec + * @return Number of bits per sample or zero if unknown for the given codec. + */ +int av_get_bits_per_sample(enum AVCodecID codec_id); + +/** + * Return the PCM codec associated with a sample format. + * @param be endianness, 0 for little, 1 for big, + * -1 (or anything else) for native + * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE + */ +enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be); + +/** + * Return codec bits per sample. + * Only return non-zero if the bits per sample is exactly correct, not an + * approximation. + * + * @param[in] codec_id the codec + * @return Number of bits per sample or zero if unknown for the given codec. + */ +int av_get_exact_bits_per_sample(enum AVCodecID codec_id); + +/** + * Return audio frame duration. + * + * @param avctx codec context + * @param frame_bytes size of the frame, or 0 if unknown + * @return frame duration, in samples, if known. 0 if not able to + * determine. + */ +int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes); + +/** + * This function is the same as av_get_audio_frame_duration(), except it works + * with AVCodecParameters instead of an AVCodecContext. + */ +int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes); + +#if FF_API_OLD_BSF +typedef struct AVBitStreamFilterContext { + void *priv_data; + const struct AVBitStreamFilter *filter; + AVCodecParserContext *parser; + struct AVBitStreamFilterContext *next; + /** + * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter(). + * Not for access by library users. + */ + char *args; +} AVBitStreamFilterContext; + +/** + * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) + * is deprecated. Use the new bitstream filtering API (using AVBSFContext). + */ +attribute_deprecated +void av_register_bitstream_filter(AVBitStreamFilter *bsf); +/** + * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) + * is deprecated. Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init() + * from the new bitstream filtering API (using AVBSFContext). + */ +attribute_deprecated +AVBitStreamFilterContext *av_bitstream_filter_init(const char *name); +/** + * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) + * is deprecated. Use av_bsf_send_packet() and av_bsf_receive_packet() from the + * new bitstream filtering API (using AVBSFContext). + */ +attribute_deprecated +int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, + AVCodecContext *avctx, const char *args, + uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size, int keyframe); +/** + * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) + * is deprecated. Use av_bsf_free() from the new bitstream filtering API (using + * AVBSFContext). + */ +attribute_deprecated +void av_bitstream_filter_close(AVBitStreamFilterContext *bsf); +/** + * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) + * is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using + * AVBSFContext). + */ +attribute_deprecated +const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f); +#endif + +#if FF_API_NEXT +attribute_deprecated +const AVBitStreamFilter *av_bsf_next(void **opaque); +#endif + +/* memory */ + +/** + * Same behaviour av_fast_malloc but the buffer has additional + * AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0. + * + * In addition the whole buffer will initially and after resizes + * be 0-initialized so that no uninitialized data will ever appear. + */ +void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size); + +/** + * Same behaviour av_fast_padded_malloc except that buffer will always + * be 0-initialized after call. + */ +void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size); + +/** + * Encode extradata length to a buffer. Used by xiph codecs. + * + * @param s buffer to write to; must be at least (v/255+1) bytes long + * @param v size of extradata in bytes + * @return number of bytes written to the buffer. + */ +unsigned int av_xiphlacing(unsigned char *s, unsigned int v); + +#if FF_API_USER_VISIBLE_AVHWACCEL +/** + * Register the hardware accelerator hwaccel. + * + * @deprecated This function doesn't do anything. + */ +attribute_deprecated +void av_register_hwaccel(AVHWAccel *hwaccel); + +/** + * If hwaccel is NULL, returns the first registered hardware accelerator, + * if hwaccel is non-NULL, returns the next registered hardware accelerator + * after hwaccel, or NULL if hwaccel is the last one. + * + * @deprecated AVHWaccel structures contain no user-serviceable parts, so + * this function should not be used. + */ +attribute_deprecated +AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel); +#endif + +#if FF_API_LOCKMGR +/** + * Lock operation used by lockmgr + * + * @deprecated Deprecated together with av_lockmgr_register(). + */ +enum AVLockOp { + AV_LOCK_CREATE, ///< Create a mutex + AV_LOCK_OBTAIN, ///< Lock the mutex + AV_LOCK_RELEASE, ///< Unlock the mutex + AV_LOCK_DESTROY, ///< Free mutex resources +}; + +/** + * Register a user provided lock manager supporting the operations + * specified by AVLockOp. The "mutex" argument to the function points + * to a (void *) where the lockmgr should store/get a pointer to a user + * allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the + * value left by the last call for all other ops. If the lock manager is + * unable to perform the op then it should leave the mutex in the same + * state as when it was called and return a non-zero value. However, + * when called with AV_LOCK_DESTROY the mutex will always be assumed to + * have been successfully destroyed. If av_lockmgr_register succeeds + * it will return a non-negative value, if it fails it will return a + * negative value and destroy all mutex and unregister all callbacks. + * av_lockmgr_register is not thread-safe, it must be called from a + * single thread before any calls which make use of locking are used. + * + * @param cb User defined callback. av_lockmgr_register invokes calls + * to this callback and the previously registered callback. + * The callback will be used to create more than one mutex + * each of which must be backed by its own underlying locking + * mechanism (i.e. do not use a single static object to + * implement your lock manager). If cb is set to NULL the + * lockmgr will be unregistered. + * + * @deprecated This function does nothing, and always returns 0. Be sure to + * build with thread support to get basic thread safety. + */ +attribute_deprecated +int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); +#endif + +/** + * @return a positive value if s is open (i.e. avcodec_open2() was called on it + * with no corresponding avcodec_close()), 0 otherwise. + */ +int avcodec_is_open(AVCodecContext *s); + +/** + * Allocate a CPB properties structure and initialize its fields to default + * values. + * + * @param size if non-NULL, the size of the allocated struct will be written + * here. This is useful for embedding it in side data. + * + * @return the newly allocated struct or NULL on failure + */ +AVCPBProperties *av_cpb_properties_alloc(size_t *size); + +/** + * @} + */ + +#endif /* AVCODEC_AVCODEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avdct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avdct.h new file mode 100644 index 00000000..6411fab6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avdct.h @@ -0,0 +1,88 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AVDCT_H +#define AVCODEC_AVDCT_H + +#include "libavutil/opt.h" + +/** + * AVDCT context. + * @note function pointers can be NULL if the specific features have been + * disabled at build time. + */ +typedef struct AVDCT { + const AVClass *av_class; + + void (*idct)(int16_t *block /* align 16 */); + + /** + * IDCT input permutation. + * Several optimized IDCTs need a permutated input (relative to the + * normal order of the reference IDCT). + * This permutation must be performed before the idct_put/add. + * Note, normally this can be merged with the zigzag/alternate scan
+ * An example to avoid confusion: + * - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...) + * - (x -> reference DCT -> reference IDCT -> x) + * - (x -> reference DCT -> simple_mmx_perm = idct_permutation + * -> simple_idct_mmx -> x) + * - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant + * -> simple_idct_mmx -> ...) + */ + uint8_t idct_permutation[64]; + + void (*fdct)(int16_t *block /* align 16 */); + + + /** + * DCT algorithm. + * must use AVOptions to set this field. + */ + int dct_algo; + + /** + * IDCT algorithm. + * must use AVOptions to set this field. + */ + int idct_algo; + + void (*get_pixels)(int16_t *block /* align 16 */, + const uint8_t *pixels /* align 8 */, + ptrdiff_t line_size); + + int bits_per_sample; + + void (*get_pixels_unaligned)(int16_t *block /* align 16 */, + const uint8_t *pixels, + ptrdiff_t line_size); +} AVDCT; + +/** + * Allocates a AVDCT context. + * This needs to be initialized with avcodec_dct_init() after optionally + * configuring it with AVOptions. + * + * To free it use av_free() + */ +AVDCT *avcodec_dct_alloc(void); +int avcodec_dct_init(AVDCT *); + +const AVClass *avcodec_dct_get_class(void); + +#endif /* AVCODEC_AVDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avfft.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avfft.h new file mode 100644 index 00000000..0c0f9b8d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avfft.h @@ -0,0 +1,118 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AVFFT_H +#define AVCODEC_AVFFT_H + +/** + * @file + * @ingroup lavc_fft + * FFT functions + */ + +/** + * @defgroup lavc_fft FFT functions + * @ingroup lavc_misc + * + * @{ + */ + +typedef float FFTSample; + +typedef struct FFTComplex { + FFTSample re, im; +} FFTComplex; + +typedef struct FFTContext FFTContext; + +/** + * Set up a complex FFT. + * @param nbits log2 of the length of the input array + * @param inverse if 0 perform the forward transform, if 1 perform the inverse + */ +FFTContext *av_fft_init(int nbits, int inverse); + +/** + * Do the permutation needed BEFORE calling ff_fft_calc(). + */ +void av_fft_permute(FFTContext *s, FFTComplex *z); + +/** + * Do a complex FFT with the parameters defined in av_fft_init(). The + * input data must be permuted before. No 1.0/sqrt(n) normalization is done. + */ +void av_fft_calc(FFTContext *s, FFTComplex *z); + +void av_fft_end(FFTContext *s); + +FFTContext *av_mdct_init(int nbits, int inverse, double scale); +void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); +void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input); +void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); +void av_mdct_end(FFTContext *s); + +/* Real Discrete Fourier Transform */ + +enum RDFTransformType { + DFT_R2C, + IDFT_C2R, + IDFT_R2C, + DFT_C2R, +}; + +typedef struct RDFTContext RDFTContext; + +/** + * Set up a real FFT. + * @param nbits log2 of the length of the input array + * @param trans the type of transform + */ +RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans); +void av_rdft_calc(RDFTContext *s, FFTSample *data); +void av_rdft_end(RDFTContext *s); + +/* Discrete Cosine Transform */ + +typedef struct DCTContext DCTContext; + +enum DCTTransformType { + DCT_II = 0, + DCT_III, + DCT_I, + DST_I, +}; + +/** + * Set up DCT. + * + * @param nbits size of the input array: + * (1 << nbits) for DCT-II, DCT-III and DST-I + * (1 << nbits) + 1 for DCT-I + * @param type the type of transform + * + * @note the first element of the input of DST-I is ignored + */ +DCTContext *av_dct_init(int nbits, enum DCTTransformType type); +void av_dct_calc(DCTContext *s, FFTSample *data); +void av_dct_end (DCTContext *s); + +/** + * @} + */ + +#endif /* AVCODEC_AVFFT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avr32/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avr32/mathops.h new file mode 100644 index 00000000..85f42b59 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/avr32/mathops.h @@ -0,0 +1,101 @@ +/* + * Simple math operations + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AVR32_MATHOPS_H +#define AVCODEC_AVR32_MATHOPS_H + +#include +#include "config.h" +#include "libavutil/common.h" + +#if HAVE_INLINE_ASM + +#define MULL MULL +static inline av_const int MULL(int a, int b, unsigned shift) +{ + union { int64_t x; int hl[2]; } x; + __asm__ ("muls.d %0, %1, %2 \n\t" + "lsr %0, %3 \n\t" + "or %0, %0, %m0<<%4 \n\t" + : "=r"(x) : "r"(b), "r"(a), "i"(shift), "i"(32-shift)); + return x.hl[1]; +} + +#define MULH MULH +static inline av_const int MULH(int a, int b) +{ + union { int64_t x; int hl[2]; } x; + __asm__ ("muls.d %0, %1, %2" : "=r"(x.x) : "r"(a), "r"(b)); + return x.hl[0]; +} + +#define MUL64 MUL64 +static inline av_const int64_t MUL64(int a, int b) +{ + int64_t x; + __asm__ ("muls.d %0, %1, %2" : "=r"(x) : "r"(a), "r"(b)); + return x; +} + +static inline av_const int64_t MAC64(int64_t d, int a, int b) +{ + __asm__ ("macs.d %0, %1, %2" : "+r"(d) : "r"(a), "r"(b)); + return d; +} +#define MAC64(d, a, b) ((d) = MAC64(d, a, b)) +#define MLS64(d, a, b) MAC64(d, -(a), b) + +static inline av_const int MAC16(int d, int a, int b) +{ + __asm__ ("machh.w %0, %1:b, %2:b" : "+r"(d) : "r"(a), "r"(b)); + return d; +} +#define MAC16(d, a, b) ((d) = MAC16(d, a, b)) +#define MLS16(d, a, b) MAC16(d, -(a), b) + +#define MUL16 MUL16 +static inline av_const int MUL16(int a, int b) +{ + int d; + __asm__ ("mulhh.w %0, %1:b, %2:b" : "=r"(d) : "r"(a), "r"(b)); + return d; +} + +#define mid_pred mid_pred +static inline av_const int mid_pred(int a, int b, int c) +{ + int m; + __asm__ ("mov %0, %2 \n\t" + "cp.w %1, %2 \n\t" + "movgt %0, %1 \n\t" + "movgt %1, %2 \n\t" + "cp.w %1, %3 \n\t" + "movle %1, %3 \n\t" + "cp.w %0, %1 \n\t" + "movgt %0, %1 \n\t" + : "=&r"(m), "+r"(a) + : "r"(b), "r"(c)); + return m; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_AVR32_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bethsoftvideo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bethsoftvideo.h new file mode 100644 index 00000000..d5b5d0a5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bethsoftvideo.h @@ -0,0 +1,36 @@ +/* + * Bethesda VID video decoder + * Copyright (C) 2007 Nicholas Tung + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BETHSOFTVIDEO_H +#define AVCODEC_BETHSOFTVIDEO_H + +enum BethsoftVidBlockType +{ + PALETTE_BLOCK = 0x02, + FIRST_AUDIO_BLOCK = 0x7c, + AUDIO_BLOCK = 0x7d, + VIDEO_I_FRAME = 0x03, + VIDEO_P_FRAME = 0x01, + VIDEO_YOFF_P_FRAME = 0x04, + EOF_BLOCK = 0x14, +}; + +#endif /* AVCODEC_BETHSOFTVIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bgmc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bgmc.h new file mode 100644 index 00000000..466df31a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bgmc.h @@ -0,0 +1,56 @@ +/* + * Block Gilbert-Moore decoder + * Copyright (c) 2010 Thilo Borgmann + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Block Gilbert-Moore decoder header + * @author Thilo Borgmann + */ + + +#ifndef AVCODEC_BGMC_H +#define AVCODEC_BGMC_H + + +#include "avcodec.h" +#include "get_bits.h" + + +int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status); + + +void ff_bgmc_end(uint8_t **cf_lut, int **cf_lut_status); + + +int ff_bgmc_decode_init(GetBitContext *gb, + unsigned int *h, unsigned int *l, unsigned int *v); + + +void ff_bgmc_decode_end(GetBitContext *gb); + + +void ff_bgmc_decode(GetBitContext *gb, unsigned int num, int32_t *dst, + int delta, unsigned int sx, + unsigned int *h, unsigned int *l, unsigned int *v, + uint8_t *cf_lut, int *cf_lut_status); + + +#endif /* AVCODEC_BGMC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdata.h new file mode 100644 index 00000000..57619bee --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdata.h @@ -0,0 +1,655 @@ +/* + * Bink video decoder + * Copyright (C) 2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BINKDATA_H +#define AVCODEC_BINKDATA_H + +#include + +/** Bink DCT and residue 8x8 block scan order */ +static const uint8_t bink_scan[64] = { + 0, 1, 8, 9, 2, 3, 10, 11, + 4, 5, 12, 13, 6, 7, 14, 15, + 20, 21, 28, 29, 22, 23, 30, 31, + 16, 17, 24, 25, 32, 33, 40, 41, + 34, 35, 42, 43, 48, 49, 56, 57, + 50, 51, 58, 59, 18, 19, 26, 27, + 36, 37, 44, 45, 38, 39, 46, 47, + 52, 53, 60, 61, 54, 55, 62, 63 +}; + +static const uint8_t bink_tree_bits[16][16] = { + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + }, + { + 0x00, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, + 0x0F, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F, + }, + { + 0x00, 0x02, 0x01, 0x09, 0x05, 0x15, 0x0D, 0x1D, + 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F, + }, + { + 0x00, 0x02, 0x06, 0x01, 0x09, 0x05, 0x0D, 0x1D, + 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F, + }, + { + 0x00, 0x04, 0x02, 0x06, 0x01, 0x09, 0x05, 0x0D, + 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F, + }, + { + 0x00, 0x04, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, + 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x17, 0x0F, 0x1F, + }, + { + 0x00, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, + 0x0D, 0x03, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F, + }, + { + 0x00, 0x01, 0x05, 0x03, 0x13, 0x0B, 0x1B, 0x3B, + 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x01, 0x03, 0x13, 0x0B, 0x2B, 0x1B, 0x3B, + 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x01, 0x05, 0x0D, 0x03, 0x13, 0x0B, 0x1B, + 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x02, 0x01, 0x05, 0x0D, 0x03, 0x13, 0x0B, + 0x1B, 0x07, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x13, 0x0B, + 0x1B, 0x07, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x02, 0x01, 0x03, 0x13, 0x0B, 0x1B, 0x3B, + 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F, + }, + { + 0x00, 0x01, 0x05, 0x03, 0x07, 0x27, 0x17, 0x37, + 0x0F, 0x4F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F, + }, + { + 0x00, 0x01, 0x05, 0x03, 0x07, 0x17, 0x37, 0x77, + 0x0F, 0x4F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F, + }, + { + 0x00, 0x02, 0x01, 0x05, 0x03, 0x07, 0x27, 0x17, + 0x37, 0x0F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F, + }, +}; + +static const uint8_t bink_tree_lens[16][16] = { + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 1, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 2, 2, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 }, + { 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5 }, + { 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5 }, + { 1, 3, 3, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, + { 1, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, + { 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6 }, + { 2, 2, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 }, + { 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 }, + { 2, 2, 2, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, + { 1, 3, 3, 3, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 1, 3, 3, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 }, + { 2, 2, 3, 3, 3, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 }, +}; + +static const uint8_t bink_patterns[16][64] = { + { + 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, + 0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01, + 0x02, 0x0A, 0x12, 0x1A, 0x22, 0x2A, 0x32, 0x3A, + 0x3B, 0x33, 0x2B, 0x23, 0x1B, 0x13, 0x0B, 0x03, + 0x04, 0x0C, 0x14, 0x1C, 0x24, 0x2C, 0x34, 0x3C, + 0x3D, 0x35, 0x2D, 0x25, 0x1D, 0x15, 0x0D, 0x05, + 0x06, 0x0E, 0x16, 0x1E, 0x26, 0x2E, 0x36, 0x3E, + 0x3F, 0x37, 0x2F, 0x27, 0x1F, 0x17, 0x0F, 0x07, + }, + { + 0x3B, 0x3A, 0x39, 0x38, 0x30, 0x31, 0x32, 0x33, + 0x2B, 0x2A, 0x29, 0x28, 0x20, 0x21, 0x22, 0x23, + 0x1B, 0x1A, 0x19, 0x18, 0x10, 0x11, 0x12, 0x13, + 0x0B, 0x0A, 0x09, 0x08, 0x00, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x06, 0x07, 0x0F, 0x0E, 0x0D, 0x0C, + 0x14, 0x15, 0x16, 0x17, 0x1F, 0x1E, 0x1D, 0x1C, + 0x24, 0x25, 0x26, 0x27, 0x2F, 0x2E, 0x2D, 0x2C, + 0x34, 0x35, 0x36, 0x37, 0x3F, 0x3E, 0x3D, 0x3C, + }, + { + 0x19, 0x11, 0x12, 0x1A, 0x1B, 0x13, 0x0B, 0x03, + 0x02, 0x0A, 0x09, 0x01, 0x00, 0x08, 0x10, 0x18, + 0x20, 0x28, 0x30, 0x38, 0x39, 0x31, 0x29, 0x2A, + 0x32, 0x3A, 0x3B, 0x33, 0x2B, 0x23, 0x22, 0x21, + 0x1D, 0x15, 0x16, 0x1E, 0x1F, 0x17, 0x0F, 0x07, + 0x06, 0x0E, 0x0D, 0x05, 0x04, 0x0C, 0x14, 0x1C, + 0x24, 0x2C, 0x34, 0x3C, 0x3D, 0x35, 0x2D, 0x2E, + 0x36, 0x3E, 0x3F, 0x37, 0x2F, 0x27, 0x26, 0x25, + }, + { + 0x03, 0x0B, 0x02, 0x0A, 0x01, 0x09, 0x00, 0x08, + 0x10, 0x18, 0x11, 0x19, 0x12, 0x1A, 0x13, 0x1B, + 0x23, 0x2B, 0x22, 0x2A, 0x21, 0x29, 0x20, 0x28, + 0x30, 0x38, 0x31, 0x39, 0x32, 0x3A, 0x33, 0x3B, + 0x3C, 0x34, 0x3D, 0x35, 0x3E, 0x36, 0x3F, 0x37, + 0x2F, 0x27, 0x2E, 0x26, 0x2D, 0x25, 0x2C, 0x24, + 0x1C, 0x14, 0x1D, 0x15, 0x1E, 0x16, 0x1F, 0x17, + 0x0F, 0x07, 0x0E, 0x06, 0x0D, 0x05, 0x0C, 0x04, + }, + { + 0x18, 0x19, 0x10, 0x11, 0x08, 0x09, 0x00, 0x01, + 0x02, 0x03, 0x0A, 0x0B, 0x12, 0x13, 0x1A, 0x1B, + 0x1C, 0x1D, 0x14, 0x15, 0x0C, 0x0D, 0x04, 0x05, + 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F, + 0x27, 0x26, 0x2F, 0x2E, 0x37, 0x36, 0x3F, 0x3E, + 0x3D, 0x3C, 0x35, 0x34, 0x2D, 0x2C, 0x25, 0x24, + 0x23, 0x22, 0x2B, 0x2A, 0x33, 0x32, 0x3B, 0x3A, + 0x39, 0x38, 0x31, 0x30, 0x29, 0x28, 0x21, 0x20, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B, + 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B, + 0x20, 0x21, 0x22, 0x23, 0x28, 0x29, 0x2A, 0x2B, + 0x30, 0x31, 0x32, 0x33, 0x38, 0x39, 0x3A, 0x3B, + 0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F, + 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F, + 0x24, 0x25, 0x26, 0x27, 0x2C, 0x2D, 0x2E, 0x2F, + 0x34, 0x35, 0x36, 0x37, 0x3C, 0x3D, 0x3E, 0x3F, + }, + { + 0x06, 0x07, 0x0F, 0x0E, 0x0D, 0x05, 0x0C, 0x04, + 0x03, 0x0B, 0x02, 0x0A, 0x09, 0x01, 0x00, 0x08, + 0x10, 0x18, 0x11, 0x19, 0x12, 0x1A, 0x13, 0x1B, + 0x14, 0x1C, 0x15, 0x1D, 0x16, 0x1E, 0x17, 0x1F, + 0x27, 0x2F, 0x26, 0x2E, 0x25, 0x2D, 0x24, 0x2C, + 0x23, 0x2B, 0x22, 0x2A, 0x21, 0x29, 0x20, 0x28, + 0x31, 0x30, 0x38, 0x39, 0x3A, 0x32, 0x3B, 0x33, + 0x3C, 0x34, 0x3D, 0x35, 0x36, 0x37, 0x3F, 0x3E, + }, + { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x2F, 0x2E, 0x2D, 0x2C, 0x2B, 0x2A, 0x29, 0x28, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x3F, 0x3E, 0x3D, 0x3C, 0x3B, 0x3A, 0x39, 0x38, + }, + { + 0x00, 0x08, 0x09, 0x01, 0x02, 0x03, 0x0B, 0x0A, + 0x12, 0x13, 0x1B, 0x1A, 0x19, 0x11, 0x10, 0x18, + 0x20, 0x28, 0x29, 0x21, 0x22, 0x23, 0x2B, 0x2A, + 0x32, 0x31, 0x30, 0x38, 0x39, 0x3A, 0x3B, 0x33, + 0x34, 0x3C, 0x3D, 0x3E, 0x3F, 0x37, 0x36, 0x35, + 0x2D, 0x2C, 0x24, 0x25, 0x26, 0x2E, 0x2F, 0x27, + 0x1F, 0x17, 0x16, 0x1E, 0x1D, 0x1C, 0x14, 0x15, + 0x0D, 0x0C, 0x04, 0x05, 0x06, 0x0E, 0x0F, 0x07, + }, + { + 0x18, 0x19, 0x10, 0x11, 0x08, 0x09, 0x00, 0x01, + 0x02, 0x03, 0x0A, 0x0B, 0x12, 0x13, 0x1A, 0x1B, + 0x1C, 0x1D, 0x14, 0x15, 0x0C, 0x0D, 0x04, 0x05, + 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F, + 0x26, 0x27, 0x2E, 0x2F, 0x36, 0x37, 0x3E, 0x3F, + 0x3C, 0x3D, 0x34, 0x35, 0x2C, 0x2D, 0x24, 0x25, + 0x22, 0x23, 0x2A, 0x2B, 0x32, 0x33, 0x3A, 0x3B, + 0x38, 0x39, 0x30, 0x31, 0x28, 0x29, 0x20, 0x21, + }, + { + 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B, + 0x13, 0x1B, 0x12, 0x1A, 0x11, 0x19, 0x10, 0x18, + 0x20, 0x28, 0x21, 0x29, 0x22, 0x2A, 0x23, 0x2B, + 0x33, 0x3B, 0x32, 0x3A, 0x31, 0x39, 0x30, 0x38, + 0x3C, 0x34, 0x3D, 0x35, 0x3E, 0x36, 0x3F, 0x37, + 0x2F, 0x27, 0x2E, 0x26, 0x2D, 0x25, 0x2C, 0x24, + 0x1F, 0x17, 0x1E, 0x16, 0x1D, 0x15, 0x1C, 0x14, + 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07, + }, + { + 0x00, 0x08, 0x10, 0x18, 0x19, 0x1A, 0x1B, 0x13, + 0x0B, 0x03, 0x02, 0x01, 0x09, 0x11, 0x12, 0x0A, + 0x04, 0x0C, 0x14, 0x1C, 0x1D, 0x1E, 0x1F, 0x17, + 0x0F, 0x07, 0x06, 0x05, 0x0D, 0x15, 0x16, 0x0E, + 0x24, 0x2C, 0x34, 0x3C, 0x3D, 0x3E, 0x3F, 0x37, + 0x2F, 0x27, 0x26, 0x25, 0x2D, 0x35, 0x36, 0x2E, + 0x20, 0x28, 0x30, 0x38, 0x39, 0x3A, 0x3B, 0x33, + 0x2B, 0x23, 0x22, 0x21, 0x29, 0x31, 0x32, 0x2A, + }, + { + 0x00, 0x08, 0x09, 0x01, 0x02, 0x03, 0x0B, 0x0A, + 0x13, 0x1B, 0x1A, 0x12, 0x11, 0x10, 0x18, 0x19, + 0x21, 0x20, 0x28, 0x29, 0x2A, 0x22, 0x23, 0x2B, + 0x33, 0x3B, 0x3A, 0x32, 0x31, 0x39, 0x38, 0x30, + 0x34, 0x3C, 0x3D, 0x35, 0x36, 0x3E, 0x3F, 0x37, + 0x2F, 0x27, 0x26, 0x2E, 0x2D, 0x2C, 0x24, 0x25, + 0x1D, 0x1C, 0x14, 0x15, 0x16, 0x1E, 0x1F, 0x17, + 0x0E, 0x0F, 0x07, 0x06, 0x05, 0x0D, 0x0C, 0x04, + }, + { + 0x18, 0x10, 0x08, 0x00, 0x01, 0x02, 0x03, 0x0B, + 0x13, 0x1B, 0x1A, 0x19, 0x11, 0x0A, 0x09, 0x12, + 0x1C, 0x14, 0x0C, 0x04, 0x05, 0x06, 0x07, 0x0F, + 0x17, 0x1F, 0x1E, 0x1D, 0x15, 0x0E, 0x0D, 0x16, + 0x3C, 0x34, 0x2C, 0x24, 0x25, 0x26, 0x27, 0x2F, + 0x37, 0x3F, 0x3E, 0x3D, 0x35, 0x2E, 0x2D, 0x36, + 0x38, 0x30, 0x28, 0x20, 0x21, 0x22, 0x23, 0x2B, + 0x33, 0x3B, 0x3A, 0x39, 0x31, 0x2A, 0x29, 0x32, + }, + { + 0x00, 0x08, 0x09, 0x01, 0x02, 0x0A, 0x12, 0x11, + 0x10, 0x18, 0x19, 0x1A, 0x1B, 0x13, 0x0B, 0x03, + 0x07, 0x06, 0x0E, 0x0F, 0x17, 0x16, 0x15, 0x0D, + 0x05, 0x04, 0x0C, 0x14, 0x1C, 0x1D, 0x1E, 0x1F, + 0x3F, 0x3E, 0x36, 0x37, 0x2F, 0x2E, 0x2D, 0x35, + 0x3D, 0x3C, 0x34, 0x2C, 0x24, 0x25, 0x26, 0x27, + 0x38, 0x30, 0x31, 0x39, 0x3A, 0x32, 0x2A, 0x29, + 0x28, 0x20, 0x21, 0x22, 0x23, 0x2B, 0x33, 0x3B, + }, + { + 0x00, 0x01, 0x08, 0x09, 0x10, 0x11, 0x18, 0x19, + 0x20, 0x21, 0x28, 0x29, 0x30, 0x31, 0x38, 0x39, + 0x3A, 0x3B, 0x32, 0x33, 0x2A, 0x2B, 0x22, 0x23, + 0x1A, 0x1B, 0x12, 0x13, 0x0A, 0x0B, 0x02, 0x03, + 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D, + 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x3C, 0x3D, + 0x3E, 0x3F, 0x36, 0x37, 0x2E, 0x2F, 0x26, 0x27, + 0x1E, 0x1F, 0x16, 0x17, 0x0E, 0x0F, 0x06, 0x07, + } +}; + +static const int32_t bink_intra_quant[16][64] = { +{ + 0x010000, 0x016315, 0x01E83D, 0x02A535, 0x014E7B, 0x016577, 0x02F1E6, 0x02724C, + 0x010000, 0x00EEDA, 0x024102, 0x017F9B, 0x00BE80, 0x00611E, 0x01083C, 0x00A552, + 0x021F88, 0x01DC53, 0x027FAD, 0x01F697, 0x014819, 0x00A743, 0x015A31, 0x009688, + 0x02346F, 0x030EE5, 0x01FBFA, 0x02C096, 0x01D000, 0x028396, 0x019247, 0x01F9AA, + 0x02346F, 0x01FBFA, 0x01DC53, 0x0231B8, 0x012F12, 0x01E06C, 0x00CB10, 0x0119A8, + 0x01C48C, 0x019748, 0x014E86, 0x0122AF, 0x02C628, 0x027F20, 0x0297B5, 0x023F32, + 0x025000, 0x01AB6B, 0x01D122, 0x0159B3, 0x012669, 0x008D43, 0x00EE1F, 0x0075ED, + 0x01490C, 0x010288, 0x00F735, 0x00EF51, 0x00E0F1, 0x0072AD, 0x00A4D8, 0x006517, +}, +{ + 0x015555, 0x01D971, 0x028AFC, 0x0386F1, 0x01BDF9, 0x01DC9F, 0x03ED33, 0x034311, + 0x015555, 0x013E78, 0x030158, 0x01FF7A, 0x00FE00, 0x00817D, 0x01604F, 0x00DC6D, + 0x02D4B5, 0x027B19, 0x0354E7, 0x029E1F, 0x01B577, 0x00DF04, 0x01CD96, 0x00C8B6, + 0x02F095, 0x0413DC, 0x02A54E, 0x03AB73, 0x026AAB, 0x035A1E, 0x02185E, 0x02A238, + 0x02F095, 0x02A54E, 0x027B19, 0x02ECF5, 0x019418, 0x028090, 0x010EC0, 0x01778A, + 0x025B66, 0x021F0B, 0x01BE09, 0x018394, 0x03B2E0, 0x03542A, 0x0374F1, 0x02FEEE, + 0x031555, 0x0239E4, 0x026C2D, 0x01CCEE, 0x01888C, 0x00BC59, 0x013D7E, 0x009D3C, + 0x01B6BB, 0x0158B5, 0x01499C, 0x013F17, 0x012BEC, 0x0098E6, 0x00DBCB, 0x0086C9, +}, +{ + 0x01AAAB, 0x024FCE, 0x032DBB, 0x0468AD, 0x022D78, 0x0253C7, 0x04E87F, 0x0413D5, + 0x01AAAB, 0x018E16, 0x03C1AE, 0x027F58, 0x013D80, 0x00A1DC, 0x01B863, 0x011388, + 0x0389E2, 0x0319DF, 0x042A21, 0x0345A7, 0x0222D4, 0x0116C5, 0x0240FC, 0x00FAE3, + 0x03ACBA, 0x0518D3, 0x034EA1, 0x04964F, 0x030555, 0x0430A5, 0x029E76, 0x034AC5, + 0x03ACBA, 0x034EA1, 0x0319DF, 0x03A833, 0x01F91E, 0x0320B4, 0x015270, 0x01D56D, + 0x02F23F, 0x02A6CE, 0x022D8B, 0x01E479, 0x049F98, 0x042935, 0x04522D, 0x03BEA9, + 0x03DAAB, 0x02C85D, 0x030738, 0x02402A, 0x01EAAF, 0x00EB6F, 0x018CDE, 0x00C48A, + 0x022469, 0x01AEE2, 0x019C02, 0x018EDD, 0x0176E7, 0x00BF20, 0x0112BE, 0x00A87B, +}, +{ + 0x020000, 0x02C62A, 0x03D07A, 0x054A69, 0x029CF6, 0x02CAEF, 0x05E3CC, 0x04E499, + 0x020000, 0x01DDB4, 0x048204, 0x02FF36, 0x017D01, 0x00C23C, 0x021077, 0x014AA3, + 0x043F0F, 0x03B8A6, 0x04FF5A, 0x03ED2E, 0x029032, 0x014E86, 0x02B461, 0x012D11, + 0x0468DF, 0x061DCA, 0x03F7F5, 0x05812C, 0x03A000, 0x05072C, 0x03248D, 0x03F353, + 0x0468DF, 0x03F7F5, 0x03B8A6, 0x046370, 0x025E24, 0x03C0D8, 0x019620, 0x02334F, + 0x038919, 0x032E91, 0x029D0D, 0x02455E, 0x058C50, 0x04FE3F, 0x052F69, 0x047E65, + 0x04A000, 0x0356D6, 0x03A243, 0x02B365, 0x024CD2, 0x011A85, 0x01DC3E, 0x00EBD9, + 0x029218, 0x020510, 0x01EE69, 0x01DEA2, 0x01C1E2, 0x00E559, 0x0149B0, 0x00CA2D, +}, +{ + 0x02AAAB, 0x03B2E3, 0x0515F8, 0x070DE2, 0x037BF2, 0x03B93E, 0x07DA65, 0x068621, + 0x02AAAB, 0x027CF0, 0x0602B1, 0x03FEF3, 0x01FC01, 0x0102FA, 0x02C09F, 0x01B8DA, + 0x05A96A, 0x04F632, 0x06A9CE, 0x053C3E, 0x036AED, 0x01BE09, 0x039B2D, 0x01916B, + 0x05E129, 0x0827B8, 0x054A9C, 0x0756E5, 0x04D555, 0x06B43B, 0x0430BC, 0x05446F, + 0x05E129, 0x054A9C, 0x04F632, 0x05D9EB, 0x032830, 0x050121, 0x021D80, 0x02EF14, + 0x04B6CC, 0x043E16, 0x037C11, 0x030728, 0x0765C0, 0x06A855, 0x06E9E2, 0x05FDDB, + 0x062AAB, 0x0473C8, 0x04D85A, 0x0399DC, 0x031118, 0x0178B2, 0x027AFD, 0x013A77, + 0x036D76, 0x02B16A, 0x029337, 0x027E2E, 0x0257D8, 0x0131CC, 0x01B796, 0x010D91, +}, +{ + 0x038000, 0x04DACA, 0x06ACD5, 0x094238, 0x0492AE, 0x04E322, 0x0A4EA5, 0x08900C, + 0x038000, 0x0343FB, 0x07E388, 0x053E9F, 0x029AC1, 0x0153E8, 0x039CD0, 0x02429E, + 0x076E5B, 0x068322, 0x08BEDE, 0x06DF11, 0x047C57, 0x02496B, 0x04BBAB, 0x020EDD, + 0x07B786, 0x0AB421, 0x06F1ED, 0x09A20D, 0x065800, 0x08CC8E, 0x057FF7, 0x06E9D2, + 0x07B786, 0x06F1ED, 0x068322, 0x07AE04, 0x0424BF, 0x06917B, 0x02C6B8, 0x03D9CB, + 0x062FEB, 0x05917D, 0x0492D7, 0x03F964, 0x09B58C, 0x08BCEF, 0x0912F8, 0x07DD30, + 0x081800, 0x05D7F7, 0x065BF6, 0x04B9F1, 0x040670, 0x01EE69, 0x03416C, 0x019CBC, + 0x047FAA, 0x0388DC, 0x036138, 0x03459C, 0x03134C, 0x01915C, 0x0240F5, 0x0161CF, +}, +{ + 0x040000, 0x058C54, 0x07A0F4, 0x0A94D3, 0x0539EC, 0x0595DD, 0x0BC798, 0x09C932, + 0x040000, 0x03BB68, 0x090409, 0x05FE6D, 0x02FA01, 0x018477, 0x0420EE, 0x029547, + 0x087E1F, 0x07714C, 0x09FEB5, 0x07DA5D, 0x052064, 0x029D0D, 0x0568C3, 0x025A21, + 0x08D1BE, 0x0C3B94, 0x07EFEA, 0x0B0258, 0x074000, 0x0A0E59, 0x06491A, 0x07E6A7, + 0x08D1BE, 0x07EFEA, 0x07714C, 0x08C6E0, 0x04BC48, 0x0781B1, 0x032C3F, 0x04669F, + 0x071232, 0x065D22, 0x053A1A, 0x048ABC, 0x0B18A0, 0x09FC7F, 0x0A5ED3, 0x08FCC9, + 0x094000, 0x06ADAC, 0x074487, 0x0566CA, 0x0499A5, 0x02350B, 0x03B87B, 0x01D7B3, + 0x052430, 0x040A20, 0x03DCD3, 0x03BD45, 0x0383C5, 0x01CAB3, 0x029361, 0x01945A, +}, +{ + 0x050000, 0x06EF69, 0x098931, 0x0D3A07, 0x068867, 0x06FB55, 0x0EB97E, 0x0C3B7E, + 0x050000, 0x04AA42, 0x0B450B, 0x077E08, 0x03B881, 0x01E595, 0x05292A, 0x033A99, + 0x0A9DA7, 0x094D9F, 0x0C7E62, 0x09D0F4, 0x06687D, 0x034450, 0x06C2F4, 0x02F0AA, + 0x0B062D, 0x0F4A78, 0x09EBE4, 0x0DC2EE, 0x091000, 0x0C91EF, 0x07DB61, 0x09E050, + 0x0B062D, 0x09EBE4, 0x094D9F, 0x0AF898, 0x05EB59, 0x09621D, 0x03F74F, 0x058046, + 0x08D6BE, 0x07F46A, 0x0688A0, 0x05AD6B, 0x0DDEC8, 0x0C7B9F, 0x0CF687, 0x0B3BFB, + 0x0B9000, 0x085917, 0x0915A8, 0x06C07D, 0x05C00E, 0x02C24D, 0x04A69A, 0x024D9F, + 0x066D3C, 0x050CA7, 0x04D407, 0x04AC96, 0x0464B6, 0x023D5F, 0x033839, 0x01F971, +}, +{ + 0x060000, 0x08527E, 0x0B716E, 0x0FDF3C, 0x07D6E1, 0x0860CC, 0x11AB63, 0x0EADCB, + 0x060000, 0x05991C, 0x0D860D, 0x08FDA3, 0x047702, 0x0246B3, 0x063165, 0x03DFEA, + 0x0CBD2E, 0x0B29F1, 0x0EFE0F, 0x0BC78B, 0x07B096, 0x03EB93, 0x081D24, 0x038732, + 0x0D3A9C, 0x12595D, 0x0BE7DF, 0x108384, 0x0AE000, 0x0F1585, 0x096DA8, 0x0BD9FA, + 0x0D3A9C, 0x0BE7DF, 0x0B29F1, 0x0D2A50, 0x071A6B, 0x0B4289, 0x04C25F, 0x0699EE, + 0x0A9B4A, 0x098BB2, 0x07D727, 0x06D01A, 0x10A4F0, 0x0EFABE, 0x0F8E3C, 0x0D7B2E, + 0x0DE000, 0x0A0482, 0x0AE6CA, 0x081A2F, 0x06E677, 0x034F90, 0x0594B9, 0x02C38C, + 0x07B649, 0x060F2F, 0x05CB3C, 0x059BE7, 0x0545A7, 0x02B00C, 0x03DD11, 0x025E87, +}, +{ + 0x080000, 0x0B18A8, 0x0F41E8, 0x1529A5, 0x0A73D7, 0x0B2BBB, 0x178F2F, 0x139264, + 0x080000, 0x0776CF, 0x120812, 0x0BFCD9, 0x05F402, 0x0308EF, 0x0841DC, 0x052A8E, + 0x10FC3E, 0x0EE297, 0x13FD69, 0x0FB4B9, 0x0A40C8, 0x053A1A, 0x0AD186, 0x04B442, + 0x11A37B, 0x187727, 0x0FDFD4, 0x1604B0, 0x0E8000, 0x141CB1, 0x0C9235, 0x0FCD4D, + 0x11A37B, 0x0FDFD4, 0x0EE297, 0x118DC0, 0x09788F, 0x0F0362, 0x06587F, 0x08CD3D, + 0x0E2463, 0x0CBA43, 0x0A7434, 0x091577, 0x163140, 0x13F8FE, 0x14BDA5, 0x11F992, + 0x128000, 0x0D5B58, 0x0E890D, 0x0ACD94, 0x093349, 0x046A15, 0x0770F7, 0x03AF65, + 0x0A4861, 0x08143F, 0x07B9A6, 0x077A89, 0x070789, 0x039565, 0x0526C2, 0x0328B4, +}, +{ + 0x0C0000, 0x10A4FD, 0x16E2DB, 0x1FBE78, 0x0FADC3, 0x10C198, 0x2356C7, 0x1D5B96, + 0x0C0000, 0x0B3237, 0x1B0C1A, 0x11FB46, 0x08EE03, 0x048D66, 0x0C62CA, 0x07BFD5, + 0x197A5D, 0x1653E3, 0x1DFC1E, 0x178F16, 0x0F612C, 0x07D727, 0x103A49, 0x070E64, + 0x1A7539, 0x24B2BB, 0x17CFBD, 0x210709, 0x15C000, 0x1E2B0A, 0x12DB4F, 0x17B3F4, + 0x1A7539, 0x17CFBD, 0x1653E3, 0x1A54A0, 0x0E34D7, 0x168513, 0x0984BE, 0x0D33DC, + 0x153695, 0x131765, 0x0FAE4E, 0x0DA033, 0x2149E1, 0x1DF57D, 0x1F1C78, 0x1AF65B, + 0x1BC000, 0x140904, 0x15CD94, 0x10345E, 0x0DCCEE, 0x069F20, 0x0B2972, 0x058718, + 0x0F6C91, 0x0C1E5E, 0x0B9678, 0x0B37CE, 0x0A8B4E, 0x056018, 0x07BA22, 0x04BD0E, +}, +{ + 0x110000, 0x179466, 0x206C0C, 0x2CF87F, 0x16362A, 0x17BCED, 0x321044, 0x299714, + 0x110000, 0x0FDC79, 0x265125, 0x19794E, 0x0CA685, 0x0672FB, 0x118BF4, 0x0AFA6D, + 0x241804, 0x1FA181, 0x2A7A80, 0x21600A, 0x15C9A9, 0x0B1B77, 0x16FD3C, 0x09FF0D, + 0x257B66, 0x33FD33, 0x21BBA2, 0x2EC9F7, 0x1ED000, 0x2ABCF9, 0x1AB6B0, 0x219444, + 0x257B66, 0x21BBA2, 0x1FA181, 0x254D38, 0x142030, 0x1FE730, 0x0D7C0E, 0x12B423, + 0x1E0D52, 0x1B0BCF, 0x1636EE, 0x134D9E, 0x2F28A9, 0x2A711B, 0x2C12FF, 0x263256, + 0x275000, 0x1C621B, 0x1EE33C, 0x16F4DB, 0x138CFB, 0x09616E, 0x0FD00C, 0x07D4B7, + 0x15D9CE, 0x112B06, 0x106A80, 0x0FE464, 0x0EF004, 0x079D77, 0x0AF25B, 0x06B67F, +}, +{ + 0x160000, 0x1E83CF, 0x29F53D, 0x3A3286, 0x1CBE90, 0x1EB842, 0x40C9C2, 0x35D293, + 0x160000, 0x1486BA, 0x319630, 0x20F756, 0x105F06, 0x085891, 0x16B51E, 0x0E3506, + 0x2EB5AA, 0x28EF20, 0x36F8E1, 0x2B30FE, 0x1C3225, 0x0E5FC7, 0x1DC030, 0x0CEFB7, + 0x308193, 0x4347AC, 0x2BA786, 0x3C8CE5, 0x27E000, 0x374EE7, 0x229212, 0x2B7494, + 0x308193, 0x2BA786, 0x28EF20, 0x3045D0, 0x1A0B89, 0x29494D, 0x11735D, 0x183469, + 0x26E410, 0x230039, 0x1CBF8F, 0x18FB09, 0x3D0771, 0x36ECBA, 0x390986, 0x316E52, + 0x32E000, 0x24BB33, 0x27F8E4, 0x1DB557, 0x194D09, 0x0C23BB, 0x1476A6, 0x0A2256, + 0x1C470A, 0x1637AD, 0x153E87, 0x1490FA, 0x1354B9, 0x09DAD6, 0x0E2A94, 0x08AFF0, +}, +{ + 0x1C0000, 0x26D64D, 0x3566AA, 0x4A11C2, 0x249572, 0x27190E, 0x527525, 0x44805E, + 0x1C0000, 0x1A1FD6, 0x3F1C3E, 0x29F4F9, 0x14D607, 0x0A9F44, 0x1CE683, 0x1214F0, + 0x3B72D9, 0x341911, 0x45F6F0, 0x36F889, 0x23E2BB, 0x124B5B, 0x25DD54, 0x1076E9, + 0x3DBC30, 0x55A109, 0x378F64, 0x4D1069, 0x32C000, 0x46646C, 0x2BFFB9, 0x374E8E, + 0x3DBC30, 0x378F64, 0x341911, 0x3D7020, 0x2125F5, 0x348BD6, 0x1635BC, 0x1ECE57, + 0x317F5B, 0x2C8BEB, 0x2496B6, 0x1FCB22, 0x4DAC61, 0x45E778, 0x4897C2, 0x3EE97F, + 0x40C000, 0x2EBFB5, 0x32DFAE, 0x25CF86, 0x203380, 0x0F734B, 0x1A0B5F, 0x0CE5E2, + 0x23FD53, 0x1C46DC, 0x1B09C4, 0x1A2CE1, 0x189A60, 0x0C8AE2, 0x1207A5, 0x0B0E77, +}, +{ + 0x220000, 0x2F28CC, 0x40D818, 0x59F0FE, 0x2C6C53, 0x2F79DA, 0x642089, 0x532E29, + 0x220000, 0x1FB8F1, 0x4CA24B, 0x32F29C, 0x194D09, 0x0CE5F7, 0x2317E8, 0x15F4DB, + 0x483007, 0x3F4303, 0x54F4FF, 0x42C014, 0x2B9351, 0x1636EE, 0x2DFA79, 0x13FE1A, + 0x4AF6CC, 0x67FA67, 0x437743, 0x5D93EE, 0x3DA000, 0x5579F1, 0x356D61, 0x432888, + 0x4AF6CC, 0x437743, 0x3F4303, 0x4A9A70, 0x284060, 0x3FCE60, 0x1AF81B, 0x256845, + 0x3C1AA5, 0x36179D, 0x2C6DDD, 0x269B3C, 0x5E5152, 0x54E237, 0x5825FE, 0x4C64AD, + 0x4EA000, 0x38C437, 0x3DC678, 0x2DE9B5, 0x2719F7, 0x12C2DB, 0x1FA018, 0x0FA96E, + 0x2BB39B, 0x22560C, 0x20D500, 0x1FC8C8, 0x1DE007, 0x0F3AEE, 0x15E4B7, 0x0D6CFE, +}, +{ + 0x2C0000, 0x3D079E, 0x53EA79, 0x74650C, 0x397D20, 0x3D7083, 0x819383, 0x6BA525, + 0x2C0000, 0x290D75, 0x632C61, 0x41EEAC, 0x20BE0C, 0x10B121, 0x2D6A3B, 0x1C6A0C, + 0x5D6B54, 0x51DE40, 0x6DF1C2, 0x5661FB, 0x38644B, 0x1CBF8F, 0x3B8060, 0x19DF6D, + 0x610326, 0x868F57, 0x574F0B, 0x7919CA, 0x4FC000, 0x6E9DCE, 0x452423, 0x56E928, + 0x610326, 0x574F0B, 0x51DE40, 0x608BA0, 0x341713, 0x52929A, 0x22E6BA, 0x3068D2, + 0x4DC821, 0x460071, 0x397F1E, 0x31F611, 0x7A0EE2, 0x6DD974, 0x72130C, 0x62DCA3, + 0x65C000, 0x497665, 0x4FF1C9, 0x3B6AAE, 0x329A12, 0x184776, 0x28ED4D, 0x1444AC, + 0x388E14, 0x2C6F5A, 0x2A7D0F, 0x2921F4, 0x26A973, 0x13B5AD, 0x1C5528, 0x115FDF, +}, +}; + +static const int32_t bink_inter_quant[16][64] = { +{ + 0x010000, 0x017946, 0x01A5A9, 0x0248DC, 0x016363, 0x0152A7, 0x0243EC, 0x0209EA, + 0x012000, 0x00E248, 0x01BBDA, 0x015CBC, 0x00A486, 0x0053E0, 0x00F036, 0x008095, + 0x01B701, 0x016959, 0x01B0B9, 0x0153FD, 0x00F8E7, 0x007EE4, 0x00EA30, 0x007763, + 0x01B701, 0x0260EB, 0x019DE9, 0x023E1B, 0x017000, 0x01FE6E, 0x012DB5, 0x01A27B, + 0x01E0D1, 0x01B0B9, 0x018A33, 0x01718D, 0x00D87A, 0x014449, 0x007B9A, 0x00AB71, + 0x013178, 0x0112EA, 0x00AD08, 0x009BB9, 0x023D97, 0x020437, 0x021CCC, 0x01E6B4, + 0x018000, 0x012DB5, 0x0146D9, 0x0100CE, 0x00CFD2, 0x006E5C, 0x00B0E4, 0x005A2D, + 0x00E9CC, 0x00B7B1, 0x00846F, 0x006B85, 0x008337, 0x0042E5, 0x004A10, 0x002831, +}, +{ + 0x015555, 0x01F708, 0x023237, 0x030BD0, 0x01D9D9, 0x01C389, 0x03053B, 0x02B7E3, + 0x018000, 0x012DB5, 0x024FCE, 0x01D0FA, 0x00DB5D, 0x006FD5, 0x014048, 0x00AB71, + 0x024957, 0x01E1CC, 0x0240F7, 0x01C551, 0x014BDE, 0x00A92F, 0x013840, 0x009F2F, + 0x024957, 0x032BE4, 0x0227E1, 0x02FD7A, 0x01EAAB, 0x02A893, 0x019247, 0x022DF9, + 0x028116, 0x0240F7, 0x020D99, 0x01ECBC, 0x0120A3, 0x01B061, 0x00A4CE, 0x00E497, + 0x01974B, 0x016E8E, 0x00E6B5, 0x00CFA2, 0x02FCC9, 0x02B04A, 0x02D110, 0x0288F1, + 0x020000, 0x019247, 0x01B3CC, 0x015668, 0x011518, 0x009325, 0x00EBDA, 0x00783D, + 0x0137BB, 0x00F4ED, 0x00B093, 0x008F5C, 0x00AEF4, 0x005931, 0x0062BF, 0x003597, +}, +{ + 0x01AAAB, 0x0274CB, 0x02BEC4, 0x03CEC4, 0x02504F, 0x02346C, 0x03C689, 0x0365DC, + 0x01E000, 0x017922, 0x02E3C1, 0x024539, 0x011235, 0x008BCA, 0x01905A, 0x00D64D, + 0x02DBAD, 0x025A40, 0x02D134, 0x0236A5, 0x019ED6, 0x00D37B, 0x018650, 0x00C6FB, + 0x02DBAD, 0x03F6DD, 0x02B1D9, 0x03BCD8, 0x026555, 0x0352B8, 0x01F6D8, 0x02B977, + 0x03215C, 0x02D134, 0x029100, 0x0267EB, 0x0168CC, 0x021C7A, 0x00CE01, 0x011DBD, + 0x01FD1E, 0x01CA31, 0x012062, 0x01038A, 0x03BBFB, 0x035C5C, 0x038554, 0x032B2D, + 0x028000, 0x01F6D8, 0x0220C0, 0x01AC02, 0x015A5E, 0x00B7EF, 0x0126D1, 0x00964C, + 0x0185A9, 0x013228, 0x00DCB8, 0x00B333, 0x00DAB2, 0x006F7D, 0x007B6F, 0x0042FC, +}, +{ + 0x020000, 0x02F28D, 0x034B52, 0x0491B8, 0x02C6C5, 0x02A54E, 0x0487D8, 0x0413D5, + 0x024000, 0x01C48F, 0x0377B5, 0x02B977, 0x01490C, 0x00A7BF, 0x01E06C, 0x01012A, + 0x036E03, 0x02D2B3, 0x036172, 0x02A7FA, 0x01F1CE, 0x00FDC7, 0x01D460, 0x00EEC7, + 0x036E03, 0x04C1D6, 0x033BD1, 0x047C37, 0x02E000, 0x03FCDD, 0x025B6A, 0x0344F5, + 0x03C1A1, 0x036172, 0x031466, 0x02E31B, 0x01B0F5, 0x028892, 0x00F735, 0x0156E2, + 0x0262F1, 0x0225D5, 0x015A10, 0x013772, 0x047B2D, 0x04086E, 0x043998, 0x03CD69, + 0x030000, 0x025B6A, 0x028DB3, 0x02019B, 0x019FA3, 0x00DCB8, 0x0161C7, 0x00B45B, + 0x01D398, 0x016F63, 0x0108DD, 0x00D70A, 0x01066F, 0x0085C9, 0x00941F, 0x005062, +}, +{ + 0x02AAAB, 0x03EE11, 0x04646D, 0x0617A0, 0x03B3B2, 0x038713, 0x060A75, 0x056FC6, + 0x030000, 0x025B6A, 0x049F9B, 0x03A1F4, 0x01B6BB, 0x00DFAA, 0x028090, 0x0156E2, + 0x0492AE, 0x03C399, 0x0481ED, 0x038AA2, 0x0297BD, 0x01525F, 0x027080, 0x013E5E, + 0x0492AE, 0x0657C8, 0x044FC1, 0x05FAF4, 0x03D555, 0x055126, 0x03248D, 0x045BF2, + 0x05022D, 0x0481ED, 0x041B33, 0x03D979, 0x024147, 0x0360C3, 0x01499C, 0x01C92E, + 0x032E96, 0x02DD1C, 0x01CD6A, 0x019F43, 0x05F991, 0x056093, 0x05A220, 0x0511E1, + 0x040000, 0x03248D, 0x036799, 0x02ACCF, 0x022A2F, 0x01264B, 0x01D7B5, 0x00F079, + 0x026F75, 0x01E9D9, 0x016127, 0x011EB8, 0x015DE9, 0x00B262, 0x00C57F, 0x006B2D, +}, +{ + 0x038000, 0x052876, 0x05C3CF, 0x07FF02, 0x04DBD9, 0x04A148, 0x07EDBA, 0x0722B4, + 0x03F000, 0x0317FB, 0x06117C, 0x04C491, 0x023FD5, 0x01258F, 0x0348BD, 0x01C209, + 0x060085, 0x04F0B9, 0x05EA87, 0x04A5F5, 0x036728, 0x01BC1C, 0x0333A8, 0x01A1DB, + 0x060085, 0x085336, 0x05A8AE, 0x07D960, 0x050800, 0x06FA82, 0x041FF9, 0x05B8AE, + 0x0692DA, 0x05EA87, 0x0563B2, 0x050D6E, 0x02F5AD, 0x046F00, 0x01B09C, 0x02580C, + 0x042D25, 0x03C235, 0x025D9B, 0x022108, 0x07D78F, 0x070EC1, 0x0764CA, 0x06A777, + 0x054000, 0x041FF9, 0x0477F9, 0x0382D0, 0x02D75E, 0x018242, 0x026B1D, 0x013B9F, + 0x03324A, 0x0282ED, 0x01CF83, 0x017851, 0x01CB42, 0x00EA21, 0x010336, 0x008CAC, +}, +{ + 0x040000, 0x05E519, 0x0696A4, 0x092370, 0x058D8A, 0x054A9C, 0x090FB0, 0x0827AA, + 0x048000, 0x03891F, 0x06EF69, 0x0572EE, 0x029218, 0x014F7E, 0x03C0D8, 0x020254, + 0x06DC05, 0x05A565, 0x06C2E4, 0x054FF3, 0x03E39B, 0x01FB8E, 0x03A8C0, 0x01DD8D, + 0x06DC05, 0x0983AC, 0x0677A2, 0x08F86E, 0x05C000, 0x07F9B9, 0x04B6D4, 0x0689EB, + 0x078343, 0x06C2E4, 0x0628CC, 0x05C635, 0x0361EA, 0x051124, 0x01EE69, 0x02ADC5, + 0x04C5E1, 0x044BAA, 0x02B41F, 0x026EE5, 0x08F65A, 0x0810DD, 0x087330, 0x079AD1, + 0x060000, 0x04B6D4, 0x051B65, 0x040337, 0x033F47, 0x01B970, 0x02C38F, 0x0168B6, + 0x03A730, 0x02DEC6, 0x0211BA, 0x01AE14, 0x020CDD, 0x010B93, 0x01283E, 0x00A0C4, +}, +{ + 0x050000, 0x075E60, 0x083C4D, 0x0B6C4C, 0x06F0ED, 0x069D43, 0x0B539C, 0x0A3194, + 0x05A000, 0x046B67, 0x08AB44, 0x06CFAA, 0x03369E, 0x01A35E, 0x04B10F, 0x0282E8, + 0x089307, 0x070EBF, 0x08739C, 0x06A3F0, 0x04DC82, 0x027A72, 0x0492F0, 0x0254F0, + 0x089307, 0x0BE497, 0x08158B, 0x0B3689, 0x073000, 0x09F827, 0x05E489, 0x082C66, + 0x096413, 0x08739C, 0x07B2FF, 0x0737C2, 0x043A64, 0x06556D, 0x026A04, 0x035936, + 0x05F75A, 0x055E94, 0x036127, 0x030A9E, 0x0B33F1, 0x0A1514, 0x0A8FFC, 0x098186, + 0x078000, 0x05E489, 0x06623F, 0x050405, 0x040F19, 0x0227CC, 0x037473, 0x01C2E3, + 0x0490FC, 0x039677, 0x029629, 0x021999, 0x029015, 0x014E78, 0x01724E, 0x00C8F5, +}, +{ + 0x060000, 0x08D7A6, 0x09E1F6, 0x0DB528, 0x085450, 0x07EFEA, 0x0D9788, 0x0C3B7E, + 0x06C000, 0x054DAE, 0x0A671E, 0x082C66, 0x03DB24, 0x01F73E, 0x05A145, 0x03037D, + 0x0A4A08, 0x087818, 0x0A2455, 0x07F7ED, 0x05D569, 0x02F955, 0x057D20, 0x02CC54, + 0x0A4A08, 0x0E4582, 0x09B373, 0x0D74A5, 0x08A000, 0x0BF696, 0x07123E, 0x09CEE0, + 0x0B44E4, 0x0A2455, 0x093D32, 0x08A950, 0x0512DF, 0x0799B6, 0x02E59E, 0x0404A7, + 0x0728D2, 0x06717F, 0x040E2F, 0x03A657, 0x0D7187, 0x0C194B, 0x0CACC8, 0x0B683A, + 0x090000, 0x07123E, 0x07A918, 0x0604D2, 0x04DEEA, 0x029629, 0x042556, 0x021D11, + 0x057AC8, 0x044E28, 0x031A97, 0x02851E, 0x03134C, 0x01915C, 0x01BC5D, 0x00F126, +}, +{ + 0x080000, 0x0BCA33, 0x0D2D48, 0x1246E0, 0x0B1B15, 0x0A9538, 0x121F5F, 0x104F53, + 0x090000, 0x07123E, 0x0DDED2, 0x0AE5DD, 0x052430, 0x029EFD, 0x0781B1, 0x0404A7, + 0x0DB80B, 0x0B4ACB, 0x0D85C7, 0x0A9FE7, 0x07C736, 0x03F71D, 0x075180, 0x03BB1A, + 0x0DB80B, 0x130757, 0x0CEF44, 0x11F0DC, 0x0B8000, 0x0FF372, 0x096DA8, 0x0D13D6, + 0x0F0686, 0x0D85C7, 0x0C5198, 0x0B8C6A, 0x06C3D4, 0x0A2248, 0x03DCD3, 0x055B8A, + 0x098BC3, 0x089754, 0x05683E, 0x04DDC9, 0x11ECB4, 0x1021B9, 0x10E661, 0x0F35A3, + 0x0C0000, 0x096DA8, 0x0A36CB, 0x08066E, 0x067E8E, 0x0372E1, 0x05871E, 0x02D16B, + 0x074E60, 0x05BD8B, 0x042374, 0x035C28, 0x0419BB, 0x021726, 0x02507C, 0x014188, +}, +{ + 0x0C0000, 0x11AF4C, 0x13C3EC, 0x1B6A50, 0x10A89F, 0x0FDFD4, 0x1B2F0F, 0x1876FD, + 0x0D8000, 0x0A9B5D, 0x14CE3C, 0x1058CB, 0x07B649, 0x03EE7B, 0x0B4289, 0x0606FB, + 0x149410, 0x10F030, 0x1448AB, 0x0FEFDA, 0x0BAAD2, 0x05F2AB, 0x0AFA40, 0x0598A7, + 0x149410, 0x1C8B03, 0x1366E6, 0x1AE949, 0x114000, 0x17ED2B, 0x0E247C, 0x139DC1, + 0x1689C8, 0x1448AB, 0x127A63, 0x11529F, 0x0A25BE, 0x0F336D, 0x05CB3C, 0x08094E, + 0x0E51A4, 0x0CE2FE, 0x081C5D, 0x074CAE, 0x1AE30E, 0x183296, 0x195991, 0x16D074, + 0x120000, 0x0E247C, 0x0F5230, 0x0C09A5, 0x09BDD5, 0x052C51, 0x084AAC, 0x043A21, + 0x0AF590, 0x089C51, 0x06352E, 0x050A3B, 0x062698, 0x0322B9, 0x0378BA, 0x01E24D, +}, +{ + 0x110000, 0x190DAC, 0x1C0039, 0x26D69C, 0x17998C, 0x167D16, 0x2682AB, 0x22A891, + 0x132000, 0x0F06C3, 0x1D797F, 0x172876, 0x0AECE7, 0x0591D9, 0x0FF398, 0x0889E3, + 0x1D2717, 0x17FEEF, 0x1CBC47, 0x1693CA, 0x108754, 0x086D1D, 0x0F8D30, 0x07ED98, + 0x1D2717, 0x286F9A, 0x1B7C71, 0x261FD3, 0x187000, 0x21E552, 0x140904, 0x1BCA27, + 0x1FEDDC, 0x1CBC47, 0x1A2D62, 0x188A62, 0x0E6022, 0x1588DA, 0x083540, 0x0B6284, + 0x1448FE, 0x124192, 0x0B7D84, 0x0A574B, 0x2616FF, 0x2247AA, 0x23E98D, 0x2051FA, + 0x198000, 0x140904, 0x15B46F, 0x110DAA, 0x0DCCEE, 0x07541E, 0x0BBF1F, 0x05FD04, + 0x0F868B, 0x0C32C8, 0x08CB57, 0x0723D4, 0x08B6AD, 0x047130, 0x04EB08, 0x02AB42, +}, +{ + 0x160000, 0x206C0C, 0x243C86, 0x3242E8, 0x1E8A79, 0x1D1A59, 0x31D646, 0x2CDA25, + 0x18C000, 0x13722A, 0x2624C3, 0x1DF820, 0x0E2385, 0x073537, 0x14A4A7, 0x0B0CCC, + 0x25BA1D, 0x1F0DAE, 0x252FE4, 0x1D37BB, 0x1563D6, 0x0AE78E, 0x142021, 0x0A4288, + 0x25BA1D, 0x345430, 0x2391FB, 0x31565C, 0x1FA000, 0x2BDD7A, 0x19ED8D, 0x23F68C, + 0x2951EF, 0x252FE4, 0x21E061, 0x1FC224, 0x129A87, 0x1BDE47, 0x0A9F44, 0x0EBBBA, + 0x1A4058, 0x17A026, 0x0EDEAB, 0x0D61E9, 0x314AEF, 0x2C5CBE, 0x2E798A, 0x29D380, + 0x210000, 0x19ED8D, 0x1C16AE, 0x1611AE, 0x11DC06, 0x097BEA, 0x0F3391, 0x07BFE7, + 0x141787, 0x0FC93E, 0x0B617F, 0x093D6D, 0x0B46C1, 0x05BFA8, 0x065D55, 0x037437, +}, +{ + 0x1C0000, 0x2943B2, 0x2E1E7C, 0x3FF810, 0x26DEC9, 0x250A43, 0x3F6DCE, 0x3915A3, + 0x1F8000, 0x18BFD8, 0x308BE1, 0x262485, 0x11FEA9, 0x092C75, 0x1A45EB, 0x0E1049, + 0x300425, 0x2785C6, 0x2F5439, 0x252FA8, 0x1B393F, 0x0DE0E4, 0x199D41, 0x0D0EDC, + 0x300425, 0x4299B2, 0x2D456E, 0x3ECB00, 0x284000, 0x37D40F, 0x20FFCB, 0x2DC56D, + 0x3496D3, 0x2F5439, 0x2B1D93, 0x286B74, 0x17AD66, 0x2377FE, 0x0D84E2, 0x12C062, + 0x21692A, 0x1E11A5, 0x12ECDA, 0x110840, 0x3EBC76, 0x387608, 0x3B2652, 0x353BBA, + 0x2A0000, 0x20FFCB, 0x23BFC6, 0x1C1681, 0x16BAF1, 0x0C1213, 0x1358E8, 0x09DCF8, + 0x19924F, 0x141767, 0x0E7C16, 0x0BC28A, 0x0E5A0D, 0x075104, 0x0819B2, 0x04655D, +}, +{ + 0x220000, 0x321B58, 0x380072, 0x4DAD38, 0x2F3318, 0x2CFA2D, 0x4D0556, 0x455122, + 0x264000, 0x1E0D86, 0x3AF2FE, 0x2E50EB, 0x15D9CE, 0x0B23B2, 0x1FE730, 0x1113C7, + 0x3A4E2D, 0x2FFDDF, 0x39788E, 0x2D2795, 0x210EA8, 0x10DA39, 0x1F1A61, 0x0FDB2F, + 0x3A4E2D, 0x50DF33, 0x36F8E1, 0x4C3FA5, 0x30E000, 0x43CAA5, 0x281209, 0x37944D, + 0x3FDBB7, 0x39788E, 0x345AC4, 0x3114C3, 0x1CC044, 0x2B11B4, 0x106A80, 0x16C509, + 0x2891FC, 0x248324, 0x16FB08, 0x14AE97, 0x4C2DFD, 0x448F54, 0x47D31B, 0x40A3F5, + 0x330000, 0x281209, 0x2B68DF, 0x221B53, 0x1B99DB, 0x0EA83B, 0x177E3E, 0x0BFA09, + 0x1F0D17, 0x18658F, 0x1196AE, 0x0E47A8, 0x116D5A, 0x08E260, 0x09D60F, 0x055684, +}, +{ + 0x2C0000, 0x40D818, 0x48790C, 0x6485D0, 0x3D14F2, 0x3A34B2, 0x63AC8D, 0x59B44A, + 0x318000, 0x26E454, 0x4C4986, 0x3BF03F, 0x1C470A, 0x0E6A6E, 0x29494D, 0x161998, + 0x4B743A, 0x3E1B5C, 0x4A5FC7, 0x3A6F75, 0x2AC7AC, 0x15CF1D, 0x284041, 0x148510, + 0x4B743A, 0x68A861, 0x4723F6, 0x62ACB8, 0x3F4000, 0x57BAF3, 0x33DB1A, 0x47ED19, + 0x52A3DE, 0x4A5FC7, 0x43C0C2, 0x3F8448, 0x25350D, 0x37BC8E, 0x153E87, 0x1D7775, + 0x3480B0, 0x2F404C, 0x1DBD56, 0x1AC3D2, 0x6295DE, 0x58B97B, 0x5CF313, 0x53A701, + 0x420000, 0x33DB1A, 0x382D5C, 0x2C235D, 0x23B80D, 0x12F7D4, 0x1E6723, 0x0F7FCF, + 0x282F0E, 0x1F927D, 0x16C2FF, 0x127AD9, 0x168D83, 0x0B7F50, 0x0CBAAA, 0x06E86E, +}, +}; + +static const uint8_t binkb_runbits[64] = { + 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, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 2, 2, 1, 0, +}; + +static const uint8_t binkb_intra_seed[64] = { + 16, 16, 16, 19, 16, 19, 22, 22, + 22, 22, 26, 24, 26, 22, 22, 27, + 27, 27, 26, 26, 26, 29, 29, 29, + 27, 27, 27, 26, 34, 34, 34, 29, + 29, 29, 27, 27, 37, 34, 34, 32, + 32, 29, 29, 38, 37, 35, 35, 34, + 35, 40, 40, 40, 38, 38, 48, 48, + 46, 46, 58, 56, 56, 69, 69, 83, +}; + +static const uint8_t binkb_inter_seed[64] = { + 16, 17, 17, 18, 18, 18, 19, 19, + 19, 19, 20, 20, 20, 20, 20, 21, + 21, 21, 21, 21, 21, 22, 22, 22, + 22, 22, 22, 22, 23, 23, 23, 23, + 23, 23, 23, 23, 24, 24, 24, 25, + 24, 24, 24, 25, 26, 26, 26, 26, + 25, 27, 27, 27, 27, 27, 28, 28, + 28, 28, 30, 30, 30, 31, 31, 33, +}; + +static const uint8_t binkb_num[16] = { + 1, 4, 5, 2, 7, 8, 3, 7, 4, 9, 5, 6, 7, 8, 9, 10 +}; + +static const uint8_t binkb_den[16] = { + 1, 3, 3, 1, 3, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1 +}; + +#endif /* AVCODEC_BINKDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdsp.h new file mode 100644 index 00000000..b089a986 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/binkdsp.h @@ -0,0 +1,43 @@ +/* + * Bink DSP routines + * Copyright (c) 2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Bink DSP routines + */ + +#ifndef AVCODEC_BINKDSP_H +#define AVCODEC_BINKDSP_H + +#include + +#include "config.h" + +typedef struct BinkDSPContext { + void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/); + void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/); + void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize); + void (*add_pixels8)(uint8_t *av_restrict pixels, int16_t *block, int line_size); +} BinkDSPContext; + +void ff_binkdsp_init(BinkDSPContext *c); + +#endif /* AVCODEC_BINKDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bintext.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bintext.h new file mode 100644 index 00000000..21428ba4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bintext.h @@ -0,0 +1,37 @@ +/* + * Binary text decoder + * Copyright (c) 2010 Peter Ross (pross@xvid.org) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Binary text decoder + */ + +#ifndef AVCODEC_BINTEXT_H +#define AVCODEC_BINTEXT_H + +/* flag values passed between avformat and avcodec; + * while these are identical to the XBIN flags, they are also used + * for the BINTEXT and IDF decoders. + */ +#define BINTEXT_PALETTE 0x1 +#define BINTEXT_FONT 0x2 + +#endif /* AVCODEC_BINTEXT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/blockdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/blockdsp.h new file mode 100644 index 00000000..26fc2ea1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/blockdsp.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BLOCKDSP_H +#define AVCODEC_BLOCKDSP_H + +#include +#include + +#include "avcodec.h" +#include "version.h" + +/* add and put pixel (decoding) + * Block sizes for op_pixels_func are 8x4,8x8 16x8 16x16. + * h for op_pixels_func is limited to { width / 2, width }, + * but never larger than 16 and never smaller than 4. */ +typedef void (*op_fill_func)(uint8_t *block /* align width (8 or 16) */, + uint8_t value, ptrdiff_t line_size, int h); + +typedef struct BlockDSPContext { + void (*clear_block)(int16_t *block /* align 32 */); + void (*clear_blocks)(int16_t *blocks /* align 32 */); + + op_fill_func fill_block_tab[2]; +} BlockDSPContext; + +void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx); + +void ff_blockdsp_init_alpha(BlockDSPContext *c); +void ff_blockdsp_init_arm(BlockDSPContext *c); +void ff_blockdsp_init_ppc(BlockDSPContext *c); +void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx); +void ff_blockdsp_init_mips(BlockDSPContext *c); + +#endif /* AVCODEC_BLOCKDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bmp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bmp.h new file mode 100644 index 00000000..fb210906 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bmp.h @@ -0,0 +1,34 @@ +/* + * internals for BMP codecs + * Copyright (c) 2005 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BMP_H +#define AVCODEC_BMP_H + +#include "avcodec.h" + +typedef enum { + BMP_RGB =0, + BMP_RLE8 =1, + BMP_RLE4 =2, + BMP_BITFIELDS =3, +} BiCompression; + +#endif /* AVCODEC_BMP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf.h new file mode 100644 index 00000000..7ed51677 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf.h @@ -0,0 +1,325 @@ +/* + * Bitstream filters public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BSF_H +#define AVCODEC_BSF_H + +#include "libavutil/dict.h" +#include "libavutil/log.h" +#include "libavutil/rational.h" + +#include "codec_id.h" +#include "codec_par.h" +#include "packet.h" + +/** + * @addtogroup lavc_core + * @{ + */ + +typedef struct AVBSFInternal AVBSFInternal; + +/** + * The bitstream filter state. + * + * This struct must be allocated with av_bsf_alloc() and freed with + * av_bsf_free(). + * + * The fields in the struct will only be changed (by the caller or by the + * filter) as described in their documentation, and are to be considered + * immutable otherwise. + */ +typedef struct AVBSFContext { + /** + * A class for logging and AVOptions + */ + const AVClass *av_class; + + /** + * The bitstream filter this context is an instance of. + */ + const struct AVBitStreamFilter *filter; + + /** + * Opaque libavcodec internal data. Must not be touched by the caller in any + * way. + */ + AVBSFInternal *internal; + + /** + * Opaque filter-specific private data. If filter->priv_class is non-NULL, + * this is an AVOptions-enabled struct. + */ + void *priv_data; + + /** + * Parameters of the input stream. This field is allocated in + * av_bsf_alloc(), it needs to be filled by the caller before + * av_bsf_init(). + */ + AVCodecParameters *par_in; + + /** + * Parameters of the output stream. This field is allocated in + * av_bsf_alloc(), it is set by the filter in av_bsf_init(). + */ + AVCodecParameters *par_out; + + /** + * The timebase used for the timestamps of the input packets. Set by the + * caller before av_bsf_init(). + */ + AVRational time_base_in; + + /** + * The timebase used for the timestamps of the output packets. Set by the + * filter in av_bsf_init(). + */ + AVRational time_base_out; +} AVBSFContext; + +typedef struct AVBitStreamFilter { + const char *name; + + /** + * A list of codec ids supported by the filter, terminated by + * AV_CODEC_ID_NONE. + * May be NULL, in that case the bitstream filter works with any codec id. + */ + const enum AVCodecID *codec_ids; + + /** + * A class for the private data, used to declare bitstream filter private + * AVOptions. This field is NULL for bitstream filters that do not declare + * any options. + * + * If this field is non-NULL, the first member of the filter private data + * must be a pointer to AVClass, which will be set by libavcodec generic + * code to this class. + */ + const AVClass *priv_class; + + /***************************************************************** + * No fields below this line are part of the public API. They + * may not be used outside of libavcodec and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + + int priv_data_size; + int (*init)(AVBSFContext *ctx); + int (*filter)(AVBSFContext *ctx, AVPacket *pkt); + void (*close)(AVBSFContext *ctx); + void (*flush)(AVBSFContext *ctx); +} AVBitStreamFilter; + +/** + * @return a bitstream filter with the specified name or NULL if no such + * bitstream filter exists. + */ +const AVBitStreamFilter *av_bsf_get_by_name(const char *name); + +/** + * Iterate over all registered bitstream filters. + * + * @param opaque a pointer where libavcodec will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered bitstream filter or NULL when the iteration is + * finished + */ +const AVBitStreamFilter *av_bsf_iterate(void **opaque); + +/** + * Allocate a context for a given bitstream filter. The caller must fill in the + * context parameters as described in the documentation and then call + * av_bsf_init() before sending any data to the filter. + * + * @param filter the filter for which to allocate an instance. + * @param ctx a pointer into which the pointer to the newly-allocated context + * will be written. It must be freed with av_bsf_free() after the + * filtering is done. + * + * @return 0 on success, a negative AVERROR code on failure + */ +int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx); + +/** + * Prepare the filter for use, after all the parameters and options have been + * set. + */ +int av_bsf_init(AVBSFContext *ctx); + +/** + * Submit a packet for filtering. + * + * After sending each packet, the filter must be completely drained by calling + * av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or + * AVERROR_EOF. + * + * @param pkt the packet to filter. The bitstream filter will take ownership of + * the packet and reset the contents of pkt. pkt is not touched if an error occurs. + * If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero), + * it signals the end of the stream (i.e. no more non-empty packets will be sent; + * sending more empty packets does nothing) and will cause the filter to output + * any packets it may have buffered internally. + * + * @return 0 on success. AVERROR(EAGAIN) if packets need to be retrieved from the + * filter (using av_bsf_receive_packet()) before new input can be consumed. Another + * negative AVERROR value if an error occurs. + */ +int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt); + +/** + * Retrieve a filtered packet. + * + * @param[out] pkt this struct will be filled with the contents of the filtered + * packet. It is owned by the caller and must be freed using + * av_packet_unref() when it is no longer needed. + * This parameter should be "clean" (i.e. freshly allocated + * with av_packet_alloc() or unreffed with av_packet_unref()) + * when this function is called. If this function returns + * successfully, the contents of pkt will be completely + * overwritten by the returned data. On failure, pkt is not + * touched. + * + * @return 0 on success. AVERROR(EAGAIN) if more packets need to be sent to the + * filter (using av_bsf_send_packet()) to get more output. AVERROR_EOF if there + * will be no further output from the filter. Another negative AVERROR value if + * an error occurs. + * + * @note one input packet may result in several output packets, so after sending + * a packet with av_bsf_send_packet(), this function needs to be called + * repeatedly until it stops returning 0. It is also possible for a filter to + * output fewer packets than were sent to it, so this function may return + * AVERROR(EAGAIN) immediately after a successful av_bsf_send_packet() call. + */ +int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt); + +/** + * Reset the internal bitstream filter state / flush internal buffers. + */ +void av_bsf_flush(AVBSFContext *ctx); + +/** + * Free a bitstream filter context and everything associated with it; write NULL + * into the supplied pointer. + */ +void av_bsf_free(AVBSFContext **ctx); + +/** + * Get the AVClass for AVBSFContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *av_bsf_get_class(void); + +/** + * Structure for chain/list of bitstream filters. + * Empty list can be allocated by av_bsf_list_alloc(). + */ +typedef struct AVBSFList AVBSFList; + +/** + * Allocate empty list of bitstream filters. + * The list must be later freed by av_bsf_list_free() + * or finalized by av_bsf_list_finalize(). + * + * @return Pointer to @ref AVBSFList on success, NULL in case of failure + */ +AVBSFList *av_bsf_list_alloc(void); + +/** + * Free list of bitstream filters. + * + * @param lst Pointer to pointer returned by av_bsf_list_alloc() + */ +void av_bsf_list_free(AVBSFList **lst); + +/** + * Append bitstream filter to the list of bitstream filters. + * + * @param lst List to append to + * @param bsf Filter context to be appended + * + * @return >=0 on success, negative AVERROR in case of failure + */ +int av_bsf_list_append(AVBSFList *lst, AVBSFContext *bsf); + +/** + * Construct new bitstream filter context given it's name and options + * and append it to the list of bitstream filters. + * + * @param lst List to append to + * @param bsf_name Name of the bitstream filter + * @param options Options for the bitstream filter, can be set to NULL + * + * @return >=0 on success, negative AVERROR in case of failure + */ +int av_bsf_list_append2(AVBSFList *lst, const char * bsf_name, AVDictionary **options); +/** + * Finalize list of bitstream filters. + * + * This function will transform @ref AVBSFList to single @ref AVBSFContext, + * so the whole chain of bitstream filters can be treated as single filter + * freshly allocated by av_bsf_alloc(). + * If the call is successful, @ref AVBSFList structure is freed and lst + * will be set to NULL. In case of failure, caller is responsible for + * freeing the structure by av_bsf_list_free() + * + * @param lst Filter list structure to be transformed + * @param[out] bsf Pointer to be set to newly created @ref AVBSFContext structure + * representing the chain of bitstream filters + * + * @return >=0 on success, negative AVERROR in case of failure + */ +int av_bsf_list_finalize(AVBSFList **lst, AVBSFContext **bsf); + +/** + * Parse string describing list of bitstream filters and create single + * @ref AVBSFContext describing the whole chain of bitstream filters. + * Resulting @ref AVBSFContext can be treated as any other @ref AVBSFContext freshly + * allocated by av_bsf_alloc(). + * + * @param str String describing chain of bitstream filters in format + * `bsf1[=opt1=val1:opt2=val2][,bsf2]` + * @param[out] bsf Pointer to be set to newly created @ref AVBSFContext structure + * representing the chain of bitstream filters + * + * @return >=0 on success, negative AVERROR in case of failure + */ +int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf); + +/** + * Get null/pass-through bitstream filter. + * + * @param[out] bsf Pointer to be set to new instance of pass-through bitstream filter + * + * @return + */ +int av_bsf_get_null_filter(AVBSFContext **bsf); + +/** + * @} + */ + +#endif // AVCODEC_BSF_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf_internal.h new file mode 100644 index 00000000..fefd5b89 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bsf_internal.h @@ -0,0 +1,47 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BSF_INTERNAL_H +#define AVCODEC_BSF_INTERNAL_H + +#include "libavutil/log.h" + +#include "bsf.h" +#include "packet.h" + +/** + * Called by the bitstream filters to get the next packet for filtering. + * The filter is responsible for either freeing the packet or passing it to the + * caller. + */ +int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt); + +/** + * Called by bitstream filters to get packet for filtering. + * The reference to packet is moved to provided packet structure. + * + * @param ctx pointer to AVBSFContext of filter + * @param pkt pointer to packet to move reference to + * + * @return 0 on success, negative AVERROR in case of failure + */ +int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt); + +const AVClass *ff_bsf_child_class_next(const AVClass *prev); + +#endif /* AVCODEC_BSF_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bswapdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bswapdsp.h new file mode 100644 index 00000000..4d190922 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bswapdsp.h @@ -0,0 +1,32 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BSWAPDSP_H +#define AVCODEC_BSWAPDSP_H + +#include + +typedef struct BswapDSPContext { + void (*bswap_buf)(uint32_t *dst, const uint32_t *src, int w); + void (*bswap16_buf)(uint16_t *dst, const uint16_t *src, int len); +} BswapDSPContext; + +void ff_bswapdsp_init(BswapDSPContext *c); +void ff_bswapdsp_init_x86(BswapDSPContext *c); + +#endif /* AVCODEC_BSWAPDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bytestream.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bytestream.h new file mode 100644 index 00000000..0516a6e3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/bytestream.h @@ -0,0 +1,376 @@ +/* + * Bytestream functions + * copyright (c) 2006 Baptiste Coudurier + * Copyright (c) 2012 Aneesh Dogra (lionaneesh) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_BYTESTREAM_H +#define AVCODEC_BYTESTREAM_H + +#include +#include + +#include "libavutil/avassert.h" +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" + +typedef struct GetByteContext { + const uint8_t *buffer, *buffer_end, *buffer_start; +} GetByteContext; + +typedef struct PutByteContext { + uint8_t *buffer, *buffer_end, *buffer_start; + int eof; +} PutByteContext; + +#define DEF(type, name, bytes, read, write) \ +static av_always_inline type bytestream_get_ ## name(const uint8_t **b) \ +{ \ + (*b) += bytes; \ + return read(*b - bytes); \ +} \ +static av_always_inline void bytestream_put_ ## name(uint8_t **b, \ + const type value) \ +{ \ + write(*b, value); \ + (*b) += bytes; \ +} \ +static av_always_inline void bytestream2_put_ ## name ## u(PutByteContext *p, \ + const type value) \ +{ \ + bytestream_put_ ## name(&p->buffer, value); \ +} \ +static av_always_inline void bytestream2_put_ ## name(PutByteContext *p, \ + const type value) \ +{ \ + if (!p->eof && (p->buffer_end - p->buffer >= bytes)) { \ + write(p->buffer, value); \ + p->buffer += bytes; \ + } else \ + p->eof = 1; \ +} \ +static av_always_inline type bytestream2_get_ ## name ## u(GetByteContext *g) \ +{ \ + return bytestream_get_ ## name(&g->buffer); \ +} \ +static av_always_inline type bytestream2_get_ ## name(GetByteContext *g) \ +{ \ + if (g->buffer_end - g->buffer < bytes) { \ + g->buffer = g->buffer_end; \ + return 0; \ + } \ + return bytestream2_get_ ## name ## u(g); \ +} \ +static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g) \ +{ \ + if (g->buffer_end - g->buffer < bytes) \ + return 0; \ + return read(g->buffer); \ +} + +DEF(uint64_t, le64, 8, AV_RL64, AV_WL64) +DEF(unsigned int, le32, 4, AV_RL32, AV_WL32) +DEF(unsigned int, le24, 3, AV_RL24, AV_WL24) +DEF(unsigned int, le16, 2, AV_RL16, AV_WL16) +DEF(uint64_t, be64, 8, AV_RB64, AV_WB64) +DEF(unsigned int, be32, 4, AV_RB32, AV_WB32) +DEF(unsigned int, be24, 3, AV_RB24, AV_WB24) +DEF(unsigned int, be16, 2, AV_RB16, AV_WB16) +DEF(unsigned int, byte, 1, AV_RB8 , AV_WB8) + +#if AV_HAVE_BIGENDIAN +# define bytestream2_get_ne16 bytestream2_get_be16 +# define bytestream2_get_ne24 bytestream2_get_be24 +# define bytestream2_get_ne32 bytestream2_get_be32 +# define bytestream2_get_ne64 bytestream2_get_be64 +# define bytestream2_get_ne16u bytestream2_get_be16u +# define bytestream2_get_ne24u bytestream2_get_be24u +# define bytestream2_get_ne32u bytestream2_get_be32u +# define bytestream2_get_ne64u bytestream2_get_be64u +# define bytestream2_put_ne16 bytestream2_put_be16 +# define bytestream2_put_ne24 bytestream2_put_be24 +# define bytestream2_put_ne32 bytestream2_put_be32 +# define bytestream2_put_ne64 bytestream2_put_be64 +# define bytestream2_peek_ne16 bytestream2_peek_be16 +# define bytestream2_peek_ne24 bytestream2_peek_be24 +# define bytestream2_peek_ne32 bytestream2_peek_be32 +# define bytestream2_peek_ne64 bytestream2_peek_be64 +#else +# define bytestream2_get_ne16 bytestream2_get_le16 +# define bytestream2_get_ne24 bytestream2_get_le24 +# define bytestream2_get_ne32 bytestream2_get_le32 +# define bytestream2_get_ne64 bytestream2_get_le64 +# define bytestream2_get_ne16u bytestream2_get_le16u +# define bytestream2_get_ne24u bytestream2_get_le24u +# define bytestream2_get_ne32u bytestream2_get_le32u +# define bytestream2_get_ne64u bytestream2_get_le64u +# define bytestream2_put_ne16 bytestream2_put_le16 +# define bytestream2_put_ne24 bytestream2_put_le24 +# define bytestream2_put_ne32 bytestream2_put_le32 +# define bytestream2_put_ne64 bytestream2_put_le64 +# define bytestream2_peek_ne16 bytestream2_peek_le16 +# define bytestream2_peek_ne24 bytestream2_peek_le24 +# define bytestream2_peek_ne32 bytestream2_peek_le32 +# define bytestream2_peek_ne64 bytestream2_peek_le64 +#endif + +static av_always_inline void bytestream2_init(GetByteContext *g, + const uint8_t *buf, + int buf_size) +{ + av_assert0(buf_size >= 0); + g->buffer = buf; + g->buffer_start = buf; + g->buffer_end = buf + buf_size; +} + +static av_always_inline void bytestream2_init_writer(PutByteContext *p, + uint8_t *buf, + int buf_size) +{ + av_assert0(buf_size >= 0); + p->buffer = buf; + p->buffer_start = buf; + p->buffer_end = buf + buf_size; + p->eof = 0; +} + +static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g) +{ + return g->buffer_end - g->buffer; +} + +static av_always_inline int bytestream2_get_bytes_left_p(PutByteContext *p) +{ + return p->buffer_end - p->buffer; +} + +static av_always_inline void bytestream2_skip(GetByteContext *g, + unsigned int size) +{ + g->buffer += FFMIN(g->buffer_end - g->buffer, size); +} + +static av_always_inline void bytestream2_skipu(GetByteContext *g, + unsigned int size) +{ + g->buffer += size; +} + +static av_always_inline void bytestream2_skip_p(PutByteContext *p, + unsigned int size) +{ + int size2; + if (p->eof) + return; + size2 = FFMIN(p->buffer_end - p->buffer, size); + if (size2 != size) + p->eof = 1; + p->buffer += size2; +} + +static av_always_inline int bytestream2_tell(GetByteContext *g) +{ + return (int)(g->buffer - g->buffer_start); +} + +static av_always_inline int bytestream2_tell_p(PutByteContext *p) +{ + return (int)(p->buffer - p->buffer_start); +} + +static av_always_inline int bytestream2_size(GetByteContext *g) +{ + return (int)(g->buffer_end - g->buffer_start); +} + +static av_always_inline int bytestream2_size_p(PutByteContext *p) +{ + return (int)(p->buffer_end - p->buffer_start); +} + +static av_always_inline int bytestream2_seek(GetByteContext *g, + int offset, + int whence) +{ + switch (whence) { + case SEEK_CUR: + offset = av_clip(offset, -(g->buffer - g->buffer_start), + g->buffer_end - g->buffer); + g->buffer += offset; + break; + case SEEK_END: + offset = av_clip(offset, -(g->buffer_end - g->buffer_start), 0); + g->buffer = g->buffer_end + offset; + break; + case SEEK_SET: + offset = av_clip(offset, 0, g->buffer_end - g->buffer_start); + g->buffer = g->buffer_start + offset; + break; + default: + return AVERROR(EINVAL); + } + return bytestream2_tell(g); +} + +static av_always_inline int bytestream2_seek_p(PutByteContext *p, + int offset, + int whence) +{ + p->eof = 0; + switch (whence) { + case SEEK_CUR: + if (p->buffer_end - p->buffer < offset) + p->eof = 1; + offset = av_clip(offset, -(p->buffer - p->buffer_start), + p->buffer_end - p->buffer); + p->buffer += offset; + break; + case SEEK_END: + if (offset > 0) + p->eof = 1; + offset = av_clip(offset, -(p->buffer_end - p->buffer_start), 0); + p->buffer = p->buffer_end + offset; + break; + case SEEK_SET: + if (p->buffer_end - p->buffer_start < offset) + p->eof = 1; + offset = av_clip(offset, 0, p->buffer_end - p->buffer_start); + p->buffer = p->buffer_start + offset; + break; + default: + return AVERROR(EINVAL); + } + return bytestream2_tell_p(p); +} + +static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, + uint8_t *dst, + unsigned int size) +{ + int size2 = FFMIN(g->buffer_end - g->buffer, size); + memcpy(dst, g->buffer, size2); + g->buffer += size2; + return size2; +} + +static av_always_inline unsigned int bytestream2_get_bufferu(GetByteContext *g, + uint8_t *dst, + unsigned int size) +{ + memcpy(dst, g->buffer, size); + g->buffer += size; + return size; +} + +static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p, + const uint8_t *src, + unsigned int size) +{ + int size2; + if (p->eof) + return 0; + size2 = FFMIN(p->buffer_end - p->buffer, size); + if (size2 != size) + p->eof = 1; + memcpy(p->buffer, src, size2); + p->buffer += size2; + return size2; +} + +static av_always_inline unsigned int bytestream2_put_bufferu(PutByteContext *p, + const uint8_t *src, + unsigned int size) +{ + memcpy(p->buffer, src, size); + p->buffer += size; + return size; +} + +static av_always_inline void bytestream2_set_buffer(PutByteContext *p, + const uint8_t c, + unsigned int size) +{ + int size2; + if (p->eof) + return; + size2 = FFMIN(p->buffer_end - p->buffer, size); + if (size2 != size) + p->eof = 1; + memset(p->buffer, c, size2); + p->buffer += size2; +} + +static av_always_inline void bytestream2_set_bufferu(PutByteContext *p, + const uint8_t c, + unsigned int size) +{ + memset(p->buffer, c, size); + p->buffer += size; +} + +static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p) +{ + return p->eof; +} + +static av_always_inline unsigned int bytestream2_copy_bufferu(PutByteContext *p, + GetByteContext *g, + unsigned int size) +{ + memcpy(p->buffer, g->buffer, size); + p->buffer += size; + g->buffer += size; + return size; +} + +static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p, + GetByteContext *g, + unsigned int size) +{ + int size2; + + if (p->eof) + return 0; + size = FFMIN(g->buffer_end - g->buffer, size); + size2 = FFMIN(p->buffer_end - p->buffer, size); + if (size2 != size) + p->eof = 1; + + return bytestream2_copy_bufferu(p, g, size2); +} + +static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, + uint8_t *dst, + unsigned int size) +{ + memcpy(dst, *b, size); + (*b) += size; + return size; +} + +static av_always_inline void bytestream_put_buffer(uint8_t **b, + const uint8_t *src, + unsigned int size) +{ + memcpy(*b, src, size); + (*b) += size; +} + +#endif /* AVCODEC_BYTESTREAM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cabac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cabac.h new file mode 100644 index 00000000..1bf1c620 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cabac.h @@ -0,0 +1,56 @@ +/* + * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Context Adaptive Binary Arithmetic Coder. + */ + +#ifndef AVCODEC_CABAC_H +#define AVCODEC_CABAC_H + +#include + +#include "put_bits.h" + +extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63]; +#define H264_NORM_SHIFT_OFFSET 0 +#define H264_LPS_RANGE_OFFSET 512 +#define H264_MLPS_STATE_OFFSET 1024 +#define H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET 1280 + +#define CABAC_BITS 16 +#define CABAC_MASK ((1< + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Context Adaptive Binary Arithmetic Coder inline functions + */ + +#ifndef AVCODEC_CABAC_FUNCTIONS_H +#define AVCODEC_CABAC_FUNCTIONS_H + +#include + +#include "cabac.h" +#include "config.h" + +#ifndef UNCHECKED_BITSTREAM_READER +#define UNCHECKED_BITSTREAM_READER !CONFIG_SAFE_BITSTREAM_READER +#endif + +#if ARCH_AARCH64 +# include "aarch64/cabac.h" +#endif +#if ARCH_ARM +# include "arm/cabac.h" +#endif +#if ARCH_X86 +# include "x86/cabac.h" +#endif +#if ARCH_MIPS +# include "mips/cabac.h" +#endif + +static const uint8_t * const ff_h264_norm_shift = ff_h264_cabac_tables + H264_NORM_SHIFT_OFFSET; +static const uint8_t * const ff_h264_lps_range = ff_h264_cabac_tables + H264_LPS_RANGE_OFFSET; +static const uint8_t * const ff_h264_mlps_state = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET; +static const uint8_t * const ff_h264_last_coeff_flag_offset_8x8 = ff_h264_cabac_tables + H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET; + +#if !defined(get_cabac_bypass) || !defined(get_cabac_terminate) +static void refill(CABACContext *c){ +#if CABAC_BITS == 16 + c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); +#else + c->low+= c->bytestream[0]<<1; +#endif + c->low -= CABAC_MASK; +#if !UNCHECKED_BITSTREAM_READER + if (c->bytestream < c->bytestream_end) +#endif + c->bytestream += CABAC_BITS / 8; +} +#endif + +#ifndef get_cabac_terminate +static inline void renorm_cabac_decoder_once(CABACContext *c){ + int shift= (uint32_t)(c->range - 0x100)>>31; + c->range<<= shift; + c->low <<= shift; + if(!(c->low & CABAC_MASK)) + refill(c); +} +#endif + +#ifndef get_cabac_inline +static void refill2(CABACContext *c){ + int i; + unsigned x; +#if !HAVE_FAST_CLZ + x= c->low ^ (c->low-1); + i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)]; +#else + i = ff_ctz(c->low) - CABAC_BITS; +#endif + + x= -CABAC_MASK; + +#if CABAC_BITS == 16 + x+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); +#else + x+= c->bytestream[0]<<1; +#endif + + c->low += x<bytestream < c->bytestream_end) +#endif + c->bytestream += CABAC_BITS/8; +} +#endif + +#ifndef get_cabac_inline +static av_always_inline int get_cabac_inline(CABACContext *c, uint8_t * const state){ + int s = *state; + int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s]; + int bit, lps_mask; + + c->range -= RangeLPS; + lps_mask= ((c->range<<(CABAC_BITS+1)) - c->low)>>31; + + c->low -= (c->range<<(CABAC_BITS+1)) & lps_mask; + c->range += (RangeLPS - c->range) & lps_mask; + + s^=lps_mask; + *state= (ff_h264_mlps_state+128)[s]; + bit= s&1; + + lps_mask= ff_h264_norm_shift[c->range]; + c->range<<= lps_mask; + c->low <<= lps_mask; + if(!(c->low & CABAC_MASK)) + refill2(c); + return bit; +} +#endif + +static int av_noinline av_unused get_cabac_noinline(CABACContext *c, uint8_t * const state){ + return get_cabac_inline(c,state); +} + +static int av_unused get_cabac(CABACContext *c, uint8_t * const state){ + return get_cabac_inline(c,state); +} + +#ifndef get_cabac_bypass +static int av_unused get_cabac_bypass(CABACContext *c){ + int range; + c->low += c->low; + + if(!(c->low & CABAC_MASK)) + refill(c); + + range= c->range<<(CABAC_BITS+1); + if(c->low < range){ + return 0; + }else{ + c->low -= range; + return 1; + } +} +#endif + +#ifndef get_cabac_bypass_sign +static av_always_inline int get_cabac_bypass_sign(CABACContext *c, int val){ + int range, mask; + c->low += c->low; + + if(!(c->low & CABAC_MASK)) + refill(c); + + range= c->range<<(CABAC_BITS+1); + c->low -= range; + mask= c->low >> 31; + range &= mask; + c->low += range; + return (val^mask)-mask; +} +#endif + +/** + * @return the number of bytes read or 0 if no end + */ +#ifndef get_cabac_terminate +static int av_unused get_cabac_terminate(CABACContext *c){ + c->range -= 2; + if(c->low < c->range<<(CABAC_BITS+1)){ + renorm_cabac_decoder_once(c); + return 0; + }else{ + return c->bytestream - c->bytestream_start; + } +} +#endif + +/** + * Skip @p n bytes and reset the decoder. + * @return the address of the first skipped byte or NULL if there's less than @p n bytes left + */ +#ifndef skip_bytes +static av_unused const uint8_t* skip_bytes(CABACContext *c, int n) { + const uint8_t *ptr = c->bytestream; + + if (c->low & 0x1) + ptr--; +#if CABAC_BITS == 16 + if (c->low & 0x1FF) + ptr--; +#endif + if ((int) (c->bytestream_end - ptr) < n) + return NULL; + if (ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n) < 0) + return NULL; + + return ptr; +} +#endif + +#endif /* AVCODEC_CABAC_FUNCTIONS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/canopus.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/canopus.h new file mode 100644 index 00000000..faa1e8df --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/canopus.h @@ -0,0 +1,32 @@ +/* + * Canopus common routines + * Copyright (c) 2015 Vittorio Giovara + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CANOPUS_H +#define AVCODEC_CANOPUS_H + +#include + +#include "avcodec.h" + +int ff_canopus_parse_info_tag(AVCodecContext *avctx, + const uint8_t *src, size_t size); + +#endif /* AVCODEC_CANOPUS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavs.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavs.h new file mode 100644 index 00000000..6bfb22ce --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavs.h @@ -0,0 +1,279 @@ +/* + * Chinese AVS video (AVS1-P2, JiZhun profile) decoder. + * Copyright (c) 2006 Stefan Gehrer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CAVS_H +#define AVCODEC_CAVS_H + +#include "cavsdsp.h" +#include "blockdsp.h" +#include "h264chroma.h" +#include "idctdsp.h" +#include "get_bits.h" +#include "videodsp.h" + +#define SLICE_MAX_START_CODE 0x000001af +#define EXT_START_CODE 0x000001b5 +#define USER_START_CODE 0x000001b2 +#define CAVS_START_CODE 0x000001b0 +#define PIC_I_START_CODE 0x000001b3 +#define PIC_PB_START_CODE 0x000001b6 + +#define A_AVAIL 1 +#define B_AVAIL 2 +#define C_AVAIL 4 +#define D_AVAIL 8 +#define NOT_AVAIL -1 +#define REF_INTRA -2 +#define REF_DIR -3 + +#define ESCAPE_CODE 59 + +#define FWD0 0x01 +#define FWD1 0x02 +#define BWD0 0x04 +#define BWD1 0x08 +#define SYM0 0x10 +#define SYM1 0x20 +#define SPLITH 0x40 +#define SPLITV 0x80 + +#define MV_BWD_OFFS 12 +#define MV_STRIDE 4 + +enum cavs_mb { + I_8X8 = 0, + P_SKIP, + P_16X16, + P_16X8, + P_8X16, + P_8X8, + B_SKIP, + B_DIRECT, + B_FWD_16X16, + B_BWD_16X16, + B_SYM_16X16, + B_8X8 = 29 +}; + +enum cavs_sub_mb { + B_SUB_DIRECT, + B_SUB_FWD, + B_SUB_BWD, + B_SUB_SYM +}; + +enum cavs_intra_luma { + INTRA_L_VERT, + INTRA_L_HORIZ, + INTRA_L_LP, + INTRA_L_DOWN_LEFT, + INTRA_L_DOWN_RIGHT, + INTRA_L_LP_LEFT, + INTRA_L_LP_TOP, + INTRA_L_DC_128 +}; + +enum cavs_intra_chroma { + INTRA_C_LP, + INTRA_C_HORIZ, + INTRA_C_VERT, + INTRA_C_PLANE, + INTRA_C_LP_LEFT, + INTRA_C_LP_TOP, + INTRA_C_DC_128, +}; + +enum cavs_mv_pred { + MV_PRED_MEDIAN, + MV_PRED_LEFT, + MV_PRED_TOP, + MV_PRED_TOPRIGHT, + MV_PRED_PSKIP, + MV_PRED_BSKIP +}; + +enum cavs_block { + BLK_16X16, + BLK_16X8, + BLK_8X16, + BLK_8X8 +}; + +enum cavs_mv_loc { + MV_FWD_D3 = 0, + MV_FWD_B2, + MV_FWD_B3, + MV_FWD_C2, + MV_FWD_A1, + MV_FWD_X0, + MV_FWD_X1, + MV_FWD_A3 = 8, + MV_FWD_X2, + MV_FWD_X3, + MV_BWD_D3 = MV_BWD_OFFS, + MV_BWD_B2, + MV_BWD_B3, + MV_BWD_C2, + MV_BWD_A1, + MV_BWD_X0, + MV_BWD_X1, + MV_BWD_A3 = MV_BWD_OFFS+8, + MV_BWD_X2, + MV_BWD_X3 +}; + +DECLARE_ALIGNED(8, typedef, struct) { + int16_t x; + int16_t y; + int16_t dist; + int16_t ref; +} cavs_vector; + +struct dec_2dvlc { + int8_t rltab[59][3]; + int8_t level_add[27]; + int8_t golomb_order; + int inc_limit; + int8_t max_run; +}; + +typedef struct AVSFrame { + AVFrame *f; + int poc; +} AVSFrame; + +typedef struct AVSContext { + AVCodecContext *avctx; + BlockDSPContext bdsp; + H264ChromaContext h264chroma; + IDCTDSPContext idsp; + VideoDSPContext vdsp; + CAVSDSPContext cdsp; + GetBitContext gb; + AVSFrame cur; ///< currently decoded frame + AVSFrame DPB[2]; ///< reference frames + int dist[2]; ///< temporal distances from current frame to ref frames + int low_delay; + int profile, level; + int aspect_ratio; + int mb_width, mb_height; + int width, height; + int stream_revision; ///<0 for samples from 2006, 1 for rm52j encoder + int progressive; + int pic_structure; + int skip_mode_flag; ///< select between skip_count or one skip_flag per MB + int loop_filter_disable; + int alpha_offset, beta_offset; + int ref_flag; + int mbx, mby, mbidx; ///< macroblock coordinates + int flags; ///< availability flags of neighbouring macroblocks + int stc; ///< last start code + uint8_t *cy, *cu, *cv; ///< current MB sample pointers + int left_qp; + uint8_t *top_qp; + + /** mv motion vector cache + 0: D3 B2 B3 C2 + 4: A1 X0 X1 - + 8: A3 X2 X3 - + + X are the vectors in the current macroblock (5,6,9,10) + A is the macroblock to the left (4,8) + B is the macroblock to the top (1,2) + C is the macroblock to the top-right (3) + D is the macroblock to the top-left (0) + + the same is repeated for backward motion vectors */ + cavs_vector mv[2*4*3]; + cavs_vector *top_mv[2]; + cavs_vector *col_mv; + + /** luma pred mode cache + 0: -- B2 B3 + 3: A1 X0 X1 + 6: A3 X2 X3 */ + int pred_mode_Y[3*3]; + int *top_pred_Y; + ptrdiff_t l_stride, c_stride; + int luma_scan[4]; + int qp; + int qp_fixed; + int pic_qp_fixed; + int cbp; + ScanTable scantable; + + /** intra prediction is done with un-deblocked samples + they are saved here before deblocking the MB */ + uint8_t *top_border_y, *top_border_u, *top_border_v; + uint8_t left_border_y[26], left_border_u[10], left_border_v[10]; + uint8_t intern_border_y[26]; + uint8_t topleft_border_y, topleft_border_u, topleft_border_v; + + void (*intra_pred_l[8])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride); + void (*intra_pred_c[7])(uint8_t *d, uint8_t *top, uint8_t *left, ptrdiff_t stride); + uint8_t *col_type_base; + + /* scaling factors for MV prediction */ + int sym_factor; ///< for scaling in symmetrical B block + int direct_den[2]; ///< for scaling in direct B block + int scale_den[2]; ///< for scaling neighbouring MVs + + uint8_t *edge_emu_buffer; + + int got_keyframe; + int16_t *block; +} AVSContext; + +extern const uint8_t ff_cavs_chroma_qp[64]; +extern const uint8_t ff_cavs_partition_flags[30]; +extern const cavs_vector ff_cavs_intra_mv; +extern const cavs_vector ff_cavs_dir_mv; + +static inline void set_mvs(cavs_vector *mv, enum cavs_block size) { + switch(size) { + case BLK_16X16: + mv[MV_STRIDE ] = mv[0]; + mv[MV_STRIDE+1] = mv[0]; + case BLK_16X8: + mv[1] = mv[0]; + break; + case BLK_8X16: + mv[MV_STRIDE] = mv[0]; + break; + } +} + +void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type); +void ff_cavs_load_intra_pred_luma(AVSContext *h, uint8_t *top, uint8_t **left, + int block); +void ff_cavs_load_intra_pred_chroma(AVSContext *h); +void ff_cavs_modify_mb_i(AVSContext *h, int *pred_mode_uv); +void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type); +void ff_cavs_mv(AVSContext *h, enum cavs_mv_loc nP, enum cavs_mv_loc nC, + enum cavs_mv_pred mode, enum cavs_block size, int ref); +void ff_cavs_init_mb(AVSContext *h); +int ff_cavs_next_mb(AVSContext *h); +int ff_cavs_init_pic(AVSContext *h); +int ff_cavs_init_top_lines(AVSContext *h); +int ff_cavs_init(AVCodecContext *avctx); +int ff_cavs_end (AVCodecContext *avctx); + +#endif /* AVCODEC_CAVS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavsdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavsdsp.h new file mode 100644 index 00000000..9ccaa0ad --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cavsdsp.h @@ -0,0 +1,44 @@ +/* + * Chinese AVS video (AVS1-P2, JiZhun profile) decoder. + * Copyright (c) 2006 Stefan Gehrer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CAVSDSP_H +#define AVCODEC_CAVSDSP_H + +#include + +#include "avcodec.h" +#include "qpeldsp.h" + +typedef struct CAVSDSPContext { + qpel_mc_func put_cavs_qpel_pixels_tab[2][16]; + qpel_mc_func avg_cavs_qpel_pixels_tab[2][16]; + void (*cavs_filter_lv)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2); + void (*cavs_filter_lh)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2); + void (*cavs_filter_cv)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2); + void (*cavs_filter_ch)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int tc, int bs1, int bs2); + void (*cavs_idct8_add)(uint8_t *dst, int16_t *block, ptrdiff_t stride); + int idct_perm; +} CAVSDSPContext; + +void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx); +void ff_cavsdsp_init_x86(CAVSDSPContext* c, AVCodecContext *avctx); + +#endif /* AVCODEC_CAVSDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_data.h new file mode 100644 index 00000000..89117f85 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_data.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBRT_DATA_H +#define AVCODEC_CBRT_DATA_H + +#include + +#include "config.h" + +#if CONFIG_HARDCODED_TABLES +#define ff_cbrt_tableinit_fixed() +#define ff_cbrt_tableinit() +extern const uint32_t ff_cbrt_tab[1 << 13]; +extern const uint32_t ff_cbrt_tab_fixed[1 << 13]; +#else +void ff_cbrt_tableinit(void); +void ff_cbrt_tableinit_fixed(void); +extern uint32_t ff_cbrt_tab[1 << 13]; +extern uint32_t ff_cbrt_tab_fixed[1 << 13]; +#endif + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_tablegen.h new file mode 100644 index 00000000..9af18d8a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbrt_tablegen.h @@ -0,0 +1,73 @@ +/* + * Header file for hardcoded AAC cube-root table + * + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBRT_TABLEGEN_H +#define AVCODEC_CBRT_TABLEGEN_H + +#include +#include +#include "libavutil/attributes.h" +#include "libavutil/intfloat.h" +#include "libavcodec/aac_defines.h" + +#if USE_FIXED +#define CBRT(x) lrint((x) * 8192) +#else +#define CBRT(x) av_float2int((float)(x)) +#endif + +uint32_t AAC_RENAME(ff_cbrt_tab)[1 << 13]; + +av_cold void AAC_RENAME(ff_cbrt_tableinit)(void) +{ + static double cbrt_tab_dbl[1 << 13]; + if (!AAC_RENAME(ff_cbrt_tab)[(1<<13) - 1]) { + int i, j, k; + double cbrt_val; + + for (i = 1; i < 1<<13; i++) + cbrt_tab_dbl[i] = 1; + + /* have to take care of non-squarefree numbers */ + for (i = 2; i < 90; i++) { + if (cbrt_tab_dbl[i] == 1) { + cbrt_val = i * cbrt(i); + for (k = i; k < 1<<13; k *= i) + for (j = k; j < 1<<13; j += k) + cbrt_tab_dbl[j] *= cbrt_val; + } + } + + for (i = 91; i <= 8191; i+= 2) { + if (cbrt_tab_dbl[i] == 1) { + cbrt_val = i * cbrt(i); + for (j = i; j < 1<<13; j += i) + cbrt_tab_dbl[j] *= cbrt_val; + } + } + + for (i = 0; i < 1<<13; i++) + AAC_RENAME(ff_cbrt_tab)[i] = CBRT(cbrt_tab_dbl[i]); + } +} + +#endif /* AVCODEC_CBRT_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs.h new file mode 100644 index 00000000..9ca1fbd6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs.h @@ -0,0 +1,399 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_H +#define AVCODEC_CBS_H + +#include +#include + +#include "libavutil/buffer.h" + +#include "avcodec.h" + + +/* + * This defines a framework for converting between a coded bitstream + * and structures defining all individual syntax elements found in + * such a stream. + * + * Conversion in both directions is possible. Given a coded bitstream + * (any meaningful fragment), it can be parsed and decomposed into + * syntax elements stored in a set of codec-specific structures. + * Similarly, given a set of those same codec-specific structures the + * syntax elements can be serialised and combined to create a coded + * bitstream. + */ + +struct CodedBitstreamType; + +/** + * The codec-specific type of a bitstream unit. + * + * H.264 / AVC: nal_unit_type + * H.265 / HEVC: nal_unit_type + * MPEG-2: start code value (without prefix) + * VP9: unused, set to zero (every unit is a frame) + */ +typedef uint32_t CodedBitstreamUnitType; + +/** + * Coded bitstream unit structure. + * + * A bitstream unit the smallest element of a bitstream which + * is meaningful on its own. For example, an H.264 NAL unit. + * + * See the codec-specific header for the meaning of this for any + * particular codec. + */ +typedef struct CodedBitstreamUnit { + /** + * Codec-specific type of this unit. + */ + CodedBitstreamUnitType type; + + /** + * Pointer to the directly-parsable bitstream form of this unit. + * + * May be NULL if the unit currently only exists in decomposed form. + */ + uint8_t *data; + /** + * The number of bytes in the bitstream (including any padding bits + * in the final byte). + */ + size_t data_size; + /** + * The number of bits which should be ignored in the final byte. + * + * This supports non-byte-aligned bitstreams. + */ + size_t data_bit_padding; + /** + * A reference to the buffer containing data. + * + * Must be set if data is not NULL. + */ + AVBufferRef *data_ref; + + /** + * Pointer to the decomposed form of this unit. + * + * The type of this structure depends on both the codec and the + * type of this unit. May be NULL if the unit only exists in + * bitstream form. + */ + void *content; + /** + * If content is reference counted, a reference to the buffer containing + * content. Null if content is not reference counted. + */ + AVBufferRef *content_ref; +} CodedBitstreamUnit; + +/** + * Coded bitstream fragment structure, combining one or more units. + * + * This is any sequence of units. It need not form some greater whole, + * though in many cases it will. For example, an H.264 access unit, + * which is composed of a sequence of H.264 NAL units. + */ +typedef struct CodedBitstreamFragment { + /** + * Pointer to the bitstream form of this fragment. + * + * May be NULL if the fragment only exists as component units. + */ + uint8_t *data; + /** + * The number of bytes in the bitstream. + * + * The number of bytes in the bitstream (including any padding bits + * in the final byte). + */ + size_t data_size; + /** + * The number of bits which should be ignored in the final byte. + */ + size_t data_bit_padding; + /** + * A reference to the buffer containing data. + * + * Must be set if data is not NULL. + */ + AVBufferRef *data_ref; + + /** + * Number of units in this fragment. + * + * This may be zero if the fragment only exists in bitstream form + * and has not been decomposed. + */ + int nb_units; + + /** + * Number of allocated units. + * + * Must always be >= nb_units; designed for internal use by cbs. + */ + int nb_units_allocated; + + /** + * Pointer to an array of units of length nb_units_allocated. + * Only the first nb_units are valid. + * + * Must be NULL if nb_units_allocated is zero. + */ + CodedBitstreamUnit *units; +} CodedBitstreamFragment; + +/** + * Context structure for coded bitstream operations. + */ +typedef struct CodedBitstreamContext { + /** + * Logging context to be passed to all av_log() calls associated + * with this context. + */ + void *log_ctx; + + /** + * Internal codec-specific hooks. + */ + const struct CodedBitstreamType *codec; + + /** + * Internal codec-specific data. + * + * This contains any information needed when reading/writing + * bitsteams which will not necessarily be present in a fragment. + * For example, for H.264 it contains all currently visible + * parameter sets - they are required to determine the bitstream + * syntax but need not be present in every access unit. + */ + void *priv_data; + + /** + * Array of unit types which should be decomposed when reading. + * + * Types not in this list will be available in bitstream form only. + * If NULL, all supported types will be decomposed. + */ + CodedBitstreamUnitType *decompose_unit_types; + /** + * Length of the decompose_unit_types array. + */ + int nb_decompose_unit_types; + + /** + * Enable trace output during read/write operations. + */ + int trace_enable; + /** + * Log level to use for trace output. + * + * From AV_LOG_*; defaults to AV_LOG_TRACE. + */ + int trace_level; + + /** + * Write buffer. Used as intermediate buffer when writing units. + * For internal use of cbs only. + */ + uint8_t *write_buffer; + size_t write_buffer_size; +} CodedBitstreamContext; + + +/** + * Table of all supported codec IDs. + * + * Terminated by AV_CODEC_ID_NONE. + */ +extern const enum AVCodecID ff_cbs_all_codec_ids[]; + + +/** + * Create and initialise a new context for the given codec. + */ +int ff_cbs_init(CodedBitstreamContext **ctx, + enum AVCodecID codec_id, void *log_ctx); + +/** + * Close a context and free all internal state. + */ +void ff_cbs_close(CodedBitstreamContext **ctx); + + +/** + * Read the extradata bitstream found in codec parameters into a + * fragment, then split into units and decompose. + * + * This also updates the internal state, so will need to be called for + * codecs with extradata to read parameter sets necessary for further + * parsing even if the fragment itself is not desired. + * + * The fragment must have been zeroed or reset via ff_cbs_fragment_reset + * before use. + */ +int ff_cbs_read_extradata(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + const AVCodecParameters *par); + +/** + * Read the data bitstream from a packet into a fragment, then + * split into units and decompose. + * + * This also updates the internal state of the coded bitstream context + * with any persistent data from the fragment which may be required to + * read following fragments (e.g. parameter sets). + * + * The fragment must have been zeroed or reset via ff_cbs_fragment_reset + * before use. + */ +int ff_cbs_read_packet(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + const AVPacket *pkt); + +/** + * Read a bitstream from a memory region into a fragment, then + * split into units and decompose. + * + * This also updates the internal state of the coded bitstream context + * with any persistent data from the fragment which may be required to + * read following fragments (e.g. parameter sets). + * + * The fragment must have been zeroed or reset via ff_cbs_fragment_reset + * before use. + */ +int ff_cbs_read(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + const uint8_t *data, size_t size); + + +/** + * Write the content of the fragment to its own internal buffer. + * + * Writes the content of all units and then assembles them into a new + * data buffer. When modifying the content of decomposed units, this + * can be used to regenerate the bitstream form of units or the whole + * fragment so that it can be extracted for other use. + * + * This also updates the internal state of the coded bitstream context + * with any persistent data from the fragment which may be required to + * write following fragments (e.g. parameter sets). + */ +int ff_cbs_write_fragment_data(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag); + +/** + * Write the bitstream of a fragment to the extradata in codec parameters. + * + * Modifies context and fragment as ff_cbs_write_fragment_data does and + * replaces any existing extradata in the structure. + */ +int ff_cbs_write_extradata(CodedBitstreamContext *ctx, + AVCodecParameters *par, + CodedBitstreamFragment *frag); + +/** + * Write the bitstream of a fragment to a packet. + * + * Modifies context and fragment as ff_cbs_write_fragment_data does. + * + * On success, the packet's buf is unreferenced and its buf, data and + * size fields are set to the corresponding values from the newly updated + * fragment; other fields are not touched. On failure, the packet is not + * touched at all. + */ +int ff_cbs_write_packet(CodedBitstreamContext *ctx, + AVPacket *pkt, + CodedBitstreamFragment *frag); + + +/** + * Free the units contained in a fragment as well as the fragment's + * own data buffer, but not the units array itself. + */ +void ff_cbs_fragment_reset(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag); + +/** + * Free the units array of a fragment in addition to what + * ff_cbs_fragment_reset does. + */ +void ff_cbs_fragment_free(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag); + +/** + * Allocate a new internal content buffer of the given size in the unit. + * + * The content will be zeroed. + */ +int ff_cbs_alloc_unit_content(CodedBitstreamContext *ctx, + CodedBitstreamUnit *unit, + size_t size, + void (*free)(void *opaque, uint8_t *content)); + +/** + * Allocate a new internal data buffer of the given size in the unit. + * + * The data buffer will have input padding. + */ +int ff_cbs_alloc_unit_data(CodedBitstreamContext *ctx, + CodedBitstreamUnit *unit, + size_t size); + +/** + * Insert a new unit into a fragment with the given content. + * + * The content structure continues to be owned by the caller if + * content_buf is not supplied. + */ +int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + int position, + CodedBitstreamUnitType type, + void *content, + AVBufferRef *content_buf); + +/** + * Insert a new unit into a fragment with the given data bitstream. + * + * If data_buf is not supplied then data must have been allocated with + * av_malloc() and will on success become owned by the unit after this + * call or freed on error. + */ +int ff_cbs_insert_unit_data(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + int position, + CodedBitstreamUnitType type, + uint8_t *data, size_t data_size, + AVBufferRef *data_buf); + +/** + * Delete a unit from a fragment and free all memory it uses. + * + * Requires position to be >= 0 and < frag->nb_units. + */ +void ff_cbs_delete_unit(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + int position); + + +#endif /* AVCODEC_CBS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_av1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_av1.h new file mode 100644 index 00000000..1adb5ae0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_av1.h @@ -0,0 +1,451 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_AV1_H +#define AVCODEC_CBS_AV1_H + +#include +#include + +#include "av1.h" +#include "cbs.h" + + +typedef struct AV1RawOBUHeader { + uint8_t obu_forbidden_bit; + uint8_t obu_type; + uint8_t obu_extension_flag; + uint8_t obu_has_size_field; + uint8_t obu_reserved_1bit; + + uint8_t temporal_id; + uint8_t spatial_id; + uint8_t extension_header_reserved_3bits; +} AV1RawOBUHeader; + +typedef struct AV1RawColorConfig { + uint8_t high_bitdepth; + uint8_t twelve_bit; + uint8_t mono_chrome; + + uint8_t color_description_present_flag; + uint8_t color_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + + uint8_t color_range; + uint8_t subsampling_x; + uint8_t subsampling_y; + uint8_t chroma_sample_position; + uint8_t separate_uv_delta_q; +} AV1RawColorConfig; + +typedef struct AV1RawTimingInfo { + uint32_t num_units_in_display_tick; + uint32_t time_scale; + + uint8_t equal_picture_interval; + uint32_t num_ticks_per_picture_minus_1; +} AV1RawTimingInfo; + +typedef struct AV1RawDecoderModelInfo { + uint8_t buffer_delay_length_minus_1; + uint32_t num_units_in_decoding_tick; + uint8_t buffer_removal_time_length_minus_1; + uint8_t frame_presentation_time_length_minus_1; +} AV1RawDecoderModelInfo; + +typedef struct AV1RawSequenceHeader { + uint8_t seq_profile; + uint8_t still_picture; + uint8_t reduced_still_picture_header; + + uint8_t timing_info_present_flag; + uint8_t decoder_model_info_present_flag; + uint8_t initial_display_delay_present_flag; + uint8_t operating_points_cnt_minus_1; + + AV1RawTimingInfo timing_info; + AV1RawDecoderModelInfo decoder_model_info; + + uint16_t operating_point_idc[AV1_MAX_OPERATING_POINTS]; + uint8_t seq_level_idx[AV1_MAX_OPERATING_POINTS]; + uint8_t seq_tier[AV1_MAX_OPERATING_POINTS]; + uint8_t decoder_model_present_for_this_op[AV1_MAX_OPERATING_POINTS]; + uint32_t decoder_buffer_delay[AV1_MAX_OPERATING_POINTS]; + uint32_t encoder_buffer_delay[AV1_MAX_OPERATING_POINTS]; + uint8_t low_delay_mode_flag[AV1_MAX_OPERATING_POINTS]; + uint8_t initial_display_delay_present_for_this_op[AV1_MAX_OPERATING_POINTS]; + uint8_t initial_display_delay_minus_1[AV1_MAX_OPERATING_POINTS]; + + uint8_t frame_width_bits_minus_1; + uint8_t frame_height_bits_minus_1; + uint16_t max_frame_width_minus_1; + uint16_t max_frame_height_minus_1; + + uint8_t frame_id_numbers_present_flag; + uint8_t delta_frame_id_length_minus_2; + uint8_t additional_frame_id_length_minus_1; + + uint8_t use_128x128_superblock; + uint8_t enable_filter_intra; + uint8_t enable_intra_edge_filter; + uint8_t enable_interintra_compound; + uint8_t enable_masked_compound; + uint8_t enable_warped_motion; + uint8_t enable_dual_filter; + + uint8_t enable_order_hint; + uint8_t enable_jnt_comp; + uint8_t enable_ref_frame_mvs; + + uint8_t seq_choose_screen_content_tools; + uint8_t seq_force_screen_content_tools; + uint8_t seq_choose_integer_mv; + uint8_t seq_force_integer_mv; + + uint8_t order_hint_bits_minus_1; + + uint8_t enable_superres; + uint8_t enable_cdef; + uint8_t enable_restoration; + + AV1RawColorConfig color_config; + + uint8_t film_grain_params_present; +} AV1RawSequenceHeader; + +typedef struct AV1RawFrameHeader { + uint8_t show_existing_frame; + uint8_t frame_to_show_map_idx; + uint32_t frame_presentation_time; + uint32_t display_frame_id; + + uint8_t frame_type; + uint8_t show_frame; + uint8_t showable_frame; + + uint8_t error_resilient_mode; + uint8_t disable_cdf_update; + uint8_t allow_screen_content_tools; + uint8_t force_integer_mv; + + uint32_t current_frame_id; + uint8_t frame_size_override_flag; + uint8_t order_hint; + + uint8_t buffer_removal_time_present_flag; + uint32_t buffer_removal_time[AV1_MAX_OPERATING_POINTS]; + + uint8_t primary_ref_frame; + uint16_t frame_width_minus_1; + uint16_t frame_height_minus_1; + uint8_t use_superres; + uint8_t coded_denom; + uint8_t render_and_frame_size_different; + uint16_t render_width_minus_1; + uint16_t render_height_minus_1; + + uint8_t found_ref[AV1_REFS_PER_FRAME]; + + uint8_t refresh_frame_flags; + uint8_t allow_intrabc; + uint8_t ref_order_hint[AV1_NUM_REF_FRAMES]; + uint8_t frame_refs_short_signaling; + uint8_t last_frame_idx; + uint8_t golden_frame_idx; + int8_t ref_frame_idx[AV1_REFS_PER_FRAME]; + uint32_t delta_frame_id_minus1[AV1_REFS_PER_FRAME]; + + uint8_t allow_high_precision_mv; + uint8_t is_filter_switchable; + uint8_t interpolation_filter; + uint8_t is_motion_mode_switchable; + uint8_t use_ref_frame_mvs; + + uint8_t disable_frame_end_update_cdf; + + uint8_t uniform_tile_spacing_flag; + uint8_t tile_cols_log2; + uint8_t tile_rows_log2; + uint8_t width_in_sbs_minus_1[AV1_MAX_TILE_COLS]; + uint8_t height_in_sbs_minus_1[AV1_MAX_TILE_ROWS]; + uint16_t context_update_tile_id; + uint8_t tile_size_bytes_minus1; + + // These are derived values, but it's very unhelpful to have to + // recalculate them all the time so we store them here. + uint16_t tile_cols; + uint16_t tile_rows; + + uint8_t base_q_idx; + int8_t delta_q_y_dc; + uint8_t diff_uv_delta; + int8_t delta_q_u_dc; + int8_t delta_q_u_ac; + int8_t delta_q_v_dc; + int8_t delta_q_v_ac; + uint8_t using_qmatrix; + uint8_t qm_y; + uint8_t qm_u; + uint8_t qm_v; + + uint8_t segmentation_enabled; + uint8_t segmentation_update_map; + uint8_t segmentation_temporal_update; + uint8_t segmentation_update_data; + uint8_t feature_enabled[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; + int16_t feature_value[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; + + uint8_t delta_q_present; + uint8_t delta_q_res; + uint8_t delta_lf_present; + uint8_t delta_lf_res; + uint8_t delta_lf_multi; + + uint8_t loop_filter_level[4]; + uint8_t loop_filter_sharpness; + uint8_t loop_filter_delta_enabled; + uint8_t loop_filter_delta_update; + uint8_t update_ref_delta[AV1_TOTAL_REFS_PER_FRAME]; + int8_t loop_filter_ref_deltas[AV1_TOTAL_REFS_PER_FRAME]; + uint8_t update_mode_delta[2]; + int8_t loop_filter_mode_deltas[2]; + + uint8_t cdef_damping_minus_3; + uint8_t cdef_bits; + uint8_t cdef_y_pri_strength[8]; + uint8_t cdef_y_sec_strength[8]; + uint8_t cdef_uv_pri_strength[8]; + uint8_t cdef_uv_sec_strength[8]; + + uint8_t lr_type[3]; + uint8_t lr_unit_shift; + uint8_t lr_uv_shift; + + uint8_t tx_mode; + uint8_t reference_select; + uint8_t skip_mode_present; + + uint8_t allow_warped_motion; + uint8_t reduced_tx_set; + + uint8_t is_global[AV1_TOTAL_REFS_PER_FRAME]; + uint8_t is_rot_zoom[AV1_TOTAL_REFS_PER_FRAME]; + uint8_t is_translation[AV1_TOTAL_REFS_PER_FRAME]; + //AV1RawSubexp gm_params[AV1_TOTAL_REFS_PER_FRAME][6]; + uint32_t gm_params[AV1_TOTAL_REFS_PER_FRAME][6]; + + uint8_t apply_grain; + uint16_t grain_seed; + uint8_t update_grain; + uint8_t film_grain_params_ref_idx; + uint8_t num_y_points; + uint8_t point_y_value[14]; + uint8_t point_y_scaling[14]; + uint8_t chroma_scaling_from_luma; + uint8_t num_cb_points; + uint8_t point_cb_value[10]; + uint8_t point_cb_scaling[10]; + uint8_t num_cr_points; + uint8_t point_cr_value[10]; + uint8_t point_cr_scaling[10]; + uint8_t grain_scaling_minus_8; + uint8_t ar_coeff_lag; + uint8_t ar_coeffs_y_plus_128[24]; + uint8_t ar_coeffs_cb_plus_128[25]; + uint8_t ar_coeffs_cr_plus_128[25]; + uint8_t ar_coeff_shift_minus_6; + uint8_t grain_scale_shift; + uint8_t cb_mult; + uint8_t cb_luma_mult; + uint16_t cb_offset; + uint8_t cr_mult; + uint8_t cr_luma_mult; + uint16_t cr_offset; + uint8_t overlap_flag; + uint8_t clip_to_restricted_range; +} AV1RawFrameHeader; + +typedef struct AV1RawTileData { + uint8_t *data; + size_t data_size; + AVBufferRef *data_ref; +} AV1RawTileData; + +typedef struct AV1RawTileGroup { + uint8_t tile_start_and_end_present_flag; + uint16_t tg_start; + uint16_t tg_end; + + AV1RawTileData tile_data; +} AV1RawTileGroup; + +typedef struct AV1RawFrame { + AV1RawFrameHeader header; + AV1RawTileGroup tile_group; +} AV1RawFrame; + +typedef struct AV1RawTileList { + uint8_t output_frame_width_in_tiles_minus_1; + uint8_t output_frame_height_in_tiles_minus_1; + uint16_t tile_count_minus_1; + + AV1RawTileData tile_data; +} AV1RawTileList; + +typedef struct AV1RawMetadataHDRCLL { + uint16_t max_cll; + uint16_t max_fall; +} AV1RawMetadataHDRCLL; + +typedef struct AV1RawMetadataHDRMDCV { + uint16_t primary_chromaticity_x[3]; + uint16_t primary_chromaticity_y[3]; + uint16_t white_point_chromaticity_x; + uint16_t white_point_chromaticity_y; + uint32_t luminance_max; + uint32_t luminance_min; +} AV1RawMetadataHDRMDCV; + +typedef struct AV1RawMetadataScalability { + uint8_t scalability_mode_idc; + uint8_t spatial_layers_cnt_minus_1; + uint8_t spatial_layer_dimensions_present_flag; + uint8_t spatial_layer_description_present_flag; + uint8_t temporal_group_description_present_flag; + uint8_t scalability_structure_reserved_3bits; + uint16_t spatial_layer_max_width[4]; + uint16_t spatial_layer_max_height[4]; + uint8_t spatial_layer_ref_id[4]; + uint8_t temporal_group_size; + uint8_t temporal_group_temporal_id[255]; + uint8_t temporal_group_temporal_switching_up_point_flag[255]; + uint8_t temporal_group_spatial_switching_up_point_flag[255]; + uint8_t temporal_group_ref_cnt[255]; + uint8_t temporal_group_ref_pic_diff[255][7]; +} AV1RawMetadataScalability; + +typedef struct AV1RawMetadataITUTT35 { + uint8_t itu_t_t35_country_code; + uint8_t itu_t_t35_country_code_extension_byte; + + uint8_t *payload; + size_t payload_size; + AVBufferRef *payload_ref; +} AV1RawMetadataITUTT35; + +typedef struct AV1RawMetadataTimecode { + uint8_t counting_type; + uint8_t full_timestamp_flag; + uint8_t discontinuity_flag; + uint8_t cnt_dropped_flag; + uint16_t n_frames; + uint8_t seconds_value; + uint8_t minutes_value; + uint8_t hours_value; + uint8_t seconds_flag; + uint8_t minutes_flag; + uint8_t hours_flag; + uint8_t time_offset_length; + uint32_t time_offset_value; +} AV1RawMetadataTimecode; + +typedef struct AV1RawMetadata { + uint64_t metadata_type; + union { + AV1RawMetadataHDRCLL hdr_cll; + AV1RawMetadataHDRMDCV hdr_mdcv; + AV1RawMetadataScalability scalability; + AV1RawMetadataITUTT35 itut_t35; + AV1RawMetadataTimecode timecode; + } metadata; +} AV1RawMetadata; + +typedef struct AV1RawPadding { + uint8_t *payload; + size_t payload_size; + AVBufferRef *payload_ref; +} AV1RawPadding; + + +typedef struct AV1RawOBU { + AV1RawOBUHeader header; + + size_t obu_size; + + union { + AV1RawSequenceHeader sequence_header; + AV1RawFrameHeader frame_header; + AV1RawFrame frame; + AV1RawTileGroup tile_group; + AV1RawTileList tile_list; + AV1RawMetadata metadata; + AV1RawPadding padding; + } obu; +} AV1RawOBU; + +typedef struct AV1ReferenceFrameState { + int valid; // RefValid + int frame_id; // RefFrameId + int upscaled_width; // RefUpscaledWidth + int frame_width; // RefFrameWidth + int frame_height; // RefFrameHeight + int render_width; // RefRenderWidth + int render_height; // RefRenderHeight + int frame_type; // RefFrameType + int subsampling_x; // RefSubsamplingX + int subsampling_y; // RefSubsamplingY + int bit_depth; // RefBitDepth + int order_hint; // RefOrderHint +} AV1ReferenceFrameState; + +typedef struct CodedBitstreamAV1Context { + AV1RawSequenceHeader *sequence_header; + AVBufferRef *sequence_header_ref; + + int seen_frame_header; + AVBufferRef *frame_header_ref; + uint8_t *frame_header; + size_t frame_header_size; + + int temporal_id; + int spatial_id; + int operating_point_idc; + + int bit_depth; + int order_hint; + int frame_width; + int frame_height; + int upscaled_width; + int render_width; + int render_height; + + int num_planes; + int coded_lossless; + int all_lossless; + int tile_cols; + int tile_rows; + + AV1ReferenceFrameState *ref; + AV1ReferenceFrameState read_ref[AV1_NUM_REF_FRAMES]; + AV1ReferenceFrameState write_ref[AV1_NUM_REF_FRAMES]; +} CodedBitstreamAV1Context; + + +#endif /* AVCODEC_CBS_AV1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h264.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h264.h new file mode 100644 index 00000000..9f7c2a0d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h264.h @@ -0,0 +1,493 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_H264_H +#define AVCODEC_CBS_H264_H + +#include +#include + +#include "cbs.h" +#include "cbs_h2645.h" +#include "h264.h" + + +enum { + // This limit is arbitrary - it is sufficient for one message of each + // type plus some repeats, and will therefore easily cover all sane + // streams. However, it is possible to make technically-valid streams + // for which it will fail (for example, by including a large number of + // user-data-unregistered messages). + H264_MAX_SEI_PAYLOADS = 64, +}; + + +typedef struct H264RawNALUnitHeader { + uint8_t nal_ref_idc; + uint8_t nal_unit_type; + + uint8_t svc_extension_flag; + uint8_t avc_3d_extension_flag; +} H264RawNALUnitHeader; + +typedef struct H264RawScalingList { + int8_t delta_scale[64]; +} H264RawScalingList; + +typedef struct H264RawHRD { + uint8_t cpb_cnt_minus1; + uint8_t bit_rate_scale; + uint8_t cpb_size_scale; + + uint32_t bit_rate_value_minus1[H264_MAX_CPB_CNT]; + uint32_t cpb_size_value_minus1[H264_MAX_CPB_CNT]; + uint8_t cbr_flag[H264_MAX_CPB_CNT]; + + uint8_t initial_cpb_removal_delay_length_minus1; + uint8_t cpb_removal_delay_length_minus1; + uint8_t dpb_output_delay_length_minus1; + uint8_t time_offset_length; +} H264RawHRD; + +typedef struct H264RawVUI { + uint8_t aspect_ratio_info_present_flag; + uint8_t aspect_ratio_idc; + uint16_t sar_width; + uint16_t sar_height; + + uint8_t overscan_info_present_flag; + uint8_t overscan_appropriate_flag; + + uint8_t video_signal_type_present_flag; + uint8_t video_format; + uint8_t video_full_range_flag; + uint8_t colour_description_present_flag; + uint8_t colour_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + + uint8_t chroma_loc_info_present_flag; + uint8_t chroma_sample_loc_type_top_field; + uint8_t chroma_sample_loc_type_bottom_field; + + uint8_t timing_info_present_flag; + uint32_t num_units_in_tick; + uint32_t time_scale; + uint8_t fixed_frame_rate_flag; + + uint8_t nal_hrd_parameters_present_flag; + H264RawHRD nal_hrd_parameters; + uint8_t vcl_hrd_parameters_present_flag; + H264RawHRD vcl_hrd_parameters; + uint8_t low_delay_hrd_flag; + + uint8_t pic_struct_present_flag; + + uint8_t bitstream_restriction_flag; + uint8_t motion_vectors_over_pic_boundaries_flag; + uint8_t max_bytes_per_pic_denom; + uint8_t max_bits_per_mb_denom; + uint8_t log2_max_mv_length_horizontal; + uint8_t log2_max_mv_length_vertical; + uint8_t max_num_reorder_frames; + uint8_t max_dec_frame_buffering; +} H264RawVUI; + +typedef struct H264RawSPS { + H264RawNALUnitHeader nal_unit_header; + + uint8_t profile_idc; + uint8_t constraint_set0_flag; + uint8_t constraint_set1_flag; + uint8_t constraint_set2_flag; + uint8_t constraint_set3_flag; + uint8_t constraint_set4_flag; + uint8_t constraint_set5_flag; + uint8_t reserved_zero_2bits; + uint8_t level_idc; + + uint8_t seq_parameter_set_id; + + uint8_t chroma_format_idc; + uint8_t separate_colour_plane_flag; + uint8_t bit_depth_luma_minus8; + uint8_t bit_depth_chroma_minus8; + uint8_t qpprime_y_zero_transform_bypass_flag; + + uint8_t seq_scaling_matrix_present_flag; + uint8_t seq_scaling_list_present_flag[12]; + H264RawScalingList scaling_list_4x4[6]; + H264RawScalingList scaling_list_8x8[6]; + + uint8_t log2_max_frame_num_minus4; + uint8_t pic_order_cnt_type; + uint8_t log2_max_pic_order_cnt_lsb_minus4; + uint8_t delta_pic_order_always_zero_flag; + int32_t offset_for_non_ref_pic; + int32_t offset_for_top_to_bottom_field; + uint8_t num_ref_frames_in_pic_order_cnt_cycle; + int32_t offset_for_ref_frame[256]; + + uint8_t max_num_ref_frames; + uint8_t gaps_in_frame_num_allowed_flag; + + uint16_t pic_width_in_mbs_minus1; + uint16_t pic_height_in_map_units_minus1; + + uint8_t frame_mbs_only_flag; + uint8_t mb_adaptive_frame_field_flag; + uint8_t direct_8x8_inference_flag; + + uint8_t frame_cropping_flag; + uint16_t frame_crop_left_offset; + uint16_t frame_crop_right_offset; + uint16_t frame_crop_top_offset; + uint16_t frame_crop_bottom_offset; + + uint8_t vui_parameters_present_flag; + H264RawVUI vui; +} H264RawSPS; + +typedef struct H264RawSPSExtension { + H264RawNALUnitHeader nal_unit_header; + + uint8_t seq_parameter_set_id; + + uint8_t aux_format_idc; + uint8_t bit_depth_aux_minus8; + uint8_t alpha_incr_flag; + uint16_t alpha_opaque_value; + uint16_t alpha_transparent_value; + + uint8_t additional_extension_flag; +} H264RawSPSExtension; + +typedef struct H264RawPPS { + H264RawNALUnitHeader nal_unit_header; + + uint8_t pic_parameter_set_id; + uint8_t seq_parameter_set_id; + + uint8_t entropy_coding_mode_flag; + uint8_t bottom_field_pic_order_in_frame_present_flag; + + uint8_t num_slice_groups_minus1; + uint8_t slice_group_map_type; + uint16_t run_length_minus1[H264_MAX_SLICE_GROUPS]; + uint16_t top_left[H264_MAX_SLICE_GROUPS]; + uint16_t bottom_right[H264_MAX_SLICE_GROUPS]; + uint8_t slice_group_change_direction_flag; + uint16_t slice_group_change_rate_minus1; + uint16_t pic_size_in_map_units_minus1; + + uint8_t *slice_group_id; + AVBufferRef *slice_group_id_ref; + + uint8_t num_ref_idx_l0_default_active_minus1; + uint8_t num_ref_idx_l1_default_active_minus1; + + uint8_t weighted_pred_flag; + uint8_t weighted_bipred_idc; + + int8_t pic_init_qp_minus26; + int8_t pic_init_qs_minus26; + int8_t chroma_qp_index_offset; + + uint8_t deblocking_filter_control_present_flag; + uint8_t constrained_intra_pred_flag; + + uint8_t more_rbsp_data; + + uint8_t redundant_pic_cnt_present_flag; + uint8_t transform_8x8_mode_flag; + + uint8_t pic_scaling_matrix_present_flag; + uint8_t pic_scaling_list_present_flag[12]; + H264RawScalingList scaling_list_4x4[6]; + H264RawScalingList scaling_list_8x8[6]; + + int8_t second_chroma_qp_index_offset; +} H264RawPPS; + +typedef struct H264RawAUD { + H264RawNALUnitHeader nal_unit_header; + + uint8_t primary_pic_type; +} H264RawAUD; + +typedef struct H264RawSEIBufferingPeriod { + uint8_t seq_parameter_set_id; + struct { + uint32_t initial_cpb_removal_delay[H264_MAX_CPB_CNT]; + uint32_t initial_cpb_removal_delay_offset[H264_MAX_CPB_CNT]; + } nal, vcl; +} H264RawSEIBufferingPeriod; + +typedef struct H264RawSEIPicTimestamp { + uint8_t ct_type; + uint8_t nuit_field_based_flag; + uint8_t counting_type; + uint8_t full_timestamp_flag; + uint8_t discontinuity_flag; + uint8_t cnt_dropped_flag; + uint8_t n_frames; + uint8_t seconds_flag; + uint8_t seconds_value; + uint8_t minutes_flag; + uint8_t minutes_value; + uint8_t hours_flag; + uint8_t hours_value; + int32_t time_offset; +} H264RawSEIPicTimestamp; + +typedef struct H264RawSEIPicTiming { + uint32_t cpb_removal_delay; + uint32_t dpb_output_delay; + uint8_t pic_struct; + uint8_t clock_timestamp_flag[3]; + H264RawSEIPicTimestamp timestamp[3]; +} H264RawSEIPicTiming; + +typedef struct H264RawSEIPanScanRect { + uint32_t pan_scan_rect_id; + uint8_t pan_scan_rect_cancel_flag; + uint8_t pan_scan_cnt_minus1; + int32_t pan_scan_rect_left_offset[3]; + int32_t pan_scan_rect_right_offset[3]; + int32_t pan_scan_rect_top_offset[3]; + int32_t pan_scan_rect_bottom_offset[3]; + uint16_t pan_scan_rect_repetition_period; +} H264RawSEIPanScanRect; + +typedef struct H264RawSEIUserDataRegistered { + uint8_t itu_t_t35_country_code; + uint8_t itu_t_t35_country_code_extension_byte; + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; +} H264RawSEIUserDataRegistered; + +typedef struct H264RawSEIUserDataUnregistered { + uint8_t uuid_iso_iec_11578[16]; + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; +} H264RawSEIUserDataUnregistered; + +typedef struct H264RawSEIRecoveryPoint { + uint16_t recovery_frame_cnt; + uint8_t exact_match_flag; + uint8_t broken_link_flag; + uint8_t changing_slice_group_idc; +} H264RawSEIRecoveryPoint; + +typedef struct H264RawSEIDisplayOrientation { + uint8_t display_orientation_cancel_flag; + uint8_t hor_flip; + uint8_t ver_flip; + uint16_t anticlockwise_rotation; + uint16_t display_orientation_repetition_period; + uint8_t display_orientation_extension_flag; +} H264RawSEIDisplayOrientation; + +typedef struct H264RawSEIMasteringDisplayColourVolume { + uint16_t display_primaries_x[3]; + uint16_t display_primaries_y[3]; + uint16_t white_point_x; + uint16_t white_point_y; + uint32_t max_display_mastering_luminance; + uint32_t min_display_mastering_luminance; +} H264RawSEIMasteringDisplayColourVolume; + +typedef struct H264RawSEIAlternativeTransferCharacteristics { + uint8_t preferred_transfer_characteristics; +} H264RawSEIAlternativeTransferCharacteristics; + +typedef struct H264RawSEIPayload { + uint32_t payload_type; + uint32_t payload_size; + union { + H264RawSEIBufferingPeriod buffering_period; + H264RawSEIPicTiming pic_timing; + H264RawSEIPanScanRect pan_scan_rect; + // H264RawSEIFiller filler -> no fields. + H264RawSEIUserDataRegistered user_data_registered; + H264RawSEIUserDataUnregistered user_data_unregistered; + H264RawSEIRecoveryPoint recovery_point; + H264RawSEIDisplayOrientation display_orientation; + H264RawSEIMasteringDisplayColourVolume mastering_display_colour_volume; + H264RawSEIAlternativeTransferCharacteristics + alternative_transfer_characteristics; + struct { + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; + } other; + } payload; +} H264RawSEIPayload; + +typedef struct H264RawSEI { + H264RawNALUnitHeader nal_unit_header; + + H264RawSEIPayload payload[H264_MAX_SEI_PAYLOADS]; + uint8_t payload_count; +} H264RawSEI; + +typedef struct H264RawSliceHeader { + H264RawNALUnitHeader nal_unit_header; + + uint32_t first_mb_in_slice; + uint8_t slice_type; + + uint8_t pic_parameter_set_id; + + uint8_t colour_plane_id; + + uint16_t frame_num; + uint8_t field_pic_flag; + uint8_t bottom_field_flag; + + uint16_t idr_pic_id; + + uint16_t pic_order_cnt_lsb; + int32_t delta_pic_order_cnt_bottom; + int32_t delta_pic_order_cnt[2]; + + uint8_t redundant_pic_cnt; + uint8_t direct_spatial_mv_pred_flag; + + uint8_t num_ref_idx_active_override_flag; + uint8_t num_ref_idx_l0_active_minus1; + uint8_t num_ref_idx_l1_active_minus1; + + uint8_t ref_pic_list_modification_flag_l0; + uint8_t ref_pic_list_modification_flag_l1; + struct { + uint8_t modification_of_pic_nums_idc; + int32_t abs_diff_pic_num_minus1; + uint8_t long_term_pic_num; + } rplm_l0[H264_MAX_RPLM_COUNT], rplm_l1[H264_MAX_RPLM_COUNT]; + + uint8_t luma_log2_weight_denom; + uint8_t chroma_log2_weight_denom; + + uint8_t luma_weight_l0_flag[H264_MAX_REFS]; + int8_t luma_weight_l0[H264_MAX_REFS]; + int8_t luma_offset_l0[H264_MAX_REFS]; + uint8_t chroma_weight_l0_flag[H264_MAX_REFS]; + int8_t chroma_weight_l0[H264_MAX_REFS][2]; + int8_t chroma_offset_l0[H264_MAX_REFS][2]; + + uint8_t luma_weight_l1_flag[H264_MAX_REFS]; + int8_t luma_weight_l1[H264_MAX_REFS]; + int8_t luma_offset_l1[H264_MAX_REFS]; + uint8_t chroma_weight_l1_flag[H264_MAX_REFS]; + int8_t chroma_weight_l1[H264_MAX_REFS][2]; + int8_t chroma_offset_l1[H264_MAX_REFS][2]; + + uint8_t no_output_of_prior_pics_flag; + uint8_t long_term_reference_flag; + + uint8_t adaptive_ref_pic_marking_mode_flag; + struct { + uint8_t memory_management_control_operation; + int32_t difference_of_pic_nums_minus1; + uint8_t long_term_pic_num; + uint8_t long_term_frame_idx; + uint8_t max_long_term_frame_idx_plus1; + } mmco[H264_MAX_MMCO_COUNT]; + + uint8_t cabac_init_idc; + + int8_t slice_qp_delta; + + uint8_t sp_for_switch_flag; + int8_t slice_qs_delta; + + uint8_t disable_deblocking_filter_idc; + int8_t slice_alpha_c0_offset_div2; + int8_t slice_beta_offset_div2; + + uint16_t slice_group_change_cycle; +} H264RawSliceHeader; + +typedef struct H264RawSlice { + H264RawSliceHeader header; + + uint8_t *data; + size_t data_size; + int data_bit_start; + AVBufferRef *data_ref; +} H264RawSlice; + +typedef struct H264RawFiller { + H264RawNALUnitHeader nal_unit_header; + + uint32_t filler_size; +} H264RawFiller; + + +typedef struct CodedBitstreamH264Context { + // Reader/writer context in common with the H.265 implementation. + CodedBitstreamH2645Context common; + + // All currently available parameter sets. These are updated when + // any parameter set NAL unit is read/written with this context. + AVBufferRef *sps_ref[H264_MAX_SPS_COUNT]; + AVBufferRef *pps_ref[H264_MAX_PPS_COUNT]; + H264RawSPS *sps[H264_MAX_SPS_COUNT]; + H264RawPPS *pps[H264_MAX_PPS_COUNT]; + + // The currently active parameter sets. These are updated when any + // NAL unit refers to the relevant parameter set. These pointers + // must also be present in the arrays above. + const H264RawSPS *active_sps; + const H264RawPPS *active_pps; + + // The NAL unit type of the most recent normal slice. This is required + // to be able to read/write auxiliary slices, because IdrPicFlag is + // otherwise unknown. + uint8_t last_slice_nal_unit_type; +} CodedBitstreamH264Context; + + +/** + * Add an SEI message to an access unit. + * + * On success, the payload will be owned by a unit in access_unit; + * on failure, the content of the payload will be freed. + */ +int ff_cbs_h264_add_sei_message(CodedBitstreamContext *ctx, + CodedBitstreamFragment *access_unit, + H264RawSEIPayload *payload); + +/** + * Delete an SEI message from an access unit. + * + * Deletes from nal_unit, which must be an SEI NAL unit. If this is the + * last message in nal_unit, also deletes it from access_unit. + * + * Requires nal_unit to be a unit in access_unit and position to be >= 0 + * and < the payload count of the SEI nal_unit. + */ +void ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, + CodedBitstreamFragment *access_unit, + CodedBitstreamUnit *nal_unit, + int position); + +#endif /* AVCODEC_CBS_H264_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h2645.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h2645.h new file mode 100644 index 00000000..f4c987a5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h2645.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_H2645_H +#define AVCODEC_CBS_H2645_H + +#include "h2645_parse.h" + + +typedef struct CodedBitstreamH2645Context { + // If set, the stream being read is in MP4 (AVCC/HVCC) format. If not + // set, the stream is assumed to be in annex B format. + int mp4; + // Size in bytes of the NAL length field for MP4 format. + int nal_length_size; + // Packet reader. + H2645Packet read_packet; +} CodedBitstreamH2645Context; + + +#endif /* AVCODEC_CBS_H2645_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h265.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h265.h new file mode 100644 index 00000000..73897f77 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_h265.h @@ -0,0 +1,750 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_H265_H +#define AVCODEC_CBS_H265_H + +#include +#include + +#include "cbs_h2645.h" +#include "hevc.h" + +enum { + // This limit is arbitrary - it is sufficient for one message of each + // type plus some repeats, and will therefore easily cover all sane + // streams. However, it is possible to make technically-valid streams + // for which it will fail (for example, by including a large number of + // user-data-unregistered messages). + H265_MAX_SEI_PAYLOADS = 64, +}; + +typedef struct H265RawNALUnitHeader { + uint8_t nal_unit_type; + uint8_t nuh_layer_id; + uint8_t nuh_temporal_id_plus1; +} H265RawNALUnitHeader; + +typedef struct H265RawProfileTierLevel { + uint8_t general_profile_space; + uint8_t general_tier_flag; + uint8_t general_profile_idc; + + uint8_t general_profile_compatibility_flag[32]; + + uint8_t general_progressive_source_flag; + uint8_t general_interlaced_source_flag; + uint8_t general_non_packed_constraint_flag; + uint8_t general_frame_only_constraint_flag; + + uint8_t general_max_12bit_constraint_flag; + uint8_t general_max_10bit_constraint_flag; + uint8_t general_max_8bit_constraint_flag; + uint8_t general_max_422chroma_constraint_flag; + uint8_t general_max_420chroma_constraint_flag; + uint8_t general_max_monochrome_constraint_flag; + uint8_t general_intra_constraint_flag; + uint8_t general_one_picture_only_constraint_flag; + uint8_t general_lower_bit_rate_constraint_flag; + uint8_t general_max_14bit_constraint_flag; + + uint8_t general_inbld_flag; + + uint8_t general_level_idc; + + uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_profile_space[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_tier_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_profile_idc[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_profile_compatibility_flag[HEVC_MAX_SUB_LAYERS][32]; + + uint8_t sub_layer_progressive_source_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_interlaced_source_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_non_packed_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_frame_only_constraint_flag[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_max_12bit_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_10bit_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_8bit_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_422chroma_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_420chroma_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_monochrome_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_intra_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_one_picture_only_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_lower_bit_rate_constraint_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_max_14bit_constraint_flag[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_inbld_flag[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_level_idc[HEVC_MAX_SUB_LAYERS]; +} H265RawProfileTierLevel; + +typedef struct H265RawSubLayerHRDParameters { + uint32_t bit_rate_value_minus1[HEVC_MAX_CPB_CNT]; + uint32_t cpb_size_value_minus1[HEVC_MAX_CPB_CNT]; + uint32_t cpb_size_du_value_minus1[HEVC_MAX_CPB_CNT]; + uint32_t bit_rate_du_value_minus1[HEVC_MAX_CPB_CNT]; + uint8_t cbr_flag[HEVC_MAX_CPB_CNT]; +} H265RawSubLayerHRDParameters; + +typedef struct H265RawHRDParameters { + uint8_t nal_hrd_parameters_present_flag; + uint8_t vcl_hrd_parameters_present_flag; + + uint8_t sub_pic_hrd_params_present_flag; + uint8_t tick_divisor_minus2; + uint8_t du_cpb_removal_delay_increment_length_minus1; + uint8_t sub_pic_cpb_params_in_pic_timing_sei_flag; + uint8_t dpb_output_delay_du_length_minus1; + + uint8_t bit_rate_scale; + uint8_t cpb_size_scale; + uint8_t cpb_size_du_scale; + + uint8_t initial_cpb_removal_delay_length_minus1; + uint8_t au_cpb_removal_delay_length_minus1; + uint8_t dpb_output_delay_length_minus1; + + uint8_t fixed_pic_rate_general_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t fixed_pic_rate_within_cvs_flag[HEVC_MAX_SUB_LAYERS]; + uint16_t elemental_duration_in_tc_minus1[HEVC_MAX_SUB_LAYERS]; + uint8_t low_delay_hrd_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t cpb_cnt_minus1[HEVC_MAX_SUB_LAYERS]; + H265RawSubLayerHRDParameters nal_sub_layer_hrd_parameters[HEVC_MAX_SUB_LAYERS]; + H265RawSubLayerHRDParameters vcl_sub_layer_hrd_parameters[HEVC_MAX_SUB_LAYERS]; +} H265RawHRDParameters; + +typedef struct H265RawVUI { + uint8_t aspect_ratio_info_present_flag; + uint8_t aspect_ratio_idc; + uint16_t sar_width; + uint16_t sar_height; + + uint8_t overscan_info_present_flag; + uint8_t overscan_appropriate_flag; + + uint8_t video_signal_type_present_flag; + uint8_t video_format; + uint8_t video_full_range_flag; + uint8_t colour_description_present_flag; + uint8_t colour_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + + uint8_t chroma_loc_info_present_flag; + uint8_t chroma_sample_loc_type_top_field; + uint8_t chroma_sample_loc_type_bottom_field; + + uint8_t neutral_chroma_indication_flag; + uint8_t field_seq_flag; + uint8_t frame_field_info_present_flag; + + uint8_t default_display_window_flag; + uint16_t def_disp_win_left_offset; + uint16_t def_disp_win_right_offset; + uint16_t def_disp_win_top_offset; + uint16_t def_disp_win_bottom_offset; + + uint8_t vui_timing_info_present_flag; + uint32_t vui_num_units_in_tick; + uint32_t vui_time_scale; + uint8_t vui_poc_proportional_to_timing_flag; + uint32_t vui_num_ticks_poc_diff_one_minus1; + uint8_t vui_hrd_parameters_present_flag; + H265RawHRDParameters hrd_parameters; + + uint8_t bitstream_restriction_flag; + uint8_t tiles_fixed_structure_flag; + uint8_t motion_vectors_over_pic_boundaries_flag; + uint8_t restricted_ref_pic_lists_flag; + uint16_t min_spatial_segmentation_idc; + uint8_t max_bytes_per_pic_denom; + uint8_t max_bits_per_min_cu_denom; + uint8_t log2_max_mv_length_horizontal; + uint8_t log2_max_mv_length_vertical; +} H265RawVUI; + +typedef struct H265RawExtensionData { + uint8_t *data; + size_t bit_length; + AVBufferRef *data_ref; +} H265RawExtensionData; + +typedef struct H265RawVPS { + H265RawNALUnitHeader nal_unit_header; + + uint8_t vps_video_parameter_set_id; + + uint8_t vps_base_layer_internal_flag; + uint8_t vps_base_layer_available_flag; + uint8_t vps_max_layers_minus1; + uint8_t vps_max_sub_layers_minus1; + uint8_t vps_temporal_id_nesting_flag; + + H265RawProfileTierLevel profile_tier_level; + + uint8_t vps_sub_layer_ordering_info_present_flag; + uint8_t vps_max_dec_pic_buffering_minus1[HEVC_MAX_SUB_LAYERS]; + uint8_t vps_max_num_reorder_pics[HEVC_MAX_SUB_LAYERS]; + uint32_t vps_max_latency_increase_plus1[HEVC_MAX_SUB_LAYERS]; + + uint8_t vps_max_layer_id; + uint16_t vps_num_layer_sets_minus1; + uint8_t layer_id_included_flag[HEVC_MAX_LAYER_SETS][HEVC_MAX_LAYERS]; + + uint8_t vps_timing_info_present_flag; + uint32_t vps_num_units_in_tick; + uint32_t vps_time_scale; + uint8_t vps_poc_proportional_to_timing_flag; + uint32_t vps_num_ticks_poc_diff_one_minus1; + uint16_t vps_num_hrd_parameters; + uint16_t hrd_layer_set_idx[HEVC_MAX_LAYER_SETS]; + uint8_t cprms_present_flag[HEVC_MAX_LAYER_SETS]; + H265RawHRDParameters hrd_parameters[HEVC_MAX_LAYER_SETS]; + + uint8_t vps_extension_flag; + H265RawExtensionData extension_data; +} H265RawVPS; + +typedef struct H265RawSTRefPicSet { + uint8_t inter_ref_pic_set_prediction_flag; + + uint8_t delta_idx_minus1; + uint8_t delta_rps_sign; + uint16_t abs_delta_rps_minus1; + + uint8_t used_by_curr_pic_flag[HEVC_MAX_REFS]; + uint8_t use_delta_flag[HEVC_MAX_REFS]; + + uint8_t num_negative_pics; + uint8_t num_positive_pics; + uint16_t delta_poc_s0_minus1[HEVC_MAX_REFS]; + uint8_t used_by_curr_pic_s0_flag[HEVC_MAX_REFS]; + uint16_t delta_poc_s1_minus1[HEVC_MAX_REFS]; + uint8_t used_by_curr_pic_s1_flag[HEVC_MAX_REFS]; +} H265RawSTRefPicSet; + +typedef struct H265RawScalingList { + uint8_t scaling_list_pred_mode_flag[4][6]; + uint8_t scaling_list_pred_matrix_id_delta[4][6]; + int16_t scaling_list_dc_coef_minus8[4][6]; + int8_t scaling_list_delta_coeff[4][6][64]; +} H265RawScalingList; + +typedef struct H265RawSPS { + H265RawNALUnitHeader nal_unit_header; + + uint8_t sps_video_parameter_set_id; + + uint8_t sps_max_sub_layers_minus1; + uint8_t sps_temporal_id_nesting_flag; + + H265RawProfileTierLevel profile_tier_level; + + uint8_t sps_seq_parameter_set_id; + + uint8_t chroma_format_idc; + uint8_t separate_colour_plane_flag; + + uint16_t pic_width_in_luma_samples; + uint16_t pic_height_in_luma_samples; + + uint8_t conformance_window_flag; + uint16_t conf_win_left_offset; + uint16_t conf_win_right_offset; + uint16_t conf_win_top_offset; + uint16_t conf_win_bottom_offset; + + uint8_t bit_depth_luma_minus8; + uint8_t bit_depth_chroma_minus8; + + uint8_t log2_max_pic_order_cnt_lsb_minus4; + + uint8_t sps_sub_layer_ordering_info_present_flag; + uint8_t sps_max_dec_pic_buffering_minus1[HEVC_MAX_SUB_LAYERS]; + uint8_t sps_max_num_reorder_pics[HEVC_MAX_SUB_LAYERS]; + uint32_t sps_max_latency_increase_plus1[HEVC_MAX_SUB_LAYERS]; + + uint8_t log2_min_luma_coding_block_size_minus3; + uint8_t log2_diff_max_min_luma_coding_block_size; + uint8_t log2_min_luma_transform_block_size_minus2; + uint8_t log2_diff_max_min_luma_transform_block_size; + uint8_t max_transform_hierarchy_depth_inter; + uint8_t max_transform_hierarchy_depth_intra; + + uint8_t scaling_list_enabled_flag; + uint8_t sps_scaling_list_data_present_flag; + H265RawScalingList scaling_list; + + uint8_t amp_enabled_flag; + uint8_t sample_adaptive_offset_enabled_flag; + + uint8_t pcm_enabled_flag; + uint8_t pcm_sample_bit_depth_luma_minus1; + uint8_t pcm_sample_bit_depth_chroma_minus1; + uint8_t log2_min_pcm_luma_coding_block_size_minus3; + uint8_t log2_diff_max_min_pcm_luma_coding_block_size; + uint8_t pcm_loop_filter_disabled_flag; + + uint8_t num_short_term_ref_pic_sets; + H265RawSTRefPicSet st_ref_pic_set[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]; + + uint8_t long_term_ref_pics_present_flag; + uint8_t num_long_term_ref_pics_sps; + uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]; + uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]; + + uint8_t sps_temporal_mvp_enabled_flag; + uint8_t strong_intra_smoothing_enabled_flag; + + uint8_t vui_parameters_present_flag; + H265RawVUI vui; + + uint8_t sps_extension_present_flag; + uint8_t sps_range_extension_flag; + uint8_t sps_multilayer_extension_flag; + uint8_t sps_3d_extension_flag; + uint8_t sps_scc_extension_flag; + uint8_t sps_extension_4bits; + + H265RawExtensionData extension_data; + + // Range extension. + uint8_t transform_skip_rotation_enabled_flag; + uint8_t transform_skip_context_enabled_flag; + uint8_t implicit_rdpcm_enabled_flag; + uint8_t explicit_rdpcm_enabled_flag; + uint8_t extended_precision_processing_flag; + uint8_t intra_smoothing_disabled_flag; + uint8_t high_precision_offsets_enabled_flag; + uint8_t persistent_rice_adaptation_enabled_flag; + uint8_t cabac_bypass_alignment_enabled_flag; + + // Screen content coding extension. + uint8_t sps_curr_pic_ref_enabled_flag; + uint8_t palette_mode_enabled_flag; + uint8_t palette_max_size; + uint8_t delta_palette_max_predictor_size; + uint8_t sps_palette_predictor_initializer_present_flag; + uint8_t sps_num_palette_predictor_initializer_minus1; + uint16_t sps_palette_predictor_initializers[3][128]; + + uint8_t motion_vector_resolution_control_idc; + uint8_t intra_boundary_filtering_disable_flag; +} H265RawSPS; + +typedef struct H265RawPPS { + H265RawNALUnitHeader nal_unit_header; + + uint8_t pps_pic_parameter_set_id; + uint8_t pps_seq_parameter_set_id; + + uint8_t dependent_slice_segments_enabled_flag; + uint8_t output_flag_present_flag; + uint8_t num_extra_slice_header_bits; + uint8_t sign_data_hiding_enabled_flag; + uint8_t cabac_init_present_flag; + + uint8_t num_ref_idx_l0_default_active_minus1; + uint8_t num_ref_idx_l1_default_active_minus1; + + int8_t init_qp_minus26; + + uint8_t constrained_intra_pred_flag; + uint8_t transform_skip_enabled_flag; + uint8_t cu_qp_delta_enabled_flag; + uint8_t diff_cu_qp_delta_depth; + + int8_t pps_cb_qp_offset; + int8_t pps_cr_qp_offset; + uint8_t pps_slice_chroma_qp_offsets_present_flag; + + uint8_t weighted_pred_flag; + uint8_t weighted_bipred_flag; + + uint8_t transquant_bypass_enabled_flag; + uint8_t tiles_enabled_flag; + uint8_t entropy_coding_sync_enabled_flag; + + uint8_t num_tile_columns_minus1; + uint8_t num_tile_rows_minus1; + uint8_t uniform_spacing_flag; + uint16_t column_width_minus1[HEVC_MAX_TILE_COLUMNS]; + uint16_t row_height_minus1[HEVC_MAX_TILE_ROWS]; + uint8_t loop_filter_across_tiles_enabled_flag; + + uint8_t pps_loop_filter_across_slices_enabled_flag; + uint8_t deblocking_filter_control_present_flag; + uint8_t deblocking_filter_override_enabled_flag; + uint8_t pps_deblocking_filter_disabled_flag; + int8_t pps_beta_offset_div2; + int8_t pps_tc_offset_div2; + + uint8_t pps_scaling_list_data_present_flag; + H265RawScalingList scaling_list; + + uint8_t lists_modification_present_flag; + uint8_t log2_parallel_merge_level_minus2; + + uint8_t slice_segment_header_extension_present_flag; + + uint8_t pps_extension_present_flag; + uint8_t pps_range_extension_flag; + uint8_t pps_multilayer_extension_flag; + uint8_t pps_3d_extension_flag; + uint8_t pps_scc_extension_flag; + uint8_t pps_extension_4bits; + + H265RawExtensionData extension_data; + + // Range extension. + uint8_t log2_max_transform_skip_block_size_minus2; + uint8_t cross_component_prediction_enabled_flag; + uint8_t chroma_qp_offset_list_enabled_flag; + uint8_t diff_cu_chroma_qp_offset_depth; + uint8_t chroma_qp_offset_list_len_minus1; + int8_t cb_qp_offset_list[6]; + int8_t cr_qp_offset_list[6]; + uint8_t log2_sao_offset_scale_luma; + uint8_t log2_sao_offset_scale_chroma; + + // Screen content coding extension. + uint8_t pps_curr_pic_ref_enabled_flag; + uint8_t residual_adaptive_colour_transform_enabled_flag; + uint8_t pps_slice_act_qp_offsets_present_flag; + int8_t pps_act_y_qp_offset_plus5; + int8_t pps_act_cb_qp_offset_plus5; + int8_t pps_act_cr_qp_offset_plus3; + + uint8_t pps_palette_predictor_initializer_present_flag; + uint8_t pps_num_palette_predictor_initializer; + uint8_t monochrome_palette_flag; + uint8_t luma_bit_depth_entry_minus8; + uint8_t chroma_bit_depth_entry_minus8; + uint16_t pps_palette_predictor_initializers[3][128]; +} H265RawPPS; + +typedef struct H265RawAUD { + H265RawNALUnitHeader nal_unit_header; + + uint8_t pic_type; +} H265RawAUD; + +typedef struct H265RawSliceHeader { + H265RawNALUnitHeader nal_unit_header; + + uint8_t first_slice_segment_in_pic_flag; + uint8_t no_output_of_prior_pics_flag; + uint8_t slice_pic_parameter_set_id; + + uint8_t dependent_slice_segment_flag; + uint16_t slice_segment_address; + + uint8_t slice_reserved_flag[8]; + uint8_t slice_type; + + uint8_t pic_output_flag; + uint8_t colour_plane_id; + + uint16_t slice_pic_order_cnt_lsb; + + uint8_t short_term_ref_pic_set_sps_flag; + H265RawSTRefPicSet short_term_ref_pic_set; + uint8_t short_term_ref_pic_set_idx; + + uint8_t num_long_term_sps; + uint8_t num_long_term_pics; + uint8_t lt_idx_sps[HEVC_MAX_REFS]; + uint8_t poc_lsb_lt[HEVC_MAX_REFS]; + uint8_t used_by_curr_pic_lt_flag[HEVC_MAX_REFS]; + uint8_t delta_poc_msb_present_flag[HEVC_MAX_REFS]; + uint32_t delta_poc_msb_cycle_lt[HEVC_MAX_REFS]; + + uint8_t slice_temporal_mvp_enabled_flag; + + uint8_t slice_sao_luma_flag; + uint8_t slice_sao_chroma_flag; + + uint8_t num_ref_idx_active_override_flag; + uint8_t num_ref_idx_l0_active_minus1; + uint8_t num_ref_idx_l1_active_minus1; + + uint8_t ref_pic_list_modification_flag_l0; + uint8_t list_entry_l0[HEVC_MAX_REFS]; + uint8_t ref_pic_list_modification_flag_l1; + uint8_t list_entry_l1[HEVC_MAX_REFS]; + + uint8_t mvd_l1_zero_flag; + uint8_t cabac_init_flag; + uint8_t collocated_from_l0_flag; + uint8_t collocated_ref_idx; + + uint8_t luma_log2_weight_denom; + int8_t delta_chroma_log2_weight_denom; + uint8_t luma_weight_l0_flag[HEVC_MAX_REFS]; + uint8_t chroma_weight_l0_flag[HEVC_MAX_REFS]; + int8_t delta_luma_weight_l0[HEVC_MAX_REFS]; + int16_t luma_offset_l0[HEVC_MAX_REFS]; + int8_t delta_chroma_weight_l0[HEVC_MAX_REFS][2]; + int16_t chroma_offset_l0[HEVC_MAX_REFS][2]; + uint8_t luma_weight_l1_flag[HEVC_MAX_REFS]; + uint8_t chroma_weight_l1_flag[HEVC_MAX_REFS]; + int8_t delta_luma_weight_l1[HEVC_MAX_REFS]; + int16_t luma_offset_l1[HEVC_MAX_REFS]; + int8_t delta_chroma_weight_l1[HEVC_MAX_REFS][2]; + int16_t chroma_offset_l1[HEVC_MAX_REFS][2]; + + uint8_t five_minus_max_num_merge_cand; + uint8_t use_integer_mv_flag; + + int8_t slice_qp_delta; + int8_t slice_cb_qp_offset; + int8_t slice_cr_qp_offset; + int8_t slice_act_y_qp_offset; + int8_t slice_act_cb_qp_offset; + int8_t slice_act_cr_qp_offset; + uint8_t cu_chroma_qp_offset_enabled_flag; + + uint8_t deblocking_filter_override_flag; + uint8_t slice_deblocking_filter_disabled_flag; + int8_t slice_beta_offset_div2; + int8_t slice_tc_offset_div2; + uint8_t slice_loop_filter_across_slices_enabled_flag; + + uint16_t num_entry_point_offsets; + uint8_t offset_len_minus1; + uint32_t entry_point_offset_minus1[HEVC_MAX_ENTRY_POINT_OFFSETS]; + + uint16_t slice_segment_header_extension_length; + uint8_t slice_segment_header_extension_data_byte[256]; +} H265RawSliceHeader; + + +typedef struct H265RawSlice { + H265RawSliceHeader header; + + uint8_t *data; + size_t data_size; + int data_bit_start; + AVBufferRef *data_ref; +} H265RawSlice; + + +typedef struct H265RawSEIBufferingPeriod { + uint8_t bp_seq_parameter_set_id; + uint8_t irap_cpb_params_present_flag; + uint32_t cpb_delay_offset; + uint32_t dpb_delay_offset; + uint8_t concatenation_flag; + uint32_t au_cpb_removal_delay_delta_minus1; + + uint32_t nal_initial_cpb_removal_delay[HEVC_MAX_CPB_CNT]; + uint32_t nal_initial_cpb_removal_offset[HEVC_MAX_CPB_CNT]; + uint32_t nal_initial_alt_cpb_removal_delay[HEVC_MAX_CPB_CNT]; + uint32_t nal_initial_alt_cpb_removal_offset[HEVC_MAX_CPB_CNT]; + + uint32_t vcl_initial_cpb_removal_delay[HEVC_MAX_CPB_CNT]; + uint32_t vcl_initial_cpb_removal_offset[HEVC_MAX_CPB_CNT]; + uint32_t vcl_initial_alt_cpb_removal_delay[HEVC_MAX_CPB_CNT]; + uint32_t vcl_initial_alt_cpb_removal_offset[HEVC_MAX_CPB_CNT]; + + uint8_t use_alt_cpb_params_flag; +} H265RawSEIBufferingPeriod; + +typedef struct H265RawSEIPicTiming { + uint8_t pic_struct; + uint8_t source_scan_type; + uint8_t duplicate_flag; + + uint32_t au_cpb_removal_delay_minus1; + uint32_t pic_dpb_output_delay; + uint32_t pic_dpb_output_du_delay; + + uint16_t num_decoding_units_minus1; + uint8_t du_common_cpb_removal_delay_flag; + uint32_t du_common_cpb_removal_delay_increment_minus1; + uint16_t num_nalus_in_du_minus1[HEVC_MAX_SLICE_SEGMENTS]; + uint32_t du_cpb_removal_delay_increment_minus1[HEVC_MAX_SLICE_SEGMENTS]; +} H265RawSEIPicTiming; + +typedef struct H265RawSEIPanScanRect { + uint32_t pan_scan_rect_id; + uint8_t pan_scan_rect_cancel_flag; + uint8_t pan_scan_cnt_minus1; + int32_t pan_scan_rect_left_offset[3]; + int32_t pan_scan_rect_right_offset[3]; + int32_t pan_scan_rect_top_offset[3]; + int32_t pan_scan_rect_bottom_offset[3]; + uint16_t pan_scan_rect_persistence_flag; +} H265RawSEIPanScanRect; + +typedef struct H265RawSEIUserDataRegistered { + uint8_t itu_t_t35_country_code; + uint8_t itu_t_t35_country_code_extension_byte; + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; +} H265RawSEIUserDataRegistered; + +typedef struct H265RawSEIUserDataUnregistered { + uint8_t uuid_iso_iec_11578[16]; + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; +} H265RawSEIUserDataUnregistered; + +typedef struct H265RawSEIRecoveryPoint { + int16_t recovery_poc_cnt; + uint8_t exact_match_flag; + uint8_t broken_link_flag; +} H265RawSEIRecoveryPoint; + +typedef struct H265RawSEIDisplayOrientation { + uint8_t display_orientation_cancel_flag; + uint8_t hor_flip; + uint8_t ver_flip; + uint16_t anticlockwise_rotation; + uint16_t display_orientation_repetition_period; + uint8_t display_orientation_persistence_flag; +} H265RawSEIDisplayOrientation; + +typedef struct H265RawSEIActiveParameterSets { + uint8_t active_video_parameter_set_id; + uint8_t self_contained_cvs_flag; + uint8_t no_parameter_set_update_flag; + uint8_t num_sps_ids_minus1; + uint8_t active_seq_parameter_set_id[HEVC_MAX_SPS_COUNT]; + uint8_t layer_sps_idx[HEVC_MAX_LAYERS]; +} H265RawSEIActiveParameterSets; + +typedef struct H265RawSEIDecodedPictureHash { + uint8_t hash_type; + uint8_t picture_md5[3][16]; + uint16_t picture_crc[3]; + uint32_t picture_checksum[3]; +} H265RawSEIDecodedPictureHash; + +typedef struct H265RawSEITimeCode { + uint8_t num_clock_ts; + uint8_t clock_timestamp_flag[3]; + uint8_t units_field_based_flag[3]; + uint8_t counting_type[3]; + uint8_t full_timestamp_flag[3]; + uint8_t discontinuity_flag[3]; + uint8_t cnt_dropped_flag[3]; + uint16_t n_frames[3]; + uint8_t seconds_value[3]; + uint8_t minutes_value[3]; + uint8_t hours_value[3]; + uint8_t seconds_flag[3]; + uint8_t minutes_flag[3]; + uint8_t hours_flag[3]; + uint8_t time_offset_length[3]; + int32_t time_offset_value[3]; +} H265RawSEITimeCode; + +typedef struct H265RawSEIMasteringDisplayColourVolume { + uint16_t display_primaries_x[3]; + uint16_t display_primaries_y[3]; + uint16_t white_point_x; + uint16_t white_point_y; + uint32_t max_display_mastering_luminance; + uint32_t min_display_mastering_luminance; +} H265RawSEIMasteringDisplayColourVolume; + +typedef struct H265RawSEIContentLightLevelInfo { + uint16_t max_content_light_level; + uint16_t max_pic_average_light_level; +} H265RawSEIContentLightLevelInfo; + +typedef struct H265RawSEIAlternativeTransferCharacteristics { + uint8_t preferred_transfer_characteristics; +} H265RawSEIAlternativeTransferCharacteristics; + +typedef struct H265RawSEIAlphaChannelInfo { + uint8_t alpha_channel_cancel_flag; + uint8_t alpha_channel_use_idc; + uint8_t alpha_channel_bit_depth_minus8; + uint16_t alpha_transparent_value; + uint16_t alpha_opaque_value; + uint8_t alpha_channel_incr_flag; + uint8_t alpha_channel_clip_flag; + uint8_t alpha_channel_clip_type_flag; +} H265RawSEIAlphaChannelInfo; + +typedef struct H265RawSEIPayload { + uint32_t payload_type; + uint32_t payload_size; + union { + H265RawSEIBufferingPeriod buffering_period; + H265RawSEIPicTiming pic_timing; + H265RawSEIPanScanRect pan_scan_rect; + H265RawSEIUserDataRegistered user_data_registered; + H265RawSEIUserDataUnregistered user_data_unregistered; + H265RawSEIRecoveryPoint recovery_point; + H265RawSEIDisplayOrientation display_orientation; + H265RawSEIActiveParameterSets active_parameter_sets; + H265RawSEIDecodedPictureHash decoded_picture_hash; + H265RawSEITimeCode time_code; + H265RawSEIMasteringDisplayColourVolume mastering_display; + H265RawSEIContentLightLevelInfo content_light_level; + H265RawSEIAlternativeTransferCharacteristics + alternative_transfer_characteristics; + H265RawSEIAlphaChannelInfo alpha_channel_info; + struct { + uint8_t *data; + size_t data_length; + AVBufferRef *data_ref; + } other; + } payload; + H265RawExtensionData extension_data; +} H265RawSEIPayload; + +typedef struct H265RawSEI { + H265RawNALUnitHeader nal_unit_header; + + H265RawSEIPayload payload[H265_MAX_SEI_PAYLOADS]; + uint8_t payload_count; +} H265RawSEI; + +typedef struct CodedBitstreamH265Context { + // Reader/writer context in common with the H.264 implementation. + CodedBitstreamH2645Context common; + + // All currently available parameter sets. These are updated when + // any parameter set NAL unit is read/written with this context. + AVBufferRef *vps_ref[HEVC_MAX_VPS_COUNT]; + AVBufferRef *sps_ref[HEVC_MAX_SPS_COUNT]; + AVBufferRef *pps_ref[HEVC_MAX_PPS_COUNT]; + H265RawVPS *vps[HEVC_MAX_VPS_COUNT]; + H265RawSPS *sps[HEVC_MAX_SPS_COUNT]; + H265RawPPS *pps[HEVC_MAX_PPS_COUNT]; + + // The currently active parameter sets. These are updated when any + // NAL unit refers to the relevant parameter set. These pointers + // must also be present in the arrays above. + const H265RawVPS *active_vps; + const H265RawSPS *active_sps; + const H265RawPPS *active_pps; +} CodedBitstreamH265Context; + + +#endif /* AVCODEC_CBS_H265_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_internal.h new file mode 100644 index 00000000..4c5a535c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_internal.h @@ -0,0 +1,117 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_INTERNAL_H +#define AVCODEC_CBS_INTERNAL_H + +#include "avcodec.h" +#include "cbs.h" +#include "get_bits.h" +#include "put_bits.h" + + +typedef struct CodedBitstreamType { + enum AVCodecID codec_id; + + size_t priv_data_size; + + // Split frag->data into coded bitstream units, creating the + // frag->units array. Fill data but not content on each unit. + // The header argument should be set if the fragment came from + // a header block, which may require different parsing for some + // codecs (e.g. the AVCC header in H.264). + int (*split_fragment)(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + int header); + + // Read the unit->data bitstream and decompose it, creating + // unit->content. + int (*read_unit)(CodedBitstreamContext *ctx, + CodedBitstreamUnit *unit); + + // Write the data bitstream from unit->content into pbc. + // Return value AVERROR(ENOSPC) indicates that pbc was too small. + int (*write_unit)(CodedBitstreamContext *ctx, + CodedBitstreamUnit *unit, + PutBitContext *pbc); + + // Read the data from all of frag->units and assemble it into + // a bitstream for the whole fragment. + int (*assemble_fragment)(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag); + + // Free the codec internal state. + void (*close)(CodedBitstreamContext *ctx); +} CodedBitstreamType; + + +// Helper functions for trace output. + +void ff_cbs_trace_header(CodedBitstreamContext *ctx, + const char *name); + +void ff_cbs_trace_syntax_element(CodedBitstreamContext *ctx, int position, + const char *name, const int *subscripts, + const char *bitstring, int64_t value); + + +// Helper functions for read/write of common bitstream elements, including +// generation of trace output. + +int ff_cbs_read_unsigned(CodedBitstreamContext *ctx, GetBitContext *gbc, + int width, const char *name, + const int *subscripts, uint32_t *write_to, + uint32_t range_min, uint32_t range_max); + +int ff_cbs_write_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc, + int width, const char *name, + const int *subscripts, uint32_t value, + uint32_t range_min, uint32_t range_max); + +int ff_cbs_read_signed(CodedBitstreamContext *ctx, GetBitContext *gbc, + int width, const char *name, + const int *subscripts, int32_t *write_to, + int32_t range_min, int32_t range_max); + +int ff_cbs_write_signed(CodedBitstreamContext *ctx, PutBitContext *pbc, + int width, const char *name, + const int *subscripts, int32_t value, + int32_t range_min, int32_t range_max); + +// The largest unsigned value representable in N bits, suitable for use as +// range_max in the above functions. +#define MAX_UINT_BITS(length) ((UINT64_C(1) << (length)) - 1) + +// The largest signed value representable in N bits, suitable for use as +// range_max in the above functions. +#define MAX_INT_BITS(length) ((INT64_C(1) << ((length) - 1)) - 1) + +// The smallest signed value representable in N bits, suitable for use as +// range_min in the above functions. +#define MIN_INT_BITS(length) (-(INT64_C(1) << ((length) - 1))) + + +extern const CodedBitstreamType ff_cbs_type_av1; +extern const CodedBitstreamType ff_cbs_type_h264; +extern const CodedBitstreamType ff_cbs_type_h265; +extern const CodedBitstreamType ff_cbs_type_jpeg; +extern const CodedBitstreamType ff_cbs_type_mpeg2; +extern const CodedBitstreamType ff_cbs_type_vp9; + + +#endif /* AVCODEC_CBS_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_jpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_jpeg.h new file mode 100644 index 00000000..ff196110 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_jpeg.h @@ -0,0 +1,123 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_JPEG_H +#define AVCODEC_CBS_JPEG_H + +#include +#include + +#include "libavutil/buffer.h" + + +enum { + JPEG_MARKER_SOF0 = 0xc0, + JPEG_MARKER_SOF1 = 0xc1, + JPEG_MARKER_SOF2 = 0xc2, + JPEG_MARKER_SOF3 = 0xc3, + + JPEG_MARKER_DHT = 0xc4, + JPEG_MARKER_SOI = 0xd8, + JPEG_MARKER_EOI = 0xd9, + JPEG_MARKER_SOS = 0xda, + JPEG_MARKER_DQT = 0xdb, + + JPEG_MARKER_APPN = 0xe0, + JPEG_MARKER_JPGN = 0xf0, + JPEG_MARKER_COM = 0xfe, +}; + +enum { + JPEG_MAX_COMPONENTS = 255, + + JPEG_MAX_HEIGHT = 65535, + JPEG_MAX_WIDTH = 65535, +}; + + +typedef struct JPEGRawFrameHeader { + uint16_t Lf; + uint8_t P; + uint16_t Y; + uint16_t X; + uint16_t Nf; + + uint8_t C [JPEG_MAX_COMPONENTS]; + uint8_t H [JPEG_MAX_COMPONENTS]; + uint8_t V [JPEG_MAX_COMPONENTS]; + uint8_t Tq[JPEG_MAX_COMPONENTS]; +} JPEGRawFrameHeader; + +typedef struct JPEGRawScanHeader { + uint16_t Ls; + uint8_t Ns; + + uint8_t Cs[JPEG_MAX_COMPONENTS]; + uint8_t Td[JPEG_MAX_COMPONENTS]; + uint8_t Ta[JPEG_MAX_COMPONENTS]; + + uint8_t Ss; + uint8_t Se; + uint8_t Ah; + uint8_t Al; +} JPEGRawScanHeader; + +typedef struct JPEGRawScan { + JPEGRawScanHeader header; + uint8_t *data; + size_t data_size; + AVBufferRef *data_ref; +} JPEGRawScan; + +typedef struct JPEGRawQuantisationTable { + uint8_t Pq; + uint8_t Tq; + uint16_t Q[64]; +} JPEGRawQuantisationTable; + +typedef struct JPEGRawQuantisationTableSpecification { + uint16_t Lq; + JPEGRawQuantisationTable table[4]; +} JPEGRawQuantisationTableSpecification; + +typedef struct JPEGRawHuffmanTable { + uint8_t Tc; + uint8_t Th; + uint8_t L[16]; + uint8_t V[224]; +} JPEGRawHuffmanTable; + +typedef struct JPEGRawHuffmanTableSpecification { + uint16_t Lh; + JPEGRawHuffmanTable table[8]; +} JPEGRawHuffmanTableSpecification; + +typedef struct JPEGRawApplicationData { + uint16_t Lp; + uint8_t *Ap; + AVBufferRef *Ap_ref; +} JPEGRawApplicationData; + +typedef struct JPEGRawComment { + uint16_t Lc; + uint8_t *Cm; + AVBufferRef *Cm_ref; +} JPEGRawComment; + + +#endif /* AVCODEC_CBS_JPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_mpeg2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_mpeg2.h new file mode 100644 index 00000000..5bcafd09 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_mpeg2.h @@ -0,0 +1,231 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_MPEG2_H +#define AVCODEC_CBS_MPEG2_H + +#include +#include + +#include "libavutil/buffer.h" + + +enum { + MPEG2_START_PICTURE = 0x00, + MPEG2_START_SLICE_MIN = 0x01, + MPEG2_START_SLICE_MAX = 0xaf, + MPEG2_START_USER_DATA = 0xb2, + MPEG2_START_SEQUENCE_HEADER = 0xb3, + MPEG2_START_SEQUENCE_ERROR = 0xb4, + MPEG2_START_EXTENSION = 0xb5, + MPEG2_START_SEQUENCE_END = 0xb7, + MPEG2_START_GROUP = 0xb8, +}; + +#define MPEG2_START_IS_SLICE(type) \ + ((type) >= MPEG2_START_SLICE_MIN && \ + (type) <= MPEG2_START_SLICE_MAX) + +enum { + MPEG2_EXTENSION_SEQUENCE = 0x1, + MPEG2_EXTENSION_SEQUENCE_DISPLAY = 0x2, + MPEG2_EXTENSION_QUANT_MATRIX = 0x3, + MPEG2_EXTENSION_COPYRIGHT = 0x4, + MPEG2_EXTENSION_SEQUENCE_SCALABLE = 0x5, + MPEG2_EXTENSION_PICTURE_DISPLAY = 0x7, + MPEG2_EXTENSION_PICTURE_CODING = 0x8, + MPEG2_EXTENSION_PICTURE_SPATIAL_SCALABLE = 0x9, + MPEG2_EXTENSION_PICTURE_TEMPORAL_SCALABLE = 0xa, + MPEG2_EXTENSION_CAMERA_PARAMETERS = 0xb, + MPEG2_EXTENSION_ITU_T = 0xc, +}; + + +typedef struct MPEG2RawSequenceHeader { + uint8_t sequence_header_code; + + uint16_t horizontal_size_value; + uint16_t vertical_size_value; + uint8_t aspect_ratio_information; + uint8_t frame_rate_code; + uint32_t bit_rate_value; + uint16_t vbv_buffer_size_value; + uint8_t constrained_parameters_flag; + + uint8_t load_intra_quantiser_matrix; + uint8_t intra_quantiser_matrix[64]; + uint8_t load_non_intra_quantiser_matrix; + uint8_t non_intra_quantiser_matrix[64]; +} MPEG2RawSequenceHeader; + +typedef struct MPEG2RawUserData { + uint8_t user_data_start_code; + + uint8_t *user_data; + size_t user_data_length; + AVBufferRef *user_data_ref; +} MPEG2RawUserData; + +typedef struct MPEG2RawSequenceExtension { + uint8_t profile_and_level_indication; + uint8_t progressive_sequence; + uint8_t chroma_format; + uint8_t horizontal_size_extension; + uint8_t vertical_size_extension; + uint16_t bit_rate_extension; + uint8_t vbv_buffer_size_extension; + uint8_t low_delay; + uint8_t frame_rate_extension_n; + uint8_t frame_rate_extension_d; +} MPEG2RawSequenceExtension; + +typedef struct MPEG2RawSequenceDisplayExtension { + uint8_t video_format; + + uint8_t colour_description; + uint8_t colour_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + + uint16_t display_horizontal_size; + uint16_t display_vertical_size; +} MPEG2RawSequenceDisplayExtension; + +typedef struct MPEG2RawGroupOfPicturesHeader { + uint8_t group_start_code; + + uint32_t time_code; + uint8_t closed_gop; + uint8_t broken_link; +} MPEG2RawGroupOfPicturesHeader; + +typedef struct MPEG2RawExtraInformation { + uint8_t *extra_information; + AVBufferRef *extra_information_ref; + size_t extra_information_length; +} MPEG2RawExtraInformation; + +typedef struct MPEG2RawPictureHeader { + uint8_t picture_start_code; + + uint16_t temporal_reference; + uint8_t picture_coding_type; + uint16_t vbv_delay; + + uint8_t full_pel_forward_vector; + uint8_t forward_f_code; + uint8_t full_pel_backward_vector; + uint8_t backward_f_code; + + MPEG2RawExtraInformation extra_information_picture; +} MPEG2RawPictureHeader; + +typedef struct MPEG2RawPictureCodingExtension { + uint8_t f_code[2][2]; + + uint8_t intra_dc_precision; + uint8_t picture_structure; + uint8_t top_field_first; + uint8_t frame_pred_frame_dct; + uint8_t concealment_motion_vectors; + uint8_t q_scale_type; + uint8_t intra_vlc_format; + uint8_t alternate_scan; + uint8_t repeat_first_field; + uint8_t chroma_420_type; + uint8_t progressive_frame; + + uint8_t composite_display_flag; + uint8_t v_axis; + uint8_t field_sequence; + uint8_t sub_carrier; + uint8_t burst_amplitude; + uint8_t sub_carrier_phase; +} MPEG2RawPictureCodingExtension; + +typedef struct MPEG2RawQuantMatrixExtension { + uint8_t load_intra_quantiser_matrix; + uint8_t intra_quantiser_matrix[64]; + uint8_t load_non_intra_quantiser_matrix; + uint8_t non_intra_quantiser_matrix[64]; + uint8_t load_chroma_intra_quantiser_matrix; + uint8_t chroma_intra_quantiser_matrix[64]; + uint8_t load_chroma_non_intra_quantiser_matrix; + uint8_t chroma_non_intra_quantiser_matrix[64]; +} MPEG2RawQuantMatrixExtension; + +typedef struct MPEG2RawPictureDisplayExtension { + int16_t frame_centre_horizontal_offset[3]; + int16_t frame_centre_vertical_offset[3]; +} MPEG2RawPictureDisplayExtension; + +typedef struct MPEG2RawExtensionData { + uint8_t extension_start_code; + uint8_t extension_start_code_identifier; + + union { + MPEG2RawSequenceExtension sequence; + MPEG2RawSequenceDisplayExtension sequence_display; + MPEG2RawQuantMatrixExtension quant_matrix; + MPEG2RawPictureCodingExtension picture_coding; + MPEG2RawPictureDisplayExtension picture_display; + } data; +} MPEG2RawExtensionData; + +typedef struct MPEG2RawSliceHeader { + uint8_t slice_vertical_position; + + uint8_t slice_vertical_position_extension; + uint8_t priority_breakpoint; + + uint8_t quantiser_scale_code; + + uint8_t slice_extension_flag; + uint8_t intra_slice; + uint8_t slice_picture_id_enable; + uint8_t slice_picture_id; + + MPEG2RawExtraInformation extra_information_slice; +} MPEG2RawSliceHeader; + +typedef struct MPEG2RawSlice { + MPEG2RawSliceHeader header; + + uint8_t *data; + size_t data_size; + int data_bit_start; + AVBufferRef *data_ref; +} MPEG2RawSlice; + +typedef struct MPEG2RawSequenceEnd { + uint8_t sequence_end_code; +} MPEG2RawSequenceEnd; + + +typedef struct CodedBitstreamMPEG2Context { + // Elements stored in headers which are required for other decoding. + uint16_t horizontal_size; + uint16_t vertical_size; + uint8_t scalable; + uint8_t scalable_mode; + uint8_t progressive_sequence; + uint8_t number_of_frame_centre_offsets; +} CodedBitstreamMPEG2Context; + + +#endif /* AVCODEC_CBS_MPEG2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_vp9.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_vp9.h new file mode 100644 index 00000000..40e62476 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cbs_vp9.h @@ -0,0 +1,213 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CBS_VP9_H +#define AVCODEC_CBS_VP9_H + +#include +#include + +#include "cbs.h" + + +// Miscellaneous constants (section 3). +enum { + VP9_REFS_PER_FRAME = 3, + + VP9_MIN_TILE_WIDTH_B64 = 4, + VP9_MAX_TILE_WIDTH_B64 = 64, + + VP9_NUM_REF_FRAMES = 8, + VP9_MAX_REF_FRAMES = 4, + + VP9_MAX_SEGMENTS = 8, + VP9_SEG_LVL_MAX = 4, +}; + +// Frame types (section 7.2). +enum { + VP9_KEY_FRAME = 0, + VP9_NON_KEY_FRAME = 1, +}; + +// Frame sync bytes (section 7.2.1). +enum { + VP9_FRAME_SYNC_0 = 0x49, + VP9_FRAME_SYNC_1 = 0x83, + VP9_FRAME_SYNC_2 = 0x42, +}; + +// Color space values (section 7.2.2). +enum { + VP9_CS_UNKNOWN = 0, + VP9_CS_BT_601 = 1, + VP9_CS_BT_709 = 2, + VP9_CS_SMPTE_170 = 3, + VP9_CS_SMPTE_240 = 4, + VP9_CS_BT_2020 = 5, + VP9_CS_RESERVED = 6, + VP9_CS_RGB = 7, +}; + +// Reference frame types (section 7.4.12). +enum { + VP9_INTRA_FRAME = 0, + VP9_LAST_FRAME = 1, + VP9_GOLDEN_FRAME = 2, + VP9_ALTREF_FRAME = 3, +}; + +// Superframe properties (section B.3). +enum { + VP9_MAX_FRAMES_IN_SUPERFRAME = 8, + + VP9_SUPERFRAME_MARKER = 6, +}; + + +typedef struct VP9RawFrameHeader { + uint8_t frame_marker; + uint8_t profile_low_bit; + uint8_t profile_high_bit; + + uint8_t show_existing_frame; + uint8_t frame_to_show_map_idx; + + uint8_t frame_type; + uint8_t show_frame; + uint8_t error_resilient_mode; + + // Color config. + uint8_t ten_or_twelve_bit; + uint8_t color_space; + uint8_t color_range; + uint8_t subsampling_x; + uint8_t subsampling_y; + + uint8_t refresh_frame_flags; + + uint8_t intra_only; + uint8_t reset_frame_context; + + uint8_t ref_frame_idx[VP9_REFS_PER_FRAME]; + uint8_t ref_frame_sign_bias[VP9_MAX_REF_FRAMES]; + + uint8_t allow_high_precision_mv; + + uint8_t refresh_frame_context; + uint8_t frame_parallel_decoding_mode; + + uint8_t frame_context_idx; + + // Frame/render size. + uint8_t found_ref[VP9_REFS_PER_FRAME]; + uint16_t frame_width_minus_1; + uint16_t frame_height_minus_1; + uint8_t render_and_frame_size_different; + uint16_t render_width_minus_1; + uint16_t render_height_minus_1; + + // Interpolation filter. + uint8_t is_filter_switchable; + uint8_t raw_interpolation_filter_type; + + // Loop filter params. + uint8_t loop_filter_level; + uint8_t loop_filter_sharpness; + uint8_t loop_filter_delta_enabled; + uint8_t loop_filter_delta_update; + uint8_t update_ref_delta[VP9_MAX_REF_FRAMES]; + int8_t loop_filter_ref_deltas[VP9_MAX_REF_FRAMES]; + uint8_t update_mode_delta[2]; + int8_t loop_filter_mode_deltas[2]; + + // Quantization params. + uint8_t base_q_idx; + int8_t delta_q_y_dc; + int8_t delta_q_uv_dc; + int8_t delta_q_uv_ac; + + // Segmentation params. + uint8_t segmentation_enabled; + uint8_t segmentation_update_map; + uint8_t segmentation_tree_probs[7]; + uint8_t segmentation_temporal_update; + uint8_t segmentation_pred_prob[3]; + uint8_t segmentation_update_data; + uint8_t segmentation_abs_or_delta_update; + uint8_t feature_enabled[VP9_MAX_SEGMENTS][VP9_SEG_LVL_MAX]; + uint8_t feature_value[VP9_MAX_SEGMENTS][VP9_SEG_LVL_MAX]; + uint8_t feature_sign[VP9_MAX_SEGMENTS][VP9_SEG_LVL_MAX]; + + // Tile info. + uint8_t tile_cols_log2; + uint8_t tile_rows_log2; + + uint16_t header_size_in_bytes; +} VP9RawFrameHeader; + +typedef struct VP9RawFrame { + VP9RawFrameHeader header; + + uint8_t *data; + size_t data_size; + AVBufferRef *data_ref; +} VP9RawFrame; + +typedef struct VP9RawSuperframeIndex { + uint8_t superframe_marker; + uint8_t bytes_per_framesize_minus_1; + uint8_t frames_in_superframe_minus_1; + uint32_t frame_sizes[VP9_MAX_FRAMES_IN_SUPERFRAME]; +} VP9RawSuperframeIndex; + +typedef struct VP9RawSuperframe { + VP9RawFrame frames[VP9_MAX_FRAMES_IN_SUPERFRAME]; + VP9RawSuperframeIndex index; +} VP9RawSuperframe; + +typedef struct VP9ReferenceFrameState { + int frame_width; // RefFrameWidth + int frame_height; // RefFrameHeight + int subsampling_x; // RefSubsamplingX + int subsampling_y; // RefSubsamplingY + int bit_depth; // RefBitDepth +} VP9ReferenceFrameState; + +typedef struct CodedBitstreamVP9Context { + int profile; + + // Frame dimensions in 8x8 mode info blocks. + uint16_t mi_cols; + uint16_t mi_rows; + // Frame dimensions in 64x64 superblocks. + uint16_t sb64_cols; + uint16_t sb64_rows; + + int frame_width; + int frame_height; + + uint8_t subsampling_x; + uint8_t subsampling_y; + int bit_depth; + + VP9ReferenceFrameState ref[VP9_NUM_REF_FRAMES]; +} CodedBitstreamVP9Context; + + +#endif /* AVCODEC_CBS_VP9_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_filters.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_filters.h new file mode 100644 index 00000000..f644ec32 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_filters.h @@ -0,0 +1,169 @@ +/* + * various filters for CELP-based codecs + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CELP_FILTERS_H +#define AVCODEC_CELP_FILTERS_H + +#include + +typedef struct CELPFContext { + /** + * LP synthesis filter. + * @param[out] out pointer to output buffer + * - the array out[-filter_length, -1] must + * contain the previous result of this filter + * @param filter_coeffs filter coefficients. + * @param in input signal + * @param buffer_length amount of data to process + * @param filter_length filter length (10 for 10th order LP filter). Must be + * greater than 4 and even. + * + * @note Output buffer must contain filter_length samples of past + * speech data before pointer. + * + * Routine applies 1/A(z) filter to given speech data. + */ + void (*celp_lp_synthesis_filterf)(float *out, const float *filter_coeffs, + const float *in, int buffer_length, + int filter_length); + + /** + * LP zero synthesis filter. + * @param[out] out pointer to output buffer + * @param filter_coeffs filter coefficients. + * @param in input signal + * - the array in[-filter_length, -1] must + * contain the previous input of this filter + * @param buffer_length amount of data to process (should be a multiple of eight) + * @param filter_length filter length (10 for 10th order LP filter; + * should be a multiple of two) + * + * @note Output buffer must contain filter_length samples of past + * speech data before pointer. + * + * Routine applies A(z) filter to given speech data. + */ + void (*celp_lp_zero_synthesis_filterf)(float *out, const float *filter_coeffs, + const float *in, int buffer_length, + int filter_length); + +}CELPFContext; + +/** + * Initialize CELPFContext. + */ +void ff_celp_filter_init(CELPFContext *c); +void ff_celp_filter_init_mips(CELPFContext *c); + +/** + * Circularly convolve fixed vector with a phase dispersion impulse + * response filter (D.6.2 of G.729 and 6.1.5 of AMR). + * @param fc_out vector with filter applied + * @param fc_in source vector + * @param filter phase filter coefficients + * + * fc_out[n] = sum(i,0,len-1){ fc_in[i] * filter[(len + n - i)%len] } + * + * @note fc_in and fc_out should not overlap! + */ +void ff_celp_convolve_circ(int16_t *fc_out, const int16_t *fc_in, + const int16_t *filter, int len); + +/** + * Add an array to a rotated array. + * + * out[k] = in[k] + fac * lagged[k-lag] with wrap-around + * + * @param out result vector + * @param in samples to be added unfiltered + * @param lagged samples to be rotated, multiplied and added + * @param lag lagged vector delay in the range [0, n] + * @param fac scalefactor for lagged samples + * @param n number of samples + */ +void ff_celp_circ_addf(float *out, const float *in, + const float *lagged, int lag, float fac, int n); + +/** + * LP synthesis filter. + * @param[out] out pointer to output buffer + * @param filter_coeffs filter coefficients (-0x8000 <= (3.12) < 0x8000) + * @param in input signal + * @param buffer_length amount of data to process + * @param filter_length filter length (10 for 10th order LP filter) + * @param stop_on_overflow 1 - return immediately if overflow occurs + * 0 - ignore overflows + * @param shift the result is shifted right by this value + * @param rounder the amount to add for rounding (usually 0x800 or 0xfff) + * + * @return 1 if overflow occurred, 0 - otherwise + * + * @note Output buffer must contain filter_length samples of past + * speech data before pointer. + * + * Routine applies 1/A(z) filter to given speech data. + */ +int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs, + const int16_t *in, int buffer_length, + int filter_length, int stop_on_overflow, + int shift, int rounder); + +/** + * LP synthesis filter. + * @param[out] out pointer to output buffer + * - the array out[-filter_length, -1] must + * contain the previous result of this filter + * @param filter_coeffs filter coefficients. + * @param in input signal + * @param buffer_length amount of data to process + * @param filter_length filter length (10 for 10th order LP filter). Must be + * greater than 4 and even. + * + * @note Output buffer must contain filter_length samples of past + * speech data before pointer. + * + * Routine applies 1/A(z) filter to given speech data. + */ +void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs, + const float *in, int buffer_length, + int filter_length); + +/** + * LP zero synthesis filter. + * @param[out] out pointer to output buffer + * @param filter_coeffs filter coefficients. + * @param in input signal + * - the array in[-filter_length, -1] must + * contain the previous input of this filter + * @param buffer_length amount of data to process + * @param filter_length filter length (10 for 10th order LP filter) + * + * @note Output buffer must contain filter_length samples of past + * speech data before pointer. + * + * Routine applies A(z) filter to given speech data. + */ +void ff_celp_lp_zero_synthesis_filterf(float *out, const float *filter_coeffs, + const float *in, int buffer_length, + int filter_length); + +#endif /* AVCODEC_CELP_FILTERS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_math.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_math.h new file mode 100644 index 00000000..18888a42 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/celp_math.h @@ -0,0 +1,97 @@ +/* + * Various fixed-point math operations + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CELP_MATH_H +#define AVCODEC_CELP_MATH_H + +#include + +typedef struct CELPMContext { + /** + * Return the dot product. + * @param a input data array + * @param b input data array + * @param length number of elements + * + * @return dot product = sum of elementwise products + */ + float (*dot_productf)(const float* a, const float* b, int length); + +}CELPMContext; + +/** + * Initialize CELPMContext. + */ +void ff_celp_math_init(CELPMContext *c); +void ff_celp_math_init_mips(CELPMContext *c); + +/** + * fixed-point implementation of exp2(x) in [0; 1] domain. + * @param power argument to exp2, 0 <= power <= 0x7fff + * + * @return value of (1<<20) * exp2(power / (1<<15)) + * 0x8000c <= result <= 0xfffea + */ +int ff_exp2(uint16_t power); + +/** + * Calculate log2(x). + * @param value function argument, 0 < value <= 7fff ffff + * + * @return value of (1<<15) * log2(value) + */ +int ff_log2_q15(uint32_t value); + +/** + * Calculate the dot product of 2 int16_t vectors. + * @param a input data array + * @param b input data array + * @param length number of elements + * + * @return dot product = sum of elementwise products + */ +int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length); + +/** + * Shift value left or right depending on sign of offset parameter. + * @param value value to shift + * @param offset shift offset + * + * @return value << offset, if offset>=0; value >> -offset - otherwise + */ +static inline int bidir_sal(int value, int offset) +{ + if(offset < 0) return value >> -offset; + else return value << offset; +} + +/** + * Return the dot product. + * @param a input data array + * @param b input data array + * @param length number of elements + * + * @return dot product = sum of elementwise products + */ +float ff_dot_productf(const float* a, const float* b, int length); + +#endif /* AVCODEC_CELP_MATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cfhd.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cfhd.h new file mode 100644 index 00000000..4f2c82d8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cfhd.h @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2015 Kieran Kunhya + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CFHD_H +#define AVCODEC_CFHD_H + +#include + +#include "libavutil/avassert.h" + +#include "avcodec.h" +#include "bytestream.h" +#include "get_bits.h" +#include "vlc.h" + +#define VLC_BITS 9 +#define SUBBAND_COUNT 10 + +typedef struct CFHD_RL_VLC_ELEM { + int16_t level; + int8_t len; + uint16_t run; +} CFHD_RL_VLC_ELEM; + +#define DWT_LEVELS 3 + +typedef struct SubBand { + int level; + int orientation; + ptrdiff_t stride; + int a_width; + int width; + int a_height; + int height; + int pshift; + int quant; + uint8_t *ibuf; +} SubBand; + +typedef struct Plane { + int width; + int height; + ptrdiff_t stride; + + int16_t *idwt_buf; + int16_t *idwt_tmp; + + /* TODO: merge this into SubBand structure */ + int16_t *subband[SUBBAND_COUNT]; + int16_t *l_h[8]; + + SubBand band[DWT_LEVELS][4]; +} Plane; + +typedef struct Peak { + int level; + int offset; + GetByteContext base; +} Peak; + +typedef struct CFHDContext { + AVCodecContext *avctx; + + CFHD_RL_VLC_ELEM table_9_rl_vlc[2088]; + VLC vlc_9; + + CFHD_RL_VLC_ELEM table_18_rl_vlc[4572]; + VLC vlc_18; + + GetBitContext gb; + + int coded_width; + int coded_height; + int cropped_height; + enum AVPixelFormat coded_format; + int progressive; + + int a_width; + int a_height; + int a_format; + + int bpc; // bits per channel/component + int channel_cnt; + int subband_cnt; + int channel_num; + uint8_t lowpass_precision; + uint16_t quantisation; + int wavelet_depth; + int pshift; + + int codebook; + int difference_coding; + int subband_num; + int level; + int subband_num_actual; + + uint8_t prescale_shift[3]; + Plane plane[4]; + Peak peak; +} CFHDContext; + +int ff_cfhd_init_vlcs(CFHDContext *s); + +#endif /* AVCODEC_CFHD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cga_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cga_data.h new file mode 100644 index 00000000..3f5281a2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cga_data.h @@ -0,0 +1,47 @@ +/* + * CGA/EGA/VGA ROM data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * CGA/EGA/VGA ROM data + * @note fonts are in libavutil/xga_font_data.[ch] + */ + +#ifndef AVCODEC_CGA_DATA_H +#define AVCODEC_CGA_DATA_H + +#include + +extern const uint32_t ff_cga_palette[16]; +extern const uint32_t ff_ega_palette[64]; + +/** + * Draw CGA/EGA/VGA font to 8-bit pixel buffer + * + * @param dst Destination pixel buffer + * @param linesize Linesize (pixels) + * @param font Font table. We assume font width is always 8 pixels wide. + * @param font_height Font height (pixels) + * @param fg,bg Foreground and background palette index + * @param ch Character to draw + */ +void ff_draw_pc_font(uint8_t *dst, int linesize, const uint8_t *font, int font_height, int ch, int fg, int bg); + +#endif /* AVCODEC_CGA_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/clearvideodata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/clearvideodata.h new file mode 100644 index 00000000..43d12dee --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/clearvideodata.h @@ -0,0 +1,1832 @@ +/* + * ClearVideo decoder + * Copyright (c) 2012-2018 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CLEARVIDEODATA_H +#define AVCODEC_CLEARVIDEODATA_H + +#include "libavutil/common.h" + +#define NUM_DC_CODES 127 +#define NUM_AC_CODES 103 + +static const uint8_t clv_dc_codes[NUM_DC_CODES] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x07, 0x0B, + 0x0C, 0x08, 0x08, 0x09, 0x04, 0x06, 0x07, 0x05, + 0x04, 0x05, 0x04, 0x06, 0x05, 0x06, 0x07, 0x05, + 0x06, 0x07, 0x06, 0x07, 0x08, 0x06, 0x07, 0x08, + 0x09, 0x0A, 0x0B, 0x07, 0x08, 0x09, 0x07, 0x08, + 0x06, 0x07, 0x08, 0x06, 0x04, 0x05, 0x02, 0x01, + 0x03, 0x06, 0x07, 0x07, 0x09, 0x0A, 0x0B, 0x09, + 0x0A, 0x0B, 0x0A, 0x0B, 0x0C, 0x0D, 0x0C, 0x09, + 0x0D, 0x0A, 0x0B, 0x08, 0x09, 0x0A, 0x0B, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x06, 0x07, 0x06, 0x08, + 0x07, 0x09, 0x0A, 0x0B, 0x09, 0x0A, 0x0B, 0x0C, + 0x14, 0x0D, 0x0D, 0x0E, 0x0F, 0x15, 0x15, 0x16, + 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, + 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, +}; + +static const uint8_t clv_dc_bits[NUM_DC_CODES] = { + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 21, 22, 22, 19, 20, + 20, 19, 18, 18, 15, 17, 17, 16, + 14, 15, 12, 13, 14, 14, 14, 12, + 12, 12, 11, 11, 11, 10, 10, 10, + 10, 10, 10, 9, 9, 9, 8, 8, + 7, 7, 7, 6, 5, 5, 3, 1, + 3, 5, 5, 6, 7, 7, 7, 8, + 8, 8, 9, 9, 9, 9, 10, 11, + 10, 11, 11, 12, 12, 12, 12, 13, + 14, 14, 14, 14, 15, 15, 16, 17, + 16, 17, 18, 18, 19, 19, 19, 19, + 21, 19, 20, 19, 19, 21, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, +}; + +static const uint16_t clv_ac_syms[NUM_AC_CODES] = { + 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, + 0x0009, 0x000A, 0x000B, 0x000C, 0x0011, 0x0012, 0x0013, 0x0014, + 0x0015, 0x0016, 0x0021, 0x0022, 0x0023, 0x0024, 0x0031, 0x0032, + 0x0033, 0x0041, 0x0042, 0x0043, 0x0051, 0x0052, 0x0053, 0x0061, + 0x0062, 0x0063, 0x0071, 0x0072, 0x0081, 0x0082, 0x0091, 0x0092, + 0x00A1, 0x00A2, 0x00B1, 0x00C1, 0x00D1, 0x00E1, 0x00F1, 0x0101, + 0x0111, 0x0121, 0x0131, 0x0141, 0x0151, 0x0161, 0x0171, 0x0181, + 0x0191, 0x01A1, 0x1001, 0x1002, 0x1003, 0x1011, 0x1012, 0x1021, + 0x1031, 0x1041, 0x1051, 0x1061, 0x1071, 0x1081, 0x1091, 0x10A1, + 0x10B1, 0x10C1, 0x10D1, 0x10E1, 0x10F1, 0x1101, 0x1111, 0x1121, + 0x1131, 0x1141, 0x1151, 0x1161, 0x1171, 0x1181, 0x1191, 0x11A1, + 0x11B1, 0x11C1, 0x11D1, 0x11E1, 0x11F1, 0x1201, 0x1211, 0x1221, + 0x1231, 0x1241, 0x1251, 0x1261, 0x1271, 0x1281, 0x1BFF, +}; + +static const uint8_t clv_ac_codes[NUM_AC_CODES] = { + 0x02, 0x0F, 0x15, 0x17, 0x1F, 0x25, 0x24, 0x21, + 0x20, 0x07, 0x06, 0x20, 0x06, 0x14, 0x1E, 0x0F, + 0x21, 0x50, 0x0E, 0x1D, 0x0E, 0x51, 0x0D, 0x23, + 0x0D, 0x0C, 0x22, 0x52, 0x0B, 0x0C, 0x53, 0x13, + 0x0B, 0x54, 0x12, 0x0A, 0x11, 0x09, 0x10, 0x08, + 0x16, 0x55, 0x15, 0x14, 0x1C, 0x1B, 0x21, 0x20, + 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x22, 0x23, + 0x56, 0x57, 0x07, 0x19, 0x05, 0x0F, 0x04, 0x0E, + 0x0D, 0x0C, 0x13, 0x12, 0x11, 0x10, 0x1A, 0x19, + 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x18, 0x17, + 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x07, 0x06, + 0x05, 0x04, 0x24, 0x25, 0x26, 0x27, 0x58, 0x59, + 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x03, +}; + +static const uint8_t clv_ac_bits[NUM_AC_CODES] = { + 2, 4, 6, 7, 8, 9, 9, 10, + 10, 11, 11, 11, 3, 6, 8, 10, + 11, 12, 4, 8, 10, 12, 5, 9, + 10, 5, 9, 12, 5, 10, 12, 6, + 10, 12, 6, 10, 6, 10, 6, 10, + 7, 12, 7, 7, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 11, 11, + 12, 12, 4, 9, 11, 6, 11, 6, + 6, 6, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 10, 10, + 10, 10, 11, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 12, 12, 7, +}; + +static const uint8_t clv_flagsy_0_bits[] = { + 3, 4, 4, 4, 4, 4, 6, 5, 4, 7, 4, 5, 4, 7, 5, 2, +}; + +static const uint16_t clv_flagsy_0_codes[] = { + 0x0002, 0x0009, 0x000B, 0x0006, 0x000C, 0x0007, 0x003E, 0x001C, + 0x000D, 0x007E, 0x000A, 0x001D, 0x0008, 0x007F, 0x001E, 0x0000, +}; + +static const uint8_t clv_flagsy_1_bits[] = { + 2, 4, 4, 3, 4, 4, 7, 6, 4, 6, 4, 6, 4, 8, 8, 3, +}; + +static const uint16_t clv_flagsy_1_codes[] = { + 0x0000, 0x000A, 0x000C, 0x0003, 0x000B, 0x0009, 0x007E, 0x003D, + 0x000D, 0x003E, 0x000E, 0x003C, 0x0008, 0x00FE, 0x00FF, 0x0002, +}; + +static const uint8_t clv_flagsy_2_bits[] = { + 1, 4, 4, 4, 4, 5, 7, 5, 4, 6, 5, 8, 4, 9, 10, 10, +}; + +static const uint16_t clv_flagsy_2_codes[] = { + 0x0000, 0x000C, 0x000B, 0x0008, 0x000A, 0x001C, 0x007E, 0x001D, + 0x000D, 0x003E, 0x001E, 0x00FE, 0x0009, 0x01FE, 0x03FE, 0x03FF, +}; + +static const uint8_t clv_flagsu_0_bits[] = { + 1, 4, 4, 4, 5, 5, 9, 7, 5, 9, 4, 7, 4, 8, 7, 4, +}; + +static const uint16_t clv_flagsu_0_codes[] = { + 0x0000, 0x000B, 0x000D, 0x0009, 0x001D, 0x001C, 0x01FF, 0x007D, + 0x001E, 0x01FE, 0x000C, 0x007C, 0x000A, 0x00FE, 0x007E, 0x0008, +}; + +static const uint8_t clv_flagsu_1_bits[] = { + 1, 4, 4, 4, 4, 4, 8, 6, 4, 8, 5, 8, 4, 10, 9, 10, +}; + +static const uint16_t clv_flagsu_1_codes[] = { + 0x0000, 0x000C, 0x0008, 0x000A, 0x000B, 0x000E, 0x00FD, 0x003E, + 0x000D, 0x00FC, 0x001E, 0x00FE, 0x0009, 0x03FE, 0x01FE, 0x03FF, +}; + +static const uint8_t clv_flagsv_0_bits[] = { + 1, 4, 5, 4, 5, 5, 8, 10, 5, 9, 5, 6, 4, 10, 7, 3, +}; + +static const uint16_t clv_flagsv_0_codes[] = { + 0x0000, 0x000A, 0x001B, 0x000C, 0x001E, 0x001C, 0x00FE, 0x03FE, + 0x001D, 0x01FE, 0x001A, 0x003E, 0x000B, 0x03FF, 0x007E, 0x0004, +}; + +static const uint8_t clv_flagsv_1_bits[] = { + 1, 4, 4, 4, 4, 5, 8, 6, 3, 7, 5, 10, 5, 11, 9, 11, +}; + +static const uint16_t clv_flagsv_1_codes[] = { + 0x0000, 0x000D, 0x000C, 0x000A, 0x000B, 0x001D, 0x00FE, 0x003E, + 0x0004, 0x007E, 0x001E, 0x03FE, 0x001C, 0x07FE, 0x01FE, 0x07FF, +}; + +static const uint8_t clv_mvy_0_bits[] = { + 16, 14, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 14, + 16, 15, 14, 14, 14, 13, 13, 12, 10, 7, 10, 12, 13, 13, 14, 14, + 14, 15, 15, 14, 14, 14, 13, 13, 11, 10, 7, 10, 11, 13, 13, 14, + 14, 14, 15, 15, 14, 14, 13, 13, 12, 11, 10, 7, 10, 11, 12, 13, + 13, 14, 14, 15, 16, 15, 14, 12, 12, 12, 11, 10, 6, 10, 11, 12, + 12, 12, 14, 15, 16, 15, 14, 13, 13, 12, 11, 10, 9, 6, 9, 10, + 11, 12, 13, 13, 14, 15, 14, 14, 13, 12, 12, 11, 10, 8, 6, 8, + 10, 11, 12, 12, 13, 14, 14, 14, 13, 13, 13, 11, 11, 9, 7, 4, + 7, 9, 11, 11, 12, 13, 13, 14, 11, 10, 10, 9, 9, 8, 7, 5, + 1, 5, 7, 8, 9, 9, 10, 10, 11, 14, 13, 13, 12, 11, 11, 9, + 7, 4, 7, 9, 11, 11, 13, 13, 13, 14, 14, 14, 13, 12, 12, 11, + 10, 8, 6, 8, 10, 11, 12, 12, 13, 14, 14, 15, 14, 13, 13, 12, + 11, 10, 9, 7, 9, 10, 11, 12, 13, 13, 14, 15, 16, 15, 14, 12, + 12, 12, 11, 10, 6, 10, 11, 12, 12, 12, 14, 15, 16, 15, 14, 14, + 13, 13, 12, 11, 10, 7, 10, 11, 12, 13, 13, 14, 14, 15, 15, 14, + 14, 14, 13, 13, 11, 10, 7, 10, 11, 13, 13, 14, 14, 14, 15, 15, + 14, 14, 14, 13, 13, 12, 10, 7, 10, 12, 13, 13, 14, 14, 14, 15, + 16, 14, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 14, + 16, 6, +}; + +static const uint16_t clv_mvy_0_codes[] = { + 0xFFFD, 0x3FE5, 0x1FD8, 0x1FC4, 0x1FBC, 0x0FCB, 0x07CF, 0x07C4, + 0x01D7, 0x07C6, 0x07CE, 0x0FCA, 0x1FBD, 0x1FC2, 0x1FD9, 0x3FE4, + 0xFFFE, 0x7FF0, 0x3FEF, 0x3FD2, 0x3FC9, 0x1FCC, 0x1FC0, 0x0FB6, + 0x03D6, 0x0070, 0x03D7, 0x0FB7, 0x1FC1, 0x1FCD, 0x3FCB, 0x3FD0, + 0x3FED, 0x7FF2, 0x7FFB, 0x3FDC, 0x3FD9, 0x3FD4, 0x1FB6, 0x1FAE, + 0x07C0, 0x03BC, 0x006D, 0x03BD, 0x07C1, 0x1FAF, 0x1FB7, 0x3FD1, + 0x3FDB, 0x3FDF, 0x7FF9, 0x7FEE, 0x3FF0, 0x3FC7, 0x1FC9, 0x1FA7, + 0x0FAD, 0x07D2, 0x03CE, 0x006C, 0x03CF, 0x07D0, 0x0FAF, 0x1FA6, + 0x1FC6, 0x3FC4, 0x3FF1, 0x7FED, 0xFFFB, 0x7FF6, 0x3FE6, 0x0FCC, + 0x0FC4, 0x0FB0, 0x07B0, 0x03C6, 0x0031, 0x03C7, 0x07B1, 0x0FB1, + 0x0FC5, 0x0FCD, 0x3FEA, 0x7FF7, 0xFFF9, 0x7FE9, 0x3FCE, 0x1FCF, + 0x1FB2, 0x0FB8, 0x07BC, 0x03D0, 0x01DA, 0x002F, 0x01DB, 0x03D1, + 0x07BE, 0x0FBA, 0x1FB4, 0x1FD0, 0x3FCD, 0x7FEB, 0x3FE1, 0x3FC1, + 0x1FD3, 0x0FC3, 0x0FBE, 0x07B6, 0x03C4, 0x00E4, 0x002D, 0x00E5, + 0x03C5, 0x07B7, 0x0FBF, 0x0FC1, 0x1FD2, 0x3FC3, 0x3FE2, 0x3FBF, + 0x1FDB, 0x1FAD, 0x1FA5, 0x07CB, 0x07BB, 0x01D5, 0x0068, 0x0008, + 0x0065, 0x01D2, 0x07B8, 0x07C8, 0x0FD0, 0x1FAA, 0x1FDA, 0x3FBC, + 0x07D4, 0x03CA, 0x03C0, 0x01D8, 0x01D0, 0x00E6, 0x0069, 0x0014, + 0x0000, 0x0015, 0x006A, 0x00E7, 0x01D1, 0x01D9, 0x03C1, 0x03CB, + 0x07D5, 0x3FBE, 0x1FDC, 0x1FAB, 0x0FD1, 0x07C9, 0x07B9, 0x01D3, + 0x0066, 0x0009, 0x0067, 0x01D4, 0x07BA, 0x07CA, 0x1FA4, 0x1FAC, + 0x1FDD, 0x3FBD, 0x3FE0, 0x3FC0, 0x1FD5, 0x0FC0, 0x0FBC, 0x07B4, + 0x03C2, 0x00E2, 0x002C, 0x00E3, 0x03C3, 0x07B5, 0x0FBD, 0x0FC2, + 0x1FD7, 0x3FC2, 0x3FE3, 0x7FEA, 0x3FCC, 0x1FCE, 0x1FB3, 0x0FB9, + 0x07BD, 0x03D2, 0x01DC, 0x0064, 0x01DD, 0x03D3, 0x07BF, 0x0FBB, + 0x1FB5, 0x1FD1, 0x3FCF, 0x7FE8, 0xFFFA, 0x7FF4, 0x3FEB, 0x0FCE, + 0x0FC6, 0x0FB2, 0x07B2, 0x03C8, 0x0030, 0x03C9, 0x07B3, 0x0FB3, + 0x0FC7, 0x0FCF, 0x3FE9, 0x7FF5, 0xFFF8, 0x7FF3, 0x3FF3, 0x3FC6, + 0x1FC8, 0x1FA8, 0x0FAC, 0x07D1, 0x03CC, 0x006B, 0x03CD, 0x07D3, + 0x0FAE, 0x1FA9, 0x1FC7, 0x3FC5, 0x3FF2, 0x7FEC, 0x7FFA, 0x3FDE, + 0x3FDA, 0x3FD7, 0x1FB9, 0x1FB0, 0x07C2, 0x03BE, 0x006E, 0x03BF, + 0x07C3, 0x1FB1, 0x1FB8, 0x3FD3, 0x3FD8, 0x3FDD, 0x7FF8, 0x7FEF, + 0x3FEE, 0x3FD6, 0x3FC8, 0x1FCB, 0x1FBE, 0x0FB5, 0x03D4, 0x006F, + 0x03D5, 0x0FB4, 0x1FBF, 0x1FCA, 0x3FCA, 0x3FD5, 0x3FEC, 0x7FF1, + 0xFFFF, 0x3FE8, 0x1FD4, 0x1FC5, 0x1FBA, 0x0FC9, 0x07CD, 0x07C7, + 0x01D6, 0x07C5, 0x07CC, 0x0FC8, 0x1FBB, 0x1FC3, 0x1FD6, 0x3FE7, + 0xFFFC, 0x002E, +}; + +static const uint16_t clv_mvy_0_syms[] = { + 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, + 0x00F8, 0x01F8, 0x02F8, 0x03F8, 0x04F8, 0x05F8, 0x06F8, 0x07F8, + 0x08F8, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, + 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, + 0x07F9, 0x08F9, 0xF8FA, 0xF9FA, 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, + 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, 0x02FA, 0x03FA, 0x04FA, 0x05FA, + 0x06FA, 0x07FA, 0x08FA, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, + 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, + 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, + 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, + 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0x08FC, 0xF8FD, 0xF9FD, 0xFAFD, + 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, + 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0xF8FE, 0xF9FE, + 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, + 0x02FE, 0x03FE, 0x04FE, 0x05FE, 0x06FE, 0x07FE, 0x08FE, 0xF8FF, + 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, + 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, + 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, + 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, + 0x0800, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, + 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, + 0x0701, 0x0801, 0xF802, 0xF902, 0xFA02, 0xFB02, 0xFC02, 0xFD02, + 0xFE02, 0xFF02, 0x0002, 0x0102, 0x0202, 0x0302, 0x0402, 0x0502, + 0x0602, 0x0702, 0x0802, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, + 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, + 0x0503, 0x0603, 0x0703, 0x0803, 0xF804, 0xF904, 0xFA04, 0xFB04, + 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, + 0x0404, 0x0504, 0x0604, 0x0704, 0x0804, 0xF805, 0xF905, 0xFA05, + 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, + 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0xF806, 0xF906, + 0xFA06, 0xFB06, 0xFC06, 0xFD06, 0xFE06, 0xFF06, 0x0006, 0x0106, + 0x0206, 0x0306, 0x0406, 0x0506, 0x0606, 0x0706, 0x0806, 0xF807, + 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, + 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, + 0xF808, 0xF908, 0xFA08, 0xFB08, 0xFC08, 0xFD08, 0xFE08, 0xFF08, + 0x0008, 0x0108, 0x0208, 0x0308, 0x0408, 0x0508, 0x0608, 0x0708, + 0x0808, 0x0909, +}; + +static const uint8_t clv_mvy_1_bits[] = { + 15, 15, 15, 15, 14, 14, 13, 13, 11, 9, 11, 13, 13, 14, 14, 15, + 15, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 10, 9, 10, 12, 12, + 12, 13, 13, 14, 14, 15, 15, 15, 14, 14, 13, 13, 13, 12, 11, 8, + 11, 12, 13, 13, 13, 14, 14, 15, 15, 14, 14, 14, 14, 13, 12, 12, + 12, 10, 8, 10, 12, 12, 12, 13, 14, 14, 14, 14, 15, 14, 14, 13, + 13, 12, 12, 11, 10, 8, 10, 11, 12, 12, 13, 13, 14, 14, 15, 14, + 14, 13, 13, 13, 12, 12, 11, 9, 7, 9, 11, 12, 12, 13, 13, 13, + 14, 14, 14, 14, 13, 13, 13, 12, 11, 10, 9, 7, 9, 10, 11, 12, + 13, 13, 13, 14, 14, 14, 13, 13, 12, 12, 11, 11, 10, 8, 7, 8, + 10, 11, 11, 12, 12, 13, 13, 14, 13, 13, 13, 12, 11, 11, 10, 9, + 6, 4, 6, 9, 10, 11, 12, 12, 13, 13, 13, 12, 11, 10, 10, 10, + 9, 9, 7, 5, 1, 5, 7, 9, 9, 10, 10, 10, 11, 12, 13, 13, + 13, 12, 11, 11, 10, 9, 6, 4, 6, 9, 10, 11, 11, 12, 13, 13, + 13, 14, 13, 13, 12, 12, 11, 11, 10, 8, 7, 8, 10, 11, 11, 12, + 12, 13, 13, 14, 14, 14, 13, 13, 13, 12, 11, 10, 9, 7, 9, 10, + 11, 12, 13, 13, 13, 14, 14, 14, 14, 13, 13, 13, 12, 12, 11, 9, + 7, 9, 11, 12, 12, 13, 13, 13, 14, 14, 15, 14, 14, 13, 13, 12, + 12, 11, 10, 8, 10, 11, 12, 12, 13, 13, 14, 14, 15, 14, 14, 14, + 14, 13, 12, 12, 12, 10, 8, 10, 12, 12, 12, 13, 14, 14, 14, 14, + 15, 15, 14, 14, 13, 13, 13, 12, 11, 8, 11, 12, 13, 13, 13, 14, + 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 12, 10, 9, 10, 12, 12, + 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 14, 14, 13, 13, 11, 9, + 11, 13, 13, 14, 14, 15, 15, 15, 15, 5, +}; + +static const uint16_t clv_mvy_1_codes[] = { + 0x7FF9, 0x7FF6, 0x7FEB, 0x7FE3, 0x3FCF, 0x3FB3, 0x1FBD, 0x1FA1, + 0x07AD, 0x01CE, 0x07AF, 0x1FA0, 0x1FBB, 0x3FB0, 0x3FCC, 0x7FE2, + 0x7FE9, 0x7FF4, 0x7FFB, 0x7FF1, 0x3FE7, 0x3FBD, 0x1FA5, 0x1F9B, + 0x0FB4, 0x0FAF, 0x0FAA, 0x03CC, 0x01CD, 0x03CD, 0x0FAB, 0x0FAD, + 0x0FB1, 0x1F9C, 0x1FA3, 0x3FBE, 0x3FE6, 0x7FF0, 0x7FFC, 0x7FE5, + 0x3FB5, 0x3FAE, 0x1FB4, 0x1FAA, 0x1F97, 0x0F85, 0x07A2, 0x00DD, + 0x07A3, 0x0F86, 0x1F99, 0x1FAD, 0x1FB2, 0x3FAC, 0x3FB7, 0x7FE4, + 0x7FFD, 0x3FEA, 0x3FD8, 0x3FC3, 0x3FBB, 0x1FC9, 0x0FBC, 0x0F97, + 0x0F8F, 0x03B8, 0x00DA, 0x03B9, 0x0F90, 0x0F98, 0x0FB9, 0x1FC6, + 0x3FBA, 0x3FC0, 0x3FD9, 0x3FEB, 0x7FEF, 0x3FEE, 0x3FD7, 0x1FC3, + 0x1F96, 0x0FC0, 0x0FA8, 0x07AA, 0x03BE, 0x00D9, 0x03BF, 0x07AB, + 0x0FA7, 0x0FBF, 0x1F98, 0x1FC5, 0x3FD6, 0x3FEF, 0x7FEE, 0x3FDC, + 0x3FCA, 0x1FBF, 0x1F8B, 0x1F87, 0x0FA2, 0x0F94, 0x07A5, 0x01D4, + 0x0069, 0x01D5, 0x07A6, 0x0F95, 0x0FA3, 0x1F89, 0x1F8D, 0x1FC0, + 0x3FC6, 0x3FDE, 0x3FE0, 0x3FD3, 0x1FB8, 0x1F8F, 0x1F84, 0x0F89, + 0x07BC, 0x03C6, 0x01C6, 0x0067, 0x01C7, 0x03C7, 0x07BD, 0x0F87, + 0x1F82, 0x1F8A, 0x1FB6, 0x3FD1, 0x3FE2, 0x3FC5, 0x1FCE, 0x1FAE, + 0x0FB5, 0x0F8B, 0x07B4, 0x07B0, 0x03B4, 0x00DE, 0x0064, 0x00DF, + 0x03B5, 0x07B1, 0x07B5, 0x0F8C, 0x0FB6, 0x1FAF, 0x1FD1, 0x3FCB, + 0x1FD3, 0x1FCC, 0x1FA7, 0x0F9B, 0x07BE, 0x079C, 0x03C0, 0x01C8, + 0x002E, 0x0008, 0x002F, 0x01C9, 0x03C1, 0x079D, 0x0F82, 0x0F9A, + 0x1FA9, 0x1FCA, 0x1FD4, 0x0F9F, 0x07B6, 0x03C8, 0x03B2, 0x03B0, + 0x01D6, 0x01D0, 0x006A, 0x0014, 0x0000, 0x0015, 0x006B, 0x01D1, + 0x01D7, 0x03B1, 0x03B3, 0x03C9, 0x07B7, 0x0FA0, 0x1FD5, 0x1FCB, + 0x1FAB, 0x0F9C, 0x07BF, 0x079E, 0x03C2, 0x01CA, 0x0030, 0x0009, + 0x0031, 0x01CB, 0x03C3, 0x079F, 0x07C0, 0x0F9D, 0x1FAC, 0x1FCD, + 0x1FD2, 0x3FC8, 0x1FD0, 0x1FB0, 0x0FB7, 0x0F8D, 0x07B8, 0x07B2, + 0x03B6, 0x00E0, 0x0065, 0x00E1, 0x03B7, 0x07B3, 0x07B9, 0x0F8E, + 0x0FB8, 0x1FB1, 0x1FCF, 0x3FC9, 0x3FE1, 0x3FD2, 0x1FB7, 0x1F8E, + 0x1F83, 0x0F88, 0x07BA, 0x03C4, 0x01C4, 0x0066, 0x01C5, 0x03C5, + 0x07BB, 0x0F8A, 0x1F85, 0x1F90, 0x1FB9, 0x3FD0, 0x3FE3, 0x3FDD, + 0x3FC7, 0x1FC1, 0x1F91, 0x1F88, 0x0FA4, 0x0F96, 0x07A7, 0x01D2, + 0x0068, 0x01D3, 0x07A4, 0x0F93, 0x0FA1, 0x1F86, 0x1F8C, 0x1FBE, + 0x3FC4, 0x3FDF, 0x7FED, 0x3FEC, 0x3FD4, 0x1FC4, 0x1F92, 0x0FBD, + 0x0FA5, 0x07A8, 0x03BC, 0x00D8, 0x03BD, 0x07A9, 0x0FA6, 0x0FBE, + 0x1F93, 0x1FC2, 0x3FD5, 0x3FED, 0x7FEC, 0x3FE8, 0x3FDB, 0x3FC1, + 0x3FB9, 0x1FC7, 0x0FBA, 0x0F9E, 0x0F91, 0x03BA, 0x00DB, 0x03BB, + 0x0F92, 0x0F99, 0x0FBB, 0x1FC8, 0x3FB8, 0x3FC2, 0x3FDA, 0x3FE9, + 0x7FFF, 0x7FE7, 0x3FB6, 0x3FAF, 0x1FB3, 0x1FA6, 0x1F94, 0x0F83, + 0x07A0, 0x00DC, 0x07A1, 0x0F84, 0x1F95, 0x1FA8, 0x1FB5, 0x3FAD, + 0x3FB4, 0x7FE6, 0x7FFE, 0x7FF3, 0x3FE5, 0x3FBC, 0x1FA4, 0x1F9D, + 0x0FB2, 0x0FAE, 0x0FA9, 0x03CA, 0x01CC, 0x03CB, 0x0FAC, 0x0FB0, + 0x0FB3, 0x1F9A, 0x1FA2, 0x3FBF, 0x3FE4, 0x7FF2, 0x7FF8, 0x7FF5, + 0x7FEA, 0x7FE0, 0x3FCD, 0x3FB1, 0x1FBA, 0x1F9F, 0x07AE, 0x01CF, + 0x07AC, 0x1F9E, 0x1FBC, 0x3FB2, 0x3FCE, 0x7FE1, 0x7FE8, 0x7FF7, + 0x7FFA, 0x0016, +}; + +static const uint16_t clv_mvy_1_syms[] = { + 0xF7F7, 0xF8F7, 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, + 0xFFF7, 0x00F7, 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, + 0x07F7, 0x08F7, 0x09F7, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, + 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, + 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0xF7F9, 0xF8F9, + 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, + 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0x08F9, + 0x09F9, 0xF7FA, 0xF8FA, 0xF9FA, 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, + 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, 0x02FA, 0x03FA, 0x04FA, 0x05FA, + 0x06FA, 0x07FA, 0x08FA, 0x09FA, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, + 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, + 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0xF7FC, + 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, + 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, + 0x08FC, 0x09FC, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, + 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, + 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0xF7FE, 0xF8FE, 0xF9FE, + 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, + 0x02FE, 0x03FE, 0x04FE, 0x05FE, 0x06FE, 0x07FE, 0x08FE, 0x09FE, + 0xF7FF, 0xF8FF, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, + 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, + 0x07FF, 0x08FF, 0x09FF, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, + 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, + 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0xF701, 0xF801, + 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, + 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0x0801, + 0x0901, 0xF702, 0xF802, 0xF902, 0xFA02, 0xFB02, 0xFC02, 0xFD02, + 0xFE02, 0xFF02, 0x0002, 0x0102, 0x0202, 0x0302, 0x0402, 0x0502, + 0x0602, 0x0702, 0x0802, 0x0902, 0xF703, 0xF803, 0xF903, 0xFA03, + 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, + 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0xF704, + 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, + 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, + 0x0804, 0x0904, 0xF705, 0xF805, 0xF905, 0xFA05, 0xFB05, 0xFC05, + 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, + 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0xF706, 0xF806, 0xF906, + 0xFA06, 0xFB06, 0xFC06, 0xFD06, 0xFE06, 0xFF06, 0x0006, 0x0106, + 0x0206, 0x0306, 0x0406, 0x0506, 0x0606, 0x0706, 0x0806, 0x0906, + 0xF707, 0xF807, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, + 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, + 0x0707, 0x0807, 0x0907, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, + 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, + 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0xF709, 0xF809, + 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, 0xFF09, 0x0009, + 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, 0x0709, 0x0809, + 0x0909, 0x0A0A, +}; + +static const uint8_t clv_mvy_2_bits[] = { + 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, + 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, + 15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 11, 10, 11, + 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 11, 10, 11, 13, + 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, + 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 12, 11, 9, 11, 12, 13, + 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 15, 15, 14, + 14, 13, 13, 13, 13, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, + 13, 13, 13, 13, 13, 13, 14, 14, 14, 15, 16, 16, 15, 15, 15, 14, + 13, 13, 13, 13, 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, + 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 15, 15, 15, 15, 14, + 14, 13, 13, 13, 12, 12, 12, 11, 11, 9, 11, 11, 12, 12, 12, 13, + 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, 14, 14, 14, 13, + 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, + 13, 13, 14, 14, 14, 15, 15, 16, 16, 15, 14, 14, 14, 13, 13, 13, + 13, 12, 12, 12, 11, 11, 10, 8, 10, 11, 11, 12, 12, 12, 13, 13, + 13, 13, 14, 14, 14, 15, 16, 15, 15, 14, 14, 13, 13, 13, 13, 13, + 12, 12, 12, 11, 10, 9, 8, 9, 10, 11, 12, 12, 12, 13, 13, 13, + 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 13, 13, 13, 13, 13, 12, + 12, 11, 11, 10, 10, 7, 10, 10, 11, 11, 12, 12, 13, 13, 13, 13, + 13, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, + 11, 11, 10, 9, 7, 9, 10, 11, 11, 12, 12, 12, 12, 12, 13, 13, + 14, 14, 14, 14, 15, 13, 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, + 11, 10, 8, 7, 8, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, + 13, 13, 15, 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, + 9, 8, 6, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, + 14, 14, 16, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 9, 9, 8, + 6, 4, 6, 8, 9, 9, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, + 16, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 8, 7, 4, + 2, 4, 7, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, + 16, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 9, 9, 8, 6, 4, + 6, 8, 9, 9, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 16, 14, + 14, 14, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 9, 8, 6, 8, + 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 13, + 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 8, 7, 8, 10, + 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 15, 14, 14, 14, + 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 10, 9, 7, 9, 10, 11, + 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 14, 14, + 13, 13, 13, 13, 13, 12, 12, 11, 11, 10, 10, 7, 10, 10, 11, 11, + 12, 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 13, + 13, 13, 13, 13, 12, 12, 12, 11, 10, 9, 8, 9, 10, 11, 12, 12, + 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 16, 15, 14, 14, 14, 13, + 13, 13, 13, 12, 12, 12, 11, 11, 10, 8, 10, 11, 11, 12, 12, 12, + 13, 13, 13, 13, 14, 14, 14, 15, 16, 16, 15, 15, 14, 14, 14, 13, + 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, + 13, 13, 14, 14, 14, 15, 15, 16, 16, 15, 15, 15, 15, 14, 14, 13, + 13, 13, 12, 12, 12, 11, 11, 9, 11, 11, 12, 12, 12, 13, 13, 13, + 14, 14, 15, 15, 15, 15, 16, 16, 15, 15, 15, 14, 13, 13, 13, 13, + 13, 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 13, 13, 13, + 13, 14, 15, 15, 15, 16, 16, 15, 15, 14, 14, 13, 13, 13, 13, 13, + 13, 13, 12, 11, 11, 9, 11, 11, 12, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 15, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, + 13, 13, 12, 11, 9, 11, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, + 15, 15, 15, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, + 13, 13, 11, 10, 11, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, + 15, 15, 16, 16, 15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, + 13, 12, 10, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, + 12, 11, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 7, +}; + +static const uint16_t clv_mvy_2_codes[] = { + 0xFFF5, 0xFFD8, 0x7FE6, 0x7FB9, 0x7FB5, 0x7FB0, 0x7FA0, 0x7F99, + 0x7F93, 0x3FAA, 0x3F9B, 0x3F52, 0x1F76, 0x1EF5, 0x0F0B, 0x06F0, + 0x0F08, 0x1EF0, 0x1F75, 0x3F53, 0x3F9A, 0x3FA8, 0x7F94, 0x7F98, + 0x7F9E, 0x7FAE, 0x7FAF, 0x7FB7, 0x7FE9, 0xFFDB, 0xFFF6, 0xFFFD, + 0x7FD9, 0x7FCC, 0x7FC6, 0x7F9C, 0x7F80, 0x3FA5, 0x3F80, 0x3F6A, + 0x3F31, 0x1F54, 0x1F40, 0x1F11, 0x1F05, 0x075E, 0x0360, 0x075F, + 0x1F07, 0x1F12, 0x1F43, 0x1F56, 0x3F33, 0x3F68, 0x3F83, 0x3FA6, + 0x7F7F, 0x7F9A, 0x7FC9, 0x7FCA, 0x7FDB, 0xFFF8, 0xFFEC, 0x7FDE, + 0x7FE2, 0x7FA6, 0x7F6F, 0x3FA1, 0x3F8D, 0x3F5C, 0x3F39, 0x3F21, + 0x3F18, 0x1F58, 0x1F1E, 0x1EF1, 0x0740, 0x035A, 0x0741, 0x1EF2, + 0x1F1F, 0x1F5A, 0x3F19, 0x3F22, 0x3F3B, 0x3F5E, 0x3F8E, 0x3FA3, + 0x7F6B, 0x7FA2, 0x7FE3, 0x7FE1, 0xFFEE, 0xFFFC, 0x7FC3, 0x7FBC, + 0x7F71, 0x3F96, 0x3F86, 0x3F7A, 0x3F72, 0x3F59, 0x3F46, 0x1F0A, + 0x1EFD, 0x1ED0, 0x0F02, 0x0712, 0x019F, 0x0713, 0x0F03, 0x1ED3, + 0x1EFF, 0x1F09, 0x3F4A, 0x3F5A, 0x3F76, 0x3F7B, 0x3F87, 0x3F97, + 0x7F73, 0x7FBB, 0x7FBF, 0xFFFB, 0xFFEB, 0x7F88, 0x7F5C, 0x3F7C, + 0x3F3C, 0x1F60, 0x1F4C, 0x1F14, 0x1F0C, 0x1F00, 0x1EF9, 0x1ED8, + 0x0F42, 0x075A, 0x0714, 0x0186, 0x0715, 0x075B, 0x0F43, 0x1EDA, + 0x1EFA, 0x1F01, 0x1F0E, 0x1F15, 0x1F4D, 0x1F62, 0x3F3D, 0x3F7D, + 0x3FAC, 0x7F86, 0xFFE8, 0xFFE7, 0x7FA7, 0x7F8C, 0x7F68, 0x3F9C, + 0x1F7C, 0x1F6C, 0x1F69, 0x1EEC, 0x1EE4, 0x1ED5, 0x1ECD, 0x0EF0, + 0x0752, 0x06F6, 0x018C, 0x06F7, 0x0753, 0x0EF1, 0x1ECE, 0x1ED6, + 0x1EE5, 0x1EED, 0x1F6A, 0x1F6E, 0x1F7D, 0x3F9F, 0x7F66, 0x7F8A, + 0x7FA5, 0xFFE6, 0xFFDC, 0x7FDA, 0x7FC0, 0x7FAC, 0x7F61, 0x3F42, + 0x3F0E, 0x1F45, 0x1F2C, 0x1ECA, 0x0F27, 0x0EF6, 0x0EEE, 0x072E, + 0x06F4, 0x0185, 0x06F5, 0x072F, 0x0EEF, 0x0EF7, 0x0F28, 0x1ECB, + 0x1F2F, 0x1F46, 0x3F0F, 0x3F40, 0x7F5F, 0x7FB4, 0x7FC2, 0x7FDC, + 0xFFDA, 0xFFE0, 0x7F72, 0x7F63, 0x3F70, 0x3F1C, 0x3F16, 0x1F82, + 0x1EE2, 0x1EB2, 0x0F4C, 0x0EFC, 0x0EE0, 0x0ED3, 0x0722, 0x036C, + 0x00BF, 0x036D, 0x0723, 0x0ECC, 0x0EE1, 0x0EFF, 0x0F4D, 0x1EB3, + 0x1EE3, 0x1F83, 0x3F17, 0x3F1F, 0x3F75, 0x7F65, 0x7F70, 0xFFE2, + 0xFFD7, 0x7F76, 0x3F2B, 0x3F13, 0x3F0A, 0x1F33, 0x1F23, 0x1EB4, + 0x1EA0, 0x0F46, 0x0F32, 0x0F1A, 0x0756, 0x0728, 0x0356, 0x00B0, + 0x0357, 0x0729, 0x0757, 0x0F1B, 0x0F33, 0x0F47, 0x1EA1, 0x1EB5, + 0x1F20, 0x1F30, 0x3F08, 0x3F10, 0x3F28, 0x7F77, 0xFFD5, 0x7FD5, + 0x7FD1, 0x3F5D, 0x3F25, 0x1F34, 0x1F24, 0x1EE8, 0x1EBC, 0x1EA8, + 0x0F3A, 0x0F2E, 0x0EE2, 0x071C, 0x0374, 0x01A0, 0x00AE, 0x01A1, + 0x0375, 0x071D, 0x0EE3, 0x0F2F, 0x0F3C, 0x1EA9, 0x1EBD, 0x1EE9, + 0x1F25, 0x1F36, 0x3F24, 0x3F61, 0x7FCE, 0x7FD2, 0x7F91, 0x7F7D, + 0x3F6C, 0x3F34, 0x1F72, 0x1F61, 0x1EDD, 0x1EC5, 0x1EA5, 0x0F05, + 0x0ED6, 0x0750, 0x073E, 0x0368, 0x034A, 0x0052, 0x034B, 0x0369, + 0x073F, 0x0751, 0x0ED7, 0x0F07, 0x1EA7, 0x1EC7, 0x1EDF, 0x1F65, + 0x1F70, 0x3F36, 0x3F6F, 0x7F7C, 0x7F8F, 0x3F90, 0x3F66, 0x3F58, + 0x3F4E, 0x1F48, 0x1EBB, 0x0F40, 0x0F18, 0x0F10, 0x0EDA, 0x0ECF, + 0x0732, 0x0704, 0x0354, 0x0190, 0x004F, 0x0191, 0x0355, 0x0705, + 0x0733, 0x0ED0, 0x0EDB, 0x0F11, 0x0F19, 0x0F41, 0x1EB8, 0x1F4B, + 0x3F4F, 0x3F55, 0x3F65, 0x3F92, 0x7F85, 0x1F51, 0x1F39, 0x1F2B, + 0x1F18, 0x1EC2, 0x0F38, 0x0F14, 0x0ECA, 0x074C, 0x0736, 0x0700, + 0x06FC, 0x0350, 0x00BA, 0x004D, 0x00BB, 0x0351, 0x06FD, 0x0701, + 0x0737, 0x074D, 0x0ECB, 0x0F15, 0x0F39, 0x1EC3, 0x1F1B, 0x1F2E, + 0x1F3A, 0x1F53, 0x7F82, 0x3F8A, 0x3F47, 0x3F2E, 0x1F5E, 0x1E9E, + 0x0F24, 0x0F20, 0x0EC6, 0x0746, 0x0726, 0x070E, 0x0370, 0x035E, + 0x018A, 0x00AC, 0x0021, 0x00AD, 0x018B, 0x035F, 0x0371, 0x070F, + 0x0727, 0x0747, 0x0EC7, 0x0F21, 0x0F25, 0x1E9F, 0x1F5F, 0x3F2D, + 0x3F48, 0x3F8B, 0xFFF1, 0x1F78, 0x1F3D, 0x1EAD, 0x0F2B, 0x0EF9, + 0x0EE9, 0x0739, 0x0719, 0x0709, 0x0363, 0x019B, 0x0195, 0x00B3, + 0x0023, 0x0005, 0x0024, 0x00B4, 0x0196, 0x019C, 0x0364, 0x070A, + 0x071A, 0x073A, 0x0EEA, 0x0EFA, 0x0F2C, 0x1EAE, 0x1F3E, 0x1F79, + 0xFFF0, 0x0F0C, 0x0EE6, 0x0EDC, 0x0EC2, 0x0748, 0x0706, 0x0372, + 0x034C, 0x0198, 0x0192, 0x00C0, 0x00BC, 0x00B6, 0x0053, 0x0006, + 0x0000, 0x0007, 0x0054, 0x00B7, 0x00BD, 0x00C1, 0x0193, 0x0199, + 0x034D, 0x0373, 0x0707, 0x0749, 0x0EC3, 0x0EDD, 0x0EE7, 0x0F0D, + 0xFFF2, 0x1F7A, 0x1F3F, 0x1EAF, 0x0F2D, 0x0EFB, 0x0EEB, 0x073B, + 0x071B, 0x070B, 0x0365, 0x019D, 0x0197, 0x00B5, 0x0025, 0x0004, + 0x0022, 0x00B2, 0x0194, 0x019A, 0x0362, 0x0708, 0x0718, 0x0738, + 0x0EE8, 0x0EF8, 0x0F2A, 0x1EAC, 0x1F3C, 0x1F7B, 0xFFF3, 0x3F89, + 0x3F44, 0x3F2F, 0x1F5C, 0x1E9C, 0x0F22, 0x0F1E, 0x0EC4, 0x0744, + 0x0724, 0x070C, 0x036E, 0x035C, 0x0188, 0x00AA, 0x0020, 0x00AB, + 0x0189, 0x035D, 0x036F, 0x070D, 0x0725, 0x0745, 0x0EC5, 0x0F1F, + 0x0F23, 0x1E9D, 0x1F5D, 0x3F2C, 0x3F45, 0x3F88, 0x7F81, 0x1F52, + 0x1F38, 0x1F28, 0x1F19, 0x1EC0, 0x0F36, 0x0F12, 0x0EC8, 0x074A, + 0x0734, 0x06FE, 0x06FA, 0x034E, 0x00B8, 0x004C, 0x00B9, 0x034F, + 0x06FB, 0x06FF, 0x0735, 0x074B, 0x0EC9, 0x0F13, 0x0F37, 0x1EC1, + 0x1F1A, 0x1F29, 0x1F3B, 0x1F50, 0x7F84, 0x3F91, 0x3F64, 0x3F54, + 0x3F4C, 0x1F49, 0x1EB9, 0x0F3B, 0x0F16, 0x0F0E, 0x0ED8, 0x0ECD, + 0x0730, 0x0702, 0x0352, 0x018E, 0x004E, 0x018F, 0x0353, 0x0703, + 0x0731, 0x0ECE, 0x0ED9, 0x0F0F, 0x0F17, 0x0F3D, 0x1EBA, 0x1F4A, + 0x3F4D, 0x3F51, 0x3F67, 0x3F93, 0x7F90, 0x7F7A, 0x3F6E, 0x3F37, + 0x1F71, 0x1F63, 0x1EDC, 0x1EC4, 0x1EA4, 0x0F04, 0x0ED4, 0x074E, + 0x073C, 0x0366, 0x0348, 0x0051, 0x0349, 0x0367, 0x073D, 0x074F, + 0x0ED5, 0x0F06, 0x1EA6, 0x1EC6, 0x1EDE, 0x1F64, 0x1F73, 0x3F35, + 0x3F6D, 0x7F7B, 0x7F8E, 0x7FD4, 0x7FD0, 0x3F5F, 0x3F26, 0x1F35, + 0x1F27, 0x1EEA, 0x1EBE, 0x1EAA, 0x0F3E, 0x0F30, 0x0EE4, 0x071E, + 0x0376, 0x01A2, 0x00AF, 0x01A3, 0x0377, 0x071F, 0x0EE5, 0x0F31, + 0x0F3F, 0x1EAB, 0x1EBF, 0x1EEB, 0x1F26, 0x1F37, 0x3F27, 0x3F62, + 0x7FCF, 0x7FD3, 0xFFD4, 0x7F78, 0x3F29, 0x3F11, 0x3F0B, 0x1F32, + 0x1F22, 0x1EB6, 0x1EA2, 0x0F48, 0x0F34, 0x0F1C, 0x0758, 0x072A, + 0x0358, 0x00B1, 0x0359, 0x072B, 0x0759, 0x0F1D, 0x0F35, 0x0F49, + 0x1EA3, 0x1EB7, 0x1F21, 0x1F31, 0x3F09, 0x3F12, 0x3F2A, 0x7F79, + 0xFFD6, 0xFFE1, 0x7F6D, 0x7F64, 0x3F73, 0x3F1D, 0x3F14, 0x1F81, + 0x1EE0, 0x1EB0, 0x0F4A, 0x0EFD, 0x0EDE, 0x0ED1, 0x0720, 0x036A, + 0x00BE, 0x036B, 0x0721, 0x0ED2, 0x0EDF, 0x0EFE, 0x0F4B, 0x1EB1, + 0x1EE1, 0x1F7E, 0x3F15, 0x3F1E, 0x3F74, 0x7F62, 0x7F75, 0xFFE3, + 0xFFDE, 0x7FDD, 0x7FBE, 0x7FB3, 0x7F60, 0x3F43, 0x3F0C, 0x1F47, + 0x1F2D, 0x1EC8, 0x0F26, 0x0EF4, 0x0EEC, 0x072C, 0x06F2, 0x0184, + 0x06F3, 0x072D, 0x0EED, 0x0EF5, 0x0F29, 0x1EC9, 0x1F2A, 0x1F44, + 0x3F0D, 0x3F41, 0x7F5E, 0x7FB1, 0x7FC1, 0x7FD7, 0xFFDF, 0xFFEA, + 0x7FA3, 0x7F8B, 0x7F69, 0x3F9E, 0x1F7F, 0x1F6D, 0x1F6B, 0x1EEE, + 0x1EE6, 0x1ED4, 0x1ECF, 0x0EF2, 0x0754, 0x06F8, 0x018D, 0x06F9, + 0x0755, 0x0EF3, 0x1ECC, 0x1ED7, 0x1EE7, 0x1EEF, 0x1F68, 0x1F6F, + 0x1F80, 0x3F9D, 0x7F67, 0x7F8D, 0x7FA8, 0xFFE9, 0xFFE5, 0x7F89, + 0x7F5D, 0x3F7F, 0x3F3F, 0x1F67, 0x1F4F, 0x1F17, 0x1F0F, 0x1F02, + 0x1EFB, 0x1ED9, 0x0F45, 0x075C, 0x0716, 0x0187, 0x0717, 0x075D, + 0x0F44, 0x1EDB, 0x1EF8, 0x1F03, 0x1F0D, 0x1F16, 0x1F4E, 0x1F66, + 0x3F3E, 0x3F7E, 0x3FAD, 0x7F87, 0xFFE4, 0xFFF9, 0x7FC4, 0x7FBA, + 0x7F6E, 0x3F95, 0x3F85, 0x3F78, 0x3F77, 0x3F5B, 0x3F49, 0x1F08, + 0x1EFE, 0x1ED2, 0x0F01, 0x0710, 0x019E, 0x0711, 0x0F00, 0x1ED1, + 0x1EFC, 0x1F0B, 0x3F4B, 0x3F57, 0x3F71, 0x3F79, 0x3F84, 0x3F94, + 0x7F74, 0x7FBD, 0x7FC5, 0xFFFE, 0xFFED, 0x7FE0, 0x7FDF, 0x7FA4, + 0x7F6A, 0x3FA0, 0x3F8F, 0x3F63, 0x3F3A, 0x3F23, 0x3F1A, 0x1F59, + 0x1F1D, 0x1EF3, 0x0743, 0x035B, 0x0742, 0x1EF7, 0x1F1C, 0x1F5B, + 0x3F1B, 0x3F20, 0x3F38, 0x3F60, 0x3F8C, 0x3FA2, 0x7F6C, 0x7FA9, + 0x7FE5, 0x7FE4, 0xFFEF, 0xFFFF, 0x7FD6, 0x7FCB, 0x7FC7, 0x7F9B, + 0x7F83, 0x3FA4, 0x3F81, 0x3F69, 0x3F30, 0x1F57, 0x1F41, 0x1F13, + 0x1F06, 0x0EC0, 0x0361, 0x0EC1, 0x1F04, 0x1F10, 0x1F42, 0x1F55, + 0x3F32, 0x3F6B, 0x3F82, 0x3FA7, 0x7F7E, 0x7F9D, 0x7FC8, 0x7FCD, + 0x7FD8, 0xFFFA, 0xFFF7, 0xFFD9, 0x7FE8, 0x7FB6, 0x7FAB, 0x7FAA, + 0x7FA1, 0x7F96, 0x7F95, 0x3FAB, 0x3F98, 0x3F50, 0x1F77, 0x1EF4, + 0x0F0A, 0x06F1, 0x0F09, 0x1EF6, 0x1F74, 0x3F56, 0x3F99, 0x3FA9, + 0x7F92, 0x7F97, 0x7F9F, 0x7FAD, 0x7FB2, 0x7FB8, 0x7FE7, 0xFFDD, + 0xFFF4, 0x0050, +}; + +static const uint16_t clv_mvy_2_syms[] = { + 0xF1F1, 0xF2F1, 0xF3F1, 0xF4F1, 0xF5F1, 0xF6F1, 0xF7F1, 0xF8F1, + 0xF9F1, 0xFAF1, 0xFBF1, 0xFCF1, 0xFDF1, 0xFEF1, 0xFFF1, 0x00F1, + 0x01F1, 0x02F1, 0x03F1, 0x04F1, 0x05F1, 0x06F1, 0x07F1, 0x08F1, + 0x09F1, 0x0AF1, 0x0BF1, 0x0CF1, 0x0DF1, 0x0EF1, 0x0FF1, 0xF1F2, + 0xF2F2, 0xF3F2, 0xF4F2, 0xF5F2, 0xF6F2, 0xF7F2, 0xF8F2, 0xF9F2, + 0xFAF2, 0xFBF2, 0xFCF2, 0xFDF2, 0xFEF2, 0xFFF2, 0x00F2, 0x01F2, + 0x02F2, 0x03F2, 0x04F2, 0x05F2, 0x06F2, 0x07F2, 0x08F2, 0x09F2, + 0x0AF2, 0x0BF2, 0x0CF2, 0x0DF2, 0x0EF2, 0x0FF2, 0xF1F3, 0xF2F3, + 0xF3F3, 0xF4F3, 0xF5F3, 0xF6F3, 0xF7F3, 0xF8F3, 0xF9F3, 0xFAF3, + 0xFBF3, 0xFCF3, 0xFDF3, 0xFEF3, 0xFFF3, 0x00F3, 0x01F3, 0x02F3, + 0x03F3, 0x04F3, 0x05F3, 0x06F3, 0x07F3, 0x08F3, 0x09F3, 0x0AF3, + 0x0BF3, 0x0CF3, 0x0DF3, 0x0EF3, 0x0FF3, 0xF1F4, 0xF2F4, 0xF3F4, + 0xF4F4, 0xF5F4, 0xF6F4, 0xF7F4, 0xF8F4, 0xF9F4, 0xFAF4, 0xFBF4, + 0xFCF4, 0xFDF4, 0xFEF4, 0xFFF4, 0x00F4, 0x01F4, 0x02F4, 0x03F4, + 0x04F4, 0x05F4, 0x06F4, 0x07F4, 0x08F4, 0x09F4, 0x0AF4, 0x0BF4, + 0x0CF4, 0x0DF4, 0x0EF4, 0x0FF4, 0xF1F5, 0xF2F5, 0xF3F5, 0xF4F5, + 0xF5F5, 0xF6F5, 0xF7F5, 0xF8F5, 0xF9F5, 0xFAF5, 0xFBF5, 0xFCF5, + 0xFDF5, 0xFEF5, 0xFFF5, 0x00F5, 0x01F5, 0x02F5, 0x03F5, 0x04F5, + 0x05F5, 0x06F5, 0x07F5, 0x08F5, 0x09F5, 0x0AF5, 0x0BF5, 0x0CF5, + 0x0DF5, 0x0EF5, 0x0FF5, 0xF1F6, 0xF2F6, 0xF3F6, 0xF4F6, 0xF5F6, + 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, + 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, + 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0x0BF6, 0x0CF6, 0x0DF6, + 0x0EF6, 0x0FF6, 0xF1F7, 0xF2F7, 0xF3F7, 0xF4F7, 0xF5F7, 0xF6F7, + 0xF7F7, 0xF8F7, 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, + 0xFFF7, 0x00F7, 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, + 0x07F7, 0x08F7, 0x09F7, 0x0AF7, 0x0BF7, 0x0CF7, 0x0DF7, 0x0EF7, + 0x0FF7, 0xF1F8, 0xF2F8, 0xF3F8, 0xF4F8, 0xF5F8, 0xF6F8, 0xF7F8, + 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, + 0x00F8, 0x01F8, 0x02F8, 0x03F8, 0x04F8, 0x05F8, 0x06F8, 0x07F8, + 0x08F8, 0x09F8, 0x0AF8, 0x0BF8, 0x0CF8, 0x0DF8, 0x0EF8, 0x0FF8, + 0xF1F9, 0xF2F9, 0xF3F9, 0xF4F9, 0xF5F9, 0xF6F9, 0xF7F9, 0xF8F9, + 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, + 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0x08F9, + 0x09F9, 0x0AF9, 0x0BF9, 0x0CF9, 0x0DF9, 0x0EF9, 0x0FF9, 0xF1FA, + 0xF2FA, 0xF3FA, 0xF4FA, 0xF5FA, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, + 0x0AFA, 0x0BFA, 0x0CFA, 0x0DFA, 0x0EFA, 0x0FFA, 0xF1FB, 0xF2FB, + 0xF3FB, 0xF4FB, 0xF5FB, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, + 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, + 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, + 0x0BFB, 0x0CFB, 0x0DFB, 0x0EFB, 0x0FFB, 0xF1FC, 0xF2FC, 0xF3FC, + 0xF4FC, 0xF5FC, 0xF6FC, 0xF7FC, 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, + 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, + 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0x08FC, 0x09FC, 0x0AFC, 0x0BFC, + 0x0CFC, 0x0DFC, 0x0EFC, 0x0FFC, 0xF1FD, 0xF2FD, 0xF3FD, 0xF4FD, + 0xF5FD, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, + 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, + 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, 0x0BFD, 0x0CFD, + 0x0DFD, 0x0EFD, 0x0FFD, 0xF1FE, 0xF2FE, 0xF3FE, 0xF4FE, 0xF5FE, + 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0x0BFE, 0x0CFE, 0x0DFE, + 0x0EFE, 0x0FFE, 0xF1FF, 0xF2FF, 0xF3FF, 0xF4FF, 0xF5FF, 0xF6FF, + 0xF7FF, 0xF8FF, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, + 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, + 0x07FF, 0x08FF, 0x09FF, 0x0AFF, 0x0BFF, 0x0CFF, 0x0DFF, 0x0EFF, + 0x0FFF, 0xF100, 0xF200, 0xF300, 0xF400, 0xF500, 0xF600, 0xF700, + 0xF800, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, + 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, + 0x0800, 0x0900, 0x0A00, 0x0B00, 0x0C00, 0x0D00, 0x0E00, 0x0F00, + 0xF101, 0xF201, 0xF301, 0xF401, 0xF501, 0xF601, 0xF701, 0xF801, + 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, + 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0x0801, + 0x0901, 0x0A01, 0x0B01, 0x0C01, 0x0D01, 0x0E01, 0x0F01, 0xF102, + 0xF202, 0xF302, 0xF402, 0xF502, 0xF602, 0xF702, 0xF802, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, + 0x0A02, 0x0B02, 0x0C02, 0x0D02, 0x0E02, 0x0F02, 0xF103, 0xF203, + 0xF303, 0xF403, 0xF503, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, + 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, + 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, + 0x0B03, 0x0C03, 0x0D03, 0x0E03, 0x0F03, 0xF104, 0xF204, 0xF304, + 0xF404, 0xF504, 0xF604, 0xF704, 0xF804, 0xF904, 0xFA04, 0xFB04, + 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, + 0x0404, 0x0504, 0x0604, 0x0704, 0x0804, 0x0904, 0x0A04, 0x0B04, + 0x0C04, 0x0D04, 0x0E04, 0x0F04, 0xF105, 0xF205, 0xF305, 0xF405, + 0xF505, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, 0xFB05, 0xFC05, + 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, + 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, 0x0B05, 0x0C05, + 0x0D05, 0x0E05, 0x0F05, 0xF106, 0xF206, 0xF306, 0xF406, 0xF506, + 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0x0B06, 0x0C06, 0x0D06, + 0x0E06, 0x0F06, 0xF107, 0xF207, 0xF307, 0xF407, 0xF507, 0xF607, + 0xF707, 0xF807, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, + 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, + 0x0707, 0x0807, 0x0907, 0x0A07, 0x0B07, 0x0C07, 0x0D07, 0x0E07, + 0x0F07, 0xF108, 0xF208, 0xF308, 0xF408, 0xF508, 0xF608, 0xF708, + 0xF808, 0xF908, 0xFA08, 0xFB08, 0xFC08, 0xFD08, 0xFE08, 0xFF08, + 0x0008, 0x0108, 0x0208, 0x0308, 0x0408, 0x0508, 0x0608, 0x0708, + 0x0808, 0x0908, 0x0A08, 0x0B08, 0x0C08, 0x0D08, 0x0E08, 0x0F08, + 0xF109, 0xF209, 0xF309, 0xF409, 0xF509, 0xF609, 0xF709, 0xF809, + 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, 0xFF09, 0x0009, + 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, 0x0709, 0x0809, + 0x0909, 0x0A09, 0x0B09, 0x0C09, 0x0D09, 0x0E09, 0x0F09, 0xF10A, + 0xF20A, 0xF30A, 0xF40A, 0xF50A, 0xF60A, 0xF70A, 0xF80A, 0xF90A, + 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, + 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, + 0x0A0A, 0x0B0A, 0x0C0A, 0x0D0A, 0x0E0A, 0x0F0A, 0xF10B, 0xF20B, + 0xF30B, 0xF40B, 0xF50B, 0xF60B, 0xF70B, 0xF80B, 0xF90B, 0xFA0B, + 0xFB0B, 0xFC0B, 0xFD0B, 0xFE0B, 0xFF0B, 0x000B, 0x010B, 0x020B, + 0x030B, 0x040B, 0x050B, 0x060B, 0x070B, 0x080B, 0x090B, 0x0A0B, + 0x0B0B, 0x0C0B, 0x0D0B, 0x0E0B, 0x0F0B, 0xF10C, 0xF20C, 0xF30C, + 0xF40C, 0xF50C, 0xF60C, 0xF70C, 0xF80C, 0xF90C, 0xFA0C, 0xFB0C, + 0xFC0C, 0xFD0C, 0xFE0C, 0xFF0C, 0x000C, 0x010C, 0x020C, 0x030C, + 0x040C, 0x050C, 0x060C, 0x070C, 0x080C, 0x090C, 0x0A0C, 0x0B0C, + 0x0C0C, 0x0D0C, 0x0E0C, 0x0F0C, 0xF10D, 0xF20D, 0xF30D, 0xF40D, + 0xF50D, 0xF60D, 0xF70D, 0xF80D, 0xF90D, 0xFA0D, 0xFB0D, 0xFC0D, + 0xFD0D, 0xFE0D, 0xFF0D, 0x000D, 0x010D, 0x020D, 0x030D, 0x040D, + 0x050D, 0x060D, 0x070D, 0x080D, 0x090D, 0x0A0D, 0x0B0D, 0x0C0D, + 0x0D0D, 0x0E0D, 0x0F0D, 0xF10E, 0xF20E, 0xF30E, 0xF40E, 0xF50E, + 0xF60E, 0xF70E, 0xF80E, 0xF90E, 0xFA0E, 0xFB0E, 0xFC0E, 0xFD0E, + 0xFE0E, 0xFF0E, 0x000E, 0x010E, 0x020E, 0x030E, 0x040E, 0x050E, + 0x060E, 0x070E, 0x080E, 0x090E, 0x0A0E, 0x0B0E, 0x0C0E, 0x0D0E, + 0x0E0E, 0x0F0E, 0xF10F, 0xF20F, 0xF30F, 0xF40F, 0xF50F, 0xF60F, + 0xF70F, 0xF80F, 0xF90F, 0xFA0F, 0xFB0F, 0xFC0F, 0xFD0F, 0xFE0F, + 0xFF0F, 0x000F, 0x010F, 0x020F, 0x030F, 0x040F, 0x050F, 0x060F, + 0x070F, 0x080F, 0x090F, 0x0A0F, 0x0B0F, 0x0C0F, 0x0D0F, 0x0E0F, + 0x0F0F, 0x1010, +}; + +static const uint8_t clv_mvy_3_bits[] = { + 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, 14, 13, + 13, 12, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, + 15, 15, 14, 14, 14, 13, 12, 11, 12, 13, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 12, 11, 12, 14, 14, + 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, + 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, + 12, 11, 12, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 13, 12, 10, 12, 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 12, 12, 10, 12, 12, 13, 13, + 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 15, 15, + 15, 15, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 11, + 10, 11, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, + 12, 12, 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, + 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, + 12, 12, 12, 12, 12, 12, 12, 11, 11, 10, 9, 10, 11, 11, 12, 12, + 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 15, 15, + 15, 15, 14, 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 10, 9, + 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, + 15, 16, 15, 15, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, + 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, + 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, + 12, 12, 12, 12, 12, 11, 11, 11, 10, 8, 10, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 14, 14, + 14, 14, 13, 13, 12, 12, 12, 12, 12, 11, 11, 11, 10, 10, 8, 10, + 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, + 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, + 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, + 13, 14, 14, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, + 12, 12, 11, 11, 11, 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, + 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 14, 14, 14, + 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 9, 9, 7, 9, 9, + 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, + 15, 14, 14, 14, 13, 13, 13, 13, 12, 11, 11, 11, 11, 10, 10, 10, + 9, 8, 6, 8, 9, 10, 10, 10, 11, 11, 11, 11, 12, 13, 13, 13, + 13, 14, 14, 14, 15, 15, 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, + 11, 10, 10, 9, 9, 8, 6, 4, 6, 8, 9, 9, 10, 10, 11, 11, + 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 13, 13, 13, 12, 12, 12, + 12, 11, 10, 10, 10, 10, 9, 9, 8, 8, 7, 5, 2, 5, 7, 8, + 8, 9, 9, 10, 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 15, + 14, 14, 14, 13, 13, 12, 12, 11, 11, 11, 11, 10, 10, 9, 9, 8, + 6, 4, 6, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, + 14, 14, 14, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 11, 11, 11, + 11, 10, 10, 10, 9, 8, 6, 8, 9, 10, 10, 10, 11, 11, 11, 11, + 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, + 12, 12, 12, 12, 11, 11, 11, 11, 10, 9, 9, 7, 9, 9, 10, 11, + 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 14, + 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 10, 10, 9, + 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, + 14, 14, 15, 15, 14, 14, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, + 11, 11, 10, 10, 9, 7, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, + 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 14, 14, 14, 14, 13, 13, + 12, 12, 12, 12, 12, 11, 11, 11, 10, 10, 8, 10, 10, 11, 11, 11, + 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, + 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 10, 8, + 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, + 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 12, 12, 12, 12, 12, + 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, + 14, 14, 14, 14, 14, 15, 15, 16, 15, 15, 15, 15, 14, 14, 13, 13, + 12, 12, 12, 12, 12, 11, 11, 11, 10, 9, 10, 11, 11, 11, 12, 12, + 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 15, 15, 14, + 14, 14, 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 10, 9, 10, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, + 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, + 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, + 13, 13, 13, 13, 13, 13, 13, 11, 10, 11, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 15, 15, + 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 13, 12, 12, 10, 12, 12, + 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, + 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, + 13, 12, 10, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 15, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, + 14, 14, 14, 14, 13, 13, 12, 11, 12, 13, 13, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 12, 11, 12, 14, 14, + 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, + 12, 11, 12, 13, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, + 15, 14, 14, 13, 13, 12, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, + 15, 15, 16, 16, 16, 16, 16, 16, 16, 7, +}; + +static const uint16_t clv_mvy_3_codes[] = { + 0xFFF6, 0xFFEE, 0xFFDC, 0xFFD7, 0xFFB4, 0xFFAA, 0xFFA0, 0x7FCC, + 0x7F8E, 0x7F7B, 0x7F77, 0x7F13, 0x7F11, 0x3F56, 0x3F48, 0x1F16, + 0x1E94, 0x0F28, 0x06F0, 0x0F2A, 0x1E96, 0x1F1C, 0x3F46, 0x3F58, + 0x7F15, 0x7F0E, 0x7F76, 0x7F80, 0x7F90, 0x7FC8, 0xFFA2, 0xFFA7, + 0xFFB5, 0xFFD8, 0xFFDD, 0xFFEC, 0xFFF5, 0xFFF1, 0xFFEA, 0xFFE4, + 0xFFD1, 0xFFC1, 0xFFA8, 0x7F70, 0x7F5C, 0x7F44, 0x7F40, 0x7F2A, + 0x7F16, 0x7EDF, 0x3ED6, 0x3ECA, 0x3ECC, 0x1EB5, 0x0EDE, 0x06D3, + 0x0EDF, 0x1EB6, 0x3ECE, 0x3ED0, 0x3ED8, 0x7EE5, 0x7F19, 0x7F31, + 0x7F3E, 0x7F45, 0x7F5B, 0x7F6F, 0xFFA9, 0xFFC0, 0xFFCE, 0xFFE5, + 0xFFE8, 0xFFF2, 0xFFFE, 0xFFE2, 0xFFBE, 0x7FBB, 0x7F75, 0x7F6B, + 0x7F58, 0x7EF9, 0x7EDC, 0x3F68, 0x3F27, 0x3F28, 0x3EDF, 0x3ED2, + 0x3EC1, 0x3EA6, 0x3E87, 0x0F0F, 0x06B3, 0x0F10, 0x3E89, 0x3EA8, + 0x3EC3, 0x3ED5, 0x3EE0, 0x3F2B, 0x3F26, 0x3F67, 0x7EDA, 0x7EFB, + 0x7F56, 0x7F6A, 0x7F72, 0x7FC1, 0xFFBC, 0xFFE0, 0xFFFF, 0xFFF8, + 0xFFD3, 0xFFB9, 0x7FAC, 0x7F94, 0x7F8B, 0x7F62, 0x7F4A, 0x7F05, + 0x7EEE, 0x3F44, 0x3EA4, 0x3E78, 0x3E6F, 0x3E54, 0x1EEF, 0x1EA9, + 0x0ED4, 0x06A8, 0x0ED5, 0x1EA8, 0x1EEC, 0x3E51, 0x3E69, 0x3E75, + 0x3EA3, 0x3F43, 0x7EF1, 0x7F04, 0x7F4B, 0x7F5D, 0x7F89, 0x7F95, + 0x7FAA, 0xFFBB, 0xFFC8, 0xFFF9, 0xFFD9, 0xFFCA, 0x7FC3, 0x7F8C, + 0x7F38, 0x7F02, 0x3F5A, 0x3F4A, 0x3F30, 0x3EFF, 0x3EF4, 0x3EE9, + 0x3E95, 0x3E73, 0x3E43, 0x1F08, 0x1E81, 0x0E84, 0x0349, 0x0E85, + 0x1E82, 0x1F07, 0x3E45, 0x3E74, 0x3E96, 0x3EEA, 0x3EF1, 0x3F00, + 0x3F32, 0x3F4F, 0x3F5C, 0x7F01, 0x7F3B, 0x7F8D, 0x7FC2, 0xFFCF, + 0xFFD6, 0xFFC7, 0xFFB1, 0xFFA6, 0x7FA1, 0x7F2F, 0x7F24, 0x7F0A, + 0x3EF6, 0x3E97, 0x3E83, 0x3E7F, 0x1F04, 0x1EE1, 0x1ECB, 0x1EAE, + 0x1E7E, 0x0EBA, 0x0E8C, 0x0333, 0x0E8D, 0x0EBB, 0x1E7F, 0x1EAF, + 0x1ECC, 0x1EE2, 0x1F05, 0x3E80, 0x3E84, 0x3E98, 0x3EF9, 0x7F06, + 0x7F1B, 0x7F2D, 0x7F9F, 0xFFAF, 0xFFB0, 0xFFC6, 0x7FB5, 0x7FB1, + 0x7F36, 0x7F25, 0x3F63, 0x3F3A, 0x3F1B, 0x3EBB, 0x3E63, 0x3E5B, + 0x3E40, 0x1F14, 0x1EF5, 0x1EEB, 0x1EBE, 0x1E92, 0x1E6A, 0x070C, + 0x032D, 0x070D, 0x1E6B, 0x1E93, 0x1EBF, 0x1EE8, 0x1EF3, 0x1F15, + 0x3E3F, 0x3E5C, 0x3E64, 0x3EB9, 0x3F1C, 0x3F3C, 0x3F62, 0x7F22, + 0x7F39, 0x7FAF, 0x7FAE, 0x7FC6, 0x7F7F, 0x7F53, 0x7F32, 0x3F66, + 0x3EF0, 0x3E65, 0x1EDA, 0x1ED3, 0x1E98, 0x1E74, 0x0F20, 0x0F1D, + 0x0EEA, 0x0EA9, 0x0E70, 0x0718, 0x033E, 0x0179, 0x033F, 0x0719, + 0x0E71, 0x0EAB, 0x0EE9, 0x0F1F, 0x0F22, 0x1E76, 0x1E9B, 0x1ED5, + 0x1EDD, 0x3E68, 0x3EF3, 0x3F6C, 0x7F33, 0x7F4E, 0x7F7D, 0x7FCB, + 0x7FBD, 0x7F21, 0x7EF6, 0x3F0C, 0x3EBE, 0x3EAE, 0x1EA3, 0x1E85, + 0x0F0C, 0x0F06, 0x0EEE, 0x0EE6, 0x0ECA, 0x0EA2, 0x0E78, 0x0720, + 0x06BA, 0x0326, 0x015D, 0x0327, 0x06BB, 0x0721, 0x0E79, 0x0EA3, + 0x0ECB, 0x0EE7, 0x0EEF, 0x0F07, 0x0F0D, 0x1E86, 0x1EA4, 0x3EAF, + 0x3EBF, 0x3F0A, 0x7EF8, 0x7F1E, 0x7FBF, 0xFF9F, 0x7FB3, 0x7F96, + 0x7F0B, 0x7EF5, 0x3E85, 0x3E4E, 0x1EB3, 0x1E6E, 0x0F2D, 0x0EBD, + 0x0E97, 0x0E93, 0x0E86, 0x071A, 0x06E4, 0x06BC, 0x0338, 0x015A, + 0x0339, 0x06BD, 0x06E5, 0x071B, 0x0E87, 0x0E94, 0x0E98, 0x0EBE, + 0x0F2E, 0x1E6F, 0x1EB4, 0x3E4F, 0x3E88, 0x7EF4, 0x7F07, 0x7F99, + 0x7FB7, 0xFF9D, 0x7FA8, 0x7EEB, 0x3F5D, 0x3EB2, 0x3EAA, 0x3E5D, + 0x3E49, 0x1EFE, 0x1E89, 0x0F16, 0x0F12, 0x0EE0, 0x0E7A, 0x0E6A, + 0x070E, 0x06FA, 0x06B4, 0x0314, 0x0158, 0x0315, 0x06B5, 0x06FB, + 0x070F, 0x0E6B, 0x0E7B, 0x0EE1, 0x0F13, 0x0F17, 0x1E8A, 0x1EFF, + 0x3E4A, 0x3E5E, 0x3EAB, 0x3EB3, 0x3F59, 0x7EEC, 0x7FA2, 0x7F82, + 0x7F5E, 0x7F28, 0x3EDA, 0x3EC9, 0x3E7A, 0x1ED6, 0x1ECE, 0x0EFC, + 0x0EF0, 0x0E9A, 0x0E7E, 0x0E66, 0x0E5E, 0x0722, 0x06C0, 0x06A0, + 0x02FA, 0x00A8, 0x02FB, 0x06A1, 0x06C1, 0x0723, 0x0E5F, 0x0E67, + 0x0E7F, 0x0E9B, 0x0EF1, 0x0EFD, 0x1ECF, 0x1ED7, 0x3E79, 0x3ECD, + 0x3EDB, 0x7F26, 0x7F5A, 0x7F83, 0x7F54, 0x7EE8, 0x3F54, 0x3F0E, + 0x3EFB, 0x3E47, 0x1EC1, 0x1EB9, 0x0EF9, 0x0EF3, 0x0EC1, 0x0E8F, + 0x0E74, 0x0714, 0x06F4, 0x06B0, 0x0336, 0x030A, 0x009F, 0x030B, + 0x0337, 0x06B1, 0x06F5, 0x0715, 0x0E75, 0x0E91, 0x0EC3, 0x0EF6, + 0x0EFB, 0x1EBB, 0x1EC3, 0x3E41, 0x3EF8, 0x3F10, 0x3F4D, 0x7EE9, + 0x7F52, 0x7F9A, 0x3F3F, 0x3F1F, 0x3F03, 0x3EA0, 0x1F0F, 0x1E72, + 0x1E62, 0x0EDA, 0x0ED2, 0x0EB2, 0x0E64, 0x0708, 0x06EA, 0x06DA, + 0x0346, 0x032A, 0x0176, 0x004B, 0x0177, 0x032B, 0x0347, 0x06DB, + 0x06EB, 0x0709, 0x0E65, 0x0EB3, 0x0ED3, 0x0EDB, 0x1E63, 0x1E6C, + 0x1F0E, 0x3E9E, 0x3F01, 0x3F1D, 0x3F3D, 0x7F9B, 0x7EDE, 0x3F36, + 0x3F2E, 0x3F07, 0x3E99, 0x1F0D, 0x1EA1, 0x1E8C, 0x0EB4, 0x0EAC, + 0x0E5A, 0x0E50, 0x0702, 0x06D4, 0x06C6, 0x032E, 0x0310, 0x0162, + 0x0046, 0x0163, 0x0311, 0x032F, 0x06C7, 0x06D5, 0x0703, 0x0E51, + 0x0E5B, 0x0EAD, 0x0EB5, 0x1E8F, 0x1EA7, 0x1F0C, 0x3E9A, 0x3F02, + 0x3F2D, 0x3F35, 0x7EE0, 0x7F66, 0x3F11, 0x3EE1, 0x3EBC, 0x3E56, + 0x1EC4, 0x1E64, 0x0F04, 0x0EC7, 0x0E56, 0x0E4C, 0x06EC, 0x06DC, + 0x069C, 0x0694, 0x0320, 0x016C, 0x0154, 0x0044, 0x0155, 0x016D, + 0x0321, 0x0695, 0x069D, 0x06DD, 0x06ED, 0x0E4D, 0x0E57, 0x0EC4, + 0x0F05, 0x1E65, 0x1EC5, 0x3E55, 0x3EB7, 0x3EE3, 0x3F13, 0x7F67, + 0x7FA7, 0x3F49, 0x3F22, 0x3EE5, 0x1EF6, 0x1EE5, 0x1E9C, 0x1E78, + 0x0EA4, 0x06F6, 0x06DE, 0x06CE, 0x06AA, 0x0340, 0x0318, 0x02FE, + 0x015E, 0x009A, 0x001C, 0x009B, 0x015F, 0x02FF, 0x0319, 0x0341, + 0x06AB, 0x06CF, 0x06DF, 0x06F7, 0x0EA5, 0x1E79, 0x1E9D, 0x1EE7, + 0x1EF7, 0x3EE6, 0x3F23, 0x3F4B, 0x7FA3, 0x7F49, 0x3F14, 0x3E8D, + 0x3E6B, 0x1F17, 0x1EF8, 0x0F24, 0x0ECC, 0x06FE, 0x06CA, 0x06A4, + 0x0698, 0x030C, 0x0302, 0x0170, 0x0168, 0x00A0, 0x001E, 0x0004, + 0x001F, 0x00A1, 0x0169, 0x0171, 0x0303, 0x030D, 0x0699, 0x06A5, + 0x06CB, 0x06FF, 0x0ECD, 0x0F25, 0x1EF9, 0x1F18, 0x3E6C, 0x3E8E, + 0x3F15, 0x7F46, 0x1EF0, 0x1EDE, 0x1EC8, 0x0F1A, 0x0F00, 0x0E9E, + 0x0E54, 0x06C4, 0x031E, 0x031C, 0x0306, 0x02F8, 0x017A, 0x0166, + 0x00A6, 0x00A4, 0x0048, 0x000C, 0x0000, 0x000D, 0x0049, 0x00A5, + 0x00A7, 0x0167, 0x017B, 0x02F9, 0x0307, 0x031D, 0x031F, 0x06C5, + 0x0E55, 0x0E9F, 0x0F01, 0x0F1B, 0x1EC9, 0x1EDF, 0x1EF1, 0x7F47, + 0x3F12, 0x3E8F, 0x3E6D, 0x1F1B, 0x1EFA, 0x0F26, 0x0ECE, 0x0700, + 0x06CC, 0x06A6, 0x069A, 0x030E, 0x0304, 0x0172, 0x016A, 0x00A2, + 0x0020, 0x0005, 0x0021, 0x00A3, 0x016B, 0x0173, 0x0305, 0x030F, + 0x069B, 0x06A7, 0x06CD, 0x0701, 0x0ECF, 0x0F27, 0x1EFB, 0x1F1D, + 0x3E6E, 0x3E90, 0x3F17, 0x7F48, 0x7FA9, 0x3F50, 0x3F24, 0x3EE7, + 0x1EFC, 0x1EE9, 0x1E9E, 0x1E7A, 0x0EA6, 0x06F8, 0x06E0, 0x06D0, + 0x06AC, 0x0342, 0x031A, 0x0300, 0x0160, 0x009C, 0x001D, 0x009D, + 0x0161, 0x0301, 0x031B, 0x0343, 0x06AD, 0x06D1, 0x06E1, 0x06F9, + 0x0EA7, 0x1E7B, 0x1E9F, 0x1EEA, 0x1EFD, 0x3EE8, 0x3F21, 0x3F52, + 0x7F9E, 0x7F68, 0x3F16, 0x3EE2, 0x3EBA, 0x3E57, 0x1EC6, 0x1E66, + 0x0F08, 0x0EC5, 0x0E58, 0x0E4E, 0x06EE, 0x06E2, 0x069E, 0x0696, + 0x0322, 0x016E, 0x0156, 0x0045, 0x0157, 0x016F, 0x0323, 0x0697, + 0x069F, 0x06E3, 0x06EF, 0x0E4F, 0x0E59, 0x0EC6, 0x0F09, 0x1E67, + 0x1EC7, 0x3E58, 0x3EB8, 0x3EE4, 0x3F18, 0x7F69, 0x7EE2, 0x3F38, + 0x3F33, 0x3F04, 0x3E9C, 0x1F0A, 0x1EA5, 0x1E8D, 0x0EB6, 0x0EAE, + 0x0E5C, 0x0E52, 0x0704, 0x06D6, 0x06C8, 0x0330, 0x0312, 0x0164, + 0x0047, 0x0165, 0x0313, 0x0331, 0x06C9, 0x06D7, 0x0705, 0x0E53, + 0x0E5D, 0x0EAF, 0x0EB7, 0x1E8E, 0x1EA6, 0x1F0B, 0x3E9B, 0x3F05, + 0x3F31, 0x3F39, 0x7EE1, 0x7F9C, 0x3F40, 0x3F1E, 0x3F06, 0x3E9D, + 0x1F10, 0x1E70, 0x1E60, 0x0ED8, 0x0ED0, 0x0EB0, 0x0E62, 0x0706, + 0x06E8, 0x06D8, 0x0344, 0x0328, 0x0174, 0x004A, 0x0175, 0x0329, + 0x0345, 0x06D9, 0x06E9, 0x0707, 0x0E63, 0x0EB1, 0x0ED1, 0x0ED9, + 0x1E61, 0x1E71, 0x1F11, 0x3E9F, 0x3F08, 0x3F20, 0x3F3E, 0x7F9D, + 0x7F4F, 0x7EE6, 0x3F53, 0x3F0D, 0x3EFA, 0x3E46, 0x1EC0, 0x1EB8, + 0x0EF8, 0x0EF2, 0x0EC0, 0x0E8E, 0x0E72, 0x0712, 0x06F2, 0x06AE, + 0x0334, 0x0308, 0x009E, 0x0309, 0x0335, 0x06AF, 0x06F3, 0x0713, + 0x0E73, 0x0E90, 0x0EC2, 0x0EF4, 0x0EFA, 0x1EBA, 0x1EC2, 0x3E48, + 0x3EFC, 0x3F0B, 0x3F51, 0x7EE7, 0x7F51, 0x7F84, 0x7F61, 0x7F27, + 0x3EDC, 0x3EC5, 0x3E7C, 0x1ED8, 0x1ED0, 0x0EFE, 0x0EF5, 0x0E9C, + 0x0E80, 0x0E68, 0x0E60, 0x0724, 0x06C2, 0x06A2, 0x02FC, 0x00A9, + 0x02FD, 0x06A3, 0x06C3, 0x0725, 0x0E61, 0x0E69, 0x0E81, 0x0E9D, + 0x0EF7, 0x0EFF, 0x1ED1, 0x1ED9, 0x3E7B, 0x3ECF, 0x3ED9, 0x7F29, + 0x7F65, 0x7F85, 0x7FA0, 0x7EEA, 0x3F60, 0x3EB4, 0x3EAC, 0x3E5F, + 0x3E4B, 0x1F00, 0x1E8B, 0x0F18, 0x0F14, 0x0EE2, 0x0E7C, 0x0E6C, + 0x0710, 0x06FC, 0x06B6, 0x0316, 0x0159, 0x0317, 0x06B7, 0x06FD, + 0x0711, 0x0E6D, 0x0E7D, 0x0EE3, 0x0F15, 0x0F19, 0x1E88, 0x1F01, + 0x3E4C, 0x3E60, 0x3EA9, 0x3EB1, 0x3F5B, 0x7EED, 0x7FA5, 0xFF9E, + 0x7FBE, 0x7F98, 0x7F0D, 0x7EF3, 0x3E8C, 0x3E50, 0x1EB7, 0x1E73, + 0x0F2F, 0x0EBF, 0x0E99, 0x0E95, 0x0E88, 0x071C, 0x06E6, 0x06BE, + 0x033A, 0x015B, 0x033B, 0x06BF, 0x06E7, 0x071D, 0x0E89, 0x0E92, + 0x0E96, 0x0EBC, 0x0F2C, 0x1E6D, 0x1EB0, 0x3E4D, 0x3E8B, 0x7EF2, + 0x7F08, 0x7F97, 0x7FB0, 0xFF9C, 0x7FB2, 0x7F23, 0x7EFA, 0x3F0F, + 0x3EBD, 0x3EAD, 0x1EA0, 0x1E87, 0x0F0A, 0x0F02, 0x0EED, 0x0EE4, + 0x0EC8, 0x0EA0, 0x0E76, 0x071E, 0x06B8, 0x0324, 0x015C, 0x0325, + 0x06B9, 0x071F, 0x0E77, 0x0EA1, 0x0EC9, 0x0EE5, 0x0EEC, 0x0F03, + 0x0F0B, 0x1E84, 0x1EA2, 0x3EB0, 0x3EC4, 0x3F09, 0x7EF7, 0x7F1D, + 0x7FBC, 0x7FCD, 0x7F81, 0x7F50, 0x7F34, 0x3F65, 0x3EED, 0x3E67, + 0x1EDB, 0x1ED2, 0x1E99, 0x1E77, 0x0F21, 0x0F1C, 0x0EE8, 0x0EA8, + 0x0E6E, 0x0716, 0x033C, 0x0178, 0x033D, 0x0717, 0x0E6F, 0x0EAA, + 0x0EEB, 0x0F1E, 0x0F23, 0x1E75, 0x1E9A, 0x1ED4, 0x1EDC, 0x3E66, + 0x3EEE, 0x3F6B, 0x7F35, 0x7F55, 0x7F7A, 0x7FCA, 0x7FB6, 0x7FB8, + 0x7F37, 0x7F1F, 0x3F61, 0x3F37, 0x3F1A, 0x3EB5, 0x3E62, 0x3E5A, + 0x1F1E, 0x1F13, 0x1EF2, 0x1EE6, 0x1EBC, 0x1E91, 0x1E68, 0x070A, + 0x032C, 0x070B, 0x1E69, 0x1E90, 0x1EBD, 0x1EE4, 0x1EF4, 0x1F12, + 0x3E3E, 0x3E59, 0x3E61, 0x3EB6, 0x3F19, 0x3F3B, 0x3F64, 0x7F1C, + 0x7F3D, 0x7FB4, 0x7FB9, 0xFFC5, 0xFFB6, 0xFFAD, 0x7FA4, 0x7F2C, + 0x7F20, 0x7F09, 0x3EF5, 0x3E93, 0x3E82, 0x3E7E, 0x1F02, 0x1EE3, + 0x1ECA, 0x1EAD, 0x1E7C, 0x0EB8, 0x0E8A, 0x0332, 0x0E8B, 0x0EB9, + 0x1E7D, 0x1EAC, 0x1ECD, 0x1EE0, 0x1F03, 0x3E7D, 0x3E81, 0x3E91, + 0x3EF7, 0x7F0C, 0x7F1A, 0x7F2E, 0x7FA6, 0xFFA4, 0xFFB7, 0xFFC4, + 0xFFD4, 0xFFCC, 0x7FC5, 0x7F8A, 0x7F3C, 0x7EFF, 0x3F5E, 0x3F4E, + 0x3F2F, 0x3EFD, 0x3EEF, 0x3EEB, 0x3E92, 0x3E71, 0x3E42, 0x1F09, + 0x1E83, 0x0E82, 0x0348, 0x0E83, 0x1E80, 0x1F06, 0x3E44, 0x3E72, + 0x3E94, 0x3EEC, 0x3EF2, 0x3EFE, 0x3F34, 0x3F4C, 0x3F5F, 0x7EFE, + 0x7F3A, 0x7F86, 0x7FC4, 0xFFD2, 0xFFD5, 0xFFFA, 0xFFCD, 0xFFBA, + 0x7FAB, 0x7F92, 0x7F87, 0x7F63, 0x7F4C, 0x7F03, 0x7EF0, 0x3F42, + 0x3EA1, 0x3E76, 0x3E6A, 0x3E52, 0x1EEE, 0x1EAB, 0x0ED6, 0x06A9, + 0x0ED7, 0x1EAA, 0x1EED, 0x3E53, 0x3E70, 0x3E77, 0x3EA2, 0x3F41, + 0x7EEF, 0x7F00, 0x7F4D, 0x7F60, 0x7F88, 0x7F93, 0x7FAD, 0xFFB8, + 0xFFCB, 0xFFFB, 0xFFFC, 0xFFE1, 0xFFBF, 0x7FBA, 0x7F73, 0x7F6C, + 0x7F57, 0x7EFC, 0x7EDD, 0x3F6A, 0x3F2A, 0x3F25, 0x3EDD, 0x3ED3, + 0x3EC2, 0x3EA7, 0x3E86, 0x0F11, 0x06B2, 0x0F0E, 0x3E8A, 0x3EA5, + 0x3EC0, 0x3ED1, 0x3EDE, 0x3F2C, 0x3F29, 0x3F69, 0x7EDB, 0x7EFD, + 0x7F59, 0x7F6D, 0x7F74, 0x7FC0, 0xFFC3, 0xFFE3, 0xFFFD, 0xFFF0, + 0xFFE9, 0xFFE7, 0xFFC9, 0xFFBD, 0xFFAE, 0x7F71, 0x7F5F, 0x7F42, + 0x7F41, 0x7F30, 0x7F17, 0x7EE4, 0x3ED7, 0x3EC7, 0x3ECB, 0x1EB1, + 0x0EDC, 0x06D2, 0x0EDD, 0x1EB2, 0x3EC6, 0x3EC8, 0x3ED4, 0x7EE3, + 0x7F18, 0x7F2B, 0x7F3F, 0x7F43, 0x7F64, 0x7F6E, 0xFFAB, 0xFFC2, + 0xFFD0, 0xFFE6, 0xFFEF, 0xFFF3, 0xFFF7, 0xFFEB, 0xFFDE, 0xFFDA, + 0xFFB3, 0xFFAC, 0xFFA3, 0x7FC9, 0x7F8F, 0x7F7C, 0x7F79, 0x7F0F, + 0x7F10, 0x3F55, 0x3F45, 0x1F1A, 0x1E95, 0x0F2B, 0x06F1, 0x0F29, + 0x1E97, 0x1F19, 0x3F47, 0x3F57, 0x7F14, 0x7F12, 0x7F78, 0x7F7E, + 0x7F91, 0x7FC7, 0xFFA1, 0xFFA5, 0xFFB2, 0xFFDB, 0xFFDF, 0xFFED, + 0xFFF4, 0x004C, +}; + +static const uint16_t clv_mvy_3_syms[] = { + 0xEEEE, 0xEFEE, 0xF0EE, 0xF1EE, 0xF2EE, 0xF3EE, 0xF4EE, 0xF5EE, + 0xF6EE, 0xF7EE, 0xF8EE, 0xF9EE, 0xFAEE, 0xFBEE, 0xFCEE, 0xFDEE, + 0xFEEE, 0xFFEE, 0x00EE, 0x01EE, 0x02EE, 0x03EE, 0x04EE, 0x05EE, + 0x06EE, 0x07EE, 0x08EE, 0x09EE, 0x0AEE, 0x0BEE, 0x0CEE, 0x0DEE, + 0x0EEE, 0x0FEE, 0x10EE, 0x11EE, 0x12EE, 0xEEEF, 0xEFEF, 0xF0EF, + 0xF1EF, 0xF2EF, 0xF3EF, 0xF4EF, 0xF5EF, 0xF6EF, 0xF7EF, 0xF8EF, + 0xF9EF, 0xFAEF, 0xFBEF, 0xFCEF, 0xFDEF, 0xFEEF, 0xFFEF, 0x00EF, + 0x01EF, 0x02EF, 0x03EF, 0x04EF, 0x05EF, 0x06EF, 0x07EF, 0x08EF, + 0x09EF, 0x0AEF, 0x0BEF, 0x0CEF, 0x0DEF, 0x0EEF, 0x0FEF, 0x10EF, + 0x11EF, 0x12EF, 0xEEF0, 0xEFF0, 0xF0F0, 0xF1F0, 0xF2F0, 0xF3F0, + 0xF4F0, 0xF5F0, 0xF6F0, 0xF7F0, 0xF8F0, 0xF9F0, 0xFAF0, 0xFBF0, + 0xFCF0, 0xFDF0, 0xFEF0, 0xFFF0, 0x00F0, 0x01F0, 0x02F0, 0x03F0, + 0x04F0, 0x05F0, 0x06F0, 0x07F0, 0x08F0, 0x09F0, 0x0AF0, 0x0BF0, + 0x0CF0, 0x0DF0, 0x0EF0, 0x0FF0, 0x10F0, 0x11F0, 0x12F0, 0xEEF1, + 0xEFF1, 0xF0F1, 0xF1F1, 0xF2F1, 0xF3F1, 0xF4F1, 0xF5F1, 0xF6F1, + 0xF7F1, 0xF8F1, 0xF9F1, 0xFAF1, 0xFBF1, 0xFCF1, 0xFDF1, 0xFEF1, + 0xFFF1, 0x00F1, 0x01F1, 0x02F1, 0x03F1, 0x04F1, 0x05F1, 0x06F1, + 0x07F1, 0x08F1, 0x09F1, 0x0AF1, 0x0BF1, 0x0CF1, 0x0DF1, 0x0EF1, + 0x0FF1, 0x10F1, 0x11F1, 0x12F1, 0xEEF2, 0xEFF2, 0xF0F2, 0xF1F2, + 0xF2F2, 0xF3F2, 0xF4F2, 0xF5F2, 0xF6F2, 0xF7F2, 0xF8F2, 0xF9F2, + 0xFAF2, 0xFBF2, 0xFCF2, 0xFDF2, 0xFEF2, 0xFFF2, 0x00F2, 0x01F2, + 0x02F2, 0x03F2, 0x04F2, 0x05F2, 0x06F2, 0x07F2, 0x08F2, 0x09F2, + 0x0AF2, 0x0BF2, 0x0CF2, 0x0DF2, 0x0EF2, 0x0FF2, 0x10F2, 0x11F2, + 0x12F2, 0xEEF3, 0xEFF3, 0xF0F3, 0xF1F3, 0xF2F3, 0xF3F3, 0xF4F3, + 0xF5F3, 0xF6F3, 0xF7F3, 0xF8F3, 0xF9F3, 0xFAF3, 0xFBF3, 0xFCF3, + 0xFDF3, 0xFEF3, 0xFFF3, 0x00F3, 0x01F3, 0x02F3, 0x03F3, 0x04F3, + 0x05F3, 0x06F3, 0x07F3, 0x08F3, 0x09F3, 0x0AF3, 0x0BF3, 0x0CF3, + 0x0DF3, 0x0EF3, 0x0FF3, 0x10F3, 0x11F3, 0x12F3, 0xEEF4, 0xEFF4, + 0xF0F4, 0xF1F4, 0xF2F4, 0xF3F4, 0xF4F4, 0xF5F4, 0xF6F4, 0xF7F4, + 0xF8F4, 0xF9F4, 0xFAF4, 0xFBF4, 0xFCF4, 0xFDF4, 0xFEF4, 0xFFF4, + 0x00F4, 0x01F4, 0x02F4, 0x03F4, 0x04F4, 0x05F4, 0x06F4, 0x07F4, + 0x08F4, 0x09F4, 0x0AF4, 0x0BF4, 0x0CF4, 0x0DF4, 0x0EF4, 0x0FF4, + 0x10F4, 0x11F4, 0x12F4, 0xEEF5, 0xEFF5, 0xF0F5, 0xF1F5, 0xF2F5, + 0xF3F5, 0xF4F5, 0xF5F5, 0xF6F5, 0xF7F5, 0xF8F5, 0xF9F5, 0xFAF5, + 0xFBF5, 0xFCF5, 0xFDF5, 0xFEF5, 0xFFF5, 0x00F5, 0x01F5, 0x02F5, + 0x03F5, 0x04F5, 0x05F5, 0x06F5, 0x07F5, 0x08F5, 0x09F5, 0x0AF5, + 0x0BF5, 0x0CF5, 0x0DF5, 0x0EF5, 0x0FF5, 0x10F5, 0x11F5, 0x12F5, + 0xEEF6, 0xEFF6, 0xF0F6, 0xF1F6, 0xF2F6, 0xF3F6, 0xF4F6, 0xF5F6, + 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, + 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, + 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0x0BF6, 0x0CF6, 0x0DF6, + 0x0EF6, 0x0FF6, 0x10F6, 0x11F6, 0x12F6, 0xEEF7, 0xEFF7, 0xF0F7, + 0xF1F7, 0xF2F7, 0xF3F7, 0xF4F7, 0xF5F7, 0xF6F7, 0xF7F7, 0xF8F7, + 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, + 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, + 0x09F7, 0x0AF7, 0x0BF7, 0x0CF7, 0x0DF7, 0x0EF7, 0x0FF7, 0x10F7, + 0x11F7, 0x12F7, 0xEEF8, 0xEFF8, 0xF0F8, 0xF1F8, 0xF2F8, 0xF3F8, + 0xF4F8, 0xF5F8, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, + 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, + 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0x0BF8, + 0x0CF8, 0x0DF8, 0x0EF8, 0x0FF8, 0x10F8, 0x11F8, 0x12F8, 0xEEF9, + 0xEFF9, 0xF0F9, 0xF1F9, 0xF2F9, 0xF3F9, 0xF4F9, 0xF5F9, 0xF6F9, + 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, + 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, + 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0x0BF9, 0x0CF9, 0x0DF9, 0x0EF9, + 0x0FF9, 0x10F9, 0x11F9, 0x12F9, 0xEEFA, 0xEFFA, 0xF0FA, 0xF1FA, + 0xF2FA, 0xF3FA, 0xF4FA, 0xF5FA, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, + 0x0AFA, 0x0BFA, 0x0CFA, 0x0DFA, 0x0EFA, 0x0FFA, 0x10FA, 0x11FA, + 0x12FA, 0xEEFB, 0xEFFB, 0xF0FB, 0xF1FB, 0xF2FB, 0xF3FB, 0xF4FB, + 0xF5FB, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, + 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, + 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0x0BFB, 0x0CFB, + 0x0DFB, 0x0EFB, 0x0FFB, 0x10FB, 0x11FB, 0x12FB, 0xEEFC, 0xEFFC, + 0xF0FC, 0xF1FC, 0xF2FC, 0xF3FC, 0xF4FC, 0xF5FC, 0xF6FC, 0xF7FC, + 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, + 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, + 0x08FC, 0x09FC, 0x0AFC, 0x0BFC, 0x0CFC, 0x0DFC, 0x0EFC, 0x0FFC, + 0x10FC, 0x11FC, 0x12FC, 0xEEFD, 0xEFFD, 0xF0FD, 0xF1FD, 0xF2FD, + 0xF3FD, 0xF4FD, 0xF5FD, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, + 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, + 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, + 0x0BFD, 0x0CFD, 0x0DFD, 0x0EFD, 0x0FFD, 0x10FD, 0x11FD, 0x12FD, + 0xEEFE, 0xEFFE, 0xF0FE, 0xF1FE, 0xF2FE, 0xF3FE, 0xF4FE, 0xF5FE, + 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0x0BFE, 0x0CFE, 0x0DFE, + 0x0EFE, 0x0FFE, 0x10FE, 0x11FE, 0x12FE, 0xEEFF, 0xEFFF, 0xF0FF, + 0xF1FF, 0xF2FF, 0xF3FF, 0xF4FF, 0xF5FF, 0xF6FF, 0xF7FF, 0xF8FF, + 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, + 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, + 0x09FF, 0x0AFF, 0x0BFF, 0x0CFF, 0x0DFF, 0x0EFF, 0x0FFF, 0x10FF, + 0x11FF, 0x12FF, 0xEE00, 0xEF00, 0xF000, 0xF100, 0xF200, 0xF300, + 0xF400, 0xF500, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, + 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, + 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0x0B00, + 0x0C00, 0x0D00, 0x0E00, 0x0F00, 0x1000, 0x1100, 0x1200, 0xEE01, + 0xEF01, 0xF001, 0xF101, 0xF201, 0xF301, 0xF401, 0xF501, 0xF601, + 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, + 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, + 0x0701, 0x0801, 0x0901, 0x0A01, 0x0B01, 0x0C01, 0x0D01, 0x0E01, + 0x0F01, 0x1001, 0x1101, 0x1201, 0xEE02, 0xEF02, 0xF002, 0xF102, + 0xF202, 0xF302, 0xF402, 0xF502, 0xF602, 0xF702, 0xF802, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, + 0x0A02, 0x0B02, 0x0C02, 0x0D02, 0x0E02, 0x0F02, 0x1002, 0x1102, + 0x1202, 0xEE03, 0xEF03, 0xF003, 0xF103, 0xF203, 0xF303, 0xF403, + 0xF503, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, + 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, + 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0x0B03, 0x0C03, + 0x0D03, 0x0E03, 0x0F03, 0x1003, 0x1103, 0x1203, 0xEE04, 0xEF04, + 0xF004, 0xF104, 0xF204, 0xF304, 0xF404, 0xF504, 0xF604, 0xF704, + 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, + 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, + 0x0804, 0x0904, 0x0A04, 0x0B04, 0x0C04, 0x0D04, 0x0E04, 0x0F04, + 0x1004, 0x1104, 0x1204, 0xEE05, 0xEF05, 0xF005, 0xF105, 0xF205, + 0xF305, 0xF405, 0xF505, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, + 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, + 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, + 0x0B05, 0x0C05, 0x0D05, 0x0E05, 0x0F05, 0x1005, 0x1105, 0x1205, + 0xEE06, 0xEF06, 0xF006, 0xF106, 0xF206, 0xF306, 0xF406, 0xF506, + 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0x0B06, 0x0C06, 0x0D06, + 0x0E06, 0x0F06, 0x1006, 0x1106, 0x1206, 0xEE07, 0xEF07, 0xF007, + 0xF107, 0xF207, 0xF307, 0xF407, 0xF507, 0xF607, 0xF707, 0xF807, + 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, + 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, + 0x0907, 0x0A07, 0x0B07, 0x0C07, 0x0D07, 0x0E07, 0x0F07, 0x1007, + 0x1107, 0x1207, 0xEE08, 0xEF08, 0xF008, 0xF108, 0xF208, 0xF308, + 0xF408, 0xF508, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, + 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, + 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0x0B08, + 0x0C08, 0x0D08, 0x0E08, 0x0F08, 0x1008, 0x1108, 0x1208, 0xEE09, + 0xEF09, 0xF009, 0xF109, 0xF209, 0xF309, 0xF409, 0xF509, 0xF609, + 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, + 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, + 0x0709, 0x0809, 0x0909, 0x0A09, 0x0B09, 0x0C09, 0x0D09, 0x0E09, + 0x0F09, 0x1009, 0x1109, 0x1209, 0xEE0A, 0xEF0A, 0xF00A, 0xF10A, + 0xF20A, 0xF30A, 0xF40A, 0xF50A, 0xF60A, 0xF70A, 0xF80A, 0xF90A, + 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, + 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, + 0x0A0A, 0x0B0A, 0x0C0A, 0x0D0A, 0x0E0A, 0x0F0A, 0x100A, 0x110A, + 0x120A, 0xEE0B, 0xEF0B, 0xF00B, 0xF10B, 0xF20B, 0xF30B, 0xF40B, + 0xF50B, 0xF60B, 0xF70B, 0xF80B, 0xF90B, 0xFA0B, 0xFB0B, 0xFC0B, + 0xFD0B, 0xFE0B, 0xFF0B, 0x000B, 0x010B, 0x020B, 0x030B, 0x040B, + 0x050B, 0x060B, 0x070B, 0x080B, 0x090B, 0x0A0B, 0x0B0B, 0x0C0B, + 0x0D0B, 0x0E0B, 0x0F0B, 0x100B, 0x110B, 0x120B, 0xEE0C, 0xEF0C, + 0xF00C, 0xF10C, 0xF20C, 0xF30C, 0xF40C, 0xF50C, 0xF60C, 0xF70C, + 0xF80C, 0xF90C, 0xFA0C, 0xFB0C, 0xFC0C, 0xFD0C, 0xFE0C, 0xFF0C, + 0x000C, 0x010C, 0x020C, 0x030C, 0x040C, 0x050C, 0x060C, 0x070C, + 0x080C, 0x090C, 0x0A0C, 0x0B0C, 0x0C0C, 0x0D0C, 0x0E0C, 0x0F0C, + 0x100C, 0x110C, 0x120C, 0xEE0D, 0xEF0D, 0xF00D, 0xF10D, 0xF20D, + 0xF30D, 0xF40D, 0xF50D, 0xF60D, 0xF70D, 0xF80D, 0xF90D, 0xFA0D, + 0xFB0D, 0xFC0D, 0xFD0D, 0xFE0D, 0xFF0D, 0x000D, 0x010D, 0x020D, + 0x030D, 0x040D, 0x050D, 0x060D, 0x070D, 0x080D, 0x090D, 0x0A0D, + 0x0B0D, 0x0C0D, 0x0D0D, 0x0E0D, 0x0F0D, 0x100D, 0x110D, 0x120D, + 0xEE0E, 0xEF0E, 0xF00E, 0xF10E, 0xF20E, 0xF30E, 0xF40E, 0xF50E, + 0xF60E, 0xF70E, 0xF80E, 0xF90E, 0xFA0E, 0xFB0E, 0xFC0E, 0xFD0E, + 0xFE0E, 0xFF0E, 0x000E, 0x010E, 0x020E, 0x030E, 0x040E, 0x050E, + 0x060E, 0x070E, 0x080E, 0x090E, 0x0A0E, 0x0B0E, 0x0C0E, 0x0D0E, + 0x0E0E, 0x0F0E, 0x100E, 0x110E, 0x120E, 0xEE0F, 0xEF0F, 0xF00F, + 0xF10F, 0xF20F, 0xF30F, 0xF40F, 0xF50F, 0xF60F, 0xF70F, 0xF80F, + 0xF90F, 0xFA0F, 0xFB0F, 0xFC0F, 0xFD0F, 0xFE0F, 0xFF0F, 0x000F, + 0x010F, 0x020F, 0x030F, 0x040F, 0x050F, 0x060F, 0x070F, 0x080F, + 0x090F, 0x0A0F, 0x0B0F, 0x0C0F, 0x0D0F, 0x0E0F, 0x0F0F, 0x100F, + 0x110F, 0x120F, 0xEE10, 0xEF10, 0xF010, 0xF110, 0xF210, 0xF310, + 0xF410, 0xF510, 0xF610, 0xF710, 0xF810, 0xF910, 0xFA10, 0xFB10, + 0xFC10, 0xFD10, 0xFE10, 0xFF10, 0x0010, 0x0110, 0x0210, 0x0310, + 0x0410, 0x0510, 0x0610, 0x0710, 0x0810, 0x0910, 0x0A10, 0x0B10, + 0x0C10, 0x0D10, 0x0E10, 0x0F10, 0x1010, 0x1110, 0x1210, 0xEE11, + 0xEF11, 0xF011, 0xF111, 0xF211, 0xF311, 0xF411, 0xF511, 0xF611, + 0xF711, 0xF811, 0xF911, 0xFA11, 0xFB11, 0xFC11, 0xFD11, 0xFE11, + 0xFF11, 0x0011, 0x0111, 0x0211, 0x0311, 0x0411, 0x0511, 0x0611, + 0x0711, 0x0811, 0x0911, 0x0A11, 0x0B11, 0x0C11, 0x0D11, 0x0E11, + 0x0F11, 0x1011, 0x1111, 0x1211, 0xEE12, 0xEF12, 0xF012, 0xF112, + 0xF212, 0xF312, 0xF412, 0xF512, 0xF612, 0xF712, 0xF812, 0xF912, + 0xFA12, 0xFB12, 0xFC12, 0xFD12, 0xFE12, 0xFF12, 0x0012, 0x0112, + 0x0212, 0x0312, 0x0412, 0x0512, 0x0612, 0x0712, 0x0812, 0x0912, + 0x0A12, 0x0B12, 0x0C12, 0x0D12, 0x0E12, 0x0F12, 0x1012, 0x1112, + 0x1212, 0x1313, +}; + +static const uint8_t clv_mvu_1_bits[] = { + 16, 14, 14, 14, 13, 12, 12, 10, 12, 12, 13, 14, 14, 14, 16, 15, + 13, 13, 12, 12, 11, 11, 7, 11, 11, 12, 12, 13, 13, 15, 16, 16, + 16, 13, 12, 10, 10, 6, 10, 10, 12, 13, 16, 16, 16, 14, 14, 11, + 11, 11, 11, 9, 7, 9, 11, 11, 11, 11, 14, 14, 15, 13, 13, 12, + 9, 8, 8, 4, 8, 8, 9, 12, 13, 13, 15, 14, 14, 11, 11, 10, + 9, 8, 4, 8, 9, 10, 11, 12, 14, 14, 12, 12, 11, 10, 10, 8, + 6, 3, 6, 8, 10, 10, 11, 12, 12, 11, 10, 9, 6, 6, 6, 5, + 4, 5, 6, 6, 6, 9, 10, 11, 12, 12, 11, 10, 10, 8, 6, 3, + 6, 7, 10, 10, 11, 12, 12, 14, 14, 11, 11, 10, 9, 8, 4, 8, + 9, 10, 11, 11, 14, 14, 15, 13, 13, 12, 9, 8, 8, 4, 8, 8, + 9, 12, 13, 13, 15, 14, 14, 11, 11, 11, 11, 9, 7, 9, 11, 11, + 11, 11, 14, 14, 16, 16, 16, 13, 12, 10, 10, 6, 10, 10, 12, 13, + 16, 16, 16, 15, 13, 13, 12, 12, 11, 11, 7, 11, 11, 12, 12, 13, + 13, 15, 16, 14, 14, 14, 13, 12, 12, 10, 12, 12, 13, 14, 14, 14, + 16, 7, +}; + +static const uint16_t clv_mvu_1_codes[] = { + 0xFFFC, 0x3FED, 0x3FE5, 0x3FE3, 0x1FD9, 0x0FD9, 0x0FD6, 0x03CE, + 0x0FD3, 0x0FD8, 0x1FD6, 0x3FE0, 0x3FE8, 0x3FEC, 0xFFFE, 0x7FF3, + 0x1FE7, 0x1FDA, 0x0FCF, 0x0FCC, 0x07DD, 0x07CC, 0x006B, 0x07CD, + 0x07DE, 0x0FCE, 0x0FD2, 0x1FDD, 0x1FEC, 0x7FF0, 0xFFF6, 0xFFFA, + 0xFFF2, 0x1FDE, 0x0FDB, 0x03D8, 0x03CA, 0x002E, 0x03CB, 0x03D9, + 0x0FDC, 0x1FDF, 0xFFF3, 0xFFF9, 0xFFF5, 0x3FF3, 0x3FDD, 0x07DA, + 0x07D2, 0x07CA, 0x07C2, 0x01DE, 0x0069, 0x01DF, 0x07C3, 0x07CB, + 0x07D3, 0x07DB, 0x3FDF, 0x3FF6, 0x7FF7, 0x1FED, 0x1FE5, 0x0FDF, + 0x01D8, 0x00E3, 0x00DF, 0x0007, 0x00E0, 0x00E4, 0x01D9, 0x0FE0, + 0x1FE3, 0x1FE9, 0x7FF4, 0x3FF5, 0x3FE7, 0x07E4, 0x07C6, 0x03D2, + 0x01E2, 0x00E9, 0x0006, 0x00EA, 0x01E3, 0x03D3, 0x07C7, 0x0FCA, + 0x3FE9, 0x3FF0, 0x0FE8, 0x0FE5, 0x07D5, 0x03DD, 0x03D5, 0x00DC, + 0x002B, 0x0001, 0x002C, 0x00DD, 0x03D6, 0x03DE, 0x07D6, 0x0FE4, + 0x0FE9, 0x07E0, 0x03C8, 0x01D6, 0x0032, 0x0030, 0x0028, 0x0012, + 0x0004, 0x0013, 0x0029, 0x0031, 0x0033, 0x01D7, 0x03C9, 0x07E1, + 0x0FEA, 0x0FE6, 0x07D7, 0x03DF, 0x03D7, 0x00DE, 0x002D, 0x0000, + 0x002A, 0x006D, 0x03D4, 0x03DC, 0x07D4, 0x0FE3, 0x0FE7, 0x3FF1, + 0x3FE4, 0x07E2, 0x07C4, 0x03D0, 0x01E0, 0x00E7, 0x0005, 0x00E8, + 0x01E1, 0x03D1, 0x07C5, 0x07E3, 0x3FEA, 0x3FF7, 0x7FF6, 0x1FE6, + 0x1FE4, 0x0FE1, 0x01DA, 0x00E5, 0x00E1, 0x0008, 0x00E2, 0x00E6, + 0x01DB, 0x0FE2, 0x1FE2, 0x1FEB, 0x7FF5, 0x3FF4, 0x3FDC, 0x07D9, + 0x07D0, 0x07C8, 0x07C0, 0x01DC, 0x0068, 0x01DD, 0x07C1, 0x07C9, + 0x07D1, 0x07D8, 0x3FDE, 0x3FF2, 0xFFFB, 0xFFF4, 0xFFF0, 0x1FE1, + 0x0FDD, 0x03DA, 0x03CC, 0x002F, 0x03CD, 0x03DB, 0x0FDE, 0x1FE0, + 0xFFF1, 0xFFF7, 0xFFF8, 0x7FF2, 0x1FEA, 0x1FDC, 0x0FD1, 0x0FCD, + 0x07DC, 0x07CF, 0x006C, 0x07CE, 0x07DF, 0x0FCB, 0x0FD0, 0x1FDB, + 0x1FE8, 0x7FF1, 0xFFFD, 0x3FEE, 0x3FEB, 0x3FE1, 0x1FD7, 0x0FD7, + 0x0FD5, 0x03CF, 0x0FD4, 0x0FDA, 0x1FD8, 0x3FE2, 0x3FE6, 0x3FEF, + 0xFFFF, 0x006A, +}; + +static const uint16_t clv_mvu_1_syms[] = { + 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, + 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0xF9FB, 0xFAFB, + 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, + 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0xF9FC, 0xFAFC, 0xFBFC, + 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, + 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, + 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, + 0x05FD, 0x06FD, 0x07FD, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, + 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, + 0x07FF, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, + 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, + 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, + 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0xF903, 0xFA03, + 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, + 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0xF904, 0xFA04, 0xFB04, + 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, + 0x0404, 0x0504, 0x0604, 0x0704, 0xF905, 0xFA05, 0xFB05, 0xFC05, + 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, + 0x0505, 0x0605, 0x0705, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, + 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, + 0x0707, 0x0808, +}; + +static const uint8_t clv_mvu_2_bits[] = { + 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 15, 15, + 15, 15, 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, + 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 15, 15, 14, 14, 14, + 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, + 15, 15, 14, 13, 13, 13, 13, 13, 12, 12, 12, 13, 13, 13, 13, 13, + 14, 15, 15, 16, 14, 14, 14, 14, 13, 12, 12, 12, 12, 11, 10, 11, + 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 14, 14, 13, 12, 12, 12, + 12, 11, 10, 9, 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, 15, 14, + 13, 13, 12, 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, + 13, 14, 15, 14, 14, 14, 13, 12, 12, 11, 11, 10, 9, 7, 9, 10, + 11, 11, 12, 12, 13, 14, 14, 14, 14, 14, 13, 12, 12, 11, 11, 10, + 9, 8, 7, 8, 9, 10, 11, 11, 12, 12, 13, 14, 14, 14, 13, 13, + 12, 11, 9, 9, 8, 7, 6, 5, 6, 7, 8, 9, 9, 11, 12, 13, + 13, 14, 14, 13, 13, 13, 11, 11, 10, 8, 7, 4, 1, 4, 7, 8, + 10, 11, 11, 13, 13, 13, 14, 14, 13, 13, 12, 11, 9, 9, 8, 7, + 6, 5, 6, 7, 8, 9, 9, 11, 12, 13, 13, 14, 14, 14, 13, 12, + 11, 11, 11, 9, 9, 8, 7, 8, 9, 10, 11, 11, 12, 12, 13, 14, + 14, 14, 14, 14, 13, 12, 12, 11, 11, 10, 9, 7, 9, 10, 11, 11, + 12, 12, 13, 14, 14, 14, 15, 14, 13, 13, 12, 12, 12, 12, 11, 10, + 9, 10, 11, 12, 12, 12, 12, 13, 13, 14, 15, 14, 14, 14, 13, 12, + 12, 12, 12, 11, 10, 8, 10, 11, 12, 12, 12, 12, 13, 14, 14, 14, + 14, 14, 14, 14, 13, 12, 12, 12, 12, 11, 10, 11, 12, 12, 12, 12, + 13, 14, 14, 14, 14, 16, 15, 15, 14, 13, 13, 13, 13, 13, 12, 12, + 12, 13, 13, 13, 13, 13, 14, 15, 15, 16, 16, 15, 15, 14, 14, 14, + 14, 14, 14, 13, 12, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, + 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, + 15, 15, 15, 16, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 16, 16, 16, 6, +}; + +static const uint16_t clv_mvu_2_codes[] = { + 0xFFF2, 0xFFEF, 0xFFEA, 0x7FEC, 0x7FD5, 0x7FC5, 0x7FCF, 0x3FD3, + 0x3FC9, 0x3FB4, 0x3F72, 0x3FAE, 0x3FDC, 0x3FE1, 0x7FC4, 0x7FC8, + 0x7FD7, 0x7FF0, 0xFFE9, 0xFFEC, 0xFFF8, 0xFFF4, 0x7FF3, 0x7FDE, + 0x7FD3, 0x3FC0, 0x3F99, 0x3FA8, 0x3FAC, 0x3F8E, 0x1FA8, 0x1F79, + 0x1FA2, 0x3F89, 0x3F93, 0x3F95, 0x3F9C, 0x3FB8, 0x7FD2, 0x7FE6, + 0x7FDA, 0xFFF7, 0xFFFE, 0x7FED, 0x7FE2, 0x3FD5, 0x3FD7, 0x3FB3, + 0x3FA2, 0x3F80, 0x3F7A, 0x1F88, 0x1F70, 0x1F8A, 0x3F83, 0x3F84, + 0x3FAA, 0x3FC4, 0x3FDA, 0x3FDF, 0x7FDB, 0x7FE3, 0xFFF1, 0xFFFB, + 0x7FE1, 0x7FC7, 0x3FB0, 0x1FAA, 0x1FAB, 0x1FA3, 0x1F8E, 0x1F81, + 0x0FA7, 0x0F7F, 0x0FA8, 0x1F82, 0x1F8F, 0x1FA4, 0x1FAC, 0x1FAD, + 0x3FB5, 0x7FC6, 0x7FDD, 0xFFF3, 0x3FDD, 0x3FBE, 0x3FB9, 0x3F7C, + 0x1F77, 0x0FB5, 0x0F9D, 0x0F99, 0x0F90, 0x0794, 0x03BE, 0x0795, + 0x0F92, 0x0F9A, 0x0F9E, 0x0FB6, 0x1F78, 0x3F78, 0x3FB2, 0x3FBF, + 0x3FD2, 0x3FA7, 0x3F8C, 0x3F75, 0x1F9E, 0x0F93, 0x0F94, 0x0F7B, + 0x0F73, 0x07B4, 0x03BB, 0x01D9, 0x03BC, 0x07B5, 0x0F74, 0x0F7C, + 0x0F95, 0x0F96, 0x1FA0, 0x3F76, 0x3F8F, 0x3FA5, 0x7FE5, 0x3FC7, + 0x1F95, 0x1F71, 0x0FAB, 0x0FAC, 0x0F9F, 0x0F7D, 0x0796, 0x03BF, + 0x00DE, 0x03C0, 0x0797, 0x0F7E, 0x0FA0, 0x0FAD, 0x0FAE, 0x1F72, + 0x1F97, 0x3FD1, 0x7FD8, 0x3FA9, 0x3FA0, 0x3F6D, 0x1F99, 0x0F87, + 0x0F77, 0x07A8, 0x079C, 0x03C5, 0x01CA, 0x0067, 0x01CB, 0x03C6, + 0x079D, 0x07A9, 0x0F78, 0x0F8A, 0x1F9F, 0x3F6E, 0x3F98, 0x3F9A, + 0x3FCA, 0x3F70, 0x1FAF, 0x0F8D, 0x0F6F, 0x07AC, 0x07A0, 0x03B7, + 0x01CE, 0x00DA, 0x0063, 0x00DB, 0x01CF, 0x03B8, 0x07A1, 0x07AD, + 0x0F70, 0x0F91, 0x1FB2, 0x3F73, 0x3FD6, 0x3F7D, 0x1F91, 0x1F85, + 0x0FA3, 0x07A2, 0x01D4, 0x01D0, 0x00E0, 0x0068, 0x002C, 0x0014, + 0x002D, 0x0069, 0x00E1, 0x01D1, 0x01D5, 0x07A3, 0x0FA4, 0x1F89, + 0x1F92, 0x3F81, 0x3FA6, 0x1F7B, 0x1F7C, 0x1F7D, 0x07B0, 0x07AE, + 0x03C7, 0x00DC, 0x0064, 0x0008, 0x0000, 0x0009, 0x0065, 0x00DD, + 0x03C8, 0x07AF, 0x07B1, 0x1F7E, 0x1F7F, 0x1F80, 0x3F9E, 0x3F85, + 0x1F93, 0x1F8B, 0x0FA5, 0x07A4, 0x01D6, 0x01D2, 0x00E2, 0x006A, + 0x002E, 0x0015, 0x002F, 0x006B, 0x00E3, 0x01D3, 0x01D7, 0x07A5, + 0x0FA6, 0x1F8C, 0x1F94, 0x3F87, 0x3FCE, 0x3F77, 0x1FB4, 0x0F83, + 0x07B6, 0x07AA, 0x079E, 0x01DA, 0x01CC, 0x00D8, 0x0062, 0x00D9, + 0x01CD, 0x03B6, 0x079F, 0x07AB, 0x0F6E, 0x0F84, 0x1FA9, 0x3F6A, + 0x3FCD, 0x3F90, 0x3F92, 0x3F6B, 0x1F96, 0x0F85, 0x0F75, 0x07A6, + 0x079A, 0x03C3, 0x01C8, 0x0066, 0x01C9, 0x03C4, 0x079B, 0x07A7, + 0x0F76, 0x0F86, 0x1F9D, 0x3F6C, 0x3F96, 0x3F97, 0x7FE9, 0x3FD8, + 0x1F98, 0x1F73, 0x0FAF, 0x0FB0, 0x0FA1, 0x0F80, 0x0798, 0x03C1, + 0x01D8, 0x03C2, 0x0799, 0x0F81, 0x0FA2, 0x0FB1, 0x0FB2, 0x1F74, + 0x1F9A, 0x3FE0, 0x7FEE, 0x3F94, 0x3F8B, 0x3F6F, 0x1F9B, 0x0F88, + 0x0F89, 0x0F79, 0x0F71, 0x07B2, 0x03B9, 0x00DF, 0x03BA, 0x07B3, + 0x0F72, 0x0F7A, 0x0F8B, 0x0F8C, 0x1F9C, 0x3F71, 0x3F8A, 0x3F9B, + 0x3FC8, 0x3FBD, 0x3FC5, 0x3F79, 0x1F75, 0x0FB3, 0x0F9C, 0x0F97, + 0x0F8E, 0x0792, 0x03BD, 0x0793, 0x0F8F, 0x0F98, 0x0F9B, 0x0FB4, + 0x1F76, 0x3F82, 0x3FC3, 0x3FBA, 0x3FC6, 0xFFFD, 0x7FDF, 0x7FCC, + 0x3FBB, 0x1FB0, 0x1FAE, 0x1FA1, 0x1F90, 0x1F83, 0x0FAA, 0x0F82, + 0x0FA9, 0x1F84, 0x1F8D, 0x1FA5, 0x1FB1, 0x1FB3, 0x3FC2, 0x7FCA, + 0x7FE8, 0xFFF5, 0xFFFF, 0x7FDC, 0x7FD9, 0x3FCC, 0x3FD9, 0x3FB7, + 0x3F9F, 0x3F7E, 0x3F86, 0x1F86, 0x0FB7, 0x1F87, 0x3F7B, 0x3F7F, + 0x3FA1, 0x3FBC, 0x3FCB, 0x3FD4, 0x7FF1, 0x7FF2, 0xFFFA, 0xFFFC, + 0x7FE4, 0x7FE7, 0x7FD4, 0x3FAF, 0x3FA3, 0x3F91, 0x3F9D, 0x3F88, + 0x1FA6, 0x1F7A, 0x1FA7, 0x3F8D, 0x3FAB, 0x3FAD, 0x3FA4, 0x3FB6, + 0x7FD0, 0x7FE0, 0x7FEB, 0xFFF0, 0xFFF9, 0xFFEB, 0xFFED, 0x7FEA, + 0x7FD6, 0x7FC9, 0x7FCB, 0x3FD0, 0x3FDE, 0x3FB1, 0x3F74, 0x3FC1, + 0x3FCF, 0x3FDB, 0x7FCD, 0x7FCE, 0x7FD1, 0x7FEF, 0xFFE8, 0xFFEE, + 0xFFF6, 0x0030, +}; + +static const uint16_t clv_mvu_2_syms[] = { + 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, + 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, + 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0xF6F7, 0xF7F7, 0xF8F7, + 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, + 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, + 0x09F7, 0x0AF7, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, + 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, + 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0xF6F9, + 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, + 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, + 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, + 0x0AFA, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, + 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, + 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0xF6FC, 0xF7FC, + 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, + 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, + 0x08FC, 0x09FC, 0x0AFC, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, + 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, + 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, + 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0xF6FF, 0xF7FF, 0xF8FF, + 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, + 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, + 0x09FF, 0x0AFF, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, + 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, + 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0xF601, + 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, + 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, + 0x0701, 0x0801, 0x0901, 0x0A01, 0xF602, 0xF702, 0xF802, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, + 0x0A02, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, + 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, + 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0xF604, 0xF704, + 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, + 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, + 0x0804, 0x0904, 0x0A04, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, + 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, + 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, + 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0xF607, 0xF707, 0xF807, + 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, + 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, + 0x0907, 0x0A07, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, + 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, + 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0xF609, + 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, + 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, + 0x0709, 0x0809, 0x0909, 0x0A09, 0xF60A, 0xF70A, 0xF80A, 0xF90A, + 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, + 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, + 0x0A0A, 0x0B0B, +}; + +static const uint8_t clv_mvv_1_bits[] = { + 16, 15, 13, 13, 13, 12, 10, 10, 10, 12, 13, 13, 13, 15, 16, 16, + 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, + 13, 13, 11, 10, 10, 5, 10, 10, 11, 13, 13, 14, 15, 12, 12, 12, + 11, 10, 10, 9, 5, 9, 10, 10, 11, 12, 12, 12, 14, 12, 12, 12, + 11, 9, 8, 5, 8, 9, 11, 12, 12, 12, 14, 14, 11, 11, 9, 9, + 9, 7, 5, 7, 9, 9, 9, 11, 11, 14, 13, 12, 11, 10, 10, 8, + 6, 3, 6, 8, 10, 10, 11, 12, 13, 11, 10, 9, 7, 6, 6, 4, + 4, 4, 6, 7, 7, 10, 10, 11, 13, 12, 11, 10, 10, 8, 6, 3, + 6, 8, 10, 10, 11, 12, 13, 14, 11, 11, 9, 9, 9, 7, 5, 7, + 9, 9, 9, 11, 11, 14, 14, 12, 12, 12, 11, 9, 8, 5, 8, 9, + 11, 12, 12, 12, 14, 12, 12, 12, 11, 10, 10, 9, 5, 9, 10, 10, + 11, 12, 12, 12, 15, 14, 13, 13, 11, 10, 10, 5, 10, 10, 11, 13, + 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 10, 11, 12, 13, 14, + 15, 16, 16, 15, 13, 13, 13, 12, 10, 10, 10, 12, 13, 13, 13, 15, + 16, 7, +}; + +static const uint16_t clv_mvv_1_codes[] = { + 0xFFFD, 0x7FF8, 0x1FF2, 0x1FDC, 0x1FDB, 0x0FD2, 0x03D6, 0x03BF, + 0x03D3, 0x0FD0, 0x1FDA, 0x1FDE, 0x1FF0, 0x7FF9, 0xFFFE, 0xFFFA, + 0x7FFB, 0x3FF3, 0x1FE9, 0x0FD6, 0x07CB, 0x03E1, 0x01C8, 0x03E2, + 0x07CC, 0x0FD9, 0x1FE8, 0x3FF6, 0x7FFA, 0xFFF9, 0x7FF1, 0x3FEE, + 0x1FE4, 0x1FE0, 0x07D4, 0x03DB, 0x03CB, 0x0014, 0x03CC, 0x03DC, + 0x07D6, 0x1FE3, 0x1FE7, 0x3FEC, 0x7FF3, 0x0FEA, 0x0FE0, 0x0FDE, + 0x07DE, 0x03C9, 0x03C3, 0x01DC, 0x0013, 0x01DD, 0x03C4, 0x03CA, + 0x07DF, 0x0FDF, 0x0FE3, 0x0FEB, 0x3FF1, 0x0FE7, 0x0FCF, 0x0FC8, + 0x07D8, 0x01D2, 0x00E0, 0x0010, 0x00E1, 0x01D4, 0x07D9, 0x0FC9, + 0x0FCC, 0x0FE6, 0x3FF5, 0x3FEA, 0x07E2, 0x07D2, 0x01D7, 0x01D0, + 0x01CC, 0x006A, 0x000F, 0x006B, 0x01CD, 0x01D1, 0x01D9, 0x07D3, + 0x07E3, 0x3FEB, 0x1FEE, 0x0FD5, 0x07C7, 0x03D8, 0x03D0, 0x00DD, + 0x002D, 0x0001, 0x002E, 0x00DE, 0x03D1, 0x03D9, 0x07C8, 0x0FD8, + 0x1FEF, 0x07CE, 0x03C5, 0x01DE, 0x006C, 0x0032, 0x0030, 0x0005, + 0x0004, 0x0006, 0x0031, 0x0066, 0x006D, 0x03BE, 0x03C6, 0x07CF, + 0x1FEC, 0x0FDA, 0x07C9, 0x03DA, 0x03D2, 0x00DF, 0x002F, 0x0000, + 0x002C, 0x00DC, 0x03CF, 0x03D7, 0x07C6, 0x0FD4, 0x1FED, 0x3FE9, + 0x07E0, 0x07D0, 0x01D3, 0x01CE, 0x01CA, 0x0068, 0x000E, 0x0069, + 0x01CB, 0x01CF, 0x01D5, 0x07D1, 0x07E1, 0x3FE8, 0x3FF4, 0x0FE4, + 0x0FCD, 0x0FCB, 0x07DA, 0x01D6, 0x00E2, 0x0011, 0x00E3, 0x01D8, + 0x07DB, 0x0FCA, 0x0FCE, 0x0FE5, 0x3FF7, 0x0FE8, 0x0FE1, 0x0FDD, + 0x07DD, 0x03C7, 0x03C1, 0x01DA, 0x0012, 0x01DB, 0x03C2, 0x03C8, + 0x07DC, 0x0FDC, 0x0FE2, 0x0FE9, 0x7FF0, 0x3FEF, 0x1FE5, 0x1FE1, + 0x07D7, 0x03DD, 0x03CD, 0x0015, 0x03CE, 0x03DE, 0x07D5, 0x1FE2, + 0x1FE6, 0x3FED, 0x7FF2, 0xFFF8, 0x7FF4, 0x3FF2, 0x1FEB, 0x0FD7, + 0x07CD, 0x03DF, 0x01C9, 0x03E0, 0x07CA, 0x0FDB, 0x1FEA, 0x3FF0, + 0x7FF5, 0xFFFB, 0xFFFC, 0x7FF6, 0x1FF3, 0x1FDD, 0x1FD9, 0x0FD1, + 0x03D5, 0x03C0, 0x03D4, 0x0FD3, 0x1FD8, 0x1FDF, 0x1FF1, 0x7FF7, + 0xFFFF, 0x0067, +}; + +static const uint16_t clv_mvv_1_syms[] = { + 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, 0xFFF9, 0x00F9, + 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, 0x07F9, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0xF9FB, 0xFAFB, + 0xFBFB, 0xFCFB, 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, + 0x03FB, 0x04FB, 0x05FB, 0x06FB, 0x07FB, 0xF9FC, 0xFAFC, 0xFBFC, + 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, 0x00FC, 0x01FC, 0x02FC, 0x03FC, + 0x04FC, 0x05FC, 0x06FC, 0x07FC, 0xF9FD, 0xFAFD, 0xFBFD, 0xFCFD, + 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, 0x03FD, 0x04FD, + 0x05FD, 0x06FD, 0x07FD, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, + 0xFFFF, 0x00FF, 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, + 0x07FF, 0xF900, 0xFA00, 0xFB00, 0xFC00, 0xFD00, 0xFE00, 0xFF00, + 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, + 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, 0xFF01, 0x0001, + 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, 0x0701, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0xF903, 0xFA03, + 0xFB03, 0xFC03, 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, + 0x0303, 0x0403, 0x0503, 0x0603, 0x0703, 0xF904, 0xFA04, 0xFB04, + 0xFC04, 0xFD04, 0xFE04, 0xFF04, 0x0004, 0x0104, 0x0204, 0x0304, + 0x0404, 0x0504, 0x0604, 0x0704, 0xF905, 0xFA05, 0xFB05, 0xFC05, + 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, 0x0305, 0x0405, + 0x0505, 0x0605, 0x0705, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, + 0xFF07, 0x0007, 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, + 0x0707, 0x0808, +}; + +static const uint8_t clv_mvv_2_bits[] = { + 16, 15, 15, 15, 15, 15, 14, 14, 14, 13, 12, 13, 14, 14, 14, 15, + 15, 15, 15, 15, 16, 16, 16, 16, 15, 15, 14, 14, 14, 13, 13, 12, + 12, 13, 14, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 14, 14, 14, + 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 16, 16, 15, + 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 13, 13, 13, 13, 14, + 14, 14, 15, 15, 16, 14, 14, 14, 13, 12, 12, 12, 10, 10, 10, 10, + 10, 12, 12, 12, 13, 14, 14, 14, 16, 14, 14, 14, 13, 13, 12, 12, + 12, 10, 10, 7, 10, 10, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, + 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, 10, 12, 12, 12, 12, + 13, 14, 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, + 10, 12, 12, 12, 12, 13, 14, 14, 14, 14, 13, 13, 12, 12, 11, 10, + 9, 8, 7, 8, 9, 10, 11, 12, 12, 13, 13, 14, 14, 14, 13, 13, + 12, 10, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 10, 12, 13, + 13, 14, 13, 13, 13, 13, 11, 10, 9, 8, 7, 5, 1, 5, 7, 8, + 9, 10, 11, 13, 13, 13, 13, 14, 13, 13, 12, 10, 10, 9, 8, 7, + 6, 5, 6, 7, 8, 9, 10, 10, 12, 13, 13, 14, 14, 14, 13, 13, + 12, 12, 11, 9, 9, 8, 7, 8, 9, 9, 11, 12, 12, 13, 13, 14, + 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, 7, 8, 9, 10, 12, + 12, 12, 12, 13, 14, 14, 14, 14, 13, 12, 12, 12, 12, 10, 9, 8, + 7, 8, 9, 10, 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 13, 13, + 12, 12, 12, 10, 10, 7, 10, 10, 12, 12, 12, 13, 13, 14, 14, 14, + 16, 14, 14, 14, 13, 12, 12, 12, 10, 10, 10, 10, 10, 12, 12, 12, + 13, 14, 14, 14, 16, 15, 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, + 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 14, 14, 14, + 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, + 16, 16, 15, 15, 14, 14, 14, 13, 12, 12, 12, 13, 14, 14, 14, 15, + 15, 16, 16, 16, 16, 15, 15, 15, 15, 15, 14, 14, 14, 13, 10, 13, + 14, 14, 14, 15, 15, 15, 15, 15, 16, 6, +}; + +static const uint16_t clv_mvv_2_codes[] = { + 0xFFFF, 0x7FE7, 0x7FD9, 0x7FE6, 0x7FE5, 0x7FCE, 0x3FD6, 0x3FD3, + 0x3F9C, 0x1FB2, 0x0F7A, 0x1FB5, 0x3FA8, 0x3FDD, 0x3FE5, 0x7FD0, + 0x7FEA, 0x7FEC, 0x7FEF, 0x7FDB, 0xFFF3, 0xFFF5, 0xFFE2, 0xFFEB, + 0x7FEB, 0x7FE0, 0x3FA7, 0x3F84, 0x3F79, 0x1FAE, 0x1F70, 0x0F78, + 0x0FAA, 0x1FAA, 0x3F76, 0x3F7E, 0x3FAC, 0x7FE1, 0x7FDD, 0xFFEC, + 0xFFEE, 0xFFF8, 0xFFF9, 0xFFEA, 0xFFE4, 0x3FE1, 0x3FBA, 0x3FC5, + 0x3FB9, 0x3FA1, 0x3FAA, 0x1F8B, 0x1F8D, 0x1F8E, 0x3FA6, 0x3FA9, + 0x3FC4, 0x3FBC, 0x3FC6, 0x3FDB, 0xFFE3, 0xFFE1, 0xFFFB, 0x7FD4, + 0x7FCC, 0x3FCD, 0x3F88, 0x3F7C, 0x1FA1, 0x1FA2, 0x1F95, 0x1F77, + 0x0F95, 0x0F79, 0x0F97, 0x1F78, 0x1F96, 0x1FA3, 0x1FA4, 0x3F7F, + 0x3F8B, 0x3FCB, 0x7FCF, 0x7FD5, 0xFFF6, 0x3FD7, 0x3FE0, 0x3F91, + 0x1F7B, 0x0FB4, 0x0FA5, 0x0FA6, 0x03D5, 0x03CB, 0x03BF, 0x03CC, + 0x03D6, 0x0FA7, 0x0FA8, 0x0FB5, 0x1F7D, 0x3F87, 0x3FD2, 0x3FDF, + 0xFFF0, 0x3F95, 0x3F8A, 0x3F96, 0x1FB7, 0x1F9F, 0x0F9F, 0x0F8F, + 0x0F76, 0x03D1, 0x03BC, 0x0067, 0x03BD, 0x03D2, 0x0F77, 0x0F90, + 0x0FA0, 0x1FA0, 0x1FB9, 0x3F97, 0x3F98, 0x3F99, 0x3FC3, 0x3FAF, + 0x1F81, 0x0FA9, 0x0F91, 0x0F7E, 0x0F68, 0x03B2, 0x01C6, 0x00D4, + 0x0062, 0x00D5, 0x01C7, 0x03B3, 0x0F6A, 0x0F81, 0x0F93, 0x0FAC, + 0x1F83, 0x3FB3, 0x3FB4, 0x3FC7, 0x3FBB, 0x1F86, 0x0FAF, 0x0F98, + 0x0F84, 0x0F6D, 0x03B8, 0x01CC, 0x00DA, 0x0065, 0x00DB, 0x01CD, + 0x03B9, 0x0F6F, 0x0F86, 0x0F9B, 0x0FB1, 0x1F88, 0x3FB8, 0x3FC9, + 0x3FDC, 0x3F80, 0x1FB3, 0x1F93, 0x0F87, 0x0F72, 0x07B0, 0x03B0, + 0x01D4, 0x00E0, 0x0061, 0x00E1, 0x01D5, 0x03B1, 0x07B1, 0x0F73, + 0x0F88, 0x1F94, 0x1FB4, 0x3F81, 0x3FD4, 0x3F9E, 0x1F99, 0x1F73, + 0x0F89, 0x03C4, 0x03C0, 0x01CE, 0x00D0, 0x005C, 0x0028, 0x0010, + 0x0029, 0x005D, 0x00D1, 0x01CF, 0x03C1, 0x03C5, 0x0F8A, 0x1F74, + 0x1F9A, 0x3FA4, 0x1FAC, 0x1F8C, 0x1F7E, 0x1F71, 0x07B2, 0x03CF, + 0x01C4, 0x00DC, 0x005A, 0x0012, 0x0000, 0x0013, 0x005B, 0x00DD, + 0x01C5, 0x03D0, 0x07B3, 0x1F72, 0x1F7F, 0x1F8F, 0x1FAD, 0x3FAB, + 0x1F9B, 0x1F75, 0x0F8B, 0x03C6, 0x03C2, 0x01D0, 0x00D2, 0x005E, + 0x002A, 0x0011, 0x002B, 0x005F, 0x00D3, 0x01D1, 0x03C3, 0x03C7, + 0x0F8C, 0x1F76, 0x1F9C, 0x3FAD, 0x3FCF, 0x3F85, 0x1FBA, 0x1F91, + 0x0F7D, 0x0F70, 0x07AE, 0x01D6, 0x01D2, 0x00DE, 0x0060, 0x00DF, + 0x01D3, 0x01D7, 0x07AF, 0x0F71, 0x0F7F, 0x1F92, 0x1FAF, 0x3F7B, + 0x3FD0, 0x3FC0, 0x3FB1, 0x1F82, 0x0FAB, 0x0F92, 0x0F80, 0x0F69, + 0x03B4, 0x01C8, 0x00D6, 0x0063, 0x00D7, 0x01C9, 0x03B5, 0x0F6B, + 0x0F82, 0x0F94, 0x0FAD, 0x1F84, 0x3FB5, 0x3FC2, 0x3FB6, 0x3FBF, + 0x1F85, 0x0FAE, 0x0F96, 0x0F83, 0x0F6C, 0x03B6, 0x01CA, 0x00D8, + 0x0064, 0x00D9, 0x01CB, 0x03B7, 0x0F6E, 0x0F85, 0x0F99, 0x0FB0, + 0x1F87, 0x3FB0, 0x3FB2, 0x3F93, 0x3F86, 0x3F8E, 0x1FB1, 0x1F9D, + 0x0F9A, 0x0F8D, 0x0F74, 0x03CD, 0x03BA, 0x0066, 0x03BB, 0x03CE, + 0x0F75, 0x0F8E, 0x0F9C, 0x1F9E, 0x1FB0, 0x3F8C, 0x3F94, 0x3F8D, + 0xFFFC, 0x3FCA, 0x3FD5, 0x3F8F, 0x1F79, 0x0FB2, 0x0FA1, 0x0FA2, + 0x03D3, 0x03C9, 0x03BE, 0x03CA, 0x03D4, 0x0FA3, 0x0FA4, 0x0FB3, + 0x1F7A, 0x3F90, 0x3FE3, 0x3FD8, 0xFFF2, 0x7FD7, 0x7FCD, 0x3FE4, + 0x3F92, 0x3F82, 0x1FA6, 0x1FA8, 0x1F98, 0x1F7C, 0x0F9D, 0x0F7B, + 0x0F9E, 0x1F80, 0x1F97, 0x1FA7, 0x1FA5, 0x3F7A, 0x3F89, 0x3FDA, + 0x7FD2, 0x7FD6, 0xFFFE, 0xFFED, 0xFFE8, 0x3FCC, 0x3FBD, 0x3FAE, + 0x3FC1, 0x3F9F, 0x3F9A, 0x1F89, 0x1F90, 0x1F8A, 0x3FA3, 0x3FA0, + 0x3FC8, 0x3FBE, 0x3FB7, 0x3FD1, 0xFFE7, 0xFFE9, 0xFFFD, 0xFFF4, + 0xFFE5, 0xFFEF, 0x7FD8, 0x7FDC, 0x3FA2, 0x3F83, 0x3F78, 0x1FA9, + 0x0FB6, 0x0F7C, 0x0FB7, 0x1FAB, 0x3F77, 0x3F7D, 0x3F9B, 0x7FDE, + 0x7FED, 0xFFE6, 0xFFE0, 0xFFF7, 0xFFF1, 0x7FDA, 0x7FE9, 0x7FE2, + 0x7FE3, 0x7FD1, 0x3FD9, 0x3FE2, 0x3FA5, 0x1FB8, 0x03C8, 0x1FB6, + 0x3F9D, 0x3FDE, 0x3FCE, 0x7FD3, 0x7FEE, 0x7FDF, 0x7FE8, 0x7FE4, + 0xFFFA, 0x002C, +}; + +static const uint16_t clv_mvv_2_syms[] = { + 0xF6F6, 0xF7F6, 0xF8F6, 0xF9F6, 0xFAF6, 0xFBF6, 0xFCF6, 0xFDF6, + 0xFEF6, 0xFFF6, 0x00F6, 0x01F6, 0x02F6, 0x03F6, 0x04F6, 0x05F6, + 0x06F6, 0x07F6, 0x08F6, 0x09F6, 0x0AF6, 0xF6F7, 0xF7F7, 0xF8F7, + 0xF9F7, 0xFAF7, 0xFBF7, 0xFCF7, 0xFDF7, 0xFEF7, 0xFFF7, 0x00F7, + 0x01F7, 0x02F7, 0x03F7, 0x04F7, 0x05F7, 0x06F7, 0x07F7, 0x08F7, + 0x09F7, 0x0AF7, 0xF6F8, 0xF7F8, 0xF8F8, 0xF9F8, 0xFAF8, 0xFBF8, + 0xFCF8, 0xFDF8, 0xFEF8, 0xFFF8, 0x00F8, 0x01F8, 0x02F8, 0x03F8, + 0x04F8, 0x05F8, 0x06F8, 0x07F8, 0x08F8, 0x09F8, 0x0AF8, 0xF6F9, + 0xF7F9, 0xF8F9, 0xF9F9, 0xFAF9, 0xFBF9, 0xFCF9, 0xFDF9, 0xFEF9, + 0xFFF9, 0x00F9, 0x01F9, 0x02F9, 0x03F9, 0x04F9, 0x05F9, 0x06F9, + 0x07F9, 0x08F9, 0x09F9, 0x0AF9, 0xF6FA, 0xF7FA, 0xF8FA, 0xF9FA, + 0xFAFA, 0xFBFA, 0xFCFA, 0xFDFA, 0xFEFA, 0xFFFA, 0x00FA, 0x01FA, + 0x02FA, 0x03FA, 0x04FA, 0x05FA, 0x06FA, 0x07FA, 0x08FA, 0x09FA, + 0x0AFA, 0xF6FB, 0xF7FB, 0xF8FB, 0xF9FB, 0xFAFB, 0xFBFB, 0xFCFB, + 0xFDFB, 0xFEFB, 0xFFFB, 0x00FB, 0x01FB, 0x02FB, 0x03FB, 0x04FB, + 0x05FB, 0x06FB, 0x07FB, 0x08FB, 0x09FB, 0x0AFB, 0xF6FC, 0xF7FC, + 0xF8FC, 0xF9FC, 0xFAFC, 0xFBFC, 0xFCFC, 0xFDFC, 0xFEFC, 0xFFFC, + 0x00FC, 0x01FC, 0x02FC, 0x03FC, 0x04FC, 0x05FC, 0x06FC, 0x07FC, + 0x08FC, 0x09FC, 0x0AFC, 0xF6FD, 0xF7FD, 0xF8FD, 0xF9FD, 0xFAFD, + 0xFBFD, 0xFCFD, 0xFDFD, 0xFEFD, 0xFFFD, 0x00FD, 0x01FD, 0x02FD, + 0x03FD, 0x04FD, 0x05FD, 0x06FD, 0x07FD, 0x08FD, 0x09FD, 0x0AFD, + 0xF6FE, 0xF7FE, 0xF8FE, 0xF9FE, 0xFAFE, 0xFBFE, 0xFCFE, 0xFDFE, + 0xFEFE, 0xFFFE, 0x00FE, 0x01FE, 0x02FE, 0x03FE, 0x04FE, 0x05FE, + 0x06FE, 0x07FE, 0x08FE, 0x09FE, 0x0AFE, 0xF6FF, 0xF7FF, 0xF8FF, + 0xF9FF, 0xFAFF, 0xFBFF, 0xFCFF, 0xFDFF, 0xFEFF, 0xFFFF, 0x00FF, + 0x01FF, 0x02FF, 0x03FF, 0x04FF, 0x05FF, 0x06FF, 0x07FF, 0x08FF, + 0x09FF, 0x0AFF, 0xF600, 0xF700, 0xF800, 0xF900, 0xFA00, 0xFB00, + 0xFC00, 0xFD00, 0xFE00, 0xFF00, 0x0000, 0x0100, 0x0200, 0x0300, + 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0A00, 0xF601, + 0xF701, 0xF801, 0xF901, 0xFA01, 0xFB01, 0xFC01, 0xFD01, 0xFE01, + 0xFF01, 0x0001, 0x0101, 0x0201, 0x0301, 0x0401, 0x0501, 0x0601, + 0x0701, 0x0801, 0x0901, 0x0A01, 0xF602, 0xF702, 0xF802, 0xF902, + 0xFA02, 0xFB02, 0xFC02, 0xFD02, 0xFE02, 0xFF02, 0x0002, 0x0102, + 0x0202, 0x0302, 0x0402, 0x0502, 0x0602, 0x0702, 0x0802, 0x0902, + 0x0A02, 0xF603, 0xF703, 0xF803, 0xF903, 0xFA03, 0xFB03, 0xFC03, + 0xFD03, 0xFE03, 0xFF03, 0x0003, 0x0103, 0x0203, 0x0303, 0x0403, + 0x0503, 0x0603, 0x0703, 0x0803, 0x0903, 0x0A03, 0xF604, 0xF704, + 0xF804, 0xF904, 0xFA04, 0xFB04, 0xFC04, 0xFD04, 0xFE04, 0xFF04, + 0x0004, 0x0104, 0x0204, 0x0304, 0x0404, 0x0504, 0x0604, 0x0704, + 0x0804, 0x0904, 0x0A04, 0xF605, 0xF705, 0xF805, 0xF905, 0xFA05, + 0xFB05, 0xFC05, 0xFD05, 0xFE05, 0xFF05, 0x0005, 0x0105, 0x0205, + 0x0305, 0x0405, 0x0505, 0x0605, 0x0705, 0x0805, 0x0905, 0x0A05, + 0xF606, 0xF706, 0xF806, 0xF906, 0xFA06, 0xFB06, 0xFC06, 0xFD06, + 0xFE06, 0xFF06, 0x0006, 0x0106, 0x0206, 0x0306, 0x0406, 0x0506, + 0x0606, 0x0706, 0x0806, 0x0906, 0x0A06, 0xF607, 0xF707, 0xF807, + 0xF907, 0xFA07, 0xFB07, 0xFC07, 0xFD07, 0xFE07, 0xFF07, 0x0007, + 0x0107, 0x0207, 0x0307, 0x0407, 0x0507, 0x0607, 0x0707, 0x0807, + 0x0907, 0x0A07, 0xF608, 0xF708, 0xF808, 0xF908, 0xFA08, 0xFB08, + 0xFC08, 0xFD08, 0xFE08, 0xFF08, 0x0008, 0x0108, 0x0208, 0x0308, + 0x0408, 0x0508, 0x0608, 0x0708, 0x0808, 0x0908, 0x0A08, 0xF609, + 0xF709, 0xF809, 0xF909, 0xFA09, 0xFB09, 0xFC09, 0xFD09, 0xFE09, + 0xFF09, 0x0009, 0x0109, 0x0209, 0x0309, 0x0409, 0x0509, 0x0609, + 0x0709, 0x0809, 0x0909, 0x0A09, 0xF60A, 0xF70A, 0xF80A, 0xF90A, + 0xFA0A, 0xFB0A, 0xFC0A, 0xFD0A, 0xFE0A, 0xFF0A, 0x000A, 0x010A, + 0x020A, 0x030A, 0x040A, 0x050A, 0x060A, 0x070A, 0x080A, 0x090A, + 0x0A0A, 0x0B0B, +}; + +static const uint8_t clv_biasy_1_bits[] = { + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 13, 13, 13, + 13, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, + 8, 8, 7, 7, 5, 2, 1, 3, 5, 7, 7, 8, 9, 9, 10, 10, + 10, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 12, +}; + +static const uint16_t clv_biasy_1_codes[] = { + 0xFFFE, 0x7FFE, 0x7FFC, 0x7FFA, 0x7FF6, 0x7FF7, 0x7FF3, 0x7FF2, + 0x7FEF, 0x7FEE, 0x3FF5, 0x3FF3, 0x3FF1, 0x1FF7, 0x1FF5, 0x1FF2, + 0x1FF0, 0x1FEE, 0x1FEC, 0x1FEA, 0x1FE8, 0x0FF2, 0x0FF0, 0x0FEE, + 0x0FEB, 0x07F4, 0x07F3, 0x07F1, 0x03F7, 0x03F5, 0x03F3, 0x01F7, + 0x00FA, 0x00F8, 0x007A, 0x0078, 0x001C, 0x0002, 0x0000, 0x0006, + 0x001D, 0x0079, 0x007B, 0x00F9, 0x01F6, 0x01F8, 0x03F2, 0x03F4, + 0x03F6, 0x07F0, 0x07F2, 0x0FEA, 0x0FEC, 0x0FEF, 0x0FF1, 0x0FF3, + 0x1FE9, 0x1FEB, 0x1FED, 0x1FEF, 0x1FF1, 0x1FF3, 0x1FF4, 0x1FF6, + 0x3FF0, 0x3FF2, 0x3FF4, 0x3FF6, 0x7FF0, 0x7FF1, 0x7FF4, 0x7FF8, + 0x7FF5, 0x7FF9, 0x7FFB, 0x7FFD, 0xFFFF, 0x0FED, +}; + +static const uint16_t clv_biasy_1_syms[] = { + 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, 0xFF80, 0xFF84, + 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, + 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, + 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, + 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, + 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, + 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, + 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, 0x0060, 0x0064, + 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, 0x0080, 0x0084, + 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x0100, +}; + +static const uint8_t clv_biasy_2_bits[] = { + 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 12, 11, + 11, 11, 10, 10, 10, 10, 9, 9, 8, 8, 8, 7, 6, 6, 4, 3, + 1, 3, 4, 6, 6, 7, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, + 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 15, +}; + +static const uint16_t clv_biasy_2_codes[] = { + 0xFFFE, 0xFFFC, 0xFFFA, 0xFFF9, 0xFFF6, 0xFFF5, 0xFFF3, 0x7FF7, + 0x7FF5, 0x7FF1, 0x7FF3, 0x7FF0, 0x7FEE, 0x7FEC, 0x7FE9, 0x7FE6, + 0x7FE4, 0x7FE2, 0x3FEF, 0x3FEE, 0x3FEC, 0x3FEA, 0x1FF2, 0x1FF1, + 0x1FEF, 0x1FED, 0x0FF4, 0x0FF3, 0x0FF1, 0x0FEF, 0x0FED, 0x07F4, + 0x07F3, 0x07F1, 0x03F6, 0x03F4, 0x03F2, 0x03F0, 0x01F6, 0x01F4, + 0x00F8, 0x00F6, 0x00F4, 0x0078, 0x003A, 0x0038, 0x000C, 0x0004, + 0x0000, 0x0005, 0x000D, 0x0039, 0x003B, 0x0079, 0x00F5, 0x00F7, + 0x00F9, 0x01F5, 0x01F7, 0x03F1, 0x03F3, 0x03F5, 0x03F7, 0x07F0, + 0x07F2, 0x07F5, 0x0FEC, 0x0FEE, 0x0FF0, 0x0FF2, 0x0FF5, 0x1FEC, + 0x1FEE, 0x1FF0, 0x1FF3, 0x1FF4, 0x3FEB, 0x3FED, 0x3FF0, 0x7FE3, + 0x7FE5, 0x7FE7, 0x7FEA, 0x7FEB, 0x7FED, 0x7FEF, 0x7FF4, 0x7FF2, + 0x7FF6, 0x7FF8, 0xFFF2, 0xFFF4, 0xFFF7, 0xFFF8, 0xFFFB, 0xFFFD, + 0xFFFF, 0x7FE8, +}; + +static const uint16_t clv_biasy_2_syms[] = { + 0xFF40, 0xFF44, 0xFF48, 0xFF4C, 0xFF50, 0xFF54, 0xFF58, 0xFF5C, + 0xFF60, 0xFF64, 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, + 0xFF80, 0xFF84, 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, + 0xFFA0, 0xFFA4, 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, + 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, + 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, + 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, + 0x0020, 0x0024, 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, + 0x0040, 0x0044, 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, + 0x0060, 0x0064, 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, + 0x0080, 0x0084, 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x009C, + 0x00A0, 0x00A4, 0x00A8, 0x00AC, 0x00B0, 0x00B4, 0x00B8, 0x00BC, + 0x00C0, 0x0100, +}; + +static const uint8_t clv_biasy_3_bits[] = { + 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, + 14, 14, 13, 13, 13, 13, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, + 10, 9, 9, 9, 9, 8, 8, 7, 7, 6, 5, 4, 4, 2, 2, 3, + 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, + 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 15, +}; + +static const uint16_t clv_biasy_3_codes[] = { + 0xFFFF, 0xFFFC, 0xFFFA, 0x7FFC, 0x7FF9, 0x7FF6, 0x7FF4, 0x7FF2, + 0x7FF1, 0x7FEF, 0x7FEC, 0x7FEB, 0x7FE9, 0x3FF3, 0x3FF0, 0x3FEE, + 0x3FED, 0x3FEA, 0x1FF3, 0x1FF2, 0x1FF0, 0x1FEE, 0x0FF4, 0x0FF3, + 0x0FF1, 0x07F7, 0x07F5, 0x07F3, 0x07F1, 0x03F7, 0x03F4, 0x03F2, + 0x03F0, 0x01F6, 0x01F4, 0x01F2, 0x01F0, 0x00F6, 0x00F4, 0x0078, + 0x0076, 0x0039, 0x001B, 0x000C, 0x000A, 0x0001, 0x0000, 0x0004, + 0x000B, 0x001A, 0x0038, 0x003A, 0x0077, 0x0079, 0x00F5, 0x00F7, + 0x01F1, 0x01F3, 0x01F5, 0x01F7, 0x03F1, 0x03F3, 0x03F5, 0x03F6, + 0x07F0, 0x07F2, 0x07F4, 0x07F6, 0x0FF0, 0x0FF2, 0x0FF5, 0x0FF6, + 0x1FEF, 0x1FF1, 0x1FF4, 0x3FEB, 0x3FEC, 0x3FEF, 0x3FF1, 0x3FF2, + 0x7FE8, 0x7FEA, 0x7FED, 0x7FEE, 0x7FF0, 0x7FF3, 0x7FF5, 0x7FF7, + 0x7FFA, 0x7FFB, 0xFFFB, 0xFFFD, 0xFFFE, 0x7FF8, +}; + +static const uint16_t clv_biasy_3_syms[] = { + 0xFF48, 0xFF4C, 0xFF50, 0xFF54, 0xFF58, 0xFF5C, 0xFF60, 0xFF64, + 0xFF68, 0xFF6C, 0xFF70, 0xFF74, 0xFF78, 0xFF7C, 0xFF80, 0xFF84, + 0xFF88, 0xFF8C, 0xFF90, 0xFF94, 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, + 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, + 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, + 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, + 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, + 0x0028, 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, + 0x0048, 0x004C, 0x0050, 0x0054, 0x0058, 0x005C, 0x0060, 0x0064, + 0x0068, 0x006C, 0x0070, 0x0074, 0x0078, 0x007C, 0x0080, 0x0084, + 0x0088, 0x008C, 0x0090, 0x0094, 0x0098, 0x009C, 0x00A0, 0x00A4, + 0x00A8, 0x00AC, 0x00B0, 0x00B4, 0x00B8, 0x0100, +}; + +static const uint8_t clv_biasu_1_bits[] = { + 16, 15, 14, 13, 13, 13, 12, 12, 12, 12, 11, 10, 10, 9, 9, 8, + 7, 6, 5, 2, 1, 3, 5, 7, 7, 8, 9, 9, 10, 10, 11, 12, + 12, 12, 12, 13, 13, 13, 14, 15, 15, 16, +}; + +static const uint16_t clv_biasu_1_codes[] = { + 0xFFFE, 0x7FFC, 0x3FFC, 0x1FFC, 0x1FFA, 0x1FF9, 0x0FFA, 0x0FF7, + 0x0FF8, 0x0FF5, 0x07F8, 0x03FA, 0x03F8, 0x01FA, 0x01F9, 0x00FA, + 0x007B, 0x003C, 0x001C, 0x0002, 0x0000, 0x0006, 0x001D, 0x007A, + 0x007C, 0x00FB, 0x01F8, 0x01FB, 0x03F9, 0x03FB, 0x07F9, 0x0FF4, + 0x0FF6, 0x0FF9, 0x0FFB, 0x1FF8, 0x1FFB, 0x1FFD, 0x3FFD, 0x7FFD, + 0x7FFE, 0xFFFF, +}; + +static const uint16_t clv_biasu_1_syms[] = { + 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, + 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, + 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, + 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, + 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, + 0x0050, 0x0100, +}; + +static const uint8_t clv_biasu_2_bits[] = { + 16, 16, 16, 16, 15, 15, 15, 14, 14, 14, 13, 12, 12, 11, 11, 10, + 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 1, 3, 4, 6, 6, 7, + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 14, 14, 14, 15, 15, + 15, 16, 16, 16, 16, 14, +}; + +static const uint16_t clv_biasu_2_codes[] = { + 0xFFFC, 0xFFF8, 0xFFFA, 0xFFFD, 0x7FF8, 0x7FFA, 0x7FF7, 0x3FF6, + 0x3FF7, 0x3FF4, 0x1FF9, 0x0FFB, 0x0FF9, 0x07FB, 0x07F9, 0x03FA, + 0x03F8, 0x01FA, 0x01F9, 0x00FB, 0x00F9, 0x007B, 0x003B, 0x001C, + 0x000C, 0x0004, 0x0000, 0x0005, 0x000D, 0x003A, 0x003C, 0x007A, + 0x00F8, 0x00FA, 0x01F8, 0x01FB, 0x03F9, 0x03FB, 0x07F8, 0x07FA, + 0x0FF8, 0x0FFA, 0x1FF8, 0x3FF5, 0x3FF8, 0x3FF9, 0x7FFB, 0x7FF9, + 0x7FF6, 0xFFF9, 0xFFFF, 0xFFFE, 0xFFFB, 0x3FFA, +}; + +static const uint16_t clv_biasu_2_syms[] = { + 0xFF98, 0xFF9C, 0xFFA0, 0xFFA4, 0xFFA8, 0xFFAC, 0xFFB0, 0xFFB4, + 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, 0xFFD0, 0xFFD4, + 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, 0xFFF0, 0xFFF4, + 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, + 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, 0x0030, 0x0034, + 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, 0x0050, 0x0054, + 0x0058, 0x005C, 0x0060, 0x0064, 0x0068, 0x0100, +}; + +static const uint8_t clv_biasv_1_bits[] = { + 16, 15, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 9, 8, + 7, 6, 5, 2, 1, 3, 5, 6, 8, 8, 9, 10, 10, 11, 12, 12, + 12, 13, 13, 13, 14, 14, 15, 15, 16, 14, +}; + +static const uint16_t clv_biasv_1_codes[] = { + 0xFFFF, 0x7FFD, 0x3FFD, 0x3FFB, 0x3FF9, 0x1FFB, 0x1FF8, 0x1FF6, + 0x0FFA, 0x0FF8, 0x07FA, 0x07F8, 0x03FA, 0x03F8, 0x01FB, 0x00FB, + 0x007C, 0x003C, 0x001C, 0x0002, 0x0000, 0x0006, 0x001D, 0x003D, + 0x00FA, 0x00FC, 0x01FA, 0x03F9, 0x03FB, 0x07F9, 0x0FF6, 0x0FF7, + 0x0FF9, 0x1FF7, 0x1FF9, 0x1FFA, 0x3FFA, 0x3FFC, 0x7FFC, 0x7FFE, + 0xFFFE, 0x3FF8, +}; + +static const uint16_t clv_biasv_1_syms[] = { + 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, 0xFFCC, + 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, 0xFFEC, + 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, 0x000C, + 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, 0x002C, + 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, 0x004C, + 0x0050, 0x0100, +}; + +static const uint8_t clv_biasv_2_bits[] = { + 16, 15, 14, 13, 13, 13, 13, 13, 12, 12, 11, 10, 10, 9, 9, 8, + 7, 6, 5, 4, 3, 1, 3, 4, 5, 7, 7, 8, 9, 9, 10, 10, + 10, 12, 12, 13, 13, 13, 13, 13, 14, 16, 15, 15, +}; + +static const uint16_t clv_biasv_2_codes[] = { + 0xFFFE, 0x7FFD, 0x3FFC, 0x1FFC, 0x1FFB, 0x1FF8, 0x1FF7, 0x1FF4, + 0x0FF8, 0x0FF7, 0x07FA, 0x03FB, 0x03F8, 0x01FA, 0x01F9, 0x00FA, + 0x007B, 0x003C, 0x001C, 0x000C, 0x0004, 0x0000, 0x0005, 0x000D, + 0x001D, 0x007A, 0x007C, 0x00FB, 0x01F8, 0x01FB, 0x03F9, 0x03FA, + 0x03FC, 0x0FF6, 0x0FF9, 0x1FF5, 0x1FF9, 0x1FF6, 0x1FFA, 0x1FFD, + 0x3FFD, 0xFFFF, 0x7FFE, 0x7FFC, +}; + +static const uint16_t clv_biasv_2_syms[] = { + 0xFFAC, 0xFFB0, 0xFFB4, 0xFFB8, 0xFFBC, 0xFFC0, 0xFFC4, 0xFFC8, + 0xFFCC, 0xFFD0, 0xFFD4, 0xFFD8, 0xFFDC, 0xFFE0, 0xFFE4, 0xFFE8, + 0xFFEC, 0xFFF0, 0xFFF4, 0xFFF8, 0xFFFC, 0x0000, 0x0004, 0x0008, + 0x000C, 0x0010, 0x0014, 0x0018, 0x001C, 0x0020, 0x0024, 0x0028, + 0x002C, 0x0030, 0x0034, 0x0038, 0x003C, 0x0040, 0x0044, 0x0048, + 0x004C, 0x0050, 0x0054, 0x0100, +}; + +#endif /* AVCODEC_CLEARVIDEODATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec.h new file mode 100644 index 00000000..1fda619e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec.h @@ -0,0 +1,462 @@ +/* + * AVCodec public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CODEC_H +#define AVCODEC_CODEC_H + +#include + +#include "libavutil/avutil.h" +#include "libavutil/hwcontext.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "libavutil/samplefmt.h" + +#include "libavcodec/codec_id.h" +#include "libavcodec/version.h" + +/** + * @addtogroup lavc_core + * @{ + */ + +/** + * Decoder can use draw_horiz_band callback. + */ +#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0) +/** + * Codec uses get_buffer() for allocating buffers and supports custom allocators. + * If not set, it might not use get_buffer() at all or use operations that + * assume the buffer was allocated by avcodec_default_get_buffer. + */ +#define AV_CODEC_CAP_DR1 (1 << 1) +#define AV_CODEC_CAP_TRUNCATED (1 << 3) +/** + * Encoder or decoder requires flushing with NULL input at the end in order to + * give the complete and correct output. + * + * NOTE: If this flag is not set, the codec is guaranteed to never be fed with + * with NULL data. The user can still send NULL data to the public encode + * or decode function, but libavcodec will not pass it along to the codec + * unless this flag is set. + * + * Decoders: + * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL, + * avpkt->size=0 at the end to get the delayed data until the decoder no longer + * returns frames. + * + * Encoders: + * The encoder needs to be fed with NULL data at the end of encoding until the + * encoder no longer returns data. + * + * NOTE: For encoders implementing the AVCodec.encode2() function, setting this + * flag also means that the encoder must set the pts and duration for + * each output packet. If this flag is not set, the pts and duration will + * be determined by libavcodec from the input frame. + */ +#define AV_CODEC_CAP_DELAY (1 << 5) +/** + * Codec can be fed a final frame with a smaller size. + * This can be used to prevent truncation of the last audio samples. + */ +#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6) + +/** + * Codec can output multiple frames per AVPacket + * Normally demuxers return one frame at a time, demuxers which do not do + * are connected to a parser to split what they return into proper frames. + * This flag is reserved to the very rare category of codecs which have a + * bitstream that cannot be split into frames without timeconsuming + * operations like full decoding. Demuxers carrying such bitstreams thus + * may return multiple frames in a packet. This has many disadvantages like + * prohibiting stream copy in many cases thus it should only be considered + * as a last resort. + */ +#define AV_CODEC_CAP_SUBFRAMES (1 << 8) +/** + * Codec is experimental and is thus avoided in favor of non experimental + * encoders + */ +#define AV_CODEC_CAP_EXPERIMENTAL (1 << 9) +/** + * Codec should fill in channel configuration and samplerate instead of container + */ +#define AV_CODEC_CAP_CHANNEL_CONF (1 << 10) +/** + * Codec supports frame-level multithreading. + */ +#define AV_CODEC_CAP_FRAME_THREADS (1 << 12) +/** + * Codec supports slice-based (or partition-based) multithreading. + */ +#define AV_CODEC_CAP_SLICE_THREADS (1 << 13) +/** + * Codec supports changed parameters at any point. + */ +#define AV_CODEC_CAP_PARAM_CHANGE (1 << 14) +/** + * Codec supports avctx->thread_count == 0 (auto). + */ +#define AV_CODEC_CAP_AUTO_THREADS (1 << 15) +/** + * Audio encoder supports receiving a different number of samples in each call. + */ +#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16) +/** + * Decoder is not a preferred choice for probing. + * This indicates that the decoder is not a good choice for probing. + * It could for example be an expensive to spin up hardware decoder, + * or it could simply not provide a lot of useful information about + * the stream. + * A decoder marked with this flag should only be used as last resort + * choice for probing. + */ +#define AV_CODEC_CAP_AVOID_PROBING (1 << 17) + +#if FF_API_UNUSED_CODEC_CAPS +/** + * Deprecated and unused. Use AVCodecDescriptor.props instead + */ +#define AV_CODEC_CAP_INTRA_ONLY 0x40000000 +/** + * Deprecated and unused. Use AVCodecDescriptor.props instead + */ +#define AV_CODEC_CAP_LOSSLESS 0x80000000 +#endif + +/** + * Codec is backed by a hardware implementation. Typically used to + * identify a non-hwaccel hardware decoder. For information about hwaccels, use + * avcodec_get_hw_config() instead. + */ +#define AV_CODEC_CAP_HARDWARE (1 << 18) + +/** + * Codec is potentially backed by a hardware implementation, but not + * necessarily. This is used instead of AV_CODEC_CAP_HARDWARE, if the + * implementation provides some sort of internal fallback. + */ +#define AV_CODEC_CAP_HYBRID (1 << 19) + +/** + * This codec takes the reordered_opaque field from input AVFrames + * and returns it in the corresponding field in AVCodecContext after + * encoding. + */ +#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20) + +/** + * This encoder can be flushed using avcodec_flush_buffers(). If this flag is + * not set, the encoder must be closed and reopened to ensure that no frames + * remain pending. + */ +#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21) + +/** + * AVProfile. + */ +typedef struct AVProfile { + int profile; + const char *name; ///< short name for the profile +} AVProfile; + +typedef struct AVCodecDefault AVCodecDefault; + +struct AVCodecContext; +struct AVSubtitle; +struct AVPacket; + +/** + * AVCodec. + */ +typedef struct AVCodec { + /** + * Name of the codec implementation. + * The name is globally unique among encoders and among decoders (but an + * encoder and a decoder can share the same name). + * This is the primary way to find a codec from the user perspective. + */ + const char *name; + /** + * Descriptive name for the codec, meant to be more human readable than name. + * You should use the NULL_IF_CONFIG_SMALL() macro to define it. + */ + const char *long_name; + enum AVMediaType type; + enum AVCodecID id; + /** + * Codec capabilities. + * see AV_CODEC_CAP_* + */ + int capabilities; + const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0} + const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1 + const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 + const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 + const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 + uint8_t max_lowres; ///< maximum value for lowres supported by the decoder + const AVClass *priv_class; ///< AVClass for the private context + const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} + + /** + * Group name of the codec implementation. + * This is a short symbolic name of the wrapper backing this codec. A + * wrapper uses some kind of external implementation for the codec, such + * as an external library, or a codec implementation provided by the OS or + * the hardware. + * If this field is NULL, this is a builtin, libavcodec native codec. + * If non-NULL, this will be the suffix in AVCodec.name in most cases + * (usually AVCodec.name will be of the form "_"). + */ + const char *wrapper_name; + + /***************************************************************** + * No fields below this line are part of the public API. They + * may not be used outside of libavcodec and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + int priv_data_size; + struct AVCodec *next; + /** + * @name Frame-level threading support functions + * @{ + */ + /** + * Copy necessary context variables from a previous thread context to the current one. + * If not defined, the next thread will start automatically; otherwise, the codec + * must call ff_thread_finish_setup(). + * + * dst and src will (rarely) point to the same context, in which case memcpy should be skipped. + */ + int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src); + /** @} */ + + /** + * Private codec-specific defaults. + */ + const AVCodecDefault *defaults; + + /** + * Initialize codec static data, called from avcodec_register(). + * + * This is not intended for time consuming operations as it is + * run for every codec regardless of that codec being used. + */ + void (*init_static_data)(struct AVCodec *codec); + + int (*init)(struct AVCodecContext *); + int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size, + const struct AVSubtitle *sub); + /** + * Encode data to an AVPacket. + * + * @param avctx codec context + * @param avpkt output AVPacket (may contain a user-provided buffer) + * @param[in] frame AVFrame containing the raw data to be encoded + * @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a + * non-empty packet was returned in avpkt. + * @return 0 on success, negative error code on failure + */ + int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt, + const struct AVFrame *frame, int *got_packet_ptr); + int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt); + int (*close)(struct AVCodecContext *); + /** + * Encode API with decoupled packet/frame dataflow. The API is the + * same as the avcodec_ prefixed APIs (avcodec_send_frame() etc.), except + * that: + * - never called if the codec is closed or the wrong type, + * - if AV_CODEC_CAP_DELAY is not set, drain frames are never sent, + * - only one drain frame is ever passed down, + */ + int (*send_frame)(struct AVCodecContext *avctx, const struct AVFrame *frame); + int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt); + + /** + * Decode API with decoupled packet/frame dataflow. This function is called + * to get one output frame. It should call ff_decode_get_packet() to obtain + * input data. + */ + int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame); + /** + * Flush buffers. + * Will be called when seeking + */ + void (*flush)(struct AVCodecContext *); + /** + * Internal codec capabilities. + * See FF_CODEC_CAP_* in internal.h + */ + int caps_internal; + + /** + * Decoding only, a comma-separated list of bitstream filters to apply to + * packets before decoding. + */ + const char *bsfs; + + /** + * Array of pointers to hardware configurations supported by the codec, + * or NULL if no hardware supported. The array is terminated by a NULL + * pointer. + * + * The user can only access this field via avcodec_get_hw_config(). + */ + const struct AVCodecHWConfigInternal **hw_configs; + + /** + * List of supported codec_tags, terminated by FF_CODEC_TAGS_END. + */ + const uint32_t *codec_tags; +} AVCodec; + +/** + * Iterate over all registered codecs. + * + * @param opaque a pointer where libavcodec will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered codec or NULL when the iteration is + * finished + */ +const AVCodec *av_codec_iterate(void **opaque); + +/** + * Find a registered decoder with a matching codec ID. + * + * @param id AVCodecID of the requested decoder + * @return A decoder if one was found, NULL otherwise. + */ +AVCodec *avcodec_find_decoder(enum AVCodecID id); + +/** + * Find a registered decoder with the specified name. + * + * @param name name of the requested decoder + * @return A decoder if one was found, NULL otherwise. + */ +AVCodec *avcodec_find_decoder_by_name(const char *name); + +/** + * Find a registered encoder with a matching codec ID. + * + * @param id AVCodecID of the requested encoder + * @return An encoder if one was found, NULL otherwise. + */ +AVCodec *avcodec_find_encoder(enum AVCodecID id); + +/** + * Find a registered encoder with the specified name. + * + * @param name name of the requested encoder + * @return An encoder if one was found, NULL otherwise. + */ +AVCodec *avcodec_find_encoder_by_name(const char *name); +/** + * @return a non-zero number if codec is an encoder, zero otherwise + */ +int av_codec_is_encoder(const AVCodec *codec); + +/** + * @return a non-zero number if codec is a decoder, zero otherwise + */ +int av_codec_is_decoder(const AVCodec *codec); + +enum { + /** + * The codec supports this format via the hw_device_ctx interface. + * + * When selecting this format, AVCodecContext.hw_device_ctx should + * have been set to a device of the specified type before calling + * avcodec_open2(). + */ + AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX = 0x01, + /** + * The codec supports this format via the hw_frames_ctx interface. + * + * When selecting this format for a decoder, + * AVCodecContext.hw_frames_ctx should be set to a suitable frames + * context inside the get_format() callback. The frames context + * must have been created on a device of the specified type. + * + * When selecting this format for an encoder, + * AVCodecContext.hw_frames_ctx should be set to the context which + * will be used for the input frames before calling avcodec_open2(). + */ + AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX = 0x02, + /** + * The codec supports this format by some internal method. + * + * This format can be selected without any additional configuration - + * no device or frames context is required. + */ + AV_CODEC_HW_CONFIG_METHOD_INTERNAL = 0x04, + /** + * The codec supports this format by some ad-hoc method. + * + * Additional settings and/or function calls are required. See the + * codec-specific documentation for details. (Methods requiring + * this sort of configuration are deprecated and others should be + * used in preference.) + */ + AV_CODEC_HW_CONFIG_METHOD_AD_HOC = 0x08, +}; + +typedef struct AVCodecHWConfig { + /** + * For decoders, a hardware pixel format which that decoder may be + * able to decode to if suitable hardware is available. + * + * For encoders, a pixel format which the encoder may be able to + * accept. If set to AV_PIX_FMT_NONE, this applies to all pixel + * formats supported by the codec. + */ + enum AVPixelFormat pix_fmt; + /** + * Bit set of AV_CODEC_HW_CONFIG_METHOD_* flags, describing the possible + * setup methods which can be used with this configuration. + */ + int methods; + /** + * The device type associated with the configuration. + * + * Must be set for AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX and + * AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX, otherwise unused. + */ + enum AVHWDeviceType device_type; +} AVCodecHWConfig; + +/** + * Retrieve supported hardware configurations for a codec. + * + * Values of index from zero to some maximum return the indexed configuration + * descriptor; all other values return NULL. If the codec does not support + * any hardware configurations then it will always return NULL. + */ +const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index); + +/** + * @} + */ + +#endif /* AVCODEC_CODEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec2utils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec2utils.h new file mode 100644 index 00000000..6def4d4a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec2utils.h @@ -0,0 +1,82 @@ +/* + * codec2 utility functions + * Copyright (c) 2017 Tomas Härdin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CODEC2UTILS_H +#define AVCODEC_CODEC2UTILS_H + +#include + +//Highest mode we're willing to use. +//Don't want to let users accidentally produce files that can't be decoded in the future. +//CODEC2_MODE_WB (9) is experimental/unstable as of 2017-11-23. +#define AVPRIV_CODEC2_MODE_MAX 8 //CODEC2_MODE_700C + +//Used by both codec2raw demuxer and libcodec2 encoder. +//The integers match the values in codec2.h, so "3200" -> CODEC2_MODE_3000 = 0 and so on. +//It is possible that we're linked to a version of libcodec2 that lacks some of these modes. +//For example Debian stretch ships with libcodec2.so.0.4 which lacks CODEC2_MODE_700C. +#define AVPRIV_CODEC2_AVOPTIONS(desc, classname, min_val, default_val, option_flags) \ + { "mode", desc, offsetof(classname, mode), AV_OPT_TYPE_INT, {.i64 = default_val}, min_val, AVPRIV_CODEC2_MODE_MAX, .flags=option_flags, .unit="codec2_mode"},\ + { "3200", "3200", 0, AV_OPT_TYPE_CONST, {.i64 = 0}, .flags=option_flags, .unit="codec2_mode"},\ + { "2400", "2400", 0, AV_OPT_TYPE_CONST, {.i64 = 1}, .flags=option_flags, .unit="codec2_mode"},\ + { "1600", "1600", 0, AV_OPT_TYPE_CONST, {.i64 = 2}, .flags=option_flags, .unit="codec2_mode"},\ + { "1400", "1400", 0, AV_OPT_TYPE_CONST, {.i64 = 3}, .flags=option_flags, .unit="codec2_mode"},\ + { "1300", "1300", 0, AV_OPT_TYPE_CONST, {.i64 = 4}, .flags=option_flags, .unit="codec2_mode"},\ + { "1200", "1200", 0, AV_OPT_TYPE_CONST, {.i64 = 5}, .flags=option_flags, .unit="codec2_mode"},\ + { "700", "700", 0, AV_OPT_TYPE_CONST, {.i64 = 6}, .flags=option_flags, .unit="codec2_mode"},\ + { "700B", "700B", 0, AV_OPT_TYPE_CONST, {.i64 = 7}, .flags=option_flags, .unit="codec2_mode"},\ + { "700C", "700C", 0, AV_OPT_TYPE_CONST, {.i64 = 8}, .flags=option_flags, .unit="codec2_mode"} + +//The three following functions are here to avoid needing libavformat/codec2.c to depend on libcodec2 + +//Computes bitrate from mode, with frames rounded up to the nearest octet. +//So 700 bit/s (28 bits/frame) becomes 800 bits/s (32 bits/frame). +//logctx is used for av_log() +//Returns <0 if mode is invalid +int avpriv_codec2_mode_bit_rate(void *logctx, int mode); + +//Mimics codec2_samples_per_frame() +int avpriv_codec2_mode_frame_size(void *logctx, int mode); + +//Mimics (codec2_bits_per_frame()+7)/8 +int avpriv_codec2_mode_block_align(void *logctx, int mode); + +#define AVPRIV_CODEC2_EXTRADATA_SIZE 4 + +//Used in codec2raw demuxer and libcodec2 encoder +static inline void avpriv_codec2_make_extradata(uint8_t *ptr, int mode) { + //version 0.8 as of 2017-12-23 (r3386) + ptr[0] = 0; //major + ptr[1] = 8; //minor + ptr[2] = mode; //mode + ptr[3] = 0; //flags +} + +//Returns version as a 16-bit value. 0.8 -> 0x0008 +static inline uint16_t avpriv_codec2_version_from_extradata(uint8_t *ptr) { + return (ptr[0] << 8) + ptr[1]; +} + +static inline uint8_t avpriv_codec2_mode_from_extradata(uint8_t *ptr) { + return ptr[2]; +} + +#endif /* AVCODEC_CODEC2UTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_desc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_desc.h new file mode 100644 index 00000000..126b52df --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_desc.h @@ -0,0 +1,128 @@ +/* + * Codec descriptors public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CODEC_DESC_H +#define AVCODEC_CODEC_DESC_H + +#include "libavutil/avutil.h" + +#include "codec_id.h" + +/** + * @addtogroup lavc_core + * @{ + */ + +/** + * This struct describes the properties of a single codec described by an + * AVCodecID. + * @see avcodec_descriptor_get() + */ +typedef struct AVCodecDescriptor { + enum AVCodecID id; + enum AVMediaType type; + /** + * Name of the codec described by this descriptor. It is non-empty and + * unique for each codec descriptor. It should contain alphanumeric + * characters and '_' only. + */ + const char *name; + /** + * A more descriptive name for this codec. May be NULL. + */ + const char *long_name; + /** + * Codec properties, a combination of AV_CODEC_PROP_* flags. + */ + int props; + /** + * MIME type(s) associated with the codec. + * May be NULL; if not, a NULL-terminated array of MIME types. + * The first item is always non-NULL and is the preferred MIME type. + */ + const char *const *mime_types; + /** + * If non-NULL, an array of profiles recognized for this codec. + * Terminated with FF_PROFILE_UNKNOWN. + */ + const struct AVProfile *profiles; +} AVCodecDescriptor; + +/** + * Codec uses only intra compression. + * Video and audio codecs only. + */ +#define AV_CODEC_PROP_INTRA_ONLY (1 << 0) +/** + * Codec supports lossy compression. Audio and video codecs only. + * @note a codec may support both lossy and lossless + * compression modes + */ +#define AV_CODEC_PROP_LOSSY (1 << 1) +/** + * Codec supports lossless compression. Audio and video codecs only. + */ +#define AV_CODEC_PROP_LOSSLESS (1 << 2) +/** + * Codec supports frame reordering. That is, the coded order (the order in which + * the encoded packets are output by the encoders / stored / input to the + * decoders) may be different from the presentation order of the corresponding + * frames. + * + * For codecs that do not have this property set, PTS and DTS should always be + * equal. + */ +#define AV_CODEC_PROP_REORDER (1 << 3) +/** + * Subtitle codec is bitmap based + * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field. + */ +#define AV_CODEC_PROP_BITMAP_SUB (1 << 16) +/** + * Subtitle codec is text based. + * Decoded AVSubtitle data can be read from the AVSubtitleRect->ass field. + */ +#define AV_CODEC_PROP_TEXT_SUB (1 << 17) + +/** + * @return descriptor for given codec ID or NULL if no descriptor exists. + */ +const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id); + +/** + * Iterate over all codec descriptors known to libavcodec. + * + * @param prev previous descriptor. NULL to get the first descriptor. + * + * @return next descriptor or NULL after the last descriptor + */ +const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev); + +/** + * @return codec descriptor with the given name or NULL if no such descriptor + * exists. + */ +const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name); + +/** + * @} + */ + +#endif // AVCODEC_CODEC_DESC_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_id.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_id.h new file mode 100644 index 00000000..d885962c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_id.h @@ -0,0 +1,577 @@ +/* + * Codec IDs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CODEC_ID_H +#define AVCODEC_CODEC_ID_H + +#include "libavutil/avutil.h" + +/** + * @addtogroup lavc_core + * @{ + */ + +/** + * Identify the syntax and semantics of the bitstream. + * The principle is roughly: + * Two decoders with the same ID can decode the same streams. + * Two encoders with the same ID can encode compatible streams. + * There may be slight deviations from the principle due to implementation + * details. + * + * If you add a codec ID to this list, add it so that + * 1. no value of an existing codec ID changes (that would break ABI), + * 2. it is as close as possible to similar codecs + * + * After adding new codec IDs, do not forget to add an entry to the codec + * descriptor list and bump libavcodec minor version. + */ +enum AVCodecID { + AV_CODEC_ID_NONE, + + /* video codecs */ + AV_CODEC_ID_MPEG1VIDEO, + AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding + AV_CODEC_ID_H261, + AV_CODEC_ID_H263, + AV_CODEC_ID_RV10, + AV_CODEC_ID_RV20, + AV_CODEC_ID_MJPEG, + AV_CODEC_ID_MJPEGB, + AV_CODEC_ID_LJPEG, + AV_CODEC_ID_SP5X, + AV_CODEC_ID_JPEGLS, + AV_CODEC_ID_MPEG4, + AV_CODEC_ID_RAWVIDEO, + AV_CODEC_ID_MSMPEG4V1, + AV_CODEC_ID_MSMPEG4V2, + AV_CODEC_ID_MSMPEG4V3, + AV_CODEC_ID_WMV1, + AV_CODEC_ID_WMV2, + AV_CODEC_ID_H263P, + AV_CODEC_ID_H263I, + AV_CODEC_ID_FLV1, + AV_CODEC_ID_SVQ1, + AV_CODEC_ID_SVQ3, + AV_CODEC_ID_DVVIDEO, + AV_CODEC_ID_HUFFYUV, + AV_CODEC_ID_CYUV, + AV_CODEC_ID_H264, + AV_CODEC_ID_INDEO3, + AV_CODEC_ID_VP3, + AV_CODEC_ID_THEORA, + AV_CODEC_ID_ASV1, + AV_CODEC_ID_ASV2, + AV_CODEC_ID_FFV1, + AV_CODEC_ID_4XM, + AV_CODEC_ID_VCR1, + AV_CODEC_ID_CLJR, + AV_CODEC_ID_MDEC, + AV_CODEC_ID_ROQ, + AV_CODEC_ID_INTERPLAY_VIDEO, + AV_CODEC_ID_XAN_WC3, + AV_CODEC_ID_XAN_WC4, + AV_CODEC_ID_RPZA, + AV_CODEC_ID_CINEPAK, + AV_CODEC_ID_WS_VQA, + AV_CODEC_ID_MSRLE, + AV_CODEC_ID_MSVIDEO1, + AV_CODEC_ID_IDCIN, + AV_CODEC_ID_8BPS, + AV_CODEC_ID_SMC, + AV_CODEC_ID_FLIC, + AV_CODEC_ID_TRUEMOTION1, + AV_CODEC_ID_VMDVIDEO, + AV_CODEC_ID_MSZH, + AV_CODEC_ID_ZLIB, + AV_CODEC_ID_QTRLE, + AV_CODEC_ID_TSCC, + AV_CODEC_ID_ULTI, + AV_CODEC_ID_QDRAW, + AV_CODEC_ID_VIXL, + AV_CODEC_ID_QPEG, + AV_CODEC_ID_PNG, + AV_CODEC_ID_PPM, + AV_CODEC_ID_PBM, + AV_CODEC_ID_PGM, + AV_CODEC_ID_PGMYUV, + AV_CODEC_ID_PAM, + AV_CODEC_ID_FFVHUFF, + AV_CODEC_ID_RV30, + AV_CODEC_ID_RV40, + AV_CODEC_ID_VC1, + AV_CODEC_ID_WMV3, + AV_CODEC_ID_LOCO, + AV_CODEC_ID_WNV1, + AV_CODEC_ID_AASC, + AV_CODEC_ID_INDEO2, + AV_CODEC_ID_FRAPS, + AV_CODEC_ID_TRUEMOTION2, + AV_CODEC_ID_BMP, + AV_CODEC_ID_CSCD, + AV_CODEC_ID_MMVIDEO, + AV_CODEC_ID_ZMBV, + AV_CODEC_ID_AVS, + AV_CODEC_ID_SMACKVIDEO, + AV_CODEC_ID_NUV, + AV_CODEC_ID_KMVC, + AV_CODEC_ID_FLASHSV, + AV_CODEC_ID_CAVS, + AV_CODEC_ID_JPEG2000, + AV_CODEC_ID_VMNC, + AV_CODEC_ID_VP5, + AV_CODEC_ID_VP6, + AV_CODEC_ID_VP6F, + AV_CODEC_ID_TARGA, + AV_CODEC_ID_DSICINVIDEO, + AV_CODEC_ID_TIERTEXSEQVIDEO, + AV_CODEC_ID_TIFF, + AV_CODEC_ID_GIF, + AV_CODEC_ID_DXA, + AV_CODEC_ID_DNXHD, + AV_CODEC_ID_THP, + AV_CODEC_ID_SGI, + AV_CODEC_ID_C93, + AV_CODEC_ID_BETHSOFTVID, + AV_CODEC_ID_PTX, + AV_CODEC_ID_TXD, + AV_CODEC_ID_VP6A, + AV_CODEC_ID_AMV, + AV_CODEC_ID_VB, + AV_CODEC_ID_PCX, + AV_CODEC_ID_SUNRAST, + AV_CODEC_ID_INDEO4, + AV_CODEC_ID_INDEO5, + AV_CODEC_ID_MIMIC, + AV_CODEC_ID_RL2, + AV_CODEC_ID_ESCAPE124, + AV_CODEC_ID_DIRAC, + AV_CODEC_ID_BFI, + AV_CODEC_ID_CMV, + AV_CODEC_ID_MOTIONPIXELS, + AV_CODEC_ID_TGV, + AV_CODEC_ID_TGQ, + AV_CODEC_ID_TQI, + AV_CODEC_ID_AURA, + AV_CODEC_ID_AURA2, + AV_CODEC_ID_V210X, + AV_CODEC_ID_TMV, + AV_CODEC_ID_V210, + AV_CODEC_ID_DPX, + AV_CODEC_ID_MAD, + AV_CODEC_ID_FRWU, + AV_CODEC_ID_FLASHSV2, + AV_CODEC_ID_CDGRAPHICS, + AV_CODEC_ID_R210, + AV_CODEC_ID_ANM, + AV_CODEC_ID_BINKVIDEO, + AV_CODEC_ID_IFF_ILBM, +#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM + AV_CODEC_ID_KGV1, + AV_CODEC_ID_YOP, + AV_CODEC_ID_VP8, + AV_CODEC_ID_PICTOR, + AV_CODEC_ID_ANSI, + AV_CODEC_ID_A64_MULTI, + AV_CODEC_ID_A64_MULTI5, + AV_CODEC_ID_R10K, + AV_CODEC_ID_MXPEG, + AV_CODEC_ID_LAGARITH, + AV_CODEC_ID_PRORES, + AV_CODEC_ID_JV, + AV_CODEC_ID_DFA, + AV_CODEC_ID_WMV3IMAGE, + AV_CODEC_ID_VC1IMAGE, + AV_CODEC_ID_UTVIDEO, + AV_CODEC_ID_BMV_VIDEO, + AV_CODEC_ID_VBLE, + AV_CODEC_ID_DXTORY, + AV_CODEC_ID_V410, + AV_CODEC_ID_XWD, + AV_CODEC_ID_CDXL, + AV_CODEC_ID_XBM, + AV_CODEC_ID_ZEROCODEC, + AV_CODEC_ID_MSS1, + AV_CODEC_ID_MSA1, + AV_CODEC_ID_TSCC2, + AV_CODEC_ID_MTS2, + AV_CODEC_ID_CLLC, + AV_CODEC_ID_MSS2, + AV_CODEC_ID_VP9, + AV_CODEC_ID_AIC, + AV_CODEC_ID_ESCAPE130, + AV_CODEC_ID_G2M, + AV_CODEC_ID_WEBP, + AV_CODEC_ID_HNM4_VIDEO, + AV_CODEC_ID_HEVC, +#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC + AV_CODEC_ID_FIC, + AV_CODEC_ID_ALIAS_PIX, + AV_CODEC_ID_BRENDER_PIX, + AV_CODEC_ID_PAF_VIDEO, + AV_CODEC_ID_EXR, + AV_CODEC_ID_VP7, + AV_CODEC_ID_SANM, + AV_CODEC_ID_SGIRLE, + AV_CODEC_ID_MVC1, + AV_CODEC_ID_MVC2, + AV_CODEC_ID_HQX, + AV_CODEC_ID_TDSC, + AV_CODEC_ID_HQ_HQA, + AV_CODEC_ID_HAP, + AV_CODEC_ID_DDS, + AV_CODEC_ID_DXV, + AV_CODEC_ID_SCREENPRESSO, + AV_CODEC_ID_RSCC, + AV_CODEC_ID_AVS2, + + AV_CODEC_ID_Y41P = 0x8000, + AV_CODEC_ID_AVRP, + AV_CODEC_ID_012V, + AV_CODEC_ID_AVUI, + AV_CODEC_ID_AYUV, + AV_CODEC_ID_TARGA_Y216, + AV_CODEC_ID_V308, + AV_CODEC_ID_V408, + AV_CODEC_ID_YUV4, + AV_CODEC_ID_AVRN, + AV_CODEC_ID_CPIA, + AV_CODEC_ID_XFACE, + AV_CODEC_ID_SNOW, + AV_CODEC_ID_SMVJPEG, + AV_CODEC_ID_APNG, + AV_CODEC_ID_DAALA, + AV_CODEC_ID_CFHD, + AV_CODEC_ID_TRUEMOTION2RT, + AV_CODEC_ID_M101, + AV_CODEC_ID_MAGICYUV, + AV_CODEC_ID_SHEERVIDEO, + AV_CODEC_ID_YLC, + AV_CODEC_ID_PSD, + AV_CODEC_ID_PIXLET, + AV_CODEC_ID_SPEEDHQ, + AV_CODEC_ID_FMVC, + AV_CODEC_ID_SCPR, + AV_CODEC_ID_CLEARVIDEO, + AV_CODEC_ID_XPM, + AV_CODEC_ID_AV1, + AV_CODEC_ID_BITPACKED, + AV_CODEC_ID_MSCC, + AV_CODEC_ID_SRGC, + AV_CODEC_ID_SVG, + AV_CODEC_ID_GDV, + AV_CODEC_ID_FITS, + AV_CODEC_ID_IMM4, + AV_CODEC_ID_PROSUMER, + AV_CODEC_ID_MWSC, + AV_CODEC_ID_WCMV, + AV_CODEC_ID_RASC, + AV_CODEC_ID_HYMT, + AV_CODEC_ID_ARBC, + AV_CODEC_ID_AGM, + AV_CODEC_ID_LSCR, + AV_CODEC_ID_VP4, + AV_CODEC_ID_IMM5, + AV_CODEC_ID_MVDV, + AV_CODEC_ID_MVHA, + AV_CODEC_ID_CDTOONS, + AV_CODEC_ID_MV30, + AV_CODEC_ID_NOTCHLC, + AV_CODEC_ID_PFM, + + /* various PCM "codecs" */ + AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs + AV_CODEC_ID_PCM_S16LE = 0x10000, + AV_CODEC_ID_PCM_S16BE, + AV_CODEC_ID_PCM_U16LE, + AV_CODEC_ID_PCM_U16BE, + AV_CODEC_ID_PCM_S8, + AV_CODEC_ID_PCM_U8, + AV_CODEC_ID_PCM_MULAW, + AV_CODEC_ID_PCM_ALAW, + AV_CODEC_ID_PCM_S32LE, + AV_CODEC_ID_PCM_S32BE, + AV_CODEC_ID_PCM_U32LE, + AV_CODEC_ID_PCM_U32BE, + AV_CODEC_ID_PCM_S24LE, + AV_CODEC_ID_PCM_S24BE, + AV_CODEC_ID_PCM_U24LE, + AV_CODEC_ID_PCM_U24BE, + AV_CODEC_ID_PCM_S24DAUD, + AV_CODEC_ID_PCM_ZORK, + AV_CODEC_ID_PCM_S16LE_PLANAR, + AV_CODEC_ID_PCM_DVD, + AV_CODEC_ID_PCM_F32BE, + AV_CODEC_ID_PCM_F32LE, + AV_CODEC_ID_PCM_F64BE, + AV_CODEC_ID_PCM_F64LE, + AV_CODEC_ID_PCM_BLURAY, + AV_CODEC_ID_PCM_LXF, + AV_CODEC_ID_S302M, + AV_CODEC_ID_PCM_S8_PLANAR, + AV_CODEC_ID_PCM_S24LE_PLANAR, + AV_CODEC_ID_PCM_S32LE_PLANAR, + AV_CODEC_ID_PCM_S16BE_PLANAR, + + AV_CODEC_ID_PCM_S64LE = 0x10800, + AV_CODEC_ID_PCM_S64BE, + AV_CODEC_ID_PCM_F16LE, + AV_CODEC_ID_PCM_F24LE, + AV_CODEC_ID_PCM_VIDC, + + /* various ADPCM codecs */ + AV_CODEC_ID_ADPCM_IMA_QT = 0x11000, + AV_CODEC_ID_ADPCM_IMA_WAV, + AV_CODEC_ID_ADPCM_IMA_DK3, + AV_CODEC_ID_ADPCM_IMA_DK4, + AV_CODEC_ID_ADPCM_IMA_WS, + AV_CODEC_ID_ADPCM_IMA_SMJPEG, + AV_CODEC_ID_ADPCM_MS, + AV_CODEC_ID_ADPCM_4XM, + AV_CODEC_ID_ADPCM_XA, + AV_CODEC_ID_ADPCM_ADX, + AV_CODEC_ID_ADPCM_EA, + AV_CODEC_ID_ADPCM_G726, + AV_CODEC_ID_ADPCM_CT, + AV_CODEC_ID_ADPCM_SWF, + AV_CODEC_ID_ADPCM_YAMAHA, + AV_CODEC_ID_ADPCM_SBPRO_4, + AV_CODEC_ID_ADPCM_SBPRO_3, + AV_CODEC_ID_ADPCM_SBPRO_2, + AV_CODEC_ID_ADPCM_THP, + AV_CODEC_ID_ADPCM_IMA_AMV, + AV_CODEC_ID_ADPCM_EA_R1, + AV_CODEC_ID_ADPCM_EA_R3, + AV_CODEC_ID_ADPCM_EA_R2, + AV_CODEC_ID_ADPCM_IMA_EA_SEAD, + AV_CODEC_ID_ADPCM_IMA_EA_EACS, + AV_CODEC_ID_ADPCM_EA_XAS, + AV_CODEC_ID_ADPCM_EA_MAXIS_XA, + AV_CODEC_ID_ADPCM_IMA_ISS, + AV_CODEC_ID_ADPCM_G722, + AV_CODEC_ID_ADPCM_IMA_APC, + AV_CODEC_ID_ADPCM_VIMA, + + AV_CODEC_ID_ADPCM_AFC = 0x11800, + AV_CODEC_ID_ADPCM_IMA_OKI, + AV_CODEC_ID_ADPCM_DTK, + AV_CODEC_ID_ADPCM_IMA_RAD, + AV_CODEC_ID_ADPCM_G726LE, + AV_CODEC_ID_ADPCM_THP_LE, + AV_CODEC_ID_ADPCM_PSX, + AV_CODEC_ID_ADPCM_AICA, + AV_CODEC_ID_ADPCM_IMA_DAT4, + AV_CODEC_ID_ADPCM_MTAF, + AV_CODEC_ID_ADPCM_AGM, + AV_CODEC_ID_ADPCM_ARGO, + AV_CODEC_ID_ADPCM_IMA_SSI, + AV_CODEC_ID_ADPCM_ZORK, + AV_CODEC_ID_ADPCM_IMA_APM, + AV_CODEC_ID_ADPCM_IMA_ALP, + AV_CODEC_ID_ADPCM_IMA_MTF, + AV_CODEC_ID_ADPCM_IMA_CUNNING, + + /* AMR */ + AV_CODEC_ID_AMR_NB = 0x12000, + AV_CODEC_ID_AMR_WB, + + /* RealAudio codecs*/ + AV_CODEC_ID_RA_144 = 0x13000, + AV_CODEC_ID_RA_288, + + /* various DPCM codecs */ + AV_CODEC_ID_ROQ_DPCM = 0x14000, + AV_CODEC_ID_INTERPLAY_DPCM, + AV_CODEC_ID_XAN_DPCM, + AV_CODEC_ID_SOL_DPCM, + + AV_CODEC_ID_SDX2_DPCM = 0x14800, + AV_CODEC_ID_GREMLIN_DPCM, + AV_CODEC_ID_DERF_DPCM, + + /* audio codecs */ + AV_CODEC_ID_MP2 = 0x15000, + AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 + AV_CODEC_ID_AAC, + AV_CODEC_ID_AC3, + AV_CODEC_ID_DTS, + AV_CODEC_ID_VORBIS, + AV_CODEC_ID_DVAUDIO, + AV_CODEC_ID_WMAV1, + AV_CODEC_ID_WMAV2, + AV_CODEC_ID_MACE3, + AV_CODEC_ID_MACE6, + AV_CODEC_ID_VMDAUDIO, + AV_CODEC_ID_FLAC, + AV_CODEC_ID_MP3ADU, + AV_CODEC_ID_MP3ON4, + AV_CODEC_ID_SHORTEN, + AV_CODEC_ID_ALAC, + AV_CODEC_ID_WESTWOOD_SND1, + AV_CODEC_ID_GSM, ///< as in Berlin toast format + AV_CODEC_ID_QDM2, + AV_CODEC_ID_COOK, + AV_CODEC_ID_TRUESPEECH, + AV_CODEC_ID_TTA, + AV_CODEC_ID_SMACKAUDIO, + AV_CODEC_ID_QCELP, + AV_CODEC_ID_WAVPACK, + AV_CODEC_ID_DSICINAUDIO, + AV_CODEC_ID_IMC, + AV_CODEC_ID_MUSEPACK7, + AV_CODEC_ID_MLP, + AV_CODEC_ID_GSM_MS, /* as found in WAV */ + AV_CODEC_ID_ATRAC3, + AV_CODEC_ID_APE, + AV_CODEC_ID_NELLYMOSER, + AV_CODEC_ID_MUSEPACK8, + AV_CODEC_ID_SPEEX, + AV_CODEC_ID_WMAVOICE, + AV_CODEC_ID_WMAPRO, + AV_CODEC_ID_WMALOSSLESS, + AV_CODEC_ID_ATRAC3P, + AV_CODEC_ID_EAC3, + AV_CODEC_ID_SIPR, + AV_CODEC_ID_MP1, + AV_CODEC_ID_TWINVQ, + AV_CODEC_ID_TRUEHD, + AV_CODEC_ID_MP4ALS, + AV_CODEC_ID_ATRAC1, + AV_CODEC_ID_BINKAUDIO_RDFT, + AV_CODEC_ID_BINKAUDIO_DCT, + AV_CODEC_ID_AAC_LATM, + AV_CODEC_ID_QDMC, + AV_CODEC_ID_CELT, + AV_CODEC_ID_G723_1, + AV_CODEC_ID_G729, + AV_CODEC_ID_8SVX_EXP, + AV_CODEC_ID_8SVX_FIB, + AV_CODEC_ID_BMV_AUDIO, + AV_CODEC_ID_RALF, + AV_CODEC_ID_IAC, + AV_CODEC_ID_ILBC, + AV_CODEC_ID_OPUS, + AV_CODEC_ID_COMFORT_NOISE, + AV_CODEC_ID_TAK, + AV_CODEC_ID_METASOUND, + AV_CODEC_ID_PAF_AUDIO, + AV_CODEC_ID_ON2AVC, + AV_CODEC_ID_DSS_SP, + AV_CODEC_ID_CODEC2, + + AV_CODEC_ID_FFWAVESYNTH = 0x15800, + AV_CODEC_ID_SONIC, + AV_CODEC_ID_SONIC_LS, + AV_CODEC_ID_EVRC, + AV_CODEC_ID_SMV, + AV_CODEC_ID_DSD_LSBF, + AV_CODEC_ID_DSD_MSBF, + AV_CODEC_ID_DSD_LSBF_PLANAR, + AV_CODEC_ID_DSD_MSBF_PLANAR, + AV_CODEC_ID_4GV, + AV_CODEC_ID_INTERPLAY_ACM, + AV_CODEC_ID_XMA1, + AV_CODEC_ID_XMA2, + AV_CODEC_ID_DST, + AV_CODEC_ID_ATRAC3AL, + AV_CODEC_ID_ATRAC3PAL, + AV_CODEC_ID_DOLBY_E, + AV_CODEC_ID_APTX, + AV_CODEC_ID_APTX_HD, + AV_CODEC_ID_SBC, + AV_CODEC_ID_ATRAC9, + AV_CODEC_ID_HCOM, + AV_CODEC_ID_ACELP_KELVIN, + AV_CODEC_ID_MPEGH_3D_AUDIO, + AV_CODEC_ID_SIREN, + AV_CODEC_ID_HCA, + + /* subtitle codecs */ + AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. + AV_CODEC_ID_DVD_SUBTITLE = 0x17000, + AV_CODEC_ID_DVB_SUBTITLE, + AV_CODEC_ID_TEXT, ///< raw UTF-8 text + AV_CODEC_ID_XSUB, + AV_CODEC_ID_SSA, + AV_CODEC_ID_MOV_TEXT, + AV_CODEC_ID_HDMV_PGS_SUBTITLE, + AV_CODEC_ID_DVB_TELETEXT, + AV_CODEC_ID_SRT, + + AV_CODEC_ID_MICRODVD = 0x17800, + AV_CODEC_ID_EIA_608, + AV_CODEC_ID_JACOSUB, + AV_CODEC_ID_SAMI, + AV_CODEC_ID_REALTEXT, + AV_CODEC_ID_STL, + AV_CODEC_ID_SUBVIEWER1, + AV_CODEC_ID_SUBVIEWER, + AV_CODEC_ID_SUBRIP, + AV_CODEC_ID_WEBVTT, + AV_CODEC_ID_MPL2, + AV_CODEC_ID_VPLAYER, + AV_CODEC_ID_PJS, + AV_CODEC_ID_ASS, + AV_CODEC_ID_HDMV_TEXT_SUBTITLE, + AV_CODEC_ID_TTML, + AV_CODEC_ID_ARIB_CAPTION, + + /* other specific kind of codecs (generally used for attachments) */ + AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. + AV_CODEC_ID_TTF = 0x18000, + + AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream. + AV_CODEC_ID_EPG, + AV_CODEC_ID_BINTEXT = 0x18800, + AV_CODEC_ID_XBIN, + AV_CODEC_ID_IDF, + AV_CODEC_ID_OTF, + AV_CODEC_ID_SMPTE_KLV, + AV_CODEC_ID_DVD_NAV, + AV_CODEC_ID_TIMED_ID3, + AV_CODEC_ID_BIN_DATA, + + + AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it + + AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS + * stream (only used by libavformat) */ + AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems + * stream (only used by libavformat) */ + AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information. + AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket +}; + +/** + * Get the type of the given codec. + */ +enum AVMediaType avcodec_get_type(enum AVCodecID codec_id); + +/** + * Get the name of a codec. + * @return a static string identifying the codec; never NULL + */ +const char *avcodec_get_name(enum AVCodecID id); + +/** + * @} + */ + +#endif // AVCODEC_CODEC_ID_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_par.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_par.h new file mode 100644 index 00000000..948758e2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/codec_par.h @@ -0,0 +1,229 @@ +/* + * Codec parameters public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_CODEC_PAR_H +#define AVCODEC_CODEC_PAR_H + +#include + +#include "libavutil/avutil.h" +#include "libavutil/rational.h" +#include "libavutil/pixfmt.h" + +#include "codec_id.h" + +/** + * @addtogroup lavc_core + */ + +enum AVFieldOrder { + AV_FIELD_UNKNOWN, + AV_FIELD_PROGRESSIVE, + AV_FIELD_TT, //< Top coded_first, top displayed first + AV_FIELD_BB, //< Bottom coded first, bottom displayed first + AV_FIELD_TB, //< Top coded first, bottom displayed first + AV_FIELD_BT, //< Bottom coded first, top displayed first +}; + +/** + * This struct describes the properties of an encoded stream. + * + * sizeof(AVCodecParameters) is not a part of the public ABI, this struct must + * be allocated with avcodec_parameters_alloc() and freed with + * avcodec_parameters_free(). + */ +typedef struct AVCodecParameters { + /** + * General type of the encoded data. + */ + enum AVMediaType codec_type; + /** + * Specific type of the encoded data (the codec used). + */ + enum AVCodecID codec_id; + /** + * Additional information about the codec (corresponds to the AVI FOURCC). + */ + uint32_t codec_tag; + + /** + * Extra binary data needed for initializing the decoder, codec-dependent. + * + * Must be allocated with av_malloc() and will be freed by + * avcodec_parameters_free(). The allocated size of extradata must be at + * least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding + * bytes zeroed. + */ + uint8_t *extradata; + /** + * Size of the extradata content in bytes. + */ + int extradata_size; + + /** + * - video: the pixel format, the value corresponds to enum AVPixelFormat. + * - audio: the sample format, the value corresponds to enum AVSampleFormat. + */ + int format; + + /** + * The average bitrate of the encoded data (in bits per second). + */ + int64_t bit_rate; + + /** + * The number of bits per sample in the codedwords. + * + * This is basically the bitrate per sample. It is mandatory for a bunch of + * formats to actually decode them. It's the number of bits for one sample in + * the actual coded bitstream. + * + * This could be for example 4 for ADPCM + * For PCM formats this matches bits_per_raw_sample + * Can be 0 + */ + int bits_per_coded_sample; + + /** + * This is the number of valid bits in each output sample. If the + * sample format has more bits, the least significant bits are additional + * padding bits, which are always 0. Use right shifts to reduce the sample + * to its actual size. For example, audio formats with 24 bit samples will + * have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32. + * To get the original sample use "(int32_t)sample >> 8"." + * + * For ADPCM this might be 12 or 16 or similar + * Can be 0 + */ + int bits_per_raw_sample; + + /** + * Codec-specific bitstream restrictions that the stream conforms to. + */ + int profile; + int level; + + /** + * Video only. The dimensions of the video frame in pixels. + */ + int width; + int height; + + /** + * Video only. The aspect ratio (width / height) which a single pixel + * should have when displayed. + * + * When the aspect ratio is unknown / undefined, the numerator should be + * set to 0 (the denominator may have any value). + */ + AVRational sample_aspect_ratio; + + /** + * Video only. The order of the fields in interlaced video. + */ + enum AVFieldOrder field_order; + + /** + * Video only. Additional colorspace characteristics. + */ + enum AVColorRange color_range; + enum AVColorPrimaries color_primaries; + enum AVColorTransferCharacteristic color_trc; + enum AVColorSpace color_space; + enum AVChromaLocation chroma_location; + + /** + * Video only. Number of delayed frames. + */ + int video_delay; + + /** + * Audio only. The channel layout bitmask. May be 0 if the channel layout is + * unknown or unspecified, otherwise the number of bits set must be equal to + * the channels field. + */ + uint64_t channel_layout; + /** + * Audio only. The number of audio channels. + */ + int channels; + /** + * Audio only. The number of audio samples per second. + */ + int sample_rate; + /** + * Audio only. The number of bytes per coded audio frame, required by some + * formats. + * + * Corresponds to nBlockAlign in WAVEFORMATEX. + */ + int block_align; + /** + * Audio only. Audio frame size, if known. Required by some formats to be static. + */ + int frame_size; + + /** + * Audio only. The amount of padding (in samples) inserted by the encoder at + * the beginning of the audio. I.e. this number of leading decoded samples + * must be discarded by the caller to get the original audio without leading + * padding. + */ + int initial_padding; + /** + * Audio only. The amount of padding (in samples) appended by the encoder to + * the end of the audio. I.e. this number of decoded samples must be + * discarded by the caller from the end of the stream to get the original + * audio without any trailing padding. + */ + int trailing_padding; + /** + * Audio only. Number of samples to skip after a discontinuity. + */ + int seek_preroll; +} AVCodecParameters; + +/** + * Allocate a new AVCodecParameters and set its fields to default values + * (unknown/invalid/0). The returned struct must be freed with + * avcodec_parameters_free(). + */ +AVCodecParameters *avcodec_parameters_alloc(void); + +/** + * Free an AVCodecParameters instance and everything associated with it and + * write NULL to the supplied pointer. + */ +void avcodec_parameters_free(AVCodecParameters **par); + +/** + * Copy the contents of src to dst. Any allocated fields in dst are freed and + * replaced with newly allocated duplicates of the corresponding fields in src. + * + * @return >= 0 on success, a negative AVERROR code on failure. + */ +int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src); + + +/** + * @} + */ + +#endif // AVCODEC_CODEC_PAR_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cookdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cookdata.h new file mode 100644 index 00000000..efb8a539 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/cookdata.h @@ -0,0 +1,581 @@ +/* + * COOK compatible decoder data + * Copyright (c) 2003 Sascha Sommer + * Copyright (c) 2005 Benjamin Larsson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Cook AKA RealAudio G2 compatible decoder data + */ + +#ifndef AVCODEC_COOKDATA_H +#define AVCODEC_COOKDATA_H + +#include + +/* various data tables */ + +static const int expbits_tab[8] = { + 52,47,43,37,29,22,16,0, +}; + +static const float dither_tab[9] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.176777, 0.25, 0.707107, 1.0 +}; + +static const float quant_centroid_tab[7][14] = { + { 0.000, 0.392, 0.761, 1.120, 1.477, 1.832, 2.183, 2.541, 2.893, 3.245, 3.598, 3.942, 4.288, 4.724 }, + { 0.000, 0.544, 1.060, 1.563, 2.068, 2.571, 3.072, 3.562, 4.070, 4.620, 0.000, 0.000, 0.000, 0.000 }, + { 0.000, 0.746, 1.464, 2.180, 2.882, 3.584, 4.316, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 }, + { 0.000, 1.006, 2.000, 2.993, 3.985, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 }, + { 0.000, 1.321, 2.703, 3.983, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 }, + { 0.000, 1.657, 3.491, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 }, + { 0.000, 1.964, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 } +}; + +static const int invradix_tab[7] = { + 74899, 104858, 149797, 209716, 262144, 349526, 524288, +}; + +static const int kmax_tab[7] = { + 13, 9, 6, 4, 3, 2, 1, +}; + +static const int vd_tab[7] = { + 2, 2, 2, 4, 4, 5, 5, +}; + +static const int vpr_tab[7] = { + 10, 10, 10, 5, 5, 4, 4, +}; + + + +/* VLC data */ + +static const int vhsize_tab[7] = { + 191, 97, 48, 607, 246, 230, 32, +}; + +static const int vhvlcsize_tab[7] = { + 8, 7, 7, 10, 9, 9, 6, +}; + +static const uint8_t envelope_quant_index_huffbits[13][24] = { + { 4, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 5, 7, 8, 9, 11, 11, 12, 12, 12, 12 }, + { 10, 8, 6, 5, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 7, 9, 11, 12, 13, 15, 15, 15, 16, 16 }, + { 12, 10, 8, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4, 4, 5, 5, 7, 9, 11, 13, 14, 14 }, + { 13, 10, 9, 9, 7, 7, 5, 5, 4, 3, 3, 3, 3, 3, 4, 4, 4, 5, 7, 9, 11, 13, 13, 13 }, + { 12, 13, 10, 8, 6, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 4, 5, 5, 6, 7, 9, 11, 14, 14 }, + { 12, 11, 9, 8, 8, 7, 5, 4, 4, 3, 3, 3, 3, 3, 4, 4, 5, 5, 7, 8, 10, 13, 14, 14 }, + { 15, 16, 15, 12, 10, 8, 6, 5, 4, 3, 3, 3, 2, 3, 4, 5, 5, 7, 9, 11, 13, 16, 16, 16 }, + { 14, 14, 11, 10, 9, 7, 7, 5, 5, 4, 3, 3, 2, 3, 3, 4, 5, 7, 9, 9, 12, 14, 15, 15 }, + { 9, 9, 9, 8, 7, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 13 }, + { 14, 12, 10, 8, 6, 6, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 8, 8, 9, 11, 14, 14, 14 }, + { 13, 10, 9, 8, 6, 6, 5, 4, 4, 4, 3, 3, 2, 3, 4, 5, 6, 8, 9, 9, 11, 12, 14, 14 }, + { 16, 13, 12, 11, 9, 6, 5, 5, 4, 4, 4, 3, 2, 3, 3, 4, 5, 7, 8, 10, 14, 16, 16, 16 }, + { 13, 14, 14, 14, 10, 8, 7, 7, 5, 4, 3, 3, 2, 3, 3, 4, 5, 5, 7, 9, 11, 14, 14, 14 }, +}; + +static const uint16_t envelope_quant_index_huffcodes[13][24] = { + {0x0006, 0x003e, 0x001c, 0x001d, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x0000, 0x0001, + 0x0002, 0x000d, 0x001e, 0x007e, 0x00fe, 0x01fe, 0x07fc, 0x07fd, 0x0ffc, 0x0ffd, 0x0ffe, 0x0fff}, + {0x03fe, 0x00fe, 0x003e, 0x001c, 0x001d, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, + 0x000d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x0ffe, 0x1ffe, 0x7ffc, 0x7ffd, 0x7ffe, 0xfffe, 0xffff}, + {0x0ffe, 0x03fe, 0x00fe, 0x003e, 0x001c, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x0000, + 0x0001, 0x0002, 0x000c, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffe, 0x3ffe, 0x3fff}, + {0x1ffc, 0x03fe, 0x01fc, 0x01fd, 0x007c, 0x007d, 0x001c, 0x001d, 0x000a, 0x0000, 0x0001, 0x0002, + 0x0003, 0x0004, 0x000b, 0x000c, 0x000d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffd, 0x1ffe, 0x1fff}, + {0x0ffe, 0x1ffe, 0x03fe, 0x00fe, 0x003c, 0x003d, 0x001a, 0x001b, 0x000a, 0x000b, 0x0000, 0x0001, + 0x0002, 0x0003, 0x0004, 0x000c, 0x001c, 0x001d, 0x003e, 0x007e, 0x01fe, 0x07fe, 0x3ffe, 0x3fff}, + {0x0ffe, 0x07fe, 0x01fe, 0x00fc, 0x00fd, 0x007c, 0x001c, 0x000a, 0x000b, 0x0000, 0x0001, 0x0002, + 0x0003, 0x0004, 0x000c, 0x000d, 0x001d, 0x001e, 0x007d, 0x00fe, 0x03fe, 0x1ffe, 0x3ffe, 0x3fff}, + {0x7ffc, 0xfffc, 0x7ffd, 0x0ffe, 0x03fe, 0x00fe, 0x003e, 0x001c, 0x000c, 0x0002, 0x0003, 0x0004, + 0x0000, 0x0005, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x1ffe, 0xfffd, 0xfffe, 0xffff}, + {0x3ffc, 0x3ffd, 0x07fe, 0x03fe, 0x01fc, 0x007c, 0x007d, 0x001c, 0x001d, 0x000c, 0x0002, 0x0003, + 0x0000, 0x0004, 0x0005, 0x000d, 0x001e, 0x007e, 0x01fd, 0x01fe, 0x0ffe, 0x3ffe, 0x7ffe, 0x7fff}, + {0x01fc, 0x01fd, 0x01fe, 0x00fc, 0x007c, 0x003c, 0x001c, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, + 0x0004, 0x0005, 0x000d, 0x001d, 0x003d, 0x007d, 0x00fd, 0x03fe, 0x07fe, 0x0ffe, 0x1ffe, 0x1fff}, + {0x3ffc, 0x0ffe, 0x03fe, 0x00fc, 0x003c, 0x003d, 0x001c, 0x000c, 0x0000, 0x0001, 0x0002, 0x0003, + 0x0004, 0x0005, 0x000d, 0x001d, 0x003e, 0x00fd, 0x00fe, 0x01fe, 0x07fe, 0x3ffd, 0x3ffe, 0x3fff}, + {0x1ffe, 0x03fe, 0x01fc, 0x00fc, 0x003c, 0x003d, 0x001c, 0x000a, 0x000b, 0x000c, 0x0002, 0x0003, + 0x0000, 0x0004, 0x000d, 0x001d, 0x003e, 0x00fd, 0x01fd, 0x01fe, 0x07fe, 0x0ffe, 0x3ffe, 0x3fff}, + {0xfffc, 0x1ffe, 0x0ffe, 0x07fe, 0x01fe, 0x003e, 0x001c, 0x001d, 0x000a, 0x000b, 0x000c, 0x0002, + 0x0000, 0x0003, 0x0004, 0x000d, 0x001e, 0x007e, 0x00fe, 0x03fe, 0x3ffe, 0xfffd, 0xfffe, 0xffff}, + {0x1ffc, 0x3ffa, 0x3ffb, 0x3ffc, 0x03fe, 0x00fe, 0x007c, 0x007d, 0x001c, 0x000c, 0x0002, 0x0003, + 0x0000, 0x0004, 0x0005, 0x000d, 0x001d, 0x001e, 0x007e, 0x01fe, 0x07fe, 0x3ffd, 0x3ffe, 0x3fff}, +}; + + +static const uint8_t cvh_huffbits0[191] = { + 1, 4, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, + 11, 11, 4, 5, 6, 7, 7, 8, 8, 9, 9, 9, + 9, 10, 11, 11, 5, 6, 7, 8, 8, 9, 9, 9, + 9, 10, 10, 10, 11, 12, 6, 7, 8, 9, 9, 9, + 9, 10, 10, 10, 10, 11, 12, 13, 7, 7, 8, 9, + 9, 9, 10, 10, 10, 10, 11, 11, 12, 13, 8, 8, + 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 13, 14, + 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 13, + 13, 15, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, + 12, 13, 14, 15, 9, 9, 9, 10, 10, 10, 11, 11, + 12, 13, 12, 14, 15, 16, 9, 9, 10, 10, 10, 10, + 11, 12, 12, 14, 14, 16, 16, 0, 9, 9, 10, 10, + 11, 11, 12, 13, 13, 14, 14, 15, 0, 0, 10, 10, + 10, 11, 11, 12, 12, 13, 15, 15, 16, 0, 0, 0, + 11, 11, 11, 12, 13, 13, 13, 15, 16, 16, 0, 0, + 0, 0, 11, 11, 12, 13, 13, 14, 15, 16, 16, +}; + +static const uint16_t cvh_huffcodes0[191] = { + 0x0000,0x0008,0x002c,0x002d,0x0062,0x0063,0x00d4,0x00d5,0x00d6,0x01c6,0x01c7,0x03ca, + 0x07d6,0x07d7,0x0009,0x0014,0x002e,0x0064,0x0065,0x00d7,0x00d8,0x01c8,0x01c9,0x01ca, + 0x01cb,0x03cb,0x07d8,0x07d9,0x0015,0x002f,0x0066,0x00d9,0x00da,0x01cc,0x01cd,0x01ce, + 0x01cf,0x03cc,0x03cd,0x03ce,0x07da,0x0fe4,0x0030,0x0067,0x00db,0x01d0,0x01d1,0x01d2, + 0x01d3,0x03cf,0x03d0,0x03d1,0x03d2,0x07db,0x0fe5,0x1fea,0x0068,0x0069,0x00dc,0x01d4, + 0x01d5,0x01d6,0x03d3,0x03d4,0x03d5,0x03d6,0x07dc,0x07dd,0x0fe6,0x1feb,0x00dd,0x00de, + 0x01d7,0x01d8,0x01d9,0x03d7,0x03d8,0x03d9,0x03da,0x07de,0x07df,0x0fe7,0x1fec,0x3ff2, + 0x00df,0x00e0,0x01da,0x01db,0x03db,0x03dc,0x07e0,0x07e1,0x07e2,0x0fe8,0x0fe9,0x1fed, + 0x1fee,0x7ff4,0x00e1,0x00e2,0x01dc,0x01dd,0x03dd,0x03de,0x07e3,0x07e4,0x07e5,0x0fea, + 0x0feb,0x1fef,0x3ff3,0x7ff5,0x01de,0x01df,0x01e0,0x03df,0x03e0,0x03e1,0x07e6,0x07e7, + 0x0fec,0x1ff0,0x0fed,0x3ff4,0x7ff6,0xfff8,0x01e1,0x01e2,0x03e2,0x03e3,0x03e4,0x03e5, + 0x07e8,0x0fee,0x0fef,0x3ff5,0x3ff6,0xfff9,0xfffa,0xfffa,0x01e3,0x01e4,0x03e6,0x03e7, + 0x07e9,0x07ea,0x0ff0,0x1ff1,0x1ff2,0x3ff7,0x3ff8,0x7ff7,0x7ff7,0xfffa,0x03e8,0x03e9, + 0x03ea,0x07eb,0x07ec,0x0ff1,0x0ff2,0x1ff3,0x7ff8,0x7ff9,0xfffb,0x3ff8,0x7ff7,0x7ff7, + 0x07ed,0x07ee,0x07ef,0x0ff3,0x1ff4,0x1ff5,0x1ff6,0x7ffa,0xfffc,0xfffd,0xfffb,0xfffb, + 0x3ff8,0x7ff7,0x07f0,0x07f1,0x0ff4,0x1ff7,0x1ff8,0x3ff9,0x7ffb,0xfffe,0xffff, +}; + + +static const uint8_t cvh_huffbits1[97] = { + 1, 4, 5, 6, 7, 8, 8, 9, 10, 10, 4, 5, + 6, 7, 7, 8, 8, 9, 9, 11, 5, 5, 6, 7, + 8, 8, 9, 9, 10, 11, 6, 6, 7, 8, 8, 9, + 9, 10, 11, 12, 7, 7, 8, 8, 9, 9, 10, 11, + 11, 13, 8, 8, 8, 9, 9, 10, 10, 11, 12, 14, + 8, 8, 8, 9, 10, 11, 11, 12, 13, 15, 9, 9, + 9, 10, 11, 12, 12, 14, 14, 0, 9, 9, 9, 10, + 11, 12, 14, 16, 0, 0, 10, 10, 11, 12, 13, 14, + 16, +}; + + +static const uint16_t cvh_huffcodes1[97] = { + 0x0000,0x0008,0x0014,0x0030,0x006a,0x00e2,0x00e3,0x01e4,0x03ec,0x03ed,0x0009,0x0015, + 0x0031,0x006b,0x006c,0x00e4,0x00e5,0x01e5,0x01e6,0x07f0,0x0016,0x0017,0x0032,0x006d, + 0x00e6,0x00e7,0x01e7,0x01e8,0x03ee,0x07f1,0x0033,0x0034,0x006e,0x00e8,0x00e9,0x01e9, + 0x01ea,0x03ef,0x07f2,0x0ff6,0x006f,0x0070,0x00ea,0x00eb,0x01eb,0x01ec,0x03f0,0x07f3, + 0x07f4,0x1ffa,0x00ec,0x00ed,0x00ee,0x01ed,0x01ee,0x03f1,0x03f2,0x07f5,0x0ff7,0x3ffa, + 0x00ef,0x00f0,0x00f1,0x01ef,0x03f3,0x07f6,0x07f7,0x0ff8,0x1ffb,0x7ffe,0x01f0,0x01f1, + 0x01f2,0x03f4,0x07f8,0x0ff9,0x0ffa,0x3ffb,0x3ffc,0x0000,0x01f3,0x01f4,0x01f5,0x03f5, + 0x07f9,0x0ffb,0x3ffd,0xfffe,0x0000,0x0000,0x03f6,0x03f7,0x07fa,0x0ffc,0x1ffc,0x3ffe, + 0xffff, +}; + +static const uint8_t cvh_huffbits2[48] = { + 1, 4, 5, 7, 8, 9, 10, 3, 4, 5, 7, 8, + 9, 10, 5, 5, 6, 7, 8, 10, 10, 7, 6, 7, + 8, 9, 10, 12, 8, 8, 8, 9, 10, 12, 14, 8, + 9, 9, 10, 11, 15, 16, 9, 10, 11, 12, 13, 16, +}; + +static const uint16_t cvh_huffcodes2[48] = { + 0x0000,0x000a,0x0018,0x0074,0x00f2,0x01f4,0x03f6,0x0004,0x000b,0x0019,0x0075,0x00f3, + 0x01f5,0x03f7,0x001a,0x001b,0x0038,0x0076,0x00f4,0x03f8,0x03f9,0x0077,0x0039,0x0078, + 0x00f5,0x01f6,0x03fa,0x0ffc,0x00f6,0x00f7,0x00f8,0x01f7,0x03fb,0x0ffd,0x3ffe,0x00f9, + 0x01f8,0x01f9,0x03fc,0x07fc,0x7ffe,0xfffe,0x01fa,0x03fd,0x07fd,0x0ffe,0x1ffe,0xffff, +}; + +static const uint8_t cvh_huffbits3[607] = { + 2, 4, 6, 8, 10, 5, 5, 6, 8, 10, 7, 8, + 8, 10, 12, 9, 9, 10, 12, 15, 10, 11, 13, 16, + 16, 5, 6, 8, 10, 11, 5, 6, 8, 10, 12, 7, + 7, 8, 10, 13, 9, 9, 10, 12, 15, 12, 11, 13, + 16, 16, 7, 9, 10, 12, 15, 7, 8, 10, 12, 13, + 9, 9, 11, 13, 16, 11, 11, 12, 14, 16, 12, 12, + 14, 16, 0, 9, 11, 12, 16, 16, 9, 10, 13, 15, + 16, 10, 11, 12, 16, 16, 13, 13, 16, 16, 16, 16, + 16, 15, 16, 0, 11, 13, 16, 16, 15, 11, 13, 15, + 16, 16, 13, 13, 16, 16, 0, 14, 16, 16, 16, 0, + 16, 16, 0, 0, 0, 4, 6, 8, 10, 13, 6, 6, + 8, 10, 13, 9, 8, 10, 12, 16, 10, 10, 11, 15, + 16, 13, 12, 14, 16, 16, 5, 6, 8, 11, 13, 6, + 6, 8, 10, 13, 8, 8, 9, 11, 14, 10, 10, 12, + 12, 16, 13, 12, 13, 15, 16, 7, 8, 9, 12, 16, + 7, 8, 10, 12, 14, 9, 9, 10, 13, 16, 11, 10, + 12, 15, 16, 13, 13, 16, 16, 0, 9, 11, 13, 16, + 16, 9, 10, 12, 15, 16, 10, 11, 13, 16, 16, 13, + 12, 16, 16, 16, 16, 16, 16, 16, 0, 11, 13, 16, + 16, 16, 11, 13, 16, 16, 16, 12, 13, 15, 16, 0, + 16, 16, 16, 16, 0, 16, 16, 0, 0, 0, 6, 8, + 11, 13, 16, 8, 8, 10, 12, 16, 11, 10, 11, 13, + 16, 12, 13, 13, 15, 16, 16, 16, 14, 16, 0, 6, + 8, 10, 13, 16, 8, 8, 10, 12, 16, 10, 10, 11, + 13, 16, 13, 12, 13, 16, 16, 14, 14, 14, 16, 0, + 8, 9, 11, 13, 16, 8, 9, 11, 16, 14, 10, 10, + 12, 15, 16, 12, 12, 13, 16, 16, 15, 16, 16, 16, + 0, 10, 12, 15, 16, 16, 10, 12, 12, 14, 16, 12, + 12, 13, 16, 16, 14, 15, 16, 16, 0, 16, 16, 16, + 0, 0, 12, 15, 15, 16, 0, 13, 13, 16, 16, 0, + 14, 16, 16, 16, 0, 16, 16, 16, 0, 0, 0, 0, + 0, 0, 0, 8, 10, 13, 15, 16, 10, 11, 13, 16, + 16, 13, 13, 14, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 0, 8, 10, 11, 15, 16, 9, 10, 12, + 16, 16, 12, 12, 15, 16, 16, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 0, 9, 11, 14, 16, 16, 10, 11, + 13, 16, 16, 14, 13, 14, 16, 16, 16, 15, 15, 16, + 0, 16, 16, 16, 0, 0, 11, 13, 16, 16, 16, 11, + 13, 15, 16, 16, 13, 16, 16, 16, 0, 16, 16, 16, + 16, 0, 16, 16, 0, 0, 0, 15, 16, 16, 16, 0, + 14, 16, 16, 16, 0, 16, 16, 16, 0, 0, 16, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 9, 13, 16, 16, + 16, 11, 13, 16, 16, 16, 14, 15, 16, 16, 0, 15, + 16, 16, 16, 0, 16, 16, 0, 0, 0, 9, 13, 15, + 15, 16, 12, 13, 14, 16, 16, 16, 15, 16, 16, 0, + 16, 16, 16, 16, 0, 16, 16, 0, 0, 0, 11, 13, + 15, 16, 0, 12, 14, 16, 16, 0, 16, 16, 16, 16, + 0, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 16, + 16, 16, 16, 0, 16, 16, 16, 16, 0, 16, 16, 16, + 0, 0, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 0, 0, 0, 16, 16, +}; + + +static const uint16_t cvh_huffcodes3[607] = { + 0x0000,0x0004,0x0022,0x00c6,0x03b0,0x000c,0x000d,0x0023,0x00c7,0x03b1,0x005c,0x00c8, + 0x00c9,0x03b2,0x0fa4,0x01c2,0x01c3,0x03b3,0x0fa5,0x7f72,0x03b4,0x07b2,0x1f9a,0xff24, + 0xff25,0x000e,0x0024,0x00ca,0x03b5,0x07b3,0x000f,0x0025,0x00cb,0x03b6,0x0fa6,0x005d, + 0x005e,0x00cc,0x03b7,0x1f9b,0x01c4,0x01c5,0x03b8,0x0fa7,0x7f73,0x0fa8,0x07b4,0x1f9c, + 0xff26,0xff27,0x005f,0x01c6,0x03b9,0x0fa9,0x7f74,0x0060,0x00cd,0x03ba,0x0faa,0x1f9d, + 0x01c7,0x01c8,0x07b5,0x1f9e,0xff28,0x07b6,0x07b7,0x0fab,0x3fa2,0xff29,0x0fac,0x0fad, + 0x3fa3,0xff2a,0x3fa2,0x01c9,0x07b8,0x0fae,0xff2b,0xff2c,0x01ca,0x03bb,0x1f9f,0x7f75, + 0xff2d,0x03bc,0x07b9,0x0faf,0xff2e,0xff2f,0x1fa0,0x1fa1,0xff30,0xff31,0xff32,0xff33, + 0xff34,0x7f76,0xff35,0xff31,0x07ba,0x1fa2,0xff36,0xff37,0x7f77,0x07bb,0x1fa3,0x7f78, + 0xff38,0xff39,0x1fa4,0x1fa5,0xff3a,0xff3b,0xff2e,0x3fa4,0xff3c,0xff3d,0xff3e,0xff31, + 0xff3f,0xff40,0xff30,0xff31,0xff31,0x0005,0x0026,0x00ce,0x03bd,0x1fa6,0x0027,0x0028, + 0x00cf,0x03be,0x1fa7,0x01cb,0x00d0,0x03bf,0x0fb0,0xff41,0x03c0,0x03c1,0x07bc,0x7f79, + 0xff42,0x1fa8,0x0fb1,0x3fa5,0xff43,0xff44,0x0010,0x0029,0x00d1,0x07bd,0x1fa9,0x002a, + 0x002b,0x00d2,0x03c2,0x1faa,0x00d3,0x00d4,0x01cc,0x07be,0x3fa6,0x03c3,0x03c4,0x0fb2, + 0x0fb3,0xff45,0x1fab,0x0fb4,0x1fac,0x7f7a,0xff46,0x0061,0x00d5,0x01cd,0x0fb5,0xff47, + 0x0062,0x00d6,0x03c5,0x0fb6,0x3fa7,0x01ce,0x01cf,0x03c6,0x1fad,0xff48,0x07bf,0x03c7, + 0x0fb7,0x7f7b,0xff49,0x1fae,0x1faf,0xff4a,0xff4b,0x7f7b,0x01d0,0x07c0,0x1fb0,0xff4c, + 0xff4d,0x01d1,0x03c8,0x0fb8,0x7f7c,0xff4e,0x03c9,0x07c1,0x1fb1,0xff4f,0xff50,0x1fb2, + 0x0fb9,0xff51,0xff52,0xff53,0xff54,0xff55,0xff56,0xff57,0xff52,0x07c2,0x1fb3,0xff58, + 0xff59,0xff5a,0x07c3,0x1fb4,0xff5b,0xff5c,0xff5d,0x0fba,0x1fb5,0x7f7d,0xff5e,0xff4f, + 0xff5f,0xff60,0xff61,0xff62,0xff52,0xff63,0xff64,0xff51,0xff52,0xff52,0x002c,0x00d7, + 0x07c4,0x1fb6,0xff65,0x00d8,0x00d9,0x03ca,0x0fbb,0xff66,0x07c5,0x03cb,0x07c6,0x1fb7, + 0xff67,0x0fbc,0x1fb8,0x1fb9,0x7f7e,0xff68,0xff69,0xff6a,0x3fa8,0xff6b,0x7f7e,0x002d, + 0x00da,0x03cc,0x1fba,0xff6c,0x00db,0x00dc,0x03cd,0x0fbd,0xff6d,0x03ce,0x03cf,0x07c7, + 0x1fbb,0xff6e,0x1fbc,0x0fbe,0x1fbd,0xff6f,0xff70,0x3fa9,0x3faa,0x3fab,0xff71,0xff6f, + 0x00dd,0x01d2,0x07c8,0x1fbe,0xff72,0x00de,0x01d3,0x07c9,0xff73,0x3fac,0x03d0,0x03d1, + 0x0fbf,0x7f7f,0xff74,0x0fc0,0x0fc1,0x1fbf,0xff75,0xff76,0x7f80,0xff77,0xff78,0xff79, + 0xff75,0x03d2,0x0fc2,0x7f81,0xff7a,0xff7b,0x03d3,0x0fc3,0x0fc4,0x3fad,0xff7c,0x0fc5, + 0x0fc6,0x1fc0,0xff7d,0xff7e,0x3fae,0x7f82,0xff7f,0xff80,0xff80,0xff81,0xff82,0xff83, + 0xff80,0xff80,0x0fc7,0x7f83,0x7f84,0xff84,0xff7a,0x1fc1,0x1fc2,0xff85,0xff86,0x3fad, + 0x3faf,0xff87,0xff88,0xff89,0xff7d,0xff8a,0xff8b,0xff8c,0xff80,0xff80,0x3fae,0x7f82, + 0xff7f,0xff80,0xff80,0x00df,0x03d4,0x1fc3,0x7f85,0xff8d,0x03d5,0x07ca,0x1fc4,0xff8e, + 0xff8f,0x1fc5,0x1fc6,0x3fb0,0xff90,0xff91,0xff92,0xff93,0xff94,0xff95,0xff96,0xff97, + 0xff98,0xff99,0xff9a,0xff95,0x00e0,0x03d6,0x07cb,0x7f86,0xff9b,0x01d4,0x03d7,0x0fc8, + 0xff9c,0xff9d,0x0fc9,0x0fca,0x7f87,0xff9e,0xff9f,0xffa0,0x3fb1,0xffa1,0xffa2,0xffa3, + 0xffa4,0xffa5,0xffa6,0xffa7,0xffa2,0x01d5,0x07cc,0x3fb2,0xffa8,0xffa9,0x03d8,0x07cd, + 0x1fc7,0xffaa,0xffab,0x3fb3,0x1fc8,0x3fb4,0xffac,0xffad,0xffae,0x7f88,0x7f89,0xffaf, + 0xffaf,0xffb0,0xffb1,0xffb2,0xffaf,0xffaf,0x07ce,0x1fc9,0xffb3,0xffb4,0xffb5,0x07cf, + 0x1fca,0x7f8a,0xffb6,0xffb7,0x1fcb,0xffb8,0xffb9,0xffba,0xffba,0xffbb,0xffbc,0xffbd, + 0xffbe,0xffbe,0xffbf,0xffc0,0xffbd,0xffbe,0xffbe,0x7f8b,0xffc1,0xffc2,0xffc3,0xffb4, + 0x3fb5,0xffc4,0xffc5,0xffc6,0xffb6,0xffc7,0xffc8,0xffc9,0xffba,0xffba,0xffca,0xffcb, + 0xffbd,0xffbe,0xffbe,0xffbb,0xffbc,0xffbd,0xffbe,0xffbe,0x01d6,0x1fcc,0xffcc,0xffcd, + 0xffce,0x07d0,0x1fcd,0xffcf,0xffd0,0xffd1,0x3fb6,0x7f8c,0xffd2,0xffd3,0xff90,0x7f8d, + 0xffd4,0xffd5,0xffd6,0xff95,0xffd7,0xffd8,0xff94,0xff95,0xff95,0x01d7,0x1fce,0x7f8e, + 0x7f8f,0xffd9,0x0fcb,0x1fcf,0x3fb7,0xffda,0xffdb,0xffdc,0x7f90,0xffdd,0xffde,0xff9e, + 0xffdf,0xffe0,0xffe1,0xffe2,0xffa2,0xffe3,0xffe4,0xffa1,0xffa2,0xffa2,0x07d1,0x1fd0, + 0x7f91,0xffe5,0xffa8,0x0fcc,0x3fb8,0xffe6,0xffe7,0xffaa,0xffe8,0xffe9,0xffea,0xffeb, + 0xffac,0xffec,0xffed,0xffee,0xffaf,0xffaf,0xffae,0x7f88,0x7f89,0xffaf,0xffaf,0xffef, + 0xfff0,0xfff1,0xfff2,0xffb4,0xfff3,0xfff4,0xfff5,0xfff6,0xffb6,0xfff7,0xfff8,0xfff9, + 0xffba,0xffba,0xfffa,0xfffb,0xffbd,0xffbe,0xffbe,0xffbb,0xffbc,0xffbd,0xffbe,0xffbe, + 0xfffc,0xfffd,0xffb3,0xffb4,0xffb4,0xfffe,0xffff, +}; + +static const uint8_t cvh_huffbits4[246] = { + 2, 4, 7, 10, 4, 5, 7, 10, 7, 8, 10, 14, + 11, 11, 15, 15, 4, 5, 9, 12, 5, 5, 8, 12, + 8, 7, 10, 15, 11, 11, 15, 15, 7, 9, 12, 15, + 8, 8, 12, 15, 10, 10, 13, 15, 14, 14, 15, 0, + 11, 13, 15, 15, 11, 13, 15, 15, 14, 15, 15, 0, + 15, 15, 0, 0, 4, 5, 9, 13, 5, 6, 9, 13, + 9, 9, 11, 15, 14, 13, 15, 15, 4, 6, 9, 12, + 5, 6, 9, 13, 9, 8, 11, 15, 13, 12, 15, 15, + 7, 9, 12, 15, 7, 8, 11, 15, 10, 10, 14, 15, + 14, 15, 15, 0, 10, 12, 15, 15, 11, 13, 15, 15, + 15, 15, 15, 0, 15, 15, 0, 0, 6, 9, 13, 14, + 8, 9, 12, 15, 12, 12, 15, 15, 15, 15, 15, 0, + 7, 9, 13, 15, 8, 9, 12, 15, 11, 12, 15, 15, + 15, 15, 15, 0, 9, 11, 15, 15, 9, 11, 15, 15, + 14, 14, 15, 0, 15, 15, 0, 0, 14, 15, 15, 0, + 14, 15, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, + 9, 12, 15, 15, 12, 13, 15, 15, 15, 15, 15, 0, + 15, 15, 0, 0, 10, 12, 15, 15, 12, 14, 15, 15, + 15, 15, 15, 0, 15, 15, 0, 0, 14, 15, 15, 0, + 15, 15, 15, 0, 15, 15, 0, 0, 0, 0, 0, 0, + 15, 15, 0, 0, 15, 15, +}; + + +static const uint16_t cvh_huffcodes4[246] = { + 0x0000,0x0004,0x006c,0x03e6,0x0005,0x0012,0x006d,0x03e7,0x006e,0x00e8,0x03e8,0x3fc4, + 0x07e0,0x07e1,0x7fa4,0x7fa5,0x0006,0x0013,0x01e2,0x0fda,0x0014,0x0015,0x00e9,0x0fdb, + 0x00ea,0x006f,0x03e9,0x7fa6,0x07e2,0x07e3,0x7fa7,0x7fa8,0x0070,0x01e3,0x0fdc,0x7fa9, + 0x00eb,0x00ec,0x0fdd,0x7faa,0x03ea,0x03eb,0x1fd6,0x7fab,0x3fc5,0x3fc6,0x7fac,0x1fd6, + 0x07e4,0x1fd7,0x7fad,0x7fae,0x07e5,0x1fd8,0x7faf,0x7fb0,0x3fc7,0x7fb1,0x7fb2,0x1fd6, + 0x7fb3,0x7fb4,0x1fd6,0x1fd6,0x0007,0x0016,0x01e4,0x1fd9,0x0017,0x0032,0x01e5,0x1fda, + 0x01e6,0x01e7,0x07e6,0x7fb5,0x3fc8,0x1fdb,0x7fb6,0x7fb7,0x0008,0x0033,0x01e8,0x0fde, + 0x0018,0x0034,0x01e9,0x1fdc,0x01ea,0x00ed,0x07e7,0x7fb8,0x1fdd,0x0fdf,0x7fb9,0x7fba, + 0x0071,0x01eb,0x0fe0,0x7fbb,0x0072,0x00ee,0x07e8,0x7fbc,0x03ec,0x03ed,0x3fc9,0x7fbd, + 0x3fca,0x7fbe,0x7fbf,0x3fc9,0x03ee,0x0fe1,0x7fc0,0x7fc1,0x07e9,0x1fde,0x7fc2,0x7fc3, + 0x7fc4,0x7fc5,0x7fc6,0x3fc9,0x7fc7,0x7fc8,0x3fc9,0x3fc9,0x0035,0x01ec,0x1fdf,0x3fcb, + 0x00ef,0x01ed,0x0fe2,0x7fc9,0x0fe3,0x0fe4,0x7fca,0x7fcb,0x7fcc,0x7fcd,0x7fce,0x7fca, + 0x0073,0x01ee,0x1fe0,0x7fcf,0x00f0,0x01ef,0x0fe5,0x7fd0,0x07ea,0x0fe6,0x7fd1,0x7fd2, + 0x7fd3,0x7fd4,0x7fd5,0x7fd1,0x01f0,0x07eb,0x7fd6,0x7fd7,0x01f1,0x07ec,0x7fd8,0x7fd9, + 0x3fcc,0x3fcd,0x7fda,0x7fda,0x7fdb,0x7fdc,0x7fda,0x7fda,0x3fce,0x7fdd,0x7fde,0x7fd6, + 0x3fcf,0x7fdf,0x7fe0,0x7fd8,0x7fe1,0x7fe2,0x7fda,0x7fda,0x3fcc,0x3fcd,0x7fda,0x7fda, + 0x01f2,0x0fe7,0x7fe3,0x7fe4,0x0fe8,0x1fe1,0x7fe5,0x7fe6,0x7fe7,0x7fe8,0x7fe9,0x7fca, + 0x7fea,0x7feb,0x7fca,0x7fca,0x03ef,0x0fe9,0x7fec,0x7fed,0x0fea,0x3fd0,0x7fee,0x7fef, + 0x7ff0,0x7ff1,0x7ff2,0x7fd1,0x7ff3,0x7ff4,0x7fd1,0x7fd1,0x3fd1,0x7ff5,0x7ff6,0x7fd6, + 0x7ff7,0x7ff8,0x7ff9,0x7fd8,0x7ffa,0x7ffb,0x7fda,0x7fda,0x3fcc,0x3fcd,0x7fda,0x7fda, + 0x7ffc,0x7ffd,0x7fd6,0x7fd6,0x7ffe,0x7fff, +}; + + +static const uint8_t cvh_huffbits5[230] = { + 2, 4, 8, 4, 5, 9, 9, 10, 14, 4, 6, 11, + 5, 6, 12, 10, 11, 15, 9, 11, 15, 10, 13, 15, + 14, 15, 0, 4, 6, 12, 6, 7, 12, 12, 12, 15, + 5, 7, 13, 6, 7, 13, 12, 13, 15, 10, 12, 15, + 11, 13, 15, 15, 15, 0, 8, 13, 15, 11, 12, 15, + 15, 15, 0, 10, 13, 15, 12, 15, 15, 15, 15, 0, + 15, 15, 0, 15, 15, 0, 0, 0, 0, 4, 5, 11, + 5, 7, 12, 11, 12, 15, 6, 7, 13, 7, 8, 14, + 12, 14, 15, 11, 13, 15, 12, 13, 15, 15, 15, 0, + 5, 6, 13, 7, 8, 15, 12, 14, 15, 6, 8, 14, + 7, 8, 15, 14, 15, 15, 12, 12, 15, 12, 13, 15, + 15, 15, 0, 9, 13, 15, 12, 13, 15, 15, 15, 0, + 11, 13, 15, 13, 13, 15, 15, 15, 0, 14, 15, 0, + 15, 15, 0, 0, 0, 0, 8, 10, 15, 11, 12, 15, + 15, 15, 0, 10, 12, 15, 12, 13, 15, 15, 15, 0, + 14, 15, 0, 15, 15, 0, 0, 0, 0, 8, 12, 15, + 12, 13, 15, 15, 15, 0, 11, 13, 15, 13, 15, 15, + 15, 15, 0, 15, 15, 0, 15, 15, 0, 0, 0, 0, + 14, 15, 0, 15, 15, 0, 0, 0, 0, 15, 15, 0, + 15, 15, +}; + + + +static const uint16_t cvh_huffcodes5[230] = { + 0x0000,0x0004,0x00f0,0x0005,0x0012,0x01f0,0x01f1,0x03e8,0x3fce,0x0006,0x0030,0x07de, + 0x0013,0x0031,0x0fd2,0x03e9,0x07df,0x7fb0,0x01f2,0x07e0,0x7fb1,0x03ea,0x1fd2,0x7fb2, + 0x3fcf,0x7fb3,0x0031,0x0007,0x0032,0x0fd3,0x0033,0x0070,0x0fd4,0x0fd5,0x0fd6,0x7fb4, + 0x0014,0x0071,0x1fd3,0x0034,0x0072,0x1fd4,0x0fd7,0x1fd5,0x7fb5,0x03eb,0x0fd8,0x7fb6, + 0x07e1,0x1fd6,0x7fb7,0x7fb8,0x7fb9,0x0072,0x00f1,0x1fd7,0x7fba,0x07e2,0x0fd9,0x7fbb, + 0x7fbc,0x7fbd,0x0070,0x03ec,0x1fd8,0x7fbe,0x0fda,0x7fbf,0x7fc0,0x7fc1,0x7fc2,0x0072, + 0x7fc3,0x7fc4,0x0071,0x7fc5,0x7fc6,0x0072,0x0034,0x0072,0x0072,0x0008,0x0015,0x07e3, + 0x0016,0x0073,0x0fdb,0x07e4,0x0fdc,0x7fc7,0x0035,0x0074,0x1fd9,0x0075,0x00f2,0x3fd0, + 0x0fdd,0x3fd1,0x7fc8,0x07e5,0x1fda,0x7fc9,0x0fde,0x1fdb,0x7fca,0x7fcb,0x7fcc,0x00f2, + 0x0017,0x0036,0x1fdc,0x0076,0x00f3,0x7fcd,0x0fdf,0x3fd2,0x7fce,0x0037,0x00f4,0x3fd3, + 0x0077,0x00f5,0x7fcf,0x3fd4,0x7fd0,0x7fd1,0x0fe0,0x0fe1,0x7fd2,0x0fe2,0x1fdd,0x7fd3, + 0x7fd4,0x7fd5,0x00f5,0x01f3,0x1fde,0x7fd6,0x0fe3,0x1fdf,0x7fd7,0x7fd8,0x7fd9,0x00f3, + 0x07e6,0x1fe0,0x7fda,0x1fe1,0x1fe2,0x7fdb,0x7fdc,0x7fdd,0x00f5,0x3fd5,0x7fde,0x00f4, + 0x7fdf,0x7fe0,0x00f5,0x0077,0x00f5,0x00f5,0x00f6,0x03ed,0x7fe1,0x07e7,0x0fe4,0x7fe2, + 0x7fe3,0x7fe4,0x0073,0x03ee,0x0fe5,0x7fe5,0x0fe6,0x1fe3,0x7fe6,0x7fe7,0x7fe8,0x00f2, + 0x3fd6,0x7fe9,0x0074,0x7fea,0x7feb,0x00f2,0x0075,0x00f2,0x00f2,0x00f7,0x0fe7,0x7fec, + 0x0fe8,0x1fe4,0x7fed,0x7fee,0x7fef,0x00f3,0x07e8,0x1fe5,0x7ff0,0x1fe6,0x7ff1,0x7ff2, + 0x7ff3,0x7ff4,0x00f5,0x7ff5,0x7ff6,0x00f4,0x7ff7,0x7ff8,0x00f5,0x0077,0x00f5,0x00f5, + 0x3fd7,0x7ff9,0x0036,0x7ffa,0x7ffb,0x00f3,0x0076,0x00f3,0x00f3,0x7ffc,0x7ffd,0x0000, + 0x7ffe,0x7fff, +}; + + +static const uint8_t cvh_huffbits6[32] = { + 1, 4, 4, 6, 4, 6, 6, 8, 4, 6, 6, 8, + 6, 9, 8, 10, 4, 6, 7, 8, 6, 9, 8, 11, + 6, 9, 8, 10, 8, 10, 9, 11, +}; + +static const uint16_t cvh_huffcodes6[32] = { + 0x0000,0x0008,0x0009,0x0034,0x000a,0x0035,0x0036,0x00f6,0x000b,0x0037,0x0038,0x00f7, + 0x0039,0x01fa,0x00f8,0x03fc,0x000c,0x003a,0x007a,0x00f9,0x003b,0x01fb,0x00fa,0x07fe, + 0x003c,0x01fc,0x00fb,0x03fd,0x00fc,0x03fe,0x01fd,0x07ff, +}; + +static const uint16_t* const cvh_huffcodes[7] = { + cvh_huffcodes0, cvh_huffcodes1, cvh_huffcodes2, cvh_huffcodes3, + cvh_huffcodes4, cvh_huffcodes5, cvh_huffcodes6, +}; + +static const uint8_t* const cvh_huffbits[7] = { + cvh_huffbits0, cvh_huffbits1, cvh_huffbits2, cvh_huffbits3, + cvh_huffbits4, cvh_huffbits5, cvh_huffbits6, +}; + + +static const uint16_t ccpl_huffcodes2[3] = { + 0x02,0x00,0x03, +}; + +static const uint16_t ccpl_huffcodes3[7] = { + 0x3e,0x1e,0x02,0x00,0x06,0x0e,0x3f, +}; + +static const uint16_t ccpl_huffcodes4[15] = { + 0xfc,0xfd,0x7c,0x3c,0x1c,0x0c,0x04,0x00,0x05,0x0d,0x1d,0x3d, + 0x7d,0xfe,0xff, +}; + +static const uint16_t ccpl_huffcodes5[31] = { + 0x03f8,0x03f9,0x03fa,0x03fb,0x01f8,0x01f9,0x00f8,0x00f9,0x0078,0x0079,0x0038,0x0039, + 0x0018,0x0019,0x0004,0x0000,0x0005,0x001a,0x001b,0x003a,0x003b,0x007a,0x007b,0x00fa, + 0x00fb,0x01fa,0x01fb,0x03fc,0x03fd,0x03fe,0x03ff, +}; + +static const uint16_t ccpl_huffcodes6[63] = { + 0xfffe, 0x7ffe, 0x3ffc, 0x1ffc, 0x0ffc, 0x07f6, 0x07f7, 0x07f8, 0x07f9, + 0x03f2, 0x03f3, 0x03f4, 0x03f5, 0x01f0, 0x01f1, 0x01f2, 0x01f3, 0x01f4, + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x0070, 0x0071, 0x0072, 0x0073, 0x0034, + 0x0035, 0x0016, 0x0017, 0x0004, 0x0000, 0x000a, 0x0018, 0x0019, 0x0036, + 0x0037, 0x0074, 0x0075, 0x0076, 0x0077, 0x00f4, 0x00f5, 0x00f6, 0x00f7, + 0x01f5, 0x01f6, 0x01f7, 0x01f8, 0x03f6, 0x03f7, 0x03f8, 0x03f9, 0x03fa, + 0x07fa, 0x07fb, 0x07fc, 0x07fd, 0x0ffd, 0x1ffd, 0x3ffd, 0x3ffe, 0xffff +}; + +static const uint8_t ccpl_huffbits2[3] = { + 2,1,2, +}; + +static const uint8_t ccpl_huffbits3[7] = { + 6,5,2,1,3,4,6, +}; + +static const uint8_t ccpl_huffbits4[15] = { + 8,8,7,6,5,4,3,1,3,4,5,6,7,8,8, +}; + +static const uint8_t ccpl_huffbits5[31] = { + 10,10,10,10,9,9,8,8,7,7,6,6, + 5,5,3,1,3,5,5,6,6,7,7,8, + 8,9,9,10,10,10,10, +}; + +static const uint8_t ccpl_huffbits6[63] = { + 16,15,14,13,12,11,11,11,11,10,10,10, + 10,9,9,9,9,9,8,8,8,8,7,7, + 7,7,6,6,5,5,3,1,4,5,5,6, + 6,7,7,7,7,8,8,8,8,9,9,9, + 9,10,10,10,10,10,11,11,11,11,12,13, + 14,14,16, +}; + +static const uint16_t* const ccpl_huffcodes[5] = { + ccpl_huffcodes2,ccpl_huffcodes3, + ccpl_huffcodes4,ccpl_huffcodes5,ccpl_huffcodes6 +}; + +static const uint8_t* const ccpl_huffbits[5] = { + ccpl_huffbits2,ccpl_huffbits3, + ccpl_huffbits4,ccpl_huffbits5,ccpl_huffbits6 +}; + + +//Coupling tables + +static const int cplband[51] = { + 0,1,2,3,4,5,6,7,8,9, + 10,11,11,12,12,13,13,14,14,14, + 15,15,15,15,16,16,16,16,16,17, + 17,17,17,17,17,18,18,18,18,18, + 18,18,19,19,19,19,19,19,19,19, + 19, +}; + +// The 1 and 0 at the beginning/end are to prevent overflows with +// bitstream-read indexes. E.g. if n_bits=5, we can access any +// index from [1, (1< +#include + +#include "libavutil/intreadwrite.h" + +static inline void copy_block2(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY16U(dst, src); + dst += dstStride; + src += srcStride; + } +} + +static inline void copy_block4(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY32U(dst, src); + dst += dstStride; + src += srcStride; + } +} + +static inline void copy_block8(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY64U(dst, src); + dst += dstStride; + src += srcStride; + } +} + +static inline void copy_block9(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY64U(dst, src); + dst[8] = src[8]; + dst += dstStride; + src += srcStride; + } +} + +static inline void copy_block16(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY128U(dst, src); + dst += dstStride; + src += srcStride; + } +} + +static inline void copy_block17(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride, int h) +{ + int i; + for (i = 0; i < h; i++) { + AV_COPY128U(dst, src); + dst[16] = src[16]; + dst += dstStride; + src += srcStride; + } +} + +#endif /* AVCODEC_COPY_BLOCK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/d3d11va.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/d3d11va.h new file mode 100644 index 00000000..6816b6c1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/d3d11va.h @@ -0,0 +1,112 @@ +/* + * Direct3D11 HW acceleration + * + * copyright (c) 2009 Laurent Aimar + * copyright (c) 2015 Steve Lhomme + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_D3D11VA_H +#define AVCODEC_D3D11VA_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_d3d11va + * Public libavcodec D3D11VA header. + */ + +#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602 +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0602 +#endif + +#include +#include + +/** + * @defgroup lavc_codec_hwaccel_d3d11va Direct3D11 + * @ingroup lavc_codec_hwaccel + * + * @{ + */ + +#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for Direct3D11 and old UVD/UVD+ ATI video cards +#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for Direct3D11 and old Intel GPUs with ClearVideo interface + +/** + * This structure is used to provides the necessary configurations and data + * to the Direct3D11 FFmpeg HWAccel implementation. + * + * The application must make it available as AVCodecContext.hwaccel_context. + * + * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext. + */ +typedef struct AVD3D11VAContext { + /** + * D3D11 decoder object + */ + ID3D11VideoDecoder *decoder; + + /** + * D3D11 VideoContext + */ + ID3D11VideoContext *video_context; + + /** + * D3D11 configuration used to create the decoder + */ + D3D11_VIDEO_DECODER_CONFIG *cfg; + + /** + * The number of surface in the surface array + */ + unsigned surface_count; + + /** + * The array of Direct3D surfaces used to create the decoder + */ + ID3D11VideoDecoderOutputView **surface; + + /** + * A bit field configuring the workarounds needed for using the decoder + */ + uint64_t workaround; + + /** + * Private to the FFmpeg AVHWAccel implementation + */ + unsigned report_id; + + /** + * Mutex to access video_context + */ + HANDLE context_mutex; +} AVD3D11VAContext; + +/** + * Allocate an AVD3D11VAContext. + * + * @return Newly-allocated AVD3D11VAContext or NULL on failure. + */ +AVD3D11VAContext *av_d3d11va_alloc_context(void); + +/** + * @} + */ + +#endif /* AVCODEC_D3D11VA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca.h new file mode 100644 index 00000000..e96c589c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca.h @@ -0,0 +1,228 @@ +/* + * DCA compatible decoder + * Copyright (C) 2004 Gildas Bazin + * Copyright (C) 2004 Benjamin Zores + * Copyright (C) 2006 Benjamin Larsson + * Copyright (C) 2007 Konstantin Shishkov + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_H +#define AVCODEC_DCA_H + +#include + +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" + +#include "get_bits.h" +#include "internal.h" + +#define DCA_CORE_FRAME_HEADER_SIZE 18 + +enum DCAParseError { + DCA_PARSE_ERROR_SYNC_WORD = -1, + DCA_PARSE_ERROR_DEFICIT_SAMPLES = -2, + DCA_PARSE_ERROR_PCM_BLOCKS = -3, + DCA_PARSE_ERROR_FRAME_SIZE = -4, + DCA_PARSE_ERROR_AMODE = -5, + DCA_PARSE_ERROR_SAMPLE_RATE = -6, + DCA_PARSE_ERROR_RESERVED_BIT = -7, + DCA_PARSE_ERROR_LFE_FLAG = -8, + DCA_PARSE_ERROR_PCM_RES = -9, +}; + +typedef struct DCACoreFrameHeader { + uint8_t normal_frame; ///< Frame type + uint8_t deficit_samples; ///< Deficit sample count + uint8_t crc_present; ///< CRC present flag + uint8_t npcmblocks; ///< Number of PCM sample blocks + uint16_t frame_size; ///< Primary frame byte size + uint8_t audio_mode; ///< Audio channel arrangement + uint8_t sr_code; ///< Core audio sampling frequency + uint8_t br_code; ///< Transmission bit rate + uint8_t drc_present; ///< Embedded dynamic range flag + uint8_t ts_present; ///< Embedded time stamp flag + uint8_t aux_present; ///< Auxiliary data flag + uint8_t hdcd_master; ///< HDCD mastering flag + uint8_t ext_audio_type; ///< Extension audio descriptor flag + uint8_t ext_audio_present; ///< Extended coding flag + uint8_t sync_ssf; ///< Audio sync word insertion flag + uint8_t lfe_present; ///< Low frequency effects flag + uint8_t predictor_history; ///< Predictor history flag switch + uint8_t filter_perfect; ///< Multirate interpolator switch + uint8_t encoder_rev; ///< Encoder software revision + uint8_t copy_hist; ///< Copy history + uint8_t pcmr_code; ///< Source PCM resolution + uint8_t sumdiff_front; ///< Front sum/difference flag + uint8_t sumdiff_surround; ///< Surround sum/difference flag + uint8_t dn_code; ///< Dialog normalization / unspecified +} DCACoreFrameHeader; + +enum DCASpeaker { + DCA_SPEAKER_C, DCA_SPEAKER_L, DCA_SPEAKER_R, DCA_SPEAKER_Ls, + DCA_SPEAKER_Rs, DCA_SPEAKER_LFE1, DCA_SPEAKER_Cs, DCA_SPEAKER_Lsr, + DCA_SPEAKER_Rsr, DCA_SPEAKER_Lss, DCA_SPEAKER_Rss, DCA_SPEAKER_Lc, + DCA_SPEAKER_Rc, DCA_SPEAKER_Lh, DCA_SPEAKER_Ch, DCA_SPEAKER_Rh, + DCA_SPEAKER_LFE2, DCA_SPEAKER_Lw, DCA_SPEAKER_Rw, DCA_SPEAKER_Oh, + DCA_SPEAKER_Lhs, DCA_SPEAKER_Rhs, DCA_SPEAKER_Chr, DCA_SPEAKER_Lhr, + DCA_SPEAKER_Rhr, DCA_SPEAKER_Cl, DCA_SPEAKER_Ll, DCA_SPEAKER_Rl, + DCA_SPEAKER_RSV1, DCA_SPEAKER_RSV2, DCA_SPEAKER_RSV3, DCA_SPEAKER_RSV4, + + DCA_SPEAKER_COUNT +}; + +enum DCASpeakerMask { + DCA_SPEAKER_MASK_C = 0x00000001, + DCA_SPEAKER_MASK_L = 0x00000002, + DCA_SPEAKER_MASK_R = 0x00000004, + DCA_SPEAKER_MASK_Ls = 0x00000008, + DCA_SPEAKER_MASK_Rs = 0x00000010, + DCA_SPEAKER_MASK_LFE1 = 0x00000020, + DCA_SPEAKER_MASK_Cs = 0x00000040, + DCA_SPEAKER_MASK_Lsr = 0x00000080, + DCA_SPEAKER_MASK_Rsr = 0x00000100, + DCA_SPEAKER_MASK_Lss = 0x00000200, + DCA_SPEAKER_MASK_Rss = 0x00000400, + DCA_SPEAKER_MASK_Lc = 0x00000800, + DCA_SPEAKER_MASK_Rc = 0x00001000, + DCA_SPEAKER_MASK_Lh = 0x00002000, + DCA_SPEAKER_MASK_Ch = 0x00004000, + DCA_SPEAKER_MASK_Rh = 0x00008000, + DCA_SPEAKER_MASK_LFE2 = 0x00010000, + DCA_SPEAKER_MASK_Lw = 0x00020000, + DCA_SPEAKER_MASK_Rw = 0x00040000, + DCA_SPEAKER_MASK_Oh = 0x00080000, + DCA_SPEAKER_MASK_Lhs = 0x00100000, + DCA_SPEAKER_MASK_Rhs = 0x00200000, + DCA_SPEAKER_MASK_Chr = 0x00400000, + DCA_SPEAKER_MASK_Lhr = 0x00800000, + DCA_SPEAKER_MASK_Rhr = 0x01000000, + DCA_SPEAKER_MASK_Cl = 0x02000000, + DCA_SPEAKER_MASK_Ll = 0x04000000, + DCA_SPEAKER_MASK_Rl = 0x08000000, +}; + +#define DCA_SPEAKER_LAYOUT_MONO (DCA_SPEAKER_MASK_C) +#define DCA_SPEAKER_LAYOUT_STEREO (DCA_SPEAKER_MASK_L | DCA_SPEAKER_MASK_R) +#define DCA_SPEAKER_LAYOUT_2POINT1 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_LFE1) +#define DCA_SPEAKER_LAYOUT_3_0 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_C) +#define DCA_SPEAKER_LAYOUT_2_1 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_Cs) +#define DCA_SPEAKER_LAYOUT_3_1 (DCA_SPEAKER_LAYOUT_3_0 | DCA_SPEAKER_MASK_Cs) +#define DCA_SPEAKER_LAYOUT_2_2 (DCA_SPEAKER_LAYOUT_STEREO | DCA_SPEAKER_MASK_Ls | DCA_SPEAKER_MASK_Rs) +#define DCA_SPEAKER_LAYOUT_5POINT0 (DCA_SPEAKER_LAYOUT_3_0 | DCA_SPEAKER_MASK_Ls | DCA_SPEAKER_MASK_Rs) +#define DCA_SPEAKER_LAYOUT_5POINT1 (DCA_SPEAKER_LAYOUT_5POINT0 | DCA_SPEAKER_MASK_LFE1) +#define DCA_SPEAKER_LAYOUT_7POINT0_WIDE (DCA_SPEAKER_LAYOUT_5POINT0 | DCA_SPEAKER_MASK_Lw | DCA_SPEAKER_MASK_Rw) +#define DCA_SPEAKER_LAYOUT_7POINT1_WIDE (DCA_SPEAKER_LAYOUT_7POINT0_WIDE | DCA_SPEAKER_MASK_LFE1) + +#define DCA_HAS_STEREO(mask) \ + ((mask & DCA_SPEAKER_LAYOUT_STEREO) == DCA_SPEAKER_LAYOUT_STEREO) + +enum DCASpeakerPair { + DCA_SPEAKER_PAIR_C = 0x0001, + DCA_SPEAKER_PAIR_LR = 0x0002, + DCA_SPEAKER_PAIR_LsRs = 0x0004, + DCA_SPEAKER_PAIR_LFE1 = 0x0008, + DCA_SPEAKER_PAIR_Cs = 0x0010, + DCA_SPEAKER_PAIR_LhRh = 0x0020, + DCA_SPEAKER_PAIR_LsrRsr = 0x0040, + DCA_SPEAKER_PAIR_Ch = 0x0080, + DCA_SPEAKER_PAIR_Oh = 0x0100, + DCA_SPEAKER_PAIR_LcRc = 0x0200, + DCA_SPEAKER_PAIR_LwRw = 0x0400, + DCA_SPEAKER_PAIR_LssRss = 0x0800, + DCA_SPEAKER_PAIR_LFE2 = 0x1000, + DCA_SPEAKER_PAIR_LhsRhs = 0x2000, + DCA_SPEAKER_PAIR_Chr = 0x4000, + DCA_SPEAKER_PAIR_LhrRhr = 0x8000 +}; + +/** + * Return number of individual channels in DCASpeakerPair mask + */ +static inline int ff_dca_count_chs_for_mask(unsigned int mask) +{ + return av_popcount((mask & 0xffff) | ((mask & 0xae66) << 16)); +} + +enum DCARepresentationType { + DCA_REPR_TYPE_LtRt = 2, + DCA_REPR_TYPE_LhRh = 3 +}; + +enum DCAExtensionMask { + DCA_CSS_CORE = 0x001, + DCA_CSS_XXCH = 0x002, + DCA_CSS_X96 = 0x004, + DCA_CSS_XCH = 0x008, + DCA_CSS_MASK = 0x00f, + DCA_EXSS_CORE = 0x010, + DCA_EXSS_XBR = 0x020, + DCA_EXSS_XXCH = 0x040, + DCA_EXSS_X96 = 0x080, + DCA_EXSS_LBR = 0x100, + DCA_EXSS_XLL = 0x200, + DCA_EXSS_RSV1 = 0x400, + DCA_EXSS_RSV2 = 0x800, + DCA_EXSS_MASK = 0xff0, +}; + +enum DCADownMixType { + DCA_DMIX_TYPE_1_0, + DCA_DMIX_TYPE_LoRo, + DCA_DMIX_TYPE_LtRt, + DCA_DMIX_TYPE_3_0, + DCA_DMIX_TYPE_2_1, + DCA_DMIX_TYPE_2_2, + DCA_DMIX_TYPE_3_1, + + DCA_DMIX_TYPE_COUNT +}; + +extern av_export_avcodec const uint32_t avpriv_dca_sample_rates[16]; + +extern const uint32_t ff_dca_sampling_freqs[16]; +extern const uint8_t ff_dca_freq_ranges[16]; +extern const uint8_t ff_dca_bits_per_sample[8]; + + +/** + * Convert bitstream to one representation based on sync marker + */ +int avpriv_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, + int max_size); + +/** + * Parse and validate core frame header + * @param[out] h Pointer to struct where header info is written. + * @param[in] buf Pointer to the data buffer + * @param[in] size Size of the data buffer + * @return 0 on success, negative AVERROR code on failure + */ +int avpriv_dca_parse_core_frame_header(DCACoreFrameHeader *h, const uint8_t *buf, int size); + +/** + * Parse and validate core frame header + * @param[out] h Pointer to struct where header info is written. + * @param[in] gbc BitContext containing the first 120 bits of the frame. + * @return 0 on success, negative DCA_PARSE_ERROR_ code on failure + */ +int ff_dca_parse_core_frame_header(DCACoreFrameHeader *h, GetBitContext *gb); + +#endif /* AVCODEC_DCA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_core.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_core.h new file mode 100644 index 00000000..10128d1e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_core.h @@ -0,0 +1,258 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_CORE_H +#define AVCODEC_DCA_CORE_H + +#include "libavutil/common.h" +#include "libavutil/float_dsp.h" +#include "libavutil/fixed_dsp.h" +#include "libavutil/mem.h" + +#include "avcodec.h" +#include "internal.h" +#include "get_bits.h" +#include "dca.h" +#include "dca_exss.h" +#include "dcadsp.h" +#include "dcadct.h" +#include "dcamath.h" +#include "dcahuff.h" +#include "fft.h" +#include "synth_filter.h" + +#define DCA_CHANNELS 7 +#define DCA_SUBBANDS 32 +#define DCA_SUBBANDS_X96 64 +#define DCA_SUBFRAMES 16 +#define DCA_SUBBAND_SAMPLES 8 +#define DCA_PCMBLOCK_SAMPLES 32 +#define DCA_LFE_HISTORY 8 +#define DCA_ABITS_MAX 26 + +#define DCA_CORE_CHANNELS_MAX 6 +#define DCA_DMIX_CHANNELS_MAX 4 +#define DCA_XXCH_CHANNELS_MAX 2 +#define DCA_EXSS_CHANNELS_MAX 8 +#define DCA_EXSS_CHSETS_MAX 4 + +#define DCA_FILTER_MODE_X96 0x01 +#define DCA_FILTER_MODE_FIXED 0x02 + +enum DCACoreAudioMode { + DCA_AMODE_MONO, // Mode 0: A (mono) + DCA_AMODE_MONO_DUAL, // Mode 1: A + B (dual mono) + DCA_AMODE_STEREO, // Mode 2: L + R (stereo) + DCA_AMODE_STEREO_SUMDIFF, // Mode 3: (L+R) + (L-R) (sum-diff) + DCA_AMODE_STEREO_TOTAL, // Mode 4: LT + RT (left and right total) + DCA_AMODE_3F, // Mode 5: C + L + R + DCA_AMODE_2F1R, // Mode 6: L + R + S + DCA_AMODE_3F1R, // Mode 7: C + L + R + S + DCA_AMODE_2F2R, // Mode 8: L + R + SL + SR + DCA_AMODE_3F2R, // Mode 9: C + L + R + SL + SR + + DCA_AMODE_COUNT +}; + +enum DCACoreExtAudioType { + DCA_EXT_AUDIO_XCH = 0, + DCA_EXT_AUDIO_X96 = 2, + DCA_EXT_AUDIO_XXCH = 6 +}; + +enum DCACoreLFEFlag { + DCA_LFE_FLAG_NONE, + DCA_LFE_FLAG_128, + DCA_LFE_FLAG_64, + DCA_LFE_FLAG_INVALID +}; + +typedef struct DCADSPData { + union { + struct { + DECLARE_ALIGNED(32, float, hist1)[1024]; + DECLARE_ALIGNED(32, float, hist2)[64]; + } flt; + struct { + DECLARE_ALIGNED(32, int32_t, hist1)[1024]; + DECLARE_ALIGNED(32, int32_t, hist2)[64]; + } fix; + } u; + int offset; +} DCADSPData; + +typedef struct DCACoreDecoder { + AVCodecContext *avctx; + GetBitContext gb; + GetBitContext gb_in; + + // Bit stream header + int crc_present; ///< CRC present flag + int npcmblocks; ///< Number of PCM sample blocks + int frame_size; ///< Primary frame byte size + int audio_mode; ///< Audio channel arrangement + int sample_rate; ///< Core audio sampling frequency + int bit_rate; ///< Transmission bit rate + int drc_present; ///< Embedded dynamic range flag + int ts_present; ///< Embedded time stamp flag + int aux_present; ///< Auxiliary data flag + int ext_audio_type; ///< Extension audio descriptor flag + int ext_audio_present; ///< Extended coding flag + int sync_ssf; ///< Audio sync word insertion flag + int lfe_present; ///< Low frequency effects flag + int predictor_history; ///< Predictor history flag switch + int filter_perfect; ///< Multirate interpolator switch + int source_pcm_res; ///< Source PCM resolution + int es_format; ///< Extended surround (ES) mastering flag + int sumdiff_front; ///< Front sum/difference flag + int sumdiff_surround; ///< Surround sum/difference flag + + // Primary audio coding header + int nsubframes; ///< Number of subframes + int nchannels; ///< Number of primary audio channels (incl. extension channels) + int ch_mask; ///< Speaker layout mask (incl. LFE and extension channels) + int8_t nsubbands[DCA_CHANNELS]; ///< Subband activity count + int8_t subband_vq_start[DCA_CHANNELS]; ///< High frequency VQ start subband + int8_t joint_intensity_index[DCA_CHANNELS]; ///< Joint intensity coding index + int8_t transition_mode_sel[DCA_CHANNELS]; ///< Transient mode code book + int8_t scale_factor_sel[DCA_CHANNELS]; ///< Scale factor code book + int8_t bit_allocation_sel[DCA_CHANNELS]; ///< Bit allocation quantizer select + int8_t quant_index_sel[DCA_CHANNELS][DCA_CODE_BOOKS]; ///< Quantization index codebook select + int32_t scale_factor_adj[DCA_CHANNELS][DCA_CODE_BOOKS]; ///< Scale factor adjustment + + // Primary audio coding side information + int8_t nsubsubframes[DCA_SUBFRAMES]; ///< Subsubframe count for each subframe + int8_t prediction_mode[DCA_CHANNELS][DCA_SUBBANDS_X96]; ///< Prediction mode + int16_t prediction_vq_index[DCA_CHANNELS][DCA_SUBBANDS_X96]; ///< Prediction coefficients VQ address + int8_t bit_allocation[DCA_CHANNELS][DCA_SUBBANDS_X96]; ///< Bit allocation index + int8_t transition_mode[DCA_SUBFRAMES][DCA_CHANNELS][DCA_SUBBANDS]; ///< Transition mode + int32_t scale_factors[DCA_CHANNELS][DCA_SUBBANDS][2]; ///< Scale factors (2x for transients and X96) + int8_t joint_scale_sel[DCA_CHANNELS]; ///< Joint subband codebook select + int32_t joint_scale_factors[DCA_CHANNELS][DCA_SUBBANDS_X96]; ///< Scale factors for joint subband coding + + // Auxiliary data + int prim_dmix_embedded; ///< Auxiliary dynamic downmix flag + int prim_dmix_type; ///< Auxiliary primary channel downmix type + int prim_dmix_coeff[DCA_DMIX_CHANNELS_MAX * DCA_CORE_CHANNELS_MAX]; ///< Dynamic downmix code coefficients + + // Core extensions + int ext_audio_mask; ///< Bit mask of fully decoded core extensions + + // XCH extension data + int xch_pos; ///< Bit position of XCH frame in core substream + + // XXCH extension data + int xxch_crc_present; ///< CRC presence flag for XXCH channel set header + int xxch_mask_nbits; ///< Number of bits for loudspeaker mask + int xxch_core_mask; ///< Core loudspeaker activity mask + int xxch_spkr_mask; ///< Loudspeaker layout mask + int xxch_dmix_embedded; ///< Downmix already performed by encoder + int xxch_dmix_scale_inv; ///< Downmix scale factor + int xxch_dmix_mask[DCA_XXCH_CHANNELS_MAX]; ///< Downmix channel mapping mask + int xxch_dmix_coeff[DCA_XXCH_CHANNELS_MAX * DCA_CORE_CHANNELS_MAX]; ///< Downmix coefficients + int xxch_pos; ///< Bit position of XXCH frame in core substream + + // X96 extension data + int x96_rev_no; ///< X96 revision number + int x96_crc_present; ///< CRC presence flag for X96 channel set header + int x96_nchannels; ///< Number of primary channels in X96 extension + int x96_high_res; ///< X96 high resolution flag + int x96_subband_start; ///< First encoded subband in X96 extension + int x96_rand; ///< Random seed for generating samples for unallocated X96 subbands + int x96_pos; ///< Bit position of X96 frame in core substream + + // Sample buffers + unsigned int x96_subband_size; + int32_t *x96_subband_buffer; ///< X96 subband sample buffer base + int32_t *x96_subband_samples[DCA_CHANNELS][DCA_SUBBANDS_X96]; ///< X96 subband samples + + unsigned int subband_size; + int32_t *subband_buffer; ///< Subband sample buffer base + int32_t *subband_samples[DCA_CHANNELS][DCA_SUBBANDS]; ///< Subband samples + int32_t *lfe_samples; ///< Decimated LFE samples + + // DSP contexts + DCADSPData dcadsp_data[DCA_CHANNELS]; ///< FIR history buffers + DCADSPContext *dcadsp; + DCADCTContext dcadct; + FFTContext imdct[2]; + SynthFilterContext synth; + AVFloatDSPContext *float_dsp; + AVFixedDSPContext *fixed_dsp; + + // PCM output data + unsigned int output_size; + void *output_buffer; ///< PCM output buffer base + int32_t *output_samples[DCA_SPEAKER_COUNT]; ///< PCM output for fixed point mode + int32_t output_history_lfe_fixed; ///< LFE PCM history for X96 filter + float output_history_lfe_float; ///< LFE PCM history for X96 filter + + int ch_remap[DCA_SPEAKER_COUNT]; ///< Channel to speaker map + int request_mask; ///< Requested channel layout (for stereo downmix) + + int npcmsamples; ///< Number of PCM samples per channel + int output_rate; ///< Output sample rate (1x or 2x header rate) + + int filter_mode; ///< Previous filtering mode for detecting changes +} DCACoreDecoder; + +static inline int ff_dca_core_map_spkr(DCACoreDecoder *core, int spkr) +{ + if (core->ch_mask & (1U << spkr)) + return spkr; + if (spkr == DCA_SPEAKER_Lss && (core->ch_mask & DCA_SPEAKER_MASK_Ls)) + return DCA_SPEAKER_Ls; + if (spkr == DCA_SPEAKER_Rss && (core->ch_mask & DCA_SPEAKER_MASK_Rs)) + return DCA_SPEAKER_Rs; + return -1; +} + +static inline void ff_dca_core_dequantize(int32_t *output, const int32_t *input, + int32_t step_size, int32_t scale, int residual, int len) +{ + // Account for quantizer step size + int64_t step_scale = (int64_t)step_size * scale; + int n, shift = 0; + + // Limit scale factor resolution to 22 bits + if (step_scale > (1 << 23)) { + shift = av_log2(step_scale >> 23) + 1; + step_scale >>= shift; + } + + // Scale the samples + if (residual) { + for (n = 0; n < len; n++) + output[n] += clip23(norm__(input[n] * step_scale, 22 - shift)); + } else { + for (n = 0; n < len; n++) + output[n] = clip23(norm__(input[n] * step_scale, 22 - shift)); + } +} + +int ff_dca_core_parse(DCACoreDecoder *s, uint8_t *data, int size); +int ff_dca_core_parse_exss(DCACoreDecoder *s, uint8_t *data, DCAExssAsset *asset); +int ff_dca_core_filter_fixed(DCACoreDecoder *s, int x96_synth); +int ff_dca_core_filter_frame(DCACoreDecoder *s, AVFrame *frame); +av_cold void ff_dca_core_flush(DCACoreDecoder *s); +av_cold int ff_dca_core_init(DCACoreDecoder *s); +av_cold void ff_dca_core_close(DCACoreDecoder *s); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_exss.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_exss.h new file mode 100644 index 00000000..208fae1b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_exss.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_EXSS_H +#define AVCODEC_DCA_EXSS_H + +#include "libavutil/common.h" + +#include "avcodec.h" +#include "get_bits.h" + +typedef struct DCAExssAsset { + int asset_offset; ///< Offset to asset data from start of substream + int asset_size; ///< Size of encoded asset data + int asset_index; ///< Audio asset identifier + + int pcm_bit_res; ///< PCM bit resolution + int max_sample_rate; ///< Maximum sample rate + int nchannels_total; ///< Total number of channels + int one_to_one_map_ch_to_spkr; ///< One to one channel to speaker mapping flag + int embedded_stereo; ///< Embedded stereo flag + int embedded_6ch; ///< Embedded 6 channels flag + int spkr_mask_enabled; ///< Speaker mask enabled flag + int spkr_mask; ///< Loudspeaker activity mask + int representation_type; ///< Representation type + + int coding_mode; ///< Coding mode for the asset + int extension_mask; ///< Coding components used in asset + + int core_offset; ///< Offset to core component from start of substream + int core_size; ///< Size of core component in extension substream + + int xbr_offset; ///< Offset to XBR extension from start of substream + int xbr_size; ///< Size of XBR extension in extension substream + + int xxch_offset; ///< Offset to XXCH extension from start of substream + int xxch_size; ///< Size of XXCH extension in extension substream + + int x96_offset; ///< Offset to X96 extension from start of substream + int x96_size; ///< Size of X96 extension in extension substream + + int lbr_offset; ///< Offset to LBR component from start of substream + int lbr_size; ///< Size of LBR component in extension substream + + int xll_offset; ///< Offset to XLL data from start of substream + int xll_size; ///< Size of XLL data in extension substream + int xll_sync_present; ///< XLL sync word present flag + int xll_delay_nframes; ///< Initial XLL decoding delay in frames + int xll_sync_offset; ///< Number of bytes offset to XLL sync + + int hd_stream_id; ///< DTS-HD stream ID +} DCAExssAsset; + +typedef struct DCAExssParser { + AVCodecContext *avctx; + GetBitContext gb; + + int exss_index; ///< Extension substream index + int exss_size_nbits; ///< Number of bits for extension substream size + int exss_size; ///< Number of bytes of extension substream + + int static_fields_present; ///< Per stream static fields presence flag + int npresents; ///< Number of defined audio presentations + int nassets; ///< Number of audio assets in extension substream + + int mix_metadata_enabled; ///< Mixing metadata enable flag + int nmixoutconfigs; ///< Number of mixing configurations + int nmixoutchs[4]; ///< Speaker layout mask for mixer output channels + + DCAExssAsset assets[1]; ///< Audio asset descriptors +} DCAExssParser; + +int ff_dca_exss_parse(DCAExssParser *s, const uint8_t *data, int size); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_lbr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_lbr.h new file mode 100644 index 00000000..6d4c0a8a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_lbr.h @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_LBR_H +#define AVCODEC_DCA_LBR_H + +#include "libavutil/common.h" +#include "libavutil/float_dsp.h" +#include "libavutil/mem.h" + +#include "avcodec.h" +#include "internal.h" +#include "get_bits.h" +#include "dca.h" +#include "dca_exss.h" +#include "dcadsp.h" +#include "fft.h" + +#define DCA_LBR_CHANNELS 6 +#define DCA_LBR_CHANNELS_TOTAL 32 +#define DCA_LBR_SUBBANDS 32 +#define DCA_LBR_TONES 512 + +#define DCA_LBR_TIME_SAMPLES 128 +#define DCA_LBR_TIME_HISTORY 8 + +enum DCALBRHeader { + DCA_LBR_HEADER_SYNC_ONLY = 1, + DCA_LBR_HEADER_DECODER_INIT = 2 +}; + +typedef struct DCALbrTone { + uint8_t x_freq; ///< Spectral line offset + uint8_t f_delt; ///< Difference between original and center frequency + uint8_t ph_rot; ///< Phase rotation + uint8_t pad; ///< Padding field + uint8_t amp[DCA_LBR_CHANNELS]; ///< Per-channel amplitude + uint8_t phs[DCA_LBR_CHANNELS]; ///< Per-channel phase +} DCALbrTone; + +typedef struct DCALbrDecoder { + AVCodecContext *avctx; + GetBitContext gb; + + int sample_rate; ///< Sample rate of LBR audio + int ch_mask; ///< LBR speaker mask + int flags; ///< Flags for LBR decoder initialization + int bit_rate_orig; ///< Original bit rate + int bit_rate_scaled; ///< Scaled bit rate + + int nchannels; ///< Number of fullband channels to decode + int nchannels_total; ///< Total number of fullband channels + int freq_range; ///< Frequency range of LBR audio + int band_limit; ///< Band limit factor + int limited_rate; ///< Band limited sample rate + int limited_range; ///< Band limited frequency range + int res_profile; ///< Resolution profile + int nsubbands; ///< Number of encoded subbands + int g3_avg_only_start_sb; ///< Subband index where grid 3 scale factors end + int min_mono_subband; ///< Subband index where mono encoding starts + int max_mono_subband; ///< Subband index where mono encoding ends + + int framenum; ///< Lower 5 bits of current frame number + int lbr_rand; ///< Seed for subband randomization + int warned; ///< Flags for warning suppression + + uint8_t quant_levels[DCA_LBR_CHANNELS / 2][DCA_LBR_SUBBANDS]; ///< Quantization levels + uint8_t sb_indices[DCA_LBR_SUBBANDS]; ///< Subband reordering indices + + uint8_t sec_ch_sbms[DCA_LBR_CHANNELS / 2][DCA_LBR_SUBBANDS]; ///< Right channel inversion or mid/side decoding flags + uint8_t sec_ch_lrms[DCA_LBR_CHANNELS / 2][DCA_LBR_SUBBANDS]; ///< Flags indicating if left/right channel are swapped + uint32_t ch_pres[DCA_LBR_CHANNELS]; ///< Subband allocation flags + + uint8_t grid_1_scf[DCA_LBR_CHANNELS][12][8]; ///< Grid 1 scale factors + uint8_t grid_2_scf[DCA_LBR_CHANNELS][3][64]; ///< Grid 2 scale factors + + int8_t grid_3_avg[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS - 4]; ///< Grid 3 average values + int8_t grid_3_scf[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS - 4][8]; ///< Grid 3 scale factors + uint32_t grid_3_pres[DCA_LBR_CHANNELS]; ///< Grid 3 scale factors presence flags + + uint8_t high_res_scf[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS][8]; ///< High-frequency resolution scale factors + + uint8_t part_stereo[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS / 4][5]; ///< Partial stereo coefficients + uint8_t part_stereo_pres; ///< Partial stereo coefficients presence flags + + float lpc_coeff[2][DCA_LBR_CHANNELS][3][2][8]; ///< Predictor coefficients + + float sb_scf[DCA_LBR_SUBBANDS]; ///< Subband randomization scale factors + + float *time_samples[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS]; ///< Time samples + + float *ts_buffer; ///< Time sample buffer base + unsigned int ts_size; ///< Time sample buffer size + + DECLARE_ALIGNED(32, float, history)[DCA_LBR_CHANNELS][DCA_LBR_SUBBANDS * 4]; ///< IMDCT history + DECLARE_ALIGNED(32, float, window)[DCA_LBR_SUBBANDS * 4]; ///< Long window for IMDCT + + DECLARE_ALIGNED(32, float, lfe_data)[64]; ///< Decimated LFE samples + DECLARE_ALIGNED(32, float, lfe_history)[5][2]; ///< LFE IIR filter history + float lfe_scale; ///< Scale factor of LFE samples before IIR filter + + uint8_t tonal_scf[6]; ///< Tonal scale factors + uint16_t tonal_bounds[5][32][2]; ///< Per-group per-subframe start/end positions of tones + DCALbrTone tones[DCA_LBR_TONES]; ///< Circular buffer of tones + int ntones; ///< Circular buffer head position + + FFTContext imdct; + AVFloatDSPContext *fdsp; + DCADSPContext *dcadsp; +} DCALbrDecoder; + +int ff_dca_lbr_parse(DCALbrDecoder *s, uint8_t *data, DCAExssAsset *asset); +int ff_dca_lbr_filter_frame(DCALbrDecoder *s, AVFrame *frame); +av_cold void ff_dca_lbr_flush(DCALbrDecoder *s); +av_cold int ff_dca_lbr_init(DCALbrDecoder *s); +av_cold void ff_dca_lbr_close(DCALbrDecoder *s); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_syncwords.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_syncwords.h new file mode 100644 index 00000000..4d2cd5f5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_syncwords.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_SYNCWORDS_H +#define AVCODEC_DCA_SYNCWORDS_H + +#define DCA_SYNCWORD_CORE_BE 0x7FFE8001U +#define DCA_SYNCWORD_CORE_LE 0xFE7F0180U +#define DCA_SYNCWORD_CORE_14B_BE 0x1FFFE800U +#define DCA_SYNCWORD_CORE_14B_LE 0xFF1F00E8U +#define DCA_SYNCWORD_XCH 0x5A5A5A5AU +#define DCA_SYNCWORD_XXCH 0x47004A03U +#define DCA_SYNCWORD_X96 0x1D95F262U +#define DCA_SYNCWORD_XBR 0x655E315EU +#define DCA_SYNCWORD_LBR 0x0A801921U +#define DCA_SYNCWORD_XLL 0x41A29547U +#define DCA_SYNCWORD_SUBSTREAM 0x64582025U +#define DCA_SYNCWORD_SUBSTREAM_CORE 0x02B09261U +#define DCA_SYNCWORD_REV1AUX 0x9A1105A0U + +#endif /* AVCODEC_DCA_SYNCWORDS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_xll.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_xll.h new file mode 100644 index 00000000..bc0aa65b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dca_xll.h @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCA_XLL_H +#define AVCODEC_DCA_XLL_H + +#include "libavutil/common.h" +#include "libavutil/mem.h" + +#include "avcodec.h" +#include "internal.h" +#include "get_bits.h" +#include "dca.h" +#include "dcadsp.h" +#include "dca_exss.h" + +#define DCA_XLL_CHSETS_MAX 3 +#define DCA_XLL_CHANNELS_MAX 8 +#define DCA_XLL_BANDS_MAX 2 +#define DCA_XLL_ADAPT_PRED_ORDER_MAX 16 +#define DCA_XLL_DECI_HISTORY_MAX 8 +#define DCA_XLL_DMIX_SCALES_MAX ((DCA_XLL_CHSETS_MAX - 1) * DCA_XLL_CHANNELS_MAX) +#define DCA_XLL_DMIX_COEFFS_MAX (DCA_XLL_DMIX_SCALES_MAX * DCA_XLL_CHANNELS_MAX) +#define DCA_XLL_PBR_BUFFER_MAX (240 << 10) +#define DCA_XLL_SAMPLE_BUFFERS_MAX 3 + +typedef struct DCAXllBand { + int decor_enabled; ///< Pairwise channel decorrelation flag + int orig_order[DCA_XLL_CHANNELS_MAX]; ///< Original channel order + int decor_coeff[DCA_XLL_CHANNELS_MAX / 2]; ///< Pairwise channel coefficients + + int adapt_pred_order[DCA_XLL_CHANNELS_MAX]; ///< Adaptive predictor order + int highest_pred_order; ///< Highest adaptive predictor order + int fixed_pred_order[DCA_XLL_CHANNELS_MAX]; ///< Fixed predictor order + int adapt_refl_coeff[DCA_XLL_CHANNELS_MAX][DCA_XLL_ADAPT_PRED_ORDER_MAX]; ///< Adaptive predictor reflection coefficients + + int dmix_embedded; ///< Downmix performed by encoder in frequency band + + int lsb_section_size; ///< Size of LSB section in any segment + int nscalablelsbs[DCA_XLL_CHANNELS_MAX]; ///< Number of bits to represent the samples in LSB part + int bit_width_adjust[DCA_XLL_CHANNELS_MAX]; ///< Number of bits discarded by authoring + + int32_t *msb_sample_buffer[DCA_XLL_CHANNELS_MAX]; ///< MSB sample buffer pointers + int32_t *lsb_sample_buffer[DCA_XLL_CHANNELS_MAX]; ///< LSB sample buffer pointers or NULL +} DCAXllBand; + +typedef struct DCAXllChSet { + // Channel set header + int nchannels; ///< Number of channels in the channel set (N) + int residual_encode; ///< Residual encoding mask (0 - residual, 1 - full channel) + int pcm_bit_res; ///< PCM bit resolution (variable) + int storage_bit_res; ///< Storage bit resolution (16 or 24) + int freq; ///< Original sampling frequency (max. 96000 Hz) + + int primary_chset; ///< Primary channel set flag + int dmix_coeffs_present; ///< Downmix coefficients present in stream + int dmix_embedded; ///< Downmix already performed by encoder + int dmix_type; ///< Primary channel set downmix type + int hier_chset; ///< Whether the channel set is part of a hierarchy + int hier_ofs; ///< Number of preceding channels in a hierarchy (M) + int dmix_coeff[DCA_XLL_DMIX_COEFFS_MAX]; ///< Downmixing coefficients + int dmix_scale[DCA_XLL_DMIX_SCALES_MAX]; ///< Downmixing scales + int dmix_scale_inv[DCA_XLL_DMIX_SCALES_MAX]; ///< Inverse downmixing scales + int ch_mask; ///< Channel mask for set + int ch_remap[DCA_XLL_CHANNELS_MAX]; ///< Channel to speaker map + + int nfreqbands; ///< Number of frequency bands (1 or 2) + int nabits; ///< Number of bits to read bit allocation coding parameter + + DCAXllBand bands[DCA_XLL_BANDS_MAX]; ///< Frequency bands + + // Frequency band coding parameters + int seg_common; ///< Segment type + int rice_code_flag[DCA_XLL_CHANNELS_MAX]; ///< Rice coding flag + int bitalloc_hybrid_linear[DCA_XLL_CHANNELS_MAX]; ///< Binary code length for isolated samples + int bitalloc_part_a[DCA_XLL_CHANNELS_MAX]; ///< Coding parameter for part A of segment + int bitalloc_part_b[DCA_XLL_CHANNELS_MAX]; ///< Coding parameter for part B of segment + int nsamples_part_a[DCA_XLL_CHANNELS_MAX]; ///< Number of samples in part A of segment + + // Decimator history + DECLARE_ALIGNED(32, int32_t, deci_history)[DCA_XLL_CHANNELS_MAX][DCA_XLL_DECI_HISTORY_MAX]; ///< Decimator history for frequency band 1 + + // Sample buffers + unsigned int sample_size[DCA_XLL_SAMPLE_BUFFERS_MAX]; + int32_t *sample_buffer[DCA_XLL_SAMPLE_BUFFERS_MAX]; +} DCAXllChSet; + +typedef struct DCAXllDecoder { + AVCodecContext *avctx; + GetBitContext gb; + + int frame_size; ///< Number of bytes in a lossless frame + int nchsets; ///< Number of channels sets per frame + int nframesegs; ///< Number of segments per frame + int nsegsamples_log2; ///< log2(nsegsamples) + int nsegsamples; ///< Samples in segment per one frequency band + int nframesamples_log2; ///< log2(nframesamples) + int nframesamples; ///< Samples in frame per one frequency band + int seg_size_nbits; ///< Number of bits used to read segment size + int band_crc_present; ///< Presence of CRC16 within each frequency band + int scalable_lsbs; ///< MSB/LSB split flag + int ch_mask_nbits; ///< Number of bits used to read channel mask + int fixed_lsb_width; ///< Fixed LSB width + + DCAXllChSet chset[DCA_XLL_CHSETS_MAX]; ///< Channel sets + + int *navi; ///< NAVI table + unsigned int navi_size; + + int nfreqbands; ///< Highest number of frequency bands + int nchannels; ///< Total number of channels in a hierarchy + int nreschsets; ///< Number of channel sets that have residual encoded channels + int nactivechsets; ///< Number of active channel sets to decode + + int hd_stream_id; ///< Previous DTS-HD stream ID for detecting changes + + uint8_t *pbr_buffer; ///< Peak bit rate (PBR) smoothing buffer + int pbr_length; ///< Length in bytes of data currently buffered + int pbr_delay; ///< Delay in frames before decoding buffered data + + DCADSPContext *dcadsp; + + int output_mask; + int32_t *output_samples[DCA_SPEAKER_COUNT]; +} DCAXllDecoder; + +int ff_dca_xll_parse(DCAXllDecoder *s, uint8_t *data, DCAExssAsset *asset); +int ff_dca_xll_filter_frame(DCAXllDecoder *s, AVFrame *frame); +av_cold void ff_dca_xll_flush(DCAXllDecoder *s); +av_cold void ff_dca_xll_close(DCAXllDecoder *s); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaadpcm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaadpcm.h new file mode 100644 index 00000000..23bfa796 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaadpcm.h @@ -0,0 +1,54 @@ +/* + * DCA ADPCM engine + * Copyright (C) 2017 Daniil Cherednik + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCAADPCM_H +#define AVCODEC_DCAADPCM_H + +#include "dcamath.h" +#include "dcadata.h" +#include "dcaenc.h" + +typedef struct DCAADPCMEncContext { + void *private_data; +} DCAADPCMEncContext; + +static inline int64_t ff_dcaadpcm_predict(int pred_vq_index, const int32_t *input) +{ + int i; + const int16_t *coeff = ff_dca_adpcm_vb[pred_vq_index]; + int64_t pred = 0; + for (i = 0; i < DCA_ADPCM_COEFFS; i++) + pred += (int64_t)input[DCA_ADPCM_COEFFS - 1 - i] * coeff[i]; + + return clip23(norm13(pred)); +} + +int ff_dcaadpcm_subband_analysis(const DCAADPCMEncContext *s, const int32_t *input, int len, int *diff); + +int ff_dcaadpcm_do_real(int pred_vq_index, + softfloat quant, int32_t scale_factor, int32_t step_size, + const int32_t *prev_hist, const int32_t *in, int32_t *next_hist, int32_t *out, + int len, int32_t peak); + +av_cold int ff_dcaadpcm_init(DCAADPCMEncContext *s); +av_cold void ff_dcaadpcm_free(DCAADPCMEncContext *s); + +#endif /* AVCODEC_DCAADPCM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadata.h new file mode 100644 index 00000000..5aa85b34 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadata.h @@ -0,0 +1,127 @@ +/* + * DCA compatible decoder data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCADATA_H +#define AVCODEC_DCADATA_H + +#include + +#include "dcahuff.h" + +#define DCA_ADPCM_COEFFS 4 +#define DCA_ADPCM_VQCODEBOOK_SZ 4096 + +extern const uint32_t ff_dca_bit_rates[32]; + +extern const uint8_t ff_dca_channels[16]; + +extern const uint8_t ff_dca_dmix_primary_nch[8]; + +extern const uint8_t ff_dca_quant_index_sel_nbits[DCA_CODE_BOOKS]; +extern const uint8_t ff_dca_quant_index_group_size[DCA_CODE_BOOKS]; + +extern const int16_t ff_dca_adpcm_vb[DCA_ADPCM_VQCODEBOOK_SZ][DCA_ADPCM_COEFFS]; + +extern const uint32_t ff_dca_scale_factor_quant6[64]; +extern const uint32_t ff_dca_scale_factor_quant7[128]; + +extern const uint32_t ff_dca_joint_scale_factors[129]; + +extern const uint32_t ff_dca_scale_factor_adj[4]; + +extern const uint32_t ff_dca_quant_levels[32]; + +extern const uint32_t ff_dca_lossy_quant[32]; + +extern const uint32_t ff_dca_lossless_quant[32]; + +extern const int8_t ff_dca_high_freq_vq[1024][32]; + +extern const float ff_dca_fir_32bands_perfect[512]; +extern const float ff_dca_fir_32bands_nonperfect[512]; + +extern const float ff_dca_lfe_fir_64[256]; +extern const float ff_dca_lfe_fir_128[256]; +extern const float ff_dca_fir_64bands[1024]; + +extern const int32_t ff_dca_fir_32bands_perfect_fixed[512]; +extern const int32_t ff_dca_fir_32bands_nonperfect_fixed[512]; +extern const int32_t ff_dca_lfe_fir_64_fixed[256]; +extern const int32_t ff_dca_fir_64bands_fixed[1024]; + +#define FF_DCA_DMIXTABLE_SIZE 242U +#define FF_DCA_INV_DMIXTABLE_SIZE 201U +#define FF_DCA_DMIXTABLE_OFFSET (FF_DCA_DMIXTABLE_SIZE - FF_DCA_INV_DMIXTABLE_SIZE) + +extern const uint16_t ff_dca_dmixtable[FF_DCA_DMIXTABLE_SIZE]; +extern const uint32_t ff_dca_inv_dmixtable[FF_DCA_INV_DMIXTABLE_SIZE]; + +extern const uint16_t ff_dca_xll_refl_coeff[128]; + +extern const int32_t ff_dca_xll_band_coeff[20]; + +extern const uint16_t ff_dca_avg_g3_freqs[3]; + +extern const uint16_t ff_dca_fst_amp[44]; + +extern const uint8_t ff_dca_freq_to_sb[32]; + +extern const int8_t ff_dca_ph0_shift[8]; + +extern const uint8_t ff_dca_grid_1_to_scf[11]; +extern const uint8_t ff_dca_grid_2_to_scf[3]; + +extern const uint8_t ff_dca_scf_to_grid_1[32]; +extern const uint8_t ff_dca_scf_to_grid_2[32]; + +extern const uint8_t ff_dca_grid_1_weights[12][32]; + +extern const uint8_t ff_dca_sb_reorder[8][8]; + +extern const int8_t ff_dca_lfe_delta_index_16[8]; +extern const int8_t ff_dca_lfe_delta_index_24[32]; + +extern const uint16_t ff_dca_rsd_pack_5_in_8[256]; +extern const uint8_t ff_dca_rsd_pack_3_in_7[128][3]; + +extern const float ff_dca_rsd_level_2a[2]; +extern const float ff_dca_rsd_level_2b[2]; +extern const float ff_dca_rsd_level_3[3]; +extern const float ff_dca_rsd_level_5[5]; +extern const float ff_dca_rsd_level_8[8]; +extern const float ff_dca_rsd_level_16[16]; + +extern const float ff_dca_synth_env[32]; + +extern const float ff_dca_corr_cf[32][11]; + +extern const float ff_dca_quant_amp[57]; + +extern const float ff_dca_st_coeff[34]; + +extern const float ff_dca_long_window[128]; + +extern const float ff_dca_lfe_step_size_16[101]; +extern const float ff_dca_lfe_step_size_24[144]; + +extern const float ff_dca_bank_coeff[10]; +extern const float ff_dca_lfe_iir[5][4]; + +#endif /* AVCODEC_DCADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadct.h new file mode 100644 index 00000000..518c9f90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadct.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCADCT_H +#define AVCODEC_DCADCT_H + +#include "libavutil/common.h" + +typedef struct DCADCTContext { + void (*imdct_half[2])(int32_t *output, const int32_t *input); +} DCADCTContext; + +av_cold void ff_dcadct_init(DCADCTContext *c); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadec.h new file mode 100644 index 00000000..9da8d3b4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadec.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCADEC_H +#define AVCODEC_DCADEC_H + +#include "libavutil/common.h" +#include "libavutil/crc.h" +#include "libavutil/float_dsp.h" + +#include "avcodec.h" +#include "get_bits.h" +#include "dca.h" +#include "dcadsp.h" +#include "dca_core.h" +#include "dca_exss.h" +#include "dca_xll.h" +#include "dca_lbr.h" + +#define DCA_PACKET_CORE 0x01 +#define DCA_PACKET_EXSS 0x02 +#define DCA_PACKET_XLL 0x04 +#define DCA_PACKET_LBR 0x08 +#define DCA_PACKET_MASK 0x0f + +#define DCA_PACKET_RECOVERY 0x10 ///< Sync error recovery flag +#define DCA_PACKET_RESIDUAL 0x20 ///< Core valid for residual decoding + +typedef struct DCAContext { + const AVClass *class; ///< class for AVOptions + AVCodecContext *avctx; + + DCACoreDecoder core; ///< Core decoder context + DCAExssParser exss; ///< EXSS parser context + DCAXllDecoder xll; ///< XLL decoder context + DCALbrDecoder lbr; ///< LBR decoder context + + DCADSPContext dcadsp; + + const AVCRC *crctab; + + uint8_t *buffer; ///< Packet buffer + unsigned int buffer_size; + + int packet; ///< Packet flags + + int request_channel_layout; ///< Converted from avctx.request_channel_layout + int core_only; ///< Core only decoding flag +} DCAContext; + +int ff_dca_set_channel_layout(AVCodecContext *avctx, int *ch_remap, int dca_mask); + +void ff_dca_downmix_to_stereo_fixed(DCADSPContext *dcadsp, int32_t **samples, + int *coeff_l, int nsamples, int ch_mask); +void ff_dca_downmix_to_stereo_float(AVFloatDSPContext *fdsp, float **samples, + int *coeff_l, int nsamples, int ch_mask); + +static inline int ff_dca_check_crc(AVCodecContext *avctx, GetBitContext *s, + int p1, int p2) +{ + DCAContext *dca = avctx->priv_data; + + if (!(avctx->err_recognition & (AV_EF_CRCCHECK | AV_EF_CAREFUL))) + return 0; + if (((p1 | p2) & 7) || p1 < 0 || p2 > s->size_in_bits || p2 - p1 < 16) + return -1; + if (av_crc(dca->crctab, 0xffff, s->buffer + p1 / 8, (p2 - p1) / 8)) + return -1; + return 0; +} + +static inline int ff_dca_seek_bits(GetBitContext *s, int p) +{ + if (p < get_bits_count(s) || p > s->size_in_bits) + return -1; + skip_bits_long(s, p - get_bits_count(s)); + return 0; +} + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadsp.h new file mode 100644 index 00000000..8f2f4670 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcadsp.h @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCADSP_H +#define AVCODEC_DCADSP_H + +#include "libavutil/common.h" + +#include "fft.h" +#include "dcadct.h" +#include "synth_filter.h" + +typedef struct DCADSPContext { + void (*decode_hf)(int32_t **dst, + const int32_t *vq_index, + const int8_t hf_vq[1024][32], + int32_t scale_factors[32][2], + ptrdiff_t sb_start, ptrdiff_t sb_end, + ptrdiff_t ofs, ptrdiff_t len); + + void (*decode_joint)(int32_t **dst, int32_t **src, + const int32_t *scale_factors, + ptrdiff_t sb_start, ptrdiff_t sb_end, + ptrdiff_t ofs, ptrdiff_t len); + + void (*lfe_fir_float[2])(float *pcm_samples, int32_t *lfe_samples, + const float *filter_coeff, ptrdiff_t npcmblocks); + + void (*lfe_x96_float)(float *dst, const float *src, + float *hist, ptrdiff_t len); + + void (*sub_qmf_float[2])(SynthFilterContext *synth, + FFTContext *imdct, + float *pcm_samples, + int32_t **subband_samples_lo, + int32_t **subband_samples_hi, + float *hist1, int *offset, float *hist2, + const float *filter_coeff, ptrdiff_t npcmblocks, + float scale); + + void (*lfe_fir_fixed)(int32_t *pcm_samples, int32_t *lfe_samples, + const int32_t *filter_coeff, ptrdiff_t npcmblocks); + + void (*lfe_x96_fixed)(int32_t *dst, const int32_t *src, + int32_t *hist, ptrdiff_t len); + + void (*sub_qmf_fixed[2])(SynthFilterContext *synth, + DCADCTContext *imdct, + int32_t *pcm_samples, + int32_t **subband_samples_lo, + int32_t **subband_samples_hi, + int32_t *hist1, int *offset, int32_t *hist2, + const int32_t *filter_coeff, ptrdiff_t npcmblocks); + + void (*decor)(int32_t *dst, const int32_t *src, int coeff, ptrdiff_t len); + + void (*dmix_sub_xch)(int32_t *dst1, int32_t *dst2, + const int32_t *src, ptrdiff_t len); + + void (*dmix_sub)(int32_t *dst, const int32_t *src, int coeff, ptrdiff_t len); + + void (*dmix_add)(int32_t *dst, const int32_t *src, int coeff, ptrdiff_t len); + + void (*dmix_scale)(int32_t *dst, int scale, ptrdiff_t len); + + void (*dmix_scale_inv)(int32_t *dst, int scale_inv, ptrdiff_t len); + + void (*assemble_freq_bands)(int32_t *dst, int32_t *src0, int32_t *src1, + const int32_t *coeff, ptrdiff_t len); + + void (*lbr_bank)(float output[32][4], float **input, + const float *coeff, ptrdiff_t ofs, ptrdiff_t len); + + void (*lfe_iir)(float *output, const float *input, + const float iir[5][4], float hist[5][2], + ptrdiff_t factor); +} DCADSPContext; + +av_cold void ff_dcadsp_init(DCADSPContext *s); +av_cold void ff_dcadsp_init_x86(DCADSPContext *s); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaenc.h new file mode 100644 index 00000000..63fdaf07 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcaenc.h @@ -0,0 +1,158 @@ +/* + * DCA encoder tables + * Copyright (C) 2008-2012 Alexander E. Patrakov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCAENC_H +#define AVCODEC_DCAENC_H + +#include + +#include "dcamath.h" + +typedef struct { + int32_t m; + int32_t e; +} softfloat; + +static const int sample_rates[] = { + 8000, 16000, 32000, 11025, 22050, 44100, 12000, 24000, 48000, 0, +}; + +static const uint8_t bitstream_sfreq[] = { 1, 2, 3, 6, 7, 8, 11, 12, 13 }; + +/* Auditory filter center frequencies and bandwidths, in Hz. + * The last two are made up, because there is no scientific data. + */ +static const uint16_t fc[] = { + 50, 150, 250, 350, 450, 570, 700, 840, 1000, 1170, 1370, 1600, 1850, 2150, + 2500, 2900, 3400, 4000, 4800, 5800, 7000, 8500, 10500, 13500, 17000 +}; + +static const uint16_t erb[] = { + 80, 100, 100, 100, 110, 120, 140, 150, 160, 190, 210, 240, 280, + 320, 380, 450, 550, 700, 900, 1100, 1300, 1800, 2500, 3500, 4500 +}; + +static const softfloat stepsize_inv[27] = { + {0, 0}, {1342177360, 21}, {2147483647, 21}, {1342177360, 20}, + {1819901661, 20}, {2147483647, 20}, {1278263843, 19}, {1579032492, 19}, + {1412817763, 18}, {1220162327, 17}, {1118482133, 16}, {1917391412, 16}, + {1766017772, 15}, {1525212826, 14}, {1290553940, 13}, {2097179000, 13}, + {1677683200, 12}, {1497972244, 11}, {1310893147, 10}, {1165354136, 9}, + {1748031204, 9}, {1542092044, 8}, {1636178017, 7}, {1636178017, 6}, + {1636178017, 5}, {1636178017, 4}, {1636178017, 3}, +}; + +static const softfloat scalefactor_inv[128] = { + {2147483647, 1}, {2147483647, 1}, {2147483647, 2}, {2147483647, 2}, + {2147483647, 2}, {2147483647, 2}, {1431655765, 2}, {1431655765, 2}, + {1431655765, 2}, {2147483647, 3}, {2147483647, 3}, {1717986918, 3}, + {1431655765, 3}, {1227133513, 3}, {1227133513, 3}, {2147483647, 4}, + {1717986918, 4}, {1561806289, 4}, {1431655765, 4}, {1227133513, 4}, + {2147483647, 5}, {1908874353, 5}, {1717986918, 5}, {1493901668, 5}, + {1321528398, 5}, {1145324612, 5}, {2021161080, 6}, {1808407282, 6}, + {1561806289, 6}, {1374389534, 6}, {1227133513, 6}, {2147483647, 7}, + {1908874353, 7}, {1676084798, 7}, {1477838209, 7}, {1296593900, 7}, + {1145324612, 7}, {2021161080, 8}, {1773405851, 8}, {1561806289, 8}, + {1374389534, 8}, {1216273924, 8}, {2139127680, 9}, {1882725390, 9}, + {1660893697, 9}, {1462116526, 9}, {1287484341, 9}, {1135859119, 9}, + {1999112050, 10}, {1762037865, 10}, {1552982525, 10}, {1367551775, 10}, + {1205604855, 10}, {2124660150, 11}, {1871509153, 11}, {1648443220, 11}, + {1452459217, 11}, {1279990253, 11}, {1127704233, 11}, {1987368509, 12}, + {1750814693, 12}, {1542632939, 12}, {1359099663, 12}, {1197398995, 12}, + {2109880792, 13}, {1858853132, 13}, {1638006149, 13}, {1443165385, 13}, + {1271479187, 13}, {1120235993, 13}, {1973767086, 14}, {1739045674, 14}, + {1532153461, 14}, {1349922194, 14}, {1189384493, 14}, {2095804865, 15}, + {1846464029, 15}, {1626872524, 15}, {1433347133, 15}, {1262853884, 15}, + {1112619678, 15}, {1960569045, 16}, {1727349015, 16}, {1521881227, 16}, + {1340842289, 16}, {1181357555, 16}, {2081669156, 17}, {1834047752, 17}, + {1615889229, 17}, {1423675973, 17}, {1254322457, 17}, {1105123583, 17}, + {1947330755, 18}, {1715693602, 18}, {1511607799, 18}, {1331801790, 18}, + {1173384427, 18}, {2067616532, 19}, {1821667648, 19}, {1604980024, 19}, + {1414066955, 19}, {1245861410, 19}, {1097665748, 19}, {1934193616, 20}, + {1704119624, 20}, {1501412075, 20}, {1322817107, 20}, {1165466323, 20}, + {2053666205, 21}, {1809379407, 21}, {1594151671, 21}, {1404526328, 21}, + {1237455941, 21}, {1090259329, 21}, {1921143210, 22}, {1692621231, 22}, + {1491281857, 22}, {1313892269, 22}, {1157603482, 22}, {2039810470, 23}, + {1797172644, 23}, {1583396912, 23}, {1395050052, 23}, {1229107276, 23}, + {1082903494, 23}, {1082903494, 23}, {1082903494, 23}, {1082903494, 23}, +}; + +/* manually derived from + * Table B.5: Selection of quantization levels and codebooks + */ +static const int bit_consumption[27] = { + -8, 28, 40, 48, 52, 60, 68, 76, 80, 96, + 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, + 272, 288, 304, 320, 336, 352, 368, +}; + +static const int8_t lfe_index[16] = { + 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 1, 3, 2, 3 +}; + +static const int8_t channel_reorder_lfe[16][9] = { + { 0, -1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 2, 0, 1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, 3, -1, -1, -1, -1, -1, -1 }, + { 2, 0, 1, 4, -1, -1, -1, -1, -1 }, + { 0, 1, 3, 4, -1, -1, -1, -1, -1 }, + { 2, 0, 1, 4, 5, -1, -1, -1, -1 }, + { 3, 4, 0, 1, 5, 6, -1, -1, -1 }, + { 2, 0, 1, 4, 5, 6, -1, -1, -1 }, + { 0, 6, 4, 5, 2, 3, -1, -1, -1 }, + { 4, 2, 5, 0, 1, 6, 7, -1, -1 }, + { 5, 6, 0, 1, 7, 3, 8, 4, -1 }, + { 4, 2, 5, 0, 1, 6, 8, 7, -1 }, +}; + +static const int8_t channel_reorder_nolfe[16][9] = { + { 0, -1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, -1, -1, -1, -1, -1, -1, -1 }, + { 2, 0, 1, -1, -1, -1, -1, -1, -1 }, + { 0, 1, 2, -1, -1, -1, -1, -1, -1 }, + { 2, 0, 1, 3, -1, -1, -1, -1, -1 }, + { 0, 1, 2, 3, -1, -1, -1, -1, -1 }, + { 2, 0, 1, 3, 4, -1, -1, -1, -1 }, + { 2, 3, 0, 1, 4, 5, -1, -1, -1 }, + { 2, 0, 1, 3, 4, 5, -1, -1, -1 }, + { 0, 5, 3, 4, 1, 2, -1, -1, -1 }, + { 3, 2, 4, 0, 1, 5, 6, -1, -1 }, + { 4, 5, 0, 1, 6, 2, 7, 3, -1 }, + { 3, 2, 4, 0, 1, 5, 7, 6, -1 }, +}; + +static inline int32_t quantize_value(int32_t value, softfloat quant) +{ + int32_t offset = 1 << (quant.e - 1); + + value = mul32(value, quant.m) + offset; + value = value >> quant.e; + return value; +} + +#endif /* AVCODEC_DCAENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcahuff.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcahuff.h new file mode 100644 index 00000000..02b0e375 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcahuff.h @@ -0,0 +1,65 @@ +/* + * DCA compatible decoder - huffman tables + * Copyright (C) 2004 Gildas Bazin + * Copyright (C) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCAHUFF_H +#define AVCODEC_DCAHUFF_H + +#include "libavutil/common.h" + +#include "avcodec.h" +#include "get_bits.h" +#include "put_bits.h" + +#define DCA_CODE_BOOKS 10 +#define DCA_BITALLOC_12_COUNT 5 + +typedef struct DCAVLC { + int offset; ///< Code values offset + int max_depth; ///< Parameter for get_vlc2() + VLC vlc[7]; ///< Actual codes +} DCAVLC; + +extern DCAVLC ff_dca_vlc_bit_allocation; +extern DCAVLC ff_dca_vlc_transition_mode; +extern DCAVLC ff_dca_vlc_scale_factor; +extern DCAVLC ff_dca_vlc_quant_index[DCA_CODE_BOOKS]; + +extern VLC ff_dca_vlc_tnl_grp[5]; +extern VLC ff_dca_vlc_tnl_scf; +extern VLC ff_dca_vlc_damp; +extern VLC ff_dca_vlc_dph; +extern VLC ff_dca_vlc_fst_rsd_amp; +extern VLC ff_dca_vlc_rsd_apprx; +extern VLC ff_dca_vlc_rsd_amp; +extern VLC ff_dca_vlc_avg_g3; +extern VLC ff_dca_vlc_st_grid; +extern VLC ff_dca_vlc_grid_2; +extern VLC ff_dca_vlc_grid_3; +extern VLC ff_dca_vlc_rsd; + +av_cold void ff_dca_init_vlcs(void); +uint32_t ff_dca_vlc_calc_quant_bits(int *values, uint8_t n, uint8_t sel, uint8_t abits); +void ff_dca_vlc_enc_quant(PutBitContext *pb, int *values, uint8_t n, uint8_t sel, uint8_t abits); +uint32_t ff_dca_vlc_calc_alloc_bits(int *values, uint8_t n, uint8_t sel); +void ff_dca_vlc_enc_alloc(PutBitContext *pb, int *values, uint8_t n, uint8_t sel); + +#endif /* AVCODEC_DCAHUFF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcamath.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcamath.h new file mode 100644 index 00000000..38fa9a62 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dcamath.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2016 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCAMATH_H +#define AVCODEC_DCAMATH_H + +#include "libavutil/common.h" +#include "libavutil/intmath.h" + +static inline int32_t norm__(int64_t a, int bits) +{ + if (bits > 0) + return (int32_t)((a + (INT64_C(1) << (bits - 1))) >> bits); + else + return (int32_t)a; +} + +static inline int32_t mul__(int32_t a, int32_t b, int bits) +{ + return norm__((int64_t)a * b, bits); +} + +static inline int32_t norm13(int64_t a) { return norm__(a, 13); } +static inline int32_t norm16(int64_t a) { return norm__(a, 16); } +static inline int32_t norm20(int64_t a) { return norm__(a, 20); } +static inline int32_t norm21(int64_t a) { return norm__(a, 21); } +static inline int32_t norm23(int64_t a) { return norm__(a, 23); } + +static inline int32_t mul15(int32_t a, int32_t b) { return mul__(a, b, 15); } +static inline int32_t mul16(int32_t a, int32_t b) { return mul__(a, b, 16); } +static inline int32_t mul17(int32_t a, int32_t b) { return mul__(a, b, 17); } +static inline int32_t mul22(int32_t a, int32_t b) { return mul__(a, b, 22); } +static inline int32_t mul23(int32_t a, int32_t b) { return mul__(a, b, 23); } +static inline int32_t mul31(int32_t a, int32_t b) { return mul__(a, b, 31); } +static inline int32_t mul32(int32_t a, int32_t b) { return mul__(a, b, 32); } + +static inline int32_t clip23(int32_t a) { return av_clip_intp2(a, 23); } + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct.h new file mode 100644 index 00000000..0a03e256 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct.h @@ -0,0 +1,69 @@ +/* + * (I)DCT Transforms + * Copyright (c) 2009 Peter Ross + * Copyright (c) 2010 Alex Converse + * Copyright (c) 2010 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#if !defined(AVCODEC_DCT_H) && (!defined(FFT_FLOAT) || FFT_FLOAT) +#define AVCODEC_DCT_H + +#include +#include + +#include "rdft.h" + +struct DCTContext { + int nbits; + int inverse; + RDFTContext rdft; + const float *costab; + FFTSample *csc2; + void (*dct_calc)(struct DCTContext *s, FFTSample *data); + void (*dct32)(FFTSample *out, const FFTSample *in); +}; + +/** + * Set up DCT. + * @param nbits size of the input array: + * (1 << nbits) for DCT-II, DCT-III and DST-I + * (1 << nbits) + 1 for DCT-I + * + * @note the first element of the input of DST-I is ignored + */ +int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type); +void ff_dct_end (DCTContext *s); + +void ff_dct_init_x86(DCTContext *s); + +void ff_fdct_ifast(int16_t *data); +void ff_fdct_ifast248(int16_t *data); +void ff_jpeg_fdct_islow_8(int16_t *data); +void ff_jpeg_fdct_islow_10(int16_t *data); +void ff_fdct248_islow_8(int16_t *data); +void ff_fdct248_islow_10(int16_t *data); + +void ff_j_rev_dct(int16_t *data); +void ff_j_rev_dct4(int16_t *data); +void ff_j_rev_dct2(int16_t *data); +void ff_j_rev_dct1(int16_t *data); +void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +#endif /* AVCODEC_DCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct32.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct32.h new file mode 100644 index 00000000..61bf223a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dct32.h @@ -0,0 +1,25 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCT32_H +#define AVCODEC_DCT32_H + +void ff_dct32_float(float *dst, const float *src); +void ff_dct32_fixed(int *dst, const int *src); + +#endif /* AVCODEC_DCT32_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dctref.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dctref.h new file mode 100644 index 00000000..f6fde886 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dctref.h @@ -0,0 +1,29 @@ +/* + * reference discrete cosine transform (double precision) + * Copyright (C) 2009 Dylan Yudaken + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DCTREF_H +#define AVCODEC_DCTREF_H + +void ff_ref_fdct(short *block); +void ff_ref_idct(short *block); +void ff_ref_dct_init(void); + +#endif /* AVCODEC_DCTREF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/decode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/decode.h new file mode 100644 index 00000000..5565346f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/decode.h @@ -0,0 +1,83 @@ +/* + * generic decoding-related code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DECODE_H +#define AVCODEC_DECODE_H + +#include "libavutil/buffer.h" +#include "libavutil/frame.h" +#include "libavutil/hwcontext.h" + +#include "avcodec.h" + +/** + * This struct stores per-frame lavc-internal data and is attached to it via + * private_ref. + */ +typedef struct FrameDecodeData { + /** + * The callback to perform some delayed processing on the frame right + * before it is returned to the caller. + * + * @note This code is called at some unspecified point after the frame is + * returned from the decoder's decode/receive_frame call. Therefore it cannot rely + * on AVCodecContext being in any specific state, so it does not get to + * access AVCodecContext directly at all. All the state it needs must be + * stored in the post_process_opaque object. + */ + int (*post_process)(void *logctx, AVFrame *frame); + void *post_process_opaque; + void (*post_process_opaque_free)(void *opaque); + + /** + * Per-frame private data for hwaccels. + */ + void *hwaccel_priv; + void (*hwaccel_priv_free)(void *priv); +} FrameDecodeData; + +/** + * Called by decoders to get the next packet for decoding. + * + * @param pkt An empty packet to be filled with data. + * @return 0 if a new reference has been successfully written to pkt + * AVERROR(EAGAIN) if no data is currently available + * AVERROR_EOF if and end of stream has been reached, so no more data + * will be available + */ +int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); + +/** + * Called during avcodec_open2() to initialize avctx->internal->bsf. + * The bsf should be freed with av_bsf_free(). + */ +int ff_decode_bsfs_init(AVCodecContext *avctx); + +/** + * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will + * try to allocate it from hw_device_ctx. If that is not possible, an error + * message is printed, and an error code is returned. + */ +int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, + enum AVHWDeviceType dev_type); + +int ff_attach_decode_data(AVFrame *frame); + +#endif /* AVCODEC_DECODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac.h new file mode 100644 index 00000000..e6d9d346 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac.h @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2007 Marco Gerards + * Copyright (C) 2009 David Conrad + * Copyright (C) 2011 Jordi Ortiz + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DIRAC_H +#define AVCODEC_DIRAC_H + +/** + * @file + * Interface to Dirac Decoder/Encoder + * @author Marco Gerards + * @author David Conrad + * @author Jordi Ortiz + */ + +#include "avcodec.h" + +/** + * The spec limits the number of wavelet decompositions to 4 for both + * level 1 (VC-2) and 128 (long-gop default). + * 5 decompositions is the maximum before >16-bit buffers are needed. + * Schroedinger allows this for DD 9,7 and 13,7 wavelets only, limiting + * the others to 4 decompositions (or 3 for the fidelity filter). + * + * We use this instead of MAX_DECOMPOSITIONS to save some memory. + */ +#define MAX_DWT_LEVELS 5 + +/** + * Parse code values: + * + * Dirac Specification -> + * 9.6.1 Table 9.1 + * + * VC-2 Specification -> + * 10.4.1 Table 10.1 + */ + +enum DiracParseCodes { + DIRAC_PCODE_SEQ_HEADER = 0x00, + DIRAC_PCODE_END_SEQ = 0x10, + DIRAC_PCODE_AUX = 0x20, + DIRAC_PCODE_PAD = 0x30, + DIRAC_PCODE_PICTURE_CODED = 0x08, + DIRAC_PCODE_PICTURE_RAW = 0x48, + DIRAC_PCODE_PICTURE_LOW_DEL = 0xC8, + DIRAC_PCODE_PICTURE_HQ = 0xE8, + DIRAC_PCODE_INTER_NOREF_CO1 = 0x0A, + DIRAC_PCODE_INTER_NOREF_CO2 = 0x09, + DIRAC_PCODE_INTER_REF_CO1 = 0x0D, + DIRAC_PCODE_INTER_REF_CO2 = 0x0E, + DIRAC_PCODE_INTRA_REF_CO = 0x0C, + DIRAC_PCODE_INTRA_REF_RAW = 0x4C, + DIRAC_PCODE_INTRA_REF_PICT = 0xCC, + DIRAC_PCODE_MAGIC = 0x42424344, +}; + +typedef struct DiracVersionInfo { + int major; + int minor; +} DiracVersionInfo; + +typedef struct AVDiracSeqHeader { + unsigned width; + unsigned height; + uint8_t chroma_format; ///< 0: 444 1: 422 2: 420 + + uint8_t interlaced; + uint8_t top_field_first; + + uint8_t frame_rate_index; ///< index into dirac_frame_rate[] + uint8_t aspect_ratio_index; ///< index into dirac_aspect_ratio[] + + uint16_t clean_width; + uint16_t clean_height; + uint16_t clean_left_offset; + uint16_t clean_right_offset; + + uint8_t pixel_range_index; ///< index into dirac_pixel_range_presets[] + uint8_t color_spec_index; ///< index into dirac_color_spec_presets[] + + int profile; + int level; + + AVRational framerate; + AVRational sample_aspect_ratio; + + enum AVPixelFormat pix_fmt; + enum AVColorRange color_range; + enum AVColorPrimaries color_primaries; + enum AVColorTransferCharacteristic color_trc; + enum AVColorSpace colorspace; + + DiracVersionInfo version; + int bit_depth; +} AVDiracSeqHeader; + +/** + * Parse a Dirac sequence header. + * + * @param dsh this function will allocate and fill an AVDiracSeqHeader struct + * and write it into this pointer. The caller must free it with + * av_free(). + * @param buf the data buffer + * @param buf_size the size of the data buffer in bytes + * @param log_ctx if non-NULL, this function will log errors here + * @return 0 on success, a negative AVERROR code on failure + */ +int av_dirac_parse_sequence_header(AVDiracSeqHeader **dsh, + const uint8_t *buf, size_t buf_size, + void *log_ctx); + +#endif /* AVCODEC_DIRAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_arith.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_arith.h new file mode 100644 index 00000000..79526a7c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_arith.h @@ -0,0 +1,202 @@ +/* + * Copyright (C) 2007 Marco Gerards + * Copyright (C) 2009 David Conrad + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Arithmetic decoder for Dirac + * @author Marco Gerards + */ + +#ifndef AVCODEC_DIRAC_ARITH_H +#define AVCODEC_DIRAC_ARITH_H + +#include "libavutil/x86/asm.h" +#include "bytestream.h" +#include "get_bits.h" + +enum dirac_arith_contexts { + CTX_ZPZN_F1, + CTX_ZPNN_F1, + CTX_NPZN_F1, + CTX_NPNN_F1, + CTX_ZP_F2, + CTX_ZP_F3, + CTX_ZP_F4, + CTX_ZP_F5, + CTX_ZP_F6, + CTX_NP_F2, + CTX_NP_F3, + CTX_NP_F4, + CTX_NP_F5, + CTX_NP_F6, + CTX_COEFF_DATA, + CTX_SIGN_NEG, + CTX_SIGN_ZERO, + CTX_SIGN_POS, + CTX_ZERO_BLOCK, + CTX_DELTA_Q_F, + CTX_DELTA_Q_DATA, + CTX_DELTA_Q_SIGN, + + DIRAC_CTX_COUNT +}; + +// Dirac resets the arith decoder between decoding various types of data, +// so many contexts are never used simultaneously. Thus, we can reduce +// the number of contexts needed by reusing them. +#define CTX_SB_F1 CTX_ZP_F5 +#define CTX_SB_DATA 0 +#define CTX_PMODE_REF1 0 +#define CTX_PMODE_REF2 1 +#define CTX_GLOBAL_BLOCK 2 +#define CTX_MV_F1 CTX_ZP_F2 +#define CTX_MV_DATA 0 +#define CTX_DC_F1 CTX_ZP_F5 +#define CTX_DC_DATA 0 + +typedef struct { + unsigned low; + uint16_t range; + int16_t counter; + + const uint8_t *bytestream; + const uint8_t *bytestream_end; + + uint16_t contexts[DIRAC_CTX_COUNT]; + int error; + int overread; +} DiracArith; + +extern const uint8_t ff_dirac_next_ctx[DIRAC_CTX_COUNT]; +extern const uint16_t ff_dirac_prob[256]; +extern int16_t ff_dirac_prob_branchless[256][2]; + +static inline void renorm(DiracArith *c) +{ +#if HAVE_FAST_CLZ + int shift = 14 - av_log2_16bit(c->range-1) + ((c->range-1)>>15); + + c->low <<= shift; + c->range <<= shift; + c->counter += shift; +#else + while (c->range <= 0x4000) { + c->low <<= 1; + c->range <<= 1; + c->counter++; + } +#endif +} + +static inline void refill(DiracArith *c) +{ + int counter = c->counter; + + if (counter >= 0) { + int new = bytestream_get_be16(&c->bytestream); + + // the spec defines overread bits to be 1, and streams rely on this + if (c->bytestream > c->bytestream_end) { + new |= 0xff; + if (c->bytestream > c->bytestream_end+1) + new |= 0xff00; + + c->bytestream = c->bytestream_end; + c->overread ++; + if (c->overread > 4) + c->error = AVERROR_INVALIDDATA; + } + + c->low += new << counter; + counter -= 16; + } + c->counter = counter; +} + +static inline int dirac_get_arith_bit(DiracArith *c, int ctx) +{ + int prob_zero = c->contexts[ctx]; + int range_times_prob, bit; + unsigned low = c->low; + int range = c->range; + + range_times_prob = (c->range * prob_zero) >> 16; + +#if ARCH_X86 && HAVE_FAST_CMOV && HAVE_INLINE_ASM && HAVE_6REGS + low -= range_times_prob << 16; + range -= range_times_prob; + bit = 0; + __asm__( + "cmpl %5, %4 \n\t" + "setae %b0 \n\t" + "cmovb %3, %2 \n\t" + "cmovb %5, %1 \n\t" + : "+q"(bit), "+r"(range), "+r"(low) + : "r"(c->low), "r"(c->low>>16), + "r"(range_times_prob) + ); +#else + bit = (low >> 16) >= range_times_prob; + if (bit) { + low -= range_times_prob << 16; + range -= range_times_prob; + } else { + range = range_times_prob; + } +#endif + + c->contexts[ctx] += ff_dirac_prob_branchless[prob_zero>>8][bit]; + c->low = low; + c->range = range; + + renorm(c); + refill(c); + return bit; +} + +static inline int dirac_get_arith_uint(DiracArith *c, int follow_ctx, int data_ctx) +{ + int ret = 1; + while (!dirac_get_arith_bit(c, follow_ctx)) { + if (ret >= 0x40000000) { + av_log(NULL, AV_LOG_ERROR, "dirac_get_arith_uint overflow\n"); + c->error = AVERROR_INVALIDDATA; + return -1; + } + ret <<= 1; + ret += dirac_get_arith_bit(c, data_ctx); + follow_ctx = ff_dirac_next_ctx[follow_ctx]; + } + return ret-1; +} + +static inline int dirac_get_arith_int(DiracArith *c, int follow_ctx, int data_ctx) +{ + int ret = dirac_get_arith_uint(c, follow_ctx, data_ctx); + if (ret && dirac_get_arith_bit(c, data_ctx+1)) + ret = -ret; + return ret; +} + +void ff_dirac_init_arith_tables(void); +void ff_dirac_init_arith_decoder(DiracArith *c, GetBitContext *gb, int length); + +#endif /* AVCODEC_DIRAC_ARITH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_dwt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_dwt.h new file mode 100644 index 00000000..994dc21d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_dwt.h @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2004-2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DIRAC_DWT_H +#define AVCODEC_DIRAC_DWT_H + +#include + +typedef int DWTELEM; +typedef short IDWTELEM; + +#define MAX_DWT_SUPPORT 8 +#define MAX_DECOMPOSITIONS 8 + +typedef struct DWTCompose { + uint8_t *b[MAX_DWT_SUPPORT]; + int y; +} DWTCompose; + +typedef struct DWTPlane { + int width; + int height; + int stride; + uint8_t *buf; + uint8_t *buf_base; + uint8_t *tmp; +} DWTPlane; + +struct DWTContext; + +// Possible prototypes for vertical_compose functions +typedef void (*vertical_compose_2tap)(uint8_t *b0, uint8_t *b1, int width); +typedef void (*vertical_compose_3tap)(uint8_t *b0, uint8_t *b1, uint8_t *b2, int width); +typedef void (*vertical_compose_5tap)(uint8_t *b0, uint8_t *b1, uint8_t *b2, uint8_t *b3, uint8_t *b4, int width); +typedef void (*vertical_compose_9tap)(uint8_t *dst, uint8_t *b[8], int width); + +typedef struct DWTContext { + uint8_t *buffer; + uint8_t *temp; + int width; + int height; + int stride; + int decomposition_count; + int support; + + void (*spatial_compose)(struct DWTContext *cs, int level, int width, int height, int stride); + void (*vertical_compose_l0)(void); + void (*vertical_compose_h0)(void); + void (*vertical_compose_l1)(void); + void (*vertical_compose_h1)(void); + void (*vertical_compose)(void); ///< one set of lowpass and highpass combined + void (*horizontal_compose)(uint8_t *b, uint8_t *tmp, int width); + + DWTCompose cs[MAX_DECOMPOSITIONS]; +} DWTContext; + +enum dwt_type { + DWT_SNOW_DAUB9_7, + DWT_SNOW_LEGALL5_3, + DWT_DIRAC_DD9_7, + DWT_DIRAC_LEGALL5_3, + DWT_DIRAC_DD13_7, + DWT_DIRAC_HAAR0, + DWT_DIRAC_HAAR1, + DWT_DIRAC_FIDELITY, + DWT_DIRAC_DAUB9_7, + DWT_NUM_TYPES +}; + +// -1 if an error occurred, e.g. the dwt_type isn't recognized +int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type, + int decomposition_count, int bit_depth); +void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type); + +void ff_spatial_idwt_slice2(DWTContext *d, int y); + +// shared stuff for simd optimizations +#define COMPOSE_53iL0(b0, b1, b2)\ + (b1 - (unsigned)((int)(b0 + (unsigned)(b2) + 2) >> 2)) + +#define COMPOSE_DIRAC53iH0(b0, b1, b2)\ + (b1 + (unsigned)((int)(b0 + (unsigned)(b2) + 1) >> 1)) + +#define COMPOSE_DD97iH0(b0, b1, b2, b3, b4)\ + (int)(((unsigned)(b2) + ((int)(9U*b1 + 9U*b3 - b4 - b0 + 8) >> 4))) + +#define COMPOSE_DD137iL0(b0, b1, b2, b3, b4)\ + (int)(((unsigned)(b2) - ((int)(9U*b1 + 9U*b3 - b4 - b0 + 16) >> 5))) + +#define COMPOSE_HAARiL0(b0, b1)\ + ((int)(b0 - (unsigned)((int)(b1 + 1U) >> 1))) + +#define COMPOSE_HAARiH0(b0, b1)\ + ((int)(b0 + (unsigned)(b1))) + +#define COMPOSE_FIDELITYiL0(b0, b1, b2, b3, b4, b5, b6, b7, b8)\ + ((unsigned)b4 - ((int)(-8*(b0+(unsigned)b8) + 21*(b1+(unsigned)b7) - 46*(b2+(unsigned)b6) + 161*(b3+(unsigned)b5) + 128) >> 8)) + +#define COMPOSE_FIDELITYiH0(b0, b1, b2, b3, b4, b5, b6, b7, b8)\ + ((unsigned)b4 + ((int)(-2*(b0+(unsigned)b8) + 10*(b1+(unsigned)b7) - 25*(b2+(unsigned)b6) + 81*(b3+(unsigned)b5) + 128) >> 8)) + +#define COMPOSE_DAUB97iL1(b0, b1, b2)\ + ((unsigned)(b1) - ((int)(1817*(b0 + (unsigned)b2) + 2048) >> 12)) + +#define COMPOSE_DAUB97iH1(b0, b1, b2)\ + ((unsigned)(b1) - ((int)( 113*(b0 + (unsigned)b2) + 64) >> 7)) + +#define COMPOSE_DAUB97iL0(b0, b1, b2)\ + ((unsigned)(b1) + ((int)( 217*(b0 + (unsigned)b2) + 2048) >> 12)) + +#define COMPOSE_DAUB97iH0(b0, b1, b2)\ + ((unsigned)(b1) + ((int)(6497*(b0 + (unsigned)b2) + 2048) >> 12)) + + +#endif /* AVCODEC_DWT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_vlc.h new file mode 100644 index 00000000..bfcfa136 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dirac_vlc.h @@ -0,0 +1,29 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DIRAC_VLC_H +#define AVCODEC_DIRAC_VLC_H + +#include "libavutil/avutil.h" + +int ff_dirac_golomb_read_16bit(const uint8_t *buf, int bytes, + uint8_t *_dst, int coeffs); +int ff_dirac_golomb_read_32bit(const uint8_t *buf, int bytes, + uint8_t *_dst, int coeffs); + +#endif /* AVCODEC_DIRAC_VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diracdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diracdsp.h new file mode 100644 index 00000000..224828d8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diracdsp.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2010 David Conrad + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DIRACDSP_H +#define AVCODEC_DIRACDSP_H + +#include +#include + +typedef void (*dirac_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int h); +typedef void (*dirac_biweight_func)(uint8_t *dst, const uint8_t *src, int stride, int log2_denom, int weightd, int weights, int h); + +typedef struct { + void (*dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src, int stride, int width, int height); + /** + * dirac_pixels_tab[width][subpel] + * width is 2 for 32, 1 for 16, 0 for 8 + * subpel is 0 for fpel and hpel (only need to copy from the first plane in src) + * 1 if an average of the first 2 planes is needed (TODO: worth it?) + * 2 for general qpel (avg of 4) + * 3 for general epel (biweight of 4 using the weights in src[4]) + * src[0-3] is each of the hpel planes + * src[4] is the 1/8 pel weights if needed + */ + void (*put_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h); + void (*avg_dirac_pixels_tab[3][4])(uint8_t *dst, const uint8_t *src[5], int stride, int h); + + void (*put_signed_rect_clamped[3])(uint8_t *dst/*align 16*/, int dst_stride, const uint8_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/); + void (*put_rect_clamped)(uint8_t *dst/*align 16*/, int dst_stride, const uint8_t *src/*align 16*/, int src_stride, int width, int height/*mod 2*/); + void (*add_rect_clamped)(uint8_t *dst/*align 16*/, const uint16_t *src/*align 16*/, int stride, const int16_t *idwt/*align 16*/, int idwt_stride, int width, int height/*mod 2*/); + void (*add_dirac_obmc[3])(uint16_t *dst, const uint8_t *src, int stride, const uint8_t *obmc_weight, int yblen); + + /* 0-1: int16_t and int32_t asm/c, 2-3: int16 and int32_t, C only */ + void (*dequant_subband[4])(uint8_t *src, uint8_t *dst, ptrdiff_t stride, const int qf, const int qs, int tot_v, int tot_h); + + dirac_weight_func weight_dirac_pixels_tab[3]; + dirac_biweight_func biweight_dirac_pixels_tab[3]; +} DiracDSPContext; + +#define DECL_DIRAC_PIXOP(PFX, EXT) \ + void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \ + void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \ + void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h) + +DECL_DIRAC_PIXOP(put, c); +DECL_DIRAC_PIXOP(avg, c); +DECL_DIRAC_PIXOP(put, l2_c); +DECL_DIRAC_PIXOP(avg, l2_c); +DECL_DIRAC_PIXOP(put, l4_c); +DECL_DIRAC_PIXOP(avg, l4_c); + +void ff_diracdsp_init(DiracDSPContext *c); +void ff_diracdsp_init_x86(DiracDSPContext* c); + +#endif /* AVCODEC_DIRACDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diractab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diractab.h new file mode 100644 index 00000000..2423b072 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/diractab.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 Open Broadcast Systems Ltd. + * Author (C) 2016 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DIRACTAB_H +#define AVCODEC_DIRACTAB_H + +#include + +/* Tables here are shared between the Dirac/VC-2 decoder and the VC-2 encoder */ + +/* Default quantization tables for each wavelet transform */ +extern const uint8_t ff_dirac_default_qmat[7][4][4]; + +/* Scaling factors needed for quantization/dequantization */ +extern const int32_t ff_dirac_qscale_tab[116]; + +/* Scaling offsets needed for quantization/dequantization, for intra frames */ +extern const int32_t ff_dirac_qoffset_intra_tab[120]; + +/* Scaling offsets needed for quantization/dequantization, for inter frames */ +extern const int ff_dirac_qoffset_inter_tab[122]; + +#define DIRAC_MAX_QUANT_INDEX (FF_ARRAY_ELEMS(ff_dirac_qscale_tab)) + +#endif /* AVCODEC_DIRACTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhddata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhddata.h new file mode 100644 index 00000000..cfa6b0c9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhddata.h @@ -0,0 +1,97 @@ +/* + * VC3/DNxHD decoder. + * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DNXHDDATA_H +#define AVCODEC_DNXHDDATA_H + +#include +#include "avcodec.h" +#include "libavutil/internal.h" +#include "libavutil/intreadwrite.h" + +/** Additional profile info flags */ +#define DNXHD_INTERLACED (1<<0) +#define DNXHD_MBAFF (1<<1) +#define DNXHD_444 (1<<2) + +/** Frame headers, extra 0x00 added to end for parser */ +#define DNXHD_HEADER_INITIAL 0x000002800100 +#define DNXHD_HEADER_444 0x000002800200 + +/** Indicate that a CIDEntry value must be read in the bitstream */ +#define DNXHD_VARIABLE 0 + +typedef struct CIDEntry { + int cid; + unsigned int width, height; + unsigned int frame_size; + unsigned int coding_unit_size; + uint16_t flags; + int index_bits; + int bit_depth; + int eob_index; + const uint8_t *luma_weight, *chroma_weight; + const uint8_t *dc_codes, *dc_bits; + const uint16_t *ac_codes; + const uint8_t *ac_bits, *ac_info; + const uint16_t *run_codes; + const uint8_t *run_bits, *run; + int bit_rates[5]; ///< Helper to choose variants, rounded to nearest 5Mb/s + AVRational packet_scale; +} CIDEntry; + +extern const CIDEntry ff_dnxhd_cid_table[]; + +int ff_dnxhd_get_cid_table(int cid); +int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth); +void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel); + +static av_always_inline uint64_t ff_dnxhd_check_header_prefix_hr(uint64_t prefix) +{ + uint64_t data_offset = prefix >> 16; + if ((prefix & 0xFFFF0000FFFFLL) == 0x0300 && + data_offset >= 0x0280 && data_offset <= 0x2170 && + (data_offset & 3) == 0) + return prefix; + return 0; +} + +static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix) +{ + if (prefix == DNXHD_HEADER_INITIAL || + prefix == DNXHD_HEADER_444 || + ff_dnxhd_check_header_prefix_hr(prefix)) + return prefix; + return 0; +} + +static av_always_inline uint64_t ff_dnxhd_parse_header_prefix(const uint8_t *buf) +{ + uint64_t prefix = AV_RB32(buf); + prefix = (prefix << 16) | buf[4] << 8; + return ff_dnxhd_check_header_prefix(prefix); +} + +int avpriv_dnxhd_get_frame_size(int cid); +int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h); +int avpriv_dnxhd_get_interlaced(int cid); + +#endif /* AVCODEC_DNXHDDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhdenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhdenc.h new file mode 100644 index 00000000..7b0d862e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dnxhdenc.h @@ -0,0 +1,114 @@ +/* + * VC3/DNxHD encoder structure definitions and prototypes + * Copyright (c) 2007 Baptiste Coudurier + * + * VC-3 encoder funded by the British Broadcasting Corporation + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DNXHDENC_H +#define AVCODEC_DNXHDENC_H + +#include + +#include "config.h" + +#include "mpegvideo.h" +#include "dnxhddata.h" + +typedef struct RCCMPEntry { + uint16_t mb; + int value; +} RCCMPEntry; + +typedef struct RCEntry { + int ssd; + int bits; +} RCEntry; + +typedef struct DNXHDEncContext { + AVClass *class; + BlockDSPContext bdsp; + MpegEncContext m; ///< Used for quantization dsp functions + + int cid; + int profile; + int bit_depth; + int is_444; + const CIDEntry *cid_table; + uint8_t *msip; ///< Macroblock Scan Indexes Payload + uint32_t *slice_size; + uint32_t *slice_offs; + + struct DNXHDEncContext *thread[MAX_THREADS]; + + // Because our samples are either 8 or 16 bits for 8-bit and 10-bit + // encoding respectively, these refer either to bytes or to two-byte words. + unsigned dct_y_offset; + unsigned dct_uv_offset; + unsigned block_width_l2; + + int frame_size; + int coding_unit_size; + int data_offset; + + int interlaced; + int cur_field; + + int nitris_compat; + unsigned min_padding; + int intra_quant_bias; + + DECLARE_ALIGNED(32, int16_t, blocks)[12][64]; + DECLARE_ALIGNED(16, uint8_t, edge_buf_y)[512]; // has to hold 16x16 uint16 when depth=10 + DECLARE_ALIGNED(16, uint8_t, edge_buf_uv)[2][512]; // has to hold 16x16 uint16_t when depth=10 + + int (*qmatrix_c) [64]; + int (*qmatrix_l) [64]; + uint16_t (*qmatrix_l16)[2][64]; + uint16_t (*qmatrix_c16)[2][64]; + + unsigned frame_bits; + uint8_t *src[3]; + + uint32_t *orig_vlc_codes; + uint8_t *orig_vlc_bits; + uint32_t *vlc_codes; + uint8_t *vlc_bits; + uint16_t *run_codes; + uint8_t *run_bits; + + /** Rate control */ + unsigned slice_bits; + unsigned qscale; + unsigned lambda; + + uint16_t *mb_bits; + uint8_t *mb_qscale; + + RCCMPEntry *mb_cmp; + RCCMPEntry *mb_cmp_tmp; + RCEntry *mb_rc; + + void (*get_pixels_8x4_sym)(int16_t *av_restrict /* align 16 */ block, + const uint8_t *pixels, ptrdiff_t line_size); +} DNXHDEncContext; + +void ff_dnxhdenc_init_x86(DNXHDEncContext *ctx); + +#endif /* AVCODEC_DNXHDENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dolby_e.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dolby_e.h new file mode 100644 index 00000000..ae04bf69 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dolby_e.h @@ -0,0 +1,647 @@ +/* + * Copyright (C) 2017 foo86 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DOLBY_E_H +#define AVCODEC_DOLBY_E_H + +#include "libavutil/float_dsp.h" +#include "libavutil/libm.h" +#include "libavutil/mem.h" + +#include "internal.h" +#include "get_bits.h" +#include "kbdwin.h" +#include "fft.h" + +#define FRAME_SAMPLES 1792 + +#define MAX_PROG_CONF 23 +#define MAX_PROGRAMS 8 +#define MAX_CHANNELS 8 +#define MAX_SEGMENTS 2 + +#define MAX_GROUPS 8 +#define MAX_EXPONENTS 304 +#define MAX_MANTISSAS 1024 + +#define MAX_MSTR_EXP 2 +#define MAX_BIAS_EXP 50 + +typedef struct DBEGroup { + uint8_t nb_exponent; + uint8_t nb_bias_exp[MAX_MSTR_EXP]; + uint16_t exp_ofs; + uint16_t mnt_ofs; + const uint8_t *nb_mantissa; + uint8_t imdct_idx; + uint8_t imdct_phs; + uint16_t win_len; + uint16_t dst_ofs; + uint16_t win_ofs; + uint16_t src_ofs; +} DBEGroup; + +typedef struct DBEChannel { + int gr_code; + int bw_code; + + int nb_groups; + int nb_mstr_exp; + DBEGroup groups[MAX_GROUPS]; + + int exp_strategy[MAX_GROUPS]; + int exponents[MAX_EXPONENTS]; + int bap[MAX_EXPONENTS]; + int idx[MAX_EXPONENTS]; + + DECLARE_ALIGNED(32, float, mantissas)[MAX_MANTISSAS]; +} DBEChannel; + +typedef struct DBEContext { + AVCodecContext *avctx; + GetBitContext gb; + + uint8_t *input; + int input_size; + + int word_bits; + int word_bytes; + int key_present; + + int prog_conf; + int nb_channels; + int nb_programs; + + int fr_code; + int fr_code_orig; + + int ch_size[MAX_CHANNELS]; + int mtd_ext_size; + int meter_size; + + int rev_id[MAX_CHANNELS]; + int begin_gain[MAX_CHANNELS]; + int end_gain[MAX_CHANNELS]; + + int multi_prog_warned; + + DBEChannel channels[MAX_SEGMENTS][MAX_CHANNELS]; + + DECLARE_ALIGNED(32, float, history)[MAX_CHANNELS][256]; + + FFTContext imdct[3]; + AVFloatDSPContext *fdsp; + + uint8_t buffer[1024 * 3 + AV_INPUT_BUFFER_PADDING_SIZE]; +} DBEContext; + +static const uint8_t nb_programs_tab[MAX_PROG_CONF + 1] = { + 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1 +}; + +static const uint8_t nb_channels_tab[MAX_PROG_CONF + 1] = { + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8 +}; + +static const int8_t lfe_channel_tab[MAX_PROG_CONF + 1] = { + 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5 +}; + +static const uint8_t ch_reorder_4[4] = { 0, 2, 1, 3 }; +static const uint8_t ch_reorder_6[6] = { 0, 2, 4, 1, 3, 5 }; +static const uint8_t ch_reorder_8[8] = { 0, 2, 6, 4, 1, 3, 7, 5 }; +static const uint8_t ch_reorder_n[8] = { 0, 2, 4, 6, 1, 3, 5, 7 }; + +static const uint16_t sample_rate_tab[16] = { + 0, 42965, 43008, 44800, 53706, 53760 +}; + +static const uint8_t nb_groups_tab[4] = { 1, 8, 7, 1 }; + +static const uint8_t nb_mstr_exp_tab[4] = { 2, 2, 2, 1 }; + +static const uint8_t nb_mantissa_38[38] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, + 7, 8, 9, 10, 11, 12, +}; + +static const uint8_t nb_mantissa_44[44] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, + 8, 9, 10, 11, 12, 13, 15, 16, 18, 20, 22, 25, +}; + +static const uint8_t nb_mantissa_50[50] = { + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, + 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 12, 13, 14, 16, + 18, 19, 22, 24, 27, 29, 32, 36, 40, 44, 49, 54, 60, 66, 74, 82, + 90, 100, +}; + +static const uint8_t imdct_bits_tab[3] = { 8, 9, 11 }; + +static const DBEGroup grp_tab_0[1] = { + { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 }, +}; + +static const DBEGroup grp_tab_1[8] = { + { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 }, + { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 }, + { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 }, + { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 }, + { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 }, + { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 }, + { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 704, 0, 0 }, + { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 1, 256, 832, 0, 0 }, +}; + +static const DBEGroup grp_tab_2[7] = { + { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 }, + { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 }, + { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 }, + { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 }, + { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 }, + { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 }, + { 44, { 19, 25 }, 228, 768, nb_mantissa_44, 1, 1, 448, 704, 960, 64 }, +}; + +static const DBEGroup grp_tab_3[1] = { + { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 }, +}; + +static const DBEGroup grp_tab_4[1] = { + { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 }, +}; + +static const DBEGroup grp_tab_5[8] = { + { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 1, 256, 64, 0, 0 }, + { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 192, 0, 0 }, + { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 }, + { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 }, + { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 }, + { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 }, + { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 }, + { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 }, +}; + +static const DBEGroup grp_tab_6[7] = { + { 44, { 19, 25 }, 0, 0, nb_mantissa_44, 1, 1, 448, 0, 3264, 0 }, + { 38, { 12, 26 }, 44, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 }, + { 38, { 12, 26 }, 82, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 }, + { 38, { 12, 26 }, 120, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 }, + { 38, { 12, 26 }, 158, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 }, + { 38, { 12, 26 }, 196, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 }, + { 38, { 12, 26 }, 234, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 }, +}; + +static const DBEGroup grp_tab_7[1] = { + { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 }, +}; + +static const DBEGroup *const frm_ofs_tab[2][4] = { + { grp_tab_0, grp_tab_1, grp_tab_2, grp_tab_3 }, + { grp_tab_4, grp_tab_5, grp_tab_6, grp_tab_7 } +}; + +static const uint8_t mantissa_size1[16][4] = { + { 0, 0, 0, 0 }, { 2, 1, 1, 1 }, { 3, 2, 1, 1 }, { 4, 3, 2, 1 }, + { 5, 4, 3, 2 }, { 6, 5, 4, 3 }, { 7, 6, 5, 4 }, { 8, 7, 6, 5 }, + { 9, 8, 7, 6 }, { 10, 9, 8, 7 }, { 11, 10, 9, 8 }, { 12, 11, 10, 9 }, + { 13, 12, 11, 10 }, { 14, 13, 12, 11 }, { 15, 14, 13, 12 }, { 16, 15, 14, 13 }, +}; + +static const uint8_t mantissa_size2[16][4] = { + { 0, 0, 0, 0 }, { 2, 1, 2, 2 }, { 3, 2, 3, 3 }, { 4, 3, 4, 4 }, + { 5, 4, 5, 5 }, { 6, 5, 6, 6 }, { 7, 6, 7, 7 }, { 8, 7, 8, 8 }, + { 9, 8, 9, 9 }, { 10, 9, 10, 10 }, { 11, 10, 11, 11 }, { 12, 11, 12, 12 }, + { 13, 12, 13, 13 }, { 14, 13, 14, 14 }, { 15, 14, 15, 15 }, { 16, 15, 16, 16 }, +}; + +static const float start_window[192] = { + 0.00161569379826, 0.00185748233347, 0.00198562758548, 0.00207834078104, + 0.00215717748523, 0.00223067096393, 0.00230299213147, 0.00237651215396, + 0.00245275561606, 0.00253281402069, 0.00261754673613, 0.00270768786168, + 0.00280390761895, 0.00290684998656, 0.00301715751161, 0.00313548872798, + 0.00326253122934, 0.00339901215995, 0.00354570716636, 0.00370344845023, + 0.00387313232586, 0.00405572653911, 0.00425227750970, 0.00446391759265, + 0.00469187240551, 0.00493746822816, 0.00520213944619, 0.00548743597507, + 0.00579503056737, 0.00612672586953, 0.00648446105606, 0.00687031782873, + 0.00728652552677, 0.00773546505205, 0.00821967127415, 0.00874183354619, + 0.00930479393832, 0.00991154278653, 0.01056521116692, 0.01126905994567, + 0.01202646513050, 0.01284089936559, 0.01371590957417, 0.01465509096066, + 0.01566205783408, 0.01674041199523, 0.01789370972358, 0.01912542867865, + 0.02043893626265, 0.02183746113793, 0.02332406961796, 0.02490164852364, + 0.02657289580178, 0.02834031974193, 0.03020624702903, 0.03217283918354, + 0.03424211623810, 0.03641598586180, 0.03869627565015, 0.04108476601498, + 0.04358322107390, 0.04619341515939, 0.04891715301882, 0.05175628239149, + + 0.05471237327267, 0.05778734733755, 0.06098291402413, 0.06430101352084, + 0.06774345212186, 0.07131188644726, 0.07500780649199, 0.07883251748595, + 0.08278712056651, 0.08687249228061, 0.09108926295730, 0.09543779401074, + 0.09991815425851, 0.10453009536427, 0.10927302653894, 0.11414598865987, + 0.11914762799220, 0.12427616972097, 0.12952939152560, 0.13490459744934, + 0.14039859233595, 0.14600765712201, 0.15172752528722, 0.15755336077528, + 0.16347973770491, 0.16950062219342, 0.17560935661442, 0.18179864660619, + 0.18806055113821, 0.19438647593012, 0.20076717050010, 0.20719272909882, + 0.21365259576030, 0.22013557367283, 0.22662983904194, 0.23312295958328, + 0.23960191774666, 0.24605313873388, 0.25246252333253, 0.25881548554631, + 0.26509699495987, 0.27129162373316, 0.27738359807707, 0.28335685401987, + 0.28919509723179, 0.29488186663467, 0.30040060148455, 0.30573471157819, + 0.31086765019993, 0.31578298939317, 0.32046449711227, 0.32489621578468, + 0.32906254179156, 0.33294830535654, 0.33653885031840, 0.33982011325336, + 0.34277870140679, 0.34540196889300, 0.34767809062480, 0.34959613344194, + 0.35114612391958, 0.35231911235422, 0.35310723244504, 0.35350375621308, + + 0.35350314372945, 0.35310108725579, 0.35229454943591, 0.35108179521634, + 0.34946241721522, 0.34743735430290, 0.34500890320420, 0.34218072298001, + 0.33895783229541, 0.33534659943168, 0.33135472505060, 0.32699121776996, + 0.32226636266000, 0.31719168282019, 0.31177989424432, 0.30604485422875, + 0.30000150362379, 0.29366580327088, 0.28705466500775, 0.28018587766131, + 0.27307802848095, 0.26575042049535, 0.25822298630189, 0.25051619882000, + 0.24265097955783, 0.23464860495522, 0.22653061137548, 0.21831869932335, + 0.21003463746705, 0.20170016703857, 0.19333690717811, 0.18496626177620, + 0.17660932835062, 0.16828680947474, 0.16001892724986, 0.15182534128597, + 0.14372507062477, 0.13573642000364, 0.12787691082233, 0.12016321713317, + 0.11261110693234, 0.10523538898282, 0.09804986534955, 0.09106728977263, + 0.08429933194438, 0.07775654768810, 0.07144835495683, 0.06538301547324, + 0.05956762170687, 0.05400808871425, 0.04870915012107, 0.04367435714993, + 0.03890607899172, 0.03440550179663, 0.03017262174627, 0.02620622428513, + 0.02250383492507, 0.01906161305732, 0.01587412848221, 0.01293388032354, + 0.01023019677288, 0.00774641320626, 0.00545109736891, 0.00325868651263, +}; + +static const float short_window2[192] = { + 0.00018861094606, 0.00033433010202, 0.00050309624485, 0.00070306161748, + 0.00093995174533, 0.00121913067128, 0.00154606505568, 0.00192647806126, + 0.00236641248692, 0.00287225985240, 0.00345077377440, 0.00410907465023, + 0.00485464855241, 0.00569534163219, 0.00663935063508, 0.00769520981249, + 0.00887177436246, 0.01017820046395, 0.01162392194150, 0.01321862359335, + 0.01497221122468, 0.01689477844427, 0.01899657030441, 0.02128794388846, + 0.02377932597692, 0.02648116795039, 0.02940389811590, 0.03255787167130, + 0.03595331854986, 0.03960028941437, 0.04350860009563, 0.04768777479454, + 0.05214698838949, 0.05689500821121, 0.06194013566525, 0.06729014809766, + 0.07295224131210, 0.07893297315602, 0.08523820859989, 0.09187306673620, + 0.09884187012422, 0.10614809690222, 0.11379433608064, 0.12178224641797, + 0.13011251926531, 0.13878484574660, 0.14779788861830, 0.15714925912610, + 0.16683549914631, 0.17685206886673, 0.18719334022589, 0.19785259629099, + 0.20882203671372, 0.22009278936030, 0.23165492816694, 0.24349749722585, + 0.25560854105961, 0.26797514099368, 0.28058345748882, 0.29341877824732, + 0.30646557185942, 0.31970754671026, 0.33312771482295, 0.34670846027024, + + 0.36043161174692, 0.37427851885723, 0.38823013163645, 0.40226708279486, + 0.41636977214436, 0.43051845264462, 0.44469331748632, 0.45887458761470, + 0.47304259908636, 0.48717788964798, 0.50126128392546, 0.51527397661778, + 0.52919761310050, 0.54301436685998, 0.55670701320069, 0.57025899869448, + 0.58365450587230, 0.59687851269542, 0.60991684638414, 0.62275623122793, + 0.63538433005035, 0.64778977905593, 0.65996221584264, 0.67189230042379, + 0.68357172916486, 0.69499324160511, 0.70615062019861, 0.71703868307548, + 0.72765326998919, 0.73799122168099, 0.74805035295521, 0.75782941981995, + 0.76732808110520, 0.77654685502339, 0.78548707118622, 0.79415081863423, + 0.80254089047207, 0.81066072573188, 0.81851434910893, 0.82610630922734, + 0.83344161609862, 0.84052567843230, 0.84736424144524, 0.85396332579459, + 0.86032916822973, 0.86646816451999, 0.87238681516918, 0.87809167437532, + 0.88358930263537, 0.88888622333073, 0.89398888356256, 0.89890361943564, + 0.90363662591861, 0.90819393133744, 0.91258137648979, 0.91680459830070, + 0.92086901787718, 0.92477983276087, 0.92854201312583, 0.93216030163834, + 0.93563921662343, 0.93898305819384, 0.94219591693690, 0.94528168477979, + + 0.94823843319821, 0.95106834367330, 0.95377776558539, 0.95636718335775, + 0.95883679961479, 0.96118650212341, 0.96341583179195, 0.96552395212906, + 0.96750962060547, 0.96937116231768, 0.97110644638309, 0.97271286544154, + 0.97418731862798, 0.97552619834964, 0.97672538116257, 0.97778022299974, + 0.97868555895586, 0.97943570778357, 0.98002448120255, 0.98044519806866, + 0.98069070339493, 0.98075339216123, 0.98062523779637, 0.98029782516478, + 0.97976238784222, 0.97900984942031, 0.97803086854002, 0.97681588731895, + 0.97535518280755, 0.97363892108474, 0.97165721358452, 0.96940017523145, + 0.96685798395452, 0.96402094114589, 0.96087953263194, 0.95742448973047, + 0.95364684997699, 0.94953801711660, 0.94508981997396, 0.94029456983253, + 0.93514511597504, 0.92963489905951, 0.92375800202883, 0.91750919827624, + 0.91088399681406, 0.90387868421832, 0.89649036314692, 0.88871698725397, + 0.88055739234735, 0.87201132366062, 0.86307945913336, 0.85376342861693, + 0.84406582894455, 0.83399023482637, 0.82354120554757, 0.81272428745995, + 0.80154601230457, 0.79001389138101, 0.77813640562199, 0.76592299164227, + 0.75338402384395, 0.74053079267526, 0.72737547915460, 0.71393112578527, +}; + +static const float short_window3[64] = { + 0.00326887936450, 0.00550242900936, 0.00786846643791, 0.01045683453520, + 0.01330402120132, 0.01643221072863, 0.01985798040609, 0.02359509464766, + 0.02765559221954, 0.03205025893128, 0.03678884369614, 0.04188015679495, + 0.04733210987781, 0.05315172583924, 0.05934513287609, 0.06591755045290, + 0.07287327156378, 0.08021564389822, 0.08794705152307, 0.09606889811179, + 0.10458159240070, 0.11348453632940, 0.12277611617809, 0.13245369691511, + 0.14251361989876, 0.15295120402567, 0.16376075037904, 0.17493555039885, + 0.18646789757072, 0.19834910260891, 0.21056951208995, 0.22311853047787, + 0.23598464546683, 0.24915545655419, 0.26261770674500, 0.27635731727778, + 0.29035942525136, 0.30460842402318, 0.31908800624032, 0.33378120935681, + 0.34867046348260, 0.36373764140285, 0.37896411059909, 0.39433078709788, + 0.40981819096657, 0.42540650327031, 0.44107562429959, 0.45680523287270, + 0.47257484651351, 0.48836388230077, 0.50415171818214, 0.51991775454258, + 0.53564147581496, 0.55130251191887, 0.56688069931047, 0.58235614142007, + 0.59770926827271, 0.61292089506118, 0.62797227945823, 0.64284517745255, + 0.65752189749349, 0.67198535273209, 0.68621911114984, 0.70020744337099, +}; + +static const uint8_t dc_code_tab[5] = { 0, 0, 0, 1, 1 }; + +static const uint8_t ht_code_tab[5] = { 0, 0, 1, 2, 2 }; + +static const uint8_t band_ofs_tab[3][4] = { + { 12, 8, 4, 0 }, { 14, 10, 6, 0 }, { 12, 8, 4, 0 } +}; + +static const uint8_t band_low_tab[3] = { 9, 17, 24 }; + +static const uint16_t fast_gain_tab[8] = { + 128, 256, 384, 512, 640, 768, 896, 1024 +}; + +static const uint16_t slow_decay_tab[2][2] = { { 27, -1 }, { 32, 21 } }; + +static const uint16_t misc_decay_tab[3][2][2] = { + { { 354, -1 }, { 425, 425 } }, + { { 266, -1 }, { 320, -1 } }, + { { 213, -1 }, { 256, -1 } } +}; + +static const uint16_t fast_decay_tab[3][2][2][50] = { + {{{ + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + }}, {{ + 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 170, + }, { + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + }}}, {{{ + 266, 266, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + }}, {{ + 319, 319, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + }}}, {{{ + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + }}, {{ + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + }}} +}; + +static const uint16_t fast_gain_adj_tab[3][2][62] = { + {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 4, 7, 11, 16, 29, 44, 59, + 76, 94, 116, 142, 179, 221, 252, 285, 312, 334, + }, { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 5, 8, 10, 15, 28, 42, 57, 75, 93, + 115, 140, 177, 219, 247, 280, 308, 330, 427, 533, + }}, {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 5, 8, 12, 21, 35, 51, 69, 89, + 111, 138, 176, 220, 251, 284, 312, 334, + }, { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 5, 8, 11, 18, 33, 49, 65, 84, 106, 132, + 168, 214, 245, 279, 308, 329, 427, 533, + }}, {{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 4, 7, 10, 17, + 31, 47, 65, 84, 107, 134, 171, 215, 250, 283, + 312, 334, + }, { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 6, 9, 13, 27, 43, + 60, 79, 100, 126, 160, 207, 242, 276, 307, 329, + 427, 533, + }} +}; + +static const uint16_t slow_gain_tab[3][2][50] = { + {{ + 3072, 3072, 3072, 3072, 3072, 3072, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + }, { + 3072, 3072, 3072, 3072, 3072, 3072, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, + 850, 850, 850, 850, 850, 850, 850, 850, + }}, {{ + 3072, 1212, 1212, 1212, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, + }}, {{ + 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, + }, { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + }} +}; + +static const uint16_t hearing_thresh_tab[3][3][50] = { + {{ + 1403, 1141, 1000, 959, 948, 957, 946, 925, 899, 871, + 843, 815, 789, 766, 745, 727, 705, 687, 681, 686, + 701, 725, 768, 854, 940, 1018, 1075, 1103, 1111, 1106, + 1098, 1105, 1142, 1237, 1419, 1721, 2169, 2805, + }, { + 1401, 1130, 995, 957, 947, 955, 941, 918, 890, 861, + 831, 803, 777, 754, 734, 717, 698, 684, 682, 692, + 712, 743, 798, 894, 976, 1045, 1091, 1109, 1110, 1102, + 1098, 1116, 1174, 1300, 1526, 1884, 2401, 3072, + }, { + 1393, 1086, 974, 949, 957, 941, 913, 878, 843, 808, + 777, 750, 727, 708, 695, 686, 681, 689, 714, 752, + 811, 888, 971, 1044, 1087, 1108, 1110, 1102, 1098, 1115, + 1172, 1290, 1489, 1812, 2293, 2964, 3072, 3072, + }}, {{ + 1412, 1343, 1141, 1047, 1000, 974, 959, 951, 948, 947, + 957, 953, 946, 936, 925, 906, 878, 850, 822, 795, + 771, 745, 719, 700, 687, 681, 685, 701, 733, 784, + 885, 977, 1047, 1092, 1110, 1108, 1099, 1102, 1138, 1233, + 1413, 1711, 2157, 2797, + }, { + 1412, 1336, 1130, 1040, 995, 970, 957, 950, 947, 947, + 955, 950, 941, 930, 918, 897, 868, 838, 810, 783, + 759, 734, 710, 693, 684, 681, 690, 712, 752, 823, + 924, 1009, 1069, 1102, 1111, 1104, 1098, 1111, 1168, 1295, + 1518, 1873, 2388, 3072, + }, { + 1411, 1293, 1086, 1009, 974, 957, 949, 947, 957, 951, + 941, 928, 913, 896, 878, 852, 817, 785, 756, 732, + 713, 695, 683, 682, 689, 710, 746, 811, 906, 992, + 1061, 1099, 1111, 1106, 1098, 1107, 1155, 1266, 1471, 1799, + 2277, 2945, 3072, 3072, + }}, {{ + 1431, 1412, 1403, 1379, 1343, 1293, 1229, 1180, 1125, 1075, + 1040, 1014, 996, 979, 965, 957, 951, 948, 947, 957, + 951, 940, 924, 903, 877, 846, 815, 785, 753, 725, + 702, 686, 681, 689, 714, 760, 847, 947, 1028, 1083, + 1108, 1109, 1101, 1100, 1132, 1222, 1402, 1705, 2160, 2803, + }, { + 1431, 1412, 1401, 1375, 1336, 1278, 1215, 1168, 1115, 1066, + 1032, 1008, 991, 975, 962, 954, 950, 947, 947, 955, + 948, 935, 916, 894, 866, 835, 803, 772, 742, 715, + 695, 683, 683, 697, 729, 784, 887, 982, 1054, 1096, + 1111, 1106, 1098, 1107, 1159, 1281, 1505, 1865, 2391, 3072, + }, { + 1427, 1411, 1393, 1353, 1293, 1215, 1160, 1118, 1072, 1031, + 1003, 984, 971, 960, 952, 948, 947, 957, 952, 941, + 924, 902, 876, 847, 815, 781, 750, 723, 700, 685, + 681, 691, 719, 766, 858, 958, 1039, 1089, 1109, 1108, + 1099, 1102, 1141, 1245, 1442, 1766, 2250, 2930, 3072, 3072, + }} +}; + +static const int16_t lwc_gain_tab[11][7] = { + { -21, -197, -271, -466, 32767, 32767, 32767 }, + { -197, -29, -244, -271, -540, 32767, 32767 }, + { -271, -244, -29, -249, -271, -593, 32767 }, + { -466, -271, -249, -29, -251, -271, -632 }, + { -540, -271, -251, -29, -251, -271, -664 }, + { -593, -271, -251, -29, -252, -271, -690 }, + { -632, -271, -252, -29, -252, -271, -711 }, + { -664, -271, -252, -29, -252, -271, -730 }, + { -690, -271, -252, -29, -252, -271, -745 }, + { -711, -271, -252, -29, -253, -271, -759 }, + { -730, -271, -253, -29, -253, -271, -771 }, +}; + +static const int16_t lwc_adj_tab[7] = { + -192, -320, -448, -512, -448, -320, -192, +}; + +static const uint8_t log_add_tab[212] = { + 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50, + 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38, + 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28, + 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, + 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15, 15, + 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, + 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, +}; + +static const uint8_t bap_tab[64] = { + 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, + 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, + 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, +}; + +static float mantissa_tab1[17][4]; +static float mantissa_tab2[17][4]; +static float mantissa_tab3[17][4]; +static float exponent_tab[50]; +static float gain_tab[1024]; + +DECLARE_ALIGNED(32, static float, window)[3712]; + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd.h new file mode 100644 index 00000000..ed09cb9b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd.h @@ -0,0 +1,52 @@ +/* + * Direct Stream Digital (DSD) decoder + * based on BSD licensed dsd2pcm by Sebastian Gesemann + * Copyright (c) 2009, 2011 Sebastian Gesemann. All rights reserved. + * Copyright (c) 2014 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DSD_H +#define AVCODEC_DSD_H + +#include "libavcodec/internal.h" +#include "libavcodec/mathops.h" +#include "avcodec.h" + +#define HTAPS 48 /** number of FIR constants */ +#define FIFOSIZE 16 /** must be a power of two */ +#define FIFOMASK (FIFOSIZE - 1) /** bit mask for FIFO offsets */ + +#if FIFOSIZE * 8 < HTAPS * 2 +#error "FIFOSIZE too small" +#endif + +/** + * Per-channel buffer + */ +typedef struct DSDContext { + uint8_t buf[FIFOSIZE]; + unsigned pos; +} DSDContext; + +void ff_init_dsd_data(void); + +void ff_dsd2pcm_translate(DSDContext* s, size_t samples, int lsbf, + const uint8_t *src, ptrdiff_t src_stride, + float *dst, ptrdiff_t dst_stride); +#endif /* AVCODEC_DSD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd_tablegen.h new file mode 100644 index 00000000..e5da86a1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dsd_tablegen.h @@ -0,0 +1,75 @@ +/* + * Header file for hardcoded DSD tables + * based on BSD licensed dsd2pcm by Sebastian Gesemann + * Copyright (c) 2009, 2011 Sebastian Gesemann. All rights reserved. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DSD_TABLEGEN_H +#define AVCODEC_DSD_TABLEGEN_H + +#include +#include "libavutil/attributes.h" +#include "dsd.h" + +#define HTAPS 48 /** number of FIR constants */ +#define CTABLES ((HTAPS + 7) / 8) /** number of "8 MACs" lookup tables */ + +#include "libavutil/common.h" + +/* + * Properties of this 96-tap lowpass filter when applied on a signal + * with sampling rate of 44100*64 Hz: + * + * () has a delay of 17 microseconds. + * + * () flat response up to 48 kHz + * + * () if you downsample afterwards by a factor of 8, the + * spectrum below 70 kHz is practically alias-free. + * + * () stopband rejection is about 160 dB + * + * The coefficient tables ("ctables") take only 6 Kibi Bytes and + * should fit into a modern processor's fast cache. + */ + +/** + * The 2nd half (48 coeffs) of a 96-tap symmetric lowpass filter + */ +static const double htaps[HTAPS] = { + 0.09950731974056658, 0.09562845727714668, 0.08819647126516944, + 0.07782552527068175, 0.06534876523171299, 0.05172629311427257, + 0.0379429484910187, 0.02490921351762261, 0.0133774746265897, + 0.003883043418804416, -0.003284703416210726, -0.008080250212687497, + -0.01067241812471033, -0.01139427235000863, -0.0106813877974587, + -0.009007905078766049, -0.006828859761015335, -0.004535184322001496, + -0.002425035959059578, -0.0006922187080790708, 0.0005700762133516592, + 0.001353838005269448, 0.001713709169690937, 0.001742046839472948, + 0.001545601648013235, 0.001226696225277855, 0.0008704322683580222, + 0.0005381636200535649, 0.000266446345425276, 7.002968738383528e-05, + -5.279407053811266e-05, -0.0001140625650874684, -0.0001304796361231895, + -0.0001189970287491285, -9.396247155265073e-05, -6.577634378272832e-05, + -4.07492895872535e-05, -2.17407957554587e-05, -9.163058931391722e-06, + -2.017460145032201e-06, 1.249721855219005e-06, 2.166655190537392e-06, + 1.930520892991082e-06, 1.319400334374195e-06, 7.410039764949091e-07, + 3.423230509967409e-07, 1.244182214744588e-07, 3.130441005359396e-08 +}; + +static float ctables[CTABLES][256]; +#endif /* AVCODEC_DSD_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv.h new file mode 100644 index 00000000..0205d723 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv.h @@ -0,0 +1,131 @@ +/* + * Constants for DV codec + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Constants for DV codec. + */ + +#ifndef AVCODEC_DV_H +#define AVCODEC_DV_H + +#include "avcodec.h" +#include "dv_profile.h" +#include "me_cmp.h" +#include "vlc.h" +#include "idctdsp.h" + +typedef struct DVwork_chunk { + uint16_t buf_offset; + uint16_t mb_coordinates[5]; +} DVwork_chunk; + +typedef struct DVVideoContext { + AVClass *avclass; + const AVDVProfile *sys; + const AVFrame *frame; + AVCodecContext *avctx; + uint8_t *buf; + + uint8_t dv_zigzag[2][64]; + + void (*get_pixels)(int16_t *block, const uint8_t *pixels, ptrdiff_t linesize); + void (*fdct[2])(int16_t *block); + void (*idct_put[2])(uint8_t *dest, ptrdiff_t stride, int16_t *block); + me_cmp_func ildct_cmp; + DVwork_chunk work_chunks[4 * 12 * 27]; + uint32_t idct_factor[2 * 4 * 16 * 64]; + IDCTDSPContext idsp; + + int quant_deadzone; +} DVVideoContext; + +enum dv_section_type { + dv_sect_header = 0x1f, + dv_sect_subcode = 0x3f, + dv_sect_vaux = 0x56, + dv_sect_audio = 0x76, + dv_sect_video = 0x96, +}; + +enum dv_pack_type { + dv_header525 = 0x3f, /* see dv_write_pack for important details on */ + dv_header625 = 0xbf, /* these two packs */ + dv_timecode = 0x13, + dv_audio_source = 0x50, + dv_audio_control = 0x51, + dv_audio_recdate = 0x52, + dv_audio_rectime = 0x53, + dv_video_source = 0x60, + dv_video_control = 0x61, + dv_video_recdate = 0x62, + dv_video_rectime = 0x63, + dv_unknown_pack = 0xff, +}; + +#define DV_PROFILE_IS_HD(p) ((p)->video_stype & 0x10) +#define DV_PROFILE_IS_1080i50(p) (((p)->video_stype == 0x14) && ((p)->dsf == 1)) +#define DV_PROFILE_IS_1080i60(p) (((p)->video_stype == 0x14) && ((p)->dsf == 0)) +#define DV_PROFILE_IS_720p50(p) (((p)->video_stype == 0x18) && ((p)->dsf == 1)) + +/** + * largest possible DV frame, in bytes (1080i50) + */ +#define DV_MAX_FRAME_SIZE 576000 + +/** + * maximum number of blocks per macroblock in any DV format + */ +#define DV_MAX_BPM 8 + +#define TEX_VLC_BITS 10 + +extern RL_VLC_ELEM ff_dv_rl_vlc[1664]; + +int ff_dv_init_dynamic_tables(DVVideoContext *s, const AVDVProfile *d); + +int ff_dvvideo_init(AVCodecContext *avctx); + +static inline int dv_work_pool_size(const AVDVProfile *d) +{ + int size = d->n_difchan * d->difseg_size * 27; + if (DV_PROFILE_IS_1080i50(d)) + size -= 3 * 27; + if (DV_PROFILE_IS_720p50(d)) + size -= 4 * 27; + return size; +} + +static inline void dv_calculate_mb_xy(DVVideoContext *s, + DVwork_chunk *work_chunk, + int m, int *mb_x, int *mb_y) +{ + *mb_x = work_chunk->mb_coordinates[m] & 0xff; + *mb_y = work_chunk->mb_coordinates[m] >> 8; + + /* We work with 720p frames split in half. + * The odd half-frame (chan == 2,3) is displaced :-( */ + if (s->sys->height == 720 && !(s->buf[1] & 0x0C)) + /* shifting the Y coordinate down by 72/2 macro blocks */ + *mb_y -= (*mb_y > 17) ? 18 : -72; +} + +#endif /* AVCODEC_DV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile.h new file mode 100644 index 00000000..9380a66f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile.h @@ -0,0 +1,83 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DV_PROFILE_H +#define AVCODEC_DV_PROFILE_H + +#include + +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" +#include "avcodec.h" + +/* minimum number of bytes to read from a DV stream in order to + * determine the profile */ +#define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */ + + +/* + * AVDVProfile is used to express the differences between various + * DV flavors. For now it's primarily used for differentiating + * 525/60 and 625/50, but the plans are to use it for various + * DV specs as well (e.g. SMPTE314M vs. IEC 61834). + */ +typedef struct AVDVProfile { + int dsf; /* value of the dsf in the DV header */ + int video_stype; /* stype for VAUX source pack */ + int frame_size; /* total size of one frame in bytes */ + int difseg_size; /* number of DIF segments per DIF channel */ + int n_difchan; /* number of DIF channels per frame */ + AVRational time_base; /* 1/framerate */ + int ltc_divisor; /* FPS from the LTS standpoint */ + int height; /* picture height in pixels */ + int width; /* picture width in pixels */ + AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */ + enum AVPixelFormat pix_fmt; /* picture pixel format */ + int bpm; /* blocks per macroblock */ + const uint8_t *block_sizes; /* AC block sizes, in bits */ + int audio_stride; /* size of audio_shuffle table */ + int audio_min_samples[3]; /* min amount of audio samples */ + /* for 48kHz, 44.1kHz and 32kHz */ + int audio_samples_dist[5]; /* how many samples are supposed to be */ + /* in each frame in a 5 frames window */ + const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */ +} AVDVProfile; + +/** + * Get a DV profile for the provided compressed frame. + * + * @param sys the profile used for the previous frame, may be NULL + * @param frame the compressed data buffer + * @param buf_size size of the buffer in bytes + * @return the DV profile for the supplied data or NULL on failure + */ +const AVDVProfile *av_dv_frame_profile(const AVDVProfile *sys, + const uint8_t *frame, unsigned buf_size); + +/** + * Get a DV profile for the provided stream parameters. + */ +const AVDVProfile *av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt); + +/** + * Get a DV profile for the provided stream parameters. + * The frame rate is used as a best-effort parameter. + */ +const AVDVProfile *av_dv_codec_profile2(int width, int height, enum AVPixelFormat pix_fmt, AVRational frame_rate); + +#endif /* AVCODEC_DV_PROFILE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile_internal.h new file mode 100644 index 00000000..67d3a2b7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_profile_internal.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DV_PROFILE_INTERNAL_H +#define AVCODEC_DV_PROFILE_INTERNAL_H + +#include "dv_profile.h" + +/** + * Print all allowed DV profiles into logctx at specified logging level. + */ +void ff_dv_print_profiles(void *logctx, int loglevel); + +/** + * Get a DV profile for the provided compressed frame. + */ +const AVDVProfile* ff_dv_frame_profile(AVCodecContext* codec, const AVDVProfile *sys, + const uint8_t *frame, unsigned buf_size); + +#endif /* AVCODEC_DV_PROFILE_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_tablegen.h new file mode 100644 index 00000000..941b5572 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dv_tablegen.h @@ -0,0 +1,98 @@ +/* + * Header file for hardcoded DV tables + * + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DV_TABLEGEN_H +#define AVCODEC_DV_TABLEGEN_H + +#include +#include "libavutil/attributes.h" + +#include "dvdata.h" + +#if CONFIG_SMALL +#define DV_VLC_MAP_RUN_SIZE 15 +#define DV_VLC_MAP_LEV_SIZE 23 +#else +#define DV_VLC_MAP_RUN_SIZE 64 +#define DV_VLC_MAP_LEV_SIZE 512 // FIXME sign was removed so this should be /2 but needs check +#endif + +/* VLC encoding lookup table */ +typedef struct dv_vlc_pair { + uint32_t vlc; + uint32_t size; +} dv_vlc_pair; + +#if CONFIG_HARDCODED_TABLES +#define dv_vlc_map_tableinit() +#include "libavcodec/dv_tables.h" +#else +static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]; + +static av_cold void dv_vlc_map_tableinit(void) +{ + int i, j; + for (i = 0; i < NB_DV_VLC - 1; i++) { + if (ff_dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE) + continue; +#if CONFIG_SMALL + if (ff_dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE) + continue; +#endif + + if (dv_vlc_map[ff_dv_vlc_run[i]][ff_dv_vlc_level[i]].size != 0) + continue; + + dv_vlc_map[ff_dv_vlc_run[i]][ff_dv_vlc_level[i]].vlc = + ff_dv_vlc_bits[i] << (!!ff_dv_vlc_level[i]); + dv_vlc_map[ff_dv_vlc_run[i]][ff_dv_vlc_level[i]].size = + ff_dv_vlc_len[i] + (!!ff_dv_vlc_level[i]); + } + for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { +#if CONFIG_SMALL + for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { + if (dv_vlc_map[i][j].size == 0) { + dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | + (dv_vlc_map[i - 1][0].vlc << + dv_vlc_map[0][j].size); + dv_vlc_map[i][j].size = dv_vlc_map[i - 1][0].size + + dv_vlc_map[0][j].size; + } + } +#else + for (j = 1; j < DV_VLC_MAP_LEV_SIZE / 2; j++) { + if (dv_vlc_map[i][j].size == 0) { + dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | + (dv_vlc_map[i - 1][0].vlc << + dv_vlc_map[0][j].size); + dv_vlc_map[i][j].size = dv_vlc_map[i - 1][0].size + + dv_vlc_map[0][j].size; + } + dv_vlc_map[i][((uint16_t) (-j)) & 0x1ff].vlc = dv_vlc_map[i][j].vlc | 1; + dv_vlc_map[i][((uint16_t) (-j)) & 0x1ff].size = dv_vlc_map[i][j].size; + } +#endif + } +} +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_DV_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvaudio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvaudio.h new file mode 100644 index 00000000..e7f70c58 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvaudio.h @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DVAUDIO_H +#define AVCODEC_DVAUDIO_H + +#include + +static inline int dv_get_audio_sample_count(const uint8_t *buffer, int dsf) +{ + int samples = buffer[0] & 0x3f; /* samples in this frame - min samples */ + + switch ((buffer[3] >> 3) & 0x07) { + case 0: + return samples + (dsf ? 1896 : 1580); + case 1: + return samples + (dsf ? 1742 : 1452); + case 2: + default: + return samples + (dsf ? 1264 : 1053); + } +} + +#endif /* AVCODEC_DVAUDIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvbtxt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvbtxt.h new file mode 100644 index 00000000..ff88fcf0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvbtxt.h @@ -0,0 +1,41 @@ +/* + * DVB teletext common functions. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DVBTXT_H +#define AVCODEC_DVBTXT_H + +#include "libavutil/attributes.h" + +/* Returns true if data identifier matches a teletext stream according to EN + * 301 775 section 4.4.2 */ +static av_always_inline int ff_data_identifier_is_teletext(int data_identifier) +{ + return (data_identifier >= 0x10 && data_identifier <= 0x1F || + data_identifier >= 0x99 && data_identifier <= 0x9B); +} + +/* Returns true if data unit id matches EBU teletext data according to + * EN 301 775 section 4.4.2 */ +static av_always_inline int ff_data_unit_id_is_teletext(int data_unit_id) +{ + return (data_unit_id == 0x02 || data_unit_id == 0x03); +} + +#endif /* AVCODEC_DVBTXT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvdata.h new file mode 100644 index 00000000..e0ed043c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dvdata.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DVDATA_H +#define AVCODEC_DVDATA_H + +#include + +extern const uint8_t ff_dv_zigzag248_direct[64]; + +extern const uint8_t ff_dv_quant_shifts[22][4]; +extern const uint8_t ff_dv_quant_offset[4]; + +#define NB_DV_VLC 409 + +extern const uint16_t ff_dv_vlc_bits[NB_DV_VLC]; +extern const uint8_t ff_dv_vlc_len[NB_DV_VLC]; +extern const uint8_t ff_dv_vlc_run[NB_DV_VLC]; +extern const uint8_t ff_dv_vlc_level[NB_DV_VLC]; + +#endif /* AVCODEC_DVDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2.h new file mode 100644 index 00000000..22c93992 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2.h @@ -0,0 +1,93 @@ +/* + * DXVA2 HW acceleration + * + * copyright (c) 2009 Laurent Aimar + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DXVA2_H +#define AVCODEC_DXVA2_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_dxva2 + * Public libavcodec DXVA2 header. + */ + +#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602 +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0602 +#endif + +#include +#include +#include + +/** + * @defgroup lavc_codec_hwaccel_dxva2 DXVA2 + * @ingroup lavc_codec_hwaccel + * + * @{ + */ + +#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards +#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface + +/** + * This structure is used to provides the necessary configurations and data + * to the DXVA2 FFmpeg HWAccel implementation. + * + * The application must make it available as AVCodecContext.hwaccel_context. + */ +struct dxva_context { + /** + * DXVA2 decoder object + */ + IDirectXVideoDecoder *decoder; + + /** + * DXVA2 configuration used to create the decoder + */ + const DXVA2_ConfigPictureDecode *cfg; + + /** + * The number of surface in the surface array + */ + unsigned surface_count; + + /** + * The array of Direct3D surfaces used to create the decoder + */ + LPDIRECT3DSURFACE9 *surface; + + /** + * A bit field configuring the workarounds needed for using the decoder + */ + uint64_t workaround; + + /** + * Private to the FFmpeg AVHWAccel implementation + */ + unsigned report_id; +}; + +/** + * @} + */ + +#endif /* AVCODEC_DXVA2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2_internal.h new file mode 100644 index 00000000..b822af59 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/dxva2_internal.h @@ -0,0 +1,164 @@ +/* + * DXVA2 HW acceleration + * + * copyright (c) 2010 Laurent Aimar + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_DXVA2_INTERNAL_H +#define AVCODEC_DXVA2_INTERNAL_H + +#define COBJMACROS + +#include "config.h" + +/* define the proper COM entries before forcing desktop APIs */ +#include + +#if CONFIG_DXVA2 +#include "dxva2.h" +#include "libavutil/hwcontext_dxva2.h" +#endif +#if CONFIG_D3D11VA +#include "d3d11va.h" +#include "libavutil/hwcontext_d3d11va.h" +#endif +#if HAVE_DXVA_H +/* When targeting WINAPI_FAMILY_PHONE_APP or WINAPI_FAMILY_APP, dxva.h + * defines nothing. Force the struct definitions to be visible. */ +#undef WINAPI_FAMILY +#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP +#undef _CRT_BUILD_DESKTOP_APP +#define _CRT_BUILD_DESKTOP_APP 0 +#include +#endif + +#include "libavutil/hwcontext.h" + +#include "avcodec.h" +#include "internal.h" + +typedef void DECODER_BUFFER_DESC; + +typedef union { +#if CONFIG_D3D11VA + struct AVD3D11VAContext d3d11va; +#endif +#if CONFIG_DXVA2 + struct dxva_context dxva2; +#endif +} AVDXVAContext; + +typedef struct FFDXVASharedContext { + AVBufferRef *decoder_ref; + + // FF_DXVA2_WORKAROUND_* flags + uint64_t workaround; + + // E.g. AV_PIX_FMT_D3D11 (same as AVCodecContext.pix_fmt, except during init) + enum AVPixelFormat pix_fmt; + + AVHWDeviceContext *device_ctx; + +#if CONFIG_D3D11VA + ID3D11VideoDecoder *d3d11_decoder; + D3D11_VIDEO_DECODER_CONFIG d3d11_config; + ID3D11VideoDecoderOutputView **d3d11_views; + int nb_d3d11_views; + ID3D11Texture2D *d3d11_texture; +#endif + +#if CONFIG_DXVA2 + IDirectXVideoDecoder *dxva2_decoder; + IDirectXVideoDecoderService *dxva2_service; + DXVA2_ConfigPictureDecode dxva2_config; +#endif + + // Legacy (but used by code outside of setup) + // In generic mode, DXVA_CONTEXT() will return a pointer to this. + AVDXVAContext ctx; +} FFDXVASharedContext; + +#define DXVA_SHARED_CONTEXT(avctx) ((FFDXVASharedContext *)((avctx)->internal->hwaccel_priv_data)) + +#define DXVA_CONTEXT(avctx) (AVDXVAContext *)((avctx)->hwaccel_context ? (avctx)->hwaccel_context : (&(DXVA_SHARED_CONTEXT(avctx)->ctx))) + +#define D3D11VA_CONTEXT(ctx) (&ctx->d3d11va) +#define DXVA2_CONTEXT(ctx) (&ctx->dxva2) + +#if CONFIG_D3D11VA && CONFIG_DXVA2 +#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.workaround : ctx->dxva2.workaround) +#define DXVA_CONTEXT_COUNT(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.surface_count : ctx->dxva2.surface_count) +#define DXVA_CONTEXT_DECODER(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? (void *)ctx->d3d11va.decoder : (void *)ctx->dxva2.decoder) +#define DXVA_CONTEXT_REPORT_ID(avctx, ctx) (*(ff_dxva2_is_d3d11(avctx) ? &ctx->d3d11va.report_id : &ctx->dxva2.report_id)) +#define DXVA_CONTEXT_CFG(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? (void *)ctx->d3d11va.cfg : (void *)ctx->dxva2.cfg) +#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigBitstreamRaw : ctx->dxva2.cfg->ConfigBitstreamRaw) +#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigIntraResidUnsigned : ctx->dxva2.cfg->ConfigIntraResidUnsigned) +#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ff_dxva2_is_d3d11(avctx) ? ctx->d3d11va.cfg->ConfigResidDiffAccelerator : ctx->dxva2.cfg->ConfigResidDiffAccelerator) +#define DXVA_CONTEXT_VALID(avctx, ctx) (DXVA_CONTEXT_DECODER(avctx, ctx) && \ + DXVA_CONTEXT_CFG(avctx, ctx) && \ + (ff_dxva2_is_d3d11(avctx) || ctx->dxva2.surface_count)) +#elif CONFIG_DXVA2 +#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->dxva2.workaround) +#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->dxva2.surface_count) +#define DXVA_CONTEXT_DECODER(avctx, ctx) (ctx->dxva2.decoder) +#define DXVA_CONTEXT_REPORT_ID(avctx, ctx) (*(&ctx->dxva2.report_id)) +#define DXVA_CONTEXT_CFG(avctx, ctx) (ctx->dxva2.cfg) +#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->dxva2.cfg->ConfigBitstreamRaw) +#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->dxva2.cfg->ConfigIntraResidUnsigned) +#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->dxva2.cfg->ConfigResidDiffAccelerator) +#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->dxva2.decoder && ctx->dxva2.cfg && ctx->dxva2.surface_count) +#elif CONFIG_D3D11VA +#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->d3d11va.workaround) +#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->d3d11va.surface_count) +#define DXVA_CONTEXT_DECODER(avctx, ctx) (ctx->d3d11va.decoder) +#define DXVA_CONTEXT_REPORT_ID(avctx, ctx) (*(&ctx->d3d11va.report_id)) +#define DXVA_CONTEXT_CFG(avctx, ctx) (ctx->d3d11va.cfg) +#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->d3d11va.cfg->ConfigBitstreamRaw) +#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->d3d11va.cfg->ConfigIntraResidUnsigned) +#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator) +#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg) +#endif + +unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, + const AVDXVAContext *, + const AVFrame *frame); + +int ff_dxva2_commit_buffer(AVCodecContext *, AVDXVAContext *, + DECODER_BUFFER_DESC *, + unsigned type, const void *data, unsigned size, + unsigned mb_count); + + +int ff_dxva2_common_end_frame(AVCodecContext *, AVFrame *, + const void *pp, unsigned pp_size, + const void *qm, unsigned qm_size, + int (*commit_bs_si)(AVCodecContext *, + DECODER_BUFFER_DESC *bs, + DECODER_BUFFER_DESC *slice)); + +int ff_dxva2_decode_init(AVCodecContext *avctx); + +int ff_dxva2_decode_uninit(AVCodecContext *avctx); + +int ff_dxva2_common_frame_params(AVCodecContext *avctx, + AVBufferRef *hw_frames_ctx); + +int ff_dxva2_is_d3d11(const AVCodecContext *avctx); + +#endif /* AVCODEC_DXVA2_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3_data.h new file mode 100644 index 00000000..10a67f16 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3_data.h @@ -0,0 +1,36 @@ +/* + * E-AC-3 tables + * Copyright (c) 2007 Bartlomiej Wolowiec + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_EAC3_DATA_H +#define AVCODEC_EAC3_DATA_H + +#include + +extern const uint8_t ff_eac3_bits_vs_hebap[20]; +extern const int16_t ff_eac3_gaq_remap_1[12]; +extern const int16_t ff_eac3_gaq_remap_2_4_a[9][2]; +extern const int16_t ff_eac3_gaq_remap_2_4_b[9][2]; + +extern const int16_t (* const ff_eac3_mantissa_vq[8])[6]; +extern const uint8_t ff_eac3_frm_expstr[32][6]; +extern const float ff_eac3_spx_atten_tab[32][3]; + +#endif /* AVCODEC_EAC3_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3enc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3enc.h new file mode 100644 index 00000000..7d615597 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eac3enc.h @@ -0,0 +1,54 @@ +/* + * E-AC-3 encoder + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * E-AC-3 encoder + */ + +#ifndef AVCODEC_EAC3ENC_H +#define AVCODEC_EAC3ENC_H + +#include "ac3enc.h" + +/** + * Initialize E-AC-3 exponent tables. + */ +void ff_eac3_exponent_init(void); + +/** + * Determine frame exponent strategy use and indices. + */ +void ff_eac3_get_frame_exp_strategy(AC3EncodeContext *s); + +/** + * Set coupling states. + * This determines whether certain flags must be written to the bitstream or + * whether they will be implicitly already known by the decoder. + */ +void ff_eac3_set_cpl_states(AC3EncodeContext *s); + +/** + * Write the E-AC-3 frame header to the output bitstream. + */ +void ff_eac3_output_frame_header(AC3EncodeContext *s); + +#endif /* AVCODEC_EAC3ENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eaidct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eaidct.h new file mode 100644 index 00000000..a46dae93 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/eaidct.h @@ -0,0 +1,27 @@ +/* + * This file is part of FFmpeg + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_EAIDCT_H +#define AVCODEC_EAIDCT_H + +#include +#include + +void ff_ea_idct_put_c(uint8_t *dest, ptrdiff_t linesize, int16_t *block); + +#endif /* AVCODEC_EAIDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elbg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elbg.h new file mode 100644 index 00000000..f48aa3b4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elbg.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2007 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ELBG_H +#define AVCODEC_ELBG_H + +#include "libavutil/lfg.h" + +/** + * Implementation of the Enhanced LBG Algorithm + * Based on the paper "Neural Networks 14:1219-1237" that can be found in + * http://citeseer.ist.psu.edu/patan01enhanced.html . + * + * @param points Input points. + * @param dim Dimension of the points. + * @param numpoints Num of points in **points. + * @param codebook Pointer to the output codebook. Must be allocated. + * @param numCB Number of points in the codebook. + * @param num_steps The maximum number of steps. One step is already a good compromise between time and quality. + * @param closest_cb Return the closest codebook to each point. Must be allocated. + * @param rand_state A random number generator state. Should be already initialized by av_lfg_init(). + * @return < 0 in case of error, 0 otherwise + */ +int avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook, + int numCB, int num_steps, int *closest_cb, + AVLFG *rand_state); + +/** + * Initialize the **codebook vector for the elbg algorithm. If you have already + * a codebook and you want to refine it, you shouldn't call this function. + * If numpoints < 8*numCB this function fills **codebook with random numbers. + * If not, it calls avpriv_do_elbg for a (smaller) random sample of the points in + * **points. Get the same parameters as avpriv_do_elbg. + * @return < 0 in case of error, 0 otherwise + */ +int avpriv_init_elbg(int *points, int dim, int numpoints, int *codebook, + int numCB, int num_steps, int *closest_cb, + AVLFG *rand_state); + +#endif /* AVCODEC_ELBG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elsdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elsdec.h new file mode 100644 index 00000000..139a24ab --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/elsdec.h @@ -0,0 +1,60 @@ +/* + * ELS (Entropy Logarithmic-Scale) decoder + * + * Copyright (c) 2013 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Entropy Logarithmic-Scale binary arithmetic coder + */ + +#ifndef AVCODEC_ELSDEC_H +#define AVCODEC_ELSDEC_H + +#include +#include + +#define ELS_EXPGOLOMB_LEN 10 + +typedef struct ElsDecCtx { + const uint8_t *in_buf; + unsigned x; + size_t data_size; + int j, t, diff, err; +} ElsDecCtx; + +typedef struct ElsRungNode { + uint8_t rung; + uint16_t next_index; +} ElsRungNode; + +typedef struct ElsUnsignedRung { + uint8_t prefix_rung[ELS_EXPGOLOMB_LEN + 1]; + ElsRungNode *rem_rung_list; + size_t rung_list_size; + uint16_t avail_index; +} ElsUnsignedRung; + +void ff_els_decoder_init(ElsDecCtx *ctx, const uint8_t *in, size_t data_size); +void ff_els_decoder_uninit(ElsUnsignedRung *rung); +int ff_els_decode_bit(ElsDecCtx *ctx, unsigned char *rung); +unsigned ff_els_decode_unsigned(ElsDecCtx *ctx, ElsUnsignedRung *ur); + +#endif /* AVCODEC_ELSDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/error_resilience.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/error_resilience.h new file mode 100644 index 00000000..664a7656 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/error_resilience.h @@ -0,0 +1,97 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ERROR_RESILIENCE_H +#define AVCODEC_ERROR_RESILIENCE_H + +#include +#include + +#include "avcodec.h" +#include "me_cmp.h" +#include "thread.h" + +///< current MB is the first after a resync marker +#define VP_START 1 +#define ER_AC_ERROR 2 +#define ER_DC_ERROR 4 +#define ER_MV_ERROR 8 +#define ER_AC_END 16 +#define ER_DC_END 32 +#define ER_MV_END 64 + +#define ER_MB_ERROR (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR) +#define ER_MB_END (ER_AC_END|ER_DC_END|ER_MV_END) + +typedef struct ERPicture { + AVFrame *f; + ThreadFrame *tf; + + // it is the caller's responsibility to allocate these buffers + int16_t (*motion_val[2])[2]; + int8_t *ref_index[2]; + + uint32_t *mb_type; + int field_picture; +} ERPicture; + +typedef struct ERContext { + AVCodecContext *avctx; + MECmpContext mecc; + int mecc_inited; + + int *mb_index2xy; + int mb_num; + int mb_width, mb_height; + ptrdiff_t mb_stride; + ptrdiff_t b8_stride; + + atomic_int error_count; + int error_occurred; + uint8_t *error_status_table; + uint8_t *er_temp_buffer; + int16_t *dc_val[3]; + uint8_t *mbskip_table; + uint8_t *mbintra_table; + int mv[2][4][2]; + + ERPicture cur_pic; + ERPicture last_pic; + ERPicture next_pic; + + AVBufferRef *ref_index_buf[2]; + AVBufferRef *motion_val_buf[2]; + + uint16_t pp_time; + uint16_t pb_time; + int quarter_sample; + int partitioned_frame; + int ref_count; + + void (*decode_mb)(void *opaque, int ref, int mv_dir, int mv_type, + int (*mv)[2][4][2], + int mb_x, int mb_y, int mb_intra, int mb_skipped); + void *opaque; +} ERContext; + +void ff_er_frame_start(ERContext *s); +void ff_er_frame_end(ERContext *s); +void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy, + int status); + +#endif /* AVCODEC_ERROR_RESILIENCE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/evrcdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/evrcdata.h new file mode 100644 index 00000000..8cfc2028 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/evrcdata.h @@ -0,0 +1,1499 @@ +/* + * Enhanced Variable Rate Codec, Service Option 3 decoder + * Copyright (c) 2013 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_EVRCDATA_H +#define AVCODEC_EVRCDATA_H + +/** + * @file + * Data tables for the EVRC decoder + * @author Paul B Mahol + */ + +#include "libavutil/common.h" + +/** + * Rate 1/8 frame energy quantization + * + * TIA/IS-127 table 8-18 + */ +static const float evrc_energy_quant[][3] = { +{-0.2464E-01,-0.4005E-02,-0.1107E+00 }, { 0.8734E+00, 0.1004E+01, 0.9930E+00 }, +{ 0.4222E+00, 0.3894E+00, 0.5020E+00 }, { 0.1450E+01, 0.1328E+01, 0.1278E+01 }, +{ 0.1957E+00, 0.2169E+00, 0.2735E+00 }, { 0.1142E+01, 0.1240E+01, 0.1157E+01 }, +{ 0.7881E+00, 0.6778E+00, 0.4185E+00 }, { 0.1504E+01, 0.1468E+01, 0.1534E+01 }, +{ 0.3173E+00, 0.2693E+00,-0.9526E-01 }, { 0.1141E+01, 0.1154E+01, 0.1044E+01 }, +{ 0.5147E+00, 0.5784E+00, 0.8802E+00 }, { 0.1502E+01, 0.1407E+01, 0.1409E+01 }, +{ 0.3163E+00, 0.3592E+00, 0.2830E+00 }, { 0.1217E+01, 0.1213E+01, 0.1216E+01 }, +{ 0.1023E+01, 0.1139E+01,-0.9526E-01 }, { 0.1619E+01, 0.1655E+01, 0.1642E+01 }, +{ 0.1437E+00, 0.1505E+00, 0.6838E-01 }, { 0.9794E+00, 0.1021E+01, 0.1117E+01 }, +{ 0.4701E+00, 0.6426E+00, 0.5519E+00 }, { 0.1366E+01, 0.1397E+01, 0.1406E+01 }, +{ 0.2918E+00, 0.3022E+00, 0.2420E+00 }, { 0.1309E+01, 0.1241E+01, 0.1220E+01 }, +{ 0.7989E+00, 0.7654E+00, 0.7391E+00 }, { 0.1612E+01, 0.1502E+01, 0.1447E+01 }, +{ 0.2594E+00, 0.1948E+00, 0.2555E+00 }, { 0.1091E+01, 0.1150E+01, 0.1272E+01 }, +{ 0.3423E+00, 0.4150E+00, 0.1294E+01 }, { 0.1729E+01, 0.1377E+01, 0.1065E+01 }, +{ 0.4103E+00, 0.3287E+00, 0.3228E+00 }, { 0.1144E+01, 0.1281E+01, 0.1416E+01 }, +{ 0.1047E+01, 0.1117E+01, 0.6188E+00 }, { 0.1914E+01, 0.1777E+01, 0.1516E+01 }, +{-0.2117E-01, 0.2159E+00, 0.2351E+00 }, { 0.1093E+01, 0.1088E+01, 0.1026E+01 }, +{ 0.5567E+00, 0.5092E+00, 0.4654E+00 }, { 0.1510E+01, 0.1449E+01, 0.1201E+01 }, +{ 0.2362E+00, 0.3426E+00, 0.2549E+00 }, { 0.1340E+01, 0.1225E+01, 0.1117E+01 }, +{ 0.1203E+01, 0.3819E+00, 0.2269E+00 }, { 0.1373E+01, 0.1404E+01, 0.1830E+01 }, +{ 0.2570E+00, 0.2668E+00, 0.1636E+00 }, { 0.1219E+01, 0.1098E+01, 0.1122E+01 }, +{ 0.6985E+00, 0.8456E+00, 0.1069E+01 }, { 0.1550E+01, 0.1501E+01, 0.1388E+01 }, +{ 0.2870E+00, 0.3060E+00, 0.3599E+00 }, { 0.1178E+01, 0.1345E+01, 0.1302E+01 }, +{ 0.1270E+01, 0.1215E+01, 0.1812E+00 }, { 0.1725E+01, 0.1777E+01, 0.1693E+01 }, +{ 0.2074E+00, 0.2104E+00, 0.1539E+00 }, { 0.1105E+01, 0.1034E+01, 0.1104E+01 }, +{ 0.6683E+00, 0.6646E+00, 0.6639E+00 }, { 0.1403E+01, 0.1462E+01, 0.1435E+01 }, +{ 0.3389E+00, 0.3754E+00, 0.2150E+00 }, { 0.1288E+01, 0.1325E+01, 0.1257E+01 }, +{ 0.8933E+00, 0.8253E+00, 0.8133E+00 }, { 0.1555E+01, 0.1579E+01, 0.1565E+01 }, +{ 0.3264E+00, 0.2434E+00, 0.2852E+00 }, { 0.1242E+01, 0.1180E+01, 0.1202E+01 }, +{ 0.1314E+00, 0.1698E+00, 0.1646E+01 }, { 0.1797E+01, 0.1597E+01, 0.1241E+01 }, +{ 0.4721E+00, 0.5346E+00, 0.3066E+00 }, { 0.1274E+01, 0.1401E+01, 0.1351E+01 }, +{ 0.1455E+01, 0.1386E+01, 0.6430E+00 }, { 0.1828E+01, 0.1867E+01, 0.1825E+01 }, +{-0.3265E+00,-0.2956E+00,-0.2462E+00 }, { 0.1035E+01, 0.1020E+01, 0.1003E+01 }, +{ 0.3702E+00, 0.4307E+00, 0.7072E+00 }, { 0.1424E+01, 0.1345E+01, 0.1352E+01 }, +{ 0.2267E+00, 0.2680E+00, 0.3037E+00 }, { 0.1235E+01, 0.1249E+01, 0.1146E+01 }, +{ 0.9944E+00, 0.6485E+00, 0.5248E+00 }, { 0.1539E+01, 0.1492E+01, 0.1612E+01 }, +{ 0.3815E+00, 0.3360E+00,-0.9526E-01 }, { 0.1163E+01, 0.1144E+01, 0.1117E+01 }, +{ 0.6734E+00, 0.7656E+00, 0.1014E+01 }, { 0.1568E+01, 0.1438E+01, 0.1455E+01 }, +{ 0.3409E+00, 0.3317E+00, 0.3856E+00 }, { 0.1180E+01, 0.1284E+01, 0.1284E+01 }, +{ 0.1244E+01, 0.1214E+01,-0.9526E-01 }, { 0.1753E+01, 0.1598E+01, 0.1744E+01 }, +{ 0.1548E+00, 0.1388E+00, 0.2020E+00 }, { 0.1027E+01, 0.1133E+01, 0.1093E+01 }, +{ 0.3906E+00, 0.7505E+00, 0.5705E+00 }, { 0.1420E+01, 0.1357E+01, 0.1543E+01 }, +{ 0.3252E+00, 0.3136E+00, 0.2804E+00 }, { 0.1351E+01, 0.1309E+01, 0.1224E+01 }, +{ 0.8781E+00, 0.8095E+00, 0.7109E+00 }, { 0.1614E+01, 0.1580E+01, 0.1433E+01 }, +{ 0.3222E+00, 0.2298E+00, 0.2157E+00 }, { 0.1216E+01, 0.1077E+01, 0.1247E+01 }, +{ 0.1363E+01, 0.1280E+01, 0.1317E+01 }, { 0.1751E+01, 0.1457E+01, 0.1182E+01 }, +{ 0.4428E+00, 0.4082E+00, 0.3181E+00 }, { 0.1157E+01, 0.1227E+01, 0.1604E+01 }, +{ 0.1286E+01, 0.1268E+01, 0.8167E+00 }, { 0.1994E+01, 0.2018E+01, 0.1307E+01 }, +{ 0.2671E-01, 0.2594E+00, 0.3397E+00 }, { 0.1164E+01, 0.1080E+01, 0.9321E+00 }, +{ 0.5998E+00, 0.6076E+00, 0.5081E+00 }, { 0.1442E+01, 0.1442E+01, 0.1375E+01 }, +{ 0.2390E+00, 0.3554E+00, 0.3426E+00 }, { 0.1287E+01, 0.1307E+01, 0.1144E+01 }, +{ 0.1200E+01, 0.7495E+00, 0.3967E+00 }, { 0.1561E+01, 0.1517E+01, 0.1898E+01 }, +{ 0.3598E+00, 0.3463E+00, 0.1200E+00 }, { 0.1298E+01, 0.1125E+01, 0.1062E+01 }, +{ 0.7577E+00, 0.1013E+01, 0.1194E+01 }, { 0.1537E+01, 0.1513E+01, 0.1464E+01 }, +{ 0.4041E+00, 0.4038E+00, 0.3897E+00 }, { 0.1293E+01, 0.1219E+01, 0.1378E+01 }, +{ 0.1250E+01, 0.1391E+01, 0.2451E+00 }, { 0.1558E+01, 0.1764E+01, 0.1728E+01 }, +{ 0.2700E+00, 0.1894E+00, 0.1924E+00 }, { 0.1111E+01, 0.1112E+01, 0.1173E+01 }, +{ 0.7579E+00, 0.8342E+00, 0.4781E+00 }, { 0.1464E+01, 0.1477E+01, 0.1469E+01 }, +{ 0.4001E+00, 0.3104E+00, 0.2217E+00 }, { 0.1346E+01, 0.1421E+01, 0.1312E+01 }, +{ 0.1071E+01, 0.8967E+00, 0.7511E+00 }, { 0.1616E+01, 0.1551E+01, 0.1574E+01 }, +{ 0.3329E+00, 0.2785E+00, 0.3140E+00 }, { 0.1281E+01, 0.1209E+01, 0.1239E+01 }, +{ 0.2805E+00, 0.2687E+00, 0.1646E+01 }, { 0.1814E+01, 0.1514E+01, 0.1510E+01 }, +{ 0.6231E+00, 0.4200E+00, 0.3701E+00 }, { 0.1255E+01, 0.1429E+01, 0.1454E+01 }, +{ 0.1642E+01, 0.1581E+01, 0.7112E+00 }, { 0.1844E+01, 0.1963E+01, 0.1895E+01 }, +{-0.4208E-01,-0.1491E+00,-0.7639E-01 }, { 0.1046E+01, 0.9598E+00, 0.9176E+00 }, +{ 0.4478E+00, 0.4605E+00, 0.5111E+00 }, { 0.1521E+01, 0.1292E+01, 0.1342E+01 }, +{ 0.2220E+00, 0.2549E+00, 0.2510E+00 }, { 0.1186E+01, 0.1254E+01, 0.1171E+01 }, +{ 0.8999E+00, 0.4960E+00, 0.4943E+00 }, { 0.1423E+01, 0.1484E+01, 0.1620E+01 }, +{ 0.2796E+00, 0.2778E+00,-0.2820E+00 }, { 0.1170E+01, 0.1181E+01, 0.1076E+01 }, +{ 0.4068E+00, 0.8541E+00, 0.9352E+00 }, { 0.1584E+01, 0.1416E+01, 0.1387E+01 }, +{ 0.3325E+00, 0.3655E+00, 0.3340E+00 }, { 0.1224E+01, 0.1257E+01, 0.1245E+01 }, +{ 0.1061E+01, 0.1138E+01,-0.9526E-01 }, { 0.1681E+01, 0.1704E+01, 0.1673E+01 }, +{ 0.1932E+00, 0.1489E+00, 0.1258E+00 }, { 0.1023E+01, 0.1088E+01, 0.1145E+01 }, +{ 0.5190E+00, 0.6873E+00, 0.5172E+00 }, { 0.1380E+01, 0.1405E+01, 0.1474E+01 }, +{ 0.3393E+00, 0.3100E+00, 0.2231E+00 }, { 0.1354E+01, 0.1249E+01, 0.1270E+01 }, +{ 0.7363E+00, 0.8508E+00, 0.8247E+00 }, { 0.1612E+01, 0.1537E+01, 0.1509E+01 }, +{ 0.2952E+00, 0.2053E+00, 0.2590E+00 }, { 0.1138E+01, 0.1219E+01, 0.1262E+01 }, +{ 0.1345E+01, 0.1289E+01, 0.1338E+01 }, { 0.1437E+01, 0.1360E+01, 0.1442E+01 }, +{ 0.4826E+00, 0.3298E+00, 0.3842E+00 }, { 0.1219E+01, 0.1311E+01, 0.1413E+01 }, +{ 0.1212E+01, 0.1186E+01, 0.6357E+00 }, { 0.1873E+01, 0.1939E+01, 0.1674E+01 }, +{ 0.1260E+01, 0.1306E+01, 0.1368E+01 }, { 0.1146E+01, 0.1077E+01, 0.1025E+01 }, +{ 0.6029E+00, 0.5039E+00, 0.5781E+00 }, { 0.1514E+01, 0.1420E+01, 0.1324E+01 }, +{ 0.2652E+00, 0.3192E+00, 0.3042E+00 }, { 0.1368E+01, 0.1198E+01, 0.1200E+01 }, +{ 0.1234E+01, 0.4910E+00, 0.3464E-01 }, { 0.1347E+01, 0.1560E+01, 0.1861E+01 }, +{ 0.2766E+00, 0.2887E+00, 0.2029E+00 }, { 0.1257E+01, 0.1105E+01, 0.1145E+01 }, +{ 0.1351E+01, 0.1353E+01, 0.1406E+01 }, { 0.1506E+01, 0.1580E+01, 0.1362E+01 }, +{ 0.2794E+00, 0.3868E+00, 0.4277E+00 }, { 0.1234E+01, 0.1334E+01, 0.1336E+01 }, +{ 0.1280E+01, 0.1252E+01, 0.1805E+00 }, { 0.1387E+01, 0.1396E+01, 0.1434E+01 }, +{ 0.2902E+00, 0.1170E+00, 0.1698E+00 }, { 0.1134E+01, 0.1077E+01, 0.1117E+01 }, +{ 0.6986E+00, 0.7177E+00, 0.7366E+00 }, { 0.1370E+01, 0.1491E+01, 0.1495E+01 }, +{ 0.4031E+00, 0.5144E+00, 0.1751E+00 }, { 0.1333E+01, 0.1377E+01, 0.1257E+01 }, +{ 0.9212E+00, 0.8934E+00, 0.8897E+00 }, { 0.1589E+01, 0.1614E+01, 0.1523E+01 }, +{ 0.3152E+00, 0.2164E+00, 0.3230E+00 }, { 0.1300E+01, 0.1145E+01, 0.1212E+01 }, +{ 0.1269E+01, 0.1245E+01, 0.1497E+01 }, { 0.1763E+01, 0.1716E+01, 0.1311E+01 }, +{ 0.4702E+00, 0.5422E+00, 0.4306E+00 }, { 0.1342E+01, 0.1433E+01, 0.1423E+01 }, +{ 0.1472E+01, 0.1404E+01, 0.8371E+00 }, { 0.1936E+01, 0.1883E+01, 0.1838E+01 }, +{ 0.1266E+01, 0.1295E+01, 0.1302E+01 }, { 0.1074E+01, 0.1002E+01, 0.1023E+01 }, +{ 0.5206E+00, 0.4045E+00, 0.6549E+00 }, { 0.1457E+01, 0.1378E+01, 0.1363E+01 }, +{ 0.2715E+00, 0.2629E+00, 0.2841E+00 }, { 0.1264E+01, 0.1271E+01, 0.1175E+01 }, +{ 0.1337E+01, 0.1305E+01, 0.1306E+01 }, { 0.1555E+01, 0.1571E+01, 0.1657E+01 }, +{ 0.3341E+00, 0.4147E+00,-0.3648E+00 }, { 0.1188E+01, 0.1185E+01, 0.1161E+01 }, +{ 0.6198E+00, 0.7208E+00, 0.1157E+01 }, { 0.1582E+01, 0.1465E+01, 0.1513E+01 }, +{ 0.3839E+00, 0.3651E+00, 0.3814E+00 }, { 0.1214E+01, 0.1256E+01, 0.1292E+01 }, +{ 0.1361E+01, 0.1363E+01, 0.1312E+01 }, { 0.1793E+01, 0.1693E+01, 0.1669E+01 }, +{ 0.1889E+00, 0.1275E+00, 0.2534E+00 }, { 0.1066E+01, 0.1174E+01, 0.1133E+01 }, +{ 0.4999E+00, 0.8207E+00, 0.5813E+00 }, { 0.1478E+01, 0.1416E+01, 0.1497E+01 }, +{ 0.3814E+00, 0.3138E+00, 0.2889E+00 }, { 0.1396E+01, 0.1265E+01, 0.1233E+01 }, +{ 0.9458E+00, 0.9161E+00, 0.5875E+00 }, { 0.1672E+01, 0.1632E+01, 0.1553E+01 }, +{ 0.3505E+00, 0.2525E+00, 0.2364E+00 }, { 0.1211E+01, 0.1138E+01, 0.1235E+01 }, +{ 0.1391E+01, 0.1231E+01, 0.1355E+01 }, { 0.1783E+01, 0.1510E+01, 0.1199E+01 }, +{ 0.4227E+00, 0.4548E+00, 0.3671E+00 }, { 0.1281E+01, 0.1254E+01, 0.1661E+01 }, +{ 0.1338E+01, 0.1379E+01, 0.9531E+00 }, { 0.2148E+01, 0.1965E+01, 0.1584E+01 }, +{ 0.9324E-01, 0.3575E+00, 0.3522E+00 }, { 0.1212E+01, 0.1086E+01, 0.1044E+01 }, +{ 0.6128E+00, 0.6136E+00, 0.6060E+00 }, { 0.1484E+01, 0.1507E+01, 0.1396E+01 }, +{ 0.2820E+00, 0.3848E+00, 0.3156E+00 }, { 0.1368E+01, 0.1287E+01, 0.1128E+01 }, +{ 0.1369E+01, 0.1352E+01, 0.1358E+01 }, { 0.1381E+01, 0.1765E+01, 0.2113E+01 }, +{ 0.1314E+01, 0.1345E+01, 0.1334E+01 }, { 0.1290E+01, 0.1172E+01, 0.1119E+01 }, +{ 0.1304E+01, 0.1377E+01, 0.1427E+01 }, { 0.1490E+01, 0.1540E+01, 0.1536E+01 }, +{ 0.3994E+00, 0.4402E+00, 0.4173E+00 }, { 0.1323E+01, 0.1307E+01, 0.1392E+01 }, +{ 0.1400E+01, 0.1388E+01, 0.1369E+01 }, { 0.1669E+01, 0.1818E+01, 0.1834E+01 }, +{ 0.2742E+00, 0.2235E+00, 0.1986E+00 }, { 0.1137E+01, 0.1139E+01, 0.1201E+01 }, +{ 0.1324E+01, 0.1385E+01, 0.1349E+01 }, { 0.1455E+01, 0.1574E+01, 0.1454E+01 }, +{ 0.5019E+00, 0.3255E+00, 0.2555E+00 }, { 0.1388E+01, 0.1438E+01, 0.1300E+01 }, +{ 0.1394E+01, 0.1349E+01, 0.1411E+01 }, { 0.1639E+01, 0.1580E+01, 0.1681E+01 }, +{ 0.3920E+00, 0.2498E+00, 0.3523E+00 }, { 0.1301E+01, 0.1221E+01, 0.1285E+01 }, +{ 0.1318E+01, 0.1342E+01, 0.1494E+01 }, { 0.1910E+01, 0.1680E+01, 0.1470E+01 }, +{ 0.6082E+00, 0.5270E+00, 0.4173E+00 }, { 0.1255E+01, 0.1477E+01, 0.1503E+01 }, +{ 0.1807E+01, 0.1742E+01, 0.6553E+00 }, { 0.2000E+01, 0.2072E+01, 0.2051E+01 }}; + +/** + * LSP vector quantization tables + * + * TIA/IS-127 tables 8-1 through 8-9 + */ + +static const float evrc_lspq_full_codebook1[64][2] = { +{1.42016308E-2, 1.93881616E-2}, {2.91667543E-2, 6.51749149E-2}, +{2.06693150E-2, 4.97564934E-2}, {3.94719802E-2, 9.55850929E-2}, +{2.27012448E-2, 3.96625809E-2}, {5.38789518E-2, 6.28347769E-2}, +{2.90525518E-2, 5.73435798E-2}, {4.48280610E-2, 1.15364626E-1}, +{1.94110647E-2, 3.46889682E-2}, {4.37502973E-2, 6.75228462E-2}, +{3.55497338E-2, 4.94086780E-2}, {6.99219853E-2, 8.67279768E-2}, +{2.77880151E-2, 4.65748496E-2}, {5.79111017E-2, 6.74542487E-2}, +{4.74664383E-2, 5.50271496E-2}, {7.88898915E-2, 1.22443043E-1}, +{2.21715886E-2, 3.02628800E-2}, {3.39134485E-2, 7.17703998E-2}, +{3.17989141E-2, 4.98996116E-2}, {6.11555986E-2, 8.73361230E-2}, +{2.67506503E-2, 3.96735854E-2}, {4.44100983E-2, 8.26731324E-2}, +{3.89172547E-2, 5.65788932E-2}, {6.04800619E-2, 1.04536951E-1}, +{2.69156620E-2, 3.57168876E-2}, {4.11117189E-2, 7.33322948E-2}, +{4.12660725E-2, 4.85165231E-2}, {7.18049556E-2, 1.06202349E-1}, +{3.38037871E-2, 4.24300395E-2}, {5.91818243E-2, 7.97467977E-2}, +{4.70107906E-2, 6.28563762E-2}, {9.42011923E-2, 1.30053163E-1}, +{1.94244273E-2, 2.72732340E-2}, {3.70831676E-2, 6.64898157E-2}, +{2.80136354E-2, 5.15984930E-2}, {5.34461029E-2, 9.25904214E-2}, +{2.54959203E-2, 4.32844795E-2}, {5.51860742E-2, 7.36182332E-2}, +{3.39851119E-2, 6.05329126E-2}, {6.18182123E-2, 1.34581268E-1}, +{2.35669166E-2, 3.55242006E-2}, {5.10804243E-2, 6.79562539E-2}, +{3.83464955E-2, 5.23469411E-2}, {7.44275749E-2, 9.66108292E-2}, +{3.18591148E-2, 4.62123118E-2}, {6.18909821E-2, 7.33231753E-2}, +{4.41718437E-2, 5.79240918E-2}, {7.93596208E-2, 1.41177371E-1}, +{2.47412287E-2, 3.23629379E-2}, {3.36563922E-2, 8.04650635E-2}, +{3.37943695E-2, 5.44977151E-2}, {6.53648973E-2, 9.52775925E-2}, +{2.93364152E-2, 4.28411029E-2}, {5.27870469E-2, 8.16159397E-2}, +{4.00724895E-2, 6.18144684E-2}, {6.75848573E-2, 1.17196076E-1}, +{3.03064957E-2, 3.86914052E-2}, {4.83106263E-2, 7.42383003E-2}, +{4.37548272E-2, 5.22842295E-2}, {8.32310021E-2, 1.09881967E-1}, +{3.75600643E-2, 4.53217216E-2}, {6.60113171E-2, 7.97580183E-2}, +{5.03225066E-2, 5.90176322E-2}, {8.77133310E-2, 1.63187444E-1}}; + +static const float evrc_lspq_full_codebook2[64][2] = { +{5.21959551E-2, 8.38445649E-2}, {1.05874076E-1, 1.28694162E-1}, +{5.48323877E-2, 1.33842856E-1}, {1.17768474E-1, 1.94037274E-1}, +{5.36086522E-2, 1.11398734E-1}, {1.19989693E-1, 1.47474691E-1}, +{8.00373554E-2, 1.42999724E-1}, {1.64086595E-1, 2.09821835E-1}, +{5.21059223E-2, 9.95229408E-2}, {8.67567956E-2, 1.85966507E-1}, +{7.77341127E-2, 1.31506845E-1}, {1.60545513E-1, 1.81930289E-1}, +{7.42243677E-2, 1.10437103E-1}, {1.18635088E-1, 1.75306752E-1}, +{6.61557764E-2, 1.64441928E-1}, {1.96810856E-1, 2.16682002E-1}, +{6.05317838E-2, 9.45408568E-2}, {1.06271386E-1, 1.48013934E-1}, +{5.87486550E-2, 1.47724584E-1}, {1.34816468E-1, 2.01517954E-1}, +{6.59698322E-2, 1.16447397E-1}, {1.32297173E-1, 1.53267249E-1}, +{9.26660746E-2, 1.46725491E-1}, {1.79285541E-1, 2.19705954E-1}, +{7.06458464E-2, 9.99924466E-2}, {1.06500491E-1, 1.79443434E-1}, +{8.79249722E-2, 1.25287697E-1}, {1.53640196E-1, 1.97852716E-1}, +{8.88430104E-2, 1.12465657E-1}, {1.48286715E-1, 1.67517021E-1}, +{8.16568136E-2, 1.69274017E-1}, {2.07810536E-1, 2.31033549E-1}, +{6.14927970E-2, 8.36263224E-2}, {1.14473253E-1, 1.36779979E-1}, +{6.87129870E-2, 1.38099059E-1}, {1.10511415E-1, 2.15352878E-1}, +{5.55652268E-2, 1.22242786E-1}, {1.20557591E-1, 1.61072448E-1}, +{8.32249671E-2, 1.55475482E-1}, {1.61638483E-1, 2.28268847E-1}, +{6.29152283E-2, 1.06229566E-1}, {8.29186887E-2, 2.06774518E-1}, +{8.84756893E-2, 1.35799959E-1}, {1.69772223E-1, 1.93773940E-1}, +{7.77297840E-2, 1.20287232E-1}, {1.30648017E-1, 1.84331819E-1}, +{6.91939592E-2, 1.84218004E-1}, {2.03904077E-1, 2.49715164E-1}, +{7.07671717E-2, 9.03186128E-2}, {1.08471557E-1, 1.61966518E-1}, +{7.16886371E-2, 1.51093170E-1}, {1.38779536E-1, 2.18801782E-1}, +{6.75907061E-2, 1.26740307E-1}, {1.33412346E-1, 1.68838874E-1}, +{9.61822569E-2, 1.58728704E-1}, {1.86485633E-1, 2.36560926E-1}, +{8.23447108E-2, 1.02126025E-1}, {1.00336641E-1, 1.94918498E-1}, +{9.95981991E-2, 1.36425093E-1}, {1.82448462E-1, 2.03655198E-1}, +{9.78890732E-2, 1.21145472E-1}, {1.45453140E-1, 1.83604524E-1}, +{9.58395451E-2, 1.72194853E-1}, {2.23295853E-1, 2.46418610E-1}}; + +static const float evrc_lspq_full_codebook3[512][3] = { +{1.36425778E-1, 1.68651849E-1, 2.04688221E-1}, +{1.85717627E-1, 2.28756160E-1, 2.51958042E-1}, +{1.22760192E-1, 1.85950696E-1, 2.79446691E-1}, +{1.96468458E-1, 2.64484435E-1, 2.89318889E-1}, +{1.25653744E-1, 1.50529265E-1, 2.76144296E-1}, +{1.96301565E-1, 2.41699994E-1, 2.88230687E-1}, +{1.40099391E-1, 2.22365588E-1, 2.74666578E-1}, +{2.59952307E-1, 2.75394946E-1, 3.10975939E-1}, +{1.58452198E-1, 1.88591003E-1, 2.07339197E-1}, +{1.95616230E-1, 2.21379519E-1, 2.87022918E-1}, +{1.69424579E-1, 2.01614648E-1, 2.75669187E-1}, +{2.12393746E-1, 2.64250666E-1, 3.17967504E-1}, +{1.82965085E-1, 1.99547559E-1, 2.29538843E-1}, +{2.15200707E-1, 2.62409419E-1, 2.82432705E-1}, +{1.46404549E-1, 2.36966729E-1, 2.90067106E-1}, +{2.45338634E-1, 3.03358108E-1, 3.42260152E-1}, +{1.37478963E-1, 1.58276558E-1, 2.39217222E-1}, +{2.01999024E-1, 2.20102608E-1, 2.69546896E-1}, +{1.18350029E-1, 2.30206400E-1, 2.83554822E-1}, +{2.25519255E-1, 2.72272140E-1, 3.06072980E-1}, +{1.35661438E-1, 1.91633970E-1, 2.65912026E-1}, +{1.95733085E-1, 2.31926173E-1, 3.14376086E-1}, +{1.67998984E-1, 2.27706313E-1, 2.76947826E-1}, +{2.50170559E-1, 3.01627070E-1, 3.21084231E-1}, +{1.33492306E-1, 2.01223105E-1, 2.33893991E-1}, +{2.06442133E-1, 2.38704175E-1, 2.77560145E-1}, +{1.79048792E-1, 1.95776582E-1, 2.80656606E-1}, +{2.06193641E-1, 2.64055401E-1, 3.33098441E-1}, +{1.75185278E-1, 1.91166341E-1, 2.57540315E-1}, +{2.28398636E-1, 2.45296657E-1, 3.08980793E-1}, +{1.80859819E-1, 2.43579060E-1, 2.96631068E-1}, +{2.76152968E-1, 3.08256060E-1, 3.46822590E-1}, +{1.37115732E-1, 1.80057764E-1, 2.20953465E-1}, +{1.81370094E-1, 2.26770103E-1, 2.70392686E-1}, +{1.25246510E-1, 1.79606944E-1, 3.10376436E-1}, +{1.90708354E-1, 2.87734240E-1, 3.13476235E-1}, +{1.30486086E-1, 1.60435289E-1, 3.00243706E-1}, +{1.97318628E-1, 2.56378502E-1, 2.78474301E-1}, +{1.58597067E-1, 2.37381399E-1, 2.62910336E-1}, +{2.61825919E-1, 2.77717203E-1, 3.31382245E-1}, +{1.64160743E-1, 1.85841531E-1, 2.35615849E-1}, +{2.09486142E-1, 2.21452802E-1, 2.92153865E-1}, +{1.66807845E-1, 2.13641763E-1, 2.70675927E-1}, +{2.29834273E-1, 2.88374633E-1, 3.06238323E-1}, +{1.82154253E-1, 2.00822473E-1, 2.40169376E-1}, +{2.24944726E-1, 2.69813925E-1, 2.91401237E-1}, +{1.63940564E-1, 2.50341147E-1, 2.78307766E-1}, +{2.56727993E-1, 2.95103759E-1, 3.53297085E-1}, +{1.40218839E-1, 1.76687688E-1, 2.46773273E-1}, +{2.15291306E-1, 2.29216009E-1, 2.64283627E-1}, +{1.21002659E-1, 2.18333840E-1, 3.22341293E-1}, +{2.54243195E-1, 2.73986191E-1, 2.96262473E-1}, +{1.60385415E-1, 1.83762908E-1, 2.81598717E-1}, +{1.87832162E-1, 2.37420350E-1, 3.29777509E-1}, +{1.77788362E-1, 2.26703495E-1, 3.02322537E-1}, +{2.75108218E-1, 2.93730587E-1, 3.12373787E-1}, +{1.70116410E-1, 1.85232103E-1, 2.46125028E-1}, +{2.21754774E-1, 2.39912242E-1, 2.86891907E-1}, +{1.95083722E-1, 2.08337873E-1, 2.88349718E-1}, +{2.37536535E-1, 2.75004476E-1, 3.39786023E-1}, +{1.88369319E-1, 2.04371840E-1, 2.57375032E-1}, +{2.47250155E-1, 2.60551840E-1, 3.02137524E-1}, +{1.66944191E-1, 2.46912360E-1, 3.18894416E-1}, +{2.78118610E-1, 3.13011140E-1, 3.65329295E-1}, +{1.45213529E-1, 1.63051456E-1, 2.24912614E-1}, +{2.05692515E-1, 2.20831484E-1, 2.52817810E-1}, +{1.21125661E-1, 1.96374118E-1, 3.00122708E-1}, +{2.15566799E-1, 2.65657336E-1, 2.99202889E-1}, +{1.09134212E-1, 1.78472102E-1, 2.88323194E-1}, +{2.03508541E-1, 2.40347922E-1, 2.96309739E-1}, +{1.53101787E-1, 2.25415319E-1, 2.84843713E-1}, +{2.50233442E-1, 2.77736932E-1, 3.24840695E-1}, +{1.66308925E-1, 1.94173396E-1, 2.11635381E-1}, +{2.01289460E-1, 2.26062179E-1, 2.93246478E-1}, +{1.49518773E-1, 2.14201719E-1, 2.83894747E-1}, +{2.21836135E-1, 2.85231501E-1, 3.20082635E-1}, +{1.89573213E-1, 2.06577629E-1, 2.30332345E-1}, +{2.31247649E-1, 2.46864259E-1, 2.89846569E-1}, +{1.39116928E-1, 2.59189934E-1, 2.98019558E-1}, +{2.44512573E-1, 2.82671362E-1, 3.61258298E-1}, +{1.22530967E-1, 1.68514788E-1, 2.70879298E-1}, +{2.04372838E-1, 2.30398357E-1, 2.71792918E-1}, +{1.42643943E-1, 2.22405583E-1, 2.92057186E-1}, +{2.42643669E-1, 2.77429372E-1, 2.97135502E-1}, +{1.52048603E-1, 1.96921080E-1, 2.61013240E-1}, +{2.17875019E-1, 2.45840371E-1, 3.08138579E-1}, +{1.90109268E-1, 2.31099129E-1, 2.80178159E-1}, +{2.54314184E-1, 2.94079810E-1, 3.39649171E-1}, +{1.56698599E-1, 2.08597451E-1, 2.28010774E-1}, +{2.25088730E-1, 2.50014484E-1, 2.76250154E-1}, +{1.78219035E-1, 1.98228240E-1, 3.04198891E-1}, +{2.08567217E-1, 2.92395383E-1, 3.46786886E-1}, +{1.71052113E-1, 2.03438759E-1, 2.62644321E-1}, +{2.30275467E-1, 2.58817524E-1, 3.11986536E-1}, +{1.85333565E-1, 2.45760202E-1, 3.10553998E-1}, +{2.89413869E-1, 3.11095625E-1, 3.46476167E-1}, +{1.50332406E-1, 1.67538226E-1, 2.40182847E-1}, +{1.79971650E-1, 2.37168610E-1, 2.60899693E-1}, +{1.49866179E-1, 1.97890073E-1, 3.07916552E-1}, +{2.10799649E-1, 2.88180083E-1, 3.29747230E-1}, +{1.31711140E-1, 1.65906459E-1, 3.22898000E-1}, +{2.14832023E-1, 2.52822131E-1, 2.97547072E-1}, +{1.83760419E-1, 2.37523615E-1, 2.74610013E-1}, +{2.55575180E-1, 2.75439233E-1, 3.46021861E-1}, +{1.82662204E-1, 1.99470907E-1, 2.16051653E-1}, +{2.09240332E-1, 2.22406715E-1, 3.02382857E-1}, +{1.84088245E-1, 2.11327791E-1, 2.82538086E-1}, +{2.41171077E-1, 2.97036022E-1, 3.15979272E-1}, +{1.96804658E-1, 2.11815894E-1, 2.41647676E-1}, +{2.42761984E-1, 2.58586556E-1, 2.93204397E-1}, +{1.58905461E-1, 2.65077025E-1, 2.89881319E-1}, +{2.58060575E-1, 3.18903178E-1, 3.47846836E-1}, +{1.48766384E-1, 1.66853935E-1, 2.66827434E-1}, +{2.15942249E-1, 2.29938298E-1, 2.76041597E-1}, +{1.38410494E-1, 2.39283442E-1, 3.27972382E-1}, +{2.43765280E-1, 2.88408488E-1, 3.06048721E-1}, +{1.70157120E-1, 1.89986289E-1, 2.81219155E-1}, +{2.19117031E-1, 2.58005291E-1, 3.26571971E-1}, +{1.92163572E-1, 2.23614186E-1, 2.98683077E-1}, +{2.73545444E-1, 3.12078089E-1, 3.30766588E-1}, +{1.62452087E-1, 2.04930902E-1, 2.53337711E-1}, +{2.23855302E-1, 2.37671077E-1, 3.03202003E-1}, +{1.93955287E-1, 2.12335557E-1, 3.07566851E-1}, +{2.29912683E-1, 2.97581047E-1, 3.37499231E-1}, +{1.89335391E-1, 2.04148144E-1, 2.78609782E-1}, +{2.42303565E-1, 2.73163110E-1, 3.15361649E-1}, +{1.55009672E-1, 2.88095146E-1, 3.35996419E-1}, +{2.73716152E-1, 3.31215471E-1, 3.62539083E-1}, +{1.52389362E-1, 1.72619134E-1, 1.90585673E-1}, +{1.96988270E-1, 2.26309747E-1, 2.46197492E-1}, +{1.20555148E-1, 2.06369758E-1, 2.81199783E-1}, +{1.93709418E-1, 2.71900505E-1, 3.01332921E-1}, +{1.36701152E-1, 1.54093146E-1, 2.82258362E-1}, +{1.97299168E-1, 2.53656298E-1, 2.90315062E-1}, +{1.43463776E-1, 2.43872911E-1, 2.75533706E-1}, +{2.58477271E-1, 2.73279876E-1, 3.21119100E-1}, +{1.54406175E-1, 1.93793535E-1, 2.15884149E-1}, +{2.05979452E-1, 2.24277020E-1, 2.85732359E-1}, +{1.74535319E-1, 2.08482355E-1, 2.79668540E-1}, +{2.18844578E-1, 2.72486299E-1, 3.27095598E-1}, +{1.77609727E-1, 2.12990195E-1, 2.39119649E-1}, +{2.29163751E-1, 2.59165913E-1, 2.83514649E-1}, +{1.57353148E-1, 2.39961296E-1, 3.04263145E-1}, +{2.45613828E-1, 3.16824526E-1, 3.42909366E-1}, +{1.42953232E-1, 1.61905348E-1, 2.53710240E-1}, +{2.10192814E-1, 2.22847700E-1, 2.71103770E-1}, +{1.26843944E-1, 2.16709048E-1, 2.97734648E-1}, +{2.31000140E-1, 2.80109137E-1, 2.99707443E-1}, +{1.52980462E-1, 1.93996876E-1, 2.72895664E-1}, +{2.12860718E-1, 2.41545349E-1, 3.16518754E-1}, +{1.71154693E-1, 2.22469687E-1, 2.93786496E-1}, +{2.51988232E-1, 3.04254979E-1, 3.31269950E-1}, +{1.33188918E-1, 2.07924992E-1, 2.55362093E-1}, +{2.12044910E-1, 2.42189646E-1, 2.88903743E-1}, +{1.84612468E-1, 2.01143622E-1, 2.86360770E-1}, +{2.18286708E-1, 2.76752442E-1, 3.44581515E-1}, +{1.83562174E-1, 1.99478507E-1, 2.62156576E-1}, +{2.33130530E-1, 2.49596909E-1, 3.15842837E-1}, +{1.89898983E-1, 2.46874869E-1, 2.97132462E-1}, +{2.75022447E-1, 3.22490305E-1, 3.46977681E-1}, +{1.42305329E-1, 1.92689180E-1, 2.16155857E-1}, +{1.95676163E-1, 2.22268641E-1, 2.76587397E-1}, +{1.33241490E-1, 1.97791785E-1, 3.22897941E-1}, +{1.84865132E-1, 2.97106177E-1, 3.26105148E-1}, +{1.50203660E-1, 1.76781267E-1, 2.91536182E-1}, +{2.03144446E-1, 2.59616166E-1, 2.99156040E-1}, +{1.65488973E-1, 2.38342047E-1, 2.87493914E-1}, +{2.71071255E-1, 2.89544493E-1, 3.19521040E-1}, +{1.68598369E-1, 1.98825568E-1, 2.30347604E-1}, +{2.13811651E-1, 2.34471768E-1, 2.90959626E-1}, +{1.74605444E-1, 2.17256010E-1, 2.85688072E-1}, +{2.28503481E-1, 2.96190292E-1, 3.16534668E-1}, +{1.87172607E-1, 2.20547438E-1, 2.39688724E-1}, +{2.28884771E-1, 2.63583153E-1, 3.01329464E-1}, +{1.77897051E-1, 2.58131474E-1, 2.81487674E-1}, +{2.59513617E-1, 3.07204396E-1, 3.48793596E-1}, +{1.45224437E-1, 1.78715974E-1, 2.59186983E-1}, +{2.19062313E-1, 2.38223523E-1, 2.60461539E-1}, +{1.43650874E-1, 2.09760785E-1, 3.15830201E-1}, +{2.50127465E-1, 2.79182345E-1, 3.05153579E-1}, +{1.48986444E-1, 2.01226771E-1, 2.82543689E-1}, +{2.08387777E-1, 2.35603899E-1, 3.45363885E-1}, +{1.85830340E-1, 2.21607298E-1, 3.10773641E-1}, +{2.80904710E-1, 2.95469791E-1, 3.25499445E-1}, +{1.72967300E-1, 1.97078109E-1, 2.45801106E-1}, +{2.19495699E-1, 2.44767100E-1, 2.93587774E-1}, +{1.83909580E-1, 2.15004295E-1, 3.00334543E-1}, +{2.45338634E-1, 2.68595248E-1, 3.48330349E-1}, +{1.92957386E-1, 2.06625074E-1, 2.67336398E-1}, +{2.54845560E-1, 2.68642277E-1, 3.03547889E-1}, +{1.76853105E-1, 2.59330958E-1, 3.16200763E-1}, +{2.90929139E-1, 3.15634757E-1, 3.68723541E-1}, +{1.57116994E-1, 1.73552901E-1, 2.28736520E-1}, +{2.12509260E-1, 2.30501205E-1, 2.52217978E-1}, +{1.42521843E-1, 2.01979935E-1, 2.93012232E-1}, +{2.14919671E-1, 2.78065056E-1, 3.14176053E-1}, +{1.35947272E-1, 1.81055903E-1, 2.75475413E-1}, +{1.98416695E-1, 2.41673797E-1, 3.05173427E-1}, +{1.59517333E-1, 2.31580108E-1, 2.95412451E-1}, +{2.58203626E-1, 2.87348121E-1, 3.20351988E-1}, +{1.74840674E-1, 1.92883253E-1, 2.11250007E-1}, +{2.02168509E-1, 2.27025688E-1, 3.04884046E-1}, +{1.69532105E-1, 2.11826235E-1, 2.97355384E-1}, +{2.30033740E-1, 2.91504353E-1, 3.26589435E-1}, +{1.95046112E-1, 2.11709172E-1, 2.27705747E-1}, +{2.37926885E-1, 2.52411634E-1, 2.97752172E-1}, +{1.53762922E-1, 2.46541560E-1, 3.14768940E-1}, +{2.36075714E-1, 3.03568929E-1, 3.70624453E-1}, +{1.38660327E-1, 1.67949975E-1, 2.73515254E-1}, +{2.13806167E-1, 2.27267206E-1, 2.86276251E-1}, +{1.25080630E-1, 2.44098395E-1, 3.02548796E-1}, +{2.35714868E-1, 2.81208843E-1, 3.08903724E-1}, +{1.51691392E-1, 2.10877746E-1, 2.63812989E-1}, +{2.20730439E-1, 2.52777904E-1, 3.16413730E-1}, +{1.84924737E-1, 2.39424765E-1, 2.85120815E-1}, +{2.59548545E-1, 3.09809893E-1, 3.26423734E-1}, +{1.62930742E-1, 2.19900876E-1, 2.36148626E-1}, +{2.34194234E-1, 2.49944329E-1, 2.77549058E-1}, +{1.70870200E-1, 1.98291600E-1, 3.21412593E-1}, +{2.31566861E-1, 2.75015086E-1, 3.69710356E-1}, +{1.80002406E-1, 2.06701040E-1, 2.71204919E-1}, +{2.38075271E-1, 2.54006237E-1, 3.23827595E-1}, +{1.99148253E-1, 2.54273921E-1, 3.07479709E-1}, +{2.87428617E-1, 3.25045079E-1, 3.48634571E-1}, +{1.45285025E-1, 1.91359162E-1, 2.49691397E-1}, +{1.94659308E-1, 2.40821242E-1, 2.77302653E-1}, +{1.53150991E-1, 1.94375664E-1, 3.27550441E-1}, +{2.04085842E-1, 2.98595697E-1, 3.21480066E-1}, +{1.56009689E-1, 1.81012720E-1, 3.00931662E-1}, +{2.10962430E-1, 2.55770296E-1, 3.08086127E-1}, +{1.85444072E-1, 2.49021322E-1, 2.74029821E-1}, +{2.74493456E-1, 2.89441973E-1, 3.38794917E-1}, +{1.76941887E-1, 1.94476932E-1, 2.22077265E-1}, +{2.16377512E-1, 2.30735779E-1, 3.03689271E-1}, +{1.89683452E-1, 2.14660764E-1, 2.88445383E-1}, +{2.40827337E-1, 2.98141748E-1, 3.27378422E-1}, +{2.01787844E-1, 2.19441772E-1, 2.39327446E-1}, +{2.48812512E-1, 2.65865892E-1, 2.93382376E-1}, +{1.82027832E-1, 2.68279046E-1, 2.93991417E-1}, +{2.56498635E-1, 3.19984466E-1, 3.62663239E-1}, +{1.58799276E-1, 1.75433666E-1, 2.67389864E-1}, +{2.24259302E-1, 2.36668259E-1, 2.77639121E-1}, +{1.49203405E-1, 2.26585329E-1, 3.45255584E-1}, +{2.50655770E-1, 2.92264849E-1, 3.13574284E-1}, +{1.58096299E-1, 2.02193201E-1, 2.98711687E-1}, +{2.28820905E-1, 2.48557344E-1, 3.44726473E-1}, +{1.87972054E-1, 2.34109432E-1, 3.04235607E-1}, +{2.85657108E-1, 3.14878136E-1, 3.36931497E-1}, +{1.62680015E-1, 2.17820048E-1, 2.57436782E-1}, +{2.24049792E-1, 2.46739820E-1, 3.00795883E-1}, +{2.01354548E-1, 2.18286663E-1, 3.13036293E-1}, +{2.38028511E-1, 2.98103482E-1, 3.53503793E-1}, +{1.98829994E-1, 2.12877125E-1, 2.72980839E-1}, +{2.50616491E-1, 2.67659992E-1, 3.20611864E-1}, +{1.70901820E-1, 2.69330353E-1, 3.34428221E-1}, +{3.04988861E-1, 3.36196691E-1, 3.65235358E-1}, +{1.47624031E-1, 1.81272805E-1, 2.04707921E-1}, +{1.93751350E-1, 2.20973969E-1, 2.61775166E-1}, +{1.32089809E-1, 1.94851607E-1, 2.83547610E-1}, +{2.07739428E-1, 2.70596832E-1, 2.92264789E-1}, +{1.27733424E-1, 1.66896015E-1, 2.83891350E-1}, +{2.05309406E-1, 2.47807533E-1, 2.83632785E-1}, +{1.54211894E-1, 2.25014091E-1, 2.70082027E-1}, +{2.67574131E-1, 2.84426898E-1, 3.09334785E-1}, +{1.68846920E-1, 1.87004536E-1, 2.02433169E-1}, +{2.02441111E-1, 2.16733068E-1, 2.93079227E-1}, +{1.63621262E-1, 2.15616465E-1, 2.82792896E-1}, +{2.25509301E-1, 2.66283005E-1, 3.17886561E-1}, +{1.89110294E-1, 2.05609441E-1, 2.22113580E-1}, +{2.21240178E-1, 2.60288864E-1, 2.92541057E-1}, +{1.55563369E-1, 2.46850818E-1, 2.89648801E-1}, +{2.48406157E-1, 3.05291861E-1, 3.55316669E-1}, +{1.27122149E-1, 1.58053726E-1, 2.54164368E-1}, +{2.04998836E-1, 2.19476849E-1, 2.78342038E-1}, +{1.33302316E-1, 2.29614019E-1, 2.86947161E-1}, +{2.36777052E-1, 2.67918199E-1, 3.08230907E-1}, +{1.40853569E-1, 2.03414679E-1, 2.73257107E-1}, +{2.07684264E-1, 2.34520018E-1, 3.24583262E-1}, +{1.77181646E-1, 2.29595393E-1, 2.83539146E-1}, +{2.61378348E-1, 3.01160187E-1, 3.21707100E-1}, +{1.48595735E-1, 2.07772017E-1, 2.46946126E-1}, +{2.14334831E-1, 2.48061299E-1, 2.72259146E-1}, +{1.76380262E-1, 1.96897894E-1, 2.92286903E-1}, +{1.98193476E-1, 2.75483340E-1, 3.49037558E-1}, +{1.76153168E-1, 1.93248957E-1, 2.69548506E-1}, +{2.36968622E-1, 2.50065804E-1, 3.06820840E-1}, +{1.76060721E-1, 2.54037619E-1, 3.03566784E-1}, +{2.82952905E-1, 3.01765054E-1, 3.53956312E-1}, +{1.45353720E-1, 1.83678836E-1, 2.34750062E-1}, +{1.93842635E-1, 2.30635554E-1, 2.67817765E-1}, +{1.38958976E-1, 1.86760783E-1, 3.13113242E-1}, +{1.99944481E-1, 2.77624756E-1, 3.25046331E-1}, +{1.42966077E-1, 1.71310842E-1, 3.03013414E-1}, +{2.07741663E-1, 2.58691758E-1, 2.88766950E-1}, +{1.71776935E-1, 2.40246087E-1, 2.73284525E-1}, +{2.71046638E-1, 2.85170943E-1, 3.27401131E-1}, +{1.69854626E-1, 1.87545776E-1, 2.24484712E-1}, +{2.15221986E-1, 2.27339745E-1, 2.95008808E-1}, +{1.75596640E-1, 2.17936546E-1, 2.74879605E-1}, +{2.34665439E-1, 2.89530903E-1, 3.16494375E-1}, +{1.89946994E-1, 2.04953820E-1, 2.46955171E-1}, +{2.37297818E-1, 2.68316716E-1, 2.90684313E-1}, +{1.69963166E-1, 2.53367484E-1, 2.92533010E-1}, +{2.70659864E-1, 2.97146112E-1, 3.56183976E-1}, +{1.52539685E-1, 1.70138955E-1, 2.52703935E-1}, +{2.19119206E-1, 2.35900700E-1, 2.69739121E-1}, +{1.42245665E-1, 2.18184620E-1, 3.28218073E-1}, +{2.61472821E-1, 2.78025657E-1, 3.02375883E-1}, +{1.53526023E-1, 1.90727741E-1, 2.92820841E-1}, +{2.09240988E-1, 2.49808684E-1, 3.24709088E-1}, +{1.75176397E-1, 2.38646746E-1, 3.06392699E-1}, +{2.73218870E-1, 3.03954989E-1, 3.20513874E-1}, +{1.63911596E-1, 1.89611584E-1, 2.56272525E-1}, +{2.26953760E-1, 2.40120232E-1, 2.92728513E-1}, +{1.95565715E-1, 2.11956203E-1, 2.97374696E-1}, +{2.41045550E-1, 2.88497001E-1, 3.36352319E-1}, +{1.94948331E-1, 2.09475279E-1, 2.56309658E-1}, +{2.47884631E-1, 2.63356417E-1, 3.11270863E-1}, +{1.69189706E-1, 2.35864580E-1, 3.36249381E-1}, +{2.86001563E-1, 3.25423747E-1, 3.59607369E-1}, +{1.56258598E-1, 1.76704943E-1, 2.14393437E-1}, +{2.08996847E-1, 2.23968685E-1, 2.60886759E-1}, +{1.35765389E-1, 2.03580052E-1, 3.05503219E-1}, +{2.18961373E-1, 2.79463500E-1, 2.99450845E-1}, +{1.34064749E-1, 1.78332120E-1, 2.90169626E-1}, +{2.13298395E-1, 2.40031511E-1, 3.00345927E-1}, +{1.64373413E-1, 2.26438701E-1, 2.87171155E-1}, +{2.50739604E-1, 2.80812472E-1, 3.35349351E-1}, +{1.63649514E-1, 1.97108001E-1, 2.21165180E-1}, +{2.08139613E-1, 2.30869800E-1, 2.96137065E-1}, +{1.59113124E-1, 2.18189180E-1, 2.95531958E-1}, +{2.39883497E-1, 2.81831235E-1, 3.26045603E-1}, +{1.89394727E-1, 2.08127141E-1, 2.38446414E-1}, +{2.32995704E-1, 2.59603471E-1, 2.93427974E-1}, +{1.60558835E-1, 2.55164832E-1, 3.02872926E-1}, +{2.53509283E-1, 2.96028465E-1, 3.67721587E-1}, +{1.30124375E-1, 1.74838990E-1, 2.60486037E-1}, +{2.10203990E-1, 2.33570784E-1, 2.83061892E-1}, +{1.52365491E-1, 2.25338757E-1, 3.03720981E-1}, +{2.40558609E-1, 2.77192205E-1, 3.05891901E-1}, +{1.63728818E-1, 1.94779396E-1, 2.69253582E-1}, +{2.25709423E-1, 2.40902692E-1, 3.18060607E-1}, +{1.92055091E-1, 2.29857832E-1, 2.89826721E-1}, +{2.62759686E-1, 3.04292172E-1, 3.35680574E-1}, +{1.66071162E-1, 2.06819177E-1, 2.39712462E-1}, +{2.23915562E-1, 2.50106871E-1, 2.85296232E-1}, +{1.88402340E-1, 2.03793734E-1, 3.03041130E-1}, +{2.30698988E-1, 2.87044138E-1, 3.49802762E-1}, +{1.82025358E-1, 2.14073509E-1, 2.63470024E-1}, +{2.37297758E-1, 2.65025407E-1, 3.17815512E-1}, +{1.89278707E-1, 2.58802205E-1, 3.04866165E-1}, +{2.97243059E-1, 3.17153066E-1, 3.56583923E-1}, +{1.58607468E-1, 1.78659767E-1, 2.41919369E-1}, +{1.94887385E-1, 2.41695851E-1, 2.62176663E-1}, +{1.58124432E-1, 2.11753070E-1, 3.11352164E-1}, +{2.16902718E-1, 2.98796803E-1, 3.20994049E-1}, +{1.49272785E-1, 1.74964130E-1, 3.15334409E-1}, +{2.21622273E-1, 2.56179065E-1, 3.03902954E-1}, +{1.75979599E-1, 2.43505448E-1, 2.85801739E-1}, +{2.64590383E-1, 2.85541564E-1, 3.45107764E-1}, +{1.80137083E-1, 2.05279350E-1, 2.22255990E-1}, +{2.10796222E-1, 2.26315439E-1, 3.14426929E-1}, +{1.79151163E-1, 2.09439725E-1, 2.93280870E-1}, +{2.49719024E-1, 2.91257650E-1, 3.27162296E-1}, +{1.98700234E-1, 2.15896755E-1, 2.49960214E-1}, +{2.40726396E-1, 2.64857739E-1, 2.99639553E-1}, +{1.71249732E-1, 2.68166155E-1, 3.03572744E-1}, +{2.69555569E-1, 3.16100627E-1, 3.56570691E-1}, +{1.50564745E-1, 1.84190869E-1, 2.68674821E-1}, +{2.16941193E-1, 2.40813971E-1, 2.78942198E-1}, +{1.35399476E-1, 2.60586530E-1, 3.32604855E-1}, +{2.56150961E-1, 2.87822872E-1, 3.06156367E-1}, +{1.66398838E-1, 1.88721806E-1, 2.93023735E-1}, +{2.29214087E-1, 2.61565417E-1, 3.27494055E-1}, +{1.98266640E-1, 2.32970506E-1, 2.99134284E-1}, +{2.87046254E-1, 3.07103783E-1, 3.27298075E-1}, +{1.75898686E-1, 2.11898595E-1, 2.51332909E-1}, +{2.32067421E-1, 2.44622201E-1, 2.99443692E-1}, +{1.90780059E-1, 2.12090015E-1, 3.25059265E-1}, +{2.31531218E-1, 3.14166099E-1, 3.42735857E-1}, +{1.95099846E-1, 2.09554315E-1, 2.79483467E-1}, +{2.40416065E-1, 2.69604772E-1, 3.28015476E-1}, +{1.71800867E-1, 2.82233089E-1, 3.14749271E-1}, +{2.69243777E-1, 3.38462502E-1, 3.79935652E-1}, +{1.59934625E-1, 1.77966774E-1, 2.00818628E-1}, +{2.01979712E-1, 2.30668545E-1, 2.56773323E-1}, +{1.34024277E-1, 2.10961610E-1, 2.84687728E-1}, +{2.03712896E-1, 2.83053070E-1, 3.03309411E-1}, +{1.44528881E-1, 1.64728075E-1, 2.85079390E-1}, +{2.06285611E-1, 2.48649031E-1, 2.96383053E-1}, +{1.58138171E-1, 2.34317720E-1, 2.79650003E-1}, +{2.64995635E-1, 2.79900700E-1, 3.18619400E-1}, +{1.66537479E-1, 1.84279412E-1, 2.14547485E-1}, +{2.03051880E-1, 2.35110492E-1, 2.88755983E-1}, +{1.68422714E-1, 2.03946173E-1, 2.87478894E-1}, +{2.31727019E-1, 2.74086386E-1, 3.24755162E-1}, +{1.85356215E-1, 2.14113116E-1, 2.29030401E-1}, +{2.42482558E-1, 2.60655493E-1, 2.83030301E-1}, +{1.67562261E-1, 2.42027491E-1, 2.99461991E-1}, +{2.38809898E-1, 3.19003850E-1, 3.58415872E-1}, +{1.37908265E-1, 1.54787809E-1, 2.65611202E-1}, +{2.11019263E-1, 2.24607319E-1, 2.79954702E-1}, +{1.37569889E-1, 2.25128531E-1, 3.09312850E-1}, +{2.29239866E-1, 2.76150972E-1, 3.15241843E-1}, +{1.60487458E-1, 1.95461214E-1, 2.83169478E-1}, +{2.18505666E-1, 2.38197207E-1, 3.30340117E-1}, +{1.81991324E-1, 2.33026952E-1, 2.93276042E-1}, +{2.54552305E-1, 3.14394146E-1, 3.36392254E-1}, +{1.44095764E-1, 2.26640165E-1, 2.50595063E-1}, +{2.15188012E-1, 2.51417249E-1, 2.85043985E-1}, +{1.87674388E-1, 2.04458863E-1, 2.94168979E-1}, +{2.30494842E-1, 2.68452436E-1, 3.52370054E-1}, +{1.85022101E-1, 1.99075252E-1, 2.71930546E-1}, +{2.42569372E-1, 2.55389154E-1, 3.11399311E-1}, +{1.95166096E-1, 2.49102056E-1, 2.98998445E-1}, +{2.83654153E-1, 3.14600259E-1, 3.55619401E-1}, +{1.51490018E-1, 1.97729796E-1, 2.32467473E-1}, +{2.00029895E-1, 2.30101258E-1, 2.81933933E-1}, +{1.38711318E-1, 1.91816628E-1, 3.45780402E-1}, +{1.96580395E-1, 3.04714769E-1, 3.40553433E-1}, +{1.38154253E-1, 1.88543141E-1, 2.99461216E-1}, +{2.05666468E-1, 2.68904895E-1, 3.05537194E-1}, +{1.72447845E-1, 2.33558387E-1, 2.93625206E-1}, +{2.70145416E-1, 2.98654765E-1, 3.28556389E-1}, +{1.75489411E-1, 1.91361547E-1, 2.35585332E-1}, +{2.20548794E-1, 2.34773993E-1, 2.95397669E-1}, +{1.85652360E-1, 2.22349137E-1, 2.79883891E-1}, +{2.29456946E-1, 3.04546326E-1, 3.24684292E-1}, +{1.86900780E-1, 2.15469390E-1, 2.51856804E-1}, +{2.34910533E-1, 2.71217376E-1, 2.99894661E-1}, +{1.85142443E-1, 2.56071001E-1, 2.93291301E-1}, +{2.63883710E-1, 3.07127446E-1, 3.62546653E-1}, +{1.60997644E-1, 1.78937852E-1, 2.55808324E-1}, +{2.25671068E-1, 2.43735075E-1, 2.68624991E-1}, +{1.55076161E-1, 2.30396181E-1, 3.21005553E-1}, +{2.51760483E-1, 2.79653400E-1, 3.14202160E-1}, +{1.56988814E-1, 2.07466930E-1, 2.89933950E-1}, +{2.17479482E-1, 2.59626418E-1, 3.40659052E-1}, +{1.76811531E-1, 2.31087089E-1, 3.17562491E-1}, +{2.82952607E-1, 2.99844354E-1, 3.36822897E-1}, +{1.82060316E-1, 1.98734730E-1, 2.51980305E-1}, +{2.25874200E-1, 2.52469152E-1, 2.93356389E-1}, +{2.00799957E-1, 2.17786849E-1, 3.02210063E-1}, +{2.47423753E-1, 2.86882848E-1, 3.47820610E-1}, +{2.01128140E-1, 2.14746892E-1, 2.62269646E-1}, +{2.53963351E-1, 2.69477993E-1, 3.12133819E-1}, +{1.91034868E-1, 2.55738169E-1, 3.32559615E-1}, +{2.91053712E-1, 3.31458420E-1, 3.68588477E-1}, +{1.57229915E-1, 1.85374141E-1, 2.25361317E-1}, +{2.08051339E-1, 2.38350868E-1, 2.64212936E-1}, +{1.46848336E-1, 2.13000089E-1, 3.00192565E-1}, +{2.18630567E-1, 2.90263802E-1, 3.09045762E-1}, +{1.43699184E-1, 1.87815160E-1, 2.83769876E-1}, +{2.07328036E-1, 2.45088696E-1, 3.08956414E-1}, +{1.64228097E-1, 2.27826655E-1, 3.08907896E-1}, +{2.61919737E-1, 2.91333705E-1, 3.31527978E-1}, +{1.70648888E-1, 2.02157527E-1, 2.17827827E-1}, +{2.07796112E-1, 2.34704822E-1, 3.06783766E-1}, +{1.72118798E-1, 2.14057386E-1, 3.10151786E-1}, +{2.29116157E-1, 2.80949861E-1, 3.33774298E-1}, +{1.96622208E-1, 2.16653049E-1, 2.33279720E-1}, +{2.37789229E-1, 2.58971304E-1, 3.04609209E-1}, +{1.55182019E-1, 2.63032585E-1, 3.18943053E-1}, +{2.49388829E-1, 3.16970855E-1, 3.77762467E-1}, +{1.51363596E-1, 1.75010651E-1, 2.78245836E-1}, +{2.19810233E-1, 2.32360214E-1, 2.85034925E-1}, +{1.42630622E-1, 2.40602851E-1, 3.04125100E-1}, +{2.42764875E-1, 2.83762127E-1, 3.15481216E-1}, +{1.57467470E-1, 2.07524061E-1, 2.75674909E-1}, +{2.28758618E-1, 2.49092206E-1, 3.28139395E-1}, +{1.90872714E-1, 2.38125205E-1, 2.94894546E-1}, +{2.66389251E-1, 3.14321429E-1, 3.38669509E-1}, +{1.70644209E-1, 2.25980043E-1, 2.47372389E-1}, +{2.36442789E-1, 2.53003448E-1, 2.88220435E-1}, +{1.85423777E-1, 2.04888850E-1, 3.14608842E-1}, +{2.17379019E-1, 2.94553548E-1, 3.67831022E-1}, +{1.88563988E-1, 2.15174288E-1, 2.72999734E-1}, +{2.45102122E-1, 2.59770364E-1, 3.21885556E-1}, +{1.98444173E-1, 2.61160702E-1, 3.17097872E-1}, +{2.99013853E-1, 3.28965336E-1, 3.56681198E-1}, +{1.58248767E-1, 1.92205697E-1, 2.46059090E-1}, +{2.02385351E-1, 2.47965842E-1, 2.71749645E-1}, +{1.61710784E-1, 2.13708103E-1, 3.27384740E-1}, +{2.14419708E-1, 3.05552453E-1, 3.33721548E-1}, +{1.61819980E-1, 1.89897299E-1, 3.10501546E-1}, +{2.19436333E-1, 2.65029579E-1, 3.09288830E-1}, +{1.88303933E-1, 2.49633163E-1, 2.85499543E-1}, +{2.69325376E-1, 2.99807042E-1, 3.41722459E-1}, +{1.72406003E-1, 2.10977256E-1, 2.27773219E-1}, +{2.20281526E-1, 2.34015763E-1, 3.12846094E-1}, +{1.83257267E-1, 2.22061962E-1, 2.91052371E-1}, +{2.42531225E-1, 3.09527606E-1, 3.30389649E-1}, +{2.07546696E-1, 2.24662632E-1, 2.44420141E-1}, +{2.45858207E-1, 2.70285994E-1, 3.05132121E-1}, +{1.84840545E-1, 2.72096783E-1, 3.12531084E-1}, +{2.74252594E-1, 3.21252435E-1, 3.74658197E-1}, +{1.66425839E-1, 1.84491634E-1, 2.68278092E-1}, +{2.28423670E-1, 2.43025422E-1, 2.81184882E-1}, +{1.60091296E-1, 2.52953321E-1, 3.35822314E-1}, +{2.62109995E-1, 2.95581907E-1, 3.13354105E-1}, +{1.67702749E-1, 2.01536924E-1, 3.01801592E-1}, +{2.37822965E-1, 2.59894758E-1, 3.38231117E-1}, +{1.97206214E-1, 2.45490909E-1, 3.17895442E-1}, +{2.98455298E-1, 3.19209784E-1, 3.40971738E-1}, +{1.71195343E-1, 2.24327832E-1, 2.62736112E-1}, +{2.30626896E-1, 2.53310233E-1, 3.01206797E-1}, +{2.04814211E-1, 2.21881568E-1, 3.25966567E-1}, +{2.22987518E-1, 3.06339115E-1, 3.50717157E-1}, +{2.00855389E-1, 2.15359926E-1, 2.84143478E-1}, +{2.50951648E-1, 2.66189247E-1, 3.33360583E-1}, +{1.75610259E-1, 2.93791324E-1, 3.40326935E-1}, +{2.91745067E-1, 3.40602487E-1, 3.81397158E-1}}; + +static const float evrc_lspq_full_codebook4[128][3] = { +{2.77461529E-1, 3.16972077E-1, 3.95498335E-1}, +{3.36560428E-1, 3.60156953E-1, 3.81473005E-1}, +{3.10509324E-1, 3.31732392E-1, 3.66864383E-1}, +{3.37470949E-1, 3.96795273E-1, 4.12356317E-1}, +{2.79660404E-1, 3.66520107E-1, 3.85313451E-1}, +{3.16038966E-1, 3.85609329E-1, 4.01304781E-1}, +{3.09960425E-1, 3.43410730E-1, 4.24745500E-1}, +{3.54243636E-1, 4.08699274E-1, 4.22167957E-1}, +{2.95587242E-1, 3.33741128E-1, 3.87421668E-1}, +{3.33446383E-1, 3.86974752E-1, 4.01353061E-1}, +{3.23412836E-1, 3.65269661E-1, 3.85193288E-1}, +{3.42731953E-1, 4.03192520E-1, 4.19920385E-1}, +{2.77681828E-1, 3.82494986E-1, 4.04274166E-1}, +{3.18247974E-1, 3.95985305E-1, 4.31353152E-1}, +{3.03711414E-1, 3.80319715E-1, 4.37173545E-1}, +{3.78288805E-1, 4.07077312E-1, 4.22679126E-1}, +{2.38116503E-1, 3.42454314E-1, 4.24624741E-1}, +{3.45615685E-1, 3.68681073E-1, 4.00817335E-1}, +{3.17688107E-1, 3.41902673E-1, 4.05601799E-1}, +{3.66368949E-1, 3.89039934E-1, 4.06154454E-1}, +{2.99398005E-1, 3.52021694E-1, 3.99955690E-1}, +{3.24991941E-1, 3.90028834E-1, 4.19478714E-1}, +{3.23025763E-1, 3.68114293E-1, 4.02087748E-1}, +{3.62326264E-1, 4.16927993E-1, 4.32773650E-1}, +{2.72696435E-1, 3.59205008E-1, 4.26880658E-1}, +{3.46539855E-1, 3.69616628E-1, 4.15621221E-1}, +{3.34109128E-1, 3.55736315E-1, 3.96749556E-1}, +{3.37468982E-1, 4.10392702E-1, 4.25986826E-1}, +{2.99468994E-1, 3.80648255E-1, 4.18284118E-1}, +{3.21378171E-1, 4.11198020E-1, 4.28792536E-1}, +{3.27841163E-1, 3.69345129E-1, 4.34395611E-1}, +{3.80669057E-1, 4.26086366E-1, 4.42754567E-1}, +{2.68943667E-1, 3.42942953E-1, 3.98681462E-1}, +{3.38102877E-1, 3.76338840E-1, 3.92043173E-1}, +{3.23593497E-1, 3.48742068E-1, 3.72551978E-1}, +{3.47550809E-1, 3.92885387E-1, 4.21169937E-1}, +{3.04182827E-1, 3.59816670E-1, 3.81633341E-1}, +{3.14221382E-1, 4.02108550E-1, 4.20085251E-1}, +{3.01306546E-1, 3.62662733E-1, 4.29262817E-1}, +{3.71770263E-1, 3.98696363E-1, 4.31438982E-1}, +{2.74591267E-1, 3.35595489E-1, 4.20079648E-1}, +{3.44540834E-1, 3.90451789E-1, 4.06412065E-1}, +{3.25239837E-1, 3.78344476E-1, 3.94673288E-1}, +{3.56683493E-1, 3.90574157E-1, 4.33851063E-1}, +{2.63501287E-1, 3.95260096E-1, 4.23116386E-1}, +{3.37520659E-1, 3.92563462E-1, 4.43415821E-1}, +{3.14522266E-1, 3.80968630E-1, 4.22676384E-1}, +{3.76235068E-1, 4.17298734E-1, 4.31451261E-1}, +{2.61855006E-1, 3.68646085E-1, 4.04260576E-1}, +{3.55580151E-1, 3.77994478E-1, 3.95868242E-1}, +{3.27742815E-1, 3.53872776E-1, 4.11040604E-1}, +{3.62960637E-1, 3.99466991E-1, 4.14690197E-1}, +{3.09410870E-1, 3.73796046E-1, 3.92672479E-1}, +{3.31016302E-1, 4.00801599E-1, 4.31759298E-1}, +{3.23573053E-1, 3.68619561E-1, 4.17455137E-1}, +{3.49115849E-1, 4.26840067E-1, 4.43913996E-1}, +{2.89738595E-1, 3.63759339E-1, 4.10511792E-1}, +{3.55286479E-1, 3.89331281E-1, 4.13432419E-1}, +{3.36565912E-1, 3.60222459E-1, 4.24179018E-1}, +{3.39932680E-1, 4.09228802E-1, 4.40184891E-1}, +{3.00889730E-1, 4.00081098E-1, 4.17955697E-1}, +{3.17052066E-1, 4.22288120E-1, 4.42229569E-1}, +{3.27336788E-1, 3.84311676E-1, 4.30288613E-1}, +{3.98990929E-1, 4.29498434E-1, 4.43475187E-1}, +{2.49110118E-1, 3.25696886E-1, 4.11728263E-1}, +{3.45929205E-1, 3.68577540E-1, 3.88473272E-1}, +{3.13219666E-1, 3.39229465E-1, 3.87597919E-1}, +{3.51453960E-1, 3.98730278E-1, 4.12656188E-1}, +{2.93487132E-1, 3.75763118E-1, 3.94488096E-1}, +{3.24470758E-1, 3.94202888E-1, 4.08882737E-1}, +{3.12710822E-1, 3.57720256E-1, 4.14061189E-1}, +{3.66507173E-1, 4.08171296E-1, 4.23891425E-1}, +{2.99965680E-1, 3.31993401E-1, 4.07860160E-1}, +{3.34925175E-1, 3.86143029E-1, 4.11538124E-1}, +{3.34788024E-1, 3.66196156E-1, 3.93347144E-1}, +{3.47847939E-1, 4.05926466E-1, 4.30507302E-1}, +{2.85952926E-1, 3.95283282E-1, 4.16119337E-1}, +{3.23867381E-1, 4.06476676E-1, 4.42482829E-1}, +{3.16716671E-1, 3.84451628E-1, 4.39411044E-1}, +{3.86772931E-1, 4.11824584E-1, 4.27831531E-1}, +{2.38072395E-1, 3.62342358E-1, 4.30931687E-1}, +{3.46450031E-1, 3.79082918E-1, 4.06567812E-1}, +{3.16576600E-1, 3.56468618E-1, 3.96218300E-1}, +{3.66539180E-1, 3.89590919E-1, 4.21055555E-1}, +{3.08291376E-1, 3.71324301E-1, 4.07867432E-1}, +{3.36435199E-1, 3.91514421E-1, 4.22977090E-1}, +{3.23035538E-1, 3.80447328E-1, 4.09550190E-1}, +{3.65228057E-1, 4.27910388E-1, 4.43691254E-1}, +{2.72038043E-1, 3.76596808E-1, 4.33685899E-1}, +{3.57665777E-1, 3.77761602E-1, 4.09178972E-1}, +{3.36498559E-1, 3.64215910E-1, 4.09255505E-1}, +{3.48082423E-1, 4.17631805E-1, 4.33284521E-1}, +{3.02754521E-1, 3.95974755E-1, 4.33717251E-1}, +{3.31676304E-1, 4.17587161E-1, 4.36239839E-1}, +{3.33287597E-1, 3.80799115E-1, 4.39620733E-1}, +{3.88112009E-1, 4.36933577E-1, 4.50829268E-1}, +{2.56026626E-1, 3.48015189E-1, 4.22922611E-1}, +{3.45773995E-1, 3.81725788E-1, 3.96794081E-1}, +{3.25623751E-1, 3.50391924E-1, 3.87330651E-1}, +{3.56868088E-1, 3.98574769E-1, 4.23177242E-1}, +{3.01226199E-1, 3.86906981E-1, 4.03335571E-1}, +{3.28178406E-1, 4.02090192E-1, 4.19389248E-1}, +{3.14385355E-1, 3.69043887E-1, 4.34375286E-1}, +{3.72321129E-1, 4.11672413E-1, 4.40518737E-1}, +{2.90479720E-1, 3.48121881E-1, 4.26216483E-1}, +{3.44438791E-1, 3.82666349E-1, 4.17321086E-1}, +{3.34866822E-1, 3.76235664E-1, 4.04475212E-1}, +{3.59025359E-1, 4.04721916E-1, 4.34838414E-1}, +{2.79127955E-1, 4.11106586E-1, 4.35360551E-1}, +{3.48125517E-1, 3.98732066E-1, 4.46927428E-1}, +{3.27018857E-1, 3.90107334E-1, 4.41707492E-1}, +{3.90858352E-1, 4.19813931E-1, 4.35153484E-1}, +{2.55319297E-1, 3.70405972E-1, 4.32188630E-1}, +{3.54651988E-1, 3.88332665E-1, 4.02956128E-1}, +{3.21608186E-1, 3.54489803E-1, 4.28299785E-1}, +{3.75163496E-1, 3.98833990E-1, 4.14177418E-1}, +{3.11953604E-1, 3.91430676E-1, 4.12552476E-1}, +{3.42528820E-1, 3.96365345E-1, 4.32497382E-1}, +{3.33744347E-1, 3.76422405E-1, 4.20536995E-1}, +{3.53529096E-1, 4.29231048E-1, 4.59699273E-1}, +{2.88017929E-1, 3.77999961E-1, 4.34011698E-1}, +{3.55683446E-1, 3.80780041E-1, 4.23145533E-1}, +{3.44358265E-1, 3.72184873E-1, 4.31265354E-1}, +{3.53966117E-1, 4.14166689E-1, 4.42941308E-1}, +{3.04770231E-1, 4.12517488E-1, 4.34183121E-1}, +{3.35913360E-1, 4.24590766E-1, 4.46378469E-1}, +{3.43738198E-1, 3.84766221E-1, 4.35271382E-1}, +{4.10941303E-1, 4.40662980E-1, 4.52113390E-1}}; + +static const float evrc_lspq_half_codebook1[128][3] = { +{1.35226343E-2, 1.82081293E-2, 3.93940695E-2}, +{2.29392890E-2, 3.57831158E-2, 1.05352886E-1}, +{2.09106486E-2, 3.04159056E-2, 8.93941075E-2}, +{1.88909005E-2, 3.82722206E-2, 1.37820408E-1}, +{2.05143820E-2, 2.85481159E-2, 7.39762187E-2}, +{4.69510332E-2, 6.84031919E-2, 1.09123811E-1}, +{3.15557197E-2, 5.69139980E-2, 8.57057571E-2}, +{3.81181911E-2, 7.77784660E-2, 1.92532852E-1}, +{2.16297153E-2, 2.92908940E-2, 6.25042021E-2}, +{3.11414022E-2, 5.99079318E-2, 1.02860682E-1}, +{3.02799307E-2, 5.35012372E-2, 7.80925751E-2}, +{6.50846213E-2, 9.06624720E-2, 1.42850950E-1}, +{3.27340364E-2, 5.04027791E-2, 6.26492277E-2}, +{5.27439862E-2, 6.22574277E-2, 1.22198336E-1}, +{3.48840356E-2, 6.42222390E-2, 9.16024595E-2}, +{4.88984436E-2, 1.05058022E-1, 1.68813452E-1}, +{2.35791076E-2, 3.21034677E-2, 5.60899563E-2}, +{2.77252812E-2, 4.87281792E-2, 1.01224191E-1}, +{2.74348017E-2, 4.04965915E-2, 9.34926122E-2}, +{4.38360050E-2, 6.03261292E-2, 1.52400866E-1}, +{2.68994924E-2, 4.52906378E-2, 6.49800375E-2}, +{5.16058952E-2, 6.08312152E-2, 1.08799636E-1}, +{4.20064926E-2, 6.11845106E-2, 8.54474008E-2}, +{7.13502690E-2, 1.01972111E-1, 1.74640998E-1}, +{2.88906675E-2, 4.13964354E-2, 5.25928028E-2}, +{3.16364467E-2, 6.63532093E-2, 1.24950245E-1}, +{4.30289507E-2, 5.14023267E-2, 7.96877742E-2}, +{5.70970774E-2, 1.08444504E-1, 1.44075617E-1}, +{3.38840261E-2, 5.04746847E-2, 7.29765445E-2}, +{6.54265657E-2, 7.90987685E-2, 1.15570590E-1}, +{3.85423526E-2, 7.33125433E-2, 1.02307513E-1}, +{6.57824501E-2, 1.02909811E-1, 2.11874440E-1}, +{1.54727865E-2, 2.04559695E-2, 5.46121262E-2}, +{2.27950197E-2, 3.90954204E-2, 1.19443826E-1}, +{3.06889173E-2, 4.54540215E-2, 8.20418894E-2}, +{2.25957241E-2, 4.79101725E-2, 1.71844408E-1}, +{2.71088015E-2, 4.01739590E-2, 7.01922849E-2}, +{4.95789349E-2, 7.92963281E-2, 1.04862511E-1}, +{3.06095853E-2, 5.64059429E-2, 9.49584097E-2}, +{6.34224564E-2, 9.11655501E-2, 1.84724405E-1}, +{2.43342388E-2, 3.91998328E-2, 6.31406233E-2}, +{3.38011980E-2, 6.60846457E-2, 1.11031540E-1}, +{3.51784080E-2, 5.79397269E-2, 7.20702857E-2}, +{6.49054050E-2, 8.65831897E-2, 1.54648736E-1}, +{2.91934665E-2, 5.16204573E-2, 6.94437325E-2}, +{5.94522804E-2, 7.19829276E-2, 1.27434507E-1}, +{5.31888530E-2, 6.38182089E-2, 9.88218486E-2}, +{8.68290961E-2, 1.41135350E-1, 1.91728458E-1}, +{2.49991138E-2, 3.62556018E-2, 5.03724031E-2}, +{2.82246377E-2, 5.44572286E-2, 1.12663500E-1}, +{3.62618119E-2, 4.59073223E-2, 9.43343639E-2}, +{5.70455343E-2, 7.46300444E-2, 1.59157172E-1}, +{2.72987466E-2, 4.56625856E-2, 7.52529651E-2}, +{5.12860194E-2, 8.51126984E-2, 1.23587973E-1}, +{4.91451994E-2, 5.93483113E-2, 9.22686011E-2}, +{7.06961900E-2, 1.05451979E-1, 1.92602143E-1}, +{2.80733760E-2, 4.18509208E-2, 5.87159805E-2}, +{4.64449003E-2, 7.06698820E-2, 1.26038432E-1}, +{4.18453738E-2, 6.30445331E-2, 7.66169876E-2}, +{8.42416435E-2, 1.13282882E-1, 1.43687114E-1}, +{4.17615622E-2, 5.59472926E-2, 7.09872842E-2}, +{5.55161387E-2, 9.50126722E-2, 1.27727196E-1}, +{5.90935498E-2, 7.36730024E-2, 9.65935886E-2}, +{7.84136653E-2, 1.41432360E-1, 2.17428640E-1}, +{2.10490543E-2, 2.91891042E-2, 4.60035764E-2}, +{3.64863276E-2, 4.62387018E-2, 1.07044168E-1}, +{2.68652122E-2, 3.92937548E-2, 8.41179937E-2}, +{2.72903945E-2, 5.53805046E-2, 1.41586170E-1}, +{2.48476695E-2, 3.63277681E-2, 7.62430876E-2}, +{5.25430813E-2, 7.75778666E-2, 1.14567965E-1}, +{4.07741442E-2, 5.39923795E-2, 9.07640457E-2}, +{5.73043302E-2, 7.65803084E-2, 1.79578975E-1}, +{2.46032421E-2, 3.41408364E-2, 6.78990781E-2}, +{4.08220068E-2, 6.29783794E-2, 9.95191261E-2}, +{3.83025035E-2, 5.52857481E-2, 7.90019333E-2}, +{7.24111274E-2, 1.01903863E-1, 1.46979645E-1}, +{3.73902172E-2, 4.70463894E-2, 6.54684529E-2}, +{5.27397543E-2, 6.72770366E-2, 1.39680430E-1}, +{4.05365378E-2, 7.05081299E-2, 9.25668627E-2}, +{4.43425253E-2, 1.10367171E-1, 1.99636266E-1}, +{2.54920740E-2, 3.47603969E-2, 6.05902039E-2}, +{4.35465500E-2, 5.32369502E-2, 1.08325966E-1}, +{2.79599819E-2, 4.91324775E-2, 8.84284526E-2}, +{4.98051867E-2, 8.81728902E-2, 1.52597323E-1}, +{3.19346264E-2, 4.62169312E-2, 6.85206428E-2}, +{5.80246300E-2, 6.84268698E-2, 1.15085281E-1}, +{4.33904678E-2, 6.90575615E-2, 8.44984353E-2}, +{7.39691556E-2, 1.19240515E-1, 1.77340195E-1}, +{3.18767503E-2, 4.59697433E-2, 5.72372638E-2}, +{4.50873822E-2, 5.66509366E-2, 1.32005826E-1}, +{4.59097028E-2, 5.45580424E-2, 8.61423314E-2}, +{7.44685754E-2, 1.13815404E-1, 1.61570594E-1}, +{3.97509560E-2, 4.95359488E-2, 7.22542256E-2}, +{6.76257759E-2, 8.31029043E-2, 1.27990112E-1}, +{5.76258078E-2, 6.95326403E-2, 1.05012968E-1}, +{6.85313493E-2, 1.21758826E-1, 2.20626548E-1}, +{2.18480472E-2, 2.99130920E-2, 5.16208000E-2}, +{3.64343151E-2, 4.91795056E-2, 1.23277210E-1}, +{3.89611274E-2, 4.76634987E-2, 8.61716568E-2}, +{4.14635167E-2, 6.88006952E-2, 1.69356152E-1}, +{3.35514620E-2, 4.17815186E-2, 7.37159401E-2}, +{5.80224693E-2, 8.70314166E-2, 1.12917498E-1}, +{4.80243117E-2, 5.69486506E-2, 1.00755706E-1}, +{5.98873124E-2, 8.57942328E-2, 2.01388851E-1}, +{2.99309995E-2, 3.94828431E-2, 6.46376088E-2}, +{3.88626605E-2, 8.07443634E-2, 1.15519784E-1}, +{3.49444002E-2, 6.28911033E-2, 8.04982036E-2}, +{6.88817874E-2, 9.92431119E-2, 1.60393253E-1}, +{3.64237651E-2, 5.34016453E-2, 6.70152009E-2}, +{5.83492741E-2, 7.85285756E-2, 1.41746715E-1}, +{4.86469641E-2, 7.26736858E-2, 9.48315859E-2}, +{5.85533604E-2, 1.36289746E-1, 1.98639736E-1}, +{2.60888506E-2, 3.73406820E-2, 5.57853170E-2}, +{4.58504409E-2, 5.60512505E-2, 1.17927872E-1}, +{4.28801328E-2, 5.14739119E-2, 9.75309014E-2}, +{6.37611598E-2, 8.73552933E-2, 1.68334916E-1}, +{3.76709923E-2, 4.58216034E-2, 7.86528140E-2}, +{6.75194561E-2, 8.98697898E-2, 1.19418114E-1}, +{5.46374246E-2, 6.66805878E-2, 8.93813819E-2}, +{7.73086548E-2, 1.21754415E-1, 1.99579224E-1}, +{3.15621309E-2, 4.51702215E-2, 6.25768527E-2}, +{3.78782675E-2, 8.03486481E-2, 1.38961688E-1}, +{5.08303270E-2, 6.18740581E-2, 8.31153840E-2}, +{8.96311402E-2, 1.28753766E-1, 1.64891586E-1}, +{4.73503470E-2, 5.75724356E-2, 7.65264630E-2}, +{7.16898590E-2, 9.89895687E-2, 1.30078360E-1}, +{6.29082546E-2, 7.90778771E-2, 1.05111063E-1}, +{8.80649835E-2, 1.65206164E-1, 2.13214174E-1}}; + +static const float evrc_lspq_half_codebook2[128][3] = { +{9.75915268E-2, 1.23701490E-1, 1.69437975E-1}, +{9.49536338E-2, 2.01081768E-1, 2.26855248E-1}, +{9.00496617E-2, 1.49164870E-1, 2.26532787E-1}, +{1.70302704E-1, 1.97222874E-1, 2.49974832E-1}, +{1.08773641E-1, 1.51972428E-1, 1.75123364E-1}, +{1.30278930E-1, 2.13229164E-1, 2.29646355E-1}, +{1.24917991E-1, 1.87347755E-1, 2.04712003E-1}, +{2.00670198E-1, 2.28963569E-1, 2.69420803E-1}, +{8.98375586E-2, 1.25332758E-1, 2.10539430E-1}, +{9.62376669E-2, 2.07185850E-1, 2.54174471E-1}, +{1.05694629E-1, 1.78856418E-1, 2.00121015E-1}, +{1.56048968E-1, 2.19573721E-1, 2.91079402E-1}, +{1.37392268E-1, 1.59993336E-1, 1.94698542E-1}, +{1.07262500E-1, 2.37790957E-1, 2.70740807E-1}, +{1.42976448E-1, 2.01550499E-1, 2.18468934E-1}, +{2.14270487E-1, 2.71881402E-1, 3.01200211E-1}, +{1.10729210E-1, 1.33688226E-1, 1.54877156E-1}, +{1.06667660E-1, 1.76678821E-1, 2.62798905E-1}, +{9.16352943E-2, 1.74592838E-1, 2.19329327E-1}, +{1.84038624E-1, 2.27964059E-1, 2.47762203E-1}, +{1.10572360E-1, 1.58207163E-1, 1.96013063E-1}, +{1.33543387E-1, 2.32269660E-1, 2.51828164E-1}, +{1.55922309E-1, 1.77941337E-1, 2.18096644E-1}, +{1.92260072E-1, 2.49512479E-1, 2.89911509E-1}, +{1.13708906E-1, 1.37872443E-1, 2.02929884E-1}, +{1.02557532E-1, 1.84820071E-1, 2.92164624E-1}, +{1.36595622E-1, 1.58687428E-1, 2.41399556E-1}, +{1.72813818E-1, 2.49303415E-1, 3.00458610E-1}, +{1.36871174E-1, 1.57249823E-1, 2.10913152E-1}, +{1.28974810E-1, 2.45167866E-1, 2.67653584E-1}, +{1.66812256E-1, 1.88998029E-1, 2.31345922E-1}, +{2.32248470E-1, 2.63196051E-1, 3.16754937E-1}, +{9.24560949E-2, 1.19977452E-1, 1.91262275E-1}, +{1.13085262E-1, 2.08461538E-1, 2.29368120E-1}, +{1.00716405E-1, 1.40670076E-1, 2.58062959E-1}, +{1.67010382E-1, 2.18105540E-1, 2.62592494E-1}, +{1.25487238E-1, 1.62686959E-1, 1.84409231E-1}, +{1.52406558E-1, 2.07131729E-1, 2.47582436E-1}, +{1.37441203E-1, 1.80262372E-1, 2.17698842E-1}, +{2.07853511E-1, 2.49209508E-1, 2.69830108E-1}, +{9.35257301E-2, 1.49197355E-1, 2.04652041E-1}, +{1.11997180E-1, 2.25233063E-1, 2.47003049E-1}, +{1.09315015E-1, 1.93811879E-1, 2.13802189E-1}, +{1.75118580E-1, 2.52520263E-1, 2.75082767E-1}, +{1.36918738E-1, 1.77440569E-1, 1.97931141E-1}, +{1.36811242E-1, 2.37426177E-1, 2.84737825E-1}, +{1.60759792E-1, 2.00833157E-1, 2.18084484E-1}, +{2.33710244E-1, 2.66372561E-1, 2.91802049E-1}, +{1.19171090E-1, 1.39703169E-1, 1.87723249E-1}, +{1.31049946E-1, 1.93696663E-1, 2.60426998E-1}, +{1.08267047E-1, 1.65194795E-1, 2.39523023E-1}, +{2.03195021E-1, 2.25942209E-1, 2.49403238E-1}, +{1.23842932E-1, 1.45794615E-1, 2.15635628E-1}, +{1.71226338E-1, 2.38054529E-1, 2.57975638E-1}, +{1.66923836E-1, 1.88604668E-1, 2.11124212E-1}, +{2.10620746E-1, 2.62442708E-1, 2.83127964E-1}, +{1.05748810E-1, 1.36286482E-1, 2.20050186E-1}, +{9.72945765E-2, 2.33471528E-1, 2.96113968E-1}, +{1.34298369E-1, 1.93955436E-1, 2.39148825E-1}, +{1.64229318E-1, 2.70067751E-1, 2.94142485E-1}, +{1.42760262E-1, 1.65033355E-1, 2.24100381E-1}, +{1.46414533E-1, 2.47942328E-1, 3.00708115E-1}, +{1.74778774E-1, 2.19349250E-1, 2.38162965E-1}, +{2.36311123E-1, 2.90669680E-1, 3.28010976E-1}, +{1.14076428E-1, 1.33071408E-1, 1.73181504E-1}, +{1.13575839E-1, 1.90307274E-1, 2.41681188E-1}, +{8.59165266E-2, 1.63920239E-1, 2.37934500E-1}, +{1.92916945E-1, 2.15082392E-1, 2.39128128E-1}, +{1.37291834E-1, 1.59423307E-1, 1.79722220E-1}, +{1.40435383E-1, 2.22092256E-1, 2.40960747E-1}, +{1.40387163E-1, 1.89601168E-1, 2.05635697E-1}, +{2.11695507E-1, 2.36578360E-1, 2.81248927E-1}, +{9.03010592E-2, 1.27157405E-1, 2.33567923E-1}, +{1.10118054E-1, 2.09328398E-1, 2.72836268E-1}, +{1.16710417E-1, 1.77853987E-1, 2.22808748E-1}, +{1.81691542E-1, 2.32265159E-1, 2.74991214E-1}, +{1.46553472E-1, 1.69474706E-1, 1.90245956E-1}, +{1.09213792E-1, 2.63291955E-1, 2.88490772E-1}, +{1.49815127E-1, 2.11342707E-1, 2.28899449E-1}, +{1.97645500E-1, 2.83229947E-1, 3.14882278E-1}, +{1.24495603E-1, 1.46097973E-1, 1.66125208E-1}, +{1.34878591E-1, 1.83030054E-1, 2.89288282E-1}, +{9.33032110E-2, 1.83962211E-1, 2.38543004E-1}, +{1.92844257E-1, 2.39588335E-1, 2.58421540E-1}, +{1.23796798E-1, 1.65556595E-1, 2.08408386E-1}, +{1.51144341E-1, 2.35801116E-1, 2.59280622E-1}, +{1.50657728E-1, 1.90052524E-1, 2.28362590E-1}, +{1.98180959E-1, 2.56794214E-1, 3.08975637E-1}, +{1.28490031E-1, 1.49084017E-1, 1.98376507E-1}, +{9.20595750E-2, 2.12231293E-1, 2.92948842E-1}, +{1.41698137E-1, 1.72356680E-1, 2.58454144E-1}, +{1.96733460E-1, 2.29709730E-1, 2.95780182E-1}, +{1.47062227E-1, 1.68918088E-1, 2.07363635E-1}, +{1.36309877E-1, 2.60373056E-1, 2.82607377E-1}, +{1.81041077E-1, 2.01826140E-1, 2.38867551E-1}, +{2.45326266E-1, 2.80183077E-1, 3.11954319E-1}, +{1.04131766E-1, 1.33040652E-1, 1.89834684E-1}, +{1.23298146E-1, 2.09621087E-1, 2.47813210E-1}, +{1.24040775E-1, 1.59827366E-1, 2.58856058E-1}, +{1.87048867E-1, 2.12488100E-1, 2.59629130E-1}, +{1.24255307E-1, 1.73768952E-1, 1.92850024E-1}, +{1.58917829E-1, 2.25389823E-1, 2.43284762E-1}, +{1.53421149E-1, 1.91807315E-1, 2.09249526E-1}, +{2.27154449E-1, 2.51181155E-1, 2.72600353E-1}, +{1.09922059E-1, 1.57100275E-1, 2.20024973E-1}, +{1.32782355E-1, 2.19485506E-1, 2.67028928E-1}, +{1.26857504E-1, 1.98836312E-1, 2.17928499E-1}, +{1.91415027E-1, 2.52424240E-1, 2.72652745E-1}, +{1.55277625E-1, 1.79573521E-1, 2.00773627E-1}, +{1.17547743E-1, 2.47869864E-1, 3.08279335E-1}, +{1.65706977E-1, 2.10339502E-1, 2.29199320E-1}, +{2.25694910E-1, 2.84438193E-1, 3.12106073E-1}, +{1.29503176E-1, 1.48420051E-1, 1.80180401E-1}, +{1.54752508E-1, 1.97748467E-1, 2.67275035E-1}, +{1.28590241E-1, 1.76178381E-1, 2.39905864E-1}, +{2.14926764E-1, 2.37634435E-1, 2.58794010E-1}, +{1.28322318E-1, 1.59338519E-1, 2.26626605E-1}, +{1.55747548E-1, 2.47740522E-1, 2.73726821E-1}, +{1.75741687E-1, 1.97952345E-1, 2.19115943E-1}, +{2.18626365E-1, 2.45809183E-1, 3.00479650E-1}, +{1.17709018E-1, 1.45512864E-1, 2.38044471E-1}, +{1.18006893E-1, 2.23775521E-1, 2.94175088E-1}, +{1.51349202E-1, 1.88157812E-1, 2.48743281E-1}, +{1.89312205E-1, 2.69580543E-1, 2.93785989E-1}, +{1.49895594E-1, 1.74537256E-1, 2.37430006E-1}, +{1.39775530E-1, 2.71709383E-1, 3.07839513E-1}, +{1.83945730E-1, 2.07717165E-1, 2.26722151E-1}, +{2.54552156E-1, 2.96640933E-1, 3.24801445E-1}}; + +static const float evrc_lspq_half_codebook3[256][4] = { +{2.36904725E-1, 2.56104350E-1, 3.16955745E-1, 4.07520533E-1}, +{2.97596931E-1, 3.23482454E-1, 3.47667515E-1, 3.74551237E-1}, +{2.73721159E-1, 2.98297524E-1, 3.29923928E-1, 3.83599102E-1}, +{3.07849586E-1, 3.32836270E-1, 3.89340341E-1, 4.05575991E-1}, +{2.33803615E-1, 2.60296524E-1, 3.67351949E-1, 4.04388249E-1}, +{2.97513664E-1, 3.15356553E-1, 3.85135233E-1, 4.02197123E-1}, +{2.85618782E-1, 3.10872793E-1, 3.65022361E-1, 3.84816766E-1}, +{3.35271597E-1, 3.55222225E-1, 3.81921113E-1, 3.98685753E-1}, +{2.00265601E-1, 2.50502288E-1, 3.70398223E-1, 4.32012677E-1}, +{3.07982087E-1, 3.33767712E-1, 3.58199060E-1, 3.78386796E-1}, +{2.60086119E-1, 3.25520277E-1, 3.56873333E-1, 3.84737790E-1}, +{3.01356375E-1, 3.41369390E-1, 4.00296748E-1, 4.17337179E-1}, +{2.67080963E-1, 2.97674358E-1, 3.69702041E-1, 3.89139235E-1}, +{2.72669852E-1, 3.49704087E-1, 3.91925275E-1, 4.06383276E-1}, +{2.52825916E-1, 3.49636555E-1, 3.84550989E-1, 4.05930996E-1}, +{3.42927098E-1, 3.74274015E-1, 4.05468166E-1, 4.20351923E-1}, +{2.52408743E-1, 2.80375838E-1, 3.21436584E-1, 3.88436913E-1}, +{2.96970189E-1, 3.17173600E-1, 3.65342557E-1, 4.02736843E-1}, +{2.81905174E-1, 3.01479161E-1, 3.34335625E-1, 4.07633483E-1}, +{3.26872945E-1, 3.47177684E-1, 3.75017703E-1, 4.05372381E-1}, +{2.36371145E-1, 3.16441059E-1, 3.48707020E-1, 3.82030427E-1}, +{2.87817597E-1, 3.13627005E-1, 4.05129731E-1, 4.23379660E-1}, +{2.77502477E-1, 3.01843822E-1, 3.72250855E-1, 4.19212818E-1}, +{3.28988850E-1, 3.61901104E-1, 4.02015507E-1, 4.19229805E-1}, +{2.24960461E-1, 2.74636388E-1, 3.77016127E-1, 3.94726515E-1}, +{3.01045477E-1, 3.40486169E-1, 3.74888122E-1, 4.02532160E-1}, +{2.59897947E-1, 3.30334961E-1, 3.57493818E-1, 4.08657968E-1}, +{3.00961852E-1, 3.56449068E-1, 4.04779494E-1, 4.22508955E-1}, +{2.20979586E-1, 3.16477656E-1, 4.01744068E-1, 4.20735776E-1}, +{2.79754996E-1, 3.30776095E-1, 4.11152899E-1, 4.32687044E-1}, +{2.64246881E-1, 3.16610634E-1, 3.83876741E-1, 4.36683774E-1}, +{3.44381154E-1, 3.85365665E-1, 4.24949467E-1, 4.41560209E-1}, +{2.19488308E-1, 2.36459881E-1, 3.42465997E-1, 4.24989998E-1}, +{2.91465104E-1, 3.22282016E-1, 3.72852802E-1, 3.91635895E-1}, +{2.74792433E-1, 3.16536307E-1, 3.45392585E-1, 3.74555230E-1}, +{3.10583472E-1, 3.35264921E-1, 3.87527227E-1, 4.23076212E-1}, +{2.23211512E-1, 2.98497617E-1, 3.68426204E-1, 3.90213728E-1}, +{2.89078832E-1, 3.26512754E-1, 3.76308680E-1, 4.09553707E-1}, +{2.63830125E-1, 3.08977246E-1, 3.81453037E-1, 4.04660761E-1}, +{3.47073615E-1, 3.64797831E-1, 3.86763453E-1, 4.04511690E-1}, +{2.18452707E-1, 2.75614083E-1, 3.62711072E-1, 4.18278992E-1}, +{3.15042794E-1, 3.40813220E-1, 3.78627181E-1, 3.96316767E-1}, +{2.79727697E-1, 3.31259727E-1, 3.60061288E-1, 3.81175518E-1}, +{3.18602443E-1, 3.38044286E-1, 4.09010768E-1, 4.30300415E-1}, +{2.64196932E-1, 2.90672481E-1, 3.68595004E-1, 4.31856751E-1}, +{2.72645593E-1, 3.63514841E-1, 3.96518826E-1, 4.20091212E-1}, +{2.26540968E-1, 3.50055099E-1, 3.93851519E-1, 4.12597001E-1}, +{3.53053868E-1, 3.69929552E-1, 4.09656048E-1, 4.26387310E-1}, +{2.60788381E-1, 2.85172462E-1, 3.45943332E-1, 3.97500694E-1}, +{3.01113129E-1, 3.28201890E-1, 3.56068015E-1, 4.10803795E-1}, +{2.88101614E-1, 3.09559643E-1, 3.43756795E-1, 4.24872875E-1}, +{3.10489357E-1, 3.51421893E-1, 3.93717408E-1, 4.15550530E-1}, +{2.22308263E-1, 3.26798201E-1, 3.77981663E-1, 3.98635030E-1}, +{3.02915514E-1, 3.22781920E-1, 3.98558855E-1, 4.25489604E-1}, +{2.77136803E-1, 3.19992602E-1, 3.77490878E-1, 4.29177463E-1}, +{3.38731766E-1, 3.58164370E-1, 4.08386350E-1, 4.25495386E-1}, +{2.18726233E-1, 2.84384966E-1, 3.94053698E-1, 4.16346967E-1}, +{3.01005960E-1, 3.44093680E-1, 3.69013667E-1, 4.15091276E-1}, +{2.80783713E-1, 3.33053648E-1, 3.76726151E-1, 3.97526860E-1}, +{3.14394057E-1, 3.62678826E-1, 4.23668981E-1, 4.41899240E-1}, +{2.66453624E-1, 3.08513761E-1, 3.97407174E-1, 4.17450190E-1}, +{2.94222653E-1, 3.41904402E-1, 4.12726879E-1, 4.34888899E-1}, +{2.87300706E-1, 3.32434595E-1, 3.78856659E-1, 4.38234031E-1}, +{3.57146621E-1, 3.98147047E-1, 4.29875731E-1, 4.44243908E-1}, +{2.29671344E-1, 2.51018614E-1, 3.41046572E-1, 4.04376328E-1}, +{2.94472575E-1, 3.34944606E-1, 3.60409737E-1, 3.83682847E-1}, +{2.88250983E-1, 3.11722696E-1, 3.31680059E-1, 3.65104675E-1}, +{3.24881613E-1, 3.45656693E-1, 3.88306379E-1, 4.05954897E-1}, +{2.50829220E-1, 2.77623534E-1, 3.70799541E-1, 3.90479207E-1}, +{2.93523371E-1, 3.28319192E-1, 3.92112255E-1, 4.09464061E-1}, +{2.83608794E-1, 3.03885639E-1, 3.78504395E-1, 3.97310555E-1}, +{3.34039807E-1, 3.52837384E-1, 3.97272944E-1, 4.14322019E-1}, +{2.21891895E-1, 2.51877457E-1, 3.71723533E-1, 4.31791008E-1}, +{3.13201427E-1, 3.41175437E-1, 3.65503550E-1, 3.88567209E-1}, +{2.71330535E-1, 3.39163721E-1, 3.62616420E-1, 3.95735979E-1}, +{3.07550132E-1, 3.47777665E-1, 4.01049614E-1, 4.32767451E-1}, +{2.59387434E-1, 2.87243843E-1, 3.86817336E-1, 4.06042695E-1}, +{2.85485208E-1, 3.44094992E-1, 4.02050495E-1, 4.19413745E-1}, +{2.65781403E-1, 3.40084374E-1, 3.69407654E-1, 4.27031696E-1}, +{3.53740931E-1, 3.84463251E-1, 4.11747813E-1, 4.26181793E-1}, +{2.43866488E-1, 2.68350184E-1, 3.42201948E-1, 3.98457229E-1}, +{2.93145239E-1, 3.34754169E-1, 3.61702800E-1, 3.98416638E-1}, +{2.91342974E-1, 3.13155174E-1, 3.36525917E-1, 3.87748599E-1}, +{3.05656791E-1, 3.62904549E-1, 3.88153434E-1, 4.05543149E-1}, +{2.17492327E-1, 3.11723530E-1, 3.75984788E-1, 4.28997755E-1}, +{2.91149259E-1, 3.29380929E-1, 4.03900385E-1, 4.22333181E-1}, +{2.90362060E-1, 3.09530973E-1, 3.78994226E-1, 4.13688362E-1}, +{3.29564869E-1, 3.77404690E-1, 4.06584859E-1, 4.24739718E-1}, +{2.46461585E-1, 2.71593273E-1, 3.66338253E-1, 4.30753767E-1}, +{3.14107716E-1, 3.37011874E-1, 3.80409718E-1, 4.11099434E-1}, +{2.76568413E-1, 3.27320695E-1, 3.58844280E-1, 4.28949475E-1}, +{3.17179084E-1, 3.58972430E-1, 4.04765844E-1, 4.40376341E-1}, +{2.42777750E-1, 3.34954798E-1, 3.96943450E-1, 4.13318396E-1}, +{2.88895488E-1, 3.25691164E-1, 4.22859550E-1, 4.43758667E-1}, +{2.77583301E-1, 3.25479031E-1, 3.89144659E-1, 4.41075861E-1}, +{3.59125674E-1, 3.90694141E-1, 4.21009541E-1, 4.35708523E-1}, +{2.20172390E-1, 2.47719273E-1, 3.54381859E-1, 4.25398111E-1}, +{3.06046784E-1, 3.27924728E-1, 3.66992772E-1, 3.93192589E-1}, +{2.70805597E-1, 3.16826642E-1, 3.45648706E-1, 4.11717594E-1}, +{3.23188901E-1, 3.45463097E-1, 3.89778793E-1, 4.21570778E-1}, +{2.46136114E-1, 3.12391996E-1, 3.72188628E-1, 3.95842731E-1}, +{3.03856730E-1, 3.24354768E-1, 3.85747254E-1, 4.14155006E-1}, +{2.81075418E-1, 3.18608463E-1, 3.85646880E-1, 4.02703643E-1}, +{3.53517115E-1, 3.72702539E-1, 3.96264613E-1, 4.13074911E-1}, +{2.09221140E-1, 2.95262218E-1, 3.80314291E-1, 4.31278229E-1}, +{3.25313628E-1, 3.46735477E-1, 3.70724022E-1, 3.91045630E-1}, +{2.86396503E-1, 3.43560040E-1, 3.69713604E-1, 3.89867842E-1}, +{3.27794671E-1, 3.47367823E-1, 4.05465066E-1, 4.24566150E-1}, +{2.53054976E-1, 3.02656293E-1, 3.82165134E-1, 4.29898322E-1}, +{2.94418454E-1, 3.70745420E-1, 3.95443261E-1, 4.19514775E-1}, +{2.62873113E-1, 3.45069230E-1, 4.04140890E-1, 4.21902061E-1}, +{3.65063488E-1, 3.82435143E-1, 4.13424790E-1, 4.31241691E-1}, +{2.48788506E-1, 2.82372773E-1, 3.65772307E-1, 4.10981059E-1}, +{3.07288766E-1, 3.27828944E-1, 3.77664983E-1, 4.36220944E-1}, +{2.98542321E-1, 3.20627332E-1, 3.50569665E-1, 4.27620232E-1}, +{3.16258013E-1, 3.62903833E-1, 3.88225138E-1, 4.25608873E-1}, +{2.39077866E-1, 3.31310451E-1, 3.70317876E-1, 4.15995896E-1}, +{3.03735793E-1, 3.32806051E-1, 4.10232842E-1, 4.27751064E-1}, +{2.96002507E-1, 3.19014788E-1, 3.81062448E-1, 4.26954985E-1}, +{3.32508922E-1, 3.62516999E-1, 4.23315108E-1, 4.40995157E-1}, +{2.35128701E-1, 2.74731100E-1, 4.12070572E-1, 4.35478806E-1}, +{2.98073769E-1, 3.55338752E-1, 3.79087746E-1, 4.15318787E-1}, +{2.83429801E-1, 3.45264912E-1, 3.70376289E-1, 4.09900844E-1}, +{3.23593080E-1, 3.65412831E-1, 4.12813127E-1, 4.31023479E-1}, +{2.76626348E-1, 3.00508440E-1, 4.02236879E-1, 4.26638782E-1}, +{2.94512928E-1, 3.61443222E-1, 4.19635236E-1, 4.36999202E-1}, +{2.90807247E-1, 3.41689348E-1, 3.92779291E-1, 4.43490267E-1}, +{3.59391451E-1, 4.03985143E-1, 4.40843761E-1, 4.53028619E-1}, +{2.23295465E-1, 2.39192486E-1, 3.23768020E-1, 4.21689451E-1}, +{2.94778049E-1, 3.18798721E-1, 3.53217840E-1, 3.91906381E-1}, +{2.59032130E-1, 3.10240507E-1, 3.43569040E-1, 3.95064235E-1}, +{3.16474676E-1, 3.38544369E-1, 3.93329024E-1, 4.12235558E-1}, +{2.40108207E-1, 2.84631193E-1, 3.60280991E-1, 3.79973769E-1}, +{2.96909094E-1, 3.15798342E-1, 3.94964337E-1, 4.15127575E-1}, +{2.85434067E-1, 3.04921508E-1, 3.61974716E-1, 4.05767262E-1}, +{3.37407053E-1, 3.56672168E-1, 3.85155082E-1, 4.11186695E-1}, +{2.24014923E-1, 2.60116160E-1, 3.94772530E-1, 4.19585884E-1}, +{3.00647914E-1, 3.41640651E-1, 3.70223522E-1, 3.89520049E-1}, +{2.65946031E-1, 3.25039148E-1, 3.74339938E-1, 3.92346144E-1}, +{3.16029310E-1, 3.40491295E-1, 4.02355313E-1, 4.20484245E-1}, +{2.69841492E-1, 2.94562399E-1, 3.62341762E-1, 4.06415462E-1}, +{2.78897285E-1, 3.59831035E-1, 3.82025838E-1, 4.10577476E-1}, +{2.60760844E-1, 3.31088543E-1, 3.88826251E-1, 4.05486643E-1}, +{3.43372285E-1, 3.82647038E-1, 4.14716601E-1, 4.31592941E-1}, +{2.47998103E-1, 2.73393154E-1, 3.31160426E-1, 4.18943226E-1}, +{3.03579569E-1, 3.25202465E-1, 3.70984435E-1, 4.14420485E-1}, +{2.76896894E-1, 3.00499499E-1, 3.54178190E-1, 4.28807020E-1}, +{3.23655546E-1, 3.59816968E-1, 3.89525414E-1, 4.09288704E-1}, +{2.38927796E-1, 3.09919238E-1, 3.53915572E-1, 4.16634321E-1}, +{2.81171739E-1, 3.07520270E-1, 4.16264892E-1, 4.38523829E-1}, +{2.88858652E-1, 3.09810817E-1, 3.67845178E-1, 4.36035573E-1}, +{3.38423491E-1, 3.70634377E-1, 4.15449977E-1, 4.31534529E-1}, +{2.41260394E-1, 2.73617864E-1, 3.89554620E-1, 4.12539542E-1}, +{2.98046708E-1, 3.40122104E-1, 3.86183739E-1, 4.13826346E-1}, +{2.82436430E-1, 3.31597507E-1, 3.57941389E-1, 4.12115216E-1}, +{3.03820193E-1, 3.70588601E-1, 4.05774951E-1, 4.31517065E-1}, +{2.39077732E-1, 3.11638474E-1, 4.13935781E-1, 4.35304046E-1}, +{2.67116845E-1, 3.41937900E-1, 4.17409420E-1, 4.39184844E-1}, +{2.67946839E-1, 3.33343923E-1, 3.86481404E-1, 4.37462509E-1}, +{3.40510964E-1, 3.90878022E-1, 4.35485125E-1, 4.49101925E-1}, +{2.10069850E-1, 2.32524484E-1, 3.61781418E-1, 4.31357861E-1}, +{2.94509888E-1, 3.33709776E-1, 3.82278621E-1, 3.98638904E-1}, +{2.80525148E-1, 3.25905204E-1, 3.50647032E-1, 3.92873943E-1}, +{3.19999635E-1, 3.43674660E-1, 3.91070545E-1, 4.37501073E-1}, +{2.20581010E-1, 3.03151906E-1, 3.81765544E-1, 4.04488146E-1}, +{2.86122739E-1, 3.29746544E-1, 3.88102829E-1, 4.24247742E-1}, +{2.69807100E-1, 3.25332284E-1, 3.79154503E-1, 4.15138245E-1}, +{3.34858894E-1, 3.69258404E-1, 3.94743145E-1, 4.11922157E-1}, +{2.07109794E-1, 2.72779524E-1, 3.78566444E-1, 4.34579968E-1}, +{3.06466222E-1, 3.46695721E-1, 3.87138307E-1, 4.03558314E-1}, +{2.70148575E-1, 3.46654534E-1, 3.77696693E-1, 3.96434486E-1}, +{3.18745911E-1, 3.40225697E-1, 4.14991558E-1, 4.41578746E-1}, +{2.58592844E-1, 3.14370096E-1, 3.65083754E-1, 4.21615183E-1}, +{2.82712996E-1, 3.54137123E-1, 4.06745970E-1, 4.29267883E-1}, +{2.52021760E-1, 3.59105110E-1, 3.95102918E-1, 4.18148398E-1}, +{3.54906201E-1, 3.74952912E-1, 4.18965995E-1, 4.36144412E-1}, +{2.64841139E-1, 2.92941809E-1, 3.27751458E-1, 4.08790469E-1}, +{3.07774246E-1, 3.35586190E-1, 3.62209618E-1, 4.25394237E-1}, +{2.88466334E-1, 3.16075742E-1, 3.60989630E-1, 4.19551432E-1}, +{3.17128420E-1, 3.55772197E-1, 4.05808747E-1, 4.23972964E-1}, +{2.47089684E-1, 3.38184595E-1, 3.71859610E-1, 3.95971477E-1}, +{3.07981730E-1, 3.32691789E-1, 4.00534213E-1, 4.38273668E-1}, +{2.79484808E-1, 3.16183507E-1, 3.97237718E-1, 4.34746623E-1}, +{3.44490469E-1, 3.66153181E-1, 4.10959423E-1, 4.41727102E-1}, +{2.35741779E-1, 2.94587255E-1, 3.98072541E-1, 4.16833401E-1}, +{3.14038455E-1, 3.52272034E-1, 3.79138887E-1, 4.10969079E-1}, +{2.83002496E-1, 3.38136256E-1, 3.88641894E-1, 4.06193316E-1}, +{3.23625326E-1, 3.50243390E-1, 4.28089559E-1, 4.46630359E-1}, +{2.61252105E-1, 3.24970961E-1, 4.00214493E-1, 4.25321758E-1}, +{3.05284500E-1, 3.42164159E-1, 4.24475133E-1, 4.43830967E-1}, +{2.87374794E-1, 3.32500637E-1, 3.94308269E-1, 4.42538500E-1}, +{3.74075353E-1, 4.02026355E-1, 4.30933535E-1, 4.44160044E-1}, +{2.34503999E-1, 2.56218612E-1, 3.41238797E-1, 4.23045278E-1}, +{3.05492580E-1, 3.29156995E-1, 3.52709830E-1, 3.92439067E-1}, +{2.81323552E-1, 3.03292334E-1, 3.48925412E-1, 3.93163860E-1}, +{3.21893454E-1, 3.50419939E-1, 3.97317469E-1, 4.14560318E-1}, +{2.39684582E-1, 2.92451501E-1, 3.78937423E-1, 3.96535456E-1}, +{3.07307243E-1, 3.29127908E-1, 3.98455560E-1, 4.16143298E-1}, +{2.85274565E-1, 3.08774531E-1, 3.92916501E-1, 4.14437652E-1}, +{3.44446361E-1, 3.62201869E-1, 3.97619784E-1, 4.17743623E-1}, +{2.32083067E-1, 2.67807961E-1, 3.78075659E-1, 4.34560895E-1}, +{3.04738700E-1, 3.51865292E-1, 3.75973165E-1, 3.95293653E-1}, +{2.61990905E-1, 3.46207321E-1, 3.71296942E-1, 4.12438929E-1}, +{3.11080933E-1, 3.51040900E-1, 4.16082799E-1, 4.34340119E-1}, +{2.74980426E-1, 2.96631455E-1, 3.87520492E-1, 4.09243762E-1}, +{2.90939093E-1, 3.54455590E-1, 3.93426955E-1, 4.08220291E-1}, +{2.71871865E-1, 3.45510781E-1, 3.87125313E-1, 4.22590613E-1}, +{3.63245904E-1, 3.81932199E-1, 4.04114902E-1, 4.18370664E-1}, +{2.45770738E-1, 2.72909343E-1, 3.48317921E-1, 4.25161839E-1}, +{3.14139009E-1, 3.37872326E-1, 3.65195215E-1, 4.04423416E-1}, +{2.94075787E-1, 3.16935539E-1, 3.43047202E-1, 4.06130373E-1}, +{3.14627469E-1, 3.72413397E-1, 4.00660694E-1, 4.17930841E-1}, +{2.34014243E-1, 3.14007223E-1, 3.83003533E-1, 4.34829175E-1}, +{2.93635666E-1, 3.20529997E-1, 4.10837352E-1, 4.36393142E-1}, +{2.89505839E-1, 3.11828852E-1, 3.86311471E-1, 4.38771248E-1}, +{3.26317430E-1, 3.80858183E-1, 4.19721425E-1, 4.38795507E-1}, +{2.50809520E-1, 2.83018053E-1, 3.82247388E-1, 4.34244394E-1}, +{3.18994045E-1, 3.44855130E-1, 3.72690141E-1, 4.23067033E-1}, +{2.88380086E-1, 3.36622238E-1, 3.69742334E-1, 4.25057590E-1}, +{3.06107700E-1, 3.81856918E-1, 4.18206155E-1, 4.32868361E-1}, +{2.33898312E-1, 3.44861805E-1, 4.12176549E-1, 4.29216206E-1}, +{2.85980880E-1, 3.42903793E-1, 4.25112903E-1, 4.44299698E-1}, +{2.79858828E-1, 3.38789344E-1, 3.92085373E-1, 4.40541029E-1}, +{3.64509344E-1, 3.82202744E-1, 4.29830611E-1, 4.45818365E-1}, +{2.34392300E-1, 2.57377386E-1, 3.59567046E-1, 4.30088580E-1}, +{3.05031896E-1, 3.27589393E-1, 3.78305554E-1, 4.01026130E-1}, +{2.77522624E-1, 3.18130314E-1, 3.67794275E-1, 4.01543021E-1}, +{3.33035767E-1, 3.55820954E-1, 3.87548923E-1, 4.24628675E-1}, +{2.45021001E-1, 3.12560678E-1, 3.91147614E-1, 4.08762813E-1}, +{2.97059119E-1, 3.40246916E-1, 3.92919302E-1, 4.28899705E-1}, +{2.77839303E-1, 3.25019777E-1, 3.97436380E-1, 4.15920913E-1}, +{3.49465251E-1, 3.70362461E-1, 3.95482540E-1, 4.31923389E-1}, +{2.31485590E-1, 2.91023374E-1, 3.77909541E-1, 4.32259738E-1}, +{3.19283485E-1, 3.53671074E-1, 3.80982876E-1, 3.97843361E-1}, +{2.89689243E-1, 3.50265682E-1, 3.80729675E-1, 3.97969365E-1}, +{3.28987300E-1, 3.52005422E-1, 4.12557244E-1, 4.37597930E-1}, +{2.76273251E-1, 3.02267194E-1, 3.81723404E-1, 4.34989095E-1}, +{2.79627264E-1, 3.73727322E-1, 4.12374616E-1, 4.30626333E-1}, +{2.53442764E-1, 3.65940034E-1, 4.14937019E-1, 4.32743609E-1}, +{3.76107216E-1, 3.95142019E-1, 4.16787744E-1, 4.33023572E-1}, +{2.62815833E-1, 2.88270533E-1, 3.47397208E-1, 4.24182594E-1}, +{3.01931322E-1, 3.43652546E-1, 3.77031326E-1, 4.34204459E-1}, +{2.97834277E-1, 3.23495388E-1, 3.64492416E-1, 4.33550835E-1}, +{3.31774473E-1, 3.64324927E-1, 3.98243546E-1, 4.35078323E-1}, +{2.49049723E-1, 3.27870786E-1, 3.83587003E-1, 4.35558081E-1}, +{3.04653406E-1, 3.27671230E-1, 4.18484688E-1, 4.41378772E-1}, +{2.96960890E-1, 3.23898911E-1, 3.90463710E-1, 4.39915955E-1}, +{3.43923748E-1, 3.67100477E-1, 4.29523230E-1, 4.45214987E-1}, +{2.59399652E-1, 2.91602671E-1, 4.04372454E-1, 4.31413233E-1}, +{2.97537506E-1, 3.57573807E-1, 3.88991833E-1, 4.30006981E-1}, +{2.84068942E-1, 3.49574566E-1, 3.81042838E-1, 4.29712772E-1}, +{3.25716257E-1, 3.74875903E-1, 4.31959271E-1, 4.47290838E-1}, +{2.65302956E-1, 3.14745963E-1, 4.16703463E-1, 4.37294722E-1}, +{3.00398588E-1, 3.54147255E-1, 4.28538084E-1, 4.60336387E-1}, +{2.98077166E-1, 3.49304914E-1, 4.00429249E-1, 4.48213518E-1}, +{3.75576198E-1, 4.16657329E-1, 4.42136765E-1, 4.52728629E-1}}; + +static const float evrc_lspq_quant_codebook1[16][5] = { +{0.42091064E-1, 0.69474973E-1, 0.11168948E+0, 0.14571965E+0, 0.20893581E+0}, +{0.54944664E-1, 0.98242261E-1, 0.11007882E+0, 0.15890779E+0, 0.20548241E+0}, +{0.45188572E-1, 0.75199433E-1, 0.11423391E+0, 0.15469728E+0, 0.19746706E+0}, +{0.49474996E-1, 0.79667501E-1, 0.12571351E+0, 0.16944779E+0, 0.20775315E+0}, +{0.41789379E-1, 0.63459560E-1, 0.12068028E+0, 0.15850765E+0, 0.20406815E+0}, +{0.47159236E-1, 0.79129547E-1, 0.12183110E+0, 0.15650047E+0, 0.22309226E+0}, +{0.54539919E-1, 0.80343045E-1, 0.12947764E+0, 0.15186153E+0, 0.20171718E+0}, +{0.55852082E-1, 0.94114847E-1, 0.14016025E+0, 0.17807084E+0, 0.22955489E+0}, +{0.45443531E-1, 0.73541410E-1, 0.11937657E+0, 0.15442030E+0, 0.21010752E+0}, +{0.63178010E-1, 0.95231488E-1, 0.12364983E+0, 0.17672543E+0, 0.21743731E+0}, +{0.52765369E-1, 0.84351443E-1, 0.11589085E+0, 0.15790924E+0, 0.20732352E+0}, +{0.51865745E-1, 0.81328541E-1, 0.13756232E+0, 0.18322878E+0, 0.21640070E+0}, +{0.44419531E-1, 0.68874463E-1, 0.13115251E+0, 0.16263582E+0, 0.21659100E+0}, +{0.49378436E-1, 0.81882551E-1, 0.13067168E+0, 0.16821896E+0, 0.23136081E+0}, +{0.55909779E-1, 0.90783298E-1, 0.13348848E+0, 0.16298474E+0, 0.20961523E+0}, +{0.61378211E-1, 0.98602772E-1, 0.14793332E+0, 0.19283190E+0, 0.23156509E+0}}; + +static const float evrc_lspq_quant_codebook2[16][5] = { +{0.26822963, 0.30585295, 0.31110349, 0.36823335, 0.40774474}, +{0.24418014, 0.28970167, 0.32573757, 0.39021483, 0.41345838}, +{0.23341830, 0.30078292, 0.32893899, 0.38557330, 0.41068462}, +{0.25905868, 0.29756859, 0.34196618, 0.38531172, 0.41295227}, +{0.24290450, 0.29223618, 0.32718554, 0.37788135, 0.40332928}, +{0.24674191, 0.29749370, 0.33631226, 0.39426059, 0.42258954}, +{0.21377595, 0.33140418, 0.34067687, 0.38222077, 0.40939021}, +{0.26673481, 0.30791649, 0.34419721, 0.39611506, 0.42387524}, +{0.26121426, 0.30492544, 0.32997236, 0.38486803, 0.42023736}, +{0.24954870, 0.29372856, 0.33382735, 0.37850669, 0.41714057}, +{0.24158891, 0.30173415, 0.34128246, 0.38428575, 0.41619650}, +{0.25818908, 0.31736413, 0.34904337, 0.38769925, 0.41551358}, +{0.24450587, 0.30673453, 0.33579323, 0.37844428, 0.40557048}, +{0.25164026, 0.31225079, 0.33847794, 0.39554194, 0.42396802}, +{0.22787990, 0.31779197, 0.33831909, 0.40044111, 0.41185561}, +{0.27896860, 0.32261974, 0.35658112, 0.40206763, 0.42370448}}; + +static const float * const evrc_lspq_full_codebooks[] = { + evrc_lspq_full_codebook1[0], evrc_lspq_full_codebook2[0], + evrc_lspq_full_codebook3[0], evrc_lspq_full_codebook4[0], +}; + +static const float * const evrc_lspq_half_codebooks[] = { + evrc_lspq_half_codebook1[0], evrc_lspq_half_codebook2[0], + evrc_lspq_half_codebook3[0], +}; + +static const float * const evrc_lspq_quant_codebooks[] = { + evrc_lspq_quant_codebook1[0], evrc_lspq_quant_codebook2[0], +}; + +static const float * const * const evrc_lspq_codebooks[] = { + 0, + evrc_lspq_quant_codebooks, + 0, + evrc_lspq_half_codebooks, + evrc_lspq_full_codebooks, +}; + +static const uint8_t evrc_lspq_nb_codebooks[] = { + 0, + FF_ARRAY_ELEMS(evrc_lspq_quant_codebooks), + 0, + FF_ARRAY_ELEMS(evrc_lspq_half_codebooks), + FF_ARRAY_ELEMS(evrc_lspq_full_codebooks), +}; + +static const uint8_t evrc_lspq_full_codebooks_row_sizes[] = { + FF_ARRAY_ELEMS(evrc_lspq_full_codebook1[0]), + FF_ARRAY_ELEMS(evrc_lspq_full_codebook2[0]), + FF_ARRAY_ELEMS(evrc_lspq_full_codebook3[0]), + FF_ARRAY_ELEMS(evrc_lspq_full_codebook4[0]), +}; + +static const uint8_t evrc_lspq_half_codebooks_row_sizes[] = { + FF_ARRAY_ELEMS(evrc_lspq_half_codebook1[0]), + FF_ARRAY_ELEMS(evrc_lspq_half_codebook2[0]), + FF_ARRAY_ELEMS(evrc_lspq_half_codebook3[0]), +}; + +static const uint8_t evrc_lspq_quant_codebooks_row_sizes[] = { + FF_ARRAY_ELEMS(evrc_lspq_quant_codebook1[0]), + FF_ARRAY_ELEMS(evrc_lspq_quant_codebook2[0]), +}; + +static const uint8_t* const evrc_lspq_codebooks_row_sizes[] = { + NULL, + evrc_lspq_quant_codebooks_row_sizes, + NULL, + evrc_lspq_half_codebooks_row_sizes, + evrc_lspq_full_codebooks_row_sizes, +}; + +static const float pitch_gain_vq[] = { 0, 0.3, 0.55, 0.7, 0.8, 0.9, 1, 1.2 }; +static const float estimation_delay[] = { 55.0, 80.0, 39.0, 71.0, 33.0 }; // 5.2.3.4 +static const uint8_t subframe_sizes[] = { 53, 53, 54 }; +#endif /* AVCODEC_EVRCDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exif.h new file mode 100644 index 00000000..05af756c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exif.h @@ -0,0 +1,173 @@ +/* + * EXIF metadata parser + * Copyright (c) 2013 Thilo Borgmann + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * EXIF metadata parser + * @author Thilo Borgmann + */ + +#ifndef AVCODEC_EXIF_H +#define AVCODEC_EXIF_H + +#include "avcodec.h" +#include "bytestream.h" +#include "tiff.h" + +#define EXIF_MAX_IFD_RECURSION 2 +#define EXIF_TAG_NAME_LENGTH 32 + +struct exif_tag { + char name[EXIF_TAG_NAME_LENGTH]; + uint16_t id; +}; + +static const struct exif_tag tag_list[] = { // JEITA CP-3451 EXIF specification: + {"GPSVersionID", 0x00}, // <- Table 12 GPS Attribute Information + {"GPSLatitudeRef", 0x01}, + {"GPSLatitude", 0x02}, + {"GPSLongitudeRef", 0x03}, + {"GPSLongitude", 0x04}, + {"GPSAltitudeRef", 0x05}, + {"GPSAltitude", 0x06}, + {"GPSTimeStamp", 0x07}, + {"GPSSatellites", 0x08}, + {"GPSStatus", 0x09}, + {"GPSMeasureMode", 0x0A}, + {"GPSDOP", 0x0B}, + {"GPSSpeedRef", 0x0C}, + {"GPSSpeed", 0x0D}, + {"GPSTrackRef", 0x0E}, + {"GPSTrack", 0x0F}, + {"GPSImgDirectionRef", 0x10}, + {"GPSImgDirection", 0x11}, + {"GPSMapDatum", 0x12}, + {"GPSDestLatitudeRef", 0x13}, + {"GPSDestLatitude", 0x14}, + {"GPSDestLongitudeRef", 0x15}, + {"GPSDestLongitude", 0x16}, + {"GPSDestBearingRef", 0x17}, + {"GPSDestBearing", 0x18}, + {"GPSDestDistanceRef", 0x19}, + {"GPSDestDistance", 0x1A}, + {"GPSProcessingMethod", 0x1B}, + {"GPSAreaInformation", 0x1C}, + {"GPSDateStamp", 0x1D}, + {"GPSDifferential", 0x1E}, + {"ImageWidth", 0x100}, // <- Table 3 TIFF Rev. 6.0 Attribute Information Used in Exif + {"ImageLength", 0x101}, + {"BitsPerSample", 0x102}, + {"Compression", 0x103}, + {"PhotometricInterpretation", 0x106}, + {"Orientation", 0x112}, + {"SamplesPerPixel", 0x115}, + {"PlanarConfiguration", 0x11C}, + {"YCbCrSubSampling", 0x212}, + {"YCbCrPositioning", 0x213}, + {"XResolution", 0x11A}, + {"YResolution", 0x11B}, + {"ResolutionUnit", 0x128}, + {"StripOffsets", 0x111}, + {"RowsPerStrip", 0x116}, + {"StripByteCounts", 0x117}, + {"JPEGInterchangeFormat", 0x201}, + {"JPEGInterchangeFormatLength",0x202}, + {"TransferFunction", 0x12D}, + {"WhitePoint", 0x13E}, + {"PrimaryChromaticities", 0x13F}, + {"YCbCrCoefficients", 0x211}, + {"ReferenceBlackWhite", 0x214}, + {"DateTime", 0x132}, + {"ImageDescription", 0x10E}, + {"Make", 0x10F}, + {"Model", 0x110}, + {"Software", 0x131}, + {"Artist", 0x13B}, + {"Copyright", 0x8298}, + {"ExifVersion", 0x9000}, // <- Table 4 Exif IFD Attribute Information (1) + {"FlashpixVersion", 0xA000}, + {"ColorSpace", 0xA001}, + {"ComponentsConfiguration", 0x9101}, + {"CompressedBitsPerPixel", 0x9102}, + {"PixelXDimension", 0xA002}, + {"PixelYDimension", 0xA003}, + {"MakerNote", 0x927C}, + {"UserComment", 0x9286}, + {"RelatedSoundFile", 0xA004}, + {"DateTimeOriginal", 0x9003}, + {"DateTimeDigitized", 0x9004}, + {"SubSecTime", 0x9290}, + {"SubSecTimeOriginal", 0x9291}, + {"SubSecTimeDigitized", 0x9292}, + {"ImageUniqueID", 0xA420}, + {"ExposureTime", 0x829A}, // <- Table 5 Exif IFD Attribute Information (2) + {"FNumber", 0x829D}, + {"ExposureProgram", 0x8822}, + {"SpectralSensitivity", 0x8824}, + {"ISOSpeedRatings", 0x8827}, + {"OECF", 0x8828}, + {"ShutterSpeedValue", 0x9201}, + {"ApertureValue", 0x9202}, + {"BrightnessValue", 0x9203}, + {"ExposureBiasValue", 0x9204}, + {"MaxApertureValue", 0x9205}, + {"SubjectDistance", 0x9206}, + {"MeteringMode", 0x9207}, + {"LightSource", 0x9208}, + {"Flash", 0x9209}, + {"FocalLength", 0x920A}, + {"SubjectArea", 0x9214}, + {"FlashEnergy", 0xA20B}, + {"SpatialFrequencyResponse", 0xA20C}, + {"FocalPlaneXResolution", 0xA20E}, + {"FocalPlaneYResolution", 0xA20F}, + {"FocalPlaneResolutionUnit", 0xA210}, + {"SubjectLocation", 0xA214}, + {"ExposureIndex", 0xA215}, + {"SensingMethod", 0xA217}, + {"FileSource", 0xA300}, + {"SceneType", 0xA301}, + {"CFAPattern", 0xA302}, + {"CustomRendered", 0xA401}, + {"ExposureMode", 0xA402}, + {"WhiteBalance", 0xA403}, + {"DigitalZoomRatio", 0xA404}, + {"FocalLengthIn35mmFilm", 0xA405}, + {"SceneCaptureType", 0xA406}, + {"GainControl", 0xA407}, + {"Contrast", 0xA408}, + {"Saturation", 0xA409}, + {"Sharpness", 0xA40A}, + {"DeviceSettingDescription", 0xA40B}, + {"SubjectDistanceRange", 0xA40C} +// {"InteroperabilityIndex", 0x1}, // <- Table 13 Interoperability IFD Attribute Information +// {"", 0x0} +}; + +/** Recursively decodes all IFD's and + * adds included TAGS into the metadata dictionary. */ +int avpriv_exif_decode_ifd(void *logctx, const uint8_t *buf, int size, + int le, int depth, AVDictionary **metadata); + +int ff_exif_decode_ifd(void *logctx, GetByteContext *gbytes, int le, + int depth, AVDictionary **metadata); + +#endif /* AVCODEC_EXIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exrdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exrdsp.h new file mode 100644 index 00000000..2c4dc3af --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/exrdsp.h @@ -0,0 +1,33 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_EXRDSP_H +#define AVCODEC_EXRDSP_H + +#include +#include "libavutil/common.h" + +typedef struct ExrDSPContext { + void (*reorder_pixels)(uint8_t *dst, const uint8_t *src, ptrdiff_t size); + void (*predictor)(uint8_t *src, ptrdiff_t size); +} ExrDSPContext; + +void ff_exrdsp_init(ExrDSPContext *c); +void ff_exrdsp_init_x86(ExrDSPContext *c); + +#endif /* AVCODEC_EXRDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faandct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faandct.h new file mode 100644 index 00000000..c5ef96dc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faandct.h @@ -0,0 +1,37 @@ +/* + * Floating point AAN DCT + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief + * Floating point AAN DCT + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_FAANDCT_H +#define AVCODEC_FAANDCT_H + +#include + +void ff_faandct(int16_t *data); +void ff_faandct248(int16_t *data); + +#endif /* AVCODEC_FAANDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faanidct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faanidct.h new file mode 100644 index 00000000..6f4da67c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faanidct.h @@ -0,0 +1,32 @@ +/* + * Floating point AAN IDCT + * Copyright (c) 2008 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FAANIDCT_H +#define AVCODEC_FAANIDCT_H + +#include +#include + +void ff_faanidct(int16_t block[64]); +void ff_faanidct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); +void ff_faanidct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); + +#endif /* AVCODEC_FAANIDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faxcompr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faxcompr.h new file mode 100644 index 00000000..aa29a7ba --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/faxcompr.h @@ -0,0 +1,46 @@ +/* + * CCITT Fax Group 3 and 4 decompression + * Copyright (c) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * CCITT Fax Group 3 and 4 decompression + * @author Konstantin Shishkov + */ +#ifndef AVCODEC_FAXCOMPR_H +#define AVCODEC_FAXCOMPR_H + +#include "avcodec.h" +#include "tiff.h" + +/** + * initialize unpacker code + */ +void ff_ccitt_unpack_init(void); + +/** + * unpack data compressed with CCITT Group 3 1/2-D or Group 4 method + */ +int ff_ccitt_unpack(AVCodecContext *avctx, + const uint8_t *src, int srcsize, + uint8_t *dst, int height, int stride, + enum TiffCompr compr, int opts); + +#endif /* AVCODEC_FAXCOMPR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fdctdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fdctdsp.h new file mode 100644 index 00000000..3e1f683b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fdctdsp.h @@ -0,0 +1,37 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FDCTDSP_H +#define AVCODEC_FDCTDSP_H + +#include + +#include "avcodec.h" + +typedef struct FDCTDSPContext { + void (*fdct)(int16_t *block /* align 16 */); + void (*fdct248)(int16_t *block /* align 16 */); +} FDCTDSPContext; + +void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx); +void ff_fdctdsp_init_ppc(FDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_fdctdsp_init_x86(FDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); + +#endif /* AVCODEC_FDCTDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffjni.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffjni.h new file mode 100644 index 00000000..6027bac0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffjni.h @@ -0,0 +1,145 @@ +/* + * JNI utility functions + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FFJNI_H +#define AVCODEC_FFJNI_H + +#include + +/* + * Attach permanently a JNI environment to the current thread and retrieve it. + * + * If successfully attached, the JNI environment will automatically be detached + * at thread destruction. + * + * @param attached pointer to an integer that will be set to 1 if the + * environment has been attached to the current thread or 0 if it is + * already attached. + * @param log_ctx context used for logging, can be NULL + * @return the JNI environment on success, NULL otherwise + */ +JNIEnv *ff_jni_get_env(void *log_ctx); + +/* + * Convert a jstring to its utf characters equivalent. + * + * @param env JNI environment + * @param string Java string to convert + * @param log_ctx context used for logging, can be NULL + * @return a pointer to an array of unicode characters on success, NULL + * otherwise + */ +char *ff_jni_jstring_to_utf_chars(JNIEnv *env, jstring string, void *log_ctx); + +/* + * Convert utf chars to its jstring equivalent. + * + * @param env JNI environment + * @param utf_chars a pointer to an array of unicode characters + * @param log_ctx context used for logging, can be NULL + * @return a Java string object on success, NULL otherwise + */ +jstring ff_jni_utf_chars_to_jstring(JNIEnv *env, const char *utf_chars, void *log_ctx); + +/* + * Extract the error summary from a jthrowable in the form of "className: errorMessage" + * + * @param env JNI environment + * @param exception exception to get the summary from + * @param error address pointing to the error, the value is updated if a + * summary can be extracted + * @param log_ctx context used for logging, can be NULL + * @return 0 on success, < 0 otherwise + */ +int ff_jni_exception_get_summary(JNIEnv *env, jthrowable exception, char **error, void *log_ctx); + +/* + * Check if an exception has occurred,log it using av_log and clear it. + * + * @param env JNI environment + * @param log value used to enable logging if an exception has occurred, + * 0 disables logging, != 0 enables logging + * @param log_ctx context used for logging, can be NULL + */ +int ff_jni_exception_check(JNIEnv *env, int log, void *log_ctx); + +/* + * Jni field type. + */ +enum FFJniFieldType { + + FF_JNI_CLASS, + FF_JNI_FIELD, + FF_JNI_STATIC_FIELD, + FF_JNI_METHOD, + FF_JNI_STATIC_METHOD + +}; + +/* + * Jni field describing a class, a field or a method to be retrieved using + * the ff_jni_init_jfields method. + */ +struct FFJniField { + + const char *name; + const char *method; + const char *signature; + enum FFJniFieldType type; + int offset; + int mandatory; + +}; + +/* + * Retrieve class references, field ids and method ids to an arbitrary structure. + * + * @param env JNI environment + * @param jfields a pointer to an arbitrary structure where the different + * fields are declared and where the FFJNIField mapping table offsets are + * pointing to + * @param jfields_mapping null terminated array of FFJNIFields describing + * the class/field/method to be retrieved + * @param global make the classes references global. It is the caller + * responsibility to properly release global references. + * @param log_ctx context used for logging, can be NULL + * @return 0 on success, < 0 otherwise + */ +int ff_jni_init_jfields(JNIEnv *env, void *jfields, const struct FFJniField *jfields_mapping, int global, void *log_ctx); + +/* + * Delete class references, field ids and method ids of an arbitrary structure. + * + * @param env JNI environment + * @param jfields a pointer to an arbitrary structure where the different + * fields are declared and where the FFJNIField mapping table offsets are + * pointing to + * @param jfields_mapping null terminated array of FFJNIFields describing + * the class/field/method to be deleted + * @param global threat the classes references as global and delete them + * accordingly + * @param log_ctx context used for logging, can be NULL + * @return 0 on success, < 0 otherwise + */ +int ff_jni_reset_jfields(JNIEnv *env, void *jfields, const struct FFJniField *jfields_mapping, int global, void *log_ctx); + +#endif /* AVCODEC_FFJNI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft-internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft-internal.h new file mode 100644 index 00000000..0a8f7d05 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft-internal.h @@ -0,0 +1,94 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FFT_INTERNAL_H +#define AVCODEC_FFT_INTERNAL_H + +#if FFT_FLOAT + +#define FIX15(v) (v) +#define sqrthalf (float)M_SQRT1_2 + +#define BF(x, y, a, b) do { \ + x = a - b; \ + y = a + b; \ + } while (0) + +#define CMUL(dre, dim, are, aim, bre, bim) do { \ + (dre) = (are) * (bre) - (aim) * (bim); \ + (dim) = (are) * (bim) + (aim) * (bre); \ + } while (0) + +#else + +#define SCALE_FLOAT(a, bits) lrint((a) * (double)(1 << (bits))) + +#if FFT_FIXED_32 + +#define CMUL(dre, dim, are, aim, bre, bim) do { \ + int64_t accu; \ + (accu) = (int64_t)(bre) * (are); \ + (accu) -= (int64_t)(bim) * (aim); \ + (dre) = (int)(((accu) + 0x40000000) >> 31); \ + (accu) = (int64_t)(bre) * (aim); \ + (accu) += (int64_t)(bim) * (are); \ + (dim) = (int)(((accu) + 0x40000000) >> 31); \ + } while (0) + +#define FIX15(a) av_clip(SCALE_FLOAT(a, 31), -2147483647, 2147483647) + +#else /* FFT_FIXED_32 */ + +#include "fft.h" +#include "mathops.h" + +void ff_mdct_calcw_c(FFTContext *s, FFTDouble *output, const FFTSample *input); + +#define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767) + +#define sqrthalf ((int16_t)((1<<15)*M_SQRT1_2)) + +#define BF(x, y, a, b) do { \ + x = (a - b) >> 1; \ + y = (a + b) >> 1; \ + } while (0) + +#define CMULS(dre, dim, are, aim, bre, bim, sh) do { \ + (dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> sh; \ + (dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> sh; \ + } while (0) + +#define CMUL(dre, dim, are, aim, bre, bim) \ + CMULS(dre, dim, are, aim, bre, bim, 15) + +#define CMULL(dre, dim, are, aim, bre, bim) \ + CMULS(dre, dim, are, aim, bre, bim, 0) + +#endif /* FFT_FIXED_32 */ + +#endif /* FFT_FLOAT */ + +#define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c) +#define ff_imdct_half_c FFT_NAME(ff_imdct_half_c) +#define ff_mdct_calc_c FFT_NAME(ff_mdct_calc_c) + +void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_mdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input); + +#endif /* AVCODEC_FFT_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft.h new file mode 100644 index 00000000..c858570a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft.h @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FFT_H +#define AVCODEC_FFT_H + +#ifndef FFT_FLOAT +#define FFT_FLOAT 1 +#endif + +#ifndef FFT_FIXED_32 +#define FFT_FIXED_32 0 +#endif + +#include +#include "config.h" +#include "libavutil/mem.h" + +#if FFT_FLOAT + +#include "avfft.h" + +#define FFT_NAME(x) x + +typedef float FFTDouble; + +#else + +#if FFT_FIXED_32 + +#define Q31(x) (int)((x)*2147483648.0 + 0.5) +#define FFT_NAME(x) x ## _fixed_32 + +typedef int32_t FFTSample; + +#else /* FFT_FIXED_32 */ + +#define FFT_NAME(x) x ## _fixed + +typedef int16_t FFTSample; + +#endif /* FFT_FIXED_32 */ + +typedef struct FFTComplex { + FFTSample re, im; +} FFTComplex; + +typedef int FFTDouble; +typedef struct FFTContext FFTContext; + +#endif /* FFT_FLOAT */ + +typedef struct FFTDComplex { + FFTDouble re, im; +} FFTDComplex; + +/* FFT computation */ + +enum fft_permutation_type { + FF_FFT_PERM_DEFAULT, + FF_FFT_PERM_SWAP_LSBS, + FF_FFT_PERM_AVX, +}; + +enum mdct_permutation_type { + FF_MDCT_PERM_NONE, + FF_MDCT_PERM_INTERLEAVE, +}; + +struct FFTContext { + int nbits; + int inverse; + uint16_t *revtab; + FFTComplex *tmp_buf; + int mdct_size; /* size of MDCT (i.e. number of input data * 2) */ + int mdct_bits; /* n = 2^nbits */ + /* pre/post rotation tables */ + FFTSample *tcos; + FFTSample *tsin; + /** + * Do the permutation needed BEFORE calling fft_calc(). + */ + void (*fft_permute)(struct FFTContext *s, FFTComplex *z); + /** + * Do a complex FFT with the parameters defined in ff_fft_init(). The + * input data must be permuted before. No 1.0/sqrt(n) normalization is done. + */ + void (*fft_calc)(struct FFTContext *s, FFTComplex *z); + void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input); + void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input); + void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input); + void (*mdct_calcw)(struct FFTContext *s, FFTDouble *output, const FFTSample *input); + enum fft_permutation_type fft_permutation; + enum mdct_permutation_type mdct_permutation; + uint32_t *revtab32; +}; + +#if CONFIG_HARDCODED_TABLES +#define COSTABLE_CONST const +#else +#define COSTABLE_CONST +#endif + +#define COSTABLE(size) \ + COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2] + +extern COSTABLE(16); +extern COSTABLE(32); +extern COSTABLE(64); +extern COSTABLE(128); +extern COSTABLE(256); +extern COSTABLE(512); +extern COSTABLE(1024); +extern COSTABLE(2048); +extern COSTABLE(4096); +extern COSTABLE(8192); +extern COSTABLE(16384); +extern COSTABLE(32768); +extern COSTABLE(65536); +extern COSTABLE(131072); +extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[18]; + +#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs) + +/** + * Initialize the cosine table in ff_cos_tabs[index] + * @param index index in ff_cos_tabs array of the table to initialize + */ +void ff_init_ff_cos_tabs(int index); + +#define ff_fft_init FFT_NAME(ff_fft_init) +#define ff_fft_end FFT_NAME(ff_fft_end) + +/** + * Set up a complex FFT. + * @param nbits log2 of the length of the input array + * @param inverse if 0 perform the forward transform, if 1 perform the inverse + */ +int ff_fft_init(FFTContext *s, int nbits, int inverse); + +void ff_fft_init_aarch64(FFTContext *s); +void ff_fft_init_x86(FFTContext *s); +void ff_fft_init_arm(FFTContext *s); +void ff_fft_init_mips(FFTContext *s); +void ff_fft_init_ppc(FFTContext *s); + +void ff_fft_fixed_init_arm(FFTContext *s); + +void ff_fft_end(FFTContext *s); + +#define ff_mdct_init FFT_NAME(ff_mdct_init) +#define ff_mdct_end FFT_NAME(ff_mdct_end) + +int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale); +void ff_mdct_end(FFTContext *s); + +#endif /* AVCODEC_FFT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft_table.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft_table.h new file mode 100644 index 00000000..ed0a6588 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fft_table.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Authors: Stanislav Ocovaj (socovaj@mips.com) + * Goran Cordasic (goran@mips.com) + * Djordje Pesut (djordje@mips.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * definitions and tables for FFT + */ +#ifndef AVCODEC_FFT_TABLE_H +#define AVCODEC_FFT_TABLE_H + +#include "libavcodec/fft.h" + +#define MAX_LOG2_NFFT 17 //!< Specifies maximum allowed fft size +#define MAX_FFT_SIZE (1 << MAX_LOG2_NFFT) + +extern const int32_t ff_w_tab_sr[]; +extern uint16_t ff_fft_offsets_lut[]; +void ff_fft_lut_init(uint16_t *table, int off, int size, int *index); + +#endif /* AVCODEC_FFT_TABLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffv1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffv1.h new file mode 100644 index 00000000..147fe7ae --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ffv1.h @@ -0,0 +1,201 @@ +/* + * FFV1 codec for libavcodec + * + * Copyright (c) 2003-2012 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FFV1_H +#define AVCODEC_FFV1_H + +/** + * @file + * FF Video Codec 1 (a lossless codec) + */ + +#include "libavutil/avassert.h" +#include "libavutil/crc.h" +#include "libavutil/opt.h" +#include "libavutil/imgutils.h" +#include "libavutil/pixdesc.h" +#include "avcodec.h" +#include "get_bits.h" +#include "internal.h" +#include "mathops.h" +#include "put_bits.h" +#include "rangecoder.h" +#include "thread.h" + +#ifdef __INTEL_COMPILER +#undef av_flatten +#define av_flatten +#endif + +#define MAX_PLANES 4 +#define CONTEXT_SIZE 32 + +#define MAX_QUANT_TABLES 8 +#define MAX_CONTEXT_INPUTS 5 + +#define AC_GOLOMB_RICE 0 +#define AC_RANGE_DEFAULT_TAB 1 +#define AC_RANGE_CUSTOM_TAB 2 +#define AC_RANGE_DEFAULT_TAB_FORCE -2 + +typedef struct VlcState { + int16_t drift; + uint16_t error_sum; + int8_t bias; + uint8_t count; +} VlcState; + +typedef struct PlaneContext { + int16_t quant_table[MAX_CONTEXT_INPUTS][256]; + int quant_table_index; + int context_count; + uint8_t (*state)[CONTEXT_SIZE]; + VlcState *vlc_state; + uint8_t interlace_bit_state[2]; +} PlaneContext; + +#define MAX_SLICES 1024 + +typedef struct FFV1Context { + AVClass *class; + AVCodecContext *avctx; + RangeCoder c; + GetBitContext gb; + PutBitContext pb; + uint64_t rc_stat[256][2]; + uint64_t (*rc_stat2[MAX_QUANT_TABLES])[32][2]; + int version; + int micro_version; + int width, height; + int chroma_planes; + int chroma_h_shift, chroma_v_shift; + int transparency; + int flags; + int picture_number; + int key_frame; + ThreadFrame picture, last_picture; + struct FFV1Context *fsrc; + + AVFrame *cur; + int plane_count; + int ac; ///< 1=range coder <-> 0=golomb rice + int ac_byte_count; ///< number of bytes used for AC coding + PlaneContext plane[MAX_PLANES]; + int16_t quant_table[MAX_CONTEXT_INPUTS][256]; + int16_t quant_tables[MAX_QUANT_TABLES][MAX_CONTEXT_INPUTS][256]; + int context_count[MAX_QUANT_TABLES]; + uint8_t state_transition[256]; + uint8_t (*initial_states[MAX_QUANT_TABLES])[32]; + int run_index; + int colorspace; + int16_t *sample_buffer; + int32_t *sample_buffer32; + + int use32bit; + + int ec; + int intra; + int slice_damaged; + int key_frame_ok; + int context_model; + + int bits_per_raw_sample; + int packed_at_lsb; + + int gob_count; + int quant_table_count; + + struct FFV1Context *slice_context[MAX_SLICES]; + int slice_count; + int max_slice_count; + int num_v_slices; + int num_h_slices; + int slice_width; + int slice_height; + int slice_x; + int slice_y; + int slice_reset_contexts; + int slice_coding_mode; + int slice_rct_by_coef; + int slice_rct_ry_coef; +} FFV1Context; + +int ff_ffv1_common_init(AVCodecContext *avctx); +int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs); +int ff_ffv1_init_slices_state(FFV1Context *f); +int ff_ffv1_init_slice_contexts(FFV1Context *f); +int ff_ffv1_allocate_initial_states(FFV1Context *f); +void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs); +int ff_ffv1_close(AVCodecContext *avctx); + +static av_always_inline int fold(int diff, int bits) +{ + if (bits == 8) + diff = (int8_t)diff; + else { + diff = sign_extend(diff, bits); + } + + return diff; +} + +static inline void update_vlc_state(VlcState *const state, const int v) +{ + int drift = state->drift; + int count = state->count; + state->error_sum += FFABS(v); + drift += v; + + if (count == 128) { // FIXME: variable + count >>= 1; + drift >>= 1; + state->error_sum >>= 1; + } + count++; + + if (drift <= -count) { + state->bias = FFMAX(state->bias - 1, -128); + + drift = FFMAX(drift + count, -count + 1); + } else if (drift > 0) { + state->bias = FFMIN(state->bias + 1, 127); + + drift = FFMIN(drift - count, 0); + } + + state->drift = drift; + state->count = count; +} + +#define TYPE int16_t +#define RENAME(name) name +#include "ffv1_template.c" +#undef TYPE +#undef RENAME + +#define TYPE int32_t +#define RENAME(name) name ## 32 +#include "ffv1_template.c" +#undef TYPE +#undef RENAME + +#endif /* AVCODEC_FFV1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fits.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fits.h new file mode 100644 index 00000000..ebae85c9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fits.h @@ -0,0 +1,83 @@ +/* + * FITS image format common prototypes and structures + * Copyright (c) 2017 Paras Chadha + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FITS_H +#define AVCODEC_FITS_H + +#include + +#include "libavutil/dict.h" + +typedef enum FITSHeaderState { + STATE_SIMPLE, + STATE_XTENSION, + STATE_BITPIX, + STATE_NAXIS, + STATE_NAXIS_N, + STATE_PCOUNT, + STATE_GCOUNT, + STATE_REST, +} FITSHeaderState; + +/** + * Structure to store the header keywords in FITS file + */ +typedef struct FITSHeader { + FITSHeaderState state; + unsigned naxis_index; + int bitpix; + int64_t blank; + int blank_found; + int naxis; + int naxisn[999]; + int pcount; + int gcount; + int groups; + int rgb; /**< 1 if file contains RGB image, 0 otherwise */ + int image_extension; + double bscale; + double bzero; + int data_min_found; + double data_min; + int data_max_found; + double data_max; +} FITSHeader; + + +/** + * Initialize a single header line + * @param header pointer to the header + * @param state current state of parsing the header + * @return 0 if successful otherwise AVERROR_INVALIDDATA + */ +int avpriv_fits_header_init(FITSHeader *header, FITSHeaderState state); + +/** + * Parse a single header line + * @param avcl used in av_log + * @param header pointer to the header + * @param line one header line + * @param metadata used to store metadata while decoding + * @return 0 if successful otherwise AVERROR_INVALIDDATA + */ +int avpriv_fits_header_parse_line(void *avcl, FITSHeader *header, const uint8_t line[80], AVDictionary ***metadata); + +#endif /* AVCODEC_FITS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flac.h new file mode 100644 index 00000000..991ab43f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flac.h @@ -0,0 +1,155 @@ +/* + * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions + * Copyright (c) 2008 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * FLAC (Free Lossless Audio Codec) decoder/demuxer common functions + */ + +#ifndef AVCODEC_FLAC_H +#define AVCODEC_FLAC_H + +#include "avcodec.h" +#include "bytestream.h" +#include "get_bits.h" + +#define FLAC_STREAMINFO_SIZE 34 +#define FLAC_MAX_CHANNELS 8 +#define FLAC_MIN_BLOCKSIZE 16 +#define FLAC_MAX_BLOCKSIZE 65535 +#define FLAC_MIN_FRAME_SIZE 11 + +enum { + FLAC_CHMODE_INDEPENDENT = 0, + FLAC_CHMODE_LEFT_SIDE = 1, + FLAC_CHMODE_RIGHT_SIDE = 2, + FLAC_CHMODE_MID_SIDE = 3, +}; + +enum { + FLAC_METADATA_TYPE_STREAMINFO = 0, + FLAC_METADATA_TYPE_PADDING, + FLAC_METADATA_TYPE_APPLICATION, + FLAC_METADATA_TYPE_SEEKTABLE, + FLAC_METADATA_TYPE_VORBIS_COMMENT, + FLAC_METADATA_TYPE_CUESHEET, + FLAC_METADATA_TYPE_PICTURE, + FLAC_METADATA_TYPE_INVALID = 127 +}; + +enum FLACExtradataFormat { + FLAC_EXTRADATA_FORMAT_STREAMINFO = 0, + FLAC_EXTRADATA_FORMAT_FULL_HEADER = 1 +}; + +#define FLACCOMMONINFO \ + int samplerate; /**< sample rate */\ + int channels; /**< number of channels */\ + int bps; /**< bits-per-sample */\ + +/** + * Data needed from the Streaminfo header for use by the raw FLAC demuxer + * and/or the FLAC decoder. + */ +#define FLACSTREAMINFO \ + FLACCOMMONINFO \ + int max_blocksize; /**< maximum block size, in samples */\ + int max_framesize; /**< maximum frame size, in bytes */\ + int64_t samples; /**< total number of samples */\ + +typedef struct FLACStreaminfo { + FLACSTREAMINFO +} FLACStreaminfo; + +typedef struct FLACFrameInfo { + FLACCOMMONINFO + int blocksize; /**< block size of the frame */ + int ch_mode; /**< channel decorrelation mode */ + int64_t frame_or_sample_num; /**< frame number or sample number */ + int is_var_size; /**< specifies if the stream uses variable + block sizes or a fixed block size; + also determines the meaning of + frame_or_sample_num */ +} FLACFrameInfo; + +/** + * Parse the Streaminfo metadata block + * @param[out] avctx codec context to set basic stream parameters + * @param[out] s where parsed information is stored + * @param[in] buffer pointer to start of 34-byte streaminfo data + * + * @return negative error code on faiure or >= 0 on success + */ +int ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, + const uint8_t *buffer); + +/** + * Validate the FLAC extradata. + * @param[in] avctx codec context containing the extradata. + * @param[out] format extradata format. + * @param[out] streaminfo_start pointer to start of 34-byte STREAMINFO data. + * @return 1 if valid, 0 if not valid. + */ +int ff_flac_is_extradata_valid(AVCodecContext *avctx, + enum FLACExtradataFormat *format, + uint8_t **streaminfo_start); + +/** + * Calculate an estimate for the maximum frame size based on verbatim mode. + * @param blocksize block size, in samples + * @param ch number of channels + * @param bps bits-per-sample + */ +int ff_flac_get_max_frame_size(int blocksize, int ch, int bps); + +/** + * Validate and decode a frame header. + * @param avctx AVCodecContext to use as av_log() context + * @param gb GetBitContext from which to read frame header + * @param[out] fi frame information + * @param log_level_offset log level offset. can be used to silence error messages. + * @return non-zero on error, 0 if ok + */ +int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, + FLACFrameInfo *fi, int log_level_offset); + +void ff_flac_set_channel_layout(AVCodecContext *avctx); + +/** + * Parse the metadata block parameters from the header. + * @param[in] block_header header data, at least 4 bytes + * @param[out] last indicator for last metadata block + * @param[out] type metadata block type + * @param[out] size metadata block size + */ +static av_always_inline void flac_parse_block_header(const uint8_t *block_header, + int *last, int *type, int *size) +{ + int tmp = bytestream_get_byte(&block_header); + if (last) + *last = tmp & 0x80; + if (type) + *type = tmp & 0x7F; + if (size) + *size = bytestream_get_be24(&block_header); +} + +#endif /* AVCODEC_FLAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdata.h new file mode 100644 index 00000000..e2c1e5d7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdata.h @@ -0,0 +1,31 @@ +/* + * FLAC data header + * Copyright (c) 2003 Alex Beregszaszi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FLACDATA_H +#define AVCODEC_FLACDATA_H + +#include "internal.h" + +extern const int ff_flac_sample_rate_table[16]; + +extern const int32_t ff_flac_blocksize_table[16]; + +#endif /* AVCODEC_FLACDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdsp.h new file mode 100644 index 00000000..7bb0dd0e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flacdsp.h @@ -0,0 +1,43 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FLACDSP_H +#define AVCODEC_FLACDSP_H + +#include +#include "libavutil/internal.h" +#include "libavutil/samplefmt.h" + +typedef struct FLACDSPContext { + void (*decorrelate[4])(uint8_t **out, int32_t **in, int channels, + int len, int shift); + void (*lpc16)(int32_t *samples, const int coeffs[32], int order, + int qlevel, int len); + void (*lpc32)(int32_t *samples, const int coeffs[32], int order, + int qlevel, int len); + void (*lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order, + const int32_t coefs[32], int shift); + void (*lpc32_encode)(int32_t *res, const int32_t *smp, int len, int order, + const int32_t coefs[32], int shift); +} FLACDSPContext; + +void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_arm(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); +void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps); + +#endif /* AVCODEC_FLACDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flv.h new file mode 100644 index 00000000..561cfe0b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/flv.h @@ -0,0 +1,34 @@ +/* + * FLV specific private header. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FLV_H +#define AVCODEC_FLV_H + +#include "get_bits.h" +#include "mpegvideo.h" +#include "put_bits.h" + +void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_flv2_encode_ac_esc(PutBitContext *pb, int slevel, int level, int run, + int last); + +int ff_flv_decode_picture_header(MpegEncContext *s); + +#endif /* AVCODEC_FLV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fmtconvert.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fmtconvert.h new file mode 100644 index 00000000..a1b17e4f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/fmtconvert.h @@ -0,0 +1,77 @@ +/* + * Format Conversion Utils + * Copyright (c) 2000, 2001 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FMTCONVERT_H +#define AVCODEC_FMTCONVERT_H + +#include "avcodec.h" + +typedef struct FmtConvertContext { + /** + * Convert an array of int32_t to float and multiply by a float value. + * @param dst destination array of float. + * constraints: 16-byte aligned + * @param src source array of int32_t. + * constraints: 16-byte aligned + * @param len number of elements to convert. + * constraints: multiple of 8 + */ + void (*int32_to_float_fmul_scalar)(float *dst, const int32_t *src, + float mul, int len); + /** + * Convert an array of int32_t to float. + * @param dst destination array of float. + * constraints: 32-byte aligned + * @param src source array of int32_t. + * constraints: 32-byte aligned + * @param len number of elements to convert. + * constraints: multiple of 8 + */ + void (*int32_to_float)(float *dst, const int32_t *src, intptr_t len); + + /** + * Convert an array of int32_t to float and multiply by a float value from another array, + * stepping along the float array once for each 8 integers. + * @param c pointer to FmtConvertContext. + * @param dst destination array of float. + * constraints: 16-byte aligned + * @param src source array of int32_t. + * constraints: 16-byte aligned + * @param mul source array of float multipliers. + * @param len number of elements to convert. + * constraints: multiple of 8 + */ + void (*int32_to_float_fmul_array8)(struct FmtConvertContext *c, + float *dst, const int32_t *src, + const float *mul, int len); + +} FmtConvertContext; + +void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx); + +void ff_fmt_convert_init_aarch64(FmtConvertContext *c, AVCodecContext *avctx); +void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx); +void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx); +void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx); +void ff_fmt_convert_init_mips(FmtConvertContext *c); + +#endif /* AVCODEC_FMTCONVERT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/frame_thread_encoder.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/frame_thread_encoder.h new file mode 100644 index 00000000..1f79553f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/frame_thread_encoder.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_FRAME_THREAD_ENCODER_H +#define AVCODEC_FRAME_THREAD_ENCODER_H + +#include "avcodec.h" + +int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options); +void ff_frame_thread_encoder_free(AVCodecContext *avctx); +int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet_ptr); + +#endif /* AVCODEC_FRAME_THREAD_ENCODER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722.h new file mode 100644 index 00000000..25676a32 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) CMU 1993 Computer Science, Speech Group + * Chengxiang Lu and Alex Hauptmann + * Copyright (c) 2005 Steve Underwood + * Copyright (c) 2009 Kenan Gillet + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_G722_H +#define AVCODEC_G722_H + +#include +#include "avcodec.h" +#include "g722dsp.h" + +#define PREV_SAMPLES_BUF_SIZE 1024 + +typedef struct G722Context { + const AVClass *class; + int bits_per_codeword; + int16_t prev_samples[PREV_SAMPLES_BUF_SIZE]; ///< memory of past decoded samples + int prev_samples_pos; ///< the number of values in prev_samples + + /** + * The band[0] and band[1] correspond respectively to the lower band and higher band. + */ + struct G722Band { + int16_t s_predictor; ///< predictor output value + int32_t s_zero; ///< previous output signal from zero predictor + int8_t part_reconst_mem[2]; ///< signs of previous partially reconstructed signals + int16_t prev_qtzd_reconst; ///< previous quantized reconstructed signal (internal value, using low_inv_quant4) + int16_t pole_mem[2]; ///< second-order pole section coefficient buffer + int32_t diff_mem[6]; ///< quantizer difference signal memory + int16_t zero_mem[6]; ///< Seventh-order zero section coefficient buffer + int16_t log_factor; ///< delayed 2-logarithmic quantizer factor + int16_t scale_factor; ///< delayed quantizer scale factor + } band[2]; + + struct TrellisNode { + struct G722Band state; + uint32_t ssd; + int path; + } *node_buf[2], **nodep_buf[2]; + + struct TrellisPath { + int value; + int prev; + } *paths[2]; + + G722DSPContext dsp; +} G722Context; + +extern const int16_t ff_g722_high_inv_quant[4]; +extern const int16_t ff_g722_low_inv_quant4[16]; +extern const int16_t ff_g722_low_inv_quant6[64]; + +void ff_g722_update_low_predictor(struct G722Band *band, const int ilow); + +void ff_g722_update_high_predictor(struct G722Band *band, const int dhigh, + const int ihigh); + +#endif /* AVCODEC_G722_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722dsp.h new file mode 100644 index 00000000..c956a1e1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g722dsp.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015 Peter Meerwald + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_G722DSP_H +#define AVCODEC_G722DSP_H + +#include + +typedef struct G722DSPContext { + void (*apply_qmf)(const int16_t *prev_samples, int xout[2]); +} G722DSPContext; + +void ff_g722dsp_init(G722DSPContext *c); +void ff_g722dsp_init_arm(G722DSPContext *c); +void ff_g722dsp_init_x86(G722DSPContext *c); + +#endif /* AVCODEC_G722DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g723_1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g723_1.h new file mode 100644 index 00000000..d60d481e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g723_1.h @@ -0,0 +1,1444 @@ +/* + * G.723.1 common header and data tables + * Copyright (c) 2006 Benjamin Larsson + * Copyright (c) 2010 Mohamed Naufal Basheer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * G.723.1 types, functions and data tables + */ + +#ifndef AVCODEC_G723_1_H +#define AVCODEC_G723_1_H + +#include + +#include "libavutil/log.h" + +#define SUBFRAMES 4 +#define SUBFRAME_LEN 60 +#define FRAME_LEN (SUBFRAME_LEN << 2) +#define HALF_FRAME_LEN (FRAME_LEN / 2) +#define LPC_FRAME (HALF_FRAME_LEN + SUBFRAME_LEN) +#define LPC_ORDER 10 +#define LSP_BANDS 3 +#define LSP_CB_SIZE 256 +#define PITCH_MIN 18 +#define PITCH_MAX (PITCH_MIN + 127) +#define PITCH_ORDER 5 +#define GRID_SIZE 2 +#define PULSE_MAX 6 +#define GAIN_LEVELS 24 +#define COS_TBL_SIZE 512 + +/** + * Bitexact implementation of 2ab scaled by 1/2^16. + * + * @param a 32 bit multiplicand + * @param b 16 bit multiplier + */ +#define MULL2(a, b) \ + ((((a) >> 16) * (b) * 2) + (((a) & 0xffff) * (b) >> 15)) + +/** + * G723.1 frame types + */ +enum FrameType { + ACTIVE_FRAME, ///< Active speech + SID_FRAME, ///< Silence Insertion Descriptor frame + UNTRANSMITTED_FRAME +}; + +/** + * G723.1 rate values + */ +enum Rate { + RATE_6300, + RATE_5300 +}; + +/** + * G723.1 unpacked data subframe + */ +typedef struct G723_1_Subframe { + int ad_cb_lag; ///< adaptive codebook lag + int ad_cb_gain; + int dirac_train; + int pulse_sign; + int grid_index; + int amp_index; + int pulse_pos; +} G723_1_Subframe; + +/** + * Pitch postfilter parameters + */ +typedef struct PPFParam { + int index; ///< postfilter backward/forward lag + int16_t opt_gain; ///< optimal gain + int16_t sc_gain; ///< scaling gain +} PPFParam; + +/** + * Harmonic filter parameters + */ +typedef struct HFParam { + int index; + int gain; +} HFParam; + +/** + * Optimized fixed codebook excitation parameters + */ +typedef struct FCBParam { + int min_err; + int amp_index; + int grid_index; + int dirac_train; + int pulse_pos[PULSE_MAX]; + int pulse_sign[PULSE_MAX]; +} FCBParam; + +typedef struct G723_1_ChannelContext { + G723_1_Subframe subframe[4]; + enum FrameType cur_frame_type; + enum FrameType past_frame_type; + enum Rate cur_rate; + uint8_t lsp_index[LSP_BANDS]; + int pitch_lag[2]; + int erased_frames; + + int16_t prev_lsp[LPC_ORDER]; + int16_t sid_lsp[LPC_ORDER]; + int16_t prev_excitation[PITCH_MAX]; + int16_t excitation[PITCH_MAX + FRAME_LEN + 4]; + int16_t synth_mem[LPC_ORDER]; + int16_t fir_mem[LPC_ORDER]; + int iir_mem[LPC_ORDER]; + + int random_seed; + int cng_random_seed; + int interp_index; + int interp_gain; + int sid_gain; + int cur_gain; + int reflection_coef; + int pf_gain; ///< formant postfilter + ///< gain scaling unit memory + int16_t audio[FRAME_LEN + LPC_ORDER + PITCH_MAX + 4]; + + /* encoder */ + int16_t prev_data[HALF_FRAME_LEN]; + int16_t prev_weight_sig[PITCH_MAX]; + + int16_t hpf_fir_mem; ///< highpass filter fir + int hpf_iir_mem; ///< and iir memories + int16_t perf_fir_mem[LPC_ORDER]; ///< perceptual filter fir + int16_t perf_iir_mem[LPC_ORDER]; ///< and iir memories + + int16_t harmonic_mem[PITCH_MAX]; +} G723_1_ChannelContext; + +typedef struct G723_1_Context { + AVClass *class; + int postfilter; + + G723_1_ChannelContext ch[2]; +} G723_1_Context; + + +/** + * Scale vector contents based on the largest of their absolutes. + */ +int ff_g723_1_scale_vector(int16_t *dst, const int16_t *vector, int length); + +/** + * Calculate the number of left-shifts required for normalizing the input. + * + * @param num input number + * @param width width of the input, 16 bits(0) / 32 bits(1) + */ +int ff_g723_1_normalize_bits(int num, int width); + +int ff_g723_1_dot_product(const int16_t *a, const int16_t *b, int length); + +/** + * Get delayed contribution from the previous excitation vector. + */ +void ff_g723_1_get_residual(int16_t *residual, int16_t *prev_excitation, + int lag); + +/** + * Generate a train of dirac functions with period as pitch lag. + */ +void ff_g723_1_gen_dirac_train(int16_t *buf, int pitch_lag); + + +/** + * Generate adaptive codebook excitation. + */ +void ff_g723_1_gen_acb_excitation(int16_t *vector, int16_t *prev_excitation, + int pitch_lag, G723_1_Subframe *subfrm, + enum Rate cur_rate); +/** + * Quantize LSP frequencies by interpolation and convert them to + * the corresponding LPC coefficients. + * + * @param lpc buffer for LPC coefficients + * @param cur_lsp the current LSP vector + * @param prev_lsp the previous LSP vector + */ +void ff_g723_1_lsp_interpolate(int16_t *lpc, int16_t *cur_lsp, + int16_t *prev_lsp); + +/** + * Perform inverse quantization of LSP frequencies. + * + * @param cur_lsp the current LSP vector + * @param prev_lsp the previous LSP vector + * @param lsp_index VQ indices + * @param bad_frame bad frame flag + */ +void ff_g723_1_inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp, + uint8_t *lsp_index, int bad_frame); + +static const uint8_t frame_size[4] = { 24, 20, 4, 1 }; + +/** + * Postfilter gain weighting factors scaled by 2^15 + */ +static const int16_t ppf_gain_weight[2] = {0x1800, 0x2000}; + +/** + * LSP DC component + */ +static const int16_t dc_lsp[LPC_ORDER] = { + 0x0c3b, + 0x1271, + 0x1e0a, + 0x2a36, + 0x3630, + 0x406f, + 0x4d28, + 0x56f4, + 0x638c, + 0x6c46 +}; + +/* Cosine table scaled by 2^14 */ +static const int16_t cos_tab[COS_TBL_SIZE + 1] = { + 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324, + 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107, + 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736, + 15679, 15619, 15557, 15493, 15426, 15357, 15286, 15213, + 15137, 15059, 14978, 14896, 14811, 14724, 14635, 14543, + 14449, 14354, 14256, 14155, 14053, 13949, 13842, 13733, + 13623, 13510, 13395, 13279, 13160, 13039, 12916, 12792, + 12665, 12537, 12406, 12274, 12140, 12004, 11866, 11727, + 11585, 11442, 11297, 11151, 11003, 10853, 10702, 10549, + 10394, 10238, 10080, 9921, 9760, 9598, 9434, 9269, + 9102, 8935, 8765, 8595, 8423, 8250, 8076, 7900, + 7723, 7545, 7366, 7186, 7005, 6823, 6639, 6455, + 6270, 6084, 5897, 5708, 5520, 5330, 5139, 4948, + 4756, 4563, 4370, 4176, 3981, 3786, 3590, 3393, + 3196, 2999, 2801, 2603, 2404, 2205, 2006, 1806, + 1606, 1406, 1205, 1005, 804, 603, 402, 201, + 0, -201, -402, -603, -804, -1005, -1205, -1406, + -1606, -1806, -2006, -2205, -2404, -2603, -2801, -2999, + -3196, -3393, -3590, -3786, -3981, -4176, -4370, -4563, + -4756, -4948, -5139, -5330, -5520, -5708, -5897, -6084, + -6270, -6455, -6639, -6823, -7005, -7186, -7366, -7545, + -7723, -7900, -8076, -8250, -8423, -8595, -8765, -8935, + -9102, -9269, -9434, -9598, -9760, -9921, -10080, -10238, + -10394, -10549, -10702, -10853, -11003, -11151, -11297, -11442, + -11585, -11727, -11866, -12004, -12140, -12274, -12406, -12537, + -12665, -12792, -12916, -13039, -13160, -13279, -13395, -13510, + -13623, -13733, -13842, -13949, -14053, -14155, -14256, -14354, + -14449, -14543, -14635, -14724, -14811, -14896, -14978, -15059, + -15137, -15213, -15286, -15357, -15426, -15493, -15557, -15619, + -15679, -15736, -15791, -15843, -15893, -15941, -15986, -16029, + -16069, -16107, -16143, -16176, -16207, -16235, -16261, -16284, + -16305, -16324, -16340, -16353, -16364, -16373, -16379, -16383, + -16384, -16383, -16379, -16373, -16364, -16353, -16340, -16324, + -16305, -16284, -16261, -16235, -16207, -16176, -16143, -16107, + -16069, -16029, -15986, -15941, -15893, -15843, -15791, -15736, + -15679, -15619, -15557, -15493, -15426, -15357, -15286, -15213, + -15137, -15059, -14978, -14896, -14811, -14724, -14635, -14543, + -14449, -14354, -14256, -14155, -14053, -13949, -13842, -13733, + -13623, -13510, -13395, -13279, -13160, -13039, -12916, -12792, + -12665, -12537, -12406, -12274, -12140, -12004, -11866, -11727, + -11585, -11442, -11297, -11151, -11003, -10853, -10702, -10549, + -10394, -10238, -10080, -9921, -9760, -9598, -9434, -9269, + -9102, -8935, -8765, -8595, -8423, -8250, -8076, -7900, + -7723, -7545, -7366, -7186, -7005, -6823, -6639, -6455, + -6270, -6084, -5897, -5708, -5520, -5330, -5139, -4948, + -4756, -4563, -4370, -4176, -3981, -3786, -3590, -3393, + -3196, -2999, -2801, -2603, -2404, -2205, -2006, -1806, + -1606, -1406, -1205, -1005, -804, -603, -402, -201, + 0, 201, 402, 603, 804, 1005, 1205, 1406, + 1606, 1806, 2006, 2205, 2404, 2603, 2801, 2999, + 3196, 3393, 3590, 3786, 3981, 4176, 4370, 4563, + 4756, 4948, 5139, 5330, 5520, 5708, 5897, 6084, + 6270, 6455, 6639, 6823, 7005, 7186, 7366, 7545, + 7723, 7900, 8076, 8250, 8423, 8595, 8765, 8935, + 9102, 9269, 9434, 9598, 9760, 9921, 10080, 10238, + 10394, 10549, 10702, 10853, 11003, 11151, 11297, 11442, + 11585, 11727, 11866, 12004, 12140, 12274, 12406, 12537, + 12665, 12792, 12916, 13039, 13160, 13279, 13395, 13510, + 13623, 13733, 13842, 13949, 14053, 14155, 14256, 14354, + 14449, 14543, 14635, 14724, 14811, 14896, 14978, 15059, + 15137, 15213, 15286, 15357, 15426, 15493, 15557, 15619, + 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029, + 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284, + 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383, + 16384 +}; + +/** + * LSP VQ tables + */ +static const int16_t lsp_band0[LSP_CB_SIZE][3] = { + { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382}, + { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454}, + { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300}, + { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471}, + { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160}, + { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415}, + { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972}, + { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955}, + { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954}, + { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258}, + { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801}, + { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909}, + { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11}, + { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388}, + { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178}, + { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95}, + { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516}, + { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676}, + { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543}, + {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823}, + {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57}, + { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536}, + {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904}, + {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217}, + { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443}, + { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449}, + { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649}, + { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525}, + { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357}, + { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079}, + { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299}, + { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746}, + { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250}, + { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427}, + { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166}, + { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960}, + { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855}, + { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847}, + { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671}, + { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292}, + { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393}, + { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325}, + { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292}, + { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243}, + { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646}, + { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477}, + { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99}, + { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279}, + { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428}, + { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222}, + { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817}, + { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858}, + { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053}, + { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39}, + { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155}, + { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182}, + { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713}, + { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136}, + { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035}, + { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136}, + { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446}, + {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144}, + { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374}, + {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158}, + {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756}, + { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344}, + { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252}, + { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381}, + { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806}, + { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406}, + { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002}, + { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616}, + { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283}, + { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169}, + { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209}, + { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141}, + { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505}, + { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867}, + { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011}, + { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337}, + { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010}, + { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780}, + { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704}, + { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568}, + { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922}, + { 1693, 4793, 6012} +}; + +static const int16_t lsp_band1[LSP_CB_SIZE][3] = { + { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368}, + {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449}, + {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84}, + { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390}, + { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411}, + {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311}, + { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280}, + {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408}, + {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843}, + {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744}, + {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861}, + { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532}, + { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060}, + { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430}, + { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666}, + { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009}, + { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815}, + { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116}, + { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954}, + { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102}, + { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649}, + {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435}, + { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057}, + { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262}, + { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853}, + { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024}, + { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186}, + {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825}, + {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564}, + {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874}, + { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324}, + {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634}, + { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159}, + { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358}, + { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383}, + { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415}, + { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187}, + { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612}, + { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779}, + { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871}, + { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571}, + { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097}, + { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444}, + { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226}, + { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196}, + { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508}, + { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232}, + { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279}, + { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240}, + { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060}, + { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421}, + { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110}, + { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232}, + { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992}, + { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037}, + { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959}, + {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269}, + { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96}, + {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784}, + {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316}, + {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000}, + { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756}, + {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673}, + {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393}, + {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624}, + {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186}, + {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887}, + {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337}, + {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545}, + { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462}, + { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978}, + { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863}, + { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384}, + { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955}, + { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428}, + { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488}, + { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233}, + { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866}, + { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338}, + { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585}, + { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816}, + { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318}, + { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682}, + { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069}, + { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664}, + { 4035, 5334, 4912} +}; + +static const int16_t lsp_band2[LSP_CB_SIZE][4] = { + { 0, 0, 0, 0}, { 601, 512, -542, 334}, + { 428, 1087, -484, -132}, { 652, 622, -391, -572}, + { 378, 799, 141, -860}, { 1040, 409, 112, -554}, + { 1123, 670, -75, -847}, { 1421, 494, -315, -1095}, + { 787, 1001, 114, -460}, { 988, 1672, 216, -681}, + { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5}, + { 1262, 193, -694, -129}, { 325, 196, 51, -641}, + { 861, -59, 350, -458}, { 1261, 567, 586, -346}, + { 1532, 885, 210, -517}, { 2027, 937, 113, -792}, + { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133}, + { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373}, + { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138}, + { 3581, 2360, 649, -414}, { 219, 176, -398, -309}, + { 434, -78, -435, -880}, { -344, 301, 265, -552}, + { -915, 470, 657, -380}, { 419, -432, -163, -453}, + { 351, -953, 8, -562}, { 789, -43, 20, -958}, + { 302, -594, -352, -1159}, { 1040, 108, -668, -924}, + { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140}, + { 1003, 824, -802, -1184}, { 745, 58, -589, -1443}, + { 346, 247, -915, -1683}, { 270, 796, -720, -2043}, + { 1208, 722, -222, -193}, { 1486, 1180, -412, -672}, + { 1722, 179, -69, -521}, { 2047, 860, -666, -1410}, + { -146, 222, -281, -805}, { -189, 90, -114, -1307}, + { -152, 1086, -241, -764}, { -439, 733, -601, -1302}, + { -833, -167, -351, -601}, { -856, -422, -411, -1059}, + { -747, -355, -582, -1644}, { -837, 210, -916, -1144}, + {-1800, 32, -878, -1687}, { -48, -23, -1146, 52}, + { -350, -409, -1656, -364}, { 265, -728, -858, -577}, + { 458, -247, -1141, -997}, { 691, -407, -1988, -1161}, + { -66, -104, -705, -1249}, { -431, -93, -1191, -1844}, + { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819}, + { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540}, + { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533}, + { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523}, + { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131}, + { -40, -911, -2106, -441}, { -471, -484, -2267, -1549}, + { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342}, + {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72}, + {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637}, + {-3907, -4138, -865, 803}, {-1287, -845, -375, -548}, + {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418}, + {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128}, + {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185}, + {-1616, -915, -2205, -549}, { 19, -821, -1145, 352}, + { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911}, + { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451}, + { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885}, + {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573}, + {-3460, -2141, 49, -113}, {-2231, -448, 675, -146}, + {-2805, -532, 1231, 479}, {-2684, -486, -200, 611}, + {-3525, -971, -198, 704}, {-3707, 173, 349, 254}, + {-4734, -1447, -34, 880}, { 777, -512, 114, -10}, + { 1250, -66, 442, -5}, { 604, 613, 452, -352}, + { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238}, + {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060}, + {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105}, + {-3190, -899, -1817, -194}, { -156, -886, 394, -318}, + { -258, -1283, 551, 202}, { -536, -1729, 910, 331}, + { -847, -1109, 795, -163}, {-1171, -1128, 715, 519}, + {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211}, + {-1487, -2148, 831, 174}, {-1139, -374, 414, -4}, + {-1517, -1383, 396, -352}, {-1012, 439, -59, -967}, + {-1812, 706, -440, -1030}, {-1971, -329, -34, -827}, + {-2472, -1588, -151, -606}, {-2161, 374, -281, 76}, + {-3012, 231, -15, -690}, { 1104, 566, 721, 209}, + { 1685, 564, 383, 98}, { 1898, 750, 792, -97}, + { 556, -64, 561, -93}, { 876, 162, 913, -22}, + { 961, 675, 1296, 140}, { 756, -396, 851, 544}, + { 360, -303, 1341, 396}, { 878, -22, 1464, 863}, + { -309, -273, 642, -129}, { -686, -82, 842, 454}, + { -5, -47, 1069, 998}, { -94, 967, 1277, 298}, + { -489, 385, 1473, 746}, { -369, -717, 1333, 242}, + { 281, -993, 1726, 924}, { 464, 601, 1575, 1376}, + { -250, 206, 2339, 1175}, { -438, 377, -597, -285}, + {-1020, 787, -790, -287}, { -458, -410, 215, 295}, + { -589, -860, -121, 797}, {-1175, 122, -437, 466}, + {-1480, -121, 367, 924}, { 234, 323, 770, -555}, + { 145, 30, 996, 26}, { 66, 849, 93, -145}, + { -117, 1261, 474, -399}, {-1495, 1051, 218, -506}, + {-1390, 694, 994, 88}, { 616, 7, 78, 304}, + { 1060, 52, -62, 835}, { 833, 454, 649, 1359}, + { -770, 464, 47, 93}, { -574, 1199, -39, 379}, + { 114, -98, 488, 485}, { 727, 244, 606, 696}, + { -76, 455, 671, 546}, { -565, -13, 145, 819}, + { -376, 569, 448, 1128}, { 218, 122, 265, 1167}, + { 230, 738, 932, 1003}, { 138, 477, 36, 450}, + { 404, 787, -73, 1000}, { 497, 1259, 387, 1231}, + { 17, 207, 195, -79}, { 562, 358, 53, -158}, + { 493, 387, 478, 189}, { 678, 831, 640, 558}, + { -197, 523, 613, 57}, { 429, 894, 769, 111}, + { 67, 1174, 568, 511}, { 1242, 824, 251, 840}, + { 1419, 1074, 864, 481}, { 924, 1474, 669, 724}, + { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541}, + { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668}, + { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798}, + { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391}, + { 726, 872, 1812, 601}, { 1469, 280, 1008, 616}, + { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072}, + { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189}, + { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106}, + { 290, -339, 428, -444}, { -68, -783, 735, 772}, + { 245, -555, 468, 47}, { 334, -895, 814, 146}, + { 235, 368, -964, -959}, { -203, 315, -1566, -1217}, + { 801, 17, -276, -354}, { 894, -495, -789, -635}, + { 716, 291, -1189, -357}, { 560, -260, -733, -2}, + { 679, -508, -1429, 211}, { -51, -62, -428, 557}, + { 322, -638, -211, 614}, { -878, -1057, -84, -71}, + { -388, -1415, -167, -318}, { -754, -1574, 214, -539}, + {-1419, -2004, -92, -787}, { -47, -856, -347, -255}, + { 23, -1211, -173, 320}, { -658, -487, -893, 353}, + { -783, -1587, -584, 507}, {-1420, -859, -378, 441}, + {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12}, + { -359, -2113, -553, -8}, { -831, -1918, -1561, 32}, + {-1014, -2487, -1359, -939}, { -475, -311, -169, -236}, + { -907, -426, 276, -611}, { -96, -400, 50, -710}, + { -426, -1022, -10, -985}, { -197, -258, -744, -575}, + { -611, -930, -771, -394}, { -267, -776, -612, -939}, + { -256, -1346, -802, -1122}, { -796, -1570, -825, -754}, + { 712, 876, 141, 227}, { 981, 1509, 85, 124}, + { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440}, + { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356}, + { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134}, + { 509, 1809, 781, -123}, { 1712, 1506, 559, -423}, + { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331}, + { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183}, + { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659}, + { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996}, + { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318}, +}; + +/** + * Used for the coding/decoding of the pulses positions + * for the MP-MLQ codebook + */ +static const int32_t combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] = { + {118755, 98280, 80730, 65780, 53130, + 42504, 33649, 26334, 20349, 15504, + 11628, 8568, 6188, 4368, 3003, + 2002, 1287, 792, 462, 252, + 126, 56, 21, 6, 1, + 0, 0, 0, 0, 0}, + + { 23751, 20475, 17550, 14950, 12650, + 10626, 8855, 7315, 5985, 4845, + 3876, 3060, 2380, 1820, 1365, + 1001, 715, 495, 330, 210, + 126, 70, 35, 15, 5, + 1, 0, 0, 0, 0}, + + { 3654, 3276, 2925, 2600, 2300, + 2024, 1771, 1540, 1330, 1140, + 969, 816, 680, 560, 455, + 364, 286, 220, 165, 120, + 84, 56, 35, 20, 10, + 4, 1, 0, 0, 0}, + + { 406, 378, 351, 325, 300, + 276, 253, 231, 210, 190, + 171, 153, 136, 120, 105, + 91, 78, 66, 55, 45, + 36, 28, 21, 15, 10, + 6, 3, 1, 0, 0}, + + { 29, 28, 27, 26, 25, + 24, 23, 22, 21, 20, + 19, 18, 17, 16, 15, + 14, 13, 12, 11, 10, + 9, 8, 7, 6, 5, + 4, 3, 2, 1, 0}, + + { 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1}, +}; + +static const int16_t pitch_contrib[340] = { + 60, 0, 0, 2489, 60, 0, 0, 5217, + 1, 6171, 0, 3953, 0, 10364, 1, 9357, + -1, 8843, 1, 9396, 0, 5794, -1, 10816, + 2, 11606, -2, 12072, 0, 8616, 1, 12170, + 0, 14440, 0, 7787, -1, 13721, 0, 18205, + 0, 14471, 0, 15807, 1, 15275, 0, 13480, + -1, 18375, -1, 0, 1, 11194, -1, 13010, + 1, 18836, -2, 20354, 1, 16233, -1, 0, + 60, 0, 0, 12130, 0, 13385, 1, 17834, + 1, 20875, 0, 21996, 1, 0, 1, 18277, + -1, 21321, 1, 13738, -1, 19094, -1, 20387, + -1, 0, 0, 21008, 60, 0, -2, 22807, + 0, 15900, 1, 0, 0, 17989, -1, 22259, + 1, 24395, 1, 23138, 0, 23948, 1, 22997, + 2, 22604, -1, 25942, 0, 26246, 1, 25321, + 0, 26423, 0, 24061, 0, 27247, 60, 0, + -1, 25572, 1, 23918, 1, 25930, 2, 26408, + -1, 19049, 1, 27357, -1, 24538, 60, 0, + -1, 25093, 0, 28549, 1, 0, 0, 22793, + -1, 25659, 0, 29377, 0, 30276, 0, 26198, + 1, 22521, -1, 28919, 0, 27384, 1, 30162, + -1, 0, 0, 24237, -1, 30062, 0, 21763, + 1, 30917, 60, 0, 0, 31284, 0, 29433, + 1, 26821, 1, 28655, 0, 31327, 2, 30799, + 1, 31389, 0, 32322, 1, 31760, -2, 31830, + 0, 26936, -1, 31180, 1, 30875, 0, 27873, + -1, 30429, 1, 31050, 0, 0, 0, 31912, + 1, 31611, 0, 31565, 0, 25557, 0, 31357, + 60, 0, 1, 29536, 1, 28985, -1, 26984, + -1, 31587, 2, 30836, -2, 31133, 0, 30243, + -1, 30742, -1, 32090, 60, 0, 2, 30902, + 60, 0, 0, 30027, 0, 29042, 60, 0, + 0, 31756, 0, 24553, 0, 25636, -2, 30501, + 60, 0, -1, 29617, 0, 30649, 60, 0, + 0, 29274, 2, 30415, 0, 27480, 0, 31213, + -1, 28147, 0, 30600, 1, 31652, 2, 29068, + 60, 0, 1, 28571, 1, 28730, 1, 31422, + 0, 28257, 0, 24797, 60, 0, 0, 0, + 60, 0, 0, 22105, 0, 27852, 60, 0, + 60, 0, -1, 24214, 0, 24642, 0, 23305, + 60, 0, 60, 0, 1, 22883, 0, 21601, + 60, 0, 2, 25650, 60, 0, -2, 31253, + -2, 25144, 0, 17998 +}; + +/** + * Number of non-zero pulses in the MP-MLQ excitation + */ +static const int8_t pulses[4] = {6, 5, 6, 5}; + +/** + * Size of the MP-MLQ fixed excitation codebooks + */ +static const int32_t max_pos[4] = {593775, 142506, 593775, 142506}; + +static const int16_t fixed_cb_gain[GAIN_LEVELS] = { + 1, 2, 3, 4, 6, 9, 13, 18, + 26, 38, 55, 80, 115, 166, 240, 348, + 502, 726, 1050, 1517, 2193, 3170, 4582, 6623, +}; + +static const int16_t adaptive_cb_gain85[85 * 20] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 800, 1496, 167, -256, + -338, -39, -136, -1, -4, -6, -73, -8, + -15, 12, 23, 2, 16, 30, 3, -5, + -462, -686, 493, 2575, 311, -13, -28, -14, + -404, -5, -19, 13, 20, 72, 107, -77, + 8, 13, -9, -48, 1483, 144, 784, 928, + 1243, -134, -1, -37, -52, -94, -13, -71, + -6, -84, -8, -44, -112, -10, -59, -70, + -77, 275, 3522, 1056, -1254, 0, -4, -757, + -68, -95, 1, 16, -59, 4, -17, -227, + -5, 21, 269, 80, -125, -40, -264, 381, + 5027, 0, 0, -4, -8, -1542, 0, -2, + 0, 2, 0, 6, 38, 12, 81, -117, + 138, 332, 2215, 2574, 1339, -1, -6, -299, + -404, -109, -2, -18, -44, -21, -52, -348, + -11, -27, -181, -210, 3685, 2883, -887, 866, + -1639, -828, -507, -48, -45, -164, -648, 199, + 156, -194, -152, 46, 368, 288, -88, 86, + 1396, 2146, 2235, 345, 942, -118, -281, -305, + -7, -54, -182, -190, -292, -29, -45, -47, + -80, -123, -128, -19, 13, 4475, 3549, -804, + -655, 0, -1222, -768, -39, -26, -3, -2, + -969, 0, 219, 174, 0, 179, 141, -32, + -724, 254, 242, 6049, 2462, -32, -3, -3, + -2233, -370, 11, 10, -3, 267, -94, -89, + 108, -38, -36, -909, 626, -1713, 6121, 4561, + -1061, -23, -179, -2287, -1270, -68, 65, -233, + 640, -174, 477, -1704, 40, -111, 396, 295, + -350, 1391, 7985, 511, -405, -7, -118, -3892, + -15, -10, 29, 170, -678, 10, -43, -249, + -8, 34, 197, 12, 3144, -529, 608, 2530, + 3878, -603, -17, -22, -390, -918, 101, -116, + 19, -485, 81, -93, -744, 125, -144, -599, + 2589, -689, 3045, 5603, -404, -409, -29, -566, + -1916, -10, 108, -481, 128, -885, 235, -1041, + 63, -17, 75, 138, 3107, 513, 1374, -3594, + -4922, -589, -16, -115, -788, -1478, -97, -260, + -43, 681, 112, 301, 933, 154, 413, -1079, + 2468, 6010, 1107, -390, 1961, -372, -2204, -74, + -9, -234, -905, -166, -406, 58, 143, 26, + -295, -719, -132, 46, 4773, 2766, 2368, 4862, + -4044, -1390, -467, -342, -1443, -998, -806, -690, + -399, -1416, -821, -702, 1178, 682, 584, 1200, + 1665, -1879, 1443, 1701, 8562, -169, -215, -127, + -176, -4475, 190, -146, 165, -172, 195, -149, + -870, 982, -754, -889, 2716, 9011, -1007, 755, + -1785, -450, -4956, -61, -34, -194, -1493, 167, + 554, -125, -415, 46, 296, 982, -109, 82, + -2727, 7548, 1285, 938, 3420, -453, -3478, -100, + -53, -714, 1256, 213, -592, 156, -432, -73, + 569, -1576, -268, -196, 3677, 882, 4050, 1202, + 2323, -825, -47, -1001, -88, -329, -198, -909, + -218, -269, -64, -297, -521, -125, -574, -170, + 2046, -753, 122, 10102, 603, -255, -34, 0, + -6229, -22, 94, -15, 5, -1261, 464, -75, + -75, 27, -4, -372, 449, -1815, 10690, 3870, + -527, -12, -201, -6976, -914, -16, 49, -293, + 1184, -106, 428, -2525, 14, -58, 344, 124, + -941, 2352, 5049, 3650, 2637, -54, -337, -1556, + -813, -424, 135, 290, -725, 209, -524, -1125, + 151, -378, -812, -587, -1879, 796, 3117, 9569, + -404, -215, -38, -593, -5589, -9, 91, 357, + -151, 1097, -464, -1821, -46, 19, 76, 236, + -1715, 2043, -2096, 9946, 4001, -179, -254, -268, + -6038, -977, 213, -219, 261, 1041, -1240, 1272, + 418, -498, 511, -2429, -5772, -618, -3921, 284, + -3155, -2033, -23, -938, -4, -607, -218, -1381, + -148, 100, 10, 68, -1111, -119, -755, 54, + 382, 4748, 8003, -2064, 2198, -8, -1376, -3909, + -260, -294, -110, -186, -2319, 48, 598, 1008, + -51, -637, -1073, 277, -867, 3015, 11926, -1675, + 947, -45, -555, -8681, -171, -54, 159, 631, + -2195, -88, 308, 1219, 50, -174, -690, 96, + -4933, -432, 6757, 3771, 1352, -1485, -11, -2786, + -867, -111, -130, 2034, 178, 1135, 99, -1555, + 407, 35, -557, -311, 152, 9726, 4231, -1928, + 1490, -1, -5774, -1092, -226, -135, -90, -39, + -2511, 17, 1144, 498, -13, -884, -384, 175, + 2512, 193, 9033, 5361, -3148, -385, -2, -4980, + -1754, -605, -29, -1385, -106, -822, -63, -2956, + 482, 37, 1735, 1030, 8464, 2844, 12, 549, + 2132, -4373, -493, 0, -18, -277, -1469, -6, + -2, -284, -95, 0, -1101, -370, -1, -71, + 2141, -2602, 7166, 9046, -1350, -279, -413, -3134, + -4994, -111, 340, -936, 1138, -1182, 1436, -3957, + 176, -214, 590, 745, -244, 278, 13307, 1227, + -161, -3, -4, -10808, -91, -1, 4, 198, + -226, 18, -20, -997, -2, 2, 131, 12, + -1947, 8217, 6269, 917, -2559, -231, -4121, -2399, + -51, -399, 976, 745, -3144, 108, -460, -350, + -304, 1283, 979, 143, -1810, 2061, -2781, 6056, + 10058, -200, -259, -472, -2238, -6174, 227, -307, + 349, 669, -761, 1028, 1111, -1265, 1707, -3717, + 7827, 9161, -3409, 2473, -1510, -3739, -5122, -709, + -373, -139, -4376, 1628, 1906, -1181, -1382, 514, + 721, 844, -314, 228, -1430, 8313, 9541, -2955, + 1626, -124, -4218, -5556, -533, -161, 725, 832, + -4841, -257, 1499, 1721, 142, -825, -947, 293, + 2819, -4247, 5391, 8673, 2756, -485, -1101, -1774, + -4591, -463, 730, -927, 1397, -1492, 2248, -2854, + -474, 714, -907, -1459, 141, 14552, 690, 257, + -112, -1, -12926, -29, -4, 0, -125, -5, + -613, -2, -228, -10, 0, 99, 4, 1, + 11938, -1859, 1806, -962, -884, -8699, -211, -199, + -56, -47, 1355, -1316, 205, 701, -109, 106, + 644, -100, 97, -51, 3728, 1982, 2264, 4584, + 3131, -848, -239, -312, -1282, -598, -451, -515, + -273, -1043, -554, -633, -712, -378, -432, -876, + -1181, 766, 720, 14303, -216, -85, -35, -31, + -12486, -2, 55, 51, -33, 1031, -668, -628, + -15, 10, 9, 189, -4385, 4826, 10112, 1569, + 3388, -1173, -1421, -6242, -150, -700, 1291, 2706, + -2979, 420, -462, -969, 906, -998, -2091, -324, + -448, 1932, 15591, -1842, 657, -12, -227, -14837, + -207, -26, 52, 427, -1838, -50, 217, 1753, + 18, -77, -626, 74, -4141, 1844, 3962, 5517, + 6220, -1046, -207, -958, -1858, -2361, 466, 1001, + -446, 1394, -621, -1334, 1572, -700, -1504, -2094, + 729, -2299, 14755, 3657, -952, -32, -322, -13288, + -816, -55, 102, -656, 2071, -162, 513, -3294, + 42, -133, 857, 212, -1385, 5801, 13339, -3137, + 1344, -117, -2054, -10861, -600, -110, 490, 1127, + -4723, -265, 1111, 2554, 113, -476, -1094, 257, + 4710, 9661, 1073, -2467, 3274, -1354, -5697, -70, + -371, -654, -2777, -308, -633, 709, 1455, 161, + -941, -1930, -214, 493, 1843, -3624, 12422, 6898, + -1559, -207, -802, -9419, -2904, -148, 407, -1397, + 2748, -775, 1526, -5230, 175, -344, 1182, 656, + 1433, 2394, 2507, 1380, 8780, -125, -349, -383, + -116, -4705, -209, -219, -366, -120, -201, -211, + -768, -1283, -1343, -740, -1712, 12915, 5883, -2197, + 991, -179, -10181, -2112, -294, -60, 1350, 615, + -4638, -229, 1732, 789, 103, -781, -356, 133, + 15072, 2158, -1245, 910, -496, -13865, -284, -94, + -50, -15, -1986, 1145, 164, -837, -119, 69, + 456, 65, -37, 27, 4655, 7319, 4916, 586, + -3381, -1322, -3270, -1475, -20, -697, -2079, -1396, + -2196, -166, -261, -175, 960, 1510, 1014, 120, + 1191, -2140, 5120, 13498, -1418, -86, -279, -1600, + -11121, -122, 155, -372, 669, -981, 1763, -4218, + 103, -185, 443, 1168, -1530, -817, 8191, 9632, + -1452, -143, -40, -4095, -5663, -128, -76, 765, + 408, 900, 480, -4815, -135, -72, 726, 854, + -3236, 607, 1696, -2106, 11485, -639, -22, -175, + -270, -8051, 119, 335, -62, -416, 78, 218, + 2268, -425, -1189, 1476, 3203, -1903, -837, 9679, + 7057, -626, -221, -42, -5718, -3039, 372, 163, + -97, -1892, 1124, 494, -1380, 819, 360, -4169, + 213, -655, 17015, 620, -384, -2, -26, -17671, + -23, -9, 8, -221, 681, -8, 24, -644, + 5, -15, 399, 14, 5088, 35, -3339, 3726, + 8488, -1580, 0, -680, -847, -4397, -10, 1037, + 7, -1157, -8, 759, -2636, -18, 1730, -1930, + -988, 1454, -2688, 15039, 2682, -59, -129, -441, + -13805, -439, 87, -162, 238, 907, -1335, 2467, + 161, -238, 440, -2462, -4865, -2842, -53, 5495, + 6523, -1445, -493, 0, -1843, -2597, -844, -16, + -9, 1632, 953, 18, 1937, 1131, 21, -2188, + 3076, 15069, -2914, 1810, -971, -577, -13860, -518, + -200, -57, -2829, 547, 2680, -339, -1665, 322, + 182, 893, -172, 107, 1311, 5355, 11054, 2299, + -3654, -105, -1750, -7458, -322, -814, -428, -885, + -3613, -184, -751, -1551, 292, 1194, 2465, 512, + 4035, 5619, 4618, 1815, 1912, -994, -1927, -1301, + -201, -223, -1384, -1137, -1583, -447, -622, -511, + -471, -656, -539, -211, -2131, 2754, -4501, 12879, + 7432, -277, -463, -1236, -10124, -3371, 358, -585, + 756, 1675, -2165, 3538, 967, -1249, 2042, -5842, + 5618, -515, 3219, -4149, 4857, -1926, -16, -632, + -1050, -1440, 176, -1104, 101, 1422, -130, 815, + -1666, 152, -954, 1230, 1838, -1709, 1139, 16867, + 716, -206, -178, -79, -17366, -31, 191, -127, + 118, -1892, 1759, -1173, -80, 74, -49, -737, + 1978, -3845, 10050, 11854, -2492, -238, -902, -6164, + -8576, -379, 464, -1213, 2358, -1431, 2782, -7271, + 301, -585, 1529, 1803, -2600, 11246, 11289, -3647, + 1463, -412, -7720, -7778, -812, -130, 1784, 1791, + -7749, -578, 2504, 2513, 232, -1004, -1008, 325, + 3442, 907, 2725, 8970, 3638, -723, -50, -453, + -4911, -808, -190, -572, -150, -1884, -496, -1492, + -764, -201, -605, -1992, -126, 17498, 3481, -2003, + 1090, 0, -18689, -739, -244, -72, 135, 26, + -3717, -15, 2139, 425, 8, -1165, -231, 133, + -1814, 1048, -2164, 4070, 16272, -200, -67, -285, + -1011, -16160, 116, -239, 138, 450, -260, 537, + 1801, -1041, 2149, -4042, 9354, 12580, -1883, 962, + -617, -5341, -9660, -216, -56, -23, -7183, 1075, + 1446, -549, -738, 110, 352, 474, -71, 36, + 1708, 4199, 7387, 6335, 1003, -178, -1076, -3330, + -2449, -61, -437, -770, -1893, -660, -1623, -2856, + -104, -257, -452, -388, -2624, 5623, 17310, -2353, + 592, -420, -1930, -18288, -338, -21, 900, 2772, + -5941, -376, 807, 2486, 94, -203, -625, 85, + 1211, -850, 1193, -1926, 15992, -89, -44, -86, + -226, -15609, 62, -88, 61, 142, -100, 140, + -1182, 830, -1165, 1880, 3983, -2054, 11506, -19, + 3622, -968, -257, -8080, 0, -801, 499, -2797, + 1442, 4, -2, 13, -880, 454, -2544, 4, + -786, -1354, 16092, 7246, -1665, -37, -111, -15805, + -3205, -169, -65, 772, 1330, 348, 599, -7117, + -80, -137, 1636, 736, -4316, -511, 6674, 11665, + 4633, -1137, -15, -2719, -8305, -1310, -134, 1758, + 208, 3073, 364, -4752, 1220, 144, -1887, -3299, + 7912, 4557, 1937, 1885, 7037, -3821, -1267, -229, + -216, -3022, -2200, -935, -538, -910, -524, -222, + -3398, -1957, -832, -809, 3434, 2967, 5867, 8196, + 8766, -720, -537, -2101, -4100, -4690, -622, -1230, + -1062, -1718, -1484, -2935, -1837, -1588, -3139, -4385, + 5881, 9176, 8119, 3934, 3355, -2111, -5139, -4023, + -944, -687, -3294, -2914, -4547, -1412, -2203, -1949, + -1204, -1879, -1662, -805 +}; + +static const int16_t adaptive_cb_gain170[170 * 20] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 776, 212, 715, 670, + 809, -36, -2, -31, -27, -39, -10, -33, + -9, -31, -8, -29, -38, -10, -35, -33, + 1296, 1316, -168, -320, -815, -102, -105, -1, + -6, -40, -104, 13, 13, 25, 25, -3, + 64, 65, -8, -15, -589, 680, 2478, 308, + -596, -21, -28, -375, -5, -21, 24, 89, + -102, 11, -12, -46, -21, 24, 90, 11, + -735, -487, -5, 2948, 468, -33, -14, 0, + -530, -13, -21, 0, 0, 132, 87, 0, + 21, 13, 0, -84, 1042, 1730, 1068, 333, + 626, -66, -182, -69, -6, -23, -110, -67, + -112, -21, -35, -21, -39, -66, -40, -12, + 486, -769, 4074, 2825, -1107, -14, -36, -1013, + -487, -74, 22, -120, 191, -83, 132, -702, + 32, -52, 275, 191, 1521, -767, -124, 4320, + 1026, -141, -35, 0, -1139, -64, 71, 11, + -5, -401, 202, 32, -95, 48, 7, -270, + 2425, 1267, 3439, -91, -1166, -359, -98, -722, + 0, -83, -187, -509, -266, 13, 7, 19, + 172, 90, 244, -6, -1251, 975, 173, 4039, + 2005, -95, -58, -1, -996, -245, 74, 13, + -10, 308, -240, -42, 153, -119, -21, -494, + 1820, 632, 1322, 2062, 1031, -202, -24, -106, + -259, -64, -70, -146, -51, -229, -79, -166, + -114, -39, -83, -129, -447, 4904, 244, -315, + -2038, -12, -1467, -3, -6, -253, 134, 6, + -73, -8, 94, 4, -55, 610, 30, -39, + -208, -1102, 463, -448, 5653, -2, -74, -13, + -12, -1950, -14, 5, 31, -5, -30, 12, + 71, 380, -159, 154, 4739, 2600, -1864, 856, + -1554, -1371, -412, -212, -44, -147, -752, 539, + 295, -247, -135, 97, 449, 246, -176, 81, + 1894, 3533, 35, -26, 2145, -219, -762, 0, + 0, -280, -408, -4, -7, 3, 5, 0, + -248, -462, -4, 3, -2699, 1841, 4072, 2443, + 1582, -444, -207, -1012, -364, -152, 303, 670, + -457, 402, -274, -607, 260, -177, -393, -236, + -844, 3358, 6106, -1059, -537, -43, -688, -2275, + -68, -17, 173, 314, -1251, -54, 217, 395, + -27, 110, 200, -34, 1251, 1016, 3020, 2210, + 1445, -95, -63, -556, -298, -127, -77, -230, + -187, -168, -137, -407, -110, -89, -266, -194, + 2099, 2277, 4038, 3533, -2870, -269, -316, -995, + -762, -503, -291, -517, -561, -452, -491, -871, + 367, 399, 707, 619, 400, -1114, 8516, 2422, + -1117, -9, -75, -4426, -358, -76, 27, -208, + 579, -59, 164, -1259, 27, -75, 580, 165, + -4398, -2011, 3912, -2407, 2258, -1180, -247, -934, + -353, -311, -540, 1050, 480, -646, -295, 575, + 606, 277, -539, 331, 1767, -1447, 4240, 6160, + -757, -190, -127, -1097, -2316, -35, 156, -457, + 374, -664, 544, -1594, 81, -66, 195, 284, + 1594, -1463, 1035, 6938, 1920, -155, -130, -65, + -2938, -225, 142, -100, 92, -675, 619, -438, + -186, 171, -121, -813, -562, 4716, 4085, -591, + 2421, -19, -1357, -1018, -21, -357, 162, 140, + -1175, -20, 170, 147, 83, -696, -603, 87, + 1552, 8778, -935, 354, -1424, -147, -4703, -53, + -7, -123, -831, 88, 501, -33, -189, 20, + 134, 763, -81, 30, 4831, -4431, 41, -1479, + -2976, -1424, -1198, 0, -133, -540, 1306, -12, + 11, 436, -400, 3, 877, -804, 7, -268, + 2090, 1192, 1006, 1645, 4853, -266, -86, -61, + -165, -1437, -152, -128, -73, -210, -119, -101, + -619, -353, -298, -487, 2386, 5712, 1426, -94, + 1350, -347, -1991, -124, 0, -111, -832, -207, + -497, 13, 32, 8, -196, -470, -117, 7, + -1349, 1091, 1659, 8891, 313, -111, -72, -168, + -4825, -5, 89, 136, -110, 732, -592, -900, + 25, -20, -31, -170, 9980, 916, -381, -808, + 88, -6080, -51, -8, -39, 0, -558, 232, + 21, 492, 45, -18, -53, -4, 2, 4, + 2338, -1031, -248, 3928, 6484, -333, -64, -3, + -942, -2566, 147, 35, -15, -560, 247, 59, + -925, 408, 98, -1555, 6166, -1240, -337, 3672, + -1277, -2320, -93, -6, -823, -99, 466, 126, + -25, -1382, 278, 75, 480, -96, -26, 286, + 4377, -132, -2588, 1701, 4865, -1169, -1, -409, + -176, -1444, 35, 691, -20, -454, 13, 268, + -1299, 39, 768, -505, 2594, 3295, 3944, 1481, + 682, -410, -662, -949, -133, -28, -521, -624, + -793, -234, -297, -356, -108, -137, -164, -61, + 4151, 624, 815, 4485, 2229, -1052, -23, -40, + -1228, -303, -158, -206, -31, -1136, -170, -223, + -565, -84, -111, -610, -3575, -361, 4924, 2791, + 4698, -780, -7, -1480, -475, -1347, -78, 1074, + 108, 609, 61, -839, 1025, 103, -1412, -800, + -2518, 3791, 8623, 315, 2465, -387, -877, -4538, + -6, -370, 582, 1325, -1995, 48, -73, -166, + 378, -570, -1297, -47, -691, 2989, 9957, -421, + -1142, -29, -545, -6051, -10, -79, 126, 420, + -1817, -17, 76, 256, -48, 208, 694, -29, + -1918, 104, -3190, -3410, -4440, -224, 0, -621, + -709, -1203, 12, -373, 20, -399, 21, -664, + -519, 28, -864, -924, -3359, -1668, 1854, 6939, + 1430, -688, -169, -209, -2939, -124, -341, 380, + 188, 1422, 706, -785, 293, 145, -161, -606, + 42, 9706, 3164, -952, 907, 0, -5750, -611, + -55, -50, -25, -8, -1874, 2, 564, 183, + -2, -537, -175, 52, 1607, 785, 2862, 4327, + 3307, -157, -37, -500, -1143, -667, -77, -280, + -137, -424, -207, -756, -324, -158, -577, -873, + 6801, 3416, 2227, 1682, -3217, -2823, -712, -302, + -172, -631, -1418, -924, -464, -698, -350, -228, + 1335, 670, 437, 330, 3459, 3898, 364, 7841, + -2640, -730, -927, -8, -3753, -425, -823, -76, + -86, -1655, -1865, -174, 557, 628, 58, 1263, + -5902, -3458, -2465, -1886, 4334, -2126, -730, -371, + -217, -1146, -1245, -888, -520, -679, -398, -283, + 1561, 915, 652, 499, -3710, 1133, 7849, 3443, + -215, -840, -78, -3760, -723, -2, 256, 1777, + -543, 779, -238, -1649, -48, 14, 103, 45, + 4132, 2828, 2, -4212, -4116, -1042, -488, 0, + -1083, -1034, -713, 0, 0, 1062, 727, 0, + 1038, 710, 0, -1058, 5875, 8496, -1796, 1376, + -1786, -2107, -4406, -197, -115, -194, -3047, 644, + 931, -493, -713, 150, 640, 926, -195, 150, + 3143, 3483, 3546, -793, 4489, -603, -740, -767, + -38, -1230, -668, -680, -754, 152, 168, 171, + -861, -954, -971, 217, 2845, 7965, 3695, -5432, + 3978, -494, -3873, -833, -1801, -966, -1383, -641, + -1796, 943, 2641, 1225, -691, -1934, -897, 1319, + 1538, 150, 7139, 2049, 3097, -144, -1, -3110, + -256, -585, -14, -670, -65, -192, -18, -892, + -290, -28, -1349, -387, 618, 7520, 4729, -238, + -3373, -23, -3452, -1365, -3, -694, -283, -178, + -2170, 8, 109, 68, 127, 1548, 973, -49, + 2965, -3013, 7912, 7076, -1997, -536, -554, -3821, + -3056, -243, 545, -1431, 1455, -1280, 1301, -3417, + 361, -367, 964, 862, 2443, -929, -1113, 9677, + 4138, -364, -52, -75, -5716, -1045, 138, 166, + -63, -1443, 549, 657, -617, 234, 281, -2444, + 1966, 3309, 10085, -3399, 2105, -236, -668, -6207, + -705, -270, -397, -1210, -2037, 408, 686, 2092, + -252, -425, -1295, 436, -112, -1368, 8868, 4822, + 2048, 0, -114, -4800, -1419, -256, -9, 61, + 740, 33, 402, -2610, 14, 171, -1108, -602, + -2597, 438, -1839, 6229, 7266, -411, -11, -206, + -2368, -3223, 69, -291, 49, 987, -166, 699, + 1152, -194, 816, -2763, 3454, 553, 9127, 4946, + -5596, -728, -18, -5084, -1493, -1911, -116, -1924, + -308, -1042, -166, -2755, 1179, 188, 3117, 1689, + -532, -663, 12262, 2495, -1004, -17, -26, -9177, + -380, -61, -21, 398, 496, 81, 101, -1867, + -32, -40, 751, 152, -2100, 1317, -1509, 11425, + 2997, -269, -105, -139, -7967, -548, 168, -193, + 121, 1464, -918, 1052, 384, -240, 276, -2090, + 1193, -2697, 11259, 5373, -763, -86, -444, -7737, + -1762, -35, 196, -819, 1853, -391, 884, -3692, + 55, -125, 525, 250, 2405, -471, 11079, 203, + 782, -353, -13, -7491, -2, -37, 69, -1626, + 318, -29, 5, -137, -114, 22, -529, -9, + -1871, 5685, 11290, -2662, 1353, -213, -1972, -7780, + -432, -111, 649, 1289, -3917, -304, 923, 1834, + 154, -469, -932, 220, -3768, 5927, -3093, 5041, + 5212, -866, -2144, -584, -1551, -1658, 1363, -711, + 1119, 1159, -1824, 951, 1198, -1885, 984, -1603, + -2546, 9502, 5969, -2440, 1928, -395, -5511, -2175, + -363, -226, 1477, 927, -3462, -379, 1415, 889, + 299, -1118, -702, 287, -4963, 3568, 4592, 5508, + 3451, -1503, -777, -1287, -1851, -727, 1080, 1391, + -1000, 1668, -1199, -1543, 1045, -751, -967, -1160, + 1745, -2586, 3983, 10899, -1551, -186, -408, -968, + -7250, -146, 275, -424, 628, -1161, 1720, -2649, + 165, -244, 377, 1032, 867, -456, -727, 3369, + 11822, -45, -12, -32, -692, -8531, 24, 38, + -20, -178, 93, 149, -625, 329, 525, -2431, + 7535, 2422, 1926, 1405, 1599, -3466, -358, -226, + -120, -156, -1114, -886, -284, -646, -207, -165, + -735, -236, -188, -137, 1041, -735, -142, 13209, + 1515, -66, -33, -1, -10649, -140, 46, 9, + -6, -839, 593, 114, -96, 68, 13, -1222, + 7950, 6745, -1444, -1008, 2721, -3857, -2777, -127, + -62, -452, -3273, 700, 594, 489, 415, -88, + -1320, -1120, 239, 167, -4754, -1379, 4522, -578, + -5733, -1379, -116, -1248, -20, -2006, -400, 1312, + 380, -167, -48, 159, -1663, -482, 1582, -202, + 3220, 5978, 5923, 2430, -2689, -633, -2181, -2141, + -360, -441, -1175, -1164, -2161, -477, -886, -878, + 528, 981, 972, 398, 377, 1312, 13978, -1470, + 677, -8, -105, -11925, -132, -28, -30, -321, + -1119, 33, 117, 1254, -15, -54, -577, 60, + -3435, 6770, 314, -885, 5686, -720, -2797, -6, + -47, -1973, 1419, 65, -129, -185, 366, 16, + 1192, -2349, -109, 307, 3171, 8774, -2260, 2679, + 3069, -613, -4699, -312, -438, -575, -1698, 437, + 1210, -518, -1435, 369, -594, -1643, 423, -501, + 5557, 1509, 5407, -125, -7386, -1884, -139, -1784, + 0, -3330, -511, -1834, -498, 42, 11, 41, + 2505, 680, 2438, -56, -2838, 2595, 13228, 271, + 1793, -491, -411, -10680, -4, -196, 449, 2291, + -2095, 47, -42, -219, 310, -284, -1447, -29, + 664, -278, 14966, 951, -711, -26, -4, -13672, + -55, -30, 11, -606, 253, -38, 16, -869, + 28, -12, 650, 41, 808, 1770, 8658, 5863, + -1486, -39, -191, -4576, -2098, -134, -87, -427, + -935, -289, -633, -3098, 73, 160, 785, 531, + 3063, 1539, 2000, -542, 9576, -572, -144, -244, + -17, -5597, -287, -374, -188, 101, 51, 66, + -1790, -900, -1169, 317, 514, 14083, -323, 896, + -891, -16, -12106, -6, -49, -48, -442, 10, + 277, -28, -770, 17, 27, 766, -17, 48, + 892, 158, 5237, 11057, -1603, -48, -1, -1674, + -7462, -156, -8, -285, -50, -602, -106, -3534, + 87, 15, 512, 1082, -1612, 2564, -4296, 12526, + 5710, -158, -401, -1126, -9576, -1990, 252, -422, + 672, 1232, -1960, 3284, 561, -893, 1497, -4365, + 4889, -6878, 612, 6109, 4753, -1459, -2887, -22, + -2277, -1379, 2052, -182, 257, -1823, 2564, -228, + -1418, 1995, -177, -1772, 3053, -506, 2403, 9625, + 1322, -569, -15, -352, -5655, -106, 94, -448, + 74, -1794, 297, -1412, -246, 40, -194, -777, + -754, 12904, 4480, -2113, 1471, -34, -10163, -1225, + -272, -132, 594, 206, -3529, -97, 1664, 577, + 67, -1159, -402, 189, 4255, 1476, 5055, 2393, + 2912, -1105, -132, -1559, -349, -517, -383, -1313, + -455, -621, -215, -738, -756, -262, -898, -425, + -1371, 535, 1417, 14604, -997, -114, -17, -122, + -13017, -60, 44, 118, -46, 1222, -477, -1263, + -83, 32, 86, 888, 5368, -1744, 4083, -1236, + 3753, -1758, -185, -1017, -93, -860, 571, -1338, + 434, 405, -131, 308, -1229, 399, -935, 283, + 1588, -3097, 14415, 3699, -1171, -154, -585, -12683, + -835, -83, 300, -1397, 2725, -358, 699, -3255, + 113, -221, 1030, 264, 212, 7989, 9471, -3344, + 2009, -2, -3895, -5475, -682, -246, -103, -123, + -4618, 43, 1630, 1933, -26, -979, -1161, 410, + 856, 2294, -627, 6930, 6929, -44, -321, -24, + -2931, -2930, -119, 32, 87, -362, -970, 265, + -362, -970, 265, -2931, 2357, -4187, 7162, 7683, + 3371, -339, -1070, -3131, -3603, -693, 602, -1030, + 1830, -1105, 1963, -3359, -485, 861, -1474, -1581, + 350, 4585, 14053, -3819, 1218, -7, -1283, -12054, + -890, -90, -97, -300, -3933, 81, 1068, 3275, + -26, -341, -1045, 284, -3248, 3531, 475, 2137, + 11711, -644, -761, -13, -278, -8372, 700, 94, + -102, 423, -460, -62, 2322, -2524, -340, -1528, + -3017, 3852, 1725, 8440, 5257, -555, -905, -181, + -4348, -1686, 709, 317, -405, 1554, -1984, -889, + 968, -1236, -553, -2708, -909, 3196, 15512, -2528, + 1066, -50, -623, -14686, -390, -69, 177, 861, + -3026, -140, 493, 2393, 59, -208, -1009, 164, + 959, -3370, 9617, 9545, -1761, -56, -693, -5645, + -5561, -189, 197, -563, 1978, -558, 1963, -5603, + 103, -362, 1034, 1026, 7575, 11796, -4845, 3252, + -1703, -3502, -8493, -1433, -645, -177, -5454, 2240, + 3488, -1503, -2341, 961, 787, 1226, -503, 338, + 6409, 1722, 1764, -4191, 6015, -2507, -181, -189, + -1072, -2208, -673, -690, -185, 1639, 440, 451, + -2353, -632, -647, 1538, -2420, 12161, 5038, 1286, + -2098, -357, -9027, -1549, -100, -268, 1796, 744, + -3740, 190, -954, -395, -310, 1557, 645, 164, + -2232, -1341, 7246, 9470, -1977, -304, -109, -3204, + -5474, -238, -182, 987, 593, 1290, 775, -4188, + -269, -161, 874, 1143, 1030, 7034, 4231, 1551, + 3077, -64, -3019, -1093, -146, -577, -442, -266, + -1816, -97, -666, -400, -193, -1321, -794, -291, + 5121, 11835, -477, -1749, 2298, -1601, -8549, -13, + -186, -322, -3699, 149, 344, 546, 1264, -50, + -718, -1660, 66, 245, -3328, 3827, 5921, 9976, + -1045, -676, -894, -2140, -6075, -66, 777, 1203, + -1383, 2027, -2330, -3605, -212, 244, 377, 636, + 3813, 5718, -4666, -3412, 5674, -887, -1995, -1329, + -710, -1965, -1331, 1086, 1628, 794, 1191, -972, + -1320, -1980, 1616, 1181, 1348, -3672, 13154, 6938, + -1690, -110, -823, -10561, -2938, -174, 302, -1082, + 2948, -570, 1555, -5570, 139, -379, 1357, 716, + 2151, -3586, 6949, 12131, -1224, -282, -785, -2947, + -8982, -91, 470, -912, 1521, -1592, 2655, -5145, + 160, -268, 519, 906, -2889, 9647, 10276, -2728, + 995, -509, -5680, -6445, -454, -60, 1701, 1812, + -6051, -481, 1606, 1711, 175, -586, -624, 165, + 6177, 2184, 555, 1985, 6589, -2329, -291, -18, + -240, -2650, -823, -209, -74, -748, -264, -67, + -2484, -878, -223, -798, -492, 391, 17166, -681, + 240, -14, -9, -17987, -28, -3, 11, 515, + -410, -20, 16, 713, 7, -5, -252, 10, + 12628, 5448, -2630, 3011, -2695, -9733, -1811, -422, + -553, -443, -4199, 2027, 874, -2321, -1001, 483, + 2077, 896, -432, 495, -3628, -534, 3447, 7002, + 6751, -803, -17, -725, -2992, -2782, -118, 763, + 112, 1550, 228, -1473, 1495, 220, -1420, -2885, + -5239, 5901, 8107, 3650, 4846, -1675, -2125, -4012, + -813, -1433, 1887, 2592, -2920, 1167, -1315, -1806, + 1550, -1745, -2398, -1080, 6157, 6678, 4099, -1074, + 2348, -2314, -2722, -1025, -70, -336, -2509, -1540, + -1670, 403, 437, 268, -882, -957, -587, 153, + 1079, 16099, 242, -881, 1690, -71, -15820, -3, + -47, -174, -1060, -16, -238, 58, 865, 13, + -111, -1661, -25, 90, -278, 227, -1039, 1636, + 16945, -4, -3, -65, -163, -17526, 3, -17, + 14, 27, -22, 103, 287, -234, 1074, -1693, + 15778, -1454, 574, -603, -107, -15195, -129, -20, + -22, 0, 1400, -553, 51, 581, -53, 21, + 103, -9, 3, -3, 2406, -836, 13224, 7993, + -4266, -353, -42, -10673, -3899, -1111, 122, -1942, + 674, -1174, 407, -6451, 626, -217, 3443, 2081, + 3184, 14368, -3336, 2255, -1801, -619, -12600, -679, + -310, -198, -2793, 648, 2926, -438, -1977, 459, + 350, 1580, -366, 247, -1698, 17076, 2504, -539, + -646, -176, -17798, -382, -17, -25, 1770, 259, + -2610, -55, 561, 82, -67, 673, 98, -21, + 2375, -797, -2696, 14483, 5383, -344, -38, -443, + -12803, -1769, 115, 391, -131, -2100, 705, 2384, + -780, 262, 886, -4759, -2691, 2554, -4520, 9573, + 10655, -442, -398, -1247, -5594, -6930, 419, -742, + 704, 1572, -1492, 2641, 1750, -1661, 2939, -6226, + -4332, -4399, -1657, 4880, 7375, -1145, -1181, -167, + -1453, -3319, -1163, -438, -444, 1290, 1310, 493, + 1950, 1980, 745, -2196, -3498, 7405, 9955, 2693, + -2971, -746, -3347, -6049, -442, -538, 1581, 2125, + -4499, 575, -1217, -1636, -634, 1342, 1805, 488, + 6717, -3792, 7739, 2798, 3489, -2754, -877, -3655, + -477, -743, 1554, -3173, 1791, -1147, 647, -1321, + -1430, 807, -1648, -595, 5263, 9770, 3463, 1069, + -3971, -1690, -5826, -732, -69, -962, -3138, -1112, + -2065, -343, -637, -226, 1275, 2368, 839, 259, + 1243, -2634, 16772, 1871, 332, -94, -423, -17169, + -213, -6, 199, -1273, 2696, -142, 300, -1915, + -25, 53, -339, -37, 2691, 2836, 3105, 5711, + 4817, -442, -491, -588, -1991, -1416, -465, -510, + -537, -938, -988, -1082, -791, -834, -913, -1679, + 4366, 2944, 7210, 3627, 1161, -1163, -529, -3172, + -803, -82, -784, -1921, -1295, -966, -651, -1596, + -309, -208, -511, -257, 13888, 3951, -671, -2305, + 3354, -11773, -953, -27, -324, -686, -3349, 569, + 161, 1954, 556, -94, -2843, -809, 137, 472, + 7053, 5847, 2929, 8378, -4794, -3036, -2086, -523, + -4284, -1403, -2517, -1261, -1045, -3607, -2990, -1498, + 2064, 1711, 857, 2451, -2191, 12838, 9182, -3915, + 1617, -293, -10059, -5146, -935, -159, 1717, 1228, + -7195, -523, 3068, 2194, 216, -1267, -906, 386, + -4881, 13114, 5767, -435, 4155, -1454, -10498, -2030, + -11, -1054, 3907, 1718, -4616, -129, 348, 153, + 1238, -3326, -1462, 110, 7843, -1250, 210, 7106, + -5203, -3754, -95, -2, -3082, -1652, 598, -100, + 16, -3402, 542, -91, 2491, -397, 66, 2257, + -2463, 8168, 14551, -3908, 1828, -370, -4072, -12923, + -932, -204, 1228, 2188, -7254, -587, 1948, 3471, + 274, -911, -1623, 436, -1579, 347, -272, -2735, + 16031, -152, -7, -4, -456, -15686, 33, -26, + 5, -263, 58, -45, 1545, -340, 266, 2676, + -6327, 1328, 5093, -5079, 7617, -2443, -107, -1583, + -1574, -3541, 513, 1967, -413, -1961, 411, 1578, + 2941, -617, -2367, 2361, 3286, -4509, 11306, 11025, + -2623, -659, -1241, -7802, -7419, -420, 904, -2267, + 3112, -2211, 3034, -7608, 526, -722, 1810, 1765, + 5567, 17853, -3754, 1166, -519, -1892, -19455, -860, + -83, -16, -6067, 1275, 4090, -396, -1271, 267, + 176, 566, -119, 37, -2136, -424, 15292, 5108, + -1648, -278, -10, -14273, -1593, -165, -55, 1993, + 396, 666, 132, -4768, -214, -42, 1538, 514, + 2267, -3297, 2549, 16563, -791, -313, -663, -396, + -16745, -38, 456, -352, 513, -2291, 3333, -2576, + 109, -159, 123, 799, 3655, 1899, -3364, 6279, + 12510, -815, -220, -690, -2406, -9552, -423, 750, + 390, -1400, -728, 1289, -2791, -1450, 2568, -4794, + 8052, 2285, -6193, 5138, 6003, -3957, -318, -2341, + -1611, -2199, -1123, 3044, 864, -2525, -716, 1942, + -2950, -837, 2269, -1882, -386, -2291, 7679, 15387, + -2723, -9, -320, -3599, -14452, -452, -54, 181, + 1074, 362, 2152, -7212, -64, -380, 1276, 2557, + 2777, -1173, 3984, 13079, 2508, -470, -84, -969, + -10440, -384, 198, -675, 285, -2217, 936, -3180, + -425, 179, -610, -2002, -1879, 1771, -2684, 16705, + 1833, -215, -191, -439, -17032, -205, 203, -308, + 290, 1916, -1805, 2736, 210, -198, 300, -1869, + 1052, 4495, 15519, 1467, -4032, -67, -1233, -14700, + -131, -992, -288, -997, -4257, -94, -402, -1389, + 259, 1106, 3819, 361, 3010, 2544, 6969, 7559, + 1996, -553, -395, -2964, -3487, -243, -467, -1280, + -1082, -1388, -1174, -3215, -366, -310, -849, -921, + -5209, -1867, 8713, 10351, 1549, -1656, -212, -4634, + -6540, -146, -593, 2770, 993, 3291, 1180, -5505, + 492, 176, -824, -979, -4314, 8513, 913, 7547, + -2723, -1135, -4423, -50, -3476, -452, 2241, 240, + -474, 1987, -3921, -420, -717, 1415, 151, 1254, + 12929, -1219, 2448, 1757, 6303, -10204, -90, -365, + -188, -2425, 962, -1932, 182, -1386, 130, -262, + -4974, 469, -941, -676, 6465, 4132, 3167, 3160, + 5697, -2551, -1042, -612, -609, -1981, -1630, -1249, + -798, -1247, -797, -611, -2248, -1437, -1101, -1099, + -3636, 4859, 18914, -1335, 810, -807, -1441, -21836, + -108, -40, 1078, 4198, -5609, -296, 396, 1541, + 179, -240, -936, 66, 8844, 7864, 654, -4063, + -5680, -4774, -3774, -26, -1007, -1969, -4245, -353, + -314, 2193, 1950, 162, 3066, 2726, 226, -1408, + 1859, 2634, 9228, 996, 9464, -211, -423, -5197, + -60, -5467, -299, -1047, -1483, -113, -160, -561, + -1074, -1521, -5330, -575, 2949, 12260, 10290, -497, + -3943, -530, -9174, -6463, -15, -949, -2206, -1852, + -7700, 89, 372, 312, 709, 2950, 2476, -119, + -2903, 1552, 14867, 9970, -496, -514, -147, -13491, + -6068, -15, 275, 2634, -1408, 1766, -944, -9047, + -87, 47, 450, 302, 3243, 8234, 7586, 3373, + 2151, -642, -4138, -3512, -694, -282, -1630, -1501, + -3812, -667, -1695, -1561, -425, -1081, -996, -442, + -9631, 60, 3501, 5359, 10150, -5662, 0, -748, + -1752, -6288, 35, 2058, -12, 3150, -19, -1145, + 5967, -37, -2169, -3320, -6874, -2553, -5446, -2195, + -7841, -2884, -397, -1810, -294, -3753, -1071, -2285, + -848, -921, -342, -729, -3290, -1221, -2606, -1050, + -3413, -1141, 4630, 13612, 7897, -711, -79, -1308, + -11310, -3806, -237, 964, 322, 2836, 948, -3847, + 1645, 550, -2231, -6561, 4410, -5678, 8006, -3992, + 3811, -1187, -1968, -3912, -973, -886, 1528, -2155, + 2775, 1074, -1383, 1951, -1025, 1321, -1862, 928, + 5659, 11535, 2203, -452, 7169, -1954, -8121, -296, + -12, -3137, -3984, -761, -1551, 156, 318, 60, + -2476, -5048, -964, 197, 2914, -2914, 3485, -3965, + 13675, -518, -518, -741, -959, -11414, 518, -620, + 620, 705, -705, 843, -2433, 2432, -2909, 3310, + 7843, 1907, 1022, 8882, 7972, -3755, -222, -63, + -4815, -3879, -913, -489, -119, -4252, -1034, -554, + -3816, -928, -497, -4322, 13807, 9531, 1436, 1612, + 1779, -11636, -5544, -125, -158, -193, -8032, -1210, + -835, -1358, -938, -141, -1499, -1035, -156, -175, + 13620, -5337, 5450, -2263, 1723, -11322, -1738, -1813, + -312, -181, 4436, -4531, 1775, 1881, -737, 752, + -1432, 561, -573, 238, 5297, 8374, 8872, 7694, + 6538, -1712, -4280, -4804, -3613, -2609, -2707, -2868, + -4534, -2487, -3932, -4166, -2113, -3341, -3540, -3070 +}; + +/** + * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15 + */ +static const int16_t postfilter_tbl[2][LPC_ORDER] = { + /* Zero */ + {21299, 13844, 8999, 5849, 3802, 2471, 1606, 1044, 679, 441}, + /* Pole */ + {24576, 18432, 13824, 10368, 7776, 5832, 4374, 3281, 2460, 1845} +}; + +/** + * Hamming window coefficients scaled by 2^15 + */ +static const int16_t hamming_window[LPC_FRAME] = { + 2621, 2631, 2659, 2705, 2770, 2853, 2955, 3074, 3212, 3367, + 3541, 3731, 3939, 4164, 4405, 4663, 4937, 5226, 5531, 5851, + 6186, 6534, 6897, 7273, 7661, 8062, 8475, 8899, 9334, 9780, + 10235, 10699, 11172, 11653, 12141, 12636, 13138, 13645, 14157, 14673, + 15193, 15716, 16242, 16769, 17298, 17827, 18356, 18884, 19411, 19935, + 20457, 20975, 21489, 21999, 22503, 23002, 23494, 23978, 24455, 24924, + 25384, 25834, 26274, 26704, 27122, 27529, 27924, 28306, 28675, 29031, + 29373, 29700, 30012, 30310, 30592, 30857, 31107, 31340, 31557, 31756, + 31938, 32102, 32249, 32377, 32488, 32580, 32654, 32710, 32747, 32766, + 32766, 32747, 32710, 32654, 32580, 32488, 32377, 32249, 32102, 31938, + 31756, 31557, 31340, 31107, 30857, 30592, 30310, 30012, 29700, 29373, + 29031, 28675, 28306, 27924, 27529, 27122, 26704, 26274, 25834, 25384, + 24924, 24455, 23978, 23494, 23002, 22503, 21999, 21489, 20975, 20457, + 19935, 19411, 18884, 18356, 17827, 17298, 16769, 16242, 15716, 15193, + 14673, 14157, 13645, 13138, 12636, 12141, 11653, 11172, 10699, 10235, + 9780, 9334, 8899, 8475, 8062, 7661, 7273, 6897, 6534, 6186, + 5851, 5531, 5226, 4937, 4663, 4405, 4164, 3939, 3731, 3541, + 3367, 3212, 3074, 2955, 2853, 2770, 2705, 2659, 2631, 2621 +}; + +/** + * Binomial window coefficients scaled by 2^15 + */ +static const int16_t binomial_window[LPC_ORDER] = { + 32749, 32695, 32604, 32477, 32315, 32118, 31887, 31622, 31324, 30995 +}; + +/** + * 0.994^i scaled by 2^15 + */ +static const int16_t bandwidth_expand[LPC_ORDER] = { + 32571, 32376, 32182, 31989, 31797, 31606, 31416, 31228, 31040, 30854 +}; + +/** + * 0.5^i scaled by 2^15 + */ +static const int16_t percept_flt_tbl[2][LPC_ORDER] = { + /* Zero part */ + {29491, 26542, 23888, 21499, 19349, 17414, 15673, 14106, 12695, 11425}, + /* Pole part */ + {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32} +}; + +static const int cng_adaptive_cb_lag[4] = { 1, 0, 1, 3 }; + +static const int cng_filt[4] = { 273, 998, 499, 333 }; + +static const int cng_bseg[3] = { 2048, 18432, 231233 }; + +#endif /* AVCODEC_G723_1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729.h new file mode 100644 index 00000000..7c5f693a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729.h @@ -0,0 +1,33 @@ +/* + * G.729, G729 Annex D decoders + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVCODEC_G729_H +#define AVCODEC_G729_H + +/** + * subframe size + */ +#define SUBFRAME_SIZE 40 + +/* bytes per block */ +#define G729_8K_BLOCK_SIZE 10 +#define G729D_6K4_BLOCK_SIZE 8 + +#endif // AVCODEC_G729_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729data.h new file mode 100644 index 00000000..365ca47e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/g729data.h @@ -0,0 +1,382 @@ +/* + * data for G.729, G729 Annex D decoders + * Copyright (c) 2007 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_G729DATA_H +#define AVCODEC_G729DATA_H + +#include + +#define MA_NP 4 ///< Moving Average (MA) prediction order + +#define VQ_1ST_BITS 7 ///< first stage vector of quantizer (size in bits) +#define VQ_2ND_BITS 5 ///< second stage vector of quantizer (size in bits) + +#define GC_1ST_IDX_BITS_8K 3 ///< gain codebook (first stage) index, 8k mode (size in bits) +#define GC_2ND_IDX_BITS_8K 4 ///< gain codebook (second stage) index, 8k mode (size in bits) + +#define GC_1ST_IDX_BITS_6K4 3 ///< gain codebook (first stage) index, 6.4k mode (size in bits) +#define GC_2ND_IDX_BITS_6K4 3 ///< gain codebook (second stage) index, 6.4k mode (size in bits) + +/** + * first stage LSP codebook + * (10-dimensional, with 128 entries (3.24 of G.729) + */ +static const int16_t cb_lsp_1st[1< +#include "audiodsp.h" + +/** + * tilt compensation factor (G.729, k1>0) + * 0.2 in Q15 + */ +#define G729_TILT_FACTOR_PLUS 6554 + +/** + * tilt compensation factor (G.729, k1<0) + * 0.9 in Q15 + */ +#define G729_TILT_FACTOR_MINUS 29491 + +/* 4.2.2 */ +#define FORMANT_PP_FACTOR_NUM 18022 //0.55 in Q15 +#define FORMANT_PP_FACTOR_DEN 22938 //0.70 in Q15 + +/** + * gain adjustment factor (G.729, 4.2.4) + * 0.9875 in Q15 + */ +#define G729_AGC_FACTOR 32358 +#define G729_AGC_FAC1 (32768-G729_AGC_FACTOR) + +/** + * 1.0 / (1.0 + 0.5) in Q15 + * where 0.5 is the minimum value of + * weight factor, controlling amount of long-term postfiltering + */ +#define MIN_LT_FILT_FACTOR_A 21845 + +/** + * Short interpolation filter length + */ +#define SHORT_INT_FILT_LEN 2 + +/** + * Long interpolation filter length + */ +#define LONG_INT_FILT_LEN 8 + +/** + * Number of analyzed fractional pitch delays in second stage of long-term + * postfilter + */ +#define ANALYZED_FRAC_DELAYS 7 + +/** + * Amount of past residual signal data stored in buffer + */ +#define RES_PREV_DATA_SIZE (PITCH_DELAY_MAX + LONG_INT_FILT_LEN + 1) + +/** + * \brief Signal postfiltering (4.2) + * \param dsp initialized DSP context + * \param ht_prev_data [in/out] (Q12) pointer to variable receiving tilt + * compensation filter data from previous subframe + * \param voicing [in/out] (Q0) pointer to variable receiving voicing decision + * \param lp_filter_coeffs (Q12) LP filter coefficients + * \param pitch_delay_int integer part of the pitch delay + * \param residual [in/out] (Q0) residual signal buffer (used in long-term postfilter) + * \param res_filter_data [in/out] (Q0) speech data of previous subframe + * \param pos_filter_data [in/out] (Q0) previous speech data for short-term postfilter + * \param speech [in/out] (Q0) signal buffer + * \param subframe_size size of subframe + * + * Filtering has the following stages: + * Long-term postfilter (4.2.1) + * Short-term postfilter (4.2.2). + * Tilt-compensation (4.2.3) + */ +void ff_g729_postfilter(AudioDSPContext *adsp, int16_t* ht_prev_data, int* voicing, + const int16_t *lp_filter_coeffs, int pitch_delay_int, + int16_t* residual, int16_t* res_filter_data, + int16_t* pos_filter_data, int16_t *speech, + int subframe_size); + +/** + * \brief Adaptive gain control (4.2.4) + * \param gain_before (Q0) gain of speech before applying postfilters + * \param gain_after (Q0) gain of speech after applying postfilters + * \param speech [in/out] (Q0) signal buffer + * \param subframe_size length of subframe + * \param gain_prev (Q12) previous value of gain coefficient + * + * \return (Q12) last value of gain coefficient + */ +int16_t ff_g729_adaptive_gain_control(int gain_before, int gain_after, int16_t *speech, + int subframe_size, int16_t gain_prev); + +#endif // AVCODEC_G729POSTFILTER_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/get_bits.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/get_bits.h new file mode 100644 index 00000000..66fb8775 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/get_bits.h @@ -0,0 +1,868 @@ +/* + * Copyright (c) 2004 Michael Niedermayer + * Copyright (c) 2016 Alexandra Hájková + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * bitstream reader API header. + */ + +#ifndef AVCODEC_GET_BITS_H +#define AVCODEC_GET_BITS_H + +#include + +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/log.h" +#include "libavutil/avassert.h" +#include "avcodec.h" +#include "mathops.h" +#include "vlc.h" + +/* + * Safe bitstream reading: + * optionally, the get_bits API can check to ensure that we + * don't read past input buffer boundaries. This is protected + * with CONFIG_SAFE_BITSTREAM_READER at the global level, and + * then below that with UNCHECKED_BITSTREAM_READER at the per- + * decoder level. This means that decoders that check internally + * can "#define UNCHECKED_BITSTREAM_READER 1" to disable + * overread checks. + * Boundary checking causes a minor performance penalty so for + * applications that won't want/need this, it can be disabled + * globally using "#define CONFIG_SAFE_BITSTREAM_READER 0". + */ +#ifndef UNCHECKED_BITSTREAM_READER +#define UNCHECKED_BITSTREAM_READER !CONFIG_SAFE_BITSTREAM_READER +#endif + +#ifndef CACHED_BITSTREAM_READER +#define CACHED_BITSTREAM_READER 0 +#endif + +typedef struct GetBitContext { + const uint8_t *buffer, *buffer_end; +#if CACHED_BITSTREAM_READER + uint64_t cache; + unsigned bits_left; +#endif + int index; + int size_in_bits; + int size_in_bits_plus8; +} GetBitContext; + +static inline unsigned int get_bits(GetBitContext *s, int n); +static inline void skip_bits(GetBitContext *s, int n); +static inline unsigned int show_bits(GetBitContext *s, int n); + +/* Bitstream reader API docs: + * name + * arbitrary name which is used as prefix for the internal variables + * + * gb + * getbitcontext + * + * OPEN_READER(name, gb) + * load gb into local variables + * + * CLOSE_READER(name, gb) + * store local vars in gb + * + * UPDATE_CACHE(name, gb) + * Refill the internal cache from the bitstream. + * After this call at least MIN_CACHE_BITS will be available. + * + * GET_CACHE(name, gb) + * Will output the contents of the internal cache, + * next bit is MSB of 32 or 64 bits (FIXME 64 bits). + * + * SHOW_UBITS(name, gb, num) + * Will return the next num bits. + * + * SHOW_SBITS(name, gb, num) + * Will return the next num bits and do sign extension. + * + * SKIP_BITS(name, gb, num) + * Will skip over the next num bits. + * Note, this is equivalent to SKIP_CACHE; SKIP_COUNTER. + * + * SKIP_CACHE(name, gb, num) + * Will remove the next num bits from the cache (note SKIP_COUNTER + * MUST be called before UPDATE_CACHE / CLOSE_READER). + * + * SKIP_COUNTER(name, gb, num) + * Will increment the internal bit counter (see SKIP_CACHE & SKIP_BITS). + * + * LAST_SKIP_BITS(name, gb, num) + * Like SKIP_BITS, to be used if next call is UPDATE_CACHE or CLOSE_READER. + * + * BITS_LEFT(name, gb) + * Return the number of bits left + * + * For examples see get_bits, show_bits, skip_bits, get_vlc. + */ + +#if CACHED_BITSTREAM_READER +# define MIN_CACHE_BITS 64 +#elif defined LONG_BITSTREAM_READER +# define MIN_CACHE_BITS 32 +#else +# define MIN_CACHE_BITS 25 +#endif + +#if !CACHED_BITSTREAM_READER + +#define OPEN_READER_NOSIZE(name, gb) \ + unsigned int name ## _index = (gb)->index; \ + unsigned int av_unused name ## _cache + +#if UNCHECKED_BITSTREAM_READER +#define OPEN_READER(name, gb) OPEN_READER_NOSIZE(name, gb) + +#define BITS_AVAILABLE(name, gb) 1 +#else +#define OPEN_READER(name, gb) \ + OPEN_READER_NOSIZE(name, gb); \ + unsigned int name ## _size_plus8 = (gb)->size_in_bits_plus8 + +#define BITS_AVAILABLE(name, gb) name ## _index < name ## _size_plus8 +#endif + +#define CLOSE_READER(name, gb) (gb)->index = name ## _index + +# ifdef LONG_BITSTREAM_READER + +# define UPDATE_CACHE_LE(name, gb) name ## _cache = \ + AV_RL64((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7) + +# define UPDATE_CACHE_BE(name, gb) name ## _cache = \ + AV_RB64((gb)->buffer + (name ## _index >> 3)) >> (32 - (name ## _index & 7)) + +#else + +# define UPDATE_CACHE_LE(name, gb) name ## _cache = \ + AV_RL32((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7) + +# define UPDATE_CACHE_BE(name, gb) name ## _cache = \ + AV_RB32((gb)->buffer + (name ## _index >> 3)) << (name ## _index & 7) + +#endif + + +#ifdef BITSTREAM_READER_LE + +# define UPDATE_CACHE(name, gb) UPDATE_CACHE_LE(name, gb) + +# define SKIP_CACHE(name, gb, num) name ## _cache >>= (num) + +#else + +# define UPDATE_CACHE(name, gb) UPDATE_CACHE_BE(name, gb) + +# define SKIP_CACHE(name, gb, num) name ## _cache <<= (num) + +#endif + +#if UNCHECKED_BITSTREAM_READER +# define SKIP_COUNTER(name, gb, num) name ## _index += (num) +#else +# define SKIP_COUNTER(name, gb, num) \ + name ## _index = FFMIN(name ## _size_plus8, name ## _index + (num)) +#endif + +#define BITS_LEFT(name, gb) ((int)((gb)->size_in_bits - name ## _index)) + +#define SKIP_BITS(name, gb, num) \ + do { \ + SKIP_CACHE(name, gb, num); \ + SKIP_COUNTER(name, gb, num); \ + } while (0) + +#define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) + +#define SHOW_UBITS_LE(name, gb, num) zero_extend(name ## _cache, num) +#define SHOW_SBITS_LE(name, gb, num) sign_extend(name ## _cache, num) + +#define SHOW_UBITS_BE(name, gb, num) NEG_USR32(name ## _cache, num) +#define SHOW_SBITS_BE(name, gb, num) NEG_SSR32(name ## _cache, num) + +#ifdef BITSTREAM_READER_LE +# define SHOW_UBITS(name, gb, num) SHOW_UBITS_LE(name, gb, num) +# define SHOW_SBITS(name, gb, num) SHOW_SBITS_LE(name, gb, num) +#else +# define SHOW_UBITS(name, gb, num) SHOW_UBITS_BE(name, gb, num) +# define SHOW_SBITS(name, gb, num) SHOW_SBITS_BE(name, gb, num) +#endif + +#define GET_CACHE(name, gb) ((uint32_t) name ## _cache) + +#endif + +static inline int get_bits_count(const GetBitContext *s) +{ +#if CACHED_BITSTREAM_READER + return s->index - s->bits_left; +#else + return s->index; +#endif +} + +#if CACHED_BITSTREAM_READER +static inline void refill_32(GetBitContext *s, int is_le) +{ +#if !UNCHECKED_BITSTREAM_READER + if (s->index >> 3 >= s->buffer_end - s->buffer) + return; +#endif + + if (is_le) + s->cache = (uint64_t)AV_RL32(s->buffer + (s->index >> 3)) << s->bits_left | s->cache; + else + s->cache = s->cache | (uint64_t)AV_RB32(s->buffer + (s->index >> 3)) << (32 - s->bits_left); + s->index += 32; + s->bits_left += 32; +} + +static inline void refill_64(GetBitContext *s, int is_le) +{ +#if !UNCHECKED_BITSTREAM_READER + if (s->index >> 3 >= s->buffer_end - s->buffer) + return; +#endif + + if (is_le) + s->cache = AV_RL64(s->buffer + (s->index >> 3)); + else + s->cache = AV_RB64(s->buffer + (s->index >> 3)); + s->index += 64; + s->bits_left = 64; +} + +static inline uint64_t get_val(GetBitContext *s, unsigned n, int is_le) +{ + uint64_t ret; + av_assert2(n>0 && n<=63); + if (is_le) { + ret = s->cache & ((UINT64_C(1) << n) - 1); + s->cache >>= n; + } else { + ret = s->cache >> (64 - n); + s->cache <<= n; + } + s->bits_left -= n; + return ret; +} + +static inline unsigned show_val(const GetBitContext *s, unsigned n) +{ +#ifdef BITSTREAM_READER_LE + return s->cache & ((UINT64_C(1) << n) - 1); +#else + return s->cache >> (64 - n); +#endif +} +#endif + +/** + * Skips the specified number of bits. + * @param n the number of bits to skip, + * For the UNCHECKED_BITSTREAM_READER this must not cause the distance + * from the start to overflow int32_t. Staying within the bitstream + padding + * is sufficient, too. + */ +static inline void skip_bits_long(GetBitContext *s, int n) +{ +#if CACHED_BITSTREAM_READER + skip_bits(s, n); +#else +#if UNCHECKED_BITSTREAM_READER + s->index += n; +#else + s->index += av_clip(n, -s->index, s->size_in_bits_plus8 - s->index); +#endif +#endif +} + +#if CACHED_BITSTREAM_READER +static inline void skip_remaining(GetBitContext *s, unsigned n) +{ +#ifdef BITSTREAM_READER_LE + s->cache >>= n; +#else + s->cache <<= n; +#endif + s->bits_left -= n; +} +#endif + +/** + * Read MPEG-1 dc-style VLC (sign bit + mantissa with no MSB). + * if MSB not set it is negative + * @param n length in bits + */ +static inline int get_xbits(GetBitContext *s, int n) +{ +#if CACHED_BITSTREAM_READER + int32_t cache = show_bits(s, 32); + int sign = ~cache >> 31; + skip_remaining(s, n); + + return ((((uint32_t)(sign ^ cache)) >> (32 - n)) ^ sign) - sign; +#else + register int sign; + register int32_t cache; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE(re, s); + cache = GET_CACHE(re, s); + sign = ~cache >> 31; + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); + return (NEG_USR32(sign ^ cache, n) ^ sign) - sign; +#endif +} + +#if !CACHED_BITSTREAM_READER +static inline int get_xbits_le(GetBitContext *s, int n) +{ + register int sign; + register int32_t cache; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE_LE(re, s); + cache = GET_CACHE(re, s); + sign = sign_extend(~cache, n) >> 31; + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); + return (zero_extend(sign ^ cache, n) ^ sign) - sign; +} +#endif + +static inline int get_sbits(GetBitContext *s, int n) +{ + register int tmp; +#if CACHED_BITSTREAM_READER + av_assert2(n>0 && n<=25); + tmp = sign_extend(get_bits(s, n), n); +#else + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE(re, s); + tmp = SHOW_SBITS(re, s, n); + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); +#endif + return tmp; +} + +/** + * Read 1-25 bits. + */ +static inline unsigned int get_bits(GetBitContext *s, int n) +{ + register unsigned int tmp; +#if CACHED_BITSTREAM_READER + + av_assert2(n>0 && n<=32); + if (n > s->bits_left) { +#ifdef BITSTREAM_READER_LE + refill_32(s, 1); +#else + refill_32(s, 0); +#endif + if (s->bits_left < 32) + s->bits_left = n; + } + +#ifdef BITSTREAM_READER_LE + tmp = get_val(s, n, 1); +#else + tmp = get_val(s, n, 0); +#endif +#else + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE(re, s); + tmp = SHOW_UBITS(re, s, n); + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); +#endif + av_assert2(tmp < UINT64_C(1) << n); + return tmp; +} + +/** + * Read 0-25 bits. + */ +static av_always_inline int get_bitsz(GetBitContext *s, int n) +{ + return n ? get_bits(s, n) : 0; +} + +static inline unsigned int get_bits_le(GetBitContext *s, int n) +{ +#if CACHED_BITSTREAM_READER + av_assert2(n>0 && n<=32); + if (n > s->bits_left) { + refill_32(s, 1); + if (s->bits_left < 32) + s->bits_left = n; + } + + return get_val(s, n, 1); +#else + register int tmp; + OPEN_READER(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE_LE(re, s); + tmp = SHOW_UBITS_LE(re, s, n); + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); + return tmp; +#endif +} + +/** + * Show 1-25 bits. + */ +static inline unsigned int show_bits(GetBitContext *s, int n) +{ + register unsigned int tmp; +#if CACHED_BITSTREAM_READER + if (n > s->bits_left) +#ifdef BITSTREAM_READER_LE + refill_32(s, 1); +#else + refill_32(s, 0); +#endif + + tmp = show_val(s, n); +#else + OPEN_READER_NOSIZE(re, s); + av_assert2(n>0 && n<=25); + UPDATE_CACHE(re, s); + tmp = SHOW_UBITS(re, s, n); +#endif + return tmp; +} + +static inline void skip_bits(GetBitContext *s, int n) +{ +#if CACHED_BITSTREAM_READER + if (n < s->bits_left) + skip_remaining(s, n); + else { + n -= s->bits_left; + s->cache = 0; + s->bits_left = 0; + + if (n >= 64) { + unsigned skip = (n / 8) * 8; + + n -= skip; + s->index += skip; + } +#ifdef BITSTREAM_READER_LE + refill_64(s, 1); +#else + refill_64(s, 0); +#endif + if (n) + skip_remaining(s, n); + } +#else + OPEN_READER(re, s); + LAST_SKIP_BITS(re, s, n); + CLOSE_READER(re, s); +#endif +} + +static inline unsigned int get_bits1(GetBitContext *s) +{ +#if CACHED_BITSTREAM_READER + if (!s->bits_left) +#ifdef BITSTREAM_READER_LE + refill_64(s, 1); +#else + refill_64(s, 0); +#endif + +#ifdef BITSTREAM_READER_LE + return get_val(s, 1, 1); +#else + return get_val(s, 1, 0); +#endif +#else + unsigned int index = s->index; + uint8_t result = s->buffer[index >> 3]; +#ifdef BITSTREAM_READER_LE + result >>= index & 7; + result &= 1; +#else + result <<= index & 7; + result >>= 8 - 1; +#endif +#if !UNCHECKED_BITSTREAM_READER + if (s->index < s->size_in_bits_plus8) +#endif + index++; + s->index = index; + + return result; +#endif +} + +static inline unsigned int show_bits1(GetBitContext *s) +{ + return show_bits(s, 1); +} + +static inline void skip_bits1(GetBitContext *s) +{ + skip_bits(s, 1); +} + +/** + * Read 0-32 bits. + */ +static inline unsigned int get_bits_long(GetBitContext *s, int n) +{ + av_assert2(n>=0 && n<=32); + if (!n) { + return 0; +#if CACHED_BITSTREAM_READER + } + return get_bits(s, n); +#else + } else if (n <= MIN_CACHE_BITS) { + return get_bits(s, n); + } else { +#ifdef BITSTREAM_READER_LE + unsigned ret = get_bits(s, 16); + return ret | (get_bits(s, n - 16) << 16); +#else + unsigned ret = get_bits(s, 16) << (n - 16); + return ret | get_bits(s, n - 16); +#endif + } +#endif +} + +/** + * Read 0-64 bits. + */ +static inline uint64_t get_bits64(GetBitContext *s, int n) +{ + if (n <= 32) { + return get_bits_long(s, n); + } else { +#ifdef BITSTREAM_READER_LE + uint64_t ret = get_bits_long(s, 32); + return ret | (uint64_t) get_bits_long(s, n - 32) << 32; +#else + uint64_t ret = (uint64_t) get_bits_long(s, n - 32) << 32; + return ret | get_bits_long(s, 32); +#endif + } +} + +/** + * Read 0-32 bits as a signed integer. + */ +static inline int get_sbits_long(GetBitContext *s, int n) +{ + // sign_extend(x, 0) is undefined + if (!n) + return 0; + + return sign_extend(get_bits_long(s, n), n); +} + +/** + * Show 0-32 bits. + */ +static inline unsigned int show_bits_long(GetBitContext *s, int n) +{ + if (n <= MIN_CACHE_BITS) { + return show_bits(s, n); + } else { + GetBitContext gb = *s; + return get_bits_long(&gb, n); + } +} + +static inline int check_marker(void *logctx, GetBitContext *s, const char *msg) +{ + int bit = get_bits1(s); + if (!bit) + av_log(logctx, AV_LOG_INFO, "Marker bit missing at %d of %d %s\n", + get_bits_count(s) - 1, s->size_in_bits, msg); + + return bit; +} + +static inline int init_get_bits_xe(GetBitContext *s, const uint8_t *buffer, + int bit_size, int is_le) +{ + int buffer_size; + int ret = 0; + + if (bit_size >= INT_MAX - FFMAX(7, AV_INPUT_BUFFER_PADDING_SIZE*8) || bit_size < 0 || !buffer) { + bit_size = 0; + buffer = NULL; + ret = AVERROR_INVALIDDATA; + } + + buffer_size = (bit_size + 7) >> 3; + + s->buffer = buffer; + s->size_in_bits = bit_size; + s->size_in_bits_plus8 = bit_size + 8; + s->buffer_end = buffer + buffer_size; + s->index = 0; + +#if CACHED_BITSTREAM_READER + s->cache = 0; + s->bits_left = 0; + refill_64(s, is_le); +#endif + + return ret; +} + +/** + * Initialize GetBitContext. + * @param buffer bitstream buffer, must be AV_INPUT_BUFFER_PADDING_SIZE bytes + * larger than the actual read bits because some optimized bitstream + * readers read 32 or 64 bit at once and could read over the end + * @param bit_size the size of the buffer in bits + * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow. + */ +static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer, + int bit_size) +{ +#ifdef BITSTREAM_READER_LE + return init_get_bits_xe(s, buffer, bit_size, 1); +#else + return init_get_bits_xe(s, buffer, bit_size, 0); +#endif +} + +/** + * Initialize GetBitContext. + * @param buffer bitstream buffer, must be AV_INPUT_BUFFER_PADDING_SIZE bytes + * larger than the actual read bits because some optimized bitstream + * readers read 32 or 64 bit at once and could read over the end + * @param byte_size the size of the buffer in bytes + * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow. + */ +static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer, + int byte_size) +{ + if (byte_size > INT_MAX / 8 || byte_size < 0) + byte_size = -1; + return init_get_bits(s, buffer, byte_size * 8); +} + +static inline int init_get_bits8_le(GetBitContext *s, const uint8_t *buffer, + int byte_size) +{ + if (byte_size > INT_MAX / 8 || byte_size < 0) + byte_size = -1; + return init_get_bits_xe(s, buffer, byte_size * 8, 1); +} + +static inline const uint8_t *align_get_bits(GetBitContext *s) +{ + int n = -get_bits_count(s) & 7; + if (n) + skip_bits(s, n); + return s->buffer + (s->index >> 3); +} + +/** + * If the vlc code is invalid and max_depth=1, then no bits will be removed. + * If the vlc code is invalid and max_depth>1, then the number of bits removed + * is undefined. + */ +#define GET_VLC(code, name, gb, table, bits, max_depth) \ + do { \ + int n, nb_bits; \ + unsigned int index; \ + \ + index = SHOW_UBITS(name, gb, bits); \ + code = table[index][0]; \ + n = table[index][1]; \ + \ + if (max_depth > 1 && n < 0) { \ + LAST_SKIP_BITS(name, gb, bits); \ + UPDATE_CACHE(name, gb); \ + \ + nb_bits = -n; \ + \ + index = SHOW_UBITS(name, gb, nb_bits) + code; \ + code = table[index][0]; \ + n = table[index][1]; \ + if (max_depth > 2 && n < 0) { \ + LAST_SKIP_BITS(name, gb, nb_bits); \ + UPDATE_CACHE(name, gb); \ + \ + nb_bits = -n; \ + \ + index = SHOW_UBITS(name, gb, nb_bits) + code; \ + code = table[index][0]; \ + n = table[index][1]; \ + } \ + } \ + SKIP_BITS(name, gb, n); \ + } while (0) + +#define GET_RL_VLC(level, run, name, gb, table, bits, \ + max_depth, need_update) \ + do { \ + int n, nb_bits; \ + unsigned int index; \ + \ + index = SHOW_UBITS(name, gb, bits); \ + level = table[index].level; \ + n = table[index].len; \ + \ + if (max_depth > 1 && n < 0) { \ + SKIP_BITS(name, gb, bits); \ + if (need_update) { \ + UPDATE_CACHE(name, gb); \ + } \ + \ + nb_bits = -n; \ + \ + index = SHOW_UBITS(name, gb, nb_bits) + level; \ + level = table[index].level; \ + n = table[index].len; \ + if (max_depth > 2 && n < 0) { \ + LAST_SKIP_BITS(name, gb, nb_bits); \ + if (need_update) { \ + UPDATE_CACHE(name, gb); \ + } \ + nb_bits = -n; \ + \ + index = SHOW_UBITS(name, gb, nb_bits) + level; \ + level = table[index].level; \ + n = table[index].len; \ + } \ + } \ + run = table[index].run; \ + SKIP_BITS(name, gb, n); \ + } while (0) + +/* Return the LUT element for the given bitstream configuration. */ +static inline int set_idx(GetBitContext *s, int code, int *n, int *nb_bits, + VLC_TYPE (*table)[2]) +{ + unsigned idx; + + *nb_bits = -*n; + idx = show_bits(s, *nb_bits) + code; + *n = table[idx][1]; + + return table[idx][0]; +} + +/** + * Parse a vlc code. + * @param bits is the number of bits which will be read at once, must be + * identical to nb_bits in init_vlc() + * @param max_depth is the number of times bits bits must be read to completely + * read the longest vlc code + * = (max_vlc_length + bits - 1) / bits + * @returns the code parsed or -1 if no vlc matches + */ +static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2], + int bits, int max_depth) +{ +#if CACHED_BITSTREAM_READER + int nb_bits; + unsigned idx = show_bits(s, bits); + int code = table[idx][0]; + int n = table[idx][1]; + + if (max_depth > 1 && n < 0) { + skip_remaining(s, bits); + code = set_idx(s, code, &n, &nb_bits, table); + if (max_depth > 2 && n < 0) { + skip_remaining(s, nb_bits); + code = set_idx(s, code, &n, &nb_bits, table); + } + } + skip_remaining(s, n); + + return code; +#else + int code; + + OPEN_READER(re, s); + UPDATE_CACHE(re, s); + + GET_VLC(code, re, s, table, bits, max_depth); + + CLOSE_READER(re, s); + + return code; +#endif +} + +static inline int decode012(GetBitContext *gb) +{ + int n; + n = get_bits1(gb); + if (n == 0) + return 0; + else + return get_bits1(gb) + 1; +} + +static inline int decode210(GetBitContext *gb) +{ + if (get_bits1(gb)) + return 0; + else + return 2 - get_bits1(gb); +} + +static inline int get_bits_left(GetBitContext *gb) +{ + return gb->size_in_bits - get_bits_count(gb); +} + +static inline int skip_1stop_8data_bits(GetBitContext *gb) +{ + if (get_bits_left(gb) <= 0) + return AVERROR_INVALIDDATA; + + while (get_bits1(gb)) { + skip_bits(gb, 8); + if (get_bits_left(gb) <= 0) + return AVERROR_INVALIDDATA; + } + + return 0; +} + +#endif /* AVCODEC_GET_BITS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gif.h new file mode 100644 index 00000000..7fb61495 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gif.h @@ -0,0 +1,50 @@ +/* + * GIF format definitions + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Baptiste Coudurier + * Copyright (c) 2012 Vitaliy E Sugrobov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * GIF format definitions. + */ + +#ifndef AVCODEC_GIF_H +#define AVCODEC_GIF_H + +#include + +static const uint8_t gif87a_sig[6] = "GIF87a"; +static const uint8_t gif89a_sig[6] = "GIF89a"; + +#define GCE_DISPOSAL_NONE 0 +#define GCE_DISPOSAL_INPLACE 1 +#define GCE_DISPOSAL_BACKGROUND 2 +#define GCE_DISPOSAL_RESTORE 3 + +#define GIF_TRAILER 0x3b +#define GIF_EXTENSION_INTRODUCER 0x21 +#define GIF_IMAGE_SEPARATOR 0x2c +#define GIF_GCE_EXT_LABEL 0xf9 +#define GIF_COM_EXT_LABEL 0xfe +#define GIF_APP_EXT_LABEL 0xff +#define NETSCAPE_EXT_STR "NETSCAPE2.0" + +#endif /* AVCODEC_GIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/golomb.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/golomb.h new file mode 100644 index 00000000..7fd46a91 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/golomb.h @@ -0,0 +1,747 @@ +/* + * exp golomb vlc stuff + * Copyright (c) 2003 Michael Niedermayer + * Copyright (c) 2004 Alex Beregszaszi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief + * exp golomb vlc stuff + * @author Michael Niedermayer and Alex Beregszaszi + */ + +#ifndef AVCODEC_GOLOMB_H +#define AVCODEC_GOLOMB_H + +#include + +#include "get_bits.h" +#include "put_bits.h" + +#define INVALID_VLC 0x80000000 + +extern const uint8_t ff_golomb_vlc_len[512]; +extern const uint8_t ff_ue_golomb_vlc_code[512]; +extern const int8_t ff_se_golomb_vlc_code[512]; +extern const uint8_t ff_ue_golomb_len[256]; + +extern const uint8_t ff_interleaved_golomb_vlc_len[256]; +extern const uint8_t ff_interleaved_ue_golomb_vlc_code[256]; +extern const int8_t ff_interleaved_se_golomb_vlc_code[256]; +extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256]; + +/** + * Read an unsigned Exp-Golomb code in the range 0 to 8190. + * + * @returns the read value or a negative error code. + */ +static inline int get_ue_golomb(GetBitContext *gb) +{ + unsigned int buf; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + if (buf >= (1 << 27)) { + buf >>= 32 - 9; + skip_bits_long(gb, ff_golomb_vlc_len[buf]); + + return ff_ue_golomb_vlc_code[buf]; + } else { + int log = 2 * av_log2(buf) - 31; + buf >>= log; + buf--; + skip_bits_long(gb, 32 - log); + + return buf; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + if (buf >= (1 << 27)) { + buf >>= 32 - 9; + LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]); + CLOSE_READER(re, gb); + + return ff_ue_golomb_vlc_code[buf]; + } else { + int log = 2 * av_log2(buf) - 31; + LAST_SKIP_BITS(re, gb, 32 - log); + CLOSE_READER(re, gb); + if (log < 7) { + av_log(NULL, AV_LOG_ERROR, "Invalid UE golomb code\n"); + return AVERROR_INVALIDDATA; + } + buf >>= log; + buf--; + + return buf; + } +#endif +} + +/** + * Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1. + */ +static inline unsigned get_ue_golomb_long(GetBitContext *gb) +{ + unsigned buf, log; + + buf = show_bits_long(gb, 32); + log = 31 - av_log2(buf); + skip_bits_long(gb, log); + + return get_bits_long(gb, log + 1) - 1; +} + +/** + * read unsigned exp golomb code, constraint to a max of 31. + * the return value is undefined if the stored value exceeds 31. + */ +static inline int get_ue_golomb_31(GetBitContext *gb) +{ + unsigned int buf; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + buf >>= 32 - 9; + skip_bits_long(gb, ff_golomb_vlc_len[buf]); +#else + + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + buf >>= 32 - 9; + LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]); + CLOSE_READER(re, gb); +#endif + + return ff_ue_golomb_vlc_code[buf]; +} + +static inline unsigned get_interleaved_ue_golomb(GetBitContext *gb) +{ + uint32_t buf; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + if (buf & 0xAA800000) { + buf >>= 32 - 8; + skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]); + + return ff_interleaved_ue_golomb_vlc_code[buf]; + } else { + unsigned ret = 1; + + do { + buf >>= 32 - 8; + skip_bits_long(gb, FFMIN(ff_interleaved_golomb_vlc_len[buf], 8)); + + if (ff_interleaved_golomb_vlc_len[buf] != 9) { + ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1; + ret |= ff_interleaved_dirac_golomb_vlc_code[buf]; + break; + } + ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf]; + buf = show_bits_long(gb, 32); + } while (get_bits_left(gb) > 0); + + return ret - 1; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + if (buf & 0xAA800000) { + buf >>= 32 - 8; + LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]); + CLOSE_READER(re, gb); + + return ff_interleaved_ue_golomb_vlc_code[buf]; + } else { + unsigned ret = 1; + + do { + buf >>= 32 - 8; + LAST_SKIP_BITS(re, gb, + FFMIN(ff_interleaved_golomb_vlc_len[buf], 8)); + + if (ff_interleaved_golomb_vlc_len[buf] != 9) { + ret <<= (ff_interleaved_golomb_vlc_len[buf] - 1) >> 1; + ret |= ff_interleaved_dirac_golomb_vlc_code[buf]; + break; + } + ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf]; + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + } while (ret<0x8000000U && BITS_AVAILABLE(re, gb)); + + CLOSE_READER(re, gb); + return ret - 1; + } +#endif +} + +/** + * read unsigned truncated exp golomb code. + */ +static inline int get_te0_golomb(GetBitContext *gb, int range) +{ + av_assert2(range >= 1); + + if (range == 1) + return 0; + else if (range == 2) + return get_bits1(gb) ^ 1; + else + return get_ue_golomb(gb); +} + +/** + * read unsigned truncated exp golomb code. + */ +static inline int get_te_golomb(GetBitContext *gb, int range) +{ + av_assert2(range >= 1); + + if (range == 2) + return get_bits1(gb) ^ 1; + else + return get_ue_golomb(gb); +} + +/** + * read signed exp golomb code. + */ +static inline int get_se_golomb(GetBitContext *gb) +{ + unsigned int buf; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + if (buf >= (1 << 27)) { + buf >>= 32 - 9; + skip_bits_long(gb, ff_golomb_vlc_len[buf]); + + return ff_se_golomb_vlc_code[buf]; + } else { + int log = 2 * av_log2(buf) - 31; + buf >>= log; + + skip_bits_long(gb, 32 - log); + + if (buf & 1) + buf = -(buf >> 1); + else + buf = (buf >> 1); + + return buf; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + if (buf >= (1 << 27)) { + buf >>= 32 - 9; + LAST_SKIP_BITS(re, gb, ff_golomb_vlc_len[buf]); + CLOSE_READER(re, gb); + + return ff_se_golomb_vlc_code[buf]; + } else { + int log = av_log2(buf), sign; + LAST_SKIP_BITS(re, gb, 31 - log); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + buf >>= log; + + LAST_SKIP_BITS(re, gb, 32 - log); + CLOSE_READER(re, gb); + + sign = -(buf & 1); + buf = ((buf >> 1) ^ sign) - sign; + + return buf; + } +#endif +} + +static inline int get_se_golomb_long(GetBitContext *gb) +{ + unsigned int buf = get_ue_golomb_long(gb); + int sign = (buf & 1) - 1; + return ((buf >> 1) ^ sign) + 1; +} + +static inline int get_interleaved_se_golomb(GetBitContext *gb) +{ + unsigned int buf; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + if (buf & 0xAA800000) { + buf >>= 32 - 8; + skip_bits_long(gb, ff_interleaved_golomb_vlc_len[buf]); + + return ff_interleaved_se_golomb_vlc_code[buf]; + } else { + int log; + skip_bits(gb, 8); + buf |= 1 | show_bits(gb, 24); + + if ((buf & 0xAAAAAAAA) == 0) + return INVALID_VLC; + + for (log = 31; (buf & 0x80000000) == 0; log--) + buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30); + + skip_bits_long(gb, 63 - 2 * log - 8); + + return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + if (buf & 0xAA800000) { + buf >>= 32 - 8; + LAST_SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]); + CLOSE_READER(re, gb); + + return ff_interleaved_se_golomb_vlc_code[buf]; + } else { + int log; + LAST_SKIP_BITS(re, gb, 8); + UPDATE_CACHE(re, gb); + buf |= 1 | (GET_CACHE(re, gb) >> 8); + + if ((buf & 0xAAAAAAAA) == 0) + return INVALID_VLC; + + for (log = 31; (buf & 0x80000000) == 0; log--) + buf = (buf << 2) - ((buf << log) >> (log - 1)) + (buf >> 30); + + LAST_SKIP_BITS(re, gb, 63 - 2 * log - 8); + CLOSE_READER(re, gb); + + return (signed) (((((buf << log) >> log) - 1) ^ -(buf & 0x1)) + 1) >> 1; + } +#endif +} + +static inline int dirac_get_se_golomb(GetBitContext *gb) +{ + uint32_t ret = get_interleaved_ue_golomb(gb); + + if (ret) { + int sign = -get_bits1(gb); + ret = (ret ^ sign) - sign; + } + + return ret; +} + +/** + * read unsigned golomb rice code (ffv1). + */ +static inline int get_ur_golomb(GetBitContext *gb, int k, int limit, + int esc_len) +{ + unsigned int buf; + int log; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + log = av_log2(buf); + + if (log > 31 - limit) { + buf >>= log - k; + buf += (30 - log) << k; + skip_bits_long(gb, 32 + k - log); + + return buf; + } else { + skip_bits_long(gb, limit); + buf = get_bits_long(gb, esc_len); + + return buf + limit - 1; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + log = av_log2(buf); + + if (log > 31 - limit) { + buf >>= log - k; + buf += (30U - log) << k; + LAST_SKIP_BITS(re, gb, 32 + k - log); + CLOSE_READER(re, gb); + + return buf; + } else { + LAST_SKIP_BITS(re, gb, limit); + UPDATE_CACHE(re, gb); + + buf = SHOW_UBITS(re, gb, esc_len); + + LAST_SKIP_BITS(re, gb, esc_len); + CLOSE_READER(re, gb); + + return buf + limit - 1; + } +#endif +} + +/** + * read unsigned golomb rice code (jpegls). + */ +static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, + int esc_len) +{ + unsigned int buf; + int log; + +#if CACHED_BITSTREAM_READER + buf = show_bits_long(gb, 32); + + log = av_log2(buf); + + if (log - k >= 1 && 32 - log < limit) { + buf >>= log - k; + buf += (30 - log) << k; + skip_bits_long(gb, 32 + k - log); + + return buf; + } else { + int i; + for (i = 0; + i < limit && get_bits1(gb) == 0 && get_bits_left(gb) > 0; + i++); + + if (i < limit - 1) { + buf = get_bits_long(gb, k); + + return buf + (i << k); + } else if (i == limit - 1) { + buf = get_bits_long(gb, esc_len); + + return buf + 1; + } else + return -1; + } +#else + OPEN_READER(re, gb); + UPDATE_CACHE(re, gb); + buf = GET_CACHE(re, gb); + + log = av_log2(buf); + + av_assert2(k <= 31); + + if (log - k >= 32 - MIN_CACHE_BITS + (MIN_CACHE_BITS == 32) && + 32 - log < limit) { + buf >>= log - k; + buf += (30U - log) << k; + LAST_SKIP_BITS(re, gb, 32 + k - log); + CLOSE_READER(re, gb); + + return buf; + } else { + int i; + for (i = 0; i + MIN_CACHE_BITS <= limit && SHOW_UBITS(re, gb, MIN_CACHE_BITS) == 0; i += MIN_CACHE_BITS) { + if (gb->size_in_bits <= re_index) { + CLOSE_READER(re, gb); + return -1; + } + LAST_SKIP_BITS(re, gb, MIN_CACHE_BITS); + UPDATE_CACHE(re, gb); + } + for (; i < limit && SHOW_UBITS(re, gb, 1) == 0; i++) { + SKIP_BITS(re, gb, 1); + } + LAST_SKIP_BITS(re, gb, 1); + UPDATE_CACHE(re, gb); + + if (i < limit - 1) { + if (k) { + if (k > MIN_CACHE_BITS - 1) { + buf = SHOW_UBITS(re, gb, 16) << (k-16); + LAST_SKIP_BITS(re, gb, 16); + UPDATE_CACHE(re, gb); + buf |= SHOW_UBITS(re, gb, k-16); + LAST_SKIP_BITS(re, gb, k-16); + } else { + buf = SHOW_UBITS(re, gb, k); + LAST_SKIP_BITS(re, gb, k); + } + } else { + buf = 0; + } + + buf += ((SUINT)i << k); + } else if (i == limit - 1) { + buf = SHOW_UBITS(re, gb, esc_len); + LAST_SKIP_BITS(re, gb, esc_len); + + buf ++; + } else { + buf = -1; + } + CLOSE_READER(re, gb); + return buf; + } +#endif +} + +/** + * read signed golomb rice code (ffv1). + */ +static inline int get_sr_golomb(GetBitContext *gb, int k, int limit, + int esc_len) +{ + unsigned v = get_ur_golomb(gb, k, limit, esc_len); + return (v >> 1) ^ -(v & 1); +} + +/** + * read signed golomb rice code (flac). + */ +static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, + int esc_len) +{ + unsigned v = get_ur_golomb_jpegls(gb, k, limit, esc_len); + return (v >> 1) ^ -(v & 1); +} + +/** + * read unsigned golomb rice code (shorten). + */ +static inline unsigned int get_ur_golomb_shorten(GetBitContext *gb, int k) +{ + return get_ur_golomb_jpegls(gb, k, INT_MAX, 0); +} + +/** + * read signed golomb rice code (shorten). + */ +static inline int get_sr_golomb_shorten(GetBitContext *gb, int k) +{ + int uvar = get_ur_golomb_jpegls(gb, k + 1, INT_MAX, 0); + return (uvar >> 1) ^ -(uvar & 1); +} + +#ifdef TRACE + +static inline int get_ue(GetBitContext *s, const char *file, const char *func, + int line) +{ + int show = show_bits(s, 24); + int pos = get_bits_count(s); + int i = get_ue_golomb(s); + int len = get_bits_count(s) - pos; + int bits = show >> (24 - len); + + av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d ue @%5d in %s %s:%d\n", + bits, len, i, pos, file, func, line); + + return i; +} + +static inline int get_se(GetBitContext *s, const char *file, const char *func, + int line) +{ + int show = show_bits(s, 24); + int pos = get_bits_count(s); + int i = get_se_golomb(s); + int len = get_bits_count(s) - pos; + int bits = show >> (24 - len); + + av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d se @%5d in %s %s:%d\n", + bits, len, i, pos, file, func, line); + + return i; +} + +static inline int get_te(GetBitContext *s, int r, char *file, const char *func, + int line) +{ + int show = show_bits(s, 24); + int pos = get_bits_count(s); + int i = get_te0_golomb(s, r); + int len = get_bits_count(s) - pos; + int bits = show >> (24 - len); + + av_log(NULL, AV_LOG_DEBUG, "%5d %2d %3d te @%5d in %s %s:%d\n", + bits, len, i, pos, file, func, line); + + return i; +} + +#define get_ue_golomb(a) get_ue(a, __FILE__, __func__, __LINE__) +#define get_se_golomb(a) get_se(a, __FILE__, __func__, __LINE__) +#define get_te_golomb(a, r) get_te(a, r, __FILE__, __func__, __LINE__) +#define get_te0_golomb(a, r) get_te(a, r, __FILE__, __func__, __LINE__) + +#endif /* TRACE */ + +/** + * write unsigned exp golomb code. 2^16 - 2 at most + */ +static inline void set_ue_golomb(PutBitContext *pb, int i) +{ + av_assert2(i >= 0); + av_assert2(i <= 0xFFFE); + + if (i < 256) + put_bits(pb, ff_ue_golomb_len[i], i + 1); + else { + int e = av_log2(i + 1); + put_bits(pb, 2 * e + 1, i + 1); + } +} + +/** + * write unsigned exp golomb code. 2^32-2 at most. + */ +static inline void set_ue_golomb_long(PutBitContext *pb, uint32_t i) +{ + av_assert2(i <= (UINT32_MAX - 1)); + + if (i < 256) + put_bits(pb, ff_ue_golomb_len[i], i + 1); + else { + int e = av_log2(i + 1); + put_bits64(pb, 2 * e + 1, i + 1); + } +} + +/** + * write truncated unsigned exp golomb code. + */ +static inline void set_te_golomb(PutBitContext *pb, int i, int range) +{ + av_assert2(range >= 1); + av_assert2(i <= range); + + if (range == 2) + put_bits(pb, 1, i ^ 1); + else + set_ue_golomb(pb, i); +} + +/** + * write signed exp golomb code. 16 bits at most. + */ +static inline void set_se_golomb(PutBitContext *pb, int i) +{ + i = 2 * i - 1; + if (i < 0) + i ^= -1; //FIXME check if gcc does the right thing + set_ue_golomb(pb, i); +} + +/** + * write unsigned golomb rice code (ffv1). + */ +static inline void set_ur_golomb(PutBitContext *pb, int i, int k, int limit, + int esc_len) +{ + int e; + + av_assert2(i >= 0); + + e = i >> k; + if (e < limit) + put_bits(pb, e + k + 1, (1 << k) + av_mod_uintp2(i, k)); + else + put_bits(pb, limit + esc_len, i - limit + 1); +} + +/** + * write unsigned golomb rice code (jpegls). + */ +static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, + int limit, int esc_len) +{ + int e; + + av_assert2(i >= 0); + + e = (i >> k) + 1; + if (e < limit) { + while (e > 31) { + put_bits(pb, 31, 0); + e -= 31; + } + put_bits(pb, e, 1); + if (k) + put_sbits(pb, k, i); + } else { + while (limit > 31) { + put_bits(pb, 31, 0); + limit -= 31; + } + put_bits(pb, limit, 1); + put_bits(pb, esc_len, i - 1); + } +} + +/** + * write signed golomb rice code (ffv1). + */ +static inline void set_sr_golomb(PutBitContext *pb, int i, int k, int limit, + int esc_len) +{ + int v; + + v = -2 * i - 1; + v ^= (v >> 31); + + set_ur_golomb(pb, v, k, limit, esc_len); +} + +/** + * write signed golomb rice code (flac). + */ +static inline void set_sr_golomb_flac(PutBitContext *pb, int i, int k, + int limit, int esc_len) +{ + int v; + + v = -2 * i - 1; + v ^= (v >> 31); + + set_ur_golomb_jpegls(pb, v, k, limit, esc_len); +} + +#endif /* AVCODEC_GOLOMB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsm.h new file mode 100644 index 00000000..53d65c4d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsm.h @@ -0,0 +1,45 @@ +/* + * GSM common header + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_GSM_H +#define AVCODEC_GSM_H + +/* bytes per block */ +#define GSM_BLOCK_SIZE 33 +#define GSM_MS_BLOCK_SIZE 65 +#define MSN_MIN_BLOCK_SIZE 41 + +/* samples per block */ +#define GSM_FRAME_SIZE 160 + +enum GSMModes { + GSM_13000 = 0, + MSN_12400, + MSN_11800, + MSN_11200, + MSN_10600, + MSN_10000, + MSN_9400, + MSN_8800, + MSN_8200, + NUM_GSM_MODES +}; + +#endif /* AVCODEC_GSM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsmdec_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsmdec_data.h new file mode 100644 index 00000000..f3499e8a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/gsmdec_data.h @@ -0,0 +1,46 @@ +/* + * gsm 06.10 decoder data + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_GSMDEC_DATA_H +#define AVCODEC_GSMDEC_DATA_H + +#include +#include "avcodec.h" + +typedef struct GSMContext { + // Contains first 120 elements from the previous frame + // (used by long_term_synth according to the "lag"), + // then in the following 160 elements the current + // frame is constructed. + int16_t ref_buf[280]; + int v[9]; + int lar[2][8]; + int lar_idx; + int msr; +} GSMContext; + +extern const uint16_t ff_gsm_long_term_gain_tab[4]; +extern const uint8_t ff_gsm_requant_tab[4][8]; +extern const int16_t ff_gsm_dequant_tab[64][8]; + +extern const int* const ff_gsm_apcm_bits[][4]; + +#endif /* AVCODEC_GSMDEC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h261.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h261.h new file mode 100644 index 00000000..399a404b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h261.h @@ -0,0 +1,72 @@ +/* + * H.261 codec + * Copyright (c) 2002-2004 Michael Niedermayer + * Copyright (c) 2004 Maarten Daniels + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.261 codec. + */ + +#ifndef AVCODEC_H261_H +#define AVCODEC_H261_H + +#include "mpegvideo.h" +#include "rl.h" + +/** + * H261Context + */ +typedef struct H261Context { + MpegEncContext s; + + int current_mba; + int mba_diff; + int mtype; + int current_mv_x; + int current_mv_y; + int gob_number; + int gob_start_code_skipped; // 1 if gob start code is already read before gob header is read +} H261Context; + +#define MB_TYPE_H261_FIL 0x800000 + +extern uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3]; + +extern const uint8_t ff_h261_mba_code[35]; +extern const uint8_t ff_h261_mba_bits[35]; +extern const uint8_t ff_h261_mtype_code[10]; +extern const uint8_t ff_h261_mtype_bits[10]; +extern const int ff_h261_mtype_map[10]; +extern const uint8_t ff_h261_mv_tab[17][2]; +extern const uint8_t ff_h261_cbp_tab[63][2]; +extern RLTable ff_h261_rl_tcoeff; + +void ff_h261_loop_filter(MpegEncContext *s); +void ff_h261_common_init(void); + +int ff_h261_get_picture_format(int width, int height); +void ff_h261_reorder_mb_index(MpegEncContext *s); +void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], + int motion_x, int motion_y); +void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_h261_encode_init(MpegEncContext *s); + +#endif /* AVCODEC_H261_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263.h new file mode 100644 index 00000000..f891f723 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263.h @@ -0,0 +1,184 @@ +/* + * H.263 internal header + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVCODEC_H263_H +#define AVCODEC_H263_H + +#include +#include "libavutil/rational.h" +#include "get_bits.h" +#include "mpegvideo.h" +#include "h263data.h" +#include "rl.h" + +#define FF_ASPECT_EXTENDED 15 +#define INT_BIT (CHAR_BIT * sizeof(int)) + +// The defines below define the number of bits that are read at once for +// reading vlc values. Changing these may improve speed and data cache needs +// be aware though that decreasing them may need the number of stages that is +// passed to get_vlc* to be increased. +#define INTRA_MCBPC_VLC_BITS 6 +#define INTER_MCBPC_VLC_BITS 7 +#define CBPY_VLC_BITS 6 +#define TEX_VLC_BITS 9 + +#define H263_GOB_HEIGHT(h) ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4) + +extern VLC ff_h263_intra_MCBPC_vlc; +extern VLC ff_h263_inter_MCBPC_vlc; +extern VLC ff_h263_cbpy_vlc; + +extern const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[]; + + +int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code); +av_const int ff_h263_aspect_to_info(AVRational aspect); +int ff_h263_decode_init(AVCodecContext *avctx); +int ff_h263_decode_frame(AVCodecContext *avctx, + void *data, int *got_frame, + AVPacket *avpkt); +int ff_h263_decode_end(AVCodecContext *avctx); +void ff_h263_encode_mb(MpegEncContext *s, + int16_t block[6][64], + int motion_x, int motion_y); +void ff_h263_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line); +int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir, + int *px, int *py); +void ff_h263_encode_init(MpegEncContext *s); +void ff_h263_decode_init_vlc(void); +int ff_h263_decode_picture_header(MpegEncContext *s); +int ff_h263_decode_gob_header(MpegEncContext *s); +void ff_h263_update_motion_val(MpegEncContext * s); +void ff_h263_loop_filter(MpegEncContext * s); +int ff_h263_decode_mba(MpegEncContext *s); +void ff_h263_encode_mba(MpegEncContext *s); +void ff_init_qscale_tab(MpegEncContext *s); +int ff_h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr); +void ff_h263_pred_acdc(MpegEncContext * s, int16_t *block, int n); + + +/** + * Print picture info if FF_DEBUG_PICT_INFO is set. + */ +void ff_h263_show_pict_info(MpegEncContext *s); + +int ff_intel_h263_decode_picture_header(MpegEncContext *s); +int ff_h263_decode_mb(MpegEncContext *s, + int16_t block[6][64]); + +/** + * Return the value of the 3-bit "source format" syntax element. + * This represents some standard picture dimensions or indicates that + * width&height are explicitly stored later. + */ +int av_const h263_get_picture_format(int width, int height); + +void ff_clean_h263_qscales(MpegEncContext *s); +int ff_h263_resync(MpegEncContext *s); +void ff_h263_encode_motion(PutBitContext *pb, int val, int f_code); + + +static inline int h263_get_motion_length(int val, int f_code){ + int l, bit_size, code; + + if (val == 0) { + return ff_mvtab[0][1]; + } else { + bit_size = f_code - 1; + /* modulo encoding */ + l= INT_BIT - 6 - bit_size; + val = (val<>l; + val--; + code = (val >> bit_size) + 1; + + return ff_mvtab[code][1] + 1 + bit_size; + } +} + +static inline void ff_h263_encode_motion_vector(MpegEncContext * s, int x, int y, int f_code){ + if (s->avctx->flags2 & AV_CODEC_FLAG2_NO_OUTPUT) { + skip_put_bits(&s->pb, + h263_get_motion_length(x, f_code) + +h263_get_motion_length(y, f_code)); + }else{ + ff_h263_encode_motion(&s->pb, x, f_code); + ff_h263_encode_motion(&s->pb, y, f_code); + } +} + +static inline int get_p_cbp(MpegEncContext * s, + int16_t block[6][64], + int motion_x, int motion_y){ + int cbp, i; + + if (s->mpv_flags & FF_MPV_FLAG_CBP_RD) { + int best_cbpy_score= INT_MAX; + int best_cbpc_score= INT_MAX; + int cbpc = (-1), cbpy= (-1); + const int offset= (s->mv_type==MV_TYPE_16X16 ? 0 : 16) + (s->dquant ? 8 : 0); + const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6); + + for(i=0; i<4; i++){ + int score= ff_h263_inter_MCBPC_bits[i + offset] * lambda; + if(i&1) score += s->coded_score[5]; + if(i&2) score += s->coded_score[4]; + + if(score < best_cbpc_score){ + best_cbpc_score= score; + cbpc= i; + } + } + + for(i=0; i<16; i++){ + int score= ff_h263_cbpy_tab[i ^ 0xF][1] * lambda; + if(i&1) score += s->coded_score[3]; + if(i&2) score += s->coded_score[2]; + if(i&4) score += s->coded_score[1]; + if(i&8) score += s->coded_score[0]; + + if(score < best_cbpy_score){ + best_cbpy_score= score; + cbpy= i; + } + } + cbp= cbpc + 4*cbpy; + if ((motion_x | motion_y | s->dquant) == 0 && s->mv_type==MV_TYPE_16X16){ + if(best_cbpy_score + best_cbpc_score + 2*lambda >= 0) + cbp= 0; + } + + for (i = 0; i < 6; i++) { + if (s->block_last_index[i] >= 0 && ((cbp >> (5 - i))&1)==0 ){ + s->block_last_index[i]= -1; + s->bdsp.clear_block(s->block[i]); + } + } + }else{ + cbp= 0; + for (i = 0; i < 6; i++) { + if (s->block_last_index[i] >= 0) + cbp |= 1 << (5 - i); + } + } + return cbp; +} + +#endif /* AVCODEC_H263_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263_parser.h new file mode 100644 index 00000000..565a222b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263_parser.h @@ -0,0 +1,29 @@ +/* + * H.263 parser + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H263_PARSER_H +#define AVCODEC_H263_PARSER_H + +#include "parser.h" + +int ff_h263_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size); + +#endif /* AVCODEC_H263_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263data.h new file mode 100644 index 00000000..3da0e377 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263data.h @@ -0,0 +1,77 @@ +/* + * copyright (c) 2000,2001 Fabrice Bellard + * H.263+ support + * copyright (c) 2001 Juan J. Sierralta P + * copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.263 tables. + */ + +#ifndef AVCODEC_H263DATA_H +#define AVCODEC_H263DATA_H + +#include + +#include "libavutil/rational.h" + +#include "rl.h" + +extern const AVRational ff_h263_pixel_aspect[16]; + +/* intra MCBPC, mb_type = (intra), then (intraq) */ +extern const uint8_t ff_h263_intra_MCBPC_code[9]; +extern const uint8_t ff_h263_intra_MCBPC_bits[9]; + +/* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */ +/* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */ +extern const uint8_t ff_h263_inter_MCBPC_code[28]; +extern const uint8_t ff_h263_inter_MCBPC_bits[28]; + +extern const uint8_t ff_h263_mbtype_b_tab[15][2]; + +extern const uint8_t ff_cbpc_b_tab[4][2]; +extern const uint8_t ff_h263_cbpy_tab[16][2]; + +extern const uint8_t ff_mvtab[33][2]; + +/* third non intra table */ +extern const uint16_t ff_inter_vlc[103][2]; + +extern const int8_t ff_inter_level[102]; +extern const int8_t ff_inter_run[102]; + +extern RLTable ff_h263_rl_inter; +extern RLTable ff_rl_intra_aic; +extern uint8_t ff_h263_static_rl_table_store[2][2][2 * MAX_RUN + MAX_LEVEL + 3]; + +extern const uint16_t ff_h263_format[8][2]; + +extern const uint8_t ff_aic_dc_scale_table[32]; + +extern const uint8_t ff_modified_quant_tab[2][32]; + +extern const uint8_t ff_h263_chroma_qscale_table[32]; + +extern const uint16_t ff_mba_max[6]; +extern const uint8_t ff_mba_length[7]; + +#endif /* AVCODEC_H263DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263dsp.h new file mode 100644 index 00000000..1abea3ca --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h263dsp.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H263DSP_H +#define AVCODEC_H263DSP_H + +#include + +extern const uint8_t ff_h263_loop_filter_strength[32]; + +typedef struct H263DSPContext { + void (*h263_h_loop_filter)(uint8_t *src, int stride, int qscale); + void (*h263_v_loop_filter)(uint8_t *src, int stride, int qscale); +} H263DSPContext; + +void ff_h263dsp_init(H263DSPContext *ctx); +void ff_h263dsp_init_x86(H263DSPContext *ctx); +void ff_h263dsp_init_mips(H263DSPContext *ctx); + +#endif /* AVCODEC_H263DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264.h new file mode 100644 index 00000000..7a1fb6d6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264.h @@ -0,0 +1,113 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 common definitions + */ + +#ifndef AVCODEC_H264_H +#define AVCODEC_H264_H + +#define QP_MAX_NUM (51 + 6*6) // The maximum supported qp + +/* + * Table 7-1 – NAL unit type codes, syntax element categories, and NAL unit type classes in + * T-REC-H.264-201704 + */ +enum { + H264_NAL_UNSPECIFIED = 0, + H264_NAL_SLICE = 1, + H264_NAL_DPA = 2, + H264_NAL_DPB = 3, + H264_NAL_DPC = 4, + H264_NAL_IDR_SLICE = 5, + H264_NAL_SEI = 6, + H264_NAL_SPS = 7, + H264_NAL_PPS = 8, + H264_NAL_AUD = 9, + H264_NAL_END_SEQUENCE = 10, + H264_NAL_END_STREAM = 11, + H264_NAL_FILLER_DATA = 12, + H264_NAL_SPS_EXT = 13, + H264_NAL_PREFIX = 14, + H264_NAL_SUB_SPS = 15, + H264_NAL_DPS = 16, + H264_NAL_RESERVED17 = 17, + H264_NAL_RESERVED18 = 18, + H264_NAL_AUXILIARY_SLICE = 19, + H264_NAL_EXTEN_SLICE = 20, + H264_NAL_DEPTH_EXTEN_SLICE = 21, + H264_NAL_RESERVED22 = 22, + H264_NAL_RESERVED23 = 23, + H264_NAL_UNSPECIFIED24 = 24, + H264_NAL_UNSPECIFIED25 = 25, + H264_NAL_UNSPECIFIED26 = 26, + H264_NAL_UNSPECIFIED27 = 27, + H264_NAL_UNSPECIFIED28 = 28, + H264_NAL_UNSPECIFIED29 = 29, + H264_NAL_UNSPECIFIED30 = 30, + H264_NAL_UNSPECIFIED31 = 31, +}; + + +enum { + // 7.4.2.1.1: seq_parameter_set_id is in [0, 31]. + H264_MAX_SPS_COUNT = 32, + // 7.4.2.2: pic_parameter_set_id is in [0, 255]. + H264_MAX_PPS_COUNT = 256, + + // A.3: MaxDpbFrames is bounded above by 16. + H264_MAX_DPB_FRAMES = 16, + // 7.4.2.1.1: max_num_ref_frames is in [0, MaxDpbFrames], and + // each reference frame can have two fields. + H264_MAX_REFS = 2 * H264_MAX_DPB_FRAMES, + + // 7.4.3.1: modification_of_pic_nums_idc is not equal to 3 at most + // num_ref_idx_lN_active_minus1 + 1 times (that is, once for each + // possible reference), then equal to 3 once. + H264_MAX_RPLM_COUNT = H264_MAX_REFS + 1, + + // 7.4.3.3: in the worst case, we begin with a full short-term + // reference picture list. Each picture in turn is moved to the + // long-term list (type 3) and then discarded from there (type 2). + // Then, we set the length of the long-term list (type 4), mark + // the current picture as long-term (type 6) and terminate the + // process (type 0). + H264_MAX_MMCO_COUNT = H264_MAX_REFS * 2 + 3, + + // A.2.1, A.2.3: profiles supporting FMO constrain + // num_slice_groups_minus1 to be in [0, 7]. + H264_MAX_SLICE_GROUPS = 8, + + // E.2.2: cpb_cnt_minus1 is in [0, 31]. + H264_MAX_CPB_CNT = 32, + + // A.3: in table A-1 the highest level allows a MaxFS of 139264. + H264_MAX_MB_PIC_SIZE = 139264, + // A.3.1, A.3.2: PicWidthInMbs and PicHeightInMbs are constrained + // to be not greater than sqrt(MaxFS * 8). Hence height/width are + // bounded above by sqrt(139264 * 8) = 1055.5 macroblocks. + H264_MAX_MB_WIDTH = 1055, + H264_MAX_MB_HEIGHT = 1055, + H264_MAX_WIDTH = H264_MAX_MB_WIDTH * 16, + H264_MAX_HEIGHT = H264_MAX_MB_HEIGHT * 16, +}; + + +#endif /* AVCODEC_H264_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h2645_parse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h2645_parse.h new file mode 100644 index 00000000..3e47f86c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h2645_parse.h @@ -0,0 +1,138 @@ +/* + * H.264/HEVC common parsing code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H2645_PARSE_H +#define AVCODEC_H2645_PARSE_H + +#include + +#include "libavutil/buffer.h" +#include "avcodec.h" +#include "get_bits.h" + +#define MAX_MBPAIR_SIZE (256*1024) // a tighter bound could be calculated if someone cares about a few bytes + +typedef struct H2645NAL { + uint8_t *rbsp_buffer; + + int size; + const uint8_t *data; + + /** + * Size, in bits, of just the data, excluding the stop bit and any trailing + * padding. I.e. what HEVC calls SODB. + */ + int size_bits; + + int raw_size; + const uint8_t *raw_data; + + GetBitContext gb; + + /** + * NAL unit type + */ + int type; + + /** + * HEVC only, nuh_temporal_id_plus_1 - 1 + */ + int temporal_id; + + /* + * HEVC only, identifier of layer to which nal unit belongs + */ + int nuh_layer_id; + + int skipped_bytes; + int skipped_bytes_pos_size; + int *skipped_bytes_pos; + /** + * H.264 only, nal_ref_idc + */ + int ref_idc; +} H2645NAL; + +typedef struct H2645RBSP { + uint8_t *rbsp_buffer; + AVBufferRef *rbsp_buffer_ref; + int rbsp_buffer_alloc_size; + int rbsp_buffer_size; +} H2645RBSP; + +/* an input packet split into unescaped NAL units */ +typedef struct H2645Packet { + H2645NAL *nals; + H2645RBSP rbsp; + int nb_nals; + int nals_allocated; + unsigned nal_buffer_size; +} H2645Packet; + +/** + * Extract the raw (unescaped) bitstream. + */ +int ff_h2645_extract_rbsp(const uint8_t *src, int length, H2645RBSP *rbsp, + H2645NAL *nal, int small_padding); + +/** + * Split an input packet into NAL units. + * + * If data == raw_data holds true for a NAL unit of the returned pkt, then + * said NAL unit does not contain any emulation_prevention_three_byte and + * the data is contained in the input buffer pointed to by buf. + * Otherwise, the unescaped data is part of the rbsp_buffer described by the + * packet's H2645RBSP. + * + * If the packet's rbsp_buffer_ref is not NULL, the underlying AVBuffer must + * own rbsp_buffer. If not and rbsp_buffer is not NULL, use_ref must be 0. + * If use_ref is set, rbsp_buffer will be reference-counted and owned by + * the underlying AVBuffer of rbsp_buffer_ref. + */ +int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, + void *logctx, int is_nalff, int nal_length_size, + enum AVCodecID codec_id, int small_padding, int use_ref); + +/** + * Free all the allocated memory in the packet. + */ +void ff_h2645_packet_uninit(H2645Packet *pkt); + +static inline int get_nalsize(int nal_length_size, const uint8_t *buf, + int buf_size, int *buf_index, void *logctx) +{ + int i, nalsize = 0; + + if (*buf_index >= buf_size - nal_length_size) { + // the end of the buffer is reached, refill it + return AVERROR(EAGAIN); + } + + for (i = 0; i < nal_length_size; i++) + nalsize = ((unsigned)nalsize << 8) | buf[(*buf_index)++]; + if (nalsize <= 0 || nalsize > buf_size - *buf_index) { + av_log(logctx, AV_LOG_ERROR, + "Invalid NAL unit size (%d > %d).\n", nalsize, buf_size - *buf_index); + return AVERROR_INVALIDDATA; + } + return nalsize; +} + +#endif /* AVCODEC_H2645_PARSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_levels.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_levels.h new file mode 100644 index 00000000..0a0f4103 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_levels.h @@ -0,0 +1,54 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264_LEVELS_H +#define AVCODEC_H264_LEVELS_H + + +#include + +typedef struct H264LevelDescriptor { + const char *name; + uint8_t level_idc; + uint8_t constraint_set3_flag; + uint32_t max_mbps; + uint32_t max_fs; + uint32_t max_dpb_mbs; + uint32_t max_br; + uint32_t max_cpb; + uint16_t max_v_mv_r; + uint8_t min_cr; + uint8_t max_mvs_per_2mb; +} H264LevelDescriptor; + +const H264LevelDescriptor *ff_h264_get_level(int level_idc, + int constraint_set3_flag); + +/** + * Guess the level of a stream from some parameters. + * + * Unknown parameters may be zero, in which case they are ignored. + */ +const H264LevelDescriptor *ff_h264_guess_level(int profile_idc, + int64_t bitrate, + int framerate, + int width, int height, + int max_dec_frame_buffering); + + +#endif /* AVCODEC_H264_LEVELS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_mvpred.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_mvpred.h new file mode 100644 index 00000000..bf395e3f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_mvpred.h @@ -0,0 +1,836 @@ +/* + * H.26L/H.264/AVC/JVT/14496-10/... motion vector prediction + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 / AVC / MPEG-4 part10 motion vector prediction. + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_H264_MVPRED_H +#define AVCODEC_H264_MVPRED_H + +#include "internal.h" +#include "avcodec.h" +#include "h264dec.h" +#include "mpegutils.h" +#include "libavutil/avassert.h" + + +static av_always_inline int fetch_diagonal_mv(const H264Context *h, H264SliceContext *sl, + const int16_t **C, + int i, int list, int part_width) +{ + const int topright_ref = sl->ref_cache[list][i - 8 + part_width]; + + /* there is no consistent mapping of mvs to neighboring locations that will + * make mbaff happy, so we can't move all this logic to fill_caches */ + if (FRAME_MBAFF(h)) { +#define SET_DIAG_MV(MV_OP, REF_OP, XY, Y4) \ + const int xy = XY, y4 = Y4; \ + const int mb_type = mb_types[xy + (y4 >> 2) * h->mb_stride]; \ + if (!USES_LIST(mb_type, list)) \ + return LIST_NOT_USED; \ + mv = h->cur_pic_ptr->motion_val[list][h->mb2b_xy[xy] + 3 + y4 * h->b_stride]; \ + sl->mv_cache[list][scan8[0] - 2][0] = mv[0]; \ + sl->mv_cache[list][scan8[0] - 2][1] = mv[1] MV_OP; \ + return h->cur_pic_ptr->ref_index[list][4 * xy + 1 + (y4 & ~1)] REF_OP; + + if (topright_ref == PART_NOT_AVAILABLE + && i >= scan8[0] + 8 && (i & 7) == 4 + && sl->ref_cache[list][scan8[0] - 1] != PART_NOT_AVAILABLE) { + const uint32_t *mb_types = h->cur_pic_ptr->mb_type; + const int16_t *mv; + AV_ZERO32(sl->mv_cache[list][scan8[0] - 2]); + *C = sl->mv_cache[list][scan8[0] - 2]; + + if (!MB_FIELD(sl) && IS_INTERLACED(sl->left_type[0])) { + SET_DIAG_MV(* 2, >> 1, sl->left_mb_xy[0] + h->mb_stride, + (sl->mb_y & 1) * 2 + (i >> 5)); + } + if (MB_FIELD(sl) && !IS_INTERLACED(sl->left_type[0])) { + // left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK. + SET_DIAG_MV(/ 2, *2, sl->left_mb_xy[i >= 36], ((i >> 2)) & 3); + } + } +#undef SET_DIAG_MV + } + + if (topright_ref != PART_NOT_AVAILABLE) { + *C = sl->mv_cache[list][i - 8 + part_width]; + return topright_ref; + } else { + ff_tlog(h->avctx, "topright MV not available\n"); + + *C = sl->mv_cache[list][i - 8 - 1]; + return sl->ref_cache[list][i - 8 - 1]; + } +} + +/** + * Get the predicted MV. + * @param n the block index + * @param part_width the width of the partition (4, 8,16) -> (1, 2, 4) + * @param mx the x component of the predicted motion vector + * @param my the y component of the predicted motion vector + */ +static av_always_inline void pred_motion(const H264Context *const h, + H264SliceContext *sl, + int n, + int part_width, int list, int ref, + int *const mx, int *const my) +{ + const int index8 = scan8[n]; + const int top_ref = sl->ref_cache[list][index8 - 8]; + const int left_ref = sl->ref_cache[list][index8 - 1]; + const int16_t *const A = sl->mv_cache[list][index8 - 1]; + const int16_t *const B = sl->mv_cache[list][index8 - 8]; + const int16_t *C; + int diagonal_ref, match_count; + + av_assert2(part_width == 1 || part_width == 2 || part_width == 4); + +/* mv_cache + * B . . A T T T T + * U . . L . . , . + * U . . L . . . . + * U . . L . . , . + * . . . L . . . . + */ + + diagonal_ref = fetch_diagonal_mv(h, sl, &C, index8, list, part_width); + match_count = (diagonal_ref == ref) + (top_ref == ref) + (left_ref == ref); + ff_tlog(h->avctx, "pred_motion match_count=%d\n", match_count); + if (match_count > 1) { //most common + *mx = mid_pred(A[0], B[0], C[0]); + *my = mid_pred(A[1], B[1], C[1]); + } else if (match_count == 1) { + if (left_ref == ref) { + *mx = A[0]; + *my = A[1]; + } else if (top_ref == ref) { + *mx = B[0]; + *my = B[1]; + } else { + *mx = C[0]; + *my = C[1]; + } + } else { + if (top_ref == PART_NOT_AVAILABLE && + diagonal_ref == PART_NOT_AVAILABLE && + left_ref != PART_NOT_AVAILABLE) { + *mx = A[0]; + *my = A[1]; + } else { + *mx = mid_pred(A[0], B[0], C[0]); + *my = mid_pred(A[1], B[1], C[1]); + } + } + + ff_tlog(h->avctx, + "pred_motion (%2d %2d %2d) (%2d %2d %2d) (%2d %2d %2d) -> (%2d %2d %2d) at %2d %2d %d list %d\n", + top_ref, B[0], B[1], diagonal_ref, C[0], C[1], left_ref, + A[0], A[1], ref, *mx, *my, sl->mb_x, sl->mb_y, n, list); +} + +/** + * Get the directionally predicted 16x8 MV. + * @param n the block index + * @param mx the x component of the predicted motion vector + * @param my the y component of the predicted motion vector + */ +static av_always_inline void pred_16x8_motion(const H264Context *const h, + H264SliceContext *sl, + int n, int list, int ref, + int *const mx, int *const my) +{ + if (n == 0) { + const int top_ref = sl->ref_cache[list][scan8[0] - 8]; + const int16_t *const B = sl->mv_cache[list][scan8[0] - 8]; + + ff_tlog(h->avctx, "pred_16x8: (%2d %2d %2d) at %2d %2d %d list %d\n", + top_ref, B[0], B[1], sl->mb_x, sl->mb_y, n, list); + + if (top_ref == ref) { + *mx = B[0]; + *my = B[1]; + return; + } + } else { + const int left_ref = sl->ref_cache[list][scan8[8] - 1]; + const int16_t *const A = sl->mv_cache[list][scan8[8] - 1]; + + ff_tlog(h->avctx, "pred_16x8: (%2d %2d %2d) at %2d %2d %d list %d\n", + left_ref, A[0], A[1], sl->mb_x, sl->mb_y, n, list); + + if (left_ref == ref) { + *mx = A[0]; + *my = A[1]; + return; + } + } + + //RARE + pred_motion(h, sl, n, 4, list, ref, mx, my); +} + +/** + * Get the directionally predicted 8x16 MV. + * @param n the block index + * @param mx the x component of the predicted motion vector + * @param my the y component of the predicted motion vector + */ +static av_always_inline void pred_8x16_motion(const H264Context *const h, + H264SliceContext *sl, + int n, int list, int ref, + int *const mx, int *const my) +{ + if (n == 0) { + const int left_ref = sl->ref_cache[list][scan8[0] - 1]; + const int16_t *const A = sl->mv_cache[list][scan8[0] - 1]; + + ff_tlog(h->avctx, "pred_8x16: (%2d %2d %2d) at %2d %2d %d list %d\n", + left_ref, A[0], A[1], sl->mb_x, sl->mb_y, n, list); + + if (left_ref == ref) { + *mx = A[0]; + *my = A[1]; + return; + } + } else { + const int16_t *C; + int diagonal_ref; + + diagonal_ref = fetch_diagonal_mv(h, sl, &C, scan8[4], list, 2); + + ff_tlog(h->avctx, "pred_8x16: (%2d %2d %2d) at %2d %2d %d list %d\n", + diagonal_ref, C[0], C[1], sl->mb_x, sl->mb_y, n, list); + + if (diagonal_ref == ref) { + *mx = C[0]; + *my = C[1]; + return; + } + } + + //RARE + pred_motion(h, sl, n, 2, list, ref, mx, my); +} + +#define FIX_MV_MBAFF(type, refn, mvn, idx) \ + if (FRAME_MBAFF(h)) { \ + if (MB_FIELD(sl)) { \ + if (!IS_INTERLACED(type)) { \ + refn <<= 1; \ + AV_COPY32(mvbuf[idx], mvn); \ + mvbuf[idx][1] /= 2; \ + mvn = mvbuf[idx]; \ + } \ + } else { \ + if (IS_INTERLACED(type)) { \ + refn >>= 1; \ + AV_COPY32(mvbuf[idx], mvn); \ + mvbuf[idx][1] *= 2; \ + mvn = mvbuf[idx]; \ + } \ + } \ + } + +static av_always_inline void pred_pskip_motion(const H264Context *const h, + H264SliceContext *sl) +{ + DECLARE_ALIGNED(4, static const int16_t, zeromv)[2] = { 0 }; + DECLARE_ALIGNED(4, int16_t, mvbuf)[3][2]; + int8_t *ref = h->cur_pic.ref_index[0]; + int16_t(*mv)[2] = h->cur_pic.motion_val[0]; + int top_ref, left_ref, diagonal_ref, match_count, mx, my; + const int16_t *A, *B, *C; + int b_stride = h->b_stride; + + fill_rectangle(&sl->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1); + + /* To avoid doing an entire fill_decode_caches, we inline the relevant + * parts here. + * FIXME: this is a partial duplicate of the logic in fill_decode_caches, + * but it's faster this way. Is there a way to avoid this duplication? + */ + if (USES_LIST(sl->left_type[LTOP], 0)) { + left_ref = ref[4 * sl->left_mb_xy[LTOP] + 1 + (sl->left_block[0] & ~1)]; + A = mv[h->mb2b_xy[sl->left_mb_xy[LTOP]] + 3 + b_stride * sl->left_block[0]]; + FIX_MV_MBAFF(sl->left_type[LTOP], left_ref, A, 0); + if (!(left_ref | AV_RN32A(A))) + goto zeromv; + } else if (sl->left_type[LTOP]) { + left_ref = LIST_NOT_USED; + A = zeromv; + } else { + goto zeromv; + } + + if (USES_LIST(sl->top_type, 0)) { + top_ref = ref[4 * sl->top_mb_xy + 2]; + B = mv[h->mb2b_xy[sl->top_mb_xy] + 3 * b_stride]; + FIX_MV_MBAFF(sl->top_type, top_ref, B, 1); + if (!(top_ref | AV_RN32A(B))) + goto zeromv; + } else if (sl->top_type) { + top_ref = LIST_NOT_USED; + B = zeromv; + } else { + goto zeromv; + } + + ff_tlog(h->avctx, "pred_pskip: (%d) (%d) at %2d %2d\n", + top_ref, left_ref, sl->mb_x, sl->mb_y); + + if (USES_LIST(sl->topright_type, 0)) { + diagonal_ref = ref[4 * sl->topright_mb_xy + 2]; + C = mv[h->mb2b_xy[sl->topright_mb_xy] + 3 * b_stride]; + FIX_MV_MBAFF(sl->topright_type, diagonal_ref, C, 2); + } else if (sl->topright_type) { + diagonal_ref = LIST_NOT_USED; + C = zeromv; + } else { + if (USES_LIST(sl->topleft_type, 0)) { + diagonal_ref = ref[4 * sl->topleft_mb_xy + 1 + + (sl->topleft_partition & 2)]; + C = mv[h->mb2b_xy[sl->topleft_mb_xy] + 3 + b_stride + + (sl->topleft_partition & 2 * b_stride)]; + FIX_MV_MBAFF(sl->topleft_type, diagonal_ref, C, 2); + } else if (sl->topleft_type) { + diagonal_ref = LIST_NOT_USED; + C = zeromv; + } else { + diagonal_ref = PART_NOT_AVAILABLE; + C = zeromv; + } + } + + match_count = !diagonal_ref + !top_ref + !left_ref; + ff_tlog(h->avctx, "pred_pskip_motion match_count=%d\n", match_count); + if (match_count > 1) { + mx = mid_pred(A[0], B[0], C[0]); + my = mid_pred(A[1], B[1], C[1]); + } else if (match_count == 1) { + if (!left_ref) { + mx = A[0]; + my = A[1]; + } else if (!top_ref) { + mx = B[0]; + my = B[1]; + } else { + mx = C[0]; + my = C[1]; + } + } else { + mx = mid_pred(A[0], B[0], C[0]); + my = mid_pred(A[1], B[1], C[1]); + } + + fill_rectangle(sl->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mx, my), 4); + return; + +zeromv: + fill_rectangle(sl->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); + return; +} + +static void fill_decode_neighbors(const H264Context *h, H264SliceContext *sl, int mb_type) +{ + const int mb_xy = sl->mb_xy; + int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS]; + static const uint8_t left_block_options[4][32] = { + { 0, 1, 2, 3, 7, 10, 8, 11, 3 + 0 * 4, 3 + 1 * 4, 3 + 2 * 4, 3 + 3 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 5 * 4, 1 + 9 * 4 }, + { 2, 2, 3, 3, 8, 11, 8, 11, 3 + 2 * 4, 3 + 2 * 4, 3 + 3 * 4, 3 + 3 * 4, 1 + 5 * 4, 1 + 9 * 4, 1 + 5 * 4, 1 + 9 * 4 }, + { 0, 0, 1, 1, 7, 10, 7, 10, 3 + 0 * 4, 3 + 0 * 4, 3 + 1 * 4, 3 + 1 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 }, + { 0, 2, 0, 2, 7, 10, 7, 10, 3 + 0 * 4, 3 + 2 * 4, 3 + 0 * 4, 3 + 2 * 4, 1 + 4 * 4, 1 + 8 * 4, 1 + 4 * 4, 1 + 8 * 4 } + }; + + sl->topleft_partition = -1; + + top_xy = mb_xy - (h->mb_stride << MB_FIELD(sl)); + + /* Wow, what a mess, why didn't they simplify the interlacing & intra + * stuff, I can't imagine that these complex rules are worth it. */ + + topleft_xy = top_xy - 1; + topright_xy = top_xy + 1; + left_xy[LBOT] = left_xy[LTOP] = mb_xy - 1; + sl->left_block = left_block_options[0]; + if (FRAME_MBAFF(h)) { + const int left_mb_field_flag = IS_INTERLACED(h->cur_pic.mb_type[mb_xy - 1]); + const int curr_mb_field_flag = IS_INTERLACED(mb_type); + if (sl->mb_y & 1) { + if (left_mb_field_flag != curr_mb_field_flag) { + left_xy[LBOT] = left_xy[LTOP] = mb_xy - h->mb_stride - 1; + if (curr_mb_field_flag) { + left_xy[LBOT] += h->mb_stride; + sl->left_block = left_block_options[3]; + } else { + topleft_xy += h->mb_stride; + /* take top left mv from the middle of the mb, as opposed + * to all other modes which use the bottom right partition */ + sl->topleft_partition = 0; + sl->left_block = left_block_options[1]; + } + } + } else { + if (curr_mb_field_flag) { + topleft_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy - 1] >> 7) & 1) - 1); + topright_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy + 1] >> 7) & 1) - 1); + top_xy += h->mb_stride & (((h->cur_pic.mb_type[top_xy] >> 7) & 1) - 1); + } + if (left_mb_field_flag != curr_mb_field_flag) { + if (curr_mb_field_flag) { + left_xy[LBOT] += h->mb_stride; + sl->left_block = left_block_options[3]; + } else { + sl->left_block = left_block_options[2]; + } + } + } + } + + sl->topleft_mb_xy = topleft_xy; + sl->top_mb_xy = top_xy; + sl->topright_mb_xy = topright_xy; + sl->left_mb_xy[LTOP] = left_xy[LTOP]; + sl->left_mb_xy[LBOT] = left_xy[LBOT]; + //FIXME do we need all in the context? + + sl->topleft_type = h->cur_pic.mb_type[topleft_xy]; + sl->top_type = h->cur_pic.mb_type[top_xy]; + sl->topright_type = h->cur_pic.mb_type[topright_xy]; + sl->left_type[LTOP] = h->cur_pic.mb_type[left_xy[LTOP]]; + sl->left_type[LBOT] = h->cur_pic.mb_type[left_xy[LBOT]]; + + if (FMO) { + if (h->slice_table[topleft_xy] != sl->slice_num) + sl->topleft_type = 0; + if (h->slice_table[top_xy] != sl->slice_num) + sl->top_type = 0; + if (h->slice_table[left_xy[LTOP]] != sl->slice_num) + sl->left_type[LTOP] = sl->left_type[LBOT] = 0; + } else { + if (h->slice_table[topleft_xy] != sl->slice_num) { + sl->topleft_type = 0; + if (h->slice_table[top_xy] != sl->slice_num) + sl->top_type = 0; + if (h->slice_table[left_xy[LTOP]] != sl->slice_num) + sl->left_type[LTOP] = sl->left_type[LBOT] = 0; + } + } + if (h->slice_table[topright_xy] != sl->slice_num) + sl->topright_type = 0; +} + +static void fill_decode_caches(const H264Context *h, H264SliceContext *sl, int mb_type) +{ + int topleft_xy, top_xy, topright_xy, left_xy[LEFT_MBS]; + int topleft_type, top_type, topright_type, left_type[LEFT_MBS]; + const uint8_t *left_block = sl->left_block; + int i; + uint8_t *nnz; + uint8_t *nnz_cache; + + topleft_xy = sl->topleft_mb_xy; + top_xy = sl->top_mb_xy; + topright_xy = sl->topright_mb_xy; + left_xy[LTOP] = sl->left_mb_xy[LTOP]; + left_xy[LBOT] = sl->left_mb_xy[LBOT]; + topleft_type = sl->topleft_type; + top_type = sl->top_type; + topright_type = sl->topright_type; + left_type[LTOP] = sl->left_type[LTOP]; + left_type[LBOT] = sl->left_type[LBOT]; + + if (!IS_SKIP(mb_type)) { + if (IS_INTRA(mb_type)) { + int type_mask = h->ps.pps->constrained_intra_pred ? IS_INTRA(-1) : -1; + sl->topleft_samples_available = + sl->top_samples_available = + sl->left_samples_available = 0xFFFF; + sl->topright_samples_available = 0xEEEA; + + if (!(top_type & type_mask)) { + sl->topleft_samples_available = 0xB3FF; + sl->top_samples_available = 0x33FF; + sl->topright_samples_available = 0x26EA; + } + if (IS_INTERLACED(mb_type) != IS_INTERLACED(left_type[LTOP])) { + if (IS_INTERLACED(mb_type)) { + if (!(left_type[LTOP] & type_mask)) { + sl->topleft_samples_available &= 0xDFFF; + sl->left_samples_available &= 0x5FFF; + } + if (!(left_type[LBOT] & type_mask)) { + sl->topleft_samples_available &= 0xFF5F; + sl->left_samples_available &= 0xFF5F; + } + } else { + int left_typei = h->cur_pic.mb_type[left_xy[LTOP] + h->mb_stride]; + + av_assert2(left_xy[LTOP] == left_xy[LBOT]); + if (!((left_typei & type_mask) && (left_type[LTOP] & type_mask))) { + sl->topleft_samples_available &= 0xDF5F; + sl->left_samples_available &= 0x5F5F; + } + } + } else { + if (!(left_type[LTOP] & type_mask)) { + sl->topleft_samples_available &= 0xDF5F; + sl->left_samples_available &= 0x5F5F; + } + } + + if (!(topleft_type & type_mask)) + sl->topleft_samples_available &= 0x7FFF; + + if (!(topright_type & type_mask)) + sl->topright_samples_available &= 0xFBFF; + + if (IS_INTRA4x4(mb_type)) { + if (IS_INTRA4x4(top_type)) { + AV_COPY32(sl->intra4x4_pred_mode_cache + 4 + 8 * 0, sl->intra4x4_pred_mode + h->mb2br_xy[top_xy]); + } else { + sl->intra4x4_pred_mode_cache[4 + 8 * 0] = + sl->intra4x4_pred_mode_cache[5 + 8 * 0] = + sl->intra4x4_pred_mode_cache[6 + 8 * 0] = + sl->intra4x4_pred_mode_cache[7 + 8 * 0] = 2 - 3 * !(top_type & type_mask); + } + for (i = 0; i < 2; i++) { + if (IS_INTRA4x4(left_type[LEFT(i)])) { + int8_t *mode = sl->intra4x4_pred_mode + h->mb2br_xy[left_xy[LEFT(i)]]; + sl->intra4x4_pred_mode_cache[3 + 8 * 1 + 2 * 8 * i] = mode[6 - left_block[0 + 2 * i]]; + sl->intra4x4_pred_mode_cache[3 + 8 * 2 + 2 * 8 * i] = mode[6 - left_block[1 + 2 * i]]; + } else { + sl->intra4x4_pred_mode_cache[3 + 8 * 1 + 2 * 8 * i] = + sl->intra4x4_pred_mode_cache[3 + 8 * 2 + 2 * 8 * i] = 2 - 3 * !(left_type[LEFT(i)] & type_mask); + } + } + } + } + + /* + * 0 . T T. T T T T + * 1 L . .L . . . . + * 2 L . .L . . . . + * 3 . T TL . . . . + * 4 L . .L . . . . + * 5 L . .. . . . . + */ + /* FIXME: constraint_intra_pred & partitioning & nnz + * (let us hope this is just a typo in the spec) */ + nnz_cache = sl->non_zero_count_cache; + if (top_type) { + nnz = h->non_zero_count[top_xy]; + AV_COPY32(&nnz_cache[4 + 8 * 0], &nnz[4 * 3]); + if (!h->chroma_y_shift) { + AV_COPY32(&nnz_cache[4 + 8 * 5], &nnz[4 * 7]); + AV_COPY32(&nnz_cache[4 + 8 * 10], &nnz[4 * 11]); + } else { + AV_COPY32(&nnz_cache[4 + 8 * 5], &nnz[4 * 5]); + AV_COPY32(&nnz_cache[4 + 8 * 10], &nnz[4 * 9]); + } + } else { + uint32_t top_empty = CABAC(h) && !IS_INTRA(mb_type) ? 0 : 0x40404040; + AV_WN32A(&nnz_cache[4 + 8 * 0], top_empty); + AV_WN32A(&nnz_cache[4 + 8 * 5], top_empty); + AV_WN32A(&nnz_cache[4 + 8 * 10], top_empty); + } + + for (i = 0; i < 2; i++) { + if (left_type[LEFT(i)]) { + nnz = h->non_zero_count[left_xy[LEFT(i)]]; + nnz_cache[3 + 8 * 1 + 2 * 8 * i] = nnz[left_block[8 + 0 + 2 * i]]; + nnz_cache[3 + 8 * 2 + 2 * 8 * i] = nnz[left_block[8 + 1 + 2 * i]]; + if (CHROMA444(h)) { + nnz_cache[3 + 8 * 6 + 2 * 8 * i] = nnz[left_block[8 + 0 + 2 * i] + 4 * 4]; + nnz_cache[3 + 8 * 7 + 2 * 8 * i] = nnz[left_block[8 + 1 + 2 * i] + 4 * 4]; + nnz_cache[3 + 8 * 11 + 2 * 8 * i] = nnz[left_block[8 + 0 + 2 * i] + 8 * 4]; + nnz_cache[3 + 8 * 12 + 2 * 8 * i] = nnz[left_block[8 + 1 + 2 * i] + 8 * 4]; + } else if (CHROMA422(h)) { + nnz_cache[3 + 8 * 6 + 2 * 8 * i] = nnz[left_block[8 + 0 + 2 * i] - 2 + 4 * 4]; + nnz_cache[3 + 8 * 7 + 2 * 8 * i] = nnz[left_block[8 + 1 + 2 * i] - 2 + 4 * 4]; + nnz_cache[3 + 8 * 11 + 2 * 8 * i] = nnz[left_block[8 + 0 + 2 * i] - 2 + 8 * 4]; + nnz_cache[3 + 8 * 12 + 2 * 8 * i] = nnz[left_block[8 + 1 + 2 * i] - 2 + 8 * 4]; + } else { + nnz_cache[3 + 8 * 6 + 8 * i] = nnz[left_block[8 + 4 + 2 * i]]; + nnz_cache[3 + 8 * 11 + 8 * i] = nnz[left_block[8 + 5 + 2 * i]]; + } + } else { + nnz_cache[3 + 8 * 1 + 2 * 8 * i] = + nnz_cache[3 + 8 * 2 + 2 * 8 * i] = + nnz_cache[3 + 8 * 6 + 2 * 8 * i] = + nnz_cache[3 + 8 * 7 + 2 * 8 * i] = + nnz_cache[3 + 8 * 11 + 2 * 8 * i] = + nnz_cache[3 + 8 * 12 + 2 * 8 * i] = CABAC(h) && !IS_INTRA(mb_type) ? 0 : 64; + } + } + + if (CABAC(h)) { + // top_cbp + if (top_type) + sl->top_cbp = h->cbp_table[top_xy]; + else + sl->top_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; + // left_cbp + if (left_type[LTOP]) { + sl->left_cbp = (h->cbp_table[left_xy[LTOP]] & 0x7F0) | + ((h->cbp_table[left_xy[LTOP]] >> (left_block[0] & (~1))) & 2) | + (((h->cbp_table[left_xy[LBOT]] >> (left_block[2] & (~1))) & 2) << 2); + } else { + sl->left_cbp = IS_INTRA(mb_type) ? 0x7CF : 0x00F; + } + } + } + + if (IS_INTER(mb_type) || (IS_DIRECT(mb_type) && sl->direct_spatial_mv_pred)) { + int list; + int b_stride = h->b_stride; + for (list = 0; list < sl->list_count; list++) { + int8_t *ref_cache = &sl->ref_cache[list][scan8[0]]; + int8_t *ref = h->cur_pic.ref_index[list]; + int16_t(*mv_cache)[2] = &sl->mv_cache[list][scan8[0]]; + int16_t(*mv)[2] = h->cur_pic.motion_val[list]; + if (!USES_LIST(mb_type, list)) + continue; + av_assert2(!(IS_DIRECT(mb_type) && !sl->direct_spatial_mv_pred)); + + if (USES_LIST(top_type, list)) { + const int b_xy = h->mb2b_xy[top_xy] + 3 * b_stride; + AV_COPY128(mv_cache[0 - 1 * 8], mv[b_xy + 0]); + ref_cache[0 - 1 * 8] = + ref_cache[1 - 1 * 8] = ref[4 * top_xy + 2]; + ref_cache[2 - 1 * 8] = + ref_cache[3 - 1 * 8] = ref[4 * top_xy + 3]; + } else { + AV_ZERO128(mv_cache[0 - 1 * 8]); + AV_WN32A(&ref_cache[0 - 1 * 8], + ((top_type ? LIST_NOT_USED : PART_NOT_AVAILABLE) & 0xFF) * 0x01010101u); + } + + if (mb_type & (MB_TYPE_16x8 | MB_TYPE_8x8)) { + for (i = 0; i < 2; i++) { + int cache_idx = -1 + i * 2 * 8; + if (USES_LIST(left_type[LEFT(i)], list)) { + const int b_xy = h->mb2b_xy[left_xy[LEFT(i)]] + 3; + const int b8_xy = 4 * left_xy[LEFT(i)] + 1; + AV_COPY32(mv_cache[cache_idx], + mv[b_xy + b_stride * left_block[0 + i * 2]]); + AV_COPY32(mv_cache[cache_idx + 8], + mv[b_xy + b_stride * left_block[1 + i * 2]]); + ref_cache[cache_idx] = ref[b8_xy + (left_block[0 + i * 2] & ~1)]; + ref_cache[cache_idx + 8] = ref[b8_xy + (left_block[1 + i * 2] & ~1)]; + } else { + AV_ZERO32(mv_cache[cache_idx]); + AV_ZERO32(mv_cache[cache_idx + 8]); + ref_cache[cache_idx] = + ref_cache[cache_idx + 8] = (left_type[LEFT(i)]) ? LIST_NOT_USED + : PART_NOT_AVAILABLE; + } + } + } else { + if (USES_LIST(left_type[LTOP], list)) { + const int b_xy = h->mb2b_xy[left_xy[LTOP]] + 3; + const int b8_xy = 4 * left_xy[LTOP] + 1; + AV_COPY32(mv_cache[-1], mv[b_xy + b_stride * left_block[0]]); + ref_cache[-1] = ref[b8_xy + (left_block[0] & ~1)]; + } else { + AV_ZERO32(mv_cache[-1]); + ref_cache[-1] = left_type[LTOP] ? LIST_NOT_USED + : PART_NOT_AVAILABLE; + } + } + + if (USES_LIST(topright_type, list)) { + const int b_xy = h->mb2b_xy[topright_xy] + 3 * b_stride; + AV_COPY32(mv_cache[4 - 1 * 8], mv[b_xy]); + ref_cache[4 - 1 * 8] = ref[4 * topright_xy + 2]; + } else { + AV_ZERO32(mv_cache[4 - 1 * 8]); + ref_cache[4 - 1 * 8] = topright_type ? LIST_NOT_USED + : PART_NOT_AVAILABLE; + } + if(ref_cache[2 - 1*8] < 0 || ref_cache[4 - 1 * 8] < 0) { + if (USES_LIST(topleft_type, list)) { + const int b_xy = h->mb2b_xy[topleft_xy] + 3 + b_stride + + (sl->topleft_partition & 2 * b_stride); + const int b8_xy = 4 * topleft_xy + 1 + (sl->topleft_partition & 2); + AV_COPY32(mv_cache[-1 - 1 * 8], mv[b_xy]); + ref_cache[-1 - 1 * 8] = ref[b8_xy]; + } else { + AV_ZERO32(mv_cache[-1 - 1 * 8]); + ref_cache[-1 - 1 * 8] = topleft_type ? LIST_NOT_USED + : PART_NOT_AVAILABLE; + } + } + + if ((mb_type & (MB_TYPE_SKIP | MB_TYPE_DIRECT2)) && !FRAME_MBAFF(h)) + continue; + + if (!(mb_type & (MB_TYPE_SKIP | MB_TYPE_DIRECT2))) { + uint8_t(*mvd_cache)[2] = &sl->mvd_cache[list][scan8[0]]; + uint8_t(*mvd)[2] = sl->mvd_table[list]; + ref_cache[2 + 8 * 0] = + ref_cache[2 + 8 * 2] = PART_NOT_AVAILABLE; + AV_ZERO32(mv_cache[2 + 8 * 0]); + AV_ZERO32(mv_cache[2 + 8 * 2]); + + if (CABAC(h)) { + if (USES_LIST(top_type, list)) { + const int b_xy = h->mb2br_xy[top_xy]; + AV_COPY64(mvd_cache[0 - 1 * 8], mvd[b_xy + 0]); + } else { + AV_ZERO64(mvd_cache[0 - 1 * 8]); + } + if (USES_LIST(left_type[LTOP], list)) { + const int b_xy = h->mb2br_xy[left_xy[LTOP]] + 6; + AV_COPY16(mvd_cache[-1 + 0 * 8], mvd[b_xy - left_block[0]]); + AV_COPY16(mvd_cache[-1 + 1 * 8], mvd[b_xy - left_block[1]]); + } else { + AV_ZERO16(mvd_cache[-1 + 0 * 8]); + AV_ZERO16(mvd_cache[-1 + 1 * 8]); + } + if (USES_LIST(left_type[LBOT], list)) { + const int b_xy = h->mb2br_xy[left_xy[LBOT]] + 6; + AV_COPY16(mvd_cache[-1 + 2 * 8], mvd[b_xy - left_block[2]]); + AV_COPY16(mvd_cache[-1 + 3 * 8], mvd[b_xy - left_block[3]]); + } else { + AV_ZERO16(mvd_cache[-1 + 2 * 8]); + AV_ZERO16(mvd_cache[-1 + 3 * 8]); + } + AV_ZERO16(mvd_cache[2 + 8 * 0]); + AV_ZERO16(mvd_cache[2 + 8 * 2]); + if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { + uint8_t *direct_cache = &sl->direct_cache[scan8[0]]; + uint8_t *direct_table = h->direct_table; + fill_rectangle(direct_cache, 4, 4, 8, MB_TYPE_16x16 >> 1, 1); + + if (IS_DIRECT(top_type)) { + AV_WN32A(&direct_cache[-1 * 8], + 0x01010101u * (MB_TYPE_DIRECT2 >> 1)); + } else if (IS_8X8(top_type)) { + int b8_xy = 4 * top_xy; + direct_cache[0 - 1 * 8] = direct_table[b8_xy + 2]; + direct_cache[2 - 1 * 8] = direct_table[b8_xy + 3]; + } else { + AV_WN32A(&direct_cache[-1 * 8], + 0x01010101 * (MB_TYPE_16x16 >> 1)); + } + + if (IS_DIRECT(left_type[LTOP])) + direct_cache[-1 + 0 * 8] = MB_TYPE_DIRECT2 >> 1; + else if (IS_8X8(left_type[LTOP])) + direct_cache[-1 + 0 * 8] = direct_table[4 * left_xy[LTOP] + 1 + (left_block[0] & ~1)]; + else + direct_cache[-1 + 0 * 8] = MB_TYPE_16x16 >> 1; + + if (IS_DIRECT(left_type[LBOT])) + direct_cache[-1 + 2 * 8] = MB_TYPE_DIRECT2 >> 1; + else if (IS_8X8(left_type[LBOT])) + direct_cache[-1 + 2 * 8] = direct_table[4 * left_xy[LBOT] + 1 + (left_block[2] & ~1)]; + else + direct_cache[-1 + 2 * 8] = MB_TYPE_16x16 >> 1; + } + } + } + +#define MAP_MVS \ + MAP_F2F(scan8[0] - 1 - 1 * 8, topleft_type) \ + MAP_F2F(scan8[0] + 0 - 1 * 8, top_type) \ + MAP_F2F(scan8[0] + 1 - 1 * 8, top_type) \ + MAP_F2F(scan8[0] + 2 - 1 * 8, top_type) \ + MAP_F2F(scan8[0] + 3 - 1 * 8, top_type) \ + MAP_F2F(scan8[0] + 4 - 1 * 8, topright_type) \ + MAP_F2F(scan8[0] - 1 + 0 * 8, left_type[LTOP]) \ + MAP_F2F(scan8[0] - 1 + 1 * 8, left_type[LTOP]) \ + MAP_F2F(scan8[0] - 1 + 2 * 8, left_type[LBOT]) \ + MAP_F2F(scan8[0] - 1 + 3 * 8, left_type[LBOT]) + + if (FRAME_MBAFF(h)) { + if (MB_FIELD(sl)) { + +#define MAP_F2F(idx, mb_type) \ + if (!IS_INTERLACED(mb_type) && sl->ref_cache[list][idx] >= 0) { \ + sl->ref_cache[list][idx] *= 2; \ + sl->mv_cache[list][idx][1] /= 2; \ + sl->mvd_cache[list][idx][1] >>= 1; \ + } + + MAP_MVS + } else { + +#undef MAP_F2F +#define MAP_F2F(idx, mb_type) \ + if (IS_INTERLACED(mb_type) && sl->ref_cache[list][idx] >= 0) { \ + sl->ref_cache[list][idx] >>= 1; \ + sl->mv_cache[list][idx][1] *= 2; \ + sl->mvd_cache[list][idx][1] <<= 1; \ + } + + MAP_MVS +#undef MAP_F2F + } + } + } + } + + sl->neighbor_transform_size = !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[LTOP]); +} + +/** + * decodes a P_SKIP or B_SKIP macroblock + */ +static void av_unused decode_mb_skip(const H264Context *h, H264SliceContext *sl) +{ + const int mb_xy = sl->mb_xy; + int mb_type = 0; + + memset(h->non_zero_count[mb_xy], 0, 48); + + if (MB_FIELD(sl)) + mb_type |= MB_TYPE_INTERLACED; + + if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { + // just for fill_caches. pred_direct_motion will set the real mb_type + mb_type |= MB_TYPE_L0L1 | MB_TYPE_DIRECT2 | MB_TYPE_SKIP; + if (sl->direct_spatial_mv_pred) { + fill_decode_neighbors(h, sl, mb_type); + fill_decode_caches(h, sl, mb_type); //FIXME check what is needed and what not ... + } + ff_h264_pred_direct_motion(h, sl, &mb_type); + mb_type |= MB_TYPE_SKIP; + } else { + mb_type |= MB_TYPE_16x16 | MB_TYPE_P0L0 | MB_TYPE_P1L0 | MB_TYPE_SKIP; + + fill_decode_neighbors(h, sl, mb_type); + pred_pskip_motion(h, sl); + } + + write_back_motion(h, sl, mb_type); + h->cur_pic.mb_type[mb_xy] = mb_type; + h->cur_pic.qscale_table[mb_xy] = sl->qscale; + h->slice_table[mb_xy] = sl->slice_num; + sl->prev_mb_skipped = 1; +} + +#endif /* AVCODEC_H264_MVPRED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_parse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_parse.h new file mode 100644 index 00000000..4d016201 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_parse.h @@ -0,0 +1,93 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 decoder/parser shared code + */ + +#ifndef AVCODEC_H264_PARSE_H +#define AVCODEC_H264_PARSE_H + +#include "get_bits.h" +#include "h264_ps.h" + +typedef struct H264PredWeightTable { + int use_weight; + int use_weight_chroma; + int luma_log2_weight_denom; + int chroma_log2_weight_denom; + int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag + int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag + // The following 2 can be changed to int8_t but that causes a 10 CPU cycles speed loss + int luma_weight[48][2][2]; + int chroma_weight[48][2][2][2]; + int implicit_weight[48][48][2]; +} H264PredWeightTable; + +typedef struct H264POCContext { + int poc_lsb; + int poc_msb; + int delta_poc_bottom; + int delta_poc[2]; + int frame_num; + int prev_poc_msb; ///< poc_msb of the last reference pic for POC type 0 + int prev_poc_lsb; ///< poc_lsb of the last reference pic for POC type 0 + int frame_num_offset; ///< for POC type 2 + int prev_frame_num_offset; ///< for POC type 2 + int prev_frame_num; ///< frame_num of the last pic for POC type 1/2 +} H264POCContext; + +int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps, + const int *ref_count, int slice_type_nos, + H264PredWeightTable *pwt, + int picture_structure, void *logctx); + +/** + * Check if the top & left blocks are available if needed & change the + * dc mode so it only uses the available blocks. + */ +int ff_h264_check_intra4x4_pred_mode(int8_t *pred_mode_cache, void *logctx, + int top_samples_available, int left_samples_available); + +/** + * Check if the top & left blocks are available if needed & change the + * dc mode so it only uses the available blocks. + */ +int ff_h264_check_intra_pred_mode(void *logctx, int top_samples_available, + int left_samples_available, + int mode, int is_chroma); + +int ff_h264_parse_ref_count(int *plist_count, int ref_count[2], + GetBitContext *gb, const PPS *pps, + int slice_type_nos, int picture_structure, void *logctx); + +int ff_h264_init_poc(int pic_field_poc[2], int *pic_poc, + const SPS *sps, H264POCContext *poc, + int picture_structure, int nal_ref_idc); + +int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps, + int *is_avc, int *nal_length_size, + int err_recognition, void *logctx); + +/** + * compute profile from sps + */ +int ff_h264_get_profile(const SPS *sps); + +#endif /* AVCODEC_H264_PARSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_ps.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_ps.h new file mode 100644 index 00000000..3f1ab72e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_ps.h @@ -0,0 +1,172 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 parameter set handling + */ + +#ifndef AVCODEC_H264_PS_H +#define AVCODEC_H264_PS_H + +#include + +#include "libavutil/buffer.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" + +#include "avcodec.h" +#include "get_bits.h" +#include "h264.h" + +#define MAX_SPS_COUNT 32 +#define MAX_PPS_COUNT 256 +#define MAX_LOG2_MAX_FRAME_NUM (12 + 4) + +/** + * Sequence parameter set + */ +typedef struct SPS { + unsigned int sps_id; + int profile_idc; + int level_idc; + int chroma_format_idc; + int transform_bypass; ///< qpprime_y_zero_transform_bypass_flag + int log2_max_frame_num; ///< log2_max_frame_num_minus4 + 4 + int poc_type; ///< pic_order_cnt_type + int log2_max_poc_lsb; ///< log2_max_pic_order_cnt_lsb_minus4 + int delta_pic_order_always_zero_flag; + int offset_for_non_ref_pic; + int offset_for_top_to_bottom_field; + int poc_cycle_length; ///< num_ref_frames_in_pic_order_cnt_cycle + int ref_frame_count; ///< num_ref_frames + int gaps_in_frame_num_allowed_flag; + int mb_width; ///< pic_width_in_mbs_minus1 + 1 + ///< (pic_height_in_map_units_minus1 + 1) * (2 - frame_mbs_only_flag) + int mb_height; + int frame_mbs_only_flag; + int mb_aff; ///< mb_adaptive_frame_field_flag + int direct_8x8_inference_flag; + int crop; ///< frame_cropping_flag + + /* those 4 are already in luma samples */ + unsigned int crop_left; ///< frame_cropping_rect_left_offset + unsigned int crop_right; ///< frame_cropping_rect_right_offset + unsigned int crop_top; ///< frame_cropping_rect_top_offset + unsigned int crop_bottom; ///< frame_cropping_rect_bottom_offset + int vui_parameters_present_flag; + AVRational sar; + int video_signal_type_present_flag; + int full_range; + int colour_description_present_flag; + enum AVColorPrimaries color_primaries; + enum AVColorTransferCharacteristic color_trc; + enum AVColorSpace colorspace; + enum AVChromaLocation chroma_location; + + int timing_info_present_flag; + uint32_t num_units_in_tick; + uint32_t time_scale; + int fixed_frame_rate_flag; + int32_t offset_for_ref_frame[256]; + int bitstream_restriction_flag; + int num_reorder_frames; + int scaling_matrix_present; + uint8_t scaling_matrix4[6][16]; + uint8_t scaling_matrix8[6][64]; + int nal_hrd_parameters_present_flag; + int vcl_hrd_parameters_present_flag; + int pic_struct_present_flag; + int time_offset_length; + int cpb_cnt; ///< See H.264 E.1.2 + int initial_cpb_removal_delay_length; ///< initial_cpb_removal_delay_length_minus1 + 1 + int cpb_removal_delay_length; ///< cpb_removal_delay_length_minus1 + 1 + int dpb_output_delay_length; ///< dpb_output_delay_length_minus1 + 1 + int bit_depth_luma; ///< bit_depth_luma_minus8 + 8 + int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8 + int residual_color_transform_flag; ///< residual_colour_transform_flag + int constraint_set_flags; ///< constraint_set[0-3]_flag + uint8_t data[4096]; + size_t data_size; +} SPS; + +/** + * Picture parameter set + */ +typedef struct PPS { + unsigned int sps_id; + int cabac; ///< entropy_coding_mode_flag + int pic_order_present; ///< pic_order_present_flag + int slice_group_count; ///< num_slice_groups_minus1 + 1 + int mb_slice_group_map_type; + unsigned int ref_count[2]; ///< num_ref_idx_l0/1_active_minus1 + 1 + int weighted_pred; ///< weighted_pred_flag + int weighted_bipred_idc; + int init_qp; ///< pic_init_qp_minus26 + 26 + int init_qs; ///< pic_init_qs_minus26 + 26 + int chroma_qp_index_offset[2]; + int deblocking_filter_parameters_present; ///< deblocking_filter_parameters_present_flag + int constrained_intra_pred; ///< constrained_intra_pred_flag + int redundant_pic_cnt_present; ///< redundant_pic_cnt_present_flag + int transform_8x8_mode; ///< transform_8x8_mode_flag + uint8_t scaling_matrix4[6][16]; + uint8_t scaling_matrix8[6][64]; + uint8_t chroma_qp_table[2][QP_MAX_NUM+1]; ///< pre-scaled (with chroma_qp_index_offset) version of qp_table + int chroma_qp_diff; + uint8_t data[4096]; + size_t data_size; + + uint32_t dequant4_buffer[6][QP_MAX_NUM + 1][16]; + uint32_t dequant8_buffer[6][QP_MAX_NUM + 1][64]; + uint32_t(*dequant4_coeff[6])[16]; + uint32_t(*dequant8_coeff[6])[64]; + + AVBufferRef *sps_ref; + const SPS *sps; +} PPS; + +typedef struct H264ParamSets { + AVBufferRef *sps_list[MAX_SPS_COUNT]; + AVBufferRef *pps_list[MAX_PPS_COUNT]; + + AVBufferRef *pps_ref; + /* currently active parameters sets */ + const PPS *pps; + const SPS *sps; + + int overread_warning_printed[2]; +} H264ParamSets; + +/** + * Decode SPS + */ +int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx, + H264ParamSets *ps, int ignore_truncation); + +/** + * Decode PPS + */ +int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avctx, + H264ParamSets *ps, int bit_length); + +/** + * Uninit H264 param sets structure. + */ +void ff_h264_ps_uninit(H264ParamSets *ps); + +#endif /* AVCODEC_H264_PS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_sei.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_sei.h new file mode 100644 index 00000000..f07a5055 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264_sei.h @@ -0,0 +1,216 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264_SEI_H +#define AVCODEC_H264_SEI_H + +#include "get_bits.h" +#include "h264_ps.h" + +/** + * SEI message types + */ +typedef enum { + H264_SEI_TYPE_BUFFERING_PERIOD = 0, ///< buffering period (H.264, D.1.1) + H264_SEI_TYPE_PIC_TIMING = 1, ///< picture timing + H264_SEI_TYPE_PAN_SCAN_RECT = 2, ///< pan-scan rectangle + H264_SEI_TYPE_FILLER_PAYLOAD = 3, ///< filler data + H264_SEI_TYPE_USER_DATA_REGISTERED = 4, ///< registered user data as specified by Rec. ITU-T T.35 + H264_SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data + H264_SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync) + H264_SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement + H264_SEI_TYPE_DISPLAY_ORIENTATION = 47, ///< display orientation + H264_SEI_TYPE_GREEN_METADATA = 56, ///< GreenMPEG information + H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME = 137, ///< mastering display properties + H264_SEI_TYPE_ALTERNATIVE_TRANSFER = 147, ///< alternative transfer +} H264_SEI_Type; + +/** + * pic_struct in picture timing SEI message + */ +typedef enum { + H264_SEI_PIC_STRUCT_FRAME = 0, ///< 0: %frame + H264_SEI_PIC_STRUCT_TOP_FIELD = 1, ///< 1: top field + H264_SEI_PIC_STRUCT_BOTTOM_FIELD = 2, ///< 2: bottom field + H264_SEI_PIC_STRUCT_TOP_BOTTOM = 3, ///< 3: top field, bottom field, in that order + H264_SEI_PIC_STRUCT_BOTTOM_TOP = 4, ///< 4: bottom field, top field, in that order + H264_SEI_PIC_STRUCT_TOP_BOTTOM_TOP = 5, ///< 5: top field, bottom field, top field repeated, in that order + H264_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM = 6, ///< 6: bottom field, top field, bottom field repeated, in that order + H264_SEI_PIC_STRUCT_FRAME_DOUBLING = 7, ///< 7: %frame doubling + H264_SEI_PIC_STRUCT_FRAME_TRIPLING = 8 ///< 8: %frame tripling +} H264_SEI_PicStructType; + +/** + * frame_packing_arrangement types + */ +typedef enum { + H264_SEI_FPA_TYPE_CHECKERBOARD = 0, + H264_SEI_FPA_TYPE_INTERLEAVE_COLUMN = 1, + H264_SEI_FPA_TYPE_INTERLEAVE_ROW = 2, + H264_SEI_FPA_TYPE_SIDE_BY_SIDE = 3, + H264_SEI_FPA_TYPE_TOP_BOTTOM = 4, + H264_SEI_FPA_TYPE_INTERLEAVE_TEMPORAL = 5, + H264_SEI_FPA_TYPE_2D = 6, +} H264_SEI_FpaType; + +typedef struct H264SEITimeCode { + /* When not continuously receiving full timecodes, we have to reference + the previous timecode received */ + int full; + int frame; + int seconds; + int minutes; + int hours; + int dropframe; +} H264SEITimeCode; + +typedef struct H264SEIPictureTiming { + // maximum size of pic_timing according to the spec should be 274 bits + uint8_t payload[40]; + int payload_size_bits; + + int present; + H264_SEI_PicStructType pic_struct; + + /** + * Bit set of clock types for fields/frames in picture timing SEI message. + * For each found ct_type, appropriate bit is set (e.g., bit 1 for + * interlaced). + */ + int ct_type; + + /** + * dpb_output_delay in picture timing SEI message, see H.264 C.2.2 + */ + int dpb_output_delay; + + /** + * cpb_removal_delay in picture timing SEI message, see H.264 C.1.2 + */ + int cpb_removal_delay; + + /** + * Maximum three timecodes in a pic_timing SEI. + */ + H264SEITimeCode timecode[3]; + + /** + * Number of timecode in use + */ + int timecode_cnt; +} H264SEIPictureTiming; + +typedef struct H264SEIAFD { + int present; + uint8_t active_format_description; +} H264SEIAFD; + +typedef struct H264SEIA53Caption { + AVBufferRef *buf_ref; +} H264SEIA53Caption; + +typedef struct H264SEIUnregistered { + int x264_build; +} H264SEIUnregistered; + +typedef struct H264SEIRecoveryPoint { + /** + * recovery_frame_cnt + * + * Set to -1 if no recovery point SEI message found or to number of frames + * before playback synchronizes. Frames having recovery point are key + * frames. + */ + int recovery_frame_cnt; +} H264SEIRecoveryPoint; + +typedef struct H264SEIBufferingPeriod { + int present; ///< Buffering period SEI flag + int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs +} H264SEIBufferingPeriod; + +typedef struct H264SEIFramePacking { + int present; + int arrangement_id; + int arrangement_cancel_flag; ///< is previous arrangement canceled, -1 if never received + H264_SEI_FpaType arrangement_type; + int arrangement_repetition_period; + int content_interpretation_type; + int quincunx_sampling_flag; + int current_frame_is_frame0_flag; +} H264SEIFramePacking; + +typedef struct H264SEIDisplayOrientation { + int present; + int anticlockwise_rotation; + int hflip, vflip; +} H264SEIDisplayOrientation; + +typedef struct H264SEIGreenMetaData { + uint8_t green_metadata_type; + uint8_t period_type; + uint16_t num_seconds; + uint16_t num_pictures; + uint8_t percent_non_zero_macroblocks; + uint8_t percent_intra_coded_macroblocks; + uint8_t percent_six_tap_filtering; + uint8_t percent_alpha_point_deblocking_instance; + uint8_t xsd_metric_type; + uint16_t xsd_metric_value; +} H264SEIGreenMetaData; + +typedef struct H264SEIAlternativeTransfer { + int present; + int preferred_transfer_characteristics; +} H264SEIAlternativeTransfer; + +typedef struct H264SEIContext { + H264SEIPictureTiming picture_timing; + H264SEIAFD afd; + H264SEIA53Caption a53_caption; + H264SEIUnregistered unregistered; + H264SEIRecoveryPoint recovery_point; + H264SEIBufferingPeriod buffering_period; + H264SEIFramePacking frame_packing; + H264SEIDisplayOrientation display_orientation; + H264SEIGreenMetaData green_metadata; + H264SEIAlternativeTransfer alternative_transfer; +} H264SEIContext; + +struct H264ParamSets; + +int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb, + const struct H264ParamSets *ps, void *logctx); + +/** + * Reset SEI values at the beginning of the frame. + */ +void ff_h264_sei_uninit(H264SEIContext *h); + +/** + * Get stereo_mode string from the h264 frame_packing_arrangement + */ +const char *ff_h264_sei_stereo_mode(const H264SEIFramePacking *h); + +/** + * Parse the contents of a picture timing message given an active SPS. + */ +int ff_h264_sei_process_picture_timing(H264SEIPictureTiming *h, const SPS *sps, + void *logctx); + +#endif /* AVCODEC_H264_SEI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264chroma.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264chroma.h new file mode 100644 index 00000000..5c89fd12 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264chroma.h @@ -0,0 +1,40 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264CHROMA_H +#define AVCODEC_H264CHROMA_H + +#include +#include + +typedef void (*h264_chroma_mc_func)(uint8_t *dst /*align 8*/, uint8_t *src /*align 1*/, ptrdiff_t srcStride, int h, int x, int y); + +typedef struct H264ChromaContext { + h264_chroma_mc_func put_h264_chroma_pixels_tab[4]; + h264_chroma_mc_func avg_h264_chroma_pixels_tab[4]; +} H264ChromaContext; + +void ff_h264chroma_init(H264ChromaContext *c, int bit_depth); + +void ff_h264chroma_init_aarch64(H264ChromaContext *c, int bit_depth); +void ff_h264chroma_init_arm(H264ChromaContext *c, int bit_depth); +void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth); +void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth); +void ff_h264chroma_init_mips(H264ChromaContext *c, int bit_depth); + +#endif /* AVCODEC_H264CHROMA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264data.h new file mode 100644 index 00000000..2968b08b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264data.h @@ -0,0 +1,79 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264DATA_H +#define AVCODEC_H264DATA_H + +#include + +#include "h264dec.h" + +extern const uint8_t ff_h264_golomb_to_pict_type[5]; +extern const uint8_t ff_h264_golomb_to_intra4x4_cbp[48]; +extern const uint8_t ff_h264_golomb_to_inter_cbp[48]; + +extern const uint8_t ff_h264_chroma_dc_scan[4]; +extern const uint8_t ff_h264_chroma422_dc_scan[8]; + +typedef struct IMbInfo { + uint16_t type; + uint8_t pred_mode; + uint8_t cbp; +} IMbInfo; + +extern const IMbInfo ff_h264_i_mb_type_info[26]; + +typedef struct PMbInfo { + uint16_t type; + uint8_t partition_count; +} PMbInfo; + +extern const PMbInfo ff_h264_p_mb_type_info[5]; +extern const PMbInfo ff_h264_p_sub_mb_type_info[4]; +extern const PMbInfo ff_h264_b_mb_type_info[23]; +extern const PMbInfo ff_h264_b_sub_mb_type_info[13]; + +static const AVRational ff_h264_pixel_aspect[17] = { + { 0, 1 }, + { 1, 1 }, + { 12, 11 }, + { 10, 11 }, + { 16, 11 }, + { 40, 33 }, + { 24, 11 }, + { 20, 11 }, + { 32, 11 }, + { 80, 33 }, + { 18, 11 }, + { 15, 11 }, + { 64, 33 }, + { 160, 99 }, + { 4, 3 }, + { 3, 2 }, + { 2, 1 }, +}; + +extern const uint8_t ff_h264_dequant4_coeff_init[6][3]; +extern const uint8_t ff_h264_dequant8_coeff_init_scan[16]; +extern const uint8_t ff_h264_dequant8_coeff_init[6][6]; +extern const uint8_t ff_h264_quant_rem6[QP_MAX_NUM + 1]; +extern const uint8_t ff_h264_quant_div6[QP_MAX_NUM + 1]; + +extern const uint8_t ff_h264_chroma_qp[7][QP_MAX_NUM + 1]; + +#endif /* AVCODEC_H264DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dec.h new file mode 100644 index 00000000..29c4d4e4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dec.h @@ -0,0 +1,858 @@ +/* + * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 / AVC / MPEG-4 part10 codec. + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_H264DEC_H +#define AVCODEC_H264DEC_H + +#include "libavutil/buffer.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/thread.h" + +#include "cabac.h" +#include "error_resilience.h" +#include "h264_parse.h" +#include "h264_ps.h" +#include "h264_sei.h" +#include "h2645_parse.h" +#include "h264chroma.h" +#include "h264dsp.h" +#include "h264pred.h" +#include "h264qpel.h" +#include "internal.h" +#include "mpegutils.h" +#include "parser.h" +#include "qpeldsp.h" +#include "rectangle.h" +#include "videodsp.h" + +#define H264_MAX_PICTURE_COUNT 36 + +#define MAX_MMCO_COUNT 66 + +#define MAX_DELAYED_PIC_COUNT 16 + +/* Compiling in interlaced support reduces the speed + * of progressive decoding by about 2%. */ +#define ALLOW_INTERLACE + +#define FMO 0 + +/** + * The maximum number of slices supported by the decoder. + * must be a power of 2 + */ +#define MAX_SLICES 32 + +#ifdef ALLOW_INTERLACE +#define MB_MBAFF(h) (h)->mb_mbaff +#define MB_FIELD(sl) (sl)->mb_field_decoding_flag +#define FRAME_MBAFF(h) (h)->mb_aff_frame +#define FIELD_PICTURE(h) ((h)->picture_structure != PICT_FRAME) +#define LEFT_MBS 2 +#define LTOP 0 +#define LBOT 1 +#define LEFT(i) (i) +#else +#define MB_MBAFF(h) 0 +#define MB_FIELD(sl) 0 +#define FRAME_MBAFF(h) 0 +#define FIELD_PICTURE(h) 0 +#undef IS_INTERLACED +#define IS_INTERLACED(mb_type) 0 +#define LEFT_MBS 1 +#define LTOP 0 +#define LBOT 0 +#define LEFT(i) 0 +#endif +#define FIELD_OR_MBAFF_PICTURE(h) (FRAME_MBAFF(h) || FIELD_PICTURE(h)) + +#ifndef CABAC +#define CABAC(h) (h)->ps.pps->cabac +#endif + +#define CHROMA(h) ((h)->ps.sps->chroma_format_idc) +#define CHROMA422(h) ((h)->ps.sps->chroma_format_idc == 2) +#define CHROMA444(h) ((h)->ps.sps->chroma_format_idc == 3) + +#define MB_TYPE_REF0 MB_TYPE_ACPRED // dirty but it fits in 16 bit +#define MB_TYPE_8x8DCT 0x01000000 +#define IS_REF0(a) ((a) & MB_TYPE_REF0) +#define IS_8x8DCT(a) ((a) & MB_TYPE_8x8DCT) + +/** + * Memory management control operation opcode. + */ +typedef enum MMCOOpcode { + MMCO_END = 0, + MMCO_SHORT2UNUSED, + MMCO_LONG2UNUSED, + MMCO_SHORT2LONG, + MMCO_SET_MAX_LONG, + MMCO_RESET, + MMCO_LONG, +} MMCOOpcode; + +/** + * Memory management control operation. + */ +typedef struct MMCO { + MMCOOpcode opcode; + int short_pic_num; ///< pic_num without wrapping (pic_num & max_pic_num) + int long_arg; ///< index, pic_num, or num long refs depending on opcode +} MMCO; + +typedef struct H264Picture { + AVFrame *f; + ThreadFrame tf; + + AVBufferRef *qscale_table_buf; + int8_t *qscale_table; + + AVBufferRef *motion_val_buf[2]; + int16_t (*motion_val[2])[2]; + + AVBufferRef *mb_type_buf; + uint32_t *mb_type; + + AVBufferRef *hwaccel_priv_buf; + void *hwaccel_picture_private; ///< hardware accelerator private data + + AVBufferRef *ref_index_buf[2]; + int8_t *ref_index[2]; + + int field_poc[2]; ///< top/bottom POC + int poc; ///< frame POC + int frame_num; ///< frame_num (raw frame_num from slice header) + int mmco_reset; /**< MMCO_RESET set this 1. Reordering code must + not mix pictures before and after MMCO_RESET. */ + int pic_id; /**< pic_num (short -> no wrap version of pic_num, + pic_num & max_pic_num; long -> long_pic_num) */ + int long_ref; ///< 1->long term reference 0->short term reference + int ref_poc[2][2][32]; ///< POCs of the frames/fields used as reference (FIXME need per slice) + int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice) + int mbaff; ///< 1 -> MBAFF frame 0-> not MBAFF + int field_picture; ///< whether or not picture was encoded in separate fields + + int reference; + int recovered; ///< picture at IDR or recovery point + recovery count + int invalid_gap; + int sei_recovery_frame_cnt; + + AVBufferRef *pps_buf; + const PPS *pps; + + int mb_width, mb_height; + int mb_stride; +} H264Picture; + +typedef struct H264Ref { + uint8_t *data[3]; + int linesize[3]; + + int reference; + int poc; + int pic_id; + + H264Picture *parent; +} H264Ref; + +typedef struct H264SliceContext { + struct H264Context *h264; + GetBitContext gb; + ERContext er; + + int slice_num; + int slice_type; + int slice_type_nos; ///< S free slice type (SI/SP are remapped to I/P) + int slice_type_fixed; + + int qscale; + int chroma_qp[2]; // QPc + int qp_thresh; ///< QP threshold to skip loopfilter + int last_qscale_diff; + + // deblock + int deblocking_filter; ///< disable_deblocking_filter_idc with 1 <-> 0 + int slice_alpha_c0_offset; + int slice_beta_offset; + + H264PredWeightTable pwt; + + int prev_mb_skipped; + int next_mb_skipped; + + int chroma_pred_mode; + int intra16x16_pred_mode; + + int8_t intra4x4_pred_mode_cache[5 * 8]; + int8_t(*intra4x4_pred_mode); + + int topleft_mb_xy; + int top_mb_xy; + int topright_mb_xy; + int left_mb_xy[LEFT_MBS]; + + int topleft_type; + int top_type; + int topright_type; + int left_type[LEFT_MBS]; + + const uint8_t *left_block; + int topleft_partition; + + unsigned int topleft_samples_available; + unsigned int top_samples_available; + unsigned int topright_samples_available; + unsigned int left_samples_available; + + ptrdiff_t linesize, uvlinesize; + ptrdiff_t mb_linesize; ///< may be equal to s->linesize or s->linesize * 2, for mbaff + ptrdiff_t mb_uvlinesize; + + int mb_x, mb_y; + int mb_xy; + int resync_mb_x; + int resync_mb_y; + unsigned int first_mb_addr; + // index of the first MB of the next slice + int next_slice_idx; + int mb_skip_run; + int is_complex; + + int picture_structure; + int mb_field_decoding_flag; + int mb_mbaff; ///< mb_aff_frame && mb_field_decoding_flag + + int redundant_pic_count; + + /** + * number of neighbors (top and/or left) that used 8x8 dct + */ + int neighbor_transform_size; + + int direct_spatial_mv_pred; + int col_parity; + int col_fieldoff; + + int cbp; + int top_cbp; + int left_cbp; + + int dist_scale_factor[32]; + int dist_scale_factor_field[2][32]; + int map_col_to_list0[2][16 + 32]; + int map_col_to_list0_field[2][2][16 + 32]; + + /** + * num_ref_idx_l0/1_active_minus1 + 1 + */ + unsigned int ref_count[2]; ///< counts frames or fields, depending on current mb mode + unsigned int list_count; + H264Ref ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs. + * Reordered version of default_ref_list + * according to picture reordering in slice header */ + struct { + uint8_t op; + uint32_t val; + } ref_modifications[2][32]; + int nb_ref_modifications[2]; + + unsigned int pps_id; + + const uint8_t *intra_pcm_ptr; + int16_t *dc_val_base; + + uint8_t *bipred_scratchpad; + uint8_t *edge_emu_buffer; + uint8_t (*top_borders[2])[(16 * 3) * 2]; + int bipred_scratchpad_allocated; + int edge_emu_buffer_allocated; + int top_borders_allocated[2]; + + /** + * non zero coeff count cache. + * is 64 if not available. + */ + DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[15 * 8]; + + /** + * Motion vector cache. + */ + DECLARE_ALIGNED(16, int16_t, mv_cache)[2][5 * 8][2]; + DECLARE_ALIGNED(8, int8_t, ref_cache)[2][5 * 8]; + DECLARE_ALIGNED(16, uint8_t, mvd_cache)[2][5 * 8][2]; + uint8_t direct_cache[5 * 8]; + + DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4]; + + ///< as a DCT coefficient is int32_t in high depth, we need to reserve twice the space. + DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2]; + DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2]; + ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either + ///< check that i is not too large or ensure that there is some unused stuff after mb + int16_t mb_padding[256 * 2]; + + uint8_t (*mvd_table[2])[2]; + + /** + * Cabac + */ + CABACContext cabac; + uint8_t cabac_state[1024]; + int cabac_init_idc; + + MMCO mmco[MAX_MMCO_COUNT]; + int nb_mmco; + int explicit_ref_marking; + + int frame_num; + int poc_lsb; + int delta_poc_bottom; + int delta_poc[2]; + int curr_pic_num; + int max_pic_num; +} H264SliceContext; + +/** + * H264Context + */ +typedef struct H264Context { + const AVClass *class; + AVCodecContext *avctx; + VideoDSPContext vdsp; + H264DSPContext h264dsp; + H264ChromaContext h264chroma; + H264QpelContext h264qpel; + + H264Picture DPB[H264_MAX_PICTURE_COUNT]; + H264Picture *cur_pic_ptr; + H264Picture cur_pic; + H264Picture last_pic_for_ec; + + H264SliceContext *slice_ctx; + int nb_slice_ctx; + int nb_slice_ctx_queued; + + H2645Packet pkt; + + int pixel_shift; ///< 0 for 8-bit H.264, 1 for high-bit-depth H.264 + + /* coded dimensions -- 16 * mb w/h */ + int width, height; + int chroma_x_shift, chroma_y_shift; + + int droppable; + int coded_picture_number; + + int context_initialized; + int flags; + int workaround_bugs; + int x264_build; + /* Set when slice threading is used and at least one slice uses deblocking + * mode 1 (i.e. across slice boundaries). Then we disable the loop filter + * during normal MB decoding and execute it serially at the end. + */ + int postpone_filter; + + /* + * Set to 1 when the current picture is IDR, 0 otherwise. + */ + int picture_idr; + + int crop_left; + int crop_right; + int crop_top; + int crop_bottom; + + int8_t(*intra4x4_pred_mode); + H264PredContext hpc; + + uint8_t (*non_zero_count)[48]; + +#define LIST_NOT_USED -1 // FIXME rename? +#define PART_NOT_AVAILABLE -2 + + /** + * block_offset[ 0..23] for frame macroblocks + * block_offset[24..47] for field macroblocks + */ + int block_offset[2 * (16 * 3)]; + + uint32_t *mb2b_xy; // FIXME are these 4 a good idea? + uint32_t *mb2br_xy; + int b_stride; // FIXME use s->b4_stride + + uint16_t *slice_table; ///< slice_table_base + 2*mb_stride + 1 + + // interlacing specific flags + int mb_aff_frame; + int picture_structure; + int first_field; + + uint8_t *list_counts; ///< Array of list_count per MB specifying the slice type + + /* 0x100 -> non null luma_dc, 0x80/0x40 -> non null chroma_dc (cb/cr), 0x?0 -> chroma_cbp(0, 1, 2), 0x0? luma_cbp */ + uint16_t *cbp_table; + + /* chroma_pred_mode for i4x4 or i16x16, else 0 */ + uint8_t *chroma_pred_mode_table; + uint8_t (*mvd_table[2])[2]; + uint8_t *direct_table; + + uint8_t scan_padding[16]; + uint8_t zigzag_scan[16]; + uint8_t zigzag_scan8x8[64]; + uint8_t zigzag_scan8x8_cavlc[64]; + uint8_t field_scan[16]; + uint8_t field_scan8x8[64]; + uint8_t field_scan8x8_cavlc[64]; + uint8_t zigzag_scan_q0[16]; + uint8_t zigzag_scan8x8_q0[64]; + uint8_t zigzag_scan8x8_cavlc_q0[64]; + uint8_t field_scan_q0[16]; + uint8_t field_scan8x8_q0[64]; + uint8_t field_scan8x8_cavlc_q0[64]; + + int mb_y; + int mb_height, mb_width; + int mb_stride; + int mb_num; + + // ============================================================= + // Things below are not used in the MB or more inner code + + int nal_ref_idc; + int nal_unit_type; + + int has_slice; ///< slice NAL is found in the packet, set by decode_nal_units, its state does not need to be preserved outside h264_decode_frame() + + /** + * Used to parse AVC variant of H.264 + */ + int is_avc; ///< this flag is != 0 if codec is avc1 + int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) + + int bit_depth_luma; ///< luma bit depth from sps to detect changes + int chroma_format_idc; ///< chroma format from sps to detect changes + + H264ParamSets ps; + + uint16_t *slice_table_base; + + H264POCContext poc; + + H264Ref default_ref[2]; + H264Picture *short_ref[32]; + H264Picture *long_ref[32]; + H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size? + int last_pocs[MAX_DELAYED_PIC_COUNT]; + H264Picture *next_output_pic; + int next_outputed_poc; + + /** + * memory management control operations buffer. + */ + MMCO mmco[MAX_MMCO_COUNT]; + int nb_mmco; + int mmco_reset; + int explicit_ref_marking; + + int long_ref_count; ///< number of actual long term references + int short_ref_count; ///< number of actual short term references + + /** + * @name Members for slice based multithreading + * @{ + */ + /** + * current slice number, used to initialize slice_num of each thread/context + */ + int current_slice; + + /** @} */ + + /** + * Complement sei_pic_struct + * SEI_PIC_STRUCT_TOP_BOTTOM and SEI_PIC_STRUCT_BOTTOM_TOP indicate interlaced frames. + * However, soft telecined frames may have these values. + * This is used in an attempt to flag soft telecine progressive. + */ + int prev_interlaced_frame; + + /** + * Are the SEI recovery points looking valid. + */ + int valid_recovery_point; + + /** + * recovery_frame is the frame_num at which the next frame should + * be fully constructed. + * + * Set to -1 when not expecting a recovery point. + */ + int recovery_frame; + +/** + * We have seen an IDR, so all the following frames in coded order are correctly + * decodable. + */ +#define FRAME_RECOVERED_IDR (1 << 0) +/** + * Sufficient number of frames have been decoded since a SEI recovery point, + * so all the following frames in presentation order are correct. + */ +#define FRAME_RECOVERED_SEI (1 << 1) + + int frame_recovered; ///< Initial frame has been completely recovered + + int has_recovery_point; + + int missing_fields; + + /* for frame threading, this is set to 1 + * after finish_setup() has been called, so we cannot modify + * some context properties (which are supposed to stay constant between + * slices) anymore */ + int setup_finished; + + int cur_chroma_format_idc; + int cur_bit_depth_luma; + int16_t slice_row[MAX_SLICES]; ///< to detect when MAX_SLICES is too low + + /* original AVCodecContext dimensions, used to handle container + * cropping */ + int width_from_caller; + int height_from_caller; + + int enable_er; + + H264SEIContext sei; + + AVBufferPool *qscale_table_pool; + AVBufferPool *mb_type_pool; + AVBufferPool *motion_val_pool; + AVBufferPool *ref_index_pool; + int ref2frm[MAX_SLICES][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1 +} H264Context; + +extern const uint16_t ff_h264_mb_sizes[4]; + +/** + * Reconstruct bitstream slice_type. + */ +int ff_h264_get_slice_type(const H264SliceContext *sl); + +/** + * Allocate tables. + * needs width/height + */ +int ff_h264_alloc_tables(H264Context *h); + +int ff_h264_decode_ref_pic_list_reordering(H264SliceContext *sl, void *logctx); +int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl); +void ff_h264_remove_all_refs(H264Context *h); + +/** + * Execute the reference picture marking (memory management control operations). + */ +int ff_h264_execute_ref_pic_marking(H264Context *h); + +int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb, + const H2645NAL *nal, void *logctx); + +void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl); +void ff_h264_decode_init_vlc(void); + +/** + * Decode a macroblock + * @return 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR on error + */ +int ff_h264_decode_mb_cavlc(const H264Context *h, H264SliceContext *sl); + +/** + * Decode a CABAC coded macroblock + * @return 0 if OK, ER_AC_ERROR / ER_DC_ERROR / ER_MV_ERROR on error + */ +int ff_h264_decode_mb_cabac(const H264Context *h, H264SliceContext *sl); + +void ff_h264_init_cabac_states(const H264Context *h, H264SliceContext *sl); + +void ff_h264_direct_dist_scale_factor(const H264Context *const h, H264SliceContext *sl); +void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *sl); +void ff_h264_pred_direct_motion(const H264Context *const h, H264SliceContext *sl, + int *mb_type); + +void ff_h264_filter_mb_fast(const H264Context *h, H264SliceContext *sl, int mb_x, int mb_y, + uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, + unsigned int linesize, unsigned int uvlinesize); +void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl, int mb_x, int mb_y, + uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, + unsigned int linesize, unsigned int uvlinesize); + +/* + * o-o o-o + * / / / + * o-o o-o + * ,---' + * o-o o-o + * / / / + * o-o o-o + */ + +/* Scan8 organization: + * 0 1 2 3 4 5 6 7 + * 0 DY y y y y y + * 1 y Y Y Y Y + * 2 y Y Y Y Y + * 3 y Y Y Y Y + * 4 y Y Y Y Y + * 5 DU u u u u u + * 6 u U U U U + * 7 u U U U U + * 8 u U U U U + * 9 u U U U U + * 10 DV v v v v v + * 11 v V V V V + * 12 v V V V V + * 13 v V V V V + * 14 v V V V V + * DY/DU/DV are for luma/chroma DC. + */ + +#define LUMA_DC_BLOCK_INDEX 48 +#define CHROMA_DC_BLOCK_INDEX 49 + +// This table must be here because scan8[constant] must be known at compiletime +static const uint8_t scan8[16 * 3 + 3] = { + 4 + 1 * 8, 5 + 1 * 8, 4 + 2 * 8, 5 + 2 * 8, + 6 + 1 * 8, 7 + 1 * 8, 6 + 2 * 8, 7 + 2 * 8, + 4 + 3 * 8, 5 + 3 * 8, 4 + 4 * 8, 5 + 4 * 8, + 6 + 3 * 8, 7 + 3 * 8, 6 + 4 * 8, 7 + 4 * 8, + 4 + 6 * 8, 5 + 6 * 8, 4 + 7 * 8, 5 + 7 * 8, + 6 + 6 * 8, 7 + 6 * 8, 6 + 7 * 8, 7 + 7 * 8, + 4 + 8 * 8, 5 + 8 * 8, 4 + 9 * 8, 5 + 9 * 8, + 6 + 8 * 8, 7 + 8 * 8, 6 + 9 * 8, 7 + 9 * 8, + 4 + 11 * 8, 5 + 11 * 8, 4 + 12 * 8, 5 + 12 * 8, + 6 + 11 * 8, 7 + 11 * 8, 6 + 12 * 8, 7 + 12 * 8, + 4 + 13 * 8, 5 + 13 * 8, 4 + 14 * 8, 5 + 14 * 8, + 6 + 13 * 8, 7 + 13 * 8, 6 + 14 * 8, 7 + 14 * 8, + 0 + 0 * 8, 0 + 5 * 8, 0 + 10 * 8 +}; + +static av_always_inline uint32_t pack16to32(unsigned a, unsigned b) +{ +#if HAVE_BIGENDIAN + return (b & 0xFFFF) + (a << 16); +#else + return (a & 0xFFFF) + (b << 16); +#endif +} + +static av_always_inline uint16_t pack8to16(unsigned a, unsigned b) +{ +#if HAVE_BIGENDIAN + return (b & 0xFF) + (a << 8); +#else + return (a & 0xFF) + (b << 8); +#endif +} + +/** + * Get the chroma qp. + */ +static av_always_inline int get_chroma_qp(const PPS *pps, int t, int qscale) +{ + return pps->chroma_qp_table[t][qscale]; +} + +/** + * Get the predicted intra4x4 prediction mode. + */ +static av_always_inline int pred_intra_mode(const H264Context *h, + H264SliceContext *sl, int n) +{ + const int index8 = scan8[n]; + const int left = sl->intra4x4_pred_mode_cache[index8 - 1]; + const int top = sl->intra4x4_pred_mode_cache[index8 - 8]; + const int min = FFMIN(left, top); + + ff_tlog(h->avctx, "mode:%d %d min:%d\n", left, top, min); + + if (min < 0) + return DC_PRED; + else + return min; +} + +static av_always_inline void write_back_intra_pred_mode(const H264Context *h, + H264SliceContext *sl) +{ + int8_t *i4x4 = sl->intra4x4_pred_mode + h->mb2br_xy[sl->mb_xy]; + int8_t *i4x4_cache = sl->intra4x4_pred_mode_cache; + + AV_COPY32(i4x4, i4x4_cache + 4 + 8 * 4); + i4x4[4] = i4x4_cache[7 + 8 * 3]; + i4x4[5] = i4x4_cache[7 + 8 * 2]; + i4x4[6] = i4x4_cache[7 + 8 * 1]; +} + +static av_always_inline void write_back_non_zero_count(const H264Context *h, + H264SliceContext *sl) +{ + const int mb_xy = sl->mb_xy; + uint8_t *nnz = h->non_zero_count[mb_xy]; + uint8_t *nnz_cache = sl->non_zero_count_cache; + + AV_COPY32(&nnz[ 0], &nnz_cache[4 + 8 * 1]); + AV_COPY32(&nnz[ 4], &nnz_cache[4 + 8 * 2]); + AV_COPY32(&nnz[ 8], &nnz_cache[4 + 8 * 3]); + AV_COPY32(&nnz[12], &nnz_cache[4 + 8 * 4]); + AV_COPY32(&nnz[16], &nnz_cache[4 + 8 * 6]); + AV_COPY32(&nnz[20], &nnz_cache[4 + 8 * 7]); + AV_COPY32(&nnz[32], &nnz_cache[4 + 8 * 11]); + AV_COPY32(&nnz[36], &nnz_cache[4 + 8 * 12]); + + if (!h->chroma_y_shift) { + AV_COPY32(&nnz[24], &nnz_cache[4 + 8 * 8]); + AV_COPY32(&nnz[28], &nnz_cache[4 + 8 * 9]); + AV_COPY32(&nnz[40], &nnz_cache[4 + 8 * 13]); + AV_COPY32(&nnz[44], &nnz_cache[4 + 8 * 14]); + } +} + +static av_always_inline void write_back_motion_list(const H264Context *h, + H264SliceContext *sl, + int b_stride, + int b_xy, int b8_xy, + int mb_type, int list) +{ + int16_t(*mv_dst)[2] = &h->cur_pic.motion_val[list][b_xy]; + int16_t(*mv_src)[2] = &sl->mv_cache[list][scan8[0]]; + AV_COPY128(mv_dst + 0 * b_stride, mv_src + 8 * 0); + AV_COPY128(mv_dst + 1 * b_stride, mv_src + 8 * 1); + AV_COPY128(mv_dst + 2 * b_stride, mv_src + 8 * 2); + AV_COPY128(mv_dst + 3 * b_stride, mv_src + 8 * 3); + if (CABAC(h)) { + uint8_t (*mvd_dst)[2] = &sl->mvd_table[list][FMO ? 8 * sl->mb_xy + : h->mb2br_xy[sl->mb_xy]]; + uint8_t(*mvd_src)[2] = &sl->mvd_cache[list][scan8[0]]; + if (IS_SKIP(mb_type)) { + AV_ZERO128(mvd_dst); + } else { + AV_COPY64(mvd_dst, mvd_src + 8 * 3); + AV_COPY16(mvd_dst + 3 + 3, mvd_src + 3 + 8 * 0); + AV_COPY16(mvd_dst + 3 + 2, mvd_src + 3 + 8 * 1); + AV_COPY16(mvd_dst + 3 + 1, mvd_src + 3 + 8 * 2); + } + } + + { + int8_t *ref_index = &h->cur_pic.ref_index[list][b8_xy]; + int8_t *ref_cache = sl->ref_cache[list]; + ref_index[0 + 0 * 2] = ref_cache[scan8[0]]; + ref_index[1 + 0 * 2] = ref_cache[scan8[4]]; + ref_index[0 + 1 * 2] = ref_cache[scan8[8]]; + ref_index[1 + 1 * 2] = ref_cache[scan8[12]]; + } +} + +static av_always_inline void write_back_motion(const H264Context *h, + H264SliceContext *sl, + int mb_type) +{ + const int b_stride = h->b_stride; + const int b_xy = 4 * sl->mb_x + 4 * sl->mb_y * h->b_stride; // try mb2b(8)_xy + const int b8_xy = 4 * sl->mb_xy; + + if (USES_LIST(mb_type, 0)) { + write_back_motion_list(h, sl, b_stride, b_xy, b8_xy, mb_type, 0); + } else { + fill_rectangle(&h->cur_pic.ref_index[0][b8_xy], + 2, 2, 2, (uint8_t)LIST_NOT_USED, 1); + } + if (USES_LIST(mb_type, 1)) + write_back_motion_list(h, sl, b_stride, b_xy, b8_xy, mb_type, 1); + + if (sl->slice_type_nos == AV_PICTURE_TYPE_B && CABAC(h)) { + if (IS_8X8(mb_type)) { + uint8_t *direct_table = &h->direct_table[4 * sl->mb_xy]; + direct_table[1] = sl->sub_mb_type[1] >> 1; + direct_table[2] = sl->sub_mb_type[2] >> 1; + direct_table[3] = sl->sub_mb_type[3] >> 1; + } + } +} + +static av_always_inline int get_dct8x8_allowed(const H264Context *h, H264SliceContext *sl) +{ + if (h->ps.sps->direct_8x8_inference_flag) + return !(AV_RN64A(sl->sub_mb_type) & + ((MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8) * + 0x0001000100010001ULL)); + else + return !(AV_RN64A(sl->sub_mb_type) & + ((MB_TYPE_16x8 | MB_TYPE_8x16 | MB_TYPE_8x8 | MB_TYPE_DIRECT2) * + 0x0001000100010001ULL)); +} + +static inline int find_start_code(const uint8_t *buf, int buf_size, + int buf_index, int next_avc) +{ + uint32_t state = -1; + + buf_index = avpriv_find_start_code(buf + buf_index, buf + next_avc + 1, &state) - buf - 1; + + return FFMIN(buf_index, buf_size); +} + +int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup); + +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src); +void ff_h264_unref_picture(H264Context *h, H264Picture *pic); + +int ff_h264_slice_context_init(H264Context *h, H264SliceContext *sl); + +void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl, int y, int height); + +/** + * Submit a slice for decoding. + * + * Parse the slice header, starting a new field/frame if necessary. If any + * slices are queued for the previous field, they are decoded. + */ +int ff_h264_queue_decode_slice(H264Context *h, const H2645NAL *nal); +int ff_h264_execute_decode_slices(H264Context *h); +int ff_h264_update_thread_context(AVCodecContext *dst, + const AVCodecContext *src); + +void ff_h264_flush_change(H264Context *h); + +void ff_h264_free_tables(H264Context *h); + +void ff_h264_set_erpic(ERPicture *dst, H264Picture *src); + +#endif /* AVCODEC_H264DEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dsp.h new file mode 100644 index 00000000..cbea3173 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264dsp.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2003-2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 DSP functions. + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_H264DSP_H +#define AVCODEC_H264DSP_H + +#include +#include + +typedef void (*h264_weight_func)(uint8_t *block, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, + int weightd, int weights, int offset); + +/** + * Context for storing H.264 DSP functions + */ +typedef struct H264DSPContext { + /* weighted MC */ + h264_weight_func weight_h264_pixels_tab[4]; + h264_biweight_func biweight_h264_pixels_tab[4]; + + /* loop filter */ + void (*h264_v_loop_filter_luma)(uint8_t *pix /*align 16*/, ptrdiff_t stride, + int alpha, int beta, int8_t *tc0); + void (*h264_h_loop_filter_luma)(uint8_t *pix /*align 4 */, ptrdiff_t stride, + int alpha, int beta, int8_t *tc0); + void (*h264_h_loop_filter_luma_mbaff)(uint8_t *pix /*align 16*/, ptrdiff_t stride, + int alpha, int beta, int8_t *tc0); + /* v/h_loop_filter_luma_intra: align 16 */ + void (*h264_v_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride, + int alpha, int beta); + void (*h264_h_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride, + int alpha, int beta); + void (*h264_h_loop_filter_luma_mbaff_intra)(uint8_t *pix /*align 16*/, + ptrdiff_t stride, int alpha, int beta); + void (*h264_v_loop_filter_chroma)(uint8_t *pix /*align 8*/, ptrdiff_t stride, + int alpha, int beta, int8_t *tc0); + void (*h264_h_loop_filter_chroma)(uint8_t *pix /*align 4*/, ptrdiff_t stride, + int alpha, int beta, int8_t *tc0); + void (*h264_h_loop_filter_chroma_mbaff)(uint8_t *pix /*align 8*/, + ptrdiff_t stride, int alpha, int beta, + int8_t *tc0); + void (*h264_v_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/, + ptrdiff_t stride, int alpha, int beta); + void (*h264_h_loop_filter_chroma_intra)(uint8_t *pix /*align 8*/, + ptrdiff_t stride, int alpha, int beta); + void (*h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/, + ptrdiff_t stride, int alpha, int beta); + // h264_loop_filter_strength: simd only. the C version is inlined in h264_loopfilter.c + void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40], + int8_t ref[2][40], int16_t mv[2][40][2], + int bidir, int edges, int step, + int mask_mv0, int mask_mv1, int field); + + /* IDCT */ + void (*h264_idct_add)(uint8_t *dst /*align 4*/, + int16_t *block /*align 16*/, int stride); + void (*h264_idct8_add)(uint8_t *dst /*align 8*/, + int16_t *block /*align 16*/, int stride); + void (*h264_idct_dc_add)(uint8_t *dst /*align 4*/, + int16_t *block /*align 16*/, int stride); + void (*h264_idct8_dc_add)(uint8_t *dst /*align 8*/, + int16_t *block /*align 16*/, int stride); + + void (*h264_idct_add16)(uint8_t *dst /*align 16*/, const int *blockoffset, + int16_t *block /*align 16*/, int stride, + const uint8_t nnzc[15 * 8]); + void (*h264_idct8_add4)(uint8_t *dst /*align 16*/, const int *blockoffset, + int16_t *block /*align 16*/, int stride, + const uint8_t nnzc[15 * 8]); + void (*h264_idct_add8)(uint8_t **dst /*align 16*/, const int *blockoffset, + int16_t *block /*align 16*/, int stride, + const uint8_t nnzc[15 * 8]); + void (*h264_idct_add16intra)(uint8_t *dst /*align 16*/, const int *blockoffset, + int16_t *block /*align 16*/, + int stride, const uint8_t nnzc[15 * 8]); + void (*h264_luma_dc_dequant_idct)(int16_t *output, + int16_t *input /*align 16*/, int qmul); + void (*h264_chroma_dc_dequant_idct)(int16_t *block, int qmul); + + /* bypass-transform */ + void (*h264_add_pixels8_clear)(uint8_t *dst, int16_t *block, int stride); + void (*h264_add_pixels4_clear)(uint8_t *dst, int16_t *block, int stride); + + /** + * Search buf from the start for up to size bytes. Return the index + * of a zero byte, or >= size if not found. Ideally, use lookahead + * to filter out any zero bytes that are known to not be followed by + * one or more further zero bytes and a one byte. Better still, filter + * out any bytes that form the trailing_zero_8bits syntax element too. + */ + int (*startcode_find_candidate)(const uint8_t *buf, int size); +} H264DSPContext; + +void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); +void ff_h264dsp_init_aarch64(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); +void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); +void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); +void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); +void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); + +#endif /* AVCODEC_H264DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264idct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264idct.h new file mode 100644 index 00000000..17e00514 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264idct.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264IDCT_H +#define AVCODEC_H264IDCT_H + +#include + +#define H264_IDCT(depth) \ +void ff_h264_idct8_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ +void ff_h264_idct_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ +void ff_h264_idct8_dc_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ +void ff_h264_idct_dc_add_ ## depth ## _c(uint8_t *dst, int16_t *block, int stride);\ +void ff_h264_idct_add16_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct_add16intra_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct8_add4_ ## depth ## _c(uint8_t *dst, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct_add8_422_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_idct_add8_ ## depth ## _c(uint8_t **dest, const int *blockoffset, int16_t *block, int stride, const uint8_t nnzc[6*8]);\ +void ff_h264_luma_dc_dequant_idct_ ## depth ## _c(int16_t *output, int16_t *input, int qmul);\ +void ff_h264_chroma422_dc_dequant_idct_ ## depth ## _c(int16_t *block, int qmul);\ +void ff_h264_chroma_dc_dequant_idct_ ## depth ## _c(int16_t *block, int qmul); + +H264_IDCT( 8) +H264_IDCT( 9) +H264_IDCT(10) +H264_IDCT(12) +H264_IDCT(14) + +#endif /* AVCODEC_H264IDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264pred.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264pred.h new file mode 100644 index 00000000..2863dc9b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264pred.h @@ -0,0 +1,126 @@ +/* + * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.264 / AVC / MPEG-4 prediction functions. + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_H264PRED_H +#define AVCODEC_H264PRED_H + +#include +#include + +/** + * Prediction types + */ +//@{ +#define VERT_PRED 0 +#define HOR_PRED 1 +#define DC_PRED 2 +#define DIAG_DOWN_LEFT_PRED 3 +#define DIAG_DOWN_RIGHT_PRED 4 +#define VERT_RIGHT_PRED 5 +#define HOR_DOWN_PRED 6 +#define VERT_LEFT_PRED 7 +#define HOR_UP_PRED 8 + +// DC edge (not for VP8) +#define LEFT_DC_PRED 9 +#define TOP_DC_PRED 10 +#define DC_128_PRED 11 + +// RV40 specific +#define DIAG_DOWN_LEFT_PRED_RV40_NODOWN 12 +#define HOR_UP_PRED_RV40_NODOWN 13 +#define VERT_LEFT_PRED_RV40_NODOWN 14 + +// VP8 specific +#define TM_VP8_PRED 9 ///< "True Motion", used instead of plane +#define VERT_VP8_PRED 10 ///< for VP8, #VERT_PRED is the average of + ///< (left col+cur col x2+right col) / 4; + ///< this is the "unaveraged" one +#define HOR_VP8_PRED 14 ///< unaveraged version of #HOR_PRED, see + ///< #VERT_VP8_PRED for details +#define DC_127_PRED 12 +#define DC_129_PRED 13 + +#define DC_PRED8x8 0 +#define HOR_PRED8x8 1 +#define VERT_PRED8x8 2 +#define PLANE_PRED8x8 3 + +// DC edge +#define LEFT_DC_PRED8x8 4 +#define TOP_DC_PRED8x8 5 +#define DC_128_PRED8x8 6 + +// H.264/SVQ3 (8x8) specific +#define ALZHEIMER_DC_L0T_PRED8x8 7 +#define ALZHEIMER_DC_0LT_PRED8x8 8 +#define ALZHEIMER_DC_L00_PRED8x8 9 +#define ALZHEIMER_DC_0L0_PRED8x8 10 + +// VP8 specific +#define DC_127_PRED8x8 7 +#define DC_129_PRED8x8 8 +//@} + +/** + * Context for storing H.264 prediction functions + */ +typedef struct H264PredContext { + void(*pred4x4[9 + 3 + 3])(uint8_t *src, const uint8_t *topright, + ptrdiff_t stride); + void(*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright, + ptrdiff_t stride); + void(*pred8x8[4 + 3 + 4])(uint8_t *src, ptrdiff_t stride); + void(*pred16x16[4 + 3 + 2])(uint8_t *src, ptrdiff_t stride); + + void(*pred4x4_add[2])(uint8_t *pix /*align 4*/, + int16_t *block /*align 16*/, ptrdiff_t stride); + void(*pred8x8l_add[2])(uint8_t *pix /*align 8*/, + int16_t *block /*align 16*/, ptrdiff_t stride); + void(*pred8x8l_filter_add[2])(uint8_t *pix /*align 8*/, + int16_t *block /*align 16*/, int topleft, int topright, ptrdiff_t stride); + void(*pred8x8_add[3])(uint8_t *pix /*align 8*/, + const int *block_offset, + int16_t *block /*align 16*/, ptrdiff_t stride); + void(*pred16x16_add[3])(uint8_t *pix /*align 16*/, + const int *block_offset, + int16_t *block /*align 16*/, ptrdiff_t stride); +} H264PredContext; + +void ff_h264_pred_init(H264PredContext *h, int codec_id, + const int bit_depth, const int chroma_format_idc); +void ff_h264_pred_init_aarch64(H264PredContext *h, int codec_id, + const int bit_depth, + const int chroma_format_idc); +void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, + const int bit_depth, const int chroma_format_idc); +void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, + const int bit_depth, const int chroma_format_idc); +void ff_h264_pred_init_mips(H264PredContext *h, int codec_id, + const int bit_depth, const int chroma_format_idc); + +#endif /* AVCODEC_H264PRED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264qpel.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264qpel.h new file mode 100644 index 00000000..7c57ad00 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h264qpel.h @@ -0,0 +1,40 @@ +/* + * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder + * Copyright (c) 2003-2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H264QPEL_H +#define AVCODEC_H264QPEL_H + +#include "qpeldsp.h" + +typedef struct H264QpelContext { + qpel_mc_func put_h264_qpel_pixels_tab[4][16]; + qpel_mc_func avg_h264_qpel_pixels_tab[4][16]; +} H264QpelContext; + +void ff_h264qpel_init(H264QpelContext *c, int bit_depth); + +void ff_h264qpel_init_aarch64(H264QpelContext *c, int bit_depth); +void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth); +void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth); +void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth); +void ff_h264qpel_init_mips(H264QpelContext *c, int bit_depth); + +#endif /* AVCODEC_H264QPEL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h265_profile_level.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h265_profile_level.h new file mode 100644 index 00000000..2d5bebae --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/h265_profile_level.h @@ -0,0 +1,90 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_H265_PROFILE_LEVEL_H +#define AVCODEC_H265_PROFILE_LEVEL_H + +#include + +#include "cbs_h265.h" + + +typedef struct H265LevelDescriptor { + const char *name; + uint8_t level_idc; + + // Table A.6. + uint32_t max_luma_ps; + uint32_t max_cpb_main; + uint32_t max_cpb_high; + uint16_t max_slice_segments_per_picture; + uint8_t max_tile_rows; + uint8_t max_tile_cols; + + // Table A.7. + uint32_t max_luma_sr; + uint32_t max_br_main; + uint32_t max_br_high; + uint8_t min_cr_base_main; + uint8_t min_cr_base_high; +} H265LevelDescriptor; + +typedef struct H265ProfileDescriptor { + const char *name; + uint8_t profile_idc; + uint8_t high_throughput; + + // Tables A.2, A.3 and A.5. + uint8_t max_14bit; + uint8_t max_12bit; + uint8_t max_10bit; + uint8_t max_8bit; + uint8_t max_422chroma; + uint8_t max_420chroma; + uint8_t max_monochrome; + uint8_t intra; + uint8_t one_picture_only; + uint8_t lower_bit_rate; + + // Table A.8. + uint16_t cpb_vcl_factor; + uint16_t cpb_nal_factor; + float format_capability_factor; + float min_cr_scale_factor; + uint8_t max_dpb_pic_buf; +} H265ProfileDescriptor; + + +const H265LevelDescriptor *ff_h265_get_level(int level_idc); + +const H265ProfileDescriptor *ff_h265_get_profile(const H265RawProfileTierLevel *ptl); + + +/** + * Guess the level of a stream from some parameters. + * + * Unknown parameters may be zero, in which case they are ignored. + */ +const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *ptl, + int64_t bitrate, + int width, int height, + int slice_segments, + int tile_rows, int tile_cols, + int max_dec_pic_buffering); + +#endif /* AVCODEC_H265_PROFILE_LEVEL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hap.h new file mode 100644 index 00000000..00c3dbb3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hap.h @@ -0,0 +1,112 @@ +/* + * Vidvox Hap + * Copyright (C) 2015 Vittorio Giovara + * Copyright (C) 2015 Tom Butterworth + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HAP_H +#define AVCODEC_HAP_H + +#include + +#include "libavutil/opt.h" + +#include "bytestream.h" +#include "texturedsp.h" + +enum HapTextureFormat { + HAP_FMT_RGBDXT1 = 0x0B, + HAP_FMT_RGBADXT5 = 0x0E, + HAP_FMT_YCOCGDXT5 = 0x0F, + HAP_FMT_RGTC1 = 0x01, +}; + +enum HapCompressor { + HAP_COMP_NONE = 0xA0, + HAP_COMP_SNAPPY = 0xB0, + HAP_COMP_COMPLEX = 0xC0, +}; + +enum HapSectionType { + HAP_ST_DECODE_INSTRUCTIONS = 0x01, + HAP_ST_COMPRESSOR_TABLE = 0x02, + HAP_ST_SIZE_TABLE = 0x03, + HAP_ST_OFFSET_TABLE = 0x04, +}; + +typedef struct HapChunk { + enum HapCompressor compressor; + uint32_t compressed_offset; + size_t compressed_size; + int uncompressed_offset; + size_t uncompressed_size; +} HapChunk; + +typedef struct HapContext { + AVClass *class; + + TextureDSPContext dxtc; + GetByteContext gbc; + + enum HapTextureFormat opt_tex_fmt; /* Texture type (encoder only) */ + int opt_chunk_count; /* User-requested chunk count (encoder only) */ + int opt_compressor; /* User-requested compressor (encoder only) */ + + int chunk_count; + HapChunk *chunks; + int *chunk_results; /* Results from threaded operations */ + + int tex_rat; /* Compression ratio */ + int tex_rat2; /* Compression ratio of the second texture */ + const uint8_t *tex_data; /* Compressed texture */ + uint8_t *tex_buf; /* Buffer for compressed texture */ + size_t tex_size; /* Size of the compressed texture */ + + size_t max_snappy; /* Maximum compressed size for snappy buffer */ + + int slice_count; /* Number of slices for threaded operations */ + + int texture_count; /* 2 for HAQA, 1 for other version */ + int texture_section_size; /* size of the part of the texture section (for HAPQA) */ + int uncompress_pix_size; /* nb of byte / pixel for the target picture */ + + /* Pointer to the selected compress or decompress function */ + int (*tex_fun)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*tex_fun2)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); +} HapContext; + +/* + * Set the number of chunks in the frame. Returns 0 on success or an error if: + * - first_in_frame is 0 and the number of chunks has changed + * - any other error occurs + */ +int ff_hap_set_chunk_count(HapContext *ctx, int count, int first_in_frame); + +/* + * Free resources associated with the context + */ +av_cold void ff_hap_free_context(HapContext *ctx); + +/* The first three bytes are the size of the section past the header, or zero + * if the length is stored in the next long word. The fourth byte in the first + * long word indicates the type of the current section. */ +int ff_hap_parse_section_header(GetByteContext *gbc, int *section_size, + enum HapSectionType *section_type); + +#endif /* AVCODEC_HAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hca_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hca_data.h new file mode 100644 index 00000000..80b4a794 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hca_data.h @@ -0,0 +1,174 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVCODEC_HCA_DATA_H +#define AVCODEC_HCA_DATA_H + +#include + +static const uint8_t max_bits_table[] = { + 0, 2, 3, 3, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, +}; + +static const uint8_t quant_spectrum_bits[] = +{ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,2,2,0,0,0,0,0,0,0,0,0,0,0,0, + 2,2,2,2,2,2,3,3,0,0,0,0,0,0,0,0, + 2,2,3,3,3,3,3,3,0,0,0,0,0,0,0,0, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4, + 3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4, + 3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4, + 3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +}; + +static const int8_t quant_spectrum_value[] = +{ + +0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0, + +0,+0,+1,-1,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0,+0, + +0,+0,+1,+1,-1,-1,+2,-2,+0,+0,+0,+0,+0,+0,+0,+0, + +0,+0,+1,-1,+2,-2,+3,-3,+0,+0,+0,+0,+0,+0,+0,+0, + +0,+0,+1,+1,-1,-1,+2,+2,-2,-2,+3,+3,-3,-3,+4,-4, + +0,+0,+1,+1,-1,-1,+2,+2,-2,-2,+3,-3,+4,-4,+5,-5, + +0,+0,+1,+1,-1,-1,+2,-2,+3,-3,+4,-4,+5,-5,+6,-6, + +0,+0,+1,-1,+2,-2,+3,-3,+4,-4,+5,-5,+6,-6,+7,-7, +}; + +static const uint8_t scale_table[] = +{ + 15, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 13, 12, 12, 12, 12, + 12, 12, 11, 11, 11, 11, 11, 11, + 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 7, 6, 6, 5, 4, + 4, 4, 3, 3, 3, 2, 2, 2, + 2, 1, +}; + +static const float window[128] = +{ + 0.000690534, 0.00197623, 0.00367386, 0.00572424, 0.0080967, 0.0107732, 0.0137425, 0.0169979, + 0.0205353, 0.0243529, 0.0284505, 0.0328291, 0.0374906, 0.0424379, 0.0476744, 0.0532043, + 0.0590321, 0.0651629, 0.071602, 0.0783552, 0.0854285, 0.092828, 0.10056, 0.108631, + 0.117048, 0.125817, 0.134944, 0.144437, 0.1543, 0.164539, 0.175161, 0.186169, + 0.197569, 0.209363, 0.221555, 0.234145, 0.247136, 0.260526, 0.274313, 0.288493, + 0.303062, 0.318012, 0.333333, 0.349015, 0.365044, 0.381403, 0.398073, 0.415034, + 0.43226, 0.449725, 0.4674, 0.485251, 0.503245, 0.521344, 0.539509, 0.557698, + 0.575869, 0.593978, 0.611981, 0.629831, 0.647486, 0.6649, 0.682031, 0.698838, + 0.71528, 0.731323, 0.746932, 0.762077, 0.776732, 0.790873, 0.804481, 0.817542, + 0.830044, 0.84198, 0.853347, 0.864144, 0.874375, 0.884046, 0.893167, 0.901749, + 0.909806, 0.917354, 0.924409, 0.93099, 0.937117, 0.942809, 0.948087, 0.952971, + 0.957482, 0.961641, 0.965467, 0.968981, 0.972202, 0.975148, 0.977838, 0.980289, + 0.982518, 0.98454, 0.986371, 0.988024, 0.989514, 0.990853, 0.992053, 0.993126, + 0.994082, 0.994931, 0.995682, 0.996344, 0.996926, 0.997433, 0.997875, 0.998256, + 0.998584, 0.998863, 0.999099, 0.999297, 0.999461, 0.999595, 0.999703, 0.999789, + 0.999856, 0.999906, 0.999942, 0.999967, 0.999984, 0.999993, 0.999998, 1.0, +}; + +static const float intensity_ratio_table[] = +{ + 2.0, 1.85714, 1.71429, 1.57143, 1.42857, 1.28571, 1.14286, 1.0, + 0.857143, 0.714286, 0.571429, 0.428571, 0.285714, 0.142857, 0.0, 0.0, + 0, 1.87066e-08, 2.49253e-08, 3.32113e-08, 4.42518e-08, 5.89626e-08, 7.85637e-08, 1.04681e-07, + 1.3948e-07, 1.85848e-07, 2.4763e-07, 3.2995e-07, 4.39636e-07, 5.85785e-07, 7.80519e-07, 1.03999e-06, + 1.38572e-06, 1.84637e-06, 2.46017e-06, 3.27801e-06, 4.36772e-06, 5.8197e-06, 7.75435e-06, 1.03321e-05, + 1.37669e-05, 1.83435e-05, 2.44414e-05, 3.25665e-05, 4.33927e-05, 5.78179e-05, 7.70384e-05, 0.000102648, + 0.000136772, 0.00018224, 0.000242822, 0.000323544, 0.000431101, 0.000574413, 0.000765366, 0.0010198, + 0.00135881, 0.00181053, 0.0024124, 0.00321437, 0.00428293, 0.00570671, 0.00760381, 0.0101316, + 0.0134996, 0.0179873, 0.0239669, 0.0319343, 0.0425503, 0.0566954, 0.0755428, 0.100656, + 0.134117, 0.178702, 0.238108, 0.317263, 0.422731, 0.563261, 0.750507, 0.0, +}; + +static const float scale_conversion_table[] = +{ + 1.0, 1.33243, 1.77538, 2.36557, 3.15196, 4.19978, 5.59592, 7.45618, + 9.93486, 13.2375, 17.6381, 23.5016, 31.3143, 41.7242, 55.5947, 74.0762, + 98.7015, 131.513, 175.232, 233.485, 311.103, 414.524, 552.326, 735.937, + 980.586, 1306.56, 1740.91, 2319.64, 3090.77, 4118.24, 5487.28, 7311.43, + 9741.98, 12980.5, 17295.7, 23045.3, 30706.4, 40914.2, 54515.4, 72638, + 96785.3, 128960, 171830, 228952, 305064, 406477, 541603, 721649, + 961548, 1.2812e+06, 1.70711e+06, 2.27461e+06, 3.03076e+06, 4.03829e+06, 5.38075e+06, 7.16948e+06, + 9.55285e+06, 1.27285e+07, 1.69599e+07, 2.25979e+07, 3.01102e+07, 4.01198e+07, 5.3457e+07, 0, +}; + +static const float dequantizer_scaling_table[] = +{ + 1.58838e-07, 2.11641e-07, 2.81998e-07, 3.75743e-07, 5.00652e-07, 6.67085e-07, 8.88846e-07, 1.18433e-06, + 1.57804e-06, 2.10263e-06, 2.80161e-06, 3.73296e-06, 4.97391e-06, 6.6274e-06, 8.83057e-06, 1.17661e-05, + 1.56776e-05, 2.08893e-05, 2.78336e-05, 3.70864e-05, 4.94151e-05, 6.58423e-05, 8.77305e-05, 0.000116895, + 0.000155755, 0.000207533, 0.000276523, 0.000368448, 0.000490933, 0.000654135, 0.00087159, 0.00116134, + 0.0015474, 0.00206181, 0.00274722, 0.00366048, 0.00487735, 0.00649874, 0.00865913, 0.0115377, + 0.0153732, 0.0204838, 0.0272932, 0.0363664, 0.0484558, 0.0645641, 0.0860272, 0.114626, + 0.152731, 0.203503, 0.271155, 0.361295, 0.481401, 0.641435, 0.854669, 1.13879, + 1.51736, 2.02178, 2.69388, 3.58942, 4.78266, 6.37257, 8.49102, 11.3137, +}; + +static const float quant_step_size[] = +{ + 0.0, 0.666667, 0.4, 0.285714, 0.222222, 0.181818, 0.153846, 0.133333, 0.0645161, + 0.031746, 0.015748, 0.00784314, 0.00391389, 0.00195503, 0.00097704, 0.000488401, +}; + +static const uint8_t ath_base_curve[656] = +{ + 0x78,0x5F,0x56,0x51,0x4E,0x4C,0x4B,0x49,0x48,0x48,0x47,0x46,0x46,0x45,0x45,0x45, + 0x44,0x44,0x44,0x44,0x43,0x43,0x43,0x43,0x43,0x43,0x42,0x42,0x42,0x42,0x42,0x42, + 0x42,0x42,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x40,0x40,0x40,0x40, + 0x40,0x40,0x40,0x40,0x40,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, + 0x3F,0x3F,0x3F,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D, + 0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B, + 0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B, + 0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C, + 0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3F, + 0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F, + 0x3F,0x3F,0x3F,0x3F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40, + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x41,0x41,0x41,0x41,0x41,0x41,0x41, + 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, + 0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, + 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x43,0x43,0x43, + 0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x44,0x44, + 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x45,0x45,0x45,0x45, + 0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46, + 0x46,0x46,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x48,0x48,0x48,0x48, + 0x48,0x48,0x48,0x48,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x4A,0x4A,0x4A,0x4A, + 0x4A,0x4A,0x4A,0x4A,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4B,0x4C,0x4C,0x4C,0x4C,0x4C, + 0x4C,0x4D,0x4D,0x4D,0x4D,0x4D,0x4D,0x4E,0x4E,0x4E,0x4E,0x4E,0x4E,0x4F,0x4F,0x4F, + 0x4F,0x4F,0x4F,0x50,0x50,0x50,0x50,0x50,0x51,0x51,0x51,0x51,0x51,0x52,0x52,0x52, + 0x52,0x52,0x53,0x53,0x53,0x53,0x54,0x54,0x54,0x54,0x54,0x55,0x55,0x55,0x55,0x56, + 0x56,0x56,0x56,0x57,0x57,0x57,0x57,0x57,0x58,0x58,0x58,0x59,0x59,0x59,0x59,0x5A, + 0x5A,0x5A,0x5A,0x5B,0x5B,0x5B,0x5B,0x5C,0x5C,0x5C,0x5D,0x5D,0x5D,0x5D,0x5E,0x5E, + 0x5E,0x5F,0x5F,0x5F,0x60,0x60,0x60,0x61,0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63, + 0x63,0x64,0x64,0x64,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68,0x69, + 0x69,0x6A,0x6A,0x6A,0x6B,0x6B,0x6B,0x6C,0x6C,0x6D,0x6D,0x6D,0x6E,0x6E,0x6F,0x6F, + 0x70,0x70,0x70,0x71,0x71,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x75,0x75,0x76,0x76, + 0x77,0x77,0x78,0x78,0x78,0x79,0x79,0x7A,0x7A,0x7B,0x7B,0x7C,0x7C,0x7D,0x7D,0x7E, + 0x7E,0x7F,0x7F,0x80,0x80,0x81,0x81,0x82,0x83,0x83,0x84,0x84,0x85,0x85,0x86,0x86, + 0x87,0x88,0x88,0x89,0x89,0x8A,0x8A,0x8B,0x8C,0x8C,0x8D,0x8D,0x8E,0x8F,0x8F,0x90, + 0x90,0x91,0x92,0x92,0x93,0x94,0x94,0x95,0x95,0x96,0x97,0x97,0x98,0x99,0x99,0x9A, + 0x9B,0x9B,0x9C,0x9D,0x9D,0x9E,0x9F,0xA0,0xA0,0xA1,0xA2,0xA2,0xA3,0xA4,0xA5,0xA5, + 0xA6,0xA7,0xA7,0xA8,0xA9,0xAA,0xAA,0xAB,0xAC,0xAD,0xAE,0xAE,0xAF,0xB0,0xB1,0xB1, + 0xB2,0xB3,0xB4,0xB5,0xB6,0xB6,0xB7,0xB8,0xB9,0xBA,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF, + 0xC0,0xC1,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xC9,0xCA,0xCB,0xCC,0xCD, + 0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD, + 0xDE,0xDF,0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xED,0xEE, + 0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFF,0xFF, +}; + +#endif /* AVCODEC_HCA_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc.h new file mode 100644 index 00000000..18047553 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc.h @@ -0,0 +1,160 @@ +/* + * HEVC shared code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVC_H +#define AVCODEC_HEVC_H + +/** + * Table 7-1 – NAL unit type codes and NAL unit type classes in + * T-REC-H.265-201802 + */ +enum HEVCNALUnitType { + HEVC_NAL_TRAIL_N = 0, + HEVC_NAL_TRAIL_R = 1, + HEVC_NAL_TSA_N = 2, + HEVC_NAL_TSA_R = 3, + HEVC_NAL_STSA_N = 4, + HEVC_NAL_STSA_R = 5, + HEVC_NAL_RADL_N = 6, + HEVC_NAL_RADL_R = 7, + HEVC_NAL_RASL_N = 8, + HEVC_NAL_RASL_R = 9, + HEVC_NAL_VCL_N10 = 10, + HEVC_NAL_VCL_R11 = 11, + HEVC_NAL_VCL_N12 = 12, + HEVC_NAL_VCL_R13 = 13, + HEVC_NAL_VCL_N14 = 14, + HEVC_NAL_VCL_R15 = 15, + HEVC_NAL_BLA_W_LP = 16, + HEVC_NAL_BLA_W_RADL = 17, + HEVC_NAL_BLA_N_LP = 18, + HEVC_NAL_IDR_W_RADL = 19, + HEVC_NAL_IDR_N_LP = 20, + HEVC_NAL_CRA_NUT = 21, + HEVC_NAL_RSV_IRAP_VCL22 = 22, + HEVC_NAL_RSV_IRAP_VCL23 = 23, + HEVC_NAL_RSV_VCL24 = 24, + HEVC_NAL_RSV_VCL25 = 25, + HEVC_NAL_RSV_VCL26 = 26, + HEVC_NAL_RSV_VCL27 = 27, + HEVC_NAL_RSV_VCL28 = 28, + HEVC_NAL_RSV_VCL29 = 29, + HEVC_NAL_RSV_VCL30 = 30, + HEVC_NAL_RSV_VCL31 = 31, + HEVC_NAL_VPS = 32, + HEVC_NAL_SPS = 33, + HEVC_NAL_PPS = 34, + HEVC_NAL_AUD = 35, + HEVC_NAL_EOS_NUT = 36, + HEVC_NAL_EOB_NUT = 37, + HEVC_NAL_FD_NUT = 38, + HEVC_NAL_SEI_PREFIX = 39, + HEVC_NAL_SEI_SUFFIX = 40, + HEVC_NAL_RSV_NVCL41 = 41, + HEVC_NAL_RSV_NVCL42 = 42, + HEVC_NAL_RSV_NVCL43 = 43, + HEVC_NAL_RSV_NVCL44 = 44, + HEVC_NAL_RSV_NVCL45 = 45, + HEVC_NAL_RSV_NVCL46 = 46, + HEVC_NAL_RSV_NVCL47 = 47, + HEVC_NAL_UNSPEC48 = 48, + HEVC_NAL_UNSPEC49 = 49, + HEVC_NAL_UNSPEC50 = 50, + HEVC_NAL_UNSPEC51 = 51, + HEVC_NAL_UNSPEC52 = 52, + HEVC_NAL_UNSPEC53 = 53, + HEVC_NAL_UNSPEC54 = 54, + HEVC_NAL_UNSPEC55 = 55, + HEVC_NAL_UNSPEC56 = 56, + HEVC_NAL_UNSPEC57 = 57, + HEVC_NAL_UNSPEC58 = 58, + HEVC_NAL_UNSPEC59 = 59, + HEVC_NAL_UNSPEC60 = 60, + HEVC_NAL_UNSPEC61 = 61, + HEVC_NAL_UNSPEC62 = 62, + HEVC_NAL_UNSPEC63 = 63, +}; + +enum HEVCSliceType { + HEVC_SLICE_B = 0, + HEVC_SLICE_P = 1, + HEVC_SLICE_I = 2, +}; + +enum { + // 7.4.3.1: vps_max_layers_minus1 is in [0, 62]. + HEVC_MAX_LAYERS = 63, + // 7.4.3.1: vps_max_sub_layers_minus1 is in [0, 6]. + HEVC_MAX_SUB_LAYERS = 7, + // 7.4.3.1: vps_num_layer_sets_minus1 is in [0, 1023]. + HEVC_MAX_LAYER_SETS = 1024, + + // 7.4.2.1: vps_video_parameter_set_id is u(4). + HEVC_MAX_VPS_COUNT = 16, + // 7.4.3.2.1: sps_seq_parameter_set_id is in [0, 15]. + HEVC_MAX_SPS_COUNT = 16, + // 7.4.3.3.1: pps_pic_parameter_set_id is in [0, 63]. + HEVC_MAX_PPS_COUNT = 64, + + // A.4.2: MaxDpbSize is bounded above by 16. + HEVC_MAX_DPB_SIZE = 16, + // 7.4.3.1: vps_max_dec_pic_buffering_minus1[i] is in [0, MaxDpbSize - 1]. + HEVC_MAX_REFS = HEVC_MAX_DPB_SIZE, + + // 7.4.3.2.1: num_short_term_ref_pic_sets is in [0, 64]. + HEVC_MAX_SHORT_TERM_REF_PIC_SETS = 64, + // 7.4.3.2.1: num_long_term_ref_pics_sps is in [0, 32]. + HEVC_MAX_LONG_TERM_REF_PICS = 32, + + // A.3: all profiles require that CtbLog2SizeY is in [4, 6]. + HEVC_MIN_LOG2_CTB_SIZE = 4, + HEVC_MAX_LOG2_CTB_SIZE = 6, + + // E.3.2: cpb_cnt_minus1[i] is in [0, 31]. + HEVC_MAX_CPB_CNT = 32, + + // A.4.1: in table A.6 the highest level allows a MaxLumaPs of 35 651 584. + HEVC_MAX_LUMA_PS = 35651584, + // A.4.1: pic_width_in_luma_samples and pic_height_in_luma_samples are + // constrained to be not greater than sqrt(MaxLumaPs * 8). Hence height/ + // width are bounded above by sqrt(8 * 35651584) = 16888.2 samples. + HEVC_MAX_WIDTH = 16888, + HEVC_MAX_HEIGHT = 16888, + + // A.4.1: table A.6 allows at most 22 tile rows for any level. + HEVC_MAX_TILE_ROWS = 22, + // A.4.1: table A.6 allows at most 20 tile columns for any level. + HEVC_MAX_TILE_COLUMNS = 20, + + // A.4.2: table A.6 allows at most 600 slice segments for any level. + HEVC_MAX_SLICE_SEGMENTS = 600, + + // 7.4.7.1: in the worst case (tiles_enabled_flag and + // entropy_coding_sync_enabled_flag are both set), entry points can be + // placed at the beginning of every Ctb row in every tile, giving an + // upper bound of (num_tile_columns_minus1 + 1) * PicHeightInCtbsY - 1. + // Only a stream with very high resolution and perverse parameters could + // get near that, though, so set a lower limit here with the maximum + // possible value for 4K video (at most 135 16x16 Ctb rows). + HEVC_MAX_ENTRY_POINT_OFFSETS = HEVC_MAX_TILE_COLUMNS * 135, +}; + + +#endif /* AVCODEC_HEVC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_data.h new file mode 100644 index 00000000..74558f0a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_data.h @@ -0,0 +1,31 @@ +/* + * HEVC shared data tables + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVC_DATA_H +#define AVCODEC_HEVC_DATA_H + +#include + +extern const uint8_t ff_hevc_diag_scan4x4_x[16]; +extern const uint8_t ff_hevc_diag_scan4x4_y[16]; +extern const uint8_t ff_hevc_diag_scan8x8_x[64]; +extern const uint8_t ff_hevc_diag_scan8x8_y[64]; + +#endif /* AVCODEC_HEVC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_parse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_parse.h new file mode 100644 index 00000000..4ab96ab1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_parse.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * H.265 parser code + */ + +#ifndef AVCODEC_HEVC_PARSE_H +#define AVCODEC_HEVC_PARSE_H + +#include + +#include "hevc_ps.h" +#include "hevc_sei.h" + +int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, + HEVCSEI *sei, int *is_nalff, int *nal_length_size, + int err_recognition, int apply_defdispwin, void *logctx); + +#endif /* AVCODEC_HEVC_PARSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_ps.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_ps.h new file mode 100644 index 00000000..2a1bbf64 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_ps.h @@ -0,0 +1,370 @@ +/* + * HEVC parameter set parsing + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVC_PS_H +#define AVCODEC_HEVC_PS_H + +#include + +#include "libavutil/buffer.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" + +#include "avcodec.h" +#include "get_bits.h" +#include "hevc.h" + +typedef struct ShortTermRPS { + unsigned int num_negative_pics; + int num_delta_pocs; + int rps_idx_num_delta_pocs; + int32_t delta_poc[32]; + uint8_t used[32]; +} ShortTermRPS; + +typedef struct HEVCWindow { + unsigned int left_offset; + unsigned int right_offset; + unsigned int top_offset; + unsigned int bottom_offset; +} HEVCWindow; + +typedef struct VUI { + AVRational sar; + + int overscan_info_present_flag; + int overscan_appropriate_flag; + + int video_signal_type_present_flag; + int video_format; + int video_full_range_flag; + int colour_description_present_flag; + uint8_t colour_primaries; + uint8_t transfer_characteristic; + uint8_t matrix_coeffs; + + int chroma_loc_info_present_flag; + int chroma_sample_loc_type_top_field; + int chroma_sample_loc_type_bottom_field; + int neutra_chroma_indication_flag; + + int field_seq_flag; + int frame_field_info_present_flag; + + int default_display_window_flag; + HEVCWindow def_disp_win; + + int vui_timing_info_present_flag; + uint32_t vui_num_units_in_tick; + uint32_t vui_time_scale; + int vui_poc_proportional_to_timing_flag; + int vui_num_ticks_poc_diff_one_minus1; + int vui_hrd_parameters_present_flag; + + int bitstream_restriction_flag; + int tiles_fixed_structure_flag; + int motion_vectors_over_pic_boundaries_flag; + int restricted_ref_pic_lists_flag; + int min_spatial_segmentation_idc; + int max_bytes_per_pic_denom; + int max_bits_per_min_cu_denom; + int log2_max_mv_length_horizontal; + int log2_max_mv_length_vertical; +} VUI; + +typedef struct PTLCommon { + uint8_t profile_space; + uint8_t tier_flag; + uint8_t profile_idc; + uint8_t profile_compatibility_flag[32]; + uint8_t progressive_source_flag; + uint8_t interlaced_source_flag; + uint8_t non_packed_constraint_flag; + uint8_t frame_only_constraint_flag; + uint8_t max_12bit_constraint_flag; + uint8_t max_10bit_constraint_flag; + uint8_t max_8bit_constraint_flag; + uint8_t max_422chroma_constraint_flag; + uint8_t max_420chroma_constraint_flag; + uint8_t max_monochrome_constraint_flag; + uint8_t intra_constraint_flag; + uint8_t one_picture_only_constraint_flag; + uint8_t lower_bit_rate_constraint_flag; + uint8_t max_14bit_constraint_flag; + uint8_t inbld_flag; + uint8_t level_idc; +} PTLCommon; + +typedef struct PTL { + PTLCommon general_ptl; + PTLCommon sub_layer_ptl[HEVC_MAX_SUB_LAYERS]; + + uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS]; + uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS]; +} PTL; + +typedef struct HEVCVPS { + uint8_t vps_temporal_id_nesting_flag; + int vps_max_layers; + int vps_max_sub_layers; ///< vps_max_temporal_layers_minus1 + 1 + + PTL ptl; + int vps_sub_layer_ordering_info_present_flag; + unsigned int vps_max_dec_pic_buffering[HEVC_MAX_SUB_LAYERS]; + unsigned int vps_num_reorder_pics[HEVC_MAX_SUB_LAYERS]; + unsigned int vps_max_latency_increase[HEVC_MAX_SUB_LAYERS]; + int vps_max_layer_id; + int vps_num_layer_sets; ///< vps_num_layer_sets_minus1 + 1 + uint8_t vps_timing_info_present_flag; + uint32_t vps_num_units_in_tick; + uint32_t vps_time_scale; + uint8_t vps_poc_proportional_to_timing_flag; + int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1 + int vps_num_hrd_parameters; + + uint8_t data[4096]; + int data_size; +} HEVCVPS; + +typedef struct ScalingList { + /* This is a little wasteful, since sizeID 0 only needs 8 coeffs, + * and size ID 3 only has 2 arrays, not 6. */ + uint8_t sl[4][6][64]; + uint8_t sl_dc[2][6]; +} ScalingList; + +typedef struct HEVCSPS { + unsigned vps_id; + int chroma_format_idc; + uint8_t separate_colour_plane_flag; + + HEVCWindow output_window; + + HEVCWindow pic_conf_win; + + int bit_depth; + int bit_depth_chroma; + int pixel_shift; + enum AVPixelFormat pix_fmt; + + unsigned int log2_max_poc_lsb; + int pcm_enabled_flag; + + int max_sub_layers; + struct { + int max_dec_pic_buffering; + int num_reorder_pics; + int max_latency_increase; + } temporal_layer[HEVC_MAX_SUB_LAYERS]; + uint8_t temporal_id_nesting_flag; + + VUI vui; + PTL ptl; + + uint8_t scaling_list_enable_flag; + ScalingList scaling_list; + + unsigned int nb_st_rps; + ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]; + + uint8_t amp_enabled_flag; + uint8_t sao_enabled; + + uint8_t long_term_ref_pics_present_flag; + uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]; + uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]; + uint8_t num_long_term_ref_pics_sps; + + struct { + uint8_t bit_depth; + uint8_t bit_depth_chroma; + unsigned int log2_min_pcm_cb_size; + unsigned int log2_max_pcm_cb_size; + uint8_t loop_filter_disable_flag; + } pcm; + uint8_t sps_temporal_mvp_enabled_flag; + uint8_t sps_strong_intra_smoothing_enable_flag; + + unsigned int log2_min_cb_size; + unsigned int log2_diff_max_min_coding_block_size; + unsigned int log2_min_tb_size; + unsigned int log2_max_trafo_size; + unsigned int log2_ctb_size; + unsigned int log2_min_pu_size; + + int max_transform_hierarchy_depth_inter; + int max_transform_hierarchy_depth_intra; + + int sps_range_extension_flag; + int transform_skip_rotation_enabled_flag; + int transform_skip_context_enabled_flag; + int implicit_rdpcm_enabled_flag; + int explicit_rdpcm_enabled_flag; + int extended_precision_processing_flag; + int intra_smoothing_disabled_flag; + int high_precision_offsets_enabled_flag; + int persistent_rice_adaptation_enabled_flag; + int cabac_bypass_alignment_enabled_flag; + + ///< coded frame dimension in various units + int width; + int height; + int ctb_width; + int ctb_height; + int ctb_size; + int min_cb_width; + int min_cb_height; + int min_tb_width; + int min_tb_height; + int min_pu_width; + int min_pu_height; + int tb_mask; + + int hshift[3]; + int vshift[3]; + + int qp_bd_offset; + + uint8_t data[4096]; + int data_size; +} HEVCSPS; + +typedef struct HEVCPPS { + unsigned int sps_id; ///< seq_parameter_set_id + + uint8_t sign_data_hiding_flag; + + uint8_t cabac_init_present_flag; + + int num_ref_idx_l0_default_active; ///< num_ref_idx_l0_default_active_minus1 + 1 + int num_ref_idx_l1_default_active; ///< num_ref_idx_l1_default_active_minus1 + 1 + int pic_init_qp_minus26; + + uint8_t constrained_intra_pred_flag; + uint8_t transform_skip_enabled_flag; + + uint8_t cu_qp_delta_enabled_flag; + int diff_cu_qp_delta_depth; + + int cb_qp_offset; + int cr_qp_offset; + uint8_t pic_slice_level_chroma_qp_offsets_present_flag; + uint8_t weighted_pred_flag; + uint8_t weighted_bipred_flag; + uint8_t output_flag_present_flag; + uint8_t transquant_bypass_enable_flag; + + uint8_t dependent_slice_segments_enabled_flag; + uint8_t tiles_enabled_flag; + uint8_t entropy_coding_sync_enabled_flag; + + uint16_t num_tile_columns; ///< num_tile_columns_minus1 + 1 + uint16_t num_tile_rows; ///< num_tile_rows_minus1 + 1 + uint8_t uniform_spacing_flag; + uint8_t loop_filter_across_tiles_enabled_flag; + + uint8_t seq_loop_filter_across_slices_enabled_flag; + + uint8_t deblocking_filter_control_present_flag; + uint8_t deblocking_filter_override_enabled_flag; + uint8_t disable_dbf; + int beta_offset; ///< beta_offset_div2 * 2 + int tc_offset; ///< tc_offset_div2 * 2 + + uint8_t scaling_list_data_present_flag; + ScalingList scaling_list; + + uint8_t lists_modification_present_flag; + int log2_parallel_merge_level; ///< log2_parallel_merge_level_minus2 + 2 + int num_extra_slice_header_bits; + uint8_t slice_header_extension_present_flag; + uint8_t log2_max_transform_skip_block_size; + uint8_t pps_range_extensions_flag; + uint8_t cross_component_prediction_enabled_flag; + uint8_t chroma_qp_offset_list_enabled_flag; + uint8_t diff_cu_chroma_qp_offset_depth; + uint8_t chroma_qp_offset_list_len_minus1; + int8_t cb_qp_offset_list[6]; + int8_t cr_qp_offset_list[6]; + uint8_t log2_sao_offset_scale_luma; + uint8_t log2_sao_offset_scale_chroma; + + // Inferred parameters + unsigned int *column_width; ///< ColumnWidth + unsigned int *row_height; ///< RowHeight + unsigned int *col_bd; ///< ColBd + unsigned int *row_bd; ///< RowBd + int *col_idxX; + + int *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS + int *ctb_addr_ts_to_rs; ///< CtbAddrTSToRS + int *tile_id; ///< TileId + int *tile_pos_rs; ///< TilePosRS + int *min_tb_addr_zs; ///< MinTbAddrZS + int *min_tb_addr_zs_tab;///< MinTbAddrZS + + uint8_t data[4096]; + int data_size; +} HEVCPPS; + +typedef struct HEVCParamSets { + AVBufferRef *vps_list[HEVC_MAX_VPS_COUNT]; + AVBufferRef *sps_list[HEVC_MAX_SPS_COUNT]; + AVBufferRef *pps_list[HEVC_MAX_PPS_COUNT]; + + /* currently active parameter sets */ + const HEVCVPS *vps; + const HEVCSPS *sps; + const HEVCPPS *pps; +} HEVCParamSets; + +/** + * Parse the SPS from the bitstream into the provided HEVCSPS struct. + * + * @param sps_id the SPS id will be written here + * @param apply_defdispwin if set 1, the default display window from the VUI + * will be applied to the video dimensions + * @param vps_list if non-NULL, this function will validate that the SPS refers + * to an existing VPS + */ +int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, + int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx); + +int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, + HEVCParamSets *ps); +int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, + HEVCParamSets *ps, int apply_defdispwin); +int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, + HEVCParamSets *ps); + +void ff_hevc_ps_uninit(HEVCParamSets *ps); + +int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, + ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header); + +int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id, + uint8_t *buf, int buf_size); + +/** + * Compute POC of the current frame and return it. + */ +int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type); + +#endif /* AVCODEC_HEVC_PS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_sei.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_sei.h new file mode 100644 index 00000000..a44ccca7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevc_sei.h @@ -0,0 +1,139 @@ +/* + * HEVC Supplementary Enhancement Information messages + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVC_SEI_H +#define AVCODEC_HEVC_SEI_H + +#include + +#include "get_bits.h" + +/** + * SEI message types + */ +typedef enum { + HEVC_SEI_TYPE_BUFFERING_PERIOD = 0, + HEVC_SEI_TYPE_PICTURE_TIMING = 1, + HEVC_SEI_TYPE_PAN_SCAN_RECT = 2, + HEVC_SEI_TYPE_FILLER_PAYLOAD = 3, + HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4, + HEVC_SEI_TYPE_USER_DATA_UNREGISTERED = 5, + HEVC_SEI_TYPE_RECOVERY_POINT = 6, + HEVC_SEI_TYPE_SCENE_INFO = 9, + HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT = 15, + HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16, + HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17, + HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19, + HEVC_SEI_TYPE_POST_FILTER_HINT = 22, + HEVC_SEI_TYPE_TONE_MAPPING_INFO = 23, + HEVC_SEI_TYPE_FRAME_PACKING = 45, + HEVC_SEI_TYPE_DISPLAY_ORIENTATION = 47, + HEVC_SEI_TYPE_SOP_DESCRIPTION = 128, + HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS = 129, + HEVC_SEI_TYPE_DECODING_UNIT_INFO = 130, + HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX = 131, + HEVC_SEI_TYPE_DECODED_PICTURE_HASH = 132, + HEVC_SEI_TYPE_SCALABLE_NESTING = 133, + HEVC_SEI_TYPE_REGION_REFRESH_INFO = 134, + HEVC_SEI_TYPE_TIME_CODE = 136, + HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO = 137, + HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144, + HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147, + HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO = 165, +} HEVC_SEI_Type; + +typedef enum { + HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING = 7, + HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING = 8 +} HEVC_SEI_PicStructType; + +typedef struct HEVCSEIPictureHash { + uint8_t md5[3][16]; + uint8_t is_md5; +} HEVCSEIPictureHash; + +typedef struct HEVCSEIFramePacking { + int present; + int arrangement_type; + int content_interpretation_type; + int quincunx_subsampling; + int current_frame_is_frame0_flag; +} HEVCSEIFramePacking; + +typedef struct HEVCSEIDisplayOrientation { + int present; + int anticlockwise_rotation; + int hflip, vflip; +} HEVCSEIDisplayOrientation; + +typedef struct HEVCSEIPictureTiming { + int picture_struct; +} HEVCSEIPictureTiming; + +typedef struct HEVCSEIA53Caption { + AVBufferRef *buf_ref; +} HEVCSEIA53Caption; + +typedef struct HEVCSEIMasteringDisplay { + int present; + uint16_t display_primaries[3][2]; + uint16_t white_point[2]; + uint32_t max_luminance; + uint32_t min_luminance; +} HEVCSEIMasteringDisplay; + +typedef struct HEVCSEIContentLight { + int present; + uint16_t max_content_light_level; + uint16_t max_pic_average_light_level; +} HEVCSEIContentLight; + +typedef struct HEVCSEIAlternativeTransfer { + int present; + int preferred_transfer_characteristics; +} HEVCSEIAlternativeTransfer; + +typedef struct HEVCSEI { + HEVCSEIPictureHash picture_hash; + HEVCSEIFramePacking frame_packing; + HEVCSEIDisplayOrientation display_orientation; + HEVCSEIPictureTiming picture_timing; + HEVCSEIA53Caption a53_caption; + HEVCSEIMasteringDisplay mastering_display; + HEVCSEIContentLight content_light; + int active_seq_parameter_set_id; + HEVCSEIAlternativeTransfer alternative_transfer; +} HEVCSEI; + +struct HEVCParamSets; + +int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, + const struct HEVCParamSets *ps, int type); + +/** + * Reset SEI values that are stored on the Context. + * e.g. Caption data that was extracted during NAL + * parsing. + * + * @param s HEVCContext. + */ +void ff_hevc_reset_sei(HEVCSEI *s); + +#endif /* AVCODEC_HEVC_SEI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdec.h new file mode 100644 index 00000000..39c5c7f8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdec.h @@ -0,0 +1,692 @@ +/* + * HEVC video decoder + * + * Copyright (C) 2012 - 2013 Guillaume Martres + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVCDEC_H +#define AVCODEC_HEVCDEC_H + +#include + +#include "libavutil/buffer.h" +#include "libavutil/md5.h" + +#include "avcodec.h" +#include "bswapdsp.h" +#include "cabac.h" +#include "get_bits.h" +#include "hevcpred.h" +#include "h2645_parse.h" +#include "hevc.h" +#include "hevc_ps.h" +#include "hevc_sei.h" +#include "hevcdsp.h" +#include "internal.h" +#include "thread.h" +#include "videodsp.h" + +#define MAX_NB_THREADS 16 +#define SHIFT_CTB_WPP 2 + +//TODO: check if this is really the maximum +#define MAX_TRANSFORM_DEPTH 5 + +#define MAX_TB_SIZE 32 +#define MAX_QP 51 +#define DEFAULT_INTRA_TC_OFFSET 2 + +#define HEVC_CONTEXTS 199 + +#define MRG_MAX_NUM_CANDS 5 + +#define L0 0 +#define L1 1 + +#define EPEL_EXTRA_BEFORE 1 +#define EPEL_EXTRA_AFTER 2 +#define EPEL_EXTRA 3 +#define QPEL_EXTRA_BEFORE 3 +#define QPEL_EXTRA_AFTER 4 +#define QPEL_EXTRA 7 + +#define EDGE_EMU_BUFFER_STRIDE 80 + +/** + * Value of the luma sample at position (x, y) in the 2D array tab. + */ +#define SAMPLE(tab, x, y) ((tab)[(y) * s->sps->width + (x)]) +#define SAMPLE_CTB(tab, x, y) ((tab)[(y) * min_cb_width + (x)]) + +#define IS_IDR(s) ((s)->nal_unit_type == HEVC_NAL_IDR_W_RADL || (s)->nal_unit_type == HEVC_NAL_IDR_N_LP) +#define IS_BLA(s) ((s)->nal_unit_type == HEVC_NAL_BLA_W_RADL || (s)->nal_unit_type == HEVC_NAL_BLA_W_LP || \ + (s)->nal_unit_type == HEVC_NAL_BLA_N_LP) +#define IS_IRAP(s) ((s)->nal_unit_type >= 16 && (s)->nal_unit_type <= 23) + +enum RPSType { + ST_CURR_BEF = 0, + ST_CURR_AFT, + ST_FOLL, + LT_CURR, + LT_FOLL, + NB_RPS_TYPE, +}; + +enum SyntaxElement { + SAO_MERGE_FLAG = 0, + SAO_TYPE_IDX, + SAO_EO_CLASS, + SAO_BAND_POSITION, + SAO_OFFSET_ABS, + SAO_OFFSET_SIGN, + END_OF_SLICE_FLAG, + SPLIT_CODING_UNIT_FLAG, + CU_TRANSQUANT_BYPASS_FLAG, + SKIP_FLAG, + CU_QP_DELTA, + PRED_MODE_FLAG, + PART_MODE, + PCM_FLAG, + PREV_INTRA_LUMA_PRED_FLAG, + MPM_IDX, + REM_INTRA_LUMA_PRED_MODE, + INTRA_CHROMA_PRED_MODE, + MERGE_FLAG, + MERGE_IDX, + INTER_PRED_IDC, + REF_IDX_L0, + REF_IDX_L1, + ABS_MVD_GREATER0_FLAG, + ABS_MVD_GREATER1_FLAG, + ABS_MVD_MINUS2, + MVD_SIGN_FLAG, + MVP_LX_FLAG, + NO_RESIDUAL_DATA_FLAG, + SPLIT_TRANSFORM_FLAG, + CBF_LUMA, + CBF_CB_CR, + TRANSFORM_SKIP_FLAG, + EXPLICIT_RDPCM_FLAG, + EXPLICIT_RDPCM_DIR_FLAG, + LAST_SIGNIFICANT_COEFF_X_PREFIX, + LAST_SIGNIFICANT_COEFF_Y_PREFIX, + LAST_SIGNIFICANT_COEFF_X_SUFFIX, + LAST_SIGNIFICANT_COEFF_Y_SUFFIX, + SIGNIFICANT_COEFF_GROUP_FLAG, + SIGNIFICANT_COEFF_FLAG, + COEFF_ABS_LEVEL_GREATER1_FLAG, + COEFF_ABS_LEVEL_GREATER2_FLAG, + COEFF_ABS_LEVEL_REMAINING, + COEFF_SIGN_FLAG, + LOG2_RES_SCALE_ABS, + RES_SCALE_SIGN_FLAG, + CU_CHROMA_QP_OFFSET_FLAG, + CU_CHROMA_QP_OFFSET_IDX, +}; + +enum PartMode { + PART_2Nx2N = 0, + PART_2NxN = 1, + PART_Nx2N = 2, + PART_NxN = 3, + PART_2NxnU = 4, + PART_2NxnD = 5, + PART_nLx2N = 6, + PART_nRx2N = 7, +}; + +enum PredMode { + MODE_INTER = 0, + MODE_INTRA, + MODE_SKIP, +}; + +enum InterPredIdc { + PRED_L0 = 0, + PRED_L1, + PRED_BI, +}; + +enum PredFlag { + PF_INTRA = 0, + PF_L0, + PF_L1, + PF_BI, +}; + +enum IntraPredMode { + INTRA_PLANAR = 0, + INTRA_DC, + INTRA_ANGULAR_2, + INTRA_ANGULAR_3, + INTRA_ANGULAR_4, + INTRA_ANGULAR_5, + INTRA_ANGULAR_6, + INTRA_ANGULAR_7, + INTRA_ANGULAR_8, + INTRA_ANGULAR_9, + INTRA_ANGULAR_10, + INTRA_ANGULAR_11, + INTRA_ANGULAR_12, + INTRA_ANGULAR_13, + INTRA_ANGULAR_14, + INTRA_ANGULAR_15, + INTRA_ANGULAR_16, + INTRA_ANGULAR_17, + INTRA_ANGULAR_18, + INTRA_ANGULAR_19, + INTRA_ANGULAR_20, + INTRA_ANGULAR_21, + INTRA_ANGULAR_22, + INTRA_ANGULAR_23, + INTRA_ANGULAR_24, + INTRA_ANGULAR_25, + INTRA_ANGULAR_26, + INTRA_ANGULAR_27, + INTRA_ANGULAR_28, + INTRA_ANGULAR_29, + INTRA_ANGULAR_30, + INTRA_ANGULAR_31, + INTRA_ANGULAR_32, + INTRA_ANGULAR_33, + INTRA_ANGULAR_34, +}; + +enum SAOType { + SAO_NOT_APPLIED = 0, + SAO_BAND, + SAO_EDGE, + SAO_APPLIED +}; + +enum SAOEOClass { + SAO_EO_HORIZ = 0, + SAO_EO_VERT, + SAO_EO_135D, + SAO_EO_45D, +}; + +enum ScanType { + SCAN_DIAG = 0, + SCAN_HORIZ, + SCAN_VERT, +}; + +typedef struct LongTermRPS { + int poc[32]; + uint8_t poc_msb_present[32]; + uint8_t used[32]; + uint8_t nb_refs; +} LongTermRPS; + +typedef struct RefPicList { + struct HEVCFrame *ref[HEVC_MAX_REFS]; + int list[HEVC_MAX_REFS]; + int isLongTerm[HEVC_MAX_REFS]; + int nb_refs; +} RefPicList; + +typedef struct RefPicListTab { + RefPicList refPicList[2]; +} RefPicListTab; + +typedef struct SliceHeader { + unsigned int pps_id; + + ///< address (in raster order) of the first block in the current slice segment + unsigned int slice_segment_addr; + ///< address (in raster order) of the first block in the current slice + unsigned int slice_addr; + + enum HEVCSliceType slice_type; + + int pic_order_cnt_lsb; + + uint8_t first_slice_in_pic_flag; + uint8_t dependent_slice_segment_flag; + uint8_t pic_output_flag; + uint8_t colour_plane_id; + + ///< RPS coded in the slice header itself is stored here + int short_term_ref_pic_set_sps_flag; + int short_term_ref_pic_set_size; + ShortTermRPS slice_rps; + const ShortTermRPS *short_term_rps; + int long_term_ref_pic_set_size; + LongTermRPS long_term_rps; + unsigned int list_entry_lx[2][32]; + + uint8_t rpl_modification_flag[2]; + uint8_t no_output_of_prior_pics_flag; + uint8_t slice_temporal_mvp_enabled_flag; + + unsigned int nb_refs[2]; + + uint8_t slice_sample_adaptive_offset_flag[3]; + uint8_t mvd_l1_zero_flag; + + uint8_t cabac_init_flag; + uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag + uint8_t slice_loop_filter_across_slices_enabled_flag; + uint8_t collocated_list; + + unsigned int collocated_ref_idx; + + int slice_qp_delta; + int slice_cb_qp_offset; + int slice_cr_qp_offset; + + uint8_t cu_chroma_qp_offset_enabled_flag; + + int beta_offset; ///< beta_offset_div2 * 2 + int tc_offset; ///< tc_offset_div2 * 2 + + unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand + + unsigned *entry_point_offset; + int * offset; + int * size; + int num_entry_point_offsets; + + int8_t slice_qp; + + uint8_t luma_log2_weight_denom; + int16_t chroma_log2_weight_denom; + + int16_t luma_weight_l0[16]; + int16_t chroma_weight_l0[16][2]; + int16_t chroma_weight_l1[16][2]; + int16_t luma_weight_l1[16]; + + int16_t luma_offset_l0[16]; + int16_t chroma_offset_l0[16][2]; + + int16_t luma_offset_l1[16]; + int16_t chroma_offset_l1[16][2]; + + int slice_ctb_addr_rs; +} SliceHeader; + +typedef struct CodingUnit { + int x; + int y; + + enum PredMode pred_mode; ///< PredMode + enum PartMode part_mode; ///< PartMode + + // Inferred parameters + uint8_t intra_split_flag; ///< IntraSplitFlag + uint8_t max_trafo_depth; ///< MaxTrafoDepth + uint8_t cu_transquant_bypass_flag; +} CodingUnit; + +typedef struct Mv { + int16_t x; ///< horizontal component of motion vector + int16_t y; ///< vertical component of motion vector +} Mv; + +typedef struct MvField { + DECLARE_ALIGNED(4, Mv, mv)[2]; + int8_t ref_idx[2]; + int8_t pred_flag; +} MvField; + +typedef struct NeighbourAvailable { + int cand_bottom_left; + int cand_left; + int cand_up; + int cand_up_left; + int cand_up_right; + int cand_up_right_sap; +} NeighbourAvailable; + +typedef struct PredictionUnit { + int mpm_idx; + int rem_intra_luma_pred_mode; + uint8_t intra_pred_mode[4]; + Mv mvd; + uint8_t merge_flag; + uint8_t intra_pred_mode_c[4]; + uint8_t chroma_mode_c[4]; +} PredictionUnit; + +typedef struct TransformUnit { + int cu_qp_delta; + + int res_scale_val; + + // Inferred parameters; + int intra_pred_mode; + int intra_pred_mode_c; + int chroma_mode_c; + uint8_t is_cu_qp_delta_coded; + uint8_t is_cu_chroma_qp_offset_coded; + int8_t cu_qp_offset_cb; + int8_t cu_qp_offset_cr; + uint8_t cross_pf; +} TransformUnit; + +typedef struct DBParams { + int beta_offset; + int tc_offset; +} DBParams; + +#define HEVC_FRAME_FLAG_OUTPUT (1 << 0) +#define HEVC_FRAME_FLAG_SHORT_REF (1 << 1) +#define HEVC_FRAME_FLAG_LONG_REF (1 << 2) +#define HEVC_FRAME_FLAG_BUMPING (1 << 3) + +typedef struct HEVCFrame { + AVFrame *frame; + ThreadFrame tf; + MvField *tab_mvf; + RefPicList *refPicList; + RefPicListTab **rpl_tab; + int ctb_count; + int poc; + struct HEVCFrame *collocated_ref; + + AVBufferRef *tab_mvf_buf; + AVBufferRef *rpl_tab_buf; + AVBufferRef *rpl_buf; + + AVBufferRef *hwaccel_priv_buf; + void *hwaccel_picture_private; + + /** + * A sequence counter, so that old frames are output first + * after a POC reset + */ + uint16_t sequence; + + /** + * A combination of HEVC_FRAME_FLAG_* + */ + uint8_t flags; +} HEVCFrame; + +typedef struct HEVCLocalContext { + uint8_t cabac_state[HEVC_CONTEXTS]; + + uint8_t stat_coeff[4]; + + uint8_t first_qp_group; + + GetBitContext gb; + CABACContext cc; + + int8_t qp_y; + int8_t curr_qp_y; + + int qPy_pred; + + TransformUnit tu; + + uint8_t ctb_left_flag; + uint8_t ctb_up_flag; + uint8_t ctb_up_right_flag; + uint8_t ctb_up_left_flag; + int end_of_tiles_x; + int end_of_tiles_y; + /* +7 is for subpixel interpolation, *2 for high bit depths */ + DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; + /* The extended size between the new edge emu buffer is abused by SAO */ + DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer2)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; + DECLARE_ALIGNED(32, int16_t, tmp)[MAX_PB_SIZE * MAX_PB_SIZE]; + + int ct_depth; + CodingUnit cu; + PredictionUnit pu; + NeighbourAvailable na; + +#define BOUNDARY_LEFT_SLICE (1 << 0) +#define BOUNDARY_LEFT_TILE (1 << 1) +#define BOUNDARY_UPPER_SLICE (1 << 2) +#define BOUNDARY_UPPER_TILE (1 << 3) + /* properties of the boundary of the current CTB for the purposes + * of the deblocking filter */ + int boundary_flags; +} HEVCLocalContext; + +typedef struct HEVCContext { + const AVClass *c; // needed by private avoptions + AVCodecContext *avctx; + + struct HEVCContext *sList[MAX_NB_THREADS]; + + HEVCLocalContext *HEVClcList[MAX_NB_THREADS]; + HEVCLocalContext *HEVClc; + + uint8_t threads_type; + uint8_t threads_number; + + int width; + int height; + + uint8_t *cabac_state; + + /** 1 if the independent slice segment header was successfully parsed */ + uint8_t slice_initialized; + + AVFrame *frame; + AVFrame *output_frame; + uint8_t *sao_pixel_buffer_h[3]; + uint8_t *sao_pixel_buffer_v[3]; + + HEVCParamSets ps; + HEVCSEI sei; + struct AVMD5 *md5_ctx; + + AVBufferPool *tab_mvf_pool; + AVBufferPool *rpl_tab_pool; + + ///< candidate references for the current frame + RefPicList rps[5]; + + SliceHeader sh; + SAOParams *sao; + DBParams *deblock; + enum HEVCNALUnitType nal_unit_type; + int temporal_id; ///< temporal_id_plus1 - 1 + HEVCFrame *ref; + HEVCFrame DPB[32]; + int poc; + int pocTid0; + int slice_idx; ///< number of the slice being currently decoded + int eos; ///< current packet contains an EOS/EOB NAL + int last_eos; ///< last packet contains an EOS/EOB NAL + int max_ra; + int bs_width; + int bs_height; + int overlap; + + int is_decoded; + int no_rasl_output_flag; + + HEVCPredContext hpc; + HEVCDSPContext hevcdsp; + VideoDSPContext vdsp; + BswapDSPContext bdsp; + int8_t *qp_y_tab; + uint8_t *horizontal_bs; + uint8_t *vertical_bs; + + int32_t *tab_slice_address; + + // CU + uint8_t *skip_flag; + uint8_t *tab_ct_depth; + // PU + uint8_t *tab_ipm; + + uint8_t *cbf_luma; // cbf_luma of colocated TU + uint8_t *is_pcm; + + // CTB-level flags affecting loop filter operation + uint8_t *filter_slice_edges; + + /** used on BE to byteswap the lines for checksumming */ + uint8_t *checksum_buf; + int checksum_buf_size; + + /** + * Sequence counters for decoded and output frames, so that old + * frames are output first after a POC reset + */ + uint16_t seq_decode; + uint16_t seq_output; + + int enable_parallel_tiles; + atomic_int wpp_err; + + const uint8_t *data; + + H2645Packet pkt; + // type of the first VCL NAL of the current frame + enum HEVCNALUnitType first_nal_type; + + uint8_t context_initialized; + int is_nalff; ///< this flag is != 0 if bitstream is encapsulated + ///< as a format defined in 14496-15 + int apply_defdispwin; + + int nal_length_size; ///< Number of bytes used for nal length (1, 2 or 4) + int nuh_layer_id; +} HEVCContext; + +/** + * Mark all frames in DPB as unused for reference. + */ +void ff_hevc_clear_refs(HEVCContext *s); + +/** + * Drop all frames currently in DPB. + */ +void ff_hevc_flush_dpb(HEVCContext *s); + +RefPicList *ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *frame, + int x0, int y0); + +/** + * Construct the reference picture sets for the current frame. + */ +int ff_hevc_frame_rps(HEVCContext *s); + +/** + * Construct the reference picture list(s) for the current slice. + */ +int ff_hevc_slice_rpl(HEVCContext *s); + +void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts); +int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts); +int ff_hevc_sao_merge_flag_decode(HEVCContext *s); +int ff_hevc_sao_type_idx_decode(HEVCContext *s); +int ff_hevc_sao_band_position_decode(HEVCContext *s); +int ff_hevc_sao_offset_abs_decode(HEVCContext *s); +int ff_hevc_sao_offset_sign_decode(HEVCContext *s); +int ff_hevc_sao_eo_class_decode(HEVCContext *s); +int ff_hevc_end_of_slice_flag_decode(HEVCContext *s); +int ff_hevc_cu_transquant_bypass_flag_decode(HEVCContext *s); +int ff_hevc_skip_flag_decode(HEVCContext *s, int x0, int y0, + int x_cb, int y_cb); +int ff_hevc_pred_mode_decode(HEVCContext *s); +int ff_hevc_split_coding_unit_flag_decode(HEVCContext *s, int ct_depth, + int x0, int y0); +int ff_hevc_part_mode_decode(HEVCContext *s, int log2_cb_size); +int ff_hevc_pcm_flag_decode(HEVCContext *s); +int ff_hevc_prev_intra_luma_pred_flag_decode(HEVCContext *s); +int ff_hevc_mpm_idx_decode(HEVCContext *s); +int ff_hevc_rem_intra_luma_pred_mode_decode(HEVCContext *s); +int ff_hevc_intra_chroma_pred_mode_decode(HEVCContext *s); +int ff_hevc_merge_idx_decode(HEVCContext *s); +int ff_hevc_merge_flag_decode(HEVCContext *s); +int ff_hevc_inter_pred_idc_decode(HEVCContext *s, int nPbW, int nPbH); +int ff_hevc_ref_idx_lx_decode(HEVCContext *s, int num_ref_idx_lx); +int ff_hevc_mvp_lx_flag_decode(HEVCContext *s); +int ff_hevc_no_residual_syntax_flag_decode(HEVCContext *s); +int ff_hevc_split_transform_flag_decode(HEVCContext *s, int log2_trafo_size); +int ff_hevc_cbf_cb_cr_decode(HEVCContext *s, int trafo_depth); +int ff_hevc_cbf_luma_decode(HEVCContext *s, int trafo_depth); +int ff_hevc_log2_res_scale_abs(HEVCContext *s, int idx); +int ff_hevc_res_scale_sign_flag(HEVCContext *s, int idx); + +/** + * Get the number of candidate references for the current frame. + */ +int ff_hevc_frame_nb_refs(const HEVCContext *s); + +int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc); + +static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type) +{ + switch (type) { + case HEVC_NAL_TRAIL_N: + case HEVC_NAL_TSA_N: + case HEVC_NAL_STSA_N: + case HEVC_NAL_RADL_N: + case HEVC_NAL_RASL_N: + case HEVC_NAL_VCL_N10: + case HEVC_NAL_VCL_N12: + case HEVC_NAL_VCL_N14: + return 1; + default: break; + } + return 0; +} + +/** + * Find next frame in output order and put a reference to it in frame. + * @return 1 if a frame was output, 0 otherwise + */ +int ff_hevc_output_frame(HEVCContext *s, AVFrame *frame, int flush); + +void ff_hevc_bump_frame(HEVCContext *s); + +void ff_hevc_unref_frame(HEVCContext *s, HEVCFrame *frame, int flags); + +void ff_hevc_set_neighbour_available(HEVCContext *s, int x0, int y0, + int nPbW, int nPbH); +void ff_hevc_luma_mv_merge_mode(HEVCContext *s, int x0, int y0, + int nPbW, int nPbH, int log2_cb_size, + int part_idx, int merge_idx, MvField *mv); +void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, + int nPbW, int nPbH, int log2_cb_size, + int part_idx, int merge_idx, + MvField *mv, int mvp_lx_flag, int LX); +void ff_hevc_set_qPy(HEVCContext *s, int xBase, int yBase, + int log2_cb_size); +void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, + int log2_trafo_size); +int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s); +int ff_hevc_cu_qp_delta_abs(HEVCContext *s); +int ff_hevc_cu_chroma_qp_offset_flag(HEVCContext *s); +int ff_hevc_cu_chroma_qp_offset_idx(HEVCContext *s); +void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size); +void ff_hevc_hls_filters(HEVCContext *s, int x_ctb, int y_ctb, int ctb_size); +void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, + int log2_trafo_size, enum ScanType scan_idx, + int c_idx); + +void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size); + +extern const uint8_t ff_hevc_qpel_extra_before[4]; +extern const uint8_t ff_hevc_qpel_extra_after[4]; +extern const uint8_t ff_hevc_qpel_extra[4]; + +#endif /* AVCODEC_HEVCDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdsp.h new file mode 100644 index 00000000..0ae67cba --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hevcdsp.h @@ -0,0 +1,135 @@ +/* + * HEVC video decoder + * + * Copyright (C) 2012 - 2013 Guillaume Martres + * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere + * + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HEVCDSP_H +#define AVCODEC_HEVCDSP_H + +#include "get_bits.h" + +#define MAX_PB_SIZE 64 + +typedef struct SAOParams { + int offset_abs[3][4]; ///< sao_offset_abs + int offset_sign[3][4]; ///< sao_offset_sign + + uint8_t band_position[3]; ///< sao_band_position + + int eo_class[3]; ///< sao_eo_class + + int16_t offset_val[3][5]; /// +#include + +struct HEVCContext; + +typedef struct HEVCPredContext { + void (*intra_pred[4])(struct HEVCContext *s, int x0, int y0, int c_idx); + + void (*pred_planar[4])(uint8_t *src, const uint8_t *top, + const uint8_t *left, ptrdiff_t stride); + void (*pred_dc)(uint8_t *src, const uint8_t *top, const uint8_t *left, + ptrdiff_t stride, int log2_size, int c_idx); + void (*pred_angular[4])(uint8_t *src, const uint8_t *top, + const uint8_t *left, ptrdiff_t stride, + int c_idx, int mode); +} HEVCPredContext; + +void ff_hevc_pred_init(HEVCPredContext *hpc, int bit_depth); +void ff_hevc_pred_init_mips(HEVCPredContext *hpc, int bit_depth); + +#endif /* AVCODEC_HEVCPRED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hpeldsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hpeldsp.h new file mode 100644 index 00000000..768139bf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hpeldsp.h @@ -0,0 +1,106 @@ +/* + * Half-pel DSP functions. + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Half-pel DSP functions. + */ + +#ifndef AVCODEC_HPELDSP_H +#define AVCODEC_HPELDSP_H + +#include +#include + +/* add and put pixel (decoding) */ +// blocksizes for hpel_pixels_func are 8x4,8x8 16x8 16x16 +// h for hpel_pixels_func is limited to {width/2, width} but never larger +// than 16 and never smaller than 4 +typedef void (*op_pixels_func)(uint8_t *block /*align width (8 or 16)*/, + const uint8_t *pixels /*align 1*/, + ptrdiff_t line_size, int h); + +/** + * Half-pel DSP context. + */ +typedef struct HpelDSPContext { + /** + * Halfpel motion compensation with rounding (a+b+1)>>1. + * this is an array[4][4] of motion compensation functions for 4 + * horizontal blocksizes (8,16) and the 4 halfpel positions
+ * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] + * @param block destination where the result is stored + * @param pixels source + * @param line_size number of bytes in a horizontal line of block + * @param h height + */ + op_pixels_func put_pixels_tab[4][4]; + + /** + * Halfpel motion compensation with rounding (a+b+1)>>1. + * This is an array[4][4] of motion compensation functions for 4 + * horizontal blocksizes (8,16) and the 4 halfpel positions
+ * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] + * @param block destination into which the result is averaged (a+b+1)>>1 + * @param pixels source + * @param line_size number of bytes in a horizontal line of block + * @param h height + */ + op_pixels_func avg_pixels_tab[4][4]; + + /** + * Halfpel motion compensation with no rounding (a+b)>>1. + * this is an array[4][4] of motion compensation functions for 2 + * horizontal blocksizes (8,16) and the 4 halfpel positions
+ * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ] + * @param block destination where the result is stored + * @param pixels source + * @param line_size number of bytes in a horizontal line of block + * @param h height + * @note The size is kept at [4][4] to match the above pixel_tabs and avoid + * out of bounds reads in the motion estimation code. + */ + op_pixels_func put_no_rnd_pixels_tab[4][4]; + + /** + * Halfpel motion compensation with no rounding (a+b)>>1. + * this is an array[4] of motion compensation functions for 1 + * horizontal blocksize (16) and the 4 halfpel positions
+ * *pixels_tab[0][ xhalfpel + 2*yhalfpel ] + * @param block destination into which the result is averaged (a+b)>>1 + * @param pixels source + * @param line_size number of bytes in a horizontal line of block + * @param h height + */ + op_pixels_func avg_no_rnd_pixels_tab[4]; +} HpelDSPContext; + +void ff_hpeldsp_init(HpelDSPContext *c, int flags); + +void ff_hpeldsp_init_aarch64(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_alpha(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_arm(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_mips(HpelDSPContext *c, int flags); + +#endif /* AVCODEC_HPELDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqa.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqa.h new file mode 100644 index 00000000..608e2ca1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqa.h @@ -0,0 +1,60 @@ +/* + * Canopus HQ/HQA decoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HQ_HQA_H +#define AVCODEC_HQ_HQA_H + +#include + +#include "avcodec.h" +#include "bytestream.h" +#include "hq_hqadsp.h" +#include "vlc.h" + +#define NUM_HQ_AC_ENTRIES 746 +#define NUM_HQ_PROFILES 22 +#define NUM_HQ_QUANTS 16 + +typedef struct HQContext { + AVCodecContext *avctx; + HQDSPContext hqhqadsp; + GetByteContext gbc; + + VLC hq_ac_vlc; + VLC hqa_cbp_vlc; + DECLARE_ALIGNED(16, int16_t, block)[12][64]; +} HQContext; + +typedef struct HQProfile { + const uint8_t *perm_tab; + int width, height; + int num_slices; + int tab_w, tab_h; +} HQProfile; + +extern const int32_t * const ff_hq_quants[16][2][4]; +extern const HQProfile ff_hq_profile[NUM_HQ_PROFILES]; + +extern const uint8_t ff_hq_ac_skips[NUM_HQ_AC_ENTRIES]; +extern const int16_t ff_hq_ac_syms [NUM_HQ_AC_ENTRIES]; + +int ff_hq_init_vlcs(HQContext *c); + +#endif /* AVCODEC_HQ_HQA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqadsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqadsp.h new file mode 100644 index 00000000..420ed92f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hq_hqadsp.h @@ -0,0 +1,38 @@ +/* + * Canopus HQ/HQA decoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * HQ/HQA variant of AAN IDCT + * It differs from the standard AAN IDCT in precision and in the second stage. + */ + +#ifndef AVCODEC_HQ_HQADSP_H +#define AVCODEC_HQ_HQADSP_H + +#include + +typedef struct HQDSPContext { + void (*idct_put)(uint8_t *dst, int stride, int16_t *block); +} HQDSPContext; + +void ff_hqdsp_init(HQDSPContext *c); + +#endif /* AVCODEC_HQ_HQADSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqx.h new file mode 100644 index 00000000..42d382de --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqx.h @@ -0,0 +1,86 @@ +/* + * Canopus HQX decoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HQX_H +#define AVCODEC_HQX_H + +#include + +#include "libavutil/frame.h" +#include "libavutil/mem.h" +#include "get_bits.h" +#include "hqxdsp.h" + +enum HQXACMode { + HQX_AC_Q0 = 0, + HQX_AC_Q8, + HQX_AC_Q16, + HQX_AC_Q32, + HQX_AC_Q64, + HQX_AC_Q128, + NUM_HQX_AC +}; + +typedef struct HQXLUT { + int16_t lev; + uint8_t run; + int8_t bits; +} HQXLUT; + +typedef struct HQXAC { + int lut_bits, extra_bits; + const HQXLUT *lut; +} HQXAC; + +struct HQXContext; + +typedef int (*mb_decode_func)(struct HQXContext *ctx, + int slice_no, int x, int y); + +typedef struct HQXSlice { + GetBitContext gb; + DECLARE_ALIGNED(16, int16_t, block)[16][64]; +} HQXSlice; + +typedef struct HQXContext { + HQXDSPContext hqxdsp; + HQXSlice slice[16]; + + AVFrame *pic; + mb_decode_func decode_func; + + int format, dcb, width, height; + int interlaced; + + uint8_t *src; + unsigned int data_size; + uint32_t slice_off[17]; + + VLC cbp_vlc; + VLC dc_vlc[3]; +} HQXContext; + +#define HQX_DC_VLC_BITS 9 + +extern const HQXAC ff_hqx_ac[NUM_HQX_AC]; + +int ff_hqx_init_vlcs(HQXContext *ctx); + +#endif /* AVCODEC_HQX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqxdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqxdsp.h new file mode 100644 index 00000000..39ab3e2f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hqxdsp.h @@ -0,0 +1,39 @@ +/* + * HQX DSP routines + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * HQX DSP routines + */ + +#ifndef AVCODEC_HQXDSP_H +#define AVCODEC_HQXDSP_H + +#include +#include + +typedef struct HQXDSPContext { + void (*idct_put)(uint16_t *dst, ptrdiff_t stride, + int16_t *block, const uint8_t *quant); +} HQXDSPContext; + +void ff_hqxdsp_init(HQXDSPContext *c); + +#endif /* AVCODEC_HQXDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/htmlsubtitles.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/htmlsubtitles.h new file mode 100644 index 00000000..f3a8ef5d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/htmlsubtitles.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2010 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HTMLSUBTITLES_H +#define AVCODEC_HTMLSUBTITLES_H + +#include "libavutil/bprint.h" + +int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in); + +#endif /* AVCODEC_HTMLSUBTITLES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffman.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffman.h new file mode 100644 index 00000000..4f879e6e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffman.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * huffman tree builder and VLC generator + */ + +#ifndef AVCODEC_HUFFMAN_H +#define AVCODEC_HUFFMAN_H + +#include "avcodec.h" +#include "vlc.h" + +typedef struct Node { + int16_t sym; + int16_t n0; + uint32_t count; +} Node; + +#define FF_HUFFMAN_FLAG_HNODE_FIRST 0x01 +#define FF_HUFFMAN_FLAG_ZERO_COUNT 0x02 +#define FF_HUFFMAN_BITS 10 + +typedef int (*HuffCmp)(const void *va, const void *vb); +int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes, int nb_bits, + Node *nodes, HuffCmp cmp, int flags); + +int ff_huff_gen_len_table(uint8_t *dst, const uint64_t *stats, int n, int skip0); + +#endif /* AVCODEC_HUFFMAN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuv.h new file mode 100644 index 00000000..83309d4b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuv.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2002-2014 Michael Niedermayer + * + * see http://www.pcisys.net/~melanson/codecs/huffyuv.txt for a description of + * the algorithm used + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * huffyuv codec for libavcodec. + */ + +#ifndef AVCODEC_HUFFYUV_H +#define AVCODEC_HUFFYUV_H + +#include + +#include "avcodec.h" +#include "bswapdsp.h" +#include "get_bits.h" +#include "huffyuvdsp.h" +#include "huffyuvencdsp.h" +#include "put_bits.h" +#include "lossless_videodsp.h" +#include "lossless_videoencdsp.h" + +#define VLC_BITS 12 + +#define MAX_BITS 16 +#define MAX_N (1< +#include "libavutil/pixfmt.h" +#include "config.h" + +#if HAVE_BIGENDIAN +#define B 3 +#define G 2 +#define R 1 +#define A 0 +#else +#define B 0 +#define G 1 +#define R 2 +#define A 3 +#endif + +typedef struct HuffYUVDSPContext { + void (*add_int16)(uint16_t *dst/*align 16*/, const uint16_t *src/*align 16*/, + unsigned mask, int w); + + void (*add_hfyu_median_pred_int16)(uint16_t *dst, const uint16_t *top, + const uint16_t *diff, unsigned mask, + int w, int *left, int *left_top); + void (*add_hfyu_left_pred_bgr32)(uint8_t *dst, const uint8_t *src, + intptr_t w, uint8_t *left); +} HuffYUVDSPContext; + +void ff_huffyuvdsp_init(HuffYUVDSPContext *c, enum AVPixelFormat pix_fmt); +void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c, enum AVPixelFormat pix_fmt); + +#endif /* AVCODEC_HUFFYUVDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuvencdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuvencdsp.h new file mode 100644 index 00000000..603f9c8c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/huffyuvencdsp.h @@ -0,0 +1,40 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HUFFYUVENCDSP_H +#define AVCODEC_HUFFYUVENCDSP_H + +#include + +#include "avcodec.h" + +typedef struct HuffYUVEncDSPContext { + void (*diff_int16)(uint16_t *dst /* align 16 */, + const uint16_t *src1 /* align 16 */, + const uint16_t *src2 /* align 1 */, + unsigned mask, int w); + + void (*sub_hfyu_median_pred_int16)(uint16_t *dst, const uint16_t *src1, + const uint16_t *src2, unsigned mask, + int w, int *left, int *left_top); +} HuffYUVEncDSPContext; + +void ff_huffyuvencdsp_init(HuffYUVEncDSPContext *c, AVCodecContext *avctx); +void ff_huffyuvencdsp_init_x86(HuffYUVEncDSPContext *c, AVCodecContext *avctx); + +#endif /* AVCODEC_HUFFYUVENCDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwaccels.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwaccels.h new file mode 100644 index 00000000..6109c89b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwaccels.h @@ -0,0 +1,79 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HWACCELS_H +#define AVCODEC_HWACCELS_H + +#include "avcodec.h" + +extern const AVHWAccel ff_h263_vaapi_hwaccel; +extern const AVHWAccel ff_h263_videotoolbox_hwaccel; +extern const AVHWAccel ff_h264_d3d11va_hwaccel; +extern const AVHWAccel ff_h264_d3d11va2_hwaccel; +extern const AVHWAccel ff_h264_dxva2_hwaccel; +extern const AVHWAccel ff_h264_nvdec_hwaccel; +extern const AVHWAccel ff_h264_vaapi_hwaccel; +extern const AVHWAccel ff_h264_vdpau_hwaccel; +extern const AVHWAccel ff_h264_videotoolbox_hwaccel; +extern const AVHWAccel ff_hevc_d3d11va_hwaccel; +extern const AVHWAccel ff_hevc_d3d11va2_hwaccel; +extern const AVHWAccel ff_hevc_dxva2_hwaccel; +extern const AVHWAccel ff_hevc_nvdec_hwaccel; +extern const AVHWAccel ff_hevc_vaapi_hwaccel; +extern const AVHWAccel ff_hevc_vdpau_hwaccel; +extern const AVHWAccel ff_hevc_videotoolbox_hwaccel; +extern const AVHWAccel ff_mjpeg_nvdec_hwaccel; +extern const AVHWAccel ff_mjpeg_vaapi_hwaccel; +extern const AVHWAccel ff_mpeg1_nvdec_hwaccel; +extern const AVHWAccel ff_mpeg1_vdpau_hwaccel; +extern const AVHWAccel ff_mpeg1_videotoolbox_hwaccel; +extern const AVHWAccel ff_mpeg1_xvmc_hwaccel; +extern const AVHWAccel ff_mpeg2_d3d11va_hwaccel; +extern const AVHWAccel ff_mpeg2_d3d11va2_hwaccel; +extern const AVHWAccel ff_mpeg2_nvdec_hwaccel; +extern const AVHWAccel ff_mpeg2_dxva2_hwaccel; +extern const AVHWAccel ff_mpeg2_vaapi_hwaccel; +extern const AVHWAccel ff_mpeg2_vdpau_hwaccel; +extern const AVHWAccel ff_mpeg2_videotoolbox_hwaccel; +extern const AVHWAccel ff_mpeg2_xvmc_hwaccel; +extern const AVHWAccel ff_mpeg4_nvdec_hwaccel; +extern const AVHWAccel ff_mpeg4_vaapi_hwaccel; +extern const AVHWAccel ff_mpeg4_vdpau_hwaccel; +extern const AVHWAccel ff_mpeg4_videotoolbox_hwaccel; +extern const AVHWAccel ff_vc1_d3d11va_hwaccel; +extern const AVHWAccel ff_vc1_d3d11va2_hwaccel; +extern const AVHWAccel ff_vc1_dxva2_hwaccel; +extern const AVHWAccel ff_vc1_nvdec_hwaccel; +extern const AVHWAccel ff_vc1_vaapi_hwaccel; +extern const AVHWAccel ff_vc1_vdpau_hwaccel; +extern const AVHWAccel ff_vp8_nvdec_hwaccel; +extern const AVHWAccel ff_vp8_vaapi_hwaccel; +extern const AVHWAccel ff_vp9_d3d11va_hwaccel; +extern const AVHWAccel ff_vp9_d3d11va2_hwaccel; +extern const AVHWAccel ff_vp9_dxva2_hwaccel; +extern const AVHWAccel ff_vp9_nvdec_hwaccel; +extern const AVHWAccel ff_vp9_vaapi_hwaccel; +extern const AVHWAccel ff_vp9_vdpau_hwaccel; +extern const AVHWAccel ff_wmv3_d3d11va_hwaccel; +extern const AVHWAccel ff_wmv3_d3d11va2_hwaccel; +extern const AVHWAccel ff_wmv3_dxva2_hwaccel; +extern const AVHWAccel ff_wmv3_nvdec_hwaccel; +extern const AVHWAccel ff_wmv3_vaapi_hwaccel; +extern const AVHWAccel ff_wmv3_vdpau_hwaccel; + +#endif /* AVCODEC_HWACCELS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwconfig.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwconfig.h new file mode 100644 index 00000000..f421dc90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/hwconfig.h @@ -0,0 +1,102 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_HWCONFIG_H +#define AVCODEC_HWCONFIG_H + +#include "avcodec.h" +#include "hwaccels.h" + + +#define HWACCEL_CAP_ASYNC_SAFE (1 << 0) + + +typedef struct AVCodecHWConfigInternal { + /** + * This is the structure which will be returned to the user by + * avcodec_get_hw_config(). + */ + AVCodecHWConfig public; + /** + * If this configuration uses a hwaccel, a pointer to it. + * If not, NULL. + */ + const AVHWAccel *hwaccel; +} AVCodecHWConfigInternal; + + +// These macros are used to simplify AVCodecHWConfigInternal definitions. + +#define HW_CONFIG_HWACCEL(device, frames, ad_hoc, format, device_type_, name) \ + &(const AVCodecHWConfigInternal) { \ + .public = { \ + .pix_fmt = AV_PIX_FMT_ ## format, \ + .methods = (device ? AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX : 0) | \ + (frames ? AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX : 0) | \ + (ad_hoc ? AV_CODEC_HW_CONFIG_METHOD_AD_HOC : 0), \ + .device_type = AV_HWDEVICE_TYPE_ ## device_type_, \ + }, \ + .hwaccel = &name, \ + } + +#define HW_CONFIG_INTERNAL(format) \ + &(const AVCodecHWConfigInternal) { \ + .public = { \ + .pix_fmt = AV_PIX_FMT_ ## format, \ + .methods = AV_CODEC_HW_CONFIG_METHOD_INTERNAL, \ + .device_type = AV_HWDEVICE_TYPE_NONE, \ + }, \ + .hwaccel = NULL, \ + } + +#define HWACCEL_DXVA2(codec) \ + HW_CONFIG_HWACCEL(1, 1, 1, DXVA2_VLD, DXVA2, ff_ ## codec ## _dxva2_hwaccel) +#define HWACCEL_D3D11VA2(codec) \ + HW_CONFIG_HWACCEL(1, 1, 0, D3D11, D3D11VA, ff_ ## codec ## _d3d11va2_hwaccel) +#define HWACCEL_NVDEC(codec) \ + HW_CONFIG_HWACCEL(1, 1, 0, CUDA, CUDA, ff_ ## codec ## _nvdec_hwaccel) +#define HWACCEL_VAAPI(codec) \ + HW_CONFIG_HWACCEL(1, 1, 1, VAAPI, VAAPI, ff_ ## codec ## _vaapi_hwaccel) +#define HWACCEL_VDPAU(codec) \ + HW_CONFIG_HWACCEL(1, 1, 1, VDPAU, VDPAU, ff_ ## codec ## _vdpau_hwaccel) +#define HWACCEL_VIDEOTOOLBOX(codec) \ + HW_CONFIG_HWACCEL(1, 1, 1, VIDEOTOOLBOX, VIDEOTOOLBOX, ff_ ## codec ## _videotoolbox_hwaccel) +#define HWACCEL_D3D11VA(codec) \ + HW_CONFIG_HWACCEL(0, 0, 1, D3D11VA_VLD, NONE, ff_ ## codec ## _d3d11va_hwaccel) +#define HWACCEL_XVMC(codec) \ + HW_CONFIG_HWACCEL(0, 0, 1, XVMC, NONE, ff_ ## codec ## _xvmc_hwaccel) + +#define HW_CONFIG_ENCODER(device, frames, ad_hoc, format, device_type_) \ + &(const AVCodecHWConfigInternal) { \ + .public = { \ + .pix_fmt = AV_PIX_FMT_ ## format, \ + .methods = (device ? AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX : 0) | \ + (frames ? AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX : 0) | \ + (ad_hoc ? AV_CODEC_HW_CONFIG_METHOD_AD_HOC : 0), \ + .device_type = AV_HWDEVICE_TYPE_ ## device_type_, \ + }, \ + .hwaccel = NULL, \ + } + +#define HW_CONFIG_ENCODER_DEVICE(format, device_type_) \ + HW_CONFIG_ENCODER(1, 0, 0, format, device_type_) + +#define HW_CONFIG_ENCODER_FRAMES(format, device_type_) \ + HW_CONFIG_ENCODER(0, 1, 0, format, device_type_) + +#endif /* AVCODEC_HWCONFIG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/idctdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/idctdsp.h new file mode 100644 index 00000000..ca21a31a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/idctdsp.h @@ -0,0 +1,122 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_IDCTDSP_H +#define AVCODEC_IDCTDSP_H + +#include + +#include "config.h" + +#include "avcodec.h" + +/** + * Scantable. + */ +typedef struct ScanTable { + const uint8_t *scantable; + uint8_t permutated[64]; + uint8_t raster_end[64]; +} ScanTable; + +enum idct_permutation_type { + FF_IDCT_PERM_NONE, + FF_IDCT_PERM_LIBMPEG2, + FF_IDCT_PERM_SIMPLE, + FF_IDCT_PERM_TRANSPOSE, + FF_IDCT_PERM_PARTTRANS, + FF_IDCT_PERM_SSE2, +}; + +void ff_init_scantable(uint8_t *permutation, ScanTable *st, + const uint8_t *src_scantable); +void ff_init_scantable_permutation(uint8_t *idct_permutation, + enum idct_permutation_type perm_type); +int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, + enum idct_permutation_type perm_type); + +typedef struct IDCTDSPContext { + /* pixel ops : interface with DCT */ + void (*put_pixels_clamped)(const int16_t *block /* align 16 */, + uint8_t *av_restrict pixels /* align 8 */, + ptrdiff_t line_size); + void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */, + uint8_t *av_restrict pixels /* align 8 */, + ptrdiff_t line_size); + void (*add_pixels_clamped)(const int16_t *block /* align 16 */, + uint8_t *av_restrict pixels /* align 8 */, + ptrdiff_t line_size); + + void (*idct)(int16_t *block /* align 16 */); + + /** + * block -> idct -> clip to unsigned 8 bit -> dest. + * (-1392, 0, 0, ...) -> idct -> (-174, -174, ...) -> put -> (0, 0, ...) + * @param line_size size in bytes of a horizontal line of dest + */ + void (*idct_put)(uint8_t *dest /* align 8 */, + ptrdiff_t line_size, int16_t *block /* align 16 */); + + /** + * block -> idct -> add dest -> clip to unsigned 8 bit -> dest. + * @param line_size size in bytes of a horizontal line of dest + */ + void (*idct_add)(uint8_t *dest /* align 8 */, + ptrdiff_t line_size, int16_t *block /* align 16 */); + + /** + * IDCT input permutation. + * Several optimized IDCTs need a permutated input (relative to the + * normal order of the reference IDCT). + * This permutation must be performed before the idct_put/add. + * Note, normally this can be merged with the zigzag/alternate scan
+ * An example to avoid confusion: + * - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...) + * - (x -> reference DCT -> reference IDCT -> x) + * - (x -> reference DCT -> simple_mmx_perm = idct_permutation + * -> simple_idct_mmx -> x) + * - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant + * -> simple_idct_mmx -> ...) + */ + uint8_t idct_permutation[64]; + enum idct_permutation_type perm_type; + + int mpeg4_studio_profile; +} IDCTDSPContext; + +void ff_put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, + ptrdiff_t line_size); +void ff_add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels, + ptrdiff_t line_size); + +void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx); + +void ff_idctdsp_init_aarch64(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_alpha(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_idctdsp_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); + +#endif /* AVCODEC_IDCTDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/iirfilter.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/iirfilter.h new file mode 100644 index 00000000..5ffa1ce5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/iirfilter.h @@ -0,0 +1,147 @@ +/* + * IIR filter + * Copyright (c) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * IIR filter interface + */ + +#ifndef AVCODEC_IIRFILTER_H +#define AVCODEC_IIRFILTER_H + +#include +#include + +struct FFIIRFilterCoeffs; +struct FFIIRFilterState; + +enum IIRFilterType{ + FF_FILTER_TYPE_BESSEL, + FF_FILTER_TYPE_BIQUAD, + FF_FILTER_TYPE_BUTTERWORTH, + FF_FILTER_TYPE_CHEBYSHEV, + FF_FILTER_TYPE_ELLIPTIC, +}; + +enum IIRFilterMode{ + FF_FILTER_MODE_LOWPASS, + FF_FILTER_MODE_HIGHPASS, + FF_FILTER_MODE_BANDPASS, + FF_FILTER_MODE_BANDSTOP, +}; + +typedef struct FFIIRFilterContext { + /** + * Perform IIR filtering on floating-point input samples. + * + * @param coeffs pointer to filter coefficients + * @param state pointer to filter state + * @param size input length + * @param src source samples + * @param sstep source stride + * @param dst filtered samples (destination may be the same as input) + * @param dstep destination stride + */ + void (*filter_flt)(const struct FFIIRFilterCoeffs *coeffs, + struct FFIIRFilterState *state, int size, + const float *src, ptrdiff_t sstep, float *dst, ptrdiff_t dstep); +} FFIIRFilterContext; + +/** + * Initialize FFIIRFilterContext + */ +void ff_iir_filter_init(FFIIRFilterContext *f); +void ff_iir_filter_init_mips(FFIIRFilterContext *f); + +/** + * Initialize filter coefficients. + * + * @param avc a pointer to an arbitrary struct of which the first + * field is a pointer to an AVClass struct + * @param filt_type filter type (e.g. Butterworth) + * @param filt_mode filter mode (e.g. lowpass) + * @param order filter order + * @param cutoff_ratio cutoff to input frequency ratio + * @param stopband stopband to input frequency ratio (used by bandpass and bandstop filter modes) + * @param ripple ripple factor (used only in Chebyshev filters) + * + * @return pointer to filter coefficients structure or NULL if filter cannot be created + */ +struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(void *avc, + enum IIRFilterType filt_type, + enum IIRFilterMode filt_mode, + int order, float cutoff_ratio, + float stopband, float ripple); + +/** + * Create new filter state. + * + * @param order filter order + * + * @return pointer to new filter state or NULL if state creation fails + */ +struct FFIIRFilterState* ff_iir_filter_init_state(int order); + +/** + * Free filter coefficients. + * + * @param coeffs pointer allocated with ff_iir_filter_init_coeffs() + */ +void ff_iir_filter_free_coeffsp(struct FFIIRFilterCoeffs **coeffs); + +/** + * Free and zero filter state. + * + * @param state pointer to pointer allocated with ff_iir_filter_init_state() + */ +void ff_iir_filter_free_statep(struct FFIIRFilterState **state); + +/** + * Perform IIR filtering on signed 16-bit input samples. + * + * @param coeffs pointer to filter coefficients + * @param state pointer to filter state + * @param size input length + * @param src source samples + * @param sstep source stride + * @param dst filtered samples (destination may be the same as input) + * @param dstep destination stride + */ +void ff_iir_filter(const struct FFIIRFilterCoeffs *coeffs, struct FFIIRFilterState *state, + int size, const int16_t *src, ptrdiff_t sstep, int16_t *dst, ptrdiff_t dstep); + +/** + * Perform IIR filtering on floating-point input samples. + * + * @param coeffs pointer to filter coefficients + * @param state pointer to filter state + * @param size input length + * @param src source samples + * @param sstep source stride + * @param dst filtered samples (destination may be the same as input) + * @param dstep destination stride + */ +void ff_iir_filter_flt(const struct FFIIRFilterCoeffs *coeffs, + struct FFIIRFilterState *state, int size, + const float *src, ptrdiff_t sstep, + float *dst, ptrdiff_t dstep); + +#endif /* AVCODEC_IIRFILTER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ilbcdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ilbcdata.h new file mode 100644 index 00000000..8d145bc1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ilbcdata.h @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2013, The WebRTC project authors. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AVCODEC_ILBCDATA_H +#define AVCODEC_ILBCDATA_H + +#include "libavutil/common.h" + +static const uint8_t lsf_dim_codebook[] = { 3, 3, 4 }; +static const uint8_t lsf_size_codebook[] = { 64, 128, 128 }; +static const int16_t lsf_weight_20ms[] = { 12288, 8192, 4096, 0 }; +static const int16_t lsf_weight_30ms[] = { 8192, 16384, 10923, 5461, 0, 0 }; + +static const int16_t hp_out_coeffs[] = { 3849, -7699, 3849, 7918, -3833 }; + +static const int16_t kPlcPfSlope[] = { 26667, 18729, 13653, 10258, 7901, 6214 }; + +static const int16_t kPlcPitchFact[] = { 0, 5462, 10922, 16384, 21846, 27306 }; + +static const int16_t kCbFiltersRev[] = { + -140, 446, -755, 3302, 2922, -590, 343, -138 +}; + +static const int16_t kPlcPerSqr[] = { 839, 1343, 2048, 2998, 4247, 5849 }; + +static const int16_t alpha[] = { + 6554, 13107, 19661, 26214 +}; + +static const int16_t kLpcChirpSyntDenum[] = { + 32767, 29573, 26690, 24087, 21739, 19619, 17707, 15980, 14422, 13016, 11747 +}; + +static const int16_t LpcChirpWeightDenum[] = { + 32767, 13835, 5841, 2466, 1041, 440, 186, 78, 33, 14, 6 +}; + +static const int16_t cos_tbl[64] = { + 32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853, + 30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279, + 23170, 22006, 20788, 19520, 18205, 16846, 15447, 14010, + 12540, 11039, 9512, 7962, 6393, 4808, 3212, 1608, + 0, -1608, -3212, -4808, -6393, -7962, -9512, -11039, + -12540, -14010, -15447, -16846, -18205, -19520, -20788, -22006, + -23170, -24279, -25330, -26320, -27246, -28106, -28899, -29622, + -30274, -30853, -31357, -31786, -32138, -32413, -32610, -32729, +}; + +static const int16_t cos_derivative_tbl[64] = { + -632, -1893, -3150, -4399, -5638, -6863, -8072, -9261, + -10428, -11570, -12684, -13767, -14817, -15832, -16808, -17744, + -18637, -19486, -20287, -21039, -21741, -22390, -22986, -23526, + -24009, -24435, -24801, -25108, -25354, -25540, -25664, -25726, + -25726, -25664, -25540, -25354, -25108, -24801, -24435, -24009, + -23526, -22986, -22390, -21741, -21039, -20287, -19486, -18637, + -17744, -16808, -15832, -14817, -13767, -12684, -11570, -10428, + -9261, -8072, -6863, -5638, -4399, -3150, -1893, -632 +}; + +static const int16_t lsf_codebook[64 * 3 + 128 * 3 + 128 * 4] = { + 1273, 2238, 3696, 3199, 5309, 8209, 3606, 5671, 7829, + 2815, 5262, 8778, 2608, 4027, 5493, 1582, 3076, 5945, + 2983, 4181, 5396, 2437, 4322, 6902, 1861, 2998, 4613, + 2007, 3250, 5214, 1388, 2459, 4262, 2563, 3805, 5269, + 2036, 3522, 5129, 1935, 4025, 6694, 2744, 5121, 7338, + 2810, 4248, 5723, 3054, 5405, 7745, 1449, 2593, 4763, + 3411, 5128, 6596, 2484, 4659, 7496, 1668, 2879, 4818, + 1812, 3072, 5036, 1638, 2649, 3900, 2464, 3550, 4644, + 1853, 2900, 4158, 2458, 4163, 5830, 2556, 4036, 6254, + 2703, 4432, 6519, 3062, 4953, 7609, 1725, 3703, 6187, + 2221, 3877, 5427, 2339, 3579, 5197, 2021, 4633, 7037, + 2216, 3328, 4535, 2961, 4739, 6667, 2807, 3955, 5099, + 2788, 4501, 6088, 1642, 2755, 4431, 3341, 5282, 7333, + 2414, 3726, 5727, 1582, 2822, 5269, 2259, 3447, 4905, + 3117, 4986, 7054, 1825, 3491, 5542, 3338, 5736, 8627, + 1789, 3090, 5488, 2566, 3720, 4923, 2846, 4682, 7161, + 1950, 3321, 5976, 1834, 3383, 6734, 3238, 4769, 6094, + 2031, 3978, 5903, 1877, 4068, 7436, 2131, 4644, 8296, + 2764, 5010, 8013, 2194, 3667, 6302, 2053, 3127, 4342, + 3523, 6595, 10010, 3134, 4457, 5748, 3142, 5819, 9414, + 2223, 4334, 6353, 2022, 3224, 4822, 2186, 3458, 5544, + 2552, 4757, 6870, 10905, 12917, 14578, 9503, 11485, 14485, + 9518, 12494, 14052, 6222, 7487, 9174, 7759, 9186, 10506, + 8315, 12755, 14786, 9609, 11486, 13866, 8909, 12077, 13643, + 7369, 9054, 11520, 9408, 12163, 14715, 6436, 9911, 12843, + 7109, 9556, 11884, 7557, 10075, 11640, 6482, 9202, 11547, + 6463, 7914, 10980, 8611, 10427, 12752, 7101, 9676, 12606, + 7428, 11252, 13172, 10197, 12955, 15842, 7487, 10955, 12613, + 5575, 7858, 13621, 7268, 11719, 14752, 7476, 11744, 13795, + 7049, 8686, 11922, 8234, 11314, 13983, 6560, 11173, 14984, + 6405, 9211, 12337, 8222, 12054, 13801, 8039, 10728, 13255, + 10066, 12733, 14389, 6016, 7338, 10040, 6896, 8648, 10234, + 7538, 9170, 12175, 7327, 12608, 14983, 10516, 12643, 15223, + 5538, 7644, 12213, 6728, 12221, 14253, 7563, 9377, 12948, + 8661, 11023, 13401, 7280, 8806, 11085, 7723, 9793, 12333, + 12225, 14648, 16709, 8768, 13389, 15245, 10267, 12197, 13812, + 5301, 7078, 11484, 7100, 10280, 11906, 8716, 12555, 14183, + 9567, 12464, 15434, 7832, 12305, 14300, 7608, 10556, 12121, + 8913, 11311, 12868, 7414, 9722, 11239, 8666, 11641, 13250, + 9079, 10752, 12300, 8024, 11608, 13306, 10453, 13607, 16449, + 8135, 9573, 10909, 6375, 7741, 10125, 10025, 12217, 14874, + 6985, 11063, 14109, 9296, 13051, 14642, 8613, 10975, 12542, + 6583, 10414, 13534, 6191, 9368, 13430, 5742, 6859, 9260, + 7723, 9813, 13679, 8137, 11291, 12833, 6562, 8973, 10641, + 6062, 8462, 11335, 6928, 8784, 12647, 7501, 8784, 10031, + 8372, 10045, 12135, 8191, 9864, 12746, 5917, 7487, 10979, + 5516, 6848, 10318, 6819, 9899, 11421, 7882, 12912, 15670, + 9558, 11230, 12753, 7752, 9327, 11472, 8479, 9980, 11358, + 11418, 14072, 16386, 7968, 10330, 14423, 8423, 10555, 12162, + 6337, 10306, 14391, 8850, 10879, 14276, 6750, 11885, 15710, + 7037, 8328, 9764, 6914, 9266, 13476, 9746, 13949, 15519, + 11032, 14444, 16925, 8032, 10271, 11810, 10962, 13451, 15833, + 10021, 11667, 13324, 6273, 8226, 12936, 8543, 10397, 13496, + 7936, 10302, 12745, 6769, 8138, 10446, 6081, 7786, 11719, + 8637, 11795, 14975, 8790, 10336, 11812, 7040, 8490, 10771, + 7338, 10381, 13153, 6598, 7888, 9358, 6518, 8237, 12030, + 9055, 10763, 12983, 6490, 10009, 12007, 9589, 12023, 13632, + 6867, 9447, 10995, 7930, 9816, 11397, 10241, 13300, 14939, + 5830, 8670, 12387, 9870, 11915, 14247, 9318, 11647, 13272, + 6721, 10836, 12929, 6543, 8233, 9944, 8034, 10854, 12394, + 9112, 11787, 14218, 9302, 11114, 13400, 9022, 11366, 13816, + 6962, 10461, 12480, 11288, 13333, 15222, 7249, 8974, 10547, + 10566, 12336, 14390, 6697, 11339, 13521, 11851, 13944, 15826, + 6847, 8381, 11349, 7509, 9331, 10939, 8029, 9618, 11909, + 13973, 17644, 19647, 22474, 14722, 16522, 20035, 22134, 16305, 18179, 21106, 23048, + 15150, 17948, 21394, 23225, 13582, 15191, 17687, 22333, 11778, 15546, 18458, 21753, + 16619, 18410, 20827, 23559, 14229, 15746, 17907, 22474, 12465, 15327, 20700, 22831, + 15085, 16799, 20182, 23410, 13026, 16935, 19890, 22892, 14310, 16854, 19007, 22944, + 14210, 15897, 18891, 23154, 14633, 18059, 20132, 22899, 15246, 17781, 19780, 22640, + 16396, 18904, 20912, 23035, 14618, 17401, 19510, 21672, 15473, 17497, 19813, 23439, + 18851, 20736, 22323, 23864, 15055, 16804, 18530, 20916, 16490, 18196, 19990, 21939, + 11711, 15223, 21154, 23312, 13294, 15546, 19393, 21472, 12956, 16060, 20610, 22417, + 11628, 15843, 19617, 22501, 14106, 16872, 19839, 22689, 15655, 18192, 20161, 22452, + 12953, 15244, 20619, 23549, 15322, 17193, 19926, 21762, 16873, 18676, 20444, 22359, + 14874, 17871, 20083, 21959, 11534, 14486, 19194, 21857, 17766, 19617, 21338, 23178, + 13404, 15284, 19080, 23136, 15392, 17527, 19470, 21953, 14462, 16153, 17985, 21192, + 17734, 19750, 21903, 23783, 16973, 19096, 21675, 23815, 16597, 18936, 21257, 23461, + 15966, 17865, 20602, 22920, 15416, 17456, 20301, 22972, 18335, 20093, 21732, 23497, + 15548, 17217, 20679, 23594, 15208, 16995, 20816, 22870, 13890, 18015, 20531, 22468, + 13211, 15377, 19951, 22388, 12852, 14635, 17978, 22680, 16002, 17732, 20373, 23544, + 11373, 14134, 19534, 22707, 17329, 19151, 21241, 23462, 15612, 17296, 19362, 22850, + 15422, 19104, 21285, 23164, 13792, 17111, 19349, 21370, 15352, 17876, 20776, 22667, + 15253, 16961, 18921, 22123, 14108, 17264, 20294, 23246, 15785, 17897, 20010, 21822, + 17399, 19147, 20915, 22753, 13010, 15659, 18127, 20840, 16826, 19422, 22218, 24084, + 18108, 20641, 22695, 24237, 18018, 20273, 22268, 23920, 16057, 17821, 21365, 23665, + 16005, 17901, 19892, 23016, 13232, 16683, 21107, 23221, 13280, 16615, 19915, 21829, + 14950, 18575, 20599, 22511, 16337, 18261, 20277, 23216, 14306, 16477, 21203, 23158, + 12803, 17498, 20248, 22014, 14327, 17068, 20160, 22006, 14402, 17461, 21599, 23688, + 16968, 18834, 20896, 23055, 15070, 17157, 20451, 22315, 15419, 17107, 21601, 23946, + 16039, 17639, 19533, 21424, 16326, 19261, 21745, 23673, 16489, 18534, 21658, 23782, + 16594, 18471, 20549, 22807, 18973, 21212, 22890, 24278, 14264, 18674, 21123, 23071, + 15117, 16841, 19239, 23118, 13762, 15782, 20478, 23230, 14111, 15949, 20058, 22354, + 14990, 16738, 21139, 23492, 13735, 16971, 19026, 22158, 14676, 17314, 20232, 22807, + 16196, 18146, 20459, 22339, 14747, 17258, 19315, 22437, 14973, 17778, 20692, 23367, + 15715, 17472, 20385, 22349, 15702, 18228, 20829, 23410, 14428, 16188, 20541, 23630, + 16824, 19394, 21365, 23246, 13069, 16392, 18900, 21121, 12047, 16640, 19463, 21689, + 14757, 17433, 19659, 23125, 15185, 16930, 19900, 22540, 16026, 17725, 19618, 22399, + 16086, 18643, 21179, 23472, 15462, 17248, 19102, 21196, 17368, 20016, 22396, 24096, + 12340, 14475, 19665, 23362, 13636, 16229, 19462, 22728, 14096, 16211, 19591, 21635, + 12152, 14867, 19943, 22301, 14492, 17503, 21002, 22728, 14834, 16788, 19447, 21411, + 14650, 16433, 19326, 22308, 14624, 16328, 19659, 23204, 13888, 16572, 20665, 22488, + 12977, 16102, 18841, 22246, 15523, 18431, 21757, 23738, 14095, 16349, 18837, 20947, + 13266, 17809, 21088, 22839, 15427, 18190, 20270, 23143, 11859, 16753, 20935, 22486, + 12310, 17667, 21736, 23319, 14021, 15926, 18702, 22002, 12286, 15299, 19178, 21126, + 15703, 17491, 21039, 23151, 12272, 14018, 18213, 22570, 14817, 16364, 18485, 22598, + 17109, 19683, 21851, 23677, 12657, 14903, 19039, 22061, 14713, 16487, 20527, 22814, + 14635, 16726, 18763, 21715, 15878, 18550, 20718, 22906 +}; + +static const int16_t gain3[9]={ + -16384, -10813, -5407, 0, 4096, 8192, 12288, 16384, 32767 +}; + +static const int16_t gain4[17]={ + -17203, -14746, -12288, -9830, -7373, -4915, -2458, 0, 2458, 4915, 7373, 9830, + 12288, 14746, 17203, 19661, 32767 +}; + +static const int16_t gain5[33]={ + 614, 1229, 1843, 2458, 3072, 3686, + 4301, 4915, 5530, 6144, 6758, 7373, + 7987, 8602, 9216, 9830, 10445, 11059, + 11674, 12288, 12902, 13517, 14131, 14746, + 15360, 15974, 16589, 17203, 17818, 18432, + 19046, 19661, 32767 +}; + +static const int16_t *const ilbc_gain[] = { + gain5, gain4, gain3, +}; + +static const int16_t ilbc_state[8] = { + -30473, -17838, -9257, -2537, 3639, 10893, 19958, 32636 +}; + +static const int16_t frg_quant_mod[64] = { + /* First 37 values in Q8 */ + 569, 671, 786, 916, 1077, 1278, + 1529, 1802, 2109, 2481, 2898, 3440, + 3943, 4535, 5149, 5778, 6464, 7208, + 7904, 8682, 9397, 10285, 11240, 12246, + 13313, 14382, 15492, 16735, 18131, 19693, + 21280, 22912, 24624, 26544, 28432, 30488, + 32720, + /* 22 values in Q5 */ + 4383, 4684, 5012, 5363, 5739, 6146, + 6603, 7113, 7679, 8285, 9040, 9850, + 10838, 11882, 13103, 14467, 15950, 17669, + 19712, 22016, 24800, 28576, + /* 5 values in Q3 */ + 8240, 9792, 12040, 15440, 22472 +}; + +#endif /* AVCODEC_ILBCDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/imcdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/imcdata.h new file mode 100644 index 00000000..64e7c718 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/imcdata.h @@ -0,0 +1,169 @@ +/* + * IMC compatible decoder + * Copyright (c) 2002-2004 Maxim Poliakovski + * Copyright (c) 2006 Benjamin Larsson + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_IMCDATA_H +#define AVCODEC_IMCDATA_H + +#include + +static const uint16_t band_tab[33] = { + 0, 3, 6, 9, 12, 16, 20, 24, 29, 34, 40, + 46, 53, 60, 68, 76, 84, 93, 102, 111, 121, 131, + 141, 151, 162, 173, 184, 195, 207, 219, 231, 243, 256, +}; + + +static const int8_t cyclTab[32] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 32, +}; + +static const int8_t cyclTab2[32] = { + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 17, 18, 19, 20, 21, 22, +23, 24, 25, 26, 27, 28, 29}; + +static const float imc_weights1[31] = { + 0.119595, 0.123124, 0.129192, 9.97377e-2, 8.1923e-2, 9.61153e-2, 8.77885e-2, 8.61174e-2, + 9.00882e-2, 9.91658e-2, 0.112991, 0.131126, 0.152886, 0.177292, 0.221782, 0.244917, 0.267386, + 0.306816, 0.323046, 0.33729, 0.366773, 0.392557, 0.398076, 0.403302, 0.42451, 0.444777, + 0.449188, 0.455445, 0.477853, 0.500669, 0.510395}; + +static const float imc_weights2[31] = { + 3.23466e-3, 3.49886e-3, 3.98413e-3, 1.98116e-3, 1.16465e-3, 1.79283e-3, 1.40372e-3, 1.33274e-3, + 1.50523e-3, 1.95064e-3, 2.77472e-3, 4.14725e-3, 6.2776e-3, 9.36401e-3, 1.71397e-2, 2.24052e-2, + 2.83971e-2, 4.11689e-2, 4.73165e-2, 5.31631e-2, 6.66614e-2, 8.00824e-2, 8.31588e-2, 8.61397e-2, + 9.89229e-2, 0.112197, 0.115227, 0.119613, 0.136174, 0.15445, 0.162685}; + +static const float imc_quantizer1[4][8] = { + { 8.4431201e-1, 4.7358301e-1, 1.448354, 2.7073899e-1, 7.4449003e-1, 1.241991, 1.845484, 0.0}, + { 8.6876702e-1, 4.7659001e-1, 1.478224, 2.5672799e-1, 7.55777e-1, 1.3229851, 2.03438, 0.0}, + { 7.5891501e-1, 6.2272799e-1, 1.271322, 3.47904e-1, 7.5317699e-1, 1.150767, 1.628476, 0.0}, + { 7.65257e-1, 6.44647e-1, 1.263824, 3.4548101e-1, 7.6384902e-1, 1.214466, 1.7638789, 0.0}, +}; + +static const float imc_quantizer2[2][56] = { + { 1.39236e-1, 3.50548e-1, 5.9547901e-1, 8.5772401e-1, 1.121545, 1.3882281, 1.695882, 2.1270809, + 7.2221003e-2, 1.85177e-1, 2.9521701e-1, 4.12568e-1, 5.4068601e-1, 6.7679501e-1, 8.1196898e-1, 9.4765198e-1, + 1.0779999, 1.203415, 1.337265, 1.481871, 1.639982, 1.814766, 2.0701399, 2.449862, + 3.7533998e-2, 1.02722e-1, 1.6021401e-1, 2.16043e-1, 2.7231601e-1, 3.3025399e-1, 3.9022601e-1, 4.52849e-1, + 5.1794899e-1, 5.8529502e-1, 6.53956e-1, 7.2312802e-1, 7.9150802e-1, 8.5891002e-1, 9.28141e-1, 9.9706203e-1, + 1.062153, 1.12564, 1.189834, 1.256122, 1.324469, 1.3955311, 1.468906, 1.545084, + 1.6264729, 1.711524, 1.802705, 1.91023, 2.0533991, 2.22333, 2.4830019, 3.253329 }, + { 1.11654e-1, 3.54469e-1, 6.4232099e-1, 9.6128798e-1, 1.295053, 1.61777, 1.989839, 2.51107, + 5.7721999e-2, 1.69879e-1, 2.97589e-1, 4.3858799e-1, 5.9039903e-1, 7.4934798e-1, 9.1628098e-1, 1.087297, + 1.262751, 1.4288321, 1.6040879, 1.79067, 2.000668, 2.2394669, 2.649332, 5.2760072, + 2.9722e-2, 8.7316997e-2, 1.4445201e-1, 2.04247e-1, 2.6879501e-1, 3.3716801e-1, 4.08811e-1, 4.8306999e-1, + 5.6049401e-1, 6.3955498e-1, 7.2044599e-1, 8.0427998e-1, 8.8933599e-1, 9.7537601e-1, 1.062461, 1.1510431, + 1.240236, 1.326715, 1.412513, 1.500502, 1.591749, 1.686413, 1.785239, 1.891233, + 2.0051291, 2.127681, 2.2709141, 2.475826, 2.7219379, 3.101985, 4.686213, 6.2287788}, +}; + + +static const float xTab[14] = {7.6, 3.6, 4.4, 3.7, 6.1, 5.1, 2.3, 1.6, 6.2, 1.5, 1.8, 1.2, 0, 0}; //10014048 + +/* precomputed table for 10^(i/4), i=-15..16 */ +static const float imc_exp_tab[32] = { + 1.778280e-4, 3.162278e-4, 5.623413e-4, 1.000000e-3, + 1.778280e-3, 3.162278e-3, 5.623413e-3, 1.000000e-2, + 1.778280e-2, 3.162278e-2, 5.623413e-2, 1.000000e-1, + 1.778280e-1, 3.162278e-1, 5.623413e-1, 1.000000e00, + 1.778280e00, 3.162278e00, 5.623413e00, 1.000000e01, + 1.778280e01, 3.162278e01, 5.623413e01, 1.000000e02, + 1.778280e02, 3.162278e02, 5.623413e02, 1.000000e03, + 1.778280e03, 3.162278e03, 5.623413e03, 1.000000e04 +}; +static const float * const imc_exp_tab2 = imc_exp_tab + 8; + + +static const uint8_t imc_cb_select[4][32] = { + { 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2 }, + { 0, 2, 0, 3, 2, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2 }, + { 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +static const uint8_t imc_huffman_sizes[4] = { + 17, 17, 18, 18 +}; + +static const uint8_t imc_huffman_lens[4][4][18] = { + { + { 16, 15, 13, 11, 8, 5, 3, 1, 2, 4, 6, 9, 10, 12, 14, 16, 7, 0 }, + { 10, 8, 7, 6, 4, 4, 3, 2, 2, 3, 4, 6, 7, 9, 11, 11, 7, 0 }, + { 15, 15, 14, 11, 8, 6, 4, 2, 1, 4, 5, 7, 9, 10, 12, 13, 4, 0 }, + { 13, 11, 10, 8, 6, 4, 2, 2, 2, 3, 5, 7, 9, 12, 15, 15, 14, 0 }, + }, + { + { 14, 12, 10, 8, 7, 4, 2, 2, 2, 3, 5, 7, 9, 11, 13, 14, 7, 0 }, + { 14, 13, 11, 8, 6, 4, 3, 2, 2, 3, 5, 7, 9, 10, 12, 14, 3, 0 }, + { 13, 12, 10, 7, 5, 4, 3, 2, 2, 3, 4, 6, 8, 9, 11, 13, 4, 0 }, + { 13, 12, 10, 7, 5, 4, 3, 2, 2, 3, 4, 6, 8, 9, 11, 13, 4, 0 }, + }, + { + { 16, 14, 12, 10, 8, 5, 3, 1, 2, 4, 7, 9, 11, 13, 15, 17, 6, 17 }, + { 15, 13, 11, 8, 6, 4, 2, 2, 2, 3, 5, 7, 10, 12, 14, 16, 9, 16 }, + { 14, 12, 11, 9, 8, 6, 3, 1, 2, 5, 7, 10, 13, 15, 16, 17, 4, 17 }, + { 16, 14, 12, 9, 7, 5, 2, 2, 2, 3, 4, 6, 8, 11, 13, 15, 10, 16 }, + }, + { + { 13, 11, 10, 8, 7, 5, 2, 2, 2, 4, 6, 9, 12, 14, 15, 16, 3, 16 }, + { 11, 11, 10, 9, 8, 7, 5, 4, 3, 3, 3, 3, 3, 3, 4, 5, 6, 5 }, + { 9, 9, 7, 6, 5, 4, 3, 3, 2, 3, 4, 5, 4, 5, 5, 6, 8, 6 }, + { 13, 12, 10, 8, 5, 3, 3, 2, 2, 3, 4, 7, 9, 11, 14, 15, 6, 15 }, + } +}; + +static const uint16_t imc_huffman_bits[4][4][18] = { + { + { 0xCC32, 0x6618, 0x1987, 0x0660, 0x00CD, 0x0018, 0x0007, 0x0000, 0x0002, 0x000D, 0x0032, 0x0199, 0x0331, 0x0CC2, 0x330D, 0xCC33, 0x0067, 0x0000 }, + { 0x02FE, 0x00BE, 0x005E, 0x002D, 0x000A, 0x0009, 0x0003, 0x0003, 0x0000, 0x0002, 0x0008, 0x002C, 0x005D, 0x017E, 0x05FE, 0x05FF, 0x005C, 0x0000 }, + { 0x5169, 0x5168, 0x28B5, 0x0517, 0x00A3, 0x0029, 0x0008, 0x0003, 0x0000, 0x0009, 0x0015, 0x0050, 0x0144, 0x028A, 0x0A2C, 0x145B, 0x000B, 0x0000 }, + { 0x1231, 0x048D, 0x0247, 0x0090, 0x0025, 0x0008, 0x0001, 0x0003, 0x0000, 0x0005, 0x0013, 0x0049, 0x0122, 0x0919, 0x48C3, 0x48C2, 0x2460, 0x0000 }, + }, + { + { 0x2D1D, 0x0B46, 0x02D0, 0x00B5, 0x0059, 0x000A, 0x0003, 0x0001, 0x0000, 0x0004, 0x0017, 0x005B, 0x0169, 0x05A2, 0x168F, 0x2D1C, 0x0058, 0x0000 }, + { 0x1800, 0x0C01, 0x0301, 0x0061, 0x0019, 0x0007, 0x0004, 0x0003, 0x0000, 0x0005, 0x000D, 0x0031, 0x00C1, 0x0181, 0x0601, 0x1801, 0x0002, 0x0000 }, + { 0x1556, 0x0AAA, 0x02AB, 0x0054, 0x0014, 0x000B, 0x0002, 0x0003, 0x0000, 0x0003, 0x0008, 0x002B, 0x00AB, 0x0154, 0x0554, 0x1557, 0x0009, 0x0000 }, + { 0x1556, 0x0AAA, 0x02AB, 0x0054, 0x0014, 0x000B, 0x0002, 0x0003, 0x0000, 0x0003, 0x0008, 0x002B, 0x00AB, 0x0154, 0x0554, 0x1557, 0x0009, 0x0000 }, + }, + { + { 0x2993, 0x0A65, 0x0298, 0x00A7, 0x0028, 0x0004, 0x0000, 0x0001, 0x0001, 0x0003, 0x0015, 0x0052, 0x014D, 0x0533, 0x14C8, 0x5324, 0x000B, 0x5325 }, + { 0x09B8, 0x026F, 0x009A, 0x0012, 0x0005, 0x0000, 0x0001, 0x0002, 0x0003, 0x0001, 0x0003, 0x0008, 0x004C, 0x0136, 0x04DD, 0x1373, 0x0027, 0x1372 }, + { 0x0787, 0x01E0, 0x00F1, 0x003D, 0x001F, 0x0006, 0x0001, 0x0001, 0x0001, 0x0002, 0x000E, 0x0079, 0x03C2, 0x0F0D, 0x1E19, 0x3C30, 0x0000, 0x3C31 }, + { 0x4B06, 0x12C0, 0x04B1, 0x0097, 0x0024, 0x0008, 0x0002, 0x0003, 0x0000, 0x0003, 0x0005, 0x0013, 0x004A, 0x0259, 0x0961, 0x2582, 0x012D, 0x4B07 }, + }, + { + { 0x0A5A, 0x0297, 0x014A, 0x0053, 0x0028, 0x000B, 0x0003, 0x0000, 0x0002, 0x0004, 0x0015, 0x00A4, 0x052C, 0x14B7, 0x296C, 0x52DB, 0x0003, 0x52DA }, + { 0x0193, 0x0192, 0x00C8, 0x0065, 0x0033, 0x0018, 0x0007, 0x0004, 0x0000, 0x0004, 0x0005, 0x0007, 0x0006, 0x0003, 0x0005, 0x0005, 0x000D, 0x0004 }, + { 0x0012, 0x0013, 0x0005, 0x0003, 0x0000, 0x0003, 0x0005, 0x0004, 0x0003, 0x0003, 0x0005, 0x0005, 0x0004, 0x0004, 0x0003, 0x0005, 0x0008, 0x0004 }, + { 0x0D66, 0x06B2, 0x01AD, 0x006A, 0x000C, 0x0005, 0x0004, 0x0000, 0x0003, 0x0002, 0x0007, 0x0034, 0x00D7, 0x0358, 0x1ACF, 0x359C, 0x001B, 0x359D }, + } +}; + +#endif /* AVCODEC_IMCDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo2data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo2data.h new file mode 100644 index 00000000..bfdb0a68 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo2data.h @@ -0,0 +1,198 @@ +/* + * Intel Indeo 2 codec + * copyright (c) 2005 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_INDEO2DATA_H +#define AVCODEC_INDEO2DATA_H + +#include + +#define IR2_CODES 143 +static const uint16_t ir2_codes[IR2_CODES][2] = { + { 0x0000, 3 }, { 0x0004, 3 }, { 0x0006, 3 }, { 0x0001, 5 }, + { 0x0009, 5 }, { 0x0019, 5 }, { 0x000D, 5 }, { 0x001D, 5 }, + { 0x0023, 6 }, { 0x0013, 6 }, { 0x0033, 6 }, { 0x000B, 6 }, + { 0x002B, 6 }, { 0x001B, 6 }, { 0x0007, 8 }, { 0x0087, 8 }, + { 0x0027, 8 }, { 0x00A7, 8 }, { 0x0067, 8 }, { 0x00E7, 8 }, + { 0x0097, 8 }, { 0x0057, 8 }, { 0x0037, 8 }, { 0x00B7, 8 }, + { 0x00F7, 8 }, { 0x000F, 9 }, { 0x008F, 9 }, { 0x018F, 9 }, + { 0x014F, 9 }, { 0x00CF, 9 }, { 0x002F, 9 }, { 0x012F, 9 }, + { 0x01AF, 9 }, { 0x006F, 9 }, { 0x00EF, 9 }, { 0x01EF, 9 }, + { 0x001F, 10 }, { 0x021F, 10 }, { 0x011F, 10 }, { 0x031F, 10 }, + { 0x009F, 10 }, { 0x029F, 10 }, { 0x019F, 10 }, { 0x039F, 10 }, + { 0x005F, 10 }, { 0x025F, 10 }, { 0x015F, 10 }, { 0x035F, 10 }, + { 0x00DF, 10 }, { 0x02DF, 10 }, { 0x01DF, 10 }, { 0x03DF, 10 }, + { 0x003F, 13 }, { 0x103F, 13 }, { 0x083F, 13 }, { 0x183F, 13 }, + { 0x043F, 13 }, { 0x143F, 13 }, { 0x0C3F, 13 }, { 0x1C3F, 13 }, + { 0x023F, 13 }, { 0x123F, 13 }, { 0x0A3F, 13 }, { 0x1A3F, 13 }, + { 0x063F, 13 }, { 0x163F, 13 }, { 0x0E3F, 13 }, { 0x1E3F, 13 }, + { 0x013F, 13 }, { 0x113F, 13 }, { 0x093F, 13 }, { 0x193F, 13 }, + { 0x053F, 13 }, { 0x153F, 13 }, { 0x0D3F, 13 }, { 0x1D3F, 13 }, + { 0x033F, 13 }, { 0x133F, 13 }, { 0x0B3F, 13 }, { 0x1B3F, 13 }, + { 0x073F, 13 }, { 0x173F, 13 }, { 0x0F3F, 13 }, { 0x1F3F, 13 }, + { 0x00BF, 13 }, { 0x10BF, 13 }, { 0x08BF, 13 }, { 0x18BF, 13 }, + { 0x04BF, 13 }, { 0x14BF, 13 }, { 0x0CBF, 13 }, { 0x1CBF, 13 }, + { 0x02BF, 13 }, { 0x12BF, 13 }, { 0x0ABF, 13 }, { 0x1ABF, 13 }, + { 0x06BF, 13 }, { 0x16BF, 13 }, { 0x0EBF, 13 }, { 0x1EBF, 13 }, + { 0x01BF, 13 }, { 0x11BF, 13 }, { 0x09BF, 13 }, { 0x19BF, 13 }, + { 0x05BF, 13 }, { 0x15BF, 13 }, { 0x0DBF, 13 }, { 0x1DBF, 13 }, + { 0x03BF, 13 }, { 0x13BF, 13 }, { 0x0BBF, 13 }, { 0x1BBF, 13 }, + { 0x07BF, 13 }, { 0x17BF, 13 }, { 0x0FBF, 13 }, { 0x1FBF, 13 }, + { 0x007F, 14 }, { 0x207F, 14 }, { 0x107F, 14 }, { 0x307F, 14 }, + { 0x087F, 14 }, { 0x287F, 14 }, { 0x187F, 14 }, { 0x387F, 14 }, + { 0x047F, 14 }, { 0x247F, 14 }, { 0x147F, 14 }, { 0x0002, 3 }, + { 0x0011, 5 }, { 0x0005, 5 }, { 0x0015, 5 }, { 0x0003, 6 }, + { 0x003B, 6 }, { 0x0047, 8 }, { 0x00C7, 8 }, { 0x0017, 8 }, + { 0x00D7, 8 }, { 0x0077, 8 }, { 0x010F, 9 }, { 0x004F, 9 }, + { 0x01CF, 9 }, { 0x00AF, 9 }, { 0x016F, 9 }, +}; + +static const uint8_t ir2_delta_table[4][256] = { + { 0x80, 0x80, 0x84, 0x84, 0x7C, 0x7C, 0x7F, 0x85, + 0x81, 0x7B, 0x85, 0x7F, 0x7B, 0x81, 0x8C, 0x8C, + 0x74, 0x74, 0x83, 0x8D, 0x7D, 0x73, 0x8D, 0x83, + 0x73, 0x7D, 0x77, 0x89, 0x89, 0x77, 0x89, 0x77, + 0x77, 0x89, 0x8C, 0x95, 0x74, 0x6B, 0x95, 0x8C, + 0x6B, 0x74, 0x7C, 0x90, 0x84, 0x70, 0x90, 0x7C, + 0x70, 0x84, 0x96, 0x96, 0x6A, 0x6A, 0x82, 0x98, + 0x7E, 0x68, 0x98, 0x82, 0x68, 0x7E, 0x97, 0xA2, + 0x69, 0x5E, 0xA2, 0x97, 0x5E, 0x69, 0xA2, 0xA2, + 0x5E, 0x5E, 0x8B, 0xA3, 0x75, 0x5D, 0xA3, 0x8B, + 0x5D, 0x75, 0x71, 0x95, 0x8F, 0x6B, 0x95, 0x71, + 0x6B, 0x8F, 0x78, 0x9D, 0x88, 0x63, 0x9D, 0x78, + 0x63, 0x88, 0x7F, 0xA7, 0x81, 0x59, 0xA7, 0x7F, + 0x59, 0x81, 0xA4, 0xB1, 0x5C, 0x4F, 0xB1, 0xA4, + 0x4F, 0x5C, 0x96, 0xB1, 0x6A, 0x4F, 0xB1, 0x96, + 0x4F, 0x6A, 0xB2, 0xB2, 0x4E, 0x4E, 0x65, 0x9B, + 0x9B, 0x65, 0x9B, 0x65, 0x65, 0x9B, 0x89, 0xB4, + 0x77, 0x4C, 0xB4, 0x89, 0x4C, 0x77, 0x6A, 0xA3, + 0x96, 0x5D, 0xA3, 0x6A, 0x5D, 0x96, 0x73, 0xAC, + 0x8D, 0x54, 0xAC, 0x73, 0x54, 0x8D, 0xB4, 0xC3, + 0x4C, 0x3D, 0xC3, 0xB4, 0x3D, 0x4C, 0xA4, 0xC3, + 0x5C, 0x3D, 0xC3, 0xA4, 0x3D, 0x5C, 0xC4, 0xC4, + 0x3C, 0x3C, 0x96, 0xC6, 0x6A, 0x3A, 0xC6, 0x96, + 0x3A, 0x6A, 0x7C, 0xBA, 0x84, 0x46, 0xBA, 0x7C, + 0x46, 0x84, 0x5B, 0xAB, 0xA5, 0x55, 0xAB, 0x5B, + 0x55, 0xA5, 0x63, 0xB4, 0x9D, 0x4C, 0xB4, 0x63, + 0x4C, 0x9D, 0x86, 0xCA, 0x7A, 0x36, 0xCA, 0x86, + 0x36, 0x7A, 0xB6, 0xD7, 0x4A, 0x29, 0xD7, 0xB6, + 0x29, 0x4A, 0xC8, 0xD7, 0x38, 0x29, 0xD7, 0xC8, + 0x29, 0x38, 0xA4, 0xD8, 0x5C, 0x28, 0xD8, 0xA4, + 0x28, 0x5C, 0x6C, 0xC1, 0x94, 0x3F, 0xC1, 0x6C, + 0x3F, 0x94, 0xD9, 0xD9, 0x27, 0x27, 0x80, 0x80, }, + { 0x80, 0x80, 0x85, 0x85, 0x7B, 0x7B, 0x7E, 0x87, + 0x82, 0x79, 0x87, 0x7E, 0x79, 0x82, 0x8F, 0x8F, + 0x71, 0x71, 0x84, 0x8F, 0x7C, 0x71, 0x8F, 0x84, + 0x71, 0x7C, 0x75, 0x8B, 0x8B, 0x75, 0x8B, 0x75, + 0x75, 0x8B, 0x8E, 0x9A, 0x72, 0x66, 0x9A, 0x8E, + 0x66, 0x72, 0x7B, 0x93, 0x85, 0x6D, 0x93, 0x7B, + 0x6D, 0x85, 0x9B, 0x9B, 0x65, 0x65, 0x82, 0x9D, + 0x7E, 0x63, 0x9D, 0x82, 0x63, 0x7E, 0x9B, 0xA8, + 0x65, 0x58, 0xA8, 0x9B, 0x58, 0x65, 0xA9, 0xA9, + 0x57, 0x57, 0x8D, 0xAA, 0x73, 0x56, 0xAA, 0x8D, + 0x56, 0x73, 0x6E, 0x99, 0x92, 0x67, 0x99, 0x6E, + 0x67, 0x92, 0x76, 0xA2, 0x8A, 0x5E, 0xA2, 0x76, + 0x5E, 0x8A, 0x7F, 0xAF, 0x81, 0x51, 0xAF, 0x7F, + 0x51, 0x81, 0xAB, 0xBA, 0x55, 0x46, 0xBA, 0xAB, + 0x46, 0x55, 0x9A, 0xBB, 0x66, 0x45, 0xBB, 0x9A, + 0x45, 0x66, 0xBB, 0xBB, 0x45, 0x45, 0x60, 0xA0, + 0xA0, 0x60, 0xA0, 0x60, 0x60, 0xA0, 0x8B, 0xBE, + 0x75, 0x42, 0xBE, 0x8B, 0x42, 0x75, 0x66, 0xAA, + 0x9A, 0x56, 0xAA, 0x66, 0x56, 0x9A, 0x70, 0xB5, + 0x90, 0x4B, 0xB5, 0x70, 0x4B, 0x90, 0xBE, 0xCF, + 0x42, 0x31, 0xCF, 0xBE, 0x31, 0x42, 0xAB, 0xD0, + 0x55, 0x30, 0xD0, 0xAB, 0x30, 0x55, 0xD1, 0xD1, + 0x2F, 0x2F, 0x9A, 0xD3, 0x66, 0x2D, 0xD3, 0x9A, + 0x2D, 0x66, 0x7B, 0xC5, 0x85, 0x3B, 0xC5, 0x7B, + 0x3B, 0x85, 0x54, 0xB4, 0xAC, 0x4C, 0xB4, 0x54, + 0x4C, 0xAC, 0x5E, 0xBE, 0xA2, 0x42, 0xBE, 0x5E, + 0x42, 0xA2, 0x87, 0xD8, 0x79, 0x28, 0xD8, 0x87, + 0x28, 0x79, 0xC0, 0xE8, 0x40, 0x18, 0xE8, 0xC0, + 0x18, 0x40, 0xD5, 0xE8, 0x2B, 0x18, 0xE8, 0xD5, + 0x18, 0x2B, 0xAB, 0xE9, 0x55, 0x17, 0xE9, 0xAB, + 0x17, 0x55, 0x68, 0xCD, 0x98, 0x33, 0xCD, 0x68, + 0x33, 0x98, 0xEA, 0xEA, 0x16, 0x16, 0x80, 0x80, }, + { 0x80, 0x80, 0x86, 0x86, 0x7A, 0x7A, 0x7E, 0x88, + 0x82, 0x78, 0x88, 0x7E, 0x78, 0x82, 0x92, 0x92, + 0x6E, 0x6E, 0x85, 0x92, 0x7B, 0x6E, 0x92, 0x85, + 0x6E, 0x7B, 0x73, 0x8D, 0x8D, 0x73, 0x8D, 0x73, + 0x73, 0x8D, 0x91, 0x9E, 0x6F, 0x62, 0x9E, 0x91, + 0x62, 0x6F, 0x79, 0x97, 0x87, 0x69, 0x97, 0x79, + 0x69, 0x87, 0xA0, 0xA0, 0x60, 0x60, 0x83, 0xA2, + 0x7D, 0x5E, 0xA2, 0x83, 0x5E, 0x7D, 0xA0, 0xB0, + 0x60, 0x50, 0xB0, 0xA0, 0x50, 0x60, 0xB1, 0xB1, + 0x4F, 0x4F, 0x8F, 0xB2, 0x71, 0x4E, 0xB2, 0x8F, + 0x4E, 0x71, 0x6B, 0x9E, 0x95, 0x62, 0x9E, 0x6B, + 0x62, 0x95, 0x74, 0xA9, 0x8C, 0x57, 0xA9, 0x74, + 0x57, 0x8C, 0x7F, 0xB8, 0x81, 0x48, 0xB8, 0x7F, + 0x48, 0x81, 0xB4, 0xC5, 0x4C, 0x3B, 0xC5, 0xB4, + 0x3B, 0x4C, 0x9F, 0xC6, 0x61, 0x3A, 0xC6, 0x9F, + 0x3A, 0x61, 0xC6, 0xC6, 0x3A, 0x3A, 0x59, 0xA7, + 0xA7, 0x59, 0xA7, 0x59, 0x59, 0xA7, 0x8D, 0xCA, + 0x73, 0x36, 0xCA, 0x8D, 0x36, 0x73, 0x61, 0xB2, + 0x9F, 0x4E, 0xB2, 0x61, 0x4E, 0x9F, 0x6D, 0xBF, + 0x93, 0x41, 0xBF, 0x6D, 0x41, 0x93, 0xCA, 0xDF, + 0x36, 0x21, 0xDF, 0xCA, 0x21, 0x36, 0xB3, 0xDF, + 0x4D, 0x21, 0xDF, 0xB3, 0x21, 0x4D, 0xE1, 0xE1, + 0x1F, 0x1F, 0x9F, 0xE3, 0x61, 0x1D, 0xE3, 0x9F, + 0x1D, 0x61, 0x7A, 0xD3, 0x86, 0x2D, 0xD3, 0x7A, + 0x2D, 0x86, 0x4C, 0xBE, 0xB4, 0x42, 0xBE, 0x4C, + 0x42, 0xB4, 0x57, 0xCA, 0xA9, 0x36, 0xCA, 0x57, + 0x36, 0xA9, 0x88, 0xE9, 0x78, 0x17, 0xE9, 0x88, + 0x17, 0x78, 0xCC, 0xFB, 0x34, 0x05, 0xFB, 0xCC, + 0x05, 0x34, 0xE6, 0xFB, 0x1A, 0x05, 0xFB, 0xE6, + 0x05, 0x1A, 0xB4, 0xFD, 0x4C, 0x03, 0xFD, 0xB4, + 0x03, 0x4C, 0x63, 0xDC, 0x9D, 0x24, 0xDC, 0x63, + 0x24, 0x9D, 0xFE, 0xFE, 0x02, 0x02, 0x80, 0x80, }, + { 0x80, 0x80, 0x87, 0x87, 0x79, 0x79, 0x7E, 0x89, + 0x82, 0x77, 0x89, 0x7E, 0x77, 0x82, 0x95, 0x95, + 0x6B, 0x6B, 0x86, 0x96, 0x7A, 0x6A, 0x96, 0x86, + 0x6A, 0x7A, 0x70, 0x90, 0x90, 0x70, 0x90, 0x70, + 0x70, 0x90, 0x94, 0xA4, 0x6C, 0x5C, 0xA4, 0x94, + 0x5C, 0x6C, 0x78, 0x9B, 0x88, 0x65, 0x9B, 0x78, + 0x65, 0x88, 0xA6, 0xA6, 0x5A, 0x5A, 0x83, 0xA9, + 0x7D, 0x57, 0xA9, 0x83, 0x57, 0x7D, 0xA6, 0xB9, + 0x5A, 0x47, 0xB9, 0xA6, 0x47, 0x5A, 0xBA, 0xBA, + 0x46, 0x46, 0x92, 0xBC, 0x6E, 0x44, 0xBC, 0x92, + 0x44, 0x6E, 0x67, 0xA3, 0x99, 0x5D, 0xA3, 0x67, + 0x5D, 0x99, 0x72, 0xB0, 0x8E, 0x50, 0xB0, 0x72, + 0x50, 0x8E, 0x7F, 0xC3, 0x81, 0x3D, 0xC3, 0x7F, + 0x3D, 0x81, 0xBE, 0xD2, 0x42, 0x2E, 0xD2, 0xBE, + 0x2E, 0x42, 0xA5, 0xD4, 0x5B, 0x2C, 0xD4, 0xA5, + 0x2C, 0x5B, 0xD4, 0xD4, 0x2C, 0x2C, 0x52, 0xAE, + 0xAE, 0x52, 0xAE, 0x52, 0x52, 0xAE, 0x8F, 0xD8, + 0x71, 0x28, 0xD8, 0x8F, 0x28, 0x71, 0x5B, 0xBB, + 0xA5, 0x45, 0xBB, 0x5B, 0x45, 0xA5, 0x69, 0xCB, + 0x97, 0x35, 0xCB, 0x69, 0x35, 0x97, 0xD8, 0xF0, + 0x28, 0x10, 0xF0, 0xD8, 0x10, 0x28, 0xBD, 0xF1, + 0x43, 0x0F, 0xF1, 0xBD, 0x0F, 0x43, 0xF3, 0xF3, + 0x0D, 0x0D, 0xA5, 0xF6, 0x5B, 0x0A, 0xF6, 0xA5, + 0x0A, 0x5B, 0x78, 0xE2, 0x88, 0x1E, 0xE2, 0x78, + 0x1E, 0x88, 0x42, 0xC9, 0xBE, 0x37, 0xC9, 0x42, + 0x37, 0xBE, 0x4F, 0xD8, 0xB1, 0x28, 0xD8, 0x4F, + 0x28, 0xB1, 0x8A, 0xFD, 0x76, 0x03, 0xFD, 0x8A, + 0x03, 0x76, 0xDB, 0xFF, 0x25, 0x01, 0xFF, 0xDB, + 0x01, 0x25, 0xF9, 0xFF, 0x07, 0x01, 0xFF, 0xF9, + 0x01, 0x07, 0xBE, 0xFF, 0x42, 0x01, 0xFF, 0xBE, + 0x01, 0x42, 0x5E, 0xED, 0xA2, 0x13, 0xED, 0x5E, + 0x13, 0xA2, 0xFF, 0xFF, 0x01, 0x01, 0x80, 0x80, }, +}; + +#endif /* AVCODEC_INDEO2DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo3data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo3data.h new file mode 100644 index 00000000..fbe76af6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo3data.h @@ -0,0 +1,362 @@ +/* + * Indeo Video v3 compatible decoder + * Copyright (c) 2009 - 2011 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_INDEO3DATA_H +#define AVCODEC_INDEO3DATA_H + +#include + +#include "config.h" + +/* + * Define compressed VQ tables. + */ + +#define TAB_1_1 \ + PD( 0, 0), E2( 2, 2), E4( -1, 3), E2( 4, 4), E4( 1, 5),\ + E2( -4, 4), E4( -2, 6), E4( 4, 9), E2( 9, 9), E4( 1, 10),\ + E4( -5, 8), E4( 9, 15), E4( -3, 12), E4( 4, 16), E2( 16, 16),\ + E4( 0, 18), E2( -12, 12), E4( -9, 16), E4( 11, 27), E4( 19, 28),\ + E4( -6, 22), E4( 4, 29), E2( 30, 30), E4( -2, 33), E4( -18, 23),\ + E4( -15, 30), E4( 22, 46), E4( 13, 47), E4( 35, 49), E4( -11, 41),\ + E4( 4, 51), E2( 54, 54), E2( -34, 34), E4( -29, 42), E4( -6, 60),\ + E4( 27, 76), E4( 43, 77), E4( -24, 55), E4( 14, 79), E4( 63, 83),\ + E4( -20, 74), E4( 2, 88), E2( 93, 93), E4( -52, 61), E4( 52, 120),\ + E4( -45, 75), E4( 75, 125), E4( 33, 122), E4( -13, 103), E4( -40, 96),\ + E4( -34, 127), E2( -89, 89), E4( -78, 105), E2( 12, 12), E2( 23, 23),\ + E2( 42, 42), E2( 73, 73) + +#define TAB_1_2 \ + PD( 0, 0), E2( 3, 3), E4( -1, 4), E2( 7, 7), E4( 2, 8),\ + E4( -2, 9), E2( -6, 6), E4( 6, 13), E2( 13, 13), E4( 1, 14),\ + E4( -8, 12), E4( 14, 23), E4( -5, 18), E4( 6, 24), E2( 24, 24),\ + E4( -1, 27), E2( -17, 17), E4( -13, 23), E4( 16, 40), E4( 28, 41),\ + E4( -9, 33), E4( 6, 43), E2( 46, 46), E4( -4, 50), E4( -27, 34),\ + E4( -22, 45), E4( 34, 69), E4( 19, 70), E4( 53, 73), E4( -17, 62),\ + E4( 5, 77), E2( 82, 82), E2( -51, 51), E4( -43, 64), E4( -10, 90),\ + E4( 41, 114), E4( 64, 116), E4( -37, 82), E4( 22, 119), E4( 95, 124),\ + E4( -30, 111), E4( -78, 92), E4( -68, 113), E2( 18, 18), E2( 34, 34),\ + E2( 63, 63), E2( 109, 109) + +#define TAB_1_3 \ + PD( 0, 0), E2( 4, 4), E4( -1, 5), E4( 3, 10), E2( 9, 9),\ + E2( -7, 7), E4( -3, 12), E4( 8, 17), E2( 17, 17), E4( 1, 19),\ + E4( -11, 16), E4( -6, 23), E4( 18, 31), E4( 8, 32), E2( 33, 33),\ + E4( -1, 36), E2( -23, 23), E4( -17, 31), E4( 21, 54), E4( 37, 55),\ + E4( -12, 44), E4( 8, 57), E2( 61, 61), E4( -5, 66), E4( -36, 45),\ + E4( -29, 60), E4( 45, 92), E4( 25, 93), E4( 71, 97), E4( -22, 83),\ + E4( 7, 102), E2( 109, 109), E2( -68, 68), E4( -57, 85), E4( -13, 120),\ + E4( -49, 110), E4(-104, 123), E2( 24, 24), E2( 46, 46), E2( 84, 84) + +#define TAB_1_4 \ + PD( 0, 0), E2( 5, 5), E4( -2, 7), E2( 11, 11), E4( 3, 13),\ + E2( -9, 9), E4( -4, 15), E4( 11, 22), E2( 21, 21), E4( 2, 24),\ + E4( -14, 20), E4( 23, 38), E4( -8, 29), E4( 11, 39), E2( 41, 41),\ + E4( -1, 45), E2( -29, 29), E4( -22, 39), E4( 27, 67), E4( 47, 69),\ + E4( -15, 56), E4( 11, 71), E2( 76, 76), E4( -6, 83), E4( -45, 57),\ + E4( -36, 75), E4( 56, 115), E4( 31, 117), E4( 88, 122), E4( -28, 104),\ + E2( -85, 85), E4( -72, 106), E2( 30, 30), E2( 58, 58), E2( 105, 105) + +#define TAB_1_5 \ + PD( 0, 0), E2( 6, 6), E4( -2, 8), E2( 13, 13), E4( 4, 15),\ + E2( -11, 11), E4( -5, 18), E4( 13, 26), E2( 26, 26), E4( 2, 29),\ + E4( -16, 24), E4( 28, 46), E4( -9, 35), E4( 13, 47), E2( 49, 49),\ + E4( -1, 54), E2( -35, 35), E4( -26, 47), E4( 32, 81), E4( 56, 83),\ + E4( -18, 67), E4( 13, 86), E2( 91, 91), E4( -7, 99), E4( -54, 68),\ + E4( -44, 90), E4( -33, 124), E2(-103, 103), E4( -86, 127), E2( 37, 37),\ + E2( 69, 69) + +#define TAB_1_6 \ + PD( 0, 0), E2( 7, 7), E4( -3, 10), E2( 16, 16), E4( 5, 18),\ + E2( -13, 13), E4( -6, 21), E4( 15, 30), E2( 30, 30), E4( 2, 34),\ + E4( -19, 28), E4( 32, 54), E4( -11, 41), E4( 15, 55), E2( 57, 57),\ + E4( -1, 63), E2( -40, 40), E4( -30, 55), E4( 37, 94), E4( 65, 96),\ + E4( -21, 78), E4( 15, 100), E2( 106, 106), E4( -8, 116), E4( -63, 79),\ + E4( -51, 105), E2(-120, 120), E2( 43, 43), E2( 80, 80) + +#define TAB_1_7 \ + PD( 0, 0), E2( 8, 8), E4( -3, 11), E2( 18, 18), E4( 5, 20),\ + E2( -15, 15), E4( -7, 24), E4( 17, 35), E2( 34, 34), E4( 3, 38),\ + E4( -22, 32), E4( 37, 61), E4( -13, 47), E4( 17, 63), E2( 65, 65),\ + E4( -1, 72), E2( -46, 46), E4( -35, 63), E4( 43, 107), E4( 75, 110),\ + E4( -24, 89), E4( 17, 114), E2( 121, 121), E4( -72, 91), E4( -58, 120),\ + E2( 49, 49), E2( 92, 92) + +#define TAB_1_8 \ + PD( 0, 0), E2( 9, 9), E4( -3, 12), E2( 20, 20), E4( 6, 23),\ + E2( -17, 17), E4( -7, 27), E4( 19, 39), E2( 39, 39), E4( 3, 43),\ + E4( -24, 36), E4( 42, 69), E4( -14, 53), E4( 19, 71), E2( 73, 73),\ + E4( -2, 80), E2( -52, 52), E4( -39, 70), E4( 48, 121), E4( 84, 124),\ + E4( -27, 100), E4( -81, 102), E2( 55, 55), E2( 104, 104) + +#define TAB_2_1 \ + PD( 0, 0), E2( 2, 2), E4( 0, 2), E2( 4, 4), E4( 0, 4),\ + E2( -4, 4), E4( -2, 6), E4( 4, 8), E2( 8, 8), E4( 0, 10),\ + E4( -4, 8), E4( 8, 14), E4( -2, 12), E4( 4, 16), E2( 16, 16),\ + E4( 0, 18), E2( -12, 12), E4( -8, 16), E4( 10, 26), E4( 18, 28),\ + E4( -6, 22), E4( 4, 28), E2( 30, 30), E4( -2, 32), E4( -18, 22),\ + E4( -14, 30), E4( 22, 46), E4( 12, 46), E4( 34, 48), E4( -10, 40),\ + E4( 4, 50), E2( 54, 54), E2( -34, 34), E4( -28, 42), E4( -6, 60),\ + E4( 26, 76), E4( 42, 76), E4( -24, 54), E4( 14, 78), E4( 62, 82),\ + E4( -20, 74), E4( 2, 88), E2( 92, 92), E4( -52, 60), E4( 52, 118),\ + E4( -44, 74), E4( 74, 118), E4( 32, 118), E4( -12, 102), E4( -40, 96),\ + E4( -34, 118), E2( -88, 88), E4( -78, 104), E2( 12, 12), E2( 22, 22),\ + E2( 42, 42), E2( 72, 72) + +#define TAB_2_2 \ + PD( 0, 0), E2( 3, 3), E4( 0, 3), E2( 6, 6), E4( 3, 9),\ + E4( -3, 9), E2( -6, 6), E4( 6, 12), E2( 12, 12), E4( 0, 15),\ + E4( -9, 12), E4( 15, 24), E4( -6, 18), E4( 6, 24), E2( 24, 24),\ + E4( 0, 27), E2( -18, 18), E4( -12, 24), E4( 15, 39), E4( 27, 42),\ + E4( -9, 33), E4( 6, 42), E2( 45, 45), E4( -3, 51), E4( -27, 33),\ + E4( -21, 45), E4( 33, 69), E4( 18, 69), E4( 54, 72), E4( -18, 63),\ + E4( 6, 78), E2( 81, 81), E2( -51, 51), E4( -42, 63), E4( -9, 90),\ + E4( 42, 114), E4( 63, 117), E4( -36, 81), E4( 21, 120), E4( 96, 123),\ + E4( -30, 111), E4( -78, 93), E4( -69, 114), E2( 18, 18), E2( 33, 33),\ + E2( 63, 63), E2( 108, 108) + +#define TAB_2_3 \ + PD( 0, 0), E2( 4, 4), E4( 0, 4), E4( 4, 8), E2( 8, 8),\ + E2( -8, 8), E4( -4, 12), E4( 8, 16), E2( 16, 16), E4( 0, 20),\ + E4( -12, 16), E4( -4, 24), E4( 16, 32), E4( 8, 32), E2( 32, 32),\ + E4( 0, 36), E2( -24, 24), E4( -16, 32), E4( 20, 52), E4( 36, 56),\ + E4( -12, 44), E4( 8, 56), E2( 60, 60), E4( -4, 64), E4( -36, 44),\ + E4( -28, 60), E4( 44, 92), E4( 24, 92), E4( 72, 96), E4( -20, 84),\ + E4( 8, 100), E2( 108, 108), E2( -68, 68), E4( -56, 84), E4( -12, 120),\ + E4( -48, 108), E4(-104, 124), E2( 24, 24), E2( 44, 44), E2( 84, 84) + +#define TAB_2_4 \ + PD( 0, 0), E2( 5, 5), E4( 0, 5), E2( 10, 10), E4( 5, 15),\ + E2( -10, 10), E4( -5, 15), E4( 10, 20), E2( 20, 20), E4( 0, 25),\ + E4( -15, 20), E4( 25, 40), E4( -10, 30), E4( 10, 40), E2( 40, 40),\ + E4( 0, 45), E2( -30, 30), E4( -20, 40), E4( 25, 65), E4( 45, 70),\ + E4( -15, 55), E4( 10, 70), E2( 75, 75), E4( -5, 85), E4( -45, 55),\ + E4( -35, 75), E4( 55, 115), E4( 30, 115), E4( 90, 120), E4( -30, 105),\ + E2( -85, 85), E4( -70, 105), E2( 30, 30), E2( 60, 60), E2( 105, 105) + +#define TAB_2_5 \ + PD( 0, 0), E2( 6, 6), E4( 0, 6), E2( 12, 12), E4( 6, 12),\ + E2( -12, 12), E4( -6, 18), E4( 12, 24), E2( 24, 24), E4( 0, 30),\ + E4( -18, 24), E4( 30, 48), E4( -6, 36), E4( 12, 48), E2( 48, 48),\ + E4( 0, 54), E2( -36, 36), E4( -24, 48), E4( 30, 78), E4( 54, 84),\ + E4( -18, 66), E4( 12, 84), E2( 90, 90), E4( -6, 96), E4( -54, 66),\ + E4( -42, 90), E4( -30, 126), E2(-102, 102), E4( -84, 126), E2( 36, 36),\ + E2( 66, 66) + +#define TAB_2_6 \ + PD( 0, 0), E2( 7, 7), E4( 0, 7), E2( 14, 14), E4( 7, 21),\ + E2( -14, 14), E4( -7, 21), E4( 14, 28), E2( 28, 28), E4( 0, 35),\ + E4( -21, 28), E4( 35, 56), E4( -14, 42), E4( 14, 56), E2( 56, 56),\ + E4( 0, 63), E2( -42, 42), E4( -28, 56), E4( 35, 91), E4( 63, 98),\ + E4( -21, 77), E4( 14, 98), E2( 105, 105), E4( -7, 119), E4( -63, 77),\ + E4( -49, 105), E2(-119, 119), E2( 42, 42), E2( 77, 77) + +#define TAB_2_7 \ + PD( 0, 0), E2( 8, 8), E4( 0, 8), E2( 16, 16), E4( 8, 16),\ + E2( -16, 16), E4( -8, 24), E4( 16, 32), E2( 32, 32), E4( 0, 40),\ + E4( -24, 32), E4( 40, 64), E4( -16, 48), E4( 16, 64), E2( 64, 64),\ + E4( 0, 72), E2( -48, 48), E4( -32, 64), E4( 40, 104), E4( 72, 112),\ + E4( -24, 88), E4( 16, 112), E2( 120, 120), E4( -72, 88), E4( -56, 120),\ + E2( 48, 48), E2( 88, 88) + +#define TAB_2_8 \ + PD( 0, 0), E2( 9, 9), E4( 0, 9), E2( 18, 18), E4( 9, 27),\ + E2( -18, 18), E4( -9, 27), E4( 18, 36), E2( 36, 36), E4( 0, 45),\ + E4( -27, 36), E4( 45, 72), E4( -18, 54), E4( 18, 72), E2( 72, 72),\ + E4( 0, 81), E2( -54, 54), E4( -36, 72), E4( 45, 117), E4( 81, 126),\ + E4( -27, 99), E4( -81, 99), E2( 54, 54), E2( 108, 108) + +#define TAB_3_1 \ + PD( 0, 0), E2( 2, 2), E4( 0, 3), E2( 6, 6), E4( 0, 7),\ + E2( -5, 5), E2( 5, -5), E4( 6, 11), E4( 0, 8), E2( 11, 11),\ + E4( 0, 12), E4( 12, 17), E2( 17, 17), E4( 6, 18), E4( -8, 11),\ + E4( 0, 15), E4( 0, 20), E4( 18, 25), E4( 11, 25), E2( 25, 25),\ + E2( -14, 14), E2( 14, -14), E4( 0, 26), E4( -11, 18), E4( -7, 22),\ + E4( 26, 34), E4( 18, 34), E2( 34, 34), E4( 11, 35), E4( 0, 29),\ + E4( -19, 22), E4( -15, 26), E4( 0, 37), E4( 27, 44), E4( 36, 44),\ + E4( 18, 44), E4( -10, 33), E2( 45, 45) + +#define TAB_3_2 \ + PD( 0, 0), E4( 0, 2), E2( 2, 2), E2( 6, 6), E4( 0, 6),\ + E2( -4, 4), E2( 10, -6), E2( 0, -12), PD( -6, -12), E2( 6, -12),\ + PD( 6, 12), E2( -14, 0), E2( 12, 12), E2( 0, -18), E2( 14, -12),\ + PD( -18, -6), E2( 18, -6), PD( 18, 6), PD( -10, -18), E2( 10, -18),\ + PD( 10, 18), E2( -22, 0), E2( 0, -24), PD( -22, -12), E2( 22, -12),\ + PD( 22, 12), PD( -8, -24), E2( 8, -24), PD( 8, 24), PD( -26, -6),\ + E2( 26, -6), PD( 26, 6), E2( -28, 0), E2( 20, 20), E2( -14, -26),\ + E2( -30, -12), E2( -10, -32), E2( -18, -32), E2( -26, -26), E2( -34, -20),\ + E2( -38, -12), E2( -32, -32), PD( 32, 32), PD( -22, -40), E2( -34, -34) + +#define TAB_3_3 \ + PD( 0, 0), E4( 0, 2), E2( 4, 4), E2( 10, 10), E4( 0, 10),\ + E2( -6, 6), E2( 14, -8), E2( -18, 0), E2( 10, -16), E2( 0, -24),\ + PD( -24, -8), E2( 24, -8), PD( 24, 8), E2( 18, 18), E2( 20, -16),\ + PD( -14, -26), E2( 14, -26), PD( 14, 26), E2( -30, 0), E2( 0, -34),\ + PD( -34, -8), E2( 34, -8), PD( 34, 8), PD( -30, -18), E2( 30, -18),\ + PD( 30, 18), PD( -10, -34), E2( 10, -34), PD( 10, 34), E2( -20, -34),\ + E2( -40, 0), E2( 30, 30), E2( -40, -18), E2( 0, -44), E2( -16, -44),\ + PD( -36, -36), E2( -36, -36), E2( -26, -44), E2( -46, -26), E2( -52, -18),\ + PD( -20, -54), E2( -44, -44), PD( -32, -54), PD( -46, -46), E2( -46, -46) + +#define TAB_3_4 \ + PD( 0, 0), E4( 0, 4), E2( 4, 4), E2( 12, 12), E4( 0, 12),\ + E2( -8, 8), E2( 8, -16), E2( 0, -24), PD( -24, -8), E2( 24, -8),\ + PD( 24, 8), E2( 20, -16), E2( -28, 0), PD( -16, -24), E2( 16, -24),\ + PD( 16, 24), E2( 0, -32), PD( -28, -16), E2( 28, -16), PD( 28, 16),\ + PD( -8, -32), PD( 8, -32), PD( -32, -8), E2( 32, -8), PD( 32, 8),\ + PD( -8, 32), PD( 8, 32), E2( 24, 24), E2( 24, -24), E2( -20, -32),\ + E2( -40, 0), E2( -40, -16), PD( 0, -44), PD( 0, -44), E2( -44, 0),\ + PD( 0, 44), PD( 0, 44), E2( -32, -32), E2( -16, -44), PD( -24, -44),\ + E2( -44, -24), PD( 24, 44), E2( -48, -16), PD( -36, -36), E2( -36, -36),\ + PD( 36, 36), PD( -20, -52), E2( 40, 40), PD( -32, -52) + +#define TAB_3_5 \ + PD( 0, 0), E2( 2, 2), E2( 6, 6), E2( 12, 12), E2( 20, 20),\ + E2( 32, 32), E2( 46, 46) + + +/** + * Pack two delta values (a,b) into one 16-bit word + * according with endianness of the host machine. + */ +#if HAVE_BIGENDIAN +#define PD(a,b) (((a) * (1 << 8)) + (b)) +#else +#define PD(a,b) (((b) * (1 << 8)) + (a)) +#endif + +/** + * Expand a pair of delta values (a,b) + * into two/four delta entries. + */ +#define E2(a, b) PD(a, b), PD(-(a), -(b)) +#define E4(a, b) PD(a, b), PD(-(a), -(b)), PD(b, a), PD(-(b), -(a)) + +/* + * VQ tables for 4x4 block modes. + * Let the compiler decompress and build the tables for us. + */ +static const int16_t delta_tab_1_1[195] = { TAB_1_1 }; +static const int16_t delta_tab_1_2[159] = { TAB_1_2 }; +static const int16_t delta_tab_1_3[133] = { TAB_1_3 }; +static const int16_t delta_tab_1_4[115] = { TAB_1_4 }; +static const int16_t delta_tab_1_5[101] = { TAB_1_5 }; +static const int16_t delta_tab_1_6[93] = { TAB_1_6 }; +static const int16_t delta_tab_1_7[87] = { TAB_1_7 }; +static const int16_t delta_tab_1_8[77] = { TAB_1_8 }; + +static const int16_t delta_tab_2_1[195] = { TAB_2_1 }; +static const int16_t delta_tab_2_2[159] = { TAB_2_2 }; +static const int16_t delta_tab_2_3[133] = { TAB_2_3 }; +static const int16_t delta_tab_2_4[115] = { TAB_2_4 }; +static const int16_t delta_tab_2_5[101] = { TAB_2_5 }; +static const int16_t delta_tab_2_6[93] = { TAB_2_6 }; +static const int16_t delta_tab_2_7[87] = { TAB_2_7 }; +static const int16_t delta_tab_2_8[77] = { TAB_2_8 }; + +static const int16_t delta_tab_3_1[128] = { TAB_3_1 }; +static const int16_t delta_tab_3_2[79] = { TAB_3_2 }; +static const int16_t delta_tab_3_3[79] = { TAB_3_3 }; +static const int16_t delta_tab_3_4[79] = { TAB_3_4 }; +static const int16_t delta_tab_3_5[79] = { TAB_3_5 }; + +#undef PD + +/** + * Pack four delta values (a,a,b,b) into one 32-bit word + * according with endianness of the host machine. + */ +#if HAVE_BIGENDIAN +#define PD(a,b) (((a) * (1 << 24)) + ((a) * (1 << 16)) + ((b) * (1 << 8)) + (b)) +#else +#define PD(a,b) (((b) * (1 << 24)) + ((b) * (1 << 16)) + ((a) * (1 << 8)) + (a)) +#endif + +/* + * VQ tables for 8x8 block modes. + * Those are based on the same delta tables by using + * each value twice: ABCD --> AABBCCDD. + */ +static const int32_t delta_tab_1_1_m10[195] = { TAB_1_1 }; +static const int32_t delta_tab_1_2_m10[159] = { TAB_1_2 }; +static const int32_t delta_tab_1_3_m10[133] = { TAB_1_3 }; +static const int32_t delta_tab_1_4_m10[115] = { TAB_1_4 }; +static const int32_t delta_tab_1_5_m10[101] = { TAB_1_5 }; +static const int32_t delta_tab_1_6_m10[93] = { TAB_1_6 }; +static const int32_t delta_tab_1_7_m10[87] = { TAB_1_7 }; +static const int32_t delta_tab_1_8_m10[77] = { TAB_1_8 }; + +static const int32_t delta_tab_2_1_m10[195] = { TAB_2_1 }; +static const int32_t delta_tab_2_2_m10[159] = { TAB_2_2 }; +static const int32_t delta_tab_2_3_m10[133] = { TAB_2_3 }; +static const int32_t delta_tab_2_4_m10[115] = { TAB_2_4 }; +static const int32_t delta_tab_2_5_m10[101] = { TAB_2_5 }; +static const int32_t delta_tab_2_6_m10[93] = { TAB_2_6 }; +static const int32_t delta_tab_2_7_m10[87] = { TAB_2_7 }; +static const int32_t delta_tab_2_8_m10[77] = { TAB_2_8 }; + +static const int32_t delta_tab_3_1_m10[128] = { TAB_3_1 }; +static const int32_t delta_tab_3_2_m10[79] = { TAB_3_2 }; +static const int32_t delta_tab_3_3_m10[79] = { TAB_3_3 }; +static const int32_t delta_tab_3_4_m10[79] = { TAB_3_4 }; +static const int32_t delta_tab_3_5_m10[79] = { TAB_3_5 }; + + +typedef struct vqEntry { + const int16_t *deltas; ///< delta tables for 4x4 block modes + const int32_t *deltas_m10; ///< delta tables for 8x8 block modes + uint8_t num_dyads; ///< number of two-pixel deltas + uint8_t quad_exp; ///< log2 of four-pixel deltas +} vqEntry; + +static const vqEntry vq_tab[24] = { + /* set 1 */ + { delta_tab_1_1, delta_tab_1_1_m10, 195, 7 }, + { delta_tab_1_2, delta_tab_1_2_m10, 159, 9 }, + { delta_tab_1_3, delta_tab_1_3_m10, 133, 10 }, + { delta_tab_1_4, delta_tab_1_4_m10, 115, 11 }, + { delta_tab_1_5, delta_tab_1_5_m10, 101, 12 }, + { delta_tab_1_6, delta_tab_1_6_m10, 93, 12 }, + { delta_tab_1_7, delta_tab_1_7_m10, 87, 12 }, + { delta_tab_1_8, delta_tab_1_8_m10, 77, 13 }, + + /* set 2 */ + { delta_tab_2_1, delta_tab_2_1_m10, 195, 7 }, + { delta_tab_2_2, delta_tab_2_2_m10, 159, 9 }, + { delta_tab_2_3, delta_tab_2_3_m10, 133, 10 }, + { delta_tab_2_4, delta_tab_2_4_m10, 115, 11 }, + { delta_tab_2_5, delta_tab_2_5_m10, 101, 12 }, + { delta_tab_2_6, delta_tab_2_6_m10, 93, 12 }, + { delta_tab_2_7, delta_tab_2_7_m10, 87, 12 }, + { delta_tab_2_8, delta_tab_2_8_m10, 77, 13 }, + + /* set 3 */ + { delta_tab_3_1, delta_tab_3_1_m10, 128, 11 }, + { delta_tab_3_2, delta_tab_3_2_m10, 79, 13 }, + { delta_tab_3_3, delta_tab_3_3_m10, 79, 13 }, + { delta_tab_3_4, delta_tab_3_4_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 }, + { delta_tab_3_5, delta_tab_3_5_m10, 79, 13 } +}; + +#endif /* AVCODEC_INDEO3DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo4data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo4data.h new file mode 100644 index 00000000..cc497c23 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo4data.h @@ -0,0 +1,350 @@ +/* + * Indeo Video Interactive 4 compatible decoder + * Copyright (c) 2009-2010 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This file contains data needed for the Indeo 4 decoder. + */ + +#ifndef AVCODEC_INDEO4DATA_H +#define AVCODEC_INDEO4DATA_H + +#include + +#include "ivi.h" + +/** + * standard picture dimensions + */ +static const uint16_t ivi4_common_pic_sizes[14] = { + 640, 480, 320, 240, 160, 120, 704, 480, 352, 240, 352, 288, 176, 144 +}; + +/** + * Indeo 4 8x8 scan (zigzag) patterns + */ +static const uint8_t ivi4_alternate_scan_8x8[64] = { + 0, 8, 1, 9, 16, 24, 2, 3, 17, 25, 10, 11, 32, 40, 48, 56, + 4, 5, 6, 7, 33, 41, 49, 57, 18, 19, 26, 27, 12, 13, 14, 15, + 34, 35, 43, 42, 50, 51, 59, 58, 20, 21, 22, 23, 31, 30, 29, 28, + 36, 37, 38, 39, 47, 46, 45, 44, 52, 53, 54, 55, 63, 62, 61, 60 +}; + +static const uint8_t ivi4_alternate_scan_4x4[16] = { + 0, 1, 4, 5, 8, 12, 2, 3, 9, 13, 6, 7, 10, 11, 14, 15 +}; + +static const uint8_t ivi4_vertical_scan_4x4[16] = { + 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15 +}; + +static const uint8_t ivi4_horizontal_scan_4x4[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static const uint8_t * const scan_index_to_tab[15] = { + // for 8x8 transforms + ff_zigzag_direct, + ivi4_alternate_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_vertical_scan_8x8, + ff_zigzag_direct, + + // for 4x4 transforms + ff_ivi_direct_scan_4x4, + ivi4_alternate_scan_4x4, + ivi4_vertical_scan_4x4, + ivi4_horizontal_scan_4x4, + ff_ivi_direct_scan_4x4, + + // TODO: check if those are needed + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8, + ff_ivi_horizontal_scan_8x8 +}; + +/** + * Indeo 4 dequant tables + */ +static const uint16_t ivi4_quant_8x8_intra[9][64] = { + { + 43, 342, 385, 470, 555, 555, 598, 726, + 342, 342, 470, 513, 555, 598, 726, 769, + 385, 470, 555, 555, 598, 726, 726, 811, + 470, 470, 555, 555, 598, 726, 769, 854, + 470, 555, 555, 598, 683, 726, 854, 1025, + 555, 555, 598, 683, 726, 854, 1025, 1153, + 555, 555, 598, 726, 811, 982, 1195, 1451, + 555, 598, 726, 811, 982, 1195, 1451, 1793 + }, + { + 86, 1195, 2390, 2390, 4865, 4865, 4865, 4865, + 1195, 1195, 2390, 2390, 4865, 4865, 4865, 4865, + 2390, 2390, 4865, 4865, 6827, 6827, 6827, 6827, + 2390, 2390, 4865, 4865, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827, + 4865, 4865, 6827, 6827, 6827, 6827, 6827, 6827 + }, + { + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835, + 235, 1067, 1195, 1323, 1451, 1579, 1707, 1835 + }, + { + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414, + 1707, 1707, 3414, 3414, 3414, 3414, 3414, 3414 + }, + { + 897, 897, 897, 897, 897, 897, 897, 897, + 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, + 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1409, 1409, 1409, 1409, 1409, 1409, 1409, 1409, + 1579, 1579, 1579, 1579, 1579, 1579, 1579, 1579, + 1750, 1750, 1750, 1750, 1750, 1750, 1750, 1750, + 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, + 2091, 2091, 2091, 2091, 2091, 2091, 2091, 2091 + }, + { + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414 + }, + { + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390, + 2390, 2390, 2390, 2390, 2390, 2390, 2390, 2390 + }, + { + 22, 171, 214, 257, 257, 299, 299, 342, + 171, 171, 257, 257, 299, 299, 342, 385, + 214, 257, 257, 299, 299, 342, 342, 385, + 257, 257, 257, 299, 299, 342, 385, 427, + 257, 257, 299, 299, 342, 385, 427, 513, + 257, 299, 299, 342, 385, 427, 513, 598, + 299, 299, 299, 385, 385, 470, 598, 726, + 299, 299, 385, 385, 470, 598, 726, 897 + }, + { + 86, 598, 1195, 1195, 2390, 2390, 2390, 2390, + 598, 598, 1195, 1195, 2390, 2390, 2390, 2390, + 1195, 1195, 2390, 2390, 3414, 3414, 3414, 3414, + 1195, 1195, 2390, 2390, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414, + 2390, 2390, 3414, 3414, 3414, 3414, 3414, 3414 + } +}; + +static const uint16_t ivi4_quant_8x8_inter[9][64] = { + { + 427, 427, 470, 427, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 427, 427, 470, 470, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 427, 427, 470, 427, 427, 427, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470, + 470, 470, 470, 470, 470, 470, 470, 470 + }, + { + 1707, 1707, 2433, 2433, 3414, 3414, 3414, 3414, + 1707, 1707, 2433, 2433, 3414, 3414, 3414, 3414, + 2433, 2433, 3414, 3414, 4822, 4822, 4822, 4822, + 2433, 2433, 3414, 3414, 4822, 4822, 4822, 4822, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414, + 3414, 3414, 4822, 4822, 3414, 3414, 3414, 3414 + }, + { + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281, + 1195, 1195, 1281, 1238, 1195, 1195, 1281, 1281 + }, + { + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433, + 2433, 2433, 3414, 3414, 2433, 2433, 2433, 2433 + }, + { + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, + 1238, 1238, 1238, 1238, 1238, 1238, 1238, 1238, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, + 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281 + }, + { + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 3414, 3414, 3414, 3414, 3414, 3414, 3414, 3414, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433, + 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2433 + }, + { + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707, + 1707, 1707, 1707, 1707, 1707, 1707, 1707, 1707 + }, + { + 86, 171, 171, 214, 214, 214, 214, 257, + 171, 171, 214, 214, 214, 214, 257, 257, + 171, 214, 214, 214, 214, 257, 257, 257, + 214, 214, 214, 214, 257, 257, 257, 299, + 214, 214, 214, 257, 257, 257, 299, 299, + 214, 214, 257, 257, 257, 299, 299, 299, + 214, 257, 257, 257, 299, 299, 299, 342, + 257, 257, 257, 299, 299, 299, 342, 342 + }, + { + 854, 854, 1195, 1195, 1707, 1707, 1707, 1707, + 854, 854, 1195, 1195, 1707, 1707, 1707, 1707, + 1195, 1195, 1707, 1707, 2390, 2390, 2390, 2390, + 1195, 1195, 1707, 1707, 2390, 2390, 2390, 2390, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707, + 1707, 1707, 2390, 2390, 1707, 1707, 1707, 1707 + } +}; + +static const uint16_t ivi4_quant_4x4_intra[5][16] = { + { + 22, 214, 257, 299, + 214, 257, 299, 342, + 257, 299, 342, 427, + 299, 342, 427, 513 + }, + { + 129, 1025, 1451, 1451, + 1025, 1025, 1451, 1451, + 1451, 1451, 2049, 2049, + 1451, 1451, 2049, 2049 + }, + { + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 171, 171, 171, 171, + 171, 171, 171, 171, + 171, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43 + } +}; + +static const uint16_t ivi4_quant_4x4_inter[5][16] = { + { + 107, 214, 257, 299, + 214, 257, 299, 299, + 257, 299, 299, 342, + 299, 299, 342, 342 + }, + { + 513, 1025, 1238, 1238, + 1025, 1025, 1238, 1238, + 1238, 1238, 1451, 1451, + 1238, 1238, 1451, 1451 + }, + { + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171, + 43, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 171, 171, 171, 171, + 171, 171, 171, 171, + 171, 171, 171, 171 + }, + { + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43, + 43, 43, 43, 43 + } +}; + +/** + * Table for mapping quant matrix index from the bitstream + * into internal quant table number. + */ +static const uint8_t quant_index_to_tab[22] = { + 0, 1, 0, 2, 1, 3, 0, 4, 1, 5, 0, 1, 6, 7, 8, // for 8x8 quant matrixes + 0, 1, 2, 2, 3, 3, 4 // for 4x4 quant matrixes +}; + +#endif /* AVCODEC_INDEO4DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo5data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo5data.h new file mode 100644 index 00000000..a6217d0b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/indeo5data.h @@ -0,0 +1,162 @@ +/* + * Indeo Video Interactive 5 compatible decoder + * Copyright (c) 2009 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This file contains data needed for the Indeo5 decoder. + */ + +#ifndef AVCODEC_INDEO5DATA_H +#define AVCODEC_INDEO5DATA_H + +#include + +/** + * standard picture dimensions (width, height divided by 4) + */ +static const uint8_t ivi5_common_pic_sizes[30] = { + 160, 120, 80, 60, 40, 30, 176, 120, 88, 60, 88, 72, 44, 36, 60, 45, 160, 60, + 176, 60, 20, 15, 22, 18, 0, 0, 0, 0, 0, 0 +}; + + +/** + * Indeo5 dequantization matrixes consist of two tables: base table + * and scale table. The base table defines the dequantization matrix + * itself and the scale table tells how this matrix should be scaled + * for a particular quant level (0...24). + * + * ivi5_base_quant_bbb_ttt - base tables for block size 'bbb' of type 'ttt' + * ivi5_scale_quant_bbb_ttt - scale tables for block size 'bbb' of type 'ttt' + */ +static const uint16_t ivi5_base_quant_8x8_inter[5][64] = { + {0x26, 0x3a, 0x3e, 0x46, 0x4a, 0x4e, 0x52, 0x5a, 0x3a, 0x3e, 0x42, 0x46, 0x4a, 0x4e, 0x56, 0x5e, + 0x3e, 0x42, 0x46, 0x48, 0x4c, 0x52, 0x5a, 0x62, 0x46, 0x46, 0x48, 0x4a, 0x4e, 0x56, 0x5e, 0x66, + 0x4a, 0x4a, 0x4c, 0x4e, 0x52, 0x5a, 0x62, 0x6a, 0x4e, 0x4e, 0x52, 0x56, 0x5a, 0x5e, 0x66, 0x6e, + 0x52, 0x56, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x72, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x6e, 0x72, 0x76, + }, + {0x26, 0x3a, 0x3e, 0x46, 0x4a, 0x4e, 0x52, 0x5a, 0x3a, 0x3e, 0x42, 0x46, 0x4a, 0x4e, 0x56, 0x5e, + 0x3e, 0x42, 0x46, 0x48, 0x4c, 0x52, 0x5a, 0x62, 0x46, 0x46, 0x48, 0x4a, 0x4e, 0x56, 0x5e, 0x66, + 0x4a, 0x4a, 0x4c, 0x4e, 0x52, 0x5a, 0x62, 0x6a, 0x4e, 0x4e, 0x52, 0x56, 0x5a, 0x5e, 0x66, 0x6e, + 0x52, 0x56, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x72, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x6e, 0x72, 0x76, + }, + {0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + }, + {0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, + 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, + 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, + }, + {0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + } +}; + +static const uint16_t ivi5_base_quant_8x8_intra[5][64] = { + {0x1a, 0x2e, 0x36, 0x42, 0x46, 0x4a, 0x4e, 0x5a, 0x2e, 0x32, 0x3e, 0x42, 0x46, 0x4e, 0x56, 0x6a, + 0x36, 0x3e, 0x3e, 0x44, 0x4a, 0x54, 0x66, 0x72, 0x42, 0x42, 0x44, 0x4a, 0x52, 0x62, 0x6c, 0x7a, + 0x46, 0x46, 0x4a, 0x52, 0x5e, 0x66, 0x72, 0x8e, 0x4a, 0x4e, 0x54, 0x62, 0x66, 0x6e, 0x86, 0xa6, + 0x4e, 0x56, 0x66, 0x6c, 0x72, 0x86, 0x9a, 0xca, 0x5a, 0x6a, 0x72, 0x7a, 0x8e, 0xa6, 0xca, 0xfe, + }, + {0x26, 0x3a, 0x3e, 0x46, 0x4a, 0x4e, 0x52, 0x5a, 0x3a, 0x3e, 0x42, 0x46, 0x4a, 0x4e, 0x56, 0x5e, + 0x3e, 0x42, 0x46, 0x48, 0x4c, 0x52, 0x5a, 0x62, 0x46, 0x46, 0x48, 0x4a, 0x4e, 0x56, 0x5e, 0x66, + 0x4a, 0x4a, 0x4c, 0x4e, 0x52, 0x5a, 0x62, 0x6a, 0x4e, 0x4e, 0x52, 0x56, 0x5a, 0x5e, 0x66, 0x6e, + 0x52, 0x56, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x72, 0x5a, 0x5e, 0x62, 0x66, 0x6a, 0x6e, 0x72, 0x76, + }, + {0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, 0x4e, 0xaa, 0xf2, 0xd4, 0xde, 0xc2, 0xd6, 0xc2, + }, + {0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xf2, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, 0xd4, + 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xde, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, + 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xd6, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, 0xc2, + }, + {0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, 0x5e, + } +}; + +static const uint16_t ivi5_base_quant_4x4_inter[16] = { + 0x1e, 0x3e, 0x4a, 0x52, 0x3e, 0x4a, 0x52, 0x56, 0x4a, 0x52, 0x56, 0x5e, 0x52, 0x56, 0x5e, 0x66 +}; + +static const uint16_t ivi5_base_quant_4x4_intra[16] = { + 0x1e, 0x3e, 0x4a, 0x52, 0x3e, 0x4a, 0x52, 0x5e, 0x4a, 0x52, 0x5e, 0x7a, 0x52, 0x5e, 0x7a, 0x92 +}; + + +static const uint8_t ivi5_scale_quant_8x8_inter[5][24] = { + {0x0b, 0x11, 0x13, 0x14, 0x15, 0x16, 0x18, 0x1a, 0x1b, 0x1d, 0x20, 0x22, + 0x23, 0x25, 0x28, 0x2a, 0x2e, 0x32, 0x35, 0x39, 0x3d, 0x41, 0x44, 0x4a, + }, + {0x07, 0x14, 0x16, 0x18, 0x1b, 0x1e, 0x22, 0x25, 0x29, 0x2d, 0x31, 0x35, + 0x3a, 0x3f, 0x44, 0x4a, 0x50, 0x56, 0x5c, 0x63, 0x6a, 0x71, 0x78, 0x7e, + }, + {0x15, 0x25, 0x28, 0x2d, 0x30, 0x34, 0x3a, 0x3d, 0x42, 0x48, 0x4c, 0x51, + 0x56, 0x5b, 0x60, 0x65, 0x6b, 0x70, 0x76, 0x7c, 0x82, 0x88, 0x8f, 0x97, + }, + {0x13, 0x1f, 0x20, 0x22, 0x25, 0x28, 0x2b, 0x2d, 0x30, 0x33, 0x36, 0x39, + 0x3c, 0x3f, 0x42, 0x45, 0x48, 0x4b, 0x4e, 0x52, 0x56, 0x5a, 0x5e, 0x62, + }, + {0x3c, 0x52, 0x58, 0x5d, 0x63, 0x68, 0x68, 0x6d, 0x73, 0x78, 0x7c, 0x80, + 0x84, 0x89, 0x8e, 0x93, 0x98, 0x9d, 0xa3, 0xa9, 0xad, 0xb1, 0xb5, 0xba, + }, +}; + +static const uint8_t ivi5_scale_quant_8x8_intra[5][24] = { + {0x0b, 0x0e, 0x10, 0x12, 0x14, 0x16, 0x17, 0x18, 0x1a, 0x1c, 0x1e, 0x20, + 0x22, 0x24, 0x27, 0x28, 0x2a, 0x2d, 0x2f, 0x31, 0x34, 0x37, 0x39, 0x3c, + }, + {0x01, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1b, 0x1e, 0x22, 0x25, 0x28, 0x2c, + 0x30, 0x34, 0x38, 0x3d, 0x42, 0x47, 0x4c, 0x52, 0x58, 0x5e, 0x65, 0x6c, + }, + {0x13, 0x22, 0x27, 0x2a, 0x2d, 0x33, 0x36, 0x3c, 0x41, 0x45, 0x49, 0x4e, + 0x53, 0x58, 0x5d, 0x63, 0x69, 0x6f, 0x75, 0x7c, 0x82, 0x88, 0x8e, 0x95, + }, + {0x13, 0x1f, 0x21, 0x24, 0x27, 0x29, 0x2d, 0x2f, 0x34, 0x37, 0x3a, 0x3d, + 0x40, 0x44, 0x48, 0x4c, 0x4f, 0x52, 0x56, 0x5a, 0x5e, 0x62, 0x66, 0x6b, + }, + {0x31, 0x42, 0x47, 0x47, 0x4d, 0x52, 0x58, 0x58, 0x5d, 0x63, 0x67, 0x6b, + 0x6f, 0x73, 0x78, 0x7c, 0x80, 0x84, 0x89, 0x8e, 0x93, 0x98, 0x9d, 0xa4, + } +}; + +static const uint8_t ivi5_scale_quant_4x4_inter[24] = { + 0x0b, 0x0d, 0x0d, 0x0e, 0x11, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, +}; + +static const uint8_t ivi5_scale_quant_4x4_intra[24] = { + 0x01, 0x0b, 0x0b, 0x0d, 0x0d, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 +}; + + +#endif /* AVCODEC_INDEO5DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/internal.h new file mode 100644 index 00000000..0a72a0e3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/internal.h @@ -0,0 +1,402 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * common internal api header. + */ + +#ifndef AVCODEC_INTERNAL_H +#define AVCODEC_INTERNAL_H + +#include + +#include "libavutil/buffer.h" +#include "libavutil/channel_layout.h" +#include "libavutil/mathematics.h" +#include "libavutil/pixfmt.h" +#include "avcodec.h" +#include "config.h" + +/** + * The codec does not modify any global variables in the init function, + * allowing to call the init function without locking any global mutexes. + */ +#define FF_CODEC_CAP_INIT_THREADSAFE (1 << 0) +/** + * The codec allows calling the close function for deallocation even if + * the init function returned a failure. Without this capability flag, a + * codec does such cleanup internally when returning failures from the + * init function and does not expect the close function to be called at + * all. + */ +#define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) +/** + * Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set + * AVFrame.pkt_dts manually. If the flag is set, decode.c won't overwrite + * this field. If it's unset, decode.c tries to guess the pkt_dts field + * from the input AVPacket. + */ +#define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2) +/** + * The decoder extracts and fills its parameters even if the frame is + * skipped due to the skip_frame setting. + */ +#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM (1 << 3) +/** + * The decoder sets the cropping fields in the output frames manually. + * If this cap is set, the generic code will initialize output frame + * dimensions to coded rather than display values. + */ +#define FF_CODEC_CAP_EXPORTS_CROPPING (1 << 4) +/** + * Codec initializes slice-based threading with a main function + */ +#define FF_CODEC_CAP_SLICE_THREAD_HAS_MF (1 << 5) +/* + * The codec supports frame threading and has inter-frame dependencies, so it + * uses ff_thread_report/await_progress(). + */ +#define FF_CODEC_CAP_ALLOCATE_PROGRESS (1 << 6) + +/** + * AVCodec.codec_tags termination value + */ +#define FF_CODEC_TAGS_END -1 + + +#ifdef TRACE +# define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__) +#else +# define ff_tlog(ctx, ...) do { } while(0) +#endif + + +#define FF_DEFAULT_QUANT_BIAS 999999 + +#define FF_QSCALE_TYPE_MPEG1 0 +#define FF_QSCALE_TYPE_MPEG2 1 +#define FF_QSCALE_TYPE_H264 2 +#define FF_QSCALE_TYPE_VP56 3 + +#define FF_SANE_NB_CHANNELS 512U + +#define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1) + +#if HAVE_SIMD_ALIGN_64 +# define STRIDE_ALIGN 64 /* AVX-512 */ +#elif HAVE_SIMD_ALIGN_32 +# define STRIDE_ALIGN 32 +#elif HAVE_SIMD_ALIGN_16 +# define STRIDE_ALIGN 16 +#else +# define STRIDE_ALIGN 8 +#endif + +typedef struct DecodeSimpleContext { + AVPacket *in_pkt; + AVFrame *out_frame; +} DecodeSimpleContext; + +typedef struct AVCodecInternal { + /** + * Whether the parent AVCodecContext is a copy of the context which had + * init() called on it. + * This is used by multithreading - shared tables and picture pointers + * should be freed from the original context only. + */ + int is_copy; + + /** + * An audio frame with less than required samples has been submitted and + * padded with silence. Reject all subsequent frames. + */ + int last_audio_frame; + + AVFrame *to_free; + + AVBufferRef *pool; + + void *thread_ctx; + + DecodeSimpleContext ds; + AVBSFContext *bsf; + + /** + * Properties (timestamps+side data) extracted from the last packet passed + * for decoding. + */ + AVPacket *last_pkt_props; + + /** + * temporary buffer used for encoders to store their bitstream + */ + uint8_t *byte_buffer; + unsigned int byte_buffer_size; + + void *frame_thread_encoder; + + /** + * Number of audio samples to skip at the start of the next decoded frame + */ + int skip_samples; + + /** + * hwaccel-specific private data + */ + void *hwaccel_priv_data; + + /** + * checks API usage: after codec draining, flush is required to resume operation + */ + int draining; + + /** + * buffers for using new encode/decode API through legacy API + */ + AVPacket *buffer_pkt; + int buffer_pkt_valid; // encoding: packet without data can be valid + AVFrame *buffer_frame; + int draining_done; + int compat_decode_warned; + /* this variable is set by the decoder internals to signal to the old + * API compat wrappers the amount of data consumed from the last packet */ + size_t compat_decode_consumed; + /* when a partial packet has been consumed, this stores the remaining size + * of the packet (that should be submitted in the next decode call */ + size_t compat_decode_partial_size; + AVFrame *compat_decode_frame; + + int showed_multi_packet_warning; + + int skip_samples_multiplier; + + /* to prevent infinite loop on errors when draining */ + int nb_draining_errors; + + /* used when avctx flag AV_CODEC_FLAG_DROPCHANGED is set */ + int changed_frames_dropped; + int initial_format; + int initial_width, initial_height; + int initial_sample_rate; + int initial_channels; + uint64_t initial_channel_layout; +} AVCodecInternal; + +struct AVCodecDefault { + const uint8_t *key; + const uint8_t *value; +}; + +extern const uint8_t ff_log2_run[41]; + +/** + * Return the index into tab at which {a,b} match elements {[0],[1]} of tab. + * If there is no such matching pair then size is returned. + */ +int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b); + +unsigned int avpriv_toupper4(unsigned int x); + +void ff_color_frame(AVFrame *frame, const int color[4]); + +/** + * Maximum size in bytes of extradata. + * This value was chosen such that every bit of the buffer is + * addressable by a 32-bit signed integer as used by get_bits. + */ +#define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE) + +/** + * Check AVPacket size and/or allocate data. + * + * Encoders supporting AVCodec.encode2() can use this as a convenience to + * ensure the output packet data is large enough, whether provided by the user + * or allocated in this function. + * + * @param avctx the AVCodecContext of the encoder + * @param avpkt the AVPacket + * If avpkt->data is already set, avpkt->size is checked + * to ensure it is large enough. + * If avpkt->data is NULL, a new buffer is allocated. + * avpkt->size is set to the specified size. + * All other AVPacket fields will be reset with av_init_packet(). + * @param size the minimum required packet size + * @param min_size This is a hint to the allocation algorithm, which indicates + * to what minimal size the caller might later shrink the packet + * to. Encoders often allocate packets which are larger than the + * amount of data that is written into them as the exact amount is + * not known at the time of allocation. min_size represents the + * size a packet might be shrunk to by the caller. Can be set to + * 0. setting this roughly correctly allows the allocation code + * to choose between several allocation strategies to improve + * speed slightly. + * @return non negative on success, negative error code on failure + */ +int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int64_t min_size); + +/** + * Rescale from sample rate to AVCodecContext.time_base. + */ +static av_always_inline int64_t ff_samples_to_time_base(AVCodecContext *avctx, + int64_t samples) +{ + if(samples == AV_NOPTS_VALUE) + return AV_NOPTS_VALUE; + return av_rescale_q(samples, (AVRational){ 1, avctx->sample_rate }, + avctx->time_base); +} + +/** + * 2^(x) for integer x + * @return correctly rounded float + */ +static av_always_inline float ff_exp2fi(int x) { + /* Normal range */ + if (-126 <= x && x <= 128) + return av_int2float((x+127) << 23); + /* Too large */ + else if (x > 128) + return INFINITY; + /* Subnormal numbers */ + else if (x > -150) + return av_int2float(1 << (x+149)); + /* Negligibly small */ + else + return 0; +} + +/** + * Get a buffer for a frame. This is a wrapper around + * AVCodecContext.get_buffer() and should be used instead calling get_buffer() + * directly. + */ +int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); + +#define FF_REGET_BUFFER_FLAG_READONLY 1 ///< the returned buffer does not need to be writable +/** + * Identical in function to ff_get_buffer(), except it reuses the existing buffer + * if available. + */ +int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags); + +int ff_thread_can_start_frame(AVCodecContext *avctx); + +int avpriv_h264_has_num_reorder_frames(AVCodecContext *avctx); + +/** + * Call avcodec_open2 recursively by decrementing counter, unlocking mutex, + * calling the function and then restoring again. Assumes the mutex is + * already locked + */ +int ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options); + +/** + * Finalize buf into extradata and set its size appropriately. + */ +int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf); + +const uint8_t *avpriv_find_start_code(const uint8_t *p, + const uint8_t *end, + uint32_t *state); + +int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec); + +/** + * Check that the provided frame dimensions are valid and set them on the codec + * context. + */ +int ff_set_dimensions(AVCodecContext *s, int width, int height); + +/** + * Check that the provided sample aspect ratio is valid and set it on the codec + * context. + */ +int ff_set_sar(AVCodecContext *avctx, AVRational sar); + +/** + * Add or update AV_FRAME_DATA_MATRIXENCODING side data. + */ +int ff_side_data_update_matrix_encoding(AVFrame *frame, + enum AVMatrixEncoding matrix_encoding); + +/** + * Select the (possibly hardware accelerated) pixel format. + * This is a wrapper around AVCodecContext.get_format() and should be used + * instead of calling get_format() directly. + * + * The list of pixel formats must contain at least one valid entry, and is + * terminated with AV_PIX_FMT_NONE. If it is possible to decode to software, + * the last entry in the list must be the most accurate software format. + * If it is not possible to decode to software, AVCodecContext.sw_pix_fmt + * must be set before calling this function. + */ +int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); + +/** + * Set various frame properties from the codec context / packet data. + */ +int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame); + +/** + * Add a CPB properties side data to an encoding context. + */ +AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx); + +/** + * Check AVFrame for A53 side data and allocate and fill SEI message with A53 info + * + * @param frame Raw frame to get A53 side data from + * @param prefix_len Number of bytes to allocate before SEI message + * @param data Pointer to a variable to store allocated memory + * Upon return the variable will hold NULL on error or if frame has no A53 info. + * Otherwise it will point to prefix_len uninitialized bytes followed by + * *sei_size SEI message + * @param sei_size Pointer to a variable to store generated SEI message length + * @return Zero on success, negative error code on failure + */ +int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len, + void **data, size_t *sei_size); + +/** + * Get an estimated video bitrate based on frame size, frame rate and coded + * bits per pixel. + */ +int64_t ff_guess_coded_bitrate(AVCodecContext *avctx); + +/** + * Check if a value is in the list. If not, return the default value + * + * @param ctx Context for the log msg + * @param val_name Name of the checked value, for log msg + * @param array_valid_values Array of valid int, ended with INT_MAX + * @param default_value Value return if checked value is not in the array + * @return Value or default_value. + */ +int ff_int_from_list_or_default(void *ctx, const char * val_name, int val, + const int * array_valid_values, int default_value); + +void ff_dvdsub_parse_palette(uint32_t *palette, const char *p); + +#if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avcodec) +# define av_export_avcodec __declspec(dllimport) +#else +# define av_export_avcodec +#endif + +#endif /* AVCODEC_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8.h new file mode 100644 index 00000000..5b8946ea --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8.h @@ -0,0 +1,117 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_INTRAX8_H +#define AVCODEC_INTRAX8_H + +#include "blockdsp.h" +#include "get_bits.h" +#include "idctdsp.h" +#include "intrax8dsp.h" +#include "wmv2dsp.h" +#include "mpegpicture.h" + +typedef struct IntraX8Context { + VLC *j_ac_vlc[4]; // they point to the static j_mb_vlc + VLC *j_orient_vlc; + VLC *j_dc_vlc[3]; + + int use_quant_matrix; + + // set by ff_intrax8_common_init + uint8_t *prediction_table; // 2 * (mb_w * 2) + ScanTable scantable[3]; + WMV2DSPContext wdsp; + uint8_t idct_permutation[64]; + AVCodecContext *avctx; + int *block_last_index; ///< last nonzero coefficient in block + int16_t (*block)[64]; + + // set by the caller codec + IntraX8DSPContext dsp; + IDCTDSPContext idsp; + BlockDSPContext bdsp; + int quant; + int dquant; + int qsum; + int loopfilter; + AVFrame *frame; + GetBitContext *gb; + + // calculated per frame + int quant_dc_chroma; + int divide_quant_dc_luma; + int divide_quant_dc_chroma; + uint8_t *dest[3]; + uint8_t scratchpad[42]; // size of the block is fixed (8x8 plus padding) + + // changed per block + int edges; + int flat_dc; + int predicted_dc; + int raw_orient; + int chroma_orient; + int orient; + int est_run; + + // block props + int mb_x, mb_y; + int mb_width, mb_height; +} IntraX8Context; + +/** + * Initialize IntraX8 frame decoder. + * @param avctx pointer to AVCodecContext + * @param w pointer to IntraX8Context + * @param idsp pointer to IDCTDSPContext + * @param block pointer to block array + * @param block_last_index pointer to index array + * @param mb_width macroblock width + * @param mb_height macroblock height + * @return 0 on success, a negative AVERROR value on error + */ +int ff_intrax8_common_init(AVCodecContext *avctx, + IntraX8Context *w, IDCTDSPContext *idsp, + int16_t (*block)[64], + int block_last_index[12], + int mb_width, int mb_height); + +/** + * Destroy IntraX8 frame structure. + * @param w pointer to IntraX8Context + */ +void ff_intrax8_common_end(IntraX8Context *w); + +/** + * Decode single IntraX8 frame. + * lowres decoding is theoretically impossible. + * @param w pointer to IntraX8Context + * @param pict the output Picture containing an AVFrame + * @param gb open bitstream reader + * @param mb_x pointer to the x coordinate of the current macroblock + * @param mb_y pointer to the y coordinate of the current macroblock + * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1. + * @param quant_offset offset away from zero + * @param loopfilter enable filter after decoding a block + */ +int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, + GetBitContext *gb, int *mb_x, int *mb_y, + int quant, int halfpq, + int loopfilter, int lowdelay); + +#endif /* AVCODEC_INTRAX8_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8dsp.h new file mode 100644 index 00000000..bf42698e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8dsp.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_INTRAX8DSP_H +#define AVCODEC_INTRAX8DSP_H + +#include +#include + +typedef struct IntraX8DSPContext { + void (*v_loop_filter)(uint8_t *src, ptrdiff_t stride, int qscale); + void (*h_loop_filter)(uint8_t *src, ptrdiff_t stride, int qscale); + + void (*spatial_compensation[12])(uint8_t *src, uint8_t *dst, + ptrdiff_t stride); + void (*setup_spatial_compensation)(uint8_t *src, uint8_t *dst, + ptrdiff_t stride, int *range, + int *sum, int edges); +} IntraX8DSPContext; + +void ff_intrax8dsp_init(IntraX8DSPContext *dsp); + +#endif /* AVCODEC_INTRAX8DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8huf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8huf.h new file mode 100644 index 00000000..558d0e54 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/intrax8huf.h @@ -0,0 +1,961 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_INTRAX8HUF_H +#define AVCODEC_INTRAX8HUF_H + +#include + +static const uint16_t x8_orient_lowquant_table[4][12][2] = { + { // 0 + { 0x0000, 1 }, { 0x0004, 3 }, { 0x0005, 3 }, { 0x000C, 4 }, + { 0x000D, 4 }, { 0x0038, 6 }, { 0x001D, 5 }, { 0x0039, 6 }, + { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, + }, + { // 1 + { 0x0000, 5 }, { 0x0001, 5 }, { 0x0002, 5 }, { 0x0001, 2 }, + { 0x0002, 2 }, { 0x0002, 4 }, { 0x0003, 5 }, { 0x0006, 3 }, + { 0x0003, 4 }, { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, + }, + { // 2 + { 0x0000, 2 }, { 0x0001, 2 }, { 0x0004, 3 }, { 0x0005, 3 }, + { 0x0006, 3 }, { 0x0038, 6 }, { 0x0039, 6 }, { 0x001D, 5 }, + { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, + }, + { // 3 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0001, 2 }, + { 0x0002, 2 }, { 0x0018, 5 }, { 0x0019, 5 }, { 0x000D, 4 }, + { 0x001C, 5 }, { 0x001D, 5 }, { 0x001E, 5 }, { 0x001F, 5 }, + }, +}; + +static const uint16_t x8_orient_highquant_table[2][12][2] = { + { // 0 + { 0x0000, 2 }, { 0x0001, 2 }, { 0x0004, 3 }, { 0x0005, 3 }, + { 0x0006, 3 }, { 0x0038, 6 }, { 0x001D, 5 }, { 0x0039, 6 }, + { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, { 0x003F, 6 }, + }, + { // 1 + { 0x0000, 1 }, { 0x0002, 2 }, { 0x0006, 3 }, { 0x001C, 5 }, + { 0x001D, 5 }, { 0x0078, 7 }, { 0x003D, 6 }, { 0x0079, 7 }, + { 0x007C, 7 }, { 0x007D, 7 }, { 0x007E, 7 }, { 0x007F, 7 }, + }, +}; +#define MAX_OR_VLC_BITS 7 + +static const uint16_t x8_dc_lowquant_table[8][34][2] = { + { // 0 + { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0004, 5 }, + { 0x0005, 5 }, { 0x0006, 5 }, { 0x000E, 6 }, { 0x000F, 6 }, + { 0x0040, 8 }, { 0x0041, 8 }, { 0x0840, 13 }, { 0x0841, 13 }, + { 0x0842, 13 }, { 0x0843, 13 }, { 0x0844, 13 }, { 0x0845, 13 }, + { 0x0846, 13 }, { 0x0002, 2 }, { 0x0003, 2 }, { 0x0003, 3 }, + { 0x0005, 4 }, { 0x0009, 5 }, { 0x0011, 6 }, { 0x0043, 8 }, + { 0x0085, 9 }, { 0x0847, 13 }, { 0x0848, 13 }, { 0x0849, 13 }, + { 0x084A, 13 }, { 0x084B, 13 }, { 0x084C, 13 }, { 0x084D, 13 }, + { 0x084E, 13 }, { 0x084F, 13 }, + }, + { // 1 + { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, + { 0x0006, 4 }, { 0x0004, 3 }, { 0x0007, 4 }, { 0x0005, 3 }, + { 0x000C, 4 }, { 0x000D, 4 }, { 0x001C, 5 }, { 0x003A, 6 }, + { 0x01D8, 9 }, { 0x01D9, 9 }, { 0x1DA0, 13 }, { 0x1DA1, 13 }, + { 0x1DA2, 13 }, { 0x003C, 6 }, { 0x003D, 6 }, { 0x003E, 6 }, + { 0x0077, 7 }, { 0x01DB, 9 }, { 0x007E, 7 }, { 0x00FE, 8 }, + { 0x01FE, 9 }, { 0x1DA3, 13 }, { 0x1DA4, 13 }, { 0x1DA5, 13 }, + { 0x0ED3, 12 }, { 0x0ED4, 12 }, { 0x01FF, 9 }, { 0x0ED5, 12 }, + { 0x0ED6, 12 }, { 0x0ED7, 12 }, + }, + { // 2 + { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, + { 0x0006, 4 }, { 0x0007, 4 }, { 0x0008, 4 }, { 0x0009, 4 }, + { 0x0028, 6 }, { 0x0029, 6 }, { 0x0054, 7 }, { 0x0055, 7 }, + { 0x0AC0, 12 }, { 0x0AC1, 12 }, { 0x0AC2, 12 }, { 0x0AC3, 12 }, + { 0x0AC4, 12 }, { 0x000B, 4 }, { 0x0006, 3 }, { 0x000E, 4 }, + { 0x001E, 5 }, { 0x003E, 6 }, { 0x003F, 6 }, { 0x0057, 7 }, + { 0x00AD, 8 }, { 0x0AC5, 12 }, { 0x0AC6, 12 }, { 0x0AC7, 12 }, + { 0x0AC8, 12 }, { 0x0AC9, 12 }, { 0x0ACA, 12 }, { 0x0ACB, 12 }, + { 0x0566, 11 }, { 0x0567, 11 }, + }, + { // 3 + { 0x0000, 4 }, { 0x0001, 2 }, { 0x0001, 3 }, { 0x0004, 3 }, + { 0x0005, 3 }, { 0x0006, 3 }, { 0x0001, 4 }, { 0x000E, 4 }, + { 0x003C, 6 }, { 0x003D, 6 }, { 0x007C, 7 }, { 0x00FA, 8 }, + { 0x3EC0, 14 }, { 0x3EC1, 14 }, { 0x3EC2, 14 }, { 0x3EC3, 14 }, + { 0x1F62, 13 }, { 0x01F7, 9 }, { 0x007E, 7 }, { 0x00FE, 8 }, + { 0x00FF, 8 }, { 0x1F63, 13 }, { 0x1F64, 13 }, { 0x1F65, 13 }, + { 0x1F66, 13 }, { 0x1F67, 13 }, { 0x1F68, 13 }, { 0x1F69, 13 }, + { 0x1F6A, 13 }, { 0x1F6B, 13 }, { 0x1F6C, 13 }, { 0x1F6D, 13 }, + { 0x1F6E, 13 }, { 0x1F6F, 13 }, + }, + { // 4 + { 0x0000, 7 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, + { 0x0004, 7 }, { 0x0005, 7 }, { 0x0006, 7 }, { 0x0007, 7 }, + { 0x0008, 7 }, { 0x0009, 7 }, { 0x000A, 7 }, { 0x000B, 7 }, + { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, { 0x000F, 7 }, + { 0x0010, 7 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0011, 7 }, + { 0x0012, 7 }, { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, + { 0x0016, 7 }, { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, + { 0x001A, 7 }, { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, + { 0x001E, 7 }, { 0x001F, 7 }, + }, + { // 5 + { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0008, 6 }, + { 0x0009, 6 }, { 0x000A, 6 }, { 0x0016, 7 }, { 0x000C, 6 }, + { 0x0017, 7 }, { 0x000D, 6 }, { 0x0038, 8 }, { 0x001D, 7 }, + { 0x0039, 8 }, { 0x0780, 13 }, { 0x0781, 13 }, { 0x0782, 13 }, + { 0x0783, 13 }, { 0x0002, 3 }, { 0x0001, 1 }, { 0x0003, 3 }, + { 0x001F, 7 }, { 0x003D, 8 }, { 0x0079, 9 }, { 0x0784, 13 }, + { 0x0785, 13 }, { 0x0786, 13 }, { 0x0787, 13 }, { 0x0788, 13 }, + { 0x0789, 13 }, { 0x078A, 13 }, { 0x078B, 13 }, { 0x078C, 13 }, + { 0x078D, 13 }, { 0x03C7, 12 }, + }, + { // 6 + { 0x0000, 4 }, { 0x0001, 2 }, { 0x0001, 3 }, { 0x0004, 3 }, + { 0x0001, 4 }, { 0x000A, 4 }, { 0x0016, 5 }, { 0x002E, 6 }, + { 0x005E, 7 }, { 0x005F, 7 }, { 0x00C0, 8 }, { 0x3040, 14 }, + { 0x3041, 14 }, { 0x0305, 10 }, { 0x0183, 9 }, { 0x3042, 14 }, + { 0x3043, 14 }, { 0x000D, 4 }, { 0x0007, 3 }, { 0x0019, 5 }, + { 0x0031, 6 }, { 0x00C2, 8 }, { 0x00C3, 8 }, { 0x3044, 14 }, + { 0x3045, 14 }, { 0x3046, 14 }, { 0x3047, 14 }, { 0x3048, 14 }, + { 0x3049, 14 }, { 0x304A, 14 }, { 0x304B, 14 }, { 0x304C, 14 }, + { 0x304D, 14 }, { 0x1827, 13 }, + }, + { // 7 + { 0x0000, 6 }, { 0x0001, 6 }, { 0x0002, 6 }, { 0x0006, 7 }, + { 0x0007, 7 }, { 0x0004, 6 }, { 0x0005, 6 }, { 0x0006, 6 }, + { 0x000E, 7 }, { 0x001E, 8 }, { 0x001F, 8 }, { 0x0040, 9 }, + { 0x0082, 10 }, { 0x0830, 14 }, { 0x0831, 14 }, { 0x0832, 14 }, + { 0x0833, 14 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0003, 4 }, + { 0x0005, 5 }, { 0x0009, 6 }, { 0x0011, 7 }, { 0x0021, 8 }, + { 0x0834, 14 }, { 0x0835, 14 }, { 0x0836, 14 }, { 0x0837, 14 }, + { 0x0838, 14 }, { 0x0839, 14 }, { 0x083A, 14 }, { 0x083B, 14 }, + { 0x041E, 13 }, { 0x041F, 13 }, + }, +}; + +static const uint16_t x8_dc_highquant_table[8][34][2] = { + { // 0 + { 0x0000, 5 }, { 0x0001, 4 }, { 0x0002, 4 }, { 0x0001, 5 }, + { 0x0006, 5 }, { 0x0004, 4 }, { 0x0007, 5 }, { 0x000A, 5 }, + { 0x002C, 7 }, { 0x002D, 7 }, { 0x05C0, 12 }, { 0x05C1, 12 }, + { 0x05C2, 12 }, { 0x05C3, 12 }, { 0x05C4, 12 }, { 0x05C5, 12 }, + { 0x05C6, 12 }, { 0x0003, 3 }, { 0x0002, 2 }, { 0x0006, 3 }, + { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, { 0x002F, 7 }, + { 0x005D, 8 }, { 0x05C7, 12 }, { 0x05C8, 12 }, { 0x05C9, 12 }, + { 0x05CA, 12 }, { 0x05CB, 12 }, { 0x05CC, 12 }, { 0x05CD, 12 }, + { 0x05CE, 12 }, { 0x05CF, 12 }, + }, + { // 1 + { 0x0000, 3 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0006, 4 }, + { 0x0007, 4 }, { 0x0004, 3 }, { 0x000A, 4 }, { 0x000B, 4 }, + { 0x0030, 6 }, { 0x0062, 7 }, { 0x0063, 7 }, { 0x0640, 11 }, + { 0x0641, 11 }, { 0x0642, 11 }, { 0x0643, 11 }, { 0x0644, 11 }, + { 0x0645, 11 }, { 0x0033, 6 }, { 0x000D, 4 }, { 0x001C, 5 }, + { 0x001D, 5 }, { 0x003C, 6 }, { 0x001F, 5 }, { 0x0065, 7 }, + { 0x007A, 7 }, { 0x0646, 11 }, { 0x007B, 7 }, { 0x0647, 11 }, + { 0x0648, 11 }, { 0x0649, 11 }, { 0x064A, 11 }, { 0x064B, 11 }, + { 0x0326, 10 }, { 0x0327, 10 }, + }, + { // 2 + { 0x0000, 7 }, { 0x0001, 7 }, { 0x0001, 6 }, { 0x0004, 7 }, + { 0x0003, 6 }, { 0x0005, 7 }, { 0x0010, 8 }, { 0x0011, 8 }, + { 0x0240, 13 }, { 0x0241, 13 }, { 0x0242, 13 }, { 0x0243, 13 }, + { 0x0244, 13 }, { 0x0245, 13 }, { 0x0246, 13 }, { 0x0247, 13 }, + { 0x0124, 12 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0001, 3 }, + { 0x0003, 5 }, { 0x0005, 6 }, { 0x0013, 8 }, { 0x0125, 12 }, + { 0x0126, 12 }, { 0x0127, 12 }, { 0x0128, 12 }, { 0x0129, 12 }, + { 0x012A, 12 }, { 0x012B, 12 }, { 0x012C, 12 }, { 0x012D, 12 }, + { 0x012E, 12 }, { 0x012F, 12 }, + }, + { // 3 + { 0x0000, 4 }, { 0x0001, 3 }, { 0x0002, 3 }, { 0x0001, 4 }, + { 0x0006, 4 }, { 0x0004, 3 }, { 0x0005, 3 }, { 0x0006, 3 }, + { 0x000E, 5 }, { 0x000F, 5 }, { 0x0070, 7 }, { 0x0710, 11 }, + { 0x0711, 11 }, { 0x0712, 11 }, { 0x0713, 11 }, { 0x0714, 11 }, + { 0x0715, 11 }, { 0x001D, 5 }, { 0x0072, 7 }, { 0x003C, 6 }, + { 0x003D, 6 }, { 0x0073, 7 }, { 0x007C, 7 }, { 0x007D, 7 }, + { 0x007E, 7 }, { 0x0716, 11 }, { 0x0717, 11 }, { 0x0718, 11 }, + { 0x007F, 7 }, { 0x0719, 11 }, { 0x071A, 11 }, { 0x071B, 11 }, + { 0x038E, 10 }, { 0x038F, 10 }, + }, + { // 4 + { 0x0000, 8 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, + { 0x0002, 9 }, { 0x0008, 8 }, { 0x0003, 9 }, { 0x0240, 14 }, + { 0x0241, 14 }, { 0x0242, 14 }, { 0x0243, 14 }, { 0x0244, 14 }, + { 0x0245, 14 }, { 0x0246, 14 }, { 0x0247, 14 }, { 0x0124, 13 }, + { 0x0125, 13 }, { 0x0001, 2 }, { 0x0001, 1 }, { 0x0001, 3 }, + { 0x0001, 4 }, { 0x0003, 6 }, { 0x0005, 7 }, { 0x0013, 9 }, + { 0x0126, 13 }, { 0x0127, 13 }, { 0x0128, 13 }, { 0x0129, 13 }, + { 0x012A, 13 }, { 0x012B, 13 }, { 0x012C, 13 }, { 0x012D, 13 }, + { 0x012E, 13 }, { 0x012F, 13 }, + }, + { // 5 + { 0x0000, 7 }, { 0x0001, 7 }, { 0x0001, 6 }, { 0x0002, 6 }, + { 0x0003, 6 }, { 0x0004, 6 }, { 0x0005, 6 }, { 0x0006, 6 }, + { 0x0007, 6 }, { 0x0008, 6 }, { 0x0009, 6 }, { 0x000A, 6 }, + { 0x000B, 6 }, { 0x000C, 6 }, { 0x000D, 6 }, { 0x000E, 6 }, + { 0x000F, 6 }, { 0x0010, 6 }, { 0x0011, 6 }, { 0x0012, 6 }, + { 0x0013, 6 }, { 0x0014, 6 }, { 0x0015, 6 }, { 0x0016, 6 }, + { 0x0017, 6 }, { 0x0018, 6 }, { 0x0019, 6 }, { 0x0001, 1 }, + { 0x001A, 6 }, { 0x001B, 6 }, { 0x001C, 6 }, { 0x001D, 6 }, + { 0x001E, 6 }, { 0x001F, 6 }, + }, + { // 6 + { 0x0000, 5 }, { 0x0001, 4 }, { 0x0001, 5 }, { 0x0004, 5 }, + { 0x000A, 6 }, { 0x0006, 5 }, { 0x000B, 6 }, { 0x000E, 6 }, + { 0x003C, 8 }, { 0x003D, 8 }, { 0x07C0, 13 }, { 0x07C1, 13 }, + { 0x07C2, 13 }, { 0x07C3, 13 }, { 0x07C4, 13 }, { 0x07C5, 13 }, + { 0x07C6, 13 }, { 0x0001, 2 }, { 0x0002, 2 }, { 0x0006, 3 }, + { 0x000E, 4 }, { 0x001E, 5 }, { 0x001F, 5 }, { 0x003F, 8 }, + { 0x007D, 9 }, { 0x07C7, 13 }, { 0x07C8, 13 }, { 0x07C9, 13 }, + { 0x07CA, 13 }, { 0x07CB, 13 }, { 0x07CC, 13 }, { 0x07CD, 13 }, + { 0x07CE, 13 }, { 0x07CF, 13 }, + }, + { // 7 + { 0x0000, 7 }, { 0x0001, 7 }, { 0x0002, 7 }, { 0x0003, 7 }, + { 0x0004, 7 }, { 0x0005, 7 }, { 0x0006, 7 }, { 0x0007, 7 }, + { 0x0008, 7 }, { 0x0009, 7 }, { 0x000A, 7 }, { 0x000B, 7 }, + { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, { 0x000F, 7 }, + { 0x0010, 7 }, { 0x0001, 1 }, { 0x0001, 2 }, { 0x0011, 7 }, + { 0x0012, 7 }, { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, + { 0x0016, 7 }, { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, + { 0x001A, 7 }, { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, + { 0x001E, 7 }, { 0x001F, 7 }, + }, +}; +#define MAX_DC_VLC_BITS 14 + +static const uint16_t x8_ac0_lowquant_table[8][77][2] = { + { // 0 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, + { 0x001E, 6 }, { 0x003E, 7 }, { 0x003F, 7 }, { 0x0040, 7 }, + { 0x0104, 9 }, { 0x0083, 8 }, { 0x0084, 8 }, { 0x0085, 8 }, + { 0x020A, 10 }, { 0x020B, 10 }, { 0x0218, 10 }, { 0x0219, 10 }, + { 0x0009, 4 }, { 0x0044, 7 }, { 0x010D, 9 }, { 0x021C, 10 }, + { 0x0023, 6 }, { 0x0045, 7 }, { 0x0050, 7 }, { 0x000B, 4 }, + { 0x000C, 4 }, { 0x0015, 5 }, { 0x001A, 5 }, { 0x001B, 5 }, + { 0x0029, 6 }, { 0x0038, 6 }, { 0x0039, 6 }, { 0x003A, 6 }, + { 0x0051, 7 }, { 0x0076, 7 }, { 0x0077, 7 }, { 0x0078, 7 }, + { 0x0079, 7 }, { 0x007A, 7 }, { 0x007B, 7 }, { 0x00F8, 8 }, + { 0x010F, 9 }, { 0x021D, 10 }, { 0x3E40, 14 }, { 0x3E41, 14 }, + { 0x3E42, 14 }, { 0x3E43, 14 }, { 0x03E5, 10 }, { 0x3E44, 14 }, + { 0x01F3, 9 }, { 0x3E45, 14 }, { 0x3E46, 14 }, { 0x3E47, 14 }, + { 0x00FA, 8 }, { 0x3E48, 14 }, { 0x3E49, 14 }, { 0x3E4A, 14 }, + { 0x3E4B, 14 }, { 0x03EC, 10 }, { 0x3E4C, 14 }, { 0x007E, 7 }, + { 0x00FE, 8 }, { 0x00FF, 8 }, { 0x01F7, 9 }, { 0x3E4D, 14 }, + { 0x3E4E, 14 }, { 0x3E4F, 14 }, { 0x3ED0, 14 }, { 0x3ED1, 14 }, + { 0x3ED2, 14 }, { 0x3ED3, 14 }, { 0x3ED4, 14 }, { 0x3ED5, 14 }, + { 0x1F6B, 13 }, { 0x1F6C, 13 }, { 0x1F6D, 13 }, { 0x1F6E, 13 }, + { 0x1F6F, 13 }, + }, + { // 1 + { 0x0000, 3 }, { 0x0004, 5 }, { 0x0014, 7 }, { 0x000B, 6 }, + { 0x000C, 6 }, { 0x002A, 8 }, { 0x002B, 8 }, { 0x0034, 8 }, + { 0x0D40, 14 }, { 0x0D41, 14 }, { 0x001B, 7 }, { 0x0D42, 14 }, + { 0x0D43, 14 }, { 0x0D44, 14 }, { 0x0D45, 14 }, { 0x0D46, 14 }, + { 0x000E, 6 }, { 0x003C, 8 }, { 0x0D47, 14 }, { 0x003D, 8 }, + { 0x0D48, 14 }, { 0x0D49, 14 }, { 0x0D4A, 14 }, { 0x0001, 2 }, + { 0x0004, 3 }, { 0x0014, 5 }, { 0x000B, 4 }, { 0x000C, 4 }, + { 0x000D, 4 }, { 0x002A, 6 }, { 0x001F, 7 }, { 0x0056, 7 }, + { 0x0057, 7 }, { 0x0070, 7 }, { 0x00E2, 8 }, { 0x0072, 7 }, + { 0x003A, 6 }, { 0x003B, 6 }, { 0x003C, 6 }, { 0x003D, 6 }, + { 0x00E3, 8 }, { 0x0D4B, 14 }, { 0x00E6, 8 }, { 0x00E7, 8 }, + { 0x00F8, 8 }, { 0x0D4C, 14 }, { 0x0D4D, 14 }, { 0x0D4E, 14 }, + { 0x00F9, 8 }, { 0x0D4F, 14 }, { 0x0D50, 14 }, { 0x0D51, 14 }, + { 0x06A9, 13 }, { 0x06AA, 13 }, { 0x06AB, 13 }, { 0x06AC, 13 }, + { 0x06AD, 13 }, { 0x06AE, 13 }, { 0x06AF, 13 }, { 0x003F, 6 }, + { 0x06B0, 13 }, { 0x06B1, 13 }, { 0x06B2, 13 }, { 0x06B3, 13 }, + { 0x06B4, 13 }, { 0x007D, 7 }, { 0x06B5, 13 }, { 0x06B6, 13 }, + { 0x06B7, 13 }, { 0x06B8, 13 }, { 0x06B9, 13 }, { 0x06BA, 13 }, + { 0x06BB, 13 }, { 0x06BC, 13 }, { 0x06BD, 13 }, { 0x06BE, 13 }, + { 0x06BF, 13 }, + }, + { // 2 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0003, 3 }, { 0x0008, 4 }, + { 0x0012, 5 }, { 0x0013, 5 }, { 0x0028, 6 }, { 0x0029, 6 }, + { 0x0054, 7 }, { 0x0055, 7 }, { 0x0056, 7 }, { 0x00AE, 8 }, + { 0x00AF, 8 }, { 0x00B0, 8 }, { 0x0162, 9 }, { 0x02C6, 10 }, + { 0x000C, 4 }, { 0x002D, 6 }, { 0x00B2, 8 }, { 0x0166, 9 }, + { 0x002E, 6 }, { 0x0167, 9 }, { 0x00BC, 8 }, { 0x001A, 5 }, + { 0x0036, 6 }, { 0x0037, 6 }, { 0x0038, 6 }, { 0x005F, 7 }, + { 0x0072, 7 }, { 0x0073, 7 }, { 0x0074, 7 }, { 0x0075, 7 }, + { 0x0076, 7 }, { 0x0077, 7 }, { 0x0078, 7 }, { 0x0079, 7 }, + { 0x007A, 7 }, { 0x007B, 7 }, { 0x00BD, 8 }, { 0xB1C0, 16 }, + { 0xB1C1, 16 }, { 0x58E1, 15 }, { 0x0B1D, 12 }, { 0x58E2, 15 }, + { 0x58E3, 15 }, { 0x58E4, 15 }, { 0x00F8, 8 }, { 0x03E4, 10 }, + { 0x01F3, 9 }, { 0x0B1E, 12 }, { 0x58E5, 15 }, { 0x58E6, 15 }, + { 0x00FA, 8 }, { 0x58E7, 15 }, { 0x58F8, 15 }, { 0x58F9, 15 }, + { 0x58FA, 15 }, { 0x01F6, 9 }, { 0x58FB, 15 }, { 0x007E, 7 }, + { 0x00FE, 8 }, { 0x00FF, 8 }, { 0x07CA, 11 }, { 0x0F96, 12 }, + { 0x58FC, 15 }, { 0x58FD, 15 }, { 0x58FE, 15 }, { 0x58FF, 15 }, + { 0x7CB8, 15 }, { 0x7CB9, 15 }, { 0x7CBA, 15 }, { 0x7CBB, 15 }, + { 0x7CBC, 15 }, { 0x01F7, 9 }, { 0x7CBD, 15 }, { 0x7CBE, 15 }, + { 0x7CBF, 15 }, + }, + { // 3 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, + { 0x000F, 5 }, { 0x0020, 6 }, { 0x0021, 6 }, { 0x0044, 7 }, + { 0x0045, 7 }, { 0x008C, 8 }, { 0x008D, 8 }, { 0x011C, 9 }, + { 0x011D, 9 }, { 0x011E, 9 }, { 0x023E, 10 }, { 0x023F, 10 }, + { 0x0005, 3 }, { 0x0012, 5 }, { 0x004C, 7 }, { 0x004D, 7 }, + { 0x000C, 4 }, { 0x004E, 7 }, { 0x001A, 5 }, { 0x0036, 6 }, + { 0x004F, 7 }, { 0x006E, 7 }, { 0x006F, 7 }, { 0x00E0, 8 }, + { 0x00E1, 8 }, { 0x00E2, 8 }, { 0x00E3, 8 }, { 0x00E4, 8 }, + { 0x00E5, 8 }, { 0x01CC, 9 }, { 0x00E7, 8 }, { 0x00E8, 8 }, + { 0x00E9, 8 }, { 0x01CD, 9 }, { 0x0750, 11 }, { 0x03A9, 10 }, + { 0x0751, 11 }, { 0x7540, 15 }, { 0x03AB, 10 }, { 0x7541, 15 }, + { 0x7542, 15 }, { 0x7543, 15 }, { 0x01D6, 9 }, { 0x0755, 11 }, + { 0x0076, 7 }, { 0x0EA9, 12 }, { 0x7544, 15 }, { 0x7545, 15 }, + { 0x001E, 5 }, { 0x0077, 7 }, { 0x00F8, 8 }, { 0x03AE, 10 }, + { 0x075E, 11 }, { 0x007D, 7 }, { 0x03E4, 10 }, { 0x00FC, 8 }, + { 0x00FD, 8 }, { 0x03E5, 10 }, { 0x03E6, 10 }, { 0x0EBE, 12 }, + { 0x7546, 15 }, { 0x07CE, 11 }, { 0x7547, 15 }, { 0x75F8, 15 }, + { 0x75F9, 15 }, { 0x75FA, 15 }, { 0x75FB, 15 }, { 0x75FC, 15 }, + { 0x75FD, 15 }, { 0x007F, 7 }, { 0x3AFF, 14 }, { 0x0F9E, 12 }, + { 0x0F9F, 12 }, + }, + { // 4 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0012, 6 }, { 0x0013, 6 }, { 0x0014, 6 }, { 0x002A, 7 }, + { 0x0016, 6 }, { 0x002B, 7 }, { 0x005C, 8 }, { 0x005D, 8 }, + { 0x005E, 8 }, { 0x00BE, 9 }, { 0x00BF, 9 }, { 0x0060, 8 }, + { 0x0007, 4 }, { 0x000D, 5 }, { 0x0019, 6 }, { 0x0020, 6 }, + { 0x0009, 4 }, { 0x0021, 6 }, { 0x0011, 5 }, { 0x0014, 5 }, + { 0x002A, 6 }, { 0x002B, 6 }, { 0x002C, 6 }, { 0x002D, 6 }, + { 0x002E, 6 }, { 0x002F, 6 }, { 0x0030, 6 }, { 0x0031, 7 }, + { 0x0062, 7 }, { 0x0063, 7 }, { 0x0064, 7 }, { 0x0065, 7 }, + { 0x0066, 7 }, { 0x0061, 8 }, { 0x0670, 11 }, { 0x0068, 7 }, + { 0x0069, 7 }, { 0x00CF, 8 }, { 0x019D, 9 }, { 0x01A8, 9 }, + { 0x01A9, 9 }, { 0x0339, 10 }, { 0x01AA, 9 }, { 0x0356, 10 }, + { 0x0036, 6 }, { 0x00D6, 8 }, { 0x6710, 15 }, { 0x6711, 15 }, + { 0x000E, 4 }, { 0x006E, 7 }, { 0x01AE, 9 }, { 0x6712, 15 }, + { 0x6713, 15 }, { 0x003C, 6 }, { 0x0357, 10 }, { 0x006F, 7 }, + { 0x00F4, 8 }, { 0x00F5, 8 }, { 0x035E, 10 }, { 0x01EC, 9 }, + { 0x6714, 15 }, { 0x01ED, 9 }, { 0x035F, 10 }, { 0x03DC, 10 }, + { 0x03DD, 10 }, { 0x6715, 15 }, { 0x338B, 14 }, { 0x338C, 14 }, + { 0x338D, 14 }, { 0x001F, 5 }, { 0x01EF, 9 }, { 0x338E, 14 }, + { 0x338F, 14 }, + }, + { // 5 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, + { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x006A, 8 }, + { 0x006B, 8 }, { 0x006C, 8 }, { 0x00DA, 9 }, { 0x036C, 11 }, + { 0x006E, 8 }, { 0x01B7, 10 }, { 0x036D, 11 }, { 0x3780, 15 }, + { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x003E, 7 }, + { 0x000A, 4 }, { 0x002C, 6 }, { 0x0017, 5 }, { 0x002D, 6 }, + { 0x003F, 7 }, { 0x00C0, 8 }, { 0x0061, 7 }, { 0x00C1, 8 }, + { 0x0062, 7 }, { 0x00C6, 8 }, { 0x0064, 7 }, { 0x00C7, 8 }, + { 0x00CA, 8 }, { 0x00DF, 9 }, { 0x0196, 9 }, { 0x0197, 9 }, + { 0x0198, 9 }, { 0x0199, 9 }, { 0x0379, 11 }, { 0x019A, 9 }, + { 0x01BD, 10 }, { 0x066C, 11 }, { 0x3781, 15 }, { 0x0337, 10 }, + { 0x066D, 11 }, { 0x0670, 11 }, { 0x0339, 10 }, { 0x0671, 11 }, + { 0x0034, 6 }, { 0x00CF, 8 }, { 0x3782, 15 }, { 0x3783, 15 }, + { 0x000E, 4 }, { 0x001B, 5 }, { 0x006A, 7 }, { 0x006B, 7 }, + { 0x019D, 9 }, { 0x003C, 6 }, { 0x00F4, 8 }, { 0x00F5, 8 }, + { 0x03D8, 10 }, { 0x07B2, 11 }, { 0x3784, 15 }, { 0x03DA, 10 }, + { 0x3785, 15 }, { 0x03DB, 10 }, { 0x03DC, 10 }, { 0x3786, 15 }, + { 0x3787, 15 }, { 0x1BC4, 14 }, { 0x1BC5, 14 }, { 0x1BC6, 14 }, + { 0x1BC7, 14 }, { 0x001F, 5 }, { 0x03DD, 10 }, { 0x07B3, 11 }, + { 0x01EF, 9 }, + }, + { // 6 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, + { 0x0017, 6 }, { 0x0060, 8 }, { 0x00C2, 9 }, { 0x0186, 10 }, + { 0x0187, 10 }, { 0x00C4, 9 }, { 0x3140, 15 }, { 0x3141, 15 }, + { 0x018B, 10 }, { 0x3142, 15 }, { 0x018C, 10 }, { 0x3143, 15 }, + { 0x0007, 4 }, { 0x000D, 5 }, { 0x0064, 8 }, { 0x0065, 8 }, + { 0x0010, 5 }, { 0x00C7, 9 }, { 0x0066, 8 }, { 0x0005, 3 }, + { 0x0006, 3 }, { 0x0009, 4 }, { 0x0011, 5 }, { 0x0038, 6 }, + { 0x0039, 6 }, { 0x0074, 7 }, { 0x0075, 7 }, { 0x0076, 7 }, + { 0x0067, 8 }, { 0x00EE, 8 }, { 0x01DE, 9 }, { 0x00F0, 8 }, + { 0x018D, 10 }, { 0x3144, 15 }, { 0x01DF, 9 }, { 0x003D, 6 }, + { 0x003E, 6 }, { 0x01E2, 9 }, { 0x03C6, 10 }, { 0x00F2, 8 }, + { 0x00F3, 8 }, { 0x03C7, 10 }, { 0x3145, 15 }, { 0x3146, 15 }, + { 0x01F8, 9 }, { 0x3147, 15 }, { 0x3148, 15 }, { 0x3149, 15 }, + { 0x00FD, 8 }, { 0x314A, 15 }, { 0x314B, 15 }, { 0x314C, 15 }, + { 0x314D, 15 }, { 0x01F9, 9 }, { 0x314E, 15 }, { 0x01FC, 9 }, + { 0x314F, 15 }, { 0x3150, 15 }, { 0x3151, 15 }, { 0x3152, 15 }, + { 0x3153, 15 }, { 0x03FA, 10 }, { 0x03FB, 10 }, { 0x3154, 15 }, + { 0x3155, 15 }, { 0x3156, 15 }, { 0x3157, 15 }, { 0x3158, 15 }, + { 0x3159, 15 }, { 0x00FF, 8 }, { 0x18AD, 14 }, { 0x18AE, 14 }, + { 0x18AF, 14 }, + }, + { // 7 + { 0x0000, 4 }, { 0x0080, 11 }, { 0x0081, 11 }, { 0x0082, 11 }, + { 0x0083, 11 }, { 0x0084, 11 }, { 0x0085, 11 }, { 0x0086, 11 }, + { 0x0087, 11 }, { 0x0088, 11 }, { 0x0089, 11 }, { 0x008A, 11 }, + { 0x008B, 11 }, { 0x008C, 11 }, { 0x008D, 11 }, { 0x008E, 11 }, + { 0x008F, 11 }, { 0x0048, 10 }, { 0x0049, 10 }, { 0x004A, 10 }, + { 0x004B, 10 }, { 0x004C, 10 }, { 0x004D, 10 }, { 0x0001, 1 }, + { 0x0001, 2 }, { 0x004E, 10 }, { 0x0002, 4 }, { 0x0003, 4 }, + { 0x004F, 10 }, { 0x0050, 10 }, { 0x0051, 10 }, { 0x0052, 10 }, + { 0x0053, 10 }, { 0x0054, 10 }, { 0x0055, 10 }, { 0x0056, 10 }, + { 0x0057, 10 }, { 0x0058, 10 }, { 0x0059, 10 }, { 0x005A, 10 }, + { 0x005B, 10 }, { 0x005C, 10 }, { 0x005D, 10 }, { 0x005E, 10 }, + { 0x005F, 10 }, { 0x0060, 10 }, { 0x0061, 10 }, { 0x0062, 10 }, + { 0x0063, 10 }, { 0x0064, 10 }, { 0x0065, 10 }, { 0x0066, 10 }, + { 0x0067, 10 }, { 0x0068, 10 }, { 0x0069, 10 }, { 0x006A, 10 }, + { 0x006B, 10 }, { 0x006C, 10 }, { 0x006D, 10 }, { 0x006E, 10 }, + { 0x006F, 10 }, { 0x0070, 10 }, { 0x0071, 10 }, { 0x0072, 10 }, + { 0x0073, 10 }, { 0x0074, 10 }, { 0x0075, 10 }, { 0x0076, 10 }, + { 0x0077, 10 }, { 0x0078, 10 }, { 0x0079, 10 }, { 0x007A, 10 }, + { 0x007B, 10 }, { 0x007C, 10 }, { 0x007D, 10 }, { 0x007E, 10 }, + { 0x007F, 10 }, + }, +}; + +static const uint16_t x8_ac0_highquant_table[8][77][2] = { + { // 0 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x000C, 6 }, { 0x000D, 6 }, + { 0x001C, 7 }, { 0x000F, 6 }, { 0x1D00, 15 }, { 0x003B, 8 }, + { 0x1D01, 15 }, { 0x0075, 9 }, { 0x1D02, 15 }, { 0x0080, 9 }, + { 0x1D03, 15 }, { 0x1D04, 15 }, { 0x1D05, 15 }, { 0x0E83, 14 }, + { 0x0009, 5 }, { 0x0011, 6 }, { 0x0081, 9 }, { 0x0082, 9 }, + { 0x0021, 7 }, { 0x0028, 7 }, { 0x0083, 9 }, { 0x0002, 2 }, + { 0x0003, 3 }, { 0x000C, 4 }, { 0x000D, 4 }, { 0x000B, 5 }, + { 0x0015, 6 }, { 0x0052, 8 }, { 0x0070, 7 }, { 0x0039, 6 }, + { 0x0071, 7 }, { 0x0053, 8 }, { 0x0E84, 14 }, { 0x0074, 7 }, + { 0x0075, 7 }, { 0x0076, 7 }, { 0x01DC, 9 }, { 0x001E, 5 }, + { 0x003E, 6 }, { 0x01DD, 9 }, { 0x00EF, 8 }, { 0x01F8, 9 }, + { 0x01F9, 9 }, { 0x0E85, 14 }, { 0x0E86, 14 }, { 0x0E87, 14 }, + { 0x00FD, 8 }, { 0x0E88, 14 }, { 0x0E89, 14 }, { 0x0E8A, 14 }, + { 0x0E8B, 14 }, { 0x0E8C, 14 }, { 0x0E8D, 14 }, { 0x0E8E, 14 }, + { 0x0E8F, 14 }, { 0x0E90, 14 }, { 0x0E91, 14 }, { 0x01FC, 9 }, + { 0x0E92, 14 }, { 0x0E93, 14 }, { 0x0E94, 14 }, { 0x0E95, 14 }, + { 0x0E96, 14 }, { 0x0E97, 14 }, { 0x01FD, 9 }, { 0x0E98, 14 }, + { 0x01FE, 9 }, { 0x0E99, 14 }, { 0x0E9A, 14 }, { 0x0E9B, 14 }, + { 0x0E9C, 14 }, { 0x01FF, 9 }, { 0x0E9D, 14 }, { 0x0E9E, 14 }, + { 0x0E9F, 14 }, + }, + { // 1 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0012, 6 }, { 0x0013, 6 }, { 0x0014, 6 }, { 0x0015, 6 }, + { 0x002C, 7 }, { 0x005A, 8 }, { 0x005B, 8 }, { 0x005C, 8 }, + { 0x005D, 8 }, { 0x1780, 14 }, { 0x0179, 10 }, { 0x017A, 10 }, + { 0x0006, 4 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x003E, 7 }, + { 0x0010, 5 }, { 0x0022, 6 }, { 0x0012, 5 }, { 0x000A, 4 }, + { 0x0013, 5 }, { 0x0016, 5 }, { 0x0023, 6 }, { 0x002E, 6 }, + { 0x002F, 6 }, { 0x0030, 6 }, { 0x0031, 6 }, { 0x003F, 7 }, + { 0x005F, 8 }, { 0x00C8, 8 }, { 0x0065, 7 }, { 0x0066, 7 }, + { 0x0067, 7 }, { 0x0068, 7 }, { 0x00C9, 8 }, { 0x0069, 7 }, + { 0x006A, 7 }, { 0x00D6, 8 }, { 0x00D7, 8 }, { 0x00D8, 8 }, + { 0x1781, 14 }, { 0x017B, 10 }, { 0x01B2, 9 }, { 0x1782, 14 }, + { 0x001C, 5 }, { 0x01B3, 9 }, { 0x1783, 14 }, { 0x1784, 14 }, + { 0x001D, 5 }, { 0x00DA, 8 }, { 0x1785, 14 }, { 0x1786, 14 }, + { 0x1787, 14 }, { 0x0037, 6 }, { 0x00DB, 8 }, { 0x0078, 7 }, + { 0x00F2, 8 }, { 0x01E6, 9 }, { 0x00F4, 8 }, { 0x1788, 14 }, + { 0x1789, 14 }, { 0x00F5, 8 }, { 0x01E7, 9 }, { 0x178A, 14 }, + { 0x178B, 14 }, { 0x178C, 14 }, { 0x178D, 14 }, { 0x01EC, 9 }, + { 0x178E, 14 }, { 0x001F, 5 }, { 0x00F7, 8 }, { 0x01ED, 9 }, + { 0x178F, 14 }, + }, + { // 2 + { 0x0000, 4 }, { 0x0002, 5 }, { 0x0180, 12 }, { 0x0181, 12 }, + { 0x0182, 12 }, { 0x0183, 12 }, { 0x0184, 12 }, { 0x0185, 12 }, + { 0x0186, 12 }, { 0x0187, 12 }, { 0x0188, 12 }, { 0x0189, 12 }, + { 0x00C5, 11 }, { 0x00C6, 11 }, { 0x00C7, 11 }, { 0x00C8, 11 }, + { 0x00C9, 11 }, { 0x00CA, 11 }, { 0x00CB, 11 }, { 0x00CC, 11 }, + { 0x00CD, 11 }, { 0x00CE, 11 }, { 0x00CF, 11 }, { 0x0001, 1 }, + { 0x0001, 2 }, { 0x0004, 5 }, { 0x0005, 5 }, { 0x0006, 5 }, + { 0x00D0, 11 }, { 0x00D1, 11 }, { 0x00D2, 11 }, { 0x00D3, 11 }, + { 0x00D4, 11 }, { 0x00D5, 11 }, { 0x00D6, 11 }, { 0x00D7, 11 }, + { 0x00D8, 11 }, { 0x00D9, 11 }, { 0x00DA, 11 }, { 0x0007, 5 }, + { 0x00DB, 11 }, { 0x00DC, 11 }, { 0x00DD, 11 }, { 0x00DE, 11 }, + { 0x00DF, 11 }, { 0x00E0, 11 }, { 0x00E1, 11 }, { 0x00E2, 11 }, + { 0x00E3, 11 }, { 0x00E4, 11 }, { 0x00E5, 11 }, { 0x00E6, 11 }, + { 0x00E7, 11 }, { 0x00E8, 11 }, { 0x00E9, 11 }, { 0x00EA, 11 }, + { 0x00EB, 11 }, { 0x00EC, 11 }, { 0x00ED, 11 }, { 0x00EE, 11 }, + { 0x00EF, 11 }, { 0x00F0, 11 }, { 0x00F1, 11 }, { 0x00F2, 11 }, + { 0x00F3, 11 }, { 0x00F4, 11 }, { 0x00F5, 11 }, { 0x00F6, 11 }, + { 0x00F7, 11 }, { 0x00F8, 11 }, { 0x00F9, 11 }, { 0x00FA, 11 }, + { 0x00FB, 11 }, { 0x00FC, 11 }, { 0x00FD, 11 }, { 0x00FE, 11 }, + { 0x00FF, 11 }, + }, + { // 3 + { 0x0000, 8 }, { 0x0001, 8 }, { 0x0002, 8 }, { 0x0003, 8 }, + { 0x0004, 8 }, { 0x0005, 8 }, { 0x0006, 8 }, { 0x0007, 8 }, + { 0x0008, 8 }, { 0x0009, 8 }, { 0x000A, 8 }, { 0x000B, 8 }, + { 0x000C, 8 }, { 0x000D, 8 }, { 0x000E, 8 }, { 0x000F, 8 }, + { 0x0010, 8 }, { 0x0011, 8 }, { 0x0012, 8 }, { 0x0013, 8 }, + { 0x0014, 8 }, { 0x0015, 8 }, { 0x0016, 8 }, { 0x0001, 1 }, + { 0x0017, 8 }, { 0x000C, 7 }, { 0x000D, 7 }, { 0x000E, 7 }, + { 0x000F, 7 }, { 0x0010, 7 }, { 0x0011, 7 }, { 0x0012, 7 }, + { 0x0013, 7 }, { 0x0014, 7 }, { 0x0015, 7 }, { 0x0016, 7 }, + { 0x0017, 7 }, { 0x0018, 7 }, { 0x0019, 7 }, { 0x001A, 7 }, + { 0x001B, 7 }, { 0x001C, 7 }, { 0x001D, 7 }, { 0x001E, 7 }, + { 0x001F, 7 }, { 0x0020, 7 }, { 0x0021, 7 }, { 0x0022, 7 }, + { 0x0023, 7 }, { 0x0024, 7 }, { 0x0025, 7 }, { 0x0026, 7 }, + { 0x0027, 7 }, { 0x0028, 7 }, { 0x0029, 7 }, { 0x002A, 7 }, + { 0x002B, 7 }, { 0x002C, 7 }, { 0x002D, 7 }, { 0x002E, 7 }, + { 0x002F, 7 }, { 0x0030, 7 }, { 0x0031, 7 }, { 0x0032, 7 }, + { 0x0033, 7 }, { 0x0034, 7 }, { 0x0035, 7 }, { 0x0036, 7 }, + { 0x0037, 7 }, { 0x0038, 7 }, { 0x0039, 7 }, { 0x003A, 7 }, + { 0x003B, 7 }, { 0x003C, 7 }, { 0x003D, 7 }, { 0x003E, 7 }, + { 0x003F, 7 }, + }, + { // 4 + { 0x0000, 9 }, { 0x0001, 9 }, { 0x0002, 9 }, { 0x0003, 9 }, + { 0x0004, 9 }, { 0x0005, 9 }, { 0x0006, 9 }, { 0x0007, 9 }, + { 0x0008, 9 }, { 0x0009, 9 }, { 0x000A, 9 }, { 0x000B, 9 }, + { 0x000C, 9 }, { 0x000D, 9 }, { 0x000E, 9 }, { 0x000F, 9 }, + { 0x0010, 9 }, { 0x0011, 9 }, { 0x0012, 9 }, { 0x0013, 9 }, + { 0x0014, 9 }, { 0x0015, 9 }, { 0x000B, 8 }, { 0x0001, 2 }, + { 0x0001, 1 }, { 0x000C, 8 }, { 0x000D, 8 }, { 0x000E, 8 }, + { 0x000F, 8 }, { 0x0010, 8 }, { 0x0011, 8 }, { 0x0012, 8 }, + { 0x0013, 8 }, { 0x0014, 8 }, { 0x0015, 8 }, { 0x0016, 8 }, + { 0x0017, 8 }, { 0x0018, 8 }, { 0x0019, 8 }, { 0x001A, 8 }, + { 0x001B, 8 }, { 0x001C, 8 }, { 0x001D, 8 }, { 0x001E, 8 }, + { 0x001F, 8 }, { 0x0020, 8 }, { 0x0021, 8 }, { 0x0022, 8 }, + { 0x0023, 8 }, { 0x0024, 8 }, { 0x0025, 8 }, { 0x0026, 8 }, + { 0x0027, 8 }, { 0x0028, 8 }, { 0x0029, 8 }, { 0x002A, 8 }, + { 0x002B, 8 }, { 0x002C, 8 }, { 0x002D, 8 }, { 0x002E, 8 }, + { 0x002F, 8 }, { 0x0030, 8 }, { 0x0031, 8 }, { 0x0032, 8 }, + { 0x0033, 8 }, { 0x0034, 8 }, { 0x0035, 8 }, { 0x0036, 8 }, + { 0x0037, 8 }, { 0x0038, 8 }, { 0x0039, 8 }, { 0x003A, 8 }, + { 0x003B, 8 }, { 0x003C, 8 }, { 0x003D, 8 }, { 0x003E, 8 }, + { 0x003F, 8 }, + }, + { // 5 + { 0x0000, 10 }, { 0x0001, 10 }, { 0x0002, 10 }, { 0x0003, 10 }, + { 0x0004, 10 }, { 0x0005, 10 }, { 0x0006, 10 }, { 0x0007, 10 }, + { 0x0008, 10 }, { 0x0009, 10 }, { 0x000A, 10 }, { 0x000B, 10 }, + { 0x000C, 10 }, { 0x000D, 10 }, { 0x000E, 10 }, { 0x000F, 10 }, + { 0x0010, 10 }, { 0x0011, 10 }, { 0x0012, 10 }, { 0x0013, 10 }, + { 0x000A, 9 }, { 0x000B, 9 }, { 0x000C, 9 }, { 0x0001, 1 }, + { 0x0001, 3 }, { 0x000D, 9 }, { 0x000E, 9 }, { 0x0001, 2 }, + { 0x000F, 9 }, { 0x0010, 9 }, { 0x0011, 9 }, { 0x0012, 9 }, + { 0x0013, 9 }, { 0x0014, 9 }, { 0x0015, 9 }, { 0x0016, 9 }, + { 0x0017, 9 }, { 0x0018, 9 }, { 0x0019, 9 }, { 0x001A, 9 }, + { 0x001B, 9 }, { 0x001C, 9 }, { 0x001D, 9 }, { 0x001E, 9 }, + { 0x001F, 9 }, { 0x0020, 9 }, { 0x0021, 9 }, { 0x0022, 9 }, + { 0x0023, 9 }, { 0x0024, 9 }, { 0x0025, 9 }, { 0x0026, 9 }, + { 0x0027, 9 }, { 0x0028, 9 }, { 0x0029, 9 }, { 0x002A, 9 }, + { 0x002B, 9 }, { 0x002C, 9 }, { 0x002D, 9 }, { 0x002E, 9 }, + { 0x002F, 9 }, { 0x0030, 9 }, { 0x0031, 9 }, { 0x0032, 9 }, + { 0x0033, 9 }, { 0x0034, 9 }, { 0x0035, 9 }, { 0x0036, 9 }, + { 0x0037, 9 }, { 0x0038, 9 }, { 0x0039, 9 }, { 0x003A, 9 }, + { 0x003B, 9 }, { 0x003C, 9 }, { 0x003D, 9 }, { 0x003E, 9 }, + { 0x003F, 9 }, + }, + { // 6 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, + { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x006A, 8 }, + { 0x006B, 8 }, { 0x006C, 8 }, { 0x00DA, 9 }, { 0x00DB, 9 }, + { 0x01B8, 10 }, { 0x00DD, 9 }, { 0x01B9, 10 }, { 0x3780, 15 }, + { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x001F, 6 }, + { 0x000A, 4 }, { 0x0058, 7 }, { 0x0017, 5 }, { 0x0018, 5 }, + { 0x0059, 7 }, { 0x005A, 7 }, { 0x005B, 7 }, { 0x00C8, 8 }, + { 0x0065, 7 }, { 0x0066, 7 }, { 0x00C9, 8 }, { 0x00CE, 8 }, + { 0x00CF, 8 }, { 0x00D0, 8 }, { 0x00D1, 8 }, { 0x00D2, 8 }, + { 0x00D3, 8 }, { 0x00DF, 9 }, { 0x00D4, 8 }, { 0x00D5, 8 }, + { 0x00D6, 8 }, { 0x01AE, 9 }, { 0x3781, 15 }, { 0x01BD, 10 }, + { 0x035E, 10 }, { 0x035F, 10 }, { 0x3782, 15 }, { 0x0360, 10 }, + { 0x0037, 6 }, { 0x01B1, 9 }, { 0x3783, 15 }, { 0x3784, 15 }, + { 0x000E, 4 }, { 0x003C, 6 }, { 0x0361, 10 }, { 0x3785, 15 }, + { 0x1BC3, 14 }, { 0x003D, 6 }, { 0x00D9, 8 }, { 0x1BC4, 14 }, + { 0x0368, 10 }, { 0x1BC5, 14 }, { 0x1BC6, 14 }, { 0x1BC7, 14 }, + { 0x1BC8, 14 }, { 0x00DB, 8 }, { 0x0369, 10 }, { 0x036A, 10 }, + { 0x1BC9, 14 }, { 0x1BCA, 14 }, { 0x1BCB, 14 }, { 0x1BCC, 14 }, + { 0x1BCD, 14 }, { 0x001F, 5 }, { 0x036B, 10 }, { 0x1BCE, 14 }, + { 0x1BCF, 14 }, + }, + { // 7 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, + { 0x0010, 6 }, { 0x0044, 8 }, { 0x0023, 7 }, { 0x0012, 6 }, + { 0x0026, 7 }, { 0x08A0, 13 }, { 0x004E, 8 }, { 0x004F, 8 }, + { 0x08A1, 13 }, { 0x08A2, 13 }, { 0x08A3, 13 }, { 0x0050, 8 }, + { 0x0006, 4 }, { 0x000B, 5 }, { 0x0029, 7 }, { 0x0015, 6 }, + { 0x001C, 6 }, { 0x003A, 7 }, { 0x001E, 6 }, { 0x0004, 3 }, + { 0x0014, 5 }, { 0x0015, 5 }, { 0x000B, 4 }, { 0x001F, 6 }, + { 0x0030, 6 }, { 0x0031, 6 }, { 0x0019, 5 }, { 0x0051, 8 }, + { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, { 0x0037, 6 }, + { 0x0076, 8 }, { 0x0077, 8 }, { 0x0070, 7 }, { 0x001D, 5 }, + { 0x0071, 7 }, { 0x0072, 7 }, { 0x08A4, 13 }, { 0x0073, 7 }, + { 0x00F0, 8 }, { 0x08A5, 13 }, { 0x08A6, 13 }, { 0x08A7, 13 }, + { 0x0079, 7 }, { 0x007A, 7 }, { 0x08A8, 13 }, { 0x08A9, 13 }, + { 0x00F1, 8 }, { 0x08AA, 13 }, { 0x08AB, 13 }, { 0x08AC, 13 }, + { 0x08AD, 13 }, { 0x00F6, 8 }, { 0x08AE, 13 }, { 0x007C, 7 }, + { 0x00F7, 8 }, { 0x08AF, 13 }, { 0x08B0, 13 }, { 0x08B1, 13 }, + { 0x08B2, 13 }, { 0x00FA, 8 }, { 0x08B3, 13 }, { 0x08B4, 13 }, + { 0x08B5, 13 }, { 0x08B6, 13 }, { 0x08B7, 13 }, { 0x00FB, 8 }, + { 0x045C, 12 }, { 0x003F, 6 }, { 0x045D, 12 }, { 0x045E, 12 }, + { 0x045F, 12 }, + }, +}; + +static const uint16_t x8_ac1_lowquant_table[8][77][2] = { + { // 0 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0012, 6 }, { 0x0026, 7 }, { 0x0014, 6 }, { 0x004E, 8 }, + { 0x004F, 8 }, { 0x00A8, 9 }, { 0x0152, 10 }, { 0x00AA, 9 }, + { 0x00AB, 9 }, { 0x00AC, 9 }, { 0x2A60, 15 }, { 0x02A7, 11 }, + { 0x0006, 4 }, { 0x000B, 5 }, { 0x001C, 6 }, { 0x003A, 7 }, + { 0x000F, 5 }, { 0x003B, 7 }, { 0x0010, 5 }, { 0x0005, 3 }, + { 0x0009, 4 }, { 0x0011, 5 }, { 0x0018, 5 }, { 0x0019, 5 }, + { 0x001A, 5 }, { 0x0036, 6 }, { 0x0037, 6 }, { 0x0070, 7 }, + { 0x0057, 8 }, { 0x00E2, 8 }, { 0x00E3, 8 }, { 0x00E4, 8 }, + { 0x00E5, 8 }, { 0x00AD, 9 }, { 0x0398, 10 }, { 0x003A, 6 }, + { 0x0076, 7 }, { 0x00E7, 8 }, { 0x00EE, 8 }, { 0x00EF, 8 }, + { 0x0732, 11 }, { 0x039A, 10 }, { 0x0733, 11 }, { 0x2A61, 15 }, + { 0x0078, 7 }, { 0x1531, 14 }, { 0x1532, 14 }, { 0x1533, 14 }, + { 0x003D, 6 }, { 0x039B, 10 }, { 0x1534, 14 }, { 0x1535, 14 }, + { 0x1536, 14 }, { 0x0079, 7 }, { 0x1537, 14 }, { 0x00F8, 8 }, + { 0x01F2, 9 }, { 0x07CC, 11 }, { 0x03E7, 10 }, { 0x07CD, 11 }, + { 0x3E80, 14 }, { 0x00FB, 8 }, { 0x03E9, 10 }, { 0x3E81, 14 }, + { 0x3E82, 14 }, { 0x3E83, 14 }, { 0x3E84, 14 }, { 0x3E85, 14 }, + { 0x3E86, 14 }, { 0x003F, 6 }, { 0x01F5, 9 }, { 0x07D1, 11 }, + { 0x3E87, 14 }, + }, + { // 1 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, + { 0x001E, 6 }, { 0x001F, 6 }, { 0x0040, 7 }, { 0x0082, 8 }, + { 0x0083, 8 }, { 0x0084, 8 }, { 0x010A, 9 }, { 0x010B, 9 }, + { 0x0430, 11 }, { 0x0431, 11 }, { 0x0432, 11 }, { 0x0433, 11 }, + { 0x0005, 3 }, { 0x0011, 5 }, { 0x0024, 6 }, { 0x004A, 7 }, + { 0x000C, 4 }, { 0x0026, 6 }, { 0x000D, 4 }, { 0x0087, 8 }, + { 0x010D, 9 }, { 0x0258, 10 }, { 0x012D, 9 }, { 0x0259, 10 }, + { 0x025C, 10 }, { 0x0974, 12 }, { 0x025E, 10 }, { 0x025F, 10 }, + { 0x0270, 10 }, { 0x0271, 10 }, { 0x04BB, 11 }, { 0x0975, 12 }, + { 0x0272, 10 }, { 0x09CC, 12 }, { 0x09CD, 12 }, { 0x4E70, 15 }, + { 0x4E71, 15 }, { 0x4E72, 15 }, { 0x4E73, 15 }, { 0x273A, 14 }, + { 0x273B, 14 }, { 0x273C, 14 }, { 0x04E8, 11 }, { 0x04E9, 11 }, + { 0x009E, 8 }, { 0x0275, 10 }, { 0x09D8, 12 }, { 0x273D, 14 }, + { 0x000E, 4 }, { 0x003C, 6 }, { 0x007A, 7 }, { 0x009F, 8 }, + { 0x0277, 10 }, { 0x003E, 6 }, { 0x00F6, 8 }, { 0x04ED, 11 }, + { 0x03DC, 10 }, { 0x273E, 14 }, { 0x07BA, 11 }, { 0x09D9, 12 }, + { 0x273F, 14 }, { 0x3DD8, 14 }, { 0x3DD9, 14 }, { 0x3DDA, 14 }, + { 0x3DDB, 14 }, { 0x3DDC, 14 }, { 0x3DDD, 14 }, { 0x3DDE, 14 }, + { 0x3DDF, 14 }, { 0x003F, 6 }, { 0x07BC, 11 }, { 0x07BD, 11 }, + { 0x03DF, 10 }, + }, + { // 2 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x000E, 6 }, + { 0x001E, 7 }, { 0x003E, 8 }, { 0x003F, 8 }, { 0x0040, 8 }, + { 0x0104, 10 }, { 0x0083, 9 }, { 0x0105, 10 }, { 0x0108, 10 }, + { 0x4240, 16 }, { 0x010A, 10 }, { 0x010B, 10 }, { 0x4241, 16 }, + { 0x0003, 3 }, { 0x0009, 5 }, { 0x0011, 6 }, { 0x0043, 8 }, + { 0x0004, 3 }, { 0x000A, 5 }, { 0x000A, 4 }, { 0x002C, 7 }, + { 0x00B4, 9 }, { 0x00B5, 9 }, { 0x00B6, 9 }, { 0x00B7, 9 }, + { 0x00B8, 9 }, { 0x0172, 10 }, { 0x0173, 10 }, { 0x0174, 10 }, + { 0x0175, 10 }, { 0x0176, 10 }, { 0x0177, 10 }, { 0x00BC, 9 }, + { 0x017A, 10 }, { 0x0213, 11 }, { 0x4242, 16 }, { 0x017B, 10 }, + { 0x02F8, 11 }, { 0x017D, 10 }, { 0x02F9, 11 }, { 0x017E, 10 }, + { 0x4243, 16 }, { 0x02FE, 11 }, { 0x2122, 15 }, { 0x2123, 15 }, + { 0x0058, 7 }, { 0x0164, 9 }, { 0x2124, 15 }, { 0x2125, 15 }, + { 0x0006, 3 }, { 0x000E, 4 }, { 0x002D, 6 }, { 0x002E, 6 }, + { 0x00B3, 8 }, { 0x001E, 5 }, { 0x005E, 7 }, { 0x2126, 15 }, + { 0x2127, 15 }, { 0x2128, 15 }, { 0x2129, 15 }, { 0x02FF, 11 }, + { 0x212A, 15 }, { 0x0594, 11 }, { 0x0595, 11 }, { 0x0596, 11 }, + { 0x212B, 15 }, { 0x212C, 15 }, { 0x212D, 15 }, { 0x212E, 15 }, + { 0x212F, 15 }, { 0x001F, 5 }, { 0x0597, 11 }, { 0x00BE, 8 }, + { 0x00BF, 8 }, + }, + { // 3 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x0007, 4 }, + { 0x0010, 5 }, { 0x0011, 5 }, { 0x0024, 6 }, { 0x0025, 6 }, + { 0x0026, 6 }, { 0x0027, 6 }, { 0x0050, 7 }, { 0x0051, 7 }, + { 0x00A4, 8 }, { 0x00A5, 8 }, { 0x00A6, 8 }, { 0x014E, 9 }, + { 0x000B, 4 }, { 0x002A, 6 }, { 0x0056, 7 }, { 0x014F, 9 }, + { 0x0030, 6 }, { 0x00AE, 8 }, { 0x0062, 7 }, { 0x0032, 6 }, + { 0x0033, 6 }, { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, + { 0x0063, 7 }, { 0x006E, 7 }, { 0x006F, 7 }, { 0x0070, 7 }, + { 0x0071, 7 }, { 0x0072, 7 }, { 0x0073, 7 }, { 0x0074, 7 }, + { 0x00AF, 8 }, { 0x00EA, 8 }, { 0x01D6, 9 }, { 0x075C, 11 }, + { 0x03AF, 10 }, { 0x75D0, 15 }, { 0x75D1, 15 }, { 0x75D2, 15 }, + { 0x75D3, 15 }, { 0x75D4, 15 }, { 0x0076, 7 }, { 0x00EE, 8 }, + { 0x00EF, 8 }, { 0x0EBB, 12 }, { 0x01E0, 9 }, { 0x75D5, 15 }, + { 0x0079, 7 }, { 0x01E1, 9 }, { 0x75D6, 15 }, { 0x75D7, 15 }, + { 0x7880, 15 }, { 0x00F4, 8 }, { 0x0789, 11 }, { 0x003E, 6 }, + { 0x007B, 7 }, { 0x00F5, 8 }, { 0x00FC, 8 }, { 0x007F, 7 }, + { 0x01E3, 9 }, { 0x078A, 11 }, { 0x078B, 11 }, { 0x7881, 15 }, + { 0x7882, 15 }, { 0x7883, 15 }, { 0x3C42, 14 }, { 0x3C43, 14 }, + { 0x3C44, 14 }, { 0x00FD, 8 }, { 0x3C45, 14 }, { 0x3C46, 14 }, + { 0x3C47, 14 }, + }, + { // 4 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, + { 0x0017, 6 }, { 0x0030, 7 }, { 0x0031, 7 }, { 0x0064, 8 }, + { 0x0065, 8 }, { 0x0066, 8 }, { 0x00CE, 9 }, { 0x00CF, 9 }, + { 0x01A0, 10 }, { 0x01A1, 10 }, { 0x1A20, 14 }, { 0x0689, 12 }, + { 0x0004, 3 }, { 0x000E, 5 }, { 0x001B, 6 }, { 0x0035, 7 }, + { 0x000A, 4 }, { 0x001E, 6 }, { 0x0016, 5 }, { 0x0017, 5 }, + { 0x001F, 6 }, { 0x0030, 6 }, { 0x0031, 6 }, { 0x0064, 7 }, + { 0x0065, 7 }, { 0x0069, 8 }, { 0x0066, 7 }, { 0x00CE, 8 }, + { 0x00CF, 8 }, { 0x00D0, 8 }, { 0x00D1, 8 }, { 0x00D2, 8 }, + { 0x01A6, 9 }, { 0x01A3, 10 }, { 0x034E, 10 }, { 0x006A, 7 }, + { 0x00D6, 8 }, { 0x01AE, 9 }, { 0x01AF, 9 }, { 0x034F, 10 }, + { 0x0345, 11 }, { 0x01B0, 9 }, { 0x01B1, 9 }, { 0x0364, 10 }, + { 0x006D, 7 }, { 0x00DC, 8 }, { 0x0D94, 12 }, { 0x0D95, 12 }, + { 0x000E, 4 }, { 0x003C, 6 }, { 0x00DD, 8 }, { 0x00DE, 8 }, + { 0x01B3, 9 }, { 0x003D, 6 }, { 0x00DF, 8 }, { 0x01F0, 9 }, + { 0x03E2, 10 }, { 0x03E3, 10 }, { 0x06CB, 11 }, { 0x03E4, 10 }, + { 0x07CA, 11 }, { 0x01F3, 9 }, { 0x01F4, 9 }, { 0x07CB, 11 }, + { 0x07D4, 11 }, { 0x1A21, 14 }, { 0x1A22, 14 }, { 0x07D5, 11 }, + { 0x1A23, 14 }, { 0x003F, 6 }, { 0x01F6, 9 }, { 0x01F7, 9 }, + { 0x03EB, 10 }, + }, + { // 5 + { 0x0000, 2 }, { 0x0002, 3 }, { 0x0006, 4 }, { 0x000E, 5 }, + { 0x000F, 5 }, { 0x0020, 6 }, { 0x0021, 6 }, { 0x0044, 7 }, + { 0x0045, 7 }, { 0x0046, 7 }, { 0x008E, 8 }, { 0x008F, 8 }, + { 0x0090, 8 }, { 0x0122, 9 }, { 0x0246, 10 }, { 0x0124, 9 }, + { 0x0005, 3 }, { 0x0013, 5 }, { 0x004A, 7 }, { 0x0093, 8 }, + { 0x0018, 5 }, { 0x004B, 7 }, { 0x0032, 6 }, { 0x001A, 5 }, + { 0x0033, 6 }, { 0x006C, 7 }, { 0x006D, 7 }, { 0x006E, 7 }, + { 0x00DE, 8 }, { 0x00DF, 8 }, { 0x0070, 7 }, { 0x00E2, 8 }, + { 0x00E3, 8 }, { 0x00E4, 8 }, { 0x00E5, 8 }, { 0x00E6, 8 }, + { 0x00E7, 8 }, { 0x0125, 9 }, { 0x01D0, 9 }, { 0x048E, 11 }, + { 0x091E, 12 }, { 0x091F, 12 }, { 0x7440, 15 }, { 0x1D11, 13 }, + { 0x7441, 15 }, { 0x7442, 15 }, { 0x00E9, 8 }, { 0x01D4, 9 }, + { 0x00EB, 8 }, { 0x03A3, 10 }, { 0x01D5, 9 }, { 0x1D12, 13 }, + { 0x001E, 5 }, { 0x0076, 7 }, { 0x01DC, 9 }, { 0x01DD, 9 }, + { 0x7443, 15 }, { 0x007C, 7 }, { 0x0745, 11 }, { 0x00EF, 8 }, + { 0x00FA, 8 }, { 0x00FB, 8 }, { 0x01F8, 9 }, { 0x00FD, 8 }, + { 0x07E4, 11 }, { 0x0FCA, 12 }, { 0x1D13, 13 }, { 0x7E58, 15 }, + { 0x7E59, 15 }, { 0x7E5A, 15 }, { 0x7E5B, 15 }, { 0x7E5C, 15 }, + { 0x7E5D, 15 }, { 0x007F, 7 }, { 0x3F2F, 14 }, { 0x07E6, 11 }, + { 0x07E7, 11 }, + }, + { // 6 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0009, 5 }, { 0x0014, 6 }, { 0x0015, 6 }, { 0x002C, 7 }, + { 0x005A, 8 }, { 0x005B, 8 }, { 0x005C, 8 }, { 0x00BA, 9 }, + { 0x00BB, 9 }, { 0x00BC, 9 }, { 0x02F4, 11 }, { 0x05EA, 12 }, + { 0x0003, 3 }, { 0x0010, 5 }, { 0x0022, 6 }, { 0x0046, 7 }, + { 0x0009, 4 }, { 0x0028, 6 }, { 0x0015, 5 }, { 0x000B, 4 }, + { 0x0018, 5 }, { 0x0029, 6 }, { 0x0032, 6 }, { 0x0047, 7 }, + { 0x0066, 7 }, { 0x0067, 7 }, { 0x0068, 7 }, { 0x0069, 7 }, + { 0x006A, 7 }, { 0x005F, 8 }, { 0x00D6, 8 }, { 0x00D7, 8 }, + { 0x01B0, 9 }, { 0x00D9, 8 }, { 0x017B, 10 }, { 0x006D, 7 }, + { 0x00DC, 8 }, { 0x01B1, 9 }, { 0x06E8, 11 }, { 0x01BB, 9 }, + { 0x0375, 10 }, { 0x05EB, 12 }, { 0x01BC, 9 }, { 0x6E90, 15 }, + { 0x0038, 6 }, { 0x0072, 7 }, { 0x6E91, 15 }, { 0x6E92, 15 }, + { 0x001D, 5 }, { 0x0073, 7 }, { 0x01BD, 9 }, { 0x06F8, 11 }, + { 0x6E93, 15 }, { 0x003C, 6 }, { 0x01BF, 9 }, { 0x00F4, 8 }, + { 0x01EA, 9 }, { 0x037D, 10 }, { 0x03D6, 10 }, { 0x06F9, 11 }, + { 0x6E94, 15 }, { 0x00F6, 8 }, { 0x01EE, 9 }, { 0x6E95, 15 }, + { 0x6E96, 15 }, { 0x6E97, 15 }, { 0x374C, 14 }, { 0x374D, 14 }, + { 0x374E, 14 }, { 0x001F, 5 }, { 0x03D7, 10 }, { 0x01EF, 9 }, + { 0x374F, 14 }, + }, + { // 7 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x0016, 6 }, + { 0x002E, 7 }, { 0x002F, 7 }, { 0x0060, 8 }, { 0x0061, 8 }, + { 0x00C4, 9 }, { 0x00C5, 9 }, { 0x00C6, 9 }, { 0x018E, 10 }, + { 0x31E0, 15 }, { 0x31E1, 15 }, { 0x31E2, 15 }, { 0x31E3, 15 }, + { 0x0004, 3 }, { 0x000D, 5 }, { 0x0019, 6 }, { 0x0038, 7 }, + { 0x000A, 4 }, { 0x001D, 6 }, { 0x000B, 4 }, { 0x0072, 8 }, + { 0x0073, 8 }, { 0x00F0, 9 }, { 0x01E2, 10 }, { 0x00F2, 9 }, + { 0x01E3, 10 }, { 0x00F3, 9 }, { 0x01E8, 10 }, { 0x01E9, 10 }, + { 0x31E4, 15 }, { 0x01EA, 10 }, { 0x031F, 11 }, { 0x03D6, 11 }, + { 0x31E5, 15 }, { 0x01EC, 10 }, { 0x31E6, 15 }, { 0x00F7, 9 }, + { 0x03D7, 11 }, { 0x31E7, 15 }, { 0x31E8, 15 }, { 0x03DA, 11 }, + { 0x03DB, 11 }, { 0x31E9, 15 }, { 0x03E0, 11 }, { 0x31EA, 15 }, + { 0x003F, 7 }, { 0x01F1, 10 }, { 0x31EB, 15 }, { 0x31EC, 15 }, + { 0x0006, 3 }, { 0x001C, 5 }, { 0x0074, 7 }, { 0x0075, 7 }, + { 0x00F9, 9 }, { 0x001E, 5 }, { 0x0076, 7 }, { 0x00FA, 9 }, + { 0x03E1, 11 }, { 0x31ED, 15 }, { 0x18F7, 14 }, { 0x1F60, 14 }, + { 0x1F61, 14 }, { 0x01DC, 9 }, { 0x01DD, 9 }, { 0x1F62, 14 }, + { 0x1F63, 14 }, { 0x1F64, 14 }, { 0x1F65, 14 }, { 0x1F66, 14 }, + { 0x1F67, 14 }, { 0x001F, 5 }, { 0x03ED, 11 }, { 0x00EF, 8 }, + { 0x01F7, 10 }, + }, +}; + +static const uint16_t x8_ac1_highquant_table[8][77][2] = { + { // 0 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, + { 0x0008, 5 }, { 0x0009, 5 }, { 0x0014, 6 }, { 0x002A, 7 }, + { 0x0016, 6 }, { 0x002B, 7 }, { 0x005C, 8 }, { 0x002F, 7 }, + { 0x0030, 7 }, { 0x005D, 8 }, { 0x0062, 8 }, { 0x00C6, 9 }, + { 0x0007, 4 }, { 0x0019, 6 }, { 0x001A, 6 }, { 0x0036, 7 }, + { 0x0010, 5 }, { 0x006E, 8 }, { 0x0022, 6 }, { 0x0009, 4 }, + { 0x000A, 4 }, { 0x0016, 5 }, { 0x0023, 6 }, { 0x002E, 6 }, + { 0x002F, 6 }, { 0x0030, 6 }, { 0x0062, 7 }, { 0x0063, 7 }, + { 0x0064, 7 }, { 0x0065, 7 }, { 0x0066, 7 }, { 0x0067, 7 }, + { 0x0068, 7 }, { 0x0069, 7 }, { 0x006A, 7 }, { 0x006B, 7 }, + { 0x006C, 7 }, { 0x00C7, 9 }, { 0x00DE, 9 }, { 0x00DF, 9 }, + { 0x06D0, 11 }, { 0x01B5, 9 }, { 0x0037, 6 }, { 0x00DB, 8 }, + { 0x001C, 5 }, { 0x0074, 7 }, { 0x01D4, 9 }, { 0x01D5, 9 }, + { 0x0076, 7 }, { 0x0369, 10 }, { 0x3688, 14 }, { 0x3689, 14 }, + { 0x368A, 14 }, { 0x0077, 7 }, { 0x03AC, 10 }, { 0x0078, 7 }, + { 0x00F2, 8 }, { 0x01D7, 9 }, { 0x00F3, 8 }, { 0x007A, 7 }, + { 0x368B, 14 }, { 0x007B, 7 }, { 0x007C, 7 }, { 0x03AD, 10 }, + { 0x03E8, 10 }, { 0x368C, 14 }, { 0x368D, 14 }, { 0x03E9, 10 }, + { 0x368E, 14 }, { 0x003F, 6 }, { 0x01F5, 9 }, { 0x00FB, 8 }, + { 0x368F, 14 }, + }, + { // 1 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, + { 0x0018, 6 }, { 0x0032, 7 }, { 0x0033, 7 }, { 0x0034, 7 }, + { 0x006A, 8 }, { 0x00D6, 9 }, { 0x00D7, 9 }, { 0x00D8, 9 }, + { 0x00D9, 9 }, { 0x3680, 15 }, { 0x01B5, 10 }, { 0x0369, 11 }, + { 0x0004, 3 }, { 0x000E, 5 }, { 0x001E, 6 }, { 0x0037, 7 }, + { 0x000A, 4 }, { 0x0016, 5 }, { 0x000C, 4 }, { 0x001F, 6 }, + { 0x005C, 7 }, { 0x005D, 7 }, { 0x00BC, 8 }, { 0x00BD, 8 }, + { 0x005F, 7 }, { 0x00D0, 8 }, { 0x00DB, 9 }, { 0x00D1, 8 }, + { 0x01A4, 9 }, { 0x01A5, 9 }, { 0x01A6, 9 }, { 0x01A7, 9 }, + { 0x0350, 10 }, { 0x06A2, 11 }, { 0x06A3, 11 }, { 0x01A9, 9 }, + { 0x01AA, 9 }, { 0x06AC, 11 }, { 0x3681, 15 }, { 0x0357, 10 }, + { 0x3682, 15 }, { 0x3683, 15 }, { 0x3684, 15 }, { 0x3685, 15 }, + { 0x0036, 6 }, { 0x00D6, 8 }, { 0x3686, 15 }, { 0x3687, 15 }, + { 0x000E, 4 }, { 0x006E, 7 }, { 0x00D7, 8 }, { 0x06AD, 11 }, + { 0x3688, 15 }, { 0x001E, 5 }, { 0x00DE, 8 }, { 0x06F8, 11 }, + { 0x037D, 10 }, { 0x3689, 15 }, { 0x368A, 15 }, { 0x368B, 15 }, + { 0x368C, 15 }, { 0x01BF, 9 }, { 0x368D, 15 }, { 0x1B47, 14 }, + { 0x37C8, 14 }, { 0x37C9, 14 }, { 0x37CA, 14 }, { 0x37CB, 14 }, + { 0x37CC, 14 }, { 0x001F, 5 }, { 0x37CD, 14 }, { 0x37CE, 14 }, + { 0x37CF, 14 }, + }, + { // 2 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0012, 6 }, { 0x0026, 7 }, { 0x0014, 6 }, { 0x0027, 7 }, + { 0x00A8, 9 }, { 0x00A9, 9 }, { 0x0055, 8 }, { 0x2B00, 15 }, + { 0x00AD, 9 }, { 0x2B01, 15 }, { 0x2B02, 15 }, { 0x2B03, 15 }, + { 0x0003, 3 }, { 0x000B, 5 }, { 0x0040, 7 }, { 0x0041, 7 }, + { 0x0009, 4 }, { 0x0021, 6 }, { 0x0011, 5 }, { 0x000A, 4 }, + { 0x000B, 4 }, { 0x0018, 5 }, { 0x0032, 6 }, { 0x0033, 6 }, + { 0x0034, 6 }, { 0x0035, 6 }, { 0x006C, 7 }, { 0x0057, 8 }, + { 0x006D, 7 }, { 0x00DC, 8 }, { 0x0159, 10 }, { 0x00DD, 8 }, + { 0x01BC, 9 }, { 0x037A, 10 }, { 0x037B, 10 }, { 0x0038, 6 }, + { 0x0072, 7 }, { 0x01BE, 9 }, { 0x01BF, 9 }, { 0x00E6, 8 }, + { 0x039C, 10 }, { 0x01CF, 9 }, { 0x2B04, 15 }, { 0x2B05, 15 }, + { 0x0074, 7 }, { 0x01D4, 9 }, { 0x2B06, 15 }, { 0x2B07, 15 }, + { 0x001E, 5 }, { 0x00EB, 8 }, { 0x1584, 14 }, { 0x1585, 14 }, + { 0x1586, 14 }, { 0x003B, 6 }, { 0x01D5, 9 }, { 0x01F0, 9 }, + { 0x039D, 10 }, { 0x03E2, 10 }, { 0x1587, 14 }, { 0x1588, 14 }, + { 0x1589, 14 }, { 0x00F9, 8 }, { 0x158A, 14 }, { 0x158B, 14 }, + { 0x03E3, 10 }, { 0x158C, 14 }, { 0x158D, 14 }, { 0x01F4, 9 }, + { 0x158E, 14 }, { 0x003F, 6 }, { 0x00FB, 8 }, { 0x01F5, 9 }, + { 0x158F, 14 }, + }, + { // 3 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x0007, 5 }, + { 0x0010, 6 }, { 0x0011, 6 }, { 0x0024, 7 }, { 0x0025, 7 }, + { 0x0013, 6 }, { 0x0014, 6 }, { 0x002A, 7 }, { 0x002B, 7 }, + { 0x00B0, 9 }, { 0x00B1, 9 }, { 0x002D, 7 }, { 0x0059, 8 }, + { 0x000C, 5 }, { 0x0017, 6 }, { 0x00D0, 9 }, { 0x0035, 7 }, + { 0x001B, 6 }, { 0x0038, 7 }, { 0x0039, 7 }, { 0x0004, 3 }, + { 0x0005, 3 }, { 0x000F, 5 }, { 0x0018, 5 }, { 0x001D, 6 }, + { 0x0032, 6 }, { 0x0033, 6 }, { 0x0068, 7 }, { 0x0069, 7 }, + { 0x0069, 8 }, { 0x00D4, 8 }, { 0x00D5, 8 }, { 0x00D6, 8 }, + { 0x006C, 7 }, { 0x0037, 6 }, { 0x006D, 7 }, { 0x0070, 7 }, + { 0x0039, 6 }, { 0x00D7, 8 }, { 0x00D1, 9 }, { 0x3880, 14 }, + { 0x3881, 14 }, { 0x3882, 14 }, { 0x0074, 7 }, { 0x01C5, 9 }, + { 0x0075, 7 }, { 0x00E3, 8 }, { 0x3883, 14 }, { 0x3884, 14 }, + { 0x00EC, 8 }, { 0x3885, 14 }, { 0x1C43, 13 }, { 0x1C44, 13 }, + { 0x1C45, 13 }, { 0x00ED, 8 }, { 0x1C46, 13 }, { 0x003C, 6 }, + { 0x0077, 7 }, { 0x01E8, 9 }, { 0x003E, 6 }, { 0x007B, 7 }, + { 0x1C47, 13 }, { 0x007E, 7 }, { 0x007F, 7 }, { 0x1C48, 13 }, + { 0x1C49, 13 }, { 0x1C4A, 13 }, { 0x1C4B, 13 }, { 0x1C4C, 13 }, + { 0x1C4D, 13 }, { 0x00F5, 8 }, { 0x1C4E, 13 }, { 0x01E9, 9 }, + { 0x1C4F, 13 }, + }, + { // 4 + { 0x0000, 2 }, { 0x0004, 4 }, { 0x000A, 5 }, { 0x000B, 5 }, + { 0x0018, 6 }, { 0x0019, 6 }, { 0x0034, 7 }, { 0x0035, 7 }, + { 0x0036, 7 }, { 0x006E, 8 }, { 0x00DE, 9 }, { 0x00DF, 9 }, + { 0x01C0, 10 }, { 0x01C1, 10 }, { 0x01C2, 10 }, { 0x3860, 15 }, + { 0x0004, 3 }, { 0x000F, 5 }, { 0x001D, 6 }, { 0x0039, 7 }, + { 0x000A, 4 }, { 0x002C, 6 }, { 0x002D, 6 }, { 0x000C, 4 }, + { 0x0017, 5 }, { 0x0034, 6 }, { 0x0035, 6 }, { 0x0036, 6 }, + { 0x006E, 7 }, { 0x006F, 7 }, { 0x0070, 7 }, { 0x0071, 7 }, + { 0x0071, 8 }, { 0x00E4, 8 }, { 0x00E5, 8 }, { 0x00E6, 8 }, + { 0x00E7, 8 }, { 0x00E8, 8 }, { 0x03A4, 10 }, { 0x0075, 7 }, + { 0x00EC, 8 }, { 0x01D3, 9 }, { 0x01DA, 9 }, { 0x03A5, 10 }, + { 0x03B6, 10 }, { 0x070D, 12 }, { 0x03B7, 10 }, { 0x070E, 12 }, + { 0x003C, 6 }, { 0x00EE, 8 }, { 0x3861, 15 }, { 0x3862, 15 }, + { 0x003D, 6 }, { 0x01DE, 9 }, { 0x3863, 15 }, { 0x3864, 15 }, + { 0x3865, 15 }, { 0x007C, 7 }, { 0x070F, 12 }, { 0x03BE, 10 }, + { 0x03BF, 10 }, { 0x3866, 15 }, { 0x0FA0, 12 }, { 0x07D1, 11 }, + { 0x3867, 15 }, { 0x00FB, 8 }, { 0x01F5, 9 }, { 0x7D08, 15 }, + { 0x0FA4, 12 }, { 0x7D09, 15 }, { 0x7D0A, 15 }, { 0x7D0B, 15 }, + { 0x3E86, 14 }, { 0x003F, 6 }, { 0x0FA5, 12 }, { 0x07D3, 11 }, + { 0x3E87, 14 }, + }, + { // 5 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0009, 5 }, { 0x0014, 6 }, { 0x002A, 7 }, { 0x0056, 8 }, + { 0x02B8, 11 }, { 0x00AF, 9 }, { 0x02B9, 11 }, { 0x015D, 10 }, + { 0x02C0, 11 }, { 0x2C10, 15 }, { 0x2C11, 15 }, { 0x2C12, 15 }, + { 0x0006, 4 }, { 0x000E, 5 }, { 0x0017, 6 }, { 0x002D, 7 }, + { 0x000F, 5 }, { 0x0040, 7 }, { 0x0021, 6 }, { 0x0005, 3 }, + { 0x0009, 4 }, { 0x0011, 5 }, { 0x0018, 5 }, { 0x0019, 5 }, + { 0x001A, 5 }, { 0x0036, 6 }, { 0x0037, 6 }, { 0x0041, 7 }, + { 0x0059, 8 }, { 0x00E0, 8 }, { 0x00E1, 8 }, { 0x0071, 7 }, + { 0x00E4, 8 }, { 0x00B1, 9 }, { 0x02C2, 11 }, { 0x001D, 5 }, + { 0x0073, 7 }, { 0x00E5, 8 }, { 0x00F0, 8 }, { 0x0079, 7 }, + { 0x03C4, 10 }, { 0x01E3, 9 }, { 0x01E8, 9 }, { 0x2C13, 15 }, + { 0x007B, 7 }, { 0x2C14, 15 }, { 0x2C15, 15 }, { 0x2C16, 15 }, + { 0x007C, 7 }, { 0x02C3, 11 }, { 0x2C17, 15 }, { 0x160C, 14 }, + { 0x160D, 14 }, { 0x007D, 7 }, { 0x160E, 14 }, { 0x01E9, 9 }, + { 0x03C5, 10 }, { 0x03D4, 10 }, { 0x01EB, 9 }, { 0x160F, 14 }, + { 0x3D50, 14 }, { 0x00FC, 8 }, { 0x07AB, 11 }, { 0x3D51, 14 }, + { 0x3D52, 14 }, { 0x3D53, 14 }, { 0x3D54, 14 }, { 0x01FA, 9 }, + { 0x3D55, 14 }, { 0x007F, 7 }, { 0x01FB, 9 }, { 0x3D56, 14 }, + { 0x3D57, 14 }, + }, + { // 6 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0003, 4 }, { 0x0008, 5 }, + { 0x0009, 5 }, { 0x000A, 5 }, { 0x000B, 5 }, { 0x0018, 6 }, + { 0x0032, 7 }, { 0x000D, 5 }, { 0x0033, 7 }, { 0x0E00, 13 }, + { 0x0039, 7 }, { 0x0E01, 13 }, { 0x003A, 7 }, { 0x0E02, 13 }, + { 0x0008, 4 }, { 0x001E, 6 }, { 0x003B, 7 }, { 0x003E, 7 }, + { 0x0012, 5 }, { 0x003F, 7 }, { 0x0013, 5 }, { 0x0028, 6 }, + { 0x0029, 6 }, { 0x0054, 7 }, { 0x002B, 6 }, { 0x0055, 7 }, + { 0x0058, 7 }, { 0x0E03, 13 }, { 0x0059, 7 }, { 0x005A, 7 }, + { 0x0E04, 13 }, { 0x0E05, 13 }, { 0x0703, 12 }, { 0x005B, 7 }, + { 0x005C, 7 }, { 0x0704, 12 }, { 0x0705, 12 }, { 0x005D, 7 }, + { 0x0706, 12 }, { 0x0707, 12 }, { 0x0708, 12 }, { 0x0709, 12 }, + { 0x070A, 12 }, { 0x070B, 12 }, { 0x0018, 5 }, { 0x002F, 6 }, + { 0x000D, 4 }, { 0x0019, 5 }, { 0x070C, 12 }, { 0x0070, 7 }, + { 0x001D, 5 }, { 0x070D, 12 }, { 0x070E, 12 }, { 0x070F, 12 }, + { 0x0710, 12 }, { 0x0039, 6 }, { 0x0711, 12 }, { 0x003C, 6 }, + { 0x0712, 12 }, { 0x0713, 12 }, { 0x0714, 12 }, { 0x0715, 12 }, + { 0x0716, 12 }, { 0x003D, 6 }, { 0x0717, 12 }, { 0x0718, 12 }, + { 0x0719, 12 }, { 0x071A, 12 }, { 0x071B, 12 }, { 0x071C, 12 }, + { 0x071D, 12 }, { 0x001F, 5 }, { 0x071E, 12 }, { 0x0071, 7 }, + { 0x071F, 12 }, + }, + { // 7 + { 0x0000, 3 }, { 0x0002, 4 }, { 0x0006, 5 }, { 0x000E, 6 }, + { 0x000F, 6 }, { 0x0040, 8 }, { 0x0041, 8 }, { 0x0042, 8 }, + { 0x0218, 11 }, { 0x2190, 15 }, { 0x2191, 15 }, { 0x2192, 15 }, + { 0x2193, 15 }, { 0x2194, 15 }, { 0x2195, 15 }, { 0x2196, 15 }, + { 0x0005, 4 }, { 0x0011, 6 }, { 0x0024, 7 }, { 0x0087, 9 }, + { 0x000C, 5 }, { 0x004A, 8 }, { 0x004B, 8 }, { 0x0002, 2 }, + { 0x0006, 3 }, { 0x000D, 5 }, { 0x000E, 5 }, { 0x000F, 5 }, + { 0x0013, 6 }, { 0x0038, 6 }, { 0x00E4, 8 }, { 0x00E5, 8 }, + { 0x01CC, 9 }, { 0x00E7, 8 }, { 0x0074, 7 }, { 0x00EA, 8 }, + { 0x01CD, 9 }, { 0x021A, 11 }, { 0x2197, 15 }, { 0x001E, 5 }, + { 0x0076, 7 }, { 0x00EB, 8 }, { 0x01DC, 9 }, { 0x00EF, 8 }, + { 0x01DD, 9 }, { 0x01F0, 9 }, { 0x2198, 15 }, { 0x2199, 15 }, + { 0x00F9, 8 }, { 0x03E2, 10 }, { 0x219A, 15 }, { 0x219B, 15 }, + { 0x00FA, 8 }, { 0x219C, 15 }, { 0x219D, 15 }, { 0x219E, 15 }, + { 0x219F, 15 }, { 0x01F6, 9 }, { 0x21B0, 15 }, { 0x00FC, 8 }, + { 0x01F7, 9 }, { 0x21B1, 15 }, { 0x21B2, 15 }, { 0x21B3, 15 }, + { 0x21B4, 15 }, { 0x01FA, 9 }, { 0x21B5, 15 }, { 0x21B6, 15 }, + { 0x21B7, 15 }, { 0x21B8, 15 }, { 0x21B9, 15 }, { 0x03E3, 10 }, + { 0x10DD, 14 }, { 0x007F, 7 }, { 0x01FB, 9 }, { 0x10DE, 14 }, + { 0x10DF, 14 }, + }, +}; +#define MAX_AC_VLC_BITS 16 + +#endif /* AVCODEC_INTRAX8HUF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi.h new file mode 100644 index 00000000..14275355 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi.h @@ -0,0 +1,342 @@ +/* + * common functions for Indeo Video Interactive codecs (Indeo4 and Indeo5) + * + * Copyright (c) 2009 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * This file contains structures and macros shared by both Indeo4 and + * Indeo5 decoders. + */ + +#ifndef AVCODEC_IVI_H +#define AVCODEC_IVI_H + +#include "avcodec.h" +#include "get_bits.h" +#include + +/** + * Indeo 4 frame types. + */ +enum { + IVI4_FRAMETYPE_INTRA = 0, + IVI4_FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding + IVI4_FRAMETYPE_INTER = 2, ///< non-droppable P-frame + IVI4_FRAMETYPE_BIDIR = 3, ///< bidirectional frame + IVI4_FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame + IVI4_FRAMETYPE_NULL_FIRST = 5, ///< empty frame with no data + IVI4_FRAMETYPE_NULL_LAST = 6 ///< empty frame with no data +}; + +#define IVI_VLC_BITS 13 ///< max number of bits of the ivi's huffman codes +#define IVI5_IS_PROTECTED 0x20 + +/** + * huffman codebook descriptor + */ +typedef struct IVIHuffDesc { + int32_t num_rows; + uint8_t xbits[16]; +} IVIHuffDesc; + +/** + * macroblock/block huffman table descriptor + */ +typedef struct IVIHuffTab { + int32_t tab_sel; /// index of one of the predefined tables + /// or "7" for custom one + VLC *tab; /// pointer to the table associated with tab_sel + + /// the following are used only when tab_sel == 7 + IVIHuffDesc cust_desc; /// custom Huffman codebook descriptor + VLC cust_tab; /// vlc table for custom codebook +} IVIHuffTab; + +enum { + IVI_MB_HUFF = 0, /// Huffman table is used for coding macroblocks + IVI_BLK_HUFF = 1 /// Huffman table is used for coding blocks +}; + + +/** + * Common scan patterns (defined in ivi_common.c) + */ +extern const uint8_t ff_ivi_vertical_scan_8x8[64]; +extern const uint8_t ff_ivi_horizontal_scan_8x8[64]; +extern const uint8_t ff_ivi_direct_scan_4x4[16]; + + +/** + * Declare inverse transform function types + */ +typedef void (InvTransformPtr)(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags); +typedef void (DCTransformPtr) (const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size); + + +/** + * run-value (RLE) table descriptor + */ +typedef struct RVMapDesc { + uint8_t eob_sym; ///< end of block symbol + uint8_t esc_sym; ///< escape symbol + uint8_t runtab[256]; + int8_t valtab[256]; +} RVMapDesc; + +extern const RVMapDesc ff_ivi_rvmap_tabs[9]; + + +/** + * information for Indeo macroblock (16x16, 8x8 or 4x4) + */ +typedef struct IVIMbInfo { + int16_t xpos; + int16_t ypos; + uint32_t buf_offs; ///< address in the output buffer for this mb + uint8_t type; ///< macroblock type: 0 - INTRA, 1 - INTER + uint8_t cbp; ///< coded block pattern + int8_t q_delta; ///< quant delta + int8_t mv_x; ///< motion vector (x component) + int8_t mv_y; ///< motion vector (y component) + int8_t b_mv_x; ///< second motion vector (x component) + int8_t b_mv_y; ///< second motion vector (y component) +} IVIMbInfo; + + +/** + * information for Indeo tile + */ +typedef struct IVITile { + int xpos; + int ypos; + int width; + int height; + int mb_size; + int is_empty; ///< = 1 if this tile doesn't contain any data + int data_size; ///< size of the data in bytes + int num_MBs; ///< number of macroblocks in this tile + IVIMbInfo *mbs; ///< array of macroblock descriptors + IVIMbInfo *ref_mbs; ///< ptr to the macroblock descriptors of the reference tile +} IVITile; + + +/** + * information for Indeo wavelet band + */ +typedef struct IVIBandDesc { + int plane; ///< plane number this band belongs to + int band_num; ///< band number + int width; + int height; + int aheight; ///< aligned band height + const uint8_t *data_ptr; ///< ptr to the first byte of the band data + int data_size; ///< size of the band data + int16_t *buf; ///< pointer to the output buffer for this band + int16_t *ref_buf; ///< pointer to the reference frame buffer (for motion compensation) + int16_t *b_ref_buf; ///< pointer to the second reference frame buffer (for motion compensation) + int16_t *bufs[4]; ///< array of pointers to the band buffers + ptrdiff_t pitch; ///< pitch associated with the buffers above + int is_empty; ///< = 1 if this band doesn't contain any data + int mb_size; ///< macroblock size + int blk_size; ///< block size + int is_halfpel; ///< precision of the motion compensation: 0 - fullpel, 1 - halfpel + int inherit_mv; ///< tells if motion vector is inherited from reference macroblock + int inherit_qdelta; ///< tells if quantiser delta is inherited from reference macroblock + int qdelta_present; ///< tells if Qdelta signal is present in the bitstream (Indeo5 only) + int quant_mat; ///< dequant matrix index + int glob_quant; ///< quant base for this band + const uint8_t *scan; ///< ptr to the scan pattern + int scan_size; ///< size of the scantable + + IVIHuffTab blk_vlc; ///< vlc table for decoding block data + + int num_corr; ///< number of correction entries + uint8_t corr[61*2]; ///< rvmap correction pairs + int rvmap_sel; ///< rvmap table selector + RVMapDesc *rv_map; ///< ptr to the RLE table for this band + int num_tiles; ///< number of tiles in this band + IVITile *tiles; ///< array of tile descriptors + InvTransformPtr *inv_transform; + int transform_size; + DCTransformPtr *dc_transform; + int is_2d_trans; ///< 1 indicates that the two-dimensional inverse transform is used + int32_t checksum; ///< for debug purposes + int checksum_present; + int bufsize; ///< band buffer size in bytes + const uint16_t *intra_base; ///< quantization matrix for intra blocks + const uint16_t *inter_base; ///< quantization matrix for inter blocks + const uint8_t *intra_scale; ///< quantization coefficient for intra blocks + const uint8_t *inter_scale; ///< quantization coefficient for inter blocks +} IVIBandDesc; + + +/** + * color plane (luma or chroma) information + */ +typedef struct IVIPlaneDesc { + uint16_t width; + uint16_t height; + uint8_t num_bands; ///< number of bands this plane subdivided into + IVIBandDesc *bands; ///< array of band descriptors +} IVIPlaneDesc; + + +typedef struct IVIPicConfig { + uint16_t pic_width; + uint16_t pic_height; + uint16_t chroma_width; + uint16_t chroma_height; + uint16_t tile_width; + uint16_t tile_height; + uint8_t luma_bands; + uint8_t chroma_bands; +} IVIPicConfig; + +typedef struct IVI45DecContext { + GetBitContext gb; + RVMapDesc rvmap_tabs[9]; ///< local corrected copy of the static rvmap tables + + uint32_t frame_num; + int frame_type; + int prev_frame_type; ///< frame type of the previous frame + uint32_t data_size; ///< size of the frame data in bytes from picture header + int is_scalable; + const uint8_t *frame_data; ///< input frame data pointer + int inter_scal; ///< signals a sequence of scalable inter frames + uint32_t frame_size; ///< frame size in bytes + uint32_t pic_hdr_size; ///< picture header size in bytes + uint8_t frame_flags; + uint16_t checksum; ///< frame checksum + + IVIPicConfig pic_conf; + IVIPlaneDesc planes[3]; ///< color planes + + int buf_switch; ///< used to switch between three buffers + int dst_buf; ///< buffer index for the currently decoded frame + int ref_buf; ///< inter frame reference buffer index + int ref2_buf; ///< temporal storage for switching buffers + int b_ref_buf; ///< second reference frame buffer index + + IVIHuffTab mb_vlc; ///< current macroblock table descriptor + IVIHuffTab blk_vlc; ///< current block table descriptor + + uint8_t rvmap_sel; + uint8_t in_imf; + uint8_t in_q; ///< flag for explicitly stored quantiser delta + uint8_t pic_glob_quant; + uint8_t unknown1; + + uint16_t gop_hdr_size; + uint8_t gop_flags; + uint32_t lock_word; + + int show_indeo4_info; + uint8_t has_b_frames; + uint8_t has_transp; ///< transparency mode status: 1 - enabled + uint8_t uses_tiling; + uint8_t uses_haar; + uint8_t uses_fullpel; + + int (*decode_pic_hdr) (struct IVI45DecContext *ctx, AVCodecContext *avctx); + int (*decode_band_hdr) (struct IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx); + int (*decode_mb_info) (struct IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx); + void (*switch_buffers) (struct IVI45DecContext *ctx); + int (*is_nonnull_frame)(struct IVI45DecContext *ctx); + + int gop_invalid; + int buf_invalid[4]; + + int is_indeo4; + + AVFrame *p_frame; + int got_p_frame; +} IVI45DecContext; + +/** compare some properties of two pictures */ +static inline int ivi_pic_config_cmp(IVIPicConfig *str1, IVIPicConfig *str2) +{ + return str1->pic_width != str2->pic_width || str1->pic_height != str2->pic_height || + str1->chroma_width != str2->chroma_width || str1->chroma_height != str2->chroma_height || + str1->tile_width != str2->tile_width || str1->tile_height != str2->tile_height || + str1->luma_bands != str2->luma_bands || str1->chroma_bands != str2->chroma_bands; +} + +/** calculate number of tiles in a stride */ +#define IVI_NUM_TILES(stride, tile_size) (((stride) + (tile_size) - 1) / (tile_size)) + +/** calculate number of macroblocks in a tile */ +#define IVI_MBs_PER_TILE(tile_width, tile_height, mb_size) \ + ((((tile_width) + (mb_size) - 1) / (mb_size)) * (((tile_height) + (mb_size) - 1) / (mb_size))) + +/** convert unsigned values into signed ones (the sign is in the LSB) */ +#define IVI_TOSIGNED(val) (-(((val) >> 1) ^ -((val) & 1))) + +/** scale motion vector */ +static inline int ivi_scale_mv(int mv, int mv_scale) +{ + return (mv + (mv > 0) + (mv_scale - 1)) >> mv_scale; +} + +/** + * Initialize static codes used for macroblock and block decoding. + */ +void ff_ivi_init_static_vlc(void); + +/** + * Decode a huffman codebook descriptor from the bitstream + * and select specified huffman table. + * + * @param[in,out] gb the GetBit context + * @param[in] desc_coded flag signalling if table descriptor was coded + * @param[in] which_tab codebook purpose (IVI_MB_HUFF or IVI_BLK_HUFF) + * @param[out] huff_tab pointer to the descriptor of the selected table + * @param[in] avctx AVCodecContext pointer + * @return zero on success, negative value otherwise + */ +int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab, + IVIHuffTab *huff_tab, AVCodecContext *avctx); + +/** + * Initialize planes (prepares descriptors, allocates buffers etc). + * + * @param[in,out] planes pointer to the array of the plane descriptors + * @param[in] cfg pointer to the ivi_pic_config structure describing picture layout + * @param[in] is_indeo4 flag signalling if it is Indeo 4 or not + * @return result code: 0 - OK + */ +int ff_ivi_init_planes(AVCodecContext *avctx, IVIPlaneDesc *planes, + const IVIPicConfig *cfg, int is_indeo4); + +/** + * Initialize tile and macroblock descriptors. + * + * @param[in,out] planes pointer to the array of the plane descriptors + * @param[in] tile_width tile width + * @param[in] tile_height tile height + * @return result code: 0 - OK + */ +int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height); + +int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, + AVPacket *avpkt); +int ff_ivi_decode_close(AVCodecContext *avctx); + +#endif /* AVCODEC_IVI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi_dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi_dsp.h new file mode 100644 index 00000000..2704d2b9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ivi_dsp.h @@ -0,0 +1,348 @@ +/* + * DSP functions for Indeo Video Interactive codecs (Indeo4 and Indeo5) + * + * Copyright (c) 2009-2011 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DSP functions (inverse transforms, motion compensations, wavelet recomposition) + * for Indeo Video Interactive codecs. + */ + +#ifndef AVCODEC_IVI_DSP_H +#define AVCODEC_IVI_DSP_H + +#include +#include + +#include "ivi.h" + +/** + * 5/3 wavelet recomposition filter for Indeo5 + * + * @param[in] plane pointer to the descriptor of the plane being processed + * @param[out] dst pointer to the destination buffer + * @param[in] dst_pitch pitch of the destination buffer + */ +void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, + const ptrdiff_t dst_pitch); + +/** + * Haar wavelet recomposition filter for Indeo 4 + * + * @param[in] plane pointer to the descriptor of the plane being processed + * @param[out] dst pointer to the destination buffer + * @param[in] dst_pitch pitch of the destination buffer + */ +void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, + const ptrdiff_t dst_pitch); + +/** + * two-dimensional inverse Haar 8x8 transform for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); +void ff_ivi_inverse_haar_8x1(const int32_t *in, int16_t *out, uint32_t pitch, + const uint8_t *flags); +void ff_ivi_inverse_haar_1x8(const int32_t *in, int16_t *out, uint32_t pitch, + const uint8_t *flags); + +/** + * one-dimensional inverse 8-point Haar transform on rows for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_row_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * one-dimensional inverse 8-point Haar transform on columns for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_col_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * two-dimensional inverse Haar 4x4 transform for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * one-dimensional inverse 4-point Haar transform on rows for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_row_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * one-dimensional inverse 4-point Haar transform on columns for Indeo 4 + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_col_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * DC-only two-dimensional inverse Haar transform for Indeo 4. + * Performing the inverse transform in this case is equivalent to + * spreading DC_coeff >> 3 over the whole block. + * + * @param[in] in pointer to the dc coefficient + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] blk_size transform block size + */ +void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch, + int blk_size); + +/** + * two-dimensional inverse slant 8x8 transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * two-dimensional inverse slant 4x4 transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * DC-only two-dimensional inverse slant transform. + * Performing the inverse slant transform in this case is equivalent to + * spreading (DC_coeff + 1)/2 over the whole block. + * It works much faster than performing the slant transform on a vector of zeroes. + * + * @param[in] in pointer to the dc coefficient + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] blk_size transform block size + */ +void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size); + +/** + * inverse 1D row slant transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags (unused here) + */ +void ff_ivi_row_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * inverse 1D column slant transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_col_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * inverse 1D row slant transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags (unused here) + */ +void ff_ivi_row_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * inverse 1D column slant transform + * + * @param[in] in pointer to the vector of transform coefficients + * @param[out] out pointer to the output buffer (frame) + * @param[in] pitch pitch to move to the next y line + * @param[in] flags pointer to the array of column flags: + * != 0 - non_empty column, 0 - empty one + * (this array must be filled by caller) + */ +void ff_ivi_col_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch, + const uint8_t *flags); + +/** + * DC-only inverse row slant transform + */ +void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size); + +/** + * DC-only inverse column slant transform + */ +void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size); + +/** + * Copy the pixels into the frame buffer. + */ +void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags); + +/** + * Copy the DC coefficient into the first pixel of the block and + * zero all others. + */ +void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size); + +/** + * 8x8 block motion compensation with adding delta + * + * @param[in,out] buf pointer to the block in the current frame buffer containing delta + * @param[in] ref_buf pointer to the corresponding block in the reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type + */ +void ff_ivi_mc_8x8_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type); + +/** + * 4x4 block motion compensation with adding delta + * + * @param[in,out] buf pointer to the block in the current frame buffer containing delta + * @param[in] ref_buf pointer to the corresponding block in the reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type + */ +void ff_ivi_mc_4x4_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type); + +/** + * motion compensation without adding delta + * + * @param[in,out] buf pointer to the block in the current frame receiving the result + * @param[in] ref_buf pointer to the corresponding block in the reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type + */ +void ff_ivi_mc_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type); + +/** + * 4x4 block motion compensation without adding delta + * + * @param[in,out] buf pointer to the block in the current frame receiving the result + * @param[in] ref_buf pointer to the corresponding block in the reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type + */ +void ff_ivi_mc_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type); + +/** + * 8x8 block motion compensation with adding delta + * + * @param[in,out] buf pointer to the block in the current frame buffer containing delta + * @param[in] ref_buf pointer to the corresponding block in the backward reference frame + * @param[in] ref_buf2 pointer to the corresponding block in the forward reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type for backward reference + * @param[in] mc_type2 interpolation type for forward reference + */ +void ff_ivi_mc_avg_8x8_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2); + +/** + * 4x4 block motion compensation with adding delta + * + * @param[in,out] buf pointer to the block in the current frame buffer containing delta + * @param[in] ref_buf pointer to the corresponding block in the backward reference frame + * @param[in] ref_buf2 pointer to the corresponding block in the forward reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type for backward reference + * @param[in] mc_type2 interpolation type for forward reference + */ +void ff_ivi_mc_avg_4x4_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2); + +/** + * motion compensation without adding delta for B-frames + * + * @param[in,out] buf pointer to the block in the current frame receiving the result + * @param[in] ref_buf pointer to the corresponding block in the backward reference frame + * @param[in] ref_buf2 pointer to the corresponding block in the forward reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type for backward reference + * @param[in] mc_type2 interpolation type for forward reference + */ +void ff_ivi_mc_avg_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2); + +/** + * 4x4 block motion compensation without adding delta for B-frames + * + * @param[in,out] buf pointer to the block in the current frame receiving the result + * @param[in] ref_buf pointer to the corresponding block in the backward reference frame + * @param[in] ref_buf2 pointer to the corresponding block in the forward reference frame + * @param[in] pitch pitch for moving to the next y line + * @param[in] mc_type interpolation type for backward reference + * @param[in] mc_type2 interpolation type for forward reference + */ +void ff_ivi_mc_avg_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2); + +#endif /* AVCODEC_IVI_DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jacosub.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jacosub.h new file mode 100644 index 00000000..c3665ae3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jacosub.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2012 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * JACOsub shared utils + */ + +#ifndef AVCODEC_JACOSUB_H +#define AVCODEC_JACOSUB_H + +#include "libavutil/common.h" + +#define JSS_MAX_LINESIZE 512 + +static av_always_inline int jss_whitespace(char c) +{ + return c == ' ' || (c >= '\t' && c <= '\r'); +} + +static av_always_inline const char *jss_skip_whitespace(const char *p) +{ + while (jss_whitespace(*p)) + p++; + return p; +} + +#endif /* AVCODEC_JACOSUB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jni.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jni.h new file mode 100644 index 00000000..dd99e926 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jni.h @@ -0,0 +1,46 @@ +/* + * JNI public API functions + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JNI_H +#define AVCODEC_JNI_H + +/* + * Manually set a Java virtual machine which will be used to retrieve the JNI + * environment. Once a Java VM is set it cannot be changed afterwards, meaning + * you can call multiple times av_jni_set_java_vm with the same Java VM pointer + * however it will error out if you try to set a different Java VM. + * + * @param vm Java virtual machine + * @param log_ctx context used for logging, can be NULL + * @return 0 on success, < 0 otherwise + */ +int av_jni_set_java_vm(void *vm, void *log_ctx); + +/* + * Get the Java virtual machine which has been set with av_jni_set_java_vm. + * + * @param vm Java virtual machine + * @return a pointer to the Java virtual machine + */ +void *av_jni_get_java_vm(void *log_ctx); + +#endif /* AVCODEC_JNI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000.h new file mode 100644 index 00000000..0f827169 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000.h @@ -0,0 +1,292 @@ +/* + * JPEG 2000 common defines, structures and functions + * Copyright (c) 2007 Kamil Nowosad + * Copyright (c) 2013 Nicolas Bertrand + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000_H +#define AVCODEC_JPEG2000_H + +/** + * @file + * JPEG 2000 structures and defines common + * to encoder and decoder + */ + +#include + +#include "avcodec.h" +#include "mqc.h" +#include "jpeg2000dwt.h" + +enum Jpeg2000Markers { + JPEG2000_SOC = 0xff4f, // start of codestream + JPEG2000_SIZ = 0xff51, // image and tile size + JPEG2000_COD, // coding style default + JPEG2000_COC, // coding style component + JPEG2000_TLM = 0xff55, // tile-part length, main header + JPEG2000_PLM = 0xff57, // packet length, main header + JPEG2000_PLT, // packet length, tile-part header + JPEG2000_QCD = 0xff5c, // quantization default + JPEG2000_QCC, // quantization component + JPEG2000_RGN, // region of interest + JPEG2000_POC, // progression order change + JPEG2000_PPM, // packed packet headers, main header + JPEG2000_PPT, // packed packet headers, tile-part header + JPEG2000_CRG = 0xff63, // component registration + JPEG2000_COM, // comment + JPEG2000_SOT = 0xff90, // start of tile-part + JPEG2000_SOP, // start of packet + JPEG2000_EPH, // end of packet header + JPEG2000_SOD, // start of data + JPEG2000_EOC = 0xffd9, // end of codestream +}; + +#define JPEG2000_SOP_FIXED_BYTES 0xFF910004 +#define JPEG2000_SOP_BYTE_LENGTH 6 + +enum Jpeg2000Quantsty { // quantization style + JPEG2000_QSTY_NONE, // no quantization + JPEG2000_QSTY_SI, // scalar derived + JPEG2000_QSTY_SE // scalar expounded +}; + +#define JPEG2000_MAX_DECLEVELS 33 +#define JPEG2000_MAX_RESLEVELS (JPEG2000_MAX_DECLEVELS + 1) + +#define JPEG2000_MAX_PASSES 100 + +// T1 flags +// flags determining significance of neighbor coefficients +#define JPEG2000_T1_SIG_N 0x0001 +#define JPEG2000_T1_SIG_E 0x0002 +#define JPEG2000_T1_SIG_W 0x0004 +#define JPEG2000_T1_SIG_S 0x0008 +#define JPEG2000_T1_SIG_NE 0x0010 +#define JPEG2000_T1_SIG_NW 0x0020 +#define JPEG2000_T1_SIG_SE 0x0040 +#define JPEG2000_T1_SIG_SW 0x0080 +#define JPEG2000_T1_SIG_NB (JPEG2000_T1_SIG_N | JPEG2000_T1_SIG_E | \ + JPEG2000_T1_SIG_S | JPEG2000_T1_SIG_W | \ + JPEG2000_T1_SIG_NE | JPEG2000_T1_SIG_NW | \ + JPEG2000_T1_SIG_SE | JPEG2000_T1_SIG_SW) +// flags determining sign bit of neighbor coefficients +#define JPEG2000_T1_SGN_N 0x0100 +#define JPEG2000_T1_SGN_S 0x0200 +#define JPEG2000_T1_SGN_W 0x0400 +#define JPEG2000_T1_SGN_E 0x0800 + +#define JPEG2000_T1_VIS 0x1000 +#define JPEG2000_T1_SIG 0x2000 +#define JPEG2000_T1_REF 0x4000 + +#define JPEG2000_T1_SGN 0x8000 + +// Codeblock coding styles +#define JPEG2000_CBLK_BYPASS 0x01 // Selective arithmetic coding bypass +#define JPEG2000_CBLK_RESET 0x02 // Reset context probabilities +#define JPEG2000_CBLK_TERMALL 0x04 // Terminate after each coding pass +#define JPEG2000_CBLK_VSC 0x08 // Vertical stripe causal context formation +#define JPEG2000_CBLK_PREDTERM 0x10 // Predictable termination +#define JPEG2000_CBLK_SEGSYM 0x20 // Segmentation symbols present + +// Coding styles +#define JPEG2000_CSTY_PREC 0x01 // Precincts defined in coding style +#define JPEG2000_CSTY_SOP 0x02 // SOP marker present +#define JPEG2000_CSTY_EPH 0x04 // EPH marker present + +// Progression orders +#define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression +#define JPEG2000_PGOD_RLCP 0x01 // Resolution level-layer-component-position progression +#define JPEG2000_PGOD_RPCL 0x02 // Resolution level-position-component-layer progression +#define JPEG2000_PGOD_PCRL 0x03 // Position-component-resolution level-layer progression +#define JPEG2000_PGOD_CPRL 0x04 // Component-position-resolution level-layer progression + +typedef struct Jpeg2000T1Context { + int data[6144]; + uint16_t flags[6156]; + MqcState mqc; + int stride; +} Jpeg2000T1Context; + +typedef struct Jpeg2000TgtNode { + uint8_t val; + uint8_t vis; + struct Jpeg2000TgtNode *parent; +} Jpeg2000TgtNode; + +typedef struct Jpeg2000CodingStyle { + int nreslevels; // number of resolution levels + int nreslevels2decode; // number of resolution levels to decode + uint8_t log2_cblk_width, + log2_cblk_height; // exponent of codeblock size + uint8_t transform; // DWT type + uint8_t csty; // coding style + uint8_t nlayers; // number of layers + uint8_t mct; // multiple component transformation + uint8_t cblk_style; // codeblock coding style + uint8_t prog_order; // progression order + uint8_t log2_prec_widths[JPEG2000_MAX_RESLEVELS]; // precincts size according resolution levels + uint8_t log2_prec_heights[JPEG2000_MAX_RESLEVELS]; // TODO: initialize prec_size array with 0? +} Jpeg2000CodingStyle; + +typedef struct Jpeg2000QuantStyle { + uint8_t expn[JPEG2000_MAX_DECLEVELS * 3]; // quantization exponent + uint16_t mant[JPEG2000_MAX_DECLEVELS * 3]; // quantization mantissa + uint8_t quantsty; // quantization style + uint8_t nguardbits; // number of guard bits +} Jpeg2000QuantStyle; + +typedef struct Jpeg2000Pass { + uint16_t rate; + int64_t disto; + uint8_t flushed[4]; + int flushed_len; +} Jpeg2000Pass; + +typedef struct Jpeg2000Cblk { + uint8_t npasses; + uint8_t ninclpasses; // number coding of passes included in codestream + uint8_t nonzerobits; + uint16_t length; + uint16_t *lengthinc; + uint8_t nb_lengthinc; + uint8_t lblock; + uint8_t *data; + size_t data_allocated; + int nb_terminations; + int nb_terminationsinc; + int *data_start; + Jpeg2000Pass *passes; + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} +} Jpeg2000Cblk; // code block + +typedef struct Jpeg2000Prec { + int nb_codeblocks_width; + int nb_codeblocks_height; + Jpeg2000TgtNode *zerobits; + Jpeg2000TgtNode *cblkincl; + Jpeg2000Cblk *cblk; + int decoded_layers; + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} +} Jpeg2000Prec; // precinct + +typedef struct Jpeg2000Band { + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + uint16_t log2_cblk_width, log2_cblk_height; + int i_stepsize; // quantization stepsize + float f_stepsize; // quantization stepsize + Jpeg2000Prec *prec; +} Jpeg2000Band; // subband + +typedef struct Jpeg2000ResLevel { + uint8_t nbands; + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} + int num_precincts_x, num_precincts_y; // number of precincts in x/y direction + uint8_t log2_prec_width, log2_prec_height; // exponent of precinct size + Jpeg2000Band *band; +} Jpeg2000ResLevel; // resolution level + +typedef struct Jpeg2000Component { + Jpeg2000ResLevel *reslevel; + DWTContext dwt; + float *f_data; + int *i_data; + int coord[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- can be reduced with lowres option + int coord_o[2][2]; // border coordinates {{x0, x1}, {y0, y1}} -- original values from jpeg2000 headers + uint8_t roi_shift; // ROI scaling value for the component +} Jpeg2000Component; + +/* misc tools */ +static inline int ff_jpeg2000_ceildivpow2(int a, int b) +{ + return -((-(int64_t)a) >> b); +} + +static inline int ff_jpeg2000_ceildiv(int a, int b) +{ + return (a + (int64_t)b - 1) / b; +} + +/* TIER-1 routines */ + +/* Set up lookup tables used in TIER-1. */ +void ff_jpeg2000_init_tier1_luts(void); + +/* Update significance of a coefficient at current position (x,y) and + * for neighbors. */ +void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, + int x, int y, int negative); + +extern uint8_t ff_jpeg2000_sigctxno_lut[256][4]; + +/* Get context label (number in range[0..8]) of a coefficient for significance + * propagation and cleanup coding passes. */ +static inline int ff_jpeg2000_getsigctxno(int flag, int bandno) +{ + return ff_jpeg2000_sigctxno_lut[flag & 255][bandno]; +} + +static const uint8_t refctxno_lut[2][2] = { { 14, 15 }, { 16, 16 } }; + +/* Get context label (number in range[14..16]) of a coefficient for magnitude + * refinement pass. */ +static inline int ff_jpeg2000_getrefctxno(int flag) +{ + return refctxno_lut[(flag >> 14) & 1][(flag & 255) != 0]; +} + +extern uint8_t ff_jpeg2000_sgnctxno_lut[16][16]; +extern uint8_t ff_jpeg2000_xorbit_lut[16][16]; + +/* Get context label (number in range[9..13]) for sign decoding. */ +static inline int ff_jpeg2000_getsgnctxno(int flag, int *xorbit) +{ + *xorbit = ff_jpeg2000_xorbit_lut[flag & 15][(flag >> 8) & 15]; + return ff_jpeg2000_sgnctxno_lut[flag & 15][(flag >> 8) & 15]; +} + +int ff_jpeg2000_init_component(Jpeg2000Component *comp, + Jpeg2000CodingStyle *codsty, + Jpeg2000QuantStyle *qntsty, + int cbps, int dx, int dy, + AVCodecContext *ctx); + +void ff_jpeg2000_reinit(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty); + +void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty); + +static inline int needs_termination(int style, int passno) { + if (style & JPEG2000_CBLK_BYPASS) { + int type = passno % 3; + passno /= 3; + if (type == 0 && passno > 2) + return 2; + if (type == 2 && passno > 2) + return 1; + if (style & JPEG2000_CBLK_TERMALL) { + return passno > 2 ? 2 : 1; + } + } + if (style & JPEG2000_CBLK_TERMALL) + return 1; + return 0; +} + +#endif /* AVCODEC_JPEG2000_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dsp.h new file mode 100644 index 00000000..1ae5b95d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dsp.h @@ -0,0 +1,36 @@ +/* + * JPEG 2000 DSP functions + * Copyright (c) 2007 Kamil Nowosad + * Copyright (c) 2013 Nicolas Bertrand + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000DSP_H +#define AVCODEC_JPEG2000DSP_H + +#include +#include "jpeg2000dwt.h" + +typedef struct Jpeg2000DSPContext { + void (*mct_decode[FF_DWT_NB])(void *src0, void *src1, void *src2, int csize); +} Jpeg2000DSPContext; + +void ff_jpeg2000dsp_init(Jpeg2000DSPContext *c); +void ff_jpeg2000dsp_init_x86(Jpeg2000DSPContext *c); + +#endif /* AVCODEC_JPEG2000DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dwt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dwt.h new file mode 100644 index 00000000..718d183a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeg2000dwt.h @@ -0,0 +1,68 @@ +/* + * Discrete wavelet transform + * Copyright (c) 2007 Kamil Nowosad + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEG2000DWT_H +#define AVCODEC_JPEG2000DWT_H + +/** + * @file + * Discrete wavelet transform + */ + +#include + +#define FF_DWT_MAX_DECLVLS 32 ///< max number of decomposition levels +#define F_LFTG_K 1.230174104914001f +#define F_LFTG_X 0.812893066115961f + +enum DWTType { + FF_DWT97, + FF_DWT53, + FF_DWT97_INT, + FF_DWT_NB +}; + +typedef struct DWTContext { + /// line lengths { horizontal, vertical } in consecutive decomposition levels + int linelen[FF_DWT_MAX_DECLVLS][2]; + uint8_t mod[FF_DWT_MAX_DECLVLS][2]; ///< coordinates (x0, y0) of decomp. levels mod 2 + uint8_t ndeclevels; ///< number of decomposition levels + uint8_t type; ///< 0 for 9/7; 1 for 5/3 + int32_t *i_linebuf; ///< int buffer used by transform + float *f_linebuf; ///< float buffer used by transform +} DWTContext; + +/** + * Initialize DWT. + * @param s DWT context + * @param border coordinates of transformed region {{x0, x1}, {y0, y1}} + * @param decomp_levels number of decomposition levels + * @param type 0 for DWT 9/7; 1 for DWT 5/3 + */ +int ff_jpeg2000_dwt_init(DWTContext *s, int border[2][2], + int decomp_levels, int type); + +int ff_dwt_encode(DWTContext *s, void *t); +int ff_dwt_decode(DWTContext *s, void *t); + +void ff_dwt_destroy(DWTContext *s); + +#endif /* AVCODEC_JPEG2000DWT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegls.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegls.h new file mode 100644 index 00000000..6b89b2af --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegls.h @@ -0,0 +1,126 @@ +/* + * JPEG-LS common code + * Copyright (c) 2003 Michael Niedermayer + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * JPEG-LS common code. + */ + +#ifndef AVCODEC_JPEGLS_H +#define AVCODEC_JPEGLS_H + +#include "libavutil/common.h" +#include "avcodec.h" +#include "internal.h" + +#undef near /* This file uses struct member 'near' which in windows.h is defined as empty. */ + +typedef struct JpeglsContext { + AVCodecContext *avctx; +} JpeglsContext; + +typedef struct JLSState { + int T1, T2, T3; + int A[367], B[367], C[365], N[367]; + int limit, reset, bpp, qbpp, maxval, range; + int near, twonear; + int run_index[4]; +} JLSState; + +/** + * Calculate initial JPEG-LS parameters + */ +void ff_jpegls_init_state(JLSState *state); + +/** + * Calculate quantized gradient value, used for context determination + */ +static inline int ff_jpegls_quantize(JLSState *s, int v) +{ + if (v == 0) + return 0; + if (v < 0) { + if (v <= -s->T3) + return -4; + if (v <= -s->T2) + return -3; + if (v <= -s->T1) + return -2; + if (v < -s->near) + return -1; + return 0; + } else { + if (v <= s->near) + return 0; + if (v < s->T1) + return 1; + if (v < s->T2) + return 2; + if (v < s->T3) + return 3; + return 4; + } +} + +/** + * Calculate JPEG-LS codec values + */ +void ff_jpegls_reset_coding_parameters(JLSState *s, int reset_all); + +static inline void ff_jpegls_downscale_state(JLSState *state, int Q) +{ + if (state->N[Q] == state->reset) { + state->A[Q] >>= 1; + state->B[Q] >>= 1; + state->N[Q] >>= 1; + } + state->N[Q]++; +} + +static inline int ff_jpegls_update_state_regular(JLSState *state, + int Q, int err) +{ + if(FFABS(err) > 0xFFFF) + return -0x10000; + state->A[Q] += FFABS(err); + err *= state->twonear; + state->B[Q] += err; + + ff_jpegls_downscale_state(state, Q); + + if (state->B[Q] <= -state->N[Q]) { + state->B[Q] = FFMAX(state->B[Q] + state->N[Q], 1 - state->N[Q]); + if (state->C[Q] > -128) + state->C[Q]--; + } else if (state->B[Q] > 0) { + state->B[Q] = FFMIN(state->B[Q] - state->N[Q], 0); + if (state->C[Q] < 127) + state->C[Q]++; + } + + return err; +} + +#define R(a, i) (bits == 8 ? ((uint8_t *)(a))[i] : ((uint16_t *)(a))[i]) +#define W(a, i, v) (bits == 8 ? (((uint8_t *)(a))[i] = v) : (((uint16_t *)(a))[i] = v)) + +#endif /* AVCODEC_JPEGLS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeglsdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeglsdec.h new file mode 100644 index 00000000..0cafaba7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpeglsdec.h @@ -0,0 +1,42 @@ +/* + * JPEG-LS decoder + * Copyright (c) 2003 Michael Niedermayer + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * JPEG-LS decoder. + */ + +#ifndef AVCODEC_JPEGLSDEC_H +#define AVCODEC_JPEGLSDEC_H + +#include "mjpeg.h" +#include "mjpegdec.h" + +/** + * Decode LSE block with initialization parameters + */ +int ff_jpegls_decode_lse(MJpegDecodeContext *s); + +int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, + int point_transform, int ilv); + +#endif /* AVCODEC_JPEGLSDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegtables.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegtables.h new file mode 100644 index 00000000..aa38df40 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/jpegtables.h @@ -0,0 +1,43 @@ +/* + * JPEG-related tables + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_JPEGTABLES_H +#define AVCODEC_JPEGTABLES_H + +#include + +#include "internal.h" + +extern av_export_avcodec const uint8_t avpriv_mjpeg_bits_dc_luminance[]; +extern av_export_avcodec const uint8_t avpriv_mjpeg_val_dc[]; + +extern av_export_avcodec const uint8_t avpriv_mjpeg_bits_dc_chrominance[]; + +extern av_export_avcodec const uint8_t avpriv_mjpeg_bits_ac_luminance[]; +extern av_export_avcodec const uint8_t avpriv_mjpeg_val_ac_luminance[]; + +extern av_export_avcodec const uint8_t avpriv_mjpeg_bits_ac_chrominance[]; +extern av_export_avcodec const uint8_t avpriv_mjpeg_val_ac_chrominance[]; + +void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, + const uint8_t *bits_table, + const uint8_t *val_table); + +#endif /* AVCODEC_JPEGTABLES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/kbdwin.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/kbdwin.h new file mode 100644 index 00000000..4185c420 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/kbdwin.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_KBDWIN_H +#define AVCODEC_KBDWIN_H + +#include + +/** + * Maximum window size for ff_kbd_window_init. + */ +#define FF_KBD_WINDOW_MAX 1024 + +/** + * Generate a Kaiser-Bessel Derived Window. + * @param window pointer to half window + * @param alpha determines window shape + * @param n size of half window, max FF_KBD_WINDOW_MAX + */ +void ff_kbd_window_init(float *window, float alpha, int n); +void ff_kbd_window_init_fixed(int32_t *window, float alpha, int n); + +#endif /* AVCODEC_KBDWIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lagarithrac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lagarithrac.h new file mode 100644 index 00000000..ee836d01 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lagarithrac.h @@ -0,0 +1,114 @@ +/* + * Lagarith range decoder + * Copyright (c) 2009 Nathan Caldwell + * Copyright (c) 2009 David Conrad + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Lagarith range decoder + * @author Nathan Caldwell + * @author David Conrad + */ + +#ifndef AVCODEC_LAGARITHRAC_H +#define AVCODEC_LAGARITHRAC_H + +#include +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" +#include "avcodec.h" +#include "get_bits.h" + +typedef struct lag_rac { + AVCodecContext *avctx; + unsigned low; + unsigned range; + unsigned scale; /**< Number of bits of precision in range. */ + unsigned hash_shift; /**< Number of bits to shift to calculate hash for radix search. */ + + const uint8_t *bytestream_start; /**< Start of input bytestream. */ + const uint8_t *bytestream; /**< Current position in input bytestream. */ + const uint8_t *bytestream_end; /**< End position of input bytestream. */ + + int overread; +#define MAX_OVERREAD 4 + + uint32_t prob[258]; /**< Table of cumulative probability for each symbol. */ + uint8_t range_hash[1024]; /**< Hash table mapping upper byte to approximate symbol. */ +} lag_rac; + +void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length); + +/* TODO: Optimize */ +static inline void lag_rac_refill(lag_rac *l) +{ + while (l->range <= 0x800000) { + l->low <<= 8; + l->range <<= 8; + l->low |= 0xff & (AV_RB16(l->bytestream) >> 1); + if (l->bytestream < l->bytestream_end) + l->bytestream++; + else + l->overread++; + } +} + +/** + * Decode a single byte from the compressed plane described by *l. + * @param l pointer to lag_rac for the current plane + * @return next byte of decoded data + */ +static inline uint8_t lag_get_rac(lag_rac *l) +{ + unsigned range_scaled, low_scaled; + int val; + + lag_rac_refill(l); + + range_scaled = l->range >> l->scale; + + if (l->low < range_scaled * l->prob[255]) { + /* val = 0 is frequent enough to deserve a shortcut */ + if (l->low < range_scaled * l->prob[1]) { + val = 0; + } else { + low_scaled = l->low / (range_scaled<<(l->hash_shift)); + + val = l->range_hash[low_scaled]; + while (l->low >= range_scaled * l->prob[val + 1]) + val++; + } + + l->range = range_scaled * (l->prob[val + 1] - l->prob[val]); + } else { + val = 255; + l->range -= range_scaled * l->prob[255]; + } + + if (!l->range) + l->range = 0x80; + + l->low -= range_scaled * l->prob[val]; + + return val; +} + + +#endif /* AVCODEC_LAGARITHRAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lcl.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lcl.h new file mode 100644 index 00000000..b60c0e90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lcl.h @@ -0,0 +1,49 @@ +/* + * LCL (LossLess Codec Library) Codec + * Copyright (c) 2002-2004 Roberto Togni + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LCL_H +#define AVCODEC_LCL_H + +#define BMPTYPE_YUV 1 +#define BMPTYPE_RGB 2 + +#define IMGTYPE_YUV111 0 +#define IMGTYPE_YUV422 1 +#define IMGTYPE_RGB24 2 +#define IMGTYPE_YUV411 3 +#define IMGTYPE_YUV211 4 +#define IMGTYPE_YUV420 5 + +#define COMP_MSZH 0 +#define COMP_MSZH_NOCOMP 1 +#define COMP_ZLIB_HISPEED 1 +#define COMP_ZLIB_HICOMP 9 +#define COMP_ZLIB_NORMAL -1 + +#define FLAG_MULTITHREAD 1 +#define FLAG_NULLFRAME 2 +#define FLAG_PNGFILTER 4 +#define FLAGMASK_UNUSED 0xf8 + +#define CODEC_MSZH 1 +#define CODEC_ZLIB 3 + +#endif /* AVCODEC_LCL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopenh264.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopenh264.h new file mode 100644 index 00000000..dbb9c5d4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopenh264.h @@ -0,0 +1,39 @@ +/* + * OpenH264 shared utils + * Copyright (C) 2014 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LIBOPENH264_H +#define AVCODEC_LIBOPENH264_H + +#define OPENH264_VER_AT_LEAST(maj, min) \ + ((OPENH264_MAJOR > (maj)) || \ + (OPENH264_MAJOR == (maj) && OPENH264_MINOR >= (min))) + +// This function will be provided to the libopenh264 library. The function will be called +// when libopenh264 wants to log a message (error, warning, info, etc.). The signature for +// this function (defined in .../codec/api/svc/codec_api.h) is: +// +// typedef void (*WelsTraceCallback) (void* ctx, int level, const char* string); + +void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg); + +int ff_libopenh264_check_version(void *logctx); + +#endif /* AVCODEC_LIBOPENH264_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopus.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopus.h new file mode 100644 index 00000000..a8223d1d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libopus.h @@ -0,0 +1,27 @@ +/* + * libopus encoder/decoder common code + * Copyright (c) 2012 Nicolas George + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LIBOPUS_H +#define AVCODEC_LIBOPUS_H + +int ff_opus_error_to_averror(int err); + +#endif /* AVCODEC_LIBOPUS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libvpx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libvpx.h new file mode 100644 index 00000000..22b697fa --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libvpx.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013 Guillaume Martres + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LIBVPX_H +#define AVCODEC_LIBVPX_H + +#include + +#include "avcodec.h" + +void ff_vp9_init_static(AVCodec *codec); +#if 0 +enum AVPixelFormat ff_vpx_imgfmt_to_pixfmt(vpx_img_fmt_t img); +vpx_img_fmt_t ff_vpx_pixfmt_to_imgfmt(enum AVPixelFormat pix); +#endif + +#endif /* AVCODEC_LIBVPX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libwebpenc_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libwebpenc_common.h new file mode 100644 index 00000000..e74e5793 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libwebpenc_common.h @@ -0,0 +1,84 @@ +/* + * WebP encoding support via libwebp + * Copyright (c) 2013 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * WebP encoder using libwebp: common structs and methods. + */ + +#ifndef AVCODEC_LIBWEBPENC_COMMON_H +#define AVCODEC_LIBWEBPENC_COMMON_H + +#include + +#include "libavutil/common.h" +#include "libavutil/frame.h" +#include "libavutil/imgutils.h" +#include "libavutil/opt.h" +#include "avcodec.h" +#include "internal.h" + +typedef struct LibWebPContextCommon { + AVClass *class; // class for AVOptions + float quality; // lossy quality 0 - 100 + int lossless; // use lossless encoding + int preset; // configuration preset + int chroma_warning; // chroma linesize mismatch warning has been printed + int conversion_warning; // pixel format conversion warning has been printed + WebPConfig config; // libwebp configuration + AVFrame *ref; + int cr_size; + int cr_threshold; +} LibWebPContextCommon; + +int ff_libwebp_error_to_averror(int err); + +av_cold int ff_libwebp_encode_init_common(AVCodecContext *avctx); + +int ff_libwebp_get_frame(AVCodecContext *avctx, LibWebPContextCommon *s, + const AVFrame *frame, AVFrame **alt_frame_ptr, + WebPPicture **pic_ptr); + +#define OFFSET(x) offsetof(LibWebPContextCommon, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "lossless", "Use lossless mode", OFFSET(lossless), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, + { "preset", "Configuration preset", OFFSET(preset), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, WEBP_PRESET_TEXT, VE, "preset" }, + { "none", "do not use a preset", 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, 0, 0, VE, "preset" }, + { "default", "default preset", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_DEFAULT }, 0, 0, VE, "preset" }, + { "picture", "digital picture, like portrait, inner shot", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_PICTURE }, 0, 0, VE, "preset" }, + { "photo", "outdoor photograph, with natural lighting", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_PHOTO }, 0, 0, VE, "preset" }, + { "drawing", "hand or line drawing, with high-contrast details", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_DRAWING }, 0, 0, VE, "preset" }, + { "icon", "small-sized colorful images", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_ICON }, 0, 0, VE, "preset" }, + { "text", "text-like", 0, AV_OPT_TYPE_CONST, { .i64 = WEBP_PRESET_TEXT }, 0, 0, VE, "preset" }, + { "cr_threshold","Conditional replenishment threshold", OFFSET(cr_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, + { "cr_size" ,"Conditional replenishment block size", OFFSET(cr_size) , AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 256, VE }, + { "quality" ,"Quality", OFFSET(quality), AV_OPT_TYPE_FLOAT, { .dbl = 75 }, 0, 100, VE }, + { NULL }, +}; + +static const AVCodecDefault libwebp_defaults[] = { + { "compression_level", "4" }, + { "global_quality", "-1" }, + { NULL }, +}; + +#endif /* AVCODEC_LIBWEBPENC_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libxvid.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libxvid.h new file mode 100644 index 00000000..58bef616 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/libxvid.h @@ -0,0 +1,36 @@ +/* + * copyright (C) 2006 Corey Hickey + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LIBXVID_H +#define AVCODEC_LIBXVID_H + +/** + * @file + * common functions for use with the Xvid wrappers + */ + +struct MpegEncContext; + +/* rate control */ +int ff_xvid_rate_control_init(struct MpegEncContext *s); +void ff_xvid_rate_control_uninit(struct MpegEncContext *s); +float ff_xvid_rate_estimate_qscale(struct MpegEncContext *s, int dry_run); + +#endif /* AVCODEC_LIBXVID_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_audiodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_audiodsp.h new file mode 100644 index 00000000..eea5d49f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_audiodsp.h @@ -0,0 +1,51 @@ +/* + * Monkey's Audio lossless audio decoder + * Copyright (c) 2007 Benjamin Zores + * based upon libdemac from Dave Chapman. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LOSSLESS_AUDIODSP_H +#define AVCODEC_LOSSLESS_AUDIODSP_H + +#include + +typedef struct LLAudDSPContext { + /** + * Calculate scalar product of v1 and v2, + * and v1[i] += v3[i] * mul + * @param len length of vectors, should be multiple of 16, + * or padd v3 and v1 or v2 with zeros. + */ + int32_t (*scalarproduct_and_madd_int16)(int16_t *v1 /* align 16 */, + const int16_t *v2, + const int16_t *v3, + int len, int mul); + + int32_t (*scalarproduct_and_madd_int32)(int16_t *v1 /* align 16 */, + const int32_t *v2, + const int16_t *v3, + int len, int mul); +} LLAudDSPContext; + +void ff_llauddsp_init(LLAudDSPContext *c); +void ff_llauddsp_init_arm(LLAudDSPContext *c); +void ff_llauddsp_init_ppc(LLAudDSPContext *c); +void ff_llauddsp_init_x86(LLAudDSPContext *c); + +#endif /* AVCODEC_LOSSLESS_AUDIODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videodsp.h new file mode 100644 index 00000000..8077898d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videodsp.h @@ -0,0 +1,49 @@ +/* + * Lossless video DSP utils + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVCODEC_LOSSLESS_VIDEODSP_H +#define AVCODEC_LOSSLESS_VIDEODSP_H + +#include +#include + +#include "avcodec.h" +#include "libavutil/cpu.h" + +typedef struct LLVidDSPContext { + void (*add_bytes)(uint8_t *dst /* align 32 */, uint8_t *src /* align 32 */, + ptrdiff_t w); + void (*add_median_pred)(uint8_t *dst, const uint8_t *top, + const uint8_t *diff, ptrdiff_t w, + int *left, int *left_top); + int (*add_left_pred)(uint8_t *dst, const uint8_t *src, + ptrdiff_t w, int left); + + int (*add_left_pred_int16)(uint16_t *dst, const uint16_t *src, + unsigned mask, ptrdiff_t w, unsigned left); + void (*add_gradient_pred)(uint8_t *src /* align 32 */, const ptrdiff_t stride, const ptrdiff_t width); +} LLVidDSPContext; + +void ff_llviddsp_init(LLVidDSPContext *llviddsp); +void ff_llviddsp_init_x86(LLVidDSPContext *llviddsp); +void ff_llviddsp_init_ppc(LLVidDSPContext *llviddsp); + +#endif //AVCODEC_LOSSLESS_VIDEODSP_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videoencdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videoencdsp.h new file mode 100644 index 00000000..faa6c325 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lossless_videoencdsp.h @@ -0,0 +1,46 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LOSSLESS_VIDEOENCDSP_H +#define AVCODEC_LOSSLESS_VIDEOENCDSP_H + +#include + +#include "avcodec.h" + +typedef struct LLVidEncDSPContext { + void (*diff_bytes)(uint8_t *dst /* align 16 */, + const uint8_t *src1 /* align 16 */, + const uint8_t *src2 /* align 1 */, + intptr_t w); + /** + * Subtract HuffYUV's variant of median prediction. + * Note, this might read from src1[-1], src2[-1]. + */ + void (*sub_median_pred)(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, intptr_t w, + int *left, int *left_top); + + void (*sub_left_predict)(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, ptrdiff_t width, int height); +} LLVidEncDSPContext; + +void ff_llvidencdsp_init(LLVidEncDSPContext *c); +void ff_llvidencdsp_init_x86(LLVidEncDSPContext *c); + +#endif /* AVCODEC_LOSSLESS_VIDEOENCDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lpc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lpc.h new file mode 100644 index 00000000..88ca247f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lpc.h @@ -0,0 +1,212 @@ +/* + * LPC utility code + * Copyright (c) 2006 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LPC_H +#define AVCODEC_LPC_H + +#include +#include "libavutil/avassert.h" +#include "libavutil/lls.h" +#include "aac_defines.h" + +#define ORDER_METHOD_EST 0 +#define ORDER_METHOD_2LEVEL 1 +#define ORDER_METHOD_4LEVEL 2 +#define ORDER_METHOD_8LEVEL 3 +#define ORDER_METHOD_SEARCH 4 +#define ORDER_METHOD_LOG 5 + +#define MIN_LPC_ORDER 1 +#define MAX_LPC_ORDER 32 + +/** + * LPC analysis type + */ +enum FFLPCType { + FF_LPC_TYPE_DEFAULT = -1, ///< use the codec default LPC type + FF_LPC_TYPE_NONE = 0, ///< do not use LPC prediction or use all zero coefficients + FF_LPC_TYPE_FIXED = 1, ///< fixed LPC coefficients + FF_LPC_TYPE_LEVINSON = 2, ///< Levinson-Durbin recursion + FF_LPC_TYPE_CHOLESKY = 3, ///< Cholesky factorization + FF_LPC_TYPE_NB , ///< Not part of ABI +}; + +typedef struct LPCContext { + int blocksize; + int max_order; + enum FFLPCType lpc_type; + double *windowed_buffer; + double *windowed_samples; + + /** + * Apply a Welch window to an array of input samples. + * The output samples have the same scale as the input, but are in double + * sample format. + * @param data input samples + * @param len number of input samples + * @param w_data output samples + */ + void (*lpc_apply_welch_window)(const int32_t *data, int len, + double *w_data); + /** + * Perform autocorrelation on input samples with delay of 0 to lag. + * @param data input samples. + * constraints: no alignment needed, but must have at + * least lag*sizeof(double) valid bytes preceding it, and + * size must be at least (len+1)*sizeof(double) if data is + * 16-byte aligned or (len+2)*sizeof(double) if data is + * unaligned. + * @param len number of input samples to process + * @param lag maximum delay to calculate + * @param autoc output autocorrelation coefficients. + * constraints: array size must be at least lag+1. + */ + void (*lpc_compute_autocorr)(const double *data, int len, int lag, + double *autoc); + + // TODO: these should be allocated to reduce ABI compatibility issues + LLSModel lls_models[2]; +} LPCContext; + + +/** + * Calculate LPC coefficients for multiple orders + */ +int ff_lpc_calc_coefs(LPCContext *s, + const int32_t *samples, int blocksize, int min_order, + int max_order, int precision, + int32_t coefs[][MAX_LPC_ORDER], int *shift, + enum FFLPCType lpc_type, int lpc_passes, + int omethod, int min_shift, int max_shift, int zero_shift); + +int ff_lpc_calc_ref_coefs(LPCContext *s, + const int32_t *samples, int order, double *ref); + +double ff_lpc_calc_ref_coefs_f(LPCContext *s, const float *samples, int len, + int order, double *ref); + +/** + * Initialize LPCContext. + */ +int ff_lpc_init(LPCContext *s, int blocksize, int max_order, + enum FFLPCType lpc_type); +void ff_lpc_init_x86(LPCContext *s); + +/** + * Uninitialize LPCContext. + */ +void ff_lpc_end(LPCContext *s); + +#if USE_FIXED +typedef int LPC_TYPE; +typedef unsigned LPC_TYPE_U; +#else +#ifdef LPC_USE_DOUBLE +typedef double LPC_TYPE; +typedef double LPC_TYPE_U; +#else +typedef float LPC_TYPE; +typedef float LPC_TYPE_U; +#endif +#endif // USE_FIXED + +/** + * Schur recursion. + * Produces reflection coefficients from autocorrelation data. + */ +static inline void compute_ref_coefs(const LPC_TYPE *autoc, int max_order, + LPC_TYPE *ref, LPC_TYPE *error) +{ + int i, j; + LPC_TYPE err; + LPC_TYPE gen0[MAX_LPC_ORDER], gen1[MAX_LPC_ORDER]; + + for (i = 0; i < max_order; i++) + gen0[i] = gen1[i] = autoc[i + 1]; + + err = autoc[0]; + ref[0] = -gen1[0] / err; + err += gen1[0] * ref[0]; + if (error) + error[0] = err; + for (i = 1; i < max_order; i++) { + for (j = 0; j < max_order - i; j++) { + gen1[j] = gen1[j + 1] + ref[i - 1] * gen0[j]; + gen0[j] = gen1[j + 1] * ref[i - 1] + gen0[j]; + } + ref[i] = -gen1[0] / err; + err += gen1[0] * ref[i]; + if (error) + error[i] = err; + } +} + +/** + * Levinson-Durbin recursion. + * Produce LPC coefficients from autocorrelation data. + */ +static inline int AAC_RENAME(compute_lpc_coefs)(const LPC_TYPE *autoc, int max_order, + LPC_TYPE *lpc, int lpc_stride, int fail, + int normalize) +{ + int i, j; + LPC_TYPE err = 0; + LPC_TYPE *lpc_last = lpc; + + av_assert2(normalize || !fail); + + if (normalize) + err = *autoc++; + + if (fail && (autoc[max_order - 1] == 0 || err <= 0)) + return -1; + + for(i=0; i>1; j++) { + LPC_TYPE f = lpc_last[ j]; + LPC_TYPE b = lpc_last[i-1-j]; + lpc[ j] = f + (LPC_TYPE_U)AAC_MUL26(r, b); + lpc[i-1-j] = b + (LPC_TYPE_U)AAC_MUL26(r, f); + } + + if (fail && err < 0) + return -1; + + lpc_last = lpc; + lpc += lpc_stride; + } + + return 0; +} + +#endif /* AVCODEC_LPC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lsp.h new file mode 100644 index 00000000..621ebeae --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lsp.h @@ -0,0 +1,130 @@ +/* + * LSP computing for ACELP-based codecs + * + * Copyright (c) 2008 Vladimir Voroshilov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LSP_H +#define AVCODEC_LSP_H + +#include + +/** + (I.F) means fixed-point value with F fractional and I integer bits +*/ + +/** + * @brief ensure a minimum distance between LSFs + * @param[in,out] lsfq LSF to check and adjust + * @param lsfq_min_distance minimum distance between LSFs + * @param lsfq_min minimum allowed LSF value + * @param lsfq_max maximum allowed LSF value + * @param lp_order LP filter order + */ +void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, int lsfq_max, int lp_order); + +/** + * Adjust the quantized LSFs so they are increasing and not too close. + * + * This step is not mentioned in the AMR spec but is in the reference C decoder. + * Omitting this step creates audible distortion on the sinusoidal sweep + * test vectors in 3GPP TS 26.074. + * + * @param[in,out] lsf LSFs in Hertz + * @param min_spacing minimum distance between two consecutive lsf values + * @param size size of the lsf vector + */ +void ff_set_min_dist_lsf(float *lsf, double min_spacing, int size); + +/** + * @brief Convert LSF to LSP + * @param[out] lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) + * @param lsf normalized LSF coefficients (0 <= (2.13) < 0x2000 * PI) + * @param lp_order LP filter order + * + * @remark It is safe to pass the same array into the lsf and lsp parameters. + */ +void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order); + +/** + * Floating point version of ff_acelp_lsf2lsp() + */ +void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order); + +/** + * @brief LSP to LP conversion (3.2.6 of G.729) + * @param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) + * @param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) + * @param lp_half_order LP filter order, divided by 2 + */ +void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order); + +/** + * LSP to LP conversion (5.2.4 of AMR-WB) + */ +void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order); + +/** + * @brief Interpolate LSP for the first subframe and convert LSP -> LP for both subframes (3.2.5 and 3.2.6 of G.729) + * @param[out] lp_1st decoded LP coefficients for first subframe (-0x8000 <= (3.12) < 0x8000) + * @param[out] lp_2nd decoded LP coefficients for second subframe (-0x8000 <= (3.12) < 0x8000) + * @param lsp_2nd LSP coefficients of the second subframe (-0x8000 <= (0.15) < 0x8000) + * @param lsp_prev LSP coefficients from the second subframe of the previous frame (-0x8000 <= (0.15) < 0x8000) + * @param lp_order LP filter order + */ +void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd, const int16_t* lsp_prev, int lp_order); + + +#define MAX_LP_HALF_ORDER 10 +#define MAX_LP_ORDER (2*MAX_LP_HALF_ORDER) + +/** + * Reconstruct LPC coefficients from the line spectral pair frequencies. + * + * @param lsp line spectral pairs in cosine domain + * @param lpc linear predictive coding coefficients + * @param lp_half_order half the number of the amount of LPCs to be + * reconstructed, need to be smaller or equal to MAX_LP_HALF_ORDER + * + * @note buffers should have a minimum size of 2*lp_half_order elements. + * + * TIA/EIA/IS-733 2.4.3.3.5 + */ +void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order); + +/** + * Sort values in ascending order. + * + * @note O(n) if data already sorted, O(n^2) - otherwise + */ +void ff_sort_nearly_sorted_floats(float *vals, int len); + +/** + * Compute the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients + * needed for LSP to LPC conversion. + * We only need to calculate the 6 first elements of the polynomial. + * + * @param lsp line spectral pairs in cosine domain + * @param[out] f polynomial input/output as a vector + * + * TIA/EIA/IS-733 2.4.3.3.5-1/2 + */ +void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order); + +#endif /* AVCODEC_LSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzf.h new file mode 100644 index 00000000..0ad73d9f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzf.h @@ -0,0 +1,29 @@ +/* + * lzf decompression algorithm + * Copyright (c) 2015 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_LZF_H +#define AVCODEC_LZF_H + +#include "bytestream.h" + +int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size); + +#endif /* AVCODEC_LZF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzw.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzw.h new file mode 100644 index 00000000..6af8a6b8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/lzw.h @@ -0,0 +1,63 @@ +/* + * LZW decoder + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief LZW decoding routines + * @author Fabrice Bellard + * @author modified for use in TIFF by Konstantin Shishkov + */ + +#ifndef AVCODEC_LZW_H +#define AVCODEC_LZW_H + +#include + +struct PutBitContext; + +enum FF_LZW_MODES{ + FF_LZW_GIF, + FF_LZW_TIFF +}; + +/* clients should not know what LZWState is */ +typedef void LZWState; + +/* first two functions de/allocate memory for LZWState */ +void ff_lzw_decode_open(LZWState **p); +void ff_lzw_decode_close(LZWState **p); +int ff_lzw_decode_init(LZWState *s, int csize, const uint8_t *buf, int buf_size, int mode); +int ff_lzw_decode(LZWState *s, uint8_t *buf, int len); +int ff_lzw_decode_tail(LZWState *lzw); + +/** LZW encode state */ +struct LZWEncodeState; +extern const int ff_lzw_encode_state_size; + +void ff_lzw_encode_init(struct LZWEncodeState *s, uint8_t *outbuf, int outsize, + int maxbits, enum FF_LZW_MODES mode, + void (*lzw_put_bits)(struct PutBitContext *, int, unsigned int)); +int ff_lzw_encode(struct LZWEncodeState * s, const uint8_t * inbuf, int insize); +int ff_lzw_encode_flush(struct LZWEncodeState *s, + void (*lzw_flush_put_bits)(struct PutBitContext *)); + +#endif /* AVCODEC_LZW_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mathops.h new file mode 100644 index 00000000..1c356643 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mathops.h @@ -0,0 +1,251 @@ +/* + * simple math operations + * Copyright (c) 2001, 2002 Fabrice Bellard + * Copyright (c) 2006 Michael Niedermayer et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVCODEC_MATHOPS_H +#define AVCODEC_MATHOPS_H + +#include + +#include "libavutil/common.h" +#include "libavutil/reverse.h" +#include "config.h" + +#define MAX_NEG_CROP 1024 + +extern const uint32_t ff_inverse[257]; +extern const uint8_t ff_sqrt_tab[256]; +extern const uint8_t ff_crop_tab[256 + 2 * MAX_NEG_CROP]; +extern const uint8_t ff_zigzag_direct[64]; +extern const uint8_t ff_zigzag_scan[16+1]; + +#if ARCH_ARM +# include "arm/mathops.h" +#elif ARCH_AVR32 +# include "avr32/mathops.h" +#elif ARCH_MIPS +# include "mips/mathops.h" +#elif ARCH_PPC +# include "ppc/mathops.h" +#elif ARCH_X86 +# include "x86/mathops.h" +#endif + +/* generic implementation */ + +#ifndef MUL64 +# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b)) +#endif + +#ifndef MULL +# define MULL(a,b,s) (MUL64(a, b) >> (s)) +#endif + +#ifndef MULH +static av_always_inline int MULH(int a, int b){ + return MUL64(a, b) >> 32; +} +#endif + +#ifndef UMULH +static av_always_inline unsigned UMULH(unsigned a, unsigned b){ + return ((uint64_t)(a) * (uint64_t)(b))>>32; +} +#endif + +#ifndef MAC64 +# define MAC64(d, a, b) ((d) += MUL64(a, b)) +#endif + +#ifndef MLS64 +# define MLS64(d, a, b) ((d) -= MUL64(a, b)) +#endif + +/* signed 16x16 -> 32 multiply add accumulate */ +#ifndef MAC16 +# define MAC16(rt, ra, rb) rt += (ra) * (rb) +#endif + +/* signed 16x16 -> 32 multiply */ +#ifndef MUL16 +# define MUL16(ra, rb) ((ra) * (rb)) +#endif + +#ifndef MLS16 +# define MLS16(rt, ra, rb) ((rt) -= (ra) * (rb)) +#endif + +/* median of 3 */ +#ifndef mid_pred +#define mid_pred mid_pred +static inline av_const int mid_pred(int a, int b, int c) +{ + if(a>b){ + if(c>b){ + if(c>a) b=a; + else b=c; + } + }else{ + if(b>c){ + if(c>a) b=c; + else b=a; + } + } + return b; +} +#endif + +#ifndef median4 +#define median4 median4 +static inline av_const int median4(int a, int b, int c, int d) +{ + if (a < b) { + if (c < d) return (FFMIN(b, d) + FFMAX(a, c)) / 2; + else return (FFMIN(b, c) + FFMAX(a, d)) / 2; + } else { + if (c < d) return (FFMIN(a, d) + FFMAX(b, c)) / 2; + else return (FFMIN(a, c) + FFMAX(b, d)) / 2; + } +} +#endif + +#ifndef sign_extend +static inline av_const int sign_extend(int val, unsigned bits) +{ + unsigned shift = 8 * sizeof(int) - bits; + union { unsigned u; int s; } v = { (unsigned) val << shift }; + return v.s >> shift; +} +#endif + +#ifndef zero_extend +static inline av_const unsigned zero_extend(unsigned val, unsigned bits) +{ + return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits); +} +#endif + +#ifndef COPY3_IF_LT +#define COPY3_IF_LT(x, y, a, b, c, d)\ +if ((y) < (x)) {\ + (x) = (y);\ + (a) = (b);\ + (c) = (d);\ +} +#endif + +#ifndef MASK_ABS +#define MASK_ABS(mask, level) do { \ + mask = level >> 31; \ + level = (level ^ mask) - mask; \ + } while (0) +#endif + +#ifndef NEG_SSR32 +# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s))) +#endif + +#ifndef NEG_USR32 +# define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s))) +#endif + +#if HAVE_BIGENDIAN +# ifndef PACK_2U8 +# define PACK_2U8(a,b) (((a) << 8) | (b)) +# endif +# ifndef PACK_4U8 +# define PACK_4U8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) +# endif +# ifndef PACK_2U16 +# define PACK_2U16(a,b) (((a) << 16) | (b)) +# endif +#else +# ifndef PACK_2U8 +# define PACK_2U8(a,b) (((b) << 8) | (a)) +# endif +# ifndef PACK_4U2 +# define PACK_4U8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) +# endif +# ifndef PACK_2U16 +# define PACK_2U16(a,b) (((b) << 16) | (a)) +# endif +#endif + +#ifndef PACK_2S8 +# define PACK_2S8(a,b) PACK_2U8((a)&255, (b)&255) +#endif +#ifndef PACK_4S8 +# define PACK_4S8(a,b,c,d) PACK_4U8((a)&255, (b)&255, (c)&255, (d)&255) +#endif +#ifndef PACK_2S16 +# define PACK_2S16(a,b) PACK_2U16((a)&0xffff, (b)&0xffff) +#endif + +#ifndef FASTDIV +# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a) * ff_inverse[b]) >> 32)) +#endif /* FASTDIV */ + +#ifndef ff_sqrt +#define ff_sqrt ff_sqrt +static inline av_const unsigned int ff_sqrt(unsigned int a) +{ + unsigned int b; + + if (a < 255) return (ff_sqrt_tab[a + 1] - 1) >> 4; + else if (a < (1 << 12)) b = ff_sqrt_tab[a >> 4] >> 2; +#if !CONFIG_SMALL + else if (a < (1 << 14)) b = ff_sqrt_tab[a >> 6] >> 1; + else if (a < (1 << 16)) b = ff_sqrt_tab[a >> 8] ; +#endif + else { + int s = av_log2_16bit(a >> 16) >> 1; + unsigned int c = a >> (s + 2); + b = ff_sqrt_tab[c >> (s + 8)]; + b = FASTDIV(c,b) + (b << s); + } + + return b - (a < b * b); +} +#endif + +static inline av_const float ff_sqrf(float a) +{ + return a*a; +} + +static inline int8_t ff_u8_to_s8(uint8_t a) +{ + union { + uint8_t u8; + int8_t s8; + } b; + b.u8 = a; + return b.s8; +} + +static av_always_inline uint32_t bitswap_32(uint32_t x) +{ + return (uint32_t)ff_reverse[ x & 0xFF] << 24 | + (uint32_t)ff_reverse[(x >> 8) & 0xFF] << 16 | + (uint32_t)ff_reverse[(x >> 16) & 0xFF] << 8 | + (uint32_t)ff_reverse[ x >> 24]; +} + +#endif /* AVCODEC_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mdct15.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mdct15.h new file mode 100644 index 00000000..42e60f3e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mdct15.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2017 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MDCT15_H +#define AVCODEC_MDCT15_H + +#include + +#include "fft.h" + +typedef struct MDCT15Context { + int fft_n; + int len2; + int len4; + int inverse; + int *pfa_prereindex; + int *pfa_postreindex; + + FFTContext ptwo_fft; + FFTComplex *tmp; + FFTComplex *twiddle_exptab; + + DECLARE_ALIGNED(32, FFTComplex, exptab)[64]; + + /* 15-point FFT */ + void (*fft15)(FFTComplex *out, FFTComplex *in, FFTComplex *exptab, ptrdiff_t stride); + + /* PFA postrotate and exptab */ + void (*postreindex)(FFTComplex *out, FFTComplex *in, FFTComplex *exp, int *lut, ptrdiff_t len8); + + /* Calculate a full 2N -> N MDCT */ + void (*mdct)(struct MDCT15Context *s, float *dst, const float *src, ptrdiff_t stride); + + /* Calculate the middle half of the iMDCT */ + void (*imdct_half)(struct MDCT15Context *s, float *dst, const float *src, + ptrdiff_t stride); +} MDCT15Context; + +/* Init an (i)MDCT of the length 2 * 15 * (2^N) */ +int ff_mdct15_init(MDCT15Context **ps, int inverse, int N, double scale); +void ff_mdct15_uninit(MDCT15Context **ps); + +void ff_mdct15_init_x86(MDCT15Context *s); + +#endif /* AVCODEC_MDCT15_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/me_cmp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/me_cmp.h new file mode 100644 index 00000000..0a589e3c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/me_cmp.h @@ -0,0 +1,95 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ME_CMP_H +#define AVCODEC_ME_CMP_H + +#include + +#include "avcodec.h" + +extern const uint32_t ff_square_tab[512]; + + +/* minimum alignment rules ;) + * If you notice errors in the align stuff, need more alignment for some ASM code + * for some CPU or need to use a function with less aligned data then send a mail + * to the ffmpeg-devel mailing list, ... + * + * !warning These alignments might not match reality, (missing attribute((align)) + * stuff somewhere possible). + * I (Michael) did not check them, these are just the alignments which I think + * could be reached easily ... + * + * !future video codecs might need functions with less strict alignment + */ + +struct MpegEncContext; +/* Motion estimation: + * h is limited to { width / 2, width, 2 * width }, + * but never larger than 16 and never smaller than 2. + * Although currently h < 4 is not used as functions with + * width < 8 are neither used nor implemented. */ +typedef int (*me_cmp_func)(struct MpegEncContext *c, + uint8_t *blk1 /* align width (8 or 16) */, + uint8_t *blk2 /* align 1 */, ptrdiff_t stride, + int h); + +typedef struct MECmpContext { + int (*sum_abs_dctelem)(int16_t *block /* align 16 */); + + me_cmp_func sad[6]; /* identical to pix_absAxA except additional void * */ + me_cmp_func sse[6]; + me_cmp_func hadamard8_diff[6]; + me_cmp_func dct_sad[6]; + me_cmp_func quant_psnr[6]; + me_cmp_func bit[6]; + me_cmp_func rd[6]; + me_cmp_func vsad[6]; + me_cmp_func vsse[6]; + me_cmp_func nsse[6]; + me_cmp_func w53[6]; + me_cmp_func w97[6]; + me_cmp_func dct_max[6]; + me_cmp_func dct264_sad[6]; + + me_cmp_func me_pre_cmp[6]; + me_cmp_func me_cmp[6]; + me_cmp_func me_sub_cmp[6]; + me_cmp_func mb_cmp[6]; + me_cmp_func ildct_cmp[6]; // only width 16 used + me_cmp_func frame_skip_cmp[6]; // only width 8 used + + me_cmp_func pix_abs[2][4]; + me_cmp_func median_sad[6]; +} MECmpContext; + +int ff_check_alignment(void); + +void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx); +void ff_me_cmp_init_alpha(MECmpContext *c, AVCodecContext *avctx); +void ff_me_cmp_init_arm(MECmpContext *c, AVCodecContext *avctx); +void ff_me_cmp_init_ppc(MECmpContext *c, AVCodecContext *avctx); +void ff_me_cmp_init_x86(MECmpContext *c, AVCodecContext *avctx); +void ff_me_cmp_init_mips(MECmpContext *c, AVCodecContext *avctx); + +void ff_set_cmp(MECmpContext *c, me_cmp_func *cmp, int type); + +void ff_dsputil_init_dwt(MECmpContext *c); + +#endif /* AVCODEC_ME_CMP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec.h new file mode 100644 index 00000000..4c8545df --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec.h @@ -0,0 +1,101 @@ +/* + * Android MediaCodec public API + * + * Copyright (c) 2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODEC_H +#define AVCODEC_MEDIACODEC_H + +#include "libavcodec/avcodec.h" + +/** + * This structure holds a reference to a android/view/Surface object that will + * be used as output by the decoder. + * + */ +typedef struct AVMediaCodecContext { + + /** + * android/view/Surface object reference. + */ + void *surface; + +} AVMediaCodecContext; + +/** + * Allocate and initialize a MediaCodec context. + * + * When decoding with MediaCodec is finished, the caller must free the + * MediaCodec context with av_mediacodec_default_free. + * + * @return a pointer to a newly allocated AVMediaCodecContext on success, NULL otherwise + */ +AVMediaCodecContext *av_mediacodec_alloc_context(void); + +/** + * Convenience function that sets up the MediaCodec context. + * + * @param avctx codec context + * @param ctx MediaCodec context to initialize + * @param surface reference to an android/view/Surface + * @return 0 on success, < 0 otherwise + */ +int av_mediacodec_default_init(AVCodecContext *avctx, AVMediaCodecContext *ctx, void *surface); + +/** + * This function must be called to free the MediaCodec context initialized with + * av_mediacodec_default_init(). + * + * @param avctx codec context + */ +void av_mediacodec_default_free(AVCodecContext *avctx); + +/** + * Opaque structure representing a MediaCodec buffer to render. + */ +typedef struct MediaCodecBuffer AVMediaCodecBuffer; + +/** + * Release a MediaCodec buffer and render it to the surface that is associated + * with the decoder. This function should only be called once on a given + * buffer, once released the underlying buffer returns to the codec, thus + * subsequent calls to this function will have no effect. + * + * @param buffer the buffer to render + * @param render 1 to release and render the buffer to the surface or 0 to + * discard the buffer + * @return 0 on success, < 0 otherwise + */ +int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render); + +/** + * Release a MediaCodec buffer and render it at the given time to the surface + * that is associated with the decoder. The timestamp must be within one second + * of the current java/lang/System#nanoTime() (which is implemented using + * CLOCK_MONOTONIC on Android). See the Android MediaCodec documentation + * of android/media/MediaCodec#releaseOutputBuffer(int,long) for more details. + * + * @param buffer the buffer to render + * @param time timestamp in nanoseconds of when to render the buffer + * @return 0 on success, < 0 otherwise + */ +int av_mediacodec_render_buffer_at_time(AVMediaCodecBuffer *buffer, int64_t time); + +#endif /* AVCODEC_MEDIACODEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_surface.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_surface.h new file mode 100644 index 00000000..933dc2bf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_surface.h @@ -0,0 +1,34 @@ +/* + * Android MediaCodec Surface functions + * + * Copyright (c) 2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODEC_SURFACE_H +#define AVCODEC_MEDIACODEC_SURFACE_H + +#include "libavcodec/avcodec.h" + +struct FFANativeWindow; +typedef struct FFANativeWindow FFANativeWindow; + +FFANativeWindow *ff_mediacodec_surface_ref(void *surface, void *log_ctx); +int ff_mediacodec_surface_unref(FFANativeWindow *window, void *log_ctx); + +#endif /* AVCODEC_MEDIACODEC_SURFACE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_sw_buffer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_sw_buffer.h new file mode 100644 index 00000000..574fb529 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_sw_buffer.h @@ -0,0 +1,62 @@ +/* + * Android MediaCodec software buffer copy functions + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODEC_SW_BUFFER_H +#define AVCODEC_MEDIACODEC_SW_BUFFER_H + +#include + +#include "libavutil/frame.h" + +#include "avcodec.h" +#include "mediacodec_wrapper.h" +#include "mediacodecdec_common.h" + +void ff_mediacodec_sw_buffer_copy_yuv420_planar(AVCodecContext *avctx, + MediaCodecDecContext *s, + uint8_t *data, + size_t size, + FFAMediaCodecBufferInfo *info, + AVFrame *frame); + +void ff_mediacodec_sw_buffer_copy_yuv420_semi_planar(AVCodecContext *avctx, + MediaCodecDecContext *s, + uint8_t *data, + size_t size, + FFAMediaCodecBufferInfo *info, + AVFrame *frame); + +void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar(AVCodecContext *avctx, + MediaCodecDecContext *s, + uint8_t *data, + size_t size, + FFAMediaCodecBufferInfo *info, + AVFrame *frame); + +void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar_64x32Tile2m8ka(AVCodecContext *avctx, + MediaCodecDecContext *s, + uint8_t *data, + size_t size, + FFAMediaCodecBufferInfo *info, + AVFrame *frame); + +#endif /* AVCODEC_MEDIACODEC_SW_BUFFER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_wrapper.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_wrapper.h new file mode 100644 index 00000000..b106ff31 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodec_wrapper.h @@ -0,0 +1,131 @@ +/* + * Android MediaCodec Wrapper + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODEC_WRAPPER_H +#define AVCODEC_MEDIACODEC_WRAPPER_H + +#include +#include + +#include "avcodec.h" + +/** + * The following API around MediaCodec and MediaFormat is based on the + * NDK one provided by Google since Android 5.0. + * + * Differences from the NDK API: + * + * Buffers returned by ff_AMediaFormat_toString and ff_AMediaFormat_getString + * are newly allocated buffer and must be freed by the user after use. + * + * The MediaCrypto API is not implemented. + * + * ff_AMediaCodec_infoTryAgainLater, ff_AMediaCodec_infoOutputBuffersChanged, + * ff_AMediaCodec_infoOutputFormatChanged, ff_AMediaCodec_cleanOutputBuffers + * ff_AMediaCodec_getName and ff_AMediaCodec_getBufferFlagEndOfStream are not + * part of the original NDK API and are convenience functions to hide JNI + * implementation. + * + * The API around MediaCodecList is not part of the NDK (and is lacking as + * we still need to retrieve the codec name to work around faulty decoders + * and encoders). + * + * For documentation, please refers to NdkMediaCodec.h NdkMediaFormat.h and + * http://developer.android.com/reference/android/media/MediaCodec.html. + * + */ + +int ff_AMediaCodecProfile_getProfileFromAVCodecContext(AVCodecContext *avctx); + +char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int encoder, void *log_ctx); + +struct FFAMediaFormat; +typedef struct FFAMediaFormat FFAMediaFormat; + +FFAMediaFormat *ff_AMediaFormat_new(void); +int ff_AMediaFormat_delete(FFAMediaFormat* format); + +char* ff_AMediaFormat_toString(FFAMediaFormat* format); + +int ff_AMediaFormat_getInt32(FFAMediaFormat* format, const char *name, int32_t *out); +int ff_AMediaFormat_getInt64(FFAMediaFormat* format, const char *name, int64_t *out); +int ff_AMediaFormat_getFloat(FFAMediaFormat* format, const char *name, float *out); +int ff_AMediaFormat_getBuffer(FFAMediaFormat* format, const char *name, void** data, size_t *size); +int ff_AMediaFormat_getString(FFAMediaFormat* format, const char *name, const char **out); + +void ff_AMediaFormat_setInt32(FFAMediaFormat* format, const char* name, int32_t value); +void ff_AMediaFormat_setInt64(FFAMediaFormat* format, const char* name, int64_t value); +void ff_AMediaFormat_setFloat(FFAMediaFormat* format, const char* name, float value); +void ff_AMediaFormat_setString(FFAMediaFormat* format, const char* name, const char* value); +void ff_AMediaFormat_setBuffer(FFAMediaFormat* format, const char* name, void* data, size_t size); + +struct FFAMediaCodec; +typedef struct FFAMediaCodec FFAMediaCodec; +typedef struct FFAMediaCodecCryptoInfo FFAMediaCodecCryptoInfo; + +struct FFAMediaCodecBufferInfo { + int32_t offset; + int32_t size; + int64_t presentationTimeUs; + uint32_t flags; +}; +typedef struct FFAMediaCodecBufferInfo FFAMediaCodecBufferInfo; + +char *ff_AMediaCodec_getName(FFAMediaCodec *codec); + +FFAMediaCodec* ff_AMediaCodec_createCodecByName(const char *name); +FFAMediaCodec* ff_AMediaCodec_createDecoderByType(const char *mime_type); +FFAMediaCodec* ff_AMediaCodec_createEncoderByType(const char *mime_type); + +int ff_AMediaCodec_configure(FFAMediaCodec* codec, const FFAMediaFormat* format, void* surface, void *crypto, uint32_t flags); +int ff_AMediaCodec_start(FFAMediaCodec* codec); +int ff_AMediaCodec_stop(FFAMediaCodec* codec); +int ff_AMediaCodec_flush(FFAMediaCodec* codec); +int ff_AMediaCodec_delete(FFAMediaCodec* codec); + +uint8_t* ff_AMediaCodec_getInputBuffer(FFAMediaCodec* codec, size_t idx, size_t *out_size); +uint8_t* ff_AMediaCodec_getOutputBuffer(FFAMediaCodec* codec, size_t idx, size_t *out_size); + +ssize_t ff_AMediaCodec_dequeueInputBuffer(FFAMediaCodec* codec, int64_t timeoutUs); +int ff_AMediaCodec_queueInputBuffer(FFAMediaCodec* codec, size_t idx, off_t offset, size_t size, uint64_t time, uint32_t flags); + +ssize_t ff_AMediaCodec_dequeueOutputBuffer(FFAMediaCodec* codec, FFAMediaCodecBufferInfo *info, int64_t timeoutUs); +FFAMediaFormat* ff_AMediaCodec_getOutputFormat(FFAMediaCodec* codec); + +int ff_AMediaCodec_releaseOutputBuffer(FFAMediaCodec* codec, size_t idx, int render); +int ff_AMediaCodec_releaseOutputBufferAtTime(FFAMediaCodec *codec, size_t idx, int64_t timestampNs); + +int ff_AMediaCodec_infoTryAgainLater(FFAMediaCodec *codec, ssize_t idx); +int ff_AMediaCodec_infoOutputBuffersChanged(FFAMediaCodec *codec, ssize_t idx); +int ff_AMediaCodec_infoOutputFormatChanged(FFAMediaCodec *codec, ssize_t indx); + +int ff_AMediaCodec_getBufferFlagCodecConfig (FFAMediaCodec *codec); +int ff_AMediaCodec_getBufferFlagEndOfStream(FFAMediaCodec *codec); +int ff_AMediaCodec_getBufferFlagKeyFrame(FFAMediaCodec *codec); + +int ff_AMediaCodec_getConfigureFlagEncode(FFAMediaCodec *codec); + +int ff_AMediaCodec_cleanOutputBuffers(FFAMediaCodec *codec); + +int ff_Build_SDK_INT(AVCodecContext *avctx); + +#endif /* AVCODEC_MEDIACODEC_WRAPPER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodecdec_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodecdec_common.h new file mode 100644 index 00000000..0b21129f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mediacodecdec_common.h @@ -0,0 +1,109 @@ +/* + * Android MediaCodec decoder + * + * Copyright (c) 2015-2016 Matthieu Bouron + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MEDIACODECDEC_COMMON_H +#define AVCODEC_MEDIACODECDEC_COMMON_H + +#include +#include +#include +#include + +#include "libavutil/frame.h" +#include "libavutil/pixfmt.h" + +#include "avcodec.h" +#include "mediacodec_wrapper.h" + +typedef struct MediaCodecDecContext { + + AVCodecContext *avctx; + atomic_int refcount; + atomic_int hw_buffer_count; + + char *codec_name; + + FFAMediaCodec *codec; + FFAMediaFormat *format; + + void *surface; + + int started; + int draining; + int flushing; + int eos; + + int width; + int height; + int stride; + int slice_height; + int color_format; + int crop_top; + int crop_bottom; + int crop_left; + int crop_right; + int display_width; + int display_height; + + uint64_t output_buffer_count; + ssize_t current_input_buffer; + + bool delay_flush; + atomic_int serial; + +} MediaCodecDecContext; + +int ff_mediacodec_dec_init(AVCodecContext *avctx, + MediaCodecDecContext *s, + const char *mime, + FFAMediaFormat *format); + +int ff_mediacodec_dec_send(AVCodecContext *avctx, + MediaCodecDecContext *s, + AVPacket *pkt, + bool wait); + +int ff_mediacodec_dec_receive(AVCodecContext *avctx, + MediaCodecDecContext *s, + AVFrame *frame, + bool wait); + +int ff_mediacodec_dec_flush(AVCodecContext *avctx, + MediaCodecDecContext *s); + +int ff_mediacodec_dec_close(AVCodecContext *avctx, + MediaCodecDecContext *s); + +int ff_mediacodec_dec_is_flushing(AVCodecContext *avctx, + MediaCodecDecContext *s); + +typedef struct MediaCodecBuffer { + + MediaCodecDecContext *ctx; + ssize_t index; + int64_t pts; + atomic_int released; + int serial; + +} MediaCodecBuffer; + +#endif /* AVCODEC_MEDIACODECDEC_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/metasound_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/metasound_data.h new file mode 100644 index 00000000..5c334113 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/metasound_data.h @@ -0,0 +1,49 @@ +/* + * MetaSound decoder + * Copyright (c) 2013 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_METASOUND_DATA_H +#define AVCODEC_METASOUND_DATA_H + +#include +#include + +#include "twinvq.h" + +extern const TwinVQModeTab ff_metasound_mode0806; +extern const TwinVQModeTab ff_metasound_mode0806s; +extern const TwinVQModeTab ff_metasound_mode0808; +extern const TwinVQModeTab ff_metasound_mode0808s; +extern const TwinVQModeTab ff_metasound_mode1110; +extern const TwinVQModeTab ff_metasound_mode1110s; +extern const TwinVQModeTab ff_metasound_mode1616; +extern const TwinVQModeTab ff_metasound_mode1616s; +extern const TwinVQModeTab ff_metasound_mode2224; +extern const TwinVQModeTab ff_metasound_mode2224s; +extern const TwinVQModeTab ff_metasound_mode2232; +extern const TwinVQModeTab ff_metasound_mode2232s; +extern const TwinVQModeTab ff_metasound_mode4432; +extern const TwinVQModeTab ff_metasound_mode4432s; +extern const TwinVQModeTab ff_metasound_mode4440; +extern const TwinVQModeTab ff_metasound_mode4440s; +extern const TwinVQModeTab ff_metasound_mode4448; +extern const TwinVQModeTab ff_metasound_mode4448s; + +#endif /* AVCODEC_METASOUND_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mf_utils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mf_utils.h new file mode 100644 index 00000000..d514723c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mf_utils.h @@ -0,0 +1,169 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MF_UTILS_H +#define AVCODEC_MF_UTILS_H + +#include +#include +#ifdef _MSC_VER +// The official way of including codecapi (via dshow.h) makes the ICodecAPI +// interface unavailable in UWP mode, but including icodecapi.h + codecapi.h +// seems to be equivalent. (These headers conflict with the official way +// of including it though, through strmif.h via dshow.h. And on mingw, the +// mf*.h headers below indirectly include strmif.h.) +#include +#else +#include +// Older versions of mingw-w64 need codecapi.h explicitly included, while newer +// ones include it implicitly from dshow.h (via uuids.h). +#include +#endif +#include +#include +#include +#include + +#include "avcodec.h" + +// These functions do exist in mfapi.h, but are only available within +// __cplusplus ifdefs. +HRESULT ff_MFGetAttributeSize(IMFAttributes *pattr, REFGUID guid, + UINT32 *pw, UINT32 *ph); +HRESULT ff_MFSetAttributeSize(IMFAttributes *pattr, REFGUID guid, + UINT32 uw, UINT32 uh); +#define ff_MFSetAttributeRatio ff_MFSetAttributeSize +#define ff_MFGetAttributeRatio ff_MFGetAttributeSize + +// MFTEnumEx was missing from mingw-w64's mfplat import library until +// mingw-w64 v6.0.0, thus wrap it and load it using GetProcAddress. +// It's also missing in Windows Vista's mfplat.dll. +HRESULT ff_MFTEnumEx(GUID guidCategory, UINT32 Flags, + const MFT_REGISTER_TYPE_INFO *pInputType, + const MFT_REGISTER_TYPE_INFO *pOutputType, + IMFActivate ***pppMFTActivate, UINT32 *pnumMFTActivate); + + +// These do exist in mingw-w64's codecapi.h, but they aren't properly defined +// by the header until after mingw-w64 v7.0.0. +DEFINE_GUID(ff_CODECAPI_AVDecVideoThumbnailGenerationMode, 0x2efd8eee,0x1150,0x4328,0x9c,0xf5,0x66,0xdc,0xe9,0x33,0xfc,0xf4); +DEFINE_GUID(ff_CODECAPI_AVDecVideoDropPicWithMissingRef, 0xf8226383,0x14c2,0x4567,0x97,0x34,0x50,0x04,0xe9,0x6f,0xf8,0x87); +DEFINE_GUID(ff_CODECAPI_AVDecVideoSoftwareDeinterlaceMode, 0x0c08d1ce,0x9ced,0x4540,0xba,0xe3,0xce,0xb3,0x80,0x14,0x11,0x09); +DEFINE_GUID(ff_CODECAPI_AVDecVideoFastDecodeMode, 0x6b529f7d,0xd3b1,0x49c6,0xa9,0x99,0x9e,0xc6,0x91,0x1b,0xed,0xbf); +DEFINE_GUID(ff_CODECAPI_AVLowLatencyMode, 0x9c27891a,0xed7a,0x40e1,0x88,0xe8,0xb2,0x27,0x27,0xa0,0x24,0xee); +DEFINE_GUID(ff_CODECAPI_AVDecVideoH264ErrorConcealment, 0xececace8,0x3436,0x462c,0x92,0x94,0xcd,0x7b,0xac,0xd7,0x58,0xa9); +DEFINE_GUID(ff_CODECAPI_AVDecVideoMPEG2ErrorConcealment, 0x9d2bfe18,0x728d,0x48d2,0xb3,0x58,0xbc,0x7e,0x43,0x6c,0x66,0x74); +DEFINE_GUID(ff_CODECAPI_AVDecVideoCodecType, 0x434528e5,0x21f0,0x46b6,0xb6,0x2c,0x9b,0x1b,0x6b,0x65,0x8c,0xd1); +DEFINE_GUID(ff_CODECAPI_AVDecVideoDXVAMode, 0xf758f09e,0x7337,0x4ae7,0x83,0x87,0x73,0xdc,0x2d,0x54,0xe6,0x7d); +DEFINE_GUID(ff_CODECAPI_AVDecVideoDXVABusEncryption, 0x42153c8b,0xfd0b,0x4765,0xa4,0x62,0xdd,0xd9,0xe8,0xbc,0xc3,0x88); +DEFINE_GUID(ff_CODECAPI_AVDecVideoSWPowerLevel, 0xfb5d2347,0x4dd8,0x4509,0xae,0xd0,0xdb,0x5f,0xa9,0xaa,0x93,0xf4); +DEFINE_GUID(ff_CODECAPI_AVDecVideoMaxCodedWidth, 0x5ae557b8,0x77af,0x41f5,0x9f,0xa6,0x4d,0xb2,0xfe,0x1d,0x4b,0xca); +DEFINE_GUID(ff_CODECAPI_AVDecVideoMaxCodedHeight, 0x7262a16a,0xd2dc,0x4e75,0x9b,0xa8,0x65,0xc0,0xc6,0xd3,0x2b,0x13); +DEFINE_GUID(ff_CODECAPI_AVDecNumWorkerThreads, 0x9561c3e8,0xea9e,0x4435,0x9b,0x1e,0xa9,0x3e,0x69,0x18,0x94,0xd8); +DEFINE_GUID(ff_CODECAPI_AVDecSoftwareDynamicFormatChange, 0x862e2f0a,0x507b,0x47ff,0xaf,0x47,0x01,0xe2,0x62,0x42,0x98,0xb7); +DEFINE_GUID(ff_CODECAPI_AVDecDisableVideoPostProcessing, 0xf8749193,0x667a,0x4f2c,0xa9,0xe8,0x5d,0x4a,0xf9,0x24,0xf0,0x8f); + +// These are missing from mingw-w64's headers until after mingw-w64 v7.0.0. +DEFINE_GUID(ff_CODECAPI_AVEncCommonRateControlMode, 0x1c0608e9, 0x370c, 0x4710, 0x8a, 0x58, 0xcb, 0x61, 0x81, 0xc4, 0x24, 0x23); +DEFINE_GUID(ff_CODECAPI_AVEncCommonQuality, 0xfcbf57a3, 0x7ea5, 0x4b0c, 0x96, 0x44, 0x69, 0xb4, 0x0c, 0x39, 0xc3, 0x91); +DEFINE_GUID(ff_CODECAPI_AVEncCommonMeanBitRate, 0xf7222374, 0x2144, 0x4815, 0xb5, 0x50, 0xa3, 0x7f, 0x8e, 0x12, 0xee, 0x52); +DEFINE_GUID(ff_CODECAPI_AVEncH264CABACEnable, 0xee6cad62, 0xd305, 0x4248, 0xa5, 0xe, 0xe1, 0xb2, 0x55, 0xf7, 0xca, 0xf8); +DEFINE_GUID(ff_CODECAPI_AVEncVideoForceKeyFrame, 0x398c1b98, 0x8353, 0x475a, 0x9e, 0xf2, 0x8f, 0x26, 0x5d, 0x26, 0x3, 0x45); +DEFINE_GUID(ff_CODECAPI_AVEncMPVDefaultBPictureCount, 0x8d390aac, 0xdc5c, 0x4200, 0xb5, 0x7f, 0x81, 0x4d, 0x04, 0xba, 0xba, 0xb2); +DEFINE_GUID(ff_CODECAPI_AVScenarioInfo, 0xb28a6e64,0x3ff9,0x446a,0x8a,0x4b,0x0d,0x7a,0x53,0x41,0x32,0x36); + +DEFINE_GUID(ff_MF_SA_D3D11_BINDFLAGS, 0xeacf97ad, 0x065c, 0x4408, 0xbe, 0xe3, 0xfd, 0xcb, 0xfd, 0x12, 0x8b, 0xe2); +DEFINE_GUID(ff_MF_SA_D3D11_USAGE, 0xe85fe442, 0x2ca3, 0x486e, 0xa9, 0xc7, 0x10, 0x9d, 0xda, 0x60, 0x98, 0x80); +DEFINE_GUID(ff_MF_SA_D3D11_AWARE, 0x206b4fc8, 0xfcf9, 0x4c51, 0xaf, 0xe3, 0x97, 0x64, 0x36, 0x9e, 0x33, 0xa0); +DEFINE_GUID(ff_MF_SA_D3D11_SHARED, 0x7b8f32c3, 0x6d96, 0x4b89, 0x92, 0x3, 0xdd, 0x38, 0xb6, 0x14, 0x14, 0xf3); +DEFINE_GUID(ff_MF_SA_D3D11_SHARED_WITHOUT_MUTEX, 0x39dbd44d, 0x2e44, 0x4931, 0xa4, 0xc8, 0x35, 0x2d, 0x3d, 0xc4, 0x21, 0x15); +DEFINE_GUID(ff_MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT, 0x851745d5, 0xc3d6, 0x476d, 0x95, 0x27, 0x49, 0x8e, 0xf2, 0xd1, 0xd, 0x18); +DEFINE_GUID(ff_MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT_PROGRESSIVE, 0xf5523a5, 0x1cb2, 0x47c5, 0xa5, 0x50, 0x2e, 0xeb, 0x84, 0xb4, 0xd1, 0x4a); + +DEFINE_MEDIATYPE_GUID(ff_MFVideoFormat_HEVC, 0x43564548); // FCC('HEVC') +DEFINE_MEDIATYPE_GUID(ff_MFVideoFormat_HEVC_ES, 0x53564548); // FCC('HEVS') + + +// This enum is missing from mingw-w64's codecapi.h by v7.0.0. +enum ff_eAVEncCommonRateControlMode { + ff_eAVEncCommonRateControlMode_CBR = 0, + ff_eAVEncCommonRateControlMode_PeakConstrainedVBR = 1, + ff_eAVEncCommonRateControlMode_UnconstrainedVBR = 2, + ff_eAVEncCommonRateControlMode_Quality = 3, + ff_eAVEncCommonRateControlMode_LowDelayVBR = 4, + ff_eAVEncCommonRateControlMode_GlobalVBR = 5, + ff_eAVEncCommonRateControlMode_GlobalLowDelayVBR = 6 +}; + +enum ff_eAVScenarioInfo { + ff_eAVScenarioInfo_Unknown = 0, + ff_eAVScenarioInfo_DisplayRemoting = 1, + ff_eAVScenarioInfo_VideoConference = 2, + ff_eAVScenarioInfo_Archive = 3, + ff_eAVScenarioInfo_LiveStreaming = 4, + ff_eAVScenarioInfo_CameraRecord = 5, + ff_eAVScenarioInfo_DisplayRemotingWithFeatureMap = 6 +}; + +// These do exist in mingw-w64's mfobjects.idl, but are missing from +// mfobjects.h that is generated from the former, due to incorrect use of +// ifdefs in the IDL file. +enum { + ff_METransformUnknown = 600, + ff_METransformNeedInput, + ff_METransformHaveOutput, + ff_METransformDrainComplete, + ff_METransformMarker, +}; + +// These do exist in all supported headers, but are manually defined here +// to avoid having to include codecapi.h, as there's problems including that +// header when targeting UWP (where including it with MSVC seems to work, +// but fails when built with clang in MSVC mode). +enum ff_eAVEncH264VProfile { + ff_eAVEncH264VProfile_Base = 66, + ff_eAVEncH264VProfile_Main = 77, + ff_eAVEncH264VProfile_High = 100, +}; + +char *ff_hr_str_buf(char *buf, size_t size, HRESULT hr); +#define ff_hr_str(hr) ff_hr_str_buf((char[80]){0}, 80, hr) + +// Possibly compiler-dependent; the MS/MinGW definition for this is just crazy. +#define FF_VARIANT_VALUE(type, contents) &(VARIANT){ .vt = (type), contents } + +#define FF_VAL_VT_UI4(v) FF_VARIANT_VALUE(VT_UI4, .ulVal = (v)) +#define FF_VAL_VT_BOOL(v) FF_VARIANT_VALUE(VT_BOOL, .boolVal = (v)) + +IMFSample *ff_create_memory_sample(void *fill_data, size_t size, size_t align); +enum AVSampleFormat ff_media_type_to_sample_fmt(IMFAttributes *type); +enum AVPixelFormat ff_media_type_to_pix_fmt(IMFAttributes *type); +const GUID *ff_pix_fmt_to_guid(enum AVPixelFormat pix_fmt); +int ff_fourcc_from_guid(const GUID *guid, uint32_t *out_fourcc); +char *ff_guid_str_buf(char *buf, size_t buf_size, const GUID *guid); +#define ff_guid_str(guid) ff_guid_str_buf((char[80]){0}, 80, guid) +void ff_attributes_dump(void *log, IMFAttributes *attrs); +void ff_media_type_dump(void *log, IMFMediaType *type); +const CLSID *ff_codec_to_mf_subtype(enum AVCodecID codec); +int ff_instantiate_mf(void *log, GUID category, + MFT_REGISTER_TYPE_INFO *in_type, + MFT_REGISTER_TYPE_INFO *out_type, + int use_hw, IMFTransform **res); +void ff_free_mf(IMFTransform **mft); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacdec_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacdec_mips.h new file mode 100644 index 00000000..758266fc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacdec_mips.h @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Authors: Darko Laus (darko@mips.com) + * Djordje Pesut (djordje@mips.com) + * Mirjana Vulin (mvulin@mips.com) + * + * AAC Spectral Band Replication decoding functions optimized for MIPS + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/aacdec.c + */ + +#ifndef AVCODEC_MIPS_AACDEC_MIPS_H +#define AVCODEC_MIPS_AACDEC_MIPS_H + +#include "libavcodec/aac.h" +#include "libavutil/mips/asmdefs.h" + +#if HAVE_INLINE_ASM && HAVE_MIPSFPU +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +static inline float *VMUL2_mips(float *dst, const float *v, unsigned idx, + const float *scale) +{ + float temp0, temp1, temp2; + int temp3, temp4; + float *ret; + + __asm__ volatile( + "andi %[temp3], %[idx], 0x0F \n\t" + "andi %[temp4], %[idx], 0xF0 \n\t" + "sll %[temp3], %[temp3], 2 \n\t" + "srl %[temp4], %[temp4], 2 \n\t" + "lwc1 %[temp2], 0(%[scale]) \n\t" + "lwxc1 %[temp0], %[temp3](%[v]) \n\t" + "lwxc1 %[temp1], %[temp4](%[v]) \n\t" + "mul.s %[temp0], %[temp0], %[temp2] \n\t" + "mul.s %[temp1], %[temp1], %[temp2] \n\t" + PTR_ADDIU "%[ret], %[dst], 8 \n\t" + "swc1 %[temp0], 0(%[dst]) \n\t" + "swc1 %[temp1], 4(%[dst]) \n\t" + + : [temp0]"=&f"(temp0), [temp1]"=&f"(temp1), + [temp2]"=&f"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&r"(temp4), [ret]"=&r"(ret) + : [idx]"r"(idx), [scale]"r"(scale), [v]"r"(v), + [dst]"r"(dst) + : "memory" + ); + return ret; +} + +static inline float *VMUL4_mips(float *dst, const float *v, unsigned idx, + const float *scale) +{ + int temp0, temp1, temp2, temp3; + float temp4, temp5, temp6, temp7, temp8; + float *ret; + + __asm__ volatile( + "andi %[temp0], %[idx], 0x03 \n\t" + "andi %[temp1], %[idx], 0x0C \n\t" + "andi %[temp2], %[idx], 0x30 \n\t" + "andi %[temp3], %[idx], 0xC0 \n\t" + "sll %[temp0], %[temp0], 2 \n\t" + "srl %[temp2], %[temp2], 2 \n\t" + "srl %[temp3], %[temp3], 4 \n\t" + "lwc1 %[temp4], 0(%[scale]) \n\t" + "lwxc1 %[temp5], %[temp0](%[v]) \n\t" + "lwxc1 %[temp6], %[temp1](%[v]) \n\t" + "lwxc1 %[temp7], %[temp2](%[v]) \n\t" + "lwxc1 %[temp8], %[temp3](%[v]) \n\t" + "mul.s %[temp5], %[temp5], %[temp4] \n\t" + "mul.s %[temp6], %[temp6], %[temp4] \n\t" + "mul.s %[temp7], %[temp7], %[temp4] \n\t" + "mul.s %[temp8], %[temp8], %[temp4] \n\t" + PTR_ADDIU "%[ret], %[dst], 16 \n\t" + "swc1 %[temp5], 0(%[dst]) \n\t" + "swc1 %[temp6], 4(%[dst]) \n\t" + "swc1 %[temp7], 8(%[dst]) \n\t" + "swc1 %[temp8], 12(%[dst]) \n\t" + + : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), + [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&f"(temp4), [temp5]"=&f"(temp5), + [temp6]"=&f"(temp6), [temp7]"=&f"(temp7), + [temp8]"=&f"(temp8), [ret]"=&r"(ret) + : [idx]"r"(idx), [scale]"r"(scale), [v]"r"(v), + [dst]"r"(dst) + : "memory" + ); + return ret; +} + +static inline float *VMUL2S_mips(float *dst, const float *v, unsigned idx, + unsigned sign, const float *scale) +{ + int temp0, temp1, temp2, temp3, temp4, temp5; + float temp6, temp7, temp8, temp9; + float *ret; + + __asm__ volatile( + "andi %[temp0], %[idx], 0x0F \n\t" + "andi %[temp1], %[idx], 0xF0 \n\t" + "lw %[temp4], 0(%[scale]) \n\t" + "srl %[temp2], %[sign], 1 \n\t" + "sll %[temp3], %[sign], 31 \n\t" + "sll %[temp2], %[temp2], 31 \n\t" + "sll %[temp0], %[temp0], 2 \n\t" + "srl %[temp1], %[temp1], 2 \n\t" + "lwxc1 %[temp8], %[temp0](%[v]) \n\t" + "lwxc1 %[temp9], %[temp1](%[v]) \n\t" + "xor %[temp5], %[temp4], %[temp2] \n\t" + "xor %[temp4], %[temp4], %[temp3] \n\t" + "mtc1 %[temp5], %[temp6] \n\t" + "mtc1 %[temp4], %[temp7] \n\t" + "mul.s %[temp8], %[temp8], %[temp6] \n\t" + "mul.s %[temp9], %[temp9], %[temp7] \n\t" + PTR_ADDIU "%[ret], %[dst], 8 \n\t" + "swc1 %[temp8], 0(%[dst]) \n\t" + "swc1 %[temp9], 4(%[dst]) \n\t" + + : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), + [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), + [temp6]"=&f"(temp6), [temp7]"=&f"(temp7), + [temp8]"=&f"(temp8), [temp9]"=&f"(temp9), + [ret]"=&r"(ret) + : [idx]"r"(idx), [scale]"r"(scale), [v]"r"(v), + [dst]"r"(dst), [sign]"r"(sign) + : "memory" + ); + return ret; +} + +static inline float *VMUL4S_mips(float *dst, const float *v, unsigned idx, + unsigned sign, const float *scale) +{ + int temp0, temp1, temp2, temp3, temp4; + float temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17; + float *ret; + unsigned int mask = 1U << 31; + + __asm__ volatile( + "lw %[temp0], 0(%[scale]) \n\t" + "andi %[temp1], %[idx], 0x03 \n\t" + "andi %[temp2], %[idx], 0x0C \n\t" + "andi %[temp3], %[idx], 0x30 \n\t" + "andi %[temp4], %[idx], 0xC0 \n\t" + "sll %[temp1], %[temp1], 2 \n\t" + "srl %[temp3], %[temp3], 2 \n\t" + "srl %[temp4], %[temp4], 4 \n\t" + "lwxc1 %[temp10], %[temp1](%[v]) \n\t" + "lwxc1 %[temp11], %[temp2](%[v]) \n\t" + "lwxc1 %[temp12], %[temp3](%[v]) \n\t" + "lwxc1 %[temp13], %[temp4](%[v]) \n\t" + "and %[temp1], %[sign], %[mask] \n\t" + "srl %[temp2], %[idx], 12 \n\t" + "srl %[temp3], %[idx], 13 \n\t" + "srl %[temp4], %[idx], 14 \n\t" + "andi %[temp2], %[temp2], 1 \n\t" + "andi %[temp3], %[temp3], 1 \n\t" + "andi %[temp4], %[temp4], 1 \n\t" + "sllv %[sign], %[sign], %[temp2] \n\t" + "xor %[temp1], %[temp0], %[temp1] \n\t" + "and %[temp2], %[sign], %[mask] \n\t" + "mtc1 %[temp1], %[temp14] \n\t" + "xor %[temp2], %[temp0], %[temp2] \n\t" + "sllv %[sign], %[sign], %[temp3] \n\t" + "mtc1 %[temp2], %[temp15] \n\t" + "and %[temp3], %[sign], %[mask] \n\t" + "sllv %[sign], %[sign], %[temp4] \n\t" + "xor %[temp3], %[temp0], %[temp3] \n\t" + "and %[temp4], %[sign], %[mask] \n\t" + "mtc1 %[temp3], %[temp16] \n\t" + "xor %[temp4], %[temp0], %[temp4] \n\t" + "mtc1 %[temp4], %[temp17] \n\t" + "mul.s %[temp10], %[temp10], %[temp14] \n\t" + "mul.s %[temp11], %[temp11], %[temp15] \n\t" + "mul.s %[temp12], %[temp12], %[temp16] \n\t" + "mul.s %[temp13], %[temp13], %[temp17] \n\t" + PTR_ADDIU "%[ret], %[dst], 16 \n\t" + "swc1 %[temp10], 0(%[dst]) \n\t" + "swc1 %[temp11], 4(%[dst]) \n\t" + "swc1 %[temp12], 8(%[dst]) \n\t" + "swc1 %[temp13], 12(%[dst]) \n\t" + + : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), + [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&r"(temp4), [temp10]"=&f"(temp10), + [temp11]"=&f"(temp11), [temp12]"=&f"(temp12), + [temp13]"=&f"(temp13), [temp14]"=&f"(temp14), + [temp15]"=&f"(temp15), [temp16]"=&f"(temp16), + [temp17]"=&f"(temp17), [ret]"=&r"(ret), + [sign]"+r"(sign) + : [idx]"r"(idx), [scale]"r"(scale), [v]"r"(v), + [dst]"r"(dst), [mask]"r"(mask) + : "memory" + ); + return ret; +} + +#define VMUL2 VMUL2_mips +#define VMUL4 VMUL4_mips +#define VMUL2S VMUL2S_mips +#define VMUL4S VMUL4S_mips +#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ +#endif /* HAVE_INLINE_ASM && HAVE_MIPSFPU */ + +#endif /* AVCODEC_MIPS_AACDEC_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacpsy_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacpsy_mips.h new file mode 100644 index 00000000..a1fe5cce --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacpsy_mips.h @@ -0,0 +1,238 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Bojan Zivkovic (bojan@mips.com) + * + * AAC encoder psychoacoustic model routines optimized + * for MIPS floating-point architecture + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/aacpsy.c + */ + +#ifndef AVCODEC_MIPS_AACPSY_MIPS_H +#define AVCODEC_MIPS_AACPSY_MIPS_H + +#include "libavutil/mips/asmdefs.h" + +#if HAVE_INLINE_ASM && HAVE_MIPSFPU && ( PSY_LAME_FIR_LEN == 21 ) +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +static void calc_thr_3gpp_mips(const FFPsyWindowInfo *wi, const int num_bands, + AacPsyChannel *pch, const uint8_t *band_sizes, + const float *coefs, const int cutoff) +{ + int i, w, g; + int start = 0, wstart = 0; + for (w = 0; w < wi->num_windows*16; w += 16) { + wstart = 0; + for (g = 0; g < num_bands; g++) { + AacPsyBand *band = &pch->band[w+g]; + + float form_factor = 0.0f; + float Temp; + band->energy = 0.0f; + if (wstart < cutoff) { + for (i = 0; i < band_sizes[g]; i+=4) { + float a, b, c, d; + float ax, bx, cx, dx; + float *cf = (float *)&coefs[start+i]; + + __asm__ volatile ( + "lwc1 %[a], 0(%[cf]) \n\t" + "lwc1 %[b], 4(%[cf]) \n\t" + "lwc1 %[c], 8(%[cf]) \n\t" + "lwc1 %[d], 12(%[cf]) \n\t" + "abs.s %[a], %[a] \n\t" + "abs.s %[b], %[b] \n\t" + "abs.s %[c], %[c] \n\t" + "abs.s %[d], %[d] \n\t" + "sqrt.s %[ax], %[a] \n\t" + "sqrt.s %[bx], %[b] \n\t" + "sqrt.s %[cx], %[c] \n\t" + "sqrt.s %[dx], %[d] \n\t" + "madd.s %[e], %[e], %[a], %[a] \n\t" + "madd.s %[e], %[e], %[b], %[b] \n\t" + "madd.s %[e], %[e], %[c], %[c] \n\t" + "madd.s %[e], %[e], %[d], %[d] \n\t" + "add.s %[f], %[f], %[ax] \n\t" + "add.s %[f], %[f], %[bx] \n\t" + "add.s %[f], %[f], %[cx] \n\t" + "add.s %[f], %[f], %[dx] \n\t" + + : [a]"=&f"(a), [b]"=&f"(b), + [c]"=&f"(c), [d]"=&f"(d), + [e]"+f"(band->energy), [f]"+f"(form_factor), + [ax]"=&f"(ax), [bx]"=&f"(bx), + [cx]"=&f"(cx), [dx]"=&f"(dx) + : [cf]"r"(cf) + : "memory" + ); + } + } + + Temp = sqrtf((float)band_sizes[g] / band->energy); + band->thr = band->energy * 0.001258925f; + band->nz_lines = form_factor * sqrtf(Temp); + start += band_sizes[g]; + wstart += band_sizes[g]; + } + } +} + +static void psy_hp_filter_mips(const float *firbuf, float *hpfsmpl, const float * psy_fir_coeffs) +{ + float sum1, sum2, sum3, sum4; + float *fb = (float*)firbuf; + float *fb_end = fb + AAC_BLOCK_SIZE_LONG; + float *hp = hpfsmpl; + + float coeff0 = psy_fir_coeffs[1]; + float coeff1 = psy_fir_coeffs[3]; + float coeff2 = psy_fir_coeffs[5]; + float coeff3 = psy_fir_coeffs[7]; + float coeff4 = psy_fir_coeffs[9]; + + __asm__ volatile ( + ".set push \n\t" + ".set noreorder \n\t" + + "li.s $f12, 32768 \n\t" + "1: \n\t" + "lwc1 $f0, 40(%[fb]) \n\t" + "lwc1 $f1, 4(%[fb]) \n\t" + "lwc1 $f2, 80(%[fb]) \n\t" + "lwc1 $f3, 44(%[fb]) \n\t" + "lwc1 $f4, 8(%[fb]) \n\t" + "madd.s %[sum1], $f0, $f1, %[coeff0] \n\t" + "lwc1 $f5, 84(%[fb]) \n\t" + "lwc1 $f6, 48(%[fb]) \n\t" + "madd.s %[sum2], $f3, $f4, %[coeff0] \n\t" + "lwc1 $f7, 12(%[fb]) \n\t" + "madd.s %[sum1], %[sum1], $f2, %[coeff0] \n\t" + "lwc1 $f8, 88(%[fb]) \n\t" + "lwc1 $f9, 52(%[fb]) \n\t" + "madd.s %[sum2], %[sum2], $f5, %[coeff0] \n\t" + "madd.s %[sum3], $f6, $f7, %[coeff0] \n\t" + "lwc1 $f10, 16(%[fb]) \n\t" + "lwc1 $f11, 92(%[fb]) \n\t" + "madd.s %[sum1], %[sum1], $f7, %[coeff1] \n\t" + "lwc1 $f1, 72(%[fb]) \n\t" + "madd.s %[sum3], %[sum3], $f8, %[coeff0] \n\t" + "madd.s %[sum4], $f9, $f10, %[coeff0] \n\t" + "madd.s %[sum2], %[sum2], $f10, %[coeff1] \n\t" + "madd.s %[sum1], %[sum1], $f1, %[coeff1] \n\t" + "lwc1 $f4, 76(%[fb]) \n\t" + "lwc1 $f8, 20(%[fb]) \n\t" + "madd.s %[sum4], %[sum4], $f11, %[coeff0] \n\t" + "lwc1 $f11, 24(%[fb]) \n\t" + "madd.s %[sum2], %[sum2], $f4, %[coeff1] \n\t" + "madd.s %[sum1], %[sum1], $f8, %[coeff2] \n\t" + "madd.s %[sum3], %[sum3], $f8, %[coeff1] \n\t" + "madd.s %[sum4], %[sum4], $f11, %[coeff1] \n\t" + "lwc1 $f7, 64(%[fb]) \n\t" + "madd.s %[sum2], %[sum2], $f11, %[coeff2] \n\t" + "lwc1 $f10, 68(%[fb]) \n\t" + "madd.s %[sum3], %[sum3], $f2, %[coeff1] \n\t" + "madd.s %[sum4], %[sum4], $f5, %[coeff1] \n\t" + "madd.s %[sum1], %[sum1], $f7, %[coeff2] \n\t" + "madd.s %[sum2], %[sum2], $f10, %[coeff2] \n\t" + "lwc1 $f2, 28(%[fb]) \n\t" + "lwc1 $f5, 32(%[fb]) \n\t" + "lwc1 $f8, 56(%[fb]) \n\t" + "lwc1 $f11, 60(%[fb]) \n\t" + "madd.s %[sum3], %[sum3], $f2, %[coeff2] \n\t" + "madd.s %[sum4], %[sum4], $f5, %[coeff2] \n\t" + "madd.s %[sum1], %[sum1], $f2, %[coeff3] \n\t" + "madd.s %[sum2], %[sum2], $f5, %[coeff3] \n\t" + "madd.s %[sum3], %[sum3], $f1, %[coeff2] \n\t" + "madd.s %[sum4], %[sum4], $f4, %[coeff2] \n\t" + "madd.s %[sum1], %[sum1], $f8, %[coeff3] \n\t" + "madd.s %[sum2], %[sum2], $f11, %[coeff3] \n\t" + "lwc1 $f1, 36(%[fb]) \n\t" + PTR_ADDIU "%[fb], %[fb], 16 \n\t" + "madd.s %[sum4], %[sum4], $f0, %[coeff3] \n\t" + "madd.s %[sum3], %[sum3], $f1, %[coeff3] \n\t" + "madd.s %[sum1], %[sum1], $f1, %[coeff4] \n\t" + "madd.s %[sum2], %[sum2], $f0, %[coeff4] \n\t" + "madd.s %[sum4], %[sum4], $f10, %[coeff3] \n\t" + "madd.s %[sum3], %[sum3], $f7, %[coeff3] \n\t" + "madd.s %[sum1], %[sum1], $f6, %[coeff4] \n\t" + "madd.s %[sum2], %[sum2], $f9, %[coeff4] \n\t" + "madd.s %[sum4], %[sum4], $f6, %[coeff4] \n\t" + "madd.s %[sum3], %[sum3], $f3, %[coeff4] \n\t" + "mul.s %[sum1], %[sum1], $f12 \n\t" + "mul.s %[sum2], %[sum2], $f12 \n\t" + "madd.s %[sum4], %[sum4], $f11, %[coeff4] \n\t" + "madd.s %[sum3], %[sum3], $f8, %[coeff4] \n\t" + "swc1 %[sum1], 0(%[hp]) \n\t" + "swc1 %[sum2], 4(%[hp]) \n\t" + "mul.s %[sum4], %[sum4], $f12 \n\t" + "mul.s %[sum3], %[sum3], $f12 \n\t" + "swc1 %[sum4], 12(%[hp]) \n\t" + "swc1 %[sum3], 8(%[hp]) \n\t" + "bne %[fb], %[fb_end], 1b \n\t" + PTR_ADDIU "%[hp], %[hp], 16 \n\t" + + ".set pop \n\t" + + : [sum1]"=&f"(sum1), [sum2]"=&f"(sum2), + [sum3]"=&f"(sum3), [sum4]"=&f"(sum4), + [fb]"+r"(fb), [hp]"+r"(hp) + : [coeff0]"f"(coeff0), [coeff1]"f"(coeff1), + [coeff2]"f"(coeff2), [coeff3]"f"(coeff3), + [coeff4]"f"(coeff4), [fb_end]"r"(fb_end) + : "$f0", "$f1", "$f2", "$f3", "$f4", "$f5", "$f6", + "$f7", "$f8", "$f9", "$f10", "$f11", "$f12", + "memory" + ); +} + +#define calc_thr_3gpp calc_thr_3gpp_mips +#define psy_hp_filter psy_hp_filter_mips + +#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ +#endif /* HAVE_INLINE_ASM && HAVE_MIPSFPU */ +#endif /* AVCODEC_MIPS_AACPSY_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacsbr_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacsbr_mips.h new file mode 100644 index 00000000..4461e763 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/aacsbr_mips.h @@ -0,0 +1,496 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Authors: Djordje Pesut (djordje@mips.com) + * Mirjana Vulin (mvulin@mips.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/aacsbr.c + */ + +#ifndef AVCODEC_MIPS_AACSBR_MIPS_H +#define AVCODEC_MIPS_AACSBR_MIPS_H + +#include "libavcodec/aac.h" +#include "libavcodec/sbr.h" +#include "libavutil/mips/asmdefs.h" + +#if HAVE_INLINE_ASM +static void sbr_qmf_analysis_mips(AVFloatDSPContext *fdsp, FFTContext *mdct, + SBRDSPContext *sbrdsp, const float *in, float *x, + float z[320], float W[2][32][32][2], int buf_idx) +{ + int i; + float *w0; + float *w1; + int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7; + + w0 = x; + w1 = x + 1024; + for(i = 0; i < 36; i++) + { + /* loop unrolled 8 times */ + __asm__ volatile( + "lw %[temp0], 0(%[w1]) \n\t" + "lw %[temp1], 4(%[w1]) \n\t" + "lw %[temp2], 8(%[w1]) \n\t" + "lw %[temp3], 12(%[w1]) \n\t" + "lw %[temp4], 16(%[w1]) \n\t" + "lw %[temp5], 20(%[w1]) \n\t" + "lw %[temp6], 24(%[w1]) \n\t" + "lw %[temp7], 28(%[w1]) \n\t" + "sw %[temp0], 0(%[w0]) \n\t" + "sw %[temp1], 4(%[w0]) \n\t" + "sw %[temp2], 8(%[w0]) \n\t" + "sw %[temp3], 12(%[w0]) \n\t" + "sw %[temp4], 16(%[w0]) \n\t" + "sw %[temp5], 20(%[w0]) \n\t" + "sw %[temp6], 24(%[w0]) \n\t" + "sw %[temp7], 28(%[w0]) \n\t" + PTR_ADDIU " %[w0], %[w0], 32 \n\t" + PTR_ADDIU " %[w1], %[w1], 32 \n\t" + + : [w0]"+r"(w0), [w1]"+r"(w1), + [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), + [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), + [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) + : + : "memory" + ); + } + + w0 = x + 288; + w1 = (float*)in; + for(i = 0; i < 128; i++) + { + /* loop unrolled 8 times */ + __asm__ volatile( + "lw %[temp0], 0(%[w1]) \n\t" + "lw %[temp1], 4(%[w1]) \n\t" + "lw %[temp2], 8(%[w1]) \n\t" + "lw %[temp3], 12(%[w1]) \n\t" + "lw %[temp4], 16(%[w1]) \n\t" + "lw %[temp5], 20(%[w1]) \n\t" + "lw %[temp6], 24(%[w1]) \n\t" + "lw %[temp7], 28(%[w1]) \n\t" + "sw %[temp0], 0(%[w0]) \n\t" + "sw %[temp1], 4(%[w0]) \n\t" + "sw %[temp2], 8(%[w0]) \n\t" + "sw %[temp3], 12(%[w0]) \n\t" + "sw %[temp4], 16(%[w0]) \n\t" + "sw %[temp5], 20(%[w0]) \n\t" + "sw %[temp6], 24(%[w0]) \n\t" + "sw %[temp7], 28(%[w0]) \n\t" + PTR_ADDIU " %[w0], %[w0], 32 \n\t" + PTR_ADDIU " %[w1], %[w1], 32 \n\t" + + : [w0]"+r"(w0), [w1]"+r"(w1), + [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), + [temp2]"=&r"(temp2), [temp3]"=&r"(temp3), + [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), + [temp6]"=&r"(temp6), [temp7]"=&r"(temp7) + : + : "memory" + ); + } + + for (i = 0; i < 32; i++) { // numTimeSlots*RATE = 16*2 as 960 sample frames + // are not supported + fdsp->vector_fmul_reverse(z, sbr_qmf_window_ds, x, 320); + sbrdsp->sum64x5(z); + sbrdsp->qmf_pre_shuffle(z); + mdct->imdct_half(mdct, z, z+64); + sbrdsp->qmf_post_shuffle(W[buf_idx][i], z); + x += 32; + } +} + +#if HAVE_MIPSFPU +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +static void sbr_qmf_synthesis_mips(FFTContext *mdct, + SBRDSPContext *sbrdsp, AVFloatDSPContext *fdsp, + float *out, float X[2][38][64], + float mdct_buf[2][64], + float *v0, int *v_off, const unsigned int div) +{ + int i, n; + const float *sbr_qmf_window = div ? sbr_qmf_window_ds : sbr_qmf_window_us; + const int step = 128 >> div; + float *v; + float temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8, temp9, temp10, temp11, temp12, temp13; + float temp14, temp15, temp16, temp17, temp18, temp19; + float *vv0, *s0, *dst; + dst = out; + + for (i = 0; i < 32; i++) { + if (*v_off < step) { + int saved_samples = (1280 - 128) >> div; + memcpy(&v0[SBR_SYNTHESIS_BUF_SIZE - saved_samples], v0, saved_samples * sizeof(float)); + *v_off = SBR_SYNTHESIS_BUF_SIZE - saved_samples - step; + } else { + *v_off -= step; + } + v = v0 + *v_off; + if (div) { + for (n = 0; n < 32; n++) { + X[0][i][ n] = -X[0][i][n]; + X[0][i][32+n] = X[1][i][31-n]; + } + mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); + sbrdsp->qmf_deint_neg(v, mdct_buf[0]); + } else { + sbrdsp->neg_odd_64(X[1][i]); + mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); + mdct->imdct_half(mdct, mdct_buf[1], X[1][i]); + sbrdsp->qmf_deint_bfly(v, mdct_buf[1], mdct_buf[0]); + } + + if(div == 0) + { + float *v0_end; + vv0 = v; + v0_end = v + 60; + s0 = (float*)sbr_qmf_window; + + /* 10 calls of function vector_fmul_add merged into one loop + and loop unrolled 4 times */ + __asm__ volatile( + ".set push \n\t" + ".set noreorder \n\t" + "lwc1 %[temp4], 0(%[v0]) \n\t" + "lwc1 %[temp5], 0(%[s0]) \n\t" + "lwc1 %[temp6], 4(%[v0]) \n\t" + "lwc1 %[temp7], 4(%[s0]) \n\t" + "lwc1 %[temp8], 8(%[v0]) \n\t" + "lwc1 %[temp9], 8(%[s0]) \n\t" + "lwc1 %[temp10], 12(%[v0]) \n\t" + "lwc1 %[temp11], 12(%[s0]) \n\t" + "lwc1 %[temp12], 768(%[v0]) \n\t" + "lwc1 %[temp13], 256(%[s0]) \n\t" + "lwc1 %[temp14], 772(%[v0]) \n\t" + "lwc1 %[temp15], 260(%[s0]) \n\t" + "lwc1 %[temp16], 776(%[v0]) \n\t" + "lwc1 %[temp17], 264(%[s0]) \n\t" + "lwc1 %[temp18], 780(%[v0]) \n\t" + "lwc1 %[temp19], 268(%[s0]) \n\t" + "1: \n\t" + "mul.s %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 1024(%[v0]) \n\t" + "mul.s %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 512(%[s0]) \n\t" + "mul.s %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 1028(%[v0]) \n\t" + "mul.s %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 516(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 1032(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 520(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 1036(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 524(%[s0]) \n\t" + "lwc1 %[temp12], 1792(%[v0]) \n\t" + "lwc1 %[temp13], 768(%[s0]) \n\t" + "lwc1 %[temp14], 1796(%[v0]) \n\t" + "lwc1 %[temp15], 772(%[s0]) \n\t" + "lwc1 %[temp16], 1800(%[v0]) \n\t" + "lwc1 %[temp17], 776(%[s0]) \n\t" + "lwc1 %[temp18], 1804(%[v0]) \n\t" + "lwc1 %[temp19], 780(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 2048(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 1024(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 2052(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 1028(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 2056(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 1032(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 2060(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 1036(%[s0]) \n\t" + "lwc1 %[temp12], 2816(%[v0]) \n\t" + "lwc1 %[temp13], 1280(%[s0]) \n\t" + "lwc1 %[temp14], 2820(%[v0]) \n\t" + "lwc1 %[temp15], 1284(%[s0]) \n\t" + "lwc1 %[temp16], 2824(%[v0]) \n\t" + "lwc1 %[temp17], 1288(%[s0]) \n\t" + "lwc1 %[temp18], 2828(%[v0]) \n\t" + "lwc1 %[temp19], 1292(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 3072(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 1536(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 3076(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 1540(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 3080(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 1544(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 3084(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 1548(%[s0]) \n\t" + "lwc1 %[temp12], 3840(%[v0]) \n\t" + "lwc1 %[temp13], 1792(%[s0]) \n\t" + "lwc1 %[temp14], 3844(%[v0]) \n\t" + "lwc1 %[temp15], 1796(%[s0]) \n\t" + "lwc1 %[temp16], 3848(%[v0]) \n\t" + "lwc1 %[temp17], 1800(%[s0]) \n\t" + "lwc1 %[temp18], 3852(%[v0]) \n\t" + "lwc1 %[temp19], 1804(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 4096(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 2048(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 4100(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 2052(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 4104(%[v0]) \n\t" + PTR_ADDIU "%[dst], %[dst], 16 \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 2056(%[s0]) \n\t" + PTR_ADDIU " %[s0], %[s0], 16 \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 4108(%[v0]) \n\t" + PTR_ADDIU " %[v0], %[v0], 16 \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 2044(%[s0]) \n\t" + "lwc1 %[temp12], 4848(%[v0]) \n\t" + "lwc1 %[temp13], 2288(%[s0]) \n\t" + "lwc1 %[temp14], 4852(%[v0]) \n\t" + "lwc1 %[temp15], 2292(%[s0]) \n\t" + "lwc1 %[temp16], 4856(%[v0]) \n\t" + "lwc1 %[temp17], 2296(%[s0]) \n\t" + "lwc1 %[temp18], 4860(%[v0]) \n\t" + "lwc1 %[temp19], 2300(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 0(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 0(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 4(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 4(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 8(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 8(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 12(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 12(%[s0]) \n\t" + "lwc1 %[temp12], 768(%[v0]) \n\t" + "lwc1 %[temp13], 256(%[s0]) \n\t" + "lwc1 %[temp14], 772(%[v0]) \n\t" + "lwc1 %[temp15], 260(%[s0]) \n\t" + "lwc1 %[temp16], 776(%[v0]) \n\t" + "lwc1 %[temp17], 264(%[s0]) \n\t" + "lwc1 %[temp18], 780(%[v0]) \n\t" + "lwc1 %[temp19], 268(%[s0]) \n\t" + "swc1 %[temp0], -16(%[dst]) \n\t" + "swc1 %[temp1], -12(%[dst]) \n\t" + "swc1 %[temp2], -8(%[dst]) \n\t" + "bne %[v0], %[v0_end], 1b \n\t" + " swc1 %[temp3], -4(%[dst]) \n\t" + "mul.s %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 1024(%[v0]) \n\t" + "mul.s %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 512(%[s0]) \n\t" + "mul.s %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 1028(%[v0]) \n\t" + "mul.s %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 516(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 1032(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 520(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 1036(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 524(%[s0]) \n\t" + "lwc1 %[temp12], 1792(%[v0]) \n\t" + "lwc1 %[temp13], 768(%[s0]) \n\t" + "lwc1 %[temp14], 1796(%[v0]) \n\t" + "lwc1 %[temp15], 772(%[s0]) \n\t" + "lwc1 %[temp16], 1800(%[v0]) \n\t" + "lwc1 %[temp17], 776(%[s0]) \n\t" + "lwc1 %[temp18], 1804(%[v0]) \n\t" + "lwc1 %[temp19], 780(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 2048(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 1024(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 2052(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 1028(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 2056(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 1032(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 2060(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 1036(%[s0]) \n\t" + "lwc1 %[temp12], 2816(%[v0]) \n\t" + "lwc1 %[temp13], 1280(%[s0]) \n\t" + "lwc1 %[temp14], 2820(%[v0]) \n\t" + "lwc1 %[temp15], 1284(%[s0]) \n\t" + "lwc1 %[temp16], 2824(%[v0]) \n\t" + "lwc1 %[temp17], 1288(%[s0]) \n\t" + "lwc1 %[temp18], 2828(%[v0]) \n\t" + "lwc1 %[temp19], 1292(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 3072(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 1536(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 3076(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 1540(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 3080(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 1544(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 3084(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 1548(%[s0]) \n\t" + "lwc1 %[temp12], 3840(%[v0]) \n\t" + "lwc1 %[temp13], 1792(%[s0]) \n\t" + "lwc1 %[temp14], 3844(%[v0]) \n\t" + "lwc1 %[temp15], 1796(%[s0]) \n\t" + "lwc1 %[temp16], 3848(%[v0]) \n\t" + "lwc1 %[temp17], 1800(%[s0]) \n\t" + "lwc1 %[temp18], 3852(%[v0]) \n\t" + "lwc1 %[temp19], 1804(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp4], 4096(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp5], 2048(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp6], 4100(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp7], 2052(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + "lwc1 %[temp8], 4104(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "lwc1 %[temp9], 2056(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "lwc1 %[temp10], 4108(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "lwc1 %[temp11], 2060(%[s0]) \n\t" + "lwc1 %[temp12], 4864(%[v0]) \n\t" + "lwc1 %[temp13], 2304(%[s0]) \n\t" + "lwc1 %[temp14], 4868(%[v0]) \n\t" + "lwc1 %[temp15], 2308(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp4], %[temp5] \n\t" + "lwc1 %[temp16], 4872(%[v0]) \n\t" + "madd.s %[temp1], %[temp1], %[temp6], %[temp7] \n\t" + "lwc1 %[temp17], 2312(%[s0]) \n\t" + "madd.s %[temp2], %[temp2], %[temp8], %[temp9] \n\t" + "lwc1 %[temp18], 4876(%[v0]) \n\t" + "madd.s %[temp3], %[temp3], %[temp10], %[temp11] \n\t" + "lwc1 %[temp19], 2316(%[s0]) \n\t" + "madd.s %[temp0], %[temp0], %[temp12], %[temp13] \n\t" + PTR_ADDIU "%[dst], %[dst], 16 \n\t" + "madd.s %[temp1], %[temp1], %[temp14], %[temp15] \n\t" + "madd.s %[temp2], %[temp2], %[temp16], %[temp17] \n\t" + "madd.s %[temp3], %[temp3], %[temp18], %[temp19] \n\t" + "swc1 %[temp0], -16(%[dst]) \n\t" + "swc1 %[temp1], -12(%[dst]) \n\t" + "swc1 %[temp2], -8(%[dst]) \n\t" + "swc1 %[temp3], -4(%[dst]) \n\t" + ".set pop \n\t" + + : [dst]"+r"(dst), [v0]"+r"(vv0), [s0]"+r"(s0), + [temp0]"=&f"(temp0), [temp1]"=&f"(temp1), [temp2]"=&f"(temp2), + [temp3]"=&f"(temp3), [temp4]"=&f"(temp4), [temp5]"=&f"(temp5), + [temp6]"=&f"(temp6), [temp7]"=&f"(temp7), [temp8]"=&f"(temp8), + [temp9]"=&f"(temp9), [temp10]"=&f"(temp10), [temp11]"=&f"(temp11), + [temp12]"=&f"(temp12), [temp13]"=&f"(temp13), [temp14]"=&f"(temp14), + [temp15]"=&f"(temp15), [temp16]"=&f"(temp16), [temp17]"=&f"(temp17), + [temp18]"=&f"(temp18), [temp19]"=&f"(temp19) + : [v0_end]"r"(v0_end) + : "memory" + ); + } + else + { + fdsp->vector_fmul (out, v , sbr_qmf_window , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 192 >> div), sbr_qmf_window + ( 64 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 256 >> div), sbr_qmf_window + (128 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 448 >> div), sbr_qmf_window + (192 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 512 >> div), sbr_qmf_window + (256 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 704 >> div), sbr_qmf_window + (320 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 768 >> div), sbr_qmf_window + (384 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + ( 960 >> div), sbr_qmf_window + (448 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + (1024 >> div), sbr_qmf_window + (512 >> div), out , 64 >> div); + fdsp->vector_fmul_add(out, v + (1216 >> div), sbr_qmf_window + (576 >> div), out , 64 >> div); + out += 64 >> div; + } + } +} + +#define sbr_qmf_analysis sbr_qmf_analysis_mips +#define sbr_qmf_synthesis sbr_qmf_synthesis_mips + +#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ +#endif /* HAVE_MIPSFPU */ +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_MIPS_AACSBR_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/amrwbdec_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/amrwbdec_mips.h new file mode 100644 index 00000000..a9f66fef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/amrwbdec_mips.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Nedeljko Babic (nbabic@mips.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/amrwbdec.c + */ +#ifndef AVCODEC_MIPS_AMRWBDEC_MIPS_H +#define AVCODEC_MIPS_AMRWBDEC_MIPS_H +#include "config.h" + +#if HAVE_MIPSFPU && HAVE_INLINE_ASM +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +void ff_hb_fir_filter_mips(float *out, const float fir_coef[], + float mem[], const float *in); +#define hb_fir_filter ff_hb_fir_filter_mips +#endif +#endif + +#endif /* AVCODEC_MIPS_AMRWBDEC_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/blockdsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/blockdsp_mips.h new file mode 100644 index 00000000..1742b123 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/blockdsp_mips.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2015 Parag Salasakar (parag.salasakar@imgtec.com) + * Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_BLOCKDSP_MIPS_H +#define AVCODEC_MIPS_BLOCKDSP_MIPS_H + +#include "../mpegvideo.h" + +void ff_fill_block16_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height); +void ff_fill_block8_msa(uint8_t *src, uint8_t val, ptrdiff_t stride, int height); +void ff_clear_block_msa(int16_t *block); +void ff_clear_blocks_msa(int16_t *block); + +void ff_fill_block16_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h); +void ff_fill_block8_mmi(uint8_t *block, uint8_t value, ptrdiff_t line_size, int h); +void ff_clear_block_mmi(int16_t *block); +void ff_clear_blocks_mmi(int16_t *block); + +#endif // #ifndef AVCODEC_MIPS_BLOCKDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/cabac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/cabac.h new file mode 100644 index 00000000..03b5010e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/cabac.h @@ -0,0 +1,119 @@ +/* + * Loongson SIMD optimized h264chroma + * + * Copyright (c) 2018 Loongson Technology Corporation Limited + * Copyright (c) 2018 Shiyou Yin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_CABAC_H +#define AVCODEC_MIPS_CABAC_H + +#include "libavcodec/cabac.h" +#include "libavutil/mips/mmiutils.h" +#include "config.h" + +#define get_cabac_inline get_cabac_inline_mips +static av_always_inline int get_cabac_inline_mips(CABACContext *c, + uint8_t * const state){ + mips_reg tmp0, tmp1, tmp2, bit; + + __asm__ volatile ( + "lbu %[bit], 0(%[state]) \n\t" + "and %[tmp0], %[c_range], 0xC0 \n\t" + PTR_ADDU "%[tmp0], %[tmp0], %[tmp0] \n\t" + PTR_ADDU "%[tmp0], %[tmp0], %[tables] \n\t" + PTR_ADDU "%[tmp0], %[tmp0], %[bit] \n\t" + /* tmp1: RangeLPS */ + "lbu %[tmp1], %[lps_off](%[tmp0]) \n\t" + + PTR_SUBU "%[c_range], %[c_range], %[tmp1] \n\t" + PTR_SLL "%[tmp0], %[c_range], 0x11 \n\t" + PTR_SUBU "%[tmp0], %[tmp0], %[c_low] \n\t" + + /* tmp2: lps_mask */ + PTR_SRA "%[tmp2], %[tmp0], 0x1F \n\t" + /* If tmp0 < 0, lps_mask == 0xffffffff*/ + /* If tmp0 >= 0, lps_mask == 0x00000000*/ + "beqz %[tmp2], 1f \n\t" + PTR_SLL "%[tmp0], %[c_range], 0x11 \n\t" + PTR_SUBU "%[c_low], %[c_low], %[tmp0] \n\t" + PTR_SUBU "%[tmp0], %[tmp1], %[c_range] \n\t" + PTR_ADDU "%[c_range], %[c_range], %[tmp0] \n\t" + "xor %[bit], %[bit], %[tmp2] \n\t" + + "1: \n\t" + /* tmp1: *state */ + PTR_ADDU "%[tmp0], %[tables], %[bit] \n\t" + "lbu %[tmp1], %[mlps_off](%[tmp0]) \n\t" + /* tmp2: lps_mask */ + PTR_ADDU "%[tmp0], %[tables], %[c_range] \n\t" + "lbu %[tmp2], %[norm_off](%[tmp0]) \n\t" + + "sb %[tmp1], 0(%[state]) \n\t" + "and %[bit], %[bit], 0x01 \n\t" + PTR_SLL "%[c_range], %[c_range], %[tmp2] \n\t" + PTR_SLL "%[c_low], %[c_low], %[tmp2] \n\t" + + "and %[tmp0], %[c_low], %[cabac_mask] \n\t" + "bnez %[tmp0], 1f \n\t" + PTR_ADDIU "%[tmp0], %[c_low], -0x01 \n\t" + "xor %[tmp0], %[c_low], %[tmp0] \n\t" + PTR_SRA "%[tmp0], %[tmp0], 0x0f \n\t" + PTR_ADDU "%[tmp0], %[tmp0], %[tables] \n\t" + "lbu %[tmp2], %[norm_off](%[tmp0]) \n\t" +#if CABAC_BITS == 16 + "lbu %[tmp0], 0(%[c_bytestream]) \n\t" + "lbu %[tmp1], 1(%[c_bytestream]) \n\t" + PTR_SLL "%[tmp0], %[tmp0], 0x09 \n\t" + PTR_SLL "%[tmp1], %[tmp1], 0x01 \n\t" + PTR_ADDU "%[tmp0], %[tmp0], %[tmp1] \n\t" +#else + "lbu %[tmp0], 0(%[c_bytestream]) \n\t" + PTR_SLL "%[tmp0], %[tmp0], 0x01 \n\t" +#endif + PTR_SUBU "%[tmp0], %[tmp0], %[cabac_mask] \n\t" + + "li %[tmp1], 0x07 \n\t" + PTR_SUBU "%[tmp1], %[tmp1], %[tmp2] \n\t" + PTR_SLL "%[tmp0], %[tmp0], %[tmp1] \n\t" + PTR_ADDU "%[c_low], %[c_low], %[tmp0] \n\t" + +#if !UNCHECKED_BITSTREAM_READER + "bge %[c_bytestream], %[c_bytestream_end], 1f \n\t" +#endif + PTR_ADDIU "%[c_bytestream], %[c_bytestream], 0X02 \n\t" + "1: \n\t" + : [bit]"=&r"(bit), [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [tmp2]"=&r"(tmp2), + [c_range]"+&r"(c->range), [c_low]"+&r"(c->low), + [c_bytestream]"+&r"(c->bytestream) + : [state]"r"(state), [tables]"r"(ff_h264_cabac_tables), +#if !UNCHECKED_BITSTREAM_READER + [c_bytestream_end]"r"(c->bytestream_end), +#endif + [lps_off]"i"(H264_LPS_RANGE_OFFSET), + [mlps_off]"i"(H264_MLPS_STATE_OFFSET + 128), + [norm_off]"i"(H264_NORM_SHIFT_OFFSET), + [cabac_mask]"i"(CABAC_MASK) + : "memory" + ); + + return bit; +} + +#endif /* AVCODEC_MIPS_CABAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_fixed.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_fixed.h new file mode 100644 index 00000000..a967f67d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_fixed.h @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Bojan Zivkovic (bojan@mips.com) + * + * Compute antialias function optimised for MIPS fixed-point architecture + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/mpegaudiodec.c + */ + +#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H +#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H + +#if HAVE_INLINE_ASM +static void compute_antialias_mips_fixed(MPADecodeContext *s, + GranuleDef *g) +{ + int32_t *ptr, *csa; + int n, i; + int MAX_lo = 0xffffffff; + + /* we antialias only "long" bands */ + if (g->block_type == 2) { + if (!g->switch_point) + return; + /* XXX: check this for 8000Hz case */ + n = 1; + } else { + n = SBLIMIT - 1; + } + + + ptr = g->sb_hybrid + 18; + + for(i = n;i > 0;i--) { + int tmp0, tmp1, tmp2, tmp00, tmp11; + int temp_reg1, temp_reg2, temp_reg3, temp_reg4, temp_reg5, temp_reg6; + csa = &csa_table[0][0]; + + /** + * instructions are scheduled to minimize pipeline stall. + */ + __asm__ volatile ( + "lw %[tmp0], -1*4(%[ptr]) \n\t" + "lw %[tmp1], 0*4(%[ptr]) \n\t" + "lw %[temp_reg1], 0*4(%[csa]) \n\t" + "lw %[temp_reg2], 2*4(%[csa]) \n\t" + "add %[tmp2], %[tmp0], %[tmp1] \n\t" + "lw %[temp_reg3], 3*4(%[csa]) \n\t" + "mult $ac0, %[tmp2], %[temp_reg1] \n\t" + "mult $ac1, %[tmp2], %[temp_reg1] \n\t" + "lw %[tmp00], -2*4(%[ptr]) \n\t" + "lw %[tmp11], 1*4(%[ptr]) \n\t" + "lw %[temp_reg4], 4*4(%[csa]) \n\t" + "mtlo %[MAX_lo], $ac0 \n\t" + "mtlo $zero, $ac1 \n\t" + "msub $ac0, %[tmp1], %[temp_reg2] \n\t" + "madd $ac1, %[tmp0], %[temp_reg3] \n\t" + "add %[tmp2], %[tmp00], %[tmp11] \n\t" + "lw %[temp_reg5], 6*4(%[csa]) \n\t" + "mult $ac2, %[tmp2], %[temp_reg4] \n\t" + "mult $ac3, %[tmp2], %[temp_reg4] \n\t" + "mfhi %[temp_reg1], $ac0 \n\t" + "mfhi %[temp_reg2], $ac1 \n\t" + "lw %[temp_reg6], 7*4(%[csa]) \n\t" + "mtlo %[MAX_lo], $ac2 \n\t" + "msub $ac2, %[tmp11], %[temp_reg5] \n\t" + "mtlo $zero, $ac3 \n\t" + "madd $ac3, %[tmp00], %[temp_reg6] \n\t" + "sll %[temp_reg1], %[temp_reg1], 2 \n\t" + "sw %[temp_reg1], -1*4(%[ptr]) \n\t" + "mfhi %[temp_reg4], $ac2 \n\t" + "sll %[temp_reg2], %[temp_reg2], 2 \n\t" + "mfhi %[temp_reg5], $ac3 \n\t" + "sw %[temp_reg2], 0*4(%[ptr]) \n\t" + "lw %[tmp0], -3*4(%[ptr]) \n\t" + "lw %[tmp1], 2*4(%[ptr]) \n\t" + "lw %[temp_reg1], 8*4(%[csa]) \n\t" + "sll %[temp_reg4], %[temp_reg4], 2 \n\t" + "add %[tmp2], %[tmp0], %[tmp1] \n\t" + "sll %[temp_reg5], %[temp_reg5], 2 \n\t" + "mult $ac0, %[tmp2], %[temp_reg1] \n\t" + "mult $ac1, %[tmp2], %[temp_reg1] \n\t" + "sw %[temp_reg4], -2*4(%[ptr]) \n\t" + "sw %[temp_reg5], 1*4(%[ptr]) \n\t" + "lw %[temp_reg2], 10*4(%[csa]) \n\t" + "mtlo %[MAX_lo], $ac0 \n\t" + "lw %[temp_reg3], 11*4(%[csa]) \n\t" + "msub $ac0, %[tmp1], %[temp_reg2] \n\t" + "mtlo $zero, $ac1 \n\t" + "madd $ac1, %[tmp0], %[temp_reg3] \n\t" + "lw %[tmp00], -4*4(%[ptr]) \n\t" + "lw %[tmp11], 3*4(%[ptr]) \n\t" + "mfhi %[temp_reg1], $ac0 \n\t" + "lw %[temp_reg4], 12*4(%[csa]) \n\t" + "mfhi %[temp_reg2], $ac1 \n\t" + "add %[tmp2], %[tmp00], %[tmp11] \n\t" + "mult $ac2, %[tmp2], %[temp_reg4] \n\t" + "mult $ac3, %[tmp2], %[temp_reg4] \n\t" + "lw %[temp_reg5], 14*4(%[csa]) \n\t" + "lw %[temp_reg6], 15*4(%[csa]) \n\t" + "sll %[temp_reg1], %[temp_reg1], 2 \n\t" + "mtlo %[MAX_lo], $ac2 \n\t" + "msub $ac2, %[tmp11], %[temp_reg5] \n\t" + "mtlo $zero, $ac3 \n\t" + "madd $ac3, %[tmp00], %[temp_reg6] \n\t" + "sll %[temp_reg2], %[temp_reg2], 2 \n\t" + "sw %[temp_reg1], -3*4(%[ptr]) \n\t" + "mfhi %[temp_reg4], $ac2 \n\t" + "sw %[temp_reg2], 2*4(%[ptr]) \n\t" + "mfhi %[temp_reg5], $ac3 \n\t" + "lw %[tmp0], -5*4(%[ptr]) \n\t" + "lw %[tmp1], 4*4(%[ptr]) \n\t" + "lw %[temp_reg1], 16*4(%[csa]) \n\t" + "lw %[temp_reg2], 18*4(%[csa]) \n\t" + "add %[tmp2], %[tmp0], %[tmp1] \n\t" + "lw %[temp_reg3], 19*4(%[csa]) \n\t" + "mult $ac0, %[tmp2], %[temp_reg1] \n\t" + "mult $ac1, %[tmp2], %[temp_reg1] \n\t" + "sll %[temp_reg4], %[temp_reg4], 2 \n\t" + "sll %[temp_reg5], %[temp_reg5], 2 \n\t" + "sw %[temp_reg4], -4*4(%[ptr]) \n\t" + "mtlo %[MAX_lo], $ac0 \n\t" + "msub $ac0, %[tmp1], %[temp_reg2] \n\t" + "mtlo $zero, $ac1 \n\t" + "madd $ac1, %[tmp0], %[temp_reg3] \n\t" + "sw %[temp_reg5], 3*4(%[ptr]) \n\t" + "lw %[tmp00], -6*4(%[ptr]) \n\t" + "mfhi %[temp_reg1], $ac0 \n\t" + "lw %[tmp11], 5*4(%[ptr]) \n\t" + "mfhi %[temp_reg2], $ac1 \n\t" + "lw %[temp_reg4], 20*4(%[csa]) \n\t" + "add %[tmp2], %[tmp00], %[tmp11] \n\t" + "lw %[temp_reg5], 22*4(%[csa]) \n\t" + "mult $ac2, %[tmp2], %[temp_reg4] \n\t" + "mult $ac3, %[tmp2], %[temp_reg4] \n\t" + "lw %[temp_reg6], 23*4(%[csa]) \n\t" + "sll %[temp_reg1], %[temp_reg1], 2 \n\t" + "sll %[temp_reg2], %[temp_reg2], 2 \n\t" + "mtlo %[MAX_lo], $ac2 \n\t" + "msub $ac2, %[tmp11], %[temp_reg5] \n\t" + "mtlo $zero, $ac3 \n\t" + "madd $ac3, %[tmp00], %[temp_reg6] \n\t" + "sw %[temp_reg1], -5*4(%[ptr]) \n\t" + "sw %[temp_reg2], 4*4(%[ptr]) \n\t" + "mfhi %[temp_reg4], $ac2 \n\t" + "lw %[tmp0], -7*4(%[ptr]) \n\t" + "mfhi %[temp_reg5], $ac3 \n\t" + "lw %[tmp1], 6*4(%[ptr]) \n\t" + "lw %[temp_reg1], 24*4(%[csa]) \n\t" + "lw %[temp_reg2], 26*4(%[csa]) \n\t" + "add %[tmp2], %[tmp0], %[tmp1] \n\t" + "lw %[temp_reg3], 27*4(%[csa]) \n\t" + "mult $ac0, %[tmp2], %[temp_reg1] \n\t" + "mult $ac1, %[tmp2], %[temp_reg1] \n\t" + "sll %[temp_reg4], %[temp_reg4], 2 \n\t" + "sll %[temp_reg5], %[temp_reg5], 2 \n\t" + "sw %[temp_reg4], -6*4(%[ptr]) \n\t" + "mtlo %[MAX_lo], $ac0 \n\t" + "msub $ac0, %[tmp1], %[temp_reg2] \n\t" + "mtlo $zero, $ac1 \n\t" + "madd $ac1, %[tmp0], %[temp_reg3] \n\t" + "sw %[temp_reg5], 5*4(%[ptr]) \n\t" + "lw %[tmp00], -8*4(%[ptr]) \n\t" + "mfhi %[temp_reg1], $ac0 \n\t" + "lw %[tmp11], 7*4(%[ptr]) \n\t" + "mfhi %[temp_reg2], $ac1 \n\t" + "lw %[temp_reg4], 28*4(%[csa]) \n\t" + "add %[tmp2], %[tmp00], %[tmp11] \n\t" + "lw %[temp_reg5], 30*4(%[csa]) \n\t" + "mult $ac2, %[tmp2], %[temp_reg4] \n\t" + "mult $ac3, %[tmp2], %[temp_reg4] \n\t" + "lw %[temp_reg6], 31*4(%[csa]) \n\t" + "sll %[temp_reg1], %[temp_reg1], 2 \n\t" + "sll %[temp_reg2], %[temp_reg2], 2 \n\t" + "mtlo %[MAX_lo], $ac2 \n\t" + "msub $ac2, %[tmp11], %[temp_reg5] \n\t" + "mtlo $zero, $ac3 \n\t" + "madd $ac3, %[tmp00], %[temp_reg6] \n\t" + "sw %[temp_reg1], -7*4(%[ptr]) \n\t" + "sw %[temp_reg2], 6*4(%[ptr]) \n\t" + "mfhi %[temp_reg4], $ac2 \n\t" + "mfhi %[temp_reg5], $ac3 \n\t" + "sll %[temp_reg4], %[temp_reg4], 2 \n\t" + "sll %[temp_reg5], %[temp_reg5], 2 \n\t" + "sw %[temp_reg4], -8*4(%[ptr]) \n\t" + "sw %[temp_reg5], 7*4(%[ptr]) \n\t" + + : [tmp0] "=&r" (tmp0), [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2), + [tmp00] "=&r" (tmp00), [tmp11] "=&r" (tmp11), + [temp_reg1] "=&r" (temp_reg1), [temp_reg2] "=&r" (temp_reg2), + [temp_reg3] "=&r" (temp_reg3), [temp_reg4] "=&r" (temp_reg4), + [temp_reg5] "=&r" (temp_reg5), [temp_reg6] "=&r" (temp_reg6) + : [csa] "r" (csa), [ptr] "r" (ptr), + [MAX_lo] "r" (MAX_lo) + : "memory", "hi", "lo", "$ac1hi", "$ac1lo", "$ac2hi", "$ac2lo", + "$ac3hi", "$ac3lo" + ); + + ptr += 18; + } +} +#define compute_antialias compute_antialias_mips_fixed +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FIXED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_float.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_float.h new file mode 100644 index 00000000..e2b4f29f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/compute_antialias_float.h @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Bojan Zivkovic (bojan@mips.com) + * + * Compute antialias function optimised for MIPS floating-point architecture + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/mpegaudiodec.c + */ + +#ifndef AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H +#define AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H + +#include "libavutil/mips/asmdefs.h" + +#if HAVE_INLINE_ASM +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +static void compute_antialias_mips_float(MPADecodeContext *s, + GranuleDef *g) +{ + float *ptr, *ptr_end; + float *csa = &csa_table[0][0]; + /* temporary variables */ + float in1, in2, in3, in4, in5, in6, in7, in8; + float out1, out2, out3, out4; + + ptr = g->sb_hybrid + 18; + /* we antialias only "long" bands */ + if (g->block_type == 2) { + if (!g->switch_point) + return; + /* XXX: check this for 8000Hz case */ + ptr_end = ptr + 18; + } else { + ptr_end = ptr + 558; + } + + /** + * instructions are scheduled to minimize pipeline stall. + */ + + __asm__ volatile ( + "compute_antialias_float_loop%=: \t\n" + "lwc1 %[in1], -1*4(%[ptr]) \t\n" + "lwc1 %[in2], 0(%[csa]) \t\n" + "lwc1 %[in3], 1*4(%[csa]) \t\n" + "lwc1 %[in4], 0(%[ptr]) \t\n" + "lwc1 %[in5], -2*4(%[ptr]) \t\n" + "lwc1 %[in6], 4*4(%[csa]) \t\n" + "mul.s %[out1], %[in1], %[in2] \t\n" + "mul.s %[out2], %[in1], %[in3] \t\n" + "lwc1 %[in7], 5*4(%[csa]) \t\n" + "lwc1 %[in8], 1*4(%[ptr]) \t\n" + "nmsub.s %[out1], %[out1], %[in3], %[in4] \t\n" + "madd.s %[out2], %[out2], %[in2], %[in4] \t\n" + "mul.s %[out3], %[in5], %[in6] \t\n" + "mul.s %[out4], %[in5], %[in7] \t\n" + "lwc1 %[in1], -3*4(%[ptr]) \t\n" + "swc1 %[out1], -1*4(%[ptr]) \t\n" + "swc1 %[out2], 0(%[ptr]) \t\n" + "nmsub.s %[out3], %[out3], %[in7], %[in8] \t\n" + "madd.s %[out4], %[out4], %[in6], %[in8] \t\n" + "lwc1 %[in2], 8*4(%[csa]) \t\n" + "swc1 %[out3], -2*4(%[ptr]) \t\n" + "swc1 %[out4], 1*4(%[ptr]) \t\n" + "lwc1 %[in3], 9*4(%[csa]) \t\n" + "lwc1 %[in4], 2*4(%[ptr]) \t\n" + "mul.s %[out1], %[in1], %[in2] \t\n" + "lwc1 %[in5], -4*4(%[ptr]) \t\n" + "lwc1 %[in6], 12*4(%[csa]) \t\n" + "mul.s %[out2], %[in1], %[in3] \t\n" + "lwc1 %[in7], 13*4(%[csa]) \t\n" + "nmsub.s %[out1], %[out1], %[in3], %[in4] \t\n" + "lwc1 %[in8], 3*4(%[ptr]) \t\n" + "mul.s %[out3], %[in5], %[in6] \t\n" + "madd.s %[out2], %[out2], %[in2], %[in4] \t\n" + "mul.s %[out4], %[in5], %[in7] \t\n" + "swc1 %[out1], -3*4(%[ptr]) \t\n" + "lwc1 %[in1], -5*4(%[ptr]) \t\n" + "nmsub.s %[out3], %[out3], %[in7], %[in8] \t\n" + "swc1 %[out2], 2*4(%[ptr]) \t\n" + "madd.s %[out4], %[out4], %[in6], %[in8] \t\n" + "lwc1 %[in2], 16*4(%[csa]) \t\n" + "lwc1 %[in3], 17*4(%[csa]) \t\n" + "swc1 %[out3], -4*4(%[ptr]) \t\n" + "lwc1 %[in4], 4*4(%[ptr]) \t\n" + "swc1 %[out4], 3*4(%[ptr]) \t\n" + "mul.s %[out1], %[in1], %[in2] \t\n" + "mul.s %[out2], %[in1], %[in3] \t\n" + "lwc1 %[in5], -6*4(%[ptr]) \t\n" + "lwc1 %[in6], 20*4(%[csa]) \t\n" + "lwc1 %[in7], 21*4(%[csa]) \t\n" + "nmsub.s %[out1], %[out1], %[in3], %[in4] \t\n" + "madd.s %[out2], %[out2], %[in2], %[in4] \t\n" + "lwc1 %[in8], 5*4(%[ptr]) \t\n" + "mul.s %[out3], %[in5], %[in6] \t\n" + "mul.s %[out4], %[in5], %[in7] \t\n" + "swc1 %[out1], -5*4(%[ptr]) \t\n" + "swc1 %[out2], 4*4(%[ptr]) \t\n" + "lwc1 %[in1], -7*4(%[ptr]) \t\n" + "nmsub.s %[out3], %[out3], %[in7], %[in8] \t\n" + "madd.s %[out4], %[out4], %[in6], %[in8] \t\n" + "lwc1 %[in2], 24*4(%[csa]) \t\n" + "lwc1 %[in3], 25*4(%[csa]) \t\n" + "lwc1 %[in4], 6*4(%[ptr]) \t\n" + "swc1 %[out3], -6*4(%[ptr]) \t\n" + "swc1 %[out4], 5*4(%[ptr]) \t\n" + "mul.s %[out1], %[in1], %[in2] \t\n" + "lwc1 %[in5], -8*4(%[ptr]) \t\n" + "mul.s %[out2], %[in1], %[in3] \t\n" + "lwc1 %[in6], 28*4(%[csa]) \t\n" + "lwc1 %[in7], 29*4(%[csa]) \t\n" + "nmsub.s %[out1], %[out1], %[in3], %[in4] \t\n" + "lwc1 %[in8], 7*4(%[ptr]) \t\n" + "madd.s %[out2], %[out2], %[in2], %[in4] \t\n" + "mul.s %[out3], %[in5], %[in6] \t\n" + "mul.s %[out4], %[in5], %[in7] \t\n" + "swc1 %[out1], -7*4(%[ptr]) \t\n" + "swc1 %[out2], 6*4(%[ptr]) \t\n" + PTR_ADDIU "%[ptr],%[ptr], 72 \t\n" + "nmsub.s %[out3], %[out3], %[in7], %[in8] \t\n" + "madd.s %[out4], %[out4], %[in6], %[in8] \t\n" + "swc1 %[out3], -26*4(%[ptr]) \t\n" + "swc1 %[out4], -11*4(%[ptr]) \t\n" + "bne %[ptr], %[ptr_end], compute_antialias_float_loop%= \t\n" + + : [ptr] "+r" (ptr), + [in1] "=&f" (in1), [in2] "=&f" (in2), + [in3] "=&f" (in3), [in4] "=&f" (in4), + [in5] "=&f" (in5), [in6] "=&f" (in6), + [in7] "=&f" (in7), [in8] "=&f" (in8), + [out1] "=&f" (out1), [out2] "=&f" (out2), + [out3] "=&f" (out3), [out4] "=&f" (out4) + : [csa] "r" (csa), [ptr_end] "r" (ptr_end) + : "memory" + ); +} +#define compute_antialias compute_antialias_mips_float +#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_MIPS_COMPUTE_ANTIALIAS_FLOAT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/constants.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/constants.h new file mode 100644 index 00000000..26045599 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/constants.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2015 Loongson Technology Corporation Limited + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_CONSTANTS_H +#define AVCODEC_MIPS_CONSTANTS_H + +#include + +extern const uint64_t ff_pw_1; +extern const uint64_t ff_pw_2; +extern const uint64_t ff_pw_3; +extern const uint64_t ff_pw_4; +extern const uint64_t ff_pw_5; +extern const uint64_t ff_pw_6; +extern const uint64_t ff_pw_8; +extern const uint64_t ff_pw_9; +extern const uint64_t ff_pw_10; +extern const uint64_t ff_pw_12; +extern const uint64_t ff_pw_15; +extern const uint64_t ff_pw_16; +extern const uint64_t ff_pw_17; +extern const uint64_t ff_pw_18; +extern const uint64_t ff_pw_20; +extern const uint64_t ff_pw_22; +extern const uint64_t ff_pw_28; +extern const uint64_t ff_pw_32; +extern const uint64_t ff_pw_53; +extern const uint64_t ff_pw_64; +extern const uint64_t ff_pw_128; +extern const uint64_t ff_pw_512; +extern const uint64_t ff_pw_m8tom5; +extern const uint64_t ff_pw_m4tom1; +extern const uint64_t ff_pw_1to4; +extern const uint64_t ff_pw_5to8; +extern const uint64_t ff_pw_0to3; +extern const uint64_t ff_pw_4to7; +extern const uint64_t ff_pw_8tob; +extern const uint64_t ff_pw_ctof; + +extern const uint64_t ff_pb_1; +extern const uint64_t ff_pb_3; +extern const uint64_t ff_pb_80; +extern const uint64_t ff_pb_A1; +extern const uint64_t ff_pb_FE; + +extern const uint64_t ff_rnd; +extern const uint64_t ff_rnd2; +extern const uint64_t ff_rnd3; + +extern const uint64_t ff_wm1010; +extern const uint64_t ff_d40000; + +#endif /* AVCODEC_MIPS_CONSTANTS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h263dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h263dsp_mips.h new file mode 100644 index 00000000..99a43cd4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h263dsp_mips.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_H263DSP_MIPS_H +#define AVCODEC_MIPS_H263DSP_MIPS_H + +#include "libavcodec/mpegvideo.h" + +void ff_h263_h_loop_filter_msa(uint8_t *src, int stride, int q_scale); +void ff_h263_v_loop_filter_msa(uint8_t *src, int stride, int q_scale); +void ff_dct_unquantize_mpeg2_inter_msa(MpegEncContext *s, int16_t *block, + int32_t index, int32_t q_scale); +void ff_dct_unquantize_h263_inter_msa(MpegEncContext *s, int16_t *block, + int32_t index, int32_t q_scale); +void ff_dct_unquantize_h263_intra_msa(MpegEncContext *s, int16_t *block, + int32_t index, int32_t q_scale); +int ff_pix_sum_msa(uint8_t *pix, int line_size); + +#endif // #ifndef AVCODEC_MIPS_H263DSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264chroma_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264chroma_mips.h new file mode 100644 index 00000000..996384d0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264chroma_mips.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_H264CHROMA_MIPS_H +#define AVCODEC_MIPS_H264CHROMA_MIPS_H + +#include "libavcodec/h264dec.h" +void ff_put_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); +void ff_put_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); +void ff_put_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); +void ff_avg_h264_chroma_mc8_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); +void ff_avg_h264_chroma_mc4_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); +void ff_avg_h264_chroma_mc2_msa(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int height, int x, int y); + +void ff_put_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); +void ff_avg_h264_chroma_mc8_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); +void ff_put_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); +void ff_avg_h264_chroma_mc4_mmi(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); + +#endif /* AVCODEC_MIPS_H264CHROMA_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264dsp_mips.h new file mode 100644 index 00000000..21b7de06 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264dsp_mips.h @@ -0,0 +1,577 @@ +/* + * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@imgtec.com) + Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_H264DSP_MIPS_H +#define AVCODEC_MIPS_H264DSP_MIPS_H + +#include "libavcodec/h264dec.h" +#include "constants.h" + +void ff_h264_h_lpf_luma_inter_msa(uint8_t *src, int stride, + int alpha, int beta, int8_t *tc0); +void ff_h264_v_lpf_luma_inter_msa(uint8_t *src, int stride, + int alpha, int beta, int8_t *tc0); +void ff_h264_h_lpf_chroma_inter_msa(uint8_t *src, int stride, + int alpha, int beta, int8_t *tc0); +void ff_h264_v_lpf_chroma_inter_msa(uint8_t *src, int stride, + int alpha, int beta, int8_t *tc0); +void ff_h264_h_loop_filter_chroma422_msa(uint8_t *src, int32_t stride, + int32_t alpha, int32_t beta, + int8_t *tc0); +void ff_h264_h_loop_filter_chroma422_mbaff_msa(uint8_t *src, int32_t stride, + int32_t alpha, int32_t beta, + int8_t *tc0); +void ff_h264_h_loop_filter_luma_mbaff_msa(uint8_t *src, int32_t stride, + int32_t alpha, int32_t beta, + int8_t *tc0); + +void ff_h264_idct_add_msa(uint8_t *dst, int16_t *src, int32_t dst_stride); +void ff_h264_idct4x4_addblk_dc_msa(uint8_t *dst, int16_t *src, + int32_t dst_stride); +void ff_h264_deq_idct_luma_dc_msa(int16_t *dst, int16_t *src, + int32_t de_q_val); +void ff_h264_idct_add16_msa(uint8_t *dst, const int32_t *blk_offset, + int16_t *block, int32_t stride, + const uint8_t nnzc[15 * 8]); +void ff_h264_idct_add16_intra_msa(uint8_t *dst, const int32_t *blk_offset, + int16_t *block, int32_t dst_stride, + const uint8_t nnzc[15 * 8]); +void ff_h264_idct_add8_msa(uint8_t **dst, const int32_t *blk_offset, + int16_t *block, int32_t dst_stride, + const uint8_t nnzc[15 * 8]); +void ff_h264_idct_add8_422_msa(uint8_t **dst, const int32_t *blk_offset, + int16_t *block, int32_t dst_stride, + const uint8_t nnzc[15 * 8]); +void ff_h264_idct8_addblk_msa(uint8_t *dst, int16_t *src, int32_t dst_stride); +void ff_h264_idct8_dc_addblk_msa(uint8_t *dst, int16_t *src, + int32_t dst_stride); +void ff_h264_idct8_add4_msa(uint8_t *dst, const int *blk_offset, + int16_t *blk, int dst_stride, + const uint8_t nnzc[15 * 8]); + +void ff_h264_h_lpf_luma_intra_msa(uint8_t *src, int stride, + int alpha, int beta); +void ff_h264_v_lpf_luma_intra_msa(uint8_t *src, int stride, + int alpha, int beta); +void ff_h264_h_lpf_chroma_intra_msa(uint8_t *src, int stride, + int alpha, int beta); +void ff_h264_v_lpf_chroma_intra_msa(uint8_t *src, int stride, + int alpha, int beta); +void ff_h264_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int stride, + int alpha, int beta); + +void ff_biweight_h264_pixels16_8_msa(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, + int weightd, int weights, int offset); +void ff_biweight_h264_pixels8_8_msa(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, + int weightd, int weights, int offset); +void ff_biweight_h264_pixels4_8_msa(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, + int weightd, int weights, int offset); +void ff_weight_h264_pixels16_8_msa(uint8_t *src, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +void ff_weight_h264_pixels8_8_msa(uint8_t *src, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +void ff_weight_h264_pixels4_8_msa(uint8_t *src, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); + +void ff_put_h264_qpel16_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_put_h264_qpel8_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_put_h264_qpel4_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel16_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel8_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel4_mc00_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc10_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc20_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc30_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc01_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc11_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc21_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc31_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc02_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc12_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc22_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc32_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc03_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc13_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc23_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc33_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_h264_intra_predict_plane_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_predict_dc_4blk_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_predict_hor_dc_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_predict_vert_dc_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_predict_mad_cow_dc_l0t_8x8_msa(uint8_t *src, + ptrdiff_t stride); +void ff_h264_intra_predict_mad_cow_dc_0lt_8x8_msa(uint8_t *src, + ptrdiff_t stride); +void ff_h264_intra_predict_mad_cow_dc_l00_8x8_msa(uint8_t *src, + ptrdiff_t stride); +void ff_h264_intra_predict_mad_cow_dc_0l0_8x8_msa(uint8_t *src, + ptrdiff_t stride); +void ff_h264_intra_predict_plane_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_vert_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_horiz_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_dc_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_vert_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_horiz_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_dc_left_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_dc_top_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_dc_128_8x8_msa(uint8_t *src, ptrdiff_t stride); +void ff_h264_intra_pred_dc_128_16x16_msa(uint8_t *src, ptrdiff_t stride); +void ff_vp8_pred8x8_127_dc_8_msa(uint8_t *src, ptrdiff_t stride); +void ff_vp8_pred8x8_129_dc_8_msa(uint8_t *src, ptrdiff_t stride); +void ff_vp8_pred16x16_127_dc_8_msa(uint8_t *src, ptrdiff_t stride); +void ff_vp8_pred16x16_129_dc_8_msa(uint8_t *src, ptrdiff_t stride); + +void ff_h264_add_pixels4_8_mmi(uint8_t *_dst, int16_t *_src, int stride); +void ff_h264_idct_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct8_dc_add_8_mmi(uint8_t *dst, int16_t *block, int stride); +void ff_h264_idct_add16_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add16intra_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct8_add4_8_mmi(uint8_t *dst, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add8_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_idct_add8_422_8_mmi(uint8_t **dest, const int *block_offset, + int16_t *block, int stride, const uint8_t nnzc[15*8]); +void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input, + int qmul); +void ff_h264_chroma_dc_dequant_idct_8_mmi(int16_t *block, int qmul); +void ff_h264_chroma422_dc_dequant_idct_8_mmi(int16_t *block, int qmul); + +void ff_h264_weight_pixels16_8_mmi(uint8_t *block, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels16_8_mmi(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, int weightd, int weights, + int offset); +void ff_h264_weight_pixels8_8_mmi(uint8_t *block, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels8_8_mmi(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, int weightd, int weights, + int offset); +void ff_h264_weight_pixels4_8_mmi(uint8_t *block, ptrdiff_t stride, int height, + int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels4_8_mmi(uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int height, int log2_denom, int weightd, int weights, + int offset); + +void ff_deblock_v_chroma_8_mmi(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_h_chroma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_h_chroma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_v_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_h_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_h_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); +void ff_deblock_v8_luma_8_mmi(uint8_t *pix, int stride, int alpha, int beta, + int8_t *tc0); +void ff_deblock_v8_luma_intra_8_mmi(uint8_t *pix, int stride, int alpha, + int beta); + +void ff_put_h264_qpel16_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel16_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_put_h264_qpel8_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel8_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_put_h264_qpel4_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_put_h264_qpel4_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel16_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel16_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel8_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel8_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +void ff_avg_h264_qpel4_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); +void ff_avg_h264_qpel4_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_stride); + +#endif // #ifndef AVCODEC_MIPS_H264DSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264pred_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264pred_mips.h new file mode 100644 index 00000000..136e2912 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/h264pred_mips.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_H264PRED_MIPS_H +#define AVCODEC_MIPS_H264PRED_MIPS_H + +#include "constants.h" +#include "libavcodec/h264pred.h" + +void ff_pred16x16_vertical_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred16x16_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred16x16_dc_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x8l_top_dc_8_mmi(uint8_t *src, int has_topleft, int has_topright, + ptrdiff_t stride); +void ff_pred8x8l_dc_8_mmi(uint8_t *src, int has_topleft, int has_topright, + ptrdiff_t stride); +void ff_pred8x8l_vertical_8_mmi(uint8_t *src, int has_topleft, + int has_topright, ptrdiff_t stride); +void ff_pred4x4_dc_8_mmi(uint8_t *src, const uint8_t *topright, + ptrdiff_t stride); +void ff_pred8x8_vertical_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x8_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred16x16_plane_svq3_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred16x16_plane_rv40_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred16x16_plane_h264_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x8_top_dc_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x8_dc_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x16_vertical_8_mmi(uint8_t *src, ptrdiff_t stride); +void ff_pred8x16_horizontal_8_mmi(uint8_t *src, ptrdiff_t stride); + +#endif /* AVCODEC_MIPS_H264PRED_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevc_macros_msa.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevc_macros_msa.h new file mode 100644 index 00000000..ea53812b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevc_macros_msa.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2015 - 2017 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_HEVC_MACROS_MSA_H +#define AVCODEC_MIPS_HEVC_MACROS_MSA_H + +#define HEVC_FILT_8TAP_SH(in0, in1, in2, in3, \ + filt0, filt1, filt2, filt3) \ +( { \ + v8i16 out_m; \ + \ + out_m = __msa_dotp_s_h((v16i8) in0, (v16i8) filt0); \ + out_m = __msa_dpadd_s_h(out_m, (v16i8) in1, (v16i8) filt1); \ + DPADD_SB2_SH(in2, in3, filt2, filt3, out_m, out_m); \ + out_m; \ +} ) + +#define HEVC_FILT_8TAP(in0, in1, in2, in3, \ + filt0, filt1, filt2, filt3) \ +( { \ + v4i32 out_m; \ + \ + out_m = __msa_dotp_s_w((v8i16) in0, (v8i16) filt0); \ + out_m = __msa_dpadd_s_w(out_m, (v8i16) in1, (v8i16) filt1); \ + DPADD_SH2_SW(in2, in3, filt2, filt3, out_m, out_m); \ + out_m; \ +} ) + +#define HEVC_FILT_4TAP_SH(in0, in1, filt0, filt1) \ +( { \ + v8i16 out_m; \ + \ + out_m = __msa_dotp_s_h((v16i8) in0, (v16i8) filt0); \ + out_m = __msa_dpadd_s_h(out_m, (v16i8) in1, (v16i8) filt1); \ + out_m; \ +} ) + +#define HEVC_FILT_4TAP(in0, in1, filt0, filt1) \ +( { \ + v4i32 out_m; \ + \ + out_m = __msa_dotp_s_w(in0, (v8i16) filt0); \ + out_m = __msa_dpadd_s_w(out_m, in1, (v8i16) filt1); \ + out_m; \ +} ) + +#endif /* AVCODEC_MIPS_HEVC_MACROS_MSA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcdsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcdsp_mips.h new file mode 100644 index 00000000..c84e08d1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcdsp_mips.h @@ -0,0 +1,573 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_HEVCDSP_MIPS_H +#define AVCODEC_MIPS_HEVCDSP_MIPS_H + +#include "libavcodec/hevcdsp.h" + +#define MC(PEL, DIR, WIDTH) \ +void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_msa(int16_t *dst, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +MC(pel, pixels, 4); +MC(pel, pixels, 6); +MC(pel, pixels, 8); +MC(pel, pixels, 12); +MC(pel, pixels, 16); +MC(pel, pixels, 24); +MC(pel, pixels, 32); +MC(pel, pixels, 48); +MC(pel, pixels, 64); + +MC(qpel, h, 4); +MC(qpel, h, 8); +MC(qpel, h, 12); +MC(qpel, h, 16); +MC(qpel, h, 24); +MC(qpel, h, 32); +MC(qpel, h, 48); +MC(qpel, h, 64); + +MC(qpel, v, 4); +MC(qpel, v, 8); +MC(qpel, v, 12); +MC(qpel, v, 16); +MC(qpel, v, 24); +MC(qpel, v, 32); +MC(qpel, v, 48); +MC(qpel, v, 64); + +MC(qpel, hv, 4); +MC(qpel, hv, 8); +MC(qpel, hv, 12); +MC(qpel, hv, 16); +MC(qpel, hv, 24); +MC(qpel, hv, 32); +MC(qpel, hv, 48); +MC(qpel, hv, 64); + +MC(epel, h, 4); +MC(epel, h, 6); +MC(epel, h, 8); +MC(epel, h, 12); +MC(epel, h, 16); +MC(epel, h, 24); +MC(epel, h, 32); +MC(epel, h, 48); +MC(epel, h, 64); + +MC(epel, v, 4); +MC(epel, v, 6); +MC(epel, v, 8); +MC(epel, v, 12); +MC(epel, v, 16); +MC(epel, v, 24); +MC(epel, v, 32); +MC(epel, v, 48); +MC(epel, v, 64); + +MC(epel, hv, 4); +MC(epel, hv, 6); +MC(epel, hv, 8); +MC(epel, hv, 12); +MC(epel, hv, 16); +MC(epel, hv, 24); +MC(epel, hv, 32); +MC(epel, hv, 48); +MC(epel, hv, 64); + +#undef MC + +#define UNI_MC(PEL, DIR, WIDTH) \ +void ff_hevc_put_hevc_uni_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ + ptrdiff_t dst_stride, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +UNI_MC(pel, pixels, 4); +UNI_MC(pel, pixels, 6); +UNI_MC(pel, pixels, 8); +UNI_MC(pel, pixels, 12); +UNI_MC(pel, pixels, 16); +UNI_MC(pel, pixels, 24); +UNI_MC(pel, pixels, 32); +UNI_MC(pel, pixels, 48); +UNI_MC(pel, pixels, 64); + +UNI_MC(qpel, h, 4); +UNI_MC(qpel, h, 8); +UNI_MC(qpel, h, 12); +UNI_MC(qpel, h, 16); +UNI_MC(qpel, h, 24); +UNI_MC(qpel, h, 32); +UNI_MC(qpel, h, 48); +UNI_MC(qpel, h, 64); + +UNI_MC(qpel, v, 4); +UNI_MC(qpel, v, 8); +UNI_MC(qpel, v, 12); +UNI_MC(qpel, v, 16); +UNI_MC(qpel, v, 24); +UNI_MC(qpel, v, 32); +UNI_MC(qpel, v, 48); +UNI_MC(qpel, v, 64); + +UNI_MC(qpel, hv, 4); +UNI_MC(qpel, hv, 8); +UNI_MC(qpel, hv, 12); +UNI_MC(qpel, hv, 16); +UNI_MC(qpel, hv, 24); +UNI_MC(qpel, hv, 32); +UNI_MC(qpel, hv, 48); +UNI_MC(qpel, hv, 64); + +UNI_MC(epel, h, 4); +UNI_MC(epel, h, 6); +UNI_MC(epel, h, 8); +UNI_MC(epel, h, 12); +UNI_MC(epel, h, 16); +UNI_MC(epel, h, 24); +UNI_MC(epel, h, 32); +UNI_MC(epel, h, 48); +UNI_MC(epel, h, 64); + +UNI_MC(epel, v, 4); +UNI_MC(epel, v, 6); +UNI_MC(epel, v, 8); +UNI_MC(epel, v, 12); +UNI_MC(epel, v, 16); +UNI_MC(epel, v, 24); +UNI_MC(epel, v, 32); +UNI_MC(epel, v, 48); +UNI_MC(epel, v, 64); + +UNI_MC(epel, hv, 4); +UNI_MC(epel, hv, 6); +UNI_MC(epel, hv, 8); +UNI_MC(epel, hv, 12); +UNI_MC(epel, hv, 16); +UNI_MC(epel, hv, 24); +UNI_MC(epel, hv, 32); +UNI_MC(epel, hv, 48); +UNI_MC(epel, hv, 64); + +#undef UNI_MC + +#define UNI_W_MC(PEL, DIR, WIDTH) \ +void ff_hevc_put_hevc_uni_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ + ptrdiff_t \ + dst_stride, \ + uint8_t *src, \ + ptrdiff_t \ + src_stride, \ + int height, \ + int denom, \ + int weight, \ + int offset, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +UNI_W_MC(pel, pixels, 4); +UNI_W_MC(pel, pixels, 6); +UNI_W_MC(pel, pixels, 8); +UNI_W_MC(pel, pixels, 12); +UNI_W_MC(pel, pixels, 16); +UNI_W_MC(pel, pixels, 24); +UNI_W_MC(pel, pixels, 32); +UNI_W_MC(pel, pixels, 48); +UNI_W_MC(pel, pixels, 64); + +UNI_W_MC(qpel, h, 4); +UNI_W_MC(qpel, h, 8); +UNI_W_MC(qpel, h, 12); +UNI_W_MC(qpel, h, 16); +UNI_W_MC(qpel, h, 24); +UNI_W_MC(qpel, h, 32); +UNI_W_MC(qpel, h, 48); +UNI_W_MC(qpel, h, 64); + +UNI_W_MC(qpel, v, 4); +UNI_W_MC(qpel, v, 8); +UNI_W_MC(qpel, v, 12); +UNI_W_MC(qpel, v, 16); +UNI_W_MC(qpel, v, 24); +UNI_W_MC(qpel, v, 32); +UNI_W_MC(qpel, v, 48); +UNI_W_MC(qpel, v, 64); + +UNI_W_MC(qpel, hv, 4); +UNI_W_MC(qpel, hv, 8); +UNI_W_MC(qpel, hv, 12); +UNI_W_MC(qpel, hv, 16); +UNI_W_MC(qpel, hv, 24); +UNI_W_MC(qpel, hv, 32); +UNI_W_MC(qpel, hv, 48); +UNI_W_MC(qpel, hv, 64); + +UNI_W_MC(epel, h, 4); +UNI_W_MC(epel, h, 6); +UNI_W_MC(epel, h, 8); +UNI_W_MC(epel, h, 12); +UNI_W_MC(epel, h, 16); +UNI_W_MC(epel, h, 24); +UNI_W_MC(epel, h, 32); +UNI_W_MC(epel, h, 48); +UNI_W_MC(epel, h, 64); + +UNI_W_MC(epel, v, 4); +UNI_W_MC(epel, v, 6); +UNI_W_MC(epel, v, 8); +UNI_W_MC(epel, v, 12); +UNI_W_MC(epel, v, 16); +UNI_W_MC(epel, v, 24); +UNI_W_MC(epel, v, 32); +UNI_W_MC(epel, v, 48); +UNI_W_MC(epel, v, 64); + +UNI_W_MC(epel, hv, 4); +UNI_W_MC(epel, hv, 6); +UNI_W_MC(epel, hv, 8); +UNI_W_MC(epel, hv, 12); +UNI_W_MC(epel, hv, 16); +UNI_W_MC(epel, hv, 24); +UNI_W_MC(epel, hv, 32); +UNI_W_MC(epel, hv, 48); +UNI_W_MC(epel, hv, 64); + +#undef UNI_W_MC + +#define BI_MC(PEL, DIR, WIDTH) \ +void ff_hevc_put_hevc_bi_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ + ptrdiff_t dst_stride, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int16_t *src_16bit, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +BI_MC(pel, pixels, 4); +BI_MC(pel, pixels, 6); +BI_MC(pel, pixels, 8); +BI_MC(pel, pixels, 12); +BI_MC(pel, pixels, 16); +BI_MC(pel, pixels, 24); +BI_MC(pel, pixels, 32); +BI_MC(pel, pixels, 48); +BI_MC(pel, pixels, 64); + +BI_MC(qpel, h, 4); +BI_MC(qpel, h, 8); +BI_MC(qpel, h, 12); +BI_MC(qpel, h, 16); +BI_MC(qpel, h, 24); +BI_MC(qpel, h, 32); +BI_MC(qpel, h, 48); +BI_MC(qpel, h, 64); + +BI_MC(qpel, v, 4); +BI_MC(qpel, v, 8); +BI_MC(qpel, v, 12); +BI_MC(qpel, v, 16); +BI_MC(qpel, v, 24); +BI_MC(qpel, v, 32); +BI_MC(qpel, v, 48); +BI_MC(qpel, v, 64); + +BI_MC(qpel, hv, 4); +BI_MC(qpel, hv, 8); +BI_MC(qpel, hv, 12); +BI_MC(qpel, hv, 16); +BI_MC(qpel, hv, 24); +BI_MC(qpel, hv, 32); +BI_MC(qpel, hv, 48); +BI_MC(qpel, hv, 64); + +BI_MC(epel, h, 4); +BI_MC(epel, h, 6); +BI_MC(epel, h, 8); +BI_MC(epel, h, 12); +BI_MC(epel, h, 16); +BI_MC(epel, h, 24); +BI_MC(epel, h, 32); +BI_MC(epel, h, 48); +BI_MC(epel, h, 64); + +BI_MC(epel, v, 4); +BI_MC(epel, v, 6); +BI_MC(epel, v, 8); +BI_MC(epel, v, 12); +BI_MC(epel, v, 16); +BI_MC(epel, v, 24); +BI_MC(epel, v, 32); +BI_MC(epel, v, 48); +BI_MC(epel, v, 64); + +BI_MC(epel, hv, 4); +BI_MC(epel, hv, 6); +BI_MC(epel, hv, 8); +BI_MC(epel, hv, 12); +BI_MC(epel, hv, 16); +BI_MC(epel, hv, 24); +BI_MC(epel, hv, 32); +BI_MC(epel, hv, 48); +BI_MC(epel, hv, 64); + +#undef BI_MC + +#define BI_W_MC(PEL, DIR, WIDTH) \ +void ff_hevc_put_hevc_bi_w_##PEL##_##DIR##WIDTH##_8_msa(uint8_t *dst, \ + ptrdiff_t \ + dst_stride, \ + uint8_t *src, \ + ptrdiff_t \ + src_stride, \ + int16_t *src_16bit, \ + int height, \ + int denom, \ + int weight0, \ + int weight1, \ + int offset0, \ + int offset1, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +BI_W_MC(pel, pixels, 4); +BI_W_MC(pel, pixels, 6); +BI_W_MC(pel, pixels, 8); +BI_W_MC(pel, pixels, 12); +BI_W_MC(pel, pixels, 16); +BI_W_MC(pel, pixels, 24); +BI_W_MC(pel, pixels, 32); +BI_W_MC(pel, pixels, 48); +BI_W_MC(pel, pixels, 64); + +BI_W_MC(qpel, h, 4); +BI_W_MC(qpel, h, 8); +BI_W_MC(qpel, h, 12); +BI_W_MC(qpel, h, 16); +BI_W_MC(qpel, h, 24); +BI_W_MC(qpel, h, 32); +BI_W_MC(qpel, h, 48); +BI_W_MC(qpel, h, 64); + +BI_W_MC(qpel, v, 4); +BI_W_MC(qpel, v, 8); +BI_W_MC(qpel, v, 12); +BI_W_MC(qpel, v, 16); +BI_W_MC(qpel, v, 24); +BI_W_MC(qpel, v, 32); +BI_W_MC(qpel, v, 48); +BI_W_MC(qpel, v, 64); + +BI_W_MC(qpel, hv, 4); +BI_W_MC(qpel, hv, 8); +BI_W_MC(qpel, hv, 12); +BI_W_MC(qpel, hv, 16); +BI_W_MC(qpel, hv, 24); +BI_W_MC(qpel, hv, 32); +BI_W_MC(qpel, hv, 48); +BI_W_MC(qpel, hv, 64); + +BI_W_MC(epel, h, 4); +BI_W_MC(epel, h, 6); +BI_W_MC(epel, h, 8); +BI_W_MC(epel, h, 12); +BI_W_MC(epel, h, 16); +BI_W_MC(epel, h, 24); +BI_W_MC(epel, h, 32); +BI_W_MC(epel, h, 48); +BI_W_MC(epel, h, 64); + +BI_W_MC(epel, v, 4); +BI_W_MC(epel, v, 6); +BI_W_MC(epel, v, 8); +BI_W_MC(epel, v, 12); +BI_W_MC(epel, v, 16); +BI_W_MC(epel, v, 24); +BI_W_MC(epel, v, 32); +BI_W_MC(epel, v, 48); +BI_W_MC(epel, v, 64); + +BI_W_MC(epel, hv, 4); +BI_W_MC(epel, hv, 6); +BI_W_MC(epel, hv, 8); +BI_W_MC(epel, hv, 12); +BI_W_MC(epel, hv, 16); +BI_W_MC(epel, hv, 24); +BI_W_MC(epel, hv, 32); +BI_W_MC(epel, hv, 48); +BI_W_MC(epel, hv, 64); + +#undef BI_W_MC + +void ff_hevc_loop_filter_luma_h_8_msa(uint8_t *src, + ptrdiff_t src_stride, + int32_t beta, int32_t *tc, + uint8_t *no_p, uint8_t *no_q); + +void ff_hevc_loop_filter_luma_v_8_msa(uint8_t *src, + ptrdiff_t src_stride, + int32_t beta, int32_t *tc, + uint8_t *no_p, uint8_t *no_q); + +void ff_hevc_loop_filter_chroma_h_8_msa(uint8_t *src, + ptrdiff_t src_stride, + int32_t *tc, uint8_t *no_p, + uint8_t *no_q); + +void ff_hevc_loop_filter_chroma_v_8_msa(uint8_t *src, + ptrdiff_t src_stride, + int32_t *tc, uint8_t *no_p, + uint8_t *no_q); + +void ff_hevc_sao_band_filter_0_8_msa(uint8_t *dst, uint8_t *src, + ptrdiff_t stride_dst, ptrdiff_t stride_src, + int16_t *sao_offset_val, int sao_left_class, + int width, int height); + +void ff_hevc_sao_edge_filter_8_msa(uint8_t *dst, uint8_t *src, + ptrdiff_t stride_dst, + int16_t *sao_offset_val, + int eo, int width, int height); + +void ff_hevc_idct_4x4_msa(int16_t *coeffs, int col_limit); +void ff_hevc_idct_8x8_msa(int16_t *coeffs, int col_limit); +void ff_hevc_idct_16x16_msa(int16_t *coeffs, int col_limit); +void ff_hevc_idct_32x32_msa(int16_t *coeffs, int col_limit); +void ff_hevc_idct_dc_4x4_msa(int16_t *coeffs); +void ff_hevc_idct_dc_8x8_msa(int16_t *coeffs); +void ff_hevc_idct_dc_16x16_msa(int16_t *coeffs); +void ff_hevc_idct_dc_32x32_msa(int16_t *coeffs); +void ff_hevc_addblk_4x4_msa(uint8_t *dst, int16_t *pi16Coeffs, + ptrdiff_t stride); +void ff_hevc_addblk_8x8_msa(uint8_t *dst, int16_t *pi16Coeffs, + ptrdiff_t stride); +void ff_hevc_addblk_16x16_msa(uint8_t *dst, int16_t *pi16Coeffs, + ptrdiff_t stride); +void ff_hevc_addblk_32x32_msa(uint8_t *dst, int16_t *pi16Coeffs, + ptrdiff_t stride); +void ff_hevc_idct_luma_4x4_msa(int16_t *pi16Coeffs); + +/* Loongson optimization */ +#define L_MC(PEL, DIR, WIDTH, TYPE) \ +void ff_hevc_put_hevc_##PEL##_##DIR##WIDTH##_8_##TYPE(int16_t *dst, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) +L_MC(qpel, h, 4, mmi); +L_MC(qpel, h, 8, mmi); +L_MC(qpel, h, 12, mmi); +L_MC(qpel, h, 16, mmi); +L_MC(qpel, h, 24, mmi); +L_MC(qpel, h, 32, mmi); +L_MC(qpel, h, 48, mmi); +L_MC(qpel, h, 64, mmi); + +L_MC(qpel, hv, 4, mmi); +L_MC(qpel, hv, 8, mmi); +L_MC(qpel, hv, 12, mmi); +L_MC(qpel, hv, 16, mmi); +L_MC(qpel, hv, 24, mmi); +L_MC(qpel, hv, 32, mmi); +L_MC(qpel, hv, 48, mmi); +L_MC(qpel, hv, 64, mmi); + +#define L_BI_MC(PEL, DIR, WIDTH, TYPE) \ +void ff_hevc_put_hevc_##PEL##_bi_##DIR##WIDTH##_8_##TYPE(uint8_t *dst, \ + ptrdiff_t dst_stride, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int16_t *src2, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +L_BI_MC(pel, pixels, 8, mmi); +L_BI_MC(pel, pixels, 16, mmi); +L_BI_MC(pel, pixels, 24, mmi); +L_BI_MC(pel, pixels, 32, mmi); +L_BI_MC(pel, pixels, 48, mmi); +L_BI_MC(pel, pixels, 64, mmi); + +L_BI_MC(qpel, hv, 4, mmi); +L_BI_MC(qpel, hv, 8, mmi); +L_BI_MC(qpel, hv, 12, mmi); +L_BI_MC(qpel, hv, 16, mmi); +L_BI_MC(qpel, hv, 24, mmi); +L_BI_MC(qpel, hv, 32, mmi); +L_BI_MC(qpel, hv, 48, mmi); +L_BI_MC(qpel, hv, 64, mmi); + +L_BI_MC(qpel, h, 4, mmi); +L_BI_MC(qpel, h, 8, mmi); +L_BI_MC(qpel, h, 12, mmi); +L_BI_MC(qpel, h, 16, mmi); +L_BI_MC(qpel, h, 24, mmi); +L_BI_MC(qpel, h, 32, mmi); +L_BI_MC(qpel, h, 48, mmi); +L_BI_MC(qpel, h, 64, mmi); + +L_BI_MC(epel, hv, 4, mmi); +L_BI_MC(epel, hv, 8, mmi); +L_BI_MC(epel, hv, 12, mmi); +L_BI_MC(epel, hv, 16, mmi); +L_BI_MC(epel, hv, 24, mmi); +L_BI_MC(epel, hv, 32, mmi); +#undef L_BI_MC + +#define L_UNI_MC(PEL, DIR, WIDTH, TYPE) \ +void ff_hevc_put_hevc_##PEL##_uni_##DIR##WIDTH##_8_##TYPE(uint8_t *dst, \ + ptrdiff_t dst_stride, \ + uint8_t *src, \ + ptrdiff_t src_stride, \ + int height, \ + intptr_t mx, \ + intptr_t my, \ + int width) + +L_UNI_MC(qpel, hv, 4, mmi); +L_UNI_MC(qpel, hv, 8, mmi); +L_UNI_MC(qpel, hv, 12, mmi); +L_UNI_MC(qpel, hv, 16, mmi); +L_UNI_MC(qpel, hv, 24, mmi); +L_UNI_MC(qpel, hv, 32, mmi); +L_UNI_MC(qpel, hv, 48, mmi); +L_UNI_MC(qpel, hv, 64, mmi); +#undef L_UNI_MC + +#endif // #ifndef AVCODEC_MIPS_HEVCDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcpred_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcpred_mips.h new file mode 100644 index 00000000..f22feff8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hevcpred_mips.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_HEVCPRED_MIPS_H +#define AVCODEC_MIPS_HEVCPRED_MIPS_H + +#include "libavcodec/hevcpred.h" + +void ff_hevc_intra_pred_planar_0_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride); + +void ff_hevc_intra_pred_planar_1_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride); + +void ff_hevc_intra_pred_planar_2_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride); + +void ff_hevc_intra_pred_planar_3_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride); + +void ff_hevc_intra_pred_dc_msa(uint8_t *dst, const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride, int log2, int c_idx); + +void ff_pred_intra_pred_angular_0_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride, int c_idx, int mode); + +void ff_pred_intra_pred_angular_1_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride, int c_idx, int mode); + +void ff_pred_intra_pred_angular_2_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride, int c_idx, int mode); + +void ff_pred_intra_pred_angular_3_msa(uint8_t *dst, + const uint8_t *src_top, + const uint8_t *src_left, + ptrdiff_t stride, int c_idx, int mode); + +void ff_intra_pred_8_16x16_msa(struct HEVCContext *s, int x0, int y0, int c_idx); +void ff_intra_pred_8_32x32_msa(struct HEVCContext *s, int x0, int y0, int c_idx); + +#endif // #ifndef AVCODEC_MIPS_HEVCPRED_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hpeldsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hpeldsp_mips.h new file mode 100644 index 00000000..f527c1d7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/hpeldsp_mips.h @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@imgtec.com) + * Copyright (c) 2016 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_HPELDSP_MIPS_H +#define AVCODEC_MIPS_HPELDSP_MIPS_H + +#include "libavcodec/bit_depth_template.c" + +void ff_put_pixels16_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_x2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_y2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_xy2_msa(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); + +void ff_put_pixels16_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_put_pixels8_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_put_pixels4_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_avg_pixels16_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_avg_pixels8_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_avg_pixels4_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_put_no_rnd_pixels16_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); +void ff_put_no_rnd_pixels8_l2_8_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, int dst_stride, int src_stride1, int src_stride2, + int h); + +void ff_put_pixels16_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels16_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels8_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_pixels4_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels16_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_put_no_rnd_pixels8_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels16_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels8_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_x2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_y2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); +void ff_avg_pixels4_xy2_8_mmi(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int32_t h); + +#endif // #ifndef AVCODEC_MIPS_HPELDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/idctdsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/idctdsp_mips.h new file mode 100644 index 00000000..829efebf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/idctdsp_mips.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_IDCTDSP_MIPS_H +#define AVCODEC_MIPS_IDCTDSP_MIPS_H + +#include "../mpegvideo.h" + +void ff_put_pixels_clamped_msa(const int16_t *block, + uint8_t *av_restrict pixels, + ptrdiff_t line_size); +void ff_put_signed_pixels_clamped_msa(const int16_t *block, + uint8_t *av_restrict pixels, + ptrdiff_t line_size); +void ff_add_pixels_clamped_msa(const int16_t *block, + uint8_t *av_restrict pixels, + ptrdiff_t line_size); +void ff_j_rev_dct_msa(int16_t *data); +void ff_jref_idct_put_msa(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_jref_idct_add_msa(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_simple_idct_msa(int16_t *block); +void ff_simple_idct_put_msa(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block); +void ff_simple_idct_add_msa(uint8_t *dest, ptrdiff_t stride_dst, int16_t *block); + +void ff_put_pixels_clamped_mmi(const int16_t *block, + uint8_t *av_restrict pixels, ptrdiff_t line_size); +void ff_put_signed_pixels_clamped_mmi(const int16_t *block, + uint8_t *av_restrict pixels, ptrdiff_t line_size); +void ff_add_pixels_clamped_mmi(const int16_t *block, + uint8_t *av_restrict pixels, ptrdiff_t line_size); +void ff_simple_idct_8_mmi(int16_t *block); +void ff_simple_idct_put_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +#endif // #ifndef AVCODEC_MIPS_IDCTDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/lsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/lsp_mips.h new file mode 100644 index 00000000..6219c5aa --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/lsp_mips.h @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Nedeljko Babic (nbabic@mips.com) + * + * LSP routines for ACELP-based codecs optimized for MIPS + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Reference: libavcodec/lsp.c + */ +#ifndef AVCODEC_MIPS_LSP_MIPS_H +#define AVCODEC_MIPS_LSP_MIPS_H + +#if HAVE_MIPSFPU && HAVE_INLINE_ASM +#if !HAVE_MIPS32R6 && !HAVE_MIPS64R6 +#include "libavutil/mips/asmdefs.h" + +static av_always_inline void ff_lsp2polyf_mips(const double *lsp, double *f, int lp_half_order) +{ + int i, j = 0; + double * p_fi = f; + double * p_f = 0; + + f[0] = 1.0; + f[1] = -2 * lsp[0]; + lsp -= 2; + + for(i=2; i<=lp_half_order; i++) + { + double tmp, f_j_2, f_j_1, f_j; + double val = lsp[2*i]; + + __asm__ volatile( + "move %[p_f], %[p_fi] \n\t" + "add.d %[val], %[val], %[val] \n\t" + PTR_ADDIU "%[p_fi], 8 \n\t" + "ldc1 %[f_j_1], 0(%[p_f]) \n\t" + "ldc1 %[f_j], 8(%[p_f]) \n\t" + "neg.d %[val], %[val] \n\t" + "add.d %[tmp], %[f_j_1], %[f_j_1] \n\t" + "madd.d %[tmp], %[tmp], %[f_j], %[val] \n\t" + "addiu %[j], %[i], -2 \n\t" + "ldc1 %[f_j_2], -8(%[p_f]) \n\t" + "sdc1 %[tmp], 16(%[p_f]) \n\t" + "beqz %[j], ff_lsp2polyf_lp_j_end%= \n\t" + "ff_lsp2polyf_lp_j%=: \n\t" + "add.d %[tmp], %[f_j], %[f_j_2] \n\t" + "madd.d %[tmp], %[tmp], %[f_j_1], %[val] \n\t" + "mov.d %[f_j], %[f_j_1] \n\t" + "addiu %[j], -1 \n\t" + "mov.d %[f_j_1], %[f_j_2] \n\t" + "ldc1 %[f_j_2], -16(%[p_f]) \n\t" + "sdc1 %[tmp], 8(%[p_f]) \n\t" + PTR_ADDIU "%[p_f], -8 \n\t" + "bgtz %[j], ff_lsp2polyf_lp_j%= \n\t" + "ff_lsp2polyf_lp_j_end%=: \n\t" + + : [f_j_2]"=&f"(f_j_2), [f_j_1]"=&f"(f_j_1), [val]"+f"(val), + [tmp]"=&f"(tmp), [f_j]"=&f"(f_j), [p_f]"+r"(p_f), + [j]"+r"(j), [p_fi]"+r"(p_fi) + : [i]"r"(i) + : "memory" + ); + f[1] += val; + } +} +#define ff_lsp2polyf ff_lsp2polyf_mips +#endif /* !HAVE_MIPS32R6 && !HAVE_MIPS64R6 */ +#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM */ +#endif /* AVCODEC_MIPS_LSP_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mathops.h new file mode 100644 index 00000000..bb9dc837 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mathops.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_MATHOPS_H +#define AVCODEC_MIPS_MATHOPS_H + +#include +#include "config.h" +#include "libavutil/common.h" + +#if HAVE_INLINE_ASM + +#if HAVE_LOONGSON3 + +#define MULH MULH +static inline av_const int MULH(int a, int b) +{ + int c; + __asm__ ("dmult %1, %2 \n\t" + "mflo %0 \n\t" + "dsrl %0, %0, 32 \n\t" + : "=r"(c) + : "r"(a),"r"(b) + : "hi", "lo"); + return c; +} + +#define mid_pred mid_pred +static inline av_const int mid_pred(int a, int b, int c) +{ + int t = b; + __asm__ ("sgt $8, %1, %2 \n\t" + "movn %0, %1, $8 \n\t" + "movn %1, %2, $8 \n\t" + "sgt $8, %1, %3 \n\t" + "movz %1, %3, $8 \n\t" + "sgt $8, %0, %1 \n\t" + "movn %0, %1, $8 \n\t" + : "+&r"(t),"+&r"(a) + : "r"(b),"r"(c) + : "$8"); + return t; +} + +#endif /* HAVE_LOONGSON3 */ + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVCODEC_MIPS_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/me_cmp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/me_cmp_mips.h new file mode 100644 index 00000000..e0d0f51a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/me_cmp_mips.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_ME_CMP_MIPS_H +#define AVCODEC_MIPS_ME_CMP_MIPS_H + +#include "../mpegvideo.h" +#include "libavcodec/bit_depth_template.c" + +int ff_hadamard8_diff8x8_msa(MpegEncContext *s, uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int h); +int ff_hadamard8_intra8x8_msa(MpegEncContext *s, uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int h); +int ff_hadamard8_diff16_msa(MpegEncContext *s, uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int h); +int ff_hadamard8_intra16_msa(MpegEncContext *s, uint8_t *dst, uint8_t *src, + ptrdiff_t stride, int h); +int ff_pix_abs16_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs16_x2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs16_y2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs16_xy2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs8_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs8_x2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs8_y2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_pix_abs8_xy2_msa(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, + ptrdiff_t stride, int h); +int ff_sse16_msa(MpegEncContext *v, uint8_t *pu8Src, uint8_t *pu8Ref, + ptrdiff_t stride, int i32Height); +int ff_sse8_msa(MpegEncContext *v, uint8_t *pu8Src, uint8_t *pu8Ref, + ptrdiff_t stride, int i32Height); +int ff_sse4_msa(MpegEncContext *v, uint8_t *pu8Src, uint8_t *pu8Ref, + ptrdiff_t stride, int i32Height); +void ff_add_pixels8_msa(uint8_t *av_restrict pixels, int16_t *block, + ptrdiff_t stride); + +#endif // #ifndef AVCODEC_MIPS_ME_CMP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mpegvideo_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mpegvideo_mips.h new file mode 100644 index 00000000..760d7b32 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/mpegvideo_mips.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_MPEGVIDEO_MIPS_H +#define AVCODEC_MIPS_MPEGVIDEO_MIPS_H + +#include "libavcodec/mpegvideo.h" + +void ff_dct_unquantize_h263_intra_mmi(MpegEncContext *s, int16_t *block, + int n, int qscale); +void ff_dct_unquantize_h263_inter_mmi(MpegEncContext *s, int16_t *block, + int n, int qscale); +void ff_dct_unquantize_mpeg1_intra_mmi(MpegEncContext *s, int16_t *block, + int n, int qscale); +void ff_dct_unquantize_mpeg1_inter_mmi(MpegEncContext *s, int16_t *block, + int n, int qscale); +void ff_dct_unquantize_mpeg2_intra_mmi(MpegEncContext *s, int16_t *block, + int n, int qscale); +void ff_denoise_dct_mmi(MpegEncContext *s, int16_t *block); + +#endif /* AVCODEC_MIPS_MPEGVIDEO_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/pixblockdsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/pixblockdsp_mips.h new file mode 100644 index 00000000..a12b1a69 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/pixblockdsp_mips.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com) + * Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_PIXBLOCKDSP_MIPS_H +#define AVCODEC_MIPS_PIXBLOCKDSP_MIPS_H + +#include "../mpegvideo.h" + +void ff_diff_pixels_msa(int16_t *av_restrict block, const uint8_t *src1, + const uint8_t *src2, ptrdiff_t stride); +void ff_get_pixels_16_msa(int16_t *restrict dst, const uint8_t *src, + ptrdiff_t stride); +void ff_get_pixels_8_msa(int16_t *restrict dst, const uint8_t *src, + ptrdiff_t stride); + +void ff_get_pixels_8_mmi(int16_t *av_restrict block, const uint8_t *pixels, + ptrdiff_t stride); +void ff_diff_pixels_mmi(int16_t *av_restrict block, const uint8_t *src1, + const uint8_t *src2, ptrdiff_t stride); + +#endif // #ifndef AVCODEC_MIPS_PIXBLOCKDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/qpeldsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/qpeldsp_mips.h new file mode 100644 index 00000000..704d2213 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/qpeldsp_mips.h @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2015 Parag Salasakar (Parag.Salasakar@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_QPELDSP_MIPS_H +#define AVCODEC_MIPS_QPELDSP_MIPS_H + +#include "../mpegvideo.h" + +void ff_copy_8x8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_copy_16x16_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_avg_width8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_avg_width16_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); + +void ff_horiz_mc_qpel_aver_src0_8width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_aver_src0_16width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_8width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_16width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_aver_src1_8width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_aver_src1_16width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_aver_src0_8width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_aver_src0_16width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_8width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_16width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_aver_src1_8width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_no_rnd_aver_src1_16width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_aver_src0_8width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_aver_src0_16width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_8width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_16width_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_aver_src1_8width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_horiz_mc_qpel_avg_dst_aver_src1_16width_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); + +void ff_vert_mc_qpel_aver_src0_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_aver_src0_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_aver_src1_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_aver_src1_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_aver_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_aver_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_aver_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_no_rnd_aver_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_aver_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_aver_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_aver_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_vert_mc_qpel_avg_dst_aver_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); + +void ff_hv_mc_qpel_aver_hv_src00_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src00_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_v_src0_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_v_src0_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src10_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src10_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_h_src0_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_h_src0_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_8x8_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_hv_mc_qpel_aver_h_src1_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_h_src1_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src01_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src01_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_v_src1_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_v_src1_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src11_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_aver_hv_src11_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src00_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src00_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_v_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_v_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src10_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src10_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_h_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_h_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_h_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_h_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src01_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src01_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_v_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_v_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src11_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_avg_dst_aver_hv_src11_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src00_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src00_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_v_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_v_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src10_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src10_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_h_src0_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_h_src0_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_16x16_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_8x8_msa(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_h_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_h_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src01_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src01_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_v_src1_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_v_src1_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src11_16x16_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); +void ff_hv_mc_qpel_no_rnd_aver_hv_src11_8x8_msa(uint8_t *dst, + const uint8_t *src, + ptrdiff_t stride); + +#endif // #ifndef AVCODEC_MIPS_QPELDSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vc1dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vc1dsp_mips.h new file mode 100644 index 00000000..5897daea --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vc1dsp_mips.h @@ -0,0 +1,217 @@ +/* + * Copyright (c) 2016 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_VC1DSP_MIPS_H +#define AVCODEC_MIPS_VC1DSP_MIPS_H + +#include "libavcodec/vc1dsp.h" + +void ff_put_vc1_mspel_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); + +void ff_avg_vc1_mspel_mc00_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc01_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc02_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc03_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc10_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc11_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc12_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc13_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc20_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc21_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc22_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc23_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc30_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc31_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc32_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc33_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); + + +void ff_put_vc1_mspel_mc00_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc01_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc02_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc03_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc10_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc11_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc12_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc13_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc20_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc21_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc22_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc23_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc30_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc31_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc32_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_put_vc1_mspel_mc33_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); + +void ff_avg_vc1_mspel_mc00_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc01_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc02_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc03_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc10_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc11_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc12_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc13_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc20_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc21_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc22_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc23_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc30_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc31_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc32_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); +void ff_avg_vc1_mspel_mc33_16_mmi(uint8_t *dst, const uint8_t *src, + ptrdiff_t stride, int rnd); + +void ff_vc1_inv_trans_8x8_mmi(int16_t block[64]); +void ff_vc1_inv_trans_8x4_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_4x8_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_4x4_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); + +void ff_vc1_inv_trans_4x4_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_4x8_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_8x4_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_8x8_dc_mmi(uint8_t *dest, ptrdiff_t linesize, int16_t *block); + +void ff_vc1_v_overlap_mmi(uint8_t *src, int stride); +void ff_vc1_h_overlap_mmi(uint8_t *src, int stride); +void ff_vc1_v_s_overlap_mmi(int16_t *top, int16_t *bottom); +void ff_vc1_h_s_overlap_mmi(int16_t *left, int16_t *right, int left_stride, int right_stride, int flags); + +void ff_vc1_v_loop_filter4_mmi(uint8_t *src, int stride, int pq); +void ff_vc1_h_loop_filter4_mmi(uint8_t *src, int stride, int pq); +void ff_vc1_v_loop_filter8_mmi(uint8_t *src, int stride, int pq); +void ff_vc1_h_loop_filter8_mmi(uint8_t *src, int stride, int pq); +void ff_vc1_v_loop_filter16_mmi(uint8_t *src, int stride, int pq); +void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq); + +void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, + uint8_t *src /* align 1 */, + ptrdiff_t stride, int h, int x, int y); +void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, + uint8_t *src /* align 1 */, + ptrdiff_t stride, int h, int x, int y); +void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */, + uint8_t *src /* align 1 */, + ptrdiff_t stride, int h, int x, int y); +void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */, + uint8_t *src /* align 1 */, + ptrdiff_t stride, int h, int x, int y); + +void ff_vc1_inv_trans_8x8_msa(int16_t block[64]); +void ff_vc1_inv_trans_8x4_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block); +void ff_vc1_inv_trans_4x8_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block); + +#define FF_PUT_VC1_MSPEL_MC_MSA(hmode, vmode) \ +void ff_put_vc1_mspel_mc ## hmode ## vmode ## _msa(uint8_t *dst, \ + const uint8_t *src, \ + ptrdiff_t stride, int rnd); \ +void ff_put_vc1_mspel_mc ## hmode ## vmode ## _16_msa(uint8_t *dst, \ + const uint8_t *src, \ + ptrdiff_t stride, int rnd); + +FF_PUT_VC1_MSPEL_MC_MSA(1, 1); +FF_PUT_VC1_MSPEL_MC_MSA(1, 2); +FF_PUT_VC1_MSPEL_MC_MSA(1, 3); + +FF_PUT_VC1_MSPEL_MC_MSA(2, 1); +FF_PUT_VC1_MSPEL_MC_MSA(2, 2); +FF_PUT_VC1_MSPEL_MC_MSA(2, 3); + +FF_PUT_VC1_MSPEL_MC_MSA(3, 1); +FF_PUT_VC1_MSPEL_MC_MSA(3, 2); +FF_PUT_VC1_MSPEL_MC_MSA(3, 3); +#endif /* AVCODEC_MIPS_VC1DSP_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp3dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp3dsp_mips.h new file mode 100644 index 00000000..4685a825 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp3dsp_mips.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2018 gxw + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_VP3DSP_MIPS_H +#define AVCODEC_MIPS_VP3DSP_MIPS_H + +#include "libavcodec/vp3dsp.h" +#include + +void ff_vp3_idct_add_msa(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_vp3_idct_put_msa(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_vp3_idct_dc_add_msa(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_vp3_v_loop_filter_msa(uint8_t *first_pixel, ptrdiff_t stride, + int *bounding_values); +void ff_put_no_rnd_pixels_l2_msa(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, ptrdiff_t stride, int h); +void ff_vp3_h_loop_filter_msa(uint8_t *first_pixel, ptrdiff_t stride, + int *bounding_values); + +void ff_vp3_idct_add_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_vp3_idct_put_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_vp3_idct_dc_add_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_put_no_rnd_pixels_l2_mmi(uint8_t *dst, const uint8_t *src1, + const uint8_t *src2, ptrdiff_t stride, int h); + +#endif /* #ifndef AVCODEC_MIPS_VP3DSP_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp8dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp8dsp_mips.h new file mode 100644 index 00000000..07666ab7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp8dsp_mips.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * Copyright (c) 2016 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_VP8DSP_MIPS_H +#define AVCODEC_MIPS_VP8DSP_MIPS_H + +#include "libavutil/mem.h" +#include "libavcodec/vp8dsp.h" +#include "libavcodec/mathops.h" +#include "constants.h" + +void ff_put_vp8_pixels4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int x, int y); +void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int x, int y); +void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int x, int y); + +void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); +void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, + int h, int mx, int my); + +/* loop filter */ +void ff_vp8_h_loop_filter16_inner_msa(uint8_t *dst, ptrdiff_t stride, + int32_t e, int32_t i, int32_t h); +void ff_vp8_v_loop_filter16_inner_msa(uint8_t *dst, ptrdiff_t stride, + int32_t e, int32_t i, int32_t h); +void ff_vp8_h_loop_filter8uv_inner_msa(uint8_t *dst_u, uint8_t *dst_v, + ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_v_loop_filter8uv_inner_msa(uint8_t *dst_u, uint8_t *dst_v, + ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_h_loop_filter16_msa(uint8_t *dst, ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_v_loop_filter16_msa(uint8_t *dst, ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_h_loop_filter8uv_msa(uint8_t *dst_u, uint8_t *dst_v, + ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_v_loop_filter8uv_msa(uint8_t *dst_u, uint8_t *dst_v, + ptrdiff_t stride, + int flim_e, int flim_i, int hev_thresh); +void ff_vp8_h_loop_filter_simple_msa(uint8_t *dst, ptrdiff_t stride, int flim); +void ff_vp8_v_loop_filter_simple_msa(uint8_t *dst, ptrdiff_t stride, int flim); + +/* Idct functions */ +void ff_vp8_luma_dc_wht_msa(int16_t block[4][4][16], int16_t dc[16]); +void ff_vp8_idct_add_msa(uint8_t *dst, int16_t block[16], ptrdiff_t stride); +void ff_vp8_idct_dc_add_msa(uint8_t *dst, int16_t block[16], ptrdiff_t stride); +void ff_vp8_idct_dc_add4uv_msa(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); +void ff_vp8_idct_dc_add4y_msa(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); + +void ff_vp8_luma_dc_wht_mmi(int16_t block[4][4][16], int16_t dc[16]); +void ff_vp8_luma_dc_wht_dc_mmi(int16_t block[4][4][16], int16_t dc[16]); +void ff_vp8_idct_add_mmi(uint8_t *dst, int16_t block[16], ptrdiff_t stride); +void ff_vp8_idct_dc_add_mmi(uint8_t *dst, int16_t block[16], ptrdiff_t stride); +void ff_vp8_idct_dc_add4y_mmi(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); +void ff_vp8_idct_dc_add4uv_mmi(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); + +void ff_put_vp8_pixels4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int x, int y); +void ff_put_vp8_pixels8_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int x, int y); +void ff_put_vp8_pixels16_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int x, int y); + +void ff_put_vp8_epel16_h4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_h6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_v4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_v6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, + ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel16_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +void ff_put_vp8_epel8_h4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_h6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel8_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +void ff_put_vp8_epel4_h4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_h6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_epel4_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +void ff_put_vp8_bilinear16_h_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear16_v_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear16_hv_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +void ff_put_vp8_bilinear8_h_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear8_v_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear8_hv_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +void ff_put_vp8_bilinear4_h_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear4_v_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); +void ff_put_vp8_bilinear4_hv_mmi(uint8_t *dst, ptrdiff_t dststride, + uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + +// loop filter applied to edges between macroblocks +void ff_vp8_v_loop_filter16_mmi(uint8_t *dst, ptrdiff_t stride, int flim_E, + int flim_I, int hev_thresh); +void ff_vp8_h_loop_filter16_mmi(uint8_t *dst, ptrdiff_t stride, int flim_E, + int flim_I, int hev_thresh); +void ff_vp8_v_loop_filter8uv_mmi(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); +void ff_vp8_h_loop_filter8uv_mmi(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + +// loop filter applied to inner macroblock edges +void ff_vp8_v_loop_filter16_inner_mmi(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); +void ff_vp8_h_loop_filter16_inner_mmi(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); +void ff_vp8_v_loop_filter8uv_inner_mmi(uint8_t *dstU, uint8_t *dstV, + ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh); +void ff_vp8_h_loop_filter8uv_inner_mmi(uint8_t *dstU, uint8_t *dstV, + ptrdiff_t stride, int flim_E, int flim_I, int hev_thresh); + +void ff_vp8_v_loop_filter_simple_mmi(uint8_t *dst, ptrdiff_t stride, int flim); +void ff_vp8_h_loop_filter_simple_mmi(uint8_t *dst, ptrdiff_t stride, int flim); + +#endif // #ifndef AVCODEC_MIPS_VP8DSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp9dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp9dsp_mips.h new file mode 100644 index 00000000..0b6ce7cd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/vp9dsp_mips.h @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2015 Shivraj Patil (Shivraj.Patil@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_VP9DSP_MIPS_H +#define AVCODEC_MIPS_VP9DSP_MIPS_H + +#define VP9_8TAP_MIPS_MSA_FUNC(SIZE, type, type_idx) \ +void ff_put_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); + +#define VP9_BILINEAR_MIPS_MSA_FUNC(SIZE) \ +void ff_put_bilin_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_bilin_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_bilin_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_bilin_##SIZE##h_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_bilin_##SIZE##v_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_bilin_##SIZE##hv_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); + +#define VP9_COPY_AVG_MIPS_MSA_FUNC(SIZE) \ +void ff_copy##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg##SIZE##_msa(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, ptrdiff_t srcstride, \ + int h, int mx, int my); + +VP9_8TAP_MIPS_MSA_FUNC(64, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MSA_FUNC(32, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MSA_FUNC(16, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MSA_FUNC(8, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MSA_FUNC(4, regular, FILTER_8TAP_REGULAR); + +VP9_8TAP_MIPS_MSA_FUNC(64, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MSA_FUNC(32, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MSA_FUNC(16, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MSA_FUNC(8, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MSA_FUNC(4, sharp, FILTER_8TAP_SHARP); + +VP9_8TAP_MIPS_MSA_FUNC(64, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MSA_FUNC(32, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MSA_FUNC(16, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MSA_FUNC(8, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MSA_FUNC(4, smooth, FILTER_8TAP_SMOOTH); + +VP9_BILINEAR_MIPS_MSA_FUNC(64); +VP9_BILINEAR_MIPS_MSA_FUNC(32); +VP9_BILINEAR_MIPS_MSA_FUNC(16); +VP9_BILINEAR_MIPS_MSA_FUNC(8); +VP9_BILINEAR_MIPS_MSA_FUNC(4); + +VP9_COPY_AVG_MIPS_MSA_FUNC(64); +VP9_COPY_AVG_MIPS_MSA_FUNC(32); +VP9_COPY_AVG_MIPS_MSA_FUNC(16); +VP9_COPY_AVG_MIPS_MSA_FUNC(8); +VP9_COPY_AVG_MIPS_MSA_FUNC(4); + +#undef VP9_8TAP_MIPS_MSA_FUNC +#undef VP9_BILINEAR_MIPS_MSA_FUNC +#undef VP9_COPY_AVG_MIPS_MSA_FUNC + +void ff_loop_filter_h_4_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_8_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_16_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_4_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_8_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_16_8_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_44_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_88_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_16_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_44_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_88_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_16_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_48_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_h_84_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_48_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_loop_filter_v_84_16_msa(uint8_t *dst, ptrdiff_t stride, int32_t e, + int32_t i, int32_t h); +void ff_idct_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_idct_32x32_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_iadst_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_iadst_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_iadst_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_idct_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_idct_8x8_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iadst_idct_16x16_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_iadst_4x4_add_msa(uint8_t *pu8Dest, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_iadst_8x8_add_msa(uint8_t *pu8Dest, ptrdiff_t stride, + int16_t *block, int eob); +void ff_idct_iadst_16x16_add_msa(uint8_t *pu8Dest, ptrdiff_t stride, + int16_t *block, int eob); +void ff_iwht_iwht_4x4_add_msa(uint8_t *dst, ptrdiff_t stride, + int16_t *block, int eob); + +void ff_vert_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_vert_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_hor_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_hor_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_left_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_left_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_left_16x16_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_left_32x32_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_top_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_top_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_dc_top_16x16_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_top_32x32_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_128_16x16_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_128_32x32_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_127_16x16_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_127_32x32_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_129_16x16_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_dc_129_32x32_msa(uint8_t *dst, ptrdiff_t stride, + const uint8_t *left, const uint8_t *top); +void ff_tm_4x4_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_tm_8x8_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_tm_16x16_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); +void ff_tm_32x32_msa(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, + const uint8_t *top); + +#define VP9_8TAP_MIPS_MMI_FUNC(SIZE, type, type_idx) \ +void ff_put_8tap_##type##_##SIZE##h_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_8tap_##type##_##SIZE##v_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_put_8tap_##type##_##SIZE##hv_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##h_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##v_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); \ + \ +void ff_avg_8tap_##type##_##SIZE##hv_mmi(uint8_t *dst, ptrdiff_t dststride, \ + const uint8_t *src, \ + ptrdiff_t srcstride, \ + int h, int mx, int my); + +VP9_8TAP_MIPS_MMI_FUNC(64, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MMI_FUNC(32, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MMI_FUNC(16, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MMI_FUNC(8, regular, FILTER_8TAP_REGULAR); +VP9_8TAP_MIPS_MMI_FUNC(4, regular, FILTER_8TAP_REGULAR); + +VP9_8TAP_MIPS_MMI_FUNC(64, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MMI_FUNC(32, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MMI_FUNC(16, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MMI_FUNC(8, sharp, FILTER_8TAP_SHARP); +VP9_8TAP_MIPS_MMI_FUNC(4, sharp, FILTER_8TAP_SHARP); + +VP9_8TAP_MIPS_MMI_FUNC(64, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MMI_FUNC(32, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MMI_FUNC(16, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MMI_FUNC(8, smooth, FILTER_8TAP_SMOOTH); +VP9_8TAP_MIPS_MMI_FUNC(4, smooth, FILTER_8TAP_SMOOTH); +#undef VP9_8TAP_MIPS_MMI_FUNC + +#endif // #ifndef AVCODEC_MIPS_VP9DSP_MIPS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/wmv2dsp_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/wmv2dsp_mips.h new file mode 100644 index 00000000..22894c50 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/wmv2dsp_mips.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_WMV2DSP_MIPS_H +#define AVCODEC_MIPS_WMV2DSP_MIPS_H + +#include "libavcodec/wmv2dsp.h" + +void ff_wmv2_idct_add_mmi(uint8_t *dest, int line_size, int16_t *block); +void ff_wmv2_idct_put_mmi(uint8_t *dest, int line_size, int16_t *block); + +#endif /* AVCODEC_MIPS_WMV2DSP_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/xvididct_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/xvididct_mips.h new file mode 100644 index 00000000..0768aaa2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mips/xvididct_mips.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MIPS_XVIDIDCT_MIPS_H +#define AVCODEC_MIPS_XVIDIDCT_MIPS_H + +#include "libavcodec/xvididct.h" + +void ff_xvid_idct_mmi(int16_t *block); +void ff_xvid_idct_put_mmi(uint8_t *dest, int32_t line_size, int16_t *block); +void ff_xvid_idct_add_mmi(uint8_t *dest, int32_t line_size, int16_t *block); + +#endif /* AVCODEC_MIPS_XVIDIDCT_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpeg.h new file mode 100644 index 00000000..cd5d0af2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpeg.h @@ -0,0 +1,131 @@ +/* + * MJPEG encoder and decoder + * Copyright (c) 2000, 2001 Fabrice Bellard + * Copyright (c) 2003 Alex Beregszaszi + * Copyright (c) 2003-2004 Michael Niedermayer + * + * Support for external huffman table, various fixes (AVID workaround), + * aspecting, new decode_frame mechanism and apple mjpeg-b support + * by Alex Beregszaszi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MJPEG encoder and decoder. + */ + +#ifndef AVCODEC_MJPEG_H +#define AVCODEC_MJPEG_H + +/* JPEG marker codes */ +enum JpegMarker { + /* start of frame */ + SOF0 = 0xc0, /* baseline */ + SOF1 = 0xc1, /* extended sequential, huffman */ + SOF2 = 0xc2, /* progressive, huffman */ + SOF3 = 0xc3, /* lossless, huffman */ + + SOF5 = 0xc5, /* differential sequential, huffman */ + SOF6 = 0xc6, /* differential progressive, huffman */ + SOF7 = 0xc7, /* differential lossless, huffman */ + JPG = 0xc8, /* reserved for JPEG extension */ + SOF9 = 0xc9, /* extended sequential, arithmetic */ + SOF10 = 0xca, /* progressive, arithmetic */ + SOF11 = 0xcb, /* lossless, arithmetic */ + + SOF13 = 0xcd, /* differential sequential, arithmetic */ + SOF14 = 0xce, /* differential progressive, arithmetic */ + SOF15 = 0xcf, /* differential lossless, arithmetic */ + + DHT = 0xc4, /* define huffman tables */ + + DAC = 0xcc, /* define arithmetic-coding conditioning */ + + /* restart with modulo 8 count "m" */ + RST0 = 0xd0, + RST1 = 0xd1, + RST2 = 0xd2, + RST3 = 0xd3, + RST4 = 0xd4, + RST5 = 0xd5, + RST6 = 0xd6, + RST7 = 0xd7, + + SOI = 0xd8, /* start of image */ + EOI = 0xd9, /* end of image */ + SOS = 0xda, /* start of scan */ + DQT = 0xdb, /* define quantization tables */ + DNL = 0xdc, /* define number of lines */ + DRI = 0xdd, /* define restart interval */ + DHP = 0xde, /* define hierarchical progression */ + EXP = 0xdf, /* expand reference components */ + + APP0 = 0xe0, + APP1 = 0xe1, + APP2 = 0xe2, + APP3 = 0xe3, + APP4 = 0xe4, + APP5 = 0xe5, + APP6 = 0xe6, + APP7 = 0xe7, + APP8 = 0xe8, + APP9 = 0xe9, + APP10 = 0xea, + APP11 = 0xeb, + APP12 = 0xec, + APP13 = 0xed, + APP14 = 0xee, + APP15 = 0xef, + + JPG0 = 0xf0, + JPG1 = 0xf1, + JPG2 = 0xf2, + JPG3 = 0xf3, + JPG4 = 0xf4, + JPG5 = 0xf5, + JPG6 = 0xf6, + SOF48 = 0xf7, ///< JPEG-LS + LSE = 0xf8, ///< JPEG-LS extension parameters + JPG9 = 0xf9, + JPG10 = 0xfa, + JPG11 = 0xfb, + JPG12 = 0xfc, + JPG13 = 0xfd, + + COM = 0xfe, /* comment */ + + TEM = 0x01, /* temporary private use for arithmetic coding */ + + /* 0x02 -> 0xbf reserved */ +}; + +#define PREDICT(ret, topleft, top, left, predictor)\ + switch(predictor){\ + case 0: ret= 0; break;\ + case 1: ret= left; break;\ + case 2: ret= top; break;\ + case 3: ret= topleft; break;\ + case 4: ret= left + top - topleft; break;\ + case 5: ret= left + ((top - topleft)>>1); break;\ + case 6: ret= top + ((left - topleft)>>1); break;\ + default:\ + case 7: ret= (left + top)>>1; break;\ + } + +#endif /* AVCODEC_MJPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegdec.h new file mode 100644 index 00000000..9d1666be --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegdec.h @@ -0,0 +1,172 @@ +/* + * MJPEG decoder + * Copyright (c) 2000, 2001 Fabrice Bellard + * Copyright (c) 2003 Alex Beregszaszi + * Copyright (c) 2003-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MJPEG decoder. + */ + +#ifndef AVCODEC_MJPEGDEC_H +#define AVCODEC_MJPEGDEC_H + +#include "libavutil/log.h" +#include "libavutil/pixdesc.h" +#include "libavutil/stereo3d.h" + +#include "avcodec.h" +#include "blockdsp.h" +#include "get_bits.h" +#include "hpeldsp.h" +#include "idctdsp.h" + +#undef near /* This file uses struct member 'near' which in windows.h is defined as empty. */ + +#define MAX_COMPONENTS 4 + +typedef struct MJpegDecodeContext { + AVClass *class; + AVCodecContext *avctx; + GetBitContext gb; + int buf_size; + + int start_code; /* current start code */ + int buffer_size; + uint8_t *buffer; + + uint16_t quant_matrixes[4][64]; + VLC vlcs[3][4]; + int qscale[4]; ///< quantizer scale calculated from quant_matrixes + + int org_height; /* size given at codec init */ + int first_picture; /* true if decoding first picture */ + int interlaced; /* true if interlaced */ + int bottom_field; /* true if bottom field */ + int lossless; + int ls; + int progressive; + int bayer; /* true if it's a bayer-encoded JPEG embedded in a DNG */ + int rgb; + uint8_t upscale_h[4]; + uint8_t upscale_v[4]; + int rct; /* standard rct */ + int pegasus_rct; /* pegasus reversible colorspace transform */ + int bits; /* bits per component */ + int colr; + int xfrm; + int adobe_transform; + + int maxval; + int near; ///< near lossless bound (si 0 for lossless) + int t1,t2,t3; + int reset; ///< context halfing interval ?rename + + int width, height; + int mb_width, mb_height; + int nb_components; + int block_stride[MAX_COMPONENTS]; + int component_id[MAX_COMPONENTS]; + int h_count[MAX_COMPONENTS]; /* horizontal and vertical count for each component */ + int v_count[MAX_COMPONENTS]; + int comp_index[MAX_COMPONENTS]; + int dc_index[MAX_COMPONENTS]; + int ac_index[MAX_COMPONENTS]; + int nb_blocks[MAX_COMPONENTS]; + int h_scount[MAX_COMPONENTS]; + int v_scount[MAX_COMPONENTS]; + int quant_sindex[MAX_COMPONENTS]; + int h_max, v_max; /* maximum h and v counts */ + int quant_index[4]; /* quant table index for each component */ + int last_dc[MAX_COMPONENTS]; /* last DEQUANTIZED dc (XXX: am I right to do that ?) */ + AVFrame *picture; /* picture structure */ + AVFrame *picture_ptr; /* pointer to picture structure */ + int got_picture; ///< we found a SOF and picture is valid, too. + int linesize[MAX_COMPONENTS]; ///< linesize << interlaced + int8_t *qscale_table; + DECLARE_ALIGNED(32, int16_t, block)[64]; + int16_t (*blocks[MAX_COMPONENTS])[64]; ///< intermediate sums (progressive mode) + uint8_t *last_nnz[MAX_COMPONENTS]; + uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode) + int palette_index; + ScanTable scantable; + BlockDSPContext bdsp; + HpelDSPContext hdsp; + IDCTDSPContext idsp; + + int restart_interval; + int restart_count; + + int buggy_avid; + int cs_itu601; + int interlace_polarity; + int multiscope; + + int mjpb_skiptosod; + + int cur_scan; /* current scan, used by JPEG-LS */ + int flipped; /* true if picture is flipped */ + + uint16_t (*ljpeg_buffer)[4]; + unsigned int ljpeg_buffer_size; + + int extern_huff; + AVDictionary *exif_metadata; + + AVStereo3D *stereo3d; ///!< stereoscopic information (cached, since it is read before frame allocation) + + const AVPixFmtDescriptor *pix_desc; + + uint8_t **iccdata; + int *iccdatalens; + int iccnum; + int iccread; + + // Raw stream data for hwaccel use. + const uint8_t *raw_image_buffer; + size_t raw_image_buffer_size; + const uint8_t *raw_scan_buffer; + size_t raw_scan_buffer_size; + + uint8_t raw_huffman_lengths[2][4][16]; + uint8_t raw_huffman_values[2][4][256]; + + enum AVPixelFormat hwaccel_sw_pix_fmt; + enum AVPixelFormat hwaccel_pix_fmt; + void *hwaccel_picture_private; +} MJpegDecodeContext; + +int ff_mjpeg_decode_init(AVCodecContext *avctx); +int ff_mjpeg_decode_end(AVCodecContext *avctx); +int ff_mjpeg_decode_frame(AVCodecContext *avctx, + void *data, int *got_frame, + AVPacket *avpkt); +int ff_mjpeg_decode_dqt(MJpegDecodeContext *s); +int ff_mjpeg_decode_dht(MJpegDecodeContext *s); +int ff_mjpeg_decode_sof(MJpegDecodeContext *s); +int ff_mjpeg_decode_sos(MJpegDecodeContext *s, + const uint8_t *mb_bitmask,int mb_bitmask_size, + const AVFrame *reference); +int ff_mjpeg_find_marker(MJpegDecodeContext *s, + const uint8_t **buf_ptr, const uint8_t *buf_end, + const uint8_t **unescaped_buf_ptr, int *unescaped_buf_size); + +#endif /* AVCODEC_MJPEGDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc.h new file mode 100644 index 00000000..d7ddc35e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc.h @@ -0,0 +1,111 @@ +/* + * MJPEG encoder + * Copyright (c) 2000, 2001 Fabrice Bellard + * Copyright (c) 2003 Alex Beregszaszi + * Copyright (c) 2003-2004 Michael Niedermayer + * + * Support for external huffman table, various fixes (AVID workaround), + * aspecting, new decode_frame mechanism and apple mjpeg-b support + * by Alex Beregszaszi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MJPEG encoder. + */ + +#ifndef AVCODEC_MJPEGENC_H +#define AVCODEC_MJPEGENC_H + +#include + +#include "mjpeg.h" +#include "mpegvideo.h" +#include "put_bits.h" + +/** + * Buffer of JPEG frame data. + * + * Optimal Huffman table generation requires the frame data to be loaded into + * a buffer so that the tables can be computed. + * There are at most mb_width*mb_height*12*64 of these per frame. + */ +typedef struct MJpegHuffmanCode { + // 0=DC lum, 1=DC chrom, 2=AC lum, 3=AC chrom + uint8_t table_id; ///< The Huffman table id associated with the data. + uint8_t code; ///< The exponent. + uint16_t mant; ///< The mantissa. +} MJpegHuffmanCode; + +/** + * Holds JPEG frame data and Huffman table data. + */ +typedef struct MJpegContext { + //FIXME use array [3] instead of lumi / chroma, for easier addressing + uint8_t huff_size_dc_luminance[12]; ///< DC luminance Huffman table size. + uint16_t huff_code_dc_luminance[12]; ///< DC luminance Huffman table codes. + uint8_t huff_size_dc_chrominance[12]; ///< DC chrominance Huffman table size. + uint16_t huff_code_dc_chrominance[12]; ///< DC chrominance Huffman table codes. + + uint8_t huff_size_ac_luminance[256]; ///< AC luminance Huffman table size. + uint16_t huff_code_ac_luminance[256]; ///< AC luminance Huffman table codes. + uint8_t huff_size_ac_chrominance[256]; ///< AC chrominance Huffman table size. + uint16_t huff_code_ac_chrominance[256]; ///< AC chrominance Huffman table codes. + + /** Storage for AC luminance VLC (in MpegEncContext) */ + uint8_t uni_ac_vlc_len[64 * 64 * 2]; + /** Storage for AC chrominance VLC (in MpegEncContext) */ + uint8_t uni_chroma_ac_vlc_len[64 * 64 * 2]; + + // Default DC tables have exactly 12 values + uint8_t bits_dc_luminance[17]; ///< DC luminance Huffman bits. + uint8_t val_dc_luminance[12]; ///< DC luminance Huffman values. + uint8_t bits_dc_chrominance[17]; ///< DC chrominance Huffman bits. + uint8_t val_dc_chrominance[12]; ///< DC chrominance Huffman values. + + // 8-bit JPEG has max 256 values + uint8_t bits_ac_luminance[17]; ///< AC luminance Huffman bits. + uint8_t val_ac_luminance[256]; ///< AC luminance Huffman values. + uint8_t bits_ac_chrominance[17]; ///< AC chrominance Huffman bits. + uint8_t val_ac_chrominance[256]; ///< AC chrominance Huffman values. + + size_t huff_ncode; ///< Number of current entries in the buffer. + MJpegHuffmanCode *huff_buffer; ///< Buffer for Huffman code values. +} MJpegContext; + +/** + * Enum for the Huffman encoding strategy. + */ +enum HuffmanTableOption { + HUFFMAN_TABLE_DEFAULT = 0, ///< Use the default Huffman tables. + HUFFMAN_TABLE_OPTIMAL = 1, ///< Compute and use optimal Huffman tables. + NB_HUFFMAN_TABLE_OPTION = 2 +}; + +static inline void put_marker(PutBitContext *p, enum JpegMarker code) +{ + put_bits(p, 8, 0xff); + put_bits(p, 8, code); +} + +int ff_mjpeg_encode_init(MpegEncContext *s); +void ff_mjpeg_encode_close(MpegEncContext *s); +void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]); + +#endif /* AVCODEC_MJPEGENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_common.h new file mode 100644 index 00000000..e8698d18 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_common.h @@ -0,0 +1,46 @@ +/* + * lossless JPEG shared bits + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MJPEGENC_COMMON_H +#define AVCODEC_MJPEGENC_COMMON_H + +#include + +#include "avcodec.h" +#include "idctdsp.h" +#include "mpegvideo.h" +#include "put_bits.h" + +void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb, + ScanTable *intra_scantable, int pred, + uint16_t luma_intra_matrix[64], + uint16_t chroma_intra_matrix[64]); +void ff_mjpeg_encode_picture_frame(MpegEncContext *s); +void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits); +void ff_mjpeg_escape_FF(PutBitContext *pb, int start); +int ff_mjpeg_encode_stuffing(MpegEncContext *s); +void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4]); + +void ff_mjpeg_encode_dc(PutBitContext *pb, int val, + uint8_t *huff_size, uint16_t *huff_code); + +av_cold void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256], uint8_t *uni_ac_vlc_len); + +#endif /* AVCODEC_MJPEGENC_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_huffman.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_huffman.h new file mode 100644 index 00000000..5fe65504 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mjpegenc_huffman.h @@ -0,0 +1,76 @@ +/* + * MJPEG encoder + * Copyright (c) 2016 William Ma, Ted Ying, Jerry Jiang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Huffman table generation for MJPEG encoder. + */ + +#ifndef AVCODEC_MJPEGENC_HUFFMAN_H +#define AVCODEC_MJPEGENC_HUFFMAN_H + +#include + +typedef struct MJpegEncHuffmanContext { + int val_count[256]; +} MJpegEncHuffmanContext; + +// Uses the package merge algorithm to compute the Huffman table. +void ff_mjpeg_encode_huffman_init(MJpegEncHuffmanContext *s); +static inline void ff_mjpeg_encode_huffman_increment(MJpegEncHuffmanContext *s, + uint8_t val) +{ + s->val_count[val]++; +} +void ff_mjpeg_encode_huffman_close(MJpegEncHuffmanContext *s, + uint8_t bits[17], uint8_t val[], + int max_nval); + + +/** + * Used to assign a occurrence count or "probability" to an input value + */ +typedef struct PTable { + int value; ///< input value + int prob; ///< number of occurences of this value in input +} PTable; + +/** + * Used to store intermediate lists in the package merge algorithm + */ +typedef struct PackageMergerList { + int nitems; ///< number of items in the list and probability ex. 4 + int item_idx[515]; ///< index range for each item in items 0, 2, 5, 9, 13 + int probability[514]; ///< probability of each item 3, 8, 18, 46 + int items[257 * 16]; ///< chain of all individual values that make up items A, B, A, B, C, A, B, C, D, C, D, D, E +} PackageMergerList; + +/** + * Used to store optimal huffman encoding results + */ +typedef struct HuffTable { + int code; ///< code is the input value + int length; ///< length of the encoding +} HuffTable; + +void ff_mjpegenc_huffman_compute_bits(PTable *prob_table, HuffTable *distincts, + int size, int max_length); +#endif /* AVCODEC_MJPEGENC_HUFFMAN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp.h new file mode 100644 index 00000000..41a45a30 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp.h @@ -0,0 +1,177 @@ +/* + * MLP codec common header file + * Copyright (c) 2007-2008 Ian Caulfield + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MLP_H +#define AVCODEC_MLP_H + +#include + +#include "avcodec.h" + +/** Last possible matrix channel for each codec */ +#define MAX_MATRIX_CHANNEL_MLP 5 +#define MAX_MATRIX_CHANNEL_TRUEHD 7 +/** Maximum number of channels in a valid stream. + * MLP : 5.1 + 2 noise channels -> 8 channels + * TrueHD: 7.1 -> 8 channels + */ +#define MAX_CHANNELS 8 + +/** Maximum number of matrices used in decoding; most streams have one matrix + * per output channel, but some rematrix a channel (usually 0) more than once. + */ +#define MAX_MATRICES_MLP 6 +#define MAX_MATRICES_TRUEHD 8 +#define MAX_MATRICES 8 + +/** Maximum number of substreams that can be decoded. + * MLP's limit is 2. TrueHD supports at least up to 3. + */ +#define MAX_SUBSTREAMS 4 + +/** which multiple of 48000 the maximum sample rate is */ +#define MAX_RATEFACTOR 4 +/** maximum sample frequency seen in files */ +#define MAX_SAMPLERATE (MAX_RATEFACTOR * 48000) + +/** maximum number of audio samples within one access unit */ +#define MAX_BLOCKSIZE (40 * MAX_RATEFACTOR) +/** next power of two greater than MAX_BLOCKSIZE */ +#define MAX_BLOCKSIZE_POW2 (64 * MAX_RATEFACTOR) + +/** number of allowed filters */ +#define NUM_FILTERS 2 + +/** The maximum number of taps in IIR and FIR filters. */ +#define MAX_FIR_ORDER 8 +#define MAX_IIR_ORDER 4 + +/** Code that signals end of a stream. */ +#define END_OF_STREAM 0xd234d234 + +#define FIR 0 +#define IIR 1 + +/** filter data */ +typedef struct FilterParams { + uint8_t order; ///< number of taps in filter + uint8_t shift; ///< Right shift to apply to output of filter. + + int32_t state[MAX_FIR_ORDER]; + + int coeff_bits; + int coeff_shift; +} FilterParams; + +/** sample data coding information */ +typedef struct ChannelParams { + FilterParams filter_params[NUM_FILTERS]; + int32_t coeff[NUM_FILTERS][MAX_FIR_ORDER]; + + int16_t huff_offset; ///< Offset to apply to residual values. + int32_t sign_huff_offset; ///< sign/rounding-corrected version of huff_offset + uint8_t codebook; ///< Which VLC codebook to use to read residuals. + uint8_t huff_lsbs; ///< Size of residual suffix not encoded using VLC. +} ChannelParams; + +/** Tables defining the Huffman codes. + * There are three entropy coding methods used in MLP (four if you count + * "none" as a method). These use the same sequences for codes starting with + * 00 or 01, but have different codes starting with 1. + */ +extern const uint8_t ff_mlp_huffman_tables[3][18][2]; + +typedef struct { + uint8_t channel_occupancy; + uint8_t group1_channels; + uint8_t group2_channels; + uint8_t summary_info; +} ChannelInformation; + +/** Tables defining channel information. + * + * Possible channel arrangements are: + * + * (Group 1) C + * (Group 1) L, R + * (Group 1) Lf, Rf / (Group 2) S + * (Group 1) Lf, Rf / (Group 2) Ls, Rs + * (Group 1) Lf, Rf / (Group 2) LFE + * (Group 1) Lf, Rf / (Group 2) LFE, S + * (Group 1) Lf, Rf / (Group 2) LFE, Ls, Rs + * (Group 1) Lf, Rf / (Group 2) C + * (Group 1) Lf, Rf / (Group 2) C, S + * (Group 1) Lf, Rf / (Group 2) C, Ls, Rs + * (Group 1) Lf, Rf / (Group 2) C, LFE + * (Group 1) Lf, Rf / (Group 2) C, LFE, S + * (Group 1) Lf, Rf / (Group 2) C, LFE, Ls, Rs + * (Group 1) Lf, Rf C / (Group 2) S + * (Group 1) Lf, Rf C / (Group 2) Ls, Rs + * (Group 1) Lf, Rf C / (Group 2) LFE + * (Group 1) Lf, Rf C / (Group 2) LFE, S + * (Group 1) Lf, Rf C / (Group 2) LFE, Ls, Rs + * (Group 1) Lf, Rf Ls Rs / (Group 2) LFE + * (Group 1) Lf, Rf Ls Rs / (Group 2) C + * (Group 1) Lf, Rf, Ls, Rs / (Group 2) C, LFE + */ +extern const ChannelInformation ff_mlp_ch_info[21]; + +extern const uint64_t ff_mlp_channel_layouts[12]; + +/** MLP uses checksums that seem to be based on the standard CRC algorithm, but + * are not (in implementation terms, the table lookup and XOR are reversed). + * We can implement this behavior using a standard av_crc on all but the + * last element, then XOR that with the last element. + */ +uint8_t ff_mlp_checksum8 (const uint8_t *buf, unsigned int buf_size); +uint16_t ff_mlp_checksum16(const uint8_t *buf, unsigned int buf_size); + +/** Calculate an 8-bit checksum over a restart header -- a non-multiple-of-8 + * number of bits, starting two bits into the first byte of buf. + */ +uint8_t ff_mlp_restart_checksum(const uint8_t *buf, unsigned int bit_size); + +/** XOR together all the bytes of a buffer. + * Does this belong in dspcontext? + */ +uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size); + +void ff_mlp_init_crc(void); + +/** XOR four bytes into one. */ +static inline uint8_t xor_32_to_8(uint32_t value) +{ + value ^= value >> 16; + value ^= value >> 8; + return value; +} + +typedef enum THDChannelModifier { + THD_CH_MODIFIER_NOTINDICATED = 0x0, + THD_CH_MODIFIER_STEREO = 0x0, // Stereo (not Dolby Surround) + THD_CH_MODIFIER_LTRT = 0x1, // Dolby Surround + THD_CH_MODIFIER_LBINRBIN = 0x2, // Dolby Headphone + THD_CH_MODIFIER_MONO = 0x3, // Mono or Dual Mono + THD_CH_MODIFIER_NOTSURROUNDEX = 0x1, // Not Dolby Digital EX + THD_CH_MODIFIER_SURROUNDEX = 0x2, // Dolby Digital EX +} THDChannelModifier; + +#endif /* AVCODEC_MLP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp_parse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp_parse.h new file mode 100644 index 00000000..a0790ae8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlp_parse.h @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2007 Ian Caulfield + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MLP_PARSE_H +#define AVCODEC_MLP_PARSE_H + +#include "get_bits.h" + +typedef struct MLPHeaderInfo +{ + int stream_type; ///< 0xBB for MLP, 0xBA for TrueHD + int header_size; ///< Size of the major sync header, in bytes + + int group1_bits; ///< The bit depth of the first substream + int group2_bits; ///< Bit depth of the second substream (MLP only) + + int group1_samplerate; ///< Sample rate of first substream + int group2_samplerate; ///< Sample rate of second substream (MLP only) + + int channel_arrangement; + + int channel_modifier_thd_stream0; ///< Channel modifier for substream 0 of TrueHD streams ("2-channel presentation") + int channel_modifier_thd_stream1; ///< Channel modifier for substream 1 of TrueHD streams ("6-channel presentation") + int channel_modifier_thd_stream2; ///< Channel modifier for substream 2 of TrueHD streams ("8-channel presentation") + + int channels_mlp; ///< Channel count for MLP streams + int channels_thd_stream1; ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation") + int channels_thd_stream2; ///< Channel count for substream 2 of TrueHD streams ("8-channel presentation") + uint64_t channel_layout_mlp; ///< Channel layout for MLP streams + uint64_t channel_layout_thd_stream1; ///< Channel layout for substream 1 of TrueHD streams ("6-channel presentation") + uint64_t channel_layout_thd_stream2; ///< Channel layout for substream 2 of TrueHD streams ("8-channel presentation") + + int access_unit_size; ///< Number of samples per coded frame + int access_unit_size_pow2; ///< Next power of two above number of samples per frame + + int is_vbr; ///< Stream is VBR instead of CBR + int peak_bitrate; ///< Peak bitrate for VBR, actual bitrate (==peak) for CBR + + int num_substreams; ///< Number of substreams within stream +} MLPHeaderInfo; + +static const uint8_t thd_chancount[13] = { +// LR C LFE LRs LRvh LRc LRrs Cs Ts LRsd LRw Cvh LFE2 + 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1 +}; + +static const uint64_t thd_layout[13] = { + AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT, // LR + AV_CH_FRONT_CENTER, // C + AV_CH_LOW_FREQUENCY, // LFE + AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT, // LRs + AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT, // LRvh + AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER, // LRc + AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT, // LRrs + AV_CH_BACK_CENTER, // Cs + AV_CH_TOP_CENTER, // Ts + AV_CH_SURROUND_DIRECT_LEFT|AV_CH_SURROUND_DIRECT_RIGHT, // LRsd + AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT, // LRw + AV_CH_TOP_FRONT_CENTER, // Cvh + AV_CH_LOW_FREQUENCY_2, // LFE2 +}; + +static inline int mlp_samplerate(int in) +{ + if (in == 0xF) + return 0; + + return (in & 8 ? 44100 : 48000) << (in & 7) ; +} + +static inline int truehd_channels(int chanmap) +{ + int channels = 0, i; + + for (i = 0; i < 13; i++) + channels += thd_chancount[i] * ((chanmap >> i) & 1); + + return channels; +} + +static inline uint64_t truehd_layout(int chanmap) +{ + int i; + uint64_t layout = 0; + + for (i = 0; i < 13; i++) + layout |= thd_layout[i] * ((chanmap >> i) & 1); + + return layout; +} + +int ff_mlp_read_major_sync(void *log, MLPHeaderInfo *mh, GetBitContext *gb); + +#endif /* AVCODEC_MLP_PARSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlpdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlpdsp.h new file mode 100644 index 00000000..a0edeb77 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlpdsp.h @@ -0,0 +1,83 @@ +/* + * MLP codec common header file + * Copyright (c) 2007-2008 Ian Caulfield + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MLPDSP_H +#define AVCODEC_MLPDSP_H + +#include +#include "mlp.h" + +void ff_mlp_rematrix_channel(int32_t *samples, + const int32_t *coeffs, + const uint8_t *bypassed_lsbs, + const int8_t *noise_buffer, + int index, + unsigned int dest_ch, + uint16_t blockpos, + unsigned int maxchan, + int matrix_noise_shift, + int access_unit_size_pow2, + int32_t mask); + +int32_t ff_mlp_pack_output(int32_t lossless_check_data, + uint16_t blockpos, + int32_t (*sample_buffer)[MAX_CHANNELS], + void *data, + uint8_t *ch_assign, + int8_t *output_shift, + uint8_t max_matrix_channel, + int is32); + +typedef struct MLPDSPContext { + void (*mlp_filter_channel)(int32_t *state, const int32_t *coeff, + int firorder, int iirorder, + unsigned int filter_shift, int32_t mask, + int blocksize, int32_t *sample_buffer); + void (*mlp_rematrix_channel)(int32_t *samples, + const int32_t *coeffs, + const uint8_t *bypassed_lsbs, + const int8_t *noise_buffer, + int index, + unsigned int dest_ch, + uint16_t blockpos, + unsigned int maxchan, + int matrix_noise_shift, + int access_unit_size_pow2, + int32_t mask); + int32_t (*(*mlp_select_pack_output)(uint8_t *ch_assign, + int8_t *output_shift, + uint8_t max_matrix_channel, + int is32))(int32_t, uint16_t, int32_t (*)[], void *, uint8_t*, int8_t *, uint8_t, int); + int32_t (*mlp_pack_output)(int32_t lossless_check_data, + uint16_t blockpos, + int32_t (*sample_buffer)[MAX_CHANNELS], + void *data, + uint8_t *ch_assign, + int8_t *output_shift, + uint8_t max_matrix_channel, + int is32); +} MLPDSPContext; + +void ff_mlpdsp_init(MLPDSPContext *c); +void ff_mlpdsp_init_arm(MLPDSPContext *c); +void ff_mlpdsp_init_x86(MLPDSPContext *c); + +#endif /* AVCODEC_MLPDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlz.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlz.h new file mode 100644 index 00000000..c3df52c9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mlz.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Umair Khan + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MLZ_H +#define AVCODEC_MLZ_H + +#include "get_bits.h" + +#define CODE_UNSET -1 +#define CODE_BIT_INIT 9 +#define DIC_INDEX_INIT 512 // 2^9 +#define DIC_INDEX_MAX 32768 // 2^15 +#define FLUSH_CODE 256 +#define FREEZE_CODE 257 +#define FIRST_CODE 258 +#define MAX_CODE 32767 +#define TABLE_SIZE 35023 // TABLE_SIZE must be a prime number + +/** Dictionary structure for mlz decompression + */ +typedef struct MLZDict { + int string_code; + int parent_code; + int char_code; + int match_len; +} MLZDict; + +/** MLZ data strucure + */ +typedef struct MLZ { + int dic_code_bit; + int current_dic_index_max; + unsigned int bump_code; + unsigned int flush_code; + int next_code; + int freeze_flag; + MLZDict* dict; + void* context; +} MLZ; + +/** Initialize the dictionary + */ +void ff_mlz_init_dict(void* context, MLZ *mlz); + +/** Flush the dictionary + */ +void ff_mlz_flush_dict(MLZ *dict); + +/** Run mlz decompression on the next size bits and the output will be stored in buff + */ +int ff_mlz_decompression(MLZ* mlz, GetBitContext* gb, int size, unsigned char *buff); + +#endif /*AVCODEC_MLZ_H*/ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motion_est.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motion_est.h new file mode 100644 index 00000000..817220f3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motion_est.h @@ -0,0 +1,135 @@ +/* + * Motion estimation + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MOTION_EST_H +#define AVCODEC_MOTION_EST_H + +#include + +#include "avcodec.h" +#include "hpeldsp.h" +#include "qpeldsp.h" + +struct MpegEncContext; + +#if ARCH_IA64 // Limit static arrays to avoid gcc failing "short data segment overflowed" +#define MAX_MV 1024 +#else +#define MAX_MV 4096 +#endif +#define MAX_DMV (2*MAX_MV) +#define ME_MAP_SIZE 64 + +#define FF_ME_ZERO 0 +#define FF_ME_EPZS 1 +#define FF_ME_XONE 2 + +/** + * Motion estimation context. + */ +typedef struct MotionEstContext { + AVCodecContext *avctx; + int skip; ///< set if ME is skipped for the current MB + int co_located_mv[4][2]; ///< mv from last P-frame for direct mode ME + int direct_basis_mv[4][2]; + uint8_t *scratchpad; /**< data area for the ME algo, so that + * the ME does not need to malloc/free. */ + uint8_t *best_mb; + uint8_t *temp_mb[2]; + uint8_t *temp; + int best_bits; + uint32_t *map; ///< map to avoid duplicate evaluations + uint32_t *score_map; ///< map to store the scores + unsigned map_generation; + int pre_penalty_factor; + int penalty_factor; /**< an estimate of the bits required to + * code a given mv value, e.g. (1,0) takes + * more bits than (0,0). We have to + * estimate whether any reduction in + * residual is worth the extra bits. */ + int sub_penalty_factor; + int mb_penalty_factor; + int flags; + int sub_flags; + int mb_flags; + int pre_pass; ///< = 1 for the pre pass + int dia_size; + int xmin; + int xmax; + int ymin; + int ymax; + int pred_x; + int pred_y; + uint8_t *src[4][4]; + uint8_t *ref[4][4]; + int stride; + int uvstride; + /* temp variables for picture complexity calculation */ + int64_t mc_mb_var_sum_temp; + int64_t mb_var_sum_temp; + int scene_change_score; + + op_pixels_func(*hpel_put)[4]; + op_pixels_func(*hpel_avg)[4]; + qpel_mc_func(*qpel_put)[16]; + qpel_mc_func(*qpel_avg)[16]; + uint8_t (*mv_penalty)[MAX_DMV * 2 + 1]; ///< bit amount needed to encode a MV + uint8_t *current_mv_penalty; + int (*sub_motion_search)(struct MpegEncContext *s, + int *mx_ptr, int *my_ptr, int dmin, + int src_index, int ref_index, + int size, int h); +} MotionEstContext; + +static inline int ff_h263_round_chroma(int x) +{ + //FIXME static or not? + static const uint8_t h263_chroma_roundtab[16] = { + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, + }; + return h263_chroma_roundtab[x & 0xf] + (x >> 3); +} + +int ff_init_me(struct MpegEncContext *s); + +void ff_estimate_p_frame_motion(struct MpegEncContext *s, int mb_x, int mb_y); +void ff_estimate_b_frame_motion(struct MpegEncContext *s, int mb_x, int mb_y); + +int ff_pre_estimate_p_frame_motion(struct MpegEncContext *s, + int mb_x, int mb_y); + +int ff_epzs_motion_search(struct MpegEncContext *s, int *mx_ptr, int *my_ptr, + int P[10][2], int src_index, int ref_index, + int16_t (*last_mv)[2], int ref_mv_scale, int size, + int h); + +int ff_get_mb_score(struct MpegEncContext *s, int mx, int my, int src_index, + int ref_index, int size, int h, int add_rate); + +int ff_get_best_fcode(struct MpegEncContext *s, + int16_t (*mv_table)[2], int type); + +void ff_fix_long_p_mvs(struct MpegEncContext *s, int type); +void ff_fix_long_mvs(struct MpegEncContext *s, uint8_t *field_select_table, + int field_select, int16_t (*mv_table)[2], int f_code, + int type, int truncate); + +#endif /* AVCODEC_MOTION_EST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motionpixels_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motionpixels_tablegen.h new file mode 100644 index 00000000..9239b6a6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/motionpixels_tablegen.h @@ -0,0 +1,92 @@ +/* + * Header file for hardcoded motion pixels RGB to YUV table + * + * Copyright (c) 2009 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MOTIONPIXELS_TABLEGEN_H +#define AVCODEC_MOTIONPIXELS_TABLEGEN_H + +#include +#include "libavutil/attributes.h" + +typedef struct YuvPixel { + int8_t y, v, u; +} YuvPixel; + +static int mp_yuv_to_rgb(int y, int v, int u, int clip_rgb) { + const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; + int r, g, b; + + r = (1000 * y + 701 * v) / 1000; + g = (1000 * y - 357 * v - 172 * u) / 1000; + b = (1000 * y + 886 * u) / 1000; + if (clip_rgb) + return ((cm[r * 8] & 0xF8) << 7) | ((cm[g * 8] & 0xF8) << 2) | (cm[b * 8] >> 3); + if ((unsigned)r < 32 && (unsigned)g < 32 && (unsigned)b < 32) + return (r << 10) | (g << 5) | b; + return 1 << 15; +} + +#if CONFIG_HARDCODED_TABLES +#define motionpixels_tableinit() +#include "libavcodec/motionpixels_tables.h" +#else +static YuvPixel mp_rgb_yuv_table[1 << 15]; + +static av_cold void mp_set_zero_yuv(YuvPixel *p) +{ + int i, j; + + for (i = 0; i < 31; ++i) { + for (j = 31; j > i; --j) + if (!(p[j].u | p[j].v | p[j].y)) + p[j] = p[j - 1]; + for (j = 0; j < 31 - i; ++j) + if (!(p[j].u | p[j].v | p[j].y)) + p[j] = p[j + 1]; + } +} + +static av_cold void mp_build_rgb_yuv_table(YuvPixel *p) +{ + int y, v, u, i; + + for (y = 0; y <= 31; ++y) + for (v = -31; v <= 31; ++v) + for (u = -31; u <= 31; ++u) { + i = mp_yuv_to_rgb(y, v, u, 0); + if (i < (1 << 15) && !(p[i].u | p[i].v | p[i].y)) { + p[i].y = y; + p[i].v = v; + p[i].u = u; + } + } + for (i = 0; i < 1024; ++i) + mp_set_zero_yuv(p + i * 32); +} + +static av_cold void motionpixels_tableinit(void) +{ + if (!mp_rgb_yuv_table[0].u) + mp_build_rgb_yuv_table(mp_rgb_yuv_table); +} +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_MOTIONPIXELS_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc.h new file mode 100644 index 00000000..df462af6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc.h @@ -0,0 +1,76 @@ +/* + * Musepack decoder + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Musepack decoder + * MPEG Audio Layer 1/2 -like codec with frames of 1152 samples + * divided into 32 subbands. + */ + +#ifndef AVCODEC_MPC_H +#define AVCODEC_MPC_H + +#include "libavutil/lfg.h" + +#include "avcodec.h" +#include "bswapdsp.h" +#include "mpegaudio.h" +#include "mpegaudiodsp.h" + +#define BANDS 32 +#define SAMPLES_PER_BAND 36 +#define MPC_FRAME_SIZE (BANDS * SAMPLES_PER_BAND) + +/** Subband structure - hold all variables for each subband */ +typedef struct Band { + int msf; ///< mid-stereo flag + int res[2]; + int scfi[2]; + int scf_idx[2][3]; + int Q[2]; +}Band; + +typedef struct MPCContext { + BswapDSPContext bdsp; + MPADSPContext mpadsp; + int IS, MSS, gapless; + int lastframelen; + int maxbands, last_max_band; + int last_bits_used; + int oldDSCF[2][BANDS]; + Band bands[BANDS]; + int Q[2][MPC_FRAME_SIZE]; + int cur_frame, frames; + uint8_t *bits; + int buf_size; + AVLFG rnd; + int frames_to_skip; + /* for synthesis */ + DECLARE_ALIGNED(16, MPA_INT, synth_buf)[MPA_MAX_CHANNELS][512*2]; + int synth_buf_offset[MPA_MAX_CHANNELS]; + DECLARE_ALIGNED(16, int32_t, sb_samples)[MPA_MAX_CHANNELS][36][SBLIMIT]; +} MPCContext; + +void ff_mpc_init(void); +void ff_mpc_dequantize_and_synth(MPCContext *c, int maxband, int16_t **out, int channels); + +#endif /* AVCODEC_MPC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc7data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc7data.h new file mode 100644 index 00000000..5609e8fb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc7data.h @@ -0,0 +1,171 @@ +/* + * Musepack decoder + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPC7DATA_H +#define AVCODEC_MPC7DATA_H + +#include + +static const int8_t mpc7_idx30[] = { -1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1,-1, 0, 1}; +static const int8_t mpc7_idx31[] = { -1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1, 0, 0, 0, 1, 1, 1}; +static const int8_t mpc7_idx32[] = { -1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1}; +static const int8_t mpc7_idx50[] = { -2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2}; +static const int8_t mpc7_idx51[] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2}; + +#define MPC7_SCFI_SIZE 4 +#define MPC7_SCFI_BITS 3 +static const uint8_t mpc7_scfi[MPC7_SCFI_SIZE * 2] = { + 0x2, 3, 0x1, 1, 0x3, 3, 0x0, 2 +}; + +#define MPC7_DSCF_SIZE 16 +#define MPC7_DSCF_BITS 6 +static const uint8_t mpc7_dscf[MPC7_DSCF_SIZE * 2] = { + 0x20, 6, 0x04, 5, 0x11, 5, 0x1E, 5, 0x0D, 4, 0x00, 3, 0x03, 3, 0x09, 4, + 0x05, 3, 0x02, 3, 0x0E, 4, 0x03, 4, 0x1F, 5, 0x05, 5, 0x21, 6, 0x0C, 4 +}; + +#define MPC7_HDR_SIZE 10 +#define MPC7_HDR_BITS 9 +static const uint8_t mpc7_hdr[MPC7_HDR_SIZE * 2] = { + 0x5C, 8, 0x2F, 7, 0x0A, 5, 0x04, 4, 0x00, 2, + 0x01, 1, 0x03, 3, 0x16, 6, 0xBB, 9, 0xBA, 9 +}; + +#define MPC7_QUANT_VLC_TABLES 7 +static const uint8_t mpc7_quant_vlc_sizes[MPC7_QUANT_VLC_TABLES * 2] = { + 27, 25, 7, 9, 15, 31, 63 +}; + +static const uint8_t mpc7_quant_vlc_off[MPC7_QUANT_VLC_TABLES] = { + 0, 0, 3, 4, 7, 15, 31 +}; + +static const uint16_t mpc7_quant_vlc[MPC7_QUANT_VLC_TABLES][2][64 * 2] = { +{ + { + 0x0036, 6, 0x0009, 5, 0x0020, 6, 0x0005, 5, 0x000A, 4, 0x0007, 5, + 0x0034, 6, 0x0000, 5, 0x0023, 6, 0x000A, 5, 0x0006, 4, 0x0004, 5, + 0x000B, 4, 0x0007, 3, 0x000C, 4, 0x0003, 5, 0x0007, 4, 0x000B, 5, + 0x0022, 6, 0x0001, 5, 0x0035, 6, 0x0006, 5, 0x0009, 4, 0x0002, 5, + 0x0021, 6, 0x0008, 5, 0x0037, 6 + }, + { + 0x0067, 8, 0x003E, 7, 0x00E1, 9, 0x0037, 7, 0x0003, 4, 0x0034, 7, + 0x0065, 8, 0x003C, 7, 0x00E3, 9, 0x0018, 6, 0x0000, 4, 0x003D, 7, + 0x0004, 4, 0x0001, 1, 0x0005, 4, 0x003F, 7, 0x0001, 4, 0x003B, 7, + 0x00E2, 9, 0x0039, 7, 0x0064, 8, 0x0035, 7, 0x0002, 4, 0x0036, 7, + 0x00E0, 9, 0x003A, 7, 0x0066, 8 + } +}, +{ + { + 0x0059, 7, 0x002F, 6, 0x000F, 5, 0x0000, 5, 0x005B, 7, 0x0004, 5, + 0x0006, 4, 0x000D, 4, 0x0004, 4, 0x0005, 5, 0x0014, 5, 0x000C, 4, + 0x0004, 3, 0x000F, 4, 0x000E, 5, 0x0003, 5, 0x0003, 4, 0x000E, 4, + 0x0005, 4, 0x0001, 5, 0x005A, 7, 0x0002, 5, 0x0015, 5, 0x002E, 6, + 0x0058, 7 + }, + { + 0x0399, 10, 0x0071, 7, 0x0033, 6, 0x00E7, 8, 0x039A, 10, 0x0068, 7, + 0x001E, 5, 0x0000, 3, 0x001D, 5, 0x0069, 7, 0x0032, 6, 0x0001, 3, + 0x0002, 2, 0x0003, 3, 0x0031, 6, 0x006B, 7, 0x001B, 5, 0x0002, 3, + 0x001F, 5, 0x0070, 7, 0x0398, 10, 0x006A, 7, 0x0030, 6, 0x0072, 7, + 0x039B, 10 + } +}, +{ + { + 0x000C, 4, 0x0004, 3, 0x0000, 2, 0x0001, 2, 0x0007, 3, 0x0005, 3, 0x000D, 4 + }, + { + 0x0004, 5, 0x0003, 4, 0x0002, 2, 0x0003, 2, 0x0001, 2, 0x0000, 3, 0x0005, 5 + } +}, +{ + { + 0x0005, 4, 0x0000, 3, 0x0004, 3, 0x0006, 3, 0x0007, 3, 0x0005, 3, 0x0003, 3, 0x0001, 3, 0x0004, 4 + }, + { + 0x0009, 5, 0x000C, 4, 0x0003, 3, 0x0000, 2, 0x0002, 2, 0x0007, 3, 0x000D, 4, 0x0005, 4, 0x0008, 5 + } +}, +{ + { + 0x0039, 6, 0x0017, 5, 0x0008, 4, 0x000A, 4, 0x000D, 4, 0x0000, 3, + 0x0002, 3, 0x0003, 3, 0x0001, 3, 0x000F, 4, 0x000C, 4, 0x0009, 4, + 0x001D, 5, 0x0016, 5, 0x0038, 6, + }, + { + 0x00E5, 8, 0x0038, 6, 0x0007, 5, 0x0002, 4, 0x0000, 3, 0x0003, 3, + 0x0005, 3, 0x0006, 3, 0x0004, 3, 0x0002, 3, 0x000F, 4, 0x001D, 5, + 0x0006, 5, 0x0073, 7, 0x00E4, 8, + }, +}, +{ + { + 0x0041, 7, 0x0006, 6, 0x002C, 6, 0x002D, 6, 0x003B, 6, 0x000D, 5, + 0x0011, 5, 0x0013, 5, 0x0017, 5, 0x0015, 5, 0x001A, 5, 0x001E, 5, + 0x0000, 4, 0x0002, 4, 0x0005, 4, 0x0007, 4, 0x0003, 4, 0x0004, 4, + 0x001F, 5, 0x001C, 5, 0x0019, 5, 0x001B, 5, 0x0018, 5, 0x0014, 5, + 0x0012, 5, 0x000C, 5, 0x0002, 5, 0x003A, 6, 0x0021, 6, 0x0007, 6, + 0x0040, 7 + }, + { + 0x1948, 13, 0x194A, 13, 0x0328, 10, 0x0195, 9, 0x00CB, 8, 0x0066, 7, + 0x0031, 6, 0x0009, 5, 0x000F, 5, 0x001F, 5, 0x0002, 4, 0x0006, 4, + 0x0008, 4, 0x000B, 4, 0x000D, 4, 0x0000, 3, 0x000E, 4, 0x000A, 4, + 0x0009, 4, 0x0005, 4, 0x0003, 4, 0x001E, 5, 0x000E, 5, 0x0008, 5, + 0x0030, 6, 0x0067, 7, 0x00C9, 8, 0x00C8, 8, 0x0653, 11, 0x1949, 13, + 0x194B, 13 + } +}, +{ + { + 0x0067, 8, 0x0099, 8, 0x00B5, 8, 0x00E9, 8, 0x0040, 7, 0x0041, 7, + 0x004D, 7, 0x0051, 7, 0x005B, 7, 0x0071, 7, 0x0070, 7, 0x0018, 6, + 0x001D, 6, 0x0023, 6, 0x0025, 6, 0x0029, 6, 0x002C, 6, 0x002E, 6, + 0x0033, 6, 0x0031, 6, 0x0036, 6, 0x0037, 6, 0x0039, 6, 0x003C, 6, + 0x0000, 5, 0x0002, 5, 0x000A, 5, 0x0005, 5, 0x0009, 5, 0x0006, 5, + 0x000D, 5, 0x0007, 5, 0x000B, 5, 0x000F, 5, 0x0008, 5, 0x0004, 5, + 0x0003, 5, 0x0001, 5, 0x003F, 6, 0x003E, 6, 0x003D, 6, 0x0035, 6, + 0x003B, 6, 0x0034, 6, 0x0030, 6, 0x002F, 6, 0x002B, 6, 0x002A, 6, + 0x0027, 6, 0x0024, 6, 0x0021, 6, 0x001C, 6, 0x0075, 7, 0x0065, 7, + 0x0064, 7, 0x0050, 7, 0x0045, 7, 0x0044, 7, 0x0032, 7, 0x00E8, 8, + 0x00B4, 8, 0x0098, 8, 0x0066, 8 + }, + { + 0x37A4, 14, 0x37AD, 14, 0x37A6, 14, 0x37AE, 14, 0x0DEA, 12, 0x02F0, 10, + 0x02F1, 10, 0x00A0, 9, 0x00A2, 9, 0x01BC, 9, 0x007A, 8, 0x00DF, 8, + 0x003C, 7, 0x0049, 7, 0x006E, 7, 0x000E, 6, 0x0018, 6, 0x0019, 6, + 0x0022, 6, 0x0025, 6, 0x0036, 6, 0x0003, 5, 0x0009, 5, 0x000B, 5, + 0x0010, 5, 0x0013, 5, 0x0015, 5, 0x0018, 5, 0x001A, 5, 0x001D, 5, + 0x001F, 5, 0x0002, 4, 0x0000, 4, 0x001E, 5, 0x001C, 5, 0x0019, 5, + 0x0016, 5, 0x0014, 5, 0x000E, 5, 0x000D, 5, 0x0008, 5, 0x0006, 5, + 0x0002, 5, 0x002E, 6, 0x0023, 6, 0x001F, 6, 0x0015, 6, 0x000F, 6, + 0x005F, 7, 0x0048, 7, 0x0029, 7, 0x00BD, 8, 0x007B, 8, 0x0179, 9, + 0x00A1, 9, 0x037B, 10, 0x0147, 10, 0x0146, 10, 0x0DE8, 12, 0x37AF, 14, + 0x37A7, 14, 0x37AC, 14, 0x37A5, 14 + } +} +}; + +#endif /* AVCODEC_MPC7DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8data.h new file mode 100644 index 00000000..22c2be43 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8data.h @@ -0,0 +1,121 @@ +/* + * Musepack SV8 decoder + * Copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPC8DATA_H +#define AVCODEC_MPC8DATA_H + +#include + +static const int8_t mpc8_idx50[125] = { + -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, + -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2 +}; +static const int8_t mpc8_idx51[125] = { + -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2 +}; +static const int8_t mpc8_idx52[125] = { + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +}; + +static const unsigned int mpc8_thres[] = {0, 0, 3, 0, 0, 1, 3, 4, 8}; +static const int8_t mpc8_huffq2[5*5*5] = { + 6, 5, 4, 5, 6, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 5, + 6, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, + 4, 5, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 2, 3, 4, 3, + 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, + 4, 3, 4, 5, 6, 5, 4, 5, 6, 5, 4, 3, 4, 5, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, + 6, 5, 4, 5, 6 +}; + + +static const uint32_t mpc8_cnk[16][32] = +{ + {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, + {0, 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465}, + {0, 0, 0, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286, 364, 455, 560, 680, 816, 969, 1140, 1330, 1540, 1771, 2024, 2300, 2600, 2925, 3276, 3654, 4060, 4495}, + {0, 0, 0, 0, 1, 5, 15, 35, 70, 126, 210, 330, 495, 715, 1001, 1365, 1820, 2380, 3060, 3876, 4845, 5985, 7315, 8855, 10626, 12650, 14950, 17550, 20475, 23751, 27405, 31465}, + {0, 0, 0, 0, 0, 1, 6, 21, 56, 126, 252, 462, 792, 1287, 2002, 3003, 4368, 6188, 8568, 11628, 15504, 20349, 26334, 33649, 42504, 53130, 65780, 80730, 98280, 118755, 142506, 169911}, + {0, 0, 0, 0, 0, 0, 1, 7, 28, 84, 210, 462, 924, 1716, 3003, 5005, 8008, 12376, 18564, 27132, 38760, 54264, 74613, 100947, 134596, 177100, 230230, 296010, 376740, 475020, 593775, 736281}, + {0, 0, 0, 0, 0, 0, 0, 1, 8, 36, 120, 330, 792, 1716, 3432, 6435, 11440, 19448, 31824, 50388, 77520, 116280, 170544, 245157, 346104, 480700, 657800, 888030, 1184040, 1560780, 2035800, 2629575}, + {0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 45, 165, 495, 1287, 3003, 6435, 12870, 24310, 43758, 75582, 125970, 203490, 319770, 490314, 735471, 1081575, 1562275, 2220075, 3108105, 4292145, 5852925, 7888725}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48620, 92378, 167960, 293930, 497420, 817190, 1307504, 2042975, 3124550, 4686825, 6906900, 10015005, 14307150, 20160075}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 66, 286, 1001, 3003, 8008, 19448, 43758, 92378, 184756, 352716, 646646, 1144066, 1961256, 3268760, 5311735, 8436285, 13123110, 20030010, 30045015, 44352165}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 78, 364, 1365, 4368, 12376, 31824, 75582, 167960, 352716, 705432, 1352078, 2496144, 4457400, 7726160, 13037895, 21474180, 34597290, 54627300, 84672315}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 91, 455, 1820, 6188, 18564, 50388, 125970, 293930, 646646, 1352078, 2704156, 5200300, 9657700, 17383860, 30421755, 51895935, 86493225, 141120525}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 14, 105, 560, 2380, 8568, 27132, 77520, 203490, 497420, 1144066, 2496144, 5200300, 10400600, 20058300, 37442160, 67863915, 119759850, 206253075}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 15, 120, 680, 3060, 11628, 38760, 116280, 319770, 817190, 1961256, 4457400, 9657700, 20058300, 40116600, 77558760, 145422675, 265182525}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 136, 816, 3876, 15504, 54264, 170544, 490314, 1307504, 3268760, 7726160, 17383860, 37442160, 77558760, 155117520, 300540195}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 153, 969, 4845, 20349, 74613, 245157, 735471, 2042975, 5311735, 13037895, 30421755, 67863915, 145422675, 300540195} +}; + +static const uint8_t mpc8_cnk_len[16][33] = +{ + {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}, + {0, 0, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0}, + {0, 0, 0, 2, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 0}, + {0, 0, 0, 0, 3, 4, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 0}, + {0, 0, 0, 0, 0, 3, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 0}, + {0, 0, 0, 0, 0, 0, 3, 5, 7, 8, 9, 10, 11, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 0}, + {0, 0, 0, 0, 0, 0, 0, 3, 6, 7, 9, 10, 11, 12, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 21, 22, 22, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 8, 9, 11, 12, 13, 14, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 22, 23, 23, 23, 24, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 8, 10, 11, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 24, 25, 25, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 25, 26, 26, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 9, 11, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 23, 24, 25, 26, 26, 27, 27, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 9, 11, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 28, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 10, 12, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 27, 28, 29, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 7, 10, 12, 14, 16, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 28, 29, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 10, 12, 14, 16, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 8, 10, 13, 15, 17, 18, 20, 21, 23, 24, 25, 27, 28, 29, 30, 0} + +}; + +static const uint32_t mpc8_cnk_lost[16][33] = +{ + {0, 0, 1, 0, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31}, + {0, 0, 1, 2, 6, 1, 11, 4, 28, 19, 9, 62, 50, 37, 23, 8, 120, 103, 85, 66, 46, 25, 3, 236, 212, 187, 161, 134, 106, 77, 47, 16, 0}, + {0, 0, 0, 0, 6, 12, 29, 8, 44, 8, 91, 36, 226, 148, 57, 464, 344, 208, 55, 908, 718, 508, 277, 24, 1796, 1496, 1171, 820, 442, 36, 3697, 3232, 0}, + {0, 0, 0, 0, 3, 1, 29, 58, 2, 46, 182, 17, 309, 23, 683, 228, 1716, 1036, 220, 3347, 2207, 877, 7529, 5758, 3734, 1434, 15218, 12293, 9017, 5363, 1303, 29576, 0}, + {0, 0, 0, 0, 0, 2, 11, 8, 2, 4, 50, 232, 761, 46, 1093, 3824, 2004, 7816, 4756, 880, 12419, 6434, 31887, 23032, 12406, 65292, 50342, 32792, 12317, 119638, 92233, 60768, 0}, + {0, 0, 0, 0, 0, 0, 1, 4, 44, 46, 50, 100, 332, 1093, 3187, 184, 4008, 14204, 5636, 26776, 11272, 56459, 30125, 127548, 85044, 31914, 228278, 147548, 49268, 454801, 312295, 142384, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 28, 8, 182, 232, 332, 664, 1757, 4944, 13320, 944, 15148, 53552, 14792, 91600, 16987, 178184, 43588, 390776, 160546, 913112, 536372, 61352, 1564729, 828448, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 7, 19, 91, 17, 761, 1093, 1757, 3514, 8458, 21778, 55490, 5102, 58654, 204518, 33974, 313105, 1015577, 534877, 1974229, 1086199, 4096463, 2535683, 499883, 6258916, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 9, 36, 309, 46, 3187, 4944, 8458, 16916, 38694, 94184, 230358, 26868, 231386, 789648, 54177, 1069754, 3701783, 1481708, 6762211, 2470066, 13394357, 5505632, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 62, 226, 23, 1093, 184, 13320, 21778, 38694, 77388, 171572, 401930, 953086, 135896, 925544, 3076873, 8340931, 3654106, 13524422, 3509417, 22756699, 2596624, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 50, 148, 683, 3824, 4008, 944, 55490, 94184, 171572, 343144, 745074, 1698160, 3931208, 662448, 3739321, 12080252, 32511574, 12481564, 49545413, 5193248, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 37, 57, 228, 2004, 14204, 15148, 5102, 230358, 401930, 745074, 1490148, 3188308, 7119516, 16170572, 3132677, 15212929, 47724503, 127314931, 42642616, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 23, 464, 1716, 7816, 5636, 53552, 58654, 26868, 953086, 1698160, 3188308, 6376616, 13496132, 29666704, 66353813, 14457878, 62182381, 189497312, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 344, 1036, 4756, 26776, 14792, 204518, 231386, 135896, 3931208, 7119516, 13496132, 26992264, 56658968, 123012781, 3252931, 65435312, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 208, 220, 880, 11272, 91600, 33974, 789648, 925544, 662448, 16170572, 29666704, 56658968, 113317936, 236330717, 508019104, 0}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 103, 55, 3347, 12419, 56459, 16987, 313105, 54177, 3076873, 3739321, 3132677, 66353813, 123012781, 236330717, 0} +}; + +#endif /* AVCODEC_MPC8DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8huff.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8huff.h new file mode 100644 index 00000000..0566c910 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpc8huff.h @@ -0,0 +1,578 @@ +/* + * Musepack SV8 decoder + * Copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPC8HUFF_H +#define AVCODEC_MPC8HUFF_H + +#include + +#define MPC8_BANDS_SIZE 33 +#define MPC8_BANDS_BITS 9 + +static const uint8_t mpc8_bands_codes[MPC8_BANDS_SIZE] = { + 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x04, + 0x05, 0x06, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, + 0x06, 0x07, 0x08, 0x01, 0x09, 0x0A, 0x0B, 0x07, + 0x08, 0x09, 0x06, 0x07, 0x05, 0x05, 0x03, 0x03, + 0x01, +}; +static const uint8_t mpc8_bands_bits[MPC8_BANDS_SIZE] = { + 1, 3, 5, 6, 7, 8, 8, 9, + 10, 11, 12, 12, 12, 13, 12, 12, + 12, 12, 12, 13, 12, 12, 12, 11, + 11, 11, 10, 10, 9, 8, 6, 5, + 2, +}; + +#define MPC8_SCFI0_SIZE 4 +#define MPC8_SCFI0_BITS 3 + +static const uint8_t mpc8_scfi0_codes[MPC8_SCFI0_SIZE] = { + 0x00, 0x01, 0x01, 0x01, +}; +static const uint8_t mpc8_scfi0_bits[MPC8_SCFI0_SIZE] = { + 3, 3, 1, 2, +}; + +#define MPC8_SCFI1_SIZE 16 +#define MPC8_SCFI1_BITS 7 + +static const uint8_t mpc8_scfi1_codes[MPC8_SCFI1_SIZE] = { + 0x01, 0x00, 0x02, 0x03, 0x01, 0x03, 0x04, 0x05, + 0x04, 0x06, 0x02, 0x02, 0x05, 0x07, 0x03, 0x03, + +}; +static const uint8_t mpc8_scfi1_bits[MPC8_SCFI1_SIZE] = { + 6, 7, 6, 6, 7, 5, 5, 5, + 6, 5, 2, 3, 6, 5, 3, 2, + +}; + +#define MPC8_DSCF0_SIZE 64 +#define MPC8_DSCF0_BITS 9 + +static const uint8_t mpc8_dscf0_codes[MPC8_DSCF0_SIZE] = { + 0x03, 0x04, 0x05, 0x04, 0x05, 0x06, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x0A, 0x07, + 0x08, 0x09, 0x0A, 0x07, 0x08, 0x09, 0x0A, 0x06, + 0x07, 0x05, 0x04, 0x05, 0x06, 0x06, 0x07, 0x0A, + 0x08, 0x05, 0x06, 0x07, 0x09, 0x07, 0x08, 0x09, + 0x0B, 0x0B, 0x0C, 0x0D, 0x0B, 0x0C, 0x0D, 0x0B, + 0x0C, 0x0D, 0x07, 0x08, 0x09, 0x06, 0x07, 0x03, + 0x04, 0x05, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, +}; +static const uint8_t mpc8_dscf0_bits[MPC8_DSCF0_SIZE] = { + 12, 12, 12, 11, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 9, 9, 8, + 8, 8, 8, 7, 7, 7, 7, 6, + 6, 5, 4, 4, 5, 4, 4, 10, + 4, 3, 3, 3, 4, 5, 6, 6, + 7, 8, 8, 8, 9, 9, 9, 10, + 10, 10, 11, 11, 11, 12, 12, 13, + 13, 13, 14, 14, 14, 14, 14, 14, + +}; + +#define MPC8_DSCF1_SIZE 65 +#define MPC8_DSCF1_BITS 9 + +static const uint8_t mpc8_dscf1_codes[MPC8_DSCF1_SIZE] = { + 0x00, 0x03, 0x04, 0x04, 0x05, 0x06, 0x05, 0x06, + 0x07, 0x08, 0x07, 0x08, 0x09, 0x0A, 0x07, 0x08, + 0x09, 0x0A, 0x07, 0x08, 0x09, 0x06, 0x07, 0x05, + 0x06, 0x04, 0x03, 0x03, 0x04, 0x03, 0x04, 0x05, + 0x06, 0x07, 0x05, 0x04, 0x05, 0x05, 0x07, 0x08, + 0x09, 0x0A, 0x0B, 0x0B, 0x0C, 0x0D, 0x0B, 0x0C, + 0x0D, 0x09, 0x0A, 0x0B, 0x0C, 0x07, 0x08, 0x09, + 0x05, 0x06, 0x07, 0x01, 0x02, 0x03, 0x04, 0x05, + 0x0D, +}; +static const uint8_t mpc8_dscf1_bits[MPC8_DSCF1_SIZE] = { + 15, 14, 14, 13, 13, 13, 12, 12, + 12, 12, 11, 11, 11, 11, 10, 10, + 10, 10, 9, 9, 9, 8, 8, 7, + 7, 6, 5, 4, 4, 3, 3, 3, + 3, 3, 4, 5, 5, 6, 7, 8, + 8, 9, 9, 10, 10, 10, 11, 11, + 11, 12, 12, 12, 12, 13, 13, 13, + 14, 14, 14, 15, 15, 15, 15, 15, + 12, +}; + +#define MPC8_RES_SIZE 17 +#define MPC8_RES_BITS 9 + +static const uint8_t mpc8_res_codes[2][MPC8_RES_SIZE] = { + { + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, + 0x01, + }, + { + 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x00, 0x01, 0x02, 0x03, 0x01, 0x01, 0x01, 0x01, + 0x03, + } +}; +static const uint8_t mpc8_res_bits[2][MPC8_RES_SIZE] = { + { + 1, 2, 4, 5, 6, 7, 9, 10, + 11, 12, 13, 14, 15, 16, 16, 8, + 3, + }, + { + 2, 2, 3, 5, 7, 8, 10, 12, + 14, 14, 14, 14, 11, 9, 6, 4, + 2, + } +}; + +#define MPC8_Q1_SIZE 19 +#define MPC8_Q1_BITS 9 + +static const uint8_t mpc8_q1_codes[MPC8_Q1_SIZE] = { + 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x03, 0x04, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x00, 0x01, +}; +static const uint8_t mpc8_q1_bits[MPC8_Q1_SIZE] = { + 6, 4, 4, 3, 3, 3, 3, 3, + 4, 4, 4, 5, 7, 8, 9, 10, + 11, 12, 12, +}; + +#define MPC8_Q9UP_SIZE 256 +#define MPC8_Q9UP_BITS 9 + +static const uint8_t mpc8_q9up_codes[MPC8_Q9UP_SIZE] = { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x26, 0x27, 0x13, 0x14, 0x15, + 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, + 0x28, 0x26, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, + 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, + 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, + 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, + 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, + 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, + 0x67, 0x68, 0x69, 0x6A, 0x56, 0x57, 0x58, 0x59, + 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x61, + 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x3E, + 0x3F, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x6B, 0x7B, 0x6C, 0x6D, 0x6E, + 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, + 0x7F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, + 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, + 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, + 0x9F, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, + 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0x27, 0x28, 0x29, + 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, + 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, + 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4A, 0x4B, 0x06, 0x07, 0x08, 0x09, 0x00, 0x01, +}; +static const uint8_t mpc8_q9up_bits[MPC8_Q9UP_SIZE] = { + 10, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 8, 9, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 6, + 6, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 10, 10, 10, 10, 11, 11, +}; + +#define MPC8_Q2_SIZE 125 +#define MPC8_Q2_BITS 9 + +static const uint8_t mpc8_q2_codes[2][MPC8_Q2_SIZE] = { +{ + 0x02, 0x03, 0x0F, 0x04, 0x00, 0x05, 0x0C, 0x12, + 0x0D, 0x06, 0x07, 0x13, 0x15, 0x14, 0x08, 0x09, + 0x0E, 0x15, 0x0F, 0x0A, 0x03, 0x0B, 0x10, 0x0C, + 0x01, 0x0D, 0x10, 0x16, 0x11, 0x0E, 0x12, 0x0F, + 0x10, 0x16, 0x13, 0x17, 0x11, 0x08, 0x12, 0x18, + 0x14, 0x13, 0x14, 0x17, 0x15, 0x0F, 0x16, 0x19, + 0x17, 0x10, 0x11, 0x1A, 0x18, 0x1B, 0x12, 0x1C, + 0x15, 0x09, 0x16, 0x1D, 0x19, 0x0A, 0x07, 0x0B, + 0x1A, 0x1E, 0x17, 0x0C, 0x18, 0x1F, 0x13, 0x20, + 0x1B, 0x21, 0x14, 0x11, 0x18, 0x22, 0x19, 0x12, + 0x1A, 0x19, 0x1A, 0x1B, 0x1B, 0x23, 0x1C, 0x0D, + 0x1D, 0x24, 0x1C, 0x1C, 0x1E, 0x1F, 0x1D, 0x13, + 0x1E, 0x25, 0x1F, 0x14, 0x02, 0x15, 0x15, 0x16, + 0x04, 0x17, 0x20, 0x26, 0x21, 0x18, 0x16, 0x27, + 0x1D, 0x28, 0x19, 0x1A, 0x22, 0x29, 0x23, 0x1B, + 0x03, 0x1C, 0x17, 0x1D, 0x05, +}, +{ + 0x02, 0x03, 0x0F, 0x04, 0x00, 0x05, 0x0C, 0x0D, + 0x0E, 0x06, 0x07, 0x0F, 0x1E, 0x10, 0x10, 0x08, + 0x11, 0x12, 0x13, 0x09, 0x03, 0x0A, 0x11, 0x0B, + 0x01, 0x0C, 0x14, 0x15, 0x16, 0x0D, 0x17, 0x12, + 0x0E, 0x13, 0x18, 0x19, 0x14, 0x0F, 0x10, 0x1A, + 0x1B, 0x15, 0x11, 0x16, 0x1C, 0x0E, 0x1D, 0x1E, + 0x1F, 0x0F, 0x12, 0x20, 0x1F, 0x21, 0x13, 0x22, + 0x12, 0x13, 0x14, 0x23, 0x20, 0x15, 0x0F, 0x16, + 0x21, 0x24, 0x17, 0x18, 0x19, 0x25, 0x14, 0x26, + 0x22, 0x27, 0x15, 0x10, 0x28, 0x29, 0x2A, 0x11, + 0x2B, 0x17, 0x1A, 0x18, 0x2C, 0x2D, 0x1B, 0x1C, + 0x19, 0x2E, 0x2F, 0x1A, 0x1D, 0x1B, 0x30, 0x12, + 0x31, 0x32, 0x33, 0x13, 0x02, 0x14, 0x15, 0x16, + 0x04, 0x17, 0x34, 0x35, 0x36, 0x18, 0x16, 0x37, + 0x23, 0x38, 0x19, 0x1A, 0x39, 0x3A, 0x3B, 0x1B, + 0x03, 0x1C, 0x17, 0x1D, 0x05, +} +}; +static const uint8_t mpc8_q2_bits[2][MPC8_Q2_SIZE] = { +{ + 12, 11, 10, 11, 13, 11, 9, 8, + 9, 11, 11, 8, 7, 8, 11, 11, + 9, 8, 9, 11, 12, 11, 10, 11, + 13, 11, 9, 8, 9, 11, 9, 6, + 6, 7, 9, 8, 6, 4, 6, 8, + 9, 6, 6, 7, 9, 11, 9, 8, + 9, 11, 10, 8, 7, 8, 10, 8, + 6, 4, 6, 8, 7, 4, 3, 4, + 7, 8, 6, 4, 6, 8, 10, 8, + 7, 8, 10, 11, 9, 8, 9, 11, + 9, 6, 6, 6, 9, 8, 6, 4, + 6, 8, 9, 7, 6, 6, 9, 11, + 9, 8, 9, 11, 13, 11, 10, 11, + 12, 11, 9, 8, 9, 11, 10, 8, + 7, 8, 11, 11, 9, 8, 9, 11, + 13, 11, 10, 11, 12, +}, +{ + 11, 10, 9, 10, 12, 10, 8, 8, + 8, 10, 10, 8, 7, 8, 9, 10, + 8, 8, 8, 10, 11, 10, 9, 10, + 12, 10, 8, 8, 8, 10, 8, 6, + 5, 6, 8, 8, 6, 5, 5, 8, + 8, 6, 5, 6, 8, 10, 8, 8, + 8, 10, 9, 8, 7, 8, 9, 8, + 5, 5, 5, 8, 7, 5, 4, 5, + 7, 8, 5, 5, 5, 8, 9, 8, + 7, 8, 9, 10, 8, 8, 8, 10, + 8, 6, 5, 6, 8, 8, 5, 5, + 6, 8, 8, 6, 5, 6, 8, 10, + 8, 8, 8, 10, 12, 10, 10, 10, + 11, 10, 8, 8, 8, 10, 9, 8, + 7, 8, 10, 10, 8, 8, 8, 10, + 12, 10, 9, 10, 11, +} +}; + +#define MPC8_Q3_SIZE 49 +#define MPC8_Q3_BITS 9 +#define MPC8_Q3_OFFSET -48 + +static const uint8_t mpc8_q3_codes[MPC8_Q3_SIZE] = { + 0x07, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x0F, + 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x13, 0x12, 0x11, + 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, + 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, + 0x09, 0x08, 0x07, 0x06, 0x05, 0x09, 0x08, 0x07, + 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x01, + 0x00, +}; +static const uint8_t mpc8_q3_bits[MPC8_Q3_SIZE] = { + 3, 4, 4, 4, 4, 4, 4, 5, + 5, 5, 5, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, + 9, +}; +static const uint8_t mpc8_q3_syms[MPC8_Q3_SIZE] = { + 48, 65, 64, 49, 63, 32, 47, 80, + 79, 50, 62, 33, 16, 82, 81, 95, + 94, 66, 78, 34, 46, 17, 31, 30, + 97, 96, 111, 67, 77, 51, 61, 35, + 45, 18, 1, 0, 15, 98, 110, 83, + 93, 19, 29, 2, 14, 99, 109, 3, + 13, +}; + +#define MPC8_Q4_SIZE 81 +#define MPC8_Q4_BITS 9 +#define MPC8_Q4_OFFSET -64 + +static const uint8_t mpc8_q4_codes[MPC8_Q4_SIZE] = { + 0x0F, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x17, + 0x16, 0x15, 0x14, 0x13, 0x12, 0x23, 0x22, 0x21, + 0x20, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, + 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, + 0x10, 0x0F, 0x0E, 0x0D, 0x19, 0x18, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, + 0x0D, 0x0C, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, + 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, + 0x09, 0x08, 0x07, 0x06, 0x05, 0x09, 0x08, 0x07, + 0x06, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x01, + 0x00, +}; +static const uint8_t mpc8_q4_bits[MPC8_Q4_SIZE] = { + 4, 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, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 10, 10, 10, + 10, +}; +static const uint8_t mpc8_q4_syms[MPC8_Q4_SIZE] = { + 64, 96, 81, 80, 95, 66, 65, 79, + 78, 49, 48, 63, 32, 113, 112, 98, + 97, 111, 110, 83, 82, 94, 93, 67, + 77, 51, 50, 62, 61, 34, 33, 47, + 46, 17, 16, 31, 128, 114, 127, 126, + 99, 109, 68, 76, 35, 45, 18, 30, + 0, 15, 130, 129, 143, 142, 115, 125, + 100, 108, 84, 92, 52, 60, 36, 44, + 19, 29, 2, 1, 14, 131, 141, 116, + 124, 20, 28, 3, 13, 132, 140, 4, + 12, +}; + +#define MPC8_Q5_SIZE 15 +#define MPC8_Q5_BITS 7 +#define MPC8_Q5_OFFSET -7 + +static const uint8_t mpc8_q5_codes[2][MPC8_Q5_SIZE] = { +{ + 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, + 0x04, 0x05, 0x03, 0x03, 0x03, 0x02, 0x03, +}, +{ + 0x00, 0x01, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, + 0x06, 0x07, 0x04, 0x05, 0x03, 0x02, 0x03, +} +}; +static const uint8_t mpc8_q5_bits[2][MPC8_Q5_SIZE] = { +{ + 7, 7, 6, 5, 4, 3, 3, 2, + 3, 3, 4, 5, 6, 7, 7, +}, +{ + 6, 6, 5, 4, 4, 3, 3, 3, + 3, 3, 4, 4, 5, 6, 6, +} +}; + +#define MPC8_Q6_SIZE 31 +#define MPC8_Q6_BITS 9 +#define MPC8_Q6_OFFSET -15 + +static const uint8_t mpc8_q6_codes[2][MPC8_Q6_SIZE] = { +{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x03, + 0x04, 0x05, 0x05, 0x06, 0x04, 0x05, 0x04, 0x03, + 0x05, 0x06, 0x07, 0x07, 0x06, 0x07, 0x08, 0x09, + 0x05, 0x06, 0x07, 0x04, 0x05, 0x06, 0x07, +}, +{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x05, 0x04, + 0x05, 0x06, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, + 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x07, 0x08, 0x09, + 0x06, 0x07, 0x05, 0x06, 0x07, 0x02, 0x03, +} +}; +static const uint8_t mpc8_q6_bits[2][MPC8_Q6_SIZE] = { +{ + 9, 9, 9, 9, 8, 8, 7, 6, + 6, 6, 5, 5, 4, 4, 3, 2, + 3, 4, 4, 5, 6, 6, 6, 6, + 7, 8, 8, 9, 9, 9, 9, +}, +{ + 8, 8, 7, 7, 7, 6, 6, 5, + 5, 5, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 5, 5, 5, + 6, 6, 7, 7, 7, 8, 8, +} +}; + +#define MPC8_Q7_SIZE 63 +#define MPC8_Q7_BITS 9 +#define MPC8_Q7_OFFSET -31 + +static const uint8_t mpc8_q7_codes[2][MPC8_Q7_SIZE] = { +{ + 0x00, 0x01, 0x02, 0x08, 0x09, 0x03, 0x04, 0x05, + 0x06, 0x07, 0x0A, 0x0B, 0x0C, 0x0D, 0x0A, 0x0B, + 0x0C, 0x0D, 0x0E, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, + 0x0A, 0x0B, 0x0C, 0x08, 0x09, 0x06, 0x04, 0x03, + 0x05, 0x07, 0x0A, 0x0B, 0x0D, 0x0E, 0x0F, 0x0F, + 0x10, 0x11, 0x12, 0x0F, 0x13, 0x10, 0x11, 0x12, + 0x13, 0x0E, 0x0F, 0x10, 0x11, 0x08, 0x09, 0x0A, + 0x0B, 0x0C, 0x12, 0x13, 0x0D, 0x0E, 0x0F, +}, +{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x09, 0x0A, + 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x0C, 0x0D, + 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, + 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, + 0x1E, 0x1F, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, + 0x17, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x09, 0x0A, + 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x02, 0x03, +} +}; +static const uint8_t mpc8_q7_bits[2][MPC8_Q7_SIZE] = { +{ + 10, 10, 10, 9, 9, 10, 10, 10, + 10, 10, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, + 6, 6, 6, 5, 5, 4, 3, 2, + 3, 4, 5, 5, 6, 6, 6, 7, + 7, 7, 7, 8, 7, 8, 8, 8, + 8, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 9, 9, 10, 10, 10, +}, +{ + 9, 9, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 6, 6, 6, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 6, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 8, 9, 9, +} +}; + +#define MPC8_Q8_SIZE 127 +#define MPC8_Q8_BITS 9 +#define MPC8_Q8_OFFSET -63 + +static const uint8_t mpc8_q8_codes[2][MPC8_Q8_SIZE] = { +{ + 0x03, 0x04, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x1A, + 0x0F, 0x1B, 0x10, 0x00, 0x01, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x11, 0x0C, 0x12, 0x13, + 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1C, 0x1A, + 0x1B, 0x1C, 0x1D, 0x1E, 0x1D, 0x1E, 0x1F, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x19, 0x25, 0x1A, 0x1B, + 0x1C, 0x1D, 0x1E, 0x1F, 0x14, 0x15, 0x16, 0x17, + 0x0E, 0x0F, 0x10, 0x11, 0x0B, 0x07, 0x04, 0x03, + 0x05, 0x0C, 0x0D, 0x12, 0x13, 0x14, 0x15, 0x18, + 0x19, 0x1A, 0x1B, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x26, 0x27, 0x28, 0x29, 0x2A, + 0x2B, 0x2C, 0x2D, 0x2E, 0x1F, 0x20, 0x2F, 0x21, + 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, + 0x0D, 0x0E, 0x2A, 0x0F, 0x10, 0x11, 0x12, 0x02, + 0x13, 0x03, 0x04, 0x05, 0x2B, 0x2C, 0x30, 0x31, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, +}, +{ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x15, 0x16, + 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, + 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, + 0x2F, 0x30, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, + 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, + 0x3C, 0x3D, 0x3E, 0x31, 0x3F, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x16, + 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, + 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, + 0x27, 0x28, 0x29, 0x04, 0x05, 0x06, 0x07, +} +}; +static const uint8_t mpc8_q8_bits[2][MPC8_Q8_SIZE] = { +{ + 11, 11, 10, 10, 10, 10, 10, 9, + 10, 9, 10, 12, 12, 11, 11, 11, + 11, 11, 11, 11, 10, 11, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 10, + 10, 10, 10, 10, 9, 9, 9, 9, + 9, 9, 9, 9, 8, 9, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, + 6, 6, 6, 6, 5, 4, 3, 2, + 3, 5, 5, 6, 6, 6, 6, 7, + 7, 7, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 10, 10, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 11, 11, 10, 11, 11, 11, 11, 12, + 11, 12, 12, 12, 10, 10, 9, 9, + 10, 10, 10, 10, 10, 10, 10, +}, +{ + 9, 9, 9, 9, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 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, 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, 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, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 9, 9, 9, 9, +} +}; + +#endif /* AVCODEC_MPC8HUFF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpcdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpcdata.h new file mode 100644 index 00000000..64fb4ab3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpcdata.h @@ -0,0 +1,100 @@ +/* + * Musepack decoder + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPCDATA_H +#define AVCODEC_MPCDATA_H + +static const float mpc_CC[18+1] = { + 111.285962475327f, // 32768/2/255*sqrt(3) + 65536.0000 /* this value is never used */, + 21845.3333, 13107.2000, 9362.2857, 7281.7778, 4369.0667, 2114.0645, + 1040.2539, 516.0315, 257.0039, 128.2505, 64.0626, 32.0156, 16.0039, 8.0010, + 4.0002, 2.0001, 1.0000 +}; + +static const float mpc_SCF[256] = { + 307.330047607421875000, 255.999984741210937500, 213.243041992187500000, 177.627334594726562500, + 147.960128784179687500, 123.247924804687500000, 102.663139343261718750, 85.516410827636718750, + 71.233520507812500000, 59.336143493652343750, 49.425861358642578125, 41.170787811279296875, + 34.294471740722656250, 28.566631317138671875, 23.795452117919921875, 19.821151733398437500, + 16.510635375976562500, 13.753040313720703125, 11.456016540527343750, 9.542640686035156250, + 7.948835372924804688, 6.621226310729980469, 5.515353679656982422, 4.594182968139648438, + 3.826865673065185547, 3.187705039978027344, 2.655296564102172852, 2.211810588836669922, + 1.842395424842834473, 1.534679770469665527, 1.278358578681945801, 1.064847946166992188, + 0.886997759342193604, 0.738851964473724365, 0.615449428558349609, 0.512657463550567627, + 0.427033752202987671, 0.355710864067077637, 0.296300262212753296, 0.246812388300895691, + 0.205589950084686279, 0.171252459287643433, 0.142649993300437927, 0.118824683129787445, + 0.098978661000728607, 0.082447312772274017, 0.068677015602588654, 0.057206626981496811, + 0.047652013599872589, 0.039693206548690796, 0.033063672482967377, 0.027541399002075195, + 0.022941453382372856, 0.019109787419438362, 0.015918083488941193, 0.013259455561637878, + 0.011044870130717754, 0.009200163185596466, 0.007663558237254620, 0.006383595988154411, + 0.005317411851137877, 0.004429301247000694, 0.003689522389322519, 0.003073300700634718, + 0.002560000168159604, 0.002132430672645569, 0.001776273478753865, 0.001479601487517357, + 0.001232479466125369, 0.001026631565764546, 0.000855164253152907, 0.000712335284333676, + 0.000593361502978951, 0.000494258652906865, 0.000411707907915115, 0.000342944724252447, + 0.000285666319541633, 0.000237954518524930, 0.000198211506358348, 0.000165106350323185, + 0.000137530398205854, 0.000114560163638089, 0.000095426403277088, 0.000079488345363643, + 0.000066212254751008, 0.000055153526773211, 0.000045941822463647, 0.000038268648495432, + 0.000031877043511486, 0.000026552961571724, 0.000022118103515822, 0.000018423952496960, + 0.000015346795407822, 0.000012783583770215, 0.000010648477655195, 0.000008869976227288, + 0.000007388518497464, 0.000006154492893984, 0.000005126573796588, 0.000004270336830814, + 0.000003557107902452, 0.000002963002089018, 0.000002468123511790, 0.000002055899130937, + 0.000001712524181130, 0.000001426499579793, 0.000001188246528727, 0.000000989786371974, + 0.000000824472920158, 0.000000686770022185, 0.000000572066142013, 0.000000476520028769, + 0.000000396931966407, 0.000000330636652279, 0.000000275413924555, 0.000000229414467867, + 0.000000191097811353, 0.000000159180785886, 0.000000132594522029, 0.000000110448674207, + 0.000000092001613439, 0.000000076635565449, 0.000000063835940978, 0.000000053174105119, + 0.000000044293003043, 0.000000036895215771, 0.000000030733001921, 0.000000025599996789, + 0.000000021324305018, 3689522167600.270019531250000000, 3073300627835.926757812500000000, 2560000000000.002929687500000000, + 2132430501800.519042968750000000, 1776273376956.721923828125000000, 1479601378343.250244140625000000, 1232479339720.794189453125000000, + 1026631459710.774291992187500000, 855164155779.391845703125000000, 712335206965.024780273437500000, 593361454233.829101562500000000, + 494258618594.112609863281250000, 411707872682.763122558593750000, 342944697476.612365722656250000, 285666302081.983886718750000000, + 237954506209.446411132812500000, 198211502766.368713378906250000, 165106349338.563323974609375000, 137530396629.095306396484375000, + 114560161209.611633300781250000, 95426399240.062576293945312500, 79488345475.196502685546875000, 66212254855.064872741699218750, + 55153528064.816276550292968750, 45941822471.611343383789062500, 38268649822.956413269042968750, 31877045369.216873168945312500, + 26552962442.420688629150390625, 22118104306.789615631103515625, 18423953228.829509735107421875, 15346796808.164905548095703125, + 12783585007.291271209716796875, 10648479137.463939666748046875, 8869977230.669750213623046875, 7388519530.061036109924316406, + 6154493909.785535812377929688, 5126574428.270387649536132812, 4270337375.232155323028564453, 3557108465.595236301422119141, + 2963002574.315670013427734375, 2468123854.056322574615478516, 2055899448.676229715347290039, 1712524489.450022459030151367, + 1426499787.649837732315063477, 1188246741.404872417449951172, 989786560.561257958412170410, 824473067.192597866058349609, + 686770123.591610312461853027, 572066234.090648531913757324, 476520111.962911486625671387, 396932039.637152194976806641, + 330636714.243810534477233887, 275413990.026798009872436523, 229414528.498330980539321899, 191097866.455478429794311523, + 159180827.835415601730346680, 132594551.788319095969200134, 110448697.892960876226425171, 92001629.793398514389991760, + 76635578.744844585657119751, 63835955.327594503760337830, 53174116.504741288721561432, 44293010.914454914629459381, + 36895221.676002673804759979, 30733006.278359245508909225, 25600000.000000011175870895, 21324305.018005173653364182, + 17762733.769567202776670456, 14796013.783432489261031151, 12324793.397207930684089661, 10266314.597107734531164169, + 8551641.557793911546468735, 7123352.069650243036448956, 5933614.542338287457823753, 4942586.185941123403608799, + 4117078.726827629376202822, 3429446.974766122177243233, 2856663.020819837693125010, 2379545.062094463035464287, + 1982115.027663686312735081, 1651063.493385632522404194, 1375303.966290952404960990, 1145601.612096115713939071, + 954263.992400625254958868, 794883.454751964658498764, 662122.548550648498348892, 551535.280648162588477135, + 459418.224716113239992410, 382686.498229563992936164, 318770.453692168579436839, 265529.624424206791445613, + 221181.043067896069260314, 184239.532288295013131574, 153467.968081648985389620, 127835.850072912653558888, + 106484.791374639346031472, 88699.772306697457679547, 73885.195300610314006917, 61544.939097855312866159, + 51265.744282703839417081, 42703.373752321524079889, 35571.084655952341563534, 29630.025743156678800005, + 24681.238540563208516687, 20558.994486762283486314, 17125.244894500214286381, 14264.997876498367986642, + 11882.467414048716818797, 9897.865605612574654515, 8244.730671925974093028, 6867.701235916098994494, + 5720.662340906482313585, 4765.201119629112326948, 3969.320396371519564127, 3306.367142438103201130, + 2754.139900267978191550, 2294.145284983308101801, 1910.978664554782881169, 1591.808278354154936096, + 1325.945517883190177599, 1104.486978929608085309, 920.016297933984674273, 766.355787448445425980, + 638.359553275944676898, 531.741165047412550848, 442.930109144548907807, 368.952216760026544762, +}; + +#endif /* AVCODEC_MPCDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12.h new file mode 100644 index 00000000..1ec99f17 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12.h @@ -0,0 +1,80 @@ +/* + * MPEG-1/2 common code + * Copyright (c) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEG12_H +#define AVCODEC_MPEG12_H + +#include "mpeg12vlc.h" +#include "mpegvideo.h" + +extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; + +void ff_mpeg12_common_init(MpegEncContext *s); + +#define INIT_2D_VLC_RL(rl, static_size, flags)\ +{\ + static RL_VLC_ELEM rl_vlc_table[static_size];\ + rl.rl_vlc[0] = rl_vlc_table;\ + ff_init_2d_vlc_rl(&rl, static_size, flags);\ +} + +void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags); + +static inline int decode_dc(GetBitContext *gb, int component) +{ + int code, diff; + + if (component == 0) { + code = get_vlc2(gb, ff_dc_lum_vlc.table, DC_VLC_BITS, 2); + } else { + code = get_vlc2(gb, ff_dc_chroma_vlc.table, DC_VLC_BITS, 2); + } + if (code < 0){ + av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n"); + return 0xffff; + } + if (code == 0) { + diff = 0; + } else { + diff = get_xbits(gb, code); + } + return diff; +} + +int ff_mpeg1_decode_block_intra(GetBitContext *gb, + const uint16_t *quant_matrix, + uint8_t *const scantable, int last_dc[3], + int16_t *block, int index, int qscale); + +void ff_mpeg1_clean_buffers(MpegEncContext *s); +int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s); + +void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64], + int motion_x, int motion_y); +void ff_mpeg1_encode_init(MpegEncContext *s); +void ff_mpeg1_encode_slice_header(MpegEncContext *s); + +void ff_mpeg12_find_best_frame_rate(AVRational frame_rate, + int *code, int *ext_n, int *ext_d, + int nonstandard); + +#endif /* AVCODEC_MPEG12_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12data.h new file mode 100644 index 00000000..f51faf46 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12data.h @@ -0,0 +1,57 @@ +/* + * MPEG-1/2 tables + * copyright (c) 2000,2001 Fabrice Bellard + * copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MPEG-1/2 tables. + */ + +#ifndef AVCODEC_MPEG12DATA_H +#define AVCODEC_MPEG12DATA_H + +#include +#include "libavutil/rational.h" +#include "rl.h" + +extern const uint16_t ff_mpeg1_default_intra_matrix[]; +extern const uint16_t ff_mpeg1_default_non_intra_matrix[64]; + +extern const uint16_t ff_mpeg12_vlc_dc_lum_code[12]; +extern const unsigned char ff_mpeg12_vlc_dc_lum_bits[12]; +extern const uint16_t ff_mpeg12_vlc_dc_chroma_code[12]; +extern const unsigned char ff_mpeg12_vlc_dc_chroma_bits[12]; + +extern RLTable ff_rl_mpeg1; +extern RLTable ff_rl_mpeg2; + +extern const uint8_t ff_mpeg12_mbAddrIncrTable[36][2]; +extern const uint8_t ff_mpeg12_mbPatTable[64][2]; + +extern const uint8_t ff_mpeg12_mbMotionVectorTable[17][2]; + +extern const AVRational ff_mpeg12_frame_rate_tab[]; +extern const AVRational ff_mpeg2_frame_rate_tab[]; + +extern const float ff_mpeg1_aspect[16]; +extern const AVRational ff_mpeg2_aspect[16]; + +#endif /* AVCODEC_MPEG12DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12vlc.h new file mode 100644 index 00000000..c5abae96 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg12vlc.h @@ -0,0 +1,52 @@ +/* + * MPEG-1/2 VLC + * copyright (c) 2000,2001 Fabrice Bellard + * copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MPEG-1/2 VLC. + */ + +#ifndef AVCODEC_MPEG12VLC_H +#define AVCODEC_MPEG12VLC_H + +#include "vlc.h" + +#define DC_VLC_BITS 9 +#define MV_VLC_BITS 9 +#define TEX_VLC_BITS 9 + +#define MBINCR_VLC_BITS 9 +#define MB_PAT_VLC_BITS 9 +#define MB_PTYPE_VLC_BITS 6 +#define MB_BTYPE_VLC_BITS 6 + +extern VLC ff_dc_lum_vlc; +extern VLC ff_dc_chroma_vlc; +extern VLC ff_mbincr_vlc; +extern VLC ff_mb_ptype_vlc; +extern VLC ff_mb_btype_vlc; +extern VLC ff_mb_pat_vlc; +extern VLC ff_mv_vlc; + +void ff_mpeg12_init_vlcs(void); + +#endif /* AVCODEC_MPEG12VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4audio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4audio.h new file mode 100644 index 00000000..4b390e0f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4audio.h @@ -0,0 +1,177 @@ +/* + * MPEG-4 Audio common header + * Copyright (c) 2008 Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEG4AUDIO_H +#define AVCODEC_MPEG4AUDIO_H + +#include + +#include "libavutil/attributes.h" + +#include "get_bits.h" +#include "internal.h" +#include "put_bits.h" + +typedef struct MPEG4AudioConfig { + int object_type; + int sampling_index; + int sample_rate; + int chan_config; + int sbr; ///< -1 implicit, 1 presence + int ext_object_type; + int ext_sampling_index; + int ext_sample_rate; + int ext_chan_config; + int channels; + int ps; ///< -1 implicit, 1 presence + int frame_length_short; +} MPEG4AudioConfig; + +extern av_export_avcodec const int avpriv_mpeg4audio_sample_rates[16]; +extern const uint8_t ff_mpeg4audio_channels[8]; + +/** + * Parse MPEG-4 systems extradata from a potentially unaligned GetBitContext to retrieve audio configuration. + * @param[in] c MPEG4AudioConfig structure to fill. + * @param[in] gb Extradata from container. + * @param[in] sync_extension look for a sync extension after config if true. + * @param[in] logctx opaque struct starting with an AVClass element, used for logging. + * @return negative AVERROR code on error, on success AudioSpecificConfig bit index in extradata. + */ +int ff_mpeg4audio_get_config_gb(MPEG4AudioConfig *c, GetBitContext *gb, + int sync_extension, void *logctx); + +#if LIBAVCODEC_VERSION_MAJOR < 59 +/** + * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. + * @param[in] c MPEG4AudioConfig structure to fill. + * @param[in] buf Extradata from container. + * @param[in] bit_size Extradata size in bits. + * @param[in] sync_extension look for a sync extension after config if true. + * @return negative AVERROR code on error, on success AudioSpecificConfig bit index in extradata. + */ +int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, + int bit_size, int sync_extension); +#endif + +/** + * Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration. + * @param[in] c MPEG4AudioConfig structure to fill. + * @param[in] buf Extradata from container. + * @param[in] size Extradata size in bytes. + * @param[in] sync_extension look for a sync extension after config if true. + * @param[in] logctx opaque struct starting with an AVClass element, used for logging. + * @return negative AVERROR code on error, AudioSpecificConfig bit index in extradata on success. + */ +int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, + int size, int sync_extension, void *logctx); + +enum AudioObjectType { + AOT_NULL, + // Support? Name + AOT_AAC_MAIN, ///< Y Main + AOT_AAC_LC, ///< Y Low Complexity + AOT_AAC_SSR, ///< N (code in SoC repo) Scalable Sample Rate + AOT_AAC_LTP, ///< Y Long Term Prediction + AOT_SBR, ///< Y Spectral Band Replication + AOT_AAC_SCALABLE, ///< N Scalable + AOT_TWINVQ, ///< N Twin Vector Quantizer + AOT_CELP, ///< N Code Excited Linear Prediction + AOT_HVXC, ///< N Harmonic Vector eXcitation Coding + AOT_TTSI = 12, ///< N Text-To-Speech Interface + AOT_MAINSYNTH, ///< N Main Synthesis + AOT_WAVESYNTH, ///< N Wavetable Synthesis + AOT_MIDI, ///< N General MIDI + AOT_SAFX, ///< N Algorithmic Synthesis and Audio Effects + AOT_ER_AAC_LC, ///< N Error Resilient Low Complexity + AOT_ER_AAC_LTP = 19, ///< N Error Resilient Long Term Prediction + AOT_ER_AAC_SCALABLE, ///< N Error Resilient Scalable + AOT_ER_TWINVQ, ///< N Error Resilient Twin Vector Quantizer + AOT_ER_BSAC, ///< N Error Resilient Bit-Sliced Arithmetic Coding + AOT_ER_AAC_LD, ///< N Error Resilient Low Delay + AOT_ER_CELP, ///< N Error Resilient Code Excited Linear Prediction + AOT_ER_HVXC, ///< N Error Resilient Harmonic Vector eXcitation Coding + AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise + AOT_ER_PARAM, ///< N Error Resilient Parametric + AOT_SSC, ///< N SinuSoidal Coding + AOT_PS, ///< N Parametric Stereo + AOT_SURROUND, ///< N MPEG Surround + AOT_ESCAPE, ///< Y Escape Value + AOT_L1, ///< Y Layer 1 + AOT_L2, ///< Y Layer 2 + AOT_L3, ///< Y Layer 3 + AOT_DST, ///< N Direct Stream Transfer + AOT_ALS, ///< Y Audio LosslesS + AOT_SLS, ///< N Scalable LosslesS + AOT_SLS_NON_CORE, ///< N Scalable LosslesS (non core) + AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay + AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple + AOT_SMR_MAIN, ///< N Symbolic Music Representation Main + AOT_USAC_NOSBR, ///< N Unified Speech and Audio Coding (no SBR) + AOT_SAOC, ///< N Spatial Audio Object Coding + AOT_LD_SURROUND, ///< N Low Delay MPEG Surround + AOT_USAC, ///< N Unified Speech and Audio Coding +}; + +#define MAX_PCE_SIZE 320 /// 16; bits -= 16) + ff_pce_copy_bits(pb, gb, 16); + if (bits) + ff_pce_copy_bits(pb, gb, bits); + avpriv_align_put_bits(pb); + align_get_bits(gb); + comment_size = ff_pce_copy_bits(pb, gb, 8); + for (; comment_size > 0; comment_size--) + ff_pce_copy_bits(pb, gb, 8); + + return put_bits_count(pb) - offset; +} + +#endif /* AVCODEC_MPEG4AUDIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4data.h new file mode 100644 index 00000000..4756e9ea --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4data.h @@ -0,0 +1,492 @@ +/* + * copyright (c) 2000,2001 Fabrice Bellard + * H.263+ support + * copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MPEG-4 tables. + */ + +#ifndef AVCODEC_MPEG4DATA_H +#define AVCODEC_MPEG4DATA_H + +#include +#include "mpegvideo.h" + +/* dc encoding for MPEG-4 */ +const uint8_t ff_mpeg4_DCtab_lum[13][2] = +{ + {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, + {1,8}, {1,9}, {1,10}, {1,11}, +}; + +const uint8_t ff_mpeg4_DCtab_chrom[13][2] = +{ + {3,2}, {2,2}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8}, + {1,9}, {1,10}, {1,11}, {1,12}, +}; + +const uint16_t ff_mpeg4_intra_vlc[103][2] = { +{ 0x2, 2 }, +{ 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 }, +{ 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 }, +{ 0x1f, 8 },{ 0x1e, 8 },{ 0x1d, 8 },{ 0x25, 9 }, +{ 0x24, 9 },{ 0x23, 9 },{ 0x21, 9 },{ 0x21, 10 }, +{ 0x20, 10 },{ 0xf, 10 },{ 0xe, 10 },{ 0x7, 11 }, +{ 0x6, 11 },{ 0x20, 11 },{ 0x21, 11 },{ 0x50, 12 }, +{ 0x51, 12 },{ 0x52, 12 },{ 0xe, 4 },{ 0x14, 6 }, +{ 0x16, 7 },{ 0x1c, 8 },{ 0x20, 9 },{ 0x1f, 9 }, +{ 0xd, 10 },{ 0x22, 11 },{ 0x53, 12 },{ 0x55, 12 }, +{ 0xb, 5 },{ 0x15, 7 },{ 0x1e, 9 },{ 0xc, 10 }, +{ 0x56, 12 },{ 0x11, 6 },{ 0x1b, 8 },{ 0x1d, 9 }, +{ 0xb, 10 },{ 0x10, 6 },{ 0x22, 9 },{ 0xa, 10 }, +{ 0xd, 6 },{ 0x1c, 9 },{ 0x8, 10 },{ 0x12, 7 }, +{ 0x1b, 9 },{ 0x54, 12 },{ 0x14, 7 },{ 0x1a, 9 }, +{ 0x57, 12 },{ 0x19, 8 },{ 0x9, 10 },{ 0x18, 8 }, +{ 0x23, 11 },{ 0x17, 8 },{ 0x19, 9 },{ 0x18, 9 }, +{ 0x7, 10 },{ 0x58, 12 },{ 0x7, 4 },{ 0xc, 6 }, +{ 0x16, 8 },{ 0x17, 9 },{ 0x6, 10 },{ 0x5, 11 }, +{ 0x4, 11 },{ 0x59, 12 },{ 0xf, 6 },{ 0x16, 9 }, +{ 0x5, 10 },{ 0xe, 6 },{ 0x4, 10 },{ 0x11, 7 }, +{ 0x24, 11 },{ 0x10, 7 },{ 0x25, 11 },{ 0x13, 7 }, +{ 0x5a, 12 },{ 0x15, 8 },{ 0x5b, 12 },{ 0x14, 8 }, +{ 0x13, 8 },{ 0x1a, 8 },{ 0x15, 9 },{ 0x14, 9 }, +{ 0x13, 9 },{ 0x12, 9 },{ 0x11, 9 },{ 0x26, 11 }, +{ 0x27, 11 },{ 0x5c, 12 },{ 0x5d, 12 },{ 0x5e, 12 }, +{ 0x5f, 12 },{ 0x3, 7 }, +}; + +const int8_t ff_mpeg4_intra_level[102] = { + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 1, 2, 3, + 4, 5, 1, 2, 3, 4, 1, 2, + 3, 1, 2, 3, 1, 2, 3, 1, + 2, 3, 1, 2, 1, 2, 1, 1, + 1, 1, 1, 1, 2, 3, 4, 5, + 6, 7, 8, 1, 2, 3, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +}; + +const int8_t ff_mpeg4_intra_run[102] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 3, 3, 3, 3, 4, 4, + 4, 5, 5, 5, 6, 6, 6, 7, + 7, 7, 8, 8, 9, 9, 10, 11, + 12, 13, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 2, 2, + 3, 3, 4, 4, 5, 5, 6, 6, + 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, +}; + +RLTable ff_mpeg4_rl_intra = { + 102, + 67, + ff_mpeg4_intra_vlc, + ff_mpeg4_intra_run, + ff_mpeg4_intra_level, +}; + +/* Note this is identical to the intra rvlc except that it is reordered. */ +static const uint16_t inter_rvlc[170][2]={ +{0x0006, 3},{0x0001, 4},{0x0004, 5},{0x001C, 7}, +{0x003C, 8},{0x003D, 8},{0x007C, 9},{0x00FC, 10}, +{0x00FD, 10},{0x01FC, 11},{0x01FD, 11},{0x03FC, 12}, +{0x07FC, 13},{0x07FD, 13},{0x0BFC, 13},{0x0BFD, 13}, +{0x0FFC, 14},{0x0FFD, 14},{0x1FFC, 15},{0x0007, 3}, +{0x000C, 6},{0x005C, 8},{0x007D, 9},{0x017C, 10}, +{0x02FC, 11},{0x03FD, 12},{0x0DFC, 13},{0x17FC, 14}, +{0x17FD, 14},{0x000A, 4},{0x001D, 7},{0x00BC, 9}, +{0x02FD, 11},{0x05FC, 12},{0x1BFC, 14},{0x1BFD, 14}, +{0x0005, 5},{0x005D, 8},{0x017D, 10},{0x05FD, 12}, +{0x0DFD, 13},{0x1DFC, 14},{0x1FFD, 15},{0x0008, 5}, +{0x006C, 8},{0x037C, 11},{0x0EFC, 13},{0x2FFC, 15}, +{0x0009, 5},{0x00BD, 9},{0x037D, 11},{0x0EFD, 13}, +{0x000D, 6},{0x01BC, 10},{0x06FC, 12},{0x1DFD, 14}, +{0x0014, 6},{0x01BD, 10},{0x06FD, 12},{0x2FFD, 15}, +{0x0015, 6},{0x01DC, 10},{0x0F7C, 13},{0x002C, 7}, +{0x01DD, 10},{0x1EFC, 14},{0x002D, 7},{0x03BC, 11}, +{0x0034, 7},{0x077C, 12},{0x006D, 8},{0x0F7D, 13}, +{0x0074, 8},{0x1EFD, 14},{0x0075, 8},{0x1F7C, 14}, +{0x00DC, 9},{0x1F7D, 14},{0x00DD, 9},{0x1FBC, 14}, +{0x00EC, 9},{0x37FC, 15},{0x01EC, 10},{0x01ED, 10}, +{0x01F4, 10},{0x03BD, 11},{0x03DC, 11},{0x03DD, 11}, +{0x03EC, 11},{0x03ED, 11},{0x03F4, 11},{0x077D, 12}, +{0x07BC, 12},{0x07BD, 12},{0x0FBC, 13},{0x0FBD, 13}, +{0x0FDC, 13},{0x0FDD, 13},{0x1FBD, 14},{0x1FDC, 14}, +{0x1FDD, 14},{0x37FD, 15},{0x3BFC, 15}, +{0x000B, 4},{0x0078, 8},{0x03F5, 11},{0x0FEC, 13}, +{0x1FEC, 14},{0x0012, 5},{0x00ED, 9},{0x07DC, 12}, +{0x1FED, 14},{0x3BFD, 15},{0x0013, 5},{0x03F8, 11}, +{0x3DFC, 15},{0x0018, 6},{0x07DD, 12},{0x0019, 6}, +{0x07EC, 12},{0x0022, 6},{0x0FED, 13},{0x0023, 6}, +{0x0FF4, 13},{0x0035, 7},{0x0FF5, 13},{0x0038, 7}, +{0x0FF8, 13},{0x0039, 7},{0x0FF9, 13},{0x0042, 7}, +{0x1FF4, 14},{0x0043, 7},{0x1FF5, 14},{0x0079, 8}, +{0x1FF8, 14},{0x0082, 8},{0x3DFD, 15},{0x0083, 8}, +{0x00F4, 9},{0x00F5, 9},{0x00F8, 9},{0x00F9, 9}, +{0x0102, 9},{0x0103, 9},{0x01F5, 10},{0x01F8, 10}, +{0x01F9, 10},{0x0202, 10},{0x0203, 10},{0x03F9, 11}, +{0x0402, 11},{0x0403, 11},{0x07ED, 12},{0x07F4, 12}, +{0x07F5, 12},{0x07F8, 12},{0x07F9, 12},{0x0802, 12}, +{0x0803, 12},{0x1002, 13},{0x1003, 13},{0x1FF9, 14}, +{0x2002, 14},{0x2003, 14},{0x3EFC, 15},{0x3EFD, 15}, +{0x3F7C, 15},{0x3F7D, 15},{0x0000, 4} +}; + +static const int8_t inter_rvlc_run[169]={ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 3, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 6, 6, 6, 6, + 7, 7, 7, 7, 8, 8, 8, 9, + 9, 9, 10, 10, 11, 11, 12, 12, +13, 13, 14, 14, 15, 15, 16, 16, +17, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 27, 28, 29, 30, 31, +32, 33, 34, 35, 36, 37, 38, + 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 2, 2, 2, 3, 3, 4, + 4, 5, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 10, 10, 11, 11, 12, +12, 13, 13, 14, 15, 16, 17, 18, +19, 20, 21, 22, 23, 24, 25, 26, +27, 28, 29, 30, 31, 32, 33, 34, +35, 36, 37, 38, 39, 40, 41, 42, +43, 44, +}; + +static const int8_t inter_rvlc_level[169]={ + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, +17, 18, 19, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 1, 2, 3, + 4, 5, 6, 7, 1, 2, 3, 4, + 5, 6, 7, 1, 2, 3, 4, 5, + 1, 2, 3, 4, 1, 2, 3, 4, + 1, 2, 3, 4, 1, 2, 3, 1, + 2, 3, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 2, 1, 2, 1, 2, + 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, + 1, 2, 3, 4, 5, 1, 2, 3, + 4, 5, 1, 2, 3, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, +}; + +RLTable ff_rvlc_rl_inter = { + 169, + 103, + inter_rvlc, + inter_rvlc_run, + inter_rvlc_level, +}; + +static const uint16_t intra_rvlc[170][2]={ +{0x0006, 3},{0x0007, 3},{0x000A, 4},{0x0009, 5}, +{0x0014, 6},{0x0015, 6},{0x0034, 7},{0x0074, 8}, +{0x0075, 8},{0x00DD, 9},{0x00EC, 9},{0x01EC, 10}, +{0x01ED, 10},{0x01F4, 10},{0x03EC, 11},{0x03ED, 11}, +{0x03F4, 11},{0x077D, 12},{0x07BC, 12},{0x0FBD, 13}, +{0x0FDC, 13},{0x07BD, 12},{0x0FDD, 13},{0x1FBD, 14}, +{0x1FDC, 14},{0x1FDD, 14},{0x1FFC, 15},{0x0001, 4}, +{0x0008, 5},{0x002D, 7},{0x006C, 8},{0x006D, 8}, +{0x00DC, 9},{0x01DD, 10},{0x03DC, 11},{0x03DD, 11}, +{0x077C, 12},{0x0FBC, 13},{0x1F7D, 14},{0x1FBC, 14}, +{0x0004, 5},{0x002C, 7},{0x00BC, 9},{0x01DC, 10}, +{0x03BC, 11},{0x03BD, 11},{0x0EFD, 13},{0x0F7C, 13}, +{0x0F7D, 13},{0x1EFD, 14},{0x1F7C, 14},{0x0005, 5}, +{0x005C, 8},{0x00BD, 9},{0x037D, 11},{0x06FC, 12}, +{0x0EFC, 13},{0x1DFD, 14},{0x1EFC, 14},{0x1FFD, 15}, +{0x000C, 6},{0x005D, 8},{0x01BD, 10},{0x03FD, 12}, +{0x06FD, 12},{0x1BFD, 14},{0x000D, 6},{0x007D, 9}, +{0x02FC, 11},{0x05FC, 12},{0x1BFC, 14},{0x1DFC, 14}, +{0x001C, 7},{0x017C, 10},{0x02FD, 11},{0x05FD, 12}, +{0x2FFC, 15},{0x001D, 7},{0x017D, 10},{0x037C, 11}, +{0x0DFD, 13},{0x2FFD, 15},{0x003C, 8},{0x01BC, 10}, +{0x0BFD, 13},{0x17FD, 14},{0x003D, 8},{0x01FD, 11}, +{0x0DFC, 13},{0x37FC, 15},{0x007C, 9},{0x03FC, 12}, +{0x00FC, 10},{0x0BFC, 13},{0x00FD, 10},{0x37FD, 15}, +{0x01FC, 11},{0x07FC, 13},{0x07FD, 13},{0x0FFC, 14}, +{0x0FFD, 14},{0x17FC, 14},{0x3BFC, 15}, +{0x000B, 4},{0x0078, 8},{0x03F5, 11},{0x0FEC, 13}, +{0x1FEC, 14},{0x0012, 5},{0x00ED, 9},{0x07DC, 12}, +{0x1FED, 14},{0x3BFD, 15},{0x0013, 5},{0x03F8, 11}, +{0x3DFC, 15},{0x0018, 6},{0x07DD, 12},{0x0019, 6}, +{0x07EC, 12},{0x0022, 6},{0x0FED, 13},{0x0023, 6}, +{0x0FF4, 13},{0x0035, 7},{0x0FF5, 13},{0x0038, 7}, +{0x0FF8, 13},{0x0039, 7},{0x0FF9, 13},{0x0042, 7}, +{0x1FF4, 14},{0x0043, 7},{0x1FF5, 14},{0x0079, 8}, +{0x1FF8, 14},{0x0082, 8},{0x3DFD, 15},{0x0083, 8}, +{0x00F4, 9},{0x00F5, 9},{0x00F8, 9},{0x00F9, 9}, +{0x0102, 9},{0x0103, 9},{0x01F5, 10},{0x01F8, 10}, +{0x01F9, 10},{0x0202, 10},{0x0203, 10},{0x03F9, 11}, +{0x0402, 11},{0x0403, 11},{0x07ED, 12},{0x07F4, 12}, +{0x07F5, 12},{0x07F8, 12},{0x07F9, 12},{0x0802, 12}, +{0x0803, 12},{0x1002, 13},{0x1003, 13},{0x1FF9, 14}, +{0x2002, 14},{0x2003, 14},{0x3EFC, 15},{0x3EFD, 15}, +{0x3F7C, 15},{0x3F7D, 15},{0x0000, 4} +}; + +static const int8_t intra_rvlc_run[169]={ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 4, 4, 4, 4, + 4, 4, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 10, 10, 11, 11, 12, 12, +13, 14, 15, 16, 17, 18, 19, + 0, 0, 0, 0, 0, 1, 1, 1, + 1, 1, 2, 2, 2, 3, 3, 4, + 4, 5, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 10, 10, 11, 11, 12, +12, 13, 13, 14, 15, 16, 17, 18, +19, 20, 21, 22, 23, 24, 25, 26, +27, 28, 29, 30, 31, 32, 33, 34, +35, 36, 37, 38, 39, 40, 41, 42, +43, 44, +}; + +static const int8_t intra_rvlc_level[169]={ + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, +17, 18, 19, 20, 21, 22, 23, 24, +25, 26, 27, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 1, 2, 3, 4, + 5, 6, 1, 2, 3, 4, 5, 6, + 1, 2, 3, 4, 5, 1, 2, 3, + 4, 5, 1, 2, 3, 4, 1, 2, + 3, 4, 1, 2, 1, 2, 1, 2, + 1, 1, 1, 1, 1, 1, 1, + 1, 2, 3, 4, 5, 1, 2, 3, + 4, 5, 1, 2, 3, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 2, 1, 2, 1, + 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, +}; + +RLTable ff_rvlc_rl_intra = { + 169, + 103, + intra_rvlc, + intra_rvlc_run, + intra_rvlc_level, +}; + +const uint16_t ff_sprite_trajectory_tab[15][2] = { + {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, + {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, + {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, +}; + +const uint8_t ff_mb_type_b_tab[4][2] = { + {1, 1}, {1, 2}, {1, 3}, {1, 4}, +}; + +/* these matrixes will be permuted for the idct */ +const int16_t ff_mpeg4_default_intra_matrix[64] = { + 8, 17, 18, 19, 21, 23, 25, 27, + 17, 18, 19, 21, 23, 25, 27, 28, + 20, 21, 22, 23, 24, 26, 28, 30, + 21, 22, 23, 24, 26, 28, 30, 32, + 22, 23, 24, 26, 28, 30, 32, 35, + 23, 24, 26, 28, 30, 32, 35, 38, + 25, 26, 28, 30, 32, 35, 38, 41, + 27, 28, 30, 32, 35, 38, 41, 45, +}; + +const int16_t ff_mpeg4_default_non_intra_matrix[64] = { + 16, 17, 18, 19, 20, 21, 22, 23, + 17, 18, 19, 20, 21, 22, 23, 24, + 18, 19, 20, 21, 22, 23, 24, 25, + 19, 20, 21, 22, 23, 24, 26, 27, + 20, 21, 22, 23, 25, 26, 27, 28, + 21, 22, 23, 24, 26, 27, 28, 30, + 22, 23, 24, 26, 27, 28, 30, 31, + 23, 24, 25, 27, 28, 30, 31, 33, +}; + +const uint8_t ff_mpeg4_y_dc_scale_table[32]={ +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46 +}; +const uint8_t ff_mpeg4_c_dc_scale_table[32]={ +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25 +}; + +const uint16_t ff_mpeg4_resync_prefix[8]={ + 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 +}; + +const uint8_t ff_mpeg4_dc_threshold[8]={ + 99, 13, 15, 17, 19, 21, 23, 0 +}; + +/* Note these are different in studio mode */ +const uint16_t ff_mpeg4_studio_dc_luma[19][2]={ + {0x0e, 6}, {0x06, 5}, {0x00, 4}, {0x02, 4}, + {0x07, 3}, {0x05, 3}, {0x03, 3}, {0x02, 3}, + {0x04, 3}, {0x06, 3}, {0x01, 4}, {0x1e, 7}, + {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11}, + {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13} +}; + +const uint16_t ff_mpeg4_studio_dc_chroma[19][2]={ + {0x00, 4}, {0x02, 4}, {0x07, 3}, {0x05, 3}, + {0x03, 3}, {0x02, 3}, {0x04, 3}, {0x06, 3}, + {0x01, 4}, {0x06, 5}, {0x0e, 6}, {0x1e, 7}, + {0x3e, 8}, {0x7e, 9}, {0xfe, 10}, {0x1fe, 11}, + {0x3fe, 12}, {0x7fe, 13}, {0x7ff, 13} +}; + +const uint16_t ff_mpeg4_studio_intra[12][22][2]={ + { + {0x05, 4}, {0x04, 4}, {0x05, 7}, {0x09, 9}, + {0x21, 11}, {0x41, 12}, {0x81, 13}, {0x03, 4}, + {0x03, 5}, {0x05, 6}, {0x04, 7}, {0x03, 7}, + {0x05, 8}, {0x03, 2}, {0x05, 3}, {0x04, 3}, + {0x03, 3}, {0x02, 4}, {0x04, 6}, {0x03, 6}, + {0x11, 10}, {0x80, 13} + }, + { + {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, + {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, + {0x00, 0}, {0x00, 0}, {0x00, 0}, {0x00, 0}, + {0x00, 0}, {0x00, 0}, {0x01, 1}, {0x01, 2}, + {0x01, 3}, {0x01, 4}, {0x01, 5}, {0x03, 7}, + {0x05, 8}, {0x04, 8} + }, + { + {0x05, 3}, {0x03, 5}, {0x02, 5}, {0x03, 7}, + {0x09, 9}, {0x103, 14}, {0x102, 14}, {0x04, 3}, + {0x03, 3}, {0x03, 4}, {0x02, 4}, {0x03, 6}, + {0x11, 10}, {0x03, 2}, {0x02, 3}, {0x02, 6}, + {0x05, 8}, {0x21, 11}, {0x83, 13}, {0x101, 14}, + {0x201, 15}, {0x82, 13} + }, + { + {0x05, 5}, {0x05, 4}, {0x04, 5}, {0x03, 6}, + {0x09, 9}, {0x83, 13}, {0x82, 13}, {0x03, 3}, + {0x04, 4}, {0x03, 4}, {0x03, 5}, {0x05, 8}, + {0x81, 13}, {0x03, 2}, {0x02, 2}, {0x02, 5}, + {0x02, 6}, {0x03, 7}, {0x11, 10}, {0x43, 12}, + {0x80, 13}, {0x42, 12} + }, + { + {0x05, 7}, {0x03, 4}, {0x03, 5}, {0x04, 7}, + {0x09, 9}, {0x83, 13}, {0x101, 14}, {0x03, 3}, + {0x02, 4}, {0x05, 6}, {0x03, 7}, {0x11, 10}, + {0x201, 15}, {0x03, 2}, {0x02, 2}, {0x02, 3}, + {0x04, 6}, {0x03, 6}, {0x05, 8}, {0x21, 11}, + {0x82, 13}, {0x81, 13} + }, + { + {0x13, 10}, {0x03, 5}, {0x05, 7}, {0x12, 10}, + {0x43, 12}, {0x83, 13}, {0x82, 13}, {0x02, 5}, + {0x04, 7}, {0x05, 8}, {0x23, 11}, {0x81, 13}, + {0x101, 14}, {0x03, 2}, {0x02, 2}, {0x01, 2}, + {0x01, 3}, {0x03, 6}, {0x03, 7}, {0x22, 11}, + {0x201, 15}, {0x42, 12} + }, + { + {0x23, 11}, {0x01, 4}, {0x07, 8}, {0x13, 10}, + {0x22, 11}, {0x103, 14}, {0x102, 14}, {0x03, 6}, + {0x06, 8}, {0x12, 10}, {0x43, 12}, {0x101, 14}, + {0x201, 15}, {0x03, 3}, {0x02, 3}, {0x03, 2}, + {0x02, 2}, {0x01, 3}, {0x02, 6}, {0x05, 8}, + {0x42, 12}, {0x41, 12} + }, + { + {0x0b, 9}, {0x03, 5}, {0x07, 8}, {0x07, 7}, + {0x06, 7}, {0x23, 11}, {0x41, 12}, {0x05, 7}, + {0x06, 8}, {0x0a, 9}, {0x13, 10}, {0x22, 11}, + {0x40, 12}, {0x03, 4}, {0x02, 4}, {0x03, 2}, + {0x02, 2}, {0x01, 2}, {0x02, 5}, {0x04, 7}, + {0x12, 10}, {0x21, 11} + }, + { + {0x15, 10}, {0x03, 6}, {0x14, 10}, {0x23, 11}, + {0x07, 8}, {0x43, 12}, {0x81, 13}, {0x06, 8}, + {0x0b, 9}, {0x13, 10}, {0x12, 10}, {0x42, 12}, + {0x80, 13}, {0x01, 4}, {0x03, 3}, {0x02, 3}, + {0x03, 2}, {0x02, 2}, {0x01, 3}, {0x02, 6}, + {0x22, 11}, {0x41, 12} + }, + { + {0x43, 12}, {0x05, 6}, {0x07, 8}, {0x04, 6}, + {0x03, 6}, {0x13, 10}, {0x42, 12}, {0x05, 7}, + {0x04, 7}, {0x06, 8}, {0x12, 10}, {0x41, 12}, + {0x40, 12}, {0x03, 5}, {0x03, 4}, {0x03, 3}, + {0x02, 3}, {0x03, 2}, {0x02, 2}, {0x02, 4}, + {0x05, 8}, {0x11, 10} + }, + { + {0x83, 13}, {0x05, 7}, {0x07, 8}, {0x03, 4}, + {0x21, 11}, {0x82, 13}, {0x81, 13}, {0x04, 7}, + {0x06, 8}, {0x0b, 9}, {0x0a, 9}, {0x11, 10}, + {0x80, 13}, {0x03, 5}, {0x02, 5}, {0x02, 4}, + {0x03, 3}, {0x02, 3}, {0x03, 2}, {0x02, 2}, + {0x03, 6}, {0x09, 9} + }, + { + {0x13, 10}, {0x03, 5}, {0x03, 6}, {0x0d, 9}, + {0x0c, 9}, {0x21, 11}, {0x20, 11}, {0x02, 5}, + {0x02, 6}, {0x07, 8}, {0x0b, 9}, {0x12, 10}, + {0x11, 10}, {0x05, 3}, {0x04, 3}, {0x05, 4}, + {0x04, 4}, {0x03, 4}, {0x02, 4}, {0x03, 3}, + {0x03, 2}, {0x0a, 9} + } +}; + +#endif /* AVCODEC_MPEG4DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video.h new file mode 100644 index 00000000..1a5da319 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video.h @@ -0,0 +1,279 @@ +/* + * MPEG-4 encoder/decoder internal header. + * Copyright (c) 2000,2001 Fabrice Bellard + * Copyright (c) 2002-2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEG4VIDEO_H +#define AVCODEC_MPEG4VIDEO_H + +#include + +#include "get_bits.h" +#include "mpegvideo.h" +#include "rl.h" + +// shapes +#define RECT_SHAPE 0 +#define BIN_SHAPE 1 +#define BIN_ONLY_SHAPE 2 +#define GRAY_SHAPE 3 + +#define SIMPLE_VO_TYPE 1 +#define CORE_VO_TYPE 3 +#define MAIN_VO_TYPE 4 +#define NBIT_VO_TYPE 5 +#define ARTS_VO_TYPE 10 +#define ACE_VO_TYPE 12 +#define SIMPLE_STUDIO_VO_TYPE 14 +#define CORE_STUDIO_VO_TYPE 15 +#define ADV_SIMPLE_VO_TYPE 17 + +#define VOT_VIDEO_ID 1 +#define VOT_STILL_TEXTURE_ID 2 + +// aspect_ratio_info +#define EXTENDED_PAR 15 + +//vol_sprite_usage / sprite_enable +#define STATIC_SPRITE 1 +#define GMC_SPRITE 2 + +#define MOTION_MARKER 0x1F001 +#define DC_MARKER 0x6B001 + +#define VOS_STARTCODE 0x1B0 +#define USER_DATA_STARTCODE 0x1B2 +#define GOP_STARTCODE 0x1B3 +#define VISUAL_OBJ_STARTCODE 0x1B5 +#define VOP_STARTCODE 0x1B6 +#define SLICE_STARTCODE 0x1B7 +#define EXT_STARTCODE 0x1B8 + +#define QUANT_MATRIX_EXT_ID 0x3 + +/* smaller packets likely don't contain a real frame */ +#define MAX_NVOP_SIZE 19 + +typedef struct Mpeg4DecContext { + MpegEncContext m; + + /// number of bits to represent the fractional part of time + int time_increment_bits; + int shape; + int vol_sprite_usage; + int sprite_brightness_change; + int num_sprite_warping_points; + /// sprite trajectory points + uint16_t sprite_traj[4][2]; + /// sprite shift [isChroma] + int sprite_shift[2]; + + // reversible vlc + int rvlc; + /// could this stream contain resync markers + int resync_marker; + /// time distance of first I -> B, used for interlaced B-frames + int t_frame; + + int new_pred; + int enhancement_type; + int scalability; + int use_intra_dc_vlc; + + /// QP above which the ac VLC should be used for intra dc + int intra_dc_threshold; + + /* bug workarounds */ + int divx_version; + int divx_build; + int xvid_build; + int lavc_build; + + /// flag for having shown the warning about invalid Divx B-frames + int showed_packed_warning; + /** does the stream contain the low_delay flag, + * used to work around buggy encoders. */ + int vol_control_parameters; + int cplx_estimation_trash_i; + int cplx_estimation_trash_p; + int cplx_estimation_trash_b; + + VLC studio_intra_tab[12]; + VLC studio_luma_dc; + VLC studio_chroma_dc; + + int rgb; +} Mpeg4DecContext; + +static const uint8_t mpeg4_block_count[4] = {0, 6, 8, 12}; + +/* dc encoding for MPEG-4 */ +extern const uint8_t ff_mpeg4_DCtab_lum[13][2]; +extern const uint8_t ff_mpeg4_DCtab_chrom[13][2]; + +extern const uint16_t ff_mpeg4_intra_vlc[103][2]; +extern const int8_t ff_mpeg4_intra_level[102]; +extern const int8_t ff_mpeg4_intra_run[102]; + +extern RLTable ff_mpeg4_rl_intra; + +/* Note this is identical to the intra rvlc except that it is reordered. */ +extern RLTable ff_rvlc_rl_inter; +extern RLTable ff_rvlc_rl_intra; + +extern const uint16_t ff_sprite_trajectory_tab[15][2]; +extern const uint8_t ff_mb_type_b_tab[4][2]; + +/* these matrixes will be permuted for the idct */ +extern const int16_t ff_mpeg4_default_intra_matrix[64]; +extern const int16_t ff_mpeg4_default_non_intra_matrix[64]; + +extern const uint8_t ff_mpeg4_y_dc_scale_table[32]; +extern const uint8_t ff_mpeg4_c_dc_scale_table[32]; +extern const uint16_t ff_mpeg4_resync_prefix[8]; + +extern const uint8_t ff_mpeg4_dc_threshold[8]; + +extern const uint16_t ff_mpeg4_studio_dc_luma[19][2]; +extern const uint16_t ff_mpeg4_studio_dc_chroma[19][2]; +extern const uint16_t ff_mpeg4_studio_intra[12][22][2]; + +void ff_mpeg4_encode_mb(MpegEncContext *s, + int16_t block[6][64], + int motion_x, int motion_y); +void ff_mpeg4_pred_ac(MpegEncContext *s, int16_t *block, int n, + int dir); +void ff_set_mpeg4_time(MpegEncContext *s); +int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number); + +int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb, int header); +void ff_mpeg4_encode_video_packet_header(MpegEncContext *s); +void ff_mpeg4_clean_buffers(MpegEncContext *s); +void ff_mpeg4_stuffing(PutBitContext *pbc); +void ff_mpeg4_init_partitions(MpegEncContext *s); +void ff_mpeg4_merge_partitions(MpegEncContext *s); +void ff_clean_mpeg4_qscales(MpegEncContext *s); +int ff_mpeg4_decode_partitions(Mpeg4DecContext *ctx); +int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s); +int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx); +int ff_mpeg4_decode_studio_slice_header(Mpeg4DecContext *ctx); +void ff_mpeg4_init_direct_mv(MpegEncContext *s); +void ff_mpeg4videodec_static_init(void); +int ff_mpeg4_workaround_bugs(AVCodecContext *avctx); +int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size); + +/** + * @return the mb_type + */ +int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my); + +extern uint8_t ff_mpeg4_static_rl_table_store[3][2][2 * MAX_RUN + MAX_LEVEL + 3]; + +#if 0 //3IV1 is quite rare and it slows things down a tiny bit +#define IS_3IV1 s->codec_tag == AV_RL32("3IV1") +#else +#define IS_3IV1 0 +#endif + +/** + * Predict the dc. + * encoding quantized level -> quantized diff + * decoding quantized diff -> quantized level + * @param n block index (0-3 are luma, 4-5 are chroma) + * @param dir_ptr pointer to an integer where the prediction direction will be stored + */ +static inline int ff_mpeg4_pred_dc(MpegEncContext *s, int n, int level, + int *dir_ptr, int encoding) +{ + int a, b, c, wrap, pred, scale, ret; + int16_t *dc_val; + + /* find prediction */ + if (n < 4) + scale = s->y_dc_scale; + else + scale = s->c_dc_scale; + if (IS_3IV1) + scale = 8; + + wrap = s->block_wrap[n]; + dc_val = s->dc_val[0] + s->block_index[n]; + + /* B C + * A X + */ + a = dc_val[-1]; + b = dc_val[-1 - wrap]; + c = dc_val[-wrap]; + + /* outside slice handling (we can't do that by memset as we need the + * dc for error resilience) */ + if (s->first_slice_line && n != 3) { + if (n != 2) + b = c = 1024; + if (n != 1 && s->mb_x == s->resync_mb_x) + b = a = 1024; + } + if (s->mb_x == s->resync_mb_x && s->mb_y == s->resync_mb_y + 1) { + if (n == 0 || n == 4 || n == 5) + b = 1024; + } + + if (abs(a - b) < abs(b - c)) { + pred = c; + *dir_ptr = 1; /* top */ + } else { + pred = a; + *dir_ptr = 0; /* left */ + } + /* we assume pred is positive */ + pred = FASTDIV((pred + (scale >> 1)), scale); + + if (encoding) { + ret = level - pred; + } else { + level += pred; + ret = level; + } + level *= scale; + if (level & (~2047)) { + if (!s->encoding && (s->avctx->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE))) { + if (level < 0) { + av_log(s->avctx, AV_LOG_ERROR, + "dc<0 at %dx%d\n", s->mb_x, s->mb_y); + return AVERROR_INVALIDDATA; + } + if (level > 2048 + scale) { + av_log(s->avctx, AV_LOG_ERROR, + "dc overflow at %dx%d\n", s->mb_x, s->mb_y); + return AVERROR_INVALIDDATA; + } + } + if (level < 0) + level = 0; + else if (!(s->workaround_bugs & FF_BUG_DC_CLIP)) + level = 2047; + } + dc_val[0] = level; + + return ret; +} + +#endif /* AVCODEC_MPEG4VIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video_parser.h new file mode 100644 index 00000000..8008e693 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg4video_parser.h @@ -0,0 +1,34 @@ +/* + * MPEG-4 video parser prototypes + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEG4VIDEO_PARSER_H +#define AVCODEC_MPEG4VIDEO_PARSER_H + +#include "parser.h" + +/** + * Find the end of the current frame in the bitstream. + * @return the position of the first byte of the next frame, or -1 + */ +int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size); + +#endif /* AVCODEC_MPEG4VIDEO_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg_er.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg_er.h new file mode 100644 index 00000000..bb627a4d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpeg_er.h @@ -0,0 +1,27 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEG_ER_H +#define AVCODEC_MPEG_ER_H + +#include "mpegvideo.h" + +int ff_mpeg_er_init(MpegEncContext *s); +void ff_mpeg_er_frame_start(MpegEncContext *s); + +#endif /* AVCODEC_MPEG_ER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio.h new file mode 100644 index 00000000..74590a8e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio.h @@ -0,0 +1,81 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * mpeg audio declarations for both encoder and decoder. + */ + +#ifndef AVCODEC_MPEGAUDIO_H +#define AVCODEC_MPEGAUDIO_H + +#ifndef USE_FLOATS +# define USE_FLOATS 0 +#endif + +#include +#include "libavutil/internal.h" + +/* max frame size, in samples */ +#define MPA_FRAME_SIZE 1152 + +/* max compressed frame size */ +#define MPA_MAX_CODED_FRAME_SIZE 1792 + +#define MPA_MAX_CHANNELS 2 + +#define SBLIMIT 32 /* number of subbands */ + +#define MPA_STEREO 0 +#define MPA_JSTEREO 1 +#define MPA_DUAL 2 +#define MPA_MONO 3 + +#ifndef FRAC_BITS +#define FRAC_BITS 23 /* fractional bits for sb_samples and dct */ +#define WFRAC_BITS 16 /* fractional bits for window */ +#endif + +#define IMDCT_SCALAR 1.759 + +#define FRAC_ONE (1 << FRAC_BITS) + +#define FIX(a) ((int)((a) * FRAC_ONE)) + +#if USE_FLOATS +# define INTFLOAT float +# define SUINTFLOAT float +typedef float MPA_INT; +typedef float OUT_INT; +#elif FRAC_BITS <= 15 +# define INTFLOAT int +# define SUINTFLOAT SUINT +typedef int16_t MPA_INT; +typedef int16_t OUT_INT; +#else +# define INTFLOAT int +# define SUINTFLOAT SUINT +typedef int32_t MPA_INT; +typedef int16_t OUT_INT; +#endif + +int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf); + +#endif /* AVCODEC_MPEGAUDIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio_tablegen.h new file mode 100644 index 00000000..0b0ea406 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudio_tablegen.h @@ -0,0 +1,91 @@ +/* + * Header file for hardcoded mpegaudiodec tables + * + * Copyright (c) 2009 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGAUDIO_TABLEGEN_H +#define AVCODEC_MPEGAUDIO_TABLEGEN_H + +#include +#include +#include "libavutil/attributes.h" + +#define TABLE_4_3_SIZE (8191 + 16)*4 +#if CONFIG_HARDCODED_TABLES +#define mpegaudio_tableinit() +#include "libavcodec/mpegaudio_tables.h" +#else +static int8_t table_4_3_exp[TABLE_4_3_SIZE]; +static uint32_t table_4_3_value[TABLE_4_3_SIZE]; +static uint32_t exp_table_fixed[512]; +static uint32_t expval_table_fixed[512][16]; +static float exp_table_float[512]; +static float expval_table_float[512][16]; + +#define FRAC_BITS 23 +#define IMDCT_SCALAR 1.759 + +static av_cold void mpegaudio_tableinit(void) +{ + int i, value, exponent; + static const double exp2_lut[4] = { + 1.00000000000000000000, /* 2 ^ (0 * 0.25) */ + 1.18920711500272106672, /* 2 ^ (1 * 0.25) */ + M_SQRT2 , /* 2 ^ (2 * 0.25) */ + 1.68179283050742908606, /* 2 ^ (3 * 0.25) */ + }; + static double pow43_lut[16]; + double exp2_base = 2.11758236813575084767080625169910490512847900390625e-22; // 2^(-72) + double exp2_val; + double pow43_val = 0; + for (i = 0; i < 16; ++i) + pow43_lut[i] = i * cbrt(i); + + for (i = 1; i < TABLE_4_3_SIZE; i++) { + double f, fm; + int e, m; + double value = i / 4; + if ((i & 3) == 0) + pow43_val = value / IMDCT_SCALAR * cbrt(value); + f = pow43_val * exp2_lut[i & 3]; + fm = frexp(f, &e); + m = llrint(fm * (1LL << 31)); + e += FRAC_BITS - 31 + 5 - 100; + + /* normalized to FRAC_BITS */ + table_4_3_value[i] = m; + table_4_3_exp[i] = -e; + } + for (exponent = 0; exponent < 512; exponent++) { + if (exponent && (exponent & 3) == 0) + exp2_base *= 2; + exp2_val = exp2_base * exp2_lut[exponent & 3] / IMDCT_SCALAR; + for (value = 0; value < 16; value++) { + double f = pow43_lut[value] * exp2_val; + expval_table_fixed[exponent][value] = (f < 0xFFFFFFFF ? llrint(f) : 0xFFFFFFFF); + expval_table_float[exponent][value] = f; + } + exp_table_fixed[exponent] = expval_table_fixed[exponent][1]; + exp_table_float[exponent] = expval_table_float[exponent][1]; + } +} +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_MPEGAUDIO_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodata.h new file mode 100644 index 00000000..a188150c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodata.h @@ -0,0 +1,44 @@ +/* + * MPEG Audio common tables + * copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * mpeg audio layer common tables. + */ + +#ifndef AVCODEC_MPEGAUDIODATA_H +#define AVCODEC_MPEGAUDIODATA_H + +#include + +#include "internal.h" + +#define MODE_EXT_MS_STEREO 2 +#define MODE_EXT_I_STEREO 1 + +extern av_export_avcodec const uint16_t avpriv_mpa_bitrate_tab[2][3][15]; +extern av_export_avcodec const uint16_t avpriv_mpa_freq_tab[3]; +extern const int ff_mpa_sblimit_table[5]; +extern const int ff_mpa_quant_steps[17]; +extern const int ff_mpa_quant_bits[17]; +extern const unsigned char * const ff_mpa_alloc_tables[5]; + +#endif /* AVCODEC_MPEGAUDIODATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodecheader.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodecheader.h new file mode 100644 index 00000000..1da2a4cb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodecheader.h @@ -0,0 +1,80 @@ +/* + * MPEG Audio header decoder + * Copyright (c) 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MPEG Audio header decoder. + */ + +#ifndef AVCODEC_MPEGAUDIODECHEADER_H +#define AVCODEC_MPEGAUDIODECHEADER_H + +#include "avcodec.h" + +#define MP3_MASK 0xFFFE0CCF + +#define MPA_DECODE_HEADER \ + int frame_size; \ + int error_protection; \ + int layer; \ + int sample_rate; \ + int sample_rate_index; /* between 0 and 8 */ \ + int bit_rate; \ + int nb_channels; \ + int mode; \ + int mode_ext; \ + int lsf; + +typedef struct MPADecodeHeader { + MPA_DECODE_HEADER +} MPADecodeHeader; + +/* header decoding. MUST check the header before because no + consistency check is done there. Return 1 if free format found and + that the frame size must be computed externally */ +int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header); + +/* useful helper to get MPEG audio stream info. Return -1 if error in + header, otherwise the coded frame size in bytes */ +int ff_mpa_decode_header(uint32_t head, int *sample_rate, + int *channels, int *frame_size, int *bitrate, enum AVCodecID *codec_id); + +/* fast header check for resync */ +static inline int ff_mpa_check_header(uint32_t header){ + /* header */ + if ((header & 0xffe00000) != 0xffe00000) + return -1; + /* version check */ + if ((header & (3<<19)) == 1<<19) + return -1; + /* layer check */ + if ((header & (3<<17)) == 0) + return -1; + /* bit rate */ + if ((header & (0xf<<12)) == 0xf<<12) + return -1; + /* frequency */ + if ((header & (3<<10)) == 3<<10) + return -1; + return 0; +} + +#endif /* AVCODEC_MPEGAUDIODECHEADER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodectab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodectab.h new file mode 100644 index 00000000..accd12b8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodectab.h @@ -0,0 +1,615 @@ +/* + * MPEG Audio decoder + * copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * mpeg audio layer decoder tables. + */ + +#ifndef AVCODEC_MPEGAUDIODECTAB_H +#define AVCODEC_MPEGAUDIODECTAB_H + +#include +#include + +#include "mpegaudio.h" + +/*******************************************************/ +/* layer 3 tables */ + +/* layer 3 huffman tables */ +typedef struct HuffTable { + int xsize; + const uint8_t *bits; + const uint16_t *codes; +} HuffTable; + +/* layer3 scale factor size */ +static const uint8_t slen_table[2][16] = { + { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }, + { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }, +}; + +/* number of lsf scale factors for a given size */ +static const uint8_t lsf_nsf_table[6][3][4] = { + { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } }, + { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } }, + { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } }, + { { 7, 7, 7, 0 }, { 12, 12, 12, 0 }, { 6, 15, 12, 0 } }, + { { 6, 6, 6, 3 }, { 12, 9, 9, 6 }, { 6, 12, 9, 6 } }, + { { 8, 8, 5, 0 }, { 15, 12, 9, 0 }, { 6, 18, 9, 0 } }, +}; + +/* mpegaudio layer 3 huffman tables */ + +static const uint16_t mpa_huffcodes_1[4] = { + 0x0001, 0x0001, 0x0001, 0x0000, +}; + +static const uint8_t mpa_huffbits_1[4] = { + 1, 3, 2, 3, +}; + +static const uint16_t mpa_huffcodes_2[9] = { + 0x0001, 0x0002, 0x0001, 0x0003, 0x0001, 0x0001, 0x0003, 0x0002, + 0x0000, +}; + +static const uint8_t mpa_huffbits_2[9] = { + 1, 3, 6, 3, 3, 5, 5, 5, + 6, +}; + +static const uint16_t mpa_huffcodes_3[9] = { + 0x0003, 0x0002, 0x0001, 0x0001, 0x0001, 0x0001, 0x0003, 0x0002, + 0x0000, +}; + +static const uint8_t mpa_huffbits_3[9] = { + 2, 2, 6, 3, 2, 5, 5, 5, + 6, +}; + +static const uint16_t mpa_huffcodes_5[16] = { + 0x0001, 0x0002, 0x0006, 0x0005, 0x0003, 0x0001, 0x0004, 0x0004, + 0x0007, 0x0005, 0x0007, 0x0001, 0x0006, 0x0001, 0x0001, 0x0000, +}; + +static const uint8_t mpa_huffbits_5[16] = { + 1, 3, 6, 7, 3, 3, 6, 7, + 6, 6, 7, 8, 7, 6, 7, 8, +}; + +static const uint16_t mpa_huffcodes_6[16] = { + 0x0007, 0x0003, 0x0005, 0x0001, 0x0006, 0x0002, 0x0003, 0x0002, + 0x0005, 0x0004, 0x0004, 0x0001, 0x0003, 0x0003, 0x0002, 0x0000, +}; + +static const uint8_t mpa_huffbits_6[16] = { + 3, 3, 5, 7, 3, 2, 4, 5, + 4, 4, 5, 6, 6, 5, 6, 7, +}; + +static const uint16_t mpa_huffcodes_7[36] = { + 0x0001, 0x0002, 0x000a, 0x0013, 0x0010, 0x000a, 0x0003, 0x0003, + 0x0007, 0x000a, 0x0005, 0x0003, 0x000b, 0x0004, 0x000d, 0x0011, + 0x0008, 0x0004, 0x000c, 0x000b, 0x0012, 0x000f, 0x000b, 0x0002, + 0x0007, 0x0006, 0x0009, 0x000e, 0x0003, 0x0001, 0x0006, 0x0004, + 0x0005, 0x0003, 0x0002, 0x0000, +}; + +static const uint8_t mpa_huffbits_7[36] = { + 1, 3, 6, 8, 8, 9, 3, 4, + 6, 7, 7, 8, 6, 5, 7, 8, + 8, 9, 7, 7, 8, 9, 9, 9, + 7, 7, 8, 9, 9, 10, 8, 8, + 9, 10, 10, 10, +}; + +static const uint16_t mpa_huffcodes_8[36] = { + 0x0003, 0x0004, 0x0006, 0x0012, 0x000c, 0x0005, 0x0005, 0x0001, + 0x0002, 0x0010, 0x0009, 0x0003, 0x0007, 0x0003, 0x0005, 0x000e, + 0x0007, 0x0003, 0x0013, 0x0011, 0x000f, 0x000d, 0x000a, 0x0004, + 0x000d, 0x0005, 0x0008, 0x000b, 0x0005, 0x0001, 0x000c, 0x0004, + 0x0004, 0x0001, 0x0001, 0x0000, +}; + +static const uint8_t mpa_huffbits_8[36] = { + 2, 3, 6, 8, 8, 9, 3, 2, + 4, 8, 8, 8, 6, 4, 6, 8, + 8, 9, 8, 8, 8, 9, 9, 10, + 8, 7, 8, 9, 10, 10, 9, 8, + 9, 9, 11, 11, +}; + +static const uint16_t mpa_huffcodes_9[36] = { + 0x0007, 0x0005, 0x0009, 0x000e, 0x000f, 0x0007, 0x0006, 0x0004, + 0x0005, 0x0005, 0x0006, 0x0007, 0x0007, 0x0006, 0x0008, 0x0008, + 0x0008, 0x0005, 0x000f, 0x0006, 0x0009, 0x000a, 0x0005, 0x0001, + 0x000b, 0x0007, 0x0009, 0x0006, 0x0004, 0x0001, 0x000e, 0x0004, + 0x0006, 0x0002, 0x0006, 0x0000, +}; + +static const uint8_t mpa_huffbits_9[36] = { + 3, 3, 5, 6, 8, 9, 3, 3, + 4, 5, 6, 8, 4, 4, 5, 6, + 7, 8, 6, 5, 6, 7, 7, 8, + 7, 6, 7, 7, 8, 9, 8, 7, + 8, 8, 9, 9, +}; + +static const uint16_t mpa_huffcodes_10[64] = { + 0x0001, 0x0002, 0x000a, 0x0017, 0x0023, 0x001e, 0x000c, 0x0011, + 0x0003, 0x0003, 0x0008, 0x000c, 0x0012, 0x0015, 0x000c, 0x0007, + 0x000b, 0x0009, 0x000f, 0x0015, 0x0020, 0x0028, 0x0013, 0x0006, + 0x000e, 0x000d, 0x0016, 0x0022, 0x002e, 0x0017, 0x0012, 0x0007, + 0x0014, 0x0013, 0x0021, 0x002f, 0x001b, 0x0016, 0x0009, 0x0003, + 0x001f, 0x0016, 0x0029, 0x001a, 0x0015, 0x0014, 0x0005, 0x0003, + 0x000e, 0x000d, 0x000a, 0x000b, 0x0010, 0x0006, 0x0005, 0x0001, + 0x0009, 0x0008, 0x0007, 0x0008, 0x0004, 0x0004, 0x0002, 0x0000, +}; + +static const uint8_t mpa_huffbits_10[64] = { + 1, 3, 6, 8, 9, 9, 9, 10, + 3, 4, 6, 7, 8, 9, 8, 8, + 6, 6, 7, 8, 9, 10, 9, 9, + 7, 7, 8, 9, 10, 10, 9, 10, + 8, 8, 9, 10, 10, 10, 10, 10, + 9, 9, 10, 10, 11, 11, 10, 11, + 8, 8, 9, 10, 10, 10, 11, 11, + 9, 8, 9, 10, 10, 11, 11, 11, +}; + +static const uint16_t mpa_huffcodes_11[64] = { + 0x0003, 0x0004, 0x000a, 0x0018, 0x0022, 0x0021, 0x0015, 0x000f, + 0x0005, 0x0003, 0x0004, 0x000a, 0x0020, 0x0011, 0x000b, 0x000a, + 0x000b, 0x0007, 0x000d, 0x0012, 0x001e, 0x001f, 0x0014, 0x0005, + 0x0019, 0x000b, 0x0013, 0x003b, 0x001b, 0x0012, 0x000c, 0x0005, + 0x0023, 0x0021, 0x001f, 0x003a, 0x001e, 0x0010, 0x0007, 0x0005, + 0x001c, 0x001a, 0x0020, 0x0013, 0x0011, 0x000f, 0x0008, 0x000e, + 0x000e, 0x000c, 0x0009, 0x000d, 0x000e, 0x0009, 0x0004, 0x0001, + 0x000b, 0x0004, 0x0006, 0x0006, 0x0006, 0x0003, 0x0002, 0x0000, +}; + +static const uint8_t mpa_huffbits_11[64] = { + 2, 3, 5, 7, 8, 9, 8, 9, + 3, 3, 4, 6, 8, 8, 7, 8, + 5, 5, 6, 7, 8, 9, 8, 8, + 7, 6, 7, 9, 8, 10, 8, 9, + 8, 8, 8, 9, 9, 10, 9, 10, + 8, 8, 9, 10, 10, 11, 10, 11, + 8, 7, 7, 8, 9, 10, 10, 10, + 8, 7, 8, 9, 10, 10, 10, 10, +}; + +static const uint16_t mpa_huffcodes_12[64] = { + 0x0009, 0x0006, 0x0010, 0x0021, 0x0029, 0x0027, 0x0026, 0x001a, + 0x0007, 0x0005, 0x0006, 0x0009, 0x0017, 0x0010, 0x001a, 0x000b, + 0x0011, 0x0007, 0x000b, 0x000e, 0x0015, 0x001e, 0x000a, 0x0007, + 0x0011, 0x000a, 0x000f, 0x000c, 0x0012, 0x001c, 0x000e, 0x0005, + 0x0020, 0x000d, 0x0016, 0x0013, 0x0012, 0x0010, 0x0009, 0x0005, + 0x0028, 0x0011, 0x001f, 0x001d, 0x0011, 0x000d, 0x0004, 0x0002, + 0x001b, 0x000c, 0x000b, 0x000f, 0x000a, 0x0007, 0x0004, 0x0001, + 0x001b, 0x000c, 0x0008, 0x000c, 0x0006, 0x0003, 0x0001, 0x0000, +}; + +static const uint8_t mpa_huffbits_12[64] = { + 4, 3, 5, 7, 8, 9, 9, 9, + 3, 3, 4, 5, 7, 7, 8, 8, + 5, 4, 5, 6, 7, 8, 7, 8, + 6, 5, 6, 6, 7, 8, 8, 8, + 7, 6, 7, 7, 8, 8, 8, 9, + 8, 7, 8, 8, 8, 9, 8, 9, + 8, 7, 7, 8, 8, 9, 9, 10, + 9, 8, 8, 9, 9, 9, 9, 10, +}; + +static const uint16_t mpa_huffcodes_13[256] = { + 0x0001, 0x0005, 0x000e, 0x0015, 0x0022, 0x0033, 0x002e, 0x0047, + 0x002a, 0x0034, 0x0044, 0x0034, 0x0043, 0x002c, 0x002b, 0x0013, + 0x0003, 0x0004, 0x000c, 0x0013, 0x001f, 0x001a, 0x002c, 0x0021, + 0x001f, 0x0018, 0x0020, 0x0018, 0x001f, 0x0023, 0x0016, 0x000e, + 0x000f, 0x000d, 0x0017, 0x0024, 0x003b, 0x0031, 0x004d, 0x0041, + 0x001d, 0x0028, 0x001e, 0x0028, 0x001b, 0x0021, 0x002a, 0x0010, + 0x0016, 0x0014, 0x0025, 0x003d, 0x0038, 0x004f, 0x0049, 0x0040, + 0x002b, 0x004c, 0x0038, 0x0025, 0x001a, 0x001f, 0x0019, 0x000e, + 0x0023, 0x0010, 0x003c, 0x0039, 0x0061, 0x004b, 0x0072, 0x005b, + 0x0036, 0x0049, 0x0037, 0x0029, 0x0030, 0x0035, 0x0017, 0x0018, + 0x003a, 0x001b, 0x0032, 0x0060, 0x004c, 0x0046, 0x005d, 0x0054, + 0x004d, 0x003a, 0x004f, 0x001d, 0x004a, 0x0031, 0x0029, 0x0011, + 0x002f, 0x002d, 0x004e, 0x004a, 0x0073, 0x005e, 0x005a, 0x004f, + 0x0045, 0x0053, 0x0047, 0x0032, 0x003b, 0x0026, 0x0024, 0x000f, + 0x0048, 0x0022, 0x0038, 0x005f, 0x005c, 0x0055, 0x005b, 0x005a, + 0x0056, 0x0049, 0x004d, 0x0041, 0x0033, 0x002c, 0x002b, 0x002a, + 0x002b, 0x0014, 0x001e, 0x002c, 0x0037, 0x004e, 0x0048, 0x0057, + 0x004e, 0x003d, 0x002e, 0x0036, 0x0025, 0x001e, 0x0014, 0x0010, + 0x0035, 0x0019, 0x0029, 0x0025, 0x002c, 0x003b, 0x0036, 0x0051, + 0x0042, 0x004c, 0x0039, 0x0036, 0x0025, 0x0012, 0x0027, 0x000b, + 0x0023, 0x0021, 0x001f, 0x0039, 0x002a, 0x0052, 0x0048, 0x0050, + 0x002f, 0x003a, 0x0037, 0x0015, 0x0016, 0x001a, 0x0026, 0x0016, + 0x0035, 0x0019, 0x0017, 0x0026, 0x0046, 0x003c, 0x0033, 0x0024, + 0x0037, 0x001a, 0x0022, 0x0017, 0x001b, 0x000e, 0x0009, 0x0007, + 0x0022, 0x0020, 0x001c, 0x0027, 0x0031, 0x004b, 0x001e, 0x0034, + 0x0030, 0x0028, 0x0034, 0x001c, 0x0012, 0x0011, 0x0009, 0x0005, + 0x002d, 0x0015, 0x0022, 0x0040, 0x0038, 0x0032, 0x0031, 0x002d, + 0x001f, 0x0013, 0x000c, 0x000f, 0x000a, 0x0007, 0x0006, 0x0003, + 0x0030, 0x0017, 0x0014, 0x0027, 0x0024, 0x0023, 0x0035, 0x0015, + 0x0010, 0x0017, 0x000d, 0x000a, 0x0006, 0x0001, 0x0004, 0x0002, + 0x0010, 0x000f, 0x0011, 0x001b, 0x0019, 0x0014, 0x001d, 0x000b, + 0x0011, 0x000c, 0x0010, 0x0008, 0x0001, 0x0001, 0x0000, 0x0001, +}; + +static const uint8_t mpa_huffbits_13[256] = { + 1, 4, 6, 7, 8, 9, 9, 10, + 9, 10, 11, 11, 12, 12, 13, 13, + 3, 4, 6, 7, 8, 8, 9, 9, + 9, 9, 10, 10, 11, 12, 12, 12, + 6, 6, 7, 8, 9, 9, 10, 10, + 9, 10, 10, 11, 11, 12, 13, 13, + 7, 7, 8, 9, 9, 10, 10, 10, + 10, 11, 11, 11, 11, 12, 13, 13, + 8, 7, 9, 9, 10, 10, 11, 11, + 10, 11, 11, 12, 12, 13, 13, 14, + 9, 8, 9, 10, 10, 10, 11, 11, + 11, 11, 12, 11, 13, 13, 14, 14, + 9, 9, 10, 10, 11, 11, 11, 11, + 11, 12, 12, 12, 13, 13, 14, 14, + 10, 9, 10, 11, 11, 11, 12, 12, + 12, 12, 13, 13, 13, 14, 16, 16, + 9, 8, 9, 10, 10, 11, 11, 12, + 12, 12, 12, 13, 13, 14, 15, 15, + 10, 9, 10, 10, 11, 11, 11, 13, + 12, 13, 13, 14, 14, 14, 16, 15, + 10, 10, 10, 11, 11, 12, 12, 13, + 12, 13, 14, 13, 14, 15, 16, 17, + 11, 10, 10, 11, 12, 12, 12, 12, + 13, 13, 13, 14, 15, 15, 15, 16, + 11, 11, 11, 12, 12, 13, 12, 13, + 14, 14, 15, 15, 15, 16, 16, 16, + 12, 11, 12, 13, 13, 13, 14, 14, + 14, 14, 14, 15, 16, 15, 16, 16, + 13, 12, 12, 13, 13, 13, 15, 14, + 14, 17, 15, 15, 15, 17, 16, 16, + 12, 12, 13, 14, 14, 14, 15, 14, + 15, 15, 16, 16, 19, 18, 19, 16, +}; + +static const uint16_t mpa_huffcodes_15[256] = { + 0x0007, 0x000c, 0x0012, 0x0035, 0x002f, 0x004c, 0x007c, 0x006c, + 0x0059, 0x007b, 0x006c, 0x0077, 0x006b, 0x0051, 0x007a, 0x003f, + 0x000d, 0x0005, 0x0010, 0x001b, 0x002e, 0x0024, 0x003d, 0x0033, + 0x002a, 0x0046, 0x0034, 0x0053, 0x0041, 0x0029, 0x003b, 0x0024, + 0x0013, 0x0011, 0x000f, 0x0018, 0x0029, 0x0022, 0x003b, 0x0030, + 0x0028, 0x0040, 0x0032, 0x004e, 0x003e, 0x0050, 0x0038, 0x0021, + 0x001d, 0x001c, 0x0019, 0x002b, 0x0027, 0x003f, 0x0037, 0x005d, + 0x004c, 0x003b, 0x005d, 0x0048, 0x0036, 0x004b, 0x0032, 0x001d, + 0x0034, 0x0016, 0x002a, 0x0028, 0x0043, 0x0039, 0x005f, 0x004f, + 0x0048, 0x0039, 0x0059, 0x0045, 0x0031, 0x0042, 0x002e, 0x001b, + 0x004d, 0x0025, 0x0023, 0x0042, 0x003a, 0x0034, 0x005b, 0x004a, + 0x003e, 0x0030, 0x004f, 0x003f, 0x005a, 0x003e, 0x0028, 0x0026, + 0x007d, 0x0020, 0x003c, 0x0038, 0x0032, 0x005c, 0x004e, 0x0041, + 0x0037, 0x0057, 0x0047, 0x0033, 0x0049, 0x0033, 0x0046, 0x001e, + 0x006d, 0x0035, 0x0031, 0x005e, 0x0058, 0x004b, 0x0042, 0x007a, + 0x005b, 0x0049, 0x0038, 0x002a, 0x0040, 0x002c, 0x0015, 0x0019, + 0x005a, 0x002b, 0x0029, 0x004d, 0x0049, 0x003f, 0x0038, 0x005c, + 0x004d, 0x0042, 0x002f, 0x0043, 0x0030, 0x0035, 0x0024, 0x0014, + 0x0047, 0x0022, 0x0043, 0x003c, 0x003a, 0x0031, 0x0058, 0x004c, + 0x0043, 0x006a, 0x0047, 0x0036, 0x0026, 0x0027, 0x0017, 0x000f, + 0x006d, 0x0035, 0x0033, 0x002f, 0x005a, 0x0052, 0x003a, 0x0039, + 0x0030, 0x0048, 0x0039, 0x0029, 0x0017, 0x001b, 0x003e, 0x0009, + 0x0056, 0x002a, 0x0028, 0x0025, 0x0046, 0x0040, 0x0034, 0x002b, + 0x0046, 0x0037, 0x002a, 0x0019, 0x001d, 0x0012, 0x000b, 0x000b, + 0x0076, 0x0044, 0x001e, 0x0037, 0x0032, 0x002e, 0x004a, 0x0041, + 0x0031, 0x0027, 0x0018, 0x0010, 0x0016, 0x000d, 0x000e, 0x0007, + 0x005b, 0x002c, 0x0027, 0x0026, 0x0022, 0x003f, 0x0034, 0x002d, + 0x001f, 0x0034, 0x001c, 0x0013, 0x000e, 0x0008, 0x0009, 0x0003, + 0x007b, 0x003c, 0x003a, 0x0035, 0x002f, 0x002b, 0x0020, 0x0016, + 0x0025, 0x0018, 0x0011, 0x000c, 0x000f, 0x000a, 0x0002, 0x0001, + 0x0047, 0x0025, 0x0022, 0x001e, 0x001c, 0x0014, 0x0011, 0x001a, + 0x0015, 0x0010, 0x000a, 0x0006, 0x0008, 0x0006, 0x0002, 0x0000, +}; + +static const uint8_t mpa_huffbits_15[256] = { + 3, 4, 5, 7, 7, 8, 9, 9, + 9, 10, 10, 11, 11, 11, 12, 13, + 4, 3, 5, 6, 7, 7, 8, 8, + 8, 9, 9, 10, 10, 10, 11, 11, + 5, 5, 5, 6, 7, 7, 8, 8, + 8, 9, 9, 10, 10, 11, 11, 11, + 6, 6, 6, 7, 7, 8, 8, 9, + 9, 9, 10, 10, 10, 11, 11, 11, + 7, 6, 7, 7, 8, 8, 9, 9, + 9, 9, 10, 10, 10, 11, 11, 11, + 8, 7, 7, 8, 8, 8, 9, 9, + 9, 9, 10, 10, 11, 11, 11, 12, + 9, 7, 8, 8, 8, 9, 9, 9, + 9, 10, 10, 10, 11, 11, 12, 12, + 9, 8, 8, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 11, 11, 11, 12, + 9, 8, 8, 9, 9, 9, 9, 10, + 10, 10, 10, 11, 11, 12, 12, 12, + 9, 8, 9, 9, 9, 9, 10, 10, + 10, 11, 11, 11, 11, 12, 12, 12, + 10, 9, 9, 9, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 12, 13, 12, + 10, 9, 9, 9, 10, 10, 10, 10, + 11, 11, 11, 11, 12, 12, 12, 13, + 11, 10, 9, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 12, 12, 13, 13, + 11, 10, 10, 10, 10, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 13, 13, + 12, 11, 11, 11, 11, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 12, 13, + 12, 11, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 13, 13, 13, 13, +}; + +static const uint16_t mpa_huffcodes_16[256] = { + 0x0001, 0x0005, 0x000e, 0x002c, 0x004a, 0x003f, 0x006e, 0x005d, + 0x00ac, 0x0095, 0x008a, 0x00f2, 0x00e1, 0x00c3, 0x0178, 0x0011, + 0x0003, 0x0004, 0x000c, 0x0014, 0x0023, 0x003e, 0x0035, 0x002f, + 0x0053, 0x004b, 0x0044, 0x0077, 0x00c9, 0x006b, 0x00cf, 0x0009, + 0x000f, 0x000d, 0x0017, 0x0026, 0x0043, 0x003a, 0x0067, 0x005a, + 0x00a1, 0x0048, 0x007f, 0x0075, 0x006e, 0x00d1, 0x00ce, 0x0010, + 0x002d, 0x0015, 0x0027, 0x0045, 0x0040, 0x0072, 0x0063, 0x0057, + 0x009e, 0x008c, 0x00fc, 0x00d4, 0x00c7, 0x0183, 0x016d, 0x001a, + 0x004b, 0x0024, 0x0044, 0x0041, 0x0073, 0x0065, 0x00b3, 0x00a4, + 0x009b, 0x0108, 0x00f6, 0x00e2, 0x018b, 0x017e, 0x016a, 0x0009, + 0x0042, 0x001e, 0x003b, 0x0038, 0x0066, 0x00b9, 0x00ad, 0x0109, + 0x008e, 0x00fd, 0x00e8, 0x0190, 0x0184, 0x017a, 0x01bd, 0x0010, + 0x006f, 0x0036, 0x0034, 0x0064, 0x00b8, 0x00b2, 0x00a0, 0x0085, + 0x0101, 0x00f4, 0x00e4, 0x00d9, 0x0181, 0x016e, 0x02cb, 0x000a, + 0x0062, 0x0030, 0x005b, 0x0058, 0x00a5, 0x009d, 0x0094, 0x0105, + 0x00f8, 0x0197, 0x018d, 0x0174, 0x017c, 0x0379, 0x0374, 0x0008, + 0x0055, 0x0054, 0x0051, 0x009f, 0x009c, 0x008f, 0x0104, 0x00f9, + 0x01ab, 0x0191, 0x0188, 0x017f, 0x02d7, 0x02c9, 0x02c4, 0x0007, + 0x009a, 0x004c, 0x0049, 0x008d, 0x0083, 0x0100, 0x00f5, 0x01aa, + 0x0196, 0x018a, 0x0180, 0x02df, 0x0167, 0x02c6, 0x0160, 0x000b, + 0x008b, 0x0081, 0x0043, 0x007d, 0x00f7, 0x00e9, 0x00e5, 0x00db, + 0x0189, 0x02e7, 0x02e1, 0x02d0, 0x0375, 0x0372, 0x01b7, 0x0004, + 0x00f3, 0x0078, 0x0076, 0x0073, 0x00e3, 0x00df, 0x018c, 0x02ea, + 0x02e6, 0x02e0, 0x02d1, 0x02c8, 0x02c2, 0x00df, 0x01b4, 0x0006, + 0x00ca, 0x00e0, 0x00de, 0x00da, 0x00d8, 0x0185, 0x0182, 0x017d, + 0x016c, 0x0378, 0x01bb, 0x02c3, 0x01b8, 0x01b5, 0x06c0, 0x0004, + 0x02eb, 0x00d3, 0x00d2, 0x00d0, 0x0172, 0x017b, 0x02de, 0x02d3, + 0x02ca, 0x06c7, 0x0373, 0x036d, 0x036c, 0x0d83, 0x0361, 0x0002, + 0x0179, 0x0171, 0x0066, 0x00bb, 0x02d6, 0x02d2, 0x0166, 0x02c7, + 0x02c5, 0x0362, 0x06c6, 0x0367, 0x0d82, 0x0366, 0x01b2, 0x0000, + 0x000c, 0x000a, 0x0007, 0x000b, 0x000a, 0x0011, 0x000b, 0x0009, + 0x000d, 0x000c, 0x000a, 0x0007, 0x0005, 0x0003, 0x0001, 0x0003, +}; + +static const uint8_t mpa_huffbits_16[256] = { + 1, 4, 6, 8, 9, 9, 10, 10, + 11, 11, 11, 12, 12, 12, 13, 9, + 3, 4, 6, 7, 8, 9, 9, 9, + 10, 10, 10, 11, 12, 11, 12, 8, + 6, 6, 7, 8, 9, 9, 10, 10, + 11, 10, 11, 11, 11, 12, 12, 9, + 8, 7, 8, 9, 9, 10, 10, 10, + 11, 11, 12, 12, 12, 13, 13, 10, + 9, 8, 9, 9, 10, 10, 11, 11, + 11, 12, 12, 12, 13, 13, 13, 9, + 9, 8, 9, 9, 10, 11, 11, 12, + 11, 12, 12, 13, 13, 13, 14, 10, + 10, 9, 9, 10, 11, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 14, 10, + 10, 9, 10, 10, 11, 11, 11, 12, + 12, 13, 13, 13, 13, 15, 15, 10, + 10, 10, 10, 11, 11, 11, 12, 12, + 13, 13, 13, 13, 14, 14, 14, 10, + 11, 10, 10, 11, 11, 12, 12, 13, + 13, 13, 13, 14, 13, 14, 13, 11, + 11, 11, 10, 11, 12, 12, 12, 12, + 13, 14, 14, 14, 15, 15, 14, 10, + 12, 11, 11, 11, 12, 12, 13, 14, + 14, 14, 14, 14, 14, 13, 14, 11, + 12, 12, 12, 12, 12, 13, 13, 13, + 13, 15, 14, 14, 14, 14, 16, 11, + 14, 12, 12, 12, 13, 13, 14, 14, + 14, 16, 15, 15, 15, 17, 15, 11, + 13, 13, 11, 12, 14, 14, 13, 14, + 14, 15, 16, 15, 17, 15, 14, 11, + 9, 8, 8, 9, 9, 10, 10, 10, + 11, 11, 11, 11, 11, 11, 11, 8, +}; + +static const uint16_t mpa_huffcodes_24[256] = { + 0x000f, 0x000d, 0x002e, 0x0050, 0x0092, 0x0106, 0x00f8, 0x01b2, + 0x01aa, 0x029d, 0x028d, 0x0289, 0x026d, 0x0205, 0x0408, 0x0058, + 0x000e, 0x000c, 0x0015, 0x0026, 0x0047, 0x0082, 0x007a, 0x00d8, + 0x00d1, 0x00c6, 0x0147, 0x0159, 0x013f, 0x0129, 0x0117, 0x002a, + 0x002f, 0x0016, 0x0029, 0x004a, 0x0044, 0x0080, 0x0078, 0x00dd, + 0x00cf, 0x00c2, 0x00b6, 0x0154, 0x013b, 0x0127, 0x021d, 0x0012, + 0x0051, 0x0027, 0x004b, 0x0046, 0x0086, 0x007d, 0x0074, 0x00dc, + 0x00cc, 0x00be, 0x00b2, 0x0145, 0x0137, 0x0125, 0x010f, 0x0010, + 0x0093, 0x0048, 0x0045, 0x0087, 0x007f, 0x0076, 0x0070, 0x00d2, + 0x00c8, 0x00bc, 0x0160, 0x0143, 0x0132, 0x011d, 0x021c, 0x000e, + 0x0107, 0x0042, 0x0081, 0x007e, 0x0077, 0x0072, 0x00d6, 0x00ca, + 0x00c0, 0x00b4, 0x0155, 0x013d, 0x012d, 0x0119, 0x0106, 0x000c, + 0x00f9, 0x007b, 0x0079, 0x0075, 0x0071, 0x00d7, 0x00ce, 0x00c3, + 0x00b9, 0x015b, 0x014a, 0x0134, 0x0123, 0x0110, 0x0208, 0x000a, + 0x01b3, 0x0073, 0x006f, 0x006d, 0x00d3, 0x00cb, 0x00c4, 0x00bb, + 0x0161, 0x014c, 0x0139, 0x012a, 0x011b, 0x0213, 0x017d, 0x0011, + 0x01ab, 0x00d4, 0x00d0, 0x00cd, 0x00c9, 0x00c1, 0x00ba, 0x00b1, + 0x00a9, 0x0140, 0x012f, 0x011e, 0x010c, 0x0202, 0x0179, 0x0010, + 0x014f, 0x00c7, 0x00c5, 0x00bf, 0x00bd, 0x00b5, 0x00ae, 0x014d, + 0x0141, 0x0131, 0x0121, 0x0113, 0x0209, 0x017b, 0x0173, 0x000b, + 0x029c, 0x00b8, 0x00b7, 0x00b3, 0x00af, 0x0158, 0x014b, 0x013a, + 0x0130, 0x0122, 0x0115, 0x0212, 0x017f, 0x0175, 0x016e, 0x000a, + 0x028c, 0x015a, 0x00ab, 0x00a8, 0x00a4, 0x013e, 0x0135, 0x012b, + 0x011f, 0x0114, 0x0107, 0x0201, 0x0177, 0x0170, 0x016a, 0x0006, + 0x0288, 0x0142, 0x013c, 0x0138, 0x0133, 0x012e, 0x0124, 0x011c, + 0x010d, 0x0105, 0x0200, 0x0178, 0x0172, 0x016c, 0x0167, 0x0004, + 0x026c, 0x012c, 0x0128, 0x0126, 0x0120, 0x011a, 0x0111, 0x010a, + 0x0203, 0x017c, 0x0176, 0x0171, 0x016d, 0x0169, 0x0165, 0x0002, + 0x0409, 0x0118, 0x0116, 0x0112, 0x010b, 0x0108, 0x0103, 0x017e, + 0x017a, 0x0174, 0x016f, 0x016b, 0x0168, 0x0166, 0x0164, 0x0000, + 0x002b, 0x0014, 0x0013, 0x0011, 0x000f, 0x000d, 0x000b, 0x0009, + 0x0007, 0x0006, 0x0004, 0x0007, 0x0005, 0x0003, 0x0001, 0x0003, +}; + +static const uint8_t mpa_huffbits_24[256] = { + 4, 4, 6, 7, 8, 9, 9, 10, + 10, 11, 11, 11, 11, 11, 12, 9, + 4, 4, 5, 6, 7, 8, 8, 9, + 9, 9, 10, 10, 10, 10, 10, 8, + 6, 5, 6, 7, 7, 8, 8, 9, + 9, 9, 9, 10, 10, 10, 11, 7, + 7, 6, 7, 7, 8, 8, 8, 9, + 9, 9, 9, 10, 10, 10, 10, 7, + 8, 7, 7, 8, 8, 8, 8, 9, + 9, 9, 10, 10, 10, 10, 11, 7, + 9, 7, 8, 8, 8, 8, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 7, + 9, 8, 8, 8, 8, 9, 9, 9, + 9, 10, 10, 10, 10, 10, 11, 7, + 10, 8, 8, 8, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 11, 11, 8, + 10, 9, 9, 9, 9, 9, 9, 9, + 9, 10, 10, 10, 10, 11, 11, 8, + 10, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 11, 11, 11, 8, + 11, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 11, 8, + 11, 10, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 11, 8, + 11, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, 8, + 11, 10, 10, 10, 10, 10, 10, 10, + 11, 11, 11, 11, 11, 11, 11, 8, + 12, 10, 10, 10, 10, 10, 10, 11, + 11, 11, 11, 11, 11, 11, 11, 8, + 8, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 4, +}; + +static const HuffTable mpa_huff_tables[16] = { +{ 1, NULL, NULL }, +{ 2, mpa_huffbits_1, mpa_huffcodes_1 }, +{ 3, mpa_huffbits_2, mpa_huffcodes_2 }, +{ 3, mpa_huffbits_3, mpa_huffcodes_3 }, +{ 4, mpa_huffbits_5, mpa_huffcodes_5 }, +{ 4, mpa_huffbits_6, mpa_huffcodes_6 }, +{ 6, mpa_huffbits_7, mpa_huffcodes_7 }, +{ 6, mpa_huffbits_8, mpa_huffcodes_8 }, +{ 6, mpa_huffbits_9, mpa_huffcodes_9 }, +{ 8, mpa_huffbits_10, mpa_huffcodes_10 }, +{ 8, mpa_huffbits_11, mpa_huffcodes_11 }, +{ 8, mpa_huffbits_12, mpa_huffcodes_12 }, +{ 16, mpa_huffbits_13, mpa_huffcodes_13 }, +{ 16, mpa_huffbits_15, mpa_huffcodes_15 }, +{ 16, mpa_huffbits_16, mpa_huffcodes_16 }, +{ 16, mpa_huffbits_24, mpa_huffcodes_24 }, +}; + +static const uint8_t mpa_huff_data[32][2] = { +{ 0, 0 }, +{ 1, 0 }, +{ 2, 0 }, +{ 3, 0 }, +{ 0, 0 }, +{ 4, 0 }, +{ 5, 0 }, +{ 6, 0 }, +{ 7, 0 }, +{ 8, 0 }, +{ 9, 0 }, +{ 10, 0 }, +{ 11, 0 }, +{ 12, 0 }, +{ 0, 0 }, +{ 13, 0 }, +{ 14, 1 }, +{ 14, 2 }, +{ 14, 3 }, +{ 14, 4 }, +{ 14, 6 }, +{ 14, 8 }, +{ 14, 10 }, +{ 14, 13 }, +{ 15, 4 }, +{ 15, 5 }, +{ 15, 6 }, +{ 15, 7 }, +{ 15, 8 }, +{ 15, 9 }, +{ 15, 11 }, +{ 15, 13 }, +}; + + +/* huffman tables for quadrules */ +static const uint8_t mpa_quad_codes[2][16] = { + { 1, 5, 4, 5, 6, 5, 4, 4, 7, 3, 6, 0, 7, 2, 3, 1, }, + { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, }, +}; + +static const uint8_t mpa_quad_bits[2][16] = { + { 1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6, }, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, }, +}; + +/* band size tables */ +static const uint8_t band_size_long[9][22] = { +{ 4, 4, 4, 4, 4, 4, 6, 6, 8, 8, 10, + 12, 16, 20, 24, 28, 34, 42, 50, 54, 76, 158, }, /* 44100 */ +{ 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 10, + 12, 16, 18, 22, 28, 34, 40, 46, 54, 54, 192, }, /* 48000 */ +{ 4, 4, 4, 4, 4, 4, 6, 6, 8, 10, 12, + 16, 20, 24, 30, 38, 46, 56, 68, 84, 102, 26, }, /* 32000 */ +{ 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, + 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54, }, /* 22050 */ +{ 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, + 18, 22, 26, 32, 38, 46, 52, 64, 70, 76, 36, }, /* 24000 */ +{ 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, + 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54, }, /* 16000 */ +{ 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, + 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54, }, /* 11025 */ +{ 6, 6, 6, 6, 6, 6, 8, 10, 12, 14, 16, + 20, 24, 28, 32, 38, 46, 52, 60, 68, 58, 54, }, /* 12000 */ +{ 12, 12, 12, 12, 12, 12, 16, 20, 24, 28, 32, + 40, 48, 56, 64, 76, 90, 2, 2, 2, 2, 2, }, /* 8000 */ +}; + +static const uint8_t band_size_short[9][13] = { +{ 4, 4, 4, 4, 6, 8, 10, 12, 14, 18, 22, 30, 56, }, /* 44100 */ +{ 4, 4, 4, 4, 6, 6, 10, 12, 14, 16, 20, 26, 66, }, /* 48000 */ +{ 4, 4, 4, 4, 6, 8, 12, 16, 20, 26, 34, 42, 12, }, /* 32000 */ +{ 4, 4, 4, 6, 6, 8, 10, 14, 18, 26, 32, 42, 18, }, /* 22050 */ +{ 4, 4, 4, 6, 8, 10, 12, 14, 18, 24, 32, 44, 12, }, /* 24000 */ +{ 4, 4, 4, 6, 8, 10, 12, 14, 18, 24, 30, 40, 18, }, /* 16000 */ +{ 4, 4, 4, 6, 8, 10, 12, 14, 18, 24, 30, 40, 18, }, /* 11025 */ +{ 4, 4, 4, 6, 8, 10, 12, 14, 18, 24, 30, 40, 18, }, /* 12000 */ +{ 8, 8, 8, 12, 16, 20, 24, 28, 36, 2, 2, 2, 26, }, /* 8000 */ +}; + +static const uint8_t mpa_pretab[2][22] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 }, +}; + +/* table for alias reduction (XXX: store it as integer !) */ +static const float ci_table[8] = { + -0.6, -0.535, -0.33, -0.185, -0.095, -0.041, -0.0142, -0.0037, +}; + +#endif /* AVCODEC_MPEGAUDIODECTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodsp.h new file mode 100644 index 00000000..0e4352de --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiodsp.h @@ -0,0 +1,94 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGAUDIODSP_H +#define AVCODEC_MPEGAUDIODSP_H + +#include +#include + +#include "libavutil/common.h" + +typedef struct MPADSPContext { + void (*apply_window_float)(float *synth_buf, float *window, + int *dither_state, float *samples, + ptrdiff_t incr); + void (*apply_window_fixed)(int32_t *synth_buf, int32_t *window, + int *dither_state, int16_t *samples, + ptrdiff_t incr); + void (*dct32_float)(float *dst, const float *src); + void (*dct32_fixed)(int *dst, const int *src); + + void (*imdct36_blocks_float)(float *out, float *buf, float *in, + int count, int switch_point, int block_type); + void (*imdct36_blocks_fixed)(int *out, int *buf, int *in, + int count, int switch_point, int block_type); +} MPADSPContext; + +void ff_mpadsp_init(MPADSPContext *s); + +extern int32_t ff_mpa_synth_window_fixed[]; +extern float ff_mpa_synth_window_float[]; + +extern const int32_t ff_mpa_enwindow[257]; + +void ff_mpa_synth_filter_fixed(MPADSPContext *s, + int32_t *synth_buf_ptr, int *synth_buf_offset, + int32_t *window, int *dither_state, + int16_t *samples, ptrdiff_t incr, + int32_t *sb_samples); + +void ff_mpa_synth_filter_float(MPADSPContext *s, + float *synth_buf_ptr, int *synth_buf_offset, + float *window, int *dither_state, + float *samples, ptrdiff_t incr, + float *sb_samples); + +void ff_mpadsp_init_aarch64(MPADSPContext *s); +void ff_mpadsp_init_arm(MPADSPContext *s); +void ff_mpadsp_init_ppc(MPADSPContext *s); +void ff_mpadsp_init_x86(MPADSPContext *s); +void ff_mpadsp_init_mipsfpu(MPADSPContext *s); +void ff_mpadsp_init_mipsdsp(MPADSPContext *s); + +void ff_mpa_synth_init_float(float *window); +void ff_mpa_synth_init_fixed(int32_t *window); + +void ff_mpadsp_apply_window_float(float *synth_buf, float *window, + int *dither_state, float *samples, + ptrdiff_t incr); +void ff_mpadsp_apply_window_fixed(int32_t *synth_buf, int32_t *window, + int *dither_state, int16_t *samples, + ptrdiff_t incr); + +void ff_imdct36_blocks_float(float *out, float *buf, float *in, + int count, int switch_point, int block_type); + +void ff_imdct36_blocks_fixed(int *out, int *buf, int *in, + int count, int switch_point, int block_type); + +void ff_init_mpadsp_tabs_float(void); +void ff_init_mpadsp_tabs_fixed(void); + +/** For SSE implementation, MDCT_BUF_SIZE/2 should be 128-bit aligned */ +#define MDCT_BUF_SIZE FFALIGN(36, 2*4) + +extern int ff_mdct_win_fixed[8][MDCT_BUF_SIZE]; +extern float ff_mdct_win_float[8][MDCT_BUF_SIZE]; + +#endif /* AVCODEC_MPEGAUDIODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiotab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiotab.h new file mode 100644 index 00000000..bb2e5de4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegaudiotab.h @@ -0,0 +1,102 @@ +/* + * mpeg audio layer 2 tables. Most of them come from the mpeg audio + * specification. + * + * Copyright (c) 2000, 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * mpeg audio layer 2 tables. + * Most of them come from the mpeg audio specification. + */ + +#ifndef AVCODEC_MPEGAUDIOTAB_H +#define AVCODEC_MPEGAUDIOTAB_H + +#include +#include "mpegaudio.h" + +static const int costab32[30] = { + FIX(0.54119610014619701222), + FIX(1.3065629648763763537), + + FIX(0.50979557910415917998), + FIX(2.5629154477415054814), + FIX(0.89997622313641556513), + FIX(0.60134488693504528634), + + FIX(0.5024192861881556782), + FIX(5.1011486186891552563), + FIX(0.78815462345125020249), + FIX(0.64682178335999007679), + FIX(0.56694403481635768927), + FIX(1.0606776859903470633), + FIX(1.7224470982383341955), + FIX(0.52249861493968885462), + + FIX(10.19000812354803287), + FIX(0.674808341455005678), + FIX(1.1694399334328846596), + FIX(0.53104259108978413284), + FIX(2.0577810099534108446), + FIX(0.58293496820613388554), + FIX(0.83934964541552681272), + FIX(0.50547095989754364798), + FIX(3.4076084184687189804), + FIX(0.62250412303566482475), + FIX(0.97256823786196078263), + FIX(0.51544730992262455249), + FIX(1.4841646163141661852), + FIX(0.5531038960344445421), + FIX(0.74453627100229857749), + FIX(0.5006029982351962726), +}; + +static const int bitinv32[32] = { + 0, 16, 8, 24, 4, 20, 12, 28, + 2, 18, 10, 26, 6, 22, 14, 30, + 1, 17, 9, 25, 5, 21, 13, 29, + 3, 19, 11, 27, 7, 23, 15, 31 +}; + + +/* signal to noise ratio of each quantification step (could be + computed from quant_steps[]). The values are dB multiplied by 10 +*/ +static const unsigned short quant_snr[17] = { + 70, 110, 160, 208, + 253, 316, 378, 439, + 499, 559, 620, 680, + 740, 800, 861, 920, + 980 +}; + +/* fixed psycho acoustic model. Values of SNR taken from the 'toolame' + project */ +static const float fixed_smr[SBLIMIT] = { + 30, 17, 16, 10, 3, 12, 8, 2.5, + 5, 5, 6, 6, 5, 6, 10, 6, + -4, -10, -21, -30, -42, -55, -68, -75, + -75, -75, -75, -75, -91, -107, -110, -108 +}; + +static const unsigned char nb_scale_factors[4] = { 3, 2, 1, 2 }; + +#endif /* AVCODEC_MPEGAUDIOTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegpicture.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegpicture.h new file mode 100644 index 00000000..2db3d673 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegpicture.h @@ -0,0 +1,114 @@ +/* + * Mpeg video formats-related defines and utility functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGPICTURE_H +#define AVCODEC_MPEGPICTURE_H + +#include + +#include "libavutil/frame.h" + +#include "avcodec.h" +#include "motion_est.h" +#include "thread.h" + +#define MAX_PICTURE_COUNT 36 +#define EDGE_WIDTH 16 + +typedef struct ScratchpadContext { + uint8_t *edge_emu_buffer; ///< temporary buffer for if MVs point to out-of-frame data + uint8_t *rd_scratchpad; ///< scratchpad for rate distortion mb decision + uint8_t *obmc_scratchpad; + uint8_t *b_scratchpad; ///< scratchpad used for writing into write only buffers +} ScratchpadContext; + +/** + * Picture. + */ +typedef struct Picture { + struct AVFrame *f; + ThreadFrame tf; + + AVBufferRef *qscale_table_buf; + int8_t *qscale_table; + + AVBufferRef *motion_val_buf[2]; + int16_t (*motion_val[2])[2]; + + AVBufferRef *mb_type_buf; + uint32_t *mb_type; ///< types and macros are defined in mpegutils.h + + AVBufferRef *mbskip_table_buf; + uint8_t *mbskip_table; + + AVBufferRef *ref_index_buf[2]; + int8_t *ref_index[2]; + + AVBufferRef *mb_var_buf; + uint16_t *mb_var; ///< Table for MB variances + + AVBufferRef *mc_mb_var_buf; + uint16_t *mc_mb_var; ///< Table for motion compensated MB variances + + int alloc_mb_width; ///< mb_width used to allocate tables + int alloc_mb_height; ///< mb_height used to allocate tables + + AVBufferRef *mb_mean_buf; + uint8_t *mb_mean; ///< Table for MB luminance + + AVBufferRef *hwaccel_priv_buf; + void *hwaccel_picture_private; ///< Hardware accelerator private data + + int field_picture; ///< whether or not the picture was encoded in separate fields + + int64_t mb_var_sum; ///< sum of MB variance for current frame + int64_t mc_mb_var_sum; ///< motion compensated MB variance for current frame + + int b_frame_score; + int needs_realloc; ///< Picture needs to be reallocated (eg due to a frame size change) + + int reference; + int shared; + + uint64_t encoding_error[AV_NUM_DATA_POINTERS]; +} Picture; + +/** + * Allocate a Picture. + * The pixels are allocated/set by calling get_buffer() if shared = 0. + */ +int ff_alloc_picture(AVCodecContext *avctx, Picture *pic, MotionEstContext *me, + ScratchpadContext *sc, int shared, int encoding, + int chroma_x_shift, int chroma_y_shift, int out_format, + int mb_stride, int mb_width, int mb_height, int b8_stride, + ptrdiff_t *linesize, ptrdiff_t *uvlinesize); + +int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me, + ScratchpadContext *sc, int linesize); + +int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src); +void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *picture); + +void ff_free_picture_tables(Picture *pic); +int ff_update_picture_tables(Picture *dst, Picture *src); + +int ff_find_unused_picture(AVCodecContext *avctx, Picture *picture, int shared); + +#endif /* AVCODEC_MPEGPICTURE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegutils.h new file mode 100644 index 00000000..1ed21c19 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegutils.h @@ -0,0 +1,148 @@ +/* + * Mpeg video formats-related defines and utility functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGUTILS_H +#define AVCODEC_MPEGUTILS_H + +#include + +#include "libavutil/frame.h" + +#include "avcodec.h" +#include "version.h" + +/** + * Return value for header parsers if frame is not coded. + * */ +#define FRAME_SKIPPED 100 + +/* picture type */ +#define PICT_TOP_FIELD 1 +#define PICT_BOTTOM_FIELD 2 +#define PICT_FRAME 3 + +/** + * Value of Picture.reference when Picture is not a reference picture, but + * is held for delayed output. + */ +#define DELAYED_PIC_REF 4 + +#define MAX_MB_BYTES (30 * 16 * 16 * 3 / 8 + 120) +#define MAX_FCODE 7 + +/* MB types */ +#define MB_TYPE_INTRA4x4 (1 << 0) +#define MB_TYPE_INTRA16x16 (1 << 1) // FIXME H.264-specific +#define MB_TYPE_INTRA_PCM (1 << 2) // FIXME H.264-specific +#define MB_TYPE_16x16 (1 << 3) +#define MB_TYPE_16x8 (1 << 4) +#define MB_TYPE_8x16 (1 << 5) +#define MB_TYPE_8x8 (1 << 6) +#define MB_TYPE_INTERLACED (1 << 7) +#define MB_TYPE_DIRECT2 (1 << 8) // FIXME +#define MB_TYPE_ACPRED (1 << 9) +#define MB_TYPE_GMC (1 << 10) +#define MB_TYPE_SKIP (1 << 11) +#define MB_TYPE_P0L0 (1 << 12) +#define MB_TYPE_P1L0 (1 << 13) +#define MB_TYPE_P0L1 (1 << 14) +#define MB_TYPE_P1L1 (1 << 15) +#define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) +#define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) +#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) +#define MB_TYPE_QUANT (1 << 16) +#define MB_TYPE_CBP (1 << 17) + +#define MB_TYPE_INTRA MB_TYPE_INTRA4x4 // default mb_type if there is just one type + +#define IS_INTRA4x4(a) ((a) & MB_TYPE_INTRA4x4) +#define IS_INTRA16x16(a) ((a) & MB_TYPE_INTRA16x16) +#define IS_PCM(a) ((a) & MB_TYPE_INTRA_PCM) +#define IS_INTRA(a) ((a) & 7) +#define IS_INTER(a) ((a) & (MB_TYPE_16x16 | MB_TYPE_16x8 | \ + MB_TYPE_8x16 | MB_TYPE_8x8)) +#define IS_SKIP(a) ((a) & MB_TYPE_SKIP) +#define IS_INTRA_PCM(a) ((a) & MB_TYPE_INTRA_PCM) +#define IS_INTERLACED(a) ((a) & MB_TYPE_INTERLACED) +#define IS_DIRECT(a) ((a) & MB_TYPE_DIRECT2) +#define IS_GMC(a) ((a) & MB_TYPE_GMC) +#define IS_16X16(a) ((a) & MB_TYPE_16x16) +#define IS_16X8(a) ((a) & MB_TYPE_16x8) +#define IS_8X16(a) ((a) & MB_TYPE_8x16) +#define IS_8X8(a) ((a) & MB_TYPE_8x8) +#define IS_SUB_8X8(a) ((a) & MB_TYPE_16x16) // note reused +#define IS_SUB_8X4(a) ((a) & MB_TYPE_16x8) // note reused +#define IS_SUB_4X8(a) ((a) & MB_TYPE_8x16) // note reused +#define IS_SUB_4X4(a) ((a) & MB_TYPE_8x8) // note reused +#define IS_ACPRED(a) ((a) & MB_TYPE_ACPRED) +#define IS_QUANT(a) ((a) & MB_TYPE_QUANT) +#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0 << ((part) + 2 * (list)))) + +// does this mb use listX, note does not work if subMBs +#define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0 | MB_TYPE_P1L0) << (2 * (list)))) + +#define HAS_CBP(a) ((a) & MB_TYPE_CBP) + +/* MB types for encoding */ +#define CANDIDATE_MB_TYPE_INTRA (1 << 0) +#define CANDIDATE_MB_TYPE_INTER (1 << 1) +#define CANDIDATE_MB_TYPE_INTER4V (1 << 2) +#define CANDIDATE_MB_TYPE_SKIPPED (1 << 3) + +#define CANDIDATE_MB_TYPE_DIRECT (1 << 4) +#define CANDIDATE_MB_TYPE_FORWARD (1 << 5) +#define CANDIDATE_MB_TYPE_BACKWARD (1 << 6) +#define CANDIDATE_MB_TYPE_BIDIR (1 << 7) + +#define CANDIDATE_MB_TYPE_INTER_I (1 << 8) +#define CANDIDATE_MB_TYPE_FORWARD_I (1 << 9) +#define CANDIDATE_MB_TYPE_BACKWARD_I (1 << 10) +#define CANDIDATE_MB_TYPE_BIDIR_I (1 << 11) + +#define CANDIDATE_MB_TYPE_DIRECT0 (1 << 12) + +#define INPLACE_OFFSET 16 + +enum OutputFormat { + FMT_MPEG1, + FMT_H261, + FMT_H263, + FMT_MJPEG, +}; + + +/** + * Draw a horizontal band if supported. + * + * @param h is the normal height, this will be reduced automatically if needed + */ +void ff_draw_horiz_band(AVCodecContext *avctx, AVFrame *cur, AVFrame *last, + int y, int h, int picture_structure, int first_field, + int low_delay); + +/** + * Print debugging info for the given picture. + */ +void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table, + uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2], + int *low_delay, + int mb_width, int mb_height, int mb_stride, int quarter_sample); + +#endif /* AVCODEC_MPEGUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideo.h new file mode 100644 index 00000000..29e692f2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideo.h @@ -0,0 +1,773 @@ +/* + * Generic DCT based hybrid video encoder + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * mpegvideo header. + */ + +#ifndef AVCODEC_MPEGVIDEO_H +#define AVCODEC_MPEGVIDEO_H + +#include + +#include "avcodec.h" +#include "blockdsp.h" +#include "error_resilience.h" +#include "fdctdsp.h" +#include "get_bits.h" +#include "h264chroma.h" +#include "h263dsp.h" +#include "hpeldsp.h" +#include "idctdsp.h" +#include "internal.h" +#include "me_cmp.h" +#include "motion_est.h" +#include "mpegpicture.h" +#include "mpegvideodsp.h" +#include "mpegvideoencdsp.h" +#include "mpegvideodata.h" +#include "pixblockdsp.h" +#include "put_bits.h" +#include "ratecontrol.h" +#include "parser.h" +#include "mpegutils.h" +#include "mpeg12data.h" +#include "qpeldsp.h" +#include "thread.h" +#include "videodsp.h" + +#include "libavutil/opt.h" +#include "libavutil/timecode.h" + +#define MAX_THREADS 32 + +#define MAX_B_FRAMES 16 + +/* Start codes. */ +#define SEQ_END_CODE 0x000001b7 +#define SEQ_START_CODE 0x000001b3 +#define GOP_START_CODE 0x000001b8 +#define PICTURE_START_CODE 0x00000100 +#define SLICE_MIN_START_CODE 0x00000101 +#define SLICE_MAX_START_CODE 0x000001af +#define EXT_START_CODE 0x000001b5 +#define USER_START_CODE 0x000001b2 +#define SLICE_START_CODE 0x000001b7 + + +/** + * MpegEncContext. + */ +typedef struct MpegEncContext { + AVClass *class; + + int y_dc_scale, c_dc_scale; + int ac_pred; + int block_last_index[12]; ///< last non zero coefficient in block + int h263_aic; ///< Advanced INTRA Coding (AIC) + + /* scantables */ + ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce the cache usage + ScanTable intra_scantable; + ScanTable intra_h_scantable; + ScanTable intra_v_scantable; + + /* WARNING: changes above this line require updates to hardcoded + * offsets used in ASM. */ + + struct AVCodecContext *avctx; + /* the following parameters must be initialized before encoding */ + int width, height;///< picture size. must be a multiple of 16 + int gop_size; + int intra_only; ///< if true, only intra pictures are generated + int64_t bit_rate; ///< wanted bit rate + enum OutputFormat out_format; ///< output format + int h263_pred; ///< use MPEG-4/H.263 ac/dc predictions + int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved) + +/* the following codec id fields are deprecated in favor of codec_id */ + int h263_plus; ///< H.263+ headers + int h263_flv; ///< use flv H.263 header + + enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */ + int fixed_qscale; ///< fixed qscale if non zero + int encoding; ///< true if we are encoding (vs decoding) + int max_b_frames; ///< max number of B-frames for encoding + int luma_elim_threshold; + int chroma_elim_threshold; + int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...) + int workaround_bugs; ///< workaround bugs in encoders which cannot be detected automatically + int codec_tag; ///< internal codec_tag upper case converted from avctx codec_tag + /* the following fields are managed internally by the encoder */ + + /* sequence parameters */ + int context_initialized; + int input_picture_number; ///< used to set pic->display_picture_number, should not be used for/by anything else + int coded_picture_number; ///< used to set pic->coded_picture_number, should not be used for/by anything else + int picture_number; //FIXME remove, unclear definition + int picture_in_gop_number; ///< 0-> first pic in gop, ... + int mb_width, mb_height; ///< number of MBs horizontally & vertically + int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 + int b8_stride; ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressing + int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replication) + int mb_num; ///< number of MBs of a picture + ptrdiff_t linesize; ///< line size, in bytes, may be different from width + ptrdiff_t uvlinesize; ///< line size, for chroma in bytes, may be different from width + Picture *picture; ///< main picture buffer + Picture **input_picture; ///< next pictures on display order for encoding + Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding + + int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2() + /** + * pts difference between the first and second input frame, used for + * calculating dts of the first frame when there's a delay */ + int64_t dts_delta; + /** + * reordered pts to be used as dts for the next output frame when there's + * a delay */ + int64_t reordered_pts; + + /** bit output */ + PutBitContext pb; + + int start_mb_y; ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) + int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) + struct MpegEncContext *thread_context[MAX_THREADS]; + int slice_context_count; ///< number of used thread_contexts + + /** + * copy of the previous picture structure. + * note, linesize & data, might not match the previous picture (for field pictures) + */ + Picture last_picture; + + /** + * copy of the next picture structure. + * note, linesize & data, might not match the next picture (for field pictures) + */ + Picture next_picture; + + /** + * copy of the source picture structure for encoding. + * note, linesize & data, might not match the source picture (for field pictures) + */ + Picture new_picture; + + /** + * copy of the current picture structure. + * note, linesize & data, might not match the current picture (for field pictures) + */ + Picture current_picture; ///< buffer to store the decompressed current picture + + Picture *last_picture_ptr; ///< pointer to the previous picture. + Picture *next_picture_ptr; ///< pointer to the next picture (for bidir pred) + Picture *current_picture_ptr; ///< pointer to the current picture + int last_dc[3]; ///< last DC values for MPEG-1 + int16_t *dc_val_base; + int16_t *dc_val[3]; ///< used for MPEG-4 DC prediction, all 3 arrays must be continuous + const uint8_t *y_dc_scale_table; ///< qscale -> y_dc_scale table + const uint8_t *c_dc_scale_table; ///< qscale -> c_dc_scale table + const uint8_t *chroma_qscale_table; ///< qscale -> chroma_qscale (H.263) + uint8_t *coded_block_base; + uint8_t *coded_block; ///< used for coded block pattern prediction (msmpeg4v3, wmv1) + int16_t (*ac_val_base)[16]; + int16_t (*ac_val[3])[16]; ///< used for MPEG-4 AC prediction, all 3 arrays must be continuous + int mb_skipped; ///< MUST BE SET only during DECODING + uint8_t *mbskip_table; /**< used to avoid copy if macroblock skipped (for black regions for example) + and used for B-frame encoding & decoding (contains skip table of next P-frame) */ + uint8_t *mbintra_table; ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding + uint8_t *cbp_table; ///< used to store cbp, ac_pred for partitioned decoding + uint8_t *pred_dir_table; ///< used to store pred_dir for partitioned decoding + + ScratchpadContext sc; + + int qscale; ///< QP + int chroma_qscale; ///< chroma QP + unsigned int lambda; ///< Lagrange multiplier used in rate distortion + unsigned int lambda2; ///< (lambda*lambda) >> FF_LAMBDA_SHIFT + int *lambda_table; + int adaptive_quant; ///< use adaptive quantization + int dquant; ///< qscale difference to prev qscale + int closed_gop; ///< MPEG1/2 GOP is closed + int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ... + int vbv_delay; + int last_pict_type; //FIXME removes + int last_non_b_pict_type; ///< used for MPEG-4 gmc B-frames & ratecontrol + int droppable; + int frame_rate_index; + AVRational mpeg2_frame_rate_ext; + int last_lambda_for[5]; ///< last lambda for a specific pict type + int skipdct; ///< skip dct and code zero residual + + /* motion compensation */ + int unrestricted_mv; ///< mv can point outside of the coded picture + int h263_long_vectors; ///< use horrible H.263v1 long vector mode + + BlockDSPContext bdsp; + FDCTDSPContext fdsp; + H264ChromaContext h264chroma; + HpelDSPContext hdsp; + IDCTDSPContext idsp; + MECmpContext mecc; + MpegVideoDSPContext mdsp; + MpegvideoEncDSPContext mpvencdsp; + PixblockDSPContext pdsp; + QpelDSPContext qdsp; + VideoDSPContext vdsp; + H263DSPContext h263dsp; + int f_code; ///< forward MV resolution + int b_code; ///< backward MV resolution for B-frames (MPEG-4) + int16_t (*p_mv_table_base)[2]; + int16_t (*b_forw_mv_table_base)[2]; + int16_t (*b_back_mv_table_base)[2]; + int16_t (*b_bidir_forw_mv_table_base)[2]; + int16_t (*b_bidir_back_mv_table_base)[2]; + int16_t (*b_direct_mv_table_base)[2]; + int16_t (*p_field_mv_table_base[2][2])[2]; + int16_t (*b_field_mv_table_base[2][2][2])[2]; + int16_t (*p_mv_table)[2]; ///< MV table (1MV per MB) P-frame encoding + int16_t (*b_forw_mv_table)[2]; ///< MV table (1MV per MB) forward mode B-frame encoding + int16_t (*b_back_mv_table)[2]; ///< MV table (1MV per MB) backward mode B-frame encoding + int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding + int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding + int16_t (*b_direct_mv_table)[2]; ///< MV table (1MV per MB) direct mode B-frame encoding + int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced P-frame encoding + int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding + uint8_t (*p_field_select_table[2]); + uint8_t (*b_field_select_table[2][2]); + int motion_est; ///< ME algorithm + int me_penalty_compensation; + int me_pre; ///< prepass for motion estimation + int mv_dir; +#define MV_DIR_FORWARD 1 +#define MV_DIR_BACKWARD 2 +#define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4) + int mv_type; +#define MV_TYPE_16X16 0 ///< 1 vector for the whole mb +#define MV_TYPE_8X8 1 ///< 4 vectors (H.263, MPEG-4 4MV) +#define MV_TYPE_16X8 2 ///< 2 vectors, one per 16x8 block +#define MV_TYPE_FIELD 3 ///< 2 vectors, one per field +#define MV_TYPE_DMV 4 ///< 2 vectors, special mpeg2 Dual Prime Vectors + /**motion vectors for a macroblock + first coordinate : 0 = forward 1 = backward + second " : depend on type + third " : 0 = x, 1 = y + */ + int mv[2][4][2]; + int field_select[2][2]; + int last_mv[2][2][2]; ///< last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4 + uint8_t *fcode_tab; ///< smallest fcode needed for each MV + int16_t direct_scale_mv[2][64]; ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv + + MotionEstContext me; + + int no_rounding; /**< apply no rounding to motion compensation (MPEG-4, msmpeg4, ...) + for B-frames rounding mode is always 0 */ + + /* macroblock layer */ + int mb_x, mb_y; + int mb_skip_run; + int mb_intra; + uint16_t *mb_type; ///< Table for candidate MB types for encoding (defines in mpegutils.h) + + int block_index[6]; ///< index to current MB in block based arrays with edges + int block_wrap[6]; + uint8_t *dest[3]; + + int *mb_index2xy; ///< mb_index -> mb_x + mb_y*mb_stride + + /** matrix transmitted in the bitstream */ + uint16_t intra_matrix[64]; + uint16_t chroma_intra_matrix[64]; + uint16_t inter_matrix[64]; + uint16_t chroma_inter_matrix[64]; + int force_duplicated_matrix; ///< Force duplication of mjpeg matrices, useful for rtp streaming + + int intra_quant_bias; ///< bias for the quantizer + int inter_quant_bias; ///< bias for the quantizer + int min_qcoeff; ///< minimum encodable coefficient + int max_qcoeff; ///< maximum encodable coefficient + int ac_esc_length; ///< num of bits needed to encode the longest esc + uint8_t *intra_ac_vlc_length; + uint8_t *intra_ac_vlc_last_length; + uint8_t *intra_chroma_ac_vlc_length; + uint8_t *intra_chroma_ac_vlc_last_length; + uint8_t *inter_ac_vlc_length; + uint8_t *inter_ac_vlc_last_length; + uint8_t *luma_dc_vlc_length; +#define UNI_AC_ENC_INDEX(run,level) ((run)*128 + (level)) + + int coded_score[12]; + + /** precomputed matrix (combine qscale and DCT renorm) */ + int (*q_intra_matrix)[64]; + int (*q_chroma_intra_matrix)[64]; + int (*q_inter_matrix)[64]; + /** identical to the above but for MMX & these are not permutated, second 64 entries are bias*/ + uint16_t (*q_intra_matrix16)[2][64]; + uint16_t (*q_chroma_intra_matrix16)[2][64]; + uint16_t (*q_inter_matrix16)[2][64]; + + /* noise reduction */ + int (*dct_error_sum)[64]; + int dct_count[2]; + uint16_t (*dct_offset)[64]; + + /* bit rate control */ + int64_t total_bits; + int frame_bits; ///< bits used for the current frame + int stuffing_bits; ///< bits used for stuffing + int next_lambda; ///< next lambda used for retrying to encode a frame + RateControlContext rc_context; ///< contains stuff only accessed in ratecontrol.c + + /* statistics, used for 2-pass encoding */ + int mv_bits; + int header_bits; + int i_tex_bits; + int p_tex_bits; + int i_count; + int f_count; + int b_count; + int skip_count; + int misc_bits; ///< cbp, mb_type + int last_bits; ///< temp var used for calculating the above vars + + /* error concealment / resync */ + int resync_mb_x; ///< x position of last resync marker + int resync_mb_y; ///< y position of last resync marker + GetBitContext last_resync_gb; ///< used to search for the next resync marker + int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only) + int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed B-frames + + ParseContext parse_context; + + /* H.263 specific */ + int gob_index; + int obmc; ///< overlapped block motion compensation + int mb_info; ///< interval for outputting info about mb offsets as side data + int prev_mb_info, last_mb_info; + uint8_t *mb_info_ptr; + int mb_info_size; + int ehc_mode; + int rc_strategy; ///< deprecated + + /* H.263+ specific */ + int umvplus; ///< == H.263+ && unrestricted_mv + int h263_aic_dir; ///< AIC direction: 0 = left, 1 = top + int h263_slice_structured; + int alt_inter_vlc; ///< alternative inter vlc + int modified_quant; + int loop_filter; + int custom_pcf; + + /* MPEG-4 specific */ + int studio_profile; + int dct_precision; + ///< number of bits to represent the fractional part of time (encoder only) + int time_increment_bits; + int last_time_base; + int time_base; ///< time in seconds of last I,P,S Frame + int64_t time; ///< time of current frame + int64_t last_non_b_time; + uint16_t pp_time; ///< time distance between the last 2 p,s,i frames + uint16_t pb_time; ///< time distance between the last b and p,s,i frame + uint16_t pp_field_time; + uint16_t pb_field_time; ///< like above, just for interlaced + int real_sprite_warping_points; + int sprite_offset[2][2]; ///< sprite offset[isChroma][isMVY] + int sprite_delta[2][2]; ///< sprite_delta [isY][isMVY] + int mcsel; + int quant_precision; + int quarter_sample; ///< 1->qpel, 0->half pel ME/MC + int aspect_ratio_info; //FIXME remove + int sprite_warping_accuracy; + int data_partitioning; ///< data partitioning flag from header + int partitioned_frame; ///< is current frame partitioned + int low_delay; ///< no reordering needed / has no B-frames + int vo_type; + PutBitContext tex_pb; ///< used for data partitioned VOPs + PutBitContext pb2; ///< used for data partitioned VOPs + int mpeg_quant; + int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG-4 + + /* divx specific, used to workaround (many) bugs in divx5 */ + int divx_packed; + uint8_t *bitstream_buffer; //Divx 5.01 puts several frames in a single one, this is used to reorder them + int bitstream_buffer_size; + unsigned int allocated_bitstream_buffer_size; + + /* RV10 specific */ + int rv10_version; ///< RV10 version: 0 or 3 + int rv10_first_dc_coded[3]; + + /* MJPEG specific */ + struct MJpegContext *mjpeg_ctx; + int esc_pos; + int pred; + int huffman; + + /* MSMPEG4 specific */ + int mv_table_index; + int rl_table_index; + int rl_chroma_table_index; + int dc_table_index; + int use_skip_mb_code; + int slice_height; ///< in macroblocks + int first_slice_line; ///< used in MPEG-4 too to handle resync markers + int flipflop_rounding; + int msmpeg4_version; ///< 0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8 + int per_mb_rl_table; + int esc3_level_length; + int esc3_run_length; + /** [mb_intra][isChroma][level][run][last] */ + int (*ac_stats)[2][MAX_LEVEL+1][MAX_RUN+1][2]; + int inter_intra_pred; + int mspel; + + /* decompression specific */ + GetBitContext gb; + + /* MPEG-1 specific */ + int gop_picture_number; ///< index of the first picture of a GOP based on fake_pic_num & MPEG-1 specific + int last_mv_dir; ///< last mv_dir, used for B-frame encoding + uint8_t *vbv_delay_ptr; ///< pointer to vbv_delay in the bitstream + + /* MPEG-2-specific - I wished not to have to support this mess. */ + int progressive_sequence; + int mpeg_f_code[2][2]; + int a53_cc; + + // picture structure defines are loaded from mpegutils.h + int picture_structure; + + int64_t timecode_frame_start; ///< GOP timecode frame start number, in non drop frame format + int intra_dc_precision; + int frame_pred_frame_dct; + int top_field_first; + int concealment_motion_vectors; + int q_scale_type; + int brd_scale; + int intra_vlc_format; + int alternate_scan; + int seq_disp_ext; + int video_format; +#define VIDEO_FORMAT_COMPONENT 0 +#define VIDEO_FORMAT_PAL 1 +#define VIDEO_FORMAT_NTSC 2 +#define VIDEO_FORMAT_SECAM 3 +#define VIDEO_FORMAT_MAC 4 +#define VIDEO_FORMAT_UNSPECIFIED 5 + int repeat_first_field; + int chroma_420_type; + int chroma_format; +#define CHROMA_420 1 +#define CHROMA_422 2 +#define CHROMA_444 3 + int chroma_x_shift;//depend on pix_format, that depend on chroma_format + int chroma_y_shift; + + int progressive_frame; + int full_pel[2]; + int interlaced_dct; + int first_field; ///< is 1 for the first field of a field picture 0 otherwise + int drop_frame_timecode; ///< timecode is in drop frame format. + int scan_offset; ///< reserve space for SVCD scan offset user data. + + /* RTP specific */ + int rtp_mode; + int rtp_payload_size; + + char *tc_opt_str; ///< timecode option string + AVTimecode tc; ///< timecode context + + uint8_t *ptr_lastgob; + int swap_uv; //vcr2 codec is an MPEG-2 variant with U and V swapped + int pack_pblocks; //xvmc needs to keep blocks without gaps. + int16_t (*pblocks[12])[64]; + + int16_t (*block)[64]; ///< points to one of the following blocks + int16_t (*blocks)[12][64]; // for HQ mode we need to keep the best block + int (*decode_mb)(struct MpegEncContext *s, int16_t block[12][64]); // used by some codecs to avoid a switch() + + int32_t (*block32)[12][64]; + int dpcm_direction; // 0 = DCT, 1 = DPCM top to bottom scan, -1 = DPCM bottom to top scan + int16_t (*dpcm_macroblock)[3][256]; + +#define SLICE_OK 0 +#define SLICE_ERROR -1 +#define SLICE_END -2 /// clipping, 1-> use a nice continuous function to limit qscale within qmin/qmax. + */ + float rc_qsquish; + float rc_qmod_amp; + int rc_qmod_freq; + float rc_initial_cplx; + float rc_buffer_aggressivity; + float border_masking; + int lmin, lmax; + int vbv_ignore_qmax; + + char *rc_eq; + + /* temp buffers for rate control */ + float *cplx_tab, *bits_tab; + + /* flag to indicate a reinitialization is required, e.g. after + * a frame size change */ + int context_reinit; + + ERContext er; + + int error_rate; + + /* temporary frames used by b_frame_strategy = 2 */ + AVFrame *tmp_frames[MAX_B_FRAMES + 2]; + int b_frame_strategy; + int b_sensitivity; + + /* frame skip options for encoding */ + int frame_skip_threshold; + int frame_skip_factor; + int frame_skip_exp; + int frame_skip_cmp; + + int scenechange_threshold; + int noise_reduction; + + int intra_penalty; +} MpegEncContext; + +/* mpegvideo_enc common options */ +#define FF_MPV_FLAG_SKIP_RD 0x0001 +#define FF_MPV_FLAG_STRICT_GOP 0x0002 +#define FF_MPV_FLAG_QP_RD 0x0004 +#define FF_MPV_FLAG_CBP_RD 0x0008 +#define FF_MPV_FLAG_NAQ 0x0010 +#define FF_MPV_FLAG_MV0 0x0020 + +#define FF_MPV_OPT_CMP_FUNC \ +{ "sad", "Sum of absolute differences, fast", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "sse", "Sum of squared errors", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "satd", "Sum of absolute Hadamard transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SATD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "dct", "Sum of absolute DCT transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "psnr", "Sum of squared quantization errors, low quality", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_PSNR }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "bit", "Number of bits needed for the block", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_BIT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "rd", "Rate distortion optimal, slow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_RD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "zero", "Zero", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_ZERO }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "vsad", "Sum of absolute vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "vsse", "Sum of squared vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "nsse", "Noise preserving sum of squared differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_NSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "dct264", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT264 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "dctmax", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_CHROMA }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{ "msad", "Sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" } + +#ifndef FF_MPV_OFFSET +#define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x) +#endif +#define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) +#define FF_MPV_COMMON_OPTS \ +FF_MPV_OPT_CMP_FUNC, \ +{ "mpv_flags", "Flags common for all mpegvideo-based encoders.", FF_MPV_OFFSET(mpv_flags), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "skip_rd", "RD optimal MB level residual skipping", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_SKIP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "strict_gop", "Strictly enforce gop size", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_STRICT_GOP }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "qp_rd", "Use rate distortion optimization for qp selection", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_QP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "cbp_rd", "use rate distortion optimization for CBP", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_CBP_RD }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_NAQ }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "mv0", "always try a mb with mv=<0,0>", 0, AV_OPT_TYPE_CONST, { .i64 = FF_MPV_FLAG_MV0 }, 0, 0, FF_MPV_OPT_FLAGS, "mpv_flags" },\ +{ "luma_elim_threshold", "single coefficient elimination threshold for luminance (negative values also consider dc coefficient)",\ + FF_MPV_OFFSET(luma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ +{ "chroma_elim_threshold", "single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)",\ + FF_MPV_OFFSET(chroma_elim_threshold), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS },\ +{ "quantizer_noise_shaping", NULL, FF_MPV_OFFSET(quantizer_noise_shaping), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS },\ +{ "error_rate", "Simulate errors in the bitstream to test error concealment.", \ + FF_MPV_OFFSET(error_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FF_MPV_OPT_FLAGS },\ +{"qsquish", "how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function)", \ + FF_MPV_OFFSET(rc_qsquish), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0, 99, FF_MPV_OPT_FLAGS}, \ +{"rc_qmod_amp", "experimental quantizer modulation", FF_MPV_OFFSET(rc_qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \ +{"rc_qmod_freq", "experimental quantizer modulation", FF_MPV_OFFSET(rc_qmod_freq), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS}, \ +{"rc_eq", "Set rate control equation. When computing the expression, besides the standard functions " \ + "defined in the section 'Expression Evaluation', the following functions are available: " \ + "bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv " \ + "fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.", \ + FF_MPV_OFFSET(rc_eq), AV_OPT_TYPE_STRING, .flags = FF_MPV_OPT_FLAGS }, \ +{"rc_init_cplx", "initial complexity for 1-pass encoding", FF_MPV_OFFSET(rc_initial_cplx), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \ +{"rc_buf_aggressivity", "currently useless", FF_MPV_OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \ +{"border_mask", "increase the quantizer for macroblocks close to borders", FF_MPV_OFFSET(border_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, FF_MPV_OPT_FLAGS}, \ +{"lmin", "minimum Lagrange factor (VBR)", FF_MPV_OFFSET(lmin), AV_OPT_TYPE_INT, {.i64 = 2*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"lmax", "maximum Lagrange factor (VBR)", FF_MPV_OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 31*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"ibias", "intra quant bias", FF_MPV_OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"pbias", "inter quant bias", FF_MPV_OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \ + { "ffmpeg", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \ + { "xvid", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \ +{"motion_est", "motion estimation algorithm", FF_MPV_OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_XONE, FF_MPV_OPT_FLAGS, "motion_est" }, \ +{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \ +{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \ +{ "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \ +{ "force_duplicated_matrix", "Always write luma and chroma matrix for mjpeg, useful for rtp streaming.", FF_MPV_OFFSET(force_duplicated_matrix), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS }, \ +{"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \ +{"b_sensitivity", "Adjust sensitivity of b_frame_strategy 1", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"brd_scale", "Downscale frames for dynamic B-frame decision", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS }, \ +{"skip_threshold", "Frame skip threshold", FF_MPV_OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"skip_factor", "Frame skip factor", FF_MPV_OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"skip_exp", "Frame skip exponent", FF_MPV_OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"skip_cmp", "Frame skip compare function", FF_MPV_OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \ +{"sc_threshold", "Scene change threshold", FF_MPV_OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"noise_reduction", "Noise reduction", FF_MPV_OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"mpeg_quant", "Use MPEG quantizers instead of H.263", FF_MPV_OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS }, \ +{"ps", "RTP payload size in bytes", FF_MPV_OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"mepc", "Motion estimation bitrate penalty compensation (1.0 = 256)", FF_MPV_OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"mepre", "pre motion estimation", FF_MPV_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \ +{"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \ +{"a53cc", "Use A53 Closed Captions (if available)", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FF_MPV_OPT_FLAGS }, \ + +extern const AVOption ff_mpv_generic_options[]; + +/** + * Set the given MpegEncContext to common defaults (same for encoding + * and decoding). The changed fields will not depend upon the prior + * state of the MpegEncContext. + */ +void ff_mpv_common_defaults(MpegEncContext *s); + +void ff_dct_encode_init_x86(MpegEncContext *s); + +int ff_mpv_common_init(MpegEncContext *s); +void ff_mpv_common_init_arm(MpegEncContext *s); +void ff_mpv_common_init_axp(MpegEncContext *s); +void ff_mpv_common_init_neon(MpegEncContext *s); +void ff_mpv_common_init_ppc(MpegEncContext *s); +void ff_mpv_common_init_x86(MpegEncContext *s); +void ff_mpv_common_init_mips(MpegEncContext *s); + +int ff_mpv_common_frame_size_change(MpegEncContext *s); +void ff_mpv_common_end(MpegEncContext *s); + +void ff_mpv_decode_defaults(MpegEncContext *s); +void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx); +void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]); +void ff_mpv_report_decode_progress(MpegEncContext *s); + +int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx); +void ff_mpv_frame_end(MpegEncContext *s); + +int ff_mpv_encode_init(AVCodecContext *avctx); +void ff_mpv_encode_init_x86(MpegEncContext *s); + +int ff_mpv_encode_end(AVCodecContext *avctx); +int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, + const AVFrame *frame, int *got_packet); +int ff_mpv_reallocate_putbitbuffer(MpegEncContext *s, size_t threshold, size_t size_increase); + +void ff_clean_intra_table_entries(MpegEncContext *s); +void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h); +void ff_mpeg_flush(AVCodecContext *avctx); + +void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict); + +int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type); + +void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix); + +int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src); +int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); +void ff_set_qscale(MpegEncContext * s, int qscale); + +void ff_mpv_idct_init(MpegEncContext *s); +int ff_dct_encode_init(MpegEncContext *s); +void ff_convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16)[2][64], + const uint16_t *quant_matrix, int bias, int qmin, int qmax, int intra); +int ff_dct_quantize_c(MpegEncContext *s, int16_t *block, int n, int qscale, int *overflow); +void ff_block_permute(int16_t *block, uint8_t *permutation, + const uint8_t *scantable, int last); +void ff_init_block_index(MpegEncContext *s); + +void ff_mpv_motion(MpegEncContext *s, + uint8_t *dest_y, uint8_t *dest_cb, + uint8_t *dest_cr, int dir, + uint8_t **ref_picture, + op_pixels_func (*pix_op)[4], + qpel_mc_func (*qpix_op)[16]); + +static inline void ff_update_block_index(MpegEncContext *s){ + const int bytes_per_pixel = 1 + (s->avctx->bits_per_raw_sample > 8); + const int block_size= (8*bytes_per_pixel) >> s->avctx->lowres; + + s->block_index[0]+=2; + s->block_index[1]+=2; + s->block_index[2]+=2; + s->block_index[3]+=2; + s->block_index[4]++; + s->block_index[5]++; + s->dest[0]+= 2*block_size; + s->dest[1]+= (2 >> s->chroma_x_shift) * block_size; + s->dest[2]+= (2 >> s->chroma_x_shift) * block_size; +} + +static inline int get_bits_diff(MpegEncContext *s){ + const int bits= put_bits_count(&s->pb); + const int last= s->last_bits; + + s->last_bits = bits; + + return bits - last; +} + +static inline int mpeg_get_qscale(MpegEncContext *s) +{ + int qscale = get_bits(&s->gb, 5); + if (s->q_scale_type) + return ff_mpeg2_non_linear_qscale[qscale]; + else + return qscale << 1; +} + +#endif /* AVCODEC_MPEGVIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodata.h new file mode 100644 index 00000000..14f4806d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodata.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGVIDEODATA_H +#define AVCODEC_MPEGVIDEODATA_H + +#include + +/* encoding scans */ +extern const uint8_t ff_alternate_horizontal_scan[64]; +extern const uint8_t ff_alternate_vertical_scan[64]; + +extern const uint8_t ff_mpeg1_dc_scale_table[128]; +extern const uint8_t * const ff_mpeg2_dc_scale_table[4]; + +extern const uint8_t ff_mpeg2_non_linear_qscale[32]; + +extern const uint8_t ff_default_chroma_qscale_table[32]; + +#endif /* AVCODEC_MPEGVIDEODATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodsp.h new file mode 100644 index 00000000..293e2548 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideodsp.h @@ -0,0 +1,47 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGVIDEODSP_H +#define AVCODEC_MPEGVIDEODSP_H + +#include + +void ff_gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, + int dxx, int dxy, int dyx, int dyy, int shift, int r, + int width, int height); + +typedef struct MpegVideoDSPContext { + /** + * translational global motion compensation. + */ + void (*gmc1)(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, + int srcStride, int h, int x16, int y16, int rounder); + /** + * global motion compensation. + */ + void (*gmc)(uint8_t *dst /* align 8 */, uint8_t *src /* align 1 */, + int stride, int h, int ox, int oy, + int dxx, int dxy, int dyx, int dyy, + int shift, int r, int width, int height); +} MpegVideoDSPContext; + +void ff_mpegvideodsp_init(MpegVideoDSPContext *c); +void ff_mpegvideodsp_init_ppc(MpegVideoDSPContext *c); +void ff_mpegvideodsp_init_x86(MpegVideoDSPContext *c); + +#endif /* AVCODEC_MPEGVIDEODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideoencdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideoencdsp.h new file mode 100644 index 00000000..33f0282f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mpegvideoencdsp.h @@ -0,0 +1,58 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MPEGVIDEOENCDSP_H +#define AVCODEC_MPEGVIDEOENCDSP_H + +#include + +#include "avcodec.h" + +#define BASIS_SHIFT 16 +#define RECON_SHIFT 6 + +#define EDGE_TOP 1 +#define EDGE_BOTTOM 2 + +typedef struct MpegvideoEncDSPContext { + int (*try_8x8basis)(int16_t rem[64], int16_t weight[64], + int16_t basis[64], int scale); + void (*add_8x8basis)(int16_t rem[64], int16_t basis[64], int scale); + + int (*pix_sum)(uint8_t *pix, int line_size); + int (*pix_norm1)(uint8_t *pix, int line_size); + + void (*shrink[4])(uint8_t *dst, int dst_wrap, const uint8_t *src, + int src_wrap, int width, int height); + + void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, + int w, int h, int sides); +} MpegvideoEncDSPContext; + +void ff_mpegvideoencdsp_init(MpegvideoEncDSPContext *c, + AVCodecContext *avctx); +void ff_mpegvideoencdsp_init_arm(MpegvideoEncDSPContext *c, + AVCodecContext *avctx); +void ff_mpegvideoencdsp_init_ppc(MpegvideoEncDSPContext *c, + AVCodecContext *avctx); +void ff_mpegvideoencdsp_init_x86(MpegvideoEncDSPContext *c, + AVCodecContext *avctx); +void ff_mpegvideoencdsp_init_mips(MpegvideoEncDSPContext *c, + AVCodecContext *avctx); + +#endif /* AVCODEC_MPEGVIDEOENCDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mqc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mqc.h new file mode 100644 index 00000000..8bf7223d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mqc.h @@ -0,0 +1,96 @@ +/* + * MQ-coder: structures, common and decoder functions + * Copyright (c) 2007 Kamil Nowosad + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MQC_H +#define AVCODEC_MQC_H + +/** + * MQ-coder + * @file + * @author Kamil Nowosad + */ + +#include + +#define MQC_CX_UNI 17 +#define MQC_CX_RL 18 + +extern uint16_t ff_mqc_qe[2 * 47]; +extern uint8_t ff_mqc_nlps[2 * 47]; +extern uint8_t ff_mqc_nmps[2 * 47]; + +typedef struct MqcState { + uint8_t *bp, *bpstart; + unsigned int a; + unsigned int c; + unsigned int ct; + uint8_t cx_states[19]; + int raw; +} MqcState; + +/* encoder */ + +/** initialize the encoder */ +void ff_mqc_initenc(MqcState *mqc, uint8_t *bp); + +/** code bit d with context cx */ +void ff_mqc_encode(MqcState *mqc, uint8_t *cxstate, int d); + +/** number of encoded bytes */ +int ff_mqc_length(MqcState *mqc); + +/** flush the encoder [returns number of bytes encoded] */ +int ff_mqc_flush(MqcState *mqc); +int ff_mqc_flush_to(MqcState *mqc, uint8_t *dst, int *dst_len); + +/* decoder */ + +/** + * Initialize MQ-decoder. + * @param mqc MQ decoder state + * @param bp byte pointer + * @param raw raw mode + * @param reset reset states + */ +void ff_mqc_initdec(MqcState *mqc, uint8_t *bp, int raw, int reset); + +/** + * MQ decoder. + * @param mqc MQ decoder state + * @param cxstate Context + * @return Decision (0 to 1) + */ +int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate); + +/* common */ + +/** + * MQ-coder Initialize context tables (QE, NLPS, NMPS) + */ +void ff_mqc_init_context_tables(void); + +/** + * MQ-coder context initialisations. + * @param mqc MQ-coder context + */ +void ff_mqc_init_contexts(MqcState *mqc); + +#endif /* AVCODEC_MQC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msgsmdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msgsmdec.h new file mode 100644 index 00000000..b2a1a627 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msgsmdec.h @@ -0,0 +1,30 @@ +/* + * gsm 06.10 decoder, Microsoft variant + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MSGSMDEC_H +#define AVCODEC_MSGSMDEC_H + +#include "avcodec.h" + +int ff_msgsm_decode_block(AVCodecContext *avctx, int16_t *samples, + const uint8_t *buf, int mode); + +#endif /* AVCODEC_MSGSMDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4.h new file mode 100644 index 00000000..bcdb9674 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4.h @@ -0,0 +1,80 @@ +/* + * MSMPEG4 backend for encoder and decoder + * copyright (c) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MSMPEG4_H +#define AVCODEC_MSMPEG4_H + +#include + +#include "config.h" +#include "avcodec.h" +#include "mpegvideo.h" +#include "msmpeg4data.h" +#include "put_bits.h" + +#define INTER_INTRA_VLC_BITS 3 +#define MB_NON_INTRA_VLC_BITS 9 +#define MB_INTRA_VLC_BITS 9 + +#define II_BITRATE 128*1024 +#define MBAC_BITRATE 50*1024 + +#define DC_MAX 119 + +extern VLC ff_mb_non_intra_vlc[4]; +extern VLC ff_inter_intra_vlc; + +void ff_msmpeg4_code012(PutBitContext *pb, int n); +void ff_msmpeg4_common_init(MpegEncContext *s); +void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n); +void ff_msmpeg4_handle_slices(MpegEncContext *s); +void ff_msmpeg4_encode_motion(MpegEncContext * s, int mx, int my); +int ff_msmpeg4_coded_block_pred(MpegEncContext * s, int n, + uint8_t **coded_block_ptr); + +int ff_msmpeg4_encode_init(MpegEncContext *s); +void ff_msmpeg4_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_msmpeg4_encode_ext_header(MpegEncContext *s); +void ff_msmpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], + int motion_x, int motion_y); + +int ff_msmpeg4_decode_init(AVCodecContext *avctx); +int ff_msmpeg4_decode_picture_header(MpegEncContext *s); +int ff_msmpeg4_decode_ext_header(MpegEncContext *s, int buf_size); +int ff_msmpeg4_decode_motion(MpegEncContext * s, int *mx_ptr, int *my_ptr); +int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block, + int n, int coded, const uint8_t *scan_table); +int ff_msmpeg4_pred_dc(MpegEncContext *s, int n, + int16_t **dc_val_ptr, int *dir_ptr); + + +#define CONFIG_MSMPEG4_DECODER (CONFIG_MSMPEG4V1_DECODER || \ + CONFIG_MSMPEG4V2_DECODER || \ + CONFIG_MSMPEG4V3_DECODER || \ + CONFIG_WMV1_DECODER || \ + CONFIG_WMV2_DECODER || \ + CONFIG_VC1_DECODER) +#define CONFIG_MSMPEG4_ENCODER (CONFIG_MSMPEG4V2_ENCODER || \ + CONFIG_MSMPEG4V3_ENCODER || \ + CONFIG_WMV1_ENCODER || \ + CONFIG_WMV2_ENCODER) + +#endif /* AVCODEC_MSMPEG4_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4data.h new file mode 100644 index 00000000..02199d01 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msmpeg4data.h @@ -0,0 +1,88 @@ +/* + * MSMPEG4 backend for encoder and decoder + * copyright (c) 2001 Fabrice Bellard + * copyright (c) 2002-2004 Michael Niedermayer + * + * msmpeg4v1 & v2 stuff by Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MSMPEG4 data tables. + */ + +#ifndef AVCODEC_MSMPEG4DATA_H +#define AVCODEC_MSMPEG4DATA_H + +#include "libavutil/common.h" + +#include "rl.h" +#include "vlc.h" + +/* motion vector table */ +typedef struct MVTable { + int n; + const uint16_t *table_mv_code; + const uint8_t *table_mv_bits; + const uint8_t *table_mvx; + const uint8_t *table_mvy; + uint16_t *table_mv_index; /* encoding: convert mv to index in table_mv */ + VLC vlc; /* decoding: vlc */ +} MVTable; + +extern VLC ff_msmp4_mb_i_vlc; +extern VLC ff_msmp4_dc_luma_vlc[2]; +extern VLC ff_msmp4_dc_chroma_vlc[2]; + +/* intra picture macroblock coded block pattern */ +extern const uint16_t ff_msmp4_mb_i_table[64][2]; + +#define WMV1_SCANTABLE_COUNT 4 + +extern const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]; + +#define NB_RL_TABLES 6 + +extern RLTable ff_rl_table[NB_RL_TABLES]; +extern uint8_t ff_static_rl_table_store[NB_RL_TABLES][2][2 * MAX_RUN + MAX_LEVEL + 3]; + +extern uint32_t ff_v2_dc_lum_table[512][2]; +extern uint32_t ff_v2_dc_chroma_table[512][2]; + +extern const uint8_t ff_wmv1_y_dc_scale_table[32]; +extern const uint8_t ff_wmv1_c_dc_scale_table[32]; +extern const uint8_t ff_old_ff_y_dc_scale_table[32]; + +extern MVTable ff_mv_tables[2]; + +extern const uint8_t ff_v2_mb_type[8][2]; +extern const uint8_t ff_v2_intra_cbpc[4][2]; + +extern const uint32_t ff_table_mb_non_intra[128][2]; +extern const uint8_t ff_table_inter_intra[4][2]; + +extern const uint32_t ff_table0_dc_lum[120][2]; +extern const uint32_t ff_table1_dc_lum[120][2]; +extern const uint32_t ff_table0_dc_chroma[120][2]; +extern const uint32_t ff_table1_dc_chroma[120][2]; + +#define WMV2_INTER_CBP_TABLE_COUNT 4 +extern const uint32_t (* const ff_wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]; + +#endif /* AVCODEC_MSMPEG4DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msrledec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msrledec.h new file mode 100644 index 00000000..7f7bbcf9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/msrledec.h @@ -0,0 +1,39 @@ +/* + * Microsoft RLE decoder + * Copyright (C) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MSRLEDEC_H +#define AVCODEC_MSRLEDEC_H + +#include "avcodec.h" +#include "bytestream.h" + +/** + * Decode stream in MS RLE format into frame. + * + * @param avctx codec context + * @param pic destination frame + * @param depth bit depth + * @param gb input bytestream context + */ +int ff_msrle_decode(AVCodecContext *avctx, AVFrame *pic, + int depth, GetByteContext *gb); + +#endif /* AVCODEC_MSRLEDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss12.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss12.h new file mode 100644 index 00000000..6f68fc3d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss12.h @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2012 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Common header for Microsoft Screen 1 and 2 + */ + +#ifndef AVCODEC_MSS12_H +#define AVCODEC_MSS12_H + +#include "libavutil/intreadwrite.h" +#include "avcodec.h" +#include "get_bits.h" +#include "bytestream.h" + +#define MODEL_MIN_SYMS 2 +#define MODEL_MAX_SYMS 256 +#define THRESH_ADAPTIVE -1 +#define THRESH_LOW 15 +#define THRESH_HIGH 50 + +typedef struct Model { + int16_t cum_prob[MODEL_MAX_SYMS + 1]; + int16_t weights[MODEL_MAX_SYMS + 1]; + uint8_t idx2sym[MODEL_MAX_SYMS + 1]; + int num_syms; + int thr_weight, threshold; +} Model; + +typedef struct ArithCoder { + int low, high, value; + int overread; +#define MAX_OVERREAD 16 + union { + GetBitContext *gb; + GetByteContext *gB; + } gbc; + int (*get_model_sym)(struct ArithCoder *c, Model *m); + int (*get_number) (struct ArithCoder *c, int n); +} ArithCoder; + +typedef struct PixContext { + int cache_size, num_syms; + uint8_t cache[12]; + Model cache_model, full_model; + Model sec_models[15][4]; + int special_initial_cache; +} PixContext; + +struct MSS12Context; + +typedef struct SliceContext { + struct MSS12Context *c; + Model intra_region, inter_region; + Model pivot, edge_mode, split_mode; + PixContext intra_pix_ctx, inter_pix_ctx; +} SliceContext; + +typedef struct MSS12Context { + AVCodecContext *avctx; + uint32_t pal[256]; + uint8_t *pal_pic; + uint8_t *last_pal_pic; + ptrdiff_t pal_stride; + uint8_t *mask; + ptrdiff_t mask_stride; + uint8_t *rgb_pic; + uint8_t *last_rgb_pic; + ptrdiff_t rgb_stride; + int free_colours; + int keyframe; + int mvX, mvY; + int corrupted; + int slice_split; + int full_model_syms; +} MSS12Context; + +int ff_mss12_decode_rect(SliceContext *ctx, ArithCoder *acoder, + int x, int y, int width, int height); +void ff_mss12_model_update(Model *m, int val); +void ff_mss12_slicecontext_reset(SliceContext *sc); +int ff_mss12_decode_init(MSS12Context *c, int version, + SliceContext *sc1, SliceContext *sc2); +int ff_mss12_decode_end(MSS12Context *ctx); + +#define ARITH_GET_BIT(prefix) \ +static int prefix ## _get_bit(ArithCoder *c) \ +{ \ + int range = c->high - c->low + 1; \ + int bit = 2 * c->value - c->low >= c->high; \ + \ + if (bit) \ + c->low += range >> 1; \ + else \ + c->high = c->low + (range >> 1) - 1; \ + \ + prefix ## _normalise(c); \ + \ + return bit; \ +} + +#define ARITH_GET_MODEL_SYM(prefix) \ +static int prefix ## _get_model_sym(ArithCoder *c, Model *m) \ +{ \ + int idx, val; \ + \ + idx = prefix ## _get_prob(c, m->cum_prob); \ + \ + val = m->idx2sym[idx]; \ + ff_mss12_model_update(m, idx); \ + \ + prefix ## _normalise(c); \ + \ + return val; \ +} + +#endif /* AVCODEC_MSS12_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss2dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss2dsp.h new file mode 100644 index 00000000..e44c9ab5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss2dsp.h @@ -0,0 +1,52 @@ +/* + * Microsoft Screen 2 (aka Windows Media Video V9 Screen) decoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Microsoft Screen 2 (aka Windows Media Video V9 Screen) decoder DSP routines + */ + +#ifndef AVCODEC_MSS2DSP_H +#define AVCODEC_MSS2DSP_H + +#include +#include + +typedef struct MSS2DSPContext { + void (*mss2_blit_wmv9)(uint8_t *dst, ptrdiff_t dst_stride, + const uint8_t *srcy, ptrdiff_t srcy_stride, + const uint8_t *srcu, const uint8_t *srcv, + ptrdiff_t srcuv_stride, int w, int h); + void (*mss2_blit_wmv9_masked)(uint8_t *dst, ptrdiff_t dst_stride, + int maskcolor, const uint8_t *mask, + ptrdiff_t mask_stride, + const uint8_t *srcy, ptrdiff_t srcy_stride, + const uint8_t *srcu, const uint8_t *srcv, + ptrdiff_t srcuv_stride, int w, int h); + void (*mss2_gray_fill_masked)(uint8_t *dst, ptrdiff_t dst_stride, + int maskcolor, const uint8_t *mask, + ptrdiff_t mask_stride, int w, int h); + void (*upsample_plane)(uint8_t *plane, ptrdiff_t plane_stride, + int w, int h); +} MSS2DSPContext; + +void ff_mss2dsp_init(MSS2DSPContext *dsp); + +#endif /* AVCODEC_MSS2DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss34dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss34dsp.h new file mode 100644 index 00000000..29c61e34 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/mss34dsp.h @@ -0,0 +1,46 @@ +/* + * Common stuff for some Microsoft Screen codecs + * Copyright (C) 2012 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_MSS34DSP_H +#define AVCODEC_MSS34DSP_H + +#include +#include + +/** + * Generate quantisation matrix for given quality. + * + * @param qmat destination matrix + * @param quality quality setting (1-100) + * @param luma generate quantisation matrix for luma or chroma + */ +void ff_mss34_gen_quant_mat(uint16_t *qmat, int quality, int luma); + +/** + * Transform and output DCT block. + * + * @param dst output plane + * @param stride output plane stride + * @param block block to transform and output + */ +void ff_mss34_dct_put(uint8_t *dst, ptrdiff_t stride, int *block); + +#endif /* AVCODEC_MSS34DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nellymoser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nellymoser.h new file mode 100644 index 00000000..027fc7ed --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nellymoser.h @@ -0,0 +1,57 @@ +/* + * Common code between Nellymoser encoder and decoder + * Copyright (c) 2007 a840bda5870ba11f19698ff6eb9581dfb0f95fa5, + * 539459aeb7d425140b62a3ec7dbf6dc8e408a306, and + * 520e17cd55896441042b14df2566a6eb610ed444 + * Copyright (c) 2007 Loic Minier + * Benjamin Larsson + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +/** + * @file + * The 3 alphanumeric copyright notices are md5summed they are from the original + * implementors. The original code is available from http://code.google.com/p/nelly2pcm/ + */ + +#ifndef AVCODEC_NELLYMOSER_H +#define AVCODEC_NELLYMOSER_H + +#include "avcodec.h" + +#define NELLY_BANDS 23 +#define NELLY_BLOCK_LEN 64 +#define NELLY_HEADER_BITS 116 +#define NELLY_DETAIL_BITS 198 +#define NELLY_BUF_LEN 128 +#define NELLY_FILL_LEN 124 +#define NELLY_BIT_CAP 6 +#define NELLY_BASE_OFF 4228 +#define NELLY_BASE_SHIFT 19 +#define NELLY_SAMPLES (2 * NELLY_BUF_LEN) + +extern const float ff_nelly_dequantization_table[127]; +extern const uint8_t ff_nelly_band_sizes_table[NELLY_BANDS]; +extern const uint16_t ff_nelly_init_table[64]; +extern const int16_t ff_nelly_delta_table[32]; + +void ff_nelly_get_sample_bits(const float *buf, int *bits); + +#endif /* AVCODEC_NELLYMOSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvdec.h new file mode 100644 index 00000000..09ae8c37 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvdec.h @@ -0,0 +1,81 @@ +/* + * HW decode acceleration through NVDEC + * + * Copyright (c) 2016 Anton Khirnov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_NVDEC_H +#define AVCODEC_NVDEC_H + +#include "compat/cuda/dynlink_loader.h" + +#include + +#include "libavutil/buffer.h" +#include "libavutil/frame.h" + +#include "avcodec.h" + +#if defined(NVDECAPI_MAJOR_VERSION) && defined(NVDECAPI_MINOR_VERSION) +# define NVDECAPI_CHECK_VERSION(major, minor) \ + ((major) < NVDECAPI_MAJOR_VERSION || ((major) == NVDECAPI_MAJOR_VERSION && (minor) <= NVDECAPI_MINOR_VERSION)) +#else +/* version macros were added in SDK 8.1 ffnvcodec */ +# define NVDECAPI_CHECK_VERSION(major, minor) \ + ((major) < 8 || ((major) == 8 && (minor) <= 0)) +#endif + +typedef struct NVDECFrame { + unsigned int idx; + AVBufferRef *idx_ref; + AVBufferRef *decoder_ref; +} NVDECFrame; + +typedef struct NVDECContext { + CUVIDPICPARAMS pic_params; + + AVBufferPool *decoder_pool; + + AVBufferRef *decoder_ref; + + uint8_t *bitstream; + int bitstream_len; + unsigned int bitstream_allocated; + + unsigned *slice_offsets; + int nb_slices; + unsigned int slice_offsets_allocated; + + int supports_444; +} NVDECContext; + +int ff_nvdec_decode_init(AVCodecContext *avctx); +int ff_nvdec_decode_uninit(AVCodecContext *avctx); +int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame); +int ff_nvdec_end_frame(AVCodecContext *avctx); +int ff_nvdec_simple_end_frame(AVCodecContext *avctx); +int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, + uint32_t size); +int ff_nvdec_frame_params(AVCodecContext *avctx, + AVBufferRef *hw_frames_ctx, + int dpb_size, + int supports_444); +int ff_nvdec_get_ref_idx(AVFrame *frame); + +#endif /* AVCODEC_NVDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvenc.h new file mode 100644 index 00000000..7a415a48 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/nvenc.h @@ -0,0 +1,218 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_NVENC_H +#define AVCODEC_NVENC_H + +#include "config.h" + +#if CONFIG_D3D11VA +#define COBJMACROS +#include "libavutil/hwcontext_d3d11va.h" +#else +typedef void ID3D11Device; +#endif + +#include + +#include "compat/cuda/dynlink_loader.h" +#include "libavutil/fifo.h" +#include "libavutil/opt.h" +#include "hwconfig.h" + +#include "avcodec.h" + +#define MAX_REGISTERED_FRAMES 64 +#define RC_MODE_DEPRECATED 0x800000 +#define RCD(rc_mode) ((rc_mode) | RC_MODE_DEPRECATED) + +#define NVENCAPI_CHECK_VERSION(major, minor) \ + ((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION)) + +// SDK 8.1 compile time feature checks +#if NVENCAPI_CHECK_VERSION(8, 1) +#define NVENC_HAVE_BFRAME_REF_MODE +#define NVENC_HAVE_QP_MAP_MODE +#endif + +// SDK 9.0 compile time feature checks +#if NVENCAPI_CHECK_VERSION(9, 0) +#define NVENC_HAVE_HEVC_BFRAME_REF_MODE +#endif + +// SDK 9.1 compile time feature checks +#if NVENCAPI_CHECK_VERSION(9, 1) +#define NVENC_HAVE_MULTIPLE_REF_FRAMES +#define NVENC_HAVE_CUSTREAM_PTR +#define NVENC_HAVE_GETLASTERRORSTRING +#endif + +typedef struct NvencSurface +{ + NV_ENC_INPUT_PTR input_surface; + AVFrame *in_ref; + int reg_idx; + int width; + int height; + int pitch; + + NV_ENC_OUTPUT_PTR output_surface; + NV_ENC_BUFFER_FORMAT format; + int size; +} NvencSurface; + +typedef struct NvencDynLoadFunctions +{ + CudaFunctions *cuda_dl; + NvencFunctions *nvenc_dl; + + NV_ENCODE_API_FUNCTION_LIST nvenc_funcs; + int nvenc_device_count; +} NvencDynLoadFunctions; + +enum { + PRESET_DEFAULT = 0, + PRESET_SLOW, + PRESET_MEDIUM, + PRESET_FAST, + PRESET_HP, + PRESET_HQ, + PRESET_BD , + PRESET_LOW_LATENCY_DEFAULT , + PRESET_LOW_LATENCY_HQ , + PRESET_LOW_LATENCY_HP, + PRESET_LOSSLESS_DEFAULT, // lossless presets must be the last ones + PRESET_LOSSLESS_HP, +}; + +enum { + NV_ENC_H264_PROFILE_BASELINE, + NV_ENC_H264_PROFILE_MAIN, + NV_ENC_H264_PROFILE_HIGH, + NV_ENC_H264_PROFILE_HIGH_444P, +}; + +enum { + NV_ENC_HEVC_PROFILE_MAIN, + NV_ENC_HEVC_PROFILE_MAIN_10, + NV_ENC_HEVC_PROFILE_REXT, +}; + +enum { + NVENC_LOWLATENCY = 1, + NVENC_LOSSLESS = 2, + NVENC_ONE_PASS = 4, + NVENC_TWO_PASSES = 8, +}; + +enum { + LIST_DEVICES = -2, + ANY_DEVICE, +}; + +typedef struct NvencContext +{ + AVClass *avclass; + + NvencDynLoadFunctions nvenc_dload_funcs; + + NV_ENC_INITIALIZE_PARAMS init_encode_params; + NV_ENC_CONFIG encode_config; + CUcontext cu_context; + CUcontext cu_context_internal; + CUstream cu_stream; + ID3D11Device *d3d11_device; + + int nb_surfaces; + NvencSurface *surfaces; + + AVFifoBuffer *unused_surface_queue; + AVFifoBuffer *output_surface_queue; + AVFifoBuffer *output_surface_ready_queue; + AVFifoBuffer *timestamp_list; + + int encoder_flushing; + + struct { + void *ptr; + int ptr_index; + NV_ENC_REGISTERED_PTR regptr; + int mapped; + NV_ENC_MAP_INPUT_RESOURCE in_map; + } registered_frames[MAX_REGISTERED_FRAMES]; + int nb_registered_frames; + + /* the actual data pixel format, different from + * AVCodecContext.pix_fmt when using hwaccel frames on input */ + enum AVPixelFormat data_pix_fmt; + + int support_dyn_bitrate; + + void *nvencoder; + + int preset; + int profile; + int level; + int tier; + int rc; + int cbr; + int twopass; + int device; + int flags; + int async_depth; + int rc_lookahead; + int aq; + int no_scenecut; + int forced_idr; + int b_adapt; + int temporal_aq; + int zerolatency; + int nonref_p; + int strict_gop; + int aq_strength; + float quality; + int aud; + int bluray_compat; + int init_qp_p; + int init_qp_b; + int init_qp_i; + int cqp; + int weighted_pred; + int coder; + int b_ref_mode; + int a53_cc; + int dpb_size; +} NvencContext; + +int ff_nvenc_encode_init(AVCodecContext *avctx); + +int ff_nvenc_encode_close(AVCodecContext *avctx); + +int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame); + +int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt); + +int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, + const AVFrame *frame, int *got_packet); + +void ff_nvenc_encode_flush(AVCodecContext *avctx); + +extern const enum AVPixelFormat ff_nvenc_pix_fmts[]; +extern const AVCodecHWConfigInternal *ff_nvenc_hw_configs[]; + +#endif /* AVCODEC_NVENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/on2avcdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/on2avcdata.h new file mode 100644 index 00000000..dc7833fe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/on2avcdata.h @@ -0,0 +1,82 @@ +/* + * On2 Audio for Video Codec decoder + * + * Copyright (c) 2013 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ON2AVCDATA_H +#define AVCODEC_ON2AVCDATA_H + +#include + +#define ON2AVC_MAX_BANDS 112 +#define ON2AVC_ESC_CB 15 + +typedef struct On2AVCMode { + int num_windows; + int num_bands; + const int *band_start; +} On2AVCMode; + +extern const On2AVCMode ff_on2avc_modes_40[8]; +extern const On2AVCMode ff_on2avc_modes_44[8]; + +#define ON2AVC_SCALE_DIFFS 121 +extern const uint32_t ff_on2avc_scale_diff_codes[]; +extern const uint8_t ff_on2avc_scale_diff_bits[]; + +extern const uint32_t * const ff_on2avc_quad_cb_codes[]; +extern const uint8_t * const ff_on2avc_quad_cb_bits[]; +extern const uint16_t * const ff_on2avc_quad_cb_syms[]; +extern const int ff_on2avc_quad_cb_elems[]; +extern const uint16_t * const ff_on2avc_pair_cb_codes[]; +extern const uint8_t * const ff_on2avc_pair_cb_bits[]; +extern const uint16_t * const ff_on2avc_pair_cb_syms[]; +extern const int ff_on2avc_pair_cb_elems[]; + +extern const float ff_on2avc_window_long_32000[1024]; +extern const float ff_on2avc_window_long_24000[1024]; +extern const float ff_on2avc_window_short[128]; + +extern const double ff_on2avc_tab_10_1[]; +extern const double ff_on2avc_tab_10_2[]; +extern const double ff_on2avc_tab_20_1[]; +extern const double ff_on2avc_tab_20_2[]; +extern const double ff_on2avc_tab_40_1[]; +extern const double ff_on2avc_tab_40_2[]; +extern const double ff_on2avc_tab_84_1[]; +extern const double ff_on2avc_tab_84_2[]; +extern const double ff_on2avc_tab_84_3[]; +extern const double ff_on2avc_tab_84_4[]; +extern const double * const ff_on2avc_tabs_4_10_1[4]; +extern const double * const ff_on2avc_tabs_4_10_2[4]; +extern const double * const ff_on2avc_tabs_9_20_1[9]; +extern const double * const ff_on2avc_tabs_9_20_2[9]; +extern const double * const ff_on2avc_tabs_19_40_1[19]; +extern const double * const ff_on2avc_tabs_19_40_2[19]; +extern const double * const ff_on2avc_tabs_20_84_1[20]; +extern const double * const ff_on2avc_tabs_20_84_2[20]; +extern const double * const ff_on2avc_tabs_20_84_3[20]; +extern const double * const ff_on2avc_tabs_20_84_4[20]; +extern const float ff_on2avc_ctab_1[2048]; +extern const float ff_on2avc_ctab_2[2048]; +extern const float ff_on2avc_ctab_3[2048]; +extern const float ff_on2avc_ctab_4[2048]; + +#endif /* AVCODEC_ON2AVCDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/options_table.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/options_table.h new file mode 100644 index 00000000..8ba137f5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/options_table.h @@ -0,0 +1,483 @@ +/* + * Copyright (c) 2001 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPTIONS_TABLE_H +#define AVCODEC_OPTIONS_TABLE_H + +#include +#include +#include + +#include "libavutil/opt.h" +#include "avcodec.h" +#include "version.h" + +#define OFFSET(x) offsetof(AVCodecContext,x) +#define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C +//these names are too long to be readable +#define V AV_OPT_FLAG_VIDEO_PARAM +#define A AV_OPT_FLAG_AUDIO_PARAM +#define S AV_OPT_FLAG_SUBTITLE_PARAM +#define E AV_OPT_FLAG_ENCODING_PARAM +#define D AV_OPT_FLAG_DECODING_PARAM +#define CC AV_OPT_FLAG_CHILD_CONSTS + +#define AV_CODEC_DEFAULT_BITRATE 200*1000 + +static const AVOption avcodec_options[] = { +{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT64_MAX, A|V|E}, +{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, +{"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far " + "ratecontrol is willing to deviate from the target average bitrate value. This is not related " + "to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.", + OFFSET(bit_rate_tolerance), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE*20 }, 1, INT_MAX, V|E}, +{"flags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, UINT_MAX, V|A|S|E|D, "flags"}, +{"unaligned", "allow decoders to produce unaligned output", 0, AV_OPT_TYPE_CONST, { .i64 = AV_CODEC_FLAG_UNALIGNED }, INT_MIN, INT_MAX, V | D, "flags" }, +{"mv4", "use four motion vectors per macroblock (MPEG-4)", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"}, +{"qpel", "use 1/4-pel motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QPEL }, INT_MIN, INT_MAX, V|E, "flags"}, +{"loop", "use loop filter", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOOP_FILTER }, INT_MIN, INT_MAX, V|E, "flags"}, +{"qscale", "use fixed qscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_QSCALE }, INT_MIN, INT_MAX, 0, "flags"}, +{"pass1", "use internal 2-pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"}, +{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"}, +{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"}, +{"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"}, +{"truncated", "Input bitstream might be randomly truncated", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, V|D, "flags"}, +{"ildct", "use interlaced DCT", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_DCT }, INT_MIN, INT_MAX, V|E, "flags"}, +{"low_delay", "force low delay", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_LOW_DELAY }, INT_MIN, INT_MAX, V|D|E, "flags"}, +{"global_header", "place global headers in extradata instead of every keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GLOBAL_HEADER }, INT_MIN, INT_MAX, V|A|E, "flags"}, +{"bitexact", "use only bitexact functions (except (I)DCT)", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_BITEXACT }, INT_MIN, INT_MAX, A|V|S|D|E, "flags"}, +{"aic", "H.263 advanced intra coding / MPEG-4 AC prediction", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_AC_PRED }, INT_MIN, INT_MAX, V|E, "flags"}, +{"ilme", "interlaced motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_INTERLACED_ME }, INT_MIN, INT_MAX, V|E, "flags"}, +{"cgop", "closed GOP", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_CLOSED_GOP }, INT_MIN, INT_MAX, V|E, "flags"}, +{"output_corrupt", "Output even potentially corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_OUTPUT_CORRUPT }, INT_MIN, INT_MAX, V|D, "flags"}, +{"drop_changed", "Drop frames whose parameters differ from first decoded frame", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_DROPCHANGED }, INT_MIN, INT_MAX, A|V|D, "flags"}, +{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, V|A|E|D|S, "flags2"}, +{"fast", "allow non-spec-compliant speedup tricks", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_FAST }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"ignorecrop", "ignore cropping information from sps", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"}, +{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"}, +{"chunks", "Frame data might be split into multiple chunks", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_CHUNKS }, INT_MIN, INT_MAX, V|D, "flags2"}, +{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"}, +{"export_mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_EXPORT_MVS}, INT_MIN, INT_MAX, V|D, "flags2"}, +{"skip_manual", "do not skip samples and export skip information as frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_SKIP_MANUAL}, INT_MIN, INT_MAX, A|D, "flags2"}, +{"ass_ro_flush_noop", "do not reset ASS ReadOrder field on flush", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_RO_FLUSH_NOOP}, INT_MIN, INT_MAX, S|D, "flags2"}, +{"export_side_data", "Export metadata as side data", OFFSET(export_side_data), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, A|V|S|D|E, "export_side_data"}, +{"mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_MVS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, +{"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, "export_side_data"}, +{"venc_params", "export video encoding parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS}, INT_MIN, INT_MAX, V|D, "export_side_data"}, +{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX}, +{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, +{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, +{"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, +{"cutoff", "set cutoff bandwidth", OFFSET(cutoff), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|E}, +{"frame_size", NULL, OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|E}, +{"frame_number", NULL, OFFSET(frame_number), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"delay", NULL, OFFSET(delay), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"qcomp", "video quantizer scale compression (VBR). Constant of ratecontrol equation. " + "Recommended range for default rc_eq: 0.0-1.0", + OFFSET(qcompress), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -FLT_MAX, FLT_MAX, V|E}, +{"qblur", "video quantizer scale blur (VBR)", OFFSET(qblur), AV_OPT_TYPE_FLOAT, {.dbl = 0.5 }, -1, FLT_MAX, V|E}, +{"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E}, +{"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 1024, V|E}, +{"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E}, +{"bf", "set maximum number of B-frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E}, +{"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, +#if FF_API_PRIVATE_OPT +{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E}, +{"ps", "RTP payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +#if FF_API_STAT_BITS +{"mv_bits", NULL, OFFSET(mv_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"header_bits", NULL, OFFSET(header_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"i_tex_bits", NULL, OFFSET(i_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"p_tex_bits", NULL, OFFSET(p_tex_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"i_count", NULL, OFFSET(i_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"p_count", NULL, OFFSET(p_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"skip_count", NULL, OFFSET(skip_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"misc_bits", NULL, OFFSET(misc_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"frame_bits", NULL, OFFSET(frame_bits), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +#endif +{"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, +{"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"}, +{"xvid_ilace", "Xvid interlacing bug (autodetected if FOURCC == XVIX)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_XVID_ILACE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"ump4", "(autodetected if FOURCC == UMP4)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_UMP4 }, INT_MIN, INT_MAX, V|D, "bug"}, +{"no_padding", "padding bug (autodetected)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_NO_PADDING }, INT_MIN, INT_MAX, V|D, "bug"}, +{"amv", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AMV }, INT_MIN, INT_MAX, V|D, "bug"}, +{"qpel_chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_QPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, +{"std_qpel", "old standard qpel (autodetected per FOURCC/version)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_STD_QPEL }, INT_MIN, INT_MAX, V|D, "bug"}, +{"qpel_chroma2", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_QPEL_CHROMA2 }, INT_MIN, INT_MAX, V|D, "bug"}, +{"direct_blocksize", "direct-qpel-blocksize bug (autodetected per FOURCC/version)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_DIRECT_BLOCKSIZE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"edge", "edge padding bug (autodetected per FOURCC/version)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_EDGE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"hpel_chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_HPEL_CHROMA }, INT_MIN, INT_MAX, V|D, "bug"}, +{"dc_clip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_DC_CLIP }, INT_MIN, INT_MAX, V|D, "bug"}, +{"ms", "work around various bugs in Microsoft's broken decoders", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_MS }, INT_MIN, INT_MAX, V|D, "bug"}, +{"trunc", "truncated frames", 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_TRUNCATED}, INT_MIN, INT_MAX, V|D, "bug"}, +{"iedge", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_IEDGE }, INT_MIN, INT_MAX, V|D, "bug"}, +{"strict", "how strictly to follow the standards", OFFSET(strict_std_compliance), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"very", "strictly conform to a older more strict version of the spec or reference software", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_VERY_STRICT }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"strict", "strictly conform to all the things in the spec no matter what the consequences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"normal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"experimental", "allow non-standardized experimental things", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, A|V|D|E, "strict"}, +{"b_qoffset", "QP offset between P- and B-frames", OFFSET(b_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, +{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BUFFER }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"ignore_err", "ignore errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_IGNORE_ERR }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"careful", "consider things that violate the spec, are fast to check and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT | AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"aggressive", "consider things that a sane encoder should not do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, A|V|D, "err_detect"}, +{"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, +{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, +#if FF_API_PRIVATE_OPT +{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"rc_override_count", NULL, OFFSET(rc_override_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E}, +{"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.", + OFFSET(rc_min_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +{"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|V|E}, +{"i_qfactor", "QP factor between P- and I-frames", OFFSET(i_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX, V|E}, +{"i_qoffset", "QP offset between P- and I-frames", OFFSET(i_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX, V|E}, +{"dct", "DCT algorithm", OFFSET(dct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E, "dct"}, +{"auto", "autoselect a good one", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"}, +{"fastint", "fast integer", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"}, +{"int", "accurate integer", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_INT }, INT_MIN, INT_MAX, V|E, "dct"}, +{"mmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"}, +{"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"}, +{"faan", "floating point AAN DCT", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"}, +{"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"tcplx_mask", "temporal complexity masking", OFFSET(temporal_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"p_mask", "inter masking", OFFSET(p_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"dark_mask", "compresses dark areas stronger than medium ones", OFFSET(dark_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, +{"idct", "select IDCT implementation", OFFSET(idct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E|D, "idct"}, +{"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_AUTO }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"int", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simple", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"arm", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearm", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearmv5te", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV5TE }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simplearmv6", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEARMV6 }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"simpleneon", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLENEON }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"xvid", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"xvidmmx", "deprecated, for compatibility only", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_XVID }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"faani", "floating point AAN IDCT", 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_FAAN }, INT_MIN, INT_MAX, V|D|E, "idct"}, +{"simpleauto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_SIMPLEAUTO }, INT_MIN, INT_MAX, V|E|D, "idct"}, +{"slice_count", NULL, OFFSET(slice_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"ec", "set error concealment strategy", OFFSET(error_concealment), AV_OPT_TYPE_FLAGS, {.i64 = 3 }, INT_MIN, INT_MAX, V|D, "ec"}, +{"guess_mvs", "iterative motion vector (MV) search (slow)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_GUESS_MVS }, INT_MIN, INT_MAX, V|D, "ec"}, +{"deblock", "use strong deblock filter for damaged MBs", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"}, +{"favor_inter", "favor predicting from the previous frame", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_FAVOR_INTER }, INT_MIN, INT_MAX, V|D, "ec"}, +{"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, +#if FF_API_PRIVATE_OPT +{"pred", "prediction method", OFFSET(prediction_method), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"}, +{"left", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"}, +{"plane", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"}, +{"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, +#endif +{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, +{"sar", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, +{"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, +{"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, +{"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, +{"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BITSTREAM }, INT_MIN, INT_MAX, V|D, "debug"}, +{"mb_type", "macroblock (MB) type", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, +{"qp", "per-block quantization parameter (QP)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"}, +#if FF_API_DEBUG_MV +{"mv", "motion vector", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MV }, INT_MIN, INT_MAX, V|D, "debug"}, +#endif +{"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_DCT_COEFF }, INT_MIN, INT_MAX, V|D, "debug"}, +{"green_metadata", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_GREEN_MD }, INT_MIN, INT_MAX, V|D, "debug"}, +{"skip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_SKIP }, INT_MIN, INT_MAX, V|D, "debug"}, +{"startcode", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_STARTCODE }, INT_MIN, INT_MAX, V|D, "debug"}, +{"er", "error recognition", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_ER }, INT_MIN, INT_MAX, V|D, "debug"}, +{"mmco", "memory management control operations (H.264)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"}, +{"bugs", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUGS }, INT_MIN, INT_MAX, V|D, "debug"}, +#if FF_API_DEBUG_MV +{"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX, V|D, "debug"}, +{"vis_mb_type", "visualize block types", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"}, +#endif +{"buffers", "picture buffer allocations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"}, +{"thread_ops", "threading operations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|A|D, "debug"}, +{"nomc", "skip motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_NOMC }, INT_MIN, INT_MAX, V|A|D, "debug"}, +{"dia_size", "diamond type & size for motion estimation", OFFSET(dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"last_pred", "amount of motion predictors from the previous frame", OFFSET(last_predictor_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#if FF_API_PRIVATE_OPT +{"preme", "pre motion estimation", OFFSET(pre_me), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"pre_dia_size", "diamond type & size for motion estimation pre-pass", OFFSET(pre_dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E}, +{"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +#if FF_API_CODER_TYPE +{"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"}, +{"vlc", "variable length coder / Huffman coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"}, +{"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"}, +{"raw", "raw (no encoding)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RAW }, INT_MIN, INT_MAX, V|E, "coder"}, +{"rle", "run-length coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RLE }, INT_MIN, INT_MAX, V|E, "coder"}, +#endif /* FF_API_CODER_TYPE */ +#if FF_API_PRIVATE_OPT +{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX}, +{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 2, V|E, "mbd"}, +{"simple", "use mbcmp", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"}, +{"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"}, +#if FF_API_PRIVATE_OPT +{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +#if FF_API_PRIVATE_OPT +{"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"threads", "set the number of threads", OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|A|E|D, "threads"}, +{"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"}, +{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), AV_OPT_TYPE_INT, {.i64 = 0 }, -8, 16, V|E}, +{"nssew", "nsse weight", OFFSET(nsse_weight), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E}, +{"skip_top", "number of macroblock rows at the top which are skipped", OFFSET(skip_top), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, +{"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, +{"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"}, +{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"}, +{"main10", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_HEVC_MAIN_10 }, INT_MIN, INT_MAX, V|E, "avctx.profile"}, +{"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, +{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, +{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D}, +#if FF_API_PRIVATE_OPT +{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#endif +{"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"subcmp", "sub-pel ME compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"mbcmp", "macroblock compare function", OFFSET(mb_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"ildctcmp", "interlaced DCT compare function", OFFSET(ildct_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"precmp", "pre motion estimation compare function", OFFSET(me_pre_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"sad", "sum of absolute differences, fast", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"sse", "sum of squared errors", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"satd", "sum of absolute Hadamard transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SATD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"dct", "sum of absolute DCT transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"psnr", "sum of squared quantization errors (avoid, low quality)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_PSNR }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"bit", "number of bits needed for the block", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_BIT }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"rd", "rate distortion optimal, slow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_RD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"zero", "0", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_ZERO }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"vsad", "sum of absolute vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"vsse", "sum of squared vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"nsse", "noise preserving sum of squared differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_NSSE }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#if CONFIG_SNOW_ENCODER +{"w53", "5/3 wavelet, only used in snow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_W53 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"w97", "9/7 wavelet, only used in snow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_W97 }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +#endif +{"dctmax", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_CHROMA }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"msad", "sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"}, +{"mblmin", "minimum macroblock Lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E}, +{"mblmax", "maximum macroblock Lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E}, +#if FF_API_PRIVATE_OPT +{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, V|E}, +#endif +{"skip_loop_filter", "skip loop filtering process for the selected frames", OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"skip_idct" , "skip IDCT/dequantization for the selected frames", OFFSET(skip_idct), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"skip_frame" , "skip decoding for the selected frames", OFFSET(skip_frame), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"none" , "discard no frame", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"default" , "discard useless frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"noref" , "discard all non-reference frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONREF }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"bidir" , "discard all bidirectional frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_BIDIR }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nokey" , "discard all frames except keyframes", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONKEY }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, +{"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, +#if FF_API_PRIVATE_OPT +{"brd_scale", "downscale frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 10, V|E}, +#endif +{"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, +{"refs", "reference frames to consider for motion compensation", OFFSET(refs), AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX, V|E}, +#if FF_API_PRIVATE_OPT +{"chromaoffset", "chroma QP offset from luma", OFFSET(chromaoffset), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, +#endif +{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +{"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.i64 = 256 }, 0, INT_MAX, V|E}, +#if FF_API_PRIVATE_OPT +{"b_sensitivity", "adjust sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, V|E}, +#endif +{"compression_level", NULL, OFFSET(compression_level), AV_OPT_TYPE_INT, {.i64 = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E}, +#if FF_API_PRIVATE_OPT +{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, +{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E}, +{"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, V|E}, +#endif +{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, +{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"}, +{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"}, +{"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, +{"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, +{"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, +{"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, INT_MAX, V|E|D, "color_primaries_type"}, +{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"bt470m", "BT.470 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT470M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"bt470bg", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT470BG }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"film", "Film", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_FILM }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"bt2020", "BT.2020", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT2020 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte428", "SMPTE 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE428 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte428_1", "SMPTE 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE428 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte431", "SMPTE 431-2", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE431 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"smpte432", "SMPTE 422-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE432 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"jedec-p22", "JEDEC P22", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_JEDEC_P22 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"ebu3213", "EBU 3213-E", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_EBU3213 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, +{"color_trc", "color transfer characteristics", OFFSET(color_trc), AV_OPT_TYPE_INT, {.i64 = AVCOL_TRC_UNSPECIFIED }, 1, INT_MAX, V|E|D, "color_trc_type"}, +{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"gamma22", "BT.470 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_GAMMA22 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"gamma28", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_GAMMA28 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"linear", "Linear", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LINEAR }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"log100", "Log", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"log316", "Log square root", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG_SQRT }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"iec61966-2-4", "IEC 61966-2-4", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_4 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt1361e", "BT.1361", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT1361_ECG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"iec61966-2-1", "IEC 61966-2-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt2020-10", "BT.2020 - 10 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_10 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt2020-12", "BT.2020 - 12 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_12 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"smpte2084", "SMPTE 2084", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE2084 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"smpte428", "SMPTE 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE428 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"arib-std-b67", "ARIB STD-B67", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_ARIB_STD_B67 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"log", "Log", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"log_sqrt", "Log square root", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG_SQRT }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"iec61966_2_4", "IEC 61966-2-4", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_4 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt1361", "BT.1361", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT1361_ECG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"iec61966_2_1", "IEC 61966-2-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt2020_10bit", "BT.2020 - 10 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_10 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"bt2020_12bit", "BT.2020 - 12 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_12 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"smpte428_1", "SMPTE 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE428 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, +{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = AVCOL_SPC_UNSPECIFIED }, 0, INT_MAX, V|E|D, "colorspace_type"}, +{"rgb", "RGB", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_RGB }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT709 }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"fcc", "FCC", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_FCC }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt470bg", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT470BG }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"ycgco", "YCGCO", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCGCO }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt2020nc", "BT.2020 NCL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_NCL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt2020c", "BT.2020 CL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_CL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"smpte2085", "SMPTE 2085", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_SMPTE2085 }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"ycocg", "YCGCO", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCGCO }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt2020_ncl", "BT.2020 NCL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_NCL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"bt2020_cl", "BT.2020 CL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_CL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, +{"color_range", "color range", OFFSET(color_range), AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, INT_MAX, V|E|D, "color_range_type"}, +{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"tv", "MPEG (219*2^(n-8))", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"pc", "JPEG (2^n-1)", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"mpeg", "MPEG (219*2^(n-8))", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"jpeg", "JPEG (2^n-1)", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, +{"chroma_sample_location", "chroma sample location", OFFSET(chroma_sample_location), AV_OPT_TYPE_INT, {.i64 = AVCHROMA_LOC_UNSPECIFIED }, 0, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"unknown", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"left", "Left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_LEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"center", "Center", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_CENTER }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"topleft", "Top-left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_TOPLEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"top", "Top", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_TOP }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"bottomleft", "Bottom-left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_BOTTOMLEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"bottom", "Bottom", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_BOTTOM }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, +{"log_level_offset", "set the log level offset", OFFSET(log_level_offset), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX }, +{"slices", "set the number of slices, used in parallelized encoding", OFFSET(slices), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|E}, +{"thread_type", "select multithreading type", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, {.i64 = FF_THREAD_SLICE|FF_THREAD_FRAME }, 0, INT_MAX, V|A|E|D, "thread_type"}, +{"slice", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_THREAD_SLICE }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, +{"frame", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_THREAD_FRAME }, INT_MIN, INT_MAX, V|E|D, "thread_type"}, +{"audio_service_type", "audio service type", OFFSET(audio_service_type), AV_OPT_TYPE_INT, {.i64 = AV_AUDIO_SERVICE_TYPE_MAIN }, 0, AV_AUDIO_SERVICE_TYPE_NB-1, A|E, "audio_service_type"}, +{"ma", "Main Audio Service", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_MAIN }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"ef", "Effects", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_EFFECTS }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"vi", "Visually Impaired", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"hi", "Hearing Impaired", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"di", "Dialogue", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_DIALOGUE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"co", "Commentary", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_COMMENTARY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"em", "Emergency", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_EMERGENCY }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"vo", "Voice Over", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_VOICE_OVER }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"ka", "Karaoke", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, +{"request_sample_fmt", "sample format audio decoders should prefer", OFFSET(request_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64=AV_SAMPLE_FMT_NONE}, -1, INT_MAX, A|D, "request_sample_fmt"}, +{"pkt_timebase", NULL, OFFSET(pkt_timebase), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0}, +{"sub_charenc", "set input text subtitles character encoding", OFFSET(sub_charenc), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, S|D}, +{"sub_charenc_mode", "set input text subtitles character encoding mode", OFFSET(sub_charenc_mode), AV_OPT_TYPE_FLAGS, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, -1, INT_MAX, S|D, "sub_charenc_mode"}, +{"do_nothing", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_DO_NOTHING}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, +{"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, +{"pre_decoder", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_PRE_DECODER}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, +{"ignore", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_IGNORE}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, +#if FF_API_ASS_TIMING +{"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS}, 0, 1, S|D, "sub_text_format"}, +#else +{"sub_text_format", "set decoded text subtitle format", OFFSET(sub_text_format), AV_OPT_TYPE_INT, {.i64 = FF_SUB_TEXT_FMT_ASS}, 0, 1, S|D, "sub_text_format"}, +#endif +{"ass", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, +#if FF_API_ASS_TIMING +{"ass_with_timings", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS}, INT_MIN, INT_MAX, S|D, "sub_text_format"}, +#endif +{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D }, +#if FF_API_SIDEDATA_ONLY_PKT +{"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, A|V|E }, +#endif +{"apply_cropping", NULL, OFFSET(apply_cropping), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, V | D }, +{"skip_alpha", "Skip processing alpha", OFFSET(skip_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, V|D }, +{"field_order", "Field order", OFFSET(field_order), AV_OPT_TYPE_INT, {.i64 = AV_FIELD_UNKNOWN }, 0, 5, V|D|E, "field_order" }, +{"progressive", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_PROGRESSIVE }, 0, 0, V|D|E, "field_order" }, +{"tt", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_TT }, 0, 0, V|D|E, "field_order" }, +{"bb", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_BB }, 0, 0, V|D|E, "field_order" }, +{"tb", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_TB }, 0, 0, V|D|E, "field_order" }, +{"bt", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_BT }, 0, 0, V|D|E, "field_order" }, +{"dump_separator", "set information dump field separator", OFFSET(dump_separator), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, A|V|S|D|E}, +{"codec_whitelist", "List of decoders that are allowed to be used", OFFSET(codec_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, A|V|S|D }, +{"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 }, +{"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 }, +{"max_pixels", "Maximum number of pixels", OFFSET(max_pixels), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|V|S|D|E }, +{"max_samples", "Maximum number of samples", OFFSET(max_samples), AV_OPT_TYPE_INT64, {.i64 = INT_MAX }, 0, INT_MAX, A|D|E }, +{"hwaccel_flags", NULL, OFFSET(hwaccel_flags), AV_OPT_TYPE_FLAGS, {.i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, 0, UINT_MAX, V|D, "hwaccel_flags"}, +{"ignore_level", "ignore level even if the codec level used is unknown or higher than the maximum supported level reported by the hardware driver", 0, AV_OPT_TYPE_CONST, { .i64 = AV_HWACCEL_FLAG_IGNORE_LEVEL }, INT_MIN, INT_MAX, V | D, "hwaccel_flags" }, +{"allow_high_depth", "allow to output YUV pixel formats with a different chroma sampling than 4:2:0 and/or other than 8 bits per component", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"}, +{"allow_profile_mismatch", "attempt to decode anyway if HW accelerated decoder's supported profiles do not exactly match the stream", 0, AV_OPT_TYPE_CONST, {.i64 = AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH }, INT_MIN, INT_MAX, V | D, "hwaccel_flags"}, +{"extra_hw_frames", "Number of extra hardware frames to allocate for the user", OFFSET(extra_hw_frames), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, V|D }, +{"discard_damaged_percentage", "Percentage of damaged samples to discard a frame", OFFSET(discard_damaged_percentage), AV_OPT_TYPE_INT, {.i64 = 95 }, 0, 100, V|D }, +{NULL}, +}; + +#undef A +#undef V +#undef S +#undef E +#undef D +#undef CC +#undef DEFAULT +#undef OFFSET + +#endif /* AVCODEC_OPTIONS_TABLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus.h new file mode 100644 index 00000000..63ecd0af --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus.h @@ -0,0 +1,200 @@ +/* + * Opus decoder/demuxer common functions + * Copyright (c) 2012 Andrew D'Addesio + * Copyright (c) 2013-2014 Mozilla Corporation + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUS_H +#define AVCODEC_OPUS_H + +#include + +#include "libavutil/audio_fifo.h" +#include "libavutil/float_dsp.h" +#include "libavutil/frame.h" + +#include "libswresample/swresample.h" + +#include "avcodec.h" +#include "opus_rc.h" + +#define MAX_FRAME_SIZE 1275 +#define MAX_FRAMES 48 +#define MAX_PACKET_DUR 5760 + +#define CELT_SHORT_BLOCKSIZE 120 +#define CELT_OVERLAP CELT_SHORT_BLOCKSIZE +#define CELT_MAX_LOG_BLOCKS 3 +#define CELT_MAX_FRAME_SIZE (CELT_SHORT_BLOCKSIZE * (1 << CELT_MAX_LOG_BLOCKS)) +#define CELT_MAX_BANDS 21 + +#define SILK_HISTORY 322 +#define SILK_MAX_LPC 16 + +#define ROUND_MULL(a,b,s) (((MUL64(a, b) >> ((s) - 1)) + 1) >> 1) +#define ROUND_MUL16(a,b) ((MUL16(a, b) + 16384) >> 15) + +#define OPUS_TS_HEADER 0x7FE0 // 0x3ff (11 bits) +#define OPUS_TS_MASK 0xFFE0 // top 11 bits + +static const uint8_t opus_default_extradata[30] = { + 'O', 'p', 'u', 's', 'H', 'e', 'a', 'd', + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +enum OpusMode { + OPUS_MODE_SILK, + OPUS_MODE_HYBRID, + OPUS_MODE_CELT, + + OPUS_MODE_NB +}; + +enum OpusBandwidth { + OPUS_BANDWIDTH_NARROWBAND, + OPUS_BANDWIDTH_MEDIUMBAND, + OPUS_BANDWIDTH_WIDEBAND, + OPUS_BANDWIDTH_SUPERWIDEBAND, + OPUS_BANDWIDTH_FULLBAND, + + OPUS_BANDWITH_NB +}; + +typedef struct SilkContext SilkContext; + +typedef struct CeltFrame CeltFrame; + +typedef struct OpusPacket { + int packet_size; /**< packet size */ + int data_size; /**< size of the useful data -- packet size - padding */ + int code; /**< packet code: specifies the frame layout */ + int stereo; /**< whether this packet is mono or stereo */ + int vbr; /**< vbr flag */ + int config; /**< configuration: tells the audio mode, + ** bandwidth, and frame duration */ + int frame_count; /**< frame count */ + int frame_offset[MAX_FRAMES]; /**< frame offsets */ + int frame_size[MAX_FRAMES]; /**< frame sizes */ + int frame_duration; /**< frame duration, in samples @ 48kHz */ + enum OpusMode mode; /**< mode */ + enum OpusBandwidth bandwidth; /**< bandwidth */ +} OpusPacket; + +typedef struct OpusStreamContext { + AVCodecContext *avctx; + int output_channels; + + OpusRangeCoder rc; + OpusRangeCoder redundancy_rc; + SilkContext *silk; + CeltFrame *celt; + AVFloatDSPContext *fdsp; + + float silk_buf[2][960]; + float *silk_output[2]; + DECLARE_ALIGNED(32, float, celt_buf)[2][960]; + float *celt_output[2]; + + DECLARE_ALIGNED(32, float, redundancy_buf)[2][960]; + float *redundancy_output[2]; + + /* data buffers for the final output data */ + float *out[2]; + int out_size; + + float *out_dummy; + int out_dummy_allocated_size; + + SwrContext *swr; + AVAudioFifo *celt_delay; + int silk_samplerate; + /* number of samples we still want to get from the resampler */ + int delayed_samples; + + OpusPacket packet; + + int redundancy_idx; +} OpusStreamContext; + +// a mapping between an opus stream and an output channel +typedef struct ChannelMap { + int stream_idx; + int channel_idx; + + // when a single decoded channel is mapped to multiple output channels, we + // write to the first output directly and copy from it to the others + // this field is set to 1 for those copied output channels + int copy; + // this is the index of the output channel to copy from + int copy_idx; + + // this channel is silent + int silence; +} ChannelMap; + +typedef struct OpusContext { + AVClass *av_class; + OpusStreamContext *streams; + int apply_phase_inv; + + /* current output buffers for each streams */ + float **out; + int *out_size; + /* Buffers for synchronizing the streams when they have different + * resampling delays */ + AVAudioFifo **sync_buffers; + /* number of decoded samples for each stream */ + int *decoded_samples; + + int nb_streams; + int nb_stereo_streams; + + AVFloatDSPContext *fdsp; + int16_t gain_i; + float gain; + + ChannelMap *channel_maps; +} OpusContext; + +int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, + int self_delimited); + +int ff_opus_parse_extradata(AVCodecContext *avctx, OpusContext *s); + +int ff_silk_init(AVCodecContext *avctx, SilkContext **ps, int output_channels); +void ff_silk_free(SilkContext **ps); +void ff_silk_flush(SilkContext *s); + +/** + * Decode the LP layer of one Opus frame (which may correspond to several SILK + * frames). + */ +int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc, + float *output[2], + enum OpusBandwidth bandwidth, int coded_channels, + int duration_ms); + +/* Encode or decode CELT bands */ +void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc); + +/* Encode or decode CELT bitallocation */ +void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode); + +#endif /* AVCODEC_OPUS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_celt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_celt.h new file mode 100644 index 00000000..7c1c5316 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_celt.h @@ -0,0 +1,171 @@ +/* + * Opus decoder/demuxer common functions + * Copyright (c) 2012 Andrew D'Addesio + * Copyright (c) 2013-2014 Mozilla Corporation + * Copyright (c) 2016 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUS_CELT_H +#define AVCODEC_OPUS_CELT_H + +#include + +#include "opus.h" +#include "opus_pvq.h" +#include "opusdsp.h" + +#include "mdct15.h" +#include "libavutil/float_dsp.h" +#include "libavutil/libm.h" + +#define CELT_VECTORS 11 +#define CELT_ALLOC_STEPS 6 +#define CELT_FINE_OFFSET 21 +#define CELT_MAX_FINE_BITS 8 +#define CELT_NORM_SCALE 16384 +#define CELT_QTHETA_OFFSET 4 +#define CELT_QTHETA_OFFSET_TWOPHASE 16 +#define CELT_POSTFILTER_MINPERIOD 15 +#define CELT_ENERGY_SILENCE (-28.0f) + +typedef struct CeltPVQ CeltPVQ; + +enum CeltSpread { + CELT_SPREAD_NONE, + CELT_SPREAD_LIGHT, + CELT_SPREAD_NORMAL, + CELT_SPREAD_AGGRESSIVE +}; + +enum CeltBlockSize { + CELT_BLOCK_120, + CELT_BLOCK_240, + CELT_BLOCK_480, + CELT_BLOCK_960, + + CELT_BLOCK_NB +}; + +typedef struct CeltBlock { + float energy[CELT_MAX_BANDS]; + float lin_energy[CELT_MAX_BANDS]; + float error_energy[CELT_MAX_BANDS]; + float prev_energy[2][CELT_MAX_BANDS]; + + uint8_t collapse_masks[CELT_MAX_BANDS]; + + /* buffer for mdct output + postfilter */ + DECLARE_ALIGNED(32, float, buf)[2048]; + DECLARE_ALIGNED(32, float, coeffs)[CELT_MAX_FRAME_SIZE]; + + /* Used by the encoder */ + DECLARE_ALIGNED(32, float, overlap)[FFALIGN(CELT_OVERLAP, 16)]; + DECLARE_ALIGNED(32, float, samples)[FFALIGN(CELT_MAX_FRAME_SIZE, 16)]; + + /* postfilter parameters */ + int pf_period_new; + float pf_gains_new[3]; + int pf_period; + float pf_gains[3]; + int pf_period_old; + float pf_gains_old[3]; + + float emph_coeff; +} CeltBlock; + +struct CeltFrame { + // constant values that do not change during context lifetime + AVCodecContext *avctx; + MDCT15Context *imdct[4]; + AVFloatDSPContext *dsp; + CeltBlock block[2]; + CeltPVQ *pvq; + OpusDSP opusdsp; + int channels; + int output_channels; + int apply_phase_inv; + + enum CeltBlockSize size; + int start_band; + int end_band; + int coded_bands; + int transient; + int pfilter; + int skip_band_floor; + int tf_select; + int alloc_trim; + int alloc_boost[CELT_MAX_BANDS]; + int blocks; /* number of iMDCT blocks in the frame, depends on transient */ + int blocksize; /* size of each block */ + int silence; /* Frame is filled with silence */ + int anticollapse_needed; /* Whether to expect an anticollapse bit */ + int anticollapse; /* Encoded anticollapse bit */ + int intensity_stereo; + int dual_stereo; + int flushed; + uint32_t seed; + enum CeltSpread spread; + + /* Encoder PF coeffs */ + int pf_octave; + int pf_period; + int pf_tapset; + float pf_gain; + + /* Bit allocation */ + int framebits; + int remaining; + int remaining2; + int caps [CELT_MAX_BANDS]; + int fine_bits [CELT_MAX_BANDS]; + int fine_priority[CELT_MAX_BANDS]; + int pulses [CELT_MAX_BANDS]; + int tf_change [CELT_MAX_BANDS]; +}; + +/* LCG for noise generation */ +static av_always_inline uint32_t celt_rng(CeltFrame *f) +{ + f->seed = 1664525 * f->seed + 1013904223; + return f->seed; +} + +static av_always_inline void celt_renormalize_vector(float *X, int N, float gain) +{ + int i; + float g = 1e-15f; + for (i = 0; i < N; i++) + g += X[i] * X[i]; + g = gain / sqrtf(g); + + for (i = 0; i < N; i++) + X[i] *= g; +} + +int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels, + int apply_phase_inv); + +void ff_celt_free(CeltFrame **f); + +void ff_celt_flush(CeltFrame *f); + +int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, float **output, + int coded_channels, int frame_size, int startband, int endband); + +#endif /* AVCODEC_OPUS_CELT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_pvq.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_pvq.h new file mode 100644 index 00000000..52f9a4e6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_pvq.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2012 Andrew D'Addesio + * Copyright (c) 2013-2014 Mozilla Corporation + * Copyright (c) 2016 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUS_PVQ_H +#define AVCODEC_OPUS_PVQ_H + +#include "opus_celt.h" + +#define QUANT_FN(name) uint32_t (name)(struct CeltPVQ *pvq, CeltFrame *f, \ + OpusRangeCoder *rc, const int band, float *X, \ + float *Y, int N, int b, uint32_t blocks, \ + float *lowband, int duration, \ + float *lowband_out, int level, float gain, \ + float *lowband_scratch, int fill) + +struct CeltPVQ { + DECLARE_ALIGNED(32, int, qcoeff )[256]; + DECLARE_ALIGNED(32, float, hadamard_tmp)[256]; + + float (*pvq_search)(float *X, int *y, int K, int N); + QUANT_FN(*quant_band); +}; + +void ff_celt_pvq_init_x86(struct CeltPVQ *s); + +int ff_celt_pvq_init(struct CeltPVQ **pvq, int encode); +void ff_celt_pvq_uninit(struct CeltPVQ **pvq); + +#endif /* AVCODEC_OPUS_PVQ_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_rc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_rc.h new file mode 100644 index 00000000..627f8322 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opus_rc.h @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2012 Andrew D'Addesio + * Copyright (c) 2013-2014 Mozilla Corporation + * Copyright (c) 2017 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUS_RC_H +#define AVCODEC_OPUS_RC_H + +#include +#include "get_bits.h" + +#define OPUS_MAX_PACKET_SIZE 1275 + +#define opus_ilog(i) (av_log2(i) + !!(i)) + +typedef struct RawBitsContext { + const uint8_t *position; + uint32_t bytes; + uint32_t cachelen; + uint32_t cacheval; +} RawBitsContext; + +typedef struct OpusRangeCoder { + GetBitContext gb; + RawBitsContext rb; + uint32_t range; + uint32_t value; + uint32_t total_bits; + + /* Encoder */ + uint8_t buf[OPUS_MAX_PACKET_SIZE + 12]; /* memcpy vs (memmove + overreading) */ + uint8_t *rng_cur; /* Current range coded byte */ + int ext; /* Awaiting propagation */ + int rem; /* Carryout flag */ + + /* Encoding stats */ + int waste; +} OpusRangeCoder; + +/** + * CELT: estimate bits of entropy that have thus far been consumed for the + * current CELT frame, to integer and fractional (1/8th bit) precision + */ +static av_always_inline uint32_t opus_rc_tell(const OpusRangeCoder *rc) +{ + return rc->total_bits - av_log2(rc->range) - 1; +} + +static av_always_inline uint32_t opus_rc_tell_frac(const OpusRangeCoder *rc) +{ + uint32_t i, total_bits, rcbuffer, range; + + total_bits = rc->total_bits << 3; + rcbuffer = av_log2(rc->range) + 1; + range = rc->range >> (rcbuffer-16); + + for (i = 0; i < 3; i++) { + int bit; + range = range * range >> 15; + bit = range >> 16; + rcbuffer = rcbuffer << 1 | bit; + range >>= bit; + } + + return total_bits - rcbuffer; +} + +uint32_t ff_opus_rc_dec_cdf(OpusRangeCoder *rc, const uint16_t *cdf); +void ff_opus_rc_enc_cdf(OpusRangeCoder *rc, int val, const uint16_t *cdf); + +uint32_t ff_opus_rc_dec_log(OpusRangeCoder *rc, uint32_t bits); +void ff_opus_rc_enc_log(OpusRangeCoder *rc, int val, uint32_t bits); + +uint32_t ff_opus_rc_dec_uint_step(OpusRangeCoder *rc, int k0); +void ff_opus_rc_enc_uint_step(OpusRangeCoder *rc, uint32_t val, int k0); + +uint32_t ff_opus_rc_dec_uint_tri(OpusRangeCoder *rc, int qn); +void ff_opus_rc_enc_uint_tri(OpusRangeCoder *rc, uint32_t k, int qn); + +uint32_t ff_opus_rc_dec_uint(OpusRangeCoder *rc, uint32_t size); +void ff_opus_rc_enc_uint(OpusRangeCoder *rc, uint32_t val, uint32_t size); + +uint32_t ff_opus_rc_get_raw(OpusRangeCoder *rc, uint32_t count); +void ff_opus_rc_put_raw(OpusRangeCoder *rc, uint32_t val, uint32_t count); + +int ff_opus_rc_dec_laplace(OpusRangeCoder *rc, uint32_t symbol, int decay); +void ff_opus_rc_enc_laplace(OpusRangeCoder *rc, int *value, uint32_t symbol, int decay); + +int ff_opus_rc_dec_init(OpusRangeCoder *rc, const uint8_t *data, int size); +void ff_opus_rc_dec_raw_init(OpusRangeCoder *rc, const uint8_t *rightend, uint32_t bytes); + +void ff_opus_rc_enc_end(OpusRangeCoder *rc, uint8_t *dst, int size); +void ff_opus_rc_enc_init(OpusRangeCoder *rc); + +#define OPUS_RC_CHECKPOINT_UPDATE(rc) \ + rc_rollback_bits = opus_rc_tell_frac(rc); \ + rc_rollback_ctx = *rc + +#define OPUS_RC_CHECKPOINT_SPAWN(rc) \ + uint32_t rc_rollback_bits = opus_rc_tell_frac(rc); \ + OpusRangeCoder rc_rollback_ctx = *rc \ + +#define OPUS_RC_CHECKPOINT_BITS(rc) \ + (opus_rc_tell_frac(rc) - rc_rollback_bits) + +#define OPUS_RC_CHECKPOINT_ROLLBACK(rc) \ + memcpy(rc, &rc_rollback_ctx, sizeof(OpusRangeCoder)); \ + +#endif /* AVCODEC_OPUS_RC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusdsp.h new file mode 100644 index 00000000..ee3186dd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusdsp.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUSDSP_H +#define AVCODEC_OPUSDSP_H + +#include "libavutil/common.h" + +#define CELT_EMPH_COEFF 0.8500061035f + +typedef struct OpusDSP { + void (*postfilter)(float *data, int period, float *gains, int len); + float (*deemphasis)(float *out, float *in, float coeff, int len); +} OpusDSP; + +void ff_opus_dsp_init(OpusDSP *ctx); + +void ff_opus_dsp_init_x86(OpusDSP *ctx); +void ff_opus_dsp_init_aarch64(OpusDSP *ctx); + +#endif /* AVCODEC_OPUSDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc.h new file mode 100644 index 00000000..b623b3e9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc.h @@ -0,0 +1,55 @@ +/* + * Opus encoder + * Copyright (c) 2017 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUSENC_H +#define AVCODEC_OPUSENC_H + +#include "internal.h" +#include "opus_celt.h" + +/* Determines the maximum delay the psychoacoustic system will use for lookahead */ +#define FF_BUFQUEUE_SIZE 145 +#include "libavfilter/bufferqueue.h" + +#define OPUS_MAX_LOOKAHEAD ((FF_BUFQUEUE_SIZE - 1)*2.5f) + +#define OPUS_MAX_CHANNELS 2 + +/* 120 ms / 2.5 ms = 48 frames (extremely improbable, but the encoder'll work) */ +#define OPUS_MAX_FRAMES_PER_PACKET 48 + +#define OPUS_BLOCK_SIZE(x) (2 * 15 * (1 << ((x) + 2))) + +#define OPUS_SAMPLES_TO_BLOCK_SIZE(x) (ff_log2((x) / (2 * 15)) - 2) + +typedef struct OpusEncOptions { + float max_delay_ms; + int apply_phase_inv; +} OpusEncOptions; + +typedef struct OpusPacketInfo { + enum OpusMode mode; + enum OpusBandwidth bandwidth; + int framesize; + int frames; +} OpusPacketInfo; + +#endif /* AVCODEC_OPUSENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_psy.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_psy.h new file mode 100644 index 00000000..b91e4f1b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_psy.h @@ -0,0 +1,104 @@ +/* + * Opus encoder + * Copyright (c) 2017 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUSENC_PSY_H +#define AVCODEC_OPUSENC_PSY_H + +#include "opusenc.h" +#include "opusenc_utils.h" +#include "libavfilter/window_func.h" + +/* Each step is 2.5ms */ +typedef struct OpusPsyStep { + int index; /* Current index */ + int silence; + float energy[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; /* Masking effects included */ + float tone[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; /* Tonality */ + float stereo[CELT_MAX_BANDS]; /* IS/MS compatibility */ + float change_amp[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; /* Jump over last frame */ + float total_change; /* Total change */ + + float *bands[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; + float coeffs[OPUS_MAX_CHANNELS][OPUS_BLOCK_SIZE(CELT_BLOCK_960)]; +} OpusPsyStep; + +typedef struct OpusBandExcitation { + float excitation; + float excitation_dist; + float excitation_init; +} OpusBandExcitation; + +typedef struct PsyChain { + int start; + int end; +} PsyChain; + +typedef struct OpusPsyContext { + AVCodecContext *avctx; + AVFloatDSPContext *dsp; + struct FFBufQueue *bufqueue; + OpusEncOptions *options; + + PsyChain cs[128]; + int cs_num; + + OpusBandExcitation ex[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; + FFBesselFilter bfilter_lo[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; + FFBesselFilter bfilter_hi[OPUS_MAX_CHANNELS][CELT_MAX_BANDS]; + + OpusPsyStep *steps[FF_BUFQUEUE_SIZE + 1]; + int max_steps; + + float *window[CELT_BLOCK_NB]; + MDCT15Context *mdct[CELT_BLOCK_NB]; + int bsize_analysis; + + DECLARE_ALIGNED(32, float, scratch)[2048]; + + /* Stats */ + float rc_waste; + float avg_is_band; + int64_t dual_stereo_used; + int64_t total_packets_out; + + /* State */ + FFBesselFilter lambda_lp; + OpusPacketInfo p; + int redo_analysis; + int buffered_steps; + int steps_to_process; + int eof; + float lambda; + int *inflection_points; + int inflection_points_count; +} OpusPsyContext; + +int ff_opus_psy_process (OpusPsyContext *s, OpusPacketInfo *p); +void ff_opus_psy_celt_frame_init (OpusPsyContext *s, CeltFrame *f, int index); +int ff_opus_psy_celt_frame_process(OpusPsyContext *s, CeltFrame *f, int index); +void ff_opus_psy_postencode_update (OpusPsyContext *s, CeltFrame *f, OpusRangeCoder *rc); + +int ff_opus_psy_init(OpusPsyContext *s, AVCodecContext *avctx, + struct FFBufQueue *bufqueue, OpusEncOptions *options); +void ff_opus_psy_signal_eof(OpusPsyContext *s); +int ff_opus_psy_end(OpusPsyContext *s); + +#endif /* AVCODEC_OPUSENC_PSY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_utils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_utils.h new file mode 100644 index 00000000..be82e137 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opusenc_utils.h @@ -0,0 +1,87 @@ +/* + * Opus encoder + * Copyright (c) 2017 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUSENC_UTILS_H +#define AVCODEC_OPUSENC_UTILS_H + +#include "opus.h" + +typedef struct FFBesselFilter { + float a[3]; + float b[2]; + float x[3]; + float y[3]; +} FFBesselFilter; + +/* Fills the coefficients, returns 1 if filter will be unstable */ +static inline int bessel_reinit(FFBesselFilter *s, float n, float f0, float fs, + int highpass) +{ + int unstable; + float c, cfreq, w0, k1, k2; + + if (!highpass) { + c = (1.0f/sqrtf(sqrtf(pow(2.0f, 1.0f/n) - 3.0f/4.0f) - 0.5f))/sqrtf(3.0f); + cfreq = c*f0/fs; + unstable = (cfreq <= 0.0f || cfreq >= 1.0f/4.0f); + } else { + c = sqrtf(3.0f)*sqrtf(sqrtf(pow(2.0f, 1.0f/n) - 3.0f/4.0f) - 0.5f); + cfreq = 0.5f - c*f0/fs; + unstable = (cfreq <= 3.0f/8.0f || cfreq >= 1.0f/2.0f); + } + + w0 = tanf(M_PI*cfreq); + k1 = 3.0f * w0; + k2 = 3.0f * w0; + + s->a[0] = k2/(1.0f + k1 + k2); + s->a[1] = 2.0f * s->a[0]; + s->a[2] = s->a[0]; + s->b[0] = 2.0f * s->a[0] * (1.0f/k2 - 1.0f); + s->b[1] = 1.0f - (s->a[0] + s->a[1] + s->a[2] + s->b[0]); + + if (highpass) { + s->a[1] *= -1; + s->b[0] *= -1; + } + + return unstable; +} + +static inline int bessel_init(FFBesselFilter *s, float n, float f0, float fs, + int highpass) +{ + memset(s, 0, sizeof(FFBesselFilter)); + return bessel_reinit(s, n, f0, fs, highpass); +} + +static inline float bessel_filter(FFBesselFilter *s, float x) +{ + s->x[2] = s->x[1]; + s->x[1] = s->x[0]; + s->x[0] = x; + s->y[2] = s->y[1]; + s->y[1] = s->y[0]; + s->y[0] = s->a[0]*s->x[0] + s->a[1]*s->x[1] + s->a[2]*s->x[2] + s->b[0]*s->y[1] + s->b[1]*s->y[2]; + return s->y[0]; +} + +#endif /* AVCODEC_OPUSENC_UTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opustab.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opustab.h new file mode 100644 index 00000000..892126bb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/opustab.h @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2012 Andrew D'Addesio + * Copyright (c) 2013-2014 Mozilla Corporation + * Copyright (c) 2016 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_OPUSTAB_H +#define AVCODEC_OPUSTAB_H + +#include "libavutil/mem.h" + +#include + +extern const uint8_t ff_celt_band_end[]; + +extern const uint8_t ff_opus_default_coupled_streams[]; + +extern const uint16_t ff_silk_model_lbrr_flags_40[]; +extern const uint16_t ff_silk_model_lbrr_flags_60[]; + +extern const uint16_t ff_silk_model_stereo_s1[]; +extern const uint16_t ff_silk_model_stereo_s2[]; +extern const uint16_t ff_silk_model_stereo_s3[]; +extern const uint16_t ff_silk_model_mid_only[]; + +extern const uint16_t ff_silk_model_frame_type_inactive[]; +extern const uint16_t ff_silk_model_frame_type_active[]; + +extern const uint16_t ff_silk_model_gain_highbits[3][9]; +extern const uint16_t ff_silk_model_gain_lowbits[]; +extern const uint16_t ff_silk_model_gain_delta[]; + +extern const uint16_t ff_silk_model_lsf_s1[2][2][33]; +extern const uint16_t ff_silk_model_lsf_s2[32][10]; +extern const uint16_t ff_silk_model_lsf_s2_ext[]; +extern const uint16_t ff_silk_model_lsf_interpolation_offset[]; + +extern const uint16_t ff_silk_model_pitch_highbits[]; +extern const uint16_t ff_silk_model_pitch_lowbits_nb[]; +extern const uint16_t ff_silk_model_pitch_lowbits_mb[]; +extern const uint16_t ff_silk_model_pitch_lowbits_wb[]; +extern const uint16_t ff_silk_model_pitch_delta[]; +extern const uint16_t ff_silk_model_pitch_contour_nb10ms[]; +extern const uint16_t ff_silk_model_pitch_contour_nb20ms[]; +extern const uint16_t ff_silk_model_pitch_contour_mbwb10ms[]; +extern const uint16_t ff_silk_model_pitch_contour_mbwb20ms[]; + +extern const uint16_t ff_silk_model_ltp_filter[]; +extern const uint16_t ff_silk_model_ltp_filter0_sel[]; +extern const uint16_t ff_silk_model_ltp_filter1_sel[]; +extern const uint16_t ff_silk_model_ltp_filter2_sel[]; +extern const uint16_t ff_silk_model_ltp_scale_index[]; + +extern const uint16_t ff_silk_model_lcg_seed[]; + +extern const uint16_t ff_silk_model_exc_rate[2][10]; + +extern const uint16_t ff_silk_model_pulse_count[11][19]; +extern const uint16_t ff_silk_model_pulse_location[4][168]; + +extern const uint16_t ff_silk_model_excitation_lsb[]; +extern const uint16_t ff_silk_model_excitation_sign[3][2][7][3]; + +extern const int16_t ff_silk_stereo_weights[]; + +extern const uint8_t ff_silk_lsf_s2_model_sel_nbmb[32][10]; +extern const uint8_t ff_silk_lsf_s2_model_sel_wb[32][16]; + +extern const uint8_t ff_silk_lsf_pred_weights_nbmb[2][9]; +extern const uint8_t ff_silk_lsf_pred_weights_wb[2][15]; + +extern const uint8_t ff_silk_lsf_weight_sel_nbmb[32][9]; +extern const uint8_t ff_silk_lsf_weight_sel_wb[32][15]; + +extern const uint8_t ff_silk_lsf_codebook_nbmb[32][10]; +extern const uint8_t ff_silk_lsf_codebook_wb[32][16]; + +extern const uint16_t ff_silk_lsf_min_spacing_nbmb[]; +extern const uint16_t ff_silk_lsf_min_spacing_wb[]; + +extern const uint8_t ff_silk_lsf_ordering_nbmb[]; +extern const uint8_t ff_silk_lsf_ordering_wb[]; + +extern const int16_t ff_silk_cosine[]; + +extern const uint16_t ff_silk_pitch_scale[]; +extern const uint16_t ff_silk_pitch_min_lag[]; +extern const uint16_t ff_silk_pitch_max_lag[]; + +extern const int8_t ff_silk_pitch_offset_nb10ms[3][2]; +extern const int8_t ff_silk_pitch_offset_nb20ms[11][4]; +extern const int8_t ff_silk_pitch_offset_mbwb10ms[12][2]; +extern const int8_t ff_silk_pitch_offset_mbwb20ms[34][4]; + +extern const int8_t ff_silk_ltp_filter0_taps[8][5]; +extern const int8_t ff_silk_ltp_filter1_taps[16][5]; +extern const int8_t ff_silk_ltp_filter2_taps[32][5]; + +extern const uint16_t ff_silk_ltp_scale_factor[]; + +extern const uint8_t ff_silk_shell_blocks[3][2]; + +extern const uint8_t ff_silk_quant_offset[2][2]; + +extern const int ff_silk_stereo_interp_len[3]; + +extern const uint16_t ff_celt_model_tapset[]; +extern const uint16_t ff_celt_model_spread[]; +extern const uint16_t ff_celt_model_alloc_trim[]; +extern const uint16_t ff_celt_model_energy_small[]; + +extern const uint8_t ff_celt_freq_bands[]; +extern const uint8_t ff_celt_freq_range[]; +extern const uint8_t ff_celt_log_freq_range[]; + +extern const int8_t ff_celt_tf_select[4][2][2][2]; + +extern const float ff_celt_mean_energy[]; + +extern const float ff_celt_alpha_coef[]; +extern const float ff_celt_beta_coef[]; + +extern const uint8_t ff_celt_coarse_energy_dist[4][2][42]; + +extern const uint8_t ff_celt_static_alloc[11][21]; +extern const uint8_t ff_celt_static_caps[4][2][21]; + +extern const uint8_t ff_celt_cache_bits[392]; +extern const int16_t ff_celt_cache_index[105]; + +extern const uint8_t ff_celt_log2_frac[]; + +extern const uint8_t ff_celt_bit_interleave[]; +extern const uint8_t ff_celt_bit_deinterleave[]; + +extern const uint8_t ff_celt_hadamard_order[]; + +extern const uint16_t ff_celt_qn_exp2[]; +extern const uint32_t ff_celt_pvq_u[1272]; + +extern const float ff_celt_postfilter_taps[3][3]; + +extern const float ff_celt_window2[120]; +extern const float *ff_celt_window; + +extern const uint32_t * const ff_celt_pvq_u_row[15]; + +#endif /* AVCODEC_OPUSTAB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet.h new file mode 100644 index 00000000..41485f45 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet.h @@ -0,0 +1,722 @@ +/* + * AVPacket public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PACKET_H +#define AVCODEC_PACKET_H + +#include +#include + +#include "libavutil/attributes.h" +#include "libavutil/buffer.h" +#include "libavutil/dict.h" +#include "libavutil/rational.h" + +#include "libavcodec/version.h" + +/** + * @defgroup lavc_packet AVPacket + * + * Types and functions for working with AVPacket. + * @{ + */ +enum AVPacketSideDataType { + /** + * An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE + * bytes worth of palette. This side data signals that a new palette is + * present. + */ + AV_PKT_DATA_PALETTE, + + /** + * The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format + * that the extradata buffer was changed and the receiving side should + * act upon it appropriately. The new extradata is embedded in the side + * data buffer and should be immediately used for processing the current + * frame or packet. + */ + AV_PKT_DATA_NEW_EXTRADATA, + + /** + * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: + * @code + * u32le param_flags + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) + * s32le channel_count + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) + * u64le channel_layout + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) + * s32le sample_rate + * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) + * s32le width + * s32le height + * @endcode + */ + AV_PKT_DATA_PARAM_CHANGE, + + /** + * An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of + * structures with info about macroblocks relevant to splitting the + * packet into smaller packets on macroblock edges (e.g. as for RFC 2190). + * That is, it does not necessarily contain info about all macroblocks, + * as long as the distance between macroblocks in the info is smaller + * than the target payload size. + * Each MB info structure is 12 bytes, and is laid out as follows: + * @code + * u32le bit offset from the start of the packet + * u8 current quantizer at the start of the macroblock + * u8 GOB number + * u16le macroblock address within the GOB + * u8 horizontal MV predictor + * u8 vertical MV predictor + * u8 horizontal MV predictor for block number 3 + * u8 vertical MV predictor for block number 3 + * @endcode + */ + AV_PKT_DATA_H263_MB_INFO, + + /** + * This side data should be associated with an audio stream and contains + * ReplayGain information in form of the AVReplayGain struct. + */ + AV_PKT_DATA_REPLAYGAIN, + + /** + * This side data contains a 3x3 transformation matrix describing an affine + * transformation that needs to be applied to the decoded video frames for + * correct presentation. + * + * See libavutil/display.h for a detailed description of the data. + */ + AV_PKT_DATA_DISPLAYMATRIX, + + /** + * This side data should be associated with a video stream and contains + * Stereoscopic 3D information in form of the AVStereo3D struct. + */ + AV_PKT_DATA_STEREO3D, + + /** + * This side data should be associated with an audio stream and corresponds + * to enum AVAudioServiceType. + */ + AV_PKT_DATA_AUDIO_SERVICE_TYPE, + + /** + * This side data contains quality related information from the encoder. + * @code + * u32le quality factor of the compressed frame. Allowed range is between 1 (good) and FF_LAMBDA_MAX (bad). + * u8 picture type + * u8 error count + * u16 reserved + * u64le[error count] sum of squared differences between encoder in and output + * @endcode + */ + AV_PKT_DATA_QUALITY_STATS, + + /** + * This side data contains an integer value representing the stream index + * of a "fallback" track. A fallback track indicates an alternate + * track to use when the current track can not be decoded for some reason. + * e.g. no decoder available for codec. + */ + AV_PKT_DATA_FALLBACK_TRACK, + + /** + * This side data corresponds to the AVCPBProperties struct. + */ + AV_PKT_DATA_CPB_PROPERTIES, + + /** + * Recommmends skipping the specified number of samples + * @code + * u32le number of samples to skip from start of this packet + * u32le number of samples to skip from end of this packet + * u8 reason for start skip + * u8 reason for end skip (0=padding silence, 1=convergence) + * @endcode + */ + AV_PKT_DATA_SKIP_SAMPLES, + + /** + * An AV_PKT_DATA_JP_DUALMONO side data packet indicates that + * the packet may contain "dual mono" audio specific to Japanese DTV + * and if it is true, recommends only the selected channel to be used. + * @code + * u8 selected channels (0=mail/left, 1=sub/right, 2=both) + * @endcode + */ + AV_PKT_DATA_JP_DUALMONO, + + /** + * A list of zero terminated key/value strings. There is no end marker for + * the list, so it is required to rely on the side data size to stop. + */ + AV_PKT_DATA_STRINGS_METADATA, + + /** + * Subtitle event position + * @code + * u32le x1 + * u32le y1 + * u32le x2 + * u32le y2 + * @endcode + */ + AV_PKT_DATA_SUBTITLE_POSITION, + + /** + * Data found in BlockAdditional element of matroska container. There is + * no end marker for the data, so it is required to rely on the side data + * size to recognize the end. 8 byte id (as found in BlockAddId) followed + * by data. + */ + AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, + + /** + * The optional first identifier line of a WebVTT cue. + */ + AV_PKT_DATA_WEBVTT_IDENTIFIER, + + /** + * The optional settings (rendering instructions) that immediately + * follow the timestamp specifier of a WebVTT cue. + */ + AV_PKT_DATA_WEBVTT_SETTINGS, + + /** + * A list of zero terminated key/value strings. There is no end marker for + * the list, so it is required to rely on the side data size to stop. This + * side data includes updated metadata which appeared in the stream. + */ + AV_PKT_DATA_METADATA_UPDATE, + + /** + * MPEGTS stream ID as uint8_t, this is required to pass the stream ID + * information from the demuxer to the corresponding muxer. + */ + AV_PKT_DATA_MPEGTS_STREAM_ID, + + /** + * Mastering display metadata (based on SMPTE-2086:2014). This metadata + * should be associated with a video stream and contains data in the form + * of the AVMasteringDisplayMetadata struct. + */ + AV_PKT_DATA_MASTERING_DISPLAY_METADATA, + + /** + * This side data should be associated with a video stream and corresponds + * to the AVSphericalMapping structure. + */ + AV_PKT_DATA_SPHERICAL, + + /** + * Content light level (based on CTA-861.3). This metadata should be + * associated with a video stream and contains data in the form of the + * AVContentLightMetadata struct. + */ + AV_PKT_DATA_CONTENT_LIGHT_LEVEL, + + /** + * ATSC A53 Part 4 Closed Captions. This metadata should be associated with + * a video stream. A53 CC bitstream is stored as uint8_t in AVPacketSideData.data. + * The number of bytes of CC data is AVPacketSideData.size. + */ + AV_PKT_DATA_A53_CC, + + /** + * This side data is encryption initialization data. + * The format is not part of ABI, use av_encryption_init_info_* methods to + * access. + */ + AV_PKT_DATA_ENCRYPTION_INIT_INFO, + + /** + * This side data contains encryption info for how to decrypt the packet. + * The format is not part of ABI, use av_encryption_info_* methods to access. + */ + AV_PKT_DATA_ENCRYPTION_INFO, + + /** + * Active Format Description data consisting of a single byte as specified + * in ETSI TS 101 154 using AVActiveFormatDescription enum. + */ + AV_PKT_DATA_AFD, + + /** + * Producer Reference Time data corresponding to the AVProducerReferenceTime struct, + * usually exported by some encoders (on demand through the prft flag set in the + * AVCodecContext export_side_data field). + */ + AV_PKT_DATA_PRFT, + + /** + * ICC profile data consisting of an opaque octet buffer following the + * format described by ISO 15076-1. + */ + AV_PKT_DATA_ICC_PROFILE, + + /** + * DOVI configuration + * ref: + * dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.1.2, section 2.2 + * dolby-vision-bitstreams-in-mpeg-2-transport-stream-multiplex-v1.2, section 3.3 + * Tags are stored in struct AVDOVIDecoderConfigurationRecord. + */ + AV_PKT_DATA_DOVI_CONF, + + /** + * The number of side data types. + * This is not part of the public API/ABI in the sense that it may + * change when new side data types are added. + * This must stay the last enum value. + * If its value becomes huge, some code using it + * needs to be updated as it assumes it to be smaller than other limits. + */ + AV_PKT_DATA_NB +}; + +#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED + +typedef struct AVPacketSideData { + uint8_t *data; + int size; + enum AVPacketSideDataType type; +} AVPacketSideData; + +/** + * This structure stores compressed data. It is typically exported by demuxers + * and then passed as input to decoders, or received as output from encoders and + * then passed to muxers. + * + * For video, it should typically contain one compressed frame. For audio it may + * contain several compressed frames. Encoders are allowed to output empty + * packets, with no compressed data, containing only side data + * (e.g. to update some stream parameters at the end of encoding). + * + * AVPacket is one of the few structs in FFmpeg, whose size is a part of public + * ABI. Thus it may be allocated on stack and no new fields can be added to it + * without libavcodec and libavformat major bump. + * + * The semantics of data ownership depends on the buf field. + * If it is set, the packet data is dynamically allocated and is + * valid indefinitely until a call to av_packet_unref() reduces the + * reference count to 0. + * + * If the buf field is not set av_packet_ref() would make a copy instead + * of increasing the reference count. + * + * The side data is always allocated with av_malloc(), copied by + * av_packet_ref() and freed by av_packet_unref(). + * + * @see av_packet_ref + * @see av_packet_unref + */ +typedef struct AVPacket { + /** + * A reference to the reference-counted buffer where the packet data is + * stored. + * May be NULL, then the packet data is not reference-counted. + */ + AVBufferRef *buf; + /** + * Presentation timestamp in AVStream->time_base units; the time at which + * the decompressed packet will be presented to the user. + * Can be AV_NOPTS_VALUE if it is not stored in the file. + * pts MUST be larger or equal to dts as presentation cannot happen before + * decompression, unless one wants to view hex dumps. Some formats misuse + * the terms dts and pts/cts to mean something different. Such timestamps + * must be converted to true pts/dts before they are stored in AVPacket. + */ + int64_t pts; + /** + * Decompression timestamp in AVStream->time_base units; the time at which + * the packet is decompressed. + * Can be AV_NOPTS_VALUE if it is not stored in the file. + */ + int64_t dts; + uint8_t *data; + int size; + int stream_index; + /** + * A combination of AV_PKT_FLAG values + */ + int flags; + /** + * Additional packet data that can be provided by the container. + * Packet can contain several types of side information. + */ + AVPacketSideData *side_data; + int side_data_elems; + + /** + * Duration of this packet in AVStream->time_base units, 0 if unknown. + * Equals next_pts - this_pts in presentation order. + */ + int64_t duration; + + int64_t pos; ///< byte position in stream, -1 if unknown + +#if FF_API_CONVERGENCE_DURATION + /** + * @deprecated Same as the duration field, but as int64_t. This was required + * for Matroska subtitles, whose duration values could overflow when the + * duration field was still an int. + */ + attribute_deprecated + int64_t convergence_duration; +#endif +} AVPacket; + +#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe +#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted +/** + * Flag is used to discard packets which are required to maintain valid + * decoder state but are not required for output and should be dropped + * after decoding. + **/ +#define AV_PKT_FLAG_DISCARD 0x0004 +/** + * The packet comes from a trusted source. + * + * Otherwise-unsafe constructs such as arbitrary pointers to data + * outside the packet may be followed. + */ +#define AV_PKT_FLAG_TRUSTED 0x0008 +/** + * Flag is used to indicate packets that contain frames that can + * be discarded by the decoder. I.e. Non-reference frames. + */ +#define AV_PKT_FLAG_DISPOSABLE 0x0010 + +enum AVSideDataParamChangeFlags { + AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001, + AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002, + AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, + AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008, +}; + +/** + * Allocate an AVPacket and set its fields to default values. The resulting + * struct must be freed using av_packet_free(). + * + * @return An AVPacket filled with default values or NULL on failure. + * + * @note this only allocates the AVPacket itself, not the data buffers. Those + * must be allocated through other means such as av_new_packet. + * + * @see av_new_packet + */ +AVPacket *av_packet_alloc(void); + +/** + * Create a new packet that references the same data as src. + * + * This is a shortcut for av_packet_alloc()+av_packet_ref(). + * + * @return newly created AVPacket on success, NULL on error. + * + * @see av_packet_alloc + * @see av_packet_ref + */ +AVPacket *av_packet_clone(const AVPacket *src); + +/** + * Free the packet, if the packet is reference counted, it will be + * unreferenced first. + * + * @param pkt packet to be freed. The pointer will be set to NULL. + * @note passing NULL is a no-op. + */ +void av_packet_free(AVPacket **pkt); + +/** + * Initialize optional fields of a packet with default values. + * + * Note, this does not touch the data and size members, which have to be + * initialized separately. + * + * @param pkt packet + */ +void av_init_packet(AVPacket *pkt); + +/** + * Allocate the payload of a packet and initialize its fields with + * default values. + * + * @param pkt packet + * @param size wanted payload size + * @return 0 if OK, AVERROR_xxx otherwise + */ +int av_new_packet(AVPacket *pkt, int size); + +/** + * Reduce packet size, correctly zeroing padding + * + * @param pkt packet + * @param size new size + */ +void av_shrink_packet(AVPacket *pkt, int size); + +/** + * Increase packet size, correctly zeroing padding + * + * @param pkt packet + * @param grow_by number of bytes by which to increase the size of the packet + */ +int av_grow_packet(AVPacket *pkt, int grow_by); + +/** + * Initialize a reference-counted packet from av_malloc()ed data. + * + * @param pkt packet to be initialized. This function will set the data, size, + * and buf fields, all others are left untouched. + * @param data Data allocated by av_malloc() to be used as packet data. If this + * function returns successfully, the data is owned by the underlying AVBuffer. + * The caller may not access the data through other means. + * @param size size of data in bytes, without the padding. I.e. the full buffer + * size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE. + * + * @return 0 on success, a negative AVERROR on error + */ +int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size); + +#if FF_API_AVPACKET_OLD_API +/** + * @warning This is a hack - the packet memory allocation stuff is broken. The + * packet is allocated if it was not really allocated. + * + * @deprecated Use av_packet_ref or av_packet_make_refcounted + */ +attribute_deprecated +int av_dup_packet(AVPacket *pkt); +/** + * Copy packet, including contents + * + * @return 0 on success, negative AVERROR on fail + * + * @deprecated Use av_packet_ref + */ +attribute_deprecated +int av_copy_packet(AVPacket *dst, const AVPacket *src); + +/** + * Copy packet side data + * + * @return 0 on success, negative AVERROR on fail + * + * @deprecated Use av_packet_copy_props + */ +attribute_deprecated +int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src); + +/** + * Free a packet. + * + * @deprecated Use av_packet_unref + * + * @param pkt packet to free + */ +attribute_deprecated +void av_free_packet(AVPacket *pkt); +#endif +/** + * Allocate new information of a packet. + * + * @param pkt packet + * @param type side information type + * @param size side information size + * @return pointer to fresh allocated data or NULL otherwise + */ +uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, + int size); + +/** + * Wrap an existing array as a packet side data. + * + * @param pkt packet + * @param type side information type + * @param data the side data array. It must be allocated with the av_malloc() + * family of functions. The ownership of the data is transferred to + * pkt. + * @param size side information size + * @return a non-negative number on success, a negative AVERROR code on + * failure. On failure, the packet is unchanged and the data remains + * owned by the caller. + */ +int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, + uint8_t *data, size_t size); + +/** + * Shrink the already allocated side data buffer + * + * @param pkt packet + * @param type side information type + * @param size new side information size + * @return 0 on success, < 0 on failure + */ +int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, + int size); + +/** + * Get side information from packet. + * + * @param pkt packet + * @param type desired side information type + * @param size pointer for side information size to store (optional) + * @return pointer to data if present or NULL otherwise + */ +uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, + int *size); + +#if FF_API_MERGE_SD_API +attribute_deprecated +int av_packet_merge_side_data(AVPacket *pkt); + +attribute_deprecated +int av_packet_split_side_data(AVPacket *pkt); +#endif + +const char *av_packet_side_data_name(enum AVPacketSideDataType type); + +/** + * Pack a dictionary for use in side_data. + * + * @param dict The dictionary to pack. + * @param size pointer to store the size of the returned data + * @return pointer to data if successful, NULL otherwise + */ +uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size); +/** + * Unpack a dictionary from side_data. + * + * @param data data from side_data + * @param size size of the data + * @param dict the metadata storage dictionary + * @return 0 on success, < 0 on failure + */ +int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict); + + +/** + * Convenience function to free all the side data stored. + * All the other fields stay untouched. + * + * @param pkt packet + */ +void av_packet_free_side_data(AVPacket *pkt); + +/** + * Setup a new reference to the data described by a given packet + * + * If src is reference-counted, setup dst as a new reference to the + * buffer in src. Otherwise allocate a new buffer in dst and copy the + * data from src into it. + * + * All the other fields are copied from src. + * + * @see av_packet_unref + * + * @param dst Destination packet. Will be completely overwritten. + * @param src Source packet + * + * @return 0 on success, a negative AVERROR on error. On error, dst + * will be blank (as if returned by av_packet_alloc()). + */ +int av_packet_ref(AVPacket *dst, const AVPacket *src); + +/** + * Wipe the packet. + * + * Unreference the buffer referenced by the packet and reset the + * remaining packet fields to their default values. + * + * @param pkt The packet to be unreferenced. + */ +void av_packet_unref(AVPacket *pkt); + +/** + * Move every field in src to dst and reset src. + * + * @see av_packet_unref + * + * @param src Source packet, will be reset + * @param dst Destination packet + */ +void av_packet_move_ref(AVPacket *dst, AVPacket *src); + +/** + * Copy only "properties" fields from src to dst. + * + * Properties for the purpose of this function are all the fields + * beside those related to the packet data (buf, data, size) + * + * @param dst Destination packet + * @param src Source packet + * + * @return 0 on success AVERROR on failure. + */ +int av_packet_copy_props(AVPacket *dst, const AVPacket *src); + +/** + * Ensure the data described by a given packet is reference counted. + * + * @note This function does not ensure that the reference will be writable. + * Use av_packet_make_writable instead for that purpose. + * + * @see av_packet_ref + * @see av_packet_make_writable + * + * @param pkt packet whose data should be made reference counted. + * + * @return 0 on success, a negative AVERROR on error. On failure, the + * packet is unchanged. + */ +int av_packet_make_refcounted(AVPacket *pkt); + +/** + * Create a writable reference for the data described by a given packet, + * avoiding data copy if possible. + * + * @param pkt Packet whose data should be made writable. + * + * @return 0 on success, a negative AVERROR on failure. On failure, the + * packet is unchanged. + */ +int av_packet_make_writable(AVPacket *pkt); + +/** + * Convert valid timing fields (timestamps / durations) in a packet from one + * timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be + * ignored. + * + * @param pkt packet on which the conversion will be performed + * @param tb_src source timebase, in which the timing fields in pkt are + * expressed + * @param tb_dst destination timebase, to which the timing fields will be + * converted + */ +void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst); + +/** + * @} + */ + +#endif // AVCODEC_PACKET_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet_internal.h new file mode 100644 index 00000000..cdb9a27f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/packet_internal.h @@ -0,0 +1,30 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PACKET_INTERNAL_H +#define AVCODEC_PACKET_INTERNAL_H + +#include + +#include "packet.h" + +int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type); + +int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp); + +#endif // AVCODEC_PACKET_INTERNAL_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/paf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/paf.h new file mode 100644 index 00000000..ce8245f2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/paf.h @@ -0,0 +1,28 @@ +/* + * Packed Animation File decoder/demuxer common code + * Copyright (c) 2012 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PAF_H +#define AVCODEC_PAF_H + +#define PAF_SOUND_SAMPLES 2205 +#define PAF_SOUND_FRAME_SIZE ((256 + PAF_SOUND_SAMPLES) * 2) + +#endif /* AVCODEC_PAF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/parser.h new file mode 100644 index 00000000..ef35547e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/parser.h @@ -0,0 +1,60 @@ +/* + * AVCodecParser prototypes and definitions + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PARSER_H +#define AVCODEC_PARSER_H + +#include "avcodec.h" + +typedef struct ParseContext{ + uint8_t *buffer; + int index; + int last_index; + unsigned int buffer_size; + uint32_t state; ///< contains the last few bytes in MSB order + int frame_start_found; + int overread; ///< the number of bytes which where irreversibly read from the next frame + int overread_index; ///< the index into ParseContext.buffer of the overread bytes + uint64_t state64; ///< contains the last 8 bytes in MSB order +} ParseContext; + +#define END_NOT_FOUND (-100) + +/** + * Combine the (truncated) bitstream to a complete frame. + * @return -1 if no complete frame could be created, + * AVERROR(ENOMEM) if there was a memory allocation error + */ +int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size); +int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, + int buf_size); +void ff_parse_close(AVCodecParserContext *s); + +/** + * Fetch timestamps for a specific byte within the current access unit. + * @param off byte position within the access unit + * @param remove Found timestamps will be removed if set to 1, kept if set to 0. + * @param fuzzy Only use found value if it is more informative than what we already have + */ +void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove, int fuzzy); + +#endif /* AVCODEC_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pcm_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pcm_tablegen.h new file mode 100644 index 00000000..7274c3cd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pcm_tablegen.h @@ -0,0 +1,143 @@ +/* + * Header file for hardcoded PCM tables + * + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PCM_TABLEGEN_H +#define AVCODEC_PCM_TABLEGEN_H + +#include +#include "libavutil/attributes.h" + +/* from g711.c by SUN microsystems (unrestricted use) */ + +#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */ +#define QUANT_MASK (0xf) /* Quantization field mask. */ +#define NSEGS (8) /* Number of A-law segments. */ +#define SEG_SHIFT (4) /* Left shift for segment number. */ +#define SEG_MASK (0x70) /* Segment field mask. */ + +#define BIAS (0x84) /* Bias for linear code. */ + +#define VIDC_SIGN_BIT (1) +#define VIDC_QUANT_MASK (0x1E) +#define VIDC_QUANT_SHIFT (1) +#define VIDC_SEG_SHIFT (5) +#define VIDC_SEG_MASK (0xE0) + +/* alaw2linear() - Convert an A-law value to 16-bit linear PCM */ +static av_cold int alaw2linear(unsigned char a_val) +{ + int t; + int seg; + + a_val ^= 0x55; + + t = a_val & QUANT_MASK; + seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT; + if(seg) t= (t + t + 1 + 32) << (seg + 2); + else t= (t + t + 1 ) << 3; + + return (a_val & SIGN_BIT) ? t : -t; +} + +static av_cold int ulaw2linear(unsigned char u_val) +{ + int t; + + /* Complement to obtain normal u-law value. */ + u_val = ~u_val; + + /* + * Extract and bias the quantization bits. Then + * shift up by the segment number and subtract out the bias. + */ + t = ((u_val & QUANT_MASK) << 3) + BIAS; + t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT; + + return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS); +} + +static av_cold int vidc2linear(unsigned char u_val) +{ + int t; + + /* + * Extract and bias the quantization bits. Then + * shift up by the segment number and subtract out the bias. + */ + t = (((u_val & VIDC_QUANT_MASK) >> VIDC_QUANT_SHIFT) << 3) + BIAS; + t <<= ((unsigned)u_val & VIDC_SEG_MASK) >> VIDC_SEG_SHIFT; + + return (u_val & VIDC_SIGN_BIT) ? (BIAS - t) : (t - BIAS); +} + +#if CONFIG_HARDCODED_TABLES +#define pcm_alaw_tableinit() +#define pcm_ulaw_tableinit() +#define pcm_vidc_tableinit() +#include "libavcodec/pcm_tables.h" +#else +/* 16384 entries per table */ +static uint8_t linear_to_alaw[16384]; +static uint8_t linear_to_ulaw[16384]; +static uint8_t linear_to_vidc[16384]; + +static av_cold void build_xlaw_table(uint8_t *linear_to_xlaw, + int (*xlaw2linear)(unsigned char), + int mask) +{ + int i, j, v, v1, v2; + + j = 1; + linear_to_xlaw[8192] = mask; + for(i=0;i<127;i++) { + v1 = xlaw2linear(i ^ mask); + v2 = xlaw2linear((i + 1) ^ mask); + v = (v1 + v2 + 4) >> 3; + for(;j + +#include "config.h" + +#include "avcodec.h" + +typedef struct PixblockDSPContext { + void (*get_pixels)(int16_t *av_restrict block /* align 16 */, + const uint8_t *pixels /* align 8 */, + ptrdiff_t stride); + void (*get_pixels_unaligned)(int16_t *av_restrict block /* align 16 */, + const uint8_t *pixels, + ptrdiff_t stride); + void (*diff_pixels)(int16_t *av_restrict block /* align 16 */, + const uint8_t *s1 /* align 8 */, + const uint8_t *s2 /* align 8 */, + ptrdiff_t stride); + void (*diff_pixels_unaligned)(int16_t *av_restrict block /* align 16 */, + const uint8_t *s1, + const uint8_t *s2, + ptrdiff_t stride); + +} PixblockDSPContext; + +void ff_pixblockdsp_init(PixblockDSPContext *c, AVCodecContext *avctx); +void ff_pixblockdsp_init_aarch64(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_pixblockdsp_init_alpha(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_pixblockdsp_init_arm(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_pixblockdsp_init_ppc(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_pixblockdsp_init_x86(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_pixblockdsp_init_mips(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); + +#endif /* AVCODEC_PIXBLOCKDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pixels.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pixels.h new file mode 100644 index 00000000..98eacd4d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pixels.h @@ -0,0 +1,37 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PIXELS_H +#define AVCODEC_PIXELS_H + +#include +#include + +/* pixel operations */ +#define CALL_2X_PIXELS_MACRO(STATIC, a, b, n) \ +STATIC void a(uint8_t *block, const uint8_t *pixels, \ + ptrdiff_t line_size, int h) \ +{ \ + b(block, pixels, line_size, h); \ + b(block + n, pixels + n, line_size, h); \ +} + +#define CALL_2X_PIXELS(a, b, n) CALL_2X_PIXELS_MACRO(static, a, b, n) +#define CALL_2X_PIXELS_EXPORT(a, b, n) CALL_2X_PIXELS_MACRO(, a, b, n) + +#endif /* AVCODEC_PIXELS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/png.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/png.h new file mode 100644 index 00000000..e967fcf3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/png.h @@ -0,0 +1,64 @@ +/* + * PNG image format + * Copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PNG_H +#define AVCODEC_PNG_H + +#include + +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) + +#define PNG_FILTER_TYPE_LOCO 64 +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_MIXED 5 + +#define NB_PASSES 7 + +#define PNGSIG 0x89504e470d0a1a0a +#define MNGSIG 0x8a4d4e470d0a1a0a + +/* Mask to determine which y pixels are valid in a pass */ +extern const uint8_t ff_png_pass_ymask[NB_PASSES]; + +void *ff_png_zalloc(void *opaque, unsigned int items, unsigned int size); + +void ff_png_zfree(void *opaque, void *ptr); + +int ff_png_get_nb_channels(int color_type); + +/* compute the row size of an interleaved pass */ +int ff_png_pass_row_size(int pass, int bits_per_pixel, int width); + +void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp); + +#endif /* AVCODEC_PNG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pngdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pngdsp.h new file mode 100644 index 00000000..5475d0d9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pngdsp.h @@ -0,0 +1,40 @@ +/* + * PNG image format + * Copyright (c) 2008 Loren Merrit + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PNGDSP_H +#define AVCODEC_PNGDSP_H + +#include + +typedef struct PNGDSPContext { + void (*add_bytes_l2)(uint8_t *dst, + uint8_t *src1 /* align 16 */, + uint8_t *src2, int w); + + /* this might write to dst[w] */ + void (*add_paeth_prediction)(uint8_t *dst, uint8_t *src, + uint8_t *top, int w, int bpp); +} PNGDSPContext; + +void ff_pngdsp_init(PNGDSPContext *dsp); +void ff_pngdsp_init_x86(PNGDSPContext *dsp); + +#endif /* AVCODEC_PNGDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pnm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pnm.h new file mode 100644 index 00000000..89c3b5a2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pnm.h @@ -0,0 +1,39 @@ +/* + * PNM image format + * Copyright (c) 2002, 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PNM_H +#define AVCODEC_PNM_H + +#include "avcodec.h" + +typedef struct PNMContext { + uint8_t *bytestream; + uint8_t *bytestream_start; + uint8_t *bytestream_end; + int maxval; ///< maximum value of a pixel + int type; + int endian; + float scale; +} PNMContext; + +int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s); + +#endif /* AVCODEC_PNM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fdct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fdct.h new file mode 100644 index 00000000..437f8152 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fdct.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PPC_FDCT_H +#define AVCODEC_PPC_FDCT_H + +#include + +void ff_fdct_altivec(int16_t *block); + +#endif /* AVCODEC_PPC_FDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fft_vsx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fft_vsx.h new file mode 100644 index 00000000..1e44031a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/fft_vsx.h @@ -0,0 +1,829 @@ +#ifndef AVCODEC_PPC_FFT_VSX_H +#define AVCODEC_PPC_FFT_VSX_H +/* + * FFT transform, optimized with VSX built-in functions + * Copyright (c) 2014 Rong Yan Copyright (c) 2009 Loren Merritt + * + * This algorithm (though not any of the implementation details) is + * based on libdjbfft by D. J. Bernstein, and fft_altivec_s.S. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#include "config.h" +#include "libavutil/cpu.h" +#include "libavutil/ppc/util_altivec.h" +#include "libavcodec/fft.h" +#include "libavcodec/fft-internal.h" + +#if HAVE_VSX + +void ff_fft_calc_interleave_vsx(FFTContext *s, FFTComplex *z); +void ff_fft_calc_vsx(FFTContext *s, FFTComplex *z); + + +#define byte_2complex (2*sizeof(FFTComplex)) +#define byte_4complex (4*sizeof(FFTComplex)) +#define byte_6complex (6*sizeof(FFTComplex)) +#define byte_8complex (8*sizeof(FFTComplex)) +#define byte_10complex (10*sizeof(FFTComplex)) +#define byte_12complex (12*sizeof(FFTComplex)) +#define byte_14complex (14*sizeof(FFTComplex)) + +inline static void pass_vsx_interleave(FFTComplex *z, const FFTSample *wre, unsigned int n) +{ + int o1 = n<<1; + int o2 = n<<2; + int o3 = o1+o2; + int i1, i2, i3; + FFTSample* out = (FFTSample*)z; + const FFTSample *wim = wre+o1; + vec_f vz0, vzo1, vzo2, vzo3; + vec_f x0, x1, x2, x3; + vec_f x4, x5, x6, x7; + vec_f x8, x9, x10, x11; + vec_f x12, x13, x14, x15; + vec_f x16, x17, x18, x19; + vec_f x20, x21, x22, x23; + vec_f vz0plus1, vzo1plus1, vzo2plus1, vzo3plus1; + vec_f y0, y1, y2, y3; + vec_f y4, y5, y8, y9; + vec_f y10, y13, y14, y15; + vec_f y16, y17, y18, y19; + vec_f y20, y21, y22, y23; + vec_f wr1, wi1, wr0, wi0; + vec_f wr2, wi2, wr3, wi3; + vec_f xmulwi0, xmulwi1, ymulwi2, ymulwi3; + + n = n-2; + i1 = o1*sizeof(FFTComplex); + i2 = o2*sizeof(FFTComplex); + i3 = o3*sizeof(FFTComplex); + vzo2 = vec_ld(i2, &(out[0])); // zo2.r zo2.i z(o2+1).r z(o2+1).i + vzo2plus1 = vec_ld(i2+16, &(out[0])); + vzo3 = vec_ld(i3, &(out[0])); // zo3.r zo3.i z(o3+1).r z(o3+1).i + vzo3plus1 = vec_ld(i3+16, &(out[0])); + vz0 = vec_ld(0, &(out[0])); // z0.r z0.i z1.r z1.i + vz0plus1 = vec_ld(16, &(out[0])); + vzo1 = vec_ld(i1, &(out[0])); // zo1.r zo1.i z(o1+1).r z(o1+1).i + vzo1plus1 = vec_ld(i1+16, &(out[0])); + + x0 = vec_add(vzo2, vzo3); + x1 = vec_sub(vzo2, vzo3); + y0 = vec_add(vzo2plus1, vzo3plus1); + y1 = vec_sub(vzo2plus1, vzo3plus1); + + wr1 = vec_splats(wre[1]); + wi1 = vec_splats(wim[-1]); + wi2 = vec_splats(wim[-2]); + wi3 = vec_splats(wim[-3]); + wr2 = vec_splats(wre[2]); + wr3 = vec_splats(wre[3]); + + x2 = vec_perm(x0, x1, vcprm(2,s2,3,s3)); + x3 = vec_perm(x0, x1, vcprm(s3,3,s2,2)); + + y4 = vec_perm(y0, y1, vcprm(s1,1,s0,0)); + y5 = vec_perm(y0, y1, vcprm(s3,3,s2,2)); + y2 = vec_perm(y0, y1, vcprm(0,s0,1,s1)); + y3 = vec_perm(y0, y1, vcprm(2,s2,3,s3)); + + ymulwi2 = vec_mul(y4, wi2); + ymulwi3 = vec_mul(y5, wi3); + x4 = vec_mul(x2, wr1); + x5 = vec_mul(x3, wi1); + y8 = vec_madd(y2, wr2, ymulwi2); + y9 = vec_msub(y2, wr2, ymulwi2); + x6 = vec_add(x4, x5); + x7 = vec_sub(x4, x5); + y13 = vec_madd(y3, wr3, ymulwi3); + y14 = vec_msub(y3, wr3, ymulwi3); + + x8 = vec_perm(x6, x7, vcprm(0,1,s2,s3)); + y10 = vec_perm(y8, y9, vcprm(0,1,s2,s3)); + y15 = vec_perm(y13, y14, vcprm(0,1,s2,s3)); + + x9 = vec_perm(x0, x8, vcprm(0,1,s0,s2)); + x10 = vec_perm(x1, x8, vcprm(1,0,s3,s1)); + + y16 = vec_perm(y10, y15, vcprm(0,2,s0,s2)); + y17 = vec_perm(y10, y15, vcprm(3,1,s3,s1)); + + x11 = vec_add(vz0, x9); + x12 = vec_sub(vz0, x9); + x13 = vec_add(vzo1, x10); + x14 = vec_sub(vzo1, x10); + + y18 = vec_add(vz0plus1, y16); + y19 = vec_sub(vz0plus1, y16); + y20 = vec_add(vzo1plus1, y17); + y21 = vec_sub(vzo1plus1, y17); + + x15 = vec_perm(x13, x14, vcprm(0,s1,2,s3)); + x16 = vec_perm(x13, x14, vcprm(s0,1,s2,3)); + y22 = vec_perm(y20, y21, vcprm(0,s1,2,s3)); + y23 = vec_perm(y20, y21, vcprm(s0,1,s2,3)); + + + vec_st(x11, 0, &(out[0])); + vec_st(y18, 16, &(out[0])); + vec_st(x15, i1, &(out[0])); + vec_st(y22, i1+16, &(out[0])); + vec_st(x12, i2, &(out[0])); + vec_st(y19, i2+16, &(out[0])); + vec_st(x16, i3, &(out[0])); + vec_st(y23, i3+16, &(out[0])); + + do { + out += 8; + wre += 4; + wim -= 4; + wr0 = vec_splats(wre[0]); + wr1 = vec_splats(wre[1]); + wi0 = vec_splats(wim[0]); + wi1 = vec_splats(wim[-1]); + + wr2 = vec_splats(wre[2]); + wr3 = vec_splats(wre[3]); + wi2 = vec_splats(wim[-2]); + wi3 = vec_splats(wim[-3]); + + vzo2 = vec_ld(i2, &(out[0])); // zo2.r zo2.i z(o2+1).r z(o2+1).i + vzo2plus1 = vec_ld(i2+16, &(out[0])); + vzo3 = vec_ld(i3, &(out[0])); // zo3.r zo3.i z(o3+1).r z(o3+1).i + vzo3plus1 = vec_ld(i3+16, &(out[0])); + vz0 = vec_ld(0, &(out[0])); // z0.r z0.i z1.r z1.i + vz0plus1 = vec_ld(16, &(out[0])); + vzo1 = vec_ld(i1, &(out[0])); // zo1.r zo1.i z(o1+1).r z(o1+1).i + vzo1plus1 = vec_ld(i1+16, &(out[0])); + + x0 = vec_add(vzo2, vzo3); + x1 = vec_sub(vzo2, vzo3); + + y0 = vec_add(vzo2plus1, vzo3plus1); + y1 = vec_sub(vzo2plus1, vzo3plus1); + + x4 = vec_perm(x0, x1, vcprm(s1,1,s0,0)); + x5 = vec_perm(x0, x1, vcprm(s3,3,s2,2)); + x2 = vec_perm(x0, x1, vcprm(0,s0,1,s1)); + x3 = vec_perm(x0, x1, vcprm(2,s2,3,s3)); + + y2 = vec_perm(y0, y1, vcprm(0,s0,1,s1)); + y3 = vec_perm(y0, y1, vcprm(2,s2,3,s3)); + xmulwi0 = vec_mul(x4, wi0); + xmulwi1 = vec_mul(x5, wi1); + + y4 = vec_perm(y0, y1, vcprm(s1,1,s0,0)); + y5 = vec_perm(y0, y1, vcprm(s3,3,s2,2)); + + x8 = vec_madd(x2, wr0, xmulwi0); + x9 = vec_msub(x2, wr0, xmulwi0); + ymulwi2 = vec_mul(y4, wi2); + ymulwi3 = vec_mul(y5, wi3); + + x13 = vec_madd(x3, wr1, xmulwi1); + x14 = vec_msub(x3, wr1, xmulwi1); + + y8 = vec_madd(y2, wr2, ymulwi2); + y9 = vec_msub(y2, wr2, ymulwi2); + y13 = vec_madd(y3, wr3, ymulwi3); + y14 = vec_msub(y3, wr3, ymulwi3); + + x10 = vec_perm(x8, x9, vcprm(0,1,s2,s3)); + x15 = vec_perm(x13, x14, vcprm(0,1,s2,s3)); + + y10 = vec_perm(y8, y9, vcprm(0,1,s2,s3)); + y15 = vec_perm(y13, y14, vcprm(0,1,s2,s3)); + + x16 = vec_perm(x10, x15, vcprm(0,2,s0,s2)); + x17 = vec_perm(x10, x15, vcprm(3,1,s3,s1)); + + y16 = vec_perm(y10, y15, vcprm(0,2,s0,s2)); + y17 = vec_perm(y10, y15, vcprm(3,1,s3,s1)); + + x18 = vec_add(vz0, x16); + x19 = vec_sub(vz0, x16); + x20 = vec_add(vzo1, x17); + x21 = vec_sub(vzo1, x17); + + y18 = vec_add(vz0plus1, y16); + y19 = vec_sub(vz0plus1, y16); + y20 = vec_add(vzo1plus1, y17); + y21 = vec_sub(vzo1plus1, y17); + + x22 = vec_perm(x20, x21, vcprm(0,s1,2,s3)); + x23 = vec_perm(x20, x21, vcprm(s0,1,s2,3)); + + y22 = vec_perm(y20, y21, vcprm(0,s1,2,s3)); + y23 = vec_perm(y20, y21, vcprm(s0,1,s2,3)); + + vec_st(x18, 0, &(out[0])); + vec_st(y18, 16, &(out[0])); + vec_st(x22, i1, &(out[0])); + vec_st(y22, i1+16, &(out[0])); + vec_st(x19, i2, &(out[0])); + vec_st(y19, i2+16, &(out[0])); + vec_st(x23, i3, &(out[0])); + vec_st(y23, i3+16, &(out[0])); + } while (n-=2); +} + +inline static void fft2_vsx_interleave(FFTComplex *z) +{ + FFTSample r1, i1; + + r1 = z[0].re - z[1].re; + z[0].re += z[1].re; + z[1].re = r1; + + i1 = z[0].im - z[1].im; + z[0].im += z[1].im; + z[1].im = i1; + } + +inline static void fft4_vsx_interleave(FFTComplex *z) +{ + vec_f a, b, c, d; + float* out= (float*)z; + a = vec_ld(0, &(out[0])); + b = vec_ld(byte_2complex, &(out[0])); + + c = vec_perm(a, b, vcprm(0,1,s2,s1)); + d = vec_perm(a, b, vcprm(2,3,s0,s3)); + a = vec_add(c, d); + b = vec_sub(c, d); + + c = vec_perm(a, b, vcprm(0,1,s0,s1)); + d = vec_perm(a, b, vcprm(2,3,s3,s2)); + + a = vec_add(c, d); + b = vec_sub(c, d); + vec_st(a, 0, &(out[0])); + vec_st(b, byte_2complex, &(out[0])); +} + +inline static void fft8_vsx_interleave(FFTComplex *z) +{ + vec_f vz0, vz1, vz2, vz3; + vec_f x0, x1, x2, x3; + vec_f x4, x5, x6, x7; + vec_f x8, x9, x10, x11; + vec_f x12, x13, x14, x15; + vec_f x16, x17, x18, x19; + vec_f x20, x21, x22, x23; + vec_f x24, x25, x26, x27; + vec_f x28, x29, x30, x31; + vec_f x32, x33, x34; + + float* out= (float*)z; + vec_f vc1 = {sqrthalf, sqrthalf, sqrthalf, sqrthalf}; + + vz0 = vec_ld(0, &(out[0])); + vz1 = vec_ld(byte_2complex, &(out[0])); + vz2 = vec_ld(byte_4complex, &(out[0])); + vz3 = vec_ld(byte_6complex, &(out[0])); + + x0 = vec_perm(vz0, vz1, vcprm(0,1,s2,s1)); + x1 = vec_perm(vz0, vz1, vcprm(2,3,s0,s3)); + x2 = vec_perm(vz2, vz3, vcprm(2,1,s0,s1)); + x3 = vec_perm(vz2, vz3, vcprm(0,3,s2,s3)); + + x4 = vec_add(x0, x1); + x5 = vec_sub(x0, x1); + x6 = vec_add(x2, x3); + x7 = vec_sub(x2, x3); + + x8 = vec_perm(x4, x5, vcprm(0,1,s0,s1)); + x9 = vec_perm(x4, x5, vcprm(2,3,s3,s2)); + x10 = vec_perm(x6, x7, vcprm(2,1,s2,s1)); + x11 = vec_perm(x6, x7, vcprm(0,3,s0,s3)); + + x12 = vec_add(x8, x9); + x13 = vec_sub(x8, x9); + x14 = vec_add(x10, x11); + x15 = vec_sub(x10, x11); + x16 = vec_perm(x12, x13, vcprm(0,s0,1,s1)); + x17 = vec_perm(x14, x15, vcprm(0,s0,1,s1)); + x18 = vec_perm(x16, x17, vcprm(s0,s3,s2,s1)); + x19 = vec_add(x16, x18); // z0.r z2.r z0.i z2.i + x20 = vec_sub(x16, x18); // z4.r z6.r z4.i z6.i + + x21 = vec_perm(x12, x13, vcprm(2,s2,3,s3)); + x22 = vec_perm(x14, x15, vcprm(2,3,s2,s3)); + x23 = vec_perm(x14, x15, vcprm(3,2,s3,s2)); + x24 = vec_add(x22, x23); + x25 = vec_sub(x22, x23); + x26 = vec_mul( vec_perm(x24, x25, vcprm(2,s2,0,s0)), vc1); + + x27 = vec_add(x21, x26); // z1.r z7.r z1.i z3.i + x28 = vec_sub(x21, x26); //z5.r z3.r z5.i z7.i + + x29 = vec_perm(x19, x27, vcprm(0,2,s0,s2)); // z0.r z0.i z1.r z1.i + x30 = vec_perm(x19, x27, vcprm(1,3,s1,s3)); // z2.r z2.i z7.r z3.i + x31 = vec_perm(x20, x28, vcprm(0,2,s0,s2)); // z4.r z4.i z5.r z5.i + x32 = vec_perm(x20, x28, vcprm(1,3,s1,s3)); // z6.r z6.i z3.r z7.i + x33 = vec_perm(x30, x32, vcprm(0,1,s2,3)); // z2.r z2.i z3.r z3.i + x34 = vec_perm(x30, x32, vcprm(s0,s1,2,s3)); // z6.r z6.i z7.r z7.i + + vec_st(x29, 0, &(out[0])); + vec_st(x33, byte_2complex, &(out[0])); + vec_st(x31, byte_4complex, &(out[0])); + vec_st(x34, byte_6complex, &(out[0])); +} + +inline static void fft16_vsx_interleave(FFTComplex *z) +{ + float* out= (float*)z; + vec_f vc0 = {sqrthalf, sqrthalf, sqrthalf, sqrthalf}; + vec_f vc1 = {ff_cos_16[1], ff_cos_16[1], ff_cos_16[1], ff_cos_16[1]}; + vec_f vc2 = {ff_cos_16[3], ff_cos_16[3], ff_cos_16[3], ff_cos_16[3]}; + vec_f vz0, vz1, vz2, vz3; + vec_f vz4, vz5, vz6, vz7; + vec_f x0, x1, x2, x3; + vec_f x4, x5, x6, x7; + vec_f x8, x9, x10, x11; + vec_f x12, x13, x14, x15; + vec_f x16, x17, x18, x19; + vec_f x20, x21, x22, x23; + vec_f x24, x25, x26, x27; + vec_f x28, x29, x30, x31; + vec_f x32, x33, x34, x35; + vec_f x36, x37, x38, x39; + vec_f x40, x41, x42, x43; + vec_f x44, x45, x46, x47; + vec_f x48, x49, x50, x51; + vec_f x52, x53, x54, x55; + vec_f x56, x57, x58, x59; + vec_f x60, x61, x62, x63; + vec_f x64, x65, x66, x67; + vec_f x68, x69, x70, x71; + vec_f x72, x73, x74, x75; + vec_f x76, x77, x78, x79; + vec_f x80, x81, x82, x83; + vec_f x84, x85, x86; + + vz0 = vec_ld(0, &(out[0])); + vz1 = vec_ld(byte_2complex, &(out[0])); + vz2 = vec_ld(byte_4complex, &(out[0])); + vz3 = vec_ld(byte_6complex, &(out[0])); + vz4 = vec_ld(byte_8complex, &(out[0])); + vz5 = vec_ld(byte_10complex, &(out[0])); + vz6 = vec_ld(byte_12complex, &(out[0])); + vz7 = vec_ld(byte_14complex, &(out[0])); + + x0 = vec_perm(vz0, vz1, vcprm(0,1,s2,s1)); + x1 = vec_perm(vz0, vz1, vcprm(2,3,s0,s3)); + x2 = vec_perm(vz2, vz3, vcprm(0,1,s0,s1)); + x3 = vec_perm(vz2, vz3, vcprm(2,3,s2,s3)); + + x4 = vec_perm(vz4, vz5, vcprm(0,1,s2,s1)); + x5 = vec_perm(vz4, vz5, vcprm(2,3,s0,s3)); + x6 = vec_perm(vz6, vz7, vcprm(0,1,s2,s1)); + x7 = vec_perm(vz6, vz7, vcprm(2,3,s0,s3)); + + x8 = vec_add(x0, x1); + x9 = vec_sub(x0, x1); + x10 = vec_add(x2, x3); + x11 = vec_sub(x2, x3); + + x12 = vec_add(x4, x5); + x13 = vec_sub(x4, x5); + x14 = vec_add(x6, x7); + x15 = vec_sub(x6, x7); + + x16 = vec_perm(x8, x9, vcprm(0,1,s0,s1)); + x17 = vec_perm(x8, x9, vcprm(2,3,s3,s2)); + x18 = vec_perm(x10, x11, vcprm(2,1,s1,s2)); + x19 = vec_perm(x10, x11, vcprm(0,3,s0,s3)); + x20 = vec_perm(x12, x14, vcprm(0,1,s0, s1)); + x21 = vec_perm(x12, x14, vcprm(2,3,s2,s3)); + x22 = vec_perm(x13, x15, vcprm(0,1,s0,s1)); + x23 = vec_perm(x13, x15, vcprm(3,2,s3,s2)); + + x24 = vec_add(x16, x17); + x25 = vec_sub(x16, x17); + x26 = vec_add(x18, x19); + x27 = vec_sub(x18, x19); + x28 = vec_add(x20, x21); + x29 = vec_sub(x20, x21); + x30 = vec_add(x22, x23); + x31 = vec_sub(x22, x23); + + x32 = vec_add(x24, x26); + x33 = vec_sub(x24, x26); + x34 = vec_perm(x32, x33, vcprm(0,1,s0,s1)); + + x35 = vec_perm(x28, x29, vcprm(2,1,s1,s2)); + x36 = vec_perm(x28, x29, vcprm(0,3,s0,s3)); + x37 = vec_add(x35, x36); + x38 = vec_sub(x35, x36); + x39 = vec_perm(x37, x38, vcprm(0,1,s1,s0)); + + x40 = vec_perm(x27, x38, vcprm(3,2,s2,s3)); + x41 = vec_perm(x26, x37, vcprm(2,3,s3,s2)); + x42 = vec_add(x40, x41); + x43 = vec_sub(x40, x41); + x44 = vec_mul(x42, vc0); + x45 = vec_mul(x43, vc0); + + x46 = vec_add(x34, x39); // z0.r z0.i z4.r z4.i + x47 = vec_sub(x34, x39); // z8.r z8.i z12.r z12.i + + x48 = vec_perm(x30, x31, vcprm(2,1,s1,s2)); + x49 = vec_perm(x30, x31, vcprm(0,3,s3,s0)); + x50 = vec_add(x48, x49); + x51 = vec_sub(x48, x49); + x52 = vec_mul(x50, vc1); + x53 = vec_mul(x50, vc2); + x54 = vec_mul(x51, vc1); + x55 = vec_mul(x51, vc2); + + x56 = vec_perm(x24, x25, vcprm(2,3,s2,s3)); + x57 = vec_perm(x44, x45, vcprm(0,1,s1,s0)); + x58 = vec_add(x56, x57); + x59 = vec_sub(x56, x57); + + x60 = vec_perm(x54, x55, vcprm(1,0,3,2)); + x61 = vec_perm(x54, x55, vcprm(s1,s0,s3,s2)); + x62 = vec_add(x52, x61); + x63 = vec_sub(x52, x61); + x64 = vec_add(x60, x53); + x65 = vec_sub(x60, x53); + x66 = vec_perm(x62, x64, vcprm(0,1,s3,s2)); + x67 = vec_perm(x63, x65, vcprm(s0,s1,3,2)); + + x68 = vec_add(x58, x66); // z1.r z1.i z3.r z3.i + x69 = vec_sub(x58, x66); // z9.r z9.i z11.r z11.i + x70 = vec_add(x59, x67); // z5.r z5.i z15.r z15.i + x71 = vec_sub(x59, x67); // z13.r z13.i z7.r z7.i + + x72 = vec_perm(x25, x27, vcprm(s1,s0,s2,s3)); + x73 = vec_add(x25, x72); + x74 = vec_sub(x25, x72); + x75 = vec_perm(x73, x74, vcprm(0,1,s0,s1)); + x76 = vec_perm(x44, x45, vcprm(3,2,s2,s3)); + x77 = vec_add(x75, x76); // z2.r z2.i z6.r z6.i + x78 = vec_sub(x75, x76); // z10.r z10.i z14.r z14.i + + x79 = vec_perm(x46, x68, vcprm(0,1,s0,s1)); // z0.r z0.i z1.r z1.i + x80 = vec_perm(x77, x68, vcprm(0,1,s2,s3)); // z2.r z2.i z3.r z3.i + x81 = vec_perm(x46, x70, vcprm(2,3,s0,s1)); // z4.r z4.i z5.r z5.i + x82 = vec_perm(x71, x77, vcprm(s2,s3,2,3)); // z6.r z6.i z7.r z7.i + vec_st(x79, 0, &(out[0])); + vec_st(x80, byte_2complex, &(out[0])); + vec_st(x81, byte_4complex, &(out[0])); + vec_st(x82, byte_6complex, &(out[0])); + x83 = vec_perm(x47, x69, vcprm(0,1,s0,s1)); // z8.r z8.i z9.r z9.i + x84 = vec_perm(x78, x69, vcprm(0,1,s2,s3)); // z10.r z10.i z11.r z11.i + x85 = vec_perm(x47, x71, vcprm(2,3,s0,s1)); // z12.r z12.i z13.r z13.i + x86 = vec_perm(x70, x78, vcprm(s2,s3,2,3)); // z14.r z14.i z15.r z15.i + vec_st(x83, byte_8complex, &(out[0])); + vec_st(x84, byte_10complex, &(out[0])); + vec_st(x85, byte_12complex, &(out[0])); + vec_st(x86, byte_14complex, &(out[0])); +} + +inline static void fft4_vsx(FFTComplex *z) +{ + vec_f a, b, c, d; + float* out= (float*)z; + a = vec_ld(0, &(out[0])); + b = vec_ld(byte_2complex, &(out[0])); + + c = vec_perm(a, b, vcprm(0,1,s2,s1)); + d = vec_perm(a, b, vcprm(2,3,s0,s3)); + a = vec_add(c, d); + b = vec_sub(c, d); + + c = vec_perm(a,b, vcprm(0,s0,1,s1)); + d = vec_perm(a, b, vcprm(2,s3,3,s2)); + + a = vec_add(c, d); + b = vec_sub(c, d); + + c = vec_perm(a, b, vcprm(0,1,s0,s1)); + d = vec_perm(a, b, vcprm(2,3,s2,s3)); + + vec_st(c, 0, &(out[0])); + vec_st(d, byte_2complex, &(out[0])); + return; +} + +inline static void fft8_vsx(FFTComplex *z) +{ + vec_f vz0, vz1, vz2, vz3; + vec_f vz4, vz5, vz6, vz7, vz8; + + float* out= (float*)z; + vec_f vc0 = {0.0, 0.0, 0.0, 0.0}; + vec_f vc1 = {-sqrthalf, sqrthalf, sqrthalf, -sqrthalf}; + vec_f vc2 = {sqrthalf, sqrthalf, sqrthalf, sqrthalf}; + + vz0 = vec_ld(0, &(out[0])); + vz1 = vec_ld(byte_2complex, &(out[0])); + vz2 = vec_ld(byte_4complex, &(out[0])); + vz3 = vec_ld(byte_6complex, &(out[0])); + + vz6 = vec_perm(vz2, vz3, vcprm(0,s0,1,s1)); + vz7 = vec_perm(vz2, vz3, vcprm(2,s2,3,s3)); + vz4 = vec_perm(vz0, vz1, vcprm(0,1,s2,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,3,s0,s3)); + + vz2 = vec_add(vz6, vz7); + vz3 = vec_sub(vz6, vz7); + vz8 = vec_perm(vz3, vz3, vcprm(2,3,0,1)); + + vz0 = vec_add(vz4, vz5); + vz1 = vec_sub(vz4, vz5); + + vz3 = vec_madd(vz3, vc1, vc0); + vz3 = vec_madd(vz8, vc2, vz3); + + vz4 = vec_perm(vz0, vz1, vcprm(0,s0,1,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,s3,3,s2)); + vz6 = vec_perm(vz2, vz3, vcprm(1,2,s3,s0)); + vz7 = vec_perm(vz2, vz3, vcprm(0,3,s2,s1)); + + vz0 = vec_add(vz4, vz5); + vz1 = vec_sub(vz4, vz5); + vz2 = vec_add(vz6, vz7); + vz3 = vec_sub(vz6, vz7); + + vz4 = vec_perm(vz0, vz1, vcprm(0,1,s0,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,3,s2,s3)); + vz6 = vec_perm(vz2, vz3, vcprm(0,2,s1,s3)); + vz7 = vec_perm(vz2, vz3, vcprm(1,3,s0,s2)); + + + vz2 = vec_sub(vz4, vz6); + vz3 = vec_sub(vz5, vz7); + + vz0 = vec_add(vz4, vz6); + vz1 = vec_add(vz5, vz7); + + vec_st(vz0, 0, &(out[0])); + vec_st(vz1, byte_2complex, &(out[0])); + vec_st(vz2, byte_4complex, &(out[0])); + vec_st(vz3, byte_6complex, &(out[0])); + return; +} + +inline static void fft16_vsx(FFTComplex *z) +{ + float* out= (float*)z; + vec_f vc0 = {0.0, 0.0, 0.0, 0.0}; + vec_f vc1 = {-sqrthalf, sqrthalf, sqrthalf, -sqrthalf}; + vec_f vc2 = {sqrthalf, sqrthalf, sqrthalf, sqrthalf}; + vec_f vc3 = {1.0, 0.92387953, sqrthalf, 0.38268343}; + vec_f vc4 = {0.0, 0.38268343, sqrthalf, 0.92387953}; + vec_f vc5 = {-0.0, -0.38268343, -sqrthalf, -0.92387953}; + + vec_f vz0, vz1, vz2, vz3; + vec_f vz4, vz5, vz6, vz7; + vec_f vz8, vz9, vz10, vz11; + vec_f vz12, vz13; + + vz0 = vec_ld(byte_8complex, &(out[0])); + vz1 = vec_ld(byte_10complex, &(out[0])); + vz2 = vec_ld(byte_12complex, &(out[0])); + vz3 = vec_ld(byte_14complex, &(out[0])); + + vz4 = vec_perm(vz0, vz1, vcprm(0,1,s2,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,3,s0,s3)); + vz6 = vec_perm(vz2, vz3, vcprm(0,1,s2,s1)); + vz7 = vec_perm(vz2, vz3, vcprm(2,3,s0,s3)); + + vz0 = vec_add(vz4, vz5); + vz1= vec_sub(vz4, vz5); + vz2 = vec_add(vz6, vz7); + vz3 = vec_sub(vz6, vz7); + + vz4 = vec_perm(vz0, vz1, vcprm(0,s0,1,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,s3,3,s2)); + vz6 = vec_perm(vz2, vz3, vcprm(0,s0,1,s1)); + vz7 = vec_perm(vz2, vz3, vcprm(2,s3,3,s2)); + + vz0 = vec_add(vz4, vz5); + vz1 = vec_sub(vz4, vz5); + vz2 = vec_add(vz6, vz7); + vz3 = vec_sub(vz6, vz7); + + vz4 = vec_perm(vz0, vz1, vcprm(0,1,s0,s1)); + vz5 = vec_perm(vz0, vz1, vcprm(2,3,s2,s3)); + + vz6 = vec_perm(vz2, vz3, vcprm(0,1,s0,s1)); + vz7 = vec_perm(vz2, vz3, vcprm(2,3,s2,s3)); + + vz0 = vec_ld(0, &(out[0])); + vz1 = vec_ld(byte_2complex, &(out[0])); + vz2 = vec_ld(byte_4complex, &(out[0])); + vz3 = vec_ld(byte_6complex, &(out[0])); + vz10 = vec_perm(vz2, vz3, vcprm(0,s0,1,s1)); + vz11 = vec_perm(vz2, vz3, vcprm(2,s2,3,s3)); + vz8 = vec_perm(vz0, vz1, vcprm(0,1,s2,s1)); + vz9 = vec_perm(vz0, vz1, vcprm(2,3,s0,s3)); + + vz2 = vec_add(vz10, vz11); + vz3 = vec_sub(vz10, vz11); + vz12 = vec_perm(vz3, vz3, vcprm(2,3,0,1)); + vz0 = vec_add(vz8, vz9); + vz1 = vec_sub(vz8, vz9); + + vz3 = vec_madd(vz3, vc1, vc0); + vz3 = vec_madd(vz12, vc2, vz3); + vz8 = vec_perm(vz0, vz1, vcprm(0,s0,1,s1)); + vz9 = vec_perm(vz0, vz1, vcprm(2,s3,3,s2)); + vz10 = vec_perm(vz2, vz3, vcprm(1,2,s3,s0)); + vz11 = vec_perm(vz2, vz3, vcprm(0,3,s2,s1)); + + vz0 = vec_add(vz8, vz9); + vz1 = vec_sub(vz8, vz9); + vz2 = vec_add(vz10, vz11); + vz3 = vec_sub(vz10, vz11); + + vz8 = vec_perm(vz0, vz1, vcprm(0,1,s0,s1)); + vz9 = vec_perm(vz0, vz1, vcprm(2,3,s2,s3)); + vz10 = vec_perm(vz2, vz3, vcprm(0,2,s1,s3)); + vz11 = vec_perm(vz2, vz3, vcprm(1,3,s0,s2)); + + vz2 = vec_sub(vz8, vz10); + vz3 = vec_sub(vz9, vz11); + vz0 = vec_add(vz8, vz10); + vz1 = vec_add(vz9, vz11); + + vz8 = vec_madd(vz4, vc3, vc0); + vz9 = vec_madd(vz5, vc3, vc0); + vz10 = vec_madd(vz6, vc3, vc0); + vz11 = vec_madd(vz7, vc3, vc0); + + vz8 = vec_madd(vz5, vc4, vz8); + vz9 = vec_madd(vz4, vc5, vz9); + vz10 = vec_madd(vz7, vc5, vz10); + vz11 = vec_madd(vz6, vc4, vz11); + + vz12 = vec_sub(vz10, vz8); + vz10 = vec_add(vz10, vz8); + + vz13 = vec_sub(vz9, vz11); + vz11 = vec_add(vz9, vz11); + + vz4 = vec_sub(vz0, vz10); + vz0 = vec_add(vz0, vz10); + + vz7= vec_sub(vz3, vz12); + vz3= vec_add(vz3, vz12); + + vz5 = vec_sub(vz1, vz11); + vz1 = vec_add(vz1, vz11); + + vz6 = vec_sub(vz2, vz13); + vz2 = vec_add(vz2, vz13); + + vec_st(vz0, 0, &(out[0])); + vec_st(vz1, byte_2complex, &(out[0])); + vec_st(vz2, byte_4complex, &(out[0])); + vec_st(vz3, byte_6complex, &(out[0])); + vec_st(vz4, byte_8complex, &(out[0])); + vec_st(vz5, byte_10complex, &(out[0])); + vec_st(vz6, byte_12complex, &(out[0])); + vec_st(vz7, byte_14complex, &(out[0])); + return; + +} +inline static void pass_vsx(FFTComplex * z, const FFTSample * wre, unsigned int n) +{ + int o1 = n<<1; + int o2 = n<<2; + int o3 = o1+o2; + int i1, i2, i3; + FFTSample* out = (FFTSample*)z; + const FFTSample *wim = wre+o1; + vec_f v0, v1, v2, v3; + vec_f v4, v5, v6, v7; + vec_f v8, v9, v10, v11; + vec_f v12, v13; + + n = n-2; + i1 = o1*sizeof(FFTComplex); + i2 = o2*sizeof(FFTComplex); + i3 = o3*sizeof(FFTComplex); + + v8 = vec_ld(0, &(wre[0])); + v10 = vec_ld(0, &(wim[0])); + v9 = vec_ld(0, &(wim[-4])); + v9 = vec_perm(v9, v10, vcprm(s0,3,2,1)); + + v4 = vec_ld(i2, &(out[0])); + v5 = vec_ld(i2+16, &(out[0])); + v6 = vec_ld(i3, &(out[0])); + v7 = vec_ld(i3+16, &(out[0])); + v10 = vec_mul(v4, v8); // r2*wre + v11 = vec_mul(v5, v8); // i2*wre + v12 = vec_mul(v6, v8); // r3*wre + v13 = vec_mul(v7, v8); // i3*wre + + v0 = vec_ld(0, &(out[0])); // r0 + v3 = vec_ld(i1+16, &(out[0])); // i1 + v10 = vec_madd(v5, v9, v10); // r2*wim + v11 = vec_nmsub(v4, v9, v11); // i2*wim + v12 = vec_nmsub(v7, v9, v12); // r3*wim + v13 = vec_madd(v6, v9, v13); // i3*wim + + v1 = vec_ld(16, &(out[0])); // i0 + v2 = vec_ld(i1, &(out[0])); // r1 + v8 = vec_sub(v12, v10); + v12 = vec_add(v12, v10); + v9 = vec_sub(v11, v13); + v13 = vec_add(v11, v13); + v4 = vec_sub(v0, v12); + v0 = vec_add(v0, v12); + v7 = vec_sub(v3, v8); + v3 = vec_add(v3, v8); + + vec_st(v0, 0, &(out[0])); // r0 + vec_st(v3, i1+16, &(out[0])); // i1 + vec_st(v4, i2, &(out[0])); // r2 + vec_st(v7, i3+16, &(out[0]));// i3 + + v5 = vec_sub(v1, v13); + v1 = vec_add(v1, v13); + v6 = vec_sub(v2, v9); + v2 = vec_add(v2, v9); + + vec_st(v1, 16, &(out[0])); // i0 + vec_st(v2, i1, &(out[0])); // r1 + vec_st(v5, i2+16, &(out[0])); // i2 + vec_st(v6, i3, &(out[0])); // r3 + + do { + out += 8; + wre += 4; + wim -= 4; + + v8 = vec_ld(0, &(wre[0])); + v10 = vec_ld(0, &(wim[0])); + v9 = vec_ld(0, &(wim[-4])); + v9 = vec_perm(v9, v10, vcprm(s0,3,2,1)); + + v4 = vec_ld(i2, &(out[0])); // r2 + v5 = vec_ld(i2+16, &(out[0])); // i2 + v6 = vec_ld(i3, &(out[0])); // r3 + v7 = vec_ld(i3+16, &(out[0]));// i3 + v10 = vec_mul(v4, v8); // r2*wre + v11 = vec_mul(v5, v8); // i2*wre + v12 = vec_mul(v6, v8); // r3*wre + v13 = vec_mul(v7, v8); // i3*wre + + v0 = vec_ld(0, &(out[0])); // r0 + v3 = vec_ld(i1+16, &(out[0])); // i1 + v10 = vec_madd(v5, v9, v10); // r2*wim + v11 = vec_nmsub(v4, v9, v11); // i2*wim + v12 = vec_nmsub(v7, v9, v12); // r3*wim + v13 = vec_madd(v6, v9, v13); // i3*wim + + v1 = vec_ld(16, &(out[0])); // i0 + v2 = vec_ld(i1, &(out[0])); // r1 + v8 = vec_sub(v12, v10); + v12 = vec_add(v12, v10); + v9 = vec_sub(v11, v13); + v13 = vec_add(v11, v13); + v4 = vec_sub(v0, v12); + v0 = vec_add(v0, v12); + v7 = vec_sub(v3, v8); + v3 = vec_add(v3, v8); + + vec_st(v0, 0, &(out[0])); // r0 + vec_st(v3, i1+16, &(out[0])); // i1 + vec_st(v4, i2, &(out[0])); // r2 + vec_st(v7, i3+16, &(out[0])); // i3 + + v5 = vec_sub(v1, v13); + v1 = vec_add(v1, v13); + v6 = vec_sub(v2, v9); + v2 = vec_add(v2, v9); + + vec_st(v1, 16, &(out[0])); // i0 + vec_st(v2, i1, &(out[0])); // r1 + vec_st(v5, i2+16, &(out[0])); // i2 + vec_st(v6, i3, &(out[0])); // r3 + } while (n-=2); +} + +#endif + +#endif /* AVCODEC_PPC_FFT_VSX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/hpeldsp_altivec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/hpeldsp_altivec.h new file mode 100644 index 00000000..590809f5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/hpeldsp_altivec.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2002 Brian Foley + * Copyright (c) 2002 Dieter Shirley + * Copyright (c) 2003-2004 Romain Dolbeau + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PPC_HPELDSP_ALTIVEC_H +#define AVCODEC_PPC_HPELDSP_ALTIVEC_H + +#include +#include + +void ff_avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +#endif /* AVCODEC_PPC_HPELDSP_ALTIVEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/mathops.h new file mode 100644 index 00000000..dbd714fc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ppc/mathops.h @@ -0,0 +1,79 @@ +/* + * simple math operations + * Copyright (c) 2001, 2002 Fabrice Bellard + * Copyright (c) 2006 Michael Niedermayer et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PPC_MATHOPS_H +#define AVCODEC_PPC_MATHOPS_H + +#include +#include "config.h" +#include "libavutil/common.h" + +#if HAVE_PPC4XX +/* signed 16x16 -> 32 multiply add accumulate */ +#define MAC16(rt, ra, rb) \ + __asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); + +/* signed 16x16 -> 32 multiply */ +#define MUL16(ra, rb) \ + ({ int __rt; \ + __asm__ ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \ + __rt; }) +#endif + +#define MULH MULH +static inline av_const int MULH(int a, int b){ + int r; + __asm__ ("mulhw %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#if !ARCH_PPC64 +static inline av_const int64_t MAC64(int64_t d, int a, int b) +{ + union { uint64_t x; unsigned hl[2]; } x = { d }; + int h, l; + __asm__ ("mullw %3, %4, %5 \n\t" + "mulhw %2, %4, %5 \n\t" + "addc %1, %1, %3 \n\t" + "adde %0, %0, %2 \n\t" + : "+r"(x.hl[0]), "+r"(x.hl[1]), "=&r"(h), "=&r"(l) + : "r"(a), "r"(b)); + return x.x; +} +#define MAC64(d, a, b) ((d) = MAC64(d, a, b)) + +static inline av_const int64_t MLS64(int64_t d, int a, int b) +{ + union { uint64_t x; unsigned hl[2]; } x = { d }; + int h, l; + __asm__ ("mullw %3, %4, %5 \n\t" + "mulhw %2, %4, %5 \n\t" + "subfc %1, %3, %1 \n\t" + "subfe %0, %2, %0 \n\t" + : "+r"(x.hl[0]), "+r"(x.hl[1]), "=&r"(h), "=&r"(l) + : "r"(a), "r"(b)); + return x.x; +} +#define MLS64(d, a, b) ((d) = MLS64(d, a, b)) +#endif + +#endif /* AVCODEC_PPC_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/profiles.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/profiles.h new file mode 100644 index 00000000..d2419257 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/profiles.h @@ -0,0 +1,70 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PROFILES_H +#define AVCODEC_PROFILES_H + +#include "avcodec.h" +#include "libavutil/opt.h" + +#define FF_AVCTX_PROFILE_OPTION(name, description, type, value) \ + {name, description, 0, AV_OPT_TYPE_CONST, {.i64 = value }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_## type ##_PARAM, "avctx.profile"}, + +#define FF_AAC_PROFILE_OPTS \ + FF_AVCTX_PROFILE_OPTION("aac_main", NULL, AUDIO, FF_PROFILE_AAC_MAIN)\ + FF_AVCTX_PROFILE_OPTION("aac_low", NULL, AUDIO, FF_PROFILE_AAC_LOW)\ + FF_AVCTX_PROFILE_OPTION("aac_ssr", NULL, AUDIO, FF_PROFILE_AAC_SSR)\ + FF_AVCTX_PROFILE_OPTION("aac_ltp", NULL, AUDIO, FF_PROFILE_AAC_LTP)\ + FF_AVCTX_PROFILE_OPTION("aac_he", NULL, AUDIO, FF_PROFILE_AAC_HE)\ + FF_AVCTX_PROFILE_OPTION("aac_he_v2", NULL, AUDIO, FF_PROFILE_AAC_HE_V2)\ + FF_AVCTX_PROFILE_OPTION("aac_ld", NULL, AUDIO, FF_PROFILE_AAC_LD)\ + FF_AVCTX_PROFILE_OPTION("aac_eld", NULL, AUDIO, FF_PROFILE_AAC_ELD)\ + FF_AVCTX_PROFILE_OPTION("mpeg2_aac_low", NULL, AUDIO, FF_PROFILE_MPEG2_AAC_LOW)\ + FF_AVCTX_PROFILE_OPTION("mpeg2_aac_he", NULL, AUDIO, FF_PROFILE_MPEG2_AAC_HE)\ + +#define FF_MPEG4_PROFILE_OPTS \ + FF_AVCTX_PROFILE_OPTION("mpeg4_sp", NULL, VIDEO, FF_PROFILE_MPEG4_SIMPLE)\ + FF_AVCTX_PROFILE_OPTION("mpeg4_core", NULL, VIDEO, FF_PROFILE_MPEG4_CORE)\ + FF_AVCTX_PROFILE_OPTION("mpeg4_main", NULL, VIDEO, FF_PROFILE_MPEG4_MAIN)\ + FF_AVCTX_PROFILE_OPTION("mpeg4_asp", NULL, VIDEO, FF_PROFILE_MPEG4_ADVANCED_SIMPLE)\ + +#define FF_MPEG2_PROFILE_OPTS \ + FF_AVCTX_PROFILE_OPTION("422", NULL, VIDEO, FF_PROFILE_MPEG2_422)\ + FF_AVCTX_PROFILE_OPTION("high", NULL, VIDEO, FF_PROFILE_MPEG2_HIGH)\ + FF_AVCTX_PROFILE_OPTION("ss", NULL, VIDEO, FF_PROFILE_MPEG2_SS)\ + FF_AVCTX_PROFILE_OPTION("snr", NULL, VIDEO, FF_PROFILE_MPEG2_SNR_SCALABLE)\ + FF_AVCTX_PROFILE_OPTION("main", NULL, VIDEO, FF_PROFILE_MPEG2_MAIN)\ + FF_AVCTX_PROFILE_OPTION("simple", NULL, VIDEO, FF_PROFILE_MPEG2_SIMPLE)\ + +extern const AVProfile ff_aac_profiles[]; +extern const AVProfile ff_dca_profiles[]; +extern const AVProfile ff_dnxhd_profiles[]; +extern const AVProfile ff_h264_profiles[]; +extern const AVProfile ff_hevc_profiles[]; +extern const AVProfile ff_jpeg2000_profiles[]; +extern const AVProfile ff_mpeg2_video_profiles[]; +extern const AVProfile ff_mpeg4_video_profiles[]; +extern const AVProfile ff_vc1_profiles[]; +extern const AVProfile ff_vp9_profiles[]; +extern const AVProfile ff_av1_profiles[]; +extern const AVProfile ff_sbc_profiles[]; +extern const AVProfile ff_prores_profiles[]; +extern const AVProfile ff_mjpeg_profiles[]; +extern const AVProfile ff_arib_caption_profiles[]; + +#endif /* AVCODEC_PROFILES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdata.h new file mode 100644 index 00000000..ee8278d5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdata.h @@ -0,0 +1,39 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PRORESDATA_H +#define AVCODEC_PRORESDATA_H + +#include + +#define FRAME_ID MKBETAG('i', 'c', 'p', 'f') + +extern const uint8_t ff_prores_progressive_scan[64]; +extern const uint8_t ff_prores_interlaced_scan[64]; + +#define FIRST_DC_CB 0xB8 // rice_order = 5, exp_golomb_order = 6, switch_bits = 0 +extern const uint8_t ff_prores_dc_codebook[4]; +extern const uint8_t ff_prores_ac_codebook[7]; +extern const uint8_t ff_prores_run_to_cb_index[16]; +extern const uint8_t ff_prores_lev_to_cb_index[10]; + +#endif /* AVCODEC_PRORESDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdec.h new file mode 100644 index 00000000..06e41dd0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdec.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2010-2011 Maxim Poliakovski + * Copyright (c) 2010-2011 Elvis Presley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PRORESDEC_H +#define AVCODEC_PRORESDEC_H + +#include "get_bits.h" +#include "blockdsp.h" +#include "proresdsp.h" + +typedef struct { + const uint8_t *data; + unsigned mb_x; + unsigned mb_y; + unsigned mb_count; + unsigned data_size; + int ret; +} SliceContext; + +typedef struct { + BlockDSPContext bdsp; + ProresDSPContext prodsp; + AVFrame *frame; + int frame_type; ///< 0 = progressive, 1 = tff, 2 = bff + uint8_t qmat_luma[64]; + uint8_t qmat_chroma[64]; + SliceContext *slices; + int slice_count; ///< number of slices in the current picture + unsigned mb_width; ///< width of the current picture in mb + unsigned mb_height; ///< height of the current picture in mb + uint8_t progressive_scan[64]; + uint8_t interlaced_scan[64]; + const uint8_t *scan; + int first_field; + int alpha_info; + void (*unpack_alpha)(GetBitContext *gb, uint16_t *dst, int num_coeffs, const int num_bits); +} ProresContext; + +#endif /* AVCODEC_PRORESDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdsp.h new file mode 100644 index 00000000..37ba76b8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/proresdsp.h @@ -0,0 +1,40 @@ +/* + * Apple ProRes compatible decoder + * + * Copyright (c) 2010-2011 Maxim Poliakovski + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PRORESDSP_H +#define AVCODEC_PRORESDSP_H + +#include +#include +#include "avcodec.h" + +typedef struct ProresDSPContext { + int idct_permutation_type; + uint8_t idct_permutation[64]; + void (*idct_put)(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat); +} ProresDSPContext; + +int ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx); + +void ff_proresdsp_init_x86(ProresDSPContext *dsp, AVCodecContext *avctx); + +#endif /* AVCODEC_PRORESDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/psymodel.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/psymodel.h new file mode 100644 index 00000000..e5f917d4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/psymodel.h @@ -0,0 +1,204 @@ +/* + * audio encoder psychoacoustic model + * Copyright (C) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PSYMODEL_H +#define AVCODEC_PSYMODEL_H + +#include "avcodec.h" + +/** maximum possible number of bands */ +#define PSY_MAX_BANDS 128 +/** maximum number of channels */ +#define PSY_MAX_CHANS 20 + +/* cutoff for VBR is purposely increased, since LP filtering actually + * hinders VBR performance rather than the opposite + */ +#define AAC_CUTOFF_FROM_BITRATE(bit_rate,channels,sample_rate) (bit_rate ? FFMIN3(FFMIN3( \ + FFMAX(bit_rate/channels/5, bit_rate/channels*15/32 - 5500), \ + 3000 + bit_rate/channels/4, \ + 12000 + bit_rate/channels/16), \ + 22000, \ + sample_rate / 2): (sample_rate / 2)) +#define AAC_CUTOFF(s) ( \ + (s->flags & AV_CODEC_FLAG_QSCALE) \ + ? s->sample_rate / 2 \ + : AAC_CUTOFF_FROM_BITRATE(s->bit_rate, s->channels, s->sample_rate) \ +) + +/** + * single band psychoacoustic information + */ +typedef struct FFPsyBand { + int bits; + float energy; + float threshold; + float spread; /* Energy spread over the band */ +} FFPsyBand; + +/** + * single channel psychoacoustic information + */ +typedef struct FFPsyChannel { + FFPsyBand psy_bands[PSY_MAX_BANDS]; ///< channel bands information + float entropy; ///< total PE for this channel +} FFPsyChannel; + +/** + * psychoacoustic information for an arbitrary group of channels + */ +typedef struct FFPsyChannelGroup { + FFPsyChannel *ch[PSY_MAX_CHANS]; ///< pointers to the individual channels in the group + uint8_t num_ch; ///< number of channels in this group + uint8_t coupling[PSY_MAX_BANDS]; ///< allow coupling for this band in the group +} FFPsyChannelGroup; + +/** + * windowing related information + */ +typedef struct FFPsyWindowInfo { + int window_type[3]; ///< window type (short/long/transitional, etc.) - current, previous and next + int window_shape; ///< window shape (sine/KBD/whatever) + int num_windows; ///< number of windows in a frame + int grouping[8]; ///< window grouping (for e.g. AAC) + float clipping[8]; ///< maximum absolute normalized intensity in the given window for clip avoidance + int *window_sizes; ///< sequence of window sizes inside one frame (for eg. WMA) +} FFPsyWindowInfo; + +/** + * context used by psychoacoustic model + */ +typedef struct FFPsyContext { + AVCodecContext *avctx; ///< encoder context + const struct FFPsyModel *model; ///< encoder-specific model functions + + FFPsyChannel *ch; ///< single channel information + FFPsyChannelGroup *group; ///< channel group information + int num_groups; ///< number of channel groups + int cutoff; ///< lowpass frequency cutoff for analysis + + uint8_t **bands; ///< scalefactor band sizes for possible frame sizes + int *num_bands; ///< number of scalefactor bands for possible frame sizes + int num_lens; ///< number of scalefactor band sets + + struct { + int size; ///< size of the bitresevoir in bits + int bits; ///< number of bits used in the bitresevoir + int alloc; ///< number of bits allocated by the psy, or -1 if no allocation was done + } bitres; + + void* model_priv_data; ///< psychoacoustic model implementation private data +} FFPsyContext; + +/** + * codec-specific psychoacoustic model implementation + */ +typedef struct FFPsyModel { + const char *name; + int (*init) (FFPsyContext *apc); + + /** + * Suggest window sequence for channel. + * + * @param ctx model context + * @param audio samples for the current frame + * @param la lookahead samples (NULL when unavailable) + * @param channel number of channel element to analyze + * @param prev_type previous window type + * + * @return suggested window information in a structure + */ + FFPsyWindowInfo (*window)(FFPsyContext *ctx, const float *audio, const float *la, int channel, int prev_type); + + /** + * Perform psychoacoustic analysis and set band info (threshold, energy) for a group of channels. + * + * @param ctx model context + * @param channel channel number of the first channel in the group to perform analysis on + * @param coeffs array of pointers to the transformed coefficients + * @param wi window information for the channels in the group + */ + void (*analyze)(FFPsyContext *ctx, int channel, const float **coeffs, const FFPsyWindowInfo *wi); + + void (*end) (FFPsyContext *apc); +} FFPsyModel; + +/** + * Initialize psychoacoustic model. + * + * @param ctx model context + * @param avctx codec context + * @param num_lens number of possible frame lengths + * @param bands scalefactor band lengths for all frame lengths + * @param num_bands number of scalefactor bands for all frame lengths + * @param num_groups number of channel groups + * @param group_map array with # of channels in group - 1, for each group + * + * @return zero if successful, a negative value if not + */ +int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, + const uint8_t **bands, const int *num_bands, + int num_groups, const uint8_t *group_map); + +/** + * Determine what group a channel belongs to. + * + * @param ctx psymodel context + * @param channel channel to locate the group for + * + * @return pointer to the FFPsyChannelGroup this channel belongs to + */ +FFPsyChannelGroup *ff_psy_find_group(FFPsyContext *ctx, int channel); + +/** + * Cleanup model context at the end. + * + * @param ctx model context + */ +void ff_psy_end(FFPsyContext *ctx); + + +/************************************************************************** + * Audio preprocessing stuff. * + * This should be moved into some audio filter eventually. * + **************************************************************************/ +struct FFPsyPreprocessContext; + +/** + * psychoacoustic model audio preprocessing initialization + */ +struct FFPsyPreprocessContext *ff_psy_preprocess_init(AVCodecContext *avctx); + +/** + * Preprocess several channel in audio frame in order to compress it better. + * + * @param ctx preprocessing context + * @param audio samples to be filtered (in place) + * @param channels number of channel to preprocess + */ +void ff_psy_preprocess(struct FFPsyPreprocessContext *ctx, float **audio, int channels); + +/** + * Cleanup audio preprocessing module. + */ +void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx); + +#endif /* AVCODEC_PSYMODEL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pthread_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pthread_internal.h new file mode 100644 index 00000000..d2115cbb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/pthread_internal.h @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_PTHREAD_INTERNAL_H +#define AVCODEC_PTHREAD_INTERNAL_H + +#include "avcodec.h" + +/* H.264 slice threading seems to be buggy with more than 16 threads, + * limit the number of threads to 16 for automatic detection */ +#define MAX_AUTO_THREADS 16 + +int ff_slice_thread_init(AVCodecContext *avctx); +void ff_slice_thread_free(AVCodecContext *avctx); + +int ff_frame_thread_init(AVCodecContext *avctx); +void ff_frame_thread_free(AVCodecContext *avctx, int thread_count); + +#endif // AVCODEC_PTHREAD_INTERNAL_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/put_bits.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/put_bits.h new file mode 100644 index 00000000..7d11a357 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/put_bits.h @@ -0,0 +1,365 @@ +/* + * copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * bitstream writer API + */ + +#ifndef AVCODEC_PUT_BITS_H +#define AVCODEC_PUT_BITS_H + +#include +#include + +#include "libavutil/intreadwrite.h" +#include "libavutil/avassert.h" + +typedef struct PutBitContext { + uint32_t bit_buf; + int bit_left; + uint8_t *buf, *buf_ptr, *buf_end; + int size_in_bits; +} PutBitContext; + +/** + * Initialize the PutBitContext s. + * + * @param buffer the buffer where to put bits + * @param buffer_size the size in bytes of buffer + */ +static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, + int buffer_size) +{ + if (buffer_size < 0) { + buffer_size = 0; + buffer = NULL; + } + + s->size_in_bits = 8 * buffer_size; + s->buf = buffer; + s->buf_end = s->buf + buffer_size; + s->buf_ptr = s->buf; + s->bit_left = 32; + s->bit_buf = 0; +} + +/** + * @return the total number of bits written to the bitstream. + */ +static inline int put_bits_count(PutBitContext *s) +{ + return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left; +} + +/** + * Rebase the bit writer onto a reallocated buffer. + * + * @param buffer the buffer where to put bits + * @param buffer_size the size in bytes of buffer, + * must be large enough to hold everything written so far + */ +static inline void rebase_put_bits(PutBitContext *s, uint8_t *buffer, + int buffer_size) +{ + av_assert0(8*buffer_size >= put_bits_count(s)); + + s->buf_end = buffer + buffer_size; + s->buf_ptr = buffer + (s->buf_ptr - s->buf); + s->buf = buffer; + s->size_in_bits = 8 * buffer_size; +} + +/** + * @return the number of bits available in the bitstream. + */ +static inline int put_bits_left(PutBitContext* s) +{ + return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left; +} + +/** + * Pad the end of the output stream with zeros. + */ +static inline void flush_put_bits(PutBitContext *s) +{ +#ifndef BITSTREAM_WRITER_LE + if (s->bit_left < 32) + s->bit_buf <<= s->bit_left; +#endif + while (s->bit_left < 32) { + av_assert0(s->buf_ptr < s->buf_end); +#ifdef BITSTREAM_WRITER_LE + *s->buf_ptr++ = s->bit_buf; + s->bit_buf >>= 8; +#else + *s->buf_ptr++ = s->bit_buf >> 24; + s->bit_buf <<= 8; +#endif + s->bit_left += 8; + } + s->bit_left = 32; + s->bit_buf = 0; +} + +static inline void flush_put_bits_le(PutBitContext *s) +{ + while (s->bit_left < 32) { + av_assert0(s->buf_ptr < s->buf_end); + *s->buf_ptr++ = s->bit_buf; + s->bit_buf >>= 8; + s->bit_left += 8; + } + s->bit_left = 32; + s->bit_buf = 0; +} + +#ifdef BITSTREAM_WRITER_LE +#define avpriv_align_put_bits align_put_bits_unsupported_here +#define avpriv_put_string ff_put_string_unsupported_here +#define avpriv_copy_bits avpriv_copy_bits_unsupported_here +#else +/** + * Pad the bitstream with zeros up to the next byte boundary. + */ +void avpriv_align_put_bits(PutBitContext *s); + +/** + * Put the string string in the bitstream. + * + * @param terminate_string 0-terminates the written string if value is 1 + */ +void avpriv_put_string(PutBitContext *pb, const char *string, + int terminate_string); + +/** + * Copy the content of src to the bitstream. + * + * @param length the number of bits of src to copy + */ +void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length); +#endif + +/** + * Write up to 31 bits into a bitstream. + * Use put_bits32 to write 32 bits. + */ +static inline void put_bits(PutBitContext *s, int n, unsigned int value) +{ + unsigned int bit_buf; + int bit_left; + + av_assert2(n <= 31 && value < (1U << n)); + + bit_buf = s->bit_buf; + bit_left = s->bit_left; + + /* XXX: optimize */ +#ifdef BITSTREAM_WRITER_LE + bit_buf |= value << (32 - bit_left); + if (n >= bit_left) { + if (3 < s->buf_end - s->buf_ptr) { + AV_WL32(s->buf_ptr, bit_buf); + s->buf_ptr += 4; + } else { + av_log(NULL, AV_LOG_ERROR, "Internal error, put_bits buffer too small\n"); + av_assert2(0); + } + bit_buf = value >> bit_left; + bit_left += 32; + } + bit_left -= n; +#else + if (n < bit_left) { + bit_buf = (bit_buf << n) | value; + bit_left -= n; + } else { + bit_buf <<= bit_left; + bit_buf |= value >> (n - bit_left); + if (3 < s->buf_end - s->buf_ptr) { + AV_WB32(s->buf_ptr, bit_buf); + s->buf_ptr += 4; + } else { + av_log(NULL, AV_LOG_ERROR, "Internal error, put_bits buffer too small\n"); + av_assert2(0); + } + bit_left += 32 - n; + bit_buf = value; + } +#endif + + s->bit_buf = bit_buf; + s->bit_left = bit_left; +} + +static inline void put_bits_le(PutBitContext *s, int n, unsigned int value) +{ + unsigned int bit_buf; + int bit_left; + + av_assert2(n <= 31 && value < (1U << n)); + + bit_buf = s->bit_buf; + bit_left = s->bit_left; + + bit_buf |= value << (32 - bit_left); + if (n >= bit_left) { + if (3 < s->buf_end - s->buf_ptr) { + AV_WL32(s->buf_ptr, bit_buf); + s->buf_ptr += 4; + } else { + av_log(NULL, AV_LOG_ERROR, "Internal error, put_bits buffer too small\n"); + av_assert2(0); + } + bit_buf = value >> bit_left; + bit_left += 32; + } + bit_left -= n; + + s->bit_buf = bit_buf; + s->bit_left = bit_left; +} + +static inline void put_sbits(PutBitContext *pb, int n, int32_t value) +{ + av_assert2(n >= 0 && n <= 31); + + put_bits(pb, n, av_mod_uintp2(value, n)); +} + +/** + * Write exactly 32 bits into a bitstream. + */ +static void av_unused put_bits32(PutBitContext *s, uint32_t value) +{ + unsigned int bit_buf; + int bit_left; + + bit_buf = s->bit_buf; + bit_left = s->bit_left; + +#ifdef BITSTREAM_WRITER_LE + bit_buf |= value << (32 - bit_left); + if (3 < s->buf_end - s->buf_ptr) { + AV_WL32(s->buf_ptr, bit_buf); + s->buf_ptr += 4; + } else { + av_log(NULL, AV_LOG_ERROR, "Internal error, put_bits buffer too small\n"); + av_assert2(0); + } + bit_buf = (uint64_t)value >> bit_left; +#else + bit_buf = (uint64_t)bit_buf << bit_left; + bit_buf |= value >> (32 - bit_left); + if (3 < s->buf_end - s->buf_ptr) { + AV_WB32(s->buf_ptr, bit_buf); + s->buf_ptr += 4; + } else { + av_log(NULL, AV_LOG_ERROR, "Internal error, put_bits buffer too small\n"); + av_assert2(0); + } + bit_buf = value; +#endif + + s->bit_buf = bit_buf; + s->bit_left = bit_left; +} + +/** + * Write up to 64 bits into a bitstream. + */ +static inline void put_bits64(PutBitContext *s, int n, uint64_t value) +{ + av_assert2((n == 64) || (n < 64 && value < (UINT64_C(1) << n))); + + if (n < 32) + put_bits(s, n, value); + else if (n == 32) + put_bits32(s, value); + else if (n < 64) { + uint32_t lo = value & 0xffffffff; + uint32_t hi = value >> 32; +#ifdef BITSTREAM_WRITER_LE + put_bits32(s, lo); + put_bits(s, n - 32, hi); +#else + put_bits(s, n - 32, hi); + put_bits32(s, lo); +#endif + } else { + uint32_t lo = value & 0xffffffff; + uint32_t hi = value >> 32; +#ifdef BITSTREAM_WRITER_LE + put_bits32(s, lo); + put_bits32(s, hi); +#else + put_bits32(s, hi); + put_bits32(s, lo); +#endif + + } +} + +/** + * Return the pointer to the byte where the bitstream writer will put + * the next bit. + */ +static inline uint8_t *put_bits_ptr(PutBitContext *s) +{ + return s->buf_ptr; +} + +/** + * Skip the given number of bytes. + * PutBitContext must be flushed & aligned to a byte boundary before calling this. + */ +static inline void skip_put_bytes(PutBitContext *s, int n) +{ + av_assert2((put_bits_count(s) & 7) == 0); + av_assert2(s->bit_left == 32); + av_assert0(n <= s->buf_end - s->buf_ptr); + s->buf_ptr += n; +} + +/** + * Skip the given number of bits. + * Must only be used if the actual values in the bitstream do not matter. + * If n is 0 the behavior is undefined. + */ +static inline void skip_put_bits(PutBitContext *s, int n) +{ + s->bit_left -= n; + s->buf_ptr -= 4 * (s->bit_left >> 5); + s->bit_left &= 31; +} + +/** + * Change the end of the buffer. + * + * @param size the new size in bytes of the buffer where to put bits + */ +static inline void set_put_bits_buffer_size(PutBitContext *s, int size) +{ + av_assert0(size <= INT_MAX/8 - 32); + s->buf_end = s->buf + size; + s->size_in_bits = 8*size; +} + +#endif /* AVCODEC_PUT_BITS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qcelpdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qcelpdata.h new file mode 100644 index 00000000..931c990b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qcelpdata.h @@ -0,0 +1,552 @@ +/* + * QCELP decoder + * Copyright (c) 2007 Reynaldo H. Verdejo Pinochet + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QCELPDATA_H +#define AVCODEC_QCELPDATA_H + +/** + * @file + * Data tables for the QCELP decoder + * @author Reynaldo H. Verdejo Pinochet + * @remark FFmpeg merging spearheaded by Kenan Gillet + * @remark Development mentored by Benjamin Larson + */ + +#include +#include +#include "libavutil/common.h" + +/** + * QCELP unpacked data frame + */ +typedef struct QCELPFrame { +/// @name QCELP excitation codebook parameters +/// @{ + uint8_t cbsign[16]; ///< sign of the codebook gain for each codebook subframe + uint8_t cbgain[16]; ///< unsigned codebook gain for each codebook subframe + uint8_t cindex[16]; ///< codebook index for each codebook subframe +/// @} + +/// @name QCELP pitch prediction parameters +/// @{ + uint8_t plag[4]; ///< pitch lag for each pitch subframe + uint8_t pfrac[4]; ///< fractional pitch lag for each pitch subframe + uint8_t pgain[4]; ///< pitch gain for each pitch subframe +/// @} + + /** + * line spectral pair frequencies (LSP) for RATE_OCTAVE, + * line spectral pair frequencies grouped into five vectors + * of dimension two (LSPV) for other rates + */ + uint8_t lspv[10]; + + /** + * reserved bits only present in bitrate 1, 1/4 and 1/8 packets + */ + uint8_t reserved; +} QCELPFrame; + +/** + * Pre-calculated table for hammsinc function. + * Only half of the table is needed because of symmetry. + * + * TIA/EIA/IS-733 2.4.5.2-2/3 + */ +static const float qcelp_hammsinc_table[4] = { -0.006822, 0.041249, -0.143459, 0.588863}; + +typedef struct QCELPBitmap { + uint8_t index; /**< index into the QCELPContext structure */ + uint8_t bitpos; /**< position of the lowest bit in the value's byte */ + uint8_t bitlen; /**< number of bits to read */ +} QCELPBitmap; + +#define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len} + +/** + * Bitmap unpacking tables for RATE_FULL + * + * TIA/EIA/IS-733 Table 2.4.7.1-1 + */ +static const QCELPBitmap qcelp_rate_full_bitmap[] = { + // start on bit + QCELP_OF(lspv [ 2], 0, 3), // 265 + QCELP_OF(lspv [ 1], 0, 7), // 262 + QCELP_OF(lspv [ 0], 0, 6), // 255 + QCELP_OF(lspv [ 4], 0, 6), // 249 + QCELP_OF(lspv [ 3], 0, 6), // 243 + QCELP_OF(lspv [ 2], 3, 4), // 237 + QCELP_OF(cbsign[ 0], 0, 1), // 233 + QCELP_OF(cbgain[ 0], 0, 4), // 232 + QCELP_OF(pfrac [ 0], 0, 1), // 228 + QCELP_OF(plag [ 0], 0, 7), // 227 + QCELP_OF(pgain [ 0], 0, 3), // 220 + QCELP_OF(cindex[ 1], 0, 4), // 217 + QCELP_OF(cbsign[ 1], 0, 1), // 213 + QCELP_OF(cbgain[ 1], 0, 4), // 212 + QCELP_OF(cindex[ 0], 0, 7), // 208 + QCELP_OF(cbgain[ 3], 0, 1), // 201 + QCELP_OF(cindex[ 2], 0, 7), // 200 + QCELP_OF(cbsign[ 2], 0, 1), // 193 + QCELP_OF(cbgain[ 2], 0, 4), // 192 + QCELP_OF(cindex[ 1], 4, 3), // 188 + QCELP_OF(plag [ 1], 0, 3), // 185 + QCELP_OF(pgain [ 1], 0, 3), // 182 + QCELP_OF(cindex[ 3], 0, 7), // 179 + QCELP_OF(cbsign[ 3], 0, 1), // 172 + QCELP_OF(cbgain[ 3], 1, 2), // 171 + QCELP_OF(cindex[ 4], 0, 6), // 169 + QCELP_OF(cbsign[ 4], 0, 1), // 163 + QCELP_OF(cbgain[ 4], 0, 4), // 162 + QCELP_OF(pfrac [ 1], 0, 1), // 158 + QCELP_OF(plag [ 1], 3, 4), // 157 + QCELP_OF(cbgain[ 6], 0, 3), // 153 + QCELP_OF(cindex[ 5], 0, 7), // 150 + QCELP_OF(cbsign[ 5], 0, 1), // 143 + QCELP_OF(cbgain[ 5], 0, 4), // 142 + QCELP_OF(cindex[ 4], 6, 1), // 138 + QCELP_OF(cindex[ 7], 0, 3), // 137 + QCELP_OF(cbsign[ 7], 0, 1), // 134 + QCELP_OF(cbgain[ 7], 0, 3), // 133 + QCELP_OF(cindex[ 6], 0, 7), // 130 + QCELP_OF(cbsign[ 6], 0, 1), // 123 + QCELP_OF(cbgain[ 6], 3, 1), // 122 + QCELP_OF(cbgain[ 8], 0, 1), // 121 + QCELP_OF(pfrac [ 2], 0, 1), // 120 + QCELP_OF(plag [ 2], 0, 7), // 119 + QCELP_OF(pgain [ 2], 0, 3), // 112 + QCELP_OF(cindex[ 7], 3, 4), // 109 + QCELP_OF(cbsign[ 9], 0, 1), // 105 + QCELP_OF(cbgain[ 9], 0, 4), // 104 + QCELP_OF(cindex[ 8], 0, 7), // 100 + QCELP_OF(cbsign[ 8], 0, 1), // 93 + QCELP_OF(cbgain[ 8], 1, 3), // 92 + QCELP_OF(cindex[10], 0, 4), // 89 + QCELP_OF(cbsign[10], 0, 1), // 85 + QCELP_OF(cbgain[10], 0, 4), // 84 + QCELP_OF(cindex[ 9], 0, 7), // 80 + QCELP_OF(pgain [ 3], 0, 2), // 73 + QCELP_OF(cindex[11], 0, 7), // 71 + QCELP_OF(cbsign[11], 0, 1), // 64 + QCELP_OF(cbgain[11], 0, 3), // 63 + QCELP_OF(cindex[10], 4, 3), // 60 + QCELP_OF(cindex[12], 0, 2), // 57 + QCELP_OF(cbsign[12], 0, 1), // 55 + QCELP_OF(cbgain[12], 0, 4), // 54 + QCELP_OF(pfrac [ 3], 0, 1), // 50 + QCELP_OF(plag [ 3], 0, 7), // 49 + QCELP_OF(pgain [ 3], 2, 1), // 42 + QCELP_OF(cindex[13], 0, 6), // 41 + QCELP_OF(cbsign[13], 0, 1), // 35 + QCELP_OF(cbgain[13], 0, 4), // 34 + QCELP_OF(cindex[12], 2, 5), // 30 + QCELP_OF(cbgain[15], 0, 3), // 25 + QCELP_OF(cindex[14], 0, 7), // 22 + QCELP_OF(cbsign[14], 0, 1), // 15 + QCELP_OF(cbgain[14], 0, 4), // 14 + QCELP_OF(cindex[13], 6, 1), // 10 + QCELP_OF(reserved, 0, 2), // 9 + QCELP_OF(cindex[15], 0, 7), // 7 + QCELP_OF(cbsign[15], 0, 1) // 0 +}; + +/** + * Bitmap unpacking tables for RATE_HALF + * + * TIA/EIA/IS-733 Table 2.4.7.2-1 + */ +static const QCELPBitmap qcelp_rate_half_bitmap[] = { + // start on bit + QCELP_OF(lspv [2], 0, 3), // 123 + QCELP_OF(lspv [1], 0, 7), // 120 + QCELP_OF(lspv [0], 0, 6), // 113 + QCELP_OF(lspv [4], 0, 6), // 107 + QCELP_OF(lspv [3], 0, 6), // 101 + QCELP_OF(lspv [2], 3, 4), // 95 + QCELP_OF(cbsign[0], 0, 1), // 91 + QCELP_OF(cbgain[0], 0, 4), // 90 + QCELP_OF(pfrac [0], 0, 1), // 86 + QCELP_OF(plag [0], 0, 7), // 85 + QCELP_OF(pgain [0], 0, 3), // 78 + QCELP_OF(plag [1], 0, 6), // 75 + QCELP_OF(pgain [1], 0, 3), // 69 + QCELP_OF(cindex[0], 0, 7), // 66 + QCELP_OF(pgain [2], 0, 2), // 59 + QCELP_OF(cindex[1], 0, 7), // 57 + QCELP_OF(cbsign[1], 0, 1), // 50 + QCELP_OF(cbgain[1], 0, 4), // 49 + QCELP_OF(pfrac [1], 0, 1), // 45 + QCELP_OF(plag [1], 6, 1), // 44 + QCELP_OF(cindex[2], 0, 2), // 43 + QCELP_OF(cbsign[2], 0, 1), // 41 + QCELP_OF(cbgain[2], 0, 4), // 40 + QCELP_OF(pfrac [2], 0, 1), // 36 + QCELP_OF(plag [2], 0, 7), // 35 + QCELP_OF(pgain [2], 2, 1), // 28 + QCELP_OF(pfrac [3], 0, 1), // 27 + QCELP_OF(plag [3], 0, 7), // 26 + QCELP_OF(pgain [3], 0, 3), // 19 + QCELP_OF(cindex[2], 2, 5), // 16 + QCELP_OF(cindex[3], 0, 7), // 11 + QCELP_OF(cbsign[3], 0, 1), // 4 + QCELP_OF(cbgain[3], 0, 4) // 3 +}; + +/** + * Bitmap unpacking tables for RATE_QUARTER + * + * TIA/EIA/IS-733 Table 2.4.7.3-1 + */ +static const QCELPBitmap qcelp_rate_quarter_bitmap[] = { + // start on bit + QCELP_OF(lspv [2], 0, 3), // 53 + QCELP_OF(lspv [1], 0, 7), // 50 + QCELP_OF(lspv [0], 0, 6), // 43 + QCELP_OF(lspv [4], 0, 6), // 37 + QCELP_OF(lspv [3], 0, 6), // 31 + QCELP_OF(lspv [2], 3, 4), // 25 + QCELP_OF(cbgain[3], 0, 4), // 21 + QCELP_OF(cbgain[2], 0, 4), // 17 + QCELP_OF(cbgain[1], 0, 4), // 13 + QCELP_OF(cbgain[0], 0, 4), // 9 + QCELP_OF(reserved, 0, 2), // 5 + QCELP_OF(cbgain[4], 0, 4) // 3 +}; + +/** + * Bitmap unpacking tables for RATE_OCTAVE + * + * trick: CBSEED is written into QCELPContext.cbsign[15], + * which is not used for RATE_OCTAVE. + * CBSEED is only used to ensure the occurrence of random bit + * patterns in the 16 first bits that are used as the seed. + * + * TIA/EIA/IS-733 Table 2.4.7.4-1 + */ +static const QCELPBitmap qcelp_rate_octave_bitmap[] = { + // start on bit + QCELP_OF(cbsign[15], 3, 1), // 19 + QCELP_OF(lspv [0], 0, 1), // 18 + QCELP_OF(lspv [1], 0, 1), // 17 + QCELP_OF(lspv [2], 0, 1), // 16 + QCELP_OF(cbsign[15], 2, 1), // 15 + QCELP_OF(lspv [3], 0, 1), // 14 + QCELP_OF(lspv [4], 0, 1), // 13 + QCELP_OF(lspv [5], 0, 1), // 12 + QCELP_OF(cbsign[15], 1, 1), // 11 + QCELP_OF(lspv [6], 0, 1), // 10 + QCELP_OF(lspv [7], 0, 1), // 9 + QCELP_OF(lspv [8], 0, 1), // 8 + QCELP_OF(cbsign[15], 0, 1), // 7 + QCELP_OF(lspv [9], 0, 1), // 6 + QCELP_OF(cbgain [0], 0, 2), // 5 + QCELP_OF(reserved, 0, 4) // 3 +}; + +/** + * Bitmapping data position for each packet type in + * the QCELPContext + */ +static const QCELPBitmap * const qcelp_unpacking_bitmaps_per_rate[5] = { + NULL, ///< for SILENCE rate + qcelp_rate_octave_bitmap, + qcelp_rate_quarter_bitmap, + qcelp_rate_half_bitmap, + qcelp_rate_full_bitmap, +}; + +static const uint16_t qcelp_unpacking_bitmaps_lengths[5] = { + 0, ///< for SILENCE rate + FF_ARRAY_ELEMS(qcelp_rate_octave_bitmap), + FF_ARRAY_ELEMS(qcelp_rate_quarter_bitmap), + FF_ARRAY_ELEMS(qcelp_rate_half_bitmap), + FF_ARRAY_ELEMS(qcelp_rate_full_bitmap), +}; + +typedef uint16_t qcelp_vector[2]; + +/** + * LSP vector quantization tables in x*10000 form + * + * TIA/EIA/IS-733 tables 2.4.3.2.6.3-1 through 2.4.3.2.6.3-5 + */ + +static const qcelp_vector qcelp_lspvq1[64]= { +{ 327, 118},{ 919, 111},{ 427, 440},{1327, 185}, +{ 469, 50},{1272, 91},{ 892, 59},{1771, 193}, +{ 222, 158},{1100, 127},{ 827, 55},{ 978, 791}, +{ 665, 47},{ 700,1401},{ 670, 859},{1913,1048}, +{ 471, 215},{1046, 125},{ 645, 298},{1599, 160}, +{ 593, 39},{1187, 462},{ 749, 341},{1520, 511}, +{ 290, 792},{ 909, 362},{ 753, 81},{1111,1058}, +{ 519, 253},{ 828, 839},{ 685, 541},{1421,1258}, +{ 386, 130},{ 962, 119},{ 542, 387},{1431, 185}, +{ 526, 51},{1175, 260},{ 831, 167},{1728, 510}, +{ 273, 437},{1172, 113},{ 771, 144},{1122, 751}, +{ 619, 119},{ 492,1276},{ 658, 695},{1882, 615}, +{ 415, 200},{1018, 88},{ 681, 339},{1436, 325}, +{ 555, 122},{1042, 485},{ 826, 345},{1374, 743}, +{ 383,1018},{1005, 358},{ 704, 86},{1301, 586}, +{ 597, 241},{ 832, 621},{ 555, 573},{1504, 839}}; + +static const qcelp_vector qcelp_lspvq2[128]= { +{ 255, 293},{ 904, 219},{ 151,1211},{1447, 498}, +{ 470, 253},{1559, 177},{1547, 994},{2394, 242}, +{ 91, 813},{ 857, 590},{ 934,1326},{1889, 282}, +{ 813, 472},{1057,1494},{ 450,3315},{2163,1895}, +{ 538, 532},{1399, 218},{ 146,1552},{1755, 626}, +{ 822, 202},{1299, 663},{ 706,1732},{2656, 401}, +{ 418, 745},{ 762,1038},{ 583,1748},{1746,1285}, +{ 527,1169},{1314, 830},{ 556,2116},{1073,2321}, +{ 297, 570},{ 981, 403},{ 468,1103},{1740, 243}, +{ 725, 179},{1255, 474},{1374,1362},{1922, 912}, +{ 285, 947},{ 930, 700},{ 593,1372},{1909, 576}, +{ 588, 916},{1110,1116},{ 224,2719},{1633,2220}, +{ 402, 520},{1061, 448},{ 402,1352},{1499, 775}, +{ 664, 589},{1081, 727},{ 801,2206},{2165,1157}, +{ 566, 802},{ 911,1116},{ 306,1703},{1792, 836}, +{ 655, 999},{1061,1038},{ 298,2089},{1110,1753}, +{ 361, 311},{ 970, 239},{ 265,1231},{1495, 573}, +{ 566, 262},{1569, 293},{1341,1144},{2271, 544}, +{ 214, 877},{ 847, 719},{ 794,1384},{2067, 274}, +{ 703, 688},{1099,1306},{ 391,2947},{2024,1670}, +{ 471, 525},{1245, 290},{ 264,1557},{1568, 807}, +{ 718, 399},{1193, 685},{ 883,1594},{2729, 764}, +{ 500, 754},{ 809,1108},{ 541,1648},{1523,1385}, +{ 614,1196},{1209, 847},{ 345,2242},{1442,1747}, +{ 199, 560},{1092, 194},{ 349,1253},{1653, 507}, +{ 625, 354},{1376, 431},{1187,1465},{2164, 872}, +{ 360, 974},{1008, 698},{ 704,1346},{2114, 452}, +{ 720, 816},{1240,1089},{ 439,2475},{1498,2040}, +{ 336, 718},{1213, 187},{ 451,1450},{1368, 885}, +{ 592, 578},{1131, 531},{ 861,1855},{1764,1500}, +{ 444, 970},{ 935, 903},{ 424,1687},{1633,1102}, +{ 793, 897},{1060, 897},{ 185,2011},{1205,1855}}; + +static const qcelp_vector qcelp_lspvq3[128]= { +{ 225, 283},{1296, 355},{ 543, 343},{2073, 274}, +{ 204,1099},{1562, 523},{1388, 161},{2784, 274}, +{ 112, 849},{1870, 175},{1189, 160},{1490,1088}, +{ 969,1115},{ 659,3322},{1158,1073},{3183,1363}, +{ 517, 223},{1740, 223},{ 704, 387},{2637, 234}, +{ 692,1005},{1287,1610},{ 952, 532},{2393, 646}, +{ 490, 552},{1619, 657},{ 845, 670},{1784,2280}, +{ 191,1775},{ 272,2868},{ 942, 952},{2628,1479}, +{ 278, 579},{1565, 218},{ 814, 180},{2379, 187}, +{ 276,1444},{1199,1223},{1200, 349},{3009, 307}, +{ 312, 844},{1898, 306},{ 863, 470},{1685,1241}, +{ 513,1727},{ 711,2233},{1085, 864},{3398, 527}, +{ 414, 440},{1356, 612},{ 964, 147},{2173, 738}, +{ 465,1292},{ 877,1749},{1104, 689},{2105,1311}, +{ 580, 864},{1895, 752},{ 652, 609},{1485,1699}, +{ 514,1400},{ 386,2131},{ 933, 798},{2473, 986}, +{ 334, 360},{1375, 398},{ 621, 276},{2183, 280}, +{ 311,1114},{1382, 807},{1284, 175},{2605, 636}, +{ 230, 816},{1739, 408},{1074, 176},{1619,1120}, +{ 784,1371},{ 448,3050},{1189, 880},{3039,1165}, +{ 424, 241},{1672, 186},{ 815, 333},{2432, 324}, +{ 584,1029},{1137,1546},{1015, 585},{2198, 995}, +{ 574, 581},{1746, 647},{ 733, 740},{1938,1737}, +{ 347,1710},{ 373,2429},{ 787,1061},{2439,1438}, +{ 185, 536},{1489, 178},{ 703, 216},{2178, 487}, +{ 154,1421},{1414, 994},{1103, 352},{3072, 473}, +{ 408, 819},{2055, 168},{ 998, 354},{1917,1140}, +{ 665,1799},{ 993,2213},{1234, 631},{3003, 762}, +{ 373, 620},{1518, 425},{ 913, 300},{1966, 836}, +{ 402,1185},{ 948,1385},{1121, 555},{1802,1509}, +{ 474, 886},{1888, 610},{ 739, 585},{1231,2379}, +{ 661,1335},{ 205,2211},{ 823, 822},{2480,1179}}; + +static const qcelp_vector qcelp_lspvq4[64]= { +{ 348, 311},{ 812,1145},{ 552, 461},{1826, 263}, +{ 601, 675},{1730, 172},{1523, 193},{2449, 277}, +{ 334, 668},{ 805,1441},{1319, 207},{1684, 910}, +{ 582,1318},{1403,1098},{ 979, 832},{2700,1359}, +{ 624, 228},{1292, 979},{ 800, 195},{2226, 285}, +{ 730, 862},{1537, 601},{1115, 509},{2720, 354}, +{ 218,1167},{1212,1538},{1074, 247},{1674,1710}, +{ 322,2142},{1263, 777},{ 981, 556},{2119,1710}, +{ 193, 596},{1035, 957},{ 694, 397},{1997, 253}, +{ 743, 603},{1584, 321},{1346, 346},{2221, 708}, +{ 451, 732},{1040,1415},{1184, 230},{1853, 919}, +{ 310,1661},{1625, 706},{ 856, 843},{2902, 702}, +{ 467, 348},{1108,1048},{ 859, 306},{1964, 463}, +{ 560,1013},{1425, 533},{1142, 634},{2391, 879}, +{ 397,1084},{1345,1700},{ 976, 248},{1887,1189}, +{ 644,2087},{1262, 603},{ 877, 550},{2203,1307}}; + +static const qcelp_vector qcelp_lspvq5[64]= { +{ 360, 222},{ 820,1097},{ 601, 319},{1656, 198}, +{ 604, 513},{1552, 141},{1391, 155},{2474, 261}, +{ 269, 785},{1463, 646},{1123, 191},{2015, 223}, +{ 785, 844},{1202,1011},{ 980, 807},{3014, 793}, +{ 570, 180},{1135,1382},{ 778, 256},{1901, 179}, +{ 807, 622},{1461, 458},{1231, 178},{2028, 821}, +{ 387, 927},{1496,1004},{ 888, 392},{2246, 341}, +{ 295,1462},{1156, 694},{1022, 473},{2226,1364}, +{ 210, 478},{1029,1020},{ 722, 181},{1730, 251}, +{ 730, 488},{1465, 293},{1303, 326},{2595, 387}, +{ 458, 584},{1569, 742},{1029, 173},{1910, 495}, +{ 605,1159},{1268, 719},{ 973, 646},{2872, 428}, +{ 443, 334},{ 835,1465},{ 912, 138},{1716, 442}, +{ 620, 778},{1316, 450},{1186, 335},{1446,1665}, +{ 486,1050},{1675,1019},{ 880, 278},{2214, 202}, +{ 539,1564},{1142, 533},{ 984, 391},{2130,1089}}; + +static const qcelp_vector * const qcelp_lspvq[5] = { + qcelp_lspvq1, + qcelp_lspvq2, + qcelp_lspvq3, + qcelp_lspvq4, + qcelp_lspvq5 +}; + +/** + * The final gain scalefactor before clipping into a usable output float + */ +#define QCELP_SCALE 8192. + +/** + * Table for computing Ga (decoded linear codebook gain magnitude) + * + * @note The table could fit in int16_t in x*8 form, but it seems + * to be slower on x86 + * + * TIA/EIA/IS-733 2.4.6.2.1-3 + */ + +static const float qcelp_g12ga[61] = { + 1.000/QCELP_SCALE, 1.125/QCELP_SCALE, 1.250/QCELP_SCALE, 1.375/QCELP_SCALE, + 1.625/QCELP_SCALE, 1.750/QCELP_SCALE, 2.000/QCELP_SCALE, 2.250/QCELP_SCALE, + 2.500/QCELP_SCALE, 2.875/QCELP_SCALE, 3.125/QCELP_SCALE, 3.500/QCELP_SCALE, + 4.000/QCELP_SCALE, 4.500/QCELP_SCALE, 5.000/QCELP_SCALE, 5.625/QCELP_SCALE, + 6.250/QCELP_SCALE, 7.125/QCELP_SCALE, 8.000/QCELP_SCALE, 8.875/QCELP_SCALE, + 10.000/QCELP_SCALE, 11.250/QCELP_SCALE, 12.625/QCELP_SCALE, 14.125/QCELP_SCALE, + 15.875/QCELP_SCALE, 17.750/QCELP_SCALE, 20.000/QCELP_SCALE, 22.375/QCELP_SCALE, + 25.125/QCELP_SCALE, 28.125/QCELP_SCALE, 31.625/QCELP_SCALE, 35.500/QCELP_SCALE, + 39.750/QCELP_SCALE, 44.625/QCELP_SCALE, 50.125/QCELP_SCALE, 56.250/QCELP_SCALE, + 63.125/QCELP_SCALE, 70.750/QCELP_SCALE, 79.375/QCELP_SCALE, 89.125/QCELP_SCALE, + 100.000/QCELP_SCALE, 112.250/QCELP_SCALE, 125.875/QCELP_SCALE, 141.250/QCELP_SCALE, + 158.500/QCELP_SCALE, 177.875/QCELP_SCALE, 199.500/QCELP_SCALE, 223.875/QCELP_SCALE, + 251.250/QCELP_SCALE, 281.875/QCELP_SCALE, 316.250/QCELP_SCALE, 354.875/QCELP_SCALE, + 398.125/QCELP_SCALE, 446.625/QCELP_SCALE, 501.125/QCELP_SCALE, 562.375/QCELP_SCALE, + 631.000/QCELP_SCALE, 708.000/QCELP_SCALE, 794.375/QCELP_SCALE, 891.250/QCELP_SCALE, + 1000.000/QCELP_SCALE}; + +/** + * Circular codebook for rate 1 frames in x*100 form + * + * TIA/EIA/IS-733 2.4.6.1-2 + */ +static const int16_t qcelp_rate_full_codebook[128] = { + 10, -65, -59, 12, 110, 34, -134, 157, + 104, -84, -34, -115, 23, -101, 3, 45, + -101, -16, -59, 28, -45, 134, -67, 22, + 61, -29, 226, -26, -55, -179, 157, -51, + -220, -93, -37, 60, 118, 74, -48, -95, + -181, 111, 36, -52, -215, 78, -112, 39, + -17, -47, -223, 19, 12, -98, -142, 130, + 54, -127, 21, -12, 39, -48, 12, 128, + 6, -167, 82, -102, -79, 55, -44, 48, + -20, -53, 8, -61, 11, -70, -157, -168, + 20, -56, -74, 78, 33, -63, -173, -2, + -75, -53, -146, 77, 66, -29, 9, -75, + 65, 119, -43, 76, 233, 98, 125, -156, + -27, 78, -9, 170, 176, 143, -148, -7, + 27, -136, 5, 27, 18, 139, 204, 7, + -184, -197, 52, -3, 78, -189, 8, -65 +}; +#define QCELP_RATE_FULL_CODEBOOK_RATIO .01 + +/** + * Circular codebook for rate 1/2 frames in x*2 form + * + * TIA/EIA/IS-733 2.4.6.1-1 + */ +static const int8_t qcelp_rate_half_codebook[128] = { + 0, -4, 0, -3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, -3, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 4, 0, + 0, 3, 2, 0, 3, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 3, 0, 0, + -3, 3, 0, 0, -2, 0, 3, 0, + 0, 0, 0, 0, 0, 0, -5, 0, + 0, 0, 0, 3, 0, 0, 0, 3, + 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 6, -3, -4, 0, -3, -3, + 3, -3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; +#define QCELP_RATE_HALF_CODEBOOK_RATIO 0.5 + +/** + * sqrt(1.887) is the maximum of the pseudorandom + * white sequence used to generate the scaled codebook + * vector for bitrate 1/4. + * + * TIA/EIA/IS-733 2.4.8.1.2 + */ +#define QCELP_SQRT1887 1.373681186 + +/** + * Table for impulse response of BPF used to filter + * the white excitation for bitrate 1/4 synthesis + * + * Only half the tables are needed because of symmetry. + * + * TIA/EIA/IS-733 2.4.8.1.2-1.1 + */ +static const double qcelp_rnd_fir_coefs[11] = { + -1.344519e-1, 1.735384e-2, -6.905826e-2, 2.434368e-2, + -8.210701e-2, 3.041388e-2, -9.251384e-2, 3.501983e-2, + -9.918777e-2, 3.749518e-2, 8.985137e-1 +}; + +/** + * This spread factor is used, for bitrate 1/8 and I_F_Q, + * to force LSP frequencies to be at least 80 Hz apart. + * + * TIA/EIA/IS-733 2.4.3.3.2 + */ +#define QCELP_LSP_SPREAD_FACTOR 0.02 + +/** + * Predictor coefficient for the conversion of LSP codes + * to LSP frequencies for 1/8 and I_F_Q + * + * TIA/EIA/IS-733 2.4.3.2.7-2 + */ +#define QCELP_LSP_OCTAVE_PREDICTOR 29.0/32 + +/** + * Initial coefficient to perform bandwidth expansion on LPC + * + * @note: 0.9883 looks like an approximation of 253/256. + * + * TIA/EIA/IS-733 2.4.3.3.6 6 + */ +#define QCELP_BANDWIDTH_EXPANSION_COEFF 0.9883 + +#endif /* AVCODEC_QCELPDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2_tablegen.h new file mode 100644 index 00000000..2331ebfb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2_tablegen.h @@ -0,0 +1,261 @@ +/* + * Header file for hardcoded QDM2 tables + * + * Copyright (c) 2010 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QDM2_TABLEGEN_H +#define AVCODEC_QDM2_TABLEGEN_H + +#include +#include +#include "libavutil/attributes.h" +#include "qdm2data.h" + +#define SOFTCLIP_THRESHOLD 27600 +#define HARDCLIP_THRESHOLD 35716 + +#if CONFIG_HARDCODED_TABLES +#define softclip_table_init() +#define rnd_table_init() +#define init_noise_samples() +#define qdm2_init_vlc() +#include "libavcodec/qdm2_tables.h" +#else +static uint16_t softclip_table[HARDCLIP_THRESHOLD - SOFTCLIP_THRESHOLD + 1]; +static float noise_table[4096 + 20]; +static uint8_t random_dequant_index[256][5]; +static uint8_t random_dequant_type24[128][3]; +static float noise_samples[128]; + +static av_cold void softclip_table_init(void) { + int i; + double dfl = SOFTCLIP_THRESHOLD - 32767; + float delta = 1.0 / -dfl; + for (i = 0; i < HARDCLIP_THRESHOLD - SOFTCLIP_THRESHOLD + 1; i++) + softclip_table[i] = SOFTCLIP_THRESHOLD - ((int)(sin((float)i * delta) * dfl) & 0x0000FFFF); +} + + +// random generated table +static av_cold void rnd_table_init(void) { + int i,j; + uint32_t ldw; + uint64_t random_seed = 0; + float delta = 1.0 / 16384.0; + for(i = 0; i < 4096 ;i++) { + random_seed = random_seed * 214013 + 2531011; + noise_table[i] = (delta * (float)(((int32_t)random_seed >> 16) & 0x00007FFF)- 1.0) * 1.3; + } + + for (i = 0; i < 256 ;i++) { + random_seed = 81; + ldw = i; + for (j = 0; j < 5 ;j++) { + random_dequant_index[i][j] = ldw / random_seed; + ldw %= random_seed; + random_seed /= 3; + } + } + for (i = 0; i < 128 ;i++) { + random_seed = 25; + ldw = i; + for (j = 0; j < 3 ;j++) { + random_dequant_type24[i][j] = ldw / random_seed; + ldw %= random_seed; + random_seed /= 5; + } + } +} + + +static av_cold void init_noise_samples(void) { + int i; + unsigned random_seed = 0; + float delta = 1.0 / 16384.0; + for (i = 0; i < 128;i++) { + random_seed = random_seed * 214013 + 2531011; + noise_samples[i] = (delta * (float)((random_seed >> 16) & 0x00007fff) - 1.0); + } +} + +static VLC vlc_tab_level; +static VLC vlc_tab_diff; +static VLC vlc_tab_run; +static VLC fft_level_exp_alt_vlc; +static VLC fft_level_exp_vlc; +static VLC fft_stereo_exp_vlc; +static VLC fft_stereo_phase_vlc; +static VLC vlc_tab_tone_level_idx_hi1; +static VLC vlc_tab_tone_level_idx_mid; +static VLC vlc_tab_tone_level_idx_hi2; +static VLC vlc_tab_type30; +static VLC vlc_tab_type34; +static VLC vlc_tab_fft_tone_offset[5]; + +static const uint16_t qdm2_vlc_offs[] = { + 0,260,566,598,894,1166,1230,1294,1678,1950,2214,2278,2310,2570,2834,3124,3448,3838, +}; + +static VLC_TYPE qdm2_table[3838][2]; + +static av_cold void qdm2_init_vlc(void) +{ + vlc_tab_level.table = &qdm2_table[qdm2_vlc_offs[0]]; + vlc_tab_level.table_allocated = qdm2_vlc_offs[1] - qdm2_vlc_offs[0]; + init_vlc(&vlc_tab_level, 8, 24, + vlc_tab_level_huffbits, 1, 1, + vlc_tab_level_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_diff.table = &qdm2_table[qdm2_vlc_offs[1]]; + vlc_tab_diff.table_allocated = qdm2_vlc_offs[2] - qdm2_vlc_offs[1]; + init_vlc(&vlc_tab_diff, 8, 37, + vlc_tab_diff_huffbits, 1, 1, + vlc_tab_diff_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_run.table = &qdm2_table[qdm2_vlc_offs[2]]; + vlc_tab_run.table_allocated = qdm2_vlc_offs[3] - qdm2_vlc_offs[2]; + init_vlc(&vlc_tab_run, 5, 6, + vlc_tab_run_huffbits, 1, 1, + vlc_tab_run_huffcodes, 1, 1, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + fft_level_exp_alt_vlc.table = &qdm2_table[qdm2_vlc_offs[3]]; + fft_level_exp_alt_vlc.table_allocated = qdm2_vlc_offs[4] - + qdm2_vlc_offs[3]; + init_vlc(&fft_level_exp_alt_vlc, 8, 28, + fft_level_exp_alt_huffbits, 1, 1, + fft_level_exp_alt_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + fft_level_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[4]]; + fft_level_exp_vlc.table_allocated = qdm2_vlc_offs[5] - qdm2_vlc_offs[4]; + init_vlc(&fft_level_exp_vlc, 8, 20, + fft_level_exp_huffbits, 1, 1, + fft_level_exp_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + fft_stereo_exp_vlc.table = &qdm2_table[qdm2_vlc_offs[5]]; + fft_stereo_exp_vlc.table_allocated = qdm2_vlc_offs[6] - + qdm2_vlc_offs[5]; + init_vlc(&fft_stereo_exp_vlc, 6, 7, + fft_stereo_exp_huffbits, 1, 1, + fft_stereo_exp_huffcodes, 1, 1, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + fft_stereo_phase_vlc.table = &qdm2_table[qdm2_vlc_offs[6]]; + fft_stereo_phase_vlc.table_allocated = qdm2_vlc_offs[7] - + qdm2_vlc_offs[6]; + init_vlc(&fft_stereo_phase_vlc, 6, 9, + fft_stereo_phase_huffbits, 1, 1, + fft_stereo_phase_huffcodes, 1, 1, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_tone_level_idx_hi1.table = + &qdm2_table[qdm2_vlc_offs[7]]; + vlc_tab_tone_level_idx_hi1.table_allocated = qdm2_vlc_offs[8] - + qdm2_vlc_offs[7]; + init_vlc(&vlc_tab_tone_level_idx_hi1, 8, 20, + vlc_tab_tone_level_idx_hi1_huffbits, 1, 1, + vlc_tab_tone_level_idx_hi1_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_tone_level_idx_mid.table = + &qdm2_table[qdm2_vlc_offs[8]]; + vlc_tab_tone_level_idx_mid.table_allocated = qdm2_vlc_offs[9] - + qdm2_vlc_offs[8]; + init_vlc(&vlc_tab_tone_level_idx_mid, 8, 24, + vlc_tab_tone_level_idx_mid_huffbits, 1, 1, + vlc_tab_tone_level_idx_mid_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_tone_level_idx_hi2.table = + &qdm2_table[qdm2_vlc_offs[9]]; + vlc_tab_tone_level_idx_hi2.table_allocated = qdm2_vlc_offs[10] - + qdm2_vlc_offs[9]; + init_vlc(&vlc_tab_tone_level_idx_hi2, 8, 24, + vlc_tab_tone_level_idx_hi2_huffbits, 1, 1, + vlc_tab_tone_level_idx_hi2_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_type30.table = &qdm2_table[qdm2_vlc_offs[10]]; + vlc_tab_type30.table_allocated = qdm2_vlc_offs[11] - qdm2_vlc_offs[10]; + init_vlc(&vlc_tab_type30, 6, 9, + vlc_tab_type30_huffbits, 1, 1, + vlc_tab_type30_huffcodes, 1, 1, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_type34.table = &qdm2_table[qdm2_vlc_offs[11]]; + vlc_tab_type34.table_allocated = qdm2_vlc_offs[12] - qdm2_vlc_offs[11]; + init_vlc(&vlc_tab_type34, 5, 10, + vlc_tab_type34_huffbits, 1, 1, + vlc_tab_type34_huffcodes, 1, 1, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_fft_tone_offset[0].table = + &qdm2_table[qdm2_vlc_offs[12]]; + vlc_tab_fft_tone_offset[0].table_allocated = qdm2_vlc_offs[13] - + qdm2_vlc_offs[12]; + init_vlc(&vlc_tab_fft_tone_offset[0], 8, 23, + vlc_tab_fft_tone_offset_0_huffbits, 1, 1, + vlc_tab_fft_tone_offset_0_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_fft_tone_offset[1].table = + &qdm2_table[qdm2_vlc_offs[13]]; + vlc_tab_fft_tone_offset[1].table_allocated = qdm2_vlc_offs[14] - + qdm2_vlc_offs[13]; + init_vlc(&vlc_tab_fft_tone_offset[1], 8, 28, + vlc_tab_fft_tone_offset_1_huffbits, 1, 1, + vlc_tab_fft_tone_offset_1_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_fft_tone_offset[2].table = + &qdm2_table[qdm2_vlc_offs[14]]; + vlc_tab_fft_tone_offset[2].table_allocated = qdm2_vlc_offs[15] - + qdm2_vlc_offs[14]; + init_vlc(&vlc_tab_fft_tone_offset[2], 8, 32, + vlc_tab_fft_tone_offset_2_huffbits, 1, 1, + vlc_tab_fft_tone_offset_2_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_fft_tone_offset[3].table = + &qdm2_table[qdm2_vlc_offs[15]]; + vlc_tab_fft_tone_offset[3].table_allocated = qdm2_vlc_offs[16] - + qdm2_vlc_offs[15]; + init_vlc(&vlc_tab_fft_tone_offset[3], 8, 35, + vlc_tab_fft_tone_offset_3_huffbits, 1, 1, + vlc_tab_fft_tone_offset_3_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); + + vlc_tab_fft_tone_offset[4].table = + &qdm2_table[qdm2_vlc_offs[16]]; + vlc_tab_fft_tone_offset[4].table_allocated = qdm2_vlc_offs[17] - + qdm2_vlc_offs[16]; + init_vlc(&vlc_tab_fft_tone_offset[4], 8, 38, + vlc_tab_fft_tone_offset_4_huffbits, 1, 1, + vlc_tab_fft_tone_offset_4_huffcodes, 2, 2, + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); +} + +#endif /* CONFIG_HARDCODED_TABLES */ + +#endif /* AVCODEC_QDM2_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2data.h new file mode 100644 index 00000000..355d6138 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qdm2data.h @@ -0,0 +1,531 @@ +/* + * QDM2 compatible decoder + * Copyright (c) 2003 Ewald Snel + * Copyright (c) 2005 Benjamin Larsson + * Copyright (c) 2005 Alex Beregszaszi + * Copyright (c) 2005 Roberto Togni + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + /** + * @file + * Various QDM2 tables. + */ + +#ifndef AVCODEC_QDM2DATA_H +#define AVCODEC_QDM2DATA_H + +#include + +/** VLC TABLES **/ + +/* values in this table range from -1..23; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_level_huffcodes[24] = { + 0x037c, 0x0004, 0x003c, 0x004c, 0x003a, 0x002c, 0x001c, 0x001a, + 0x0024, 0x0014, 0x0001, 0x0002, 0x0000, 0x0003, 0x0007, 0x0005, + 0x0006, 0x0008, 0x0009, 0x000a, 0x000c, 0x00fc, 0x007c, 0x017c +}; + +static const uint8_t vlc_tab_level_huffbits[24] = { + 10, 6, 7, 7, 6, 6, 6, 6, 6, 5, 4, 4, 4, 3, 3, 3, 3, 4, 4, 5, 7, 8, 9, 10 +}; + +/* values in this table range from -1..36; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_diff_huffcodes[37] = { + 0x1c57, 0x0004, 0x0000, 0x0001, 0x0003, 0x0002, 0x000f, 0x000e, + 0x0007, 0x0016, 0x0037, 0x0027, 0x0026, 0x0066, 0x0006, 0x0097, + 0x0046, 0x01c6, 0x0017, 0x0786, 0x0086, 0x0257, 0x00d7, 0x0357, + 0x00c6, 0x0386, 0x0186, 0x0000, 0x0157, 0x0c57, 0x0057, 0x0000, + 0x0b86, 0x0000, 0x1457, 0x0000, 0x0457 +}; + +static const uint8_t vlc_tab_diff_huffbits[37] = { + 13, 3, 3, 2, 3, 3, 4, 4, 6, 5, 6, 6, 7, 7, 8, 8, + 8, 9, 8, 11, 9, 10, 8, 10, 9, 12, 10, 0, 10, 13, 11, 0, + 12, 0, 13, 0, 13 +}; + +/* values in this table range from -1..5; adjust retrieved value by -1 */ +static const uint8_t vlc_tab_run_huffcodes[6] = { + 0x1f, 0x00, 0x01, 0x03, 0x07, 0x0f +}; + +static const uint8_t vlc_tab_run_huffbits[6] = { + 5, 1, 2, 3, 4, 5 +}; + +/* values in this table range from -1..19; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_tone_level_idx_hi1_huffcodes[20] = { + 0x5714, 0x000c, 0x0002, 0x0001, 0x0000, 0x0004, 0x0034, 0x0054, + 0x0094, 0x0014, 0x0114, 0x0214, 0x0314, 0x0614, 0x0e14, 0x0f14, + 0x2714, 0x0714, 0x1714, 0x3714 +}; + +static const uint8_t vlc_tab_tone_level_idx_hi1_huffbits[20] = { + 15, 4, 2, 1, 3, 5, 6, 7, 8, 10, 10, 11, 11, 12, 12, 12, 14, 14, 15, 14 +}; + +/* values in this table range from -1..23; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_tone_level_idx_mid_huffcodes[24] = { + 0x0fea, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x03ea, 0x00ea, 0x002a, 0x001a, + 0x0006, 0x0001, 0x0000, 0x0002, 0x000a, 0x006a, 0x01ea, 0x07ea +}; + +static const uint8_t vlc_tab_tone_level_idx_mid_huffbits[24] = { + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 9, 7, 5, 3, 1, 2, 4, 6, 8, 10, 12 +}; + +/* values in this table range from -1..23; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_tone_level_idx_hi2_huffcodes[24] = { + 0x0664, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0064, 0x00e4, + 0x00a4, 0x0068, 0x0004, 0x0008, 0x0014, 0x0018, 0x0000, 0x0001, + 0x0002, 0x0003, 0x000c, 0x0028, 0x0024, 0x0164, 0x0000, 0x0264 +}; + +static const uint8_t vlc_tab_tone_level_idx_hi2_huffbits[24] = { + 11, 0, 0, 0, 0, 0, 10, 8, 8, 7, 6, 6, 5, 5, 4, 2, 2, 2, 4, 7, 8, 9, 0, 11 +}; + +/* values in this table range from -1..8; adjust retrieved value by -1 */ +static const uint8_t vlc_tab_type30_huffcodes[9] = { + 0x3c, 0x06, 0x00, 0x01, 0x03, 0x02, 0x04, 0x0c, 0x1c +}; + +static const uint8_t vlc_tab_type30_huffbits[9] = { + 6, 3, 3, 2, 2, 3, 4, 5, 6 +}; + +/* values in this table range from -1..9; adjust retrieved value by -1 */ +static const uint8_t vlc_tab_type34_huffcodes[10] = { + 0x18, 0x00, 0x01, 0x04, 0x05, 0x07, 0x03, 0x02, 0x06, 0x08 +}; + +static const uint8_t vlc_tab_type34_huffbits[10] = { + 5, 4, 3, 3, 3, 3, 3, 3, 3, 5 +}; + +/* values in this table range from -1..22; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_fft_tone_offset_0_huffcodes[23] = { + 0x038e, 0x0001, 0x0000, 0x0022, 0x000a, 0x0006, 0x0012, 0x0002, + 0x001e, 0x003e, 0x0056, 0x0016, 0x000e, 0x0032, 0x0072, 0x0042, + 0x008e, 0x004e, 0x00f2, 0x002e, 0x0036, 0x00c2, 0x018e +}; + +static const uint8_t vlc_tab_fft_tone_offset_0_huffbits[23] = { + 10, 1, 2, 6, 4, 5, 6, 7, 6, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 6, 6, 8, 10 +}; + +/* values in this table range from -1..27; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_fft_tone_offset_1_huffcodes[28] = { + 0x07a4, 0x0001, 0x0020, 0x0012, 0x001c, 0x0008, 0x0006, 0x0010, + 0x0000, 0x0014, 0x0004, 0x0032, 0x0070, 0x000c, 0x0002, 0x003a, + 0x001a, 0x002c, 0x002a, 0x0022, 0x0024, 0x000a, 0x0064, 0x0030, + 0x0062, 0x00a4, 0x01a4, 0x03a4 +}; + +static const uint8_t vlc_tab_fft_tone_offset_1_huffbits[28] = { + 11, 1, 6, 6, 5, 4, 3, 6, 6, 5, 6, 6, 7, 6, 6, 6, + 6, 6, 6, 7, 8, 6, 7, 7, 7, 9, 10, 11 +}; + +/* values in this table range from -1..31; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_fft_tone_offset_2_huffcodes[32] = { + 0x1760, 0x0001, 0x0000, 0x0082, 0x000c, 0x0006, 0x0003, 0x0007, + 0x0008, 0x0004, 0x0010, 0x0012, 0x0022, 0x001a, 0x0000, 0x0020, + 0x000a, 0x0040, 0x004a, 0x006a, 0x002a, 0x0042, 0x0002, 0x0060, + 0x00aa, 0x00e0, 0x00c2, 0x01c2, 0x0160, 0x0360, 0x0760, 0x0f60 +}; + +static const uint8_t vlc_tab_fft_tone_offset_2_huffbits[32] = { + 13, 2, 0, 8, 4, 3, 3, 3, 4, 4, 5, 5, 6, 5, 7, 7, + 7, 7, 7, 7, 8, 8, 8, 9, 8, 8, 9, 9, 10, 11, 13, 12 +}; + +/* values in this table range from -1..34; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_fft_tone_offset_3_huffcodes[35] = { + 0x33ea, 0x0005, 0x0000, 0x000c, 0x0000, 0x0006, 0x0003, 0x0008, + 0x0002, 0x0001, 0x0004, 0x0007, 0x001a, 0x000f, 0x001c, 0x002c, + 0x000a, 0x001d, 0x002d, 0x002a, 0x000d, 0x004c, 0x008c, 0x006a, + 0x00cd, 0x004d, 0x00ea, 0x020c, 0x030c, 0x010c, 0x01ea, 0x07ea, + 0x0bea, 0x03ea, 0x13ea +}; + +static const uint8_t vlc_tab_fft_tone_offset_3_huffbits[35] = { + 14, 4, 0, 10, 4, 3, 3, 4, 4, 3, 4, 4, 5, 4, 5, 6, + 6, 5, 6, 7, 7, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 11, + 12, 13, 14 +}; + +/* values in this table range from -1..37; adjust retrieved value by -1 */ +static const uint16_t vlc_tab_fft_tone_offset_4_huffcodes[38] = { + 0x5282, 0x0016, 0x0000, 0x0136, 0x0004, 0x0000, 0x0007, 0x000a, + 0x000e, 0x0003, 0x0001, 0x000d, 0x0006, 0x0009, 0x0012, 0x0005, + 0x0025, 0x0022, 0x0015, 0x0002, 0x0076, 0x0035, 0x0042, 0x00c2, + 0x0182, 0x00b6, 0x0036, 0x03c2, 0x0482, 0x01c2, 0x0682, 0x0882, + 0x0a82, 0x0082, 0x0282, 0x1282, 0x3282, 0x2282 +}; + +static const uint8_t vlc_tab_fft_tone_offset_4_huffbits[38] = { + 15, 6, 0, 9, 3, 3, 3, 4, 4, 3, 4, 4, 5, 4, 5, 6, + 6, 6, 6, 8, 7, 6, 8, 9, 9, 8, 9, 10, 11, 10, 11, 12, + 12, 12, 14, 15, 14, 14 +}; + +/** FFT TABLES **/ + +/* values in this table range from -1..27; adjust retrieved value by -1 */ +static const uint16_t fft_level_exp_alt_huffcodes[28] = { + 0x1ec6, 0x0006, 0x00c2, 0x0142, 0x0242, 0x0246, 0x00c6, 0x0046, + 0x0042, 0x0146, 0x00a2, 0x0062, 0x0026, 0x0016, 0x000e, 0x0005, + 0x0004, 0x0003, 0x0000, 0x0001, 0x000a, 0x0012, 0x0002, 0x0022, + 0x01c6, 0x02c6, 0x06c6, 0x0ec6 +}; + +static const uint8_t fft_level_exp_alt_huffbits[28] = { + 13, 7, 8, 9, 10, 10, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, + 3, 2, 3, 3, 4, 5, 7, 8, 9, 11, 12, 13 +}; + +/* values in this table range from -1..19; adjust retrieved value by -1 */ +static const uint16_t fft_level_exp_huffcodes[20] = { + 0x0f24, 0x0001, 0x0002, 0x0000, 0x0006, 0x0005, 0x0007, 0x000c, + 0x000b, 0x0014, 0x0013, 0x0004, 0x0003, 0x0023, 0x0064, 0x00a4, + 0x0024, 0x0124, 0x0324, 0x0724 +}; + +static const uint8_t fft_level_exp_huffbits[20] = { + 12, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 8, 9, 10, 11, 12 +}; + +/* values in this table range from -1..6; adjust retrieved value by -1 */ +static const uint8_t fft_stereo_exp_huffcodes[7] = { + 0x3e, 0x01, 0x00, 0x02, 0x06, 0x0e, 0x1e +}; + +static const uint8_t fft_stereo_exp_huffbits[7] = { + 6, 1, 2, 3, 4, 5, 6 +}; + +/* values in this table range from -1..8; adjust retrieved value by -1 */ +static const uint8_t fft_stereo_phase_huffcodes[9] = { + 0x35, 0x02, 0x00, 0x01, 0x0d, 0x15, 0x05, 0x09, 0x03 +}; + +static const uint8_t fft_stereo_phase_huffbits[9] = { + 6, 2, 2, 4, 4, 6, 5, 4, 2 +}; + +static const int fft_cutoff_index_table[4][2] = { + { 1, 2 }, {-1, 0 }, {-1,-2 }, { 0, 0 } +}; + +static const int16_t fft_level_index_table[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const uint8_t last_coeff[3] = { + 4, 7, 10 +}; + +static const uint8_t coeff_per_sb_for_avg[3][30] = { + { 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, + { 0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 }, + { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9 } +}; + +static const uint32_t dequant_table[3][10][30] = { + { { 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 256, 256, 205, 154, 102, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 51, 102, 154, 205, 256, 238, 219, 201, 183, 165, 146, 128, 110, 91, 73, 55, 37, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 18, 37, 55, 73, 91, 110, 128, 146, 165, 183, 201, 219, 238, 256, 228, 199, 171, 142, 114, 85, 57, 28 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { { 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 256, 171, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 85, 171, 256, 171, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 85, 171, 256, 219, 183, 146, 110, 73, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 73, 110, 146, 183, 219, 256, 228, 199, 171, 142, 114, 85, 57, 28, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 57, 85, 114, 142, 171, 199, 228, 256, 213, 171, 128, 85, 43 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { { 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 256, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 256, 171, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 85, 171, 256, 192, 128, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 128, 192, 256, 205, 154, 102, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 102, 154, 205, 256, 213, 171, 128, 85, 43, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 85, 128, 171, 213, 256, 213, 171, 128, 85, 43 } } +}; + +static const uint8_t coeff_per_sb_for_dequant[3][30] = { + { 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, + { 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 }, + { 0, 1, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9 } +}; + +/* first index is subband, 2nd index is 0, 1 or 3 (2 is unused) */ +static const int8_t tone_level_idx_offset_table[30][4] = { + { -50, -50, 0, -50 }, + { -50, -50, 0, -50 }, + { -50, -9, 0, -19 }, + { -16, -6, 0, -12 }, + { -11, -4, 0, -8 }, + { -8, -3, 0, -6 }, + { -7, -3, 0, -5 }, + { -6, -2, 0, -4 }, + { -5, -2, 0, -3 }, + { -4, -1, 0, -3 }, + { -4, -1, 0, -2 }, + { -3, -1, 0, -2 }, + { -3, -1, 0, -2 }, + { -3, -1, 0, -2 }, + { -2, -1, 0, -1 }, + { -2, -1, 0, -1 }, + { -2, -1, 0, -1 }, + { -2, 0, 0, -1 }, + { -2, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, -1 }, + { -1, 0, 0, 0 }, + { -1, 0, 0, 0 }, + { -1, 0, 0, 0 }, + { -1, 0, 0, 0 } +}; + +/* all my samples have 1st index 0 or 1 */ +/* second index is subband, only indexes 0-29 seem to be used */ +static const int8_t coding_method_table[5][30] = { + { 34, 30, 24, 24, 16, 16, 16, 16, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 + }, + { 34, 30, 24, 24, 16, 16, 16, 16, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 + }, + { 34, 30, 30, 30, 24, 24, 16, 16, 16, 16, 16, 16, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 + }, + { 34, 34, 30, 30, 24, 24, 24, 24, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 10, 10, 10, 10, 10, 10, 10, 10 + }, + { 34, 34, 30, 30, 30, 30, 30, 30, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 + }, +}; + +static const int vlc_stage3_values[60] = { + 0, 1, 2, 3, 4, 6, 8, 10, 12, 16, 20, 24, + 28, 36, 44, 52, 60, 76, 92, 108, 124, 156, 188, 220, + 252, 316, 380, 444, 508, 636, 764, 892, 1020, 1276, 1532, 1788, + 2044, 2556, 3068, 3580, 4092, 5116, 6140, 7164, 8188, 10236, 12284, 14332, + 16380, 20476, 24572, 28668, 32764, 40956, 49148, 57340, 65532, 81916, 98300,114684 +}; + +static const float fft_tone_sample_table[4][16][5] = { + { { .0100000000f,-.0037037037f,-.0020000000f,-.0069444444f,-.0018416207f }, + { .0416666667f, .0000000000f, .0000000000f,-.0208333333f,-.0123456791f }, + { .1250000000f, .0558035709f, .0330687836f,-.0164473690f,-.0097465888f }, + { .1562500000f, .0625000000f, .0370370370f,-.0062500000f,-.0037037037f }, + { .1996007860f, .0781250000f, .0462962948f, .0022727272f, .0013468013f }, + { .2000000000f, .0625000000f, .0370370373f, .0208333333f, .0074074073f }, + { .2127659619f, .0555555556f, .0329218097f, .0208333333f, .0123456791f }, + { .2173913121f, .0473484844f, .0280583613f, .0347222239f, .0205761325f }, + { .2173913121f, .0347222239f, .0205761325f, .0473484844f, .0280583613f }, + { .2127659619f, .0208333333f, .0123456791f, .0555555556f, .0329218097f }, + { .2000000000f, .0208333333f, .0074074073f, .0625000000f, .0370370370f }, + { .1996007860f, .0022727272f, .0013468013f, .0781250000f, .0462962948f }, + { .1562500000f,-.0062500000f,-.0037037037f, .0625000000f, .0370370370f }, + { .1250000000f,-.0164473690f,-.0097465888f, .0558035709f, .0330687836f }, + { .0416666667f,-.0208333333f,-.0123456791f, .0000000000f, .0000000000f }, + { .0100000000f,-.0069444444f,-.0018416207f,-.0037037037f,-.0020000000f } }, + + { { .0050000000f,-.0200000000f, .0125000000f,-.3030303030f, .0020000000f }, + { .1041666642f, .0400000000f,-.0250000000f, .0333333333f,-.0200000000f }, + { .1250000000f, .0100000000f, .0142857144f,-.0500000007f,-.0200000000f }, + { .1562500000f,-.0006250000f,-.00049382716f,-.000625000f,-.00049382716f }, + { .1562500000f,-.0006250000f,-.00049382716f,-.000625000f,-.00049382716f }, + { .1250000000f,-.0500000000f,-.0200000000f, .0100000000f, .0142857144f }, + { .1041666667f, .0333333333f,-.0200000000f, .0400000000f,-.0250000000f }, + { .0050000000f,-.3030303030f, .0020000001f,-.0200000000f, .0125000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f } }, + + { { .1428571492f, .1250000000f,-.0285714287f,-.0357142873f, .0208333333f }, + { .1818181818f, .0588235296f, .0333333333f, .0212765951f, .0100000000f }, + { .1818181818f, .0212765951f, .0100000000f, .0588235296f, .0333333333f }, + { .1428571492f,-.0357142873f, .0208333333f, .1250000000f,-.0285714287f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f } }, + + { { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f }, + { .0000000000f, .0000000000f, .0000000000f, .0000000000f, .0000000000f } } +}; + +static const float fft_tone_level_table[2][64] = { { +/* pow ~ (i > 46) ? 0 : (((((i & 1) ? 431 : 304) << (i >> 1))) / 1024.0); */ + 0.17677669f, 0.42677650f, 0.60355347f, 0.85355347f, + 1.20710683f, 1.68359375f, 2.37500000f, 3.36718750f, + 4.75000000f, 6.73437500f, 9.50000000f, 13.4687500f, + 19.0000000f, 26.9375000f, 38.0000000f, 53.8750000f, + 76.0000000f, 107.750000f, 152.000000f, 215.500000f, + 304.000000f, 431.000000f, 608.000000f, 862.000000f, + 1216.00000f, 1724.00000f, 2432.00000f, 3448.00000f, + 4864.00000f, 6896.00000f, 9728.00000f, 13792.0000f, + 19456.0000f, 27584.0000f, 38912.0000f, 55168.0000f, + 77824.0000f, 110336.000f, 155648.000f, 220672.000f, + 311296.000f, 441344.000f, 622592.000f, 882688.000f, + 1245184.00f, 1765376.00f, 2490368.00f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + }, { +/* pow = (i > 45) ? 0 : ((((i & 1) ? 431 : 304) << (i >> 1)) / 512.0); */ + 0.59375000f, 0.84179688f, 1.18750000f, 1.68359375f, + 2.37500000f, 3.36718750f, 4.75000000f, 6.73437500f, + 9.50000000f, 13.4687500f, 19.0000000f, 26.9375000f, + 38.0000000f, 53.8750000f, 76.0000000f, 107.750000f, + 152.000000f, 215.500000f, 304.000000f, 431.000000f, + 608.000000f, 862.000000f, 1216.00000f, 1724.00000f, + 2432.00000f, 3448.00000f, 4864.00000f, 6896.00000f, + 9728.00000f, 13792.0000f, 19456.0000f, 27584.0000f, + 38912.0000f, 55168.0000f, 77824.0000f, 110336.000f, + 155648.000f, 220672.000f, 311296.000f, 441344.000f, + 622592.000f, 882688.000f, 1245184.00f, 1765376.00f, + 2490368.00f, 3530752.00f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f, + 0.00000000f, 0.00000000f, 0.00000000f, 0.00000000f +} }; + +static const float fft_tone_envelope_table[4][31] = { + { .009607375f, .038060248f, .084265202f, .146446645f, .222214907f, .308658302f, + .402454883f, .500000060f, .597545207f, .691341758f, .777785182f, .853553414f, + .915734828f, .961939812f, .990392685f, 1.00000000f, .990392625f, .961939752f, + .915734768f, .853553295f, .777785063f, .691341639f, .597545087f, .500000000f, + .402454853f, .308658272f, .222214878f, .146446615f, .084265172f, .038060218f, + .009607345f }, + { .038060248f, .146446645f, .308658302f, .500000060f, .691341758f, .853553414f, + .961939812f, 1.00000000f, .961939752f, .853553295f, .691341639f, .500000000f, + .308658272f, .146446615f, .038060218f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f }, + { .146446645f, .500000060f, .853553414f, 1.00000000f, .853553295f, .500000000f, + .146446615f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f }, + { .500000060f, 1.00000000f, .500000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, .000000000f, + .000000000f } +}; + +static const float sb_noise_attenuation[32] = { + 0.0f, 0.0f, 0.3f, 0.4f, 0.5f, 0.7f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, +}; + +static const uint8_t fft_subpackets[32] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0 +}; + +/* first index is joined_stereo, second index is 0 or 2 (1 is unused) */ +static const float dequant_1bit[2][3] = { + {-0.920000f, 0.000000f, 0.920000f }, + {-0.890000f, 0.000000f, 0.890000f } +}; + +static const float type30_dequant[8] = { + -1.0f,-0.625f,-0.291666656732559f,0.0f, + 0.25f,0.5f,0.75f,1.0f, +}; + +static const float type34_delta[10] = { // FIXME: covers 8 entries.. + -1.0f,-0.60947573184967f,-0.333333343267441f,-0.138071194291115f,0.0f, + 0.138071194291115f,0.333333343267441f,0.60947573184967f,1.0f,0.0f, +}; + +#endif /* AVCODEC_QDM2DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qpeldsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qpeldsp.h new file mode 100644 index 00000000..91019eda --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qpeldsp.h @@ -0,0 +1,83 @@ +/* + * quarterpel DSP functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * quarterpel DSP functions + */ + +#ifndef AVCODEC_QPELDSP_H +#define AVCODEC_QPELDSP_H + +#include +#include + +void ff_put_pixels8x8_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_avg_pixels8x8_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_put_pixels16x16_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); +void ff_avg_pixels16x16_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride); + +void ff_put_pixels8_l2_8(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, + int dst_stride, int src_stride1, int src_stride2, + int h); + +#define DEF_OLD_QPEL(name) \ +void ff_put_ ## name(uint8_t *dst /* align width (8 or 16) */, \ + const uint8_t *src /* align 1 */, \ + ptrdiff_t stride); \ +void ff_put_no_rnd_ ## name(uint8_t *dst /* align width (8 or 16) */, \ + const uint8_t *src /* align 1 */, \ + ptrdiff_t stride); \ +void ff_avg_ ## name(uint8_t *dst /* align width (8 or 16) */, \ + const uint8_t *src /* align 1 */, \ + ptrdiff_t stride); + +DEF_OLD_QPEL(qpel16_mc11_old_c) +DEF_OLD_QPEL(qpel16_mc31_old_c) +DEF_OLD_QPEL(qpel16_mc12_old_c) +DEF_OLD_QPEL(qpel16_mc32_old_c) +DEF_OLD_QPEL(qpel16_mc13_old_c) +DEF_OLD_QPEL(qpel16_mc33_old_c) +DEF_OLD_QPEL(qpel8_mc11_old_c) +DEF_OLD_QPEL(qpel8_mc31_old_c) +DEF_OLD_QPEL(qpel8_mc12_old_c) +DEF_OLD_QPEL(qpel8_mc32_old_c) +DEF_OLD_QPEL(qpel8_mc13_old_c) +DEF_OLD_QPEL(qpel8_mc33_old_c) + +typedef void (*qpel_mc_func)(uint8_t *dst /* align width (8 or 16) */, + const uint8_t *src /* align 1 */, + ptrdiff_t stride); + +/** + * quarterpel DSP context + */ +typedef struct QpelDSPContext { + qpel_mc_func put_qpel_pixels_tab[2][16]; + qpel_mc_func avg_qpel_pixels_tab[2][16]; + qpel_mc_func put_no_rnd_qpel_pixels_tab[2][16]; +} QpelDSPContext; + +void ff_qpeldsp_init(QpelDSPContext *c); + +void ff_qpeldsp_init_x86(QpelDSPContext *c); +void ff_qpeldsp_init_mips(QpelDSPContext *c); + +#endif /* AVCODEC_QPELDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv.h new file mode 100644 index 00000000..b77158ec --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv.h @@ -0,0 +1,107 @@ +/* + * Intel MediaSDK QSV public API + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QSV_H +#define AVCODEC_QSV_H + +#include + +#include "libavutil/buffer.h" + +/** + * This struct is used for communicating QSV parameters between libavcodec and + * the caller. It is managed by the caller and must be assigned to + * AVCodecContext.hwaccel_context. + * - decoding: hwaccel_context must be set on return from the get_format() + * callback + * - encoding: hwaccel_context must be set before avcodec_open2() + */ +typedef struct AVQSVContext { + /** + * If non-NULL, the session to use for encoding or decoding. + * Otherwise, libavcodec will try to create an internal session. + */ + mfxSession session; + + /** + * The IO pattern to use. + */ + int iopattern; + + /** + * Extra buffers to pass to encoder or decoder initialization. + */ + mfxExtBuffer **ext_buffers; + int nb_ext_buffers; + + /** + * Encoding only. If this field is set to non-zero by the caller, libavcodec + * will create an mfxExtOpaqueSurfaceAlloc extended buffer and pass it to + * the encoder initialization. This only makes sense if iopattern is also + * set to MFX_IOPATTERN_IN_OPAQUE_MEMORY. + * + * The number of allocated opaque surfaces will be the sum of the number + * required by the encoder and the user-provided value nb_opaque_surfaces. + * The array of the opaque surfaces will be exported to the caller through + * the opaque_surfaces field. + */ + int opaque_alloc; + + /** + * Encoding only, and only if opaque_alloc is set to non-zero. Before + * calling avcodec_open2(), the caller should set this field to the number + * of extra opaque surfaces to allocate beyond what is required by the + * encoder. + * + * On return from avcodec_open2(), this field will be set by libavcodec to + * the total number of allocated opaque surfaces. + */ + int nb_opaque_surfaces; + + /** + * Encoding only, and only if opaque_alloc is set to non-zero. On return + * from avcodec_open2(), this field will be used by libavcodec to export the + * array of the allocated opaque surfaces to the caller, so they can be + * passed to other parts of the pipeline. + * + * The buffer reference exported here is owned and managed by libavcodec, + * the callers should make their own reference with av_buffer_ref() and free + * it with av_buffer_unref() when it is no longer needed. + * + * The buffer data is an nb_opaque_surfaces-sized array of mfxFrameSurface1. + */ + AVBufferRef *opaque_surfaces; + + /** + * Encoding only, and only if opaque_alloc is set to non-zero. On return + * from avcodec_open2(), this field will be set to the surface type used in + * the opaque allocation request. + */ + int opaque_alloc_type; +} AVQSVContext; + +/** + * Allocate a new context. + * + * It must be freed by the caller with av_free(). + */ +AVQSVContext *av_qsv_alloc_context(void); + +#endif /* AVCODEC_QSV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv_internal.h new file mode 100644 index 00000000..6489836a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsv_internal.h @@ -0,0 +1,143 @@ +/* + * Intel MediaSDK QSV encoder/decoder shared code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QSV_INTERNAL_H +#define AVCODEC_QSV_INTERNAL_H + +#if CONFIG_VAAPI +#define AVCODEC_QSV_LINUX_SESSION_HANDLE +#endif //CONFIG_VAAPI + +#ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE +#include +#include +#if HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include "libavutil/hwcontext_vaapi.h" +#endif + +#include + +#include "libavutil/frame.h" + +#include "avcodec.h" + +#define QSV_VERSION_MAJOR 1 +#define QSV_VERSION_MINOR 1 + +#define ASYNC_DEPTH_DEFAULT 4 // internal parallelism + +#define QSV_MAX_ENC_PAYLOAD 2 // # of mfxEncodeCtrl payloads supported + +#define QSV_VERSION_ATLEAST(MAJOR, MINOR) \ + (MFX_VERSION_MAJOR > (MAJOR) || \ + MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR)) + +#define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \ + ((MFX_VERSION.Major > (MAJOR)) || \ + (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))) + +typedef struct QSVMid { + AVBufferRef *hw_frames_ref; + mfxHDL handle; + + AVFrame *locked_frame; + AVFrame *hw_frame; + mfxFrameSurface1 surf; +} QSVMid; + +typedef struct QSVFrame { + AVFrame *frame; + mfxFrameSurface1 surface; + mfxEncodeCtrl enc_ctrl; + mfxExtDecodedFrameInfo dec_info; + mfxExtBuffer *ext_param; + + int queued; + int used; + + struct QSVFrame *next; +} QSVFrame; + +typedef struct QSVSession { + mfxSession session; +#ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE + AVBufferRef *va_device_ref; + AVHWDeviceContext *va_device_ctx; +#endif +} QSVSession; + +typedef struct QSVFramesContext { + AVBufferRef *hw_frames_ctx; + void *logctx; + + /* The memory ids for the external frames. + * Refcounted, since we need one reference owned by the QSVFramesContext + * (i.e. by the encoder/decoder) and another one given to the MFX session + * from the frame allocator. */ + AVBufferRef *mids_buf; + QSVMid *mids; + int nb_mids; +} QSVFramesContext; + +int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern, + const char *extra_string); + +/** + * Convert a libmfx error code into an ffmpeg error code. + */ +int ff_qsv_map_error(mfxStatus mfx_err, const char **desc); + +int ff_qsv_print_error(void *log_ctx, mfxStatus err, + const char *error_string); + +int ff_qsv_print_warning(void *log_ctx, mfxStatus err, + const char *warning_string); + +int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); +int ff_qsv_level_to_mfx(enum AVCodecID codec_id, int level); + +enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc); + +int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc); +enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); + +enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct); + +int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs, + const char *load_plugins, int gpu_copy); + +int ff_qsv_close_internal_session(QSVSession *qs); + +int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, + AVBufferRef *device_ref, const char *load_plugins, + int gpu_copy); + +int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *session, + QSVFramesContext *qsv_frames_ctx, + const char *load_plugins, int opaque, int gpu_copy); + +int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame); + +#endif /* AVCODEC_QSV_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvdec.h new file mode 100644 index 00000000..cb948f51 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvdec.h @@ -0,0 +1,86 @@ +/* + * Intel MediaSDK QSV utility functions + * + * copyright (c) 2013 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QSVDEC_H +#define AVCODEC_QSVDEC_H + +#include +#include + +#include + +#include "libavutil/fifo.h" +#include "libavutil/frame.h" +#include "libavutil/pixfmt.h" + +#include "avcodec.h" +#include "hwconfig.h" +#include "qsv_internal.h" + +typedef struct QSVContext { + // the session used for decoding + mfxSession session; + + // the session we allocated internally, in case the caller did not provide + // one + QSVSession internal_qs; + + QSVFramesContext frames_ctx; + + /** + * a linked list of frames currently being used by QSV + */ + QSVFrame *work_frames; + + AVFifoBuffer *async_fifo; + int zero_consume_run; + int buffered_count; + int reinit_flag; + + enum AVPixelFormat orig_pix_fmt; + uint32_t fourcc; + mfxFrameInfo frame_info; + AVBufferPool *pool; + + int initialized; + + // options set by the caller + int async_depth; + int iopattern; + int gpu_copy; + + char *load_plugins; + + mfxExtBuffer **ext_buffers; + int nb_ext_buffers; +} QSVContext; + +extern const AVCodecHWConfigInternal *ff_qsv_hw_configs[]; + +int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, + AVFrame *frame, int *got_frame, AVPacket *pkt); + +void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q); + +int ff_qsv_decode_close(QSVContext *q); + +#endif /* AVCODEC_QSVDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvenc.h new file mode 100644 index 00000000..4f579d1d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/qsvenc.h @@ -0,0 +1,213 @@ +/* + * Intel MediaSDK QSV encoder utility functions + * + * copyright (c) 2013 Yukinori Yamazoe + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_QSVENC_H +#define AVCODEC_QSVENC_H + +#include +#include + +#include + +#include "libavutil/avutil.h" +#include "libavutil/fifo.h" + +#include "avcodec.h" +#include "hwconfig.h" +#include "qsv_internal.h" + +#define QSV_HAVE_CO2 QSV_VERSION_ATLEAST(1, 6) +#define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11) +#define QSV_HAVE_CO_VPS QSV_VERSION_ATLEAST(1, 17) + +#define QSV_HAVE_EXT_HEVC_TILES QSV_VERSION_ATLEAST(1, 13) +#define QSV_HAVE_EXT_VP9_PARAM QSV_VERSION_ATLEAST(1, 26) + +#define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8) +#define QSV_HAVE_MAX_SLICE_SIZE QSV_VERSION_ATLEAST(1, 9) +#define QSV_HAVE_BREF_TYPE QSV_VERSION_ATLEAST(1, 8) + +#define QSV_HAVE_LA QSV_VERSION_ATLEAST(1, 7) +#define QSV_HAVE_LA_DS QSV_VERSION_ATLEAST(1, 8) +#define QSV_HAVE_LA_HRD QSV_VERSION_ATLEAST(1, 11) +#define QSV_HAVE_VDENC QSV_VERSION_ATLEAST(1, 15) + +#define QSV_HAVE_GPB QSV_VERSION_ATLEAST(1, 18) + +#if defined(_WIN32) || defined(__CYGWIN__) +#define QSV_HAVE_AVBR QSV_VERSION_ATLEAST(1, 3) +#define QSV_HAVE_ICQ QSV_VERSION_ATLEAST(1, 8) +#define QSV_HAVE_VCM QSV_VERSION_ATLEAST(1, 8) +#define QSV_HAVE_QVBR QSV_VERSION_ATLEAST(1, 11) +#define QSV_HAVE_MF 0 +#else +#define QSV_HAVE_AVBR 0 +#define QSV_HAVE_ICQ QSV_VERSION_ATLEAST(1, 28) +#define QSV_HAVE_VCM 0 +#define QSV_HAVE_QVBR QSV_VERSION_ATLEAST(1, 28) +#define QSV_HAVE_MF QSV_VERSION_ATLEAST(1, 25) +#endif + +#if !QSV_HAVE_LA_DS +#define MFX_LOOKAHEAD_DS_UNKNOWN 0 +#define MFX_LOOKAHEAD_DS_OFF 0 +#define MFX_LOOKAHEAD_DS_2x 0 +#define MFX_LOOKAHEAD_DS_4x 0 +#endif + +#define QSV_COMMON_OPTS \ +{ "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE }, \ +{ "avbr_accuracy", "Accuracy of the AVBR ratecontrol", OFFSET(qsv.avbr_accuracy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, \ +{ "avbr_convergence", "Convergence of the AVBR ratecontrol", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, \ +{ "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 = MFX_TARGETUSAGE_BALANCED }, MFX_TARGETUSAGE_BEST_QUALITY, MFX_TARGETUSAGE_BEST_SPEED, VE, "preset" }, \ +{ "veryfast", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_SPEED }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "faster", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_6 }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "fast", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_5 }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "medium", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BALANCED }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "slow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_3 }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "slower", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_2 }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "veryslow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_QUALITY }, INT_MIN, INT_MAX, VE, "preset" }, \ +{ "rdo", "Enable rate distortion optimization", OFFSET(qsv.rdo), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "max_frame_size", "Maximum encoded frame size in bytes", OFFSET(qsv.max_frame_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \ +{ "max_slice_size", "Maximum encoded slice size in bytes", OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \ +{ "bitrate_limit", "Toggle bitrate limitations", OFFSET(qsv.bitrate_limit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "mbbrc", "MB level bitrate control", OFFSET(qsv.mbbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "extbrc", "Extended bitrate control", OFFSET(qsv.extbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(qsv.b_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ +{ "forced_idr", "Forcing I frames as IDR frames", OFFSET(qsv.forced_idr), AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE }, \ +{ "low_power", "enable low power mode(experimental: many limitations by mfx version, BRC modes, etc.)", OFFSET(qsv.low_power), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE},\ + +extern const AVCodecHWConfigInternal *ff_qsv_enc_hw_configs[]; + +typedef int SetEncodeCtrlCB (AVCodecContext *avctx, + const AVFrame *frame, mfxEncodeCtrl* enc_ctrl); +typedef struct QSVEncContext { + AVCodecContext *avctx; + + QSVFrame *work_frames; + + mfxSession session; + QSVSession internal_qs; + + int packet_size; + int width_align; + int height_align; + + mfxVideoParam param; + mfxFrameAllocRequest req; + + mfxExtCodingOption extco; +#if QSV_HAVE_CO2 + mfxExtCodingOption2 extco2; +#endif +#if QSV_HAVE_CO3 + mfxExtCodingOption3 extco3; +#endif +#if QSV_HAVE_MF + mfxExtMultiFrameParam extmfp; + mfxExtMultiFrameControl extmfc; +#endif +#if QSV_HAVE_EXT_HEVC_TILES + mfxExtHEVCTiles exthevctiles; +#endif +#if QSV_HAVE_EXT_VP9_PARAM + mfxExtVP9Param extvp9param; +#endif + + mfxExtOpaqueSurfaceAlloc opaque_alloc; + mfxFrameSurface1 **opaque_surfaces; + AVBufferRef *opaque_alloc_buf; + + mfxExtBuffer *extparam_internal[2 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + (QSV_HAVE_MF * 2)]; + int nb_extparam_internal; + + mfxExtBuffer **extparam; + + AVFifoBuffer *async_fifo; + + QSVFramesContext frames_ctx; + + mfxVersion ver; + + int hevc_vps; + + // options set by the caller + int async_depth; + int idr_interval; + int profile; + int preset; + int avbr_accuracy; + int avbr_convergence; + int pic_timing_sei; + int look_ahead; + int look_ahead_depth; + int look_ahead_downsampling; + int vcm; + int rdo; + int max_frame_size; + int max_slice_size; + + int tile_cols; + int tile_rows; + + int aud; + + int single_sei_nal_unit; + int max_dec_frame_buffering; + + int bitrate_limit; + int mbbrc; + int extbrc; + int adaptive_i; + int adaptive_b; + int b_strategy; + int cavlc; + + int int_ref_type; + int int_ref_cycle_size; + int int_ref_qp_delta; + int recovery_point_sei; + + int repeat_pps; + int low_power; + int gpb; + + int a53_cc; + +#if QSV_HAVE_MF + int mfmode; +#endif + char *load_plugins; + SetEncodeCtrlCB *set_encode_ctrl_cb; + int forced_idr; +} QSVEncContext; + +int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q); + +int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, + AVPacket *pkt, const AVFrame *frame, int *got_packet); + +int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q); + +#endif /* AVCODEC_QSVENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra144.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra144.h new file mode 100644 index 00000000..19a4ce09 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra144.h @@ -0,0 +1,89 @@ +/* + * Real Audio 1.0 (14.4K) + * Copyright (c) 2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RA144_H +#define AVCODEC_RA144_H + +#include +#include "lpc.h" +#include "audio_frame_queue.h" +#include "audiodsp.h" + +#define NBLOCKS 4 ///< number of subblocks within a block +#define BLOCKSIZE 40 ///< subblock size in 16-bit words +#define BUFFERSIZE 146 ///< the size of the adaptive codebook +#define FIXED_CB_SIZE 128 ///< size of fixed codebooks +#define FRAME_SIZE 20 ///< size of encoded frame +#define LPC_ORDER 10 ///< order of LPC filter + +typedef struct RA144Context { + AVCodecContext *avctx; + AudioDSPContext adsp; + LPCContext lpc_ctx; + AudioFrameQueue afq; + int last_frame; + + unsigned int old_energy; ///< previous frame energy + + unsigned int lpc_tables[2][10]; + + /** LPC coefficients: lpc_coef[0] is the coefficients of the current frame + * and lpc_coef[1] of the previous one. */ + unsigned int *lpc_coef[2]; + + unsigned int lpc_refl_rms[2]; + + int16_t curr_block[NBLOCKS * BLOCKSIZE]; + + /** The current subblock padded by the last 10 values of the previous one. */ + int16_t curr_sblock[50]; + + /** Adaptive codebook, its size is two units bigger to avoid a + * buffer overflow. */ + int16_t adapt_cb[146+2]; + + DECLARE_ALIGNED(16, int16_t, buffer_a)[FFALIGN(BLOCKSIZE,16)]; +} RA144Context; + +void ff_copy_and_dup(int16_t *target, const int16_t *source, int offset); +int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx); +void ff_eval_coefs(int *coefs, const int *refl); +void ff_int_to_int16(int16_t *out, const int *inp); +int ff_t_sqrt(unsigned int x); +unsigned int ff_rms(const int *data); +int ff_interp(RA144Context *ractx, int16_t *out, int a, int copyold, + int energy); +unsigned int ff_rescale_rms(unsigned int rms, unsigned int energy); +int ff_irms(AudioDSPContext *adsp, const int16_t *data/*align 16*/); +void ff_subblock_synthesis(RA144Context *ractx, const int16_t *lpc_coefs, + int cba_idx, int cb1_idx, int cb2_idx, + int gval, int gain); + +extern const int16_t ff_gain_val_tab[256][3]; +extern const uint8_t ff_gain_exp_tab[256]; +extern const int8_t ff_cb1_vects[128][40]; +extern const int8_t ff_cb2_vects[128][40]; +extern const uint16_t ff_cb1_base[128]; +extern const uint16_t ff_cb2_base[128]; +extern const int16_t ff_energy_tab[32]; +extern const int16_t * const ff_lpc_refl_cb[10]; + +#endif /* AVCODEC_RA144_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra288.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra288.h new file mode 100644 index 00000000..fa0b528b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ra288.h @@ -0,0 +1,148 @@ +/* + * RealAudio 2.0 (28.8K) + * Copyright (c) 2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RA288_H +#define AVCODEC_RA288_H + +#include +#include "libavutil/common.h" + +static const float amptable[8]={ + 0.515625, 0.90234375, 1.57910156, 2.76342773, + -0.515625, -0.90234375, -1.57910156, -2.76342773 +}; + +static const int16_t codetable[128][5]={ + { 668, -2950, -1254, -1790, -2553}, { -5032, -4577, -1045, 2908, 3318}, + { -2819, -2677, -948, -2825, -4450}, { -6679, -340, 1482, -1276, 1262}, + { -562, -6757, 1281, 179, -1274}, { -2512, -7130, -4925, 6913, 2411}, + { -2478, -156, 4683, -3873, 0}, { -8208, 2140, -478, -2785, 533}, + { 1889, 2759, 1381, -6955, -5913}, { 5082, -2460, -5778, 1797, 568}, + { -2208, -3309, -4523, -6236, -7505}, { -2719, 4358, -2988, -1149, 2664}, + { 1259, 995, 2711, -2464,-10390}, { 1722, -7569, -2742, 2171, -2329}, + { 1032, 747, -858, -7946,-12843}, { 3106, 4856, -4193, -2541, 1035}, + { 1862, -960, -6628, 410, 5882}, { -2493, -2628, -4000, -60, 7202}, + { -2672, 1446, 1536, -3831, 1233}, { -5302, 6912, 1589, -4187, 3665}, + { -3456, -8170, -7709, 1384, 4698}, { -4699, -6209,-11176, 8104, 16830}, + { 930, 7004, 1269, -8977, 2567}, { 4649, 11804, 3441, -5657, 1199}, + { 2542, -183, -8859, -7976, 3230}, { -2872, -2011, -9713, -8385, 12983}, + { 3086, 2140, -3680, -9643, -2896}, { -7609, 6515, -2283, -2522, 6332}, + { -3333, -5620, -9130,-11131, 5543}, { -407, -6721,-17466, -2889, 11568}, + { 3692, 6796, -262,-10846, -1856}, { 7275, 13404, -2989,-10595, 4936}, + { 244, -2219, 2656, 3776, -5412}, { -4043, -5934, 2131, 863, -2866}, + { -3302, 1743, -2006, -128, -2052}, { -6361, 3342, -1583, -21, 1142}, + { -3837, -1831, 6397, 2545, -2848}, { -9332, -6528, 5309, 1986, -2245}, + { -4490, 748, 1935, -3027, -493}, { -9255, 5366, 3193, -4493, 1784}, + { 4784, -370, 1866, 1057, -1889}, { 7342, -2690, -2577, 676, -611}, + { -502, 2235, -1850, -1777, -2049}, { 1011, 3880, -2465, 2209, -152}, + { 2592, 2829, 5588, 2839, -7306}, { -3049, -4918, 5955, 9201, -4447}, + { 697, 3908, 5798, -4451, -4644}, { -2121, 5444, -2570, 321, -1202}, + { 2846, -2086, 3532, 566, -708}, { -4279, 950, 4980, 3749, 452}, + { -2484, 3502, 1719, -170, 238}, { -3435, 263, 2114, -2005, 2361}, + { -7338, -1208, 9347, -1216, -4013}, {-13498, -439, 8028, -4232, 361}, + { -3729, 5433, 2004, -4727, -1259}, { -3986, 7743, 8429, -3691, -987}, + { 5198, -423, 1150, -1281, 816}, { 7409, 4109, -3949, 2690, 30}, + { 1246, 3055, -35, -1370, -246}, { -1489, 5635, -678, -2627, 3170}, + { 4830, -4585, 2008, -1062, 799}, { -129, 717, 4594, 14937, 10706}, + { 417, 2759, 1850, -5057, -1153}, { -3887, 7361, -5768, 4285, 666}, + { 1443, -938, 20, -2119, -1697}, { -3712, -3402, -2212, 110, 2136}, + { -2952, 12, -1568, -3500, -1855}, { -1315, -1731, 1160, -558, 1709}, + { 88, -4569, 194, -454, -2957}, { -2839, -1666, -273, 2084, -155}, + { -189, -2376, 1663, -1040, -2449}, { -2842, -1369, 636, -248, -2677}, + { 1517, 79, -3013, -3669, -973}, { 1913, -2493, -5312, -749, 1271}, + { -2903, -3324, -3756, -3690, -1829}, { -2913, -1547, -2760, -1406, 1124}, + { 1844, -1834, 456, 706, -4272}, { 467, -4256, -1909, 1521, 1134}, + { -127, -994, -637, -1491, -6494}, { 873, -2045, -3828, -2792, -578}, + { 2311, -1817, 2632, -3052, 1968}, { 641, 1194, 1893, 4107, 6342}, + { -45, 1198, 2160, -1449, 2203}, { -2004, 1713, 3518, 2652, 4251}, + { 2936, -3968, 1280, 131, -1476}, { 2827, 8, -1928, 2658, 3513}, + { 3199, -816, 2687, -1741, -1407}, { 2948, 4029, 394, -253, 1298}, + { 4286, 51, -4507, -32, -659}, { 3903, 5646, -5588, -2592, 5707}, + { -606, 1234, -1607, -5187, 664}, { -525, 3620, -2192, -2527, 1707}, + { 4297, -3251, -2283, 812, -2264}, { 5765, 528, -3287, 1352, 1672}, + { 2735, 1241, -1103, -3273, -3407}, { 4033, 1648, -2965, -1174, 1444}, + { 74, 918, 1999, 915, -1026}, { -2496, -1605, 2034, 2950, 229}, + { -2168, 2037, 15, -1264, -208}, { -3552, 1530, 581, 1491, 962}, + { -2613, -2338, 3621, -1488, -2185}, { -1747, 81, 5538, 1432, -2257}, + { -1019, 867, 214, -2284, -1510}, { -1684, 2816, -229, 2551, -1389}, + { 2707, 504, 479, 2783, -1009}, { 2517, -1487, -1596, 621, 1929}, + { -148, 2206, -4288, 1292, -1401}, { -527, 1243, -2731, 1909, 1280}, + { 2149, -1501, 3688, 610, -4591}, { 3306, -3369, 1875, 3636, -1217}, + { 2574, 2513, 1449, -3074, -4979}, { 814, 1826, -2497, 4234, -4077}, + { 1664, -220, 3418, 1002, 1115}, { 781, 1658, 3919, 6130, 3140}, + { 1148, 4065, 1516, 815, 199}, { 1191, 2489, 2561, 2421, 2443}, + { 770, -5915, 5515, -368, -3199}, { 1190, 1047, 3742, 6927, -2089}, + { 292, 3099, 4308, -758, -2455}, { 523, 3921, 4044, 1386, 85}, + { 4367, 1006, -1252, -1466, -1383}, { 3852, 1579, -77, 2064, 868}, + { 5109, 2919, -202, 359, -509}, { 3650, 3206, 2303, 1693, 1296}, + { 2905, -3907, 229, -1196, -2332}, { 5977, -3585, 805, 3825, -3138}, + { 3746, -606, 53, -269, -3301}, { 606, 2018, -1316, 4064, 398} +}; + +DECLARE_ALIGNED(32, static const float, syn_window)[FFALIGN(111, 16)]={ + 0.576690972, 0.580838025, 0.585013986, 0.589219987, 0.59345597, 0.597723007, + 0.602020264, 0.606384277, 0.610748291, 0.615142822, 0.619598389, 0.624084473, + 0.628570557, 0.633117676, 0.637695313, 0.642272949, 0.646911621, 0.651580811, + 0.656280518, 0.66104126, 0.665802002, 0.670593262, 0.675445557, 0.680328369, + 0.685241699, 0.690185547, 0.695159912, 0.700164795, 0.705230713, 0.710327148, + 0.715454102, 0.720611572, 0.725830078, 0.731048584, 0.736328125, 0.741638184, + 0.747009277, 0.752380371, 0.7578125, 0.763305664, 0.768798828, 0.774353027, + 0.779937744, 0.785583496, 0.791229248, 0.796936035, 0.802703857, 0.808502197, + 0.814331055, 0.820220947, 0.826141357, 0.832092285, 0.838104248, 0.844146729, + 0.850250244, 0.856384277, 0.862548828, 0.868774414, 0.875061035, 0.881378174, + 0.88772583, 0.894134521, 0.900604248, 0.907104492, 0.913635254, 0.920227051, + 0.926879883, 0.933563232, 0.940307617, 0.94708252, 0.953918457, 0.96081543, + 0.96774292, 0.974731445, 0.981781006, 0.988861084, 0.994842529, 0.998565674, + 0.999969482, 0.99911499, 0.996002197, 0.990600586, 0.982910156, 0.973022461, + 0.960876465, 0.946533203, 0.930053711, 0.911437988, 0.89074707, 0.868041992, + 0.843322754, 0.816680908, 0.788208008, 0.757904053, 0.725891113, 0.692199707, + 0.656921387, 0.620178223, 0.582000732, 0.542480469, 0.501739502, 0.459838867, + 0.416900635, 0.373016357, 0.328277588, 0.282775879, 0.236663818, 0.189971924, + 0.142852783, 0.0954284668,0.0477600098 +}; + +DECLARE_ALIGNED(32, static const float, gain_window)[FFALIGN(38, 16)]={ + 0.505699992, 0.524200022, 0.54339999, 0.563300014, 0.583953857, 0.60534668, + 0.627502441, 0.650482178, 0.674316406, 0.699005127, 0.724578857, 0.75112915, + 0.778625488, 0.807128906, 0.836669922, 0.86730957, 0.899078369, 0.932006836, + 0.961486816, 0.982757568, 0.995635986, 1, 0.995819092, 0.983154297, + 0.96206665, 0.932769775, 0.895507813, 0.850585938, 0.798400879, 0.739379883, + 0.674072266, 0.602996826, 0.526763916, 0.446014404, 0.361480713, 0.273834229, + 0.183868408, 0.0923461914 +}; + +/** synthesis bandwidth broadening table */ +DECLARE_ALIGNED(32, static const float, syn_bw_tab)[FFALIGN(36, 16)] = { + 0.98828125, 0.976699829, 0.965254128, 0.953942537, 0.942763507, 0.931715488, + 0.920796931, 0.910006344, 0.899342179, 0.888803005, 0.878387332, 0.868093729, + 0.857920766, 0.847867012, 0.837931097, 0.828111589, 0.818407178, 0.808816493, + 0.799338162, 0.789970934, 0.780713439, 0.771564424, 0.762522638, 0.753586829, + 0.744755745, 0.736028135, 0.727402806, 0.718878567, 0.710454226, 0.702128589, + 0.693900526, 0.685768902, 0.677732527, 0.669790328, 0.66194123, 0.654184103 +}; + +/** gain bandwidth broadening table */ +DECLARE_ALIGNED(32, static const float, gain_bw_tab)[FFALIGN(10, 16)] = { + 0.90625, 0.821289063, 0.74432373, 0.674499512, 0.61126709, + 0.553955078, 0.50201416, 0.454956055, 0.41229248, 0.373657227 +}; + +#endif /* AVCODEC_RA288_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ralfdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ralfdata.h new file mode 100644 index 00000000..9a84e45a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ralfdata.h @@ -0,0 +1,9920 @@ +/* + * RealAudio Lossless decoder + * + * Copyright (c) 2012 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RALFDATA_H +#define AVCODEC_RALFDATA_H + +#include + +#define FILTERPARAM_ELEMENTS 643 +#define BIAS_ELEMENTS 255 +#define CODING_MODE_ELEMENTS 140 +#define FILTER_COEFFS_ELEMENTS 43 +#define SHORT_CODES_ELEMENTS 169 +#define LONG_CODES_ELEMENTS 441 + +static const uint8_t filter_param_def[3][324] = { + { + 0x48, 0x86, 0x66, 0x8A, 0xBB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB4, 0x54, 0x45, + 0x66, 0x88, 0xAA, 0xAB, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x65, 0x45, 0x55, 0x66, 0x77, 0x78, + 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xBC, 0xCB, 0xBF, 0xFF, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF9, 0x86, 0x55, 0x55, 0x55, 0x66, 0x67, 0x77, 0x88, 0x88, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0x9B, 0xBB, 0xCB, 0xBB, 0xCC, 0xCC, + 0xCF, 0xFF, 0xCC, 0xCF, 0xFC, 0xBC, 0xCC, 0xFB, 0xB9, 0xFC, 0xA8, 0x76, + 0x66, 0x56, 0x66, 0x67, 0x67, 0x77, 0x78, 0x88, 0x88, 0x89, 0x88, 0x89, + 0x99, 0x99, 0x9A, 0x9A, 0x9A, 0x9A, 0xAA, 0xAA, 0xAA, 0xAA, 0x9A, 0xA9, + 0xAB, 0xA9, 0xA9, 0x98, 0x86, 0xFF, 0xCA, 0x88, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x88, 0x88, 0x88, 0x88, 0x99, 0x99, 0x99, 0x98, 0x99, 0x99, 0x9A, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x88, 0x87, + 0x65, 0xFF, 0xFB, 0xAA, 0xA9, 0x88, 0x88, 0x89, 0x99, 0x98, 0x99, 0x9A, + 0xA9, 0x9A, 0xA9, 0xAA, 0xA9, 0x9A, 0xAA, 0xA9, 0xAA, 0xA9, 0x99, 0x99, + 0xA9, 0x9A, 0x99, 0x99, 0x99, 0x98, 0x88, 0x77, 0x64, 0xFF, 0xFF, 0xFC, + 0xBB, 0xBA, 0xB9, 0xAA, 0xAB, 0xAA, 0xAA, 0xBA, 0xAB, 0xAB, 0xAB, 0xCB, + 0xBA, 0xAB, 0xBB, 0xBB, 0xAA, 0xBA, 0xAA, 0xAA, 0xAA, 0xA9, 0xAA, 0x99, + 0x99, 0x99, 0x88, 0x87, 0x64, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCB, 0xBB, 0xBC, 0xBB, 0xCC, 0xFB, 0xCC, 0xCF, 0xCF, + 0xCC, 0xFC, 0xFC, 0xCF, 0xCB, 0xCC, 0xBB, 0xBB, 0xCB, 0xBB, 0xAA, 0x99, + 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xB8, 0xA0, 0x00, 0x00, + }, { + 0xFB, 0x95, 0x67, 0x8B, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x55, 0x56, + 0x77, 0x89, 0xBA, 0xBB, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x65, 0x55, 0x55, 0x56, 0x77, 0x78, + 0x89, 0x9A, 0xAA, 0xAA, 0xBC, 0xBC, 0xCB, 0xBC, 0xCF, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFB, 0x86, 0x55, 0x55, 0x55, 0x55, 0x56, 0x67, 0x77, 0x77, 0x88, + 0x89, 0x9A, 0x99, 0x99, 0xAA, 0xBB, 0xBB, 0xAB, 0xBF, 0xCB, 0xFA, 0xCC, + 0xFC, 0xEC, 0xEF, 0xFB, 0xBC, 0xFF, 0xBC, 0xBB, 0xA9, 0xFF, 0x98, 0x76, + 0x66, 0x66, 0x65, 0x66, 0x66, 0x76, 0x77, 0x77, 0x77, 0x88, 0x88, 0x88, + 0x89, 0x99, 0x99, 0x99, 0x99, 0xA9, 0x99, 0x99, 0x9A, 0x99, 0x99, 0xAA, + 0xAA, 0xA9, 0x99, 0x98, 0x76, 0xFF, 0xF9, 0x87, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x99, 0x99, 0x89, 0x99, + 0x99, 0x99, 0x99, 0x89, 0x99, 0x99, 0x99, 0x98, 0x99, 0x98, 0x77, 0x77, + 0x65, 0xFF, 0xCA, 0xA9, 0x99, 0x89, 0x88, 0x88, 0x98, 0x89, 0x99, 0x98, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0x99, 0x99, 0xA9, 0x9A, 0xA9, 0x99, 0x99, + 0x99, 0x99, 0xA9, 0x99, 0x99, 0x98, 0x88, 0x77, 0x64, 0xFF, 0xCB, 0xA9, + 0xA9, 0xAA, 0xAA, 0xAA, 0x9A, 0xAB, 0xAA, 0x9A, 0xBB, 0xAB, 0xAB, 0xBB, + 0xAB, 0xBA, 0xBB, 0xBA, 0xAA, 0xBA, 0xBA, 0xAA, 0xAA, 0xA9, 0xA9, 0x99, + 0x99, 0x99, 0x88, 0x77, 0x64, 0xFF, 0xFF, 0xFF, 0xBC, 0xFB, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBA, 0xBA, 0xAB, 0xBF, 0xCB, 0xBB, 0xBB, 0xBC, 0xBF, 0xCC, + 0xCB, 0xCB, 0xCC, 0xBB, 0xBB, 0xFB, 0xCB, 0xBC, 0xCA, 0xBC, 0xAA, 0xA9, + 0x86, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFC, 0xFF, 0xFF, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF0, 0x00, 0x00, + }, { + 0x9B, 0x65, 0x67, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB5, 0x54, 0x56, + 0x67, 0x88, 0xA9, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x65, 0x44, 0x45, 0x56, 0x67, 0x78, + 0x89, 0x99, 0xA9, 0xAA, 0xBB, 0xBB, 0xAB, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF9, 0x76, 0x55, 0x54, 0x55, 0x55, 0x56, 0x67, 0x77, 0x77, 0x88, + 0x89, 0x99, 0x98, 0x99, 0x8A, 0x99, 0xBB, 0xAB, 0xBC, 0xAB, 0xBA, 0xAA, + 0xBB, 0xCB, 0xCC, 0xBB, 0xCC, 0xBB, 0xAC, 0xBA, 0x97, 0xFB, 0x97, 0x76, + 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x88, 0x88, 0x88, 0x88, + 0x99, 0x89, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x9A, 0x98, 0x99, 0x99, + 0xA9, 0x99, 0x88, 0x87, 0x65, 0xFF, 0xCA, 0x98, 0x87, 0x77, 0x77, 0x87, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x88, 0x87, 0x77, + 0x64, 0xFF, 0xFC, 0xCA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0x99, 0xAA, 0x9A, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0x99, 0x99, 0x99, 0x89, 0x88, 0x87, 0x64, 0xFF, 0xFF, 0xFB, + 0xFF, 0xBC, 0xFC, 0xBB, 0xCB, 0xBB, 0xCA, 0xCB, 0xBC, 0xCC, 0xBF, 0xBC, + 0xBB, 0xBB, 0xBE, 0xBC, 0xCB, 0xCC, 0xBB, 0xFC, 0xBC, 0xCC, 0xAB, 0xCB, + 0xAB, 0xBB, 0xAA, 0xA9, 0x97, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xCF, 0xFB, + 0xCC, 0xFC, 0xCF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + } +}; + +static const uint8_t bias_def[3][128] = { + { + 0x4A, 0xAA, 0xAA, 0xAA, 0xBA, 0xBA, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xAB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x9A, 0xA9, 0xA9, + 0x99, 0xA9, 0x99, 0x99, 0xA9, 0xA9, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x88, 0x98, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x66, 0x55, 0x55, 0x55, + 0x55, 0x54, 0x44, 0x32, 0x44, 0x55, 0x55, 0x66, 0x66, 0x66, 0x66, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x87, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x89, 0x88, 0x89, 0x89, 0x99, 0x99, 0x98, 0x99, 0x9A, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xA9, 0x9A, 0x99, 0x9A, 0xA9, 0xA9, 0xA9, + 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBA, 0x40, + }, { + 0x4C, 0xBC, 0xAC, 0xBC, 0xBA, 0xAB, 0xAB, 0xBB, 0xBA, 0xAA, 0xAB, 0xAA, + 0xBB, 0xAA, 0xBB, 0xAA, 0xAB, 0xBA, 0xBA, 0xAA, 0xBB, 0xAA, 0xA9, 0xAA, + 0xBB, 0xAA, 0xAA, 0x9A, 0x9A, 0xAA, 0xA9, 0xAA, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x98, 0x98, 0x98, 0x89, 0x88, 0x88, 0x88, 0x88, + 0x87, 0x78, 0x77, 0x77, 0x77, 0x77, 0x67, 0x66, 0x66, 0x55, 0x44, 0x45, + 0x54, 0x44, 0x44, 0x33, 0x44, 0x45, 0x55, 0x56, 0x66, 0x66, 0x66, 0x67, + 0x77, 0x77, 0x77, 0x77, 0x87, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x99, 0x88, 0x99, 0x99, 0x89, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xA9, + 0xA9, 0xAA, 0x9A, 0xA9, 0xAA, 0x9A, 0xAA, 0x9A, 0xAA, 0xAB, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xBB, 0xBA, 0xAA, 0xAB, 0xAB, 0xAA, + 0xAB, 0xAB, 0xAC, 0xBB, 0xAA, 0xBB, 0xBB, 0x40, + }, { + 0x5B, 0xBB, 0xBC, 0xBB, 0xCB, 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xBB, 0xCB, + 0xBA, 0xCB, 0xBC, 0xBB, 0xAA, 0xBB, 0xAB, 0xBA, 0xBB, 0xBB, 0xAB, 0xBB, + 0xAA, 0xBA, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA9, 0x9A, + 0x9A, 0x99, 0x9A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x98, 0x98, 0x89, 0x99, + 0x88, 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x66, 0x66, 0x55, + 0x54, 0x44, 0x43, 0x22, 0x34, 0x44, 0x55, 0x56, 0x66, 0x66, 0x67, 0x77, + 0x77, 0x77, 0x87, 0x88, 0x88, 0x88, 0x88, 0x88, 0x99, 0x89, 0x99, 0x99, + 0x99, 0x99, 0x99, 0x9A, 0x9A, 0xA9, 0xA9, 0x9A, 0x9A, 0xAA, 0x9A, 0xAA, + 0xAA, 0xAA, 0xBA, 0xAA, 0xAA, 0xAA, 0xBA, 0xAA, 0xAA, 0xAB, 0xBA, 0xBB, + 0xAA, 0xBB, 0xAB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBC, + 0xBB, 0xBC, 0xBB, 0xBB, 0xCC, 0xBC, 0xCB, 0x50, + } +}; + +static const uint8_t coding_mode_def[3][72] = { + { + 0xAA, 0x99, 0xAC, 0xB9, 0xBD, 0xAA, 0x7A, 0xA8, 0xA8, 0xA8, 0x79, 0x79, + 0x77, 0xA8, 0x97, 0x79, 0x89, 0x77, 0x87, 0x87, 0x68, 0x78, 0x66, 0x86, + 0x87, 0x67, 0x68, 0x66, 0x76, 0x76, 0x57, 0x67, 0x55, 0x75, 0x65, 0x56, + 0x56, 0x55, 0x65, 0x65, 0x56, 0x45, 0x55, 0x54, 0x55, 0x55, 0x45, 0x55, + 0x54, 0x55, 0x55, 0x45, 0x56, 0x64, 0x66, 0x76, 0x57, 0x67, 0x77, 0x77, + 0x98, 0x88, 0x9D, 0xBF, 0xBA, 0xEC, 0xFC, 0xBA, 0xEF, 0xFC, 0x00, 0x00, + }, { + 0xCF, 0x9B, 0xAF, 0xFF, 0xFF, 0xAB, 0x8A, 0x98, 0xB8, 0xF9, 0x78, 0x89, + 0x77, 0xF9, 0xF7, 0x79, 0x89, 0x77, 0x97, 0x97, 0x68, 0x68, 0x66, 0xA6, + 0x87, 0x77, 0x68, 0x66, 0x75, 0x76, 0x67, 0x56, 0x65, 0x75, 0x75, 0x56, + 0x56, 0x55, 0x65, 0x65, 0x56, 0x56, 0x55, 0x54, 0x55, 0x55, 0x45, 0x55, + 0x53, 0x55, 0x65, 0x35, 0x67, 0x64, 0x66, 0x66, 0x56, 0x78, 0x86, 0x88, + 0xA8, 0xFB, 0xAF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + }, { + 0xDC, 0xAD, 0xCC, 0xCA, 0xCF, 0xFE, 0xDF, 0xFF, 0xE9, 0xFF, 0x99, 0x79, + 0x97, 0x97, 0x97, 0x79, 0x79, 0x77, 0x97, 0x97, 0x79, 0x79, 0x77, 0x86, + 0x87, 0x68, 0x68, 0x76, 0x76, 0x76, 0x67, 0x57, 0x66, 0x65, 0x76, 0x66, + 0x56, 0x55, 0x64, 0x65, 0x55, 0x45, 0x55, 0x54, 0x55, 0x55, 0x35, 0x55, + 0x53, 0x55, 0x65, 0x35, 0x67, 0x64, 0x67, 0x87, 0x57, 0x8A, 0x86, 0x8B, + 0xBA, 0x9A, 0xCD, 0xAA, 0xAF, 0xFC, 0xFF, 0xFF, 0xDF, 0xFF, 0x00, 0x00, + } +}; + +static const uint8_t filter_coeffs_def[3][10][11][24] = { + { + { + { + 0x47, 0x88, 0x76, 0x52, 0x12, 0x35, 0x44, 0x43, 0x34, 0x45, 0x77, 0x67, + 0x66, 0x87, 0x87, 0x7D, 0x8A, 0x89, 0x9D, 0xDD, 0x9C, 0xC0, 0x00, 0x00, + }, + { + 0x7C, 0xCC, 0xC7, 0x65, 0xCC, 0x22, 0x23, 0x46, 0x32, 0x22, 0x46, 0x7B, + 0xB6, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xB4, 0x43, 0x25, 0x5B, 0x5A, 0xAB, 0x5B, 0x22, 0x22, 0x2B, + 0xBA, 0xAA, 0x46, 0x5B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x31, 0x88, 0x88, 0x89, 0x88, 0x38, 0x88, 0x13, + 0x28, 0x88, 0x88, 0x28, 0x88, 0x88, 0x88, 0x88, 0x99, 0x90, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x88, 0x88, 0x88, 0x39, 0x98, 0x88, 0x88, 0x88, + 0x08, 0x88, 0x88, 0x81, 0x99, 0x88, 0x99, 0x99, 0x99, 0x20, 0x00, 0x00, + }, + { + 0xAA, 0xD9, 0x86, 0xCD, 0xDD, 0xDD, 0x98, 0x76, 0x43, 0x65, 0x35, 0x63, + 0x23, 0x44, 0x33, 0x24, 0x45, 0x44, 0x45, 0x59, 0xA8, 0x90, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x98, 0x88, 0x88, 0x89, 0x98, 0x08, 0x88, 0x88, + 0x28, 0x88, 0x88, 0x83, 0x19, 0x98, 0x88, 0x99, 0x99, 0x90, 0x00, 0x00, + }, + { + 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA5, 0xA4, 0x01, 0x4A, 0xAA, + 0x53, 0x4A, 0xA4, 0xAA, 0x5A, 0xAA, 0xAA, 0xAA, 0xAA, 0xB0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x9A, 0xAA, 0xA3, 0x31, 0x31, + 0x34, 0x34, 0xA9, 0xA5, 0x44, 0x4A, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xED, 0xDE, 0xEE, 0xED, 0xDD, 0xDE, 0xE8, 0xEE, 0xE7, 0x64, + 0x47, 0x43, 0x30, 0x43, 0x43, 0x36, 0x7E, 0xEE, 0xEE, 0x90, 0x00, 0x00, + }, + { + 0x67, 0x87, 0x87, 0x66, 0x65, 0x55, 0x44, 0x45, 0x65, 0x54, 0x54, 0x32, + 0x34, 0x66, 0x63, 0x55, 0x44, 0x54, 0x34, 0x45, 0x56, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x56, 0x66, 0x65, 0x54, 0x33, 0x34, 0x33, 0x33, 0x33, 0x34, 0x44, 0x45, + 0x56, 0x66, 0x67, 0x77, 0x77, 0x77, 0x78, 0x89, 0x89, 0x60, 0x00, 0x00, + }, + { + 0x78, 0x89, 0x98, 0x65, 0x65, 0x32, 0x22, 0x32, 0x33, 0x33, 0x45, 0x77, + 0x77, 0x8B, 0x9A, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0x9D, 0xD8, 0x8D, 0x57, 0x56, 0x55, 0x44, 0x45, 0x22, 0x22, 0x23, 0x34, + 0x57, 0x78, 0x88, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0xDC, 0xCC, 0x8C, 0xCC, 0x87, 0x65, 0x55, 0x54, 0x23, 0x44, 0x21, 0x23, + 0x46, 0x56, 0x87, 0x7C, 0x8C, 0x8C, 0xCC, 0xCC, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xCC, 0xCD, 0xDC, 0xC7, 0x64, 0x58, 0x31, 0x25, 0x33, 0x22, + 0x44, 0x56, 0x66, 0x6D, 0xDD, 0xDD, 0xDC, 0xDC, 0xDC, 0xD0, 0x00, 0x00, + }, + { + 0xB9, 0x99, 0xA6, 0x67, 0x78, 0x76, 0x78, 0x88, 0x66, 0x55, 0x44, 0x43, + 0x23, 0x33, 0x33, 0x33, 0x34, 0x45, 0x56, 0x66, 0x88, 0xB0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xDC, 0xCD, 0xDC, 0xCC, 0x77, 0xC5, 0x53, 0x12, 0x23, 0x33, + 0x33, 0x46, 0x65, 0x75, 0x8D, 0xDD, 0xDD, 0xDC, 0xDC, 0xD0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xCC, 0xCD, 0xDC, 0xCC, 0x8C, 0x85, 0x55, 0x33, 0x21, 0x23, + 0x33, 0x44, 0x56, 0x56, 0x56, 0x8D, 0xDD, 0xCC, 0xDC, 0xD0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0xDE, 0xDD, 0xDD, 0xDD, 0x87, 0x75, 0x55, 0x43, 0x22, + 0x21, 0x25, 0x65, 0x55, 0x66, 0x77, 0xD8, 0x8D, 0xDD, 0x90, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xAA, 0x98, 0x77, 0x55, 0x43, + 0x33, 0x33, 0x21, 0x33, 0x34, 0x66, 0x89, 0xAF, 0xFF, 0xC0, 0x00, 0x00, + }, + { + 0x57, 0x77, 0x76, 0x66, 0x65, 0x55, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, + 0x33, 0x44, 0x43, 0x44, 0x44, 0x45, 0x56, 0x66, 0x77, 0x50, 0x00, 0x00, + }, + }, + { + { + 0x57, 0x76, 0x66, 0x65, 0x44, 0x44, 0x43, 0x33, 0x33, 0x33, 0x33, 0x34, + 0x45, 0x56, 0x67, 0x77, 0x77, 0x89, 0x88, 0x89, 0x99, 0x60, 0x00, 0x00, + }, + { + 0x8A, 0x99, 0x88, 0x77, 0x66, 0x44, 0x43, 0x32, 0x32, 0x22, 0x33, 0x45, + 0x67, 0x89, 0xEB, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFB, 0xBA, 0xA7, 0x78, 0x66, 0x65, 0x54, 0x22, 0x21, 0x23, 0x44, + 0x56, 0x8A, 0x9E, 0xAF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xAF, 0xFD, 0xDF, 0xAC, 0x98, 0x77, 0x66, 0x44, 0x31, 0x11, 0x35, + 0x67, 0x88, 0x8A, 0xAA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0xEF, 0xA8, 0x8E, 0x97, 0x66, 0x43, 0x22, 0x21, 0x23, + 0x45, 0x67, 0x97, 0x7F, 0xFF, 0xEE, 0xE9, 0xEE, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xAA, 0xA9, 0x97, 0x65, 0x45, 0x45, 0x67, 0x66, 0x55, 0x54, 0x44, 0x44, + 0x33, 0x33, 0x33, 0x33, 0x44, 0x45, 0x56, 0x68, 0x8B, 0xB0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xED, 0xDE, 0xED, 0xDD, 0xD8, 0x77, 0x65, 0x43, 0x11, 0x22, + 0x34, 0x66, 0x78, 0x87, 0xEE, 0xEE, 0xEE, 0x9D, 0xED, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xDC, 0xFF, 0xAE, 0xEA, 0x98, 0x76, 0x54, 0x31, 0x11, + 0x34, 0x56, 0x88, 0x99, 0x9B, 0xFF, 0xFF, 0xBF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xCF, 0xDF, 0xFF, 0xFD, 0x9A, 0x76, 0x65, 0x43, 0x21, + 0x12, 0x35, 0x56, 0x67, 0x89, 0x99, 0xAF, 0xAF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xEF, 0xDB, 0xBA, 0xAA, 0x99, 0x76, 0x55, 0x43, 0x22, + 0x22, 0x33, 0x33, 0x44, 0x55, 0x67, 0x8A, 0xFA, 0xFB, 0xA0, 0x00, 0x00, + }, + { + 0x57, 0x77, 0x77, 0x66, 0x65, 0x55, 0x54, 0x44, 0x44, 0x44, 0x43, 0x33, + 0x33, 0x34, 0x44, 0x44, 0x55, 0x55, 0x66, 0x77, 0x88, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x58, 0x77, 0x76, 0x66, 0x55, 0x54, 0x44, 0x33, 0x33, 0x23, 0x33, 0x33, + 0x45, 0x56, 0x66, 0x77, 0x88, 0x88, 0x88, 0x88, 0x99, 0x60, 0x00, 0x00, + }, + { + 0x9A, 0xA9, 0xA9, 0x88, 0x76, 0x55, 0x44, 0x33, 0x22, 0x22, 0x23, 0x45, + 0x56, 0x99, 0x9D, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFD, 0xBB, 0xAA, 0xBA, 0xA9, 0x87, 0x77, 0x54, 0x33, 0x21, 0x12, 0x45, + 0x68, 0x8A, 0xAA, 0xCB, 0xFF, 0xCF, 0xFF, 0xFF, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFE, 0xA9, 0x98, 0x87, 0x65, 0x41, 0x02, 0x45, + 0x77, 0x88, 0xAC, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xBF, 0xFC, 0xAB, 0xFB, 0xBA, 0xAB, 0xB8, 0x88, 0x76, 0x52, 0x01, 0x35, + 0x78, 0x99, 0xAB, 0xAA, 0xCF, 0xBB, 0xCF, 0xFC, 0xFC, 0xF0, 0x00, 0x00, + }, + { + 0xBA, 0xCA, 0x98, 0x75, 0x21, 0x35, 0x77, 0x77, 0x76, 0x65, 0x54, 0x44, + 0x44, 0x34, 0x44, 0x44, 0x45, 0x56, 0x78, 0x88, 0x9A, 0xC0, 0x00, 0x00, + }, + { + 0xDF, 0xCF, 0xCC, 0xFF, 0xAB, 0xC9, 0xB9, 0x98, 0x97, 0x75, 0x20, 0x13, + 0x56, 0x89, 0x89, 0xAA, 0xFC, 0xBC, 0xAF, 0xCC, 0xFF, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xBB, 0xFB, 0xFF, 0xFB, 0xBA, 0xA8, 0x77, 0x54, 0x21, 0x11, + 0x45, 0x67, 0x88, 0x8A, 0xEF, 0xBB, 0xFF, 0xBB, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFB, 0xCB, 0xB9, 0x88, 0x65, 0x31, 0x12, + 0x23, 0x35, 0x67, 0x88, 0xAA, 0xAC, 0xFC, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFC, 0xEF, 0xFF, 0xBB, 0xAA, 0xA9, 0x76, 0x55, 0x32, 0x22, + 0x22, 0x33, 0x34, 0x56, 0x67, 0x68, 0x9A, 0xAA, 0xCD, 0xE0, 0x00, 0x00, + }, + { + 0x58, 0x77, 0x77, 0x66, 0x66, 0x55, 0x54, 0x44, 0x44, 0x43, 0x33, 0x33, + 0x33, 0x34, 0x44, 0x55, 0x55, 0x66, 0x67, 0x78, 0x88, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x57, 0x77, 0x76, 0x66, 0x55, 0x55, 0x54, 0x43, 0x33, 0x22, 0x33, 0x34, + 0x45, 0x55, 0x66, 0x67, 0x77, 0x77, 0x78, 0x88, 0x99, 0x50, 0x00, 0x00, + }, + { + 0xAC, 0x99, 0x98, 0x87, 0x76, 0x66, 0x54, 0x43, 0x32, 0x21, 0x23, 0x45, + 0x66, 0x89, 0x99, 0x99, 0xAA, 0xBF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xB9, 0xAA, 0x98, 0x77, 0x65, 0x42, 0x21, 0x12, 0x45, + 0x78, 0x8A, 0xBA, 0xAA, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFD, 0xBC, 0xBB, 0xB9, 0x98, 0x76, 0x32, 0x01, 0x46, + 0x79, 0xAB, 0xBB, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xAA, 0xAA, 0x99, 0x76, 0x42, 0x01, 0x36, + 0x79, 0x9A, 0xAB, 0xBF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xCC, 0xDC, 0xB9, 0x75, 0x10, 0x47, 0x89, 0x99, 0x98, 0x87, 0x76, 0x66, + 0x55, 0x55, 0x55, 0x56, 0x66, 0x67, 0x78, 0x99, 0xBE, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFC, 0xCC, 0xFF, 0xFB, 0xAB, 0x87, 0x64, 0x10, 0x23, + 0x67, 0x99, 0x9A, 0xAD, 0xCE, 0xFF, 0xFC, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFD, 0xFA, 0xB9, 0x97, 0x65, 0x20, 0x13, + 0x56, 0x78, 0xAA, 0x9B, 0xFB, 0xFC, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xCF, 0xFC, 0xC9, 0xAC, 0x98, 0x87, 0x54, 0x31, 0x12, + 0x23, 0x45, 0x67, 0x78, 0x9A, 0xAA, 0xEB, 0xFF, 0xFF, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xCA, 0xFA, 0x99, 0x98, 0x88, 0x65, 0x44, 0x32, 0x22, + 0x22, 0x33, 0x45, 0x56, 0x67, 0x78, 0x99, 0xBB, 0xAB, 0xA0, 0x00, 0x00, + }, + { + 0x48, 0x77, 0x76, 0x66, 0x65, 0x55, 0x55, 0x44, 0x44, 0x43, 0x33, 0x33, + 0x33, 0x34, 0x45, 0x55, 0x55, 0x66, 0x67, 0x77, 0x78, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x68, 0x87, 0x77, 0x77, 0x66, 0x55, 0x54, 0x43, 0x33, 0x22, 0x23, 0x34, + 0x45, 0x55, 0x66, 0x78, 0x88, 0x98, 0x88, 0x88, 0x89, 0x60, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xBA, 0x99, 0x87, 0x76, 0x54, 0x33, 0x21, 0x12, 0x46, + 0x67, 0x89, 0x9A, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFD, 0xCA, 0x98, 0x87, 0x76, 0x54, 0x21, 0x11, 0x45, + 0x78, 0x8A, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xAA, 0x99, 0x76, 0x32, 0x01, 0x46, + 0x78, 0x9A, 0xAB, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xE9, 0x89, 0x76, 0x52, 0x01, 0x35, + 0x68, 0x98, 0x9A, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xAD, 0xCB, 0xA9, 0x74, 0x10, 0x46, 0x89, 0x9A, 0xA9, 0x98, 0x77, 0x76, + 0x66, 0x55, 0x55, 0x56, 0x66, 0x66, 0x78, 0x88, 0x8A, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAA, 0xAA, 0x87, 0x63, 0x10, 0x24, + 0x67, 0x89, 0xAF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x9A, 0x97, 0x64, 0x20, 0x13, + 0x67, 0x89, 0x9A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x87, 0x76, 0x43, 0x21, 0x12, + 0x34, 0x56, 0x67, 0x88, 0x89, 0xAE, 0xCF, 0xFD, 0xEF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAA, 0x87, 0x66, 0x54, 0x31, 0x12, + 0x33, 0x44, 0x55, 0x67, 0x77, 0x89, 0xAB, 0xAB, 0xCF, 0xC0, 0x00, 0x00, + }, + { + 0x58, 0x87, 0x87, 0x77, 0x76, 0x66, 0x55, 0x55, 0x44, 0x43, 0x32, 0x22, + 0x33, 0x44, 0x55, 0x56, 0x67, 0x77, 0x78, 0x88, 0x88, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x67, 0x76, 0x66, 0x76, 0x66, 0x55, 0x44, 0x44, 0x33, 0x22, 0x22, 0x34, + 0x56, 0x67, 0x77, 0x89, 0x88, 0x99, 0xAB, 0x9A, 0xAB, 0x70, 0x00, 0x00, + }, + { + 0x9B, 0xA9, 0x88, 0x88, 0x87, 0x77, 0x65, 0x54, 0x43, 0x21, 0x12, 0x45, + 0x67, 0x9A, 0x9A, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFC, 0xCB, 0xBA, 0xAA, 0x98, 0x87, 0x65, 0x31, 0x02, 0x56, + 0x89, 0xAB, 0xCB, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xAA, 0x9A, 0x98, 0x76, 0x42, 0x01, 0x36, + 0x79, 0xAF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x78, 0xA9, 0x98, 0x76, 0x52, 0x01, 0x35, + 0x78, 0x8E, 0xCB, 0xBF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0x8C, 0xBA, 0x99, 0x74, 0x10, 0x36, 0x89, 0x9A, 0xA9, 0x99, 0x88, 0x87, + 0x76, 0x66, 0x66, 0x66, 0x66, 0x56, 0x66, 0x78, 0x89, 0xC0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x8A, 0xA9, 0x88, 0x63, 0x10, 0x24, + 0x67, 0x8B, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x99, 0x76, 0x54, 0x10, 0x24, + 0x56, 0x78, 0x9A, 0xAA, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD9, 0x87, 0x54, 0x20, 0x22, + 0x45, 0x67, 0x77, 0x89, 0xAC, 0xAB, 0xFB, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAD, 0xAB, 0x86, 0x54, 0x21, 0x12, + 0x34, 0x45, 0x66, 0x77, 0x67, 0x77, 0x88, 0x99, 0x9A, 0x90, 0x00, 0x00, + }, + { + 0x57, 0x77, 0x76, 0x66, 0x65, 0x55, 0x55, 0x55, 0x54, 0x43, 0x32, 0x23, + 0x33, 0x44, 0x55, 0x55, 0x66, 0x67, 0x88, 0x77, 0x77, 0x50, 0x00, 0x00, + }, + }, + { + { + 0x35, 0x44, 0x45, 0x55, 0x54, 0x44, 0x44, 0x43, 0x33, 0x33, 0x23, 0x44, + 0x68, 0x99, 0xAA, 0xAA, 0xCB, 0xAB, 0xAF, 0xFE, 0xEB, 0xE0, 0x00, 0x00, + }, + { + 0x77, 0x66, 0x67, 0x66, 0x66, 0x66, 0x54, 0x44, 0x33, 0x22, 0x12, 0x45, + 0x68, 0xAA, 0xBE, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xEA, 0x98, 0x88, 0x87, 0x77, 0x65, 0x55, 0x44, 0x32, 0x02, 0x46, + 0x78, 0x89, 0xAA, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xAB, 0x99, 0x76, 0x65, 0x42, 0x01, 0x45, + 0x78, 0xAA, 0xAD, 0xAC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xEB, 0xBA, 0xA9, 0x86, 0x42, 0x01, 0x36, + 0x77, 0x8A, 0xBB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0x98, 0x74, 0x10, 0x36, 0x77, 0x89, 0x99, 0x99, 0x88, 0x77, + 0x76, 0x66, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAA, 0xAB, 0xC0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xC9, 0x99, 0x99, 0x88, 0x64, 0x10, 0x24, + 0x55, 0x68, 0x89, 0xBB, 0xAD, 0xBF, 0xBF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x97, 0x65, 0x65, 0x54, 0x20, 0x23, + 0x45, 0x56, 0x77, 0x77, 0x8E, 0xCB, 0xBE, 0xDF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x76, 0x53, 0x21, 0x13, + 0x34, 0x55, 0x45, 0x55, 0x67, 0x79, 0xAB, 0xFA, 0xFB, 0xA0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFE, 0x87, 0x54, 0x21, 0x23, + 0x33, 0x44, 0x55, 0x55, 0x44, 0x45, 0x57, 0x8A, 0xAA, 0x80, 0x00, 0x00, + }, + { + 0x79, 0x99, 0x99, 0x97, 0x77, 0x76, 0x54, 0x44, 0x44, 0x44, 0x32, 0x33, + 0x33, 0x33, 0x44, 0x45, 0x56, 0x67, 0x88, 0x77, 0x78, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x34, 0x54, 0x45, 0x55, 0x54, 0x44, 0x44, 0x33, 0x32, 0x43, 0x34, 0x44, + 0x56, 0x77, 0xBB, 0xB6, 0xCC, 0xCC, 0xCC, 0xC8, 0xCB, 0x70, 0x00, 0x00, + }, + { + 0x7E, 0x67, 0x55, 0x65, 0x44, 0x55, 0x44, 0x33, 0x22, 0x23, 0x23, 0x57, + 0x98, 0xDD, 0xDD, 0xDE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0x97, 0x75, 0x54, 0x43, 0x33, 0x33, 0x32, 0x12, 0x58, + 0x88, 0xEE, 0xAE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x88, 0x87, 0x66, 0x53, 0x22, 0x02, 0x57, + 0x9D, 0xFF, 0xFF, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA9, 0x78, 0x76, 0x42, 0x01, 0x36, + 0x99, 0x9A, 0xFF, 0xDF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xAB, 0xAA, 0xA8, 0x75, 0x10, 0x26, 0x79, 0x88, 0x77, 0x77, 0x66, 0x66, + 0x57, 0x78, 0x88, 0x89, 0x98, 0x9A, 0xBB, 0xBB, 0xDD, 0xC0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFE, 0xA8, 0x78, 0x76, 0x54, 0x20, 0x22, + 0x45, 0x6E, 0x8E, 0xEF, 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFA, 0xE7, 0x66, 0x64, 0x20, 0x23, + 0x34, 0x56, 0x78, 0x88, 0xAF, 0xFC, 0xFF, 0xFF, 0xAF, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xED, 0xDE, 0xED, 0x8D, 0xDD, 0xD9, 0xE6, 0x63, 0x21, 0x23, + 0x43, 0x34, 0x35, 0x55, 0x65, 0x47, 0xEE, 0xED, 0xED, 0xE0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xDC, 0xCD, 0xDD, 0xCC, 0xCC, 0xCD, 0xDD, 0x76, 0x43, 0x44, + 0x44, 0x43, 0x34, 0x33, 0x22, 0x33, 0x35, 0xD8, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0x6B, 0x77, 0xBB, 0xB6, 0x96, 0x55, 0x55, 0x54, 0x44, 0x44, 0x33, 0x43, + 0x33, 0x33, 0x45, 0x34, 0x44, 0x68, 0x57, 0x78, 0x86, 0x50, 0x00, 0x00, + }, + }, + { + { + 0x4A, 0xAA, 0xAA, 0x9A, 0x44, 0x44, 0x45, 0x23, 0x24, 0x22, 0xA3, 0x3A, + 0x44, 0x99, 0x99, 0x9A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0x45, 0x34, 0x94, 0x4A, 0x4A, 0x32, 0x23, 0x32, 0x24, 0x4A, 0xAA, + 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xAA, 0xAA, 0x4A, 0xA4, 0x44, 0x21, 0x43, 0x32, 0x23, 0x5A, + 0xAA, 0xAA, 0x99, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x7D, 0x8D, 0x74, 0x21, 0x11, 0x35, 0x7D, + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0xFE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE9, 0x64, 0x32, 0x01, 0x57, + 0xE8, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xE9, 0x55, 0x10, 0x27, 0x98, 0x65, 0x48, 0xAE, 0x99, 0x88, + 0x77, 0x87, 0x79, 0x89, 0xEA, 0xEE, 0xAE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB6, 0x45, 0x11, 0x13, + 0x44, 0x3B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xC0, 0x00, 0x00, + }, + { + 0xBB, 0xAB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x5A, 0x31, 0x12, + 0x23, 0x34, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xB0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xBB, 0xAB, 0xBB, 0xBB, 0xAA, 0xAB, 0xBB, 0xBB, 0xB5, 0x55, + 0x64, 0x22, 0x24, 0x55, 0x32, 0x14, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xA9, 0x9A, 0xAA, 0xA9, 0x99, 0x9A, 0x4A, 0xAA, 0xA3, 0x33, + 0x32, 0x34, 0x35, 0x44, 0x42, 0x24, 0xA4, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x9A, 0xA9, 0x54, 0x94, 0x95, 0x44, 0x53, 0x34, 0x53, + 0x23, 0x34, 0x34, 0x45, 0x33, 0x4A, 0x99, 0x99, 0xA9, 0xA0, 0x00, 0x00, + }, + }, + }, + { + { + { + 0x57, 0xAB, 0x66, 0x52, 0x12, 0x44, 0x45, 0x43, 0x33, 0x45, 0x77, 0xA6, + 0x77, 0xA7, 0xA7, 0x65, 0x77, 0xBB, 0xB7, 0xBB, 0x7B, 0xB0, 0x00, 0x00, + }, + { + 0xBB, 0x5B, 0xBB, 0x5B, 0xBB, 0x21, 0x22, 0x45, 0x62, 0x26, 0x56, 0xBB, + 0xBB, 0xBA, 0xAA, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xAA, 0x3A, 0x99, 0x93, 0x19, 0x99, 0x99, 0x99, 0x99, 0x24, 0x19, 0x33, + 0x99, 0x93, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xA0, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x66, 0x67, 0x76, 0x66, 0x66, 0x67, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x10, 0x77, 0x76, 0x77, 0x77, 0x77, 0x70, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x66, 0x67, 0x76, 0x66, 0x66, 0x67, 0x77, 0x66, 0x66, 0x66, + 0x61, 0x66, 0x66, 0x67, 0x07, 0x76, 0x77, 0x77, 0x77, 0x70, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xD6, 0xCD, 0xDD, 0xD9, 0x88, 0xC9, 0x64, 0x76, 0x34, 0x42, + 0x12, 0x54, 0x53, 0x34, 0x54, 0x56, 0x66, 0x79, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0x88, 0x78, 0x77, 0x78, 0x77, 0x77, 0x77, 0x78, 0x87, 0x07, 0x77, 0x77, + 0x21, 0x77, 0x77, 0x78, 0x88, 0x87, 0x87, 0x88, 0x88, 0x80, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x9A, 0x99, 0x99, 0x99, 0x9A, 0x99, 0x01, 0x99, 0x99, + 0x43, 0x99, 0x34, 0x99, 0x94, 0x99, 0x99, 0x99, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x88, 0x88, 0x88, 0x89, 0x88, 0x82, 0x88, 0x21, + 0x82, 0x82, 0x83, 0x88, 0x82, 0x88, 0x88, 0x88, 0x99, 0x90, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xDD, 0xCD, 0xDD, 0xDD, 0xCC, 0xCD, 0xDD, 0xDD, 0xD6, 0x74, + 0x56, 0x64, 0x20, 0x54, 0x42, 0x38, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0x79, 0x87, 0x96, 0x76, 0x76, 0x55, 0x66, 0x44, 0x55, 0x44, 0x55, 0x32, + 0x24, 0x88, 0x62, 0x55, 0x45, 0x43, 0x47, 0x66, 0x76, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x57, 0x66, 0x65, 0x54, 0x43, 0x34, 0x33, 0x33, 0x33, 0x33, 0x44, 0x45, + 0x55, 0x66, 0x77, 0x77, 0x77, 0x77, 0x98, 0x88, 0x79, 0x60, 0x00, 0x00, + }, + { + 0x88, 0x98, 0x8D, 0x65, 0x66, 0x32, 0x33, 0x22, 0x23, 0x33, 0x45, 0x67, + 0x78, 0x68, 0x8D, 0xCD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0x8D, 0xCD, 0xDC, 0xC5, 0x56, 0x46, 0x45, 0x54, 0x22, 0x22, 0x22, 0x45, + 0x57, 0x6C, 0xCC, 0xCD, 0xDD, 0xDD, 0xDD, 0xDC, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0xCC, 0xCC, 0xCB, 0xBC, 0xCC, 0xC7, 0xB5, 0x54, 0x12, 0x33, 0x22, 0x25, + 0x56, 0xB6, 0x7B, 0xB7, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xBB, 0xAB, 0xBA, 0xAB, 0xBB, 0xA5, 0xA5, 0x55, 0x21, 0x2B, 0x33, 0x23, + 0x44, 0x55, 0xA6, 0x5B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xAC, 0xAB, 0xC6, 0x66, 0x87, 0x87, 0x77, 0x98, 0x66, 0x54, 0x43, 0x43, + 0x33, 0x32, 0x33, 0x33, 0x44, 0x45, 0x66, 0x68, 0x79, 0xA0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xBB, 0xAB, 0xBB, 0xBB, 0xBA, 0x4B, 0x43, 0x22, 0x22, 0x32, + 0x44, 0x34, 0xA5, 0xA6, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xBB, 0xAB, 0xAA, 0xAB, 0xBA, 0xAA, 0xA6, 0x65, 0x54, 0x43, 0x21, 0x23, + 0x34, 0x34, 0x55, 0x56, 0x6B, 0xBB, 0xB6, 0xBA, 0xBA, 0xB0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xDC, 0xCD, 0xDD, 0xCC, 0xCC, 0xC6, 0x66, 0x44, 0x43, 0x32, + 0x21, 0x25, 0x65, 0x46, 0x54, 0x8D, 0xDD, 0xDC, 0xD7, 0xC0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0xEF, 0xEE, 0xEE, 0xEE, 0x9A, 0xF7, 0x66, 0x55, 0x43, + 0x33, 0x22, 0x22, 0x33, 0x34, 0x78, 0x98, 0xEE, 0xFE, 0x90, 0x00, 0x00, + }, + { + 0x57, 0x67, 0x66, 0x76, 0x65, 0x55, 0x44, 0x54, 0x44, 0x43, 0x43, 0x34, + 0x43, 0x44, 0x44, 0x44, 0x45, 0x45, 0x55, 0x67, 0x77, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x78, 0x88, 0x76, 0x66, 0x55, 0x54, 0x44, 0x33, 0x22, 0x23, 0x33, 0x44, + 0x55, 0x67, 0x67, 0x78, 0x98, 0x98, 0x99, 0x9A, 0xA9, 0x90, 0x00, 0x00, + }, + { + 0x99, 0xAA, 0xAB, 0x97, 0x65, 0x55, 0x44, 0x32, 0x22, 0x22, 0x33, 0x45, + 0x67, 0x89, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFC, 0xBB, 0xA8, 0x88, 0x77, 0x76, 0x54, 0x32, 0x11, 0x23, 0x46, + 0x77, 0x8A, 0xF8, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xED, 0xDE, 0xE9, 0xDD, 0x77, 0x65, 0x43, 0x21, 0x12, 0x34, + 0x57, 0x7D, 0x78, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xE7, 0x7D, 0x96, 0x54, 0x22, 0x11, 0x24, + 0x56, 0x87, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0xCB, 0xAA, 0x97, 0x65, 0x44, 0x45, 0x77, 0x76, 0x66, 0x55, 0x44, 0x33, + 0x33, 0x33, 0x33, 0x33, 0x44, 0x55, 0x68, 0x99, 0x9A, 0xC0, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xDD, 0x7D, 0xDD, 0xDC, 0xCC, 0x66, 0x66, 0x43, 0x11, 0x22, + 0x34, 0x56, 0x8C, 0xCD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xFE, 0xEF, 0xFF, 0xEE, 0xE9, 0x88, 0x76, 0x54, 0x31, 0x11, + 0x34, 0x57, 0x77, 0x8F, 0xAF, 0xFF, 0xFF, 0xFE, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFE, 0xEE, 0xEE, 0xEA, 0xAE, 0xEE, 0xA9, 0xE9, 0x87, 0x65, 0x43, 0x11, + 0x22, 0x35, 0x56, 0x66, 0x88, 0x9A, 0xEE, 0xEA, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, 0xFB, 0xEA, 0x98, 0x76, 0x55, 0x43, 0x22, + 0x22, 0x33, 0x33, 0x44, 0x46, 0x78, 0xAA, 0xFF, 0xFB, 0xB0, 0x00, 0x00, + }, + { + 0x79, 0x99, 0x77, 0x77, 0x66, 0x55, 0x54, 0x44, 0x43, 0x43, 0x33, 0x33, + 0x33, 0x34, 0x44, 0x55, 0x55, 0x66, 0x66, 0x79, 0x99, 0x80, 0x00, 0x00, + }, + }, + { + { + 0x68, 0x87, 0x77, 0x66, 0x55, 0x55, 0x54, 0x43, 0x32, 0x22, 0x33, 0x34, + 0x45, 0x66, 0x77, 0x78, 0x88, 0x89, 0x98, 0x88, 0x88, 0x60, 0x00, 0x00, + }, + { + 0xAA, 0xAB, 0xAB, 0xA9, 0x88, 0x66, 0x65, 0x43, 0x22, 0x21, 0x23, 0x46, + 0x78, 0xA9, 0xBF, 0xEF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFD, 0xFF, 0xFF, 0xBC, 0x99, 0x98, 0x76, 0x65, 0x42, 0x21, 0x12, 0x46, + 0x67, 0x99, 0xFF, 0xEF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFA, 0xB9, 0x87, 0x65, 0x31, 0x02, 0x56, + 0x79, 0x9A, 0xAF, 0xEA, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0x9B, 0xAE, 0xBE, 0x9B, 0xBB, 0xAB, 0xAA, 0x98, 0x76, 0x52, 0x01, 0x35, + 0x88, 0x99, 0x9A, 0xAC, 0xBA, 0xBB, 0xEA, 0xBA, 0xEA, 0xB0, 0x00, 0x00, + }, + { + 0xCC, 0xBC, 0xA7, 0x65, 0x21, 0x46, 0x88, 0x87, 0x77, 0x65, 0x44, 0x44, + 0x43, 0x33, 0x44, 0x45, 0x55, 0x56, 0x78, 0x9A, 0x9B, 0xC0, 0x00, 0x00, + }, + { + 0x9E, 0x9E, 0xA9, 0xAB, 0xAA, 0xA9, 0x9D, 0x99, 0x87, 0x65, 0x10, 0x23, + 0x68, 0x88, 0x98, 0x9A, 0xA9, 0xAA, 0xDA, 0xAD, 0xAA, 0x90, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFC, 0xBB, 0xA9, 0xA7, 0x65, 0x30, 0x12, + 0x56, 0x78, 0x9A, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xBA, 0x98, 0x76, 0x41, 0x11, + 0x24, 0x47, 0x77, 0x89, 0xBB, 0xED, 0xCF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xCF, 0xFF, 0xEF, 0xCF, 0xCE, 0x9B, 0xA9, 0x87, 0x65, 0x42, 0x11, + 0x23, 0x44, 0x55, 0x66, 0x67, 0x9A, 0xAB, 0xCF, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0x68, 0x78, 0x77, 0x76, 0x66, 0x55, 0x55, 0x54, 0x44, 0x33, 0x33, 0x32, + 0x33, 0x34, 0x55, 0x55, 0x66, 0x66, 0x77, 0x77, 0x88, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x68, 0x77, 0x76, 0x66, 0x55, 0x55, 0x54, 0x44, 0x32, 0x22, 0x33, 0x34, + 0x55, 0x56, 0x66, 0x66, 0x67, 0x78, 0x88, 0x99, 0x99, 0x50, 0x00, 0x00, + }, + { + 0xCB, 0xCA, 0xAA, 0xA9, 0x97, 0x77, 0x66, 0x54, 0x32, 0x21, 0x13, 0x46, + 0x79, 0xAA, 0xAB, 0xBF, 0xCD, 0xFD, 0xCF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFC, 0xFF, 0xBB, 0xA9, 0xA8, 0x87, 0x65, 0x31, 0x02, 0x56, + 0x89, 0xAB, 0xBB, 0xBB, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFB, 0xFF, 0xCD, 0xCF, 0x99, 0x87, 0x65, 0x42, 0x01, 0x45, + 0x67, 0x9A, 0xBB, 0xAF, 0xBD, 0xBF, 0xFC, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xF9, 0xA8, 0x86, 0x42, 0x01, 0x36, + 0x78, 0x8A, 0xBF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x00, 0x00, + }, + { + 0xCF, 0xDB, 0xBA, 0x85, 0x10, 0x47, 0x89, 0x99, 0x99, 0x87, 0x66, 0x65, + 0x55, 0x55, 0x55, 0x56, 0x66, 0x77, 0x89, 0xAC, 0xCE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xBF, 0xBB, 0xFF, 0x98, 0x63, 0x10, 0x24, + 0x59, 0x99, 0xBF, 0xFB, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xBB, 0xAF, 0x97, 0x65, 0x20, 0x13, + 0x56, 0x78, 0x99, 0xAB, 0xFD, 0xAF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xBB, 0xAA, 0x97, 0x65, 0x30, 0x13, + 0x44, 0x56, 0x88, 0x89, 0xA9, 0xBF, 0xFF, 0xCF, 0xFC, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFD, 0xFF, 0xFA, 0xBA, 0xBA, 0xB9, 0x87, 0x65, 0x32, 0x11, + 0x23, 0x45, 0x56, 0x67, 0x77, 0x9A, 0xBA, 0xBF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0x57, 0x78, 0x77, 0x66, 0x66, 0x55, 0x55, 0x44, 0x44, 0x43, 0x33, 0x23, + 0x33, 0x44, 0x45, 0x55, 0x56, 0x66, 0x66, 0x77, 0x78, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x68, 0x87, 0x87, 0x77, 0x66, 0x55, 0x54, 0x44, 0x32, 0x22, 0x23, 0x44, + 0x45, 0x56, 0x66, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x50, 0x00, 0x00, + }, + { + 0x9A, 0xB9, 0xA9, 0xA8, 0x87, 0x76, 0x65, 0x54, 0x43, 0x21, 0x12, 0x45, + 0x68, 0x88, 0xAA, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFC, 0xCF, 0xBA, 0x98, 0x77, 0x65, 0x31, 0x02, 0x56, + 0x89, 0xAC, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x87, 0x76, 0x42, 0x01, 0x36, + 0x89, 0xAA, 0xBD, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xBF, 0xFF, 0xEF, 0xBF, 0xAC, 0x99, 0x87, 0x42, 0x01, 0x35, + 0x79, 0xAA, 0xBB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xCD, 0xCC, 0xB9, 0x74, 0x10, 0x46, 0x8A, 0xA9, 0x99, 0x98, 0x77, 0x66, + 0x66, 0x55, 0x55, 0x55, 0x66, 0x67, 0x89, 0x9A, 0xAB, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xDA, 0xA8, 0x53, 0x10, 0x24, + 0x68, 0x9A, 0xAE, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFB, 0x98, 0x74, 0x10, 0x23, + 0x57, 0x89, 0xAB, 0xBC, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xBA, 0x98, 0x65, 0x20, 0x13, + 0x56, 0x78, 0x89, 0x9A, 0xAC, 0xEF, 0xFB, 0xFF, 0xDF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x99, 0x86, 0x54, 0x21, 0x12, + 0x34, 0x45, 0x56, 0x67, 0x67, 0x99, 0xAB, 0xEB, 0xFF, 0xB0, 0x00, 0x00, + }, + { + 0x57, 0x87, 0x77, 0x77, 0x66, 0x66, 0x65, 0x55, 0x44, 0x43, 0x32, 0x22, + 0x33, 0x44, 0x55, 0x56, 0x67, 0x77, 0x77, 0x88, 0x99, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x78, 0x88, 0x88, 0x77, 0x76, 0x65, 0x54, 0x44, 0x33, 0x32, 0x12, 0x34, + 0x46, 0x78, 0x99, 0x9A, 0xBA, 0xAC, 0xAB, 0xCB, 0xAA, 0x90, 0x00, 0x00, + }, + { + 0x9A, 0x98, 0x88, 0x98, 0x87, 0x77, 0x65, 0x54, 0x43, 0x21, 0x12, 0x45, + 0x67, 0x8B, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xBD, 0xA9, 0x99, 0x87, 0x77, 0x55, 0x41, 0x02, 0x46, + 0x79, 0xAB, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFE, 0xFF, 0xFF, 0xDB, 0x9A, 0xBA, 0x98, 0x76, 0x42, 0x01, 0x36, + 0x79, 0xBB, 0xCB, 0xFC, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFA, 0x9A, 0xAA, 0x87, 0x42, 0x01, 0x35, + 0x78, 0xDA, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xBC, 0xCC, 0xA9, 0x74, 0x10, 0x36, 0x8A, 0xAA, 0xA9, 0x99, 0x88, 0x77, + 0x76, 0x66, 0x65, 0x66, 0x55, 0x66, 0x78, 0x88, 0xAB, 0xC0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xAA, 0x97, 0x63, 0x10, 0x24, + 0x67, 0x88, 0x9B, 0xFD, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFC, 0xBB, 0x97, 0x64, 0x10, 0x23, + 0x67, 0x88, 0xAA, 0xAB, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xBD, 0xA7, 0x64, 0x20, 0x14, + 0x55, 0x77, 0x78, 0x8A, 0xAA, 0xAB, 0xFD, 0xCC, 0xBF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x76, 0x54, 0x21, 0x12, + 0x34, 0x45, 0x56, 0x67, 0x77, 0x8A, 0xAA, 0x99, 0xBA, 0x90, 0x00, 0x00, + }, + { + 0x68, 0x88, 0x77, 0x66, 0x66, 0x55, 0x55, 0x55, 0x54, 0x43, 0x22, 0x23, + 0x34, 0x44, 0x44, 0x56, 0x77, 0x77, 0x78, 0x99, 0x99, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x45, 0x56, 0x66, 0x65, 0x55, 0x54, 0x44, 0x44, 0x44, 0x42, 0x12, 0x35, + 0x68, 0x8E, 0x9A, 0xBC, 0xEB, 0xBB, 0xEB, 0xBB, 0xBE, 0xB0, 0x00, 0x00, + }, + { + 0x87, 0x77, 0x76, 0x76, 0x66, 0x66, 0x55, 0x54, 0x43, 0x31, 0x12, 0x45, + 0x56, 0xA9, 0xEE, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xAF, 0x98, 0x97, 0x78, 0x75, 0x55, 0x44, 0x32, 0x02, 0x45, + 0x68, 0x8E, 0x9C, 0xEF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBA, 0x98, 0x77, 0x65, 0x42, 0x01, 0x45, + 0x69, 0x9C, 0x9B, 0xDF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xCA, 0xAA, 0xA8, 0x76, 0x52, 0x01, 0x35, + 0x67, 0x8A, 0xEA, 0xBF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xA9, 0xAB, 0x98, 0x74, 0x10, 0x36, 0x89, 0x99, 0x99, 0x88, 0x87, 0x87, + 0x76, 0x66, 0x66, 0x55, 0x56, 0x67, 0x79, 0x9B, 0x9B, 0xB0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB8, 0x88, 0x87, 0x54, 0x10, 0x24, + 0x56, 0x77, 0x89, 0xBF, 0xFF, 0xEC, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xDC, 0xFF, 0xFB, 0xDB, 0xB9, 0x86, 0x53, 0x20, 0x23, + 0x44, 0x56, 0x88, 0x78, 0xAA, 0xFF, 0xAB, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBF, 0xFA, 0x97, 0x64, 0x20, 0x23, + 0x44, 0x55, 0x56, 0x67, 0x77, 0x89, 0x9B, 0xB9, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xD9, 0x75, 0x43, 0x21, 0x23, + 0x34, 0x44, 0x44, 0x55, 0x55, 0x66, 0x66, 0x78, 0x8A, 0x80, 0x00, 0x00, + }, + { + 0x79, 0x89, 0x98, 0x88, 0x77, 0x77, 0x54, 0x44, 0x44, 0x43, 0x22, 0x33, + 0x33, 0x44, 0x45, 0x45, 0x66, 0x68, 0x77, 0x98, 0x88, 0x60, 0x00, 0x00, + }, + }, + { + { + 0x25, 0x45, 0x57, 0x45, 0x45, 0x55, 0x43, 0x33, 0x33, 0x33, 0x34, 0x44, + 0x55, 0xBB, 0xBB, 0x6B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0x86, 0x76, 0x75, 0x55, 0x55, 0x65, 0x74, 0x44, 0x33, 0x32, 0x12, 0x35, + 0x6C, 0xCC, 0xCC, 0xCD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0x8E, 0x76, 0x55, 0x43, 0x44, 0x32, 0x32, 0x12, 0x46, + 0x87, 0x99, 0x9D, 0xDE, 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xA9, 0x96, 0x55, 0x43, 0x32, 0x02, 0x45, + 0x88, 0xEE, 0xE9, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xAF, 0x89, 0x66, 0x42, 0x01, 0x36, + 0xD9, 0x8A, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xAA, 0xEA, 0xF9, 0x74, 0x10, 0x35, 0x79, 0x98, 0x87, 0x66, 0x66, 0x55, + 0x56, 0x67, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xFC, 0xEE, 0xB0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xE9, 0x97, 0xF7, 0x65, 0x20, 0x13, + 0x56, 0x79, 0xEA, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xED, 0xDE, 0xEE, 0xED, 0xDD, 0xDE, 0x75, 0x63, 0x11, 0x22, + 0x34, 0x45, 0x67, 0x78, 0x9E, 0xEE, 0xEE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0xDE, 0xED, 0xD8, 0xDD, 0xDE, 0x87, 0x54, 0x20, 0x23, + 0x46, 0x46, 0x56, 0x67, 0x76, 0x79, 0x8E, 0xED, 0xED, 0xE0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0xDE, 0xDD, 0xDD, 0xDD, 0xD9, 0x98, 0x54, 0x32, 0x23, + 0x45, 0x44, 0x34, 0x43, 0x23, 0x66, 0x36, 0xD8, 0xDD, 0x90, 0x00, 0x00, + }, + { + 0x7B, 0x7B, 0xA7, 0x77, 0x6A, 0x57, 0x56, 0x55, 0x45, 0x43, 0x33, 0x33, + 0x33, 0x33, 0x44, 0x43, 0x35, 0xBB, 0xBA, 0xAA, 0xB7, 0x50, 0x00, 0x00, + }, + }, + { + { + 0x24, 0xA3, 0x44, 0x44, 0xAA, 0x49, 0x34, 0x43, 0x24, 0x42, 0x35, 0xA9, + 0x99, 0x49, 0x99, 0x9A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0x99, 0x39, 0x94, 0x94, 0x39, 0x43, 0x92, 0x33, 0x29, 0x22, 0x39, 0x99, + 0x99, 0x99, 0x88, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x90, 0x00, 0x00, + }, + { + 0x99, 0x99, 0x99, 0x99, 0x49, 0x49, 0x33, 0x34, 0x33, 0x21, 0x23, 0x99, + 0x99, 0x99, 0x98, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x90, 0x00, 0x00, + }, + { + 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC6, 0x32, 0x21, 0x12, 0x45, + 0xC7, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xD0, 0x00, 0x00, + }, + { + 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD7, 0xDD, 0x75, 0x42, 0x01, 0x38, + 0xDD, 0x7D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xCC, 0x8C, 0x87, 0x64, 0x10, 0x37, 0x86, 0x66, 0x67, 0x69, 0x78, 0x77, + 0x76, 0x66, 0x66, 0x67, 0x68, 0x77, 0x88, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xBB, 0xAB, 0xAA, 0xAB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA4, 0x20, 0x22, + 0x44, 0xA5, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBA, 0xB0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x4B, 0x33, 0x03, + 0x23, 0x46, 0x4B, 0x5B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xBB, 0xAB, 0xBB, 0xBB, 0xAA, 0xAB, 0xBB, 0xBB, 0xB2, 0x43, + 0x44, 0x32, 0x13, 0x46, 0x34, 0x35, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA9, 0x9A, 0xAA, 0xAA, 0xA4, 0x23, + 0x32, 0xA5, 0x32, 0xA2, 0x24, 0xA3, 0xAA, 0x4A, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xA9, 0x59, 0x99, 0x99, 0x99, 0x54, 0x49, 0x45, 0x55, 0x45, 0x43, 0x39, + 0x52, 0x33, 0x43, 0x44, 0x25, 0x59, 0x59, 0x99, 0x59, 0xA0, 0x00, 0x00, + }, + }, + }, + { + { + { + 0x58, 0x76, 0x5B, 0x53, 0x21, 0x25, 0x54, 0x43, 0x33, 0x48, 0x88, 0x56, + 0x67, 0x6B, 0x87, 0xBC, 0x7C, 0x8C, 0xCC, 0xCC, 0x8C, 0xB0, 0x00, 0x00, + }, + { + 0xCC, 0xCC, 0x6C, 0x4C, 0xCC, 0x12, 0x12, 0x45, 0x53, 0x35, 0x7C, 0xCC, + 0xCC, 0xCC, 0xBB, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xA4, 0xA1, 0x44, 0x55, 0xA9, 0x9A, 0xAA, 0xA2, 0x22, 0x24, + 0xA5, 0xA4, 0x49, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0x99, 0x88, 0x33, 0x88, 0x88, 0x88, 0x88, 0x28, 0x88, 0x88, 0x88, 0x21, + 0x33, 0x88, 0x83, 0x82, 0x88, 0x88, 0x88, 0x88, 0x89, 0x90, 0x00, 0x00, + }, + { + 0x66, 0x56, 0x55, 0x56, 0x65, 0x55, 0x55, 0x56, 0x06, 0x65, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x60, 0x00, 0x00, + }, + { + 0xEE, 0x9D, 0xA6, 0x9D, 0xDA, 0xD9, 0x97, 0x55, 0x42, 0x64, 0x43, 0x32, + 0x24, 0x44, 0x33, 0x44, 0x66, 0x55, 0x58, 0x7D, 0xDD, 0xA0, 0x00, 0x00, + }, + { + 0x88, 0x78, 0x77, 0x78, 0x77, 0x77, 0x77, 0x78, 0x82, 0x07, 0x77, 0x77, + 0x72, 0x27, 0x77, 0x78, 0x87, 0x77, 0x87, 0x88, 0x88, 0x80, 0x00, 0x00, + }, + { + 0xBB, 0xAB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0x44, 0x01, 0x3A, 0xAA, + 0x4A, 0x4A, 0x45, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xB0, 0x00, 0x00, + }, + { + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x89, 0x99, 0x92, 0x39, 0x21, + 0x49, 0x43, 0x33, 0x99, 0x34, 0x39, 0x99, 0x99, 0x99, 0x90, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xED, 0xDE, 0xEE, 0xED, 0xDD, 0xDE, 0xEE, 0xEE, 0x97, 0x75, + 0x55, 0x75, 0x20, 0x34, 0x63, 0x26, 0x8E, 0xEE, 0xEE, 0xE0, 0x00, 0x00, + }, + { + 0x69, 0xB8, 0x77, 0x8B, 0x85, 0x56, 0x55, 0x44, 0x65, 0x44, 0x33, 0x32, + 0x23, 0x67, 0xA4, 0x74, 0x45, 0x44, 0x45, 0x68, 0x86, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x67, 0x76, 0x66, 0x54, 0x43, 0x43, 0x33, 0x33, 0x33, 0x33, 0x44, 0x44, + 0x55, 0x66, 0x67, 0x67, 0x77, 0x77, 0x89, 0x89, 0x99, 0x60, 0x00, 0x00, + }, + { + 0xA9, 0x99, 0x99, 0x66, 0x66, 0x43, 0x33, 0x22, 0x22, 0x33, 0x34, 0x57, + 0x78, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFE, 0xE9, 0xE9, 0x87, 0x65, 0x55, 0x44, 0x44, 0x32, 0x22, 0x22, 0x34, + 0x56, 0x79, 0x8E, 0xEA, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0xD8, 0xDD, 0x75, 0x54, 0x54, 0x33, 0x44, 0x31, 0x13, + 0x45, 0x66, 0x88, 0x89, 0x8E, 0xDD, 0xDD, 0xDD, 0xED, 0xE0, 0x00, 0x00, + }, + { + 0xCC, 0xBC, 0xBB, 0xBC, 0xCB, 0x75, 0x65, 0x45, 0x32, 0x24, 0x43, 0x12, + 0x46, 0x54, 0x77, 0xBC, 0xCC, 0xCC, 0xCB, 0xCB, 0xCB, 0xC0, 0x00, 0x00, + }, + { + 0xA9, 0x8B, 0x97, 0x56, 0x88, 0x76, 0x77, 0x66, 0x55, 0x44, 0x33, 0x33, + 0x33, 0x33, 0x33, 0x33, 0x45, 0x56, 0x67, 0x8A, 0xCA, 0xC0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xCC, 0xCD, 0xDC, 0xCC, 0x68, 0x55, 0x53, 0x21, 0x23, 0x33, + 0x33, 0x45, 0x77, 0x67, 0xDD, 0xDD, 0xDD, 0xDC, 0xDC, 0xD0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xDD, 0xDE, 0xE9, 0x8D, 0xD8, 0x67, 0x44, 0x32, 0x22, 0x22, + 0x33, 0x44, 0x46, 0x87, 0xEE, 0xEE, 0xEE, 0xDD, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0xEF, 0xFE, 0xEE, 0xE9, 0x78, 0x67, 0x54, 0x43, 0x22, + 0x12, 0x35, 0x53, 0x55, 0x56, 0x7A, 0xFE, 0xEE, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xFB, 0x87, 0x66, 0x54, 0x33, + 0x33, 0x22, 0x22, 0x33, 0x46, 0x67, 0x7A, 0xCF, 0xCF, 0xF0, 0x00, 0x00, + }, + { + 0x67, 0x77, 0x77, 0x66, 0x66, 0x55, 0x55, 0x44, 0x43, 0x44, 0x33, 0x34, + 0x43, 0x44, 0x43, 0x44, 0x44, 0x55, 0x66, 0x76, 0x88, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x78, 0x77, 0x76, 0x66, 0x55, 0x44, 0x44, 0x33, 0x33, 0x22, 0x33, 0x34, + 0x45, 0x67, 0x78, 0x88, 0x88, 0x99, 0x89, 0xA9, 0xA9, 0x70, 0x00, 0x00, + }, + { + 0xA9, 0x9B, 0x99, 0x87, 0x77, 0x54, 0x44, 0x33, 0x22, 0x22, 0x23, 0x45, + 0x67, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFD, 0xAA, 0x98, 0x87, 0x77, 0x65, 0x32, 0x11, 0x23, 0x44, + 0x57, 0x9A, 0xCE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x88, 0x77, 0x65, 0x54, 0x31, 0x11, 0x35, + 0x57, 0x88, 0x8F, 0xDF, 0xFC, 0x9F, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0xEF, 0xFE, 0x99, 0x87, 0x77, 0x54, 0x22, 0x11, 0x24, + 0x66, 0x77, 0x78, 0xEA, 0xF9, 0xFF, 0xEE, 0xEE, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xAB, 0xAA, 0x97, 0x65, 0x44, 0x45, 0x66, 0x65, 0x54, 0x44, 0x43, 0x33, + 0x33, 0x33, 0x33, 0x44, 0x55, 0x66, 0x78, 0x8B, 0xAB, 0xB0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xED, 0xDE, 0x98, 0x8D, 0xDD, 0x67, 0x66, 0x43, 0x11, 0x22, + 0x34, 0x57, 0x77, 0x8E, 0xEE, 0xEE, 0xEE, 0xED, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFB, 0xFF, 0xBB, 0x98, 0x66, 0x54, 0x31, 0x11, + 0x34, 0x56, 0x98, 0xBF, 0xDC, 0xBF, 0xBF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xAA, 0x88, 0x66, 0x32, 0x11, + 0x23, 0x35, 0x66, 0x77, 0x99, 0xCE, 0xFE, 0xCD, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCA, 0xA9, 0x76, 0x54, 0x42, 0x22, + 0x22, 0x33, 0x34, 0x55, 0x56, 0x77, 0x9B, 0xBF, 0xFF, 0xC0, 0x00, 0x00, + }, + { + 0x69, 0x88, 0x77, 0x77, 0x76, 0x65, 0x55, 0x44, 0x43, 0x43, 0x33, 0x33, + 0x33, 0x34, 0x44, 0x44, 0x55, 0x67, 0x77, 0x88, 0x89, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x79, 0x98, 0x87, 0x77, 0x66, 0x55, 0x44, 0x43, 0x33, 0x22, 0x23, 0x33, + 0x45, 0x66, 0x77, 0x88, 0x89, 0x99, 0x9A, 0xA9, 0x99, 0x70, 0x00, 0x00, + }, + { + 0xBB, 0xFB, 0xBA, 0xA9, 0x98, 0x76, 0x65, 0x44, 0x32, 0x21, 0x22, 0x35, + 0x79, 0xAE, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xCF, 0xFA, 0xAA, 0x99, 0x88, 0x77, 0x65, 0x33, 0x21, 0x12, 0x44, + 0x57, 0x89, 0xAB, 0xBE, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xBF, 0xDB, 0xA9, 0x99, 0x86, 0x65, 0x41, 0x02, 0x45, + 0x78, 0x89, 0xCA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xA9, 0x98, 0x76, 0x52, 0x01, 0x35, + 0x68, 0x89, 0x9E, 0xEF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, + }, + { + 0xDB, 0xCA, 0x98, 0x75, 0x21, 0x46, 0x77, 0x76, 0x66, 0x54, 0x44, 0x44, + 0x33, 0x34, 0x44, 0x45, 0x66, 0x77, 0x89, 0xAC, 0xCB, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x98, 0x77, 0x65, 0x10, 0x23, + 0x56, 0x89, 0xAA, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0xCA, 0x87, 0x65, 0x30, 0x12, + 0x56, 0x78, 0xA9, 0xBA, 0xFD, 0xCF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, 0xAA, 0xA9, 0x97, 0x64, 0x31, 0x12, + 0x23, 0x45, 0x56, 0x78, 0xA9, 0xAC, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xCB, 0xA8, 0x65, 0x54, 0x32, 0x12, + 0x23, 0x34, 0x45, 0x56, 0x77, 0x88, 0xAC, 0xDF, 0xDF, 0xE0, 0x00, 0x00, + }, + { + 0x68, 0x98, 0x88, 0x77, 0x77, 0x66, 0x55, 0x54, 0x44, 0x43, 0x32, 0x22, + 0x33, 0x44, 0x55, 0x56, 0x66, 0x77, 0x78, 0x89, 0x99, 0x70, 0x00, 0x00, + }, + }, + { + { + 0x8A, 0xA9, 0x88, 0x87, 0x66, 0x65, 0x54, 0x43, 0x33, 0x22, 0x23, 0x33, + 0x45, 0x55, 0x67, 0x78, 0x88, 0x88, 0x88, 0x99, 0x99, 0x60, 0x00, 0x00, + }, + { + 0xCF, 0xBF, 0xCA, 0xAA, 0x98, 0x87, 0x76, 0x54, 0x33, 0x21, 0x12, 0x45, + 0x78, 0x8A, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xBE, 0xBA, 0x99, 0x77, 0x65, 0x31, 0x02, 0x56, + 0x89, 0x9B, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0x97, 0x76, 0x32, 0x01, 0x46, + 0x88, 0x9B, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFC, 0xA8, 0x97, 0x42, 0x01, 0x35, + 0x78, 0x9A, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xDC, 0xCB, 0xB9, 0x75, 0x10, 0x47, 0x89, 0x89, 0x88, 0x76, 0x66, 0x55, + 0x55, 0x55, 0x55, 0x66, 0x77, 0x78, 0x9A, 0xAC, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xCA, 0xA9, 0x87, 0x63, 0x10, 0x24, + 0x67, 0x8A, 0xCA, 0xFF, 0xFE, 0xCF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAA, 0x98, 0x74, 0x20, 0x13, + 0x57, 0x8A, 0x9E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xA9, 0x87, 0x65, 0x30, 0x13, + 0x44, 0x56, 0x78, 0x9A, 0xBE, 0xEF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x98, 0x65, 0x54, 0x31, 0x12, + 0x33, 0x44, 0x55, 0x67, 0x78, 0x9A, 0xAC, 0xFC, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0x68, 0x88, 0x87, 0x77, 0x77, 0x76, 0x55, 0x54, 0x44, 0x43, 0x32, 0x22, + 0x33, 0x44, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9A, 0xBB, 0x90, 0x00, 0x00, + }, + }, + { + { + 0x8A, 0x99, 0x88, 0x77, 0x76, 0x66, 0x55, 0x43, 0x33, 0x22, 0x22, 0x33, + 0x45, 0x67, 0x77, 0x88, 0x88, 0x99, 0xAA, 0x9A, 0xAA, 0x80, 0x00, 0x00, + }, + { + 0xBC, 0xAA, 0xAB, 0xA9, 0x98, 0x87, 0x66, 0x54, 0x33, 0x21, 0x12, 0x45, + 0x89, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xEF, 0xFC, 0xCC, 0xBA, 0x98, 0x87, 0x65, 0x31, 0x02, 0x56, + 0x79, 0xBB, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFD, 0xBA, 0x98, 0x76, 0x42, 0x01, 0x36, + 0x78, 0x9A, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xBB, 0xA9, 0x87, 0x42, 0x01, 0x35, + 0x78, 0xAB, 0xFB, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xDD, 0xEC, 0xC9, 0x74, 0x10, 0x47, 0x89, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x55, 0x55, 0x55, 0x56, 0x67, 0x78, 0x89, 0xBC, 0xCD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0x98, 0x63, 0x10, 0x24, + 0x58, 0x9A, 0xBF, 0xEF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDB, 0x97, 0x74, 0x10, 0x23, + 0x57, 0x9A, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xA8, 0x65, 0x20, 0x13, + 0x56, 0x77, 0x89, 0x9B, 0xCE, 0xCF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x9A, 0xAA, 0x76, 0x54, 0x21, 0x12, + 0x34, 0x45, 0x56, 0x66, 0x78, 0x99, 0xAF, 0xEC, 0xEF, 0xB0, 0x00, 0x00, + }, + { + 0x78, 0x88, 0x87, 0x77, 0x66, 0x66, 0x65, 0x55, 0x54, 0x43, 0x22, 0x22, + 0x33, 0x44, 0x55, 0x67, 0x77, 0x88, 0x98, 0x99, 0xAA, 0x80, 0x00, 0x00, + }, + }, + { + { + 0x67, 0x77, 0x86, 0x66, 0x66, 0x65, 0x54, 0x44, 0x33, 0x32, 0x12, 0x34, + 0x57, 0x99, 0xAC, 0x9A, 0xAC, 0xFB, 0xCF, 0xEE, 0xEB, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x66, 0x55, 0x43, 0x21, 0x12, 0x35, + 0x8A, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFA, 0xDA, 0x99, 0x98, 0x77, 0x76, 0x65, 0x53, 0x32, 0x02, 0x45, + 0x67, 0x9A, 0xCF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xCF, 0xFB, 0xBB, 0xE9, 0x87, 0x76, 0x42, 0x01, 0x36, + 0x89, 0xBB, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xA9, 0x76, 0x52, 0x01, 0x35, + 0x67, 0x8A, 0x9A, 0xC9, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xEC, 0xCC, 0xA9, 0x74, 0x10, 0x37, 0x88, 0x89, 0x99, 0x88, 0x87, 0x76, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x78, 0xAA, 0xFE, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xBA, 0x87, 0x64, 0x10, 0x24, + 0x46, 0x77, 0xAB, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCF, 0xFF, 0x88, 0x64, 0x10, 0x24, + 0x46, 0x78, 0x88, 0xAA, 0xBF, 0xCC, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, 0xA7, 0x65, 0x20, 0x14, + 0x55, 0x57, 0x77, 0x88, 0x9A, 0xAA, 0xBB, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF9, 0x97, 0x76, 0x53, 0x21, 0x13, + 0x34, 0x45, 0x55, 0x66, 0x66, 0x77, 0x88, 0xAA, 0xDC, 0xA0, 0x00, 0x00, + }, + { + 0x9D, 0xAC, 0xBA, 0x98, 0x88, 0x77, 0x65, 0x54, 0x54, 0x43, 0x21, 0x23, + 0x34, 0x45, 0x55, 0x66, 0x67, 0x79, 0x99, 0x9D, 0xBB, 0x80, 0x00, 0x00, + }, + }, + { + { + 0x47, 0x7C, 0x65, 0x45, 0x45, 0x45, 0x45, 0x33, 0x43, 0x22, 0x23, 0x44, + 0x57, 0x77, 0xCC, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0x89, 0x88, 0x67, 0x68, 0x67, 0x76, 0x55, 0x55, 0x43, 0x21, 0x12, 0x46, + 0x8E, 0xEA, 0xEE, 0xEF, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xF0, 0x00, 0x00, + }, + { + 0xEE, 0xDE, 0xD9, 0xD8, 0x87, 0x66, 0x64, 0x55, 0x44, 0x42, 0x02, 0x45, + 0x67, 0x8D, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xED, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFA, 0xFF, 0xCF, 0xB7, 0x98, 0x66, 0x54, 0x42, 0x01, 0x57, + 0x89, 0xFA, 0xFF, 0xEF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xAA, 0x88, 0x76, 0x42, 0x01, 0x36, + 0x78, 0xFF, 0xFF, 0xEA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xBC, 0xAA, 0xB8, 0x75, 0x10, 0x35, 0x78, 0x88, 0x87, 0x66, 0x66, 0x55, + 0x55, 0x66, 0x77, 0x77, 0x88, 0x99, 0x9A, 0xDB, 0xBB, 0xD0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFD, 0x99, 0x87, 0x65, 0x10, 0x23, + 0x56, 0x78, 0x9E, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xFE, 0xEF, 0xFF, 0xEE, 0xE9, 0xE8, 0x65, 0x54, 0x20, 0x23, + 0x34, 0x67, 0x7A, 0x99, 0x9F, 0xF9, 0xFF, 0xFE, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xEE, 0xEF, 0xFE, 0xEE, 0xE9, 0xEF, 0x87, 0x53, 0x20, 0x23, + 0x55, 0x55, 0x56, 0x68, 0x98, 0x8A, 0x9F, 0xFE, 0xFE, 0xF0, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x8A, 0x77, 0x54, 0x31, 0x23, + 0x44, 0x34, 0x44, 0x44, 0x43, 0x45, 0x57, 0xFA, 0xFB, 0xF0, 0x00, 0x00, + }, + { + 0x7C, 0xB7, 0x8B, 0x76, 0x76, 0x66, 0x55, 0x54, 0x44, 0x43, 0x33, 0x32, + 0x33, 0x44, 0x54, 0x44, 0x44, 0x57, 0x98, 0x87, 0xCB, 0x50, 0x00, 0x00, + }, + }, + { + { + 0x46, 0xAB, 0x6A, 0x6B, 0x65, 0x54, 0x54, 0x32, 0x22, 0x32, 0x43, 0x44, + 0xA4, 0x6A, 0xAA, 0xAB, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, 0xB0, 0x00, 0x00, + }, + { + 0x67, 0x66, 0x6B, 0x6C, 0x56, 0xB5, 0x55, 0x34, 0x32, 0x21, 0x23, 0x64, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCB, 0xC0, 0x00, 0x00, + }, + { + 0xCC, 0xCC, 0xCC, 0xBC, 0x76, 0x57, 0x55, 0x54, 0x43, 0x21, 0x12, 0x46, + 0x7C, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x77, 0x43, 0x22, 0x02, 0x57, + 0x8D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0xDD, 0xCD, 0xCC, 0xCD, 0xCC, 0xCC, 0xCC, 0xCC, 0x65, 0x42, 0x01, 0x3C, + 0x7C, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDC, 0xD0, 0x00, 0x00, + }, + { + 0xEE, 0x8E, 0xD9, 0x75, 0x10, 0x35, 0x77, 0x66, 0x68, 0x77, 0x66, 0x65, + 0x66, 0x65, 0x66, 0x68, 0x88, 0xEE, 0xAE, 0xED, 0xDD, 0xE0, 0x00, 0x00, + }, + { + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD8, 0xDD, 0x55, 0x20, 0x14, + 0x56, 0x4D, 0x7D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD0, 0x00, 0x00, + }, + { + 0xCC, 0xCC, 0xCC, 0xBC, 0xCC, 0xCC, 0xCB, 0xBC, 0xC7, 0x63, 0x20, 0x23, + 0x44, 0x55, 0x76, 0x7C, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0x00, 0x00, + }, + { + 0xBB, 0xBB, 0xBA, 0xAB, 0xBB, 0xBA, 0xAA, 0xAB, 0xB5, 0xB6, 0x31, 0x22, + 0x34, 0x43, 0x34, 0x54, 0x45, 0x4B, 0xBB, 0xBB, 0xBB, 0xB0, 0x00, 0x00, + }, + { + 0xCC, 0xBC, 0xCB, 0xBC, 0xCB, 0xBB, 0xBB, 0xB7, 0x66, 0x55, 0x42, 0x22, + 0x23, 0x34, 0x43, 0x35, 0x54, 0x55, 0x6C, 0xCB, 0xCB, 0xC0, 0x00, 0x00, + }, + { + 0xCB, 0xBB, 0x6B, 0xB7, 0xBB, 0x6B, 0x65, 0x55, 0x34, 0x33, 0x43, 0x32, + 0x23, 0x34, 0x55, 0x44, 0x46, 0xBB, 0xBB, 0xB6, 0xBB, 0xC0, 0x00, 0x00, + }, + }, + { + { + 0x88, 0x78, 0x71, 0x78, 0x77, 0x77, 0x77, 0x78, 0x27, 0x71, 0x77, 0x17, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x77, 0x88, 0x87, 0x88, 0x80, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x88, 0x82, 0x88, 0x83, 0x83, 0x12, 0x22, 0x38, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x98, 0x90, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x88, 0x88, 0x38, 0x89, 0x22, 0x11, 0x28, 0x88, + 0x88, 0x88, 0x88, 0x89, 0x98, 0x88, 0x88, 0x98, 0x98, 0x90, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x9A, 0x39, 0x99, 0x99, 0x33, 0x99, 0x42, 0x02, 0x99, + 0x99, 0x99, 0x99, 0x9A, 0xA9, 0x99, 0x99, 0x99, 0xA9, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x9A, 0x99, 0x99, 0x99, 0x9A, 0xA9, 0x92, 0x01, 0x34, + 0x99, 0x99, 0x99, 0x9A, 0xA9, 0x99, 0x9A, 0xA9, 0xA9, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0xAA, 0xAA, 0xAA, 0x30, 0x4A, 0xAA, 0x9A, 0xAA, 0xA4, 0x43, 0x43, + 0x35, 0x4A, 0x3A, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x9A, 0x99, 0x99, 0x99, 0x9A, 0x99, 0x93, 0x11, 0x13, + 0x34, 0x99, 0x99, 0x9A, 0x99, 0x99, 0x99, 0x99, 0xA9, 0xA0, 0x00, 0x00, + }, + { + 0x99, 0x89, 0x88, 0x89, 0x88, 0x88, 0x88, 0x89, 0x88, 0x88, 0x31, 0x12, + 0x88, 0x18, 0x88, 0x89, 0x98, 0x88, 0x89, 0x99, 0x98, 0x90, 0x00, 0x00, + }, + { + 0x88, 0x78, 0x77, 0x78, 0x77, 0x77, 0x77, 0x78, 0x77, 0x77, 0x71, 0x11, + 0x72, 0x77, 0x77, 0x78, 0x87, 0x77, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, + }, + { + 0xAA, 0x9A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x39, 0x92, 0x21, + 0x19, 0x39, 0x99, 0x94, 0x93, 0x99, 0x99, 0x99, 0xAA, 0xA0, 0x00, 0x00, + }, + { + 0x88, 0x78, 0x77, 0x78, 0x77, 0x77, 0x77, 0x78, 0x77, 0x72, 0x77, 0x72, + 0x17, 0x27, 0x77, 0x78, 0x87, 0x71, 0x78, 0x87, 0x88, 0x80, 0x00, 0x00, + }, + }, + }, +}; + +static const uint8_t short_codes_def[3][15][88] = { + { + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xFC, 0xCD, 0xFF, 0xFF, 0xFF, 0xCC, 0xCB, 0xBC, + 0xDF, 0xFF, 0xFD, 0xDB, 0xC9, 0x69, 0xBC, 0xFF, 0xFC, 0xFF, 0xB9, 0x42, + 0x5A, 0xCD, 0xFF, 0xFD, 0xDC, 0x62, 0x03, 0x9B, 0xCF, 0xFF, 0xFD, 0xC9, + 0x53, 0x4A, 0xCC, 0xFF, 0xFF, 0xFF, 0xBA, 0x9A, 0xBC, 0xFF, 0xFF, 0xFC, + 0xDC, 0xBC, 0xBC, 0xFF, 0xFF, 0xFF, 0xFE, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFC, 0xFC, 0xCC, 0xCF, 0xDF, 0xFF, 0xFF, 0xDB, 0xA9, 0x9B, + 0xCF, 0xDF, 0xFF, 0xCB, 0x97, 0x67, 0x9B, 0xFF, 0xFF, 0xDC, 0xA7, 0x42, + 0x47, 0xAD, 0xFF, 0xFF, 0xC9, 0x63, 0x03, 0x69, 0xBF, 0xFF, 0xFC, 0xA7, + 0x53, 0x47, 0xAC, 0xDF, 0xFD, 0xDC, 0x97, 0x77, 0x8C, 0xBD, 0xFF, 0xFF, + 0xCC, 0xAA, 0xAB, 0xCF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCC, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xDC, 0xFF, 0xDF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0xAF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0x56, 0x9F, 0xFF, 0xFF, 0xFF, 0xA6, 0x43, + 0x47, 0xEF, 0xFF, 0xFF, 0xF9, 0x53, 0x03, 0x6A, 0xFF, 0xFF, 0xFF, 0xA6, + 0x43, 0x46, 0xAF, 0xFF, 0xFF, 0xFF, 0x96, 0x56, 0x9F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xC9, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xDD, 0xFF, 0xFF, 0xFD, 0xFF, 0xFD, 0xFD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xDB, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFA, 0x43, + 0x6B, 0xFF, 0xDF, 0xFF, 0xFD, 0xA3, 0x02, 0xAD, 0xFF, 0xFF, 0xFD, 0xFB, + 0x52, 0x3A, 0xDF, 0xFF, 0xFF, 0xFF, 0xCB, 0xAA, 0xCE, 0xFF, 0xDF, 0xFF, + 0xFE, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xCF, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xCC, 0xCA, + 0xFF, 0xCF, 0xFB, 0xAA, 0xAA, 0xCF, 0xCB, 0xFC, 0xFF, 0xAA, 0xA9, 0x99, + 0xAC, 0xBF, 0xFC, 0xA9, 0x98, 0x88, 0x99, 0xAA, 0xCF, 0xCA, 0xA8, 0x53, + 0x58, 0x9F, 0xCC, 0xCC, 0xB9, 0x73, 0x02, 0x68, 0xAC, 0xCF, 0xCA, 0x98, + 0x53, 0x37, 0x9B, 0xAC, 0xFB, 0xAA, 0x97, 0x78, 0x8A, 0xFB, 0xFF, 0xFA, + 0xBB, 0x99, 0x9A, 0xAB, 0xFF, 0xFF, 0xEB, 0xBA, 0xAA, 0xAC, 0xCB, 0xFF, + 0xBF, 0xBC, 0xBC, 0xCF, 0xFF, 0xFF, 0xCF, 0xFC, 0xFC, 0xFF, 0xFF, 0xCF, + 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFD, 0xFC, 0xFF, + 0xFF, 0xFF, 0xFC, 0xAB, 0xBA, 0xFC, 0xFF, 0xFF, 0xFF, 0xA9, 0x77, 0x78, + 0xAF, 0xFF, 0xFF, 0xA8, 0x65, 0x45, 0x68, 0xFF, 0xFC, 0xFB, 0x74, 0x33, + 0x35, 0x7B, 0xFF, 0xFF, 0xB7, 0x43, 0x23, 0x46, 0xAF, 0xFF, 0xCB, 0x75, + 0x33, 0x35, 0x7A, 0xCC, 0xFF, 0xF8, 0x65, 0x45, 0x68, 0xAC, 0xCF, 0xCC, + 0xA8, 0x77, 0x78, 0xBF, 0xFF, 0xFF, 0xFF, 0xB9, 0x99, 0xFC, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDA, 0xFC, 0xFF, + 0xFF, 0xFC, 0xFB, 0x9A, 0x99, 0xBA, 0xFF, 0xFF, 0xFB, 0x97, 0x77, 0x77, + 0x9C, 0xCF, 0xFC, 0x98, 0x65, 0x45, 0x68, 0xAF, 0xFF, 0xC9, 0x75, 0x33, + 0x35, 0x79, 0xFF, 0xFB, 0x86, 0x43, 0x23, 0x47, 0x9F, 0xFF, 0xC9, 0x75, + 0x33, 0x35, 0x7B, 0xBF, 0xFF, 0xA8, 0x65, 0x45, 0x68, 0xAF, 0xFF, 0xFA, + 0xA8, 0x77, 0x78, 0x9B, 0xFF, 0xFF, 0xFF, 0xFB, 0x99, 0xBB, 0xFF, 0xFF, + 0xFF, 0xFE, 0xCE, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xBC, 0xEF, + 0xFF, 0xFF, 0xDB, 0x99, 0x89, 0xAC, 0xDF, 0xFF, 0xDB, 0x97, 0x66, 0x67, + 0x9C, 0xFF, 0xEC, 0x97, 0x65, 0x45, 0x67, 0xAC, 0xFF, 0xB9, 0x65, 0x33, + 0x35, 0x69, 0xBF, 0xFB, 0x86, 0x43, 0x33, 0x46, 0x9B, 0xEE, 0xB9, 0x65, + 0x33, 0x35, 0x69, 0xBE, 0xFD, 0xA7, 0x65, 0x45, 0x67, 0xAC, 0xDF, 0xDB, + 0x97, 0x66, 0x67, 0x9B, 0xDF, 0xFF, 0xDC, 0xA9, 0x89, 0x9B, 0xCF, 0xFF, + 0xFF, 0xDC, 0xBB, 0xBC, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xEF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBB, 0xFF, + 0xFF, 0xFF, 0xFF, 0xAA, 0x99, 0xAB, 0xFF, 0xFF, 0xFA, 0x98, 0x76, 0x67, + 0xAC, 0xCF, 0xFA, 0xA7, 0x64, 0x45, 0x67, 0x9B, 0xFF, 0xF8, 0x74, 0x33, + 0x34, 0x68, 0xAF, 0xFB, 0x96, 0x43, 0x33, 0x46, 0x8B, 0xFF, 0xF9, 0x75, + 0x43, 0x35, 0x69, 0xBF, 0xCC, 0x98, 0x65, 0x45, 0x67, 0x9A, 0xBF, 0xFF, + 0x98, 0x66, 0x68, 0x8F, 0xFF, 0xFF, 0xFF, 0x98, 0x88, 0xAF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xBA, 0xBA, 0xBE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, + 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, + 0xFF, 0xAA, 0xFF, 0xF9, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x88, 0x7F, + 0xAF, 0xFA, 0xFF, 0xF8, 0x75, 0x55, 0x79, 0xFF, 0xFF, 0xF9, 0x75, 0x32, + 0x34, 0x8A, 0xFF, 0xFF, 0xB8, 0x43, 0x22, 0x58, 0xFF, 0xFF, 0xCF, 0x95, + 0x33, 0x46, 0x7A, 0xFF, 0xFA, 0xFF, 0x75, 0x46, 0x79, 0xFA, 0xFF, 0xAF, + 0xF9, 0x89, 0x8A, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xAA, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFA, + 0x90, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBA, 0xAA, 0x99, 0xAA, 0xBD, 0xBB, 0xBA, 0x99, 0x88, 0x89, 0x9B, + 0xCC, 0xBA, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xBA, 0x98, 0x76, 0x65, 0x66, + 0x78, 0xAB, 0xA8, 0x76, 0x55, 0x45, 0x56, 0x79, 0xA9, 0x87, 0x55, 0x44, + 0x44, 0x67, 0x8A, 0x98, 0x75, 0x44, 0x44, 0x45, 0x68, 0x9A, 0x87, 0x65, + 0x44, 0x45, 0x67, 0x8A, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAB, 0x98, + 0x76, 0x55, 0x56, 0x78, 0x9A, 0xBA, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xCD, + 0xCB, 0xA9, 0x88, 0x89, 0xAA, 0xBB, 0xDD, 0xCA, 0xA9, 0x9A, 0xAB, 0xCC, + 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCA, 0xAA, 0xAA, 0xAB, 0xCE, 0xDC, 0xCB, 0xA9, 0x88, 0x89, 0x9B, + 0xCD, 0xBB, 0x98, 0x87, 0x77, 0x78, 0xAB, 0xDA, 0xA8, 0x76, 0x65, 0x66, + 0x78, 0xAC, 0xA9, 0x76, 0x55, 0x44, 0x56, 0x79, 0xAA, 0x97, 0x65, 0x44, + 0x44, 0x67, 0x9A, 0xA8, 0x75, 0x44, 0x34, 0x45, 0x79, 0x9A, 0x87, 0x65, + 0x44, 0x45, 0x67, 0x9A, 0xB9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAB, 0xA8, + 0x76, 0x65, 0x66, 0x78, 0xBB, 0xCB, 0xA8, 0x77, 0x77, 0x78, 0xAB, 0xBD, + 0xCB, 0xA9, 0x98, 0x99, 0xAA, 0xCD, 0xFD, 0xFB, 0xAA, 0xAB, 0xAB, 0xCC, + 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xCB, 0xAA, 0xAA, 0xAB, 0xCE, 0xED, 0xCB, 0xA9, 0x88, 0x89, 0xAB, + 0xCE, 0xCB, 0x98, 0x77, 0x77, 0x78, 0x9B, 0xCB, 0xA8, 0x76, 0x65, 0x56, + 0x78, 0xAB, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xBA, 0x87, 0x55, 0x44, + 0x45, 0x57, 0x8A, 0xA8, 0x75, 0x44, 0x34, 0x45, 0x78, 0xAA, 0x87, 0x65, + 0x44, 0x45, 0x67, 0x8A, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAB, 0xA8, + 0x76, 0x65, 0x66, 0x78, 0xAB, 0xCB, 0x98, 0x77, 0x77, 0x78, 0x9B, 0xCD, + 0xCB, 0xA9, 0x88, 0x89, 0xAB, 0xCD, 0xED, 0xCB, 0xAA, 0xAA, 0xAB, 0xCD, + 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xCB, 0xB9, 0xAA, 0xBB, 0xFF, 0xDD, 0xCB, 0xA9, 0x89, 0x89, 0x9B, + 0xEF, 0xBB, 0xA8, 0x77, 0x77, 0x78, 0x9B, 0xFC, 0xA8, 0x76, 0x55, 0x56, + 0x78, 0xAB, 0xB9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xBB, 0x97, 0x65, 0x44, + 0x44, 0x57, 0x8A, 0xA8, 0x75, 0x44, 0x44, 0x45, 0x68, 0xAA, 0x87, 0x65, + 0x44, 0x45, 0x57, 0x9A, 0xB9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xBB, 0x98, + 0x76, 0x55, 0x66, 0x78, 0xAB, 0xFB, 0xA8, 0x77, 0x77, 0x78, 0xAB, 0xBD, + 0xFB, 0xA9, 0x88, 0x89, 0xAC, 0xCC, 0xBC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, + 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xAB, 0xA9, 0xAA, 0xAB, 0xCC, 0xDC, 0xBA, 0x98, 0x88, 0x88, 0x9A, + 0xBD, 0xBA, 0x98, 0x77, 0x77, 0x78, 0x9B, 0xCA, 0xA8, 0x76, 0x65, 0x56, + 0x78, 0xAB, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xBA, 0x87, 0x55, 0x44, + 0x45, 0x57, 0x89, 0x98, 0x75, 0x44, 0x44, 0x45, 0x68, 0x9A, 0x87, 0x55, + 0x44, 0x45, 0x57, 0x89, 0xA8, 0x76, 0x55, 0x55, 0x56, 0x79, 0xAB, 0xA8, + 0x76, 0x55, 0x56, 0x78, 0x9A, 0xCB, 0xA8, 0x77, 0x77, 0x78, 0x9B, 0xDC, + 0xCB, 0xA9, 0x88, 0x89, 0x9A, 0xBD, 0xCB, 0xCB, 0xA9, 0xA9, 0xAA, 0xBB, + 0xB0, 0x00, 0x00, 0x00, + }, + }, + { + { + 0xAF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFB, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xAF, + 0xFF, 0xFF, 0xFF, 0xFB, 0x96, 0x56, 0x9F, 0xFF, 0xFF, 0xFF, 0xA6, 0x32, + 0x36, 0xAF, 0xFF, 0xFF, 0xF9, 0x63, 0x12, 0x6A, 0xFF, 0xFF, 0xFF, 0x96, + 0x33, 0x36, 0xBF, 0xFF, 0xFF, 0xFF, 0x96, 0x56, 0x9A, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDA, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x56, 0xFC, 0xCF, 0xFF, 0xFF, 0xF6, 0x32, + 0x39, 0xFF, 0xFF, 0xFF, 0xF8, 0x62, 0x12, 0x6F, 0xFF, 0xFF, 0xFF, 0xF6, + 0x43, 0x37, 0xFF, 0xFF, 0xFF, 0xFF, 0xA6, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0x56, 0x9F, 0xFF, 0xFF, 0xFF, 0xB6, 0x43, + 0x36, 0xFF, 0xFF, 0xFF, 0xFB, 0x62, 0x12, 0x5B, 0xFF, 0xFF, 0xFF, 0xD6, + 0x42, 0x36, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, 0x56, 0x9F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x43, + 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xA3, 0x11, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x61, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x8A, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x53, + 0x5E, 0xFF, 0xFF, 0xFF, 0xFF, 0x93, 0x11, 0x8F, 0xFF, 0xFF, 0xFF, 0xFE, + 0x51, 0x39, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0xCF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xAA, 0xAA, 0xAC, 0xDE, 0xCB, 0xBA, 0xA9, 0x98, 0x99, 0xAB, + 0xDE, 0xBA, 0x98, 0x77, 0x77, 0x78, 0xAB, 0xEA, 0xA8, 0x76, 0x65, 0x66, + 0x79, 0xAC, 0xA9, 0x86, 0x54, 0x44, 0x56, 0x79, 0xAA, 0x87, 0x65, 0x44, + 0x45, 0x57, 0x9A, 0xA9, 0x75, 0x44, 0x34, 0x45, 0x78, 0x9A, 0x87, 0x65, + 0x44, 0x45, 0x67, 0x9A, 0xB9, 0x86, 0x55, 0x45, 0x56, 0x89, 0xAC, 0xA8, + 0x76, 0x65, 0x66, 0x78, 0x9A, 0xCC, 0xA8, 0x87, 0x77, 0x89, 0x9B, 0xBF, + 0xDB, 0xA9, 0x98, 0x99, 0x9B, 0xBC, 0xDF, 0xCB, 0xAA, 0xB9, 0xAB, 0xBB, + 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCB, 0xAA, 0x9A, 0xAB, 0xCE, 0xCD, 0xCB, 0x99, 0x88, 0x89, 0x9B, + 0xCD, 0xCA, 0x98, 0x77, 0x67, 0x78, 0x9B, 0xCB, 0xA8, 0x76, 0x65, 0x56, + 0x78, 0xAB, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAA, 0x87, 0x65, 0x44, + 0x45, 0x57, 0x8A, 0x98, 0x65, 0x44, 0x44, 0x45, 0x78, 0xAA, 0x87, 0x55, + 0x44, 0x45, 0x57, 0x8A, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAB, 0xA8, + 0x76, 0x55, 0x66, 0x78, 0x9B, 0xCB, 0xA8, 0x77, 0x67, 0x78, 0x9B, 0xCD, + 0xDB, 0xA9, 0x88, 0x89, 0x9B, 0xCD, 0xDC, 0xDB, 0xAA, 0xA9, 0xAB, 0xBE, + 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBB, 0xAA, 0xAA, 0xAB, 0xCD, 0xDC, 0xCB, 0x99, 0x88, 0x89, 0xAB, + 0xCD, 0xBB, 0x98, 0x77, 0x77, 0x78, 0x9B, 0xCB, 0xA8, 0x76, 0x55, 0x56, + 0x78, 0xAB, 0xA9, 0x76, 0x55, 0x44, 0x56, 0x79, 0xAA, 0x87, 0x65, 0x44, + 0x45, 0x57, 0x8A, 0xA8, 0x75, 0x44, 0x44, 0x45, 0x68, 0xAA, 0x87, 0x55, + 0x44, 0x45, 0x67, 0x89, 0xA9, 0x76, 0x55, 0x45, 0x56, 0x79, 0xAB, 0xA8, + 0x76, 0x65, 0x66, 0x78, 0xAA, 0xCB, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xBD, + 0xCB, 0xA9, 0x88, 0x89, 0xAB, 0xBB, 0xDD, 0xCB, 0xAA, 0x9A, 0xAA, 0xBB, + 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xEC, 0xBA, 0xAA, 0xBD, 0xEF, 0xDD, 0xCB, 0xA9, 0x99, 0x9A, 0xBD, + 0xCF, 0xDB, 0x98, 0x77, 0x77, 0x88, 0xAC, 0xDE, 0xA9, 0x76, 0x55, 0x66, + 0x79, 0x9F, 0xB9, 0x86, 0x55, 0x45, 0x56, 0x89, 0xBB, 0x97, 0x65, 0x44, + 0x45, 0x67, 0x9B, 0xB8, 0x75, 0x44, 0x34, 0x45, 0x79, 0xAA, 0x97, 0x64, + 0x44, 0x45, 0x57, 0x9B, 0xC9, 0x86, 0x55, 0x44, 0x56, 0x79, 0xBC, 0xA8, + 0x76, 0x55, 0x66, 0x79, 0xBF, 0xFC, 0xA8, 0x87, 0x77, 0x78, 0xAA, 0xFF, + 0xFC, 0xAA, 0x99, 0x99, 0xAC, 0xCF, 0xFF, 0xCB, 0xBA, 0xAB, 0xBC, 0xBE, + 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBB, 0xBB, 0x9B, 0xBB, 0xFE, 0xCD, 0xCC, 0xA9, 0x99, 0x99, 0xAC, + 0xED, 0xCC, 0xA8, 0x87, 0x77, 0x88, 0xAB, 0xCB, 0xA8, 0x76, 0x56, 0x66, + 0x79, 0xBC, 0xA9, 0x86, 0x55, 0x44, 0x56, 0x79, 0xCA, 0x97, 0x65, 0x44, + 0x44, 0x67, 0x8A, 0xA9, 0x75, 0x44, 0x34, 0x45, 0x79, 0xBB, 0x97, 0x64, + 0x44, 0x45, 0x67, 0x9A, 0xB9, 0x86, 0x54, 0x45, 0x56, 0x89, 0xBC, 0xA9, + 0x76, 0x66, 0x66, 0x79, 0xAC, 0xFC, 0xA8, 0x87, 0x77, 0x79, 0x9B, 0xDE, + 0xDC, 0xA9, 0x99, 0x9A, 0xAB, 0xBD, 0xBD, 0xDB, 0xBA, 0xAA, 0xBB, 0xCD, + 0xB0, 0x00, 0x00, 0x00, + }, + }, + { + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F, 0xFC, 0xAF, 0xFF, 0xFF, 0xF6, 0x32, + 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x63, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCC, 0xCF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x99, 0xBB, + 0xFF, 0xFF, 0xFC, 0xBB, 0x86, 0x56, 0x9B, 0xFF, 0xFF, 0xFB, 0xA7, 0x42, + 0x36, 0xAF, 0xFF, 0xFF, 0xF9, 0x62, 0x13, 0x59, 0xFF, 0xFF, 0xFF, 0xA6, + 0x32, 0x47, 0xAF, 0xEF, 0xFF, 0xFF, 0x96, 0x57, 0x9A, 0xCC, 0xFF, 0xFF, + 0xFB, 0xAA, 0xAA, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x99, 0x9B, + 0xFF, 0xFF, 0xFF, 0xFA, 0x86, 0x56, 0x8B, 0xFF, 0xFF, 0xFF, 0xA6, 0x42, + 0x36, 0xAF, 0xFF, 0xFF, 0xF9, 0x52, 0x13, 0x58, 0xFF, 0xFF, 0xFF, 0xA5, + 0x33, 0x36, 0x9F, 0xFF, 0xFF, 0xFE, 0x86, 0x56, 0x8B, 0xFF, 0xFF, 0xFF, + 0xFE, 0xA8, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x77, 0x7F, + 0xFF, 0xFF, 0xFF, 0xFF, 0x75, 0x45, 0x68, 0xCF, 0xFF, 0xFF, 0xB5, 0x43, + 0x35, 0x8F, 0xFF, 0xFF, 0xF8, 0x43, 0x23, 0x57, 0xCF, 0xFF, 0xFF, 0xA5, + 0x32, 0x34, 0x8F, 0xFF, 0xFF, 0xFF, 0x64, 0x44, 0x6F, 0xFF, 0xFF, 0xFF, + 0xFF, 0x87, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xAF, 0xFF, 0xFF, 0xFF, 0xF3, + 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x52, 0x37, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x8F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x88, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xF8, 0x67, 0x87, + 0xFF, 0xFF, 0xFF, 0xF8, 0x76, 0x54, 0x77, 0xEF, 0xFF, 0xFF, 0x84, 0x33, + 0x35, 0x7F, 0xFF, 0xF8, 0x86, 0x53, 0x23, 0x57, 0xFF, 0xFF, 0xFF, 0x65, + 0x33, 0x35, 0x78, 0xFF, 0xFF, 0xF8, 0x55, 0x44, 0x58, 0xEE, 0xEE, 0xFE, + 0xFE, 0x67, 0x88, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFC, 0xCC, 0xFC, 0xFF, 0xFF, 0xFF, 0xBC, 0xA9, 0xA9, 0xCF, + 0xFF, 0xFC, 0xBA, 0x98, 0x77, 0x89, 0xBF, 0xFF, 0xB9, 0x87, 0x66, 0x67, + 0x8A, 0xCF, 0xBA, 0x87, 0x65, 0x44, 0x67, 0x9F, 0xFB, 0xA8, 0x65, 0x43, + 0x45, 0x69, 0xCF, 0xEA, 0x76, 0x43, 0x33, 0x46, 0x8F, 0xFC, 0xA8, 0x65, + 0x43, 0x34, 0x68, 0xAF, 0xF9, 0x97, 0x64, 0x44, 0x57, 0xAF, 0xFF, 0xFA, + 0x97, 0x66, 0x67, 0x9C, 0xFF, 0xFF, 0xFB, 0xA9, 0x99, 0x9B, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCB, 0xCC, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xDC, 0xCD, 0xCF, 0xFF, + 0xFF, 0xCC, 0xCB, 0xA9, 0x9A, 0xBC, 0xFF, 0xFD, 0xDB, 0xA8, 0x76, 0x78, + 0xAD, 0xFF, 0xDC, 0xA8, 0x65, 0x45, 0x68, 0xBF, 0xFE, 0xCA, 0x75, 0x33, + 0x35, 0x7A, 0xCF, 0xFC, 0xA6, 0x43, 0x23, 0x47, 0x9C, 0xFF, 0xC9, 0x75, + 0x33, 0x35, 0x79, 0xCE, 0xFD, 0xB8, 0x65, 0x45, 0x68, 0xAC, 0xDF, 0xFC, + 0xA8, 0x76, 0x78, 0xAB, 0xDF, 0xFF, 0xFD, 0xBA, 0x99, 0xAB, 0xCF, 0xFF, + 0xFF, 0xFD, 0xDD, 0xCD, 0xDF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, + 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9D, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xAF, 0x77, 0x8A, + 0xFF, 0xFF, 0xFF, 0xF9, 0x75, 0x45, 0x68, 0xFF, 0xFF, 0xFF, 0x84, 0x33, + 0x35, 0x9A, 0xFF, 0xFF, 0xF6, 0x43, 0x23, 0x47, 0xFF, 0xFF, 0xFF, 0x75, + 0x33, 0x35, 0x7A, 0xFF, 0xFF, 0xF8, 0x64, 0x45, 0x69, 0xFF, 0xFF, 0xFF, + 0x97, 0x86, 0x78, 0x9F, 0xFF, 0xFF, 0xAF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, + 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xDD, 0xDD, 0xDD, 0x5D, 0xDD, 0x4D, 0xDD, 0xDD, 0xD6, 0xDD, 0xD5, + 0xDD, 0xDD, 0x5D, 0xDD, 0x6D, 0xDD, 0xDD, 0xD5, 0xDD, 0xDD, 0xD6, 0xDD, + 0xDD, 0x6D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD6, 0xDD, 0xDD, 0xD6, + 0xD5, 0xDD, 0x5D, 0x6D, 0x55, 0xDD, 0x0D, 0x55, 0x65, 0xDD, 0x5D, 0xDD, + 0x66, 0xDD, 0xDD, 0xDD, 0xDD, 0xD5, 0xD5, 0x5D, 0x5D, 0xD6, 0xDD, 0xDD, + 0xDD, 0xDD, 0xD6, 0xD5, 0x6D, 0x6D, 0x6D, 0xD4, 0x6D, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x55, 0xD6, 0xDD, 0xDE, + 0xE0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0x9B, 0xA9, 0x9B, 0xAC, 0xCC, 0xFA, 0xBA, 0xBB, 0xA9, 0xAA, 0xBF, + 0xFF, 0xAA, 0xAA, 0x98, 0x88, 0x88, 0xAD, 0xF9, 0x99, 0x88, 0x76, 0x66, + 0x79, 0xAA, 0x99, 0x98, 0x75, 0x54, 0x56, 0x8F, 0xFA, 0xA9, 0x75, 0x43, + 0x34, 0x68, 0xAB, 0xBA, 0x86, 0x53, 0x33, 0x56, 0x8A, 0xBC, 0xB8, 0x64, + 0x33, 0x45, 0x79, 0xAC, 0xCB, 0x86, 0x54, 0x55, 0x67, 0x8A, 0xAC, 0xCA, + 0x76, 0x67, 0x78, 0x89, 0xBB, 0xFF, 0xB9, 0x78, 0x88, 0x9A, 0xBB, 0x9F, + 0xFD, 0xF9, 0xAB, 0x9A, 0xAB, 0xAA, 0xFF, 0xFC, 0xFA, 0xAB, 0x99, 0xAA, + 0x80, 0x00, 0x00, 0x00, + }, + { + 0xCC, 0xBC, 0xBB, 0xBC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB4, 0xBB, + 0xBB, 0xBB, 0xBB, 0xB4, 0x44, 0xB4, 0x2B, 0xBC, 0xCC, 0xCB, 0xBB, 0x33, + 0x4B, 0xBB, 0xBB, 0xBB, 0xB4, 0xBB, 0x44, 0x3B, 0xBB, 0xBB, 0xBB, 0xBB, + 0xB3, 0xB4, 0xBB, 0xBB, 0xBB, 0xBB, 0xB4, 0x44, 0x3B, 0xBB, 0xBB, 0xBB, + 0xB4, 0xB3, 0xBB, 0xBC, 0xCC, 0xCC, 0xCC, 0xCB, 0xB4, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCB, 0xCC, 0xCC, + 0xC0, 0x00, 0x00, 0x00, + }, + { + 0x77, 0x67, 0x76, 0x67, 0x77, 0x66, 0x66, 0x67, 0x77, 0x77, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x67, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x70, 0x00, 0x00, 0x00, + }, + }, +}; + +static const uint8_t long_codes_def[3][125][224] = { + { + { + 0xBE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, + 0xFE, 0xED, 0xDD, 0xCC, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, 0xDC, + 0xCB, 0xCB, 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xFE, 0xED, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xDD, 0xFF, 0xFF, 0xFE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, + 0x99, 0xAB, 0xCD, 0xEF, 0xFE, 0xEC, 0xCB, 0xA9, 0x88, 0x87, 0x78, 0x89, + 0xAB, 0xCD, 0xFF, 0xFE, 0xCB, 0xA9, 0x87, 0x77, 0x66, 0x77, 0x89, 0xAB, + 0xDE, 0xFD, 0xDC, 0xAA, 0x87, 0x76, 0x65, 0x66, 0x67, 0x89, 0xBC, 0xEF, + 0xDD, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xED, 0xDC, + 0xA9, 0x87, 0x65, 0x54, 0x45, 0x56, 0x79, 0xAC, 0xDD, 0xDD, 0xCA, 0x98, + 0x65, 0x54, 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xDE, 0xEB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x66, 0x89, 0xAB, 0xDD, 0xED, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xCC, 0xDE, 0xFC, 0xBA, 0x87, 0x76, 0x65, 0x66, 0x77, + 0x89, 0xBB, 0xDD, 0xFE, 0xDB, 0xA9, 0x87, 0x76, 0x67, 0x77, 0x89, 0xAB, + 0xCD, 0xDF, 0xEF, 0xCB, 0xA9, 0x88, 0x87, 0x88, 0x89, 0xAB, 0xCC, 0xED, + 0xFF, 0xED, 0xCB, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xEF, 0xFF, + 0xFD, 0xDB, 0xBA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFD, 0xFF, 0xFF, 0xFD, + 0xDC, 0xCC, 0xBC, 0xCC, 0xDC, 0xDE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDE, + 0xDD, 0xCD, 0xDD, 0xEE, 0xFF, 0xFE, 0xDF, 0xFF, 0xFF, 0xEF, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xFD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEF, 0xFF, 0xFF, 0xCF, 0xFE, + 0xDC, 0xDC, 0xCC, 0xBB, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xEE, 0xDD, 0xCC, + 0xCB, 0xBA, 0xAA, 0xBB, 0xBC, 0xDD, 0xFF, 0xDC, 0xDD, 0xCB, 0xBA, 0xA9, + 0x99, 0x9A, 0x9A, 0xBC, 0xDF, 0xFF, 0xBD, 0xDB, 0xBA, 0x99, 0x88, 0x88, + 0x88, 0x9A, 0xBC, 0xEF, 0xDD, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x67, 0x78, 0x9A, + 0xCC, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x65, 0x66, 0x67, 0x88, 0xAB, 0xCC, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xCC, 0xCA, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xCC, 0xBB, 0xA9, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x67, 0x89, 0xAC, 0xBC, 0xCA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCC, 0xB9, 0x87, 0x66, 0x55, 0x55, + 0x56, 0x77, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x67, + 0x89, 0xAB, 0xBD, 0xDF, 0xCA, 0x98, 0x87, 0x76, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xCF, 0xDD, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x88, 0x9A, 0xBC, 0xDD, + 0xFF, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xDF, 0xFF, + 0xDC, 0xBA, 0xAA, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xEC, + 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xDC, 0xDF, 0xDF, 0xFF, 0xFD, 0xEE, 0xCC, + 0xBC, 0xBB, 0xCC, 0xDD, 0xCE, 0xFE, 0xCF, 0xFF, 0xDD, 0xDD, 0xCD, 0xDC, + 0xCB, 0xBD, 0xCD, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xDD, 0xEE, + 0xDD, 0xCD, 0xCC, 0xCC, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xDE, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBA, 0xBB, 0xCD, 0xDE, 0xFF, 0xFD, 0xDD, 0xCC, 0xBA, 0xAA, + 0x99, 0x9A, 0xAA, 0xBC, 0xDE, 0xFF, 0xCD, 0xCB, 0xBA, 0x99, 0x98, 0x88, + 0x89, 0x9A, 0xBC, 0xDF, 0xED, 0xCC, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDE, 0xCC, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x67, 0x78, 0x9A, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x76, 0x65, 0x56, 0x67, 0x89, 0xAB, 0xCC, + 0xCC, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xCC, 0xCA, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCC, 0xCC, 0xB9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x67, 0x89, 0xAC, 0xCC, 0xCB, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9B, 0xCC, 0xCC, 0xBA, 0x87, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x99, 0xBC, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xDD, 0xCB, 0x98, 0x87, 0x76, 0x66, 0x77, 0x89, 0x9B, + 0xBC, 0xCE, 0xED, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, 0x9A, 0xBC, 0xDC, + 0xEE, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xBC, 0xCD, 0xCF, 0xFE, + 0xDD, 0xBB, 0xAA, 0x99, 0x9A, 0xAA, 0xBC, 0xCC, 0xDC, 0xFF, 0xFE, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xDF, 0xFF, 0xFF, 0xED, 0xCC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFD, 0xDF, 0xFF, 0xED, 0xDD, 0xDC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xDD, 0xFF, + 0xDF, 0xEC, 0xCC, 0xDC, 0xCD, 0xDD, 0xDF, 0xFF, 0xFF, 0xEE, 0xCC, 0xCC, + 0xBB, 0xBB, 0xBB, 0xAC, 0xCC, 0xEF, 0xEF, 0xFD, 0xDD, 0xCC, 0xBB, 0xAA, + 0x99, 0x9A, 0xAB, 0xBC, 0xDF, 0xFF, 0xDD, 0xCB, 0xBA, 0x99, 0x98, 0x88, + 0x89, 0x9A, 0xBC, 0xDD, 0xFC, 0xDB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xED, 0xBC, 0xBA, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x88, 0x9A, + 0xBD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x65, 0x56, 0x67, 0x89, 0xAC, 0xCE, + 0xCC, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x67, 0x8A, 0xBC, 0xDC, 0xDB, + 0xA9, 0x76, 0x65, 0x55, 0x55, 0x56, 0x78, 0xAA, 0xCC, 0xCC, 0xB9, 0x87, + 0x66, 0x55, 0x45, 0x55, 0x67, 0x89, 0xBC, 0xCC, 0xDB, 0xA8, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9B, 0xCC, 0xCC, 0xBA, 0x97, 0x66, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xBC, 0xCF, 0xDC, 0xA9, 0x87, 0x66, 0x65, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xFD, 0xCB, 0xA8, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xBC, 0xCF, 0xFD, 0xCB, 0x99, 0x87, 0x77, 0x78, 0x89, 0xAA, 0xCC, 0xCC, + 0xFF, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x99, 0x9A, 0xBC, 0xDD, 0xCF, 0xFE, + 0xDD, 0xBB, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xBD, 0xDC, 0xFF, 0xFF, 0xDD, + 0xBC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xFE, 0xCF, 0xFF, 0xFD, 0xFD, 0xDD, + 0xDC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFE, 0xCF, 0xFF, 0xDD, 0xCD, 0xDD, 0xCC, + 0xCD, 0xCC, 0xCD, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xEE, 0xDD, 0xDD, 0xCD, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xDE, 0xFF, + 0xFD, 0xED, 0xDD, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEF, 0xDD, + 0xCC, 0xCB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xFE, 0xFD, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xFF, 0xFF, 0xDC, 0xBA, 0xA9, 0x99, 0x89, + 0x99, 0xAB, 0xCD, 0xFF, 0xFD, 0xDD, 0xCA, 0xA9, 0x88, 0x87, 0x78, 0x89, + 0xAB, 0xCD, 0xFF, 0xDE, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xDF, 0xFE, 0xDC, 0xA9, 0x87, 0x76, 0x65, 0x56, 0x67, 0x89, 0xAC, 0xEF, + 0xED, 0xCA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xED, 0xDB, + 0xA9, 0x76, 0x65, 0x54, 0x55, 0x56, 0x79, 0xAB, 0xCE, 0xDD, 0xBA, 0x87, + 0x66, 0x54, 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xDD, 0xDB, 0xA9, 0x86, 0x65, + 0x54, 0x55, 0x66, 0x79, 0xAB, 0xCD, 0xDD, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xCD, 0xDF, 0xFC, 0xB9, 0x87, 0x66, 0x65, 0x66, 0x77, + 0x89, 0xBC, 0xDD, 0xFF, 0xDC, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDF, 0xFF, 0xCB, 0xA9, 0x88, 0x87, 0x78, 0x89, 0xAB, 0xBC, 0xED, + 0xFF, 0xFD, 0xCB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDF, 0xEF, 0xFF, + 0xED, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xCC, 0xCD, 0xED, 0xFF, 0xFF, 0xFD, + 0xDC, 0xCB, 0xBC, 0xCC, 0xCD, 0xDE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xED, + 0xDE, 0xDD, 0xDE, 0xDD, 0xDF, 0xFF, 0xBF, 0xFF, 0xEF, 0xDF, 0xED, 0xDC, + 0xDD, 0xDD, 0xDE, 0xED, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xBC, 0xDC, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDD, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCD, 0xDB, 0xCB, 0xAA, 0xA9, 0x98, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCC, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAB, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x65, 0x55, 0x56, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x99, 0xAA, 0xBA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xCB, + 0xBA, 0x99, 0x98, 0x88, 0x89, 0x99, 0x9A, 0xAB, 0xCB, 0xCC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBD, 0xDD, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0x9A, 0x9A, 0xAA, 0xAB, 0xBB, 0xCD, 0xBB, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xCA, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x77, + 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x67, 0x78, 0x89, + 0xAA, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xA9, 0xA9, + 0x88, 0x76, 0x66, 0x65, 0x66, 0x66, 0x77, 0x89, 0xAA, 0xAA, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x67, 0x78, 0x9A, 0x99, 0xA9, 0x88, 0x76, 0x66, + 0x65, 0x66, 0x66, 0x78, 0x89, 0xA9, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xAA, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xAA, + 0xBB, 0xBA, 0x99, 0x88, 0x87, 0x78, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xCB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBA, 0xCC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBD, 0xDC, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBD, 0xCC, 0xBA, 0xAA, 0xA9, 0x99, + 0xAA, 0xAA, 0xAB, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBB, 0xDC, + 0xBB, 0xAA, 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0xDD, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBB, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, + 0x78, 0x88, 0x99, 0xAB, 0xBA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x76, 0x66, 0x67, 0x77, 0x89, + 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x78, 0x99, 0x99, 0x99, + 0x87, 0x76, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0x99, 0x99, 0x98, 0x77, + 0x66, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0x99, 0xA9, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x66, 0x77, 0x89, 0x99, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x9A, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xA9, 0xAA, 0x99, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0x9A, 0xAA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xBA, + 0xBB, 0xAA, 0x98, 0x88, 0x87, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xBB, + 0xA9, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xCC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBC, 0xDC, 0xBB, 0xBA, 0xAA, + 0x99, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xBC, 0xCB, 0xBA, 0xAA, 0x99, 0x99, + 0x99, 0xAA, 0xAA, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xCD, 0xBB, 0xCC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xBC, 0xCB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x78, + 0x88, 0x88, 0x9A, 0xAB, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x66, 0x77, 0x78, 0x89, + 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0x99, 0xA9, + 0x88, 0x76, 0x66, 0x65, 0x66, 0x66, 0x77, 0x89, 0xA9, 0x9A, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x67, 0x88, 0x9A, 0x99, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x66, 0x66, 0x78, 0x89, 0xA9, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x9A, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x99, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBD, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBC, 0xCB, 0xBA, 0xAA, 0x9A, 0x99, + 0x99, 0xAA, 0xAA, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xCC, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xED, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x78, + 0x88, 0x89, 0x9A, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x65, 0x55, 0x66, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, + 0x78, 0x99, 0xAA, 0xAB, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xBA, + 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x78, 0x88, 0x89, 0x9A, 0xBB, 0xBC, 0xCB, + 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xDD, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCD, 0xED, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xBD, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xEE, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, + 0xFE, 0xED, 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFE, 0xDD, + 0xCC, 0xCB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFE, 0xFE, 0xDC, 0xCB, 0xBA, + 0xAA, 0xAB, 0xBC, 0xDD, 0xFF, 0xFF, 0xEE, 0xDD, 0xBB, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDE, 0xFF, 0xFD, 0xDC, 0xBB, 0xA9, 0x88, 0x77, 0x88, 0x99, + 0xAC, 0xDF, 0xFF, 0xDD, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x78, 0x8A, 0xBC, + 0xEF, 0xFD, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xFF, + 0xDD, 0xBA, 0x98, 0x76, 0x55, 0x45, 0x56, 0x78, 0xAB, 0xDE, 0xFD, 0xDB, + 0xA9, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xEF, 0xED, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xEE, 0xDC, 0xA9, 0x86, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xDD, 0xEE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xCE, 0xEF, 0xFD, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xCD, 0xEE, 0xFF, 0xDC, 0xBA, 0x88, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDF, 0xEF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0x9A, 0xBC, 0xCD, 0xEF, + 0xFF, 0xFE, 0xDC, 0xBA, 0xA9, 0x99, 0xAA, 0xBB, 0xCD, 0xEF, 0xEF, 0xFF, + 0xFE, 0xDC, 0xCB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFE, 0xFF, 0xFF, 0xFE, + 0xDD, 0xDC, 0xCC, 0xCD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEF, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, + 0xDE, 0xEE, 0xEF, 0xEF, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAD, 0xCD, 0xCB, 0xBC, 0xCB, 0xCC, 0xCD, 0xDD, 0xDE, 0xEF, 0xBD, 0xDE, + 0xDD, 0xCC, 0xCC, 0xCC, 0xDC, 0xDD, 0xFF, 0xFF, 0xFF, 0xDD, 0xDD, 0xCB, + 0xBB, 0xBB, 0xBB, 0xBB, 0xDD, 0xEF, 0xEF, 0xDD, 0xDC, 0xCC, 0xBB, 0xAA, + 0xA9, 0xAA, 0xBB, 0xCC, 0xFF, 0xFE, 0xCD, 0xCC, 0xAA, 0x99, 0x98, 0x88, + 0x99, 0xAB, 0xCE, 0xFE, 0xCC, 0xCB, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xFE, 0xCD, 0xBB, 0x99, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAC, + 0xDE, 0xDC, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x67, 0x8A, 0xBC, 0xFD, + 0xCC, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCB, + 0x99, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xCB, 0xA8, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xCD, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCD, 0xEC, 0xB9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBB, 0xDC, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xCE, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCC, 0xDD, + 0xEF, 0xFD, 0xDB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDD, 0xDF, 0xFD, + 0xFD, 0xCC, 0xBB, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xFC, 0xEF, 0xEF, 0xED, + 0xDD, 0xCC, 0xBC, 0xBC, 0xCC, 0xED, 0xEE, 0xDF, 0xFF, 0xFF, 0xFD, 0xED, + 0xDC, 0xDC, 0xDD, 0xDD, 0xDD, 0xED, 0xBE, 0xDD, 0xDD, 0xDD, 0xDC, 0xDC, + 0xCD, 0xCC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xDD, 0xFE, + 0xDD, 0xCC, 0xCC, 0xCB, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xDE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFF, 0xFD, 0xDD, 0xCB, 0xAA, 0xA9, + 0x99, 0x99, 0xAB, 0xBC, 0xEF, 0xFF, 0xCD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDE, 0xEC, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xEC, 0xCA, 0x99, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x66, 0x78, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x67, 0x8A, 0xBC, 0xCC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x79, 0xAB, 0xCC, 0xCC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xDD, 0xCB, 0x99, 0x87, 0x76, 0x67, 0x77, 0x89, 0xAB, + 0xCD, 0xDE, 0xDD, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x89, 0xAA, 0xBC, 0xDD, + 0xEF, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x99, 0xAA, 0xBC, 0xDD, 0xDF, 0xFF, + 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xED, 0xFF, 0xFE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEF, 0xEF, 0xFF, 0xFF, 0xED, 0xDC, + 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xFE, 0xDF, 0xFF, 0xFE, 0xED, 0xDD, 0xDC, + 0xCD, 0xDD, 0xDD, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xEF, 0xCD, 0xFD, + 0xED, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBB, 0xBA, 0xAB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFD, 0xDD, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xFE, 0xCD, 0xCB, 0xBA, 0x99, 0x88, 0x88, + 0x89, 0xAA, 0xBD, 0xEF, 0xDC, 0xDC, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0x9A, 0xCD, 0xFD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAC, 0xDD, + 0xCC, 0xB9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xCC, 0xCA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x79, 0xAB, 0xDD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x67, 0x8A, 0xBC, 0xCC, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x97, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xCD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xDC, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xED, 0xBA, 0xA9, 0x88, 0x77, 0x88, 0x89, 0x9B, 0xBC, 0xDD, + 0xDE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xCE, 0xCF, 0xFE, + 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xED, 0xFF, 0xEE, 0xED, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCE, 0xEE, 0xDF, 0xFF, 0xFF, 0xED, 0xDD, + 0xDC, 0xCC, 0xCD, 0xDD, 0xFE, 0xFE, 0xBF, 0xFE, 0xDD, 0xDD, 0xCD, 0xCC, + 0xDD, 0xCC, 0xDD, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xFF, 0xFE, 0xEE, 0xEE, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, + 0xFF, 0xEE, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, + 0xCC, 0xCB, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, 0xCB, 0xBA, + 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, 0xEE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDF, 0xFF, 0xFE, 0xED, 0xCB, 0xA9, 0x88, 0x77, 0x88, 0x9A, + 0xBC, 0xDF, 0xFF, 0xEE, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x78, 0x8A, 0xBC, + 0xEF, 0xFD, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xFF, + 0xDD, 0xCA, 0x98, 0x76, 0x55, 0x45, 0x56, 0x78, 0xAB, 0xDF, 0xFE, 0xDC, + 0xA9, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xEF, 0xED, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9B, 0xCE, 0xEE, 0xDC, 0xA9, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xEE, 0xEE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xCE, 0xEF, 0xFD, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBD, 0xEF, 0xFF, 0xEC, 0xB9, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x88, 0x9A, 0xBB, 0xDE, 0xFF, + 0xFF, 0xFE, 0xDC, 0xBA, 0xA9, 0x99, 0xAA, 0xBB, 0xCD, 0xFF, 0xFF, 0xFF, + 0xFE, 0xEC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xED, 0xDC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEE, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xBC, 0xDD, + 0xCB, 0xBB, 0xBA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDD, 0xED, 0xCC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x99, 0xAA, 0xBB, 0xCC, 0xDE, 0xDB, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xDC, 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xCD, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xBC, 0xCA, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x89, 0x9A, 0xBB, + 0xAA, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xBB, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x66, 0x65, 0x55, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xBB, 0xAA, 0x98, 0x87, 0x77, 0x67, 0x77, 0x88, 0x9A, + 0xBB, 0xBC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xCC, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xBD, 0xDC, + 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xDE, 0xED, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCD, 0xEE, 0xDD, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xDC, 0xAE, 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xBC, 0xDC, 0xAB, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xED, 0xBB, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xDA, 0xBA, 0xAA, 0x99, 0x98, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, + 0x88, 0x89, 0xAA, 0xBC, 0xCA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x89, 0xAB, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x87, 0x66, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x66, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x67, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0xAA, 0x99, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xBB, 0xA9, 0x88, 0x77, 0x76, 0x67, 0x77, 0x88, 0x99, + 0xAB, 0xAB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBB, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xAC, 0xDB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCC, 0xBB, + 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBC, 0xED, 0xDC, 0xBB, 0xBA, + 0xAA, 0xAA, 0xBA, 0xBB, 0xCC, 0xCC, 0xAC, 0xCC, 0xCB, 0xBB, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBB, 0xCC, + 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDC, 0xBB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xCA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x66, 0x66, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x67, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBB, 0xCC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xBC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xBC, 0xCB, 0xBB, 0xAA, 0xAA, 0x99, + 0x9A, 0xAA, 0xAB, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xAB, 0xDC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xEC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xCD, 0xCB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x78, + 0x88, 0x89, 0xAA, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x87, 0x66, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x66, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x67, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0xAA, 0x99, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xAA, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBA, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x98, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCB, 0xBA, + 0xAA, 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xCD, 0xED, 0xDC, 0xBB, 0xBB, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xAC, 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xCE, 0xAC, 0xDD, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xFE, 0xBC, 0xCB, 0xBA, + 0xAA, 0x99, 0x9A, 0xAA, 0xAB, 0xCC, 0xDE, 0xDB, 0xCB, 0xBA, 0xA9, 0x99, + 0x98, 0x99, 0x9A, 0xAB, 0xCC, 0xDD, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xCD, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xBC, 0xCA, 0xAA, 0x98, 0x77, 0x66, 0x65, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0xAA, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xAA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xBB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBB, 0xBC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xCC, 0xCB, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xBD, 0xDC, + 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCE, 0xFE, 0xDC, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEC, 0xBE, 0xDC, 0xCC, 0xCB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDE, 0xDD, 0xDD, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFF, + 0xEE, 0xDD, 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xED, 0xDC, + 0xCC, 0xBC, 0xCC, 0xCD, 0xEE, 0xFF, 0xFF, 0xFD, 0xED, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, 0xDD, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xBC, 0xDF, 0xFF, 0xFD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xBC, 0xEF, 0xFF, 0xDD, 0xCB, 0x98, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBD, + 0xEF, 0xFD, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9B, 0xCD, 0xFF, + 0xDD, 0xBA, 0x97, 0x66, 0x54, 0x45, 0x56, 0x79, 0xAC, 0xDE, 0xFE, 0xDB, + 0xA9, 0x76, 0x55, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xDD, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCE, 0xEE, 0xDC, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x8A, 0xBD, 0xEF, 0xEE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x79, 0xAB, 0xDE, 0xEF, 0xED, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBD, 0xFE, 0xEF, 0xEC, 0xBA, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDE, 0xEF, 0xFF, 0xDC, 0xBA, 0x99, 0x88, 0x89, 0x9A, 0xAB, 0xCD, 0xEE, + 0xFF, 0xFE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xEF, 0xFF, + 0xFF, 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xCD, 0xCD, 0xDD, 0xDF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xFE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xEE, 0xEE, + 0xEE, 0xEF, 0xEF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFF, 0xCE, 0xFE, + 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEE, 0xFF, 0xFF, 0xDF, 0xED, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDF, 0xFF, 0xFE, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xCD, 0xDF, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xEF, 0xFD, 0xDB, 0xB9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xFE, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xFC, 0xCB, 0x98, 0x77, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAC, 0xDE, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x79, 0xAB, 0xCD, 0xDC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xBA, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCC, 0xDD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x89, 0xBC, 0xDD, 0xED, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCE, 0xDE, 0xEC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x89, 0xAB, 0xCD, 0xEE, + 0xFF, 0xEC, 0xBB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xCC, 0xDF, 0xEF, 0xFF, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBD, 0xDE, 0xFF, 0xFF, 0xFF, 0xED, + 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xEF, 0xED, 0xDD, + 0xDD, 0xDF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xCE, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xEE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFF, 0xFD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDF, 0xED, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xEE, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x67, 0x89, 0x9B, + 0xCD, 0xEC, 0xBA, 0x98, 0x76, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x67, 0x8A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x78, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCD, 0xDD, 0xCA, 0x98, 0x87, 0x77, 0x67, 0x77, 0x89, 0xAB, + 0xCD, 0xDE, 0xEC, 0xBA, 0x99, 0x88, 0x77, 0x78, 0x89, 0xAA, 0xBC, 0xDD, + 0xEE, 0xDC, 0xBA, 0xA9, 0x98, 0x89, 0x99, 0xAA, 0xBC, 0xDE, 0xEF, 0xFE, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFE, 0xFF, 0xFE, 0xED, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xED, 0xDC, + 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xDF, 0xFF, 0xEE, 0xDD, 0xDD, 0xCD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xDC, 0xCC, 0xBC, 0xCC, 0xCD, 0xDD, 0xDE, 0xEE, 0xBE, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xCD, 0xEE, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xEF, 0xFF, 0xFD, 0xDD, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xFE, 0xCD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xCC, 0xEE, 0xEC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCE, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x56, 0x77, 0x8A, 0xAC, 0xDD, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xCC, 0xBA, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x99, 0xAC, 0xDC, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xEC, 0xCA, 0xA9, 0x88, 0x88, 0x88, 0x89, 0xAB, 0xBC, 0xDD, + 0xDE, 0xDC, 0xCB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xDE, 0xFE, + 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xDD, 0xEF, 0xEE, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xEF, 0xFF, 0xFE, 0xEE, 0xDD, + 0xCD, 0xCD, 0xCD, 0xDD, 0xFF, 0xFE, 0xCE, 0xED, 0xEE, 0xDD, 0xDD, 0xCC, + 0xDD, 0xCD, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xEE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xEE, 0xEF, 0xFF, 0xBE, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCD, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xEF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFD, 0xEE, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBC, 0xDE, 0xFF, 0xFF, 0xDD, 0xDC, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xDD, 0xFF, 0xFD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x99, + 0xAC, 0xDE, 0xFF, 0xDD, 0xCB, 0x98, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDF, 0xED, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xEE, + 0xDC, 0xBA, 0x97, 0x66, 0x55, 0x45, 0x56, 0x78, 0xAB, 0xCE, 0xED, 0xDB, + 0xA8, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xDE, 0xDC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9B, 0xCE, 0xDD, 0xDB, 0xA9, 0x76, 0x65, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xDE, 0xDD, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xDD, 0xEE, 0xEC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBD, 0xEE, 0xEF, 0xDC, 0xB9, 0x98, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDE, 0xEE, 0xFE, 0xDB, 0xAA, 0x98, 0x88, 0x88, 0x9A, 0xAB, 0xCE, 0xFE, + 0xFF, 0xED, 0xDB, 0xBA, 0xAA, 0x99, 0xAA, 0xBB, 0xCD, 0xEF, 0xEF, 0xFF, + 0xFE, 0xDC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFE, 0xFF, 0xFF, 0xFE, + 0xED, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, + 0xDE, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFE, 0xEE, 0xED, 0xDE, + 0xED, 0xDE, 0xEE, 0xFE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xBC, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFE, 0xCD, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEE, 0xEC, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xED, 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCD, 0xDB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDD, 0xBB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xA9, + 0x98, 0x76, 0x65, 0x44, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBB, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCC, 0xCB, 0xBA, 0x99, 0x88, 0x87, 0x88, 0x88, 0x9A, 0xAB, 0xCC, + 0xDD, 0xCB, 0xBA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xCD, 0xED, + 0xCB, 0xBA, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xDF, 0xED, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDD, 0xDE, 0xFE, 0xED, 0xDC, 0xCB, + 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xFD, 0xAE, 0xDD, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xCC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBB, 0xCC, + 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDD, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBB, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xAA, 0x99, 0x99, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xCC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCC, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDC, 0xAD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xAB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xAB, 0xAA, 0xA9, + 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCA, 0xBA, 0x99, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xAA, 0xA9, 0x88, 0x87, 0x77, 0x77, + 0x78, 0x88, 0x9A, 0xAB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x88, 0x77, + 0x66, 0x66, 0x56, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x98, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x99, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x99, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xBC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCC, 0xBC, 0xCB, 0xBA, 0xAA, 0x99, 0x99, + 0x9A, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xBC, 0xAB, 0xDC, + 0xBB, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCA, 0xBB, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0xAA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, + 0x9A, 0x98, 0x87, 0x66, 0x66, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0xA9, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xAA, 0xA9, 0x99, 0x89, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCC, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xDD, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xAD, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCC, 0xBB, 0xBB, 0xAB, 0xAB, 0xBB, 0xBC, 0xCC, 0xDD, 0xAC, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBA, 0xBB, 0xBC, 0xCD, 0xDE, 0xFD, 0xCD, 0xCB, 0xBA, + 0xAA, 0xA9, 0xAA, 0xAA, 0xBC, 0xCD, 0xDE, 0xDB, 0xCC, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xED, 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xCD, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBB, 0xDC, 0xBB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xAA, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xAA, + 0x98, 0x76, 0x65, 0x44, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBB, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCB, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCC, 0xCB, 0xBA, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xAC, 0xCC, + 0xCD, 0xCB, 0xBA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xCD, 0xDD, + 0xCB, 0xBA, 0xAA, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDC, 0xDE, 0xDD, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xDD, 0xFE, 0xED, 0xDC, 0xCB, + 0xBB, 0xBB, 0xCC, 0xCC, 0xDD, 0xED, 0xBD, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xCC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFF, 0xFF, 0xEF, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, + 0xFF, 0xFE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, + 0xDD, 0xDC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCC, 0xBB, + 0xBB, 0xBC, 0xCE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xAA, 0x99, 0x9A, + 0xAB, 0xCD, 0xFF, 0xFF, 0xFF, 0xFE, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0xAB, + 0xCD, 0xFF, 0xFF, 0xEF, 0xDC, 0xA9, 0x87, 0x77, 0x77, 0x88, 0xAB, 0xCE, + 0xFF, 0xFE, 0xED, 0xBA, 0x87, 0x66, 0x55, 0x66, 0x79, 0xAC, 0xDF, 0xFF, + 0xFF, 0xCB, 0x98, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBC, 0xFF, 0xFF, 0xEC, + 0xB9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xDE, 0xFF, 0xFE, 0xDB, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xEF, 0xFF, 0xED, 0xBA, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9B, 0xCE, 0xFF, 0xFF, 0xDC, 0xA9, 0x86, 0x65, 0x55, + 0x67, 0x8A, 0xBC, 0xEF, 0xFF, 0xFE, 0xDB, 0xA8, 0x87, 0x66, 0x77, 0x89, + 0xAC, 0xDF, 0xFF, 0xFF, 0xED, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xFF, 0xFF, 0xFF, 0xED, 0xCB, 0xA9, 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xFF, + 0xFF, 0xFF, 0xED, 0xCC, 0xBB, 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xDD, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCC, 0xCC, 0xBC, 0xDC, 0xDD, 0xEE, 0xFF, 0xBD, 0xFD, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xFF, 0xED, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDD, 0xEE, 0xCC, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDF, 0xEC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9B, 0xCD, 0xFD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0x98, 0x77, 0x66, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xDD, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xCC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDD, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBB, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xEC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xCC, 0xEE, + 0xEE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEE, 0xFE, + 0xDC, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0xFE, 0xDD, + 0xCC, 0xBC, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xEF, 0xFF, 0xFE, 0xED, 0xDD, + 0xCD, 0xCC, 0xCE, 0xDE, 0xFE, 0xFE, 0xAF, 0xFE, 0xEE, 0xDD, 0xDD, 0xCD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xCE, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xEE, 0xDC, 0xCB, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFD, 0xDC, 0xBB, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDE, 0xCC, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xDC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x79, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x8A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x89, 0xAB, 0xDD, 0xDD, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x89, 0xAB, 0xCD, 0xEE, + 0xEE, 0xDC, 0xBA, 0xA9, 0x98, 0x89, 0x99, 0xAA, 0xBC, 0xDE, 0xEE, 0xFE, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFF, 0xFF, 0xFE, 0xDD, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xED, 0xDC, + 0xCC, 0xCD, 0xDD, 0xEE, 0xFF, 0xFF, 0xCF, 0xFF, 0xFE, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCD, 0xEE, 0xFF, 0xFF, 0xBF, 0xFE, + 0xED, 0xCC, 0xCC, 0xBB, 0xCC, 0xDD, 0xDF, 0xFF, 0xFF, 0xFE, 0xED, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xEF, 0xFF, 0xFD, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBD, 0xDF, 0xFD, 0xDB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9B, 0xCD, 0xFF, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xEC, 0xBB, 0x98, 0x77, 0x65, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xDE, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x99, 0xBC, 0xDD, 0xDD, 0xCA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xEE, 0xEC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x89, 0xAB, 0xCD, 0xDD, + 0xFF, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, + 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFF, 0xFF, 0xFE, 0xED, + 0xCC, 0xCB, 0xBB, 0xBC, 0xCD, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, + 0xDC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xCF, 0xFF, 0xFE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xEE, 0xEE, 0xDD, 0xDE, 0xDE, 0xEE, 0xEE, 0xFE, 0xEF, 0xAF, 0xFF, + 0xFE, 0xED, 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFE, 0xDC, + 0xCC, 0xCB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFE, 0xFE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAB, 0xCC, 0xDE, 0xFF, 0xFF, 0xEE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDE, 0xFF, 0xFE, 0xEC, 0xBA, 0x99, 0x87, 0x77, 0x88, 0x9A, + 0xBC, 0xDF, 0xFF, 0xED, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBD, + 0xEF, 0xFD, 0xDC, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9B, 0xCD, 0xFF, + 0xDD, 0xBA, 0x98, 0x66, 0x54, 0x45, 0x56, 0x89, 0xAC, 0xDE, 0xED, 0xDB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBD, 0xEE, 0xED, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xFE, 0xDC, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xEE, 0xED, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDE, 0xEE, 0xED, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9B, 0xCD, 0xFE, 0xFF, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDF, 0xFF, 0xFE, 0xDC, 0xBA, 0x99, 0x98, 0x99, 0x9A, 0xBC, 0xDF, 0xFF, + 0xFF, 0xFE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, 0xFF, + 0xFE, 0xDD, 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xDD, 0xDC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, + 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, + 0xEE, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xBC, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDE, 0xFE, 0xCC, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDE, 0xEB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xDD, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x9A, 0xAB, 0xCD, 0xDB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x65, 0x44, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x98, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x77, 0x89, 0xAB, 0xBB, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBB, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x67, 0x77, + 0x89, 0xAA, 0xBB, 0xBB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCC, 0xCB, 0xAA, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xBB, 0xCC, + 0xCD, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xCD, 0xDD, + 0xCB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDD, 0xDE, 0xDC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDE, 0xFE, 0xED, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xED, 0xAE, 0xDD, 0xDC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xCC, 0xCD, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDD, 0xBB, 0xBA, 0xA9, + 0x99, 0x98, 0x89, 0x99, 0xAA, 0xBB, 0xCD, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBB, + 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xAA, 0xA9, 0x99, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xCD, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xAC, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xBB, 0xBA, 0xA9, + 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xCA, 0xBA, 0x99, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xAA, 0xA9, 0x88, 0x87, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xAB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x65, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xBB, 0xCB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xCC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xBC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xAB, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xBC, 0xBB, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x56, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xAA, 0xA9, 0x99, 0x88, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCC, 0xBA, + 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xCC, 0xDC, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xAD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDD, 0xAC, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xCC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDE, 0xEB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xDD, 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x78, + 0x88, 0x99, 0xAB, 0xCD, 0xCB, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCC, 0xAB, 0xA9, 0x87, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCA, 0xA9, 0x98, 0x77, 0x66, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x77, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xBB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xBC, 0xCB, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x89, 0x9A, 0xAB, 0xCC, + 0xCC, 0xCB, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xCD, 0xDC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDD, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xDE, 0xEE, 0xDD, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0xBE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, + 0xFF, 0xFE, 0xED, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, + 0xCC, 0xCC, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xCB, 0xBA, + 0xAA, 0xBB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xDD, 0xBB, 0xA9, 0x99, 0x99, + 0xAA, 0xBD, 0xEF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x88, 0x77, 0x88, 0x9A, + 0xCD, 0xFF, 0xFF, 0xFE, 0xDB, 0xA9, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xCD, + 0xFF, 0xFF, 0xDC, 0xB9, 0x87, 0x65, 0x55, 0x56, 0x78, 0xAB, 0xDF, 0xFF, + 0xFD, 0xCA, 0x98, 0x65, 0x54, 0x45, 0x56, 0x89, 0xBC, 0xEF, 0xFE, 0xDC, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xFF, 0xFE, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAC, 0xDF, 0xFF, 0xEC, 0xB9, 0x87, 0x55, + 0x44, 0x55, 0x67, 0x9A, 0xCD, 0xFF, 0xFF, 0xDB, 0xA8, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDF, 0xFF, 0xFD, 0xCB, 0x98, 0x76, 0x66, 0x67, 0x89, + 0xAB, 0xCF, 0xFF, 0xFF, 0xFD, 0xCA, 0x98, 0x87, 0x77, 0x89, 0x9A, 0xCD, + 0xFF, 0xFF, 0xFF, 0xEC, 0xBB, 0xA9, 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, + 0xFF, 0xFF, 0xDD, 0xCB, 0xBA, 0xAA, 0xAB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xDC, 0xCC, 0xCC, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xDE, 0xAF, 0xFE, + 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xEF, 0xDD, 0xCB, + 0xBB, 0xAA, 0xAB, 0xBB, 0xCD, 0xEE, 0xFF, 0xEE, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCD, 0xEE, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xED, 0xDC, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCE, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xDE, 0xEC, 0xCB, 0x98, 0x76, 0x65, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xDD, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xDE, 0xED, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xDE, 0xEC, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xEF, 0xEE, 0xFE, + 0xED, 0xCB, 0xBB, 0xAA, 0xAB, 0xBB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xED, + 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xEE, 0xED, + 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xAF, 0xEE, 0xEE, 0xED, 0xDD, 0xDD, + 0xDD, 0xED, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCC, 0xCC, 0xBC, 0xCC, 0xDD, 0xDD, 0xEE, 0xBE, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFF, 0xFE, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFF, 0xED, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xFE, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAB, 0xCC, 0xDE, 0xDC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x77, 0x8A, 0xBC, 0xDD, + 0xBC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDD, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xED, 0xEE, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFE, 0xEF, 0xFE, 0xDD, + 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xEE, 0xFF, 0xEE, 0xED, 0xDC, + 0xCC, 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xBE, 0xEE, 0xED, 0xDD, 0xDD, 0xCD, + 0xCD, 0xDD, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xCC, 0xCC, 0xDC, 0xDD, 0xDE, 0xEF, 0xEF, 0xAE, 0xFE, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xFE, 0xEE, 0xDD, 0xDB, + 0xBB, 0xBA, 0xAB, 0xBC, 0xCD, 0xEE, 0xFF, 0xED, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xBB, 0xCD, 0xEF, 0xFE, 0xDD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xED, 0xDB, 0xB9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xEE, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAC, + 0xDE, 0xDC, 0xCB, 0x98, 0x76, 0x65, 0x55, 0x56, 0x77, 0x9A, 0xBC, 0xED, + 0xCC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xBC, 0xDD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCD, 0xDD, 0xDC, 0xB9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xDE, 0xDB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xDD, 0xEE, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xFF, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xDE, 0xEE, 0xFF, + 0xDD, 0xCC, 0xBB, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xEE, 0xFF, 0xFE, 0xED, + 0xDC, 0xCB, 0xCC, 0xCC, 0xCD, 0xEE, 0xFF, 0xEE, 0xFF, 0xFF, 0xFE, 0xED, + 0xDD, 0xDD, 0xDE, 0xEE, 0xEF, 0xFF, 0xAE, 0xEE, 0xEE, 0xED, 0xED, 0xDD, + 0xDD, 0xDE, 0xEE, 0xFE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, + 0xFF, 0xFF, 0xED, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, + 0xCC, 0xCC, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCB, 0xBA, + 0xAA, 0xBB, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0xA9, 0x99, 0x99, + 0xAB, 0xBD, 0xFF, 0xFF, 0xFF, 0xFD, 0xCA, 0xA9, 0x87, 0x77, 0x88, 0x9A, + 0xBD, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xCD, + 0xFF, 0xFF, 0xFC, 0xB9, 0x87, 0x65, 0x55, 0x56, 0x78, 0xAB, 0xDF, 0xFF, + 0xFD, 0xCA, 0x97, 0x65, 0x54, 0x45, 0x56, 0x89, 0xAC, 0xFF, 0xFF, 0xDC, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xCF, 0xFF, 0xFD, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAC, 0xDF, 0xFF, 0xFC, 0xB9, 0x86, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xCD, 0xFF, 0xFF, 0xDB, 0xA8, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xEF, 0xFF, 0xFF, 0xCA, 0x98, 0x76, 0x66, 0x67, 0x89, + 0xAB, 0xCF, 0xFF, 0xFF, 0xFD, 0xBA, 0x98, 0x87, 0x77, 0x89, 0x9B, 0xCD, + 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0xA9, 0x99, 0x99, 0xAB, 0xBC, 0xFF, 0xFF, + 0xFF, 0xFF, 0xED, 0xCB, 0xBA, 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xDC, 0xCC, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCC, 0xBC, 0xBC, 0xCC, 0xDD, 0xDE, 0xEE, 0xAE, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xFF, 0xFE, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xEF, 0xED, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xFE, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xDF, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBC, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xAC, 0xDD, 0xDD, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xBC, 0xED, + 0xEE, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xEE, 0xFE, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xEE, 0xEF, 0xFE, 0xDD, + 0xCC, 0xCB, 0xBB, 0xBC, 0xCD, 0xDD, 0xEF, 0xEE, 0xFF, 0xFE, 0xED, 0xDD, + 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFE, 0x9E, 0xED, 0xDD, 0xDD, 0xDC, 0xCC, + 0xDD, 0xDD, 0xDE, 0xEF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0x9C, 0xDC, + 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xED, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDD, 0xDB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xDC, 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x78, + 0x88, 0x99, 0xAB, 0xBC, 0xCA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCC, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xAC, 0xCA, 0xA9, 0x98, 0x76, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xBB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xCC, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBD, 0xDC, 0xCD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xCC, 0xEE, 0xDC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xED, 0x9D, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0x9B, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xBB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBC, 0xDC, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0x9C, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0x9B, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCD, 0xCA, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x99, 0xAA, 0xCC, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x9A, + 0xAC, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBB, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xB9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x87, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xBA, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBA, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xCD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCC, 0xDC, 0xCC, 0xCB, 0xBB, + 0xBB, 0xAB, 0xBB, 0xCC, 0xCD, 0xDC, 0x9C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xEF, 0x9E, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAB, 0xBB, 0xCD, 0xEE, 0xFF, 0xFD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xFF, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xEC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAB, + 0xDE, 0xEC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9B, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0x98, 0x76, 0x65, + 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9B, 0xBD, 0xDD, 0xDB, 0xB9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDD, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xEE, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEE, 0xFE, + 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xEF, 0xFE, 0xDD, + 0xDC, 0xCB, 0xBB, 0xCC, 0xCD, 0xEE, 0xFF, 0xFE, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xAE, 0xFE, 0xEE, 0xED, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xED, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, + 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xAA, 0xAB, + 0xBC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0x99, 0x89, 0x9A, 0xBB, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xBC, 0xEF, + 0xFF, 0xFF, 0xFF, 0xCB, 0x98, 0x65, 0x55, 0x67, 0x8A, 0xBC, 0xFF, 0xFF, + 0xFF, 0xDC, 0xA9, 0x75, 0x44, 0x44, 0x67, 0x9B, 0xCF, 0xFF, 0xFF, 0xFE, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x79, 0xAC, 0xDF, 0xFF, 0xFF, 0xDC, 0xA9, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xCE, 0xFF, 0xFF, 0xFF, 0xCB, 0x97, 0x64, + 0x44, 0x45, 0x79, 0xAC, 0xDF, 0xFF, 0xFF, 0xFD, 0xBA, 0x87, 0x65, 0x55, + 0x68, 0x9B, 0xCD, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x87, 0x77, 0x78, 0x9A, + 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x89, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, 0xBB, 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xCD, 0x9E, 0xFE, + 0xDD, 0xDD, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFE, 0xFD, 0xDE, 0xED, 0xDC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xEC, 0xDD, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xED, 0xED, 0xCD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xBB, 0xCD, 0xDF, 0xDC, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x9A, + 0xBC, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDE, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9B, 0xBD, 0xED, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x66, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xED, 0xCD, 0xCA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9B, 0xCC, 0xED, 0xCD, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x89, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDC, 0xCC, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xED, + 0xDE, 0xDD, 0xCC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEE, 0xDC, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFE, 0xDF, 0xEE, 0xDD, + 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xED, 0xFF, 0xEE, 0xED, 0xDD, + 0xDD, 0xDE, 0xEF, 0xEF, 0xFF, 0xEE, 0x9D, 0xDD, 0xCD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xFE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xCD, 0xDD, 0xDE, 0xAE, 0xEE, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDD, 0xEF, 0xFE, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xEF, 0xED, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xEE, 0xCC, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDE, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xCC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x56, 0x77, 0x9A, 0xBC, 0xDD, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x88, 0x76, 0x55, 0x55, + 0x67, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDD, + 0xDD, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xED, + 0xDC, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xDF, 0xEE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFE, 0xFE, 0xFE, 0xDD, 0xDD, + 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFE, 0xAE, 0xED, 0xDD, 0xDD, 0xCC, 0xCC, + 0xCD, 0xDD, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDE, 0x9F, 0xFF, + 0xED, 0xDD, 0xDD, 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFE, 0xEF, 0xED, 0xDC, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCE, 0xEE, 0xFF, 0xED, 0xED, 0xDC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xEE, 0xFD, 0xDE, 0xDC, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCD, 0xEF, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x9A, + 0xBB, 0xCD, 0xED, 0xCD, 0xCB, 0xA8, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xED, + 0xCD, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x66, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x76, 0x65, + 0x45, 0x56, 0x67, 0x9A, 0xBC, 0xDD, 0xDD, 0xCA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x88, + 0x9A, 0xBD, 0xDD, 0xDD, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xCE, 0xDE, 0xED, 0xCB, 0xAA, 0x99, 0x88, 0x89, 0x9A, 0xBC, 0xCD, 0xED, + 0xEF, 0xED, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEE, 0xDE, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xFE, 0xDF, 0xFE, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDE, 0xEE, 0xEF, 0xEE, 0xFF, 0xEF, 0xEE, 0xDE, + 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xFF, 0xAE, 0xDD, 0xDD, 0xED, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, + 0xCC, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xAA, 0xAB, + 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x99, 0x89, 0x9A, 0xBC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFF, 0xCB, 0x98, 0x66, 0x55, 0x67, 0x8A, 0xBD, 0xFF, 0xFF, + 0xFF, 0xFC, 0xA9, 0x76, 0x44, 0x45, 0x67, 0x9B, 0xCD, 0xFF, 0xFF, 0xFF, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAC, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, + 0x75, 0x43, 0x24, 0x57, 0x8A, 0xCE, 0xFF, 0xFF, 0xFF, 0xCB, 0x97, 0x65, + 0x44, 0x46, 0x79, 0xAC, 0xDF, 0xFF, 0xFF, 0xFD, 0xBA, 0x87, 0x65, 0x56, + 0x68, 0x9B, 0xCD, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, 0x87, 0x77, 0x78, 0x9A, + 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x99, 0x89, 0x9A, 0xBC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xCD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDD, 0x9E, 0xFE, + 0xDD, 0xDC, 0xCC, 0xBC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFE, 0xDE, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xED, 0xED, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xEE, 0xDD, 0xCC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x99, 0x87, 0x76, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x34, 0x55, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x34, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x68, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x77, 0x88, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xDD, 0xEC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBB, 0xCD, 0xED, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xED, 0xEE, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xEE, 0xEF, 0xFE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xED, 0xFF, 0xEE, 0xED, 0xDD, + 0xCD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0x8E, 0xDD, 0xDD, 0xCC, 0xCC, 0xCD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x9B, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0xEC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAA, 0xBC, 0xCD, 0xBB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xAB, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0x9A, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x89, 0xAA, 0xBA, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBB, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xA9, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCC, 0xBC, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xCC, 0xDD, 0xDC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xCD, 0xEC, 0x8C, 0xBB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9B, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xAB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBA, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBB, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0x8B, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xDC, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCB, 0xBA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x88, + 0x88, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xBA, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBB, 0xCB, 0xAA, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAB, 0xCC, 0xCC, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xCD, 0xCC, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xDC, 0x8C, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, + 0xBB, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xCD, 0xDD, 0x8E, 0xFE, + 0xED, 0xDD, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFD, 0xDE, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEE, 0xEF, 0xED, 0xDD, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xEE, 0xFD, 0xDD, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xBB, 0xCD, 0xEE, 0xEC, 0xDC, 0xBA, 0xA9, 0x88, 0x77, 0x88, 0x9A, + 0xBC, 0xCE, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x76, 0x67, 0x78, 0x9A, 0xBC, + 0xDE, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xED, + 0xCC, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x34, 0x45, 0x68, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, + 0x65, 0x44, 0x34, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xDD, 0xDD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCE, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x77, 0x89, + 0xAB, 0xCC, 0xDD, 0xDD, 0xDB, 0xAA, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xDD, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xED, + 0xDE, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEF, 0xED, 0xFF, + 0xED, 0xDC, 0xCB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEE, 0xFE, 0xDF, 0xFE, 0xDD, + 0xDC, 0xCC, 0xCC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFD, 0xFF, 0xFE, 0xEE, 0xED, + 0xDD, 0xDD, 0xEE, 0xEE, 0xFF, 0xFF, 0x9D, 0xDD, 0xDE, 0xDD, 0xDD, 0xCD, + 0xDD, 0xEE, 0xDE, 0xEF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFE, 0xEE, 0xDE, 0xDD, 0xDD, 0xDD, 0xED, 0xDD, 0xDD, 0x9F, 0xFF, + 0xFF, 0xFF, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, + 0xDD, 0xDD, 0xCD, 0xDD, 0xDE, 0xEF, 0xFF, 0xEE, 0xFF, 0xED, 0xDC, 0xCB, + 0xBB, 0xCC, 0xCD, 0xEE, 0xFF, 0xFE, 0xEF, 0xED, 0xCC, 0xBA, 0xAA, 0xAA, + 0xBB, 0xCD, 0xEE, 0xFF, 0xFE, 0xEE, 0xDC, 0xBA, 0x98, 0x88, 0x99, 0xAB, + 0xCD, 0xDE, 0xFE, 0xEF, 0xDC, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xEE, 0xED, 0xCA, 0x98, 0x76, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xFF, + 0xEE, 0xCB, 0xA8, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBD, 0xDF, 0xEE, 0xED, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDE, 0xFF, 0xDE, 0xCB, 0xA8, + 0x75, 0x43, 0x24, 0x57, 0x8A, 0xBD, 0xEF, 0xED, 0xED, 0xBA, 0x97, 0x65, + 0x44, 0x46, 0x78, 0xAB, 0xDD, 0xFE, 0xDF, 0xDC, 0xA9, 0x87, 0x65, 0x56, + 0x78, 0x9A, 0xCD, 0xEF, 0xEE, 0xED, 0xDB, 0xA9, 0x87, 0x77, 0x78, 0x9A, + 0xBC, 0xDF, 0xFE, 0xDF, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBB, 0xDD, + 0xFF, 0xFD, 0xFE, 0xDD, 0xCB, 0xAA, 0xAA, 0xAA, 0xBC, 0xDD, 0xFE, 0xFE, + 0xDF, 0xEE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFD, 0xFE, + 0xFE, 0xDD, 0xDC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFE, 0xFF, + 0xEE, 0xED, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xED, 0xFE, 0xEF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0x9E, 0xFE, + 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xEE, 0xEE, 0xDE, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDD, 0xEF, 0xED, 0xDD, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xED, 0xCD, 0xCB, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x66, 0x54, 0x45, 0x66, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x86, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xAA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, 0x88, 0x89, 0x9A, 0xBC, 0xCD, 0xEE, + 0xDD, 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xED, 0xEE, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFE, 0xDE, 0xEE, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xED, 0xFF, 0xEE, 0xEE, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0x9D, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCD, 0xDD, 0xAE, 0xEE, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xDE, 0xED, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xDD, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAA, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x56, 0x78, 0x89, 0xAB, 0xDC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBC, 0xAA, 0x88, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBC, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xCC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCC, 0xDD, + 0xCD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xDE, 0xDD, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xED, 0xFE, 0xED, 0xDD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFE, 0xAD, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0x9E, 0xFE, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xED, 0xDE, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xDD, 0xED, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xED, 0xDD, 0xCC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDC, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0xA9, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCC, 0xBA, 0x98, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xDC, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBB, 0xCD, 0xED, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDE, 0xDD, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0xDF, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xDD, 0xEE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xEF, 0xFE, 0x9D, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDD, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFE, 0xFD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xEE, 0xFE, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDD, 0xDD, 0xFE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFE, 0xFD, 0xCC, 0xBB, 0xBC, + 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xCB, 0xBA, 0xAA, 0xAB, 0xCD, + 0xDE, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xCD, 0xEF, + 0xFF, 0xFF, 0xFF, 0xEC, 0xA9, 0x86, 0x66, 0x78, 0x9B, 0xCE, 0xFF, 0xFF, + 0xFF, 0xED, 0xCA, 0x86, 0x54, 0x45, 0x78, 0xAC, 0xDE, 0xFF, 0xFF, 0xFF, + 0xCB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBD, 0xFF, 0xFF, 0xEF, 0xFE, 0xBA, + 0x86, 0x42, 0x24, 0x68, 0xAC, 0xDE, 0xFF, 0xFF, 0xFE, 0xDC, 0xA8, 0x75, + 0x44, 0x56, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xED, 0xCB, 0x98, 0x76, 0x66, + 0x79, 0xAC, 0xDF, 0xFF, 0xFF, 0xFF, 0xED, 0xCA, 0x98, 0x88, 0x89, 0xAB, + 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xBB, 0xAA, 0xAA, 0xAB, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xED, 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xFE, 0xFF, 0xEF, 0xFF, 0xFE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCD, 0xDD, 0x9D, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xFE, 0xDE, 0xDD, 0xCC, + 0xBB, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xEE, 0xED, 0xDD, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xCC, 0xDD, 0xED, 0xCD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xBC, 0xDE, 0xDC, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAB, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xBB, 0xA9, 0x87, 0x66, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xCD, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x45, 0x67, 0x89, 0xAB, 0xCC, 0xBC, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xCA, 0x98, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCC, 0xCA, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xBB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDE, 0xDD, 0xED, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDE, 0xFE, 0xDE, 0xED, 0xDC, + 0xCC, 0xCB, 0xBB, 0xCC, 0xDD, 0xDE, 0xEF, 0xED, 0xEF, 0xEE, 0xDD, 0xDD, + 0xDC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFE, 0x8D, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCD, 0xDE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0x9C, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x99, 0xAB, 0xBC, 0xDC, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xBB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xCB, 0xDC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDE, 0xCC, 0xED, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xED, 0x8C, 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9B, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDB, 0xBB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x89, 0xAA, 0xBB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x67, 0x77, + 0x89, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBA, 0xCB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xBB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0x9C, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x78, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x99, 0x87, 0x76, 0x65, 0x56, + 0x67, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDB, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCC, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xCD, 0xDC, 0x8C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xBB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCD, 0x8D, 0xEE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDD, 0xEE, 0xFD, 0xDD, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xEF, 0xDD, 0xDC, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xBC, 0xDD, 0xED, 0xCC, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xBC, 0xDD, 0xDC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCC, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xBB, 0xA9, 0x87, 0x66, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x45, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x54, 0x56, 0x67, 0x89, 0xAB, 0xCC, 0xBC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x88, 0x9B, 0xBD, 0xCC, 0xCB, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCD, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xAB, + 0xCD, 0xCC, 0xDC, 0xBB, 0xA9, 0x98, 0x88, 0x89, 0x99, 0xAB, 0xCD, 0xDD, + 0xDD, 0xCC, 0xBA, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDE, 0xDD, 0xED, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDE, 0xEE, 0xDE, 0xDD, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xED, 0xFF, 0xDE, 0xDD, 0xDC, + 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFE, 0x9D, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xFF, 0xFE, 0xEF, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEE, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, + 0xDD, 0xDD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xEF, 0xFF, 0xFD, 0xDC, 0xCC, + 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFE, 0xFF, 0xFE, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xEF, 0xFF, 0xEF, 0xDC, 0xBA, 0x98, 0x76, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xEE, 0xED, 0xCA, 0x98, 0x66, 0x55, 0x66, 0x89, 0xAB, 0xDE, 0xFF, + 0xEE, 0xDB, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xCD, 0xFF, 0xFE, 0xFD, + 0xBA, 0x86, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDE, 0xFF, 0xDE, 0xDB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBD, 0xEF, 0xFE, 0xFD, 0xBA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDE, 0xFF, 0xEE, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCD, 0xFF, 0xFE, 0xFD, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x9A, + 0xBC, 0xEF, 0xFF, 0xEF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFD, 0xFE, 0xDC, 0xCB, 0xAA, 0x9A, 0xAA, 0xBC, 0xDF, 0xFF, 0xFF, + 0xDF, 0xFE, 0xDD, 0xCC, 0xBB, 0xBB, 0xCD, 0xDD, 0xFF, 0xFF, 0xFD, 0xFF, + 0xFE, 0xED, 0xDC, 0xDC, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xEE, + 0xEF, 0xED, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xCD, 0xDE, 0xDD, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xDD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0x9E, 0xFE, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFD, 0xEE, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xED, 0xED, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFD, 0xDE, 0xCC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xED, 0xCD, 0xCB, 0xA8, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xCE, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x89, + 0xAB, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xEC, 0xDD, 0xCB, 0xAA, 0x99, 0x89, 0x99, 0xAA, 0xBC, 0xDE, 0xEE, + 0xDD, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEF, 0xEC, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFE, 0xDF, 0xEE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xED, 0xFE, 0xFF, 0xFC, 0xFF, 0xFE, 0xED, 0xDD, + 0xDD, 0xDD, 0xEE, 0xFE, 0xFF, 0xFF, 0x9D, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, + 0xED, 0xDE, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xCD, 0xDD, 0xAE, 0xEE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xEE, 0xDE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xED, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xCD, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xDC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBC, 0xAA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xCD, 0xCC, 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xED, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFE, 0xDE, 0xDD, 0xCC, + 0xCC, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xFF, 0xED, 0xFE, 0xED, 0xDD, 0xCC, + 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFF, 0xAD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0x9E, 0xFF, + 0xEE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xFD, 0xEF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xDD, 0xED, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xCC, 0xDD, 0xED, 0xDE, 0xDC, 0xBA, 0xA9, 0x98, 0x89, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCD, 0xCB, 0xA8, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xCD, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0x9A, 0xBB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDD, 0xDD, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0xDE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xDD, 0xFE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xEF, 0xFE, 0x9D, 0xDD, 0xDD, 0xDD, 0xDD, 0xCC, + 0xDD, 0xDD, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFE, 0xEE, 0xDD, 0xDD, 0xDC, 0xCC, 0xDD, 0xCD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDE, 0xEE, 0xDF, 0xEF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFF, + 0xDD, 0xDC, 0xCC, 0xDD, 0xDE, 0xEE, 0xFF, 0xDF, 0xFF, 0xEE, 0xDC, 0xCB, + 0xBB, 0xBC, 0xCD, 0xDD, 0xFF, 0xFE, 0xFF, 0xFD, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCD, 0xEE, 0xFF, 0xEE, 0xEE, 0xCC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCC, 0xEF, 0xFF, 0xFF, 0xDC, 0xBA, 0x88, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xFE, 0xED, 0xCA, 0x97, 0x65, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xFE, + 0xEE, 0xDB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xEE, 0xED, 0xFC, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9B, 0xDE, 0xFF, 0xDD, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xBC, 0xEF, 0xFD, 0xDC, 0xBA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDE, 0xFF, 0xDE, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCD, 0xEF, 0xFD, 0xED, 0xCB, 0xA9, 0x87, 0x77, 0x78, 0x9A, + 0xBC, 0xEF, 0xFF, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDD, + 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBC, 0xDD, 0xEF, 0xFF, + 0xEF, 0xFE, 0xDD, 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFE, 0xFE, + 0xEE, 0xDD, 0xDC, 0xCC, 0xCD, 0xDF, 0xEF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xEE, 0xED, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDE, 0xED, 0xDE, 0xFF, + 0xEF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xDD, 0xDC, 0xCC, 0xCC, 0xCB, 0xCC, 0xCC, 0xCC, 0xCD, 0x8E, 0xFE, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xEE, 0xEF, 0xFD, 0xDE, 0xED, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xED, 0xED, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFD, 0xDD, 0xCC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCD, 0xEE, 0xDC, 0xDC, 0xBA, 0x98, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xCA, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x98, 0x66, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x34, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x68, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xED, 0xCD, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBC, 0xCD, 0xEE, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xDF, 0xED, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFE, 0xDE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xED, 0xFE, 0xEE, 0xED, 0xDD, + 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0x7C, 0xCC, 0xCC, 0xCC, 0xDC, 0xCD, + 0xDD, 0xDE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0x8C, 0xDD, + 0xCB, 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xDC, 0xCC, 0xCB, 0xBA, + 0xAA, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xDD, 0xCB, 0xCB, 0xBA, 0xA9, 0x99, + 0x89, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xCC, 0xBB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCB, + 0xAA, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xAB, 0xBA, 0xA9, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x99, 0xAB, 0xBA, 0xAA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0xAA, 0xBB, 0xAA, 0xA9, 0x88, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x9A, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x89, 0xAB, 0xCB, 0xBB, 0xAA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBB, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x89, 0x99, 0xAA, 0xBB, 0xCD, 0xCB, 0xCC, + 0xCB, 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xBD, 0xDC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDE, 0xCC, 0xDD, 0xDC, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCD, 0xDD, 0xED, 0x8C, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x9B, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xBC, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xDC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0x8C, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xCD, 0xDC, 0xBD, 0xCB, 0xBA, + 0xAA, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCB, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDB, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x88, + 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBB, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xBB, 0xBA, 0xA9, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAA, 0xBB, 0xAA, 0x99, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x99, 0xAB, 0xBA, 0xAA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0x9A, 0xBB, 0xAB, 0xA9, 0x88, 0x76, 0x65, 0x56, + 0x67, 0x78, 0x9A, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x89, 0xAB, 0xBB, 0xBB, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBB, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xCB, 0xDC, + 0xBB, 0xAA, 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDC, 0xCD, 0xCC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDD, 0xCC, 0xDD, 0xCC, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCC, 0xDE, 0xED, 0x8C, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xEE, 0xED, 0xDC, 0xCC, 0xBC, 0xCC, 0xCC, 0xDC, 0xCD, 0x7E, 0xFF, + 0xEE, 0xDD, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xEF, 0xFD, 0xEF, 0xED, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xEE, 0xFF, 0xED, 0xEE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xFE, 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xAB, 0xCD, 0xEF, 0xED, 0xEC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x9A, + 0xBB, 0xDD, 0xED, 0xDD, 0xCB, 0x99, 0x87, 0x76, 0x67, 0x78, 0x9A, 0xBC, + 0xCE, 0xDD, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xCD, 0xED, + 0xCC, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x34, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x34, 0x56, 0x79, 0xAB, 0xCD, 0xEC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCE, 0xDD, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x77, 0x89, + 0xAB, 0xCD, 0xED, 0xDD, 0xCB, 0xAA, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDF, 0xED, 0xED, 0xCB, 0xAA, 0x99, 0x89, 0x99, 0xAA, 0xBC, 0xDE, 0xEF, + 0xDE, 0xDD, 0xCC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFE, 0xFD, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xDF, 0xEF, 0xED, + 0xDD, 0xCC, 0xCC, 0xCD, 0xEE, 0xFE, 0xFF, 0xFD, 0xEF, 0xEE, 0xFE, 0xDD, + 0xDD, 0xED, 0xEE, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xED, 0xFE, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, 0xDD, 0xDD, 0xDD, 0xCC, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFE, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFE, 0xCD, 0xDC, 0xDD, 0xDD, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xDC, 0xCC, + 0xBC, 0xBC, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xBB, 0xAA, 0xAA, + 0xBB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCC, 0xDE, 0xFF, 0xFF, 0xFD, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xAB, 0xDD, + 0xFF, 0xFF, 0xFE, 0xCB, 0x98, 0x65, 0x55, 0x67, 0x89, 0xAC, 0xDF, 0xFF, + 0xFF, 0xDB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xCD, 0xFF, 0xFF, 0xFD, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xFF, 0xEF, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xBD, 0xFF, 0xFE, 0xFD, 0xCA, 0x97, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDD, 0xFF, 0xEF, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xCE, 0xFF, 0xFE, 0xFF, 0xDB, 0xA9, 0x87, 0x76, 0x77, 0x9A, + 0xBC, 0xFF, 0xFF, 0xEF, 0xFC, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFE, 0xFE, 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xBC, 0xDE, 0xFF, 0xFF, + 0xDF, 0xFE, 0xDC, 0xDC, 0xBB, 0xBB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFD, 0xFF, + 0xFE, 0xED, 0xDD, 0xDC, 0xDE, 0xFE, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, + 0xEF, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xDC, 0xDC, 0xDE, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xEE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xFE, 0xED, 0xFF, 0xFE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xDD, 0xEE, 0xDC, 0xCB, 0xBB, + 0xAB, 0xBB, 0xBC, 0xCD, 0xDE, 0xED, 0xDE, 0xDD, 0xCB, 0xAA, 0x99, 0x99, + 0xAA, 0xBC, 0xCD, 0xEE, 0xDD, 0xDD, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0x9A, + 0xBC, 0xDD, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDD, 0xDC, 0xBA, 0x87, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xDD, + 0xCD, 0xCA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xAC, 0xDE, 0xDC, 0xDB, + 0xA9, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9A, 0xCD, 0xDD, 0xCD, 0xCA, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xAC, 0xCE, 0xDC, 0xDC, 0xBA, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9A, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x8A, 0xBC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x76, 0x77, 0x89, + 0xAB, 0xCD, 0xEE, 0xCD, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xDF, 0xDC, 0xED, 0xCB, 0xBA, 0xA9, 0x99, 0x9A, 0xAB, 0xBC, 0xEF, 0xFE, + 0xCE, 0xDD, 0xCC, 0xBB, 0xAA, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xED, 0xED, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xDE, 0xEE, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFD, 0xEE, 0xEE, 0xEE, 0xEE, + 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xED, 0xEE, 0xEF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0xAE, 0xFE, + 0xED, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0xEE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDC, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xCD, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEC, 0xDD, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFE, 0xCE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFC, 0xEE, 0xDD, 0xDC, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0x9D, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xDD, 0xDE, 0xEE, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xEE, 0xDD, 0xDC, 0xCC, 0xCC, 0xDD, 0xDD, 0xEE, 0xED, 0xFF, 0xFD, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xDF, 0xFE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFD, 0xEF, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDE, 0xEC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xED, 0xDD, 0xCB, 0xA8, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xDD, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDD, + 0xDD, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xED, 0xCD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xDE, 0xEC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0xAB, 0xCD, 0xEE, 0xDD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xEF, 0xED, 0xDD, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0x9A, 0xBC, 0xDE, 0xFE, + 0xDD, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFD, 0xFE, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xDE, 0xDD, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFD, 0xFE, 0xED, 0xDD, 0xED, + 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xDC, 0xDD, 0xCD, 0xDD, 0xDE, + 0xDE, 0xEF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDD, 0xDC, 0xDD, 0xCC, 0xCC, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFD, 0xDD, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xDD, 0xCB, + 0xBB, 0xBC, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xBA, 0xAA, 0xAA, + 0xBB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCC, 0xDF, 0xFF, 0xFF, 0xDC, 0xBA, 0x97, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xFF, 0xFD, 0xCB, 0x98, 0x65, 0x55, 0x67, 0x89, 0xBC, 0xDF, 0xFF, + 0xFF, 0xDC, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xFF, 0xFD, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xDC, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xCD, 0xFF, 0xFF, 0xFD, 0xCA, 0x97, 0x65, + 0x44, 0x45, 0x78, 0xAC, 0xDF, 0xFF, 0xEF, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCE, 0xFF, 0xFF, 0xFE, 0xCB, 0xA9, 0x87, 0x77, 0x78, 0x9A, + 0xBC, 0xDF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFD, 0xFF, 0xDD, 0xBB, 0xAA, 0xAA, 0xAA, 0xBC, 0xDE, 0xFF, 0xFF, + 0xDF, 0xFD, 0xDD, 0xCB, 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFF, 0xFD, 0xFF, + 0xDF, 0xDD, 0xDC, 0xDC, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFE, + 0xEF, 0xEF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xCD, 0xDD, 0xED, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xEF, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDC, 0xDD, 0x7F, 0xFF, + 0xFF, 0xFE, 0xED, 0xEE, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xDC, 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFF, 0xEF, 0xFF, 0xFD, 0xDC, 0xCB, + 0xBB, 0xBC, 0xCD, 0xCF, 0xFF, 0xFE, 0xFF, 0xFD, 0xDB, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCC, 0xDE, 0xFF, 0xFF, 0xFD, 0xDC, 0xAA, 0x99, 0x89, 0x99, 0xAB, + 0xBC, 0xDF, 0xFF, 0xFD, 0xDC, 0xBA, 0x98, 0x77, 0x78, 0x89, 0xAB, 0xCD, + 0xFF, 0xEF, 0xED, 0xCA, 0x98, 0x76, 0x56, 0x67, 0x89, 0xBC, 0xDE, 0xFE, + 0xDE, 0xCB, 0xA9, 0x76, 0x54, 0x45, 0x68, 0x9A, 0xBC, 0xEF, 0xEE, 0xED, + 0xBA, 0x87, 0x64, 0x23, 0x46, 0x78, 0xAB, 0xDD, 0xFE, 0xFE, 0xDB, 0xA9, + 0x76, 0x43, 0x24, 0x57, 0x8A, 0xBD, 0xDE, 0xED, 0xFD, 0xBA, 0x98, 0x65, + 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xFF, 0xDD, 0xDC, 0xB9, 0x87, 0x66, 0x56, + 0x78, 0x9A, 0xBD, 0xEF, 0xFD, 0xFD, 0xCB, 0xA9, 0x88, 0x77, 0x78, 0x9A, + 0xBC, 0xDE, 0xFF, 0xDE, 0xDC, 0xBB, 0xA9, 0x98, 0x89, 0x9A, 0xAC, 0xDE, + 0xFF, 0xFE, 0xFE, 0xDD, 0xCB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xFF, + 0xDF, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xDD, 0xFF, 0xFF, 0xFD, 0xFF, + 0xEF, 0xDD, 0xDC, 0xCC, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xDF, 0xFF, 0xEE, + 0xEE, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xED, + 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCC, 0xCC, 0xDD, 0xDC, 0xCE, + 0xEF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCC, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBA, 0xBB, 0xBB, 0x8D, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEC, 0xCD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCC, 0xDC, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDC, 0xBC, 0xBA, 0xA9, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xCD, 0xBB, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xBC, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x66, 0x67, 0x78, 0x89, 0x9A, + 0xBC, 0xBB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCB, + 0xAB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xBA, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCB, 0xAB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xBA, 0xBA, 0x98, 0x77, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0xA9, 0x87, 0x77, 0x66, 0x66, 0x78, + 0x89, 0xAB, 0xCC, 0xBB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xBC, 0xCB, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x89, 0xAA, 0xBC, 0xDC, + 0xBC, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xDD, 0xDB, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xED, 0xCD, 0xCC, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEF, 0xEC, 0xDD, 0xDD, 0xCC, 0xCC, + 0xCB, 0xCC, 0xCD, 0xDE, 0xEE, 0xFE, 0x8C, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, + 0xCC, 0xCC, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x9B, 0xCC, + 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xBC, 0xBB, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0x9A, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xBA, 0x99, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xBB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCC, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCC, 0xBB, 0xBB, 0xAA, 0xAA, 0xAB, 0xAB, 0xBB, 0xBC, 0x8D, 0xED, + 0xCC, 0xCB, 0xBA, 0xBA, 0xBB, 0xBB, 0xCC, 0xCD, 0xDC, 0xCD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCC, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xAB, 0xCB, 0xBB, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCB, + 0xAB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBA, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xBB, 0xAA, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xAB, 0xBA, 0xBA, 0x98, 0x77, 0x65, + 0x55, 0x56, 0x67, 0x89, 0xAB, 0xBB, 0xAB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x78, + 0x89, 0xAB, 0xCB, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAA, + 0xBC, 0xCB, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBC, 0xDC, + 0xBC, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xCB, 0xCC, + 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xBD, 0xCC, 0xCC, + 0xBB, 0xBA, 0xAB, 0xBB, 0xBC, 0xCD, 0xDE, 0xDC, 0xED, 0xCC, 0xCB, 0xBB, + 0xBB, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0x8C, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xCC, 0xCD, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xEF, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7F, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDC, 0xDE, 0xDE, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFE, + 0xDD, 0xCC, 0xBC, 0xCC, 0xDE, 0xEE, 0xFF, 0xEF, 0xFE, 0xED, 0xCB, 0xBB, + 0xAB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFE, 0xEF, 0xED, 0xCB, 0xAA, 0x99, 0x9A, + 0xAB, 0xBC, 0xDE, 0xEF, 0xED, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9A, + 0xBC, 0xDE, 0xFD, 0xEE, 0xDB, 0xA9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xED, 0xEC, 0xBA, 0x87, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xEE, + 0xDE, 0xCB, 0x98, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDF, 0xED, 0xDC, + 0xB9, 0x86, 0x54, 0x33, 0x45, 0x78, 0x9B, 0xCD, 0xED, 0xDD, 0xCB, 0x98, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xBC, 0xDE, 0xFD, 0xDD, 0xBA, 0x87, 0x65, + 0x44, 0x46, 0x78, 0x9B, 0xCD, 0xEF, 0xEE, 0xCB, 0xA9, 0x87, 0x65, 0x56, + 0x67, 0x8A, 0xBC, 0xDF, 0xFE, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x89, + 0xAC, 0xCE, 0xEF, 0xDE, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xEF, 0xFD, 0xED, 0xDC, 0xBB, 0xA9, 0xA9, 0x9A, 0xBB, 0xCD, 0xEF, 0xFF, + 0xEF, 0xED, 0xCC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xED, 0xFF, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDD, + 0xDD, 0xDD, 0xDE, 0xDE, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFE, 0xEE, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDE, 0xDC, 0xED, 0xDD, 0xDE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xCC, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, + 0xCE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0xAA, 0xAB, 0xBC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x98, 0x89, 0xAB, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0x87, 0x66, 0x78, 0xAB, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDB, 0x97, 0x54, 0x45, 0x79, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFC, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, + 0x96, 0x42, 0x24, 0x68, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, 0x75, + 0x43, 0x57, 0x9A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xA8, 0x76, 0x67, + 0x89, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x88, 0x9A, 0xBC, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, 0xAA, 0xAB, 0xBD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBB, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xDC, 0xDD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xDF, 0xDD, 0xDD, 0xCC, 0xDB, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xFE, 0xFD, 0xDD, 0xCC, 0xCC, 0xDD, 0xDD, 0xDE, 0xFD, 0xFF, 0xFF, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBC, 0xDD, 0xDD, 0xFF, 0xDF, 0xFD, 0xDD, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAC, 0xCC, 0xFF, 0xFD, 0xFF, 0xDD, 0xCA, 0xA9, 0x99, 0x99, + 0x9A, 0xAB, 0xCD, 0xEF, 0xDF, 0xDD, 0xCB, 0xA9, 0x88, 0x88, 0x88, 0x99, + 0xAC, 0xCD, 0xFD, 0xDE, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x78, 0x9A, 0xBC, + 0xDF, 0xED, 0xEC, 0xA9, 0x87, 0x66, 0x55, 0x67, 0x78, 0x9B, 0xBE, 0xFF, + 0xDD, 0xCA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAC, 0xDF, 0xFD, 0xCB, + 0xA9, 0x86, 0x54, 0x34, 0x45, 0x78, 0x9A, 0xBD, 0xEF, 0xDC, 0xBA, 0x98, + 0x65, 0x43, 0x34, 0x56, 0x89, 0xAC, 0xDE, 0xFC, 0xDB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9A, 0xBD, 0xDF, 0xDD, 0xBB, 0xA8, 0x77, 0x65, 0x55, + 0x67, 0x8A, 0xAC, 0xDF, 0xFC, 0xDC, 0xBA, 0x98, 0x77, 0x76, 0x77, 0x89, + 0xAB, 0xCE, 0xEF, 0xCD, 0xCB, 0xAA, 0x98, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xDF, 0xFD, 0xED, 0xCB, 0xBA, 0xA9, 0x99, 0x9A, 0xAA, 0xCD, 0xFF, 0xFF, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFF, 0xFD, 0xFD, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xDD, 0xFE, 0xFF, 0xFF, 0xCE, 0xED, 0xED, + 0xDC, 0xCC, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xEF, 0xEF, + 0xEF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDE, 0xEF, 0xDF, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xAF, 0xFF, + 0xED, 0xDC, 0xCC, 0xBB, 0xBC, 0xCC, 0xCD, 0xDE, 0xED, 0xFF, 0xED, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xEF, 0xFD, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xDD, 0xEE, 0xDB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xDD, 0xDC, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0x98, 0x76, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAC, 0xCD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xA9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xEC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xEE, 0xCC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAC, + 0xDE, 0xFC, 0xCC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x9A, 0xAB, 0xCE, 0xFF, + 0xDD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xFD, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xEF, 0xFF, 0xDE, 0xED, 0xDC, + 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFD, 0xFE, 0xED, 0xDD, 0xDC, + 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xAD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xEE, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xDD, 0xDD, 0xDD, 0xDC, 0xCC, 0x8F, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDE, 0xED, 0xDD, 0xDD, 0xFF, 0xFD, 0xFF, 0xFF, 0xFD, + 0xCC, 0xCC, 0xCC, 0xCB, 0xCD, 0xDE, 0xEF, 0xDF, 0xFF, 0xEC, 0xDB, 0xBB, + 0xAA, 0xAB, 0xBB, 0xCC, 0xDF, 0xFD, 0xFF, 0xFD, 0xCB, 0xA9, 0x99, 0x99, + 0xAA, 0xBC, 0xDD, 0xEF, 0xDF, 0xED, 0xCB, 0xA9, 0x88, 0x88, 0x88, 0x9A, + 0xBC, 0xCC, 0xFD, 0xFE, 0xDB, 0xA9, 0x87, 0x76, 0x77, 0x78, 0x9A, 0xBC, + 0xDE, 0xDF, 0xFC, 0xBA, 0x87, 0x66, 0x55, 0x67, 0x78, 0x9B, 0xBD, 0xFE, + 0xEF, 0xCA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCE, 0xED, 0xDC, + 0xA9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9A, 0xBC, 0xED, 0xED, 0xBA, 0x98, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xAC, 0xDD, 0xED, 0xDC, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xFF, 0xFF, 0xCB, 0xA9, 0x87, 0x65, 0x56, + 0x67, 0x89, 0xBC, 0xDF, 0xED, 0xDC, 0xBA, 0x98, 0x87, 0x76, 0x77, 0x89, + 0xAB, 0xCE, 0xFF, 0xCE, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x89, 0xAB, 0xDD, + 0xFF, 0xFF, 0xFD, 0xCB, 0xBA, 0xA9, 0x99, 0x9A, 0xAB, 0xCD, 0xDF, 0xFF, + 0xDF, 0xEE, 0xCC, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDF, 0xFF, 0xFE, 0xFD, + 0xDD, 0xCC, 0xBB, 0xCC, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, 0xDD, 0xDE, 0xDD, + 0xDC, 0xCD, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFC, 0xFF, 0xED, 0xDD, 0xDD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xCD, 0xCD, 0xDD, 0xEE, 0xDE, + 0xFE, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDF, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xBB, 0xBC, 0xCD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x99, 0x99, 0xAB, 0xCF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x97, 0x77, 0x89, 0xBC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDC, 0x97, 0x54, 0x46, 0x8A, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xB9, 0x74, 0x12, 0x57, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, + 0x97, 0x42, 0x24, 0x79, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xB9, 0x86, + 0x44, 0x57, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, 0x87, 0x77, + 0x8A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xAA, 0x99, 0x9A, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCC, 0xBB, 0xBB, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFD, 0xDC, 0xDD, 0xCD, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, + 0xCC, 0xCF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xBB, 0xBC, + 0xCF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBA, 0xA9, 0xAA, 0xBC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xA9, 0x88, 0x88, 0x9A, 0xBD, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0x87, 0x66, 0x78, 0x9A, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFD, 0xCA, 0x87, 0x54, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xFF, + 0xDB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, + 0x86, 0x42, 0x24, 0x68, 0xAB, 0xCD, 0xFF, 0xFF, 0xFF, 0xDB, 0xA8, 0x75, + 0x44, 0x56, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x98, 0x76, 0x66, + 0x79, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFC, 0xBA, 0xAA, 0x9A, 0xAC, 0xCC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCB, 0xBB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDF, 0xDC, 0xCC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xDC, 0xDC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCB, 0xCC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xA9, 0x9A, 0xBC, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x98, 0x77, 0x89, 0xBF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFC, 0xA8, 0x54, 0x46, 0x8A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xCA, 0x74, 0x12, 0x47, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, + 0xA7, 0x42, 0x24, 0x7A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x86, + 0x44, 0x58, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBA, 0x87, 0x78, + 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x99, 0xAB, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCC, 0xCC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCC, 0xCB, 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0x9C, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDC, 0xCC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBB, 0xBB, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBB, 0xBA, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xCC, + 0xBB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xBC, 0xCB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCC, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xDC, 0xCB, 0xBB, 0xBB, + 0xBA, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0x9C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xBB, 0xBB, 0xCC, 0xDD, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xED, 0xEE, 0xED, 0xDD, 0xDC, 0xCD, 0xDC, 0x7F, 0xFF, + 0xFF, 0xFE, 0xED, 0xDD, 0xDD, 0xFD, 0xFF, 0xEE, 0xFD, 0xFF, 0xFF, 0xDE, + 0xDD, 0xCC, 0xCC, 0xDD, 0xDD, 0xFF, 0xFF, 0xEF, 0xFF, 0xDD, 0xDC, 0xCC, + 0xBB, 0xCC, 0xBD, 0xDD, 0xEF, 0xFE, 0xFF, 0xFD, 0xDC, 0xBB, 0xAA, 0xAA, + 0xBB, 0xCD, 0xDE, 0xEF, 0xDF, 0xFE, 0xDC, 0xBA, 0x99, 0x99, 0x99, 0xAB, + 0xCC, 0xDE, 0xFD, 0xFD, 0xEC, 0xCA, 0x98, 0x87, 0x78, 0x89, 0xAB, 0xCD, + 0xFF, 0xDE, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x78, 0x9A, 0xBC, 0xDD, 0xFE, + 0xDD, 0xCB, 0xA9, 0x86, 0x54, 0x45, 0x78, 0x9A, 0xCE, 0xDF, 0xEE, 0xDC, + 0xBA, 0x97, 0x64, 0x23, 0x46, 0x79, 0xAB, 0xDD, 0xFD, 0xEE, 0xDB, 0xA9, + 0x76, 0x42, 0x24, 0x67, 0x9A, 0xBC, 0xDE, 0xEF, 0xEE, 0xCA, 0x98, 0x75, + 0x44, 0x56, 0x89, 0xAB, 0xDE, 0xFE, 0xEE, 0xDC, 0xBA, 0x88, 0x76, 0x66, + 0x78, 0x9B, 0xCD, 0xEF, 0xDD, 0xFD, 0xCB, 0xA9, 0x98, 0x77, 0x88, 0x9A, + 0xBC, 0xDF, 0xFF, 0xDF, 0xDD, 0xCB, 0xA9, 0x99, 0x99, 0x9A, 0xBC, 0xDE, + 0xFF, 0xFD, 0xEE, 0xDD, 0xCB, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFF, 0xFF, + 0xDF, 0xFD, 0xDC, 0xCC, 0xBC, 0xCB, 0xCC, 0xCE, 0xFF, 0xFF, 0xFD, 0xEF, + 0xFE, 0xDD, 0xDC, 0xCD, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xCF, 0xEE, 0xDD, + 0xEE, 0xDE, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xDF, 0xFF, + 0xFE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCD, 0xCC, 0xDD, 0xEE, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCF, 0xDF, 0xDC, 0xCB, 0xCD, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, + 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCC, 0xBC, + 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xAA, 0xBB, 0xBC, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, 0x98, 0x89, 0xAB, 0xCD, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0x87, 0x66, 0x78, 0xAB, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCB, 0x97, 0x54, 0x45, 0x79, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFC, 0xB9, 0x64, 0x22, 0x46, 0x9A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, + 0x86, 0x42, 0x23, 0x68, 0xAC, 0xDF, 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x75, + 0x44, 0x57, 0x9B, 0xCF, 0xDF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA8, 0x76, 0x67, + 0x8A, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xA9, 0x88, 0x9A, 0xBC, + 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, 0xBB, 0xAB, 0xBC, 0xCF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFD, 0xDF, 0xCC, 0xCC, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xDD, 0xDF, 0xFD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFD, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCD, 0xDD, + 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xBB, 0xBB, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, 0xA9, 0xAA, 0xBC, 0xDD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x97, 0x77, 0x89, 0xAC, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFC, 0xA8, 0x64, 0x46, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xB9, 0x74, 0x12, 0x47, 0x9B, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, + 0x97, 0x42, 0x24, 0x79, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xBA, 0x86, + 0x44, 0x58, 0x9C, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xA9, 0x87, 0x78, + 0x9A, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xBA, 0x99, 0xAB, 0xBD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xCC, 0xBB, 0xBC, 0xCE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xDC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xFF, 0xFF, 0xFF, 0xDF, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xED, 0xCC, 0xED, 0xBB, 0xCB, 0xBB, 0xCC, 0xBC, 0xCC, 0x6D, 0xFF, + 0xED, 0xDC, 0xCC, 0xBD, 0xCC, 0xDC, 0xEE, 0xFF, 0xFC, 0xED, 0xDF, 0xCD, + 0xCC, 0xCB, 0xCC, 0xCD, 0xCD, 0xDE, 0xFF, 0xCF, 0xED, 0xEC, 0xCB, 0xBA, + 0xBB, 0xBB, 0xCC, 0xCC, 0xDD, 0xFC, 0xDD, 0xDC, 0xBA, 0xBA, 0xA9, 0x9A, + 0xAA, 0xBB, 0xCD, 0xEF, 0xDC, 0xDC, 0xCB, 0xA9, 0x98, 0x88, 0x99, 0x9B, + 0xBC, 0xCD, 0xFD, 0xBC, 0xCB, 0xAA, 0x98, 0x77, 0x77, 0x89, 0xAA, 0xBD, + 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x56, 0x67, 0x89, 0xAB, 0xCC, 0xDC, + 0xBC, 0xBB, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xCE, 0xDC, 0xDB, + 0xB9, 0x87, 0x64, 0x23, 0x46, 0x78, 0xAB, 0xBC, 0xEC, 0xCC, 0xBA, 0x98, + 0x76, 0x43, 0x34, 0x57, 0x89, 0xBB, 0xCD, 0xDB, 0xCB, 0xBA, 0x97, 0x65, + 0x44, 0x56, 0x78, 0x9B, 0xBD, 0xDD, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x56, + 0x78, 0x9A, 0xBB, 0xDF, 0xEB, 0xDC, 0xBA, 0xA9, 0x87, 0x77, 0x78, 0x8A, + 0xBB, 0xCD, 0xFD, 0xCC, 0xDB, 0xBB, 0x99, 0x98, 0x88, 0x9A, 0xAA, 0xBC, + 0xDF, 0xDC, 0xDD, 0xBC, 0xBB, 0xAA, 0x99, 0xAA, 0xAB, 0xBC, 0xCE, 0xFE, + 0xDF, 0xFD, 0xCC, 0xBB, 0xAA, 0xBB, 0xBB, 0xCC, 0xDC, 0xFF, 0xEC, 0xFF, + 0xDC, 0xDC, 0xCC, 0xBB, 0xBC, 0xCD, 0xED, 0xED, 0xFE, 0xDE, 0xEE, 0xED, + 0xCD, 0xCC, 0xCC, 0xDD, 0xDD, 0xEF, 0xEF, 0xEC, 0xEF, 0xFE, 0xED, 0xED, + 0xDE, 0xED, 0xEE, 0xFE, 0xFF, 0xFF, 0x6C, 0xCC, 0xDD, 0xDD, 0xDD, 0xBC, + 0xCC, 0xED, 0xDD, 0xEF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xCF, 0xFF, + 0xFF, 0xDD, 0xDC, 0xCC, 0xCD, 0xDE, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, + 0xCB, 0xBA, 0xAA, 0xBB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0xA9, + 0x99, 0x9A, 0xAA, 0xBC, 0xEF, 0xFF, 0xFD, 0xDC, 0xBA, 0x98, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDF, 0xFF, 0xDD, 0xBA, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xBC, 0xFF, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xED, 0xDB, 0xA8, 0x76, 0x65, 0x55, 0x56, 0x78, 0x89, 0xBC, 0xDF, + 0xDC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xED, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xEF, 0xDC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xFD, 0xDA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDF, 0xDC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xDF, 0xFD, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBE, 0xEF, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDF, 0xFE, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x9A, 0xBC, 0xFE, 0xFF, + 0xFE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, 0xFF, 0xFD, + 0xDC, 0xBB, 0xBB, 0xAA, 0xBB, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, + 0xDC, 0xCC, 0xCD, 0xCE, 0xEF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xDF, 0xDD, + 0xED, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFE, 0xFF, 0xFD, 0xEC, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFD, 0xDD, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, + 0xED, 0xCC, 0xCD, 0xFF, 0xED, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFD, 0xCC, 0xCB, 0xBB, + 0xBD, 0xFD, 0xEF, 0xFF, 0xDF, 0xEE, 0xFD, 0xCB, 0xBA, 0xA9, 0xAB, 0xBC, + 0xDD, 0xDF, 0xFF, 0xFF, 0xDC, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFE, 0xDC, 0xA9, 0x87, 0x66, 0x78, 0x9B, 0xCC, 0xDD, 0xFE, + 0xED, 0xDC, 0xBA, 0x97, 0x54, 0x45, 0x79, 0xAB, 0xDD, 0xFF, 0xFD, 0xDD, + 0xCB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBC, 0xDF, 0xFE, 0xDD, 0xDC, 0xBA, + 0x86, 0x42, 0x24, 0x68, 0xAB, 0xCD, 0xFF, 0xED, 0xDD, 0xCB, 0xA9, 0x75, + 0x44, 0x57, 0x8A, 0xBD, 0xDF, 0xFF, 0xDF, 0xDD, 0xCB, 0x98, 0x76, 0x67, + 0x89, 0xBC, 0xCD, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xDE, 0xFE, 0xDF, 0xFD, 0xED, 0xBB, 0xA9, 0xAA, 0xBC, 0xCD, 0xDF, + 0xFF, 0xEF, 0xFF, 0xFF, 0xDC, 0xCA, 0xBB, 0xBC, 0xCD, 0xDF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xDC, 0xDD, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, + 0xFF, 0xEF, 0xDD, 0xDC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, + 0xDF, 0xDD, 0xFD, 0xFD, 0xFF, 0xFF, 0xFF, 0xFD, 0xED, 0xFF, 0xFE, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xDD, 0xDC, 0xCC, 0xFD, 0xFD, + 0xDD, 0xDF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xDF, 0xFD, 0xCD, 0xDC, 0xFD, 0xDD, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xCD, 0xFF, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, + 0xCC, 0xCD, 0xDE, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, 0xBB, 0xCB, + 0xCC, 0xCF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFD, 0xCB, 0xAA, 0xA9, 0xAA, 0xBC, + 0xCD, 0xFF, 0xFF, 0xFF, 0xDF, 0xBB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x87, 0x66, 0x78, 0x9A, 0xCC, 0xFF, 0xFD, + 0xFF, 0xDC, 0xBA, 0x87, 0x54, 0x45, 0x79, 0xAB, 0xDC, 0xDF, 0xFF, 0xFD, + 0xCA, 0x98, 0x64, 0x22, 0x46, 0x8A, 0xBD, 0xFF, 0xFF, 0xDF, 0xDC, 0xB9, + 0x86, 0x42, 0x24, 0x68, 0x9C, 0xCF, 0xDF, 0xFF, 0xFF, 0xCB, 0xA9, 0x75, + 0x44, 0x56, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xDD, 0xBB, 0x98, 0x76, 0x66, + 0x79, 0xAB, 0xDF, 0xFF, 0xFF, 0xFF, 0xCC, 0xBA, 0x99, 0x88, 0x89, 0xAB, + 0xDD, 0xFF, 0xFF, 0xEF, 0xFF, 0xCC, 0xBA, 0xAA, 0xAA, 0xAB, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xBB, 0xBC, 0xCD, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xDD, 0xDC, 0xDD, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xFF, 0xDD, 0xDF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, + 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7D, 0xDD, 0xDF, 0xFD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xBC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xA9, 0x9A, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x98, 0x77, 0x89, 0xAF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFB, 0xA8, 0x64, 0x46, 0x8A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xB9, 0x74, 0x12, 0x47, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, + 0x97, 0x42, 0x24, 0x79, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0x86, + 0x44, 0x57, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x87, 0x78, + 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x99, 0xAA, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFB, 0xBB, 0xEF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCD, 0xCC, 0xCF, 0xBB, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xBC, + 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x99, 0xAA, 0xBC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x98, 0x88, 0xAA, 0xBF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCD, 0xB9, 0x87, 0x66, 0x78, 0x9A, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCA, 0x87, 0x54, 0x45, 0x79, 0xAB, 0xDF, 0xFF, 0xFF, 0xFD, + 0xFB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, + 0x86, 0x42, 0x24, 0x68, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA8, 0x75, + 0x44, 0x56, 0x9B, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0x98, 0x76, 0x66, + 0x89, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x98, 0x88, 0x89, 0xBB, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFB, 0xCB, 0xAA, 0xAA, 0xBC, 0xDF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCC, 0xAB, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFC, 0xCD, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xBC, 0xCF, 0xFF, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDC, 0xDB, 0xBA, 0xAA, 0xA9, 0xAA, 0xA9, 0xAB, 0xBB, 0xCC, 0xAF, 0xFD, + 0xBB, 0xBA, 0xA9, 0xAA, 0x9A, 0xAB, 0xBB, 0xCD, 0xDC, 0xCB, 0xBB, 0xAA, + 0x99, 0x99, 0x89, 0x9A, 0xAA, 0xBB, 0xCC, 0xCC, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xAB, 0xCB, 0xBB, 0xB9, 0x88, 0x87, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBB, 0xCA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xCA, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xAB, 0xBB, 0xAA, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xAA, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x77, 0x89, 0x9B, 0xAA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x66, 0x78, 0x99, 0xAB, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9C, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x9A, 0xBB, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0x9A, 0xBA, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x67, 0x77, + 0x88, 0x9B, 0xBC, 0xAA, 0x99, 0x98, 0x77, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCA, 0xAA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x89, 0x99, 0xAB, 0xDD, + 0xCB, 0xCB, 0xA9, 0x89, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCB, 0xDC, + 0xBA, 0xA9, 0x99, 0x98, 0x99, 0x9A, 0xBA, 0xBC, 0xDC, 0xEC, 0xCC, 0xAB, + 0xBA, 0x9A, 0x9A, 0xAA, 0xAB, 0xBC, 0xEF, 0xEC, 0xEC, 0xCB, 0xBB, 0xBB, + 0xBA, 0xBB, 0xBB, 0xCC, 0xDC, 0xEE, 0xAC, 0xBC, 0xCB, 0xBA, 0xCA, 0xBA, + 0xBC, 0xBB, 0xDD, 0xDD, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xDF, 0xCC, 0xED, 0xBA, 0xBC, 0xCB, 0xBB, 0xBB, 0xCF, 0x6F, 0xFF, + 0xDC, 0xFF, 0xEF, 0xED, 0xFD, 0xFF, 0xFF, 0xFF, 0xFD, 0xDF, 0xFF, 0xFD, + 0xFF, 0xDC, 0xDF, 0xFD, 0xFD, 0xFD, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDC, + 0xBB, 0xCB, 0xFC, 0xFF, 0xFF, 0xFC, 0xCF, 0xFC, 0xFF, 0xCB, 0xBB, 0xAB, + 0xCC, 0xBF, 0xFD, 0xFF, 0xFF, 0xFF, 0xCB, 0xBB, 0xA9, 0xA9, 0xAC, 0xBE, + 0xEE, 0xFE, 0xED, 0xCF, 0xFF, 0xDA, 0xA9, 0x88, 0x88, 0xAA, 0xCD, 0xCD, + 0xFF, 0xDC, 0xFF, 0xFB, 0xA9, 0x86, 0x66, 0x78, 0xAB, 0xCC, 0xFD, 0xFC, + 0xCF, 0xDD, 0xDA, 0x86, 0x54, 0x46, 0x79, 0xAD, 0xCF, 0xFF, 0xCC, 0xFF, + 0xCB, 0xA9, 0x64, 0x22, 0x47, 0x8A, 0xCB, 0xFF, 0xFF, 0xCF, 0xFD, 0xB9, + 0x86, 0x42, 0x24, 0x68, 0x9B, 0xCE, 0xFD, 0xCC, 0xFD, 0xBB, 0xA9, 0x76, + 0x44, 0x57, 0x8A, 0xBC, 0xEE, 0xDE, 0xED, 0xFF, 0xDB, 0xA8, 0x76, 0x66, + 0x78, 0xAC, 0xCD, 0xDF, 0xFD, 0xFF, 0xFB, 0xCB, 0xA9, 0x88, 0x89, 0x9B, + 0xCF, 0xCF, 0xFF, 0xDF, 0xFC, 0xDF, 0xCA, 0xA9, 0xAA, 0xAA, 0xCF, 0xDD, + 0xFF, 0xFC, 0xFF, 0xFD, 0xCC, 0xCC, 0xBB, 0xAB, 0xCC, 0xCF, 0xFF, 0xFC, + 0xCF, 0xDD, 0xFC, 0xFF, 0xCB, 0xCD, 0xFF, 0xDF, 0xFF, 0xFF, 0xFC, 0xFF, + 0xDF, 0xDF, 0xCF, 0xFC, 0xCF, 0xFF, 0xFF, 0xDF, 0xFD, 0xCF, 0xFF, 0xCF, + 0xFF, 0xFC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xFF, 0xFF, 0xFF, 0xCF, + 0xFD, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x6D, 0xCC, 0xCD, 0xBD, 0xDC, 0xFD, + 0xCD, 0xCF, 0xFF, 0xFF, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, + 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xCB, 0xCC, + 0xCC, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xBA, 0xA9, 0xAA, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xA9, 0x88, 0x88, 0x9A, 0xBF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFB, 0xB9, 0x86, 0x66, 0x78, 0x9A, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xB9, 0x87, 0x54, 0x45, 0x78, 0xAC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBC, 0xFF, 0xFF, 0xFF, 0xFC, 0xCA, + 0x86, 0x42, 0x24, 0x68, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA8, 0x75, + 0x44, 0x56, 0x8A, 0xCC, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x98, 0x76, 0x66, + 0x89, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x98, 0x88, 0x89, 0xAC, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xCB, 0xAA, 0xA9, 0xBB, 0xCF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xBB, 0xCF, 0xEF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0x9F, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x9C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x65, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x94, 0x12, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF8, 0x52, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, + 0x54, 0x78, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x87, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF9, 0x74, 0x57, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0x85, 0x12, 0x59, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0x52, 0x14, 0x89, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x97, + 0x54, 0x67, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x89, + 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xF6, 0xF6, 0x6F, 0x68, 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, + 0x66, 0xF6, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF6, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0xF6, 0x6F, + 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0x6F, 0x66, 0x66, 0xFF, 0x6F, 0xF6, + 0xFF, 0xFF, 0x6F, 0xCF, 0xFF, 0x6F, 0xFF, 0xF6, 0x6F, 0x6F, 0xFF, 0x6F, + 0xFF, 0xF6, 0x56, 0xF6, 0xF6, 0x56, 0xFF, 0xFF, 0x66, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x65, 0x56, 0x6F, 0xFF, 0xF6, 0xFF, 0x6F, 0xFF, 0xFF, + 0xF6, 0x66, 0xF6, 0xFF, 0x66, 0x6F, 0xFF, 0x6F, 0xFF, 0x6F, 0xF6, 0xFF, + 0x66, 0x6F, 0x56, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x6F, + 0x46, 0xF5, 0x6F, 0x6F, 0xFF, 0xF5, 0x6B, 0xAF, 0xFF, 0x5F, 0xFF, 0xFF, + 0x6F, 0x6F, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xF6, 0x66, 0xF5, 0xFF, + 0x5F, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xF5, 0x55, 0xF6, 0xF6, 0xFF, + 0xFF, 0x6F, 0xFF, 0xFF, 0x6F, 0xF6, 0xFF, 0xF6, 0xF6, 0xFF, 0xFF, 0xFF, + 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xF6, 0x6F, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xF6, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0x6F, + 0xF6, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0x6F, 0x6F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0x9F, 0x4F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xF9, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF8, 0x67, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF8, 0x97, 0x54, 0x47, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x8F, 0x74, 0x12, 0x57, 0x8F, 0xF9, 0xFF, 0xFF, 0x9F, 0xFF, 0x9F, + 0x98, 0x52, 0x24, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, + 0x54, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF8, + 0x9F, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0x89, 0xFF, + 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xF9, 0x99, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xBA, 0xFF, 0xFF, 0xBF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0x77, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF8, 0x54, 0x45, 0x9A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0x84, 0x22, 0x47, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xA8, 0x42, 0x14, 0x7A, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x96, + 0x44, 0x59, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x97, 0x78, + 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFA, 0xBF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBF, 0xFB, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x7F, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x76, 0xF7, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0x6F, 0x67, 0x6F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF7, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF7, 0x55, 0x44, 0x46, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0xF5, 0x54, 0x44, 0x57, 0x66, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, + 0x75, 0x44, 0x34, 0x46, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x55, + 0x45, 0x45, 0x56, 0xFF, 0xFF, 0xFF, 0xFD, 0xCF, 0x6F, 0x7F, 0x75, 0x57, + 0x56, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x76, 0x66, 0x7F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F, 0xF7, 0x7F, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x7F, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFC, 0x44, 0x45, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x73, 0x22, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0x42, 0x24, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x86, + 0x43, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x77, + 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF9, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x75, 0x67, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0x76, 0x43, 0x46, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF6, 0x63, 0x23, 0x58, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xAF, 0x43, 0x23, 0x57, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0x85, + 0x54, 0x45, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xF7, 0x55, + 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xBF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xAF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x87, 0x88, 0x9F, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x87, 0x66, 0x78, 0xAF, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xBF, 0xA7, 0x54, 0x45, 0x6A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF7, 0x64, 0x22, 0x46, 0x89, 0xDF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, + 0x76, 0x42, 0x24, 0x68, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x75, + 0x44, 0x57, 0xA9, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0x97, 0x76, 0x67, + 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xBA, 0x98, 0x8A, 0xBB, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFA, 0xAF, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x9F, 0xFF, 0xCF, 0x99, 0xFF, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x78, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0x84, 0x22, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0x42, 0x14, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, + 0x44, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x88, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xEE, 0xEF, 0xFF, 0xFF, 0x3F, 0xFF, + 0xFE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, + 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x64, 0x56, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF3, 0x12, 0x46, 0xFF, 0xFE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0x52, 0x24, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0x44, 0x6E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xFE, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0x83, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF4, 0x12, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0x42, 0x24, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, + 0x44, 0x77, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x8F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + }, + { + { + 0xBE, 0xDD, 0xEC, 0xDD, 0xDD, 0xDC, 0xDE, 0xEE, 0xFF, 0xFF, 0xCD, 0xFE, + 0xFD, 0xDD, 0xDC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFF, 0xFF, 0xDE, 0xFD, 0xCC, + 0xCC, 0xBB, 0xBB, 0xCC, 0xCD, 0xFF, 0xFF, 0xFD, 0xED, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xFF, 0xFF, 0xDF, 0xEC, 0xBB, 0xA9, 0x99, 0x99, + 0x99, 0xAB, 0xCD, 0xFF, 0xFD, 0xEC, 0xBB, 0xA9, 0x88, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xFE, 0xED, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xFC, 0xDC, 0xA9, 0x87, 0x76, 0x65, 0x66, 0x67, 0x89, 0xBC, 0xDF, + 0xDC, 0xCA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDD, 0xDB, + 0xA9, 0x87, 0x65, 0x54, 0x55, 0x56, 0x79, 0xAC, 0xDD, 0xDC, 0xBA, 0x97, + 0x65, 0x54, 0x44, 0x55, 0x67, 0x8A, 0xBD, 0xDE, 0xCB, 0xA9, 0x76, 0x65, + 0x54, 0x55, 0x66, 0x79, 0xAB, 0xCD, 0xED, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xBD, 0xDE, 0xDC, 0xB9, 0x87, 0x66, 0x65, 0x66, 0x77, + 0x89, 0xAC, 0xDC, 0xEF, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDF, 0xFE, 0xCB, 0xA9, 0x88, 0x77, 0x78, 0x89, 0xAB, 0xCC, 0xED, + 0xFF, 0xED, 0xCB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDF, 0xDF, 0xFF, + 0xED, 0xCC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFD, 0xFF, 0xFF, 0xFE, + 0xDC, 0xCB, 0xBB, 0xBC, 0xCC, 0xEE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFE, 0xEE, + 0xCC, 0xDD, 0xDD, 0xDF, 0xEF, 0xFF, 0xDF, 0xFF, 0xFE, 0xFF, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAD, 0xCB, 0xBB, 0xBC, 0xCB, 0xFC, 0xDB, 0xCD, 0xFF, 0xFF, 0xCF, 0xFF, + 0xBD, 0xCC, 0xDC, 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xCC, 0xDC, + 0xBB, 0xAB, 0xBA, 0xBC, 0xCD, 0xDD, 0xDD, 0xFB, 0xDD, 0xFB, 0xAB, 0xAA, + 0x9A, 0xAA, 0xAA, 0xBC, 0xFF, 0xFF, 0xCF, 0xFC, 0xCB, 0xBA, 0x99, 0x99, + 0x99, 0xAB, 0xBC, 0xCF, 0xFB, 0xDB, 0xBA, 0xA9, 0x98, 0x87, 0x78, 0x88, + 0xAA, 0xBC, 0xDF, 0xCF, 0xFB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, 0xAA, + 0xBF, 0xCF, 0xCC, 0xA9, 0x98, 0x76, 0x65, 0x56, 0x67, 0x89, 0xAB, 0xFC, + 0xCB, 0xDA, 0xA8, 0x76, 0x65, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xFB, + 0xA9, 0x87, 0x65, 0x44, 0x45, 0x56, 0x79, 0x9B, 0xCC, 0xBF, 0xBA, 0x97, + 0x75, 0x54, 0x44, 0x56, 0x68, 0x9A, 0xBE, 0xFB, 0xDB, 0xA9, 0x86, 0x65, + 0x44, 0x45, 0x67, 0x89, 0xAA, 0xCC, 0xDF, 0xBB, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xAC, 0xDC, 0xFC, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x8A, 0xAB, 0xBB, 0xFC, 0xBC, 0xB9, 0x87, 0x76, 0x77, 0x77, 0x89, 0xAB, + 0xDC, 0xBC, 0xFC, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xCB, 0xCB, + 0xFF, 0xFC, 0xCA, 0xAA, 0x99, 0x99, 0xA9, 0x9B, 0xBC, 0xCD, 0xDF, 0xFF, + 0xCF, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCF, 0xDD, 0xFF, 0xFF, 0xFD, + 0xCC, 0xCB, 0xBB, 0xCC, 0xBB, 0xDB, 0xFF, 0xCF, 0xFF, 0xFF, 0xDD, 0xFD, + 0xBF, 0xDC, 0xCB, 0xBF, 0xDF, 0xFC, 0xFF, 0xFF, 0xFE, 0xED, 0xFF, 0xCB, + 0xBC, 0xDC, 0xBC, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDF, 0xDD, 0xDD, 0xDC, 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xDF, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCC, 0xCD, 0xDE, 0xEF, 0xFF, 0xFF, 0xEF, 0xFD, 0xDC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFD, 0xFE, 0xDC, 0xBB, 0xAA, + 0x9A, 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, 0xDF, 0xDC, 0xBA, 0xA9, 0x98, 0x88, + 0x89, 0xAA, 0xBD, 0xDF, 0xFD, 0xEC, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xEF, 0xDD, 0xCB, 0x99, 0x87, 0x76, 0x66, 0x67, 0x88, 0xAB, + 0xCD, 0xFD, 0xDB, 0xA9, 0x87, 0x66, 0x65, 0x56, 0x67, 0x89, 0xAB, 0xED, + 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x77, 0x8A, 0xBD, 0xDD, 0xCB, + 0xA8, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0xAB, 0xCD, 0xDC, 0xB9, 0x87, + 0x65, 0x55, 0x44, 0x55, 0x67, 0x89, 0xBD, 0xDD, 0xCB, 0xA8, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9B, 0xCD, 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xDB, 0xA9, 0x87, 0x66, 0x65, 0x66, 0x67, + 0x89, 0xAB, 0xDD, 0xED, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0x9B, + 0xCC, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x78, 0x89, 0x9A, 0xBC, 0xED, + 0xFF, 0xDD, 0xBA, 0xA9, 0x98, 0x88, 0x89, 0xAA, 0xBC, 0xDD, 0xDF, 0xFF, + 0xFD, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xED, 0xFF, 0xFE, 0xFD, + 0xCB, 0xBB, 0xBB, 0xBC, 0xBC, 0xDD, 0xEF, 0xEF, 0xFF, 0xFF, 0xFE, 0xDC, + 0xCC, 0xCC, 0xCC, 0xDE, 0xDF, 0xFE, 0xDF, 0xFF, 0xFF, 0xFE, 0xDD, 0xDC, + 0xCD, 0xDD, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xED, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x4D, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xE3, 0xEE, 0xE4, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x3E, 0x4E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0x44, 0x44, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0x44, 0x4D, 0xDD, 0xD4, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD4, 0xD3, + 0x3D, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xE4, 0xE4, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, 0x44, 0xEE, + 0xE4, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE4, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0xED, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xED, 0xED, 0xED, 0xEE, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xAD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDC, 0xFD, 0xFF, 0xFF, 0xFF, 0xDD, 0xFF, + 0xDF, 0xDD, 0xCC, 0xCC, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xEF, 0xDD, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDF, 0xFF, 0xFE, 0xFD, 0xEC, 0xBB, 0xAA, + 0x9A, 0xAA, 0xAB, 0xCD, 0xDF, 0xFF, 0xCD, 0xCD, 0xBA, 0xA9, 0x98, 0x88, + 0x99, 0x9A, 0xCD, 0xDF, 0xFD, 0xDC, 0xBA, 0xA9, 0x88, 0x77, 0x78, 0x89, + 0x9A, 0xBD, 0xFF, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0x9A, + 0xDF, 0xFC, 0xDB, 0xB9, 0x87, 0x66, 0x65, 0x66, 0x67, 0x89, 0xAC, 0xDD, + 0xDD, 0xBA, 0x98, 0x76, 0x55, 0x55, 0x56, 0x78, 0x8A, 0xCD, 0xED, 0xCB, + 0xA8, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9B, 0xDE, 0xDC, 0xBA, 0x87, + 0x65, 0x55, 0x45, 0x55, 0x67, 0x8A, 0xBD, 0xCD, 0xCB, 0xA8, 0x76, 0x55, + 0x54, 0x55, 0x56, 0x78, 0xAB, 0xCD, 0xED, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x56, 0x78, 0x9A, 0xBC, 0xCD, 0xFB, 0xA9, 0x87, 0x66, 0x65, 0x66, 0x67, + 0x89, 0xAB, 0xCD, 0xFF, 0xDB, 0xA8, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xCC, 0xDF, 0xFD, 0xCA, 0x98, 0x88, 0x77, 0x77, 0x89, 0x9A, 0xBC, 0xED, + 0xFF, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x99, 0xAA, 0xBC, 0xDD, 0xDF, 0xFF, + 0xDC, 0xCB, 0xAA, 0xAA, 0x9A, 0xAB, 0xBC, 0xCE, 0xED, 0xFF, 0xFF, 0xFD, + 0xCC, 0xBB, 0xBC, 0xBB, 0xCC, 0xDD, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDC, + 0xCC, 0xCD, 0xDC, 0xDF, 0xFF, 0xEF, 0xDF, 0xFF, 0xFE, 0xFC, 0xEC, 0xCD, + 0xCC, 0xDD, 0xCD, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBB, 0xBB, 0xBA, 0xAB, 0xBB, 0xCC, 0xCC, 0xEF, 0xBC, 0xDD, + 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xEE, 0xFE, 0xCC, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xEC, 0xCC, 0xBA, 0xAA, 0x99, + 0x98, 0x99, 0x9A, 0xAB, 0xBC, 0xDD, 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xDB, 0xBB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xCC, 0xBB, 0xAA, 0x98, 0x77, 0x76, 0x66, 0x77, 0x78, 0x9A, + 0xAC, 0xCB, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBB, 0xBA, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xAB, 0xBB, 0x99, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x67, 0x89, 0xAA, 0xAB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x67, + 0x88, 0x9A, 0xBB, 0xCC, 0xAA, 0x98, 0x77, 0x76, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xBC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xCC, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBD, 0xDD, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xEE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCF, 0xFE, 0xDD, 0xCC, 0xBB, + 0xBA, 0xBB, 0xBB, 0xBC, 0xCD, 0xDC, 0xCE, 0xDD, 0xDC, 0xCB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDD, 0xBC, 0xDC, + 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAB, 0xCB, 0xCD, 0xEE, 0xBD, 0xCC, 0xBB, + 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xDB, 0xCC, 0xAA, 0xA9, 0x99, + 0x88, 0x89, 0x99, 0x9A, 0xBC, 0xDC, 0xBC, 0xBA, 0x99, 0x98, 0x88, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xCB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAB, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBA, + 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x89, 0xAA, 0xAA, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAB, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, + 0x88, 0x9A, 0xAA, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xAB, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0xAB, 0xBB, + 0xCC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBC, 0xBC, 0xCB, + 0xBA, 0x99, 0x99, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xDD, 0xDC, 0xBA, + 0xA9, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCD, 0xBE, 0xEE, 0xCC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDB, 0xCD, 0xEC, 0xBB, 0xBB, 0xBA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBB, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xCA, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, + 0x88, 0x88, 0x9A, 0xAB, 0xBA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x77, 0x89, + 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0x99, 0xA9, + 0x88, 0x76, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0xA9, 0x9A, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x67, 0x78, 0x9A, 0x99, 0xA9, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x66, 0x77, 0x89, 0xA9, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x9A, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x99, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0x9A, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xAA, + 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x78, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xCB, + 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBD, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xCC, 0xCB, 0xBA, 0xAA, 0x99, 0x99, + 0x99, 0xAA, 0xAA, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xCC, 0xCB, + 0xBC, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xAC, 0xCD, 0xDE, 0xBD, 0xCB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCA, 0xBC, 0xBA, 0x99, 0x98, + 0x88, 0x89, 0x89, 0x9A, 0xBB, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xCC, 0xAA, 0xA9, 0x88, 0x87, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xBA, 0xB9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, 0x78, 0x99, 0xAA, + 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, 0xA9, + 0x87, 0x76, 0x66, 0x65, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x65, 0x55, 0x66, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, + 0x78, 0x9A, 0xBA, 0xAB, 0xA9, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAA, 0xBB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0xAB, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBD, 0xBB, + 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBB, 0xDD, 0xCB, 0xAB, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xBC, 0xBD, 0xDC, 0xBB, 0xBB, 0xAA, + 0xA9, 0xAA, 0xAA, 0xBB, 0xDC, 0xDC, 0xBE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9C, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xCB, 0xEC, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xEE, 0xBD, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCE, 0xDB, 0xCB, 0xBA, 0xA9, 0x99, + 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xDC, 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, + 0x88, 0x99, 0xAA, 0xBC, 0xCB, 0xBB, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xBC, 0xAB, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xAA, 0x99, 0x87, 0x76, 0x66, 0x55, 0x66, 0x67, 0x89, 0x9A, 0xAA, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x66, 0x78, 0x99, 0xAA, 0xAB, 0x99, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x77, 0x89, 0x9A, 0xAB, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xBB, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xBB, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xCC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBC, 0xDC, + 0xBA, 0xA9, 0x99, 0x88, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xDC, 0xBB, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCD, 0xBD, 0xED, 0xCC, 0xBB, 0xBB, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xBD, 0xDC, 0xCB, 0xBB, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBB, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xED, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xEF, 0xBF, 0xFF, + 0xFD, 0xDD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xED, 0xDC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFD, 0xFE, 0xDC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xCC, 0xEF, 0xFF, 0xFF, 0xDE, 0xDC, 0xBB, 0xAA, 0x99, 0x99, + 0xAA, 0xBC, 0xDF, 0xFF, 0xED, 0xEC, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x9A, + 0xBD, 0xEF, 0xFF, 0xDD, 0xCB, 0xA9, 0x88, 0x76, 0x67, 0x78, 0x9A, 0xCD, + 0xEF, 0xFD, 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xEE, + 0xDE, 0xCB, 0x98, 0x76, 0x54, 0x44, 0x56, 0x79, 0xAC, 0xDE, 0xED, 0xDC, + 0xB9, 0x87, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xED, 0xDE, 0xCB, 0x98, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xDE, 0xFC, 0xB9, 0x87, 0x55, + 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xEE, 0xDB, 0xA8, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xCE, 0xEF, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9B, 0xBD, 0xED, 0xFF, 0xFD, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDF, 0xFE, 0xDC, 0xBA, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xED, + 0xFF, 0xFF, 0xEC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xFE, 0xEF, 0xFF, + 0xFF, 0xEC, 0xDC, 0xBB, 0xBB, 0xCC, 0xCC, 0xDE, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFE, 0xED, 0xDC, 0xCD, 0xDD, 0xDE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEE, 0xFE, 0xDE, 0xEE, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xEE, 0xDD, 0xDE, + 0xFE, 0xDD, 0xDE, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xDD, 0xDC, 0xCC, 0xBC, 0xCD, 0xDD, 0xDF, 0xFF, 0xFF, 0xCD, 0xDF, + 0xDC, 0xCB, 0xCB, 0xCB, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, 0xDE, 0xDC, 0xCC, + 0xBB, 0xBA, 0xAB, 0xBB, 0xCD, 0xFF, 0xFF, 0xFC, 0xDD, 0xBB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCD, 0xDF, 0xFF, 0xDC, 0xBB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAB, 0xBC, 0xDF, 0xFC, 0xCC, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xBD, 0xFF, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xDD, 0xFC, 0xCA, 0x99, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xFF, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBE, 0xEC, 0xBA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDD, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x78, 0xAB, 0xCC, 0xCC, 0xBA, 0x97, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDF, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCD, 0xDD, 0xDB, 0xA8, 0x87, 0x77, 0x67, 0x77, 0x89, 0xAA, + 0xBD, 0xFF, 0xDD, 0xCA, 0xA9, 0x88, 0x77, 0x88, 0x89, 0x9A, 0xBC, 0xDC, + 0xFF, 0xFD, 0xCB, 0xAA, 0x99, 0x89, 0x99, 0xAA, 0xBC, 0xCF, 0xCF, 0xFF, + 0xFD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDC, 0xFF, 0xFF, 0xFF, 0xFD, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, + 0xCC, 0xCC, 0xDD, 0xCC, 0xFE, 0xDF, 0xDF, 0xFF, 0xFF, 0xDD, 0xCC, 0xCD, + 0xCC, 0xCF, 0xDD, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xDD, 0xED, 0xED, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xCE, 0xFF, + 0xFF, 0xFE, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFE, 0xFE, 0xED, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCD, 0xEF, 0xFF, 0xFF, 0xDE, 0xDD, 0xBB, 0xAA, 0x99, 0x99, + 0xAB, 0xCD, 0xED, 0xFF, 0xFE, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x9A, + 0xBD, 0xEF, 0xFF, 0xDF, 0xDC, 0xB9, 0x87, 0x76, 0x67, 0x78, 0x9A, 0xCE, + 0xFF, 0xFE, 0xDD, 0xBA, 0x97, 0x76, 0x55, 0x56, 0x78, 0x9B, 0xCE, 0xFF, + 0xED, 0xDB, 0xA8, 0x76, 0x54, 0x44, 0x56, 0x79, 0xAC, 0xEF, 0xEE, 0xEC, + 0xB9, 0x86, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xFE, 0xEE, 0xCB, 0x98, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAC, 0xEF, 0xFD, 0xEC, 0xB9, 0x87, 0x55, + 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xFD, 0xEF, 0xDB, 0xA8, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDF, 0xEE, 0xFD, 0xCB, 0x98, 0x76, 0x66, 0x67, 0x78, + 0xAB, 0xCD, 0xEE, 0xFF, 0xFD, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDF, 0xEF, 0xFF, 0xED, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xEE, + 0xFF, 0xFF, 0xDC, 0xCB, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEE, 0xEF, 0xFF, + 0xFF, 0xED, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEF, 0xFE, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEE, 0xFE, 0xEF, 0xFF, 0xFF, 0xFF, 0xBF, 0xEF, 0xFF, 0xEE, 0xED, 0xEE, + 0xED, 0xFE, 0xFE, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBB, 0xBB, 0xBB, 0xAB, 0xBB, 0xCC, 0xCD, 0xDE, 0xBC, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDF, 0xFD, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEE, 0xEB, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xAB, 0xCD, 0xDD, 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xCD, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xCC, 0xBB, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x65, 0x66, 0x77, 0x89, 0xAB, 0xBB, + 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, + 0x98, 0x76, 0x65, 0x54, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xBC, 0xCB, 0xBA, 0x99, 0x88, 0x87, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xCD, 0xCB, 0xBA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCD, 0xDD, + 0xCB, 0xBA, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xDE, 0xDD, 0xCB, + 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCE, 0xEE, 0xDD, 0xCC, 0xCB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEC, 0xBD, 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xAA, 0x99, 0xA9, 0xAA, 0xBB, 0xBD, 0xDC, 0xAB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xCA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x88, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0x99, 0xA9, 0x88, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x9A, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xAA, + 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xCB, + 0xAA, 0xA9, 0x98, 0x88, 0x89, 0x99, 0x9A, 0xAB, 0xBB, 0xCC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBD, 0xDD, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBB, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAB, 0xCC, 0xDC, 0xAB, 0xAA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCA, 0xBA, 0x99, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x88, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xAB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x66, 0x66, 0x66, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x67, 0x88, 0x9A, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x9A, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x67, 0x77, 0x78, 0x89, + 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xAA, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBB, 0xBD, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xCD, 0xCB, 0xBB, 0xAA, 0xAA, 0x99, + 0xAA, 0xAA, 0xAB, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xA9, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xAB, 0xCC, + 0xBB, 0xBB, 0xAA, 0xAA, 0xBA, 0xBC, 0xCD, 0xED, 0xEC, 0xBC, 0xBB, 0xBA, + 0xA9, 0xA9, 0xA9, 0xAA, 0xAB, 0xBC, 0xDE, 0xDB, 0xBB, 0xBA, 0x99, 0x99, + 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xCC, 0xBA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xCC, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x9A, + 0xBB, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x89, 0x9A, 0xBA, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xAA, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x99, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x67, 0x89, 0xAA, 0xBA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x89, 0xAA, 0xAB, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xAA, 0xBB, 0xA9, 0x98, 0x87, 0x77, 0x67, 0x77, 0x88, 0x9A, + 0xAB, 0xAC, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x78, 0x89, 0x99, 0xAA, 0xBA, + 0xCC, 0xCB, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xAC, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBB, 0xCB, 0xCE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xBE, 0xED, 0xDC, 0xCC, 0xBB, + 0xBB, 0xBB, 0xAA, 0xBC, 0xCC, 0xDB, 0xAD, 0xDD, 0xBB, 0xBB, 0xBB, 0xBA, + 0xAA, 0xBB, 0xBB, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCD, 0xAB, 0xCC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xFD, 0xBC, 0xBB, 0xAA, + 0xAA, 0x9A, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xDB, 0xBB, 0xAA, 0x99, 0x99, + 0x89, 0x99, 0x9A, 0xAB, 0xCD, 0xDC, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCC, 0xCA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xCA, 0xAA, 0x98, 0x77, 0x66, 0x65, 0x66, 0x67, 0x89, 0xAA, 0xCB, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xAA, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, + 0x66, 0x55, 0x45, 0x56, 0x67, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xBC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xBC, 0xCB, 0xBA, 0x99, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xCD, 0xCB, 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xBD, 0xED, + 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xAA, 0xBC, 0xCB, 0xDE, 0xED, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCD, 0xBD, 0xFE, 0xED, 0xCC, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDB, 0xAD, 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, + 0xAB, 0xBB, 0xBB, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xAF, 0xDF, 0xDF, 0xFD, 0xDD, 0xCD, 0xDF, 0xFD, 0xFF, 0xDD, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDF, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDF, 0xCC, 0xCD, 0xFD, 0xFF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFF, 0xFD, 0xBA, 0x88, 0xAC, 0xDF, 0xFD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCA, 0x74, 0x46, 0x9C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFC, 0x85, 0x22, 0x47, 0xDF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xD8, 0x42, 0x13, 0x7B, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xA6, + 0x43, 0x58, 0xCF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xA8, 0x78, + 0xAB, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDB, 0xBC, 0xDF, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xDD, 0xFD, 0xDF, 0xDF, + 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDF, + 0xDD, 0xFD, 0xFF, 0xDD, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFD, 0xDD, 0xCD, 0xDE, 0xDD, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, + 0xFF, 0xED, 0xDC, 0xCC, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xDD, + 0xBB, 0xBA, 0xBB, 0xBD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBA, 0xAA, + 0x99, 0xAA, 0xBB, 0xCE, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0x99, 0x88, 0x89, + 0x9A, 0xAB, 0xCE, 0xFF, 0xFE, 0xFC, 0xCA, 0x98, 0x87, 0x77, 0x78, 0x99, + 0xAB, 0xDD, 0xFF, 0xDD, 0xBB, 0x98, 0x77, 0x66, 0x66, 0x77, 0x99, 0xBC, + 0xDF, 0xED, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xFF, + 0xFC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0xAB, 0xCF, 0xFC, 0xDB, + 0xA8, 0x76, 0x55, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xED, 0xDC, 0xCA, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9B, 0xCE, 0xFE, 0xDB, 0xA9, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xDD, 0xDC, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xCF, 0xED, 0xFD, 0xBA, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBE, 0xEF, 0xDF, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xCF, 0xFE, 0xFF, 0xDC, 0xA9, 0x98, 0x88, 0x88, 0x9A, 0xBC, 0xDF, 0xEF, + 0xFF, 0xFE, 0xCB, 0xBA, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xFF, 0xFF, 0xFF, + 0xFD, 0xCD, 0xCB, 0xBB, 0xBB, 0xBC, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xED, 0xDC, 0xDC, 0xDD, 0xCF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xDF, 0xEF, + 0xDD, 0xEE, 0xFF, 0xDE, 0xFF, 0xFF, 0xBF, 0xFF, 0xFD, 0xFF, 0xFE, 0xED, + 0xFE, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xEE, 0xED, 0xDD, 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFF, 0xDE, 0xFF, + 0xED, 0xCC, 0xCC, 0xBC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0xEF, 0xED, 0xCC, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xFF, 0xFE, 0xFD, 0xCB, 0xAA, 0xA9, + 0x99, 0x99, 0xAB, 0xBC, 0xEF, 0xFF, 0xDD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xEF, 0xFD, 0xDB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9B, 0xCD, 0xEE, 0xDD, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCE, 0xEC, 0xCB, 0x98, 0x77, 0x66, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xDE, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x77, 0x9A, 0xBD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xED, 0xED, 0xCB, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDE, 0xEC, 0xBA, 0x99, 0x88, 0x87, 0x88, 0x89, 0xAB, 0xCD, 0xEF, + 0xFF, 0xDD, 0xBB, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xCC, 0xEF, 0xFF, 0xFF, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xED, + 0xCC, 0xBB, 0xBB, 0xBC, 0xDC, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xEE, 0xED, + 0xDC, 0xDD, 0xED, 0xEF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFE, 0xED, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xCD, 0xDC, 0xCC, 0xCD, 0xDE, 0xDD, 0xFF, 0xFF, 0xFF, 0xDD, 0xFE, + 0xDC, 0xCC, 0xCB, 0xCC, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xDF, 0xDD, 0xCB, + 0xBB, 0xBA, 0xBB, 0xBC, 0xCD, 0xEF, 0xEF, 0xFD, 0xFC, 0xCB, 0xA9, 0xA9, + 0x99, 0x9A, 0xAB, 0xCD, 0xDF, 0xFE, 0xCE, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xFC, 0xCB, 0xAA, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCE, 0xFE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAC, + 0xDE, 0xEC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x56, 0x77, 0x9A, 0xBC, 0xDD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xEC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCD, 0xDD, 0xDC, 0xB9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x99, 0xBB, 0xDF, 0xDE, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xED, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x89, 0xAA, 0xBD, 0xDD, + 0xFF, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xEF, 0xFF, + 0xFD, 0xCC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEE, 0xFF, 0xFF, 0xED, + 0xDC, 0xCB, 0xBC, 0xCB, 0xCD, 0xCD, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDD, + 0xEC, 0xDC, 0xCC, 0xEF, 0xEF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFD, 0xED, 0xDD, + 0xDC, 0xDD, 0xDD, 0xDF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xEE, 0xED, 0xEF, 0xED, 0xEE, 0xFE, 0xEF, 0xFE, 0xFF, 0xAE, 0xFF, + 0xFE, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xED, 0xCC, 0xCB, + 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCB, 0xAA, 0xAA, 0xAA, + 0xBB, 0xCD, 0xEF, 0xFF, 0xFE, 0xFE, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xFF, 0xFF, 0xEE, 0xDC, 0xA9, 0x88, 0x77, 0x77, 0x89, 0xAB, 0xDE, + 0xFF, 0xFF, 0xFD, 0xBA, 0x97, 0x76, 0x55, 0x66, 0x89, 0xAC, 0xDF, 0xFE, + 0xEE, 0xDB, 0xA8, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xEE, 0xED, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xDF, 0xFE, 0xFF, 0xDB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xEF, 0xEE, 0xFD, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x68, 0x9B, 0xCE, 0xFF, 0xFF, 0xEC, 0xB9, 0x86, 0x65, 0x55, + 0x67, 0x8A, 0xBD, 0xEF, 0xFF, 0xFF, 0xDC, 0xA9, 0x87, 0x66, 0x77, 0x89, + 0xAB, 0xCF, 0xFF, 0xFF, 0xFE, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xEF, 0xFF, 0xFF, 0xFE, 0xCB, 0xAA, 0x99, 0x9A, 0xAA, 0xBC, 0xDE, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xED, 0xDD, 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xEF, 0xEF, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xEF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAE, 0xDD, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xFE, 0xEE, 0xFF, 0xBD, 0xFF, + 0xEE, 0xED, 0xED, 0xEE, 0xEF, 0xFE, 0xFF, 0xFF, 0xFE, 0xEE, 0xED, 0xDD, + 0xCC, 0xCC, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xEE, 0xEE, 0xDC, 0xCB, 0xBB, + 0xBB, 0xBC, 0xDD, 0xEE, 0xFF, 0xFE, 0xDE, 0xDC, 0xBB, 0xAA, 0x99, 0xAA, + 0xBB, 0xCD, 0xEF, 0xFF, 0xED, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xEF, 0xFE, 0xDD, 0xDB, 0xA9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCE, + 0xFF, 0xED, 0xDC, 0xBA, 0x97, 0x76, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xFE, + 0xDD, 0xCB, 0xA8, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBC, 0xEF, 0xDD, 0xDC, + 0xB9, 0x87, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xCD, 0xEE, 0xDE, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xDF, 0xDD, 0xED, 0xBA, 0x97, 0x65, + 0x44, 0x45, 0x78, 0x9A, 0xCD, 0xEE, 0xDE, 0xDC, 0xB9, 0x87, 0x65, 0x55, + 0x67, 0x89, 0xBC, 0xDE, 0xDD, 0xEE, 0xDB, 0xA9, 0x87, 0x66, 0x77, 0x89, + 0xAB, 0xCD, 0xFD, 0xDE, 0xED, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0x9A, 0xBC, + 0xDF, 0xDD, 0xFE, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, + 0xDF, 0xFF, 0xED, 0xCC, 0xBB, 0xAB, 0xBB, 0xBC, 0xDE, 0xEF, 0xDD, 0xFF, + 0xFF, 0xEE, 0xDC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFE, 0xDF, 0xFF, 0xFF, + 0xEE, 0xED, 0xDD, 0xDD, 0xDD, 0xDE, 0xFE, 0xED, 0xFF, 0xFF, 0xFF, 0xEF, + 0xEE, 0xEE, 0xFE, 0xFF, 0xFF, 0xFE, 0x9D, 0xEE, 0xDD, 0xDE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xFE, 0xED, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xAB, 0xBA, 0xA9, + 0x99, 0x88, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x99, 0xAB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x55, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xA9, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xAB, 0xCB, + 0xA9, 0x99, 0x98, 0x88, 0x89, 0x99, 0xAA, 0xAB, 0xCB, 0xBC, 0xBA, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBC, 0xCC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xAC, 0xBB, 0xBA, 0xAA, 0x99, 0x99, + 0xAA, 0xAA, 0xAB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xCC, 0xAB, 0xBA, 0xA9, + 0x99, 0x88, 0x89, 0x99, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x78, 0x89, 0x99, 0xAB, 0xA9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x56, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x98, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, 0x99, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0x9A, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x89, + 0xAA, 0xAA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xAB, 0xA9, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xBC, 0xDC, 0xBB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xAC, 0xBB, 0xBA, 0xAA, 0xA9, 0x99, + 0xAA, 0xAA, 0xAB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xBD, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0xDC, 0xBC, 0xBA, 0xA9, + 0x99, 0x89, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xBC, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xBC, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x65, 0x66, 0x66, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x67, 0x88, 0x9A, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0x9A, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0x9A, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xBB, 0xCB, + 0xAA, 0x99, 0x98, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xCB, 0xCC, 0xCB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBC, 0xDC, 0xBC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xAD, 0xCB, 0xBA, 0xAA, 0xAA, 0x9A, + 0xAA, 0xAA, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCC, 0xCC, 0xBC, 0xCB, 0xCB, 0xCC, 0xCC, 0xCD, 0xDD, 0x9C, 0xED, + 0xCD, 0xCC, 0xCB, 0xCC, 0xCC, 0xCD, 0xEE, 0xEF, 0xFD, 0xCD, 0xCC, 0xCB, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xDC, 0xCC, 0xBA, 0xAA, 0x99, + 0x9A, 0xAA, 0xBB, 0xBC, 0xDE, 0xFD, 0xCD, 0xBB, 0xA9, 0x98, 0x88, 0x89, + 0x9A, 0xAB, 0xCC, 0xEE, 0xDC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xBC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x89, 0xBB, + 0xCE, 0xDC, 0xCB, 0xA8, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xBC, 0xBA, 0x87, 0x66, 0x55, 0x45, 0x66, 0x78, 0x9A, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xAC, 0xCC, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCD, 0xCC, 0xAA, 0x98, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDC, 0xDD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xED, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xDC, + 0xDE, 0xDD, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xDD, 0xEE, + 0xDD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDD, 0xDF, 0xFE, 0xEE, + 0xDC, 0xCC, 0xCB, 0xCC, 0xCC, 0xCD, 0xDE, 0xDE, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDC, 0xCD, 0xDD, 0xDD, 0xED, 0xED, 0xAE, 0xDD, 0xDD, 0xCD, 0xCC, 0xCC, + 0xCC, 0xCD, 0xDD, 0xDD, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFE, 0xEE, 0xDD, 0xDD, 0xDD, 0xEE, 0xEF, 0xEF, 0xFF, 0xBF, 0xFF, + 0xFF, 0xDD, 0xDD, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, + 0xCC, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFE, 0xDC, 0xCB, 0xAA, + 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, 0xEF, 0xDC, 0xBB, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDE, 0xFF, 0xFE, 0xED, 0xBA, 0x99, 0x88, 0x77, 0x78, 0x9A, + 0xBC, 0xDF, 0xFF, 0xED, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xEF, 0xFD, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xCE, 0xFF, + 0xED, 0xBA, 0x97, 0x65, 0x55, 0x45, 0x56, 0x79, 0xAB, 0xDE, 0xFD, 0xCB, + 0xA9, 0x76, 0x55, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xEF, 0xDD, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xEE, 0xDC, 0xA9, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xEF, 0xEE, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDF, 0xFE, 0xED, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9B, 0xCD, 0xEE, 0xFF, 0xDC, 0xBA, 0x98, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xEF, 0xFF, 0xFE, 0xDC, 0xBA, 0x99, 0x88, 0x89, 0xAA, 0xBC, 0xDE, 0xFF, + 0xFF, 0xFF, 0xDC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDC, 0xCB, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xAF, 0xFA, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0x9F, 0xAA, 0xBA, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0x98, 0x89, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x76, 0x78, 0x78, 0x8F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF7, 0x64, 0x56, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xA9, 0x74, 0x22, 0x57, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x97, 0x52, 0x14, 0x69, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x86, + 0x44, 0x57, 0x8A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x76, 0x77, + 0x89, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC9, 0x89, 0x99, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAF, 0xFA, 0xFF, 0xFF, + 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, + 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, + 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xAF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x79, 0xFA, 0xCF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xAF, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDD, 0xEE, 0xEE, 0xCD, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFD, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, 0xCC, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x88, 0xAB, + 0xCD, 0xDC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xBB, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x77, 0x9A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x99, 0xAC, 0xDD, 0xDD, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0x99, 0x88, 0x78, 0x88, 0x89, 0xAA, 0xBC, 0xDD, + 0xEE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xDE, 0xFE, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDD, 0xED, 0xFF, 0xFE, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xEF, 0xFF, 0xFF, 0xED, 0xDD, + 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFE, 0xCF, 0xFF, 0xEE, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDE, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xEF, 0xFF, 0xBF, 0xEF, + 0xED, 0xDC, 0xCC, 0xCC, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xCB, + 0xBB, 0xBA, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFD, 0xED, 0xCB, 0xBA, 0xA9, + 0x99, 0x9A, 0xBB, 0xCD, 0xEF, 0xFF, 0xDD, 0xCC, 0xBA, 0x99, 0x88, 0x88, + 0x89, 0xAB, 0xCD, 0xEF, 0xED, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xDE, 0xFF, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAC, + 0xDE, 0xED, 0xCB, 0xA9, 0x77, 0x66, 0x55, 0x56, 0x67, 0x8A, 0xBC, 0xDE, + 0xDC, 0xBA, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCE, 0xED, 0xCB, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xDC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xEC, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDF, 0xDD, 0xBA, 0x97, 0x66, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xCD, 0xDD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x9A, 0xBD, 0xDF, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x9A, 0xAC, + 0xDF, 0xDF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xBB, 0xCD, 0xEE, + 0xFF, 0xFC, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xEF, 0xFF, 0xFE, + 0xEC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xED, 0xEF, 0xFF, 0xED, + 0xDD, 0xCB, 0xCB, 0xCC, 0xDD, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xEE, 0xED, + 0xDD, 0xDE, 0xEE, 0xEE, 0xFF, 0xFE, 0xAE, 0xFF, 0xEE, 0xEE, 0xEE, 0xED, + 0xFD, 0xED, 0xFE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFE, 0xFF, 0xEE, 0xEF, 0xEF, 0xDF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, + 0xFF, 0xFE, 0xEE, 0xDD, 0xDF, 0xEF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFD, + 0xDD, 0xCB, 0xBC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCB, 0xBA, + 0xAA, 0xBB, 0xBC, 0xDF, 0xFF, 0xFF, 0xEF, 0xDD, 0xCB, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x88, 0x77, 0x88, 0x9A, + 0xBC, 0xDF, 0xFF, 0xFE, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBD, + 0xFF, 0xFE, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9B, 0xDE, 0xFF, + 0xEE, 0xCA, 0x98, 0x65, 0x54, 0x45, 0x56, 0x79, 0xAC, 0xEF, 0xFF, 0xDC, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xCD, 0xFF, 0xED, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAC, 0xDF, 0xFE, 0xEC, 0xA9, 0x86, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xCD, 0xFF, 0xEE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDF, 0xFF, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x67, 0x89, + 0xAB, 0xCE, 0xEF, 0xFF, 0xEC, 0xBA, 0x98, 0x87, 0x77, 0x89, 0x9B, 0xCD, + 0xEF, 0xFF, 0xFF, 0xEC, 0xBA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, + 0xFF, 0xFE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAB, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDD, 0xCB, 0xCB, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFE, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0x99, 0xAA, 0xAA, 0xAB, 0xCC, 0xCD, 0xBB, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xEE, 0xBC, 0xBB, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCC, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xCA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x67, 0x78, 0x99, + 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0x9A, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xB9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAB, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xAA, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x9A, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBB, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBC, 0xCC, + 0xBB, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xA9, 0xAA, 0xAB, 0xBB, 0xCD, 0xCD, 0xDD, 0xDC, 0xCB, 0xBB, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xEC, 0xAE, 0xDD, 0xCC, 0xBB, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCB, 0x9B, 0xCB, + 0xBA, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCA, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBC, 0xCC, 0xAB, 0xA9, 0x98, 0x88, 0x87, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xBA, 0xAA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xB9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0x9A, 0x98, 0x87, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x87, 0x76, 0x65, + 0x55, 0x66, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAA, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBB, + 0xBB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCC, 0xBB, + 0xAA, 0xA9, 0x99, 0xAA, 0xAB, 0xBB, 0xDD, 0xBC, 0xDC, 0xCC, 0xCB, 0xBA, + 0xAA, 0xBA, 0xBB, 0xBC, 0xCC, 0xDC, 0x9C, 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xAB, 0xBA, 0xA9, + 0x99, 0x98, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xAB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x55, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xAB, 0xBB, + 0xAA, 0x99, 0x99, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0xBC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xCB, 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0x9C, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEC, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCE, 0xCB, 0xCB, 0xBA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xDC, 0xBB, 0xBA, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBC, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x99, + 0xBC, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x87, 0x76, 0x65, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xBB, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xCB, 0xBB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xCC, + 0xBC, 0xBB, 0x99, 0x98, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCD, 0xCC, 0xDC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xDD, 0xDC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCC, 0xCD, 0xDD, 0xDE, 0xCD, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCD, 0xDD, 0xED, 0x9D, 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAE, 0xDE, 0xDD, 0xED, 0xDC, 0xCC, 0xDC, 0xDD, 0xDD, 0xDD, 0x9E, 0xFF, + 0xFF, 0xFD, 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEF, 0xFD, 0xEF, 0xEE, 0xED, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEF, 0xEE, 0xEF, 0xDE, 0xEF, 0xDD, 0xDC, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFD, 0xDF, 0xED, 0xCC, 0xBB, 0xBB, 0xBB, + 0xBC, 0xCD, 0xDD, 0xFF, 0xDE, 0xEE, 0xDC, 0xBA, 0x99, 0x99, 0x9A, 0xBC, + 0xCE, 0xFE, 0xFD, 0xDF, 0xDC, 0xBA, 0x98, 0x87, 0x88, 0x9A, 0xBC, 0xDE, + 0xFE, 0xDD, 0xEE, 0xCB, 0xA8, 0x76, 0x66, 0x67, 0x9A, 0xBC, 0xEE, 0xFD, + 0xDE, 0xDC, 0xA9, 0x86, 0x54, 0x45, 0x68, 0x9B, 0xCD, 0xEF, 0xED, 0xED, + 0xCB, 0x97, 0x64, 0x32, 0x46, 0x79, 0xBC, 0xDE, 0xFE, 0xDE, 0xEC, 0xB9, + 0x86, 0x42, 0x24, 0x57, 0x9A, 0xCD, 0xEF, 0xDD, 0xED, 0xCB, 0x98, 0x75, + 0x44, 0x56, 0x79, 0xAC, 0xDE, 0xEE, 0xDF, 0xED, 0xCA, 0x98, 0x76, 0x66, + 0x78, 0x9B, 0xCD, 0xFF, 0xED, 0xEF, 0xDC, 0xBA, 0x98, 0x77, 0x78, 0x9A, + 0xBC, 0xDE, 0xFE, 0xDF, 0xED, 0xDC, 0xBA, 0x99, 0x99, 0x9A, 0xBC, 0xDD, + 0xEF, 0xEE, 0xFF, 0xED, 0xCC, 0xBB, 0xAA, 0xBB, 0xBC, 0xDD, 0xEF, 0xFE, + 0xDF, 0xFE, 0xEE, 0xDC, 0xCC, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xEE, 0xFE, + 0xFE, 0xEE, 0xEE, 0xDD, 0xDD, 0xED, 0xEE, 0xEE, 0xFE, 0xEE, 0xEF, 0xFF, + 0xEE, 0xEE, 0xDE, 0xEE, 0xFE, 0xFF, 0xFF, 0xEE, 0xFF, 0xFF, 0xFE, 0xEF, + 0xEF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xAE, 0xDD, 0xDD, 0xEE, 0xDD, 0xDD, + 0xEE, 0xDE, 0xEE, 0xFE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEF, 0xFE, 0xEF, 0xFF, 0xEF, 0xAF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEE, 0xDE, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xEC, 0xCC, + 0xCC, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEC, 0xBA, 0xAA, 0xAA, + 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xDE, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xAC, 0xDF, + 0xFF, 0xFF, 0xFE, 0xCB, 0x98, 0x66, 0x55, 0x66, 0x89, 0xBC, 0xDF, 0xFF, + 0xFF, 0xDC, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xCD, 0xFF, 0xFF, 0xFD, + 0xCA, 0x86, 0x54, 0x33, 0x45, 0x68, 0xAC, 0xDF, 0xFF, 0xFF, 0xDC, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBD, 0xEF, 0xFE, 0xFE, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAC, 0xDF, 0xFF, 0xFF, 0xED, 0xB9, 0x86, 0x65, 0x55, + 0x67, 0x9B, 0xCE, 0xFF, 0xFF, 0xFF, 0xDB, 0xA9, 0x87, 0x66, 0x77, 0x8A, + 0xBD, 0xEF, 0xFF, 0xFF, 0xFF, 0xDB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, 0xBA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDD, 0xCC, 0xBC, 0xCD, 0xDE, 0xEF, 0xFF, 0xFE, 0xFF, + 0xFF, 0xFF, 0xED, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDE, 0xDD, 0xDD, 0xCC, 0xDD, 0xDD, 0xEE, 0xDE, 0xEF, 0xAE, 0xFE, + 0xEE, 0xDD, 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xDF, 0xDE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xFE, 0xEF, 0xEE, 0xFD, 0xDC, 0xBA, 0xAA, + 0x9A, 0xAA, 0xBC, 0xDD, 0xEF, 0xFF, 0xDD, 0xDC, 0xBA, 0xA9, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xFF, 0xFC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAC, 0xDD, 0xFE, 0xDD, 0xCA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xBC, + 0xDE, 0xFC, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xEF, + 0xDD, 0xBA, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0xAB, 0xDE, 0xEC, 0xCB, + 0xA8, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBD, 0xEF, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xDD, 0xDB, 0xA8, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xEE, 0xDD, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xCE, 0xED, 0xDC, 0xB9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xFE, 0xED, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xED, 0xEE, 0xCB, 0xAA, 0x98, 0x88, 0x89, 0x9A, 0xBC, 0xDD, 0xEE, + 0xEF, 0xED, 0xCC, 0xBA, 0xA9, 0x99, 0xAA, 0xBB, 0xCD, 0xEF, 0xED, 0xFE, + 0xED, 0xDC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEF, 0xFE, 0xFF, 0xFF, 0xED, + 0xDD, 0xDC, 0xCD, 0xCD, 0xDD, 0xEE, 0xFF, 0xEE, 0xFF, 0xFF, 0xFE, 0xEE, + 0xDE, 0xDD, 0xEE, 0xEF, 0xFF, 0xFF, 0x9F, 0xEE, 0xED, 0xFE, 0xEF, 0xEE, + 0xDF, 0xEE, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDC, 0xCC, 0xCB, 0xCC, 0xCC, 0xDD, 0xEE, 0xEE, 0xBE, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFF, 0xFD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xEE, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xDE, 0xEC, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xEC, 0xCA, 0x98, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xBC, 0xDD, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCC, 0xDC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xBA, 0x87, 0x66, 0x55, 0x55, + 0x67, 0x78, 0x9A, 0xCD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCA, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDD, 0xEC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEE, 0xEE, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xEF, 0xFE, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xEE, 0xFF, 0xFF, 0xED, 0xDD, + 0xDC, 0xCD, 0xDD, 0xDE, 0xEF, 0xFE, 0xBE, 0xFE, 0xEE, 0xED, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDD, 0xDD, 0x9D, 0xFF, + 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEE, 0xEF, 0xFD, 0xEE, 0xDD, 0xCC, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEF, 0xDE, 0xED, 0xCB, 0xBA, 0xA9, + 0x99, 0x9A, 0xAB, 0xCD, 0xDE, 0xFE, 0xDD, 0xCB, 0xAA, 0x99, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xDC, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xFD, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCE, 0xEC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x56, 0x77, 0x8A, 0xBD, 0xED, + 0xCC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCB, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xBB, 0xDD, 0xCC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xDB, 0x98, 0x76, 0x55, + 0x45, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xBA, 0x97, 0x76, 0x55, 0x55, + 0x67, 0x88, 0xAA, 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x88, 0x9A, 0xAB, + 0xCD, 0xDE, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xDD, + 0xEE, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xEE, 0xDE, 0xFD, + 0xDD, 0xCB, 0xBA, 0xBA, 0xAB, 0xBB, 0xCC, 0xDD, 0xFD, 0xFF, 0xFE, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDC, 0xDD, 0xFE, 0xEF, 0xFF, 0xEF, 0xEE, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDF, 0xFF, 0xEF, 0xAD, 0xDD, 0xDD, 0xDE, 0xDC, 0xDD, + 0xDD, 0xDC, 0xDD, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xDD, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, + 0xBC, 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0xAA, 0xAA, + 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x88, 0x76, 0x77, 0x89, 0xAC, 0xDF, + 0xFF, 0xFF, 0xFD, 0xCA, 0x98, 0x66, 0x55, 0x67, 0x89, 0xBC, 0xFF, 0xFF, + 0xFF, 0xFC, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xCF, 0xFF, 0xFF, 0xFD, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x68, 0xAB, 0xDF, 0xFF, 0xFF, 0xDC, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xFC, 0xB9, 0x86, 0x65, 0x55, + 0x67, 0x9A, 0xCD, 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x87, 0x66, 0x77, 0x8A, + 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x88, 0x88, 0x99, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBA, 0xAA, 0xAA, 0xBC, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEC, 0xCC, 0xBC, 0xCC, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFD, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xCD, 0xCC, 0xCC, 0xDD, 0xDE, 0xDE, 0xEE, 0x9E, 0xFF, + 0xED, 0xDD, 0xDC, 0xCC, 0xCD, 0xDE, 0xFE, 0xFF, 0xFF, 0xDF, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xFE, 0xEE, 0xDC, 0xBA, 0xAA, + 0x9A, 0xAA, 0xBB, 0xCD, 0xDF, 0xFE, 0xDD, 0xDC, 0xBA, 0xA9, 0x98, 0x89, + 0x9A, 0xAB, 0xCD, 0xEF, 0xED, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xEE, 0xCC, 0xCB, 0xA8, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDE, 0xEC, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xED, + 0xCC, 0xBA, 0x98, 0x76, 0x54, 0x55, 0x66, 0x79, 0xAB, 0xCE, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x34, 0x45, 0x67, 0x8A, 0xBC, 0xED, 0xDC, 0xBA, 0x87, + 0x65, 0x54, 0x34, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x67, 0x9A, 0xBC, 0xDD, 0xCD, 0xCA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDD, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xED, 0xDE, 0xDC, 0xA9, 0x98, 0x77, 0x77, 0x89, 0x9A, 0xBC, + 0xDD, 0xDD, 0xFD, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBC, 0xCD, 0xFE, + 0xEF, 0xED, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xED, 0xFF, + 0xED, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xFE, 0xEF, 0xFF, 0xED, + 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDF, 0xFF, 0xED, 0xFF, 0xFF, 0xEE, 0xED, + 0xDD, 0xDD, 0xEE, 0xEF, 0xFF, 0xFE, 0x9E, 0xDD, 0xED, 0xDD, 0xDD, 0xDD, + 0xED, 0xDD, 0xDE, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0x9B, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xED, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xCB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xDC, 0xAB, 0xAA, 0x99, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xCC, 0xCA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xCB, 0xAA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xAB, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x87, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAB, 0xBA, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBB, 0xBB, 0xA9, 0x88, 0x87, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xCC, 0xDC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xCD, 0xDC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xCC, 0xDD, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEC, 0x8D, 0xCC, 0xCB, 0xBB, 0xBA, 0xAA, + 0xBB, 0xBB, 0xBC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0x9B, 0xCC, + 0xBB, 0xAA, 0xAA, 0x99, 0xAA, 0xAA, 0xBB, 0xCD, 0xDC, 0xAB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCC, 0xCA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBB, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x89, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBB, + 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x9A, 0xAA, 0xAB, 0xBB, 0xCC, 0xBC, 0xDC, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0xDC, 0x9C, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xAA, 0x99, 0x9A, 0xAA, 0xAB, 0xBB, 0xCC, 0x8B, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xCB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xBA, 0xAA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xBB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x9A, + 0xAB, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, 0x87, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x66, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x89, 0xAA, 0xBA, 0xAB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xAB, 0xBB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xBB, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xCD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xCD, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBA, 0xBB, 0xBB, 0xBC, 0xCD, 0xDC, 0x9C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCC, 0xCC, 0xBB, 0xBB, 0xCC, 0xCC, 0xDD, 0xDD, 0x8D, 0xEE, + 0xDD, 0xCC, 0xCC, 0xCB, 0xCC, 0xDD, 0xEF, 0xEE, 0xFE, 0xDE, 0xDC, 0xCC, + 0xBB, 0xAB, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xED, 0xDD, 0xCB, 0xBA, 0xA9, + 0x99, 0xAA, 0xAB, 0xBC, 0xDD, 0xFD, 0xCD, 0xCB, 0xAA, 0x99, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDE, 0xDC, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAA, 0xCD, 0xDD, 0xCC, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCE, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x8A, 0xBC, 0xDD, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9B, 0xBC, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xAC, 0xCC, 0xCB, 0xB9, 0x87, + 0x65, 0x54, 0x34, 0x56, 0x78, 0x9A, 0xCC, 0xCC, 0xCA, 0x98, 0x76, 0x55, + 0x54, 0x56, 0x67, 0x89, 0xAB, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0x9A, 0xCC, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xBB, + 0xCD, 0xDD, 0xEC, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xDD, + 0xDD, 0xEC, 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDD, 0xDD, 0xFE, + 0xDC, 0xCB, 0xBB, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xED, 0xEF, 0xEE, 0xDD, + 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDD, 0xDE, 0xEE, 0xFF, 0xEE, 0xDE, 0xDD, + 0xCD, 0xDC, 0xDD, 0xED, 0xEF, 0xEE, 0x9E, 0xEE, 0xDD, 0xDD, 0xDC, 0xCC, + 0xCC, 0xCD, 0xDD, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xAF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xCB, + 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xDC, 0xBA, 0xAA, 0xAA, + 0xBB, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xFF, 0xFF, 0xFF, 0xEC, 0xBA, 0x98, 0x76, 0x67, 0x89, 0xAB, 0xDD, + 0xFF, 0xFF, 0xED, 0xCA, 0x98, 0x66, 0x55, 0x66, 0x89, 0xBC, 0xDF, 0xFF, + 0xFF, 0xDB, 0xA8, 0x76, 0x54, 0x44, 0x67, 0x8A, 0xBC, 0xFF, 0xFF, 0xFD, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x68, 0xAB, 0xEF, 0xFF, 0xFF, 0xDB, 0xA8, + 0x65, 0x43, 0x34, 0x56, 0x8A, 0xBD, 0xEF, 0xFE, 0xFD, 0xCA, 0x87, 0x64, + 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xFF, 0xEF, 0xDC, 0xB9, 0x86, 0x65, 0x56, + 0x67, 0x9A, 0xCD, 0xFF, 0xFE, 0xFF, 0xDC, 0xA9, 0x87, 0x66, 0x77, 0x8A, + 0xBC, 0xDF, 0xFF, 0xEF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBB, 0xDE, + 0xFF, 0xFF, 0xFF, 0xED, 0xCB, 0xAA, 0xA9, 0xAA, 0xBB, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDC, 0xCB, 0xBB, 0xBC, 0xCE, 0xFF, 0xFF, 0xFD, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xDF, 0xEE, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xED, 0xED, 0xDD, 0xCC, 0xCD, 0xDD, 0xDD, 0xED, 0xDE, 0x9E, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCC, 0xDD, 0xDE, 0xEE, 0xFE, 0xFE, 0xFE, 0xED, 0xDD, + 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xEF, 0xED, 0xFE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xFF, 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xCD, 0xEF, 0xEC, 0xDC, 0xBB, 0xA9, 0x88, 0x77, 0x88, 0x9A, + 0xBC, 0xCE, 0xEE, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xEF, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xCD, 0xEE, + 0xDC, 0xBA, 0x98, 0x66, 0x54, 0x45, 0x56, 0x89, 0xAC, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xDD, 0xDD, 0xDB, 0xA9, 0x86, 0x55, + 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xDD, 0xDE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xDE, 0xED, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x89, + 0xAB, 0xCD, 0xEE, 0xDE, 0xDC, 0xAA, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xED, 0xED, 0xDB, 0xBA, 0x99, 0x99, 0x99, 0x9A, 0xBC, 0xDD, 0xEF, + 0xEE, 0xED, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xEF, 0xFD, 0xEF, + 0xDD, 0xDC, 0xCB, 0xBB, 0xBB, 0xCC, 0xDE, 0xEE, 0xFF, 0xDF, 0xFF, 0xED, + 0xDD, 0xCC, 0xDD, 0xCD, 0xDE, 0xEF, 0xFF, 0xFD, 0xFF, 0xFF, 0xEE, 0xEE, + 0xDF, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0x9D, 0xED, 0xDE, 0xDE, 0xDE, 0xED, + 0xEE, 0xEE, 0xFF, 0xEF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xED, 0xDC, 0xCC, 0xBC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDD, 0xAE, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDE, 0xEF, 0xFE, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEF, 0xED, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xEE, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xDE, 0xEC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAA, 0xCC, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xBA, 0x98, 0x87, 0x65, 0x55, 0x56, 0x77, 0x89, 0xBC, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xBA, 0x87, 0x76, 0x55, 0x55, + 0x67, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDE, + 0xDE, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEE, 0xEE, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xDF, 0xED, 0xDD, + 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xED, 0xFF, 0xEE, 0xED, 0xDD, + 0xCD, 0xCD, 0xDD, 0xEE, 0xFF, 0xFF, 0xAE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEE, 0xEF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xED, 0xDD, 0xDC, 0xDC, 0xDC, 0xCC, 0xCD, 0xDD, 0xDD, 0x8E, 0xFE, + 0xEE, 0xDD, 0xDC, 0xCC, 0xCD, 0xDD, 0xEE, 0xEE, 0xFE, 0xEF, 0xEE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xEF, 0xDE, 0xFE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAB, 0xBC, 0xCD, 0xDD, 0xED, 0xDE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, + 0x9A, 0xBB, 0xCD, 0xDF, 0xDD, 0xEC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x9A, + 0xBB, 0xDD, 0xFD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDD, 0xEC, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xEC, + 0xCC, 0xBA, 0x98, 0x75, 0x54, 0x45, 0x56, 0x89, 0xAB, 0xCE, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xDC, 0xA9, 0x86, 0x55, + 0x44, 0x55, 0x78, 0x9A, 0xBC, 0xDD, 0xDD, 0xCA, 0x98, 0x76, 0x55, 0x56, + 0x67, 0x89, 0xAC, 0xDD, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x77, 0x89, + 0xAB, 0xBD, 0xED, 0xCD, 0xDC, 0xB9, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xED, 0xDE, 0xCB, 0xBA, 0x99, 0x98, 0x99, 0xAB, 0xBB, 0xCD, 0xEE, + 0xDE, 0xED, 0xDC, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEE, 0xDD, 0xEE, + 0xDC, 0xDC, 0xBC, 0xBC, 0xBB, 0xCC, 0xCD, 0xDD, 0xFD, 0xDF, 0xEE, 0xDE, + 0xDC, 0xCD, 0xCD, 0xDD, 0xDD, 0xDE, 0xEE, 0xED, 0xEF, 0xEF, 0xFF, 0xEE, + 0xED, 0xDE, 0xED, 0xDD, 0xFF, 0xFD, 0x9D, 0xDD, 0xDE, 0xCD, 0xDC, 0xDD, + 0xDD, 0xED, 0xDE, 0xEF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFD, 0xDF, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, + 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBB, 0xBB, + 0xCC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBB, 0xA9, 0x99, 0x9A, 0xBC, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x98, 0x87, 0x78, 0x8A, 0xBC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCB, 0xA8, 0x76, 0x55, 0x67, 0x9A, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFD, 0xB9, 0x76, 0x54, 0x45, 0x68, 0x9B, 0xCF, 0xFF, 0xFF, 0xFF, + 0xCB, 0x97, 0x54, 0x23, 0x45, 0x79, 0xBC, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, + 0x75, 0x43, 0x24, 0x57, 0x9B, 0xCF, 0xFF, 0xFF, 0xFF, 0xDB, 0x98, 0x65, + 0x44, 0x56, 0x79, 0xBC, 0xFF, 0xFF, 0xFF, 0xFD, 0xCA, 0x87, 0x65, 0x56, + 0x78, 0xAB, 0xCF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x88, 0x77, 0x78, 0x9A, + 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x99, 0x99, 0xAA, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xBA, 0xBB, 0xCD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xFC, 0xCC, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDD, 0x9E, 0xEF, + 0xDD, 0xCC, 0xCB, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFE, 0xDE, 0xED, 0xCC, + 0xCB, 0xBA, 0xBA, 0xBB, 0xCD, 0xCD, 0xEE, 0xEE, 0xED, 0xCC, 0xBA, 0xA9, + 0x99, 0x9A, 0xBB, 0xBD, 0xDD, 0xFE, 0xDE, 0xCB, 0xBA, 0x99, 0x88, 0x88, + 0x99, 0xAB, 0xBC, 0xDE, 0xDC, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xEE, 0xCD, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x78, 0x89, 0xBB, + 0xCE, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x87, 0x66, 0x54, 0x45, 0x56, 0x78, 0x9B, 0xCD, 0xCB, 0xCB, + 0x98, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xCD, 0xCC, 0xB9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA8, 0x76, 0x65, + 0x44, 0x56, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xEC, 0xBB, 0xA9, 0x98, 0x88, 0x99, 0x99, 0xBB, 0xCD, 0xDD, + 0xCE, 0xDC, 0xCB, 0xAA, 0xA9, 0x99, 0xAA, 0xBB, 0xBD, 0xDF, 0xDD, 0xEE, + 0xDD, 0xCB, 0xBB, 0xBA, 0xAB, 0xBC, 0xCD, 0xDE, 0xFE, 0xDE, 0xEE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xED, 0xFF, 0xEE, 0xDD, 0xDD, + 0xDC, 0xDE, 0xDD, 0xEE, 0xEF, 0xFD, 0x8D, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, + 0xDC, 0xDD, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0x8C, 0xDC, + 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xCB, 0xCB, 0xBA, 0xA9, 0x98, + 0x88, 0x99, 0x99, 0xAB, 0xBC, 0xDC, 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xCC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x77, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x66, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x89, 0xAB, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xA9, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xCC, 0xCC, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xEC, 0xCD, 0xDC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDE, 0xCC, 0xED, 0xCC, 0xCC, 0xCB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xDD, 0x8C, 0xCB, 0xCB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xCB, 0xCC, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9B, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xAB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBB, 0xA9, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xBB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8B, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0xDB, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xBB, 0xDB, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xBA, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x54, 0x55, 0x56, 0x78, 0x89, 0xAB, 0xAA, 0xAA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x67, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x89, 0xAA, 0xBA, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBB, 0xBA, 0xBB, 0xAA, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xCB, 0xBC, 0xCC, 0xBB, + 0xAB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xBC, 0xDC, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDC, 0x8B, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xDD, 0xCC, 0xCC, 0xCC, 0xBC, 0xCC, 0xCC, 0xCC, 0xDC, 0x8E, 0xEE, + 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFD, 0xEE, 0xED, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xDD, 0xED, 0xCC, 0xBA, 0xAA, + 0xA9, 0xAA, 0xAB, 0xCC, 0xDE, 0xFD, 0xCD, 0xDC, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x99, + 0xAB, 0xCD, 0xED, 0xCD, 0xBB, 0x99, 0x87, 0x66, 0x66, 0x78, 0x8A, 0xBB, + 0xCD, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xBC, 0xBA, 0x97, 0x66, 0x54, 0x45, 0x66, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0x98, 0x76, 0x54, 0x44, 0x45, 0x67, 0x89, 0xBC, 0xDD, 0xBC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9A, 0xCD, 0xCC, 0xCB, 0xA9, 0x86, 0x65, + 0x44, 0x56, 0x67, 0x9A, 0xAC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xA9, 0x98, 0x76, 0x66, 0x67, 0x88, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDD, 0xCB, 0xA9, 0x99, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xDD, + 0xCD, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xDD, 0xEE, + 0xDC, 0xCB, 0xBB, 0xBA, 0xBB, 0xBC, 0xCC, 0xDE, 0xEE, 0xEE, 0xFE, 0xDD, + 0xCC, 0xBC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xED, 0xFE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xEE, 0xEF, 0xFD, 0x9D, 0xED, 0xCC, 0xDC, 0xCC, 0xDC, + 0xDD, 0xDD, 0xEE, 0xED, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xEE, 0xFE, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDC, + 0xDC, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xBB, 0xBB, + 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDB, 0xAA, 0x9A, 0xAB, 0xCC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBD, 0xEF, + 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x87, 0x66, 0x78, 0x9B, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFD, 0xBA, 0x86, 0x54, 0x45, 0x78, 0xAC, 0xDE, 0xFF, 0xFF, 0xFF, + 0xDB, 0x98, 0x64, 0x22, 0x46, 0x89, 0xBC, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, + 0x86, 0x42, 0x24, 0x68, 0x9B, 0xDE, 0xFF, 0xFD, 0xFF, 0xCC, 0xA8, 0x75, + 0x44, 0x56, 0x8A, 0xBD, 0xFF, 0xFF, 0xFF, 0xED, 0xCB, 0x98, 0x76, 0x66, + 0x79, 0xAC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, 0xCA, 0x98, 0x88, 0x89, 0xAB, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBB, 0xAA, 0x9A, 0xAB, 0xCD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xCB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFF, + 0xEF, 0xFE, 0xFE, 0xDD, 0xDC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, + 0xFF, 0xFF, 0xEF, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xEF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xDE, 0xDE, 0xDE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xCC, 0xDD, 0x9E, 0xEE, + 0xEE, 0xED, 0xDC, 0xCD, 0xCD, 0xDD, 0xDD, 0xEF, 0xED, 0xEE, 0xDD, 0xCC, + 0xCC, 0xBB, 0xCB, 0xCC, 0xDD, 0xDE, 0xEF, 0xDD, 0xEE, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAB, 0xBC, 0xCC, 0xDE, 0xEE, 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0xAA, 0xBC, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x99, 0x88, 0x78, 0x88, 0x9A, + 0xBC, 0xCD, 0xDD, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x56, 0x78, 0xAB, 0xCD, 0xED, + 0xCD, 0xBA, 0x98, 0x65, 0x54, 0x45, 0x57, 0x89, 0xBB, 0xCD, 0xDC, 0xDB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x68, 0x9A, 0xBC, 0xDD, 0xDD, 0xBA, 0x98, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x55, + 0x44, 0x55, 0x68, 0x9A, 0xCC, 0xED, 0xCC, 0xCB, 0xA8, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xDD, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x89, + 0xAB, 0xCD, 0xED, 0xCD, 0xCC, 0xBA, 0x98, 0x88, 0x78, 0x89, 0x9A, 0xCC, + 0xDE, 0xEC, 0xDC, 0xCB, 0xBA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xEE, + 0xDD, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDE, 0xEE, 0xED, 0xED, + 0xDD, 0xDC, 0xCB, 0xBB, 0xBB, 0xBD, 0xCD, 0xFE, 0xEE, 0xCE, 0xEE, 0xDD, + 0xDD, 0xDC, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEC, 0xFE, 0xEE, 0xFE, 0xFD, + 0xDD, 0xDD, 0xEE, 0xEF, 0xEF, 0xFE, 0x8D, 0xDC, 0xDD, 0xDD, 0xCD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xFE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDD, 0xAD, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xDE, 0xFD, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xDD, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xDD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDC, 0xCC, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAC, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xBB, 0xB9, 0x88, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDC, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCC, 0xED, + 0xCD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xDD, 0xDD, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xDE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xED, 0xEE, 0xED, 0xDD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFF, 0xAD, 0xDD, 0xCD, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCB, 0xCC, 0xCC, 0xCC, 0xDC, 0x9D, 0xFE, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDE, 0xED, 0xDE, 0xED, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xDD, 0xEC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xDC, 0xCD, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xBC, 0xDE, 0xCC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCC, 0xDC, 0xCC, 0xBA, 0xA8, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCC, 0xBA, 0x98, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x68, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0xAA, 0xBC, 0xDC, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x89, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDC, 0xBB, 0xAA, 0x99, 0x98, 0x99, 0x9A, 0xBB, 0xCD, 0xED, + 0xCD, 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEE, 0xDC, 0xED, + 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xED, 0xDE, 0xDD, 0xDC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xDD, 0xEE, 0xED, 0xDD, 0xDD, + 0xDC, 0xDD, 0xDD, 0xEE, 0xEF, 0xFE, 0x9D, 0xDC, 0xDC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xDD, 0xDD, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDC, 0xDD, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xEE, 0xED, 0xDF, 0xDE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xED, + 0xDC, 0xDD, 0xDC, 0xDD, 0xDE, 0xFF, 0xFF, 0xEE, 0xFF, 0xDD, 0xDC, 0xCB, + 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFE, 0xFF, 0xED, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCD, 0xDE, 0xFF, 0xED, 0xFE, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xEF, 0xFF, 0xDF, 0xDC, 0xBA, 0x98, 0x76, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xFE, 0xED, 0xCA, 0x98, 0x66, 0x55, 0x67, 0x89, 0xBC, 0xDE, 0xFE, + 0xED, 0xDB, 0xA8, 0x76, 0x44, 0x44, 0x67, 0x8A, 0xBD, 0xDF, 0xFD, 0xFC, + 0xBA, 0x86, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xFE, 0xEE, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xBC, 0xFF, 0xFE, 0xED, 0xBA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDE, 0xFF, 0xDF, 0xDC, 0xA9, 0x87, 0x65, 0x56, + 0x68, 0x9A, 0xCD, 0xEF, 0xFE, 0xEE, 0xCB, 0xA9, 0x87, 0x76, 0x78, 0x8A, + 0xBC, 0xDF, 0xFF, 0xDE, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDE, + 0xFF, 0xFE, 0xEE, 0xDD, 0xCB, 0xAA, 0x99, 0xAA, 0xBC, 0xCE, 0xFF, 0xFF, + 0xEF, 0xFF, 0xDD, 0xCC, 0xBB, 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xFE, 0xFE, + 0xEF, 0xDD, 0xDC, 0xCD, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, + 0xEE, 0xED, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xDF, 0xFF, 0xFF, 0xFD, 0xFE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0x9E, 0xFF, + 0xEE, 0xDE, 0xDC, 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFE, 0xFF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEE, 0xFF, 0xDD, 0xFE, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCD, 0xDD, 0xEE, 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xAB, 0xDE, 0xDE, 0xDD, 0xEC, 0xCA, 0x99, 0x88, 0x77, 0x88, 0x9A, + 0xBB, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xED, + 0xCC, 0xCA, 0x98, 0x65, 0x54, 0x45, 0x66, 0x89, 0xAB, 0xDD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBD, 0xDC, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xEC, 0xCB, 0xA9, 0x86, 0x65, + 0x44, 0x55, 0x68, 0x9A, 0xBD, 0xDD, 0xCD, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x89, + 0xAB, 0xCD, 0xFD, 0xCE, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x89, 0x9A, 0xBC, + 0xEE, 0xDC, 0xDD, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, + 0xDE, 0xDD, 0xCC, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xED, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFF, 0xDE, 0xEE, 0xDE, + 0xDD, 0xCC, 0xCD, 0xDE, 0xEE, 0xEF, 0xFF, 0xED, 0xFF, 0xFE, 0xEE, 0xDD, + 0xDD, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0x8D, 0xCD, 0xCD, 0xDD, 0xDC, 0xCD, + 0xED, 0xEE, 0xEE, 0xFF, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8B, 0xCC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xCB, 0xAA, + 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x88, + 0x89, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xAA, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xCB, 0xAA, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xCB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xBC, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xCC, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xED, 0x8C, 0xBB, 0xBB, 0xBB, 0xAB, 0xAB, + 0xBB, 0xBC, 0xCC, 0xCD, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x8B, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xBB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x88, + 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x88, 0x9A, 0xAA, 0x9A, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x99, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBA, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBA, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xBB, 0xDC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xBB, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8B, 0xCC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDB, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xCD, 0xBB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x99, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xBB, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xAA, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0xA8, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xBB, 0xA9, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xDC, 0xBC, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCB, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCC, 0xDD, 0xDC, 0x8B, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xEC, 0xCC, 0xCB, 0xCB, 0xBB, 0xCC, 0xCC, 0xCC, 0xCD, 0x8D, 0xED, + 0xED, 0xDC, 0xCB, 0xBB, 0xBC, 0xCD, 0xCD, 0xEF, 0xFD, 0xDE, 0xED, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xCE, 0xEE, 0xDD, 0xDD, 0xCB, 0xBA, 0x99, + 0x99, 0x9A, 0xAA, 0xBC, 0xDE, 0xED, 0xDD, 0xCB, 0xBA, 0x99, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDD, 0xDC, 0xDB, 0xAA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xBC, 0xDC, 0xCD, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAB, + 0xCD, 0xCB, 0xCA, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x99, 0xBC, 0xDC, + 0xBB, 0xA9, 0x87, 0x66, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xCC, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xDB, 0xCB, 0x98, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCD, 0xDD, + 0xCD, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDE, 0xEC, 0xED, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xED, 0xDE, 0xED, 0xDC, + 0xCC, 0xBC, 0xBC, 0xCC, 0xDD, 0xDE, 0xFF, 0xED, 0xFF, 0xDD, 0xDD, 0xDD, + 0xCD, 0xDD, 0xDD, 0xEE, 0xEF, 0xFE, 0x9D, 0xDD, 0xDD, 0xDD, 0xCC, 0xCC, + 0xCC, 0xDD, 0xEE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFE, 0xED, 0xDE, 0xDD, 0xDD, 0xDD, 0xDD, 0xCC, 0xDD, 0x9F, 0xFF, + 0xFF, 0xEE, 0xDE, 0xDD, 0xDD, 0xDE, 0xEE, 0xEF, 0xFD, 0xEF, 0xEF, 0xEE, + 0xDD, 0xCC, 0xCC, 0xCD, 0xCD, 0xEE, 0xFF, 0xDF, 0xFF, 0xED, 0xCC, 0xCB, + 0xBB, 0xBB, 0xCC, 0xDD, 0xDE, 0xFE, 0xDE, 0xDD, 0xCC, 0xAA, 0xAA, 0xAA, + 0xAB, 0xBC, 0xDD, 0xFF, 0xEE, 0xFD, 0xCB, 0xBA, 0x98, 0x88, 0x89, 0xAA, + 0xBC, 0xDF, 0xFF, 0xEE, 0xDC, 0xB9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xEE, 0xEC, 0xBA, 0x97, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCE, 0xFE, + 0xDE, 0xCB, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDE, 0xED, 0xEC, + 0xB9, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9B, 0xCE, 0xEE, 0xDD, 0xCB, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBC, 0xDF, 0xED, 0xEC, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDE, 0xEE, 0xDD, 0xDB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xCD, 0xFF, 0xED, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x8A, + 0xBC, 0xEF, 0xFF, 0xDF, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x9A, 0xBB, 0xCE, + 0xEF, 0xFD, 0xED, 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xFF, + 0xDF, 0xED, 0xDC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFD, 0xEE, + 0xDD, 0xDD, 0xCC, 0xCD, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xDF, 0xEF, 0xEF, + 0xDD, 0xEE, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFE, 0xFE, + 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xDD, 0xDE, 0xDE, 0xED, 0xDD, + 0xEE, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0x9D, 0xFE, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xED, 0xDE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xDD, 0xDD, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xED, 0xCD, 0xDB, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCC, 0xEE, 0xDC, 0xDC, 0xBA, 0x98, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xDD, 0xCC, 0xBA, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xAB, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDD, + 0xCC, 0xBA, 0x98, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCE, 0xDB, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCE, 0xDC, 0xCC, 0xAA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9B, 0xBD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xEE, 0xDC, 0xDD, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0xAA, 0xBC, 0xDE, 0xEE, + 0xCD, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xFF, 0xEC, 0xDD, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFE, 0xCF, 0xEE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xFF, 0xED, 0xEE, 0xED, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEE, 0xFE, 0xFF, 0xFE, 0x8C, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xEE, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCC, 0x9E, 0xEE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xDE, 0xED, 0xDE, 0xDC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDD, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xED, 0xCD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDD, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x89, 0xAB, + 0xCC, 0xCC, 0xCB, 0x99, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCB, 0xA9, 0x87, 0x65, 0x54, 0x55, 0x67, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x87, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAC, 0xDC, 0xBC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0x9B, 0xCD, 0xCB, 0xCB, 0xA9, 0x88, 0x77, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xCC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDD, + 0xCD, 0xCC, 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDE, 0xEC, 0xDD, + 0xCC, 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xEE, 0xDE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xEF, 0xED, 0xEE, 0xDD, 0xDD, 0xCC, + 0xCC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFE, 0xAD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x9D, 0xFF, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEE, 0xFD, 0xDE, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xDD, 0xDD, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEC, 0xDD, 0xDC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xAC, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xCC, 0xDD, 0xCD, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDD, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xED, + 0xCD, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEE, 0xDC, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFD, 0xCE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFF, 0xED, 0xEE, 0xEE, 0xDE, 0xDD, + 0xDD, 0xDE, 0xDE, 0xEE, 0xFF, 0xFE, 0x9D, 0xDC, 0xCD, 0xDD, 0xCC, 0xCD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFF, 0xEE, 0xDD, 0xCD, 0xCC, 0xDC, 0xCC, 0xDD, 0xCD, 0x8F, 0xFF, + 0xFF, 0xFE, 0xED, 0xEE, 0xDD, 0xDE, 0xEE, 0xFF, 0xFD, 0xEF, 0xFF, 0xEE, + 0xDD, 0xCC, 0xCD, 0xDD, 0xDE, 0xEE, 0xEF, 0xDE, 0xFE, 0xED, 0xDC, 0xCB, + 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xFE, 0xEE, 0xEE, 0xCC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCC, 0xCE, 0xEF, 0xED, 0xED, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAA, + 0xCD, 0xDE, 0xFE, 0xDE, 0xDC, 0xBA, 0x88, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xEE, 0xED, 0xCB, 0x98, 0x65, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xFE, + 0xEE, 0xDB, 0xA9, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xEF, 0xED, 0xEC, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xFE, 0xDD, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xBD, 0xEF, 0xED, 0xDC, 0xBA, 0x97, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDE, 0xEE, 0xDE, 0xCB, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCD, 0xEF, 0xFD, 0xED, 0xCB, 0xA9, 0x87, 0x76, 0x78, 0x9A, + 0xBC, 0xEE, 0xFF, 0xDF, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDE, + 0xEF, 0xED, 0xFE, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xBC, 0xDE, 0xDE, 0xFE, + 0xDF, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xCC, 0xDE, 0xEE, 0xFF, 0xED, 0xEF, + 0xED, 0xDD, 0xCD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFE, 0xFE, 0xDF, 0xFE, 0xDE, + 0xEE, 0xEE, 0xDE, 0xEE, 0xFF, 0xEF, 0xFE, 0xFE, 0xFF, 0xEE, 0xEE, 0xEF, + 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xDD, 0xDD, 0xDD, 0xDD, 0xEE, + 0xEE, 0xFE, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCC, 0xBB, 0xBB, 0xCC, 0xCC, 0xBC, 0xBC, 0xCD, 0x8D, 0xEE, + 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xED, 0xDE, 0xED, 0xDC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCD, 0xDF, 0xDC, 0xDC, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xED, 0xCD, 0xCC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCD, 0xCB, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDC, + 0xCD, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xCE, 0xCC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x89, + 0x9A, 0xBC, 0xED, 0xCC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x89, 0x9A, 0xBC, + 0xDF, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xED, + 0xCE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xDC, 0xED, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xEE, 0xDE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDF, 0xEF, 0xED, 0xFF, 0xEE, 0xED, 0xDC, + 0xDD, 0xDD, 0xEE, 0xEE, 0xFF, 0xFE, 0x7C, 0xCD, 0xCC, 0xCC, 0xCC, 0xCD, + 0xDD, 0xDD, 0xED, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0x8B, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xBB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x98, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xA9, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x87, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xAB, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xCB, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xBC, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCB, 0xDD, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0x8B, 0xBB, 0xBB, 0xBB, 0xBA, 0xAA, + 0xBB, 0xBB, 0xCC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x8B, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xBB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBA, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xBB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCB, 0xBC, 0xBB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xCC, 0xDC, 0x8B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8C, 0xDC, + 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xCC, 0xBB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xCB, 0xBB, 0xAA, 0x99, 0x88, 0x87, 0x88, + 0x89, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDB, 0xBD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xCB, 0xDC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xDC, 0x8C, 0xBB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xBB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xCD, 0xCB, 0xCB, 0xBB, 0xCB, 0xCB, 0xCC, 0xCC, 0x7D, 0xFF, + 0xDD, 0xCC, 0xCB, 0xBB, 0xCC, 0xCD, 0xDD, 0xDE, 0xED, 0xDD, 0xDC, 0xCC, + 0xBB, 0xAB, 0xAB, 0xBB, 0xCC, 0xDD, 0xEE, 0xDD, 0xDD, 0xCB, 0xBA, 0xA9, + 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xEC, 0xCD, 0xCB, 0xAA, 0x99, 0x88, 0x89, + 0x99, 0xAA, 0xBC, 0xDD, 0xDC, 0xDB, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x99, + 0xAB, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x89, 0xAB, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xBC, 0xB9, 0x87, 0x65, 0x54, 0x55, 0x67, 0x79, 0x9B, 0xBC, 0xCC, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x45, 0x67, 0x89, 0xAC, 0xCD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9B, 0xBD, 0xDB, 0xCA, 0xA8, 0x87, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xBB, 0xCD, 0xBB, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAA, 0xCD, 0xDC, 0xCB, 0xA9, 0x88, 0x77, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBB, 0xA9, 0x98, 0x77, 0x77, 0x88, 0x9A, 0xBB, + 0xDE, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xBB, 0xDD, 0xED, + 0xDD, 0xDC, 0xBB, 0xAA, 0xA9, 0x99, 0xAA, 0xBC, 0xCD, 0xEF, 0xDC, 0xED, + 0xDC, 0xBB, 0xBB, 0xAA, 0xBB, 0xBC, 0xCC, 0xEE, 0xEE, 0xDE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEE, 0xEF, 0xFD, 0xFE, 0xDD, 0xDD, 0xDC, + 0xDD, 0xDD, 0xDE, 0xED, 0xFF, 0xFE, 0x8D, 0xCD, 0xCD, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xEE, 0xEF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xED, 0xDD, 0xDD, 0xDC, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xEE, 0xED, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xDC, + 0xCC, 0xCC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xCB, 0xBB, 0xAB, + 0xBC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xBB, 0xA9, 0x99, 0x9A, 0xAB, + 0xCD, 0xFF, 0xFF, 0xEF, 0xFD, 0xCA, 0x98, 0x77, 0x77, 0x89, 0xAC, 0xDF, + 0xFF, 0xFF, 0xFE, 0xDB, 0xA8, 0x76, 0x56, 0x67, 0x8A, 0xBD, 0xDF, 0xFF, + 0xFF, 0xFC, 0xB9, 0x76, 0x54, 0x45, 0x68, 0x9B, 0xCD, 0xFF, 0xFF, 0xFD, + 0xCB, 0x97, 0x54, 0x23, 0x46, 0x79, 0xAC, 0xEF, 0xFF, 0xFF, 0xEC, 0xA9, + 0x76, 0x43, 0x24, 0x57, 0x9B, 0xCD, 0xFF, 0xFF, 0xFD, 0xCB, 0x98, 0x65, + 0x44, 0x46, 0x79, 0xBC, 0xEF, 0xFF, 0xEF, 0xDD, 0xBA, 0x87, 0x66, 0x56, + 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xFE, 0xDC, 0xA9, 0x88, 0x77, 0x78, 0x9A, + 0xCD, 0xFF, 0xFF, 0xDF, 0xFD, 0xCB, 0xAA, 0x99, 0x99, 0xAB, 0xBD, 0xDF, + 0xFF, 0xFD, 0xFF, 0xDD, 0xCB, 0xBB, 0xAA, 0xBB, 0xCC, 0xFE, 0xFF, 0xFF, + 0xEF, 0xFD, 0xED, 0xDC, 0xCC, 0xCC, 0xCD, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, + 0xEF, 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, + 0xEF, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCD, 0xDD, 0xDD, 0xFD, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xEE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x9E, 0xFF, + 0xEE, 0xED, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFD, 0xEF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xDD, 0xED, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xFE, 0xDE, 0xDC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xDD, 0xCA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xCD, 0xED, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xED, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xDE, 0xEC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9B, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xEF, 0xEC, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, + 0xCE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xEC, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFF, 0xCF, 0xED, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xFF, 0xFC, 0xFE, 0xFE, 0xDD, 0xDD, + 0xDE, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xCD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xEE, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0x9E, 0xFE, + 0xED, 0xCC, 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0xEE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDD, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xCD, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xEC, 0xDD, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFF, 0xCE, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFD, 0xEE, 0xDD, 0xCD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xAD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xDD, 0xDE, 0xEF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xED, 0xEE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x9F, 0xFF, + 0xFE, 0xED, 0xDC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xED, 0xEF, 0xEE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xDE, 0xEE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xED, 0xDE, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xDD, 0xDD, 0xCB, 0xA8, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDD, 0xCC, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9B, 0xCD, 0xDD, 0xCD, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDF, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, 0x89, 0x99, 0xAA, 0xBC, 0xDD, 0xED, + 0xCD, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEF, 0xED, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xFE, 0xCD, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFD, 0xFE, 0xEE, 0xED, 0xDD, + 0xDD, 0xEE, 0xDE, 0xFE, 0xFF, 0xFE, 0x9C, 0xCD, 0xCC, 0xCC, 0xCC, 0xDD, + 0xDD, 0xDE, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xFF, 0xFF, 0xEE, 0xDD, 0xDD, 0xDD, 0xCC, 0xCD, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xEE, 0xFE, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xEF, 0xDC, 0xDD, 0xDD, 0xFF, 0xEF, 0xFF, 0xDF, 0xFF, 0xFE, 0xDD, 0xCC, + 0xBB, 0xBC, 0xCD, 0xDD, 0xDF, 0xFE, 0xFF, 0xFF, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCC, 0xDF, 0xFF, 0xEF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x99, 0xAB, + 0xCD, 0xDF, 0xFE, 0xFF, 0xFC, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xFF, 0xFD, 0xCB, 0x97, 0x65, 0x55, 0x67, 0x89, 0xBB, 0xDF, 0xFF, + 0xFF, 0xDC, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xFF, 0xFF, 0xFD, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFE, 0xDB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xBD, 0xFF, 0xFF, 0xED, 0xBA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9B, 0xCF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x87, 0x76, 0x78, 0x9A, + 0xBC, 0xDF, 0xFF, 0xEF, 0xEC, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFE, 0xFF, 0xCD, 0xCB, 0xAA, 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, + 0xEF, 0xFF, 0xDD, 0xCB, 0xBB, 0xBB, 0xDC, 0xEE, 0xFF, 0xFF, 0xFD, 0xFE, + 0xEF, 0xDD, 0xDC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDC, 0xDD, 0xDE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xDE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xDC, 0xCC, 0xCD, 0x8F, 0xFF, + 0xEE, 0xDC, 0xDC, 0xBC, 0xCD, 0xDE, 0xDD, 0xEF, 0xED, 0xEE, 0xEE, 0xDC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xED, 0xEE, 0xED, 0xFE, 0xDC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xCC, 0xDD, 0xED, 0xDE, 0xCC, 0xBA, 0x99, 0x88, 0x89, + 0x99, 0xAB, 0xBC, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCE, 0xDD, 0xDD, 0xCA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x99, 0xAB, + 0xCE, 0xDD, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9B, 0xBD, 0xDD, + 0xCC, 0xBA, 0x87, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCE, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xCD, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xEC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x8A, 0xBC, 0xDD, 0xCD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9A, 0xBD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBC, 0xDD, 0xEE, + 0xCE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xED, 0xEE, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEE, 0xFE, 0xDE, 0xEE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDF, 0xEE, 0xFF, 0xEC, 0xEF, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFE, 0x8D, 0xDD, 0xDC, 0xDC, 0xDD, 0xDD, + 0xDD, 0xDE, 0xEF, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xAA, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xAB, 0xBB, 0x8B, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDB, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xBB, 0xCB, 0xAA, 0x99, 0x88, + 0x88, 0x99, 0x99, 0xAA, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBB, 0xAA, 0xA9, 0x98, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xBA, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xA9, + 0x88, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x89, 0x9A, 0xAB, 0xCB, + 0xAC, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xCB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xBC, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xDB, 0xDC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCD, 0xDD, 0xEC, 0x8B, 0xBB, 0xBB, 0xBB, 0xAA, 0xAA, + 0xBB, 0xBB, 0xCC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0x9B, 0xCC, + 0xBB, 0xAA, 0xAA, 0x99, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x99, 0x9A, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0x9A, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBB, + 0xAB, 0xAA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xBB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCB, 0xBC, 0xBB, 0xBA, + 0xAA, 0xA9, 0x9A, 0xAA, 0xAB, 0xBB, 0xCD, 0xCB, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8C, 0xDD, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0xDC, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xCB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xCB, 0xBC, 0xAA, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAB, 0xBC, 0xBB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x89, 0x9A, 0xAB, 0xCC, + 0xBC, 0xBB, 0xA9, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xCB, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDD, 0xCC, 0xDC, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0x8B, 0xBB, 0xBB, 0xBA, 0xAA, 0xBB, + 0xBB, 0xBC, 0xCC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xED, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7E, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCD, 0xDD, 0xCE, 0xEE, 0xFF, 0xFD, 0xDF, 0xDD, 0xDC, + 0xDC, 0xCC, 0xBC, 0xCC, 0xCD, 0xDD, 0xFE, 0xDD, 0xEE, 0xDC, 0xBB, 0xBB, + 0xAA, 0xBB, 0xBB, 0xDD, 0xDE, 0xED, 0xDE, 0xDD, 0xBA, 0xA9, 0x99, 0x99, + 0xAA, 0xBB, 0xCD, 0xDD, 0xDD, 0xDC, 0xBB, 0xA9, 0x88, 0x88, 0x89, 0x9A, + 0xBC, 0xDE, 0xED, 0xCD, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDD, 0xDC, 0xBA, 0x87, 0x65, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xDC, + 0xDD, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xBC, 0xCE, 0xDC, 0xDB, + 0xA9, 0x86, 0x54, 0x33, 0x45, 0x78, 0x9A, 0xCD, 0xDD, 0xCD, 0xCA, 0x98, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xAC, 0xCE, 0xCC, 0xDB, 0xB9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xFD, 0xCD, 0xCB, 0xA9, 0x87, 0x65, 0x56, + 0x67, 0x89, 0xBC, 0xDD, 0xDC, 0xDD, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xED, 0xCD, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xDF, 0xEC, 0xED, 0xDB, 0xBA, 0xA9, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xDE, + 0xCF, 0xDD, 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xDF, 0xED, 0xFE, + 0xDD, 0xCC, 0xCB, 0xCB, 0xCC, 0xCD, 0xDE, 0xEE, 0xFD, 0xDF, 0xEF, 0xFD, + 0xDD, 0xDD, 0xDC, 0xED, 0xED, 0xEE, 0xFF, 0xFD, 0xFF, 0xFD, 0xEE, 0xED, + 0xDD, 0xDF, 0xEE, 0xFE, 0xFF, 0xFF, 0x8D, 0xDD, 0xDC, 0xCD, 0xDD, 0xCD, + 0xCD, 0xDD, 0xED, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFE, 0xCF, 0xCD, 0xCC, 0xCC, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, + 0xFF, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xCC, 0xBB, + 0xCC, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xBA, 0xAA, 0xAB, 0xBC, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xA9, 0x87, 0x66, 0x78, 0x9B, 0xCD, 0xFF, 0xFF, + 0xFF, 0xDC, 0xBA, 0x86, 0x54, 0x45, 0x78, 0xAC, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFB, 0xA8, 0x64, 0x22, 0x46, 0x89, 0xBD, 0xFF, 0xFF, 0xDF, 0xDC, 0xB9, + 0x86, 0x42, 0x24, 0x68, 0x9B, 0xDD, 0xFF, 0xFF, 0xFF, 0xCC, 0xA8, 0x75, + 0x44, 0x56, 0x8A, 0xBF, 0xFF, 0xFF, 0xFF, 0xCF, 0xCA, 0x98, 0x76, 0x66, + 0x79, 0xAD, 0xFF, 0xFF, 0xFF, 0xFD, 0xFD, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xDC, 0xFF, 0xFF, 0xDF, 0xFF, 0xDC, 0xCA, 0xAA, 0xAA, 0xAB, 0xCF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0xCC, 0xBB, 0xCC, 0xFD, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFD, 0xDD, 0xDC, 0xCC, 0xCB, 0xCC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xEE, 0xDD, 0xDC, 0xCC, 0xCD, 0xDC, 0xED, 0xDF, 0xFC, 0xFF, 0xEE, 0xDC, + 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xDF, 0xFD, 0xCC, 0xBB, 0xAB, + 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xED, 0xDD, 0xDC, 0xBB, 0xAA, 0x99, 0x99, + 0x9A, 0xBC, 0xCD, 0xDD, 0xDD, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0x9A, + 0xBB, 0xCD, 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDD, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xED, + 0xCC, 0xCA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAC, 0xDE, 0xDC, 0xCB, + 0xA9, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9A, 0xBC, 0xDD, 0xDC, 0xBA, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x89, 0xBC, 0xDE, 0xDC, 0xCC, 0xBA, 0x98, 0x87, 0x76, 0x77, 0x89, + 0xAB, 0xCD, 0xEE, 0xCD, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x89, 0xAB, 0xCD, + 0xDE, 0xFC, 0xED, 0xBB, 0xBA, 0xA9, 0x99, 0x9A, 0xAB, 0xBD, 0xDF, 0xFE, + 0xCD, 0xED, 0xCB, 0xBB, 0xBA, 0xAA, 0xBB, 0xCC, 0xED, 0xFF, 0xEC, 0xEE, + 0xDC, 0xCC, 0xCC, 0xBC, 0xCC, 0xDD, 0xDF, 0xEF, 0xFF, 0xCD, 0xED, 0xDD, + 0xCD, 0xCD, 0xDC, 0xDD, 0xDF, 0xEF, 0xFF, 0xFC, 0xFF, 0xFD, 0xEE, 0xED, + 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDC, 0xCD, 0xCD, 0xDD, 0xED, + 0xEE, 0xFE, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xAF, 0xFF, + 0xFD, 0xDC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xFE, 0xFF, 0xED, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEF, 0xEE, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xFE, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDD, 0xDD, 0xDB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xEC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDE, 0xCC, 0xBA, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xDF, 0xED, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x9A, 0xAB, 0xCD, 0xFF, + 0xDD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xFF, 0xFD, 0xED, + 0xCC, 0xBB, 0xBA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEF, 0xFF, 0xDF, 0xED, 0xDC, + 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFF, 0xFD, 0xFF, 0xED, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xAD, 0xDD, 0xDD, 0xDD, 0xDC, 0xDD, + 0xDE, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xED, 0xDC, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0x9F, 0xFF, + 0xFE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFD, 0xFE, 0xEE, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xDE, 0xEE, 0xDE, 0xFF, 0xDC, 0xBB, 0xAA, + 0x99, 0xAA, 0xAB, 0xCC, 0xCE, 0xDD, 0xED, 0xEC, 0xBA, 0x99, 0x88, 0x88, + 0x9A, 0xAB, 0xBC, 0xEE, 0xCD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCC, 0xED, 0xDD, 0xCA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xDC, 0xBA, 0x97, 0x65, 0x54, 0x55, 0x66, 0x78, 0xAB, 0xBD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xCC, 0xA9, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xCB, 0xA8, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBD, 0xDD, 0xDD, 0xCB, 0xA9, 0x88, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDF, 0xDD, 0xDC, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9A, 0xBC, 0xCE, 0xFE, + 0xDD, 0xDC, 0xBB, 0xBA, 0xA9, 0xAA, 0xAA, 0xBC, 0xDE, 0xDF, 0xFD, 0xFD, + 0xCC, 0xCB, 0xBB, 0xBA, 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xDF, 0xDD, 0xDC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFD, 0xEE, 0xDE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEF, 0xEF, 0xFF, 0xFF, 0x9C, 0xCC, 0xCC, 0xCD, 0xDC, 0xED, + 0xEE, 0xEF, 0xFF, 0xFE, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xED, 0xDD, 0xCC, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFE, 0xFE, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, + 0xFE, 0xDD, 0xDD, 0xDC, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xCC, + 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFD, 0xFF, 0xDE, 0xDC, 0xBB, 0xAA, 0xAA, + 0xAA, 0xCC, 0xCF, 0xFF, 0xDF, 0xFF, 0xCC, 0xBA, 0x98, 0x88, 0x99, 0xAB, + 0xCD, 0xFD, 0xFF, 0xED, 0xED, 0xBA, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xDD, 0xED, 0xCB, 0x97, 0x65, 0x55, 0x67, 0x89, 0xBC, 0xFF, 0xEF, + 0xEF, 0xDB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xEF, 0xED, 0xEC, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDF, 0xFE, 0xDE, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xCD, 0xEF, 0xFD, 0xEC, 0xCA, 0x97, 0x65, + 0x44, 0x45, 0x79, 0xAB, 0xDE, 0xDF, 0xFE, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xCD, 0xFF, 0xFE, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x78, 0x9A, + 0xBC, 0xEF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDE, + 0xFF, 0xFF, 0xDF, 0xCC, 0xBB, 0xAA, 0xA9, 0xAB, 0xBC, 0xDD, 0xFE, 0xFF, + 0xDF, 0xEE, 0xEC, 0xCC, 0xBB, 0xBC, 0xBD, 0xED, 0xFF, 0xFF, 0xFF, 0xEF, + 0xFD, 0xDD, 0xCC, 0xDC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xCF, 0xDE, 0xEF, + 0xDE, 0xFD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFD, 0xFF, 0xEE, + 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCB, 0xCD, 0xDE, 0xFF, 0xEE, + 0xDF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xED, 0xDB, 0xCC, 0xBA, 0xAB, 0xBB, 0xBB, 0xBB, 0xBB, 0x7F, 0xFD, + 0xCD, 0xCB, 0xBA, 0xBB, 0xBB, 0xBF, 0xDC, 0xDC, 0xFD, 0xDD, 0xDC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0xED, 0xCF, 0xEC, 0xDC, 0xBA, 0xAA, 0x99, + 0x98, 0x99, 0xAA, 0xBB, 0xCD, 0xDF, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, + 0x99, 0x9A, 0xBC, 0xCE, 0xDC, 0xDB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xCD, 0xCF, 0xCC, 0xB9, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAA, + 0xCC, 0xDC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAC, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDB, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAA, 0xCC, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xBB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBD, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x89, 0xAC, 0xCF, 0xCC, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xCC, 0xDB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCC, 0xDD, + 0xDF, 0xCB, 0xAA, 0xA9, 0x98, 0x99, 0x9A, 0xAB, 0xBD, 0xDF, 0xFC, 0xEE, + 0xDB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBD, 0xDE, 0xFF, 0xCF, 0xDD, 0xDD, + 0xBC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xDD, 0xDD, 0xED, 0xCD, 0xCD, + 0xDC, 0xCC, 0xCE, 0xDF, 0xFF, 0xFF, 0x8D, 0xBB, 0xED, 0xCC, 0xCB, 0xCD, + 0xCF, 0xDD, 0xDF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCB, 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xAA, 0xBB, 0x7C, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xDC, 0xCC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xCB, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBC, 0xDC, 0xBB, 0xAA, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x99, 0xAA, 0xBB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xAB, 0xB9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAB, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xB9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xB9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAC, 0xBA, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x78, 0x88, 0x9A, 0xAB, 0xCC, + 0xBB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAB, 0xCD, 0xCB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCC, 0xDE, 0xBC, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xCE, 0xDB, 0xDE, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xED, 0x9C, 0xCB, 0xBB, 0xAB, 0xAA, 0xBA, + 0xBB, 0xBB, 0xCD, 0xDD, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9C, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xDC, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xBB, + 0xAA, 0x99, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xDC, 0xBC, 0xBB, 0xAA, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBC, 0xCD, 0xDB, 0xCD, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDD, 0x9C, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xCC, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCC, 0xCB, 0xBA, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xBB, 0xBB, 0x8C, 0xCD, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xCC, 0xBA, 0xBA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xCC, 0xCC, 0xCB, 0xA9, 0x99, 0x88, + 0x88, 0x89, 0x99, 0x9A, 0xBB, 0xCB, 0xBB, 0xAA, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x56, 0x67, 0x79, 0x9A, 0xBB, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBC, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x9A, 0xBB, 0xCB, + 0xAB, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xCB, 0xDB, + 0xAA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xDC, 0xBC, 0xBB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDB, 0xCC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xCE, 0xDD, 0x7B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xBB, 0xCB, 0xCC, 0xCC, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xDC, 0xFE, 0xCD, 0xCC, 0xDD, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xFF, 0xDF, 0xFF, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDC, + 0xBD, 0xDF, 0xFD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDC, 0xCC, 0xBB, + 0xCC, 0xFF, 0xDF, 0xFF, 0xFD, 0xFF, 0xFD, 0xCB, 0xAA, 0xAA, 0xAC, 0xBB, + 0xBE, 0xDF, 0xFF, 0xEF, 0xDF, 0xDC, 0xA9, 0x98, 0x89, 0xAA, 0xCB, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCC, 0xA9, 0x86, 0x66, 0x78, 0xAB, 0xCD, 0xFF, 0xFD, + 0xFF, 0xFD, 0xBA, 0x86, 0x54, 0x45, 0x79, 0xAC, 0xCF, 0xDF, 0xFF, 0xFF, + 0xCC, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xBE, 0xDF, 0xFF, 0xFF, 0xFD, 0xCA, + 0x86, 0x42, 0x24, 0x68, 0xAB, 0xCF, 0xFF, 0xFF, 0xFF, 0xDC, 0xA9, 0x75, + 0x44, 0x56, 0x8A, 0xCD, 0xDF, 0xFE, 0xFF, 0xFD, 0xDB, 0x98, 0x76, 0x66, + 0x89, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBA, 0x99, 0x88, 0x89, 0xBB, + 0xDD, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBA, 0xA9, 0x9A, 0xBC, 0xDD, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xBC, 0xBB, 0xCC, 0xCC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDC, 0xFD, 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDC, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xCD, 0xDF, 0xFD, 0xEE, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xDF, 0xFF, 0xFD, 0xFF, 0xFC, 0xFF, 0xFC, 0xFF, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, + 0xFF, 0xDF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xCC, 0xCF, + 0xDD, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xCF, 0xDD, 0xBB, 0xBA, 0xAC, 0xCB, + 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0x99, 0x89, 0xAA, 0xAF, 0xFF, + 0xFF, 0xFF, 0xCF, 0xFC, 0xBA, 0x87, 0x66, 0x79, 0xAB, 0xDD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCB, 0x97, 0x54, 0x45, 0x79, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xB9, 0x64, 0x22, 0x46, 0x8A, 0xDD, 0xDD, 0xFF, 0xFF, 0xFD, 0xDC, + 0x96, 0x42, 0x23, 0x69, 0xBB, 0xCF, 0xFF, 0xFF, 0xFF, 0xFC, 0xB9, 0x75, + 0x44, 0x57, 0x9B, 0xBF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xA9, 0x76, 0x66, + 0x89, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xA9, 0x88, 0x99, 0xAD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xAA, 0xAB, 0xCC, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xDB, 0xBB, 0xBF, 0xCF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDD, 0xFD, 0xFD, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDC, 0xDC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xDF, 0xFD, 0xFF, 0xFA, 0xBD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x89, 0x99, 0x98, 0x88, 0x88, 0x88, 0x88, 0x98, 0x98, 0x9A, 0x6A, 0xCB, + 0x9A, 0xA9, 0x99, 0x99, 0xAA, 0x9A, 0xAB, 0xAA, 0xDA, 0x9A, 0xA9, 0x89, + 0x99, 0x89, 0x99, 0x89, 0x8A, 0x99, 0xAA, 0x9A, 0xAA, 0x99, 0x88, 0x88, + 0x88, 0x88, 0x89, 0xA9, 0xAA, 0xAA, 0x89, 0xA9, 0x98, 0x88, 0x88, 0x88, + 0x88, 0x89, 0x9A, 0xB9, 0xA9, 0xA9, 0x98, 0x78, 0x77, 0x77, 0x77, 0x88, + 0x89, 0x9A, 0xA9, 0x89, 0x98, 0x87, 0x76, 0x76, 0x77, 0x77, 0x88, 0x99, + 0x9A, 0xA8, 0x98, 0x88, 0x76, 0x66, 0x66, 0x77, 0x77, 0x88, 0x89, 0x98, + 0x89, 0x98, 0x87, 0x76, 0x66, 0x66, 0x67, 0x78, 0x88, 0x9B, 0xA8, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x66, 0x77, 0x88, 0x98, 0xA8, 0x89, 0x88, 0x87, + 0x76, 0x65, 0x56, 0x67, 0x77, 0x88, 0x99, 0x98, 0x99, 0x78, 0x77, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x8A, 0x99, 0x89, 0x98, 0x78, 0x77, 0x66, 0x66, + 0x67, 0x77, 0x88, 0xAB, 0x98, 0x99, 0x89, 0x87, 0x77, 0x76, 0x67, 0x77, + 0x88, 0x89, 0xA9, 0x9A, 0x9A, 0x98, 0x77, 0x77, 0x77, 0x77, 0x78, 0x89, + 0x9B, 0x98, 0xA9, 0x99, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x9A, 0xA9, + 0x8A, 0x99, 0x99, 0x89, 0x88, 0x88, 0x88, 0x99, 0x8A, 0xAA, 0xA9, 0xAB, + 0xAA, 0x98, 0x88, 0x89, 0x88, 0x89, 0x9A, 0xBA, 0xA9, 0xAC, 0xBA, 0xB9, + 0xAA, 0x99, 0x99, 0x9A, 0x99, 0xAA, 0xAD, 0xA9, 0xBA, 0xAB, 0xAB, 0xA9, + 0x9A, 0x9A, 0xBA, 0xAA, 0x9C, 0xBB, 0x8B, 0xA9, 0xA8, 0x99, 0x98, 0x88, + 0x99, 0x9A, 0xAA, 0xAB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xDD, 0xCC, 0xCC, 0xDC, 0xDD, 0xED, 0xEF, 0xDF, 0xFF, + 0xED, 0xDC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFF, 0xFF, 0xFE, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFF, 0xFD, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xFF, 0xFD, 0xCB, 0xA9, 0x98, 0x87, 0x88, + 0x89, 0x9A, 0xBC, 0xFF, 0xFE, 0xDC, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDF, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xEE, 0xBB, 0x98, 0x76, 0x65, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDF, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x45, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xA9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xEC, 0xCA, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDF, 0xDC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xDF, 0xFF, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xFF, + 0xFE, 0xCB, 0xBA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xFF, 0xFF, 0xFD, + 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xFF, 0xFF, 0xFF, 0xEF, 0xDD, + 0xCB, 0xBB, 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDD, + 0xDD, 0xDE, 0xDE, 0xFF, 0xFF, 0xFF, 0xCF, 0xFE, 0xFE, 0xFE, 0xEF, 0xDD, + 0xDF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0x99, 0xA9, 0x89, 0x89, 0x99, 0x98, 0x99, 0xBB, 0x6B, 0xAB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xBA, 0xAB, 0xBE, 0xFB, 0x9B, 0xAA, 0x99, + 0x99, 0x99, 0x99, 0xA9, 0xAC, 0x9B, 0xBA, 0xC9, 0xB9, 0xA9, 0x99, 0x88, + 0x89, 0x88, 0x89, 0xAA, 0xAA, 0xBA, 0x99, 0x99, 0x88, 0x88, 0x77, 0x87, + 0x88, 0x89, 0xAA, 0xAA, 0xA9, 0x9A, 0x88, 0x87, 0x77, 0x77, 0x78, 0x88, + 0x99, 0xAA, 0xA9, 0x9A, 0x99, 0x87, 0x76, 0x66, 0x67, 0x77, 0x88, 0x99, + 0xBB, 0xA9, 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x78, 0x88, 0x99, 0xB9, + 0x9A, 0x98, 0x87, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x77, 0x78, 0x8A, 0xA9, 0x99, 0x99, 0x87, + 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xA8, 0x99, 0x98, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x99, 0xA9, 0x99, 0x98, 0x98, 0x77, 0x66, 0x66, + 0x67, 0x78, 0x98, 0x9B, 0xA9, 0x99, 0x98, 0x87, 0x77, 0x66, 0x77, 0x77, + 0x89, 0x99, 0xCA, 0x9A, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0x99, 0xBA, 0x99, 0x88, 0x88, 0x87, 0x88, 0x88, 0x89, 0x9B, 0xB9, + 0xAB, 0xA9, 0xAA, 0x88, 0x88, 0x88, 0x88, 0x9A, 0xBA, 0xAB, 0xA9, 0xEA, + 0xAA, 0x9A, 0xA9, 0x9A, 0x89, 0x99, 0x9A, 0xAC, 0xAB, 0xAC, 0xDA, 0xBA, + 0xAA, 0x9A, 0x99, 0xAA, 0xAB, 0xBA, 0xCC, 0xAA, 0xFB, 0xDB, 0xBA, 0xAA, + 0xAA, 0xBA, 0xBB, 0xBB, 0xFC, 0xFB, 0x7A, 0x99, 0x99, 0x99, 0x99, 0x99, + 0x99, 0x9A, 0xAA, 0xAB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xA9, 0xAA, 0xBB, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x98, 0x77, 0x89, 0xAF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xA8, 0x54, 0x46, 0x8A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDA, 0x74, 0x12, 0x47, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xA7, 0x42, 0x24, 0x79, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x86, + 0x44, 0x57, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB9, 0x87, 0x77, + 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBA, 0x9A, 0xAB, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x8A, 0x98, 0x88, 0x87, 0x77, 0xF7, 0x6F, 0x88, 0x8F, 0xAA, 0x59, 0xFA, + 0xAF, 0xAF, 0x8A, 0x87, 0x8A, 0xA8, 0xFA, 0xA9, 0xF9, 0x9A, 0xAF, 0x98, + 0x9A, 0x79, 0x89, 0x78, 0x9A, 0xFA, 0xFF, 0xAC, 0x88, 0x8F, 0x87, 0x88, + 0xA8, 0x89, 0x9A, 0x87, 0xAF, 0xFA, 0x7A, 0xA9, 0x87, 0x78, 0x77, 0x98, + 0x78, 0x89, 0xAA, 0xFA, 0xA8, 0x98, 0x99, 0x87, 0x78, 0x87, 0x77, 0x87, + 0x87, 0xFA, 0xE8, 0x8B, 0x97, 0x76, 0x88, 0x77, 0x67, 0x77, 0x78, 0x78, + 0x8A, 0x87, 0xA9, 0x8F, 0x77, 0x77, 0x67, 0x97, 0x88, 0x78, 0x99, 0xA8, + 0x79, 0x89, 0x77, 0x76, 0x66, 0x76, 0x77, 0x77, 0x8F, 0x89, 0x98, 0xF9, + 0x88, 0x97, 0x66, 0x57, 0x67, 0x78, 0x77, 0xA9, 0x88, 0x78, 0x87, 0x87, + 0x66, 0x66, 0x66, 0x67, 0x68, 0x97, 0xF9, 0x88, 0xA8, 0x78, 0x87, 0x76, + 0x66, 0x77, 0x68, 0x77, 0x88, 0x89, 0x99, 0xA8, 0x78, 0x77, 0x77, 0x76, + 0x67, 0x76, 0x77, 0x89, 0xA9, 0x8A, 0x87, 0x87, 0x77, 0x68, 0x76, 0x76, + 0x88, 0x9A, 0x9A, 0xAA, 0xA7, 0x97, 0x87, 0x87, 0x87, 0x77, 0x99, 0x77, + 0x9A, 0x87, 0x9A, 0x99, 0x79, 0x79, 0x76, 0x87, 0x98, 0x99, 0xA8, 0x88, + 0x98, 0x9A, 0xA9, 0x99, 0x97, 0x98, 0x8A, 0x98, 0x9A, 0xFF, 0xA8, 0xFA, + 0x7F, 0x8A, 0x8F, 0x98, 0x8A, 0xA8, 0xFF, 0xF9, 0xA8, 0xAF, 0x99, 0x99, + 0x88, 0x99, 0xAA, 0x98, 0x9A, 0xAA, 0xAF, 0xAA, 0xFA, 0xF9, 0x9A, 0xFA, + 0xF9, 0x8A, 0xA8, 0x98, 0xAF, 0xA9, 0x9F, 0xFA, 0x89, 0x87, 0x78, 0x98, + 0x87, 0x8A, 0x87, 0x99, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xBF, 0xFF, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xBF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x88, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF8, 0x65, 0x57, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x84, 0x12, 0x58, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF8, 0x52, 0x14, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0x96, + 0x54, 0x68, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xA8, 0x89, + 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFB, 0xFF, 0xFF, 0xFF, 0xBF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xEF, 0xFE, 0xEF, 0xFF, 0xFE, 0xEE, 0xE5, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, + 0xEE, 0xEE, 0x4E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0x5F, 0xFF, + 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, 0x5E, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xE5, + 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0x55, 0xF5, 0x5F, 0xF5, 0xFF, 0x5F, 0x5F, + 0xFF, 0xFF, 0xF4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF5, 0xFF, 0xF5, 0xFF, 0x5F, 0x4F, 0xFE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xE3, 0xE5, 0xEE, 0x5E, 0xEE, 0xEE, 0xEE, 0xE5, 0x4E, + 0xEE, 0x5E, 0x5E, 0xE5, 0x5E, 0x5E, 0x55, 0xEE, 0xEE, 0x54, 0xEE, 0xE5, + 0x5E, 0xE5, 0xE6, 0x5E, 0xEE, 0xEE, 0xEE, 0xEF, 0xF5, 0xFF, 0xF5, 0xFF, + 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xF5, 0xFF, 0x5F, 0xFF, + 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0x5F, 0xF5, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF4, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0x5F, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFE, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x78, 0xF6, 0x66, 0x68, 0x76, 0x67, 0x67, 0x98, 0x78, 0x7F, 0x68, 0x98, + 0x9F, 0xF8, 0xF7, 0xFE, 0x8F, 0xFF, 0x9F, 0xFF, 0x9F, 0x88, 0x7F, 0x88, + 0x9F, 0x79, 0x9F, 0xFF, 0x8F, 0x9F, 0xF9, 0x96, 0x99, 0x97, 0x78, 0x67, + 0xF7, 0x98, 0xFF, 0x79, 0x99, 0xF8, 0x77, 0xF8, 0x89, 0x97, 0x78, 0x89, + 0xF7, 0x8F, 0xFF, 0xFF, 0x78, 0x99, 0x79, 0x97, 0x97, 0x77, 0x99, 0x7F, + 0x79, 0x99, 0x98, 0x77, 0x9F, 0x67, 0x67, 0x67, 0x78, 0x98, 0x9F, 0x99, + 0x89, 0xF6, 0x9F, 0x79, 0x78, 0x76, 0x66, 0xF8, 0x78, 0x89, 0x78, 0xF8, + 0x87, 0x88, 0x99, 0x87, 0x77, 0x69, 0x79, 0x78, 0xF7, 0x9F, 0x77, 0xF9, + 0x99, 0x76, 0x77, 0x77, 0x68, 0x87, 0x78, 0x9F, 0x97, 0x88, 0x78, 0x89, + 0x97, 0x76, 0x77, 0x77, 0x89, 0x8F, 0x8F, 0x67, 0x89, 0x98, 0x89, 0x78, + 0x77, 0x87, 0x78, 0x79, 0x78, 0x96, 0x68, 0x9F, 0xA8, 0x97, 0x78, 0x78, + 0x8F, 0x89, 0x79, 0x8F, 0x67, 0xFF, 0x8F, 0x99, 0x77, 0x66, 0x66, 0x76, + 0x86, 0xF8, 0xF6, 0x99, 0x9F, 0x7F, 0x89, 0x97, 0x79, 0x88, 0x6F, 0x88, + 0x89, 0x68, 0xFF, 0xFF, 0xF9, 0x98, 0x89, 0xF8, 0xFF, 0x98, 0x9F, 0xF7, + 0x78, 0x79, 0xF9, 0x77, 0x89, 0xF8, 0x97, 0x89, 0xF9, 0x98, 0x77, 0x9F, + 0x9F, 0x89, 0x9F, 0x99, 0x98, 0x9F, 0x99, 0x9F, 0x98, 0x89, 0x98, 0xFF, + 0x9F, 0xF8, 0xF9, 0x88, 0x9F, 0x7F, 0xF9, 0x67, 0xFF, 0x99, 0x98, 0xF9, + 0xFF, 0x89, 0x9F, 0xFF, 0x9F, 0xF9, 0x59, 0x77, 0x98, 0x68, 0x96, 0x77, + 0x68, 0x89, 0xF7, 0x6F, 0x60, 0x00, 0x00, 0x00, + }, + { + 0x68, 0x89, 0x78, 0x77, 0x67, 0x88, 0x88, 0xFF, 0x79, 0x99, 0x69, 0xF9, + 0xF9, 0x88, 0x87, 0x79, 0x8F, 0xF9, 0xF8, 0xF9, 0xF7, 0x8F, 0x98, 0x78, + 0x79, 0xF9, 0xF8, 0x88, 0x79, 0x7F, 0xF9, 0x97, 0xFF, 0x8F, 0x98, 0x78, + 0x77, 0x67, 0xF8, 0xF9, 0xFF, 0xF9, 0x78, 0xF8, 0x88, 0x87, 0x88, 0x77, + 0x98, 0xF7, 0x98, 0xFF, 0x98, 0x9F, 0xF8, 0x98, 0x87, 0x76, 0x79, 0x97, + 0x78, 0x89, 0x8C, 0x77, 0x88, 0x78, 0x77, 0x77, 0x88, 0x77, 0x78, 0x79, + 0x9F, 0x88, 0x79, 0x77, 0x77, 0x77, 0x67, 0x77, 0x77, 0x8F, 0x99, 0x97, + 0x87, 0x77, 0x78, 0x87, 0x78, 0x76, 0x77, 0x78, 0x9F, 0x99, 0xF7, 0x77, + 0x98, 0x76, 0x76, 0x77, 0x68, 0x7F, 0x78, 0xFF, 0xF9, 0x78, 0x88, 0x87, + 0x88, 0x76, 0x67, 0x88, 0x79, 0x78, 0xF9, 0x87, 0x89, 0x97, 0x77, 0x68, + 0x67, 0x77, 0x77, 0x77, 0x8E, 0x78, 0x78, 0x8A, 0x88, 0x77, 0x87, 0x77, + 0x67, 0x88, 0x88, 0x8F, 0x87, 0x89, 0x88, 0x77, 0x76, 0x77, 0x79, 0x77, + 0x77, 0x8F, 0x88, 0x79, 0xF8, 0x77, 0x78, 0x77, 0x88, 0x77, 0x78, 0x98, + 0x89, 0x89, 0xFF, 0xF8, 0x88, 0x99, 0x77, 0x98, 0x78, 0x87, 0x99, 0x99, + 0x98, 0xF8, 0x98, 0xFF, 0xFF, 0x79, 0x88, 0x77, 0x79, 0x8F, 0x88, 0xF8, + 0x88, 0xFF, 0x88, 0x78, 0x99, 0x9F, 0x88, 0xF9, 0xF8, 0x88, 0x99, 0xB9, + 0xF7, 0x88, 0x99, 0xF9, 0x99, 0x9F, 0xFF, 0x99, 0xFF, 0x8F, 0x98, 0x8F, + 0x89, 0x99, 0xF8, 0x99, 0x8F, 0xF9, 0x5F, 0x89, 0x77, 0x87, 0x99, 0x78, + 0x88, 0x77, 0xF8, 0x8F, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x5E, 0xDE, 0xE5, 0xDE, 0xEE, 0xED, 0xDD, 0xDE, 0xEE, 0xEE, 0x4E, 0xED, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, + 0xDD, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xDD, + 0x5D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD5, 0x45, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xE5, 0xEE, 0xEE, 0xE5, 0xEE, 0xEE, + 0x5E, 0xEE, 0xEE, 0xEE, 0xE5, 0xE5, 0xEE, 0xE5, 0x54, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0x45, 0xEE, 0xEE, 0x55, 0xEE, 0xEE, 0xE5, 0xED, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x5D, 0xDD, 0xDD, 0xDD, 0x55, 0xDD, 0xDD, + 0x55, 0x5D, 0x4D, 0xDD, 0xDD, 0x45, 0xDD, 0x5D, 0xDD, 0xDD, 0xDD, 0xDD, + 0x54, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0x5E, 0xEE, 0x5E, 0xEE, + 0xEE, 0x5E, 0xEE, 0xEE, 0xE5, 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, 0x4E, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, 0xEE, 0xE4, 0xE5, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xEE, 0xEE, 0xEE, 0x5E, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x55, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, + 0xEE, 0xED, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xED, 0xED, + 0xEE, 0xEE, 0xEE, 0x5E, 0xEE, 0xEE, 0xED, 0xED, 0xEE, 0xE5, 0xEE, 0xEE, + 0xED, 0xED, 0xED, 0xEE, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xF9, 0xF8, 0xF9, 0x4F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF8, 0x64, 0x68, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x85, 0x12, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x52, 0x14, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, + 0x54, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x59, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xF7, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x7F, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xF6, + 0xF6, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF7, 0xF6, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0x66, 0xF6, + 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x57, 0x67, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFD, 0xBF, 0xF7, 0xF7, 0x6F, 0x66, 0x6F, 0x66, 0xF6, 0xFF, + 0xFF, 0xF6, 0xF6, 0xFF, 0x75, 0x76, 0xF5, 0x66, 0x66, 0x66, 0xFF, 0xFF, + 0xF6, 0xFF, 0xFF, 0xF5, 0x57, 0x66, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xF6, + 0xFF, 0x56, 0x56, 0x75, 0x77, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xF7, 0xF6, + 0xF6, 0xF6, 0x44, 0xF5, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, + 0x56, 0x75, 0x56, 0xF6, 0xFF, 0xFD, 0xC6, 0xAF, 0xF6, 0x6F, 0xFF, 0x55, + 0x57, 0x5F, 0x7F, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0x65, 0x6F, 0xFF, 0x68, + 0x7F, 0xFF, 0xFF, 0x6F, 0xFF, 0xF6, 0xF6, 0x5F, 0x65, 0x6F, 0x6F, 0xFF, + 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xF6, 0x6F, 0xFF, 0xFF, 0xFF, + 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xFF, 0xFF, + 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0x7F, 0x7F, 0xFF, 0xFF, 0x7F, + 0xFF, 0x7F, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFD, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x12, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x61, 0x15, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + }, + { + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xED, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, 0xED, + 0xD5, 0x55, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xE5, 0xE5, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xEE, 0xE5, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0x5E, 0x5E, 0xEE, 0x55, 0x54, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, + 0xDD, 0xDD, 0xD5, 0x5D, 0x44, 0x5D, 0xDD, 0xDD, 0xDD, 0xDD, 0x5D, 0xD5, + 0xD5, 0x5D, 0xDD, 0xD3, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0x5D, + 0xD4, 0x35, 0x5D, 0xDD, 0xDD, 0xDD, 0xDD, 0xD5, 0x5E, 0xE4, 0x54, 0x53, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xEE, 0xEE, 0x5E, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, 0xEE, 0x5E, 0xEE, 0xE5, 0x5E, 0xEE, 0x5E, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, 0xEE, 0xE4, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xE5, 0xEE, 0xEE, 0xED, 0xEE, 0xED, 0xDD, 0xED, 0xED, 0xED, 0xED, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0xEE, 0xEE, 0xED, + 0xEE, 0xED, 0xED, 0xEE, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCD, 0xCC, 0xCC, 0xDC, 0xDD, 0xFF, 0xFF, 0xFF, 0xDD, 0xEF, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xDF, 0xEF, 0xFF, 0xFF, 0xDF, 0xFD, 0xDC, + 0xBB, 0xBB, 0xAA, 0xBB, 0xCD, 0xDF, 0xFF, 0xFD, 0xED, 0xCC, 0xBB, 0xA9, + 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, 0xCD, 0xCC, 0xBA, 0x99, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDF, 0xEC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xEE, 0xDD, 0xBA, 0xA8, 0x87, 0x76, 0x66, 0x67, 0x88, 0x9A, + 0xCD, 0xDD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x67, 0x89, 0xAB, 0xCD, + 0xCC, 0xA9, 0x87, 0x76, 0x55, 0x55, 0x56, 0x77, 0x89, 0xBD, 0xDC, 0xCB, + 0x98, 0x76, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xCC, 0xA9, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x67, 0x89, 0xAD, 0xCD, 0xCA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x66, 0x78, 0x9A, 0xCC, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x55, + 0x56, 0x77, 0x8A, 0xBC, 0xDD, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x67, + 0x89, 0xAB, 0xCD, 0xEC, 0xCA, 0x98, 0x87, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xDE, 0xDC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x89, 0x9A, 0xBC, 0xDC, + 0xFE, 0xEC, 0xBA, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xBC, 0xCD, 0xDF, 0xFE, + 0xDC, 0xBB, 0xA9, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xEE, 0xFF, 0xFF, 0xDC, + 0xCB, 0xBA, 0xAB, 0xBB, 0xCC, 0xDD, 0xDE, 0xDF, 0xFF, 0xFF, 0xED, 0xCC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xED, 0xDF, 0xFF, 0xDF, 0xDD, 0xDD, 0xDC, + 0xCC, 0xCD, 0xED, 0xCE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xED, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x4E, + 0xEE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xD4, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0x4E, 0x4E, 0x4E, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xE4, 0xE3, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0x4D, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0x44, 0x4D, 0x4D, 0xDD, 0xDD, 0xDD, 0xDD, 0x4E, 0xE4, 0xEE, 0x3E, 0x4E, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE3, 0xEE, 0xE5, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE4, 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x4E, 0x3E, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE4, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0x4E, 0xEE, 0x4E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0xED, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x9C, 0xBB, 0xAA, 0xAA, 0xAA, 0x9A, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xCC, + 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xAB, 0xCD, 0xDB, 0xCB, 0xAA, 0x99, 0x99, + 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, 0xAB, 0xAA, 0xA9, 0x98, 0x88, 0x88, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x65, 0x55, 0x56, 0x67, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x99, 0xAA, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0xAB, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xCC, + 0xBA, 0x99, 0x98, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xDD, 0xCC, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBD, 0xDD, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xBC, 0xCB, 0xBA, 0xAA, 0xA9, 0x9A, + 0xAA, 0xAA, 0xBA, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCC, 0xBB, 0xCC, + 0xCA, 0xAA, 0xAA, 0x9A, 0xA9, 0xAA, 0xBB, 0xBD, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x98, 0x99, 0xA9, 0xAB, 0xBB, 0xCB, 0xBA, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBB, 0xAA, 0xA9, 0x98, 0x88, 0x88, 0x77, + 0x88, 0x88, 0x9A, 0xAB, 0xAA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x88, 0x99, 0xBA, 0x9A, 0x99, 0x88, 0x77, 0x76, 0x66, 0x77, 0x77, 0x89, + 0x9A, 0xA9, 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, 0x78, 0x89, 0xAA, + 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x99, + 0x88, 0x76, 0x66, 0x66, 0x66, 0x67, 0x77, 0x89, 0x99, 0x99, 0x98, 0x77, + 0x66, 0x66, 0x56, 0x66, 0x67, 0x78, 0x99, 0x99, 0xA9, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x66, 0x77, 0x89, 0xA9, 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x99, 0x99, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xA9, 0xAA, 0x99, 0x88, 0x77, 0x76, 0x67, 0x77, 0x78, 0x89, + 0x9A, 0x9A, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, 0x88, 0x9A, 0xB9, + 0xAB, 0xAA, 0x99, 0x88, 0x87, 0x77, 0x88, 0x89, 0x99, 0xAB, 0xAB, 0xCA, + 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x99, 0xAB, 0xBB, 0xBB, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xBC, 0xCC, 0xCB, 0xAA, 0x9A, + 0x99, 0x9A, 0x9A, 0xAB, 0xBC, 0xCC, 0xBC, 0xCA, 0xAA, 0xA9, 0x99, 0x99, + 0x99, 0x9A, 0xAA, 0xAB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0xCC, 0xBC, 0xBA, 0xAA, + 0x99, 0x99, 0x89, 0x99, 0x99, 0xAA, 0xBC, 0xBA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xA9, 0x98, 0x88, 0x87, 0x77, + 0x88, 0x88, 0x99, 0xAA, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, 0x77, 0x77, + 0x88, 0x99, 0xAA, 0x9A, 0x99, 0x88, 0x77, 0x77, 0x67, 0x77, 0x77, 0x89, + 0x9A, 0x99, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, 0x78, 0x89, 0xA9, + 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x78, 0x99, 0x99, 0x98, + 0x87, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0x99, 0x99, 0x88, 0x77, + 0x76, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0x99, 0x99, 0x87, 0x77, 0x66, + 0x66, 0x66, 0x67, 0x77, 0x89, 0x99, 0x99, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x99, 0x99, 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xA9, 0x9A, 0x98, 0x87, 0x77, 0x77, 0x67, 0x77, 0x78, 0x89, + 0x9A, 0x9A, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, 0x88, 0x99, 0xA9, + 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, 0x88, 0x88, 0x99, 0xAB, 0xAA, 0xBA, + 0xA9, 0x98, 0x88, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBA, 0xBB, 0xBA, 0xA9, + 0x99, 0x99, 0x89, 0x99, 0x99, 0xAA, 0xBB, 0xBC, 0xCB, 0xBB, 0xAA, 0xA9, + 0x99, 0x99, 0xAA, 0xAA, 0xBC, 0xCB, 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x99, + 0x99, 0x9A, 0xAA, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9C, 0xBA, 0xAA, 0x9A, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCB, 0xAB, 0xCC, + 0xBA, 0xAA, 0xA9, 0x99, 0xA9, 0xAA, 0xAA, 0xBC, 0xCC, 0xAC, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xBB, 0xCB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, + 0x78, 0x88, 0x99, 0xAA, 0xAA, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xAA, 0x9A, 0x99, 0x88, 0x77, 0x76, 0x67, 0x77, 0x77, 0x88, + 0x9A, 0x99, 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0xA9, + 0x99, 0x98, 0x77, 0x76, 0x66, 0x66, 0x66, 0x67, 0x88, 0x89, 0x99, 0x98, + 0x87, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0xA9, 0x99, 0x98, 0x87, + 0x66, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0x99, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x77, 0x89, 0x99, 0x9A, 0x88, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0x99, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xA9, 0xAA, 0x99, 0x87, 0x77, 0x77, 0x67, 0x77, 0x77, 0x89, + 0x9A, 0xAA, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x99, 0xAA, + 0xAB, 0xAA, 0x98, 0x88, 0x87, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xAA, 0xBA, + 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAA, 0xBB, 0xCC, 0xBA, 0xA9, + 0xA9, 0x99, 0x98, 0x99, 0x99, 0xAB, 0xAB, 0xAC, 0xCC, 0xBA, 0xAA, 0xA9, + 0x99, 0x9A, 0x9A, 0xBB, 0xBC, 0xCB, 0xBC, 0xBB, 0xAA, 0xA9, 0x99, 0x99, + 0x9A, 0x9A, 0xAA, 0xBB, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xCB, 0xDC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDD, 0xCC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xDB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBC, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0xA9, + 0x88, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x87, + 0x66, 0x65, 0x55, 0x66, 0x67, 0x88, 0x9A, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xB9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, + 0x78, 0x99, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0x9A, 0xAA, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xBA, + 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xAC, 0xCB, + 0xBA, 0x99, 0x98, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBB, 0xDC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xDD, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0x9A, 0xAA, 0xBB, 0xBC, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xDD, 0xCC, 0xCC, 0xCD, 0xDE, 0xED, 0xFF, 0xFF, 0xCF, 0xFF, + 0xEE, 0xDD, 0xDC, 0xCD, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFF, 0xFE, 0xDC, 0xBB, 0xAA, + 0xA9, 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, 0xDD, 0xCC, 0xBA, 0x99, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xFD, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x78, 0x89, + 0xAB, 0xCE, 0xFE, 0xDD, 0xCA, 0x98, 0x87, 0x76, 0x66, 0x77, 0x89, 0xAB, + 0xDF, 0xFD, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x77, 0x9A, 0xBC, 0xEE, + 0xDC, 0xBA, 0x97, 0x76, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xED, 0xCB, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xDC, 0xB9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xDD, 0xCB, 0xA8, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xDD, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCD, 0xDE, 0xDC, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xFD, 0xDB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAC, + 0xCD, 0xDF, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEF, + 0xFF, 0xFD, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xDF, 0xFE, + 0xED, 0xCB, 0xBA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFF, 0xFF, 0xFD, + 0xDC, 0xBC, 0xCB, 0xCC, 0xCD, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFE, 0xEE, + 0xDD, 0xDE, 0xDE, 0xEF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xEE, 0xED, 0xDD, + 0xEE, 0xDF, 0xEE, 0xFE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCC, 0xCC, 0xCB, 0xCC, 0xCC, 0xEF, 0xFF, 0xDF, 0xCD, 0xFF, + 0xCD, 0xCC, 0xCC, 0xCC, 0xBD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDC, 0xBB, + 0xBB, 0xAB, 0xBA, 0xBC, 0xDC, 0xDF, 0xFF, 0xFD, 0xDC, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xBB, 0xBC, 0xFF, 0xFF, 0xCC, 0xDB, 0xA9, 0x99, 0x88, 0x88, + 0x89, 0xAB, 0xCC, 0xDF, 0xFC, 0xDC, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xFF, 0xBC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCF, 0xFC, 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xCF, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xFC, 0xBB, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA8, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xEC, 0xBA, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xDD, 0xDB, 0x99, 0x87, 0x77, 0x77, 0x77, 0x89, 0xAB, + 0xBC, 0xCF, 0xFD, 0xBB, 0xA9, 0x88, 0x88, 0x88, 0x89, 0x9B, 0xCC, 0xFC, + 0xFF, 0xDD, 0xBA, 0x9A, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xFD, 0xDF, 0xFD, + 0xFD, 0xCB, 0xAA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCF, 0xFD, 0xFF, 0xFF, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDD, 0xDF, 0xDF, 0xFF, 0xFF, 0xFD, 0xFD, + 0xCC, 0xCC, 0xFC, 0xCD, 0xFE, 0xFE, 0xDF, 0xFF, 0xFD, 0xDD, 0xFC, 0xDC, + 0xDD, 0xCC, 0xCE, 0xFD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xDD, 0xDC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFD, 0xFE, + 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0xFF, 0xFF, 0xFF, 0xEF, 0xDD, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xDF, 0xFF, 0xFD, 0xED, 0xCB, 0xAA, 0xA9, + 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, 0xDD, 0xCB, 0xAA, 0x99, 0x88, 0x88, + 0x89, 0x9A, 0xBD, 0xEF, 0xFC, 0xDB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x88, + 0x9A, 0xBD, 0xFF, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xFC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDF, + 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x66, 0x78, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x67, 0x8A, 0xBD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x79, 0xAB, 0xCD, 0xDC, 0xB9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDE, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAC, 0xCD, 0xFD, 0xCB, 0x98, 0x87, 0x76, 0x67, 0x77, 0x89, 0xAB, + 0xCD, 0xDF, 0xFD, 0xBA, 0x99, 0x88, 0x77, 0x78, 0x89, 0xAA, 0xBC, 0xDD, + 0xFF, 0xFD, 0xBA, 0xA9, 0x99, 0x89, 0x99, 0xAA, 0xBC, 0xDD, 0xEF, 0xFF, + 0xED, 0xCB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xFF, 0xFF, 0xFF, 0xED, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xEF, 0xFF, 0xFF, 0xFE, 0xDD, + 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFD, 0xED, 0xDD, + 0xDD, 0xDD, 0xED, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAE, 0xCD, 0xCC, 0xEC, 0xCD, 0xCC, 0xCD, 0xEF, 0xFF, 0xFF, 0xDD, 0xFD, + 0xDC, 0xDC, 0xCD, 0xCC, 0xDD, 0xED, 0xDF, 0xFF, 0xFF, 0xCF, 0xDF, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDF, 0xFF, 0xFD, 0xFD, 0xCB, 0xBB, 0xAA, + 0x99, 0xA9, 0xAB, 0xCD, 0xFF, 0xFF, 0xDE, 0xCB, 0xBA, 0x99, 0x88, 0x88, + 0x89, 0xAA, 0xCD, 0xFF, 0xFD, 0xDC, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x88, + 0x9A, 0xBD, 0xFD, 0xCC, 0xBA, 0x99, 0x87, 0x66, 0x66, 0x67, 0x88, 0xAC, + 0xCF, 0xEC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAC, 0xDD, + 0xDD, 0xBA, 0x97, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xCB, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x79, 0xAB, 0xDD, 0xDC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x77, 0x9A, 0xBC, 0xDD, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xBD, 0xDC, 0xB9, 0x97, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCD, 0xCD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x99, 0xAC, 0xDC, 0xFE, 0xCA, 0x98, 0x87, 0x76, 0x67, 0x78, 0x99, 0xAC, + 0xCD, 0xCD, 0xED, 0xBA, 0x99, 0x88, 0x78, 0x88, 0x99, 0xAB, 0xCD, 0xDC, + 0xFF, 0xFC, 0xBA, 0xA9, 0x99, 0x89, 0x99, 0xAB, 0xBC, 0xDD, 0xCF, 0xFF, + 0xFD, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xCB, 0xCD, 0xDC, 0xFF, 0xFF, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xFF, 0xDF, 0xFF, 0xFF, 0xEE, 0xDE, + 0xDC, 0xCD, 0xDF, 0xEE, 0xFF, 0xFD, 0xDF, 0xFF, 0xEE, 0xDC, 0xDD, 0xCC, + 0xCC, 0xCC, 0xCC, 0xFD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAE, 0xED, 0xDE, 0xDD, 0xDD, 0xDE, 0xDF, 0xFF, 0xFF, 0xFF, 0xCD, 0xFE, + 0xFF, 0xEE, 0xDD, 0xDD, 0xCE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xEE, 0xDC, + 0xCB, 0xCB, 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xFD, 0xFE, 0xDC, 0xCB, 0xAA, + 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xFF, 0xDF, 0xDC, 0xBB, 0xA9, 0x99, 0x99, + 0x9A, 0xAB, 0xDF, 0xFF, 0xFD, 0xDD, 0xBA, 0xA9, 0x88, 0x77, 0x78, 0x89, + 0xAB, 0xDE, 0xFF, 0xDD, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x77, 0x89, 0xBC, + 0xFE, 0xFD, 0xDB, 0xB9, 0x87, 0x66, 0x55, 0x56, 0x77, 0x9A, 0xBD, 0xFF, + 0xDD, 0xCA, 0x98, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCE, 0xFD, 0xEB, + 0xA9, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xBD, 0xFF, 0xDD, 0xBA, 0x97, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xED, 0xDB, 0xA9, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xFD, 0xED, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xDF, 0xFD, 0xEC, 0xB9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xED, 0xDF, 0xFC, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x9A, 0xAC, + 0xDE, 0xEF, 0xFF, 0xCB, 0xA9, 0x88, 0x88, 0x88, 0x9A, 0xBB, 0xCE, 0xFE, + 0xFF, 0xFE, 0xCB, 0xBA, 0x99, 0x99, 0xAA, 0xAB, 0xCD, 0xEF, 0xEF, 0xFF, + 0xED, 0xDC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFE, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, + 0xDE, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xDD, 0xED, 0xCD, + 0xDD, 0xCC, 0xDD, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xAC, 0xDC, + 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDD, 0xFE, 0xCC, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDE, 0xDB, 0xCB, 0xAA, 0xA9, 0x99, + 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xED, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xCC, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xBC, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x66, 0x65, 0x56, + 0x66, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xBB, 0xA9, 0x98, 0x77, 0x77, 0x67, 0x77, 0x88, 0x9A, + 0xBB, 0xBC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xCB, + 0xCC, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xBD, 0xDC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCC, 0xEE, 0xDC, 0xCB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCD, 0xFD, 0xDC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEC, 0xBD, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xCB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x8A, 0xA9, 0x99, 0x99, 0x98, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xAA, 0xBB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xDC, 0xAB, 0xBA, 0xA9, + 0x99, 0x99, 0x88, 0x99, 0x9A, 0xAA, 0xBC, 0xC9, 0xAA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x99, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x78, 0x88, 0x99, 0xAB, 0xB9, 0xA9, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, + 0x88, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x77, 0x76, 0x66, 0x77, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x78, 0x89, 0xA9, + 0x99, 0x98, 0x87, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0x99, 0x99, + 0x87, 0x76, 0x66, 0x66, 0x66, 0x67, 0x78, 0x89, 0x99, 0x89, 0x88, 0x77, + 0x66, 0x66, 0x66, 0x66, 0x77, 0x78, 0x9A, 0x99, 0x98, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0x99, 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x99, 0x99, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x78, 0x89, 0xA9, 0x9A, 0x99, 0x87, 0x77, 0x77, 0x67, 0x77, 0x78, 0x89, + 0x9A, 0x9A, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, 0x89, 0x9A, 0xBA, + 0xAB, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x88, 0x99, 0x99, 0xAB, 0xAB, 0xBB, + 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBA, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xAD, 0xDD, 0xBB, 0xAA, 0xA9, + 0xA9, 0x9A, 0xAA, 0xAB, 0xBB, 0xDB, 0xAC, 0xCB, 0xAA, 0xA9, 0x99, 0x99, + 0x99, 0x9A, 0xAA, 0xAB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBA, 0xCB, + 0xBB, 0xAA, 0xAA, 0xA9, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xAB, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xCA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x99, 0x88, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x9A, 0x98, 0x87, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x66, 0x66, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x56, 0x66, 0x67, 0x78, 0x89, 0xAA, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x67, 0x77, 0x88, 0x89, + 0xAB, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xAB, 0xCB, + 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0x9A, 0xAB, 0xBB, 0xCC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xBD, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBC, 0xCB, 0xBB, 0xAA, 0xAA, 0x9A, + 0xAA, 0xAA, 0xAA, 0xBB, 0x90, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xAA, 0xBC, 0xBD, 0xBB, 0xCC, + 0xBB, 0xBA, 0xAA, 0xA9, 0xA9, 0xAA, 0xBB, 0xCD, 0xDD, 0xBC, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBD, 0xCB, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xAB, 0xAA, 0x99, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xAB, 0xBA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0xAA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x9A, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x67, 0x88, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x77, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x88, 0x9A, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x76, 0x67, 0x77, 0x78, 0x99, + 0xAB, 0xAB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xBC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x89, 0xAA, 0xBB, 0xBC, 0xCC, + 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0x9A, 0xBB, 0xCB, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xBD, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDB, 0xAD, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDE, 0xBC, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xFD, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCE, 0xDB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAB, 0xBC, 0xDD, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xCB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x89, 0xAB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x78, 0x9A, + 0xAB, 0xBA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xBB, + 0xAA, 0x99, 0x87, 0x66, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x65, 0x55, 0x55, 0x67, 0x78, 0x99, 0xBB, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x77, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xBB, 0xAA, 0x98, 0x77, 0x76, 0x67, 0x77, 0x88, 0x9A, + 0xAB, 0xBB, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xCC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBC, 0xCC, + 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDC, 0xDD, 0xDC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCE, 0xFD, 0xDC, 0xCB, 0xBB, + 0xAB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDC, 0xBD, 0xDC, 0xCC, 0xBB, 0xBB, 0xAA, + 0xAB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xBE, 0xFF, + 0xED, 0xDD, 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xED, 0xDC, + 0xCC, 0xBC, 0xBC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFD, 0xDD, 0xDC, 0xBB, 0xAA, + 0xAA, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDE, 0xFF, 0xFD, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x9A, + 0xBC, 0xDF, 0xFF, 0xDD, 0xCB, 0xA9, 0x87, 0x76, 0x67, 0x78, 0x9A, 0xBD, + 0xFF, 0xFD, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9B, 0xCD, 0xFE, + 0xDD, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x56, 0x89, 0xAB, 0xEE, 0xFD, 0xDB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBD, 0xEE, 0xDD, 0xBA, 0x98, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xED, 0xEC, 0xA9, 0x87, 0x55, + 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xED, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xCE, 0xEE, 0xFD, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBD, 0xEE, 0xFF, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xEF, 0xFE, 0xDC, 0xBA, 0x99, 0x88, 0x99, 0x9A, 0xBB, 0xCD, 0xFE, + 0xEF, 0xFE, 0xDC, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xEF, 0xFF, + 0xFE, 0xDC, 0xCC, 0xCB, 0xBB, 0xBC, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xCC, 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDE, 0xED, 0xEE, 0xEF, 0xFF, 0xFF, 0xBE, 0xFF, 0xFF, 0xEE, 0xEE, 0xDE, + 0xED, 0xDD, 0xEE, 0xFE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDF, 0xFE, 0xFF, 0xBC, 0xED, + 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xDE, 0xFF, 0xFF, 0xFF, 0xCD, 0xDC, 0xCC, + 0xBB, 0xAB, 0xAB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFC, 0xDC, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xCC, 0xFF, 0xFE, 0xCD, 0xCB, 0xAA, 0x99, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xFC, 0xCB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x89, + 0xAB, 0xCE, 0xFE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xDE, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x56, 0x77, 0x8A, 0xBC, 0xDE, + 0xCC, 0xB9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xDD, 0xCB, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xCD, 0xCC, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xCC, 0xCD, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xDD, 0xDE, 0xED, 0xBB, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCC, 0xDD, + 0xFF, 0xEC, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xDD, 0xDF, 0xFF, + 0xFE, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xED, 0xDD, 0xFF, 0xFF, 0xEE, + 0xCC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDD, 0xEE, 0xDF, 0xFF, 0xFF, 0xFE, 0xED, + 0xDC, 0xCD, 0xCD, 0xDD, 0xDE, 0xED, 0xCF, 0xFF, 0xFE, 0xEE, 0xDD, 0xDD, + 0xCD, 0xCC, 0xDD, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xDD, 0xED, + 0xDC, 0xCC, 0xCB, 0xBB, 0xCC, 0xCD, 0xEE, 0xFF, 0xFF, 0xDE, 0xDD, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xFF, 0xFD, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xFF, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xEF, 0xFC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0x9B, 0xCD, 0xEE, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xEC, 0xCA, 0x98, 0x87, 0x66, 0x55, 0x56, 0x67, 0x89, 0xAC, 0xDE, + 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDD, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x99, 0xAB, 0xDD, 0xDD, 0xCA, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDE, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x89, 0xAA, 0xBC, 0xDD, + 0xEE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xDF, 0xFF, + 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xFD, 0xFF, 0xFF, 0xED, + 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xDF, 0xFF, 0xFE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCD, 0xDE, 0xEF, 0xFE, 0xCF, 0xFF, 0xFF, 0xDE, 0xDD, 0xDD, + 0xCD, 0xDD, 0xDE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCD, 0xDF, 0xEE, 0xFF, 0xFF, 0xCD, 0xDE, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFD, 0xDC, 0xCB, 0xBA, 0xA9, + 0x99, 0xAA, 0xAB, 0xCD, 0xFF, 0xFF, 0xCC, 0xBB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCF, 0xFF, 0xFC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCE, 0xFF, 0xCD, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xDD, 0xFC, 0xCB, 0x98, 0x87, 0x65, 0x55, 0x56, 0x77, 0x8A, 0xBD, 0xFF, + 0xCC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xED, 0xCB, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xB9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDD, 0xCB, 0xA8, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xED, 0xBA, 0x98, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCD, 0xFC, 0xB9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x99, 0xAB, 0xFD, 0xFF, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDF, 0xFD, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x89, 0xAB, 0xCC, 0xDD, + 0xFF, 0xDE, 0xCC, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xCF, 0xFF, + 0xDD, 0xCB, 0xBB, 0xBA, 0xAA, 0xBB, 0xBC, 0xCD, 0xED, 0xFF, 0xFF, 0xDD, + 0xDD, 0xCC, 0xBB, 0xCC, 0xCC, 0xCD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFE, 0xED, + 0xDC, 0xCD, 0xED, 0xDE, 0xDF, 0xEE, 0xBF, 0xFF, 0xFF, 0xFE, 0xED, 0xDC, + 0xDD, 0xCC, 0xCC, 0xDD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDD, 0xDC, 0xCC, 0xDC, 0xCD, 0xDD, 0xDE, 0xFF, 0xEF, 0xBE, 0xEE, + 0xDD, 0xDC, 0xCC, 0xCD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFE, 0xDE, 0xDD, 0xCB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xFD, 0xDD, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAB, 0xBC, 0xCE, 0xFF, 0xFE, 0xCD, 0xDB, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAC, 0xDD, 0xFF, 0xFD, 0xDC, 0xBA, 0x99, 0x87, 0x77, 0x78, 0x99, + 0xBC, 0xDE, 0xEE, 0xDC, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x78, 0x9A, 0xBC, + 0xDF, 0xFC, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xFE, + 0xCC, 0xBA, 0x98, 0x66, 0x55, 0x45, 0x56, 0x78, 0xAB, 0xCE, 0xDD, 0xCB, + 0xA8, 0x76, 0x55, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDE, 0xDD, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9B, 0xCD, 0xDD, 0xDB, 0xA9, 0x86, 0x55, + 0x44, 0x55, 0x67, 0x89, 0xBC, 0xDE, 0xDD, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDE, 0xFC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xFF, 0xDC, 0xAA, 0x98, 0x77, 0x77, 0x88, 0x99, 0xAB, + 0xCD, 0xDE, 0xFE, 0xDB, 0xBA, 0x98, 0x88, 0x89, 0x9A, 0xAB, 0xCD, 0xDE, + 0xEF, 0xEE, 0xCC, 0xBA, 0xA9, 0x99, 0x9A, 0xAB, 0xCC, 0xED, 0xEF, 0xFF, + 0xFD, 0xDC, 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFE, + 0xDD, 0xCD, 0xCC, 0xCC, 0xCC, 0xDE, 0xEF, 0xEF, 0xFF, 0xFF, 0xFE, 0xED, + 0xDD, 0xDD, 0xDD, 0xEE, 0xFF, 0xFE, 0xBF, 0xEE, 0xEE, 0xFE, 0xED, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0x9C, 0xCB, 0xBB, 0xBA, 0xBA, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xAC, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFE, 0xCD, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xEF, 0xDB, 0xCB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xED, 0xBC, 0xBA, 0xA9, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCD, 0xDB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDC, 0xBB, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xBB, 0xBA, + 0x98, 0x76, 0x55, 0x54, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x88, 0xAA, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xBB, 0xBA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCB, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBC, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, + 0xCD, 0xCB, 0xAA, 0x99, 0x98, 0x89, 0x99, 0x9A, 0xBB, 0xCD, 0xCC, 0xDD, + 0xCB, 0xBA, 0xAA, 0xA9, 0x9A, 0xAA, 0xBC, 0xCC, 0xDC, 0xDE, 0xED, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xCD, 0xCD, 0xFE, 0xED, 0xDC, 0xCC, + 0xBB, 0xCB, 0xCC, 0xCD, 0xDD, 0xEC, 0xAD, 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xCB, 0xCC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xA9, 0xA9, 0x9A, 0xAA, 0xAB, 0xBB, 0xCC, 0xAB, 0xDC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xED, 0xBB, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCA, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xDC, 0xAB, 0xAA, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0x9A, 0x98, 0x87, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xAA, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xBC, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBC, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xCD, 0xCB, 0xBB, + 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xEC, 0xDC, 0xBB, 0xBB, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xAD, 0xCC, 0xCB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xAB, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDC, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x89, 0x99, 0x9A, 0xAB, 0xCC, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x99, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xBB, 0xCB, + 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0xAA, 0xAB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xBC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xAC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xAB, 0xCC, + 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xAB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCD, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBC, 0xBA, 0xBA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x67, 0x88, 0x9A, 0xAA, + 0x9A, 0x98, 0x77, 0x66, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x67, 0x77, 0x89, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAB, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xAC, 0xBB, 0xCB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBD, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xCD, 0xCD, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDC, 0xAC, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xCC, 0x9B, 0xCC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDD, 0xED, 0xBC, 0xCB, 0xBA, + 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDD, 0xCB, 0xCB, 0xAA, 0x99, 0x99, + 0x89, 0x99, 0x9A, 0xAB, 0xCC, 0xDC, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x9A, 0xAB, 0xCD, 0xCA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBB, 0xCC, 0xAB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xBC, 0xBA, 0xAA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xBB, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xAB, 0xBA, 0xA9, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xBA, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBB, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xBC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xAB, 0xBB, 0xCB, 0xAA, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xCC, 0xCB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xBC, 0xDC, + 0xCB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xCE, 0xDC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCD, 0xED, 0xDD, 0xCC, 0xCB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEC, 0xAD, 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xFE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xBF, 0xFF, + 0xFE, 0xFD, 0xDD, 0xDD, 0xDE, 0xEE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xED, + 0xCC, 0xCB, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xEE, 0xFF, 0xEC, 0xCB, 0xBA, + 0xAA, 0xAB, 0xBC, 0xDD, 0xFF, 0xFE, 0xEF, 0xED, 0xCB, 0xAA, 0x99, 0x99, + 0xAA, 0xBC, 0xDE, 0xFF, 0xEE, 0xFD, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0x9A, + 0xBC, 0xDE, 0xFF, 0xDE, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x78, 0x9A, 0xBD, + 0xEF, 0xED, 0xEC, 0xB9, 0x87, 0x66, 0x55, 0x66, 0x79, 0xAB, 0xCE, 0xFE, + 0xDD, 0xCA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAC, 0xDE, 0xED, 0xDB, + 0xA9, 0x86, 0x54, 0x43, 0x45, 0x68, 0x9A, 0xCD, 0xEE, 0xDD, 0xBA, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x79, 0xAB, 0xDE, 0xED, 0xDC, 0xB9, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9A, 0xCD, 0xEE, 0xDD, 0xCB, 0xA9, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xBC, 0xDF, 0xED, 0xED, 0xBA, 0x98, 0x77, 0x66, 0x77, 0x89, + 0xAB, 0xCD, 0xFE, 0xDE, 0xEC, 0xBA, 0x99, 0x88, 0x78, 0x89, 0xAB, 0xBD, + 0xEF, 0xED, 0xFE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0xAB, 0xBC, 0xDF, 0xFE, + 0xEF, 0xFE, 0xDC, 0xBB, 0xBA, 0xAA, 0xBB, 0xCD, 0xDE, 0xEF, 0xFD, 0xFE, + 0xEE, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xEF, 0xFF, 0xEE, + 0xEE, 0xDD, 0xDD, 0xDD, 0xEE, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xEE, + 0xFE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xAE, 0xEE, 0xEE, 0xEE, 0xDD, 0xDE, + 0xEF, 0xFE, 0xEE, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xDC, 0xDC, 0xCC, 0xCB, 0xCB, 0xCC, 0xCC, 0xDD, 0xCD, 0xAD, 0xED, + 0xDD, 0xCC, 0xCC, 0xCC, 0xBC, 0xCD, 0xCE, 0xEF, 0xFE, 0xEE, 0xDC, 0xCB, + 0xBB, 0xBA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDF, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCD, 0xDE, 0xFD, 0xCD, 0xCB, 0xA9, 0x99, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xEF, 0xDC, 0xDB, 0xAA, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xDE, 0xDC, 0xCB, 0x98, 0x77, 0x65, 0x55, 0x56, 0x77, 0x89, 0xBC, 0xDD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9B, 0xBC, 0xDB, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xBA, 0x88, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDC, 0xCD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAC, + 0xCE, 0xDC, 0xDD, 0xCA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xDD, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAC, 0xCD, 0xEE, 0xDD, 0xEF, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xED, 0xFD, 0xEE, 0xEE, 0xDD, + 0xDC, 0xCB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xED, 0xFF, 0xED, 0xED, 0xDD, + 0xDC, 0xCD, 0xDD, 0xEE, 0xEF, 0xFE, 0xAD, 0xED, 0xDD, 0xDD, 0xCD, 0xDC, + 0xDD, 0xDE, 0xED, 0xED, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xCC, 0xCC, 0xBB, 0xBC, 0xCC, 0xCD, 0xDE, 0xEF, 0xCE, 0xFE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCE, 0xFF, 0xED, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x88, 0x9A, 0xBC, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xDE, 0xCC, 0xB9, 0x98, 0x77, 0x66, 0x66, 0x67, 0x88, 0x9B, + 0xCD, 0xDC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x78, 0xAB, 0xCC, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x55, 0x56, 0x77, 0x8A, 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x89, 0xAC, 0xDD, 0xDD, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x89, 0xAB, 0xBD, 0xDD, + 0xDE, 0xDC, 0xBA, 0x99, 0x98, 0x89, 0x99, 0xAB, 0xBC, 0xDE, 0xED, 0xFD, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xFE, 0xEF, 0xEE, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFE, 0xFF, 0xEE, 0xDD, 0xDC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFF, 0xCF, 0xEE, 0xED, 0xDD, 0xDD, 0xCC, + 0xCD, 0xDD, 0xDF, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCC, 0xCC, 0xBB, 0xBB, 0xBC, 0xBC, 0xCC, 0xCC, 0xDD, 0xAC, 0xDD, + 0xDD, 0xCC, 0xCC, 0xBC, 0xBC, 0xCC, 0xDD, 0xDF, 0xFD, 0xDE, 0xEC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xDE, 0xCC, 0xDD, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xCC, 0xDD, 0xED, 0xCD, 0xBB, 0xAA, 0x99, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDD, 0xDB, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCC, 0xED, 0xBC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xBC, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x45, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xB9, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xCA, 0xA8, 0x76, 0x65, + 0x44, 0x56, 0x67, 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCD, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x9A, 0xAB, + 0xCD, 0xCC, 0xDC, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDC, + 0xCD, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCD, 0xCC, 0xED, + 0xDC, 0xCB, 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xDD, 0xDE, 0xDD, 0xDD, + 0xCC, 0xBB, 0xBB, 0xCC, 0xCC, 0xCD, 0xDF, 0xDD, 0xFF, 0xED, 0xDD, 0xDC, + 0xCC, 0xCD, 0xDD, 0xEE, 0xEE, 0xFD, 0xAD, 0xDC, 0xDC, 0xCC, 0xCC, 0xBC, + 0xCC, 0xCC, 0xDC, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAE, 0xED, 0xDD, 0xDD, 0xDD, 0xDC, 0xDD, 0xDD, 0xDD, 0xDD, 0x9E, 0xFF, + 0xFF, 0xED, 0xED, 0xDD, 0xEE, 0xEF, 0xFE, 0xFF, 0xFD, 0xDF, 0xEE, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDD, 0xEF, 0xFE, 0xFF, 0xED, 0xFE, 0xDD, 0xCC, 0xCB, + 0xBC, 0xCC, 0xDE, 0xEE, 0xEE, 0xFE, 0xDF, 0xDD, 0xCB, 0xBA, 0xAA, 0xAB, + 0xBC, 0xDD, 0xDF, 0xEF, 0xED, 0xED, 0xDB, 0xBA, 0x99, 0x88, 0x99, 0xAB, + 0xCD, 0xEF, 0xFD, 0xDE, 0xDC, 0xBA, 0x98, 0x77, 0x77, 0x89, 0xAB, 0xDD, + 0xFF, 0xDD, 0xED, 0xBA, 0x98, 0x76, 0x55, 0x67, 0x89, 0xBC, 0xDD, 0xFE, + 0xDE, 0xCB, 0xA9, 0x76, 0x54, 0x45, 0x67, 0x9A, 0xCD, 0xEF, 0xED, 0xED, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xED, 0xDE, 0xDB, 0xA8, + 0x75, 0x43, 0x24, 0x57, 0x8A, 0xBC, 0xDE, 0xED, 0xED, 0xCA, 0x97, 0x65, + 0x44, 0x46, 0x78, 0xAC, 0xCD, 0xED, 0xDE, 0xDD, 0xBA, 0x87, 0x65, 0x56, + 0x68, 0x9A, 0xBD, 0xEF, 0xDD, 0xFE, 0xDC, 0xA9, 0x87, 0x77, 0x78, 0x8A, + 0xBC, 0xDE, 0xEE, 0xEF, 0xFD, 0xDB, 0xAA, 0x98, 0x88, 0x9A, 0xAB, 0xCD, + 0xFF, 0xDD, 0xFE, 0xED, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xFE, + 0xDF, 0xFE, 0xED, 0xDC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xEE, 0xFF, + 0xFF, 0xFE, 0xDD, 0xCD, 0xDD, 0xDD, 0xEF, 0xEF, 0xFE, 0xFF, 0xFF, 0xFE, + 0xFE, 0xEE, 0xED, 0xEE, 0xEE, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xEF, + 0xFE, 0xEF, 0xFE, 0xFF, 0xFF, 0xFE, 0xAD, 0xDD, 0xDD, 0xDD, 0xED, 0xDE, + 0xDE, 0xEE, 0xDD, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xDC, 0xCB, 0xBB, 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xCD, 0xAD, 0xED, + 0xCC, 0xBB, 0xAA, 0xBA, 0xAB, 0xBC, 0xCD, 0xDF, 0xFD, 0xDD, 0xCC, 0xBB, + 0xAA, 0xA9, 0x9A, 0xAA, 0xBB, 0xCD, 0xEE, 0xDC, 0xDB, 0xBA, 0xA9, 0x99, + 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xDD, 0xBC, 0xBA, 0xA9, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCD, 0xCB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBB, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xAC, 0xCA, 0xA9, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x88, 0x9A, 0xBB, 0xAB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x99, 0xAB, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0x9A, 0xBB, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xAC, 0xBB, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x89, 0xAB, 0xCC, 0xBC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xCC, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCC, + 0xCD, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xCC, 0xDD, + 0xCB, 0xBA, 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xDD, 0xCE, 0xDD, 0xCC, + 0xBB, 0xBA, 0xAA, 0xBB, 0xBC, 0xCD, 0xEE, 0xDD, 0xFD, 0xED, 0xCC, 0xCC, + 0xBC, 0xBC, 0xCC, 0xDD, 0xEE, 0xFE, 0x9D, 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, + 0xBC, 0xCC, 0xDD, 0xEE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0x9B, 0xDC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xBB, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xCA, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xDC, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x89, 0xAA, 0xBC, 0xBA, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xBB, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x9A, + 0xAB, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x45, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBA, 0xAB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xBB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xBB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xBC, 0xBB, 0xCC, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCC, 0xCC, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCC, 0xDD, 0xDC, 0xCB, 0xBB, + 0xAA, 0xAB, 0xBB, 0xBC, 0xCC, 0xDD, 0x9C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xAB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xCC, 0xAB, 0xBA, 0xA9, + 0x99, 0x88, 0x89, 0x99, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xAB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAA, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x77, 0x78, 0x99, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x98, + 0x87, 0x76, 0x66, 0x55, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x89, 0xAA, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xBB, + 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDC, 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0x9A, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xA9, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9B, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0xAA, 0xAA, 0xBB, 0xBC, 0xDC, 0xBC, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xBA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x9A, 0x98, 0x77, 0x66, 0x66, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x67, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x67, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xAA, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBB, 0xCC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0x9C, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAD, 0xCC, 0xCC, 0xCC, 0xCB, 0xBB, 0xBC, 0xBC, 0xCC, 0xDC, 0x9D, 0xED, + 0xED, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xED, 0xDF, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDD, 0xEE, 0xDC, 0xDD, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEC, 0xCC, 0xCB, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xCC, 0xCC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x9A, + 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x88, 0x9A, 0xBB, + 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x66, 0x56, 0x67, 0x88, 0xAA, 0xBC, 0xDC, + 0xBC, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCB, 0xCB, + 0xA9, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9A, 0xBC, 0xDC, 0xBC, 0xBA, 0x98, + 0x76, 0x43, 0x34, 0x56, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xCD, 0xBA, 0x99, 0x87, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCC, 0xBA, 0x98, 0x87, 0x76, 0x77, 0x88, + 0x9A, 0xBC, 0xDC, 0xCD, 0xCC, 0xAA, 0x98, 0x88, 0x88, 0x88, 0x9A, 0xBB, + 0xCD, 0xDC, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xDC, + 0xCE, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDE, 0xDD, 0xDD, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDD, 0xED, 0xDF, 0xEE, 0xDD, + 0xDC, 0xCB, 0xCC, 0xCC, 0xCC, 0xEE, 0xEF, 0xDD, 0xEE, 0xEE, 0xED, 0xDD, + 0xCD, 0xCD, 0xDE, 0xEE, 0xEE, 0xFE, 0x9D, 0xCD, 0xCD, 0xCC, 0xCC, 0xCC, + 0xCC, 0xDD, 0xDD, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFF, 0xFE, 0xFF, 0xEE, 0xDE, 0xDE, 0xEF, 0xEE, 0xEE, 0xAF, 0xFF, + 0xFF, 0xFE, 0xEE, 0xED, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xDD, 0xCD, 0xCC, 0xDE, 0xEF, 0xFF, 0xFF, 0xEF, 0xFF, 0xEE, 0xDC, 0xBB, + 0xBB, 0xBB, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xBA, 0x99, 0x9A, + 0xAB, 0xCD, 0xFE, 0xFF, 0xFF, 0xFE, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9B, + 0xCD, 0xEF, 0xFE, 0xFF, 0xDC, 0xB9, 0x87, 0x76, 0x77, 0x78, 0xAB, 0xCD, + 0xEF, 0xFE, 0xED, 0xBA, 0x97, 0x66, 0x55, 0x67, 0x79, 0xAB, 0xDE, 0xFF, + 0xEF, 0xCB, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xBC, 0xEF, 0xFE, 0xEC, + 0xB9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xCE, 0xFF, 0xFE, 0xCB, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xEF, 0xFE, 0xED, 0xB9, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9B, 0xCE, 0xFF, 0xFF, 0xDB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x8A, 0xBD, 0xFF, 0xFF, 0xED, 0xCB, 0x98, 0x87, 0x66, 0x77, 0x89, + 0xAC, 0xEF, 0xFF, 0xFF, 0xED, 0xCB, 0x99, 0x88, 0x88, 0x89, 0xAB, 0xCE, + 0xEF, 0xFE, 0xFF, 0xDD, 0xCB, 0xA9, 0x99, 0x9A, 0xAB, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xED, 0xCB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xEE, 0xDC, 0xCC, 0xCC, 0xDD, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xEE, 0xEE, 0xDE, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xEE, 0xFE, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDD, 0x9E, 0xEE, + 0xDD, 0xCC, 0xCC, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFE, 0xEF, 0xDD, 0xCC, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFF, 0xDD, 0xEC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xED, 0xDD, 0xCB, 0xAA, 0x98, 0x88, 0x88, + 0x89, 0xAB, 0xBC, 0xDF, 0xEC, 0xDB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xED, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCE, 0xEC, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x77, 0x8A, 0xBC, 0xDD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xBA, 0x88, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xDC, 0xDB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x89, 0xBC, + 0xDE, 0xED, 0xED, 0xCA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xCB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xFD, 0xFE, + 0xDC, 0xBB, 0xBB, 0xAA, 0xAA, 0xBC, 0xCC, 0xDE, 0xFE, 0xDF, 0xEE, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xEE, 0xFF, 0xED, 0xFE, 0xFE, 0xED, 0xDD, + 0xCD, 0xDD, 0xDE, 0xFE, 0xFF, 0xFF, 0xAE, 0xEE, 0xED, 0xDD, 0xDD, 0xDD, + 0xDD, 0xEE, 0xFE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xDD, 0xDC, 0xCC, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xEE, 0xBE, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFE, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xEF, 0xED, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xEE, 0xDC, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDE, 0xEC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x67, 0x89, 0xAB, + 0xCD, 0xDC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x56, 0x67, 0x89, 0xAB, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBC, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xCB, 0xA9, 0x87, + 0x65, 0x55, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xA9, 0x87, 0x66, 0x55, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x66, 0x66, 0x78, + 0x99, 0xAC, 0xDD, 0xDC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xDE, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xEE, 0xED, + 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFE, 0xDF, 0xEE, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFE, 0xFF, 0xEE, 0xED, 0xDC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0xBF, 0xEE, 0xDD, 0xDD, 0xDC, 0xDD, + 0xDD, 0xDE, 0xEF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xEE, 0xDD, 0xDD, 0xCC, 0xDD, 0xCD, 0xDE, 0xEF, 0xFE, 0xAF, 0xFF, + 0xFD, 0xDC, 0xCC, 0xCC, 0xCC, 0xED, 0xEE, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, + 0xBB, 0xAA, 0xBB, 0xBB, 0xCD, 0xEE, 0xFF, 0xFE, 0xED, 0xCB, 0xAA, 0xA9, + 0x99, 0x9A, 0xAB, 0xCD, 0xEE, 0xFE, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xCD, 0xEF, 0xED, 0xDC, 0xAA, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCD, 0xFD, 0xDD, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCF, 0xEC, 0xCB, 0xA8, 0x77, 0x65, 0x55, 0x56, 0x77, 0x8A, 0xBC, 0xDE, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xCE, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xDC, 0xBA, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xDD, 0xDC, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDE, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xBB, + 0xCD, 0xED, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xEE, 0xED, 0xCB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xED, 0xFF, + 0xDD, 0xCB, 0xBB, 0xAA, 0xAA, 0xBC, 0xCD, 0xDE, 0xFF, 0xEF, 0xFF, 0xFD, + 0xDC, 0xCB, 0xBC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDD, 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xAE, 0xEE, 0xED, 0xED, 0xDD, 0xDD, + 0xDE, 0xEE, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xEE, 0xFE, 0xDE, 0xEE, 0xFF, 0xDE, 0xFF, 0x9F, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xDC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xCB, 0xBA, + 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xDF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x87, 0x77, 0x88, 0x9A, + 0xBD, 0xFF, 0xFF, 0xEF, 0xDB, 0xA9, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xCD, + 0xFF, 0xFF, 0xFC, 0xB9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9B, 0xCE, 0xFF, + 0xEE, 0xCA, 0x98, 0x65, 0x54, 0x45, 0x56, 0x89, 0xAC, 0xDF, 0xFE, 0xDC, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xCD, 0xFF, 0xED, 0xCA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAC, 0xDF, 0xFE, 0xDC, 0xA9, 0x86, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xCD, 0xFF, 0xEE, 0xCB, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAC, 0xFF, 0xFF, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x67, 0x88, + 0xAB, 0xCE, 0xFF, 0xFF, 0xFC, 0xBA, 0x98, 0x87, 0x77, 0x89, 0x9B, 0xCD, + 0xFF, 0xFE, 0xFF, 0xDC, 0xBA, 0x99, 0x98, 0x99, 0xAB, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xED, 0xCB, 0xBA, 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDD, 0xCC, 0xCC, 0xCC, 0xCE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFE, 0xED, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xEE, 0xDE, 0xFE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBE, 0xEE, 0xDD, 0xDD, 0xCC, 0xCC, 0xDD, 0xDD, 0xDD, 0xED, 0x9F, 0xFF, + 0xFE, 0xDD, 0xDD, 0xCD, 0xDD, 0xEF, 0xEE, 0xFF, 0xFE, 0xEF, 0xED, 0xDC, + 0xCC, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xFF, 0xEE, 0xEE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAB, 0xBC, 0xDD, 0xEF, 0xFE, 0xDD, 0xCC, 0xCA, 0xA9, 0x99, 0x99, + 0x9A, 0xBC, 0xCD, 0xEF, 0xDE, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x9A, + 0xBC, 0xDE, 0xFE, 0xDE, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDE, 0xED, 0xDC, 0xA9, 0x87, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xEE, + 0xDD, 0xBA, 0x98, 0x76, 0x54, 0x45, 0x67, 0x89, 0xAC, 0xDF, 0xED, 0xDB, + 0xA9, 0x87, 0x54, 0x33, 0x45, 0x78, 0x9A, 0xCC, 0xFD, 0xDC, 0xCA, 0x98, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xAB, 0xCE, 0xDD, 0xDC, 0xA9, 0x87, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xBD, 0xEE, 0xDD, 0xCA, 0xA9, 0x77, 0x65, 0x56, + 0x67, 0x89, 0xAC, 0xDE, 0xED, 0xED, 0xCA, 0x98, 0x77, 0x76, 0x77, 0x89, + 0xAB, 0xCD, 0xFE, 0xEE, 0xDC, 0xBA, 0x98, 0x88, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xED, 0xFE, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xEE, + 0xEF, 0xFD, 0xDC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xEE, 0xFF, + 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xCD, 0xDD, 0xEF, 0xFF, 0xEF, 0xFF, 0xFE, + 0xED, 0xDD, 0xDC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFE, 0xEE, + 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0x9E, 0xDE, 0xDD, 0xDE, 0xDD, 0xCD, + 0xDD, 0xFE, 0xEF, 0xFF, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0x8B, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDC, 0xBC, 0xBB, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xCA, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBC, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAB, 0xCB, 0xAA, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xB9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x87, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBB, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCB, 0xBD, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCC, 0xDD, 0xCC, 0xBB, 0xBA, + 0xAA, 0xBB, 0xBB, 0xBB, 0xCC, 0xDC, 0x9C, 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xAB, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xDC, 0xBB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xCA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x78, 0x89, 0x9A, 0xBB, 0xB9, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBB, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x67, 0x78, 0x89, + 0xAB, 0xA9, 0x99, 0x87, 0x77, 0x66, 0x66, 0x66, 0x67, 0x78, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x66, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x77, 0x66, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xAA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xAA, 0x99, 0x99, 0x88, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xBC, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDC, 0x9C, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xAA, 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBC, 0xCC, 0x9C, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xDD, 0xED, 0xBC, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xCB, 0xBB, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0xAA, 0xBC, 0xBA, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xAA, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBB, 0xAB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xAB, 0xBB, 0xBA, 0xA9, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xCB, + 0xBC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAB, 0xBC, 0xCC, 0xCD, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCC, 0xED, 0xCC, 0xBB, 0xBB, + 0xBB, 0xAB, 0xBB, 0xBC, 0xDC, 0xDD, 0x9C, 0xCB, 0xBB, 0xBB, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xDC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0x9D, 0xED, + 0xCC, 0xBB, 0xBA, 0xAB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFE, 0xDD, 0xCC, 0xBA, + 0xAA, 0xAA, 0x9A, 0xAA, 0xBC, 0xCD, 0xDF, 0xEC, 0xDC, 0xAA, 0x99, 0x99, + 0x89, 0x99, 0x9A, 0xBB, 0xCD, 0xDD, 0xCC, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xBB, 0xCD, 0xDB, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xBB, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9B, + 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x66, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDB, 0xA9, + 0x88, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0x9B, 0xCC, 0xBB, 0xA9, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x77, 0x89, 0xAC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0xAA, 0xCC, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBB, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAA, + 0xBC, 0xDC, 0xDC, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xDD, + 0xCD, 0xCC, 0xBA, 0x99, 0x98, 0x89, 0x99, 0xAA, 0xBC, 0xCD, 0xCD, 0xED, + 0xCB, 0xBA, 0xAA, 0x99, 0x9A, 0xAA, 0xBC, 0xCD, 0xED, 0xDF, 0xED, 0xCC, + 0xBB, 0xBB, 0xAB, 0xBB, 0xBB, 0xCD, 0xDE, 0xED, 0xEE, 0xDD, 0xDC, 0xCC, + 0xBB, 0xCC, 0xCC, 0xDD, 0xEE, 0xEE, 0x9D, 0xCD, 0xCC, 0xCC, 0xCB, 0xBC, + 0xCC, 0xCC, 0xCD, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xFF, 0xFD, 0xDD, 0xDC, 0xED, 0xDD, 0xDD, 0x9F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFE, + 0xED, 0xDD, 0xCD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCD, 0xBB, + 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCD, 0xDE, 0xFF, 0xEF, 0xFD, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0xAB, + 0xCD, 0xEF, 0xFF, 0xFF, 0xED, 0xBA, 0x88, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xFF, 0xFD, 0xCA, 0x98, 0x66, 0x55, 0x67, 0x89, 0xAC, 0xDF, 0xFF, + 0xEF, 0xCB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xFF, 0xFC, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x68, 0xAB, 0xDF, 0xFF, 0xFF, 0xDB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBD, 0xEF, 0xFF, 0xFD, 0xBA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xFF, 0xEC, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCD, 0xFF, 0xFF, 0xFF, 0xCC, 0xA9, 0x87, 0x76, 0x77, 0x8A, + 0xBC, 0xFF, 0xFF, 0xFF, 0xFE, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFF, 0xFF, 0xDE, 0xCB, 0xBA, 0xA9, 0xAA, 0xBC, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDC, 0xBB, 0xBB, 0xCC, 0xDE, 0xFF, 0xFF, 0xFE, 0xFF, + 0xFF, 0xFE, 0xDD, 0xCC, 0xDC, 0xDF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, + 0xFF, 0xED, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xFE, 0xED, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDC, 0x9D, 0xEE, + 0xEE, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xDD, 0xED, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xDD, 0xCB, 0xBA, 0x99, 0x99, 0x89, + 0x9A, 0xAB, 0xCD, 0xEE, 0xDC, 0xCC, 0xBA, 0x99, 0x88, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xDD, 0xCD, 0xBA, 0x99, 0x87, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x66, 0x54, 0x45, 0x66, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x8A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x88, + 0x9A, 0xBD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDD, 0xCB, 0xAA, 0x99, 0x98, 0x89, 0x9A, 0xBB, 0xCD, 0xEE, + 0xDE, 0xDD, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xDD, 0xDF, 0xED, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xFF, 0xFE, 0xCE, 0xFF, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFD, 0xFE, 0xFF, 0xDE, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xFE, 0x9D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xEE, 0xEF, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xCC, 0xCC, 0xBB, 0xBC, 0xCC, 0xCC, 0xDD, 0xDD, 0xAE, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDE, 0xEF, 0xFE, 0xDE, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xED, 0xDD, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAB, 0xBC, 0xDE, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0xAA, 0xBC, 0xDE, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAB, 0xCC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCA, 0x98, 0x77, 0x66, 0x55, 0x56, 0x77, 0x89, 0xBC, 0xDD, + 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xBA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x67, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDD, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xDE, 0xDC, 0xBB, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xDE, 0xED, 0xED, + 0xDC, 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xDF, 0xEE, 0xDD, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xED, 0xFF, 0xEE, 0xDD, 0xDD, + 0xCC, 0xDD, 0xDD, 0xEE, 0xFF, 0xFF, 0xAE, 0xDD, 0xDD, 0xDD, 0xDD, 0xCC, + 0xDD, 0xDD, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDD, 0x9F, 0xFE, + 0xED, 0xDD, 0xCD, 0xDC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFD, 0xEF, 0xDE, 0xCC, + 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xEF, 0xDD, 0xED, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xAB, 0xCD, 0xEF, 0xFD, 0xDD, 0xDB, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCD, 0xEE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x99, + 0xAB, 0xCD, 0xFD, 0xDD, 0xCB, 0x98, 0x77, 0x66, 0x66, 0x78, 0x9A, 0xBC, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x56, 0x78, 0x9A, 0xBD, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x55, 0x56, 0x79, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x55, 0x44, 0x55, 0x67, 0x8A, 0xBC, 0xED, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x76, 0x55, + 0x44, 0x55, 0x67, 0x8A, 0xBC, 0xDC, 0xCD, 0xCA, 0x98, 0x76, 0x55, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x67, 0x88, + 0x9A, 0xCC, 0xDD, 0xDD, 0xCC, 0xAA, 0x98, 0x77, 0x77, 0x88, 0x9A, 0xBC, + 0xDD, 0xDC, 0xED, 0xCB, 0xA9, 0x99, 0x88, 0x89, 0x9A, 0xBC, 0xCE, 0xED, + 0xDF, 0xDC, 0xCB, 0xBA, 0xA9, 0xAA, 0xAA, 0xBC, 0xDD, 0xEF, 0xED, 0xEE, + 0xDD, 0xCC, 0xCC, 0xBB, 0xBB, 0xBC, 0xDD, 0xEE, 0xEE, 0xEF, 0xFE, 0xED, + 0xDC, 0xDC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, 0xEE, 0xFD, 0xDD, + 0xDD, 0xDD, 0xED, 0xDF, 0xFF, 0xFF, 0x9D, 0xDD, 0xCD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDE, 0xDE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFE, 0xFE, 0xDE, 0xCD, 0xDD, 0xED, 0xDD, 0xDE, 0x8F, 0xFF, + 0xFF, 0xEF, 0xED, 0xEE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xDD, 0xDC, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xBA, 0xA9, 0x9A, + 0xAB, 0xCD, 0xEF, 0xFF, 0xFF, 0xFE, 0xDC, 0xA9, 0x88, 0x88, 0x89, 0xAA, + 0xCD, 0xFF, 0xFF, 0xEF, 0xEC, 0xB9, 0x87, 0x76, 0x77, 0x88, 0xAB, 0xCE, + 0xFF, 0xFF, 0xFD, 0xBA, 0x97, 0x66, 0x55, 0x66, 0x89, 0xAC, 0xDF, 0xFF, + 0xEE, 0xDB, 0xA8, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xFD, 0xDD, + 0xB9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xCF, 0xFF, 0xEF, 0xCB, 0x98, + 0x65, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xFF, 0xFD, 0xED, 0xBA, 0x87, 0x65, + 0x44, 0x55, 0x78, 0x9B, 0xDD, 0xFE, 0xEF, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xBD, 0xFF, 0xFF, 0xFD, 0xCB, 0xA8, 0x87, 0x66, 0x77, 0x89, + 0xBC, 0xDF, 0xFF, 0xFF, 0xDD, 0xBB, 0xA9, 0x88, 0x88, 0x89, 0xAB, 0xCF, + 0xFF, 0xFF, 0xFF, 0xEC, 0xCB, 0xAA, 0xA9, 0x9A, 0xBB, 0xDD, 0xFF, 0xFF, + 0xFF, 0xFD, 0xED, 0xCB, 0xBB, 0xBB, 0xCC, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xED, 0xDC, 0xCD, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xEF, 0xEE, 0xED, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xDE, 0xEF, 0xFE, 0xED, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0x9D, 0xED, + 0xDC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDF, 0xED, 0xDD, 0xDC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xDC, 0xCC, 0xBB, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xDD, 0xCC, 0xBA, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xDB, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xBC, 0xCC, 0xBB, 0xAA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAA, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCB, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xAA, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBC, 0xBB, 0xBA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x89, 0xAB, 0xCC, 0xBC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xBC, 0xDC, 0xCB, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCC, + 0xCD, 0xCB, 0xBA, 0x99, 0x98, 0x99, 0x9A, 0xAB, 0xBB, 0xDD, 0xCC, 0xDC, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xCD, 0xDD, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xBD, 0xDD, 0xEF, 0xDD, 0xED, 0xDD, 0xCC, 0xCC, + 0xBC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFD, 0x8D, 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, + 0xCB, 0xCC, 0xDD, 0xDE, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xAB, 0xBB, 0x8B, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xCA, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x78, + 0x99, 0xAB, 0xBB, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x9A, + 0xAB, 0xBA, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xBA, + 0x9A, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x65, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBA, 0xAB, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x88, 0x88, 0x9A, 0xAB, 0xCB, + 0xBB, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCC, 0xBC, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xCB, 0xDC, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDC, 0x8C, 0xBB, 0xBA, 0xAB, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBB, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBB, 0x9B, 0xCB, + 0xBB, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xBB, 0xCC, 0xDC, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBA, 0xA9, 0x99, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xBB, 0xCB, 0xAA, 0xA9, 0x98, 0x88, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBA, 0x9A, 0x99, 0x87, 0x77, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x9A, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x87, 0x76, 0x66, + 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBA, 0xAA, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBB, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xA9, 0x99, 0xAA, 0xAB, 0xBB, 0xCC, 0xCB, 0xDC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0x9B, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0x8C, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCC, 0xDC, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xCB, 0xBB, 0xBA, 0x99, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xCB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x67, 0x88, 0x9A, + 0xBC, 0xBA, 0xA9, 0x88, 0x76, 0x66, 0x56, 0x66, 0x77, 0x88, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xBA, 0xAA, 0x98, 0x77, + 0x65, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xAA, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x99, 0x87, 0x76, 0x65, 0x66, + 0x67, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x66, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xBB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x78, 0x88, 0x9A, + 0xBB, 0xBB, 0xBB, 0xA9, 0x98, 0x88, 0x77, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xA9, 0x99, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCC, 0xCD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xCC, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCE, 0xEC, 0x9C, 0xCB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBC, 0xCC, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xBF, 0xDC, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCD, 0x7D, 0xFD, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xFD, 0xDE, 0xDC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xCE, 0xEE, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCC, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x99, 0x88, 0x88, + 0x99, 0xAB, 0xBC, 0xDE, 0xCC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAA, 0xBD, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAB, + 0xCD, 0xCC, 0xCA, 0xA8, 0x77, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xBC, 0xA9, 0x87, 0x65, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCC, 0xCA, 0x98, 0x76, 0x65, + 0x54, 0x56, 0x67, 0x89, 0xAC, 0xCC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x56, + 0x67, 0x88, 0x9A, 0xBD, 0xDC, 0xCB, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDC, 0xCD, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x99, 0xAB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xFD, + 0xDD, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDD, 0xED, 0xED, + 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xDF, 0xEE, 0xDC, + 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xED, 0xEE, 0xFD, 0xDD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xEE, 0x8D, 0xDC, 0xDC, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDD, 0xDD, 0xEE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xEF, 0xFD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDC, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFE, 0xFD, 0xDE, 0xFE, 0xFE, 0xEF, 0xFF, 0xFD, 0xFF, 0xFF, 0xEE, + 0xDC, 0xCD, 0xDC, 0xDD, 0xEE, 0xFF, 0xFF, 0xDF, 0xFF, 0xED, 0xDC, 0xCB, + 0xBB, 0xBC, 0xCD, 0xDE, 0xEF, 0xFE, 0xEF, 0xEE, 0xCC, 0xBA, 0xA9, 0x9A, + 0xAB, 0xCC, 0xDE, 0xFF, 0xEE, 0xFE, 0xDC, 0xBA, 0x98, 0x88, 0x89, 0x9B, + 0xCD, 0xDE, 0xFF, 0xDE, 0xDC, 0xBA, 0x97, 0x76, 0x77, 0x89, 0xAB, 0xCD, + 0xFF, 0xDD, 0xED, 0xBA, 0x97, 0x66, 0x55, 0x66, 0x89, 0xAC, 0xCD, 0xFE, + 0xDE, 0xDB, 0xA8, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBC, 0xEE, 0xED, 0xEC, + 0xB9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xCE, 0xFE, 0xDD, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x8A, 0xBC, 0xEF, 0xEE, 0xEC, 0xBA, 0x87, 0x65, + 0x44, 0x46, 0x78, 0xAB, 0xCD, 0xFE, 0xED, 0xDB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xBD, 0xDF, 0xFD, 0xED, 0xCB, 0xA9, 0x87, 0x66, 0x77, 0x8A, + 0xBC, 0xDE, 0xFF, 0xDE, 0xDD, 0xBA, 0xA9, 0x88, 0x88, 0x99, 0xAB, 0xDD, + 0xEF, 0xFD, 0xFE, 0xDC, 0xCB, 0xAA, 0x99, 0xAA, 0xBC, 0xCD, 0xFF, 0xFF, + 0xDF, 0xFE, 0xDD, 0xCC, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFF, 0xED, 0xFF, + 0xEE, 0xDD, 0xDC, 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFF, 0xDF, 0xFE, 0xEE, + 0xEE, 0xED, 0xEE, 0xDF, 0xFE, 0xFF, 0xFF, 0xFC, 0xFF, 0xEF, 0xEF, 0xFE, + 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xCC, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDE, 0xFF, 0xEF, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xED, 0xDD, 0xCD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0x9E, 0xFE, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFD, 0xEF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xDF, 0xDD, 0xED, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xED, 0xDD, 0xDC, 0xBA, 0x99, 0x98, 0x89, + 0x9A, 0xAB, 0xCD, 0xDD, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xCA, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xAC, + 0xDD, 0xDC, 0xCB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDD, 0xCC, 0xBA, 0x87, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9B, 0xBC, 0xDD, 0xCC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xEC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0x9A, 0xBC, 0xDD, 0xFE, + 0xCE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCE, 0xEF, 0xFC, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFF, 0xDE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFF, 0xFD, 0xFE, 0xEE, 0xED, 0xED, + 0xDD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0x9D, 0xDD, 0xDC, 0xDC, 0xDD, 0xDD, + 0xDD, 0xEE, 0xEF, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0xDD, 0xAE, 0xEE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEE, 0xED, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAA, 0xBC, 0xDD, 0xDC, 0xCB, 0xA9, 0x98, 0x77, 0x77, 0x78, 0x89, + 0xAB, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xCA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xAC, 0xDC, + 0xBB, 0xA9, 0x87, 0x65, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xCD, 0xCC, 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xEE, 0xDE, 0xDD, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xFD, 0xEE, 0xED, 0xDD, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFF, 0x9D, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, + 0xCD, 0xDE, 0xEE, 0xEF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDE, 0xEE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDC, 0x9E, 0xFE, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xEF, 0xFD, 0xDF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xDE, 0xDE, 0xED, 0xCC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xED, 0xDE, 0xDC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xDD, 0xCD, 0xBA, 0xA8, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xDD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCD, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9B, 0xCC, 0xED, 0xCD, 0xCB, 0xAA, 0x98, 0x87, 0x78, 0x89, 0x9A, 0xBC, + 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, 0x88, 0x99, 0xAA, 0xBC, 0xCD, 0xED, + 0xDE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xDD, 0xDE, 0xEC, 0xDD, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xFE, 0xDE, 0xEE, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xFF, 0xFD, 0xEE, 0xEE, 0xDD, 0xDC, + 0xDD, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0x9D, 0xDC, 0xDC, 0xCC, 0xCC, 0xCD, + 0xDD, 0xED, 0xEE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xEF, 0xED, 0xDD, 0xCD, 0xDC, 0xCC, 0xCD, 0xDD, 0x8F, 0xFF, + 0xFF, 0xFF, 0xEE, 0xDD, 0xDE, 0xEF, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xEE, + 0xDD, 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFF, 0xDF, 0xFF, 0xED, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCD, 0xDE, 0xFF, 0xFE, 0xEF, 0xFD, 0xCB, 0xAA, 0x99, 0x9A, + 0xAB, 0xBC, 0xDE, 0xFF, 0xEE, 0xFD, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0x9B, + 0xCC, 0xEE, 0xFD, 0xEF, 0xDB, 0xA9, 0x87, 0x76, 0x67, 0x88, 0x9B, 0xCD, + 0xFF, 0xFD, 0xDD, 0xBA, 0x97, 0x66, 0x55, 0x66, 0x89, 0xAB, 0xDE, 0xFF, + 0xDD, 0xCB, 0x98, 0x76, 0x54, 0x45, 0x67, 0x8A, 0xBC, 0xDF, 0xFE, 0xEC, + 0xA9, 0x86, 0x54, 0x33, 0x45, 0x68, 0x9B, 0xCD, 0xFE, 0xDD, 0xCB, 0x98, + 0x65, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xDF, 0xED, 0xDC, 0xBA, 0x87, 0x65, + 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xEE, 0xDE, 0xCB, 0xA9, 0x76, 0x65, 0x56, + 0x67, 0x8A, 0xBD, 0xDF, 0xFD, 0xFD, 0xCB, 0x98, 0x87, 0x66, 0x77, 0x89, + 0xAC, 0xEF, 0xFF, 0xDF, 0xDD, 0xBB, 0xA9, 0x88, 0x88, 0x99, 0xAB, 0xCE, + 0xFF, 0xFD, 0xEF, 0xDD, 0xCB, 0xAA, 0x99, 0x9A, 0xBB, 0xCD, 0xEF, 0xFF, + 0xEF, 0xFE, 0xDD, 0xCC, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFE, 0xFF, + 0xDE, 0xDD, 0xCC, 0xCC, 0xCC, 0xDE, 0xEF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, + 0xEE, 0xED, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xEF, 0xFF, 0xFF, 0xFF, 0x9D, 0xDD, 0xDD, 0xEE, 0xDD, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCC, 0x8D, 0xEE, + 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEF, 0xED, 0xCD, 0xDC, 0xCB, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDD, 0xCC, 0xDC, 0xBB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCC, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xBC, 0xDC, 0xBB, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xBC, 0xCB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xDC, + 0xBB, 0xA9, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xBB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xAB, 0xCC, 0xBC, 0xBA, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x99, 0xAB, + 0xCD, 0xCC, 0xCC, 0xBA, 0x99, 0x98, 0x88, 0x88, 0x99, 0xAB, 0xBC, 0xDC, + 0xCD, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xCC, 0xDD, 0xDC, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xED, 0xCE, 0xED, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEE, 0xDC, 0xEE, 0xED, 0xDC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xFE, 0x7C, 0xCC, 0xCC, 0xCB, 0xCB, 0xBB, + 0xCC, 0xCC, 0xDE, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xAB, 0xBB, 0x8C, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCC, 0xDC, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xBB, 0xAA, 0x99, 0x99, + 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x88, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xAA, 0x98, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xA9, + 0x98, 0x76, 0x55, 0x45, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xAA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, 0x9A, + 0xBC, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBB, 0xCB, + 0xBC, 0xBA, 0xAA, 0x99, 0x98, 0x89, 0x99, 0x9A, 0xAB, 0xCC, 0xBB, 0xCB, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDD, 0xCB, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0x8B, 0xBB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xBB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0x9B, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x9B, 0xCB, + 0xBB, 0xAA, 0xAA, 0x9A, 0xAA, 0xAA, 0xBB, 0xBC, 0xDB, 0xBB, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x77, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAA, 0xBA, + 0xAB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xCB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0x99, 0xAA, 0xAA, 0xBB, 0xCC, 0xCB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCC, 0xDC, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xBB, 0x8B, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDB, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xBB, 0xBB, 0xAA, 0x99, 0x88, + 0x88, 0x89, 0x99, 0xAA, 0xBC, 0xCB, 0xAB, 0xAA, 0x98, 0x88, 0x87, 0x88, + 0x88, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAB, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x9A, + 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xBA, + 0x9A, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xA9, 0xA9, + 0x87, 0x76, 0x55, 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0x9A, 0x98, 0x87, + 0x66, 0x55, 0x55, 0x56, 0x77, 0x89, 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x99, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBA, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBB, 0xBA, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x88, 0x9A, 0xAB, 0xCB, + 0xAC, 0xBA, 0xA9, 0x99, 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xCB, + 0xBA, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCB, 0xBC, 0xCB, 0xBB, + 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xCB, 0xDD, 0xCC, 0xBB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xDC, 0xDC, 0x8B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCC, 0xCC, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCC, 0x7D, 0xFE, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xED, 0xDD, 0xDC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xDC, 0xDC, 0xCB, 0xA9, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xED, 0xCD, 0xBA, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xAC, 0xCD, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xBC, 0xA9, 0x98, 0x77, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCC, 0xCB, 0xBA, 0x98, 0x77, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x54, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x67, 0x78, 0x9A, 0xBC, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x78, + 0x99, 0xBB, 0xCC, 0xCC, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCC, 0xCC, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xBC, 0xDD, + 0xCC, 0xCC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDE, 0xDC, 0xDD, + 0xCC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAB, 0xCC, 0xDE, 0xED, 0xDE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xDD, 0xEF, 0xED, 0xED, 0xEE, 0xEC, 0xCC, + 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFE, 0x8D, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFF, 0xFF, 0xED, 0xDC, 0xDD, 0xDD, 0xCD, 0xCC, 0xCC, 0x8F, 0xFF, + 0xFF, 0xEE, 0xEE, 0xED, 0xEE, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFE, + 0xDD, 0xDD, 0xCD, 0xCD, 0xEE, 0xEF, 0xEF, 0xEE, 0xFF, 0xED, 0xDD, 0xCB, + 0xBB, 0xBC, 0xCD, 0xDD, 0xEF, 0xFD, 0xEF, 0xDE, 0xDC, 0xBA, 0xAA, 0xAA, + 0xAB, 0xCD, 0xDE, 0xFF, 0xDE, 0xFE, 0xDC, 0xA9, 0x98, 0x88, 0x99, 0xAB, + 0xCC, 0xEF, 0xFD, 0xEF, 0xDC, 0xB9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xEE, 0xDD, 0xCA, 0x98, 0x66, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xFE, + 0xED, 0xDB, 0xA8, 0x76, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xEF, 0xDD, 0xED, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xFE, 0xDE, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xEF, 0xED, 0xED, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xCE, 0xEE, 0xDD, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x68, 0x9A, 0xCD, 0xDF, 0xFD, 0xFD, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x89, + 0xBC, 0xDE, 0xEF, 0xCE, 0xDC, 0xCB, 0xA9, 0x98, 0x88, 0x99, 0xBB, 0xDD, + 0xFF, 0xED, 0xEF, 0xEC, 0xCB, 0xAA, 0xA9, 0xAA, 0xBB, 0xDD, 0xEF, 0xFF, + 0xCD, 0xED, 0xDC, 0xCC, 0xBB, 0xBB, 0xBC, 0xDD, 0xFF, 0xFF, 0xFC, 0xFE, + 0xDD, 0xDD, 0xDC, 0xCD, 0xCD, 0xDD, 0xFF, 0xFF, 0xFF, 0xCE, 0xDE, 0xED, + 0xDD, 0xEE, 0xDE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFC, 0xFE, 0xFE, 0xDE, 0xEE, + 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCC, 0xCC, 0xCD, 0xDD, 0xDE, + 0xEE, 0xDE, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x9E, 0xFE, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDE, 0xEE, 0xFD, 0xDF, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xDD, 0xED, 0xDC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xED, 0xDD, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDC, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x99, + 0xAB, 0xCD, 0xED, 0xCC, 0xCB, 0x99, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x79, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0x9A, 0xBC, 0xDE, 0xED, + 0xCD, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEF, 0xDC, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xFE, 0xCE, 0xED, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFF, 0xEC, 0xFE, 0xEE, 0xED, 0xDD, + 0xDD, 0xDD, 0xEE, 0xEE, 0xFF, 0xFF, 0x8D, 0xDD, 0xDC, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEE, 0xEE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCD, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCC, 0xCC, 0xAE, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0xDE, 0xDC, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xDD, 0xDC, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xCD, 0xDD, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xCB, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x78, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x88, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xDC, 0xCC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xED, + 0xCD, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCC, 0xDE, 0xDC, 0xDD, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xDE, 0xFE, 0xCE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xED, 0xEE, 0xDD, 0xDC, 0xCC, + 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xFE, 0xAD, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xDD, 0xEE, 0xEF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCD, 0x9E, 0xFF, + 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xDD, 0xDD, 0xDE, 0xFD, 0xEE, 0xED, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xCD, 0xDD, 0xEE, 0xDD, 0xED, 0xCC, 0xBA, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xED, 0xDD, 0xCC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xDD, 0xCD, 0xCB, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBB, + 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCC, 0xBA, 0x98, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xCC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xCC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDB, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xCD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xDC, 0xDC, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xBC, 0xCD, 0xED, + 0xCE, 0xDC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBC, 0xCD, 0xEF, 0xEC, 0xED, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xFE, 0xCE, 0xED, 0xDD, + 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFD, 0xEE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEF, 0xEF, 0xFF, 0x9C, 0xCD, 0xDC, 0xDC, 0xCC, 0xCD, + 0xDD, 0xDD, 0xEE, 0xFE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFE, 0xED, 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7E, 0xFF, + 0xFF, 0xFE, 0xEE, 0xDD, 0xDD, 0xDE, 0xEE, 0xEF, 0xFD, 0xDF, 0xFE, 0xFE, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEE, 0xEF, 0xDE, 0xFE, 0xEE, 0xCC, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCD, 0xEF, 0xFD, 0xEF, 0xED, 0xCB, 0xBA, 0xA9, 0x9A, + 0xAB, 0xBC, 0xDD, 0xEE, 0xDE, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x89, 0xAA, + 0xCC, 0xDE, 0xED, 0xDE, 0xDB, 0xB9, 0x87, 0x76, 0x77, 0x89, 0xAB, 0xCD, + 0xEF, 0xDE, 0xDC, 0xBA, 0x97, 0x66, 0x55, 0x67, 0x89, 0xAC, 0xCE, 0xFD, + 0xDD, 0xCB, 0xA8, 0x75, 0x54, 0x45, 0x67, 0x8A, 0xBD, 0xDF, 0xED, 0xEC, + 0xB9, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCD, 0xED, 0xDD, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x56, 0x89, 0xBC, 0xEF, 0xED, 0xDC, 0xBA, 0x87, 0x65, + 0x44, 0x46, 0x78, 0xAB, 0xCD, 0xED, 0xDD, 0xDB, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xBC, 0xEF, 0xDD, 0xED, 0xCB, 0xA9, 0x87, 0x76, 0x77, 0x89, + 0xBC, 0xDE, 0xFE, 0xDF, 0xDC, 0xCB, 0xA9, 0x88, 0x88, 0x99, 0xAB, 0xCD, + 0xFF, 0xED, 0xEE, 0xDD, 0xBB, 0xAA, 0x99, 0xAA, 0xAB, 0xCD, 0xEF, 0xFF, + 0xDE, 0xED, 0xCC, 0xCB, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, + 0xED, 0xDD, 0xCC, 0xCC, 0xCD, 0xDE, 0xFE, 0xFF, 0xFF, 0xDF, 0xFE, 0xEE, + 0xDE, 0xDE, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xEF, 0xEE, 0xFE, + 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0xDD, 0xDC, 0xDE, 0xDE, 0xED, + 0xED, 0xFF, 0xEE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xEE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xDD, 0x8E, 0xFF, + 0xED, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEF, 0xFE, 0xEF, 0xED, 0xCC, + 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEE, 0xEE, 0xDE, 0xED, 0xCB, 0xBA, 0xAA, + 0xA9, 0xAA, 0xAB, 0xCD, 0xDE, 0xFD, 0xED, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCC, 0xDF, 0xDC, 0xCC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xED, 0xDC, 0xBA, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xCE, 0xDC, 0xDB, 0xA9, 0x87, 0x66, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCC, 0xBA, 0x98, 0x66, 0x54, 0x55, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA8, 0x76, 0x54, 0x34, 0x55, 0x67, 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, + 0x65, 0x53, 0x34, 0x56, 0x78, 0x9A, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x54, 0x56, 0x67, 0x99, 0xBC, 0xDD, 0xCC, 0xCA, 0x98, 0x77, 0x65, 0x56, + 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x88, + 0x9A, 0xBD, 0xED, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xDE, 0xEC, 0xDD, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xEE, + 0xDE, 0xDC, 0xCB, 0xAA, 0xAA, 0x9A, 0xAA, 0xBB, 0xCE, 0xEF, 0xFD, 0xEE, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDE, 0xFF, 0xDE, 0xED, 0xDD, + 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFD, 0xFF, 0xFD, 0xED, 0xDD, + 0xDD, 0xDD, 0xDE, 0xEF, 0xFF, 0xFE, 0x7C, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xDD, 0xDD, 0xEE, 0xFE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0x8B, 0xDC, + 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xEB, 0xBC, 0xBB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xBB, 0xCB, 0xAA, 0x99, 0x98, + 0x88, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xAB, 0xAA, 0x98, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xBC, 0xBA, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xAB, 0xAA, 0xA9, + 0x88, 0x76, 0x55, 0x45, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x98, 0x87, + 0x66, 0x55, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xAA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xBB, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xBA, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xBB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xDD, 0xCB, 0xDC, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xEC, 0x8B, 0xBB, 0xBB, 0xBA, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBC, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAB, 0xBA, 0xAA, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0x8B, 0xCB, + 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCB, 0xBB, 0xBA, 0xAA, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBB, 0xCC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x89, 0x99, 0xAA, 0xBB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x78, + 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x88, 0x99, + 0xAB, 0xA9, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xBA, + 0x9A, 0x98, 0x77, 0x66, 0x55, 0x56, 0x66, 0x78, 0x89, 0xAA, 0xA9, 0xA9, + 0x87, 0x76, 0x65, 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x77, + 0x66, 0x55, 0x55, 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x78, 0x9A, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x78, 0x89, 0xAB, 0xA9, 0xA9, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xAA, 0xBA, 0xA9, 0x98, 0x88, 0x77, 0x78, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xBA, 0xA9, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xCB, + 0xBA, 0xA9, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBC, 0xCB, 0xBC, 0xCB, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xCB, 0xCC, 0xCB, 0xBB, 0xBA, + 0xAA, 0xAB, 0xBB, 0xBC, 0xCC, 0xDC, 0x8B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xAB, 0xBB, 0xCC, 0xA0, 0x00, 0x00, 0x00, + }, + { + 0xAC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0xBB, 0x8C, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xBC, 0xCD, 0xDC, 0xBC, 0xCB, 0xBA, + 0xA9, 0x99, 0x9A, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCB, 0xAA, 0x99, 0x98, + 0x89, 0x99, 0x9A, 0xAB, 0xBC, 0xCB, 0xBB, 0xBA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x88, + 0x9A, 0xAB, 0xCB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x56, 0x66, 0x77, 0x89, 0xAA, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x55, 0x45, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x98, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xBA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAA, 0xCB, 0xAB, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xBB, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, + 0xBC, 0xBB, 0xAA, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xAB, 0xCC, 0xCB, 0xCC, + 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCD, 0xDD, 0xDC, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xED, 0x8C, 0xBB, 0xBB, 0xBB, 0xBB, 0xAB, + 0xBB, 0xBC, 0xCC, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xCE, 0xDC, 0xCC, 0xCB, 0xBB, 0xBB, 0xBB, 0xCC, 0xBC, 0xCC, 0x7D, 0xFE, + 0xDD, 0xCC, 0xCB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xFD, 0xDE, 0xDC, 0xCB, + 0xBB, 0xAA, 0xAA, 0xBB, 0xCC, 0xCD, 0xDE, 0xDD, 0xDD, 0xCB, 0xAA, 0x99, + 0x99, 0x9A, 0xAB, 0xCC, 0xDD, 0xFD, 0xCD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x99, 0xAB, 0xBC, 0xDD, 0xCC, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xBD, 0xDC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, 0x89, 0xAB, + 0xCD, 0xDB, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDC, + 0xCB, 0xA9, 0x87, 0x65, 0x54, 0x55, 0x67, 0x78, 0x9B, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xCB, 0x98, 0x77, 0x65, + 0x54, 0x55, 0x67, 0x89, 0xAC, 0xCC, 0xBC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0x9A, 0xBD, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x66, 0x67, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBB, 0xA9, 0x88, 0x77, 0x77, 0x88, 0x99, 0xBB, + 0xCD, 0xDC, 0xDC, 0xBA, 0xA9, 0x98, 0x88, 0x89, 0x99, 0xAB, 0xCD, 0xDD, + 0xDE, 0xDC, 0xBB, 0xAA, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDE, 0xFC, 0xDD, + 0xDC, 0xBB, 0xBA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDF, 0xEE, 0xDE, 0xDE, 0xDC, + 0xCC, 0xCB, 0xBC, 0xBC, 0xCD, 0xDE, 0xFF, 0xED, 0xFE, 0xED, 0xDD, 0xCC, + 0xCD, 0xCC, 0xDE, 0xDE, 0xFF, 0xFF, 0x8C, 0xCC, 0xDC, 0xCC, 0xCC, 0xCC, + 0xDD, 0xCD, 0xDE, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xEE, 0xED, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xED, 0xED, 0xDD, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xEE, + 0xDD, 0xDC, 0xCD, 0xDD, 0xDD, 0xFF, 0xFF, 0xDE, 0xFF, 0xED, 0xDC, 0xCB, + 0xBB, 0xCC, 0xCC, 0xDD, 0xFF, 0xFD, 0xEF, 0xEE, 0xDC, 0xBB, 0xAA, 0xAA, + 0xBB, 0xCD, 0xDE, 0xFF, 0xEF, 0xFE, 0xDB, 0xBA, 0x98, 0x88, 0x99, 0xAB, + 0xCC, 0xDE, 0xFF, 0xEF, 0xDD, 0xB9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCE, + 0xEF, 0xED, 0xED, 0xCA, 0x97, 0x66, 0x55, 0x67, 0x89, 0xAC, 0xDD, 0xFF, + 0xDD, 0xDB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBD, 0xFF, 0xED, 0xEC, + 0xBA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xDE, 0xFE, 0xDD, 0xCB, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xBD, 0xFE, 0xFD, 0xEC, 0xCA, 0x87, 0x65, + 0x44, 0x45, 0x78, 0xAC, 0xDF, 0xFF, 0xDE, 0xDC, 0xA9, 0x87, 0x65, 0x55, + 0x67, 0x9A, 0xCD, 0xFF, 0xFD, 0xFD, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x8A, + 0xBD, 0xEF, 0xFF, 0xCF, 0xDD, 0xCB, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xDE, + 0xFF, 0xED, 0xFD, 0xED, 0xCB, 0xAA, 0xAA, 0xAA, 0xBC, 0xDE, 0xEE, 0xFF, + 0xDE, 0xFD, 0xDD, 0xCB, 0xBB, 0xBB, 0xCC, 0xEE, 0xFF, 0xFF, 0xFD, 0xFE, + 0xEE, 0xDD, 0xDD, 0xCD, 0xDD, 0xEE, 0xFE, 0xFF, 0xFF, 0xDF, 0xEE, 0xEE, + 0xDD, 0xED, 0xDD, 0xEF, 0xEF, 0xFF, 0xFF, 0xFD, 0xEE, 0xEE, 0xEF, 0xEF, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCC, 0xCC, 0xDD, 0xDD, 0xDE, + 0xFE, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xEF, 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xEF, 0xDD, 0xDC, 0xCC, 0xCC, 0xDD, 0xDE, 0xEE, 0xED, 0xEF, 0xED, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEE, 0xDE, 0xFE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xFD, 0xEE, 0xDC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCD, 0xDE, 0xDD, 0xDD, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xED, 0xDD, 0xCA, 0x98, 0x87, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xDE, 0xDC, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xEE, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCE, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xED, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xEE, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xDE, 0xEC, 0xCC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9B, 0xCD, 0xEE, 0xCD, 0xCB, 0xA9, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBD, + 0xEF, 0xFC, 0xDC, 0xCB, 0xAA, 0x99, 0x98, 0x99, 0x9A, 0xBC, 0xDF, 0xFF, + 0xCE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xFF, 0xFC, 0xED, + 0xDD, 0xCC, 0xBB, 0xBB, 0xBB, 0xCD, 0xDE, 0xEF, 0xFF, 0xCE, 0xED, 0xDD, + 0xDC, 0xCC, 0xCD, 0xDD, 0xDF, 0xFF, 0xFF, 0xFC, 0xFE, 0xEE, 0xEE, 0xEE, + 0xDD, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, + 0xEF, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xEE, 0xDD, 0xCC, 0xCB, 0xBB, 0xBB, 0xCC, 0xCC, 0xCC, 0xAF, 0xFE, + 0xED, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0xEF, 0xDD, 0xCB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xDE, 0xDD, 0xED, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBB, 0xCD, 0xED, 0xDD, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xCD, 0xDC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xBC, 0xDC, 0xCC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCC, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, 0x66, 0x77, 0x89, 0xAB, 0xCC, + 0xBB, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xCC, 0xBB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBC, 0xCB, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xBB, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9A, 0xBD, 0xDB, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAB, + 0xCD, 0xEC, 0xCC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCD, 0xEE, + 0xCD, 0xCB, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xAB, 0xCD, 0xEF, 0xEC, 0xDD, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xCD, 0xDF, 0xFF, 0xCE, 0xDD, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFC, 0xEE, 0xDD, 0xDD, 0xCC, + 0xCC, 0xCD, 0xDD, 0xEF, 0xFF, 0xFF, 0xAD, 0xDD, 0xCC, 0xCC, 0xCC, 0xCD, + 0xDD, 0xEE, 0xEF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xDF, 0xFE, 0xED, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x8F, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCC, 0xDD, 0xDD, 0xDD, 0xEE, 0xEC, 0xEF, 0xEE, 0xDC, + 0xCB, 0xBB, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xDE, 0xEE, 0xDC, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xCC, 0xDD, 0xED, 0xEE, 0xDC, 0xBA, 0x99, 0x99, 0x99, + 0x9A, 0xAB, 0xCC, 0xDE, 0xDD, 0xEC, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xDD, 0xDD, 0xCB, 0xA8, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xBC, + 0xCD, 0xDD, 0xDC, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xCC, 0xDD, + 0xCC, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xDC, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x9A, 0xBC, 0xDD, 0xCC, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDC, 0xCB, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBC, 0xEE, 0xCC, 0xCA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xDE, 0xDD, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9B, 0xCD, 0xEE, 0xCD, 0xCB, 0xAA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBC, + 0xEF, 0xEC, 0xDD, 0xCB, 0xAA, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xDE, 0xFE, + 0xCE, 0xDC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAB, 0xBC, 0xDE, 0xEF, 0xFC, 0xED, + 0xDC, 0xCC, 0xBB, 0xBB, 0xBB, 0xCC, 0xDE, 0xEF, 0xFF, 0xCE, 0xED, 0xDD, + 0xDC, 0xCC, 0xCC, 0xDD, 0xDE, 0xFF, 0xFF, 0xFD, 0xFE, 0xEE, 0xDD, 0xDD, + 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0x8C, 0xCC, 0xCC, 0xDC, 0xDD, 0xDD, + 0xDE, 0xEE, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xFF, 0xFD, 0xED, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDE, 0xDF, 0xDE, 0xEF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xED, 0xDD, 0xCC, 0xCD, 0xEE, 0xEE, 0xFF, 0xDF, 0xFF, 0xFF, 0xED, 0xCC, + 0xBC, 0xBB, 0xCD, 0xDD, 0xEF, 0xFD, 0xFF, 0xFE, 0xEC, 0xBA, 0xAA, 0xAA, + 0xBB, 0xCC, 0xDF, 0xEF, 0xDF, 0xFF, 0xDC, 0xBA, 0x98, 0x88, 0x99, 0xAB, + 0xCC, 0xEF, 0xFF, 0xFF, 0xED, 0xBA, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xDD, + 0xEF, 0xDF, 0xFF, 0xCA, 0x97, 0x65, 0x55, 0x67, 0x89, 0xBC, 0xDF, 0xFE, + 0xEF, 0xDC, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x9A, 0xBD, 0xEF, 0xFE, 0xFD, + 0xCA, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCF, 0xFF, 0xDF, 0xDC, 0xA8, + 0x75, 0x43, 0x34, 0x57, 0x8A, 0xCD, 0xEF, 0xED, 0xFD, 0xCA, 0x97, 0x65, + 0x44, 0x45, 0x78, 0xAB, 0xDF, 0xFF, 0xEF, 0xDC, 0xB9, 0x87, 0x65, 0x55, + 0x68, 0x9B, 0xCF, 0xFF, 0xFD, 0xEE, 0xCB, 0xA9, 0x87, 0x76, 0x78, 0x9A, + 0xCD, 0xFF, 0xFF, 0xDF, 0xED, 0xCB, 0xA9, 0x98, 0x88, 0x9A, 0xBC, 0xDF, + 0xFF, 0xFD, 0xFD, 0xDC, 0xCB, 0xAA, 0xAA, 0xAA, 0xCD, 0xDF, 0xFF, 0xFF, + 0xDF, 0xFD, 0xDD, 0xCC, 0xCB, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFD, 0xFE, + 0xFE, 0xDD, 0xDC, 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFE, 0xEE, + 0xEE, 0xDE, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xEF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8D, 0xCC, 0xCD, 0xDE, 0xEF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xFF, 0xDF, 0xDE, 0xDD, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x7F, 0xFF, + 0xEF, 0xFF, 0xFD, 0xEE, 0xFE, 0xDD, 0xEF, 0xFF, 0xFD, 0xFF, 0xFF, 0xEE, + 0xDD, 0xDD, 0xDD, 0xCD, 0xDF, 0xFF, 0xFF, 0xDF, 0xFE, 0xED, 0xDC, 0xCB, + 0xBB, 0xBC, 0xCC, 0xDD, 0xFF, 0xFD, 0xFF, 0xFD, 0xDB, 0xBA, 0xAA, 0xAA, + 0xBB, 0xCC, 0xDD, 0xFF, 0xFF, 0xFE, 0xDB, 0xAA, 0x98, 0x89, 0x99, 0xAB, + 0xCC, 0xFF, 0xFF, 0xFE, 0xDC, 0xBA, 0x98, 0x77, 0x78, 0x89, 0xAC, 0xCC, + 0xFF, 0xFD, 0xFD, 0xCA, 0x98, 0x76, 0x66, 0x67, 0x89, 0xAC, 0xCD, 0xFE, + 0xDD, 0xCB, 0xA9, 0x76, 0x54, 0x45, 0x67, 0x9A, 0xCC, 0xDF, 0xDD, 0xED, + 0xBA, 0x97, 0x64, 0x23, 0x46, 0x78, 0xAB, 0xDD, 0xFF, 0xDD, 0xCB, 0xA9, + 0x76, 0x43, 0x24, 0x57, 0x9A, 0xCD, 0xFF, 0xFE, 0xDC, 0xCA, 0x98, 0x65, + 0x44, 0x56, 0x78, 0xAC, 0xDE, 0xFD, 0xDD, 0xDC, 0xAA, 0x87, 0x66, 0x56, + 0x78, 0x9A, 0xBD, 0xFF, 0xFE, 0xDD, 0xCB, 0xA9, 0x87, 0x77, 0x78, 0x99, + 0xBC, 0xEF, 0xFF, 0xDF, 0xED, 0xCB, 0xA9, 0x98, 0x89, 0x9A, 0xBC, 0xDD, + 0xFF, 0xFD, 0xFF, 0xEC, 0xCB, 0xBA, 0xAA, 0xAA, 0xAC, 0xDE, 0xEF, 0xFF, + 0xDF, 0xFE, 0xCC, 0xDC, 0xBB, 0xBB, 0xBC, 0xDD, 0xEF, 0xFF, 0xFE, 0xFF, + 0xDE, 0xED, 0xDD, 0xCC, 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFE, 0xFF, + 0xFF, 0xEC, 0xED, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xED, 0xFE, + 0xED, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6C, 0xCB, 0xBC, 0xCD, 0xDC, 0xCF, + 0xDF, 0xEF, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0x8D, 0xDC, + 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDC, 0xCD, 0xCB, 0xAA, + 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCB, 0xBA, 0x99, 0x99, + 0x89, 0x99, 0x9A, 0xAB, 0xBC, 0xDB, 0xBC, 0xAA, 0x99, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xCD, 0xBB, 0xBA, 0x99, 0x88, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xBA, 0x98, 0x76, 0x66, 0x56, 0x66, 0x78, 0x89, 0xAB, 0xBB, + 0xAA, 0x99, 0x87, 0x66, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBB, 0xBA, 0xA9, + 0x98, 0x76, 0x55, 0x44, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xBA, 0xA9, 0x98, 0x76, 0x65, + 0x55, 0x56, 0x67, 0x89, 0x9A, 0xBB, 0xAA, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x9A, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCC, 0xAB, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCA, 0xCB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBC, 0xCC, + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x88, 0x99, 0x9A, 0xBB, 0xCD, 0xDB, 0xDC, + 0xCB, 0xAA, 0xAA, 0x99, 0x9A, 0xAA, 0xBB, 0xCD, 0xDD, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDB, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBB, 0xCC, 0xCD, 0xDE, 0xED, 0x8C, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xDD, 0xDE, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0x9B, 0xCB, + 0xBA, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0xDB, 0xBC, 0xBA, 0xA9, + 0x99, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xBA, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x99, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x78, + 0x89, 0xAA, 0xBA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x99, + 0xAB, 0xA9, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x56, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x9A, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x98, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0x9A, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xBA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAA, 0xBB, + 0xAB, 0xAA, 0x99, 0x98, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xBA, 0xBB, + 0xAA, 0xA9, 0x99, 0x99, 0x99, 0x99, 0xAA, 0xBC, 0xCC, 0xBC, 0xBB, 0xAA, + 0xAA, 0x99, 0x99, 0xAA, 0xAA, 0xBB, 0xCD, 0xCB, 0xCC, 0xCB, 0xBB, 0xAA, + 0xAA, 0xAA, 0xBB, 0xBC, 0xCD, 0xDD, 0x9B, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xBC, 0xCD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBD, 0xCB, 0xBB, 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBB, 0xBB, 0x8D, 0xDC, + 0xCB, 0xBB, 0xBA, 0xAA, 0xAB, 0xBB, 0xCC, 0xCD, 0xDB, 0xCC, 0xCB, 0xAA, + 0xAA, 0x99, 0x9A, 0xAA, 0xAB, 0xBB, 0xCD, 0xBC, 0xCB, 0xAA, 0x99, 0x98, + 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xDB, 0xBB, 0xBA, 0x98, 0x88, 0x88, 0x88, + 0x89, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x88, + 0x9A, 0xBB, 0xCB, 0xAB, 0xA9, 0x87, 0x76, 0x66, 0x67, 0x77, 0x89, 0x9A, + 0xBB, 0xBA, 0xB9, 0x98, 0x76, 0x66, 0x56, 0x66, 0x78, 0x89, 0xAB, 0xBB, + 0xAA, 0x99, 0x87, 0x65, 0x55, 0x55, 0x67, 0x78, 0x9A, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x55, 0x44, 0x56, 0x67, 0x89, 0x9A, 0xBB, 0xAA, 0x99, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAB, 0xBA, 0xAA, 0x98, 0x77, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x99, 0xBB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCB, 0xAB, 0xAA, 0x98, 0x88, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBC, 0xCB, 0xBB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x89, 0x9A, 0xBC, 0xCC, + 0xBC, 0xBB, 0xAA, 0x99, 0x99, 0x88, 0x99, 0x9A, 0xAB, 0xCD, 0xCB, 0xCB, + 0xBB, 0xAA, 0xA9, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xDD, 0xBD, 0xDC, 0xBB, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBB, 0xCC, 0xDE, 0xDB, 0xDD, 0xCC, 0xCB, 0xBB, + 0xBB, 0xBC, 0xCC, 0xCD, 0xDD, 0xED, 0x8B, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, + 0xBB, 0xBC, 0xCD, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xFF, 0xDF, 0xDD, 0xCC, 0xCC, 0xDD, 0xCC, 0xCC, 0xCC, 0x7F, 0xFF, + 0xFF, 0xFD, 0xDE, 0xDD, 0xDE, 0xDE, 0xEF, 0xFF, 0xFE, 0xFF, 0xFF, 0xED, + 0xCD, 0xCC, 0xCC, 0xDC, 0xDD, 0xEE, 0xFF, 0xDF, 0xFF, 0xDE, 0xCC, 0xBB, + 0xBB, 0xBB, 0xBC, 0xDD, 0xFE, 0xFE, 0xFF, 0xED, 0xCB, 0xAA, 0x99, 0xAA, + 0xAA, 0xBC, 0xCE, 0xEF, 0xEE, 0xED, 0xCB, 0xA9, 0x88, 0x88, 0x89, 0xAB, + 0xCC, 0xDE, 0xFF, 0xDF, 0xDB, 0xA9, 0x87, 0x77, 0x77, 0x89, 0xAB, 0xCD, + 0xDE, 0xED, 0xFC, 0xBA, 0x97, 0x66, 0x55, 0x67, 0x89, 0xAB, 0xCE, 0xED, + 0xDE, 0xCB, 0xA8, 0x75, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xDE, 0xED, 0xEC, + 0xB9, 0x87, 0x54, 0x33, 0x45, 0x78, 0xAB, 0xCE, 0xFF, 0xDE, 0xCB, 0x98, + 0x75, 0x43, 0x34, 0x57, 0x89, 0xBC, 0xDE, 0xFD, 0xDC, 0xBA, 0x97, 0x65, + 0x44, 0x46, 0x78, 0xAB, 0xCD, 0xFE, 0xDE, 0xCB, 0xA9, 0x87, 0x65, 0x56, + 0x67, 0x9A, 0xBC, 0xDF, 0xDD, 0xED, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x89, + 0xAC, 0xDF, 0xFF, 0xEF, 0xDC, 0xBB, 0xA9, 0x88, 0x88, 0x99, 0xAB, 0xCD, + 0xFF, 0xFF, 0xFD, 0xDC, 0xBB, 0xAA, 0x99, 0x9A, 0xAB, 0xCE, 0xDF, 0xFF, + 0xDF, 0xFD, 0xDC, 0xBB, 0xBB, 0xBB, 0xBC, 0xCD, 0xEF, 0xFF, 0xFD, 0xFF, + 0xDE, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xEE, 0xFF, 0xFF, 0xDF, 0xEF, 0xEE, + 0xED, 0xDD, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFD, 0xFE, 0xEF, 0xFE, 0xEE, + 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCC, 0xDD, 0xDD, 0xED, 0xDE, + 0xEE, 0xEF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCC, 0xCB, 0xBB, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDD, 0xFD, 0xDF, 0xFF, 0xDF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, + 0xCC, 0xCD, 0xFF, 0xFD, 0xFF, 0xFD, 0xFF, 0xFF, 0xFC, 0xDB, 0xBA, 0xBB, + 0xCB, 0xDD, 0xFD, 0xFF, 0xFF, 0xFF, 0xFD, 0xCB, 0xA9, 0x99, 0x9A, 0xBC, + 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0x98, 0x77, 0x78, 0x9A, 0xBC, 0xDD, + 0xFD, 0xFF, 0xFF, 0xDD, 0xA8, 0x76, 0x55, 0x68, 0x9A, 0xBC, 0xFF, 0xFF, + 0xFF, 0xFC, 0xC9, 0x76, 0x54, 0x45, 0x68, 0xAB, 0xCC, 0xFF, 0xFF, 0xFD, + 0xCA, 0x97, 0x54, 0x23, 0x45, 0x79, 0xBC, 0xFF, 0xFF, 0xFF, 0xDC, 0xB9, + 0x76, 0x43, 0x24, 0x57, 0x9A, 0xCF, 0xFF, 0xFF, 0xFD, 0xDB, 0xA8, 0x65, + 0x44, 0x56, 0x79, 0xBD, 0xFF, 0xFF, 0xFF, 0xDC, 0xBA, 0x87, 0x65, 0x56, + 0x78, 0xAC, 0xDF, 0xFF, 0xFD, 0xFC, 0xFD, 0xBA, 0x88, 0x77, 0x78, 0x9A, + 0xCD, 0xFF, 0xFF, 0xDF, 0xFF, 0xDC, 0xBA, 0x99, 0x99, 0xAB, 0xCD, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFD, 0xDC, 0xBB, 0xBA, 0xBB, 0xDD, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFD, 0xFF, 0xDD, 0xDC, 0xCB, 0xDC, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, + 0xDF, 0xDD, 0xFD, 0xFD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFD, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0xCB, 0xDD, 0xCF, 0xFF, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEF, 0xEF, 0xFD, 0xDC, 0xDC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x9F, 0xFF, + 0xFE, 0xDD, 0xDC, 0xCC, 0xCC, 0xCC, 0xDD, 0xDF, 0xFD, 0xFF, 0xFF, 0xCC, + 0xCB, 0xBB, 0xBB, 0xBB, 0xBC, 0xDC, 0xEF, 0xEF, 0xFD, 0xDC, 0xBA, 0xAA, + 0x99, 0xAA, 0xAB, 0xCC, 0xDE, 0xFD, 0xFE, 0xDC, 0xBA, 0x99, 0x88, 0x89, + 0x9A, 0xAA, 0xCC, 0xDD, 0xED, 0xDC, 0xBA, 0x98, 0x87, 0x77, 0x78, 0x89, + 0xAB, 0xCD, 0xEE, 0xDD, 0xBA, 0x98, 0x77, 0x66, 0x66, 0x78, 0x89, 0xAC, + 0xCD, 0xDD, 0xCB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xED, + 0xDC, 0xBA, 0x87, 0x65, 0x54, 0x45, 0x66, 0x79, 0xAB, 0xCD, 0xEC, 0xCB, + 0xA8, 0x76, 0x54, 0x44, 0x55, 0x67, 0x89, 0xBD, 0xEE, 0xCC, 0xBA, 0x87, + 0x65, 0x54, 0x44, 0x56, 0x78, 0xAB, 0xDE, 0xEC, 0xCB, 0x98, 0x76, 0x65, + 0x54, 0x55, 0x67, 0x8A, 0xBC, 0xFE, 0xCC, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAB, 0xDF, 0xFC, 0xCB, 0xA9, 0x88, 0x76, 0x66, 0x67, 0x78, + 0x9A, 0xBE, 0xFF, 0xCC, 0xCB, 0xA9, 0x88, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xFF, 0xFC, 0xDD, 0xBB, 0xAA, 0x99, 0x88, 0x89, 0x9A, 0xBC, 0xDF, 0xFF, + 0xDD, 0xDC, 0xBB, 0xBA, 0xA9, 0x9A, 0xAA, 0xBC, 0xDE, 0xFF, 0xFC, 0xED, + 0xCC, 0xCC, 0xBB, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFF, 0xDD, 0xDD, 0xED, + 0xDC, 0xDC, 0xDD, 0xDD, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFE, 0xDE, 0xDD, + 0xDD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xDD, 0xDD, 0xDF, 0xDE, 0xEE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFE, 0xDC, 0xCC, 0xCC, 0xCC, 0xCD, 0xDD, 0xDE, 0xBF, 0xFF, + 0xFE, 0xDC, 0xCC, 0xBB, 0xBC, 0xCC, 0xDD, 0xEF, 0xFF, 0xFF, 0xFD, 0xCC, + 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xEF, 0xEF, 0xFD, 0xCB, 0xAA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDD, 0xFE, 0xFE, 0xCB, 0xA9, 0x98, 0x88, 0x88, + 0x89, 0x9A, 0xBC, 0xDF, 0xDD, 0xDC, 0xA9, 0x88, 0x77, 0x77, 0x77, 0x89, + 0x9A, 0xBC, 0xDD, 0xDC, 0xBA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xDC, 0xCB, 0x98, 0x76, 0x65, 0x55, 0x56, 0x77, 0x89, 0xAC, 0xDD, + 0xCC, 0xA9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCB, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xBD, 0xDC, 0xBA, 0x98, 0x76, 0x65, + 0x55, 0x55, 0x67, 0x89, 0xAC, 0xDE, 0xCC, 0xA9, 0x87, 0x76, 0x65, 0x55, + 0x66, 0x78, 0x9B, 0xCD, 0xEC, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xEF, 0xCC, 0xBA, 0x99, 0x87, 0x77, 0x77, 0x78, 0x89, 0xAC, + 0xDF, 0xFD, 0xDC, 0xBA, 0x99, 0x88, 0x88, 0x88, 0x99, 0xAB, 0xCE, 0xFF, + 0xDD, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0x9A, 0xBB, 0xCD, 0xFF, 0xFD, 0xED, + 0xCC, 0xBB, 0xAA, 0xAA, 0xAB, 0xBC, 0xDD, 0xFF, 0xFF, 0xDF, 0xED, 0xDC, + 0xCC, 0xBB, 0xBC, 0xCC, 0xDE, 0xFF, 0xFF, 0xFE, 0xFF, 0xEE, 0xDD, 0xDC, + 0xDD, 0xDD, 0xEF, 0xFF, 0xFF, 0xFF, 0xBE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, + 0xEF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFE, 0xDD, 0xFD, 0xEC, 0xDC, 0xCD, 0xCE, 0x9F, 0xFF, + 0xFF, 0xFD, 0xDD, 0xCC, 0xDC, 0xDD, 0xDE, 0xEF, 0xFD, 0xFF, 0xFF, 0xED, + 0xDC, 0xCB, 0xBB, 0xCC, 0xCC, 0xDD, 0xEF, 0xDF, 0xFE, 0xDD, 0xCB, 0xAA, + 0xAA, 0xAA, 0xBC, 0xCD, 0xDD, 0xFD, 0xFF, 0xDC, 0xBA, 0x99, 0x98, 0x99, + 0x9A, 0xAB, 0xCC, 0xDD, 0xDF, 0xED, 0xBA, 0x98, 0x87, 0x77, 0x88, 0x9A, + 0xAB, 0xCD, 0xFD, 0xED, 0xCB, 0x98, 0x77, 0x66, 0x67, 0x78, 0x9A, 0xAC, + 0xDD, 0xDD, 0xEB, 0xA9, 0x87, 0x65, 0x55, 0x66, 0x78, 0x9A, 0xBC, 0xDD, + 0xDD, 0xBA, 0x97, 0x65, 0x54, 0x45, 0x67, 0x89, 0xAB, 0xDE, 0xDD, 0xCB, + 0xA9, 0x76, 0x54, 0x44, 0x45, 0x67, 0x8A, 0xBC, 0xFD, 0xDD, 0xBA, 0x97, + 0x65, 0x44, 0x44, 0x56, 0x78, 0xAB, 0xCD, 0xDD, 0xDC, 0xA9, 0x87, 0x65, + 0x44, 0x55, 0x67, 0x9A, 0xBD, 0xEE, 0xDD, 0xBA, 0x98, 0x76, 0x65, 0x55, + 0x67, 0x89, 0xAC, 0xDD, 0xED, 0xDC, 0xBA, 0x98, 0x77, 0x66, 0x67, 0x78, + 0x9B, 0xCF, 0xFE, 0xDD, 0xDB, 0xAA, 0x98, 0x87, 0x77, 0x88, 0x9A, 0xBD, + 0xDF, 0xFD, 0xDD, 0xBB, 0xA9, 0x99, 0x89, 0x89, 0xAA, 0xBD, 0xEE, 0xFF, + 0xDE, 0xDC, 0xBB, 0xAA, 0xAA, 0xAA, 0xAB, 0xBD, 0xDF, 0xFF, 0xFD, 0xDD, + 0xDC, 0xCB, 0xBB, 0xBB, 0xBC, 0xCD, 0xDF, 0xFF, 0xFF, 0xDE, 0xDD, 0xDC, + 0xCC, 0xCC, 0xCC, 0xDD, 0xFE, 0xFF, 0xFF, 0xFC, 0xFF, 0xDF, 0xFE, 0xDE, + 0xDD, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9C, 0xCC, 0xDC, 0xDC, 0xDD, 0xDD, + 0xDD, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0xBB, 0xCB, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFD, 0xFF, + 0xCD, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBB, 0xCC, + 0xCC, 0xCD, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xCB, 0xAA, 0xA9, 0xAB, 0xBD, + 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCC, 0xA9, 0x88, 0x88, 0x9A, 0xBC, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFC, 0xB9, 0x76, 0x66, 0x78, 0x9B, 0xCD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCA, 0x86, 0x54, 0x45, 0x79, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFB, 0xA8, 0x64, 0x22, 0x46, 0x8A, 0xCF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, + 0x86, 0x42, 0x24, 0x68, 0xAB, 0xDF, 0xFF, 0xFF, 0xFF, 0xDC, 0xB8, 0x75, + 0x44, 0x56, 0x8A, 0xCF, 0xFF, 0xFF, 0xDF, 0xFD, 0xCB, 0x98, 0x76, 0x67, + 0x89, 0xBC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xBA, 0xA9, 0x88, 0x89, 0xBB, + 0xCF, 0xFF, 0xFF, 0xDF, 0xFF, 0xCC, 0xBB, 0xAA, 0xAA, 0xBC, 0xDF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFD, 0xCC, 0xCC, 0xBC, 0xCC, 0xCF, 0xFF, 0xFF, 0xFF, + 0xCF, 0xFD, 0xFF, 0xCC, 0xDD, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDD, 0xDF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7B, 0xCD, 0xDC, 0xCD, 0xDF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xDF, 0xFD, 0xCB, 0xBF, 0xBC, 0xDC, 0xBA, 0xCB, 0xCB, 0x7F, 0xDF, + 0xDD, 0xDF, 0xCC, 0xBC, 0xFC, 0xFC, 0xFF, 0xFF, 0xFC, 0xDD, 0xFF, 0xDD, + 0xDC, 0xFB, 0xDB, 0xCB, 0xCF, 0xDC, 0xFF, 0xBC, 0xFF, 0xFA, 0xFB, 0xFB, + 0xAB, 0xCC, 0xCC, 0xFF, 0xFF, 0xFF, 0xFD, 0xFC, 0xBB, 0xAA, 0xA9, 0x9A, + 0xBB, 0xCC, 0xCC, 0xFF, 0xCC, 0xFD, 0xCB, 0x9B, 0x89, 0x88, 0x99, 0xAB, + 0xAD, 0xCD, 0xFF, 0xFC, 0xBA, 0xAA, 0x97, 0x77, 0x78, 0x89, 0xAA, 0xBF, + 0xFF, 0xCB, 0xFC, 0xB9, 0x97, 0x76, 0x66, 0x77, 0x89, 0xAA, 0xFC, 0xFB, + 0xBC, 0xBB, 0xA9, 0x76, 0x54, 0x55, 0x67, 0x8A, 0xAC, 0xDC, 0xDD, 0xCC, + 0xB9, 0x97, 0x64, 0x23, 0x46, 0x78, 0x9C, 0xCB, 0xFC, 0xCF, 0xBB, 0xA8, + 0x76, 0x43, 0x24, 0x67, 0x99, 0xAC, 0xCF, 0xCF, 0xBC, 0xC9, 0x97, 0x65, + 0x44, 0x56, 0x78, 0x9A, 0xCD, 0xFF, 0xDC, 0xCA, 0xA9, 0x87, 0x66, 0x66, + 0x78, 0x9A, 0xBB, 0xFF, 0xFF, 0xFF, 0xCB, 0xA9, 0x87, 0x77, 0x77, 0x8A, + 0xBC, 0xBC, 0xFC, 0xFC, 0xCF, 0xCC, 0x99, 0x98, 0x88, 0x99, 0x9A, 0xCF, + 0xCF, 0xFF, 0xFF, 0xFC, 0xCB, 0xAA, 0x9A, 0xA9, 0xAA, 0xCF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xEC, 0xAA, 0xAB, 0xAC, 0xCC, 0xDF, 0xFF, 0xFC, 0xDF, + 0xCD, 0xCD, 0xBC, 0xCB, 0xCF, 0xFB, 0xDC, 0xFD, 0xFF, 0xDF, 0xFF, 0xDC, + 0xFD, 0xDC, 0xFC, 0xDF, 0xDD, 0xCF, 0xFF, 0xFA, 0xDC, 0xDF, 0xFD, 0xFD, + 0xCD, 0xDF, 0xDF, 0xDD, 0xDF, 0xFF, 0x6C, 0xBB, 0xCC, 0xCC, 0xDB, 0xFD, + 0xCF, 0xFF, 0xDD, 0xFF, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xCB, 0xAA, 0xAA, 0x99, 0x99, 0xA9, 0xAA, 0xAA, 0xAB, 0x8C, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, 0xAB, 0xCB, 0xCD, 0xDB, 0xBC, 0xCA, 0xBA, + 0x9A, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCE, 0xCB, 0xBB, 0xAA, 0x99, 0x98, + 0x88, 0x89, 0x9A, 0xAB, 0xBC, 0xCB, 0xBB, 0xA9, 0x98, 0x88, 0x88, 0x88, + 0x89, 0x99, 0xAB, 0xBC, 0xBA, 0xBA, 0x98, 0x87, 0x77, 0x77, 0x78, 0x89, + 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x87, 0x77, 0x66, 0x67, 0x77, 0x89, 0x9A, + 0xBC, 0xBA, 0xA9, 0x98, 0x76, 0x66, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xBB, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x56, 0x67, 0x78, 0x89, 0xAB, 0xBA, 0xA9, + 0x88, 0x76, 0x65, 0x44, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0x9A, 0x98, 0x87, + 0x66, 0x54, 0x45, 0x56, 0x78, 0x89, 0xAA, 0xB9, 0xA9, 0x88, 0x77, 0x65, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBB, 0x9A, 0xA9, 0x87, 0x76, 0x66, 0x56, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xBA, 0x99, 0x87, 0x76, 0x66, 0x66, 0x77, + 0x89, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x88, 0x77, 0x77, 0x77, 0x88, 0x9A, + 0xBC, 0xDA, 0xBB, 0xA9, 0x98, 0x88, 0x87, 0x88, 0x88, 0x9A, 0xAB, 0xCB, + 0xAC, 0xBA, 0xAA, 0x99, 0x98, 0x88, 0x89, 0x99, 0xAB, 0xCD, 0xCA, 0xCB, + 0xBA, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xAB, 0xCC, 0xDC, 0xBD, 0xCC, 0xBB, + 0xBA, 0xAA, 0xBA, 0xAA, 0xBB, 0xBE, 0xED, 0xCB, 0xCC, 0xDD, 0xCB, 0xBB, + 0xBB, 0xBB, 0xBB, 0xCD, 0xFE, 0xFE, 0x8C, 0xBB, 0xBB, 0xAA, 0xAB, 0xBB, + 0xBB, 0xCC, 0xCD, 0xDD, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBB, 0xAA, 0xA9, 0x99, 0x99, 0x99, 0xAA, 0xAB, 0xBC, 0xAC, 0xCC, + 0xBA, 0xAA, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xBC, 0xDC, 0xBC, 0xBA, 0xA9, + 0x99, 0x98, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xBB, 0xBA, 0xA9, 0x98, 0x88, + 0x88, 0x88, 0x89, 0x9A, 0xAB, 0xCB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, + 0x88, 0x89, 0x9A, 0xBB, 0xBA, 0xA9, 0x98, 0x77, 0x77, 0x77, 0x77, 0x78, + 0x89, 0x9A, 0xBA, 0xAA, 0x98, 0x87, 0x76, 0x66, 0x66, 0x77, 0x78, 0x89, + 0xAB, 0xA9, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0x9A, 0xAA, + 0x99, 0x98, 0x77, 0x66, 0x65, 0x66, 0x66, 0x77, 0x89, 0x9A, 0xA9, 0x99, + 0x87, 0x76, 0x65, 0x55, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x88, 0x77, + 0x66, 0x65, 0x55, 0x66, 0x77, 0x88, 0x9A, 0xA9, 0x99, 0x87, 0x76, 0x66, + 0x65, 0x66, 0x67, 0x78, 0x99, 0xAA, 0x99, 0x98, 0x87, 0x76, 0x66, 0x66, + 0x66, 0x77, 0x89, 0xAA, 0xA9, 0xA9, 0x88, 0x77, 0x76, 0x66, 0x66, 0x77, + 0x88, 0x9A, 0xBA, 0xAA, 0x99, 0x88, 0x77, 0x77, 0x77, 0x77, 0x88, 0x99, + 0xAB, 0xBA, 0xAA, 0x99, 0x88, 0x87, 0x77, 0x77, 0x88, 0x99, 0xAB, 0xBB, + 0xAB, 0xAA, 0x99, 0x88, 0x88, 0x88, 0x88, 0x99, 0xAA, 0xBC, 0xCB, 0xBB, + 0xAA, 0x99, 0x99, 0x98, 0x99, 0x99, 0xAA, 0xBC, 0xDC, 0xBC, 0xBB, 0xBA, + 0xAA, 0x99, 0x99, 0x9A, 0xAB, 0xBC, 0xCD, 0xDC, 0xDC, 0xCB, 0xBA, 0xAA, + 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xED, 0xAC, 0xBB, 0xBA, 0xAA, 0xAA, 0xAA, + 0xAA, 0xBB, 0xCC, 0xDE, 0xD0, 0x00, 0x00, 0x00, + }, + { + 0xBC, 0xBA, 0xBA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xBB, 0x8C, 0xCC, + 0xBB, 0xBA, 0xAA, 0xAA, 0xBB, 0xBB, 0xCD, 0xDC, 0xDB, 0xBC, 0xBC, 0xA9, + 0x99, 0x99, 0x99, 0x9A, 0xAA, 0xBB, 0xCC, 0xAB, 0xCA, 0xAA, 0x98, 0x88, + 0x88, 0x89, 0x99, 0xAA, 0xCC, 0xBA, 0xBB, 0xA9, 0x98, 0x88, 0x78, 0x88, + 0x88, 0x99, 0xAA, 0xBB, 0xAA, 0xAA, 0x98, 0x87, 0x77, 0x77, 0x77, 0x88, + 0x99, 0xAA, 0xBA, 0xBA, 0x98, 0x87, 0x76, 0x66, 0x67, 0x77, 0x88, 0x9A, + 0xBA, 0xAA, 0xA9, 0x88, 0x76, 0x66, 0x66, 0x66, 0x77, 0x88, 0xAA, 0xAA, + 0xAA, 0x98, 0x87, 0x66, 0x55, 0x56, 0x67, 0x78, 0x99, 0xAA, 0xAA, 0xA9, + 0x88, 0x76, 0x65, 0x44, 0x56, 0x67, 0x88, 0x9A, 0xAA, 0x9A, 0x98, 0x87, + 0x66, 0x54, 0x45, 0x66, 0x78, 0x89, 0xAB, 0xAA, 0xB9, 0x98, 0x76, 0x66, + 0x55, 0x56, 0x67, 0x88, 0x9A, 0xBA, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x66, + 0x66, 0x78, 0x99, 0xAB, 0xBA, 0xAA, 0x98, 0x87, 0x77, 0x66, 0x66, 0x77, + 0x89, 0x9A, 0xBB, 0xAB, 0xA9, 0x98, 0x87, 0x77, 0x77, 0x77, 0x89, 0x9A, + 0xBB, 0xAB, 0xDA, 0xA9, 0x98, 0x88, 0x77, 0x88, 0x88, 0x9A, 0xAC, 0xBB, + 0xBC, 0xAB, 0xA9, 0x99, 0x98, 0x88, 0x89, 0x9A, 0xAA, 0xBD, 0xCB, 0xBB, + 0xBB, 0xA9, 0xA9, 0x99, 0x99, 0xAA, 0xAC, 0xBC, 0xCC, 0xBC, 0xCC, 0xBA, + 0xAA, 0xAA, 0xAA, 0xAA, 0xAB, 0xBC, 0xCD, 0xCB, 0xCD, 0xBB, 0xCB, 0xBA, + 0xBB, 0xBB, 0xAC, 0xBB, 0xDD, 0xDD, 0x7A, 0xAA, 0xAA, 0xBA, 0xAA, 0xAA, + 0xAB, 0xBB, 0xBB, 0xCD, 0xB0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xBF, 0xDF, 0xBB, 0xAB, 0xBF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xCC, 0xFD, 0xFF, 0xDF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, + 0xBB, 0xDF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xBF, + 0xCF, 0xBF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFD, 0xFF, 0xBB, 0xBA, 0xAB, 0xFC, + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, 0xCA, 0x99, 0x99, 0xAC, 0xDF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xCD, 0xBA, 0x87, 0x77, 0x89, 0x9B, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xCB, 0x97, 0x54, 0x46, 0x8A, 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, + 0xCD, 0xA9, 0x64, 0x12, 0x57, 0x9B, 0xBF, 0xDF, 0xFF, 0xFF, 0xFF, 0xBA, + 0x97, 0x52, 0x24, 0x79, 0xAB, 0xCF, 0xFF, 0xFF, 0xFF, 0xFC, 0xA9, 0x86, + 0x54, 0x57, 0x9B, 0xFD, 0xFF, 0xFD, 0xFF, 0xFC, 0xCC, 0xA9, 0x87, 0x77, + 0x8A, 0xAC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0x99, 0x99, 0x9A, 0xAF, + 0xCF, 0xFF, 0xFF, 0xDF, 0xFF, 0xBF, 0xAC, 0xBA, 0xAA, 0xCC, 0xBF, 0xFF, + 0xFF, 0xFD, 0xFF, 0xFF, 0xCB, 0xBC, 0xBB, 0xDF, 0xDD, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xDF, 0xFC, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xFD, 0xDF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFD, + 0xDF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6B, 0xCF, 0xDF, 0xDF, 0xFF, 0xCF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xAF, 0xFF, 0xBF, 0xAB, 0xFB, 0x9F, 0xBB, 0xAB, 0x6B, 0xFF, + 0xFB, 0xFF, 0xAF, 0xAA, 0xFB, 0xFA, 0xBB, 0xFF, 0xFF, 0xFF, 0xFB, 0xBF, + 0xB9, 0xFB, 0xBA, 0xBB, 0xBF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFA, 0xFB, 0xBB, + 0xAA, 0xFF, 0xFA, 0xBF, 0xBF, 0xFF, 0xBF, 0xFA, 0xAF, 0xBB, 0x99, 0x9A, + 0xA9, 0xBF, 0xFB, 0xFB, 0xAB, 0xFB, 0xBA, 0xA9, 0x98, 0x9A, 0x99, 0xAA, + 0xFB, 0xBB, 0xFF, 0xAF, 0xFA, 0xAA, 0x98, 0x78, 0x78, 0x89, 0xAF, 0xBF, + 0xAF, 0xFB, 0xBF, 0xBA, 0x99, 0x76, 0x66, 0x88, 0x99, 0xBF, 0xFF, 0xBF, + 0xFF, 0xFA, 0x98, 0x77, 0x54, 0x56, 0x79, 0x9B, 0xBF, 0xBB, 0xBB, 0xAF, + 0xAB, 0xA8, 0x64, 0x22, 0x57, 0x88, 0x9A, 0xFF, 0xAB, 0xAF, 0x99, 0xB8, + 0x77, 0x52, 0x25, 0x79, 0xA9, 0xAA, 0xFF, 0xFA, 0xBB, 0xBA, 0x98, 0x76, + 0x54, 0x66, 0x78, 0x99, 0xBF, 0xFB, 0x9F, 0xFA, 0x9A, 0x98, 0x76, 0x66, + 0x78, 0x8A, 0xFA, 0xAB, 0xAF, 0xFB, 0xBA, 0xB8, 0x98, 0x88, 0x78, 0x9A, + 0xAB, 0xFF, 0xFB, 0xAF, 0xBF, 0xBA, 0xAA, 0x99, 0xA9, 0x9F, 0x8A, 0xFA, + 0xFF, 0xAA, 0xFF, 0xBB, 0xAF, 0xA9, 0xA8, 0x89, 0xAB, 0xFA, 0xBB, 0xFF, + 0xFB, 0xFF, 0xFF, 0xFB, 0xA9, 0xAB, 0xAF, 0xBF, 0xBB, 0xBB, 0xBB, 0xFF, + 0xBF, 0xFB, 0xFF, 0xFA, 0xBF, 0xAF, 0xAF, 0xFB, 0xFF, 0xAF, 0xBF, 0xFF, + 0xFF, 0xBB, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFB, 0xFF, 0xFB, 0xFF, 0xFF, 0xFB, 0x6F, 0xAA, 0xAB, 0xAB, 0xBA, 0xFA, + 0xFA, 0xBB, 0xFF, 0xFB, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xDE, 0xFF, 0xFF, 0xFF, 0xDC, 0xCC, 0xCF, 0xCD, 0xCF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xDC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xCD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xDC, + 0xFC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0xCC, 0xDC, 0xDD, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xEB, 0xBA, 0xBB, 0xBC, 0xDD, 0xFD, + 0xDF, 0xFC, 0xFF, 0xDD, 0xCB, 0x98, 0x78, 0x9A, 0xCC, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xFD, 0xB8, 0x54, 0x46, 0x9B, 0xCD, 0xDF, 0xFF, 0xFF, 0xFF, + 0xCD, 0xDA, 0x74, 0x22, 0x48, 0xAC, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, + 0xA7, 0x42, 0x14, 0x7A, 0xDF, 0xFF, 0xFF, 0xDD, 0xFF, 0xFD, 0xDA, 0x96, + 0x44, 0x58, 0xBC, 0xFD, 0xFF, 0xFF, 0xFF, 0xDF, 0xFC, 0xDA, 0x97, 0x78, + 0xAC, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xCA, 0xAA, 0xAB, 0xCF, + 0xFF, 0xFD, 0xFF, 0xDF, 0xFF, 0xFD, 0xFC, 0xDC, 0xBC, 0xCD, 0xDF, 0xDF, + 0xFF, 0xFC, 0xFF, 0xFD, 0xFF, 0xDF, 0xCC, 0xFD, 0xFD, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xDF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDD, 0xFF, 0xFF, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6B, 0xDD, 0xCD, 0xDD, 0xFF, 0xDF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xDD, 0xDD, 0xCD, 0xDD, 0xDE, 0xDF, 0xFF, 0xCF, 0xFF, + 0xFF, 0xDC, 0xCC, 0xCB, 0xCC, 0xBD, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xDC, + 0xBB, 0xBA, 0xAA, 0xBB, 0xCC, 0xDF, 0xEF, 0xFF, 0xFD, 0xCC, 0xBA, 0x99, + 0x99, 0x99, 0xAA, 0xBC, 0xDF, 0xFF, 0xFE, 0xDC, 0xAA, 0x98, 0x88, 0x88, + 0x89, 0xAB, 0xBC, 0xDE, 0xFF, 0xDC, 0xB9, 0x98, 0x77, 0x77, 0x77, 0x89, + 0xAA, 0xCC, 0xFF, 0xFC, 0xCA, 0x98, 0x76, 0x66, 0x66, 0x77, 0x89, 0xAB, + 0xCD, 0xFE, 0xCB, 0xA8, 0x76, 0x65, 0x55, 0x56, 0x77, 0x99, 0xBC, 0xDE, + 0xDC, 0xB9, 0x87, 0x65, 0x55, 0x55, 0x66, 0x78, 0x9A, 0xCD, 0xDC, 0xCA, + 0x98, 0x76, 0x55, 0x44, 0x55, 0x67, 0x89, 0xAB, 0xDD, 0xCC, 0xA9, 0x87, + 0x65, 0x54, 0x45, 0x56, 0x78, 0x9A, 0xCD, 0xEC, 0xCA, 0x98, 0x76, 0x55, + 0x55, 0x55, 0x67, 0x89, 0xAB, 0xDF, 0xCC, 0xB9, 0x87, 0x76, 0x55, 0x55, + 0x66, 0x78, 0xAB, 0xCF, 0xFD, 0xCB, 0xA9, 0x87, 0x76, 0x66, 0x66, 0x78, + 0x9A, 0xBC, 0xFF, 0xDD, 0xCA, 0xA9, 0x87, 0x77, 0x77, 0x78, 0x9A, 0xBC, + 0xDF, 0xFD, 0xDC, 0xBA, 0xA9, 0x88, 0x88, 0x88, 0x9A, 0xAC, 0xDF, 0xFF, + 0xFF, 0xDC, 0xBA, 0xA9, 0x99, 0x99, 0xAA, 0xBB, 0xDF, 0xFF, 0xFF, 0xFF, + 0xDD, 0xCB, 0xBA, 0xAA, 0xAB, 0xBC, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDC, + 0xDC, 0xCC, 0xCC, 0xCD, 0xDE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEE, 0xDD, + 0xDD, 0xDE, 0xEF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFE, 0xFE, 0xDD, 0xEF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xCF, 0xFE, 0xFD, 0xDC, 0xCF, 0xFD, 0xED, 0xCC, 0xBC, 0xEC, 0x7F, 0xEF, + 0xFF, 0xEF, 0xEF, 0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xDF, 0xDD, 0xFF, + 0xDD, 0xFD, 0xEF, 0xEF, 0xEE, 0xEF, 0xFF, 0xCF, 0xEF, 0xFF, 0xDF, 0xEF, + 0xDF, 0xDE, 0xEF, 0xEF, 0xFF, 0xFD, 0xEE, 0xFD, 0xFD, 0xDD, 0xDD, 0xCC, + 0xDD, 0xEE, 0xFE, 0xFD, 0xED, 0xFF, 0xEE, 0xDC, 0xCC, 0xBC, 0xBC, 0xCE, + 0xED, 0xFF, 0xFE, 0xEF, 0xCD, 0xFF, 0xBB, 0xAA, 0xAA, 0xBC, 0xDD, 0xEE, + 0xFF, 0xFF, 0xFF, 0xFC, 0xCB, 0x98, 0x77, 0x89, 0xBC, 0xDE, 0xFF, 0xFD, + 0xDE, 0xDF, 0xDC, 0xA8, 0x54, 0x46, 0x8A, 0xCF, 0xEF, 0xEF, 0xDC, 0xFF, + 0xDC, 0xCA, 0x74, 0x12, 0x47, 0xAC, 0xED, 0xEE, 0xFE, 0xEE, 0xEF, 0xFB, + 0xA7, 0x42, 0x24, 0x7A, 0xBD, 0xEE, 0xEF, 0xDE, 0xED, 0xDE, 0xCA, 0x86, + 0x44, 0x68, 0xAD, 0xDD, 0xEE, 0xFD, 0xDE, 0xEE, 0xFC, 0xB9, 0x87, 0x78, + 0xAB, 0xCF, 0xDD, 0xFF, 0xFD, 0xFF, 0xFC, 0xCC, 0xBA, 0x9A, 0xAB, 0xBE, + 0xEF, 0xEF, 0xFD, 0xDF, 0xFF, 0xFD, 0xCC, 0xCC, 0xCC, 0xDC, 0xCD, 0xFF, + 0xFF, 0xEF, 0xFF, 0xFE, 0xDE, 0xDD, 0xCC, 0xFD, 0xEF, 0xDF, 0xFF, 0xFE, + 0xFF, 0xFF, 0xED, 0xDD, 0xDD, 0xEF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDE, 0xFF, + 0xFE, 0xFF, 0xED, 0xFE, 0xFE, 0xFF, 0xEF, 0xFF, 0xFF, 0xCE, 0xEF, 0xFF, + 0xFF, 0xFD, 0xDE, 0xFF, 0xEF, 0xFF, 0xFF, 0xFD, 0xFF, 0xEF, 0xFE, 0xEE, + 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0xDD, 0xCC, 0xCC, 0xCE, 0xCE, + 0xCE, 0xED, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0x8F, 0xF8, 0xF8, 0xF9, 0xF8, 0x5F, 0xFF, + 0xF9, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, + 0xF8, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, + 0x88, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFE, 0x8F, 0x8F, + 0x8F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x88, 0x78, 0xFF, 0xFF, + 0xF8, 0x8F, 0xFF, 0xFF, 0xFF, 0xF9, 0x8F, 0xF8, 0xF9, 0xF9, 0x8F, 0xFF, + 0x8F, 0x8F, 0xF8, 0x89, 0x8F, 0x68, 0x68, 0x88, 0x88, 0xF8, 0xFF, 0xFF, + 0xFF, 0xF8, 0x88, 0x78, 0x64, 0x56, 0xFF, 0x8F, 0xF8, 0xFF, 0xFF, 0xF8, + 0xFF, 0x88, 0x64, 0x22, 0x48, 0x88, 0x8F, 0xFF, 0xFF, 0xE9, 0x8F, 0xFF, + 0xF7, 0x52, 0x25, 0x78, 0x8F, 0xF8, 0xFF, 0xFF, 0x9F, 0xFF, 0xF8, 0x87, + 0x44, 0x58, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x8F, 0xF7, 0x76, + 0x88, 0xF9, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0x79, 0x88, 0xF9, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF8, 0xFF, 0xFF, 0x98, 0xFF, 0xFF, 0x8F, 0xF9, 0xFF, 0x8F, 0xFF, 0xFF, + 0x8F, 0xFF, 0xFF, 0xF8, 0xFF, 0x98, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0x8F, 0xFF, 0xFF, + 0xFF, 0x8F, 0xFF, 0x8F, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0x99, 0xFF, 0xCF, 0xF8, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x7F, 0x87, 0x87, 0x66, 0x68, 0x87, 0x77, 0x77, 0x68, 0xFF, 0x57, 0xFF, + 0x88, 0xFF, 0x88, 0x88, 0x8F, 0x88, 0xFF, 0xFF, 0xF8, 0x6F, 0xF7, 0x78, + 0xF8, 0x8F, 0x87, 0x78, 0x87, 0xFF, 0xF7, 0x87, 0xF7, 0xF8, 0x7F, 0xF8, + 0x88, 0x88, 0x87, 0x88, 0x8F, 0x87, 0xF8, 0x88, 0xF7, 0xF7, 0xFF, 0x8F, + 0x88, 0x7F, 0x8F, 0xF8, 0xF7, 0x8F, 0x8F, 0xF7, 0x77, 0xF7, 0x68, 0x8F, + 0x8F, 0xFF, 0xF7, 0x69, 0x8F, 0x88, 0x76, 0x78, 0x6F, 0x77, 0x6F, 0xFF, + 0x7F, 0x88, 0xF8, 0x8F, 0xF7, 0x87, 0x88, 0xF7, 0x7F, 0xF8, 0x8F, 0x77, + 0x68, 0x87, 0xF7, 0x86, 0x87, 0x67, 0x67, 0x7F, 0x78, 0xF8, 0x77, 0x77, + 0x88, 0x67, 0xF7, 0x76, 0x88, 0x78, 0x77, 0xFF, 0x8F, 0x7F, 0x88, 0x87, + 0x67, 0x67, 0x77, 0x77, 0x78, 0x8F, 0x7F, 0x77, 0x7F, 0x87, 0x76, 0x68, + 0x87, 0x77, 0x67, 0x7F, 0x7E, 0xE8, 0xCB, 0x88, 0x7F, 0xF7, 0x77, 0x87, + 0x6F, 0x8F, 0x87, 0x7F, 0x68, 0x88, 0xF7, 0x88, 0xF7, 0xF6, 0x87, 0xF8, + 0x87, 0xFF, 0xF7, 0x88, 0xF8, 0x8F, 0x8F, 0xF7, 0x88, 0x7F, 0xFF, 0x8F, + 0xFF, 0x77, 0xF8, 0x88, 0x78, 0x8F, 0xF7, 0x78, 0x77, 0x88, 0x8F, 0xF7, + 0x8F, 0xF8, 0xFF, 0xF8, 0x8F, 0x88, 0x78, 0x77, 0x7F, 0xF8, 0x78, 0xF8, + 0x88, 0x88, 0x7F, 0x8F, 0x7F, 0x8F, 0xA7, 0x78, 0x7F, 0xFF, 0xFF, 0x87, + 0x8F, 0x78, 0x87, 0x8F, 0x8F, 0x87, 0x8F, 0x77, 0xF8, 0xF7, 0x88, 0x8F, + 0x8F, 0xFF, 0xF8, 0x87, 0x7F, 0xF8, 0x8F, 0x87, 0x8F, 0x87, 0x78, 0x7F, + 0xF7, 0x77, 0x78, 0xF8, 0x70, 0x00, 0x00, 0x00, + }, + { + 0x57, 0x78, 0x66, 0x77, 0x66, 0x76, 0x77, 0x76, 0x87, 0x79, 0x68, 0xAD, + 0x98, 0x89, 0x98, 0xDA, 0xB9, 0x99, 0x99, 0x9D, 0x98, 0x79, 0xAA, 0x89, + 0x98, 0x88, 0x88, 0x98, 0xAA, 0x88, 0x9A, 0x87, 0x89, 0xA9, 0x99, 0x89, + 0x98, 0x98, 0x99, 0x89, 0xA9, 0x99, 0x7A, 0x88, 0x79, 0x98, 0x88, 0x87, + 0x87, 0x98, 0x88, 0x9A, 0x76, 0x98, 0x77, 0x88, 0x87, 0x97, 0x88, 0x98, + 0x98, 0x99, 0x88, 0x79, 0x89, 0x99, 0x78, 0x87, 0x88, 0x88, 0x89, 0xA9, + 0x98, 0x87, 0x99, 0x87, 0x78, 0x78, 0x87, 0x87, 0x87, 0x97, 0x99, 0x97, + 0x79, 0x98, 0x98, 0x78, 0x87, 0x98, 0x87, 0x78, 0x88, 0x9A, 0x76, 0x99, + 0x77, 0x78, 0x78, 0x77, 0x87, 0x78, 0x88, 0x99, 0xA7, 0x79, 0x88, 0x89, + 0x87, 0x77, 0x87, 0x88, 0x78, 0x88, 0x89, 0x77, 0x88, 0x97, 0x88, 0x87, + 0x87, 0x67, 0x88, 0x89, 0x89, 0x88, 0x79, 0x89, 0x88, 0x78, 0x87, 0x77, + 0x77, 0x78, 0x89, 0x8A, 0x76, 0x89, 0x97, 0x77, 0x97, 0x87, 0x77, 0x99, + 0x89, 0x99, 0x96, 0x6A, 0xA8, 0x88, 0x88, 0x88, 0x89, 0x87, 0x88, 0x88, + 0x99, 0x87, 0x9A, 0xA8, 0x88, 0x98, 0x78, 0x88, 0x88, 0x88, 0x99, 0x98, + 0x79, 0x99, 0x88, 0x88, 0x98, 0x88, 0x87, 0x88, 0x88, 0xA9, 0x78, 0xAA, + 0x98, 0x98, 0xA8, 0x88, 0x88, 0x88, 0x88, 0x88, 0xA7, 0x8A, 0x98, 0x89, + 0x8A, 0x88, 0x88, 0x9A, 0x89, 0x89, 0x99, 0x78, 0xA9, 0x99, 0xD8, 0x89, + 0x98, 0x8A, 0x89, 0x98, 0xAA, 0x87, 0x69, 0x88, 0x87, 0x87, 0x78, 0x77, + 0x67, 0x87, 0x77, 0x79, 0x50, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAB, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x68, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF5, 0x12, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x61, 0x15, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, + 0x65, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBB, 0xAF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xBB, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFB, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0x99, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x97, 0x66, 0x88, 0xBF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFB, 0xB7, 0x53, 0x45, 0x7A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF9, 0x63, 0x22, 0x46, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x96, 0x42, 0x24, 0x79, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBA, 0x85, + 0x44, 0x57, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x86, 0x67, + 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF9, 0x99, 0xBF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xBB, 0xBF, 0xFD, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0xFF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF6, 0x12, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF3, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, + 0xBC, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xE5, 0xEF, 0xFF, 0xFF, 0x3F, 0xFF, + 0xEE, 0xEE, 0xE5, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0x5E, + 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xF4, 0x5F, 0x5F, 0xFF, 0xF5, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x54, 0x55, 0x5F, 0x5F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x5F, 0x4F, 0xFF, 0x54, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xEE, 0x4E, 0xE5, 0xE6, 0xEE, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xE5, + 0xE5, 0xE5, 0xEE, 0x5E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, + 0xEE, 0x44, 0xEE, 0xEE, 0xEE, 0xEE, 0x5E, 0xEF, 0xFF, 0xF5, 0x45, 0x3F, + 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0x4F, 0x4F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0x5F, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0x5F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFF, + 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, + 0xFF, 0xFE, 0xFF, 0xFE, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xAF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFA, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, + 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0x99, 0x9B, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xA7, 0x67, 0x7F, 0xAB, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xA7, 0x54, 0x45, 0x79, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x64, 0x22, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xA6, 0x42, 0x23, 0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x75, + 0x43, 0x57, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x77, 0x67, + 0x9A, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xF9, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xBA, 0xAA, 0xAF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x99, 0xAA, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFC, 0x65, 0x56, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, + 0xFF, 0xFF, 0x94, 0x12, 0x59, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0x52, 0x14, 0x9D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x97, + 0x54, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xAA, + 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0xFA, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x9F, 0xFF, 0xBF, 0xFB, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFE, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xAA, 0xAF, 0xFF, 0xA9, 0xAA, 0xFF, 0x5F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xAF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, + 0xAF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFA, 0xFF, 0xAF, 0xFF, 0xAF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xA8, 0xA7, 0x67, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xD7, 0x53, 0x45, 0x7A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFA, 0x64, 0x22, 0x47, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xF9, + 0x97, 0x42, 0x24, 0x68, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFA, 0x76, + 0x44, 0x58, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x76, 0x67, + 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xA9, 0xAF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xAF, 0xFF, 0xFA, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFA, 0xFA, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0xA9, 0xAF, 0xFF, 0xFA, 0x9F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x5F, 0xEF, 0x56, 0x6F, 0xF6, 0x66, 0xEE, 0xEF, 0x6F, 0xFF, 0x56, 0xE6, + 0xE6, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, 0xE6, 0xEE, + 0xEE, 0xEE, 0xE6, 0xEE, 0xEE, 0xEE, 0xEE, 0xEF, 0xFF, 0xFF, 0x6F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xEE, 0xEE, 0xE6, 0xEE, 0xEE, 0x6E, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x6E, 0x4E, 0x6E, 0xEE, 0xEE, 0xEE, + 0xE6, 0xEE, 0xEE, 0xEF, 0xF6, 0xF5, 0x6F, 0x56, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF5, 0xFF, 0xFF, 0xFF, 0xF4, 0x6F, 0x6F, 0xFF, 0xFF, 0xFF, 0xFE, + 0xEE, 0xE5, 0xE6, 0x66, 0x65, 0x6E, 0xE5, 0xEE, 0xE6, 0xEE, 0xEE, 0xEE, + 0xEE, 0xE5, 0x56, 0x45, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xE6, 0xE6, 0x65, 0x65, 0xEE, 0xEE, 0xEE, 0xE6, 0xEE, 0xEE, 0xE6, 0x66, + 0x6E, 0x6E, 0xEE, 0xEE, 0xE6, 0xEE, 0x6E, 0xEF, 0xF6, 0xF6, 0xFF, 0x56, + 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0x6F, + 0x66, 0xF5, 0xF6, 0xFF, 0xF6, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF6, 0xF5, 0xF6, 0xFF, 0x6F, 0xFE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xE6, 0xEE, 0xEE, 0xFE, 0x6E, 0xFE, + 0xFF, 0xFE, 0xFF, 0x6E, 0xF6, 0xFE, 0xFF, 0x66, 0xFF, 0xFE, 0xFF, 0xFE, + 0xEF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x5F, 0xFF, 0xFE, 0xFF, 0xFF, 0x5F, 0xFF, 0x65, 0x6F, 0xF6, 0xFE, + 0x66, 0xFE, 0x66, 0x5E, 0x50, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xA8, 0xFF, 0xFF, 0xF7, 0xFF, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x8F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x76, 0x77, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0x86, 0x54, 0x45, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF9, 0x64, 0x22, 0x48, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF6, 0x42, 0x24, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xF5, + 0x44, 0x5B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF6, + 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x7F, 0x8F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0xED, 0xD5, 0xEE, 0xEE, 0x3E, 0xEE, + 0xEE, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xE4, 0x21, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xDD, + 0xDD, 0xD1, 0x1D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xED, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x75, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF4, 0x12, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x42, 0x14, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x54, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFC, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x77, 0x67, 0xAF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xF6, 0x44, 0x45, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF6, 0x54, 0x22, 0x46, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF5, 0x42, 0x34, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x75, + 0x43, 0x4F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x56, + 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, + }, + { + 0xEE, 0xEE, 0xEE, 0xDE, 0xEE, 0xEE, 0xED, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0x53, 0x4E, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xE5, 0x12, 0xEE, 0xEE, 0xEE, 0xEE, 0xED, 0xDD, 0xDD, 0xDD, + 0xDD, 0xD2, 0x24, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, + 0xD3, 0x3D, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0xEE, 0x3E, 0xE5, 0xEE, 0xEE, 0xEE, 0xEE, + 0xEE, 0xEE, 0xEE, 0xED, 0xE0, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + { + 0x88, 0x88, 0x88, 0x78, 0x88, 0x88, 0x87, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x87, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, + 0x88, 0x88, 0x88, 0x88, 0x80, 0x00, 0x00, 0x00, + }, + }, +}; + +#endif /* AVCODEC_RALFDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rangecoder.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rangecoder.h new file mode 100644 index 00000000..4d4ca4d5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rangecoder.h @@ -0,0 +1,154 @@ +/* + * Range coder + * Copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Range coder. + */ + +#ifndef AVCODEC_RANGECODER_H +#define AVCODEC_RANGECODER_H + +#include + +#include "libavutil/common.h" +#include "libavutil/avassert.h" + +typedef struct RangeCoder { + int low; + int range; + int outstanding_count; + int outstanding_byte; + uint8_t zero_state[256]; + uint8_t one_state[256]; + uint8_t *bytestream_start; + uint8_t *bytestream; + uint8_t *bytestream_end; + int overread; +#define MAX_OVERREAD 2 +} RangeCoder; + +void ff_init_range_encoder(RangeCoder *c, uint8_t *buf, int buf_size); +void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf, int buf_size); + +/** + * Terminates the range coder + * @param version version 0 requires the decoder to know the data size in bytes + * version 1 needs about 1 bit more space but does not need to + * carry the size from encoder to decoder + */ +int ff_rac_terminate(RangeCoder *c, int version); + +/** + * Check if at the current position there is a valid looking termination + * @param version version 0 requires the decoder to know the data size in bytes + * version 1 needs about 1 bit more space but does not need to + * carry the size from encoder to decoder + * @returns negative AVERROR code on error or non negative. + */ +int ff_rac_check_termination(RangeCoder *c, int version); + +void ff_build_rac_states(RangeCoder *c, int factor, int max_p); + +static inline void renorm_encoder(RangeCoder *c) +{ + // FIXME: optimize + while (c->range < 0x100) { + if (c->outstanding_byte < 0) { + c->outstanding_byte = c->low >> 8; + } else if (c->low <= 0xFF00) { + *c->bytestream++ = c->outstanding_byte; + for (; c->outstanding_count; c->outstanding_count--) + *c->bytestream++ = 0xFF; + c->outstanding_byte = c->low >> 8; + } else if (c->low >= 0x10000) { + *c->bytestream++ = c->outstanding_byte + 1; + for (; c->outstanding_count; c->outstanding_count--) + *c->bytestream++ = 0x00; + c->outstanding_byte = (c->low >> 8) & 0xFF; + } else { + c->outstanding_count++; + } + + c->low = (c->low & 0xFF) << 8; + c->range <<= 8; + } +} + +static inline int get_rac_count(RangeCoder *c) +{ + int x = c->bytestream - c->bytestream_start + c->outstanding_count; + if (c->outstanding_byte >= 0) + x++; + return 8 * x - av_log2(c->range); +} + +static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit) +{ + int range1 = (c->range * (*state)) >> 8; + + av_assert2(*state); + av_assert2(range1 < c->range); + av_assert2(range1 > 0); + if (!bit) { + c->range -= range1; + *state = c->zero_state[*state]; + } else { + c->low += c->range - range1; + c->range = range1; + *state = c->one_state[*state]; + } + + renorm_encoder(c); +} + +static inline void refill(RangeCoder *c) +{ + if (c->range < 0x100) { + c->range <<= 8; + c->low <<= 8; + if (c->bytestream < c->bytestream_end) { + c->low += c->bytestream[0]; + c->bytestream++; + } else + c->overread ++; + } +} + +static inline int get_rac(RangeCoder *c, uint8_t *const state) +{ + int range1 = (c->range * (*state)) >> 8; + + c->range -= range1; + if (c->low < c->range) { + *state = c->zero_state[*state]; + refill(c); + return 0; + } else { + c->low -= c->range; + *state = c->one_state[*state]; + c->range = range1; + refill(c); + return 1; + } +} + +#endif /* AVCODEC_RANGECODER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ratecontrol.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ratecontrol.h new file mode 100644 index 00000000..2a7aaec6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ratecontrol.h @@ -0,0 +1,99 @@ +/* + * Ratecontrol + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RATECONTROL_H +#define AVCODEC_RATECONTROL_H + +/** + * @file + * ratecontrol header. + */ + +#include +#include +#include "libavutil/eval.h" + +typedef struct Predictor{ + double coeff; + double count; + double decay; +} Predictor; + +typedef struct RateControlEntry{ + int pict_type; + float qscale; + int mv_bits; + int i_tex_bits; + int p_tex_bits; + int misc_bits; + int header_bits; + uint64_t expected_bits; + int new_pict_type; + float new_qscale; + int64_t mc_mb_var_sum; + int64_t mb_var_sum; + int i_count; + int skip_count; + int f_code; + int b_code; +}RateControlEntry; + +/** + * rate control context. + */ +typedef struct RateControlContext{ + int num_entries; ///< number of RateControlEntries + RateControlEntry *entry; + double buffer_index; ///< amount of bits in the video/audio buffer + Predictor pred[5]; + double short_term_qsum; ///< sum of recent qscales + double short_term_qcount; ///< count of recent qscales + double pass1_rc_eq_output_sum;///< sum of the output of the rc equation, this is used for normalization + double pass1_wanted_bits; ///< bits which should have been output by the pass1 code (including complexity init) + double last_qscale; + double last_qscale_for[5]; ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff + int64_t last_mc_mb_var_sum; + int64_t last_mb_var_sum; + uint64_t i_cplx_sum[5]; + uint64_t p_cplx_sum[5]; + uint64_t mv_bits_sum[5]; + uint64_t qscale_sum[5]; + int frame_count[5]; + int last_non_b_pict_type; + + void *non_lavc_opaque; ///< context for non lavc rc code (for example xvid) + float dry_run_qscale; ///< for xvid rc + int last_picture_number; ///< for xvid rc + AVExpr * rc_eq_eval; +}RateControlContext; + +struct MpegEncContext; + +/* rate control */ +int ff_rate_control_init(struct MpegEncContext *s); +float ff_rate_estimate_qscale(struct MpegEncContext *s, int dry_run); +void ff_write_pass1_stats(struct MpegEncContext *s); +void ff_rate_control_uninit(struct MpegEncContext *s); +int ff_vbv_update(struct MpegEncContext *s, int frame_size); +void ff_get_2pass_fcode(struct MpegEncContext *s); + +#endif /* AVCODEC_RATECONTROL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/raw.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/raw.h new file mode 100644 index 00000000..28a27b1f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/raw.h @@ -0,0 +1,48 @@ +/* + * Raw Video Codec + * Copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Raw Video Codec + */ + +#ifndef AVCODEC_RAW_H +#define AVCODEC_RAW_H + +#include "avcodec.h" +#include "internal.h" +#include "libavutil/internal.h" + +typedef struct PixelFormatTag { + enum AVPixelFormat pix_fmt; + unsigned int fourcc; +} PixelFormatTag; + +extern const PixelFormatTag ff_raw_pix_fmt_tags[]; // exposed through avpriv_get_raw_pix_fmt_tags() + +const struct PixelFormatTag *avpriv_get_raw_pix_fmt_tags(void); + +enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc); + +extern av_export_avcodec const PixelFormatTag avpriv_pix_fmt_bps_avi[]; +extern av_export_avcodec const PixelFormatTag avpriv_pix_fmt_bps_mov[]; + +#endif /* AVCODEC_RAW_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rdft.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rdft.h new file mode 100644 index 00000000..ffafca7f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rdft.h @@ -0,0 +1,52 @@ +/* + * (I)RDFT transforms + * Copyright (c) 2009 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#if !defined(AVCODEC_RDFT_H) && (!defined(FFT_FLOAT) || FFT_FLOAT) +#define AVCODEC_RDFT_H + +#include "config.h" +#include "fft.h" + +struct RDFTContext { + int nbits; + int inverse; + int sign_convention; + + /* pre/post rotation tables */ + const FFTSample *tcos; + const FFTSample *tsin; + int negative_sin; + FFTContext fft; + void (*rdft_calc)(struct RDFTContext *s, FFTSample *z); +}; + +/** + * Set up a real FFT. + * @param nbits log2 of the length of the input array + * @param trans the type of transform + */ +int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans); +void ff_rdft_end(RDFTContext *s); + +void ff_rdft_init_arm(RDFTContext *s); + + +#endif /* AVCODEC_RDFT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rectangle.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rectangle.h new file mode 100644 index 00000000..df7c18a4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rectangle.h @@ -0,0 +1,124 @@ +/* + * rectangle filling function + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * useful rectangle filling function + * @author Michael Niedermayer + */ + +#ifndef AVCODEC_RECTANGLE_H +#define AVCODEC_RECTANGLE_H + +#include "config.h" +#include "libavutil/common.h" +#include "libavutil/avassert.h" + +/** + * fill a rectangle. + * @param h height of the rectangle, should be a constant + * @param w width of the rectangle, should be a constant + * @param size the size of val (1, 2 or 4), should be a constant + */ +static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride, uint32_t val, int size){ + uint8_t *p= (uint8_t*)vp; + av_assert2(size==1 || size==2 || size==4); + av_assert2(w<=4); + + w *= size; + stride *= size; + + av_assert2((((long)vp)&(FFMIN(w, 8<<(HAVE_NEON|ARCH_PPC|HAVE_MMX))-1)) == 0); + av_assert2((stride&(w-1))==0); + if(w==2){ + const uint16_t v= size==4 ? val : val*0x0101; + *(uint16_t*)(p + 0*stride)= v; + if(h==1) return; + *(uint16_t*)(p + 1*stride)= v; + if(h==2) return; + *(uint16_t*)(p + 2*stride)= v; + *(uint16_t*)(p + 3*stride)= v; + }else if(w==4){ + const uint32_t v= size==4 ? val : size==2 ? val*0x00010001 : val*0x01010101; + *(uint32_t*)(p + 0*stride)= v; + if(h==1) return; + *(uint32_t*)(p + 1*stride)= v; + if(h==2) return; + *(uint32_t*)(p + 2*stride)= v; + *(uint32_t*)(p + 3*stride)= v; + }else if(w==8){ + // gcc cannot optimize 64-bit math on x86_32 +#if HAVE_FAST_64BIT + const uint64_t v= size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL; + *(uint64_t*)(p + 0*stride)= v; + if(h==1) return; + *(uint64_t*)(p + 1*stride)= v; + if(h==2) return; + *(uint64_t*)(p + 2*stride)= v; + *(uint64_t*)(p + 3*stride)= v; + }else if(w==16){ + const uint64_t v= val*0x0100000001ULL; + *(uint64_t*)(p + 0+0*stride)= v; + *(uint64_t*)(p + 8+0*stride)= v; + *(uint64_t*)(p + 0+1*stride)= v; + *(uint64_t*)(p + 8+1*stride)= v; + if(h==2) return; + *(uint64_t*)(p + 0+2*stride)= v; + *(uint64_t*)(p + 8+2*stride)= v; + *(uint64_t*)(p + 0+3*stride)= v; + *(uint64_t*)(p + 8+3*stride)= v; +#else + const uint32_t v= size==2 ? val*0x00010001 : val; + *(uint32_t*)(p + 0+0*stride)= v; + *(uint32_t*)(p + 4+0*stride)= v; + if(h==1) return; + *(uint32_t*)(p + 0+1*stride)= v; + *(uint32_t*)(p + 4+1*stride)= v; + if(h==2) return; + *(uint32_t*)(p + 0+2*stride)= v; + *(uint32_t*)(p + 4+2*stride)= v; + *(uint32_t*)(p + 0+3*stride)= v; + *(uint32_t*)(p + 4+3*stride)= v; + }else if(w==16){ + *(uint32_t*)(p + 0+0*stride)= val; + *(uint32_t*)(p + 4+0*stride)= val; + *(uint32_t*)(p + 8+0*stride)= val; + *(uint32_t*)(p +12+0*stride)= val; + *(uint32_t*)(p + 0+1*stride)= val; + *(uint32_t*)(p + 4+1*stride)= val; + *(uint32_t*)(p + 8+1*stride)= val; + *(uint32_t*)(p +12+1*stride)= val; + if(h==2) return; + *(uint32_t*)(p + 0+2*stride)= val; + *(uint32_t*)(p + 4+2*stride)= val; + *(uint32_t*)(p + 8+2*stride)= val; + *(uint32_t*)(p +12+2*stride)= val; + *(uint32_t*)(p + 0+3*stride)= val; + *(uint32_t*)(p + 4+3*stride)= val; + *(uint32_t*)(p + 8+3*stride)= val; + *(uint32_t*)(p +12+3*stride)= val; +#endif + }else + av_assert2(0); + av_assert2(h==4); +} + +#endif /* AVCODEC_RECTANGLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rl.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rl.h new file mode 100644 index 00000000..9a767bc5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rl.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2000-2002 Fabrice Bellard + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * rl header. + */ + +#ifndef AVCODEC_RL_H +#define AVCODEC_RL_H + +#include + +#include "vlc.h" + +/* run length table */ +#define MAX_RUN 64 +#define MAX_LEVEL 64 + +/** RLTable. */ +typedef struct RLTable { + int n; ///< number of entries of table_vlc minus 1 + int last; ///< number of values for last = 0 + const uint16_t (*table_vlc)[2]; + const int8_t *table_run; + const int8_t *table_level; + uint8_t *index_run[2]; ///< encoding only + int8_t *max_level[2]; ///< encoding & decoding + int8_t *max_run[2]; ///< encoding & decoding + RL_VLC_ELEM *rl_vlc[32]; ///< decoding only +} RLTable; + +/** + * @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] which will hold + * the level and run tables, if this is NULL av_malloc() will be used + */ +int ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]); +void ff_rl_init_vlc(RLTable *rl, unsigned static_size); + +/** + * Free the contents of a dynamically allocated table. + */ +void ff_rl_free(RLTable *rl); + +#define INIT_VLC_RL(rl, static_size)\ +{\ + int q;\ + static RL_VLC_ELEM rl_vlc_table[32][static_size];\ +\ + if(!rl.rl_vlc[0]){\ + for(q=0; q<32; q++)\ + rl.rl_vlc[q]= rl_vlc_table[q];\ +\ + ff_rl_init_vlc(&rl, static_size);\ + }\ +} + +static inline int get_rl_index(const RLTable *rl, int last, int run, int level) +{ + int index; + index = rl->index_run[last][run]; + if (index >= rl->n) + return rl->n; + if (level > rl->max_level[last][run]) + return rl->n; + return index + level - 1; +} + +#endif /* AVCODEC_RL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rle.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rle.h new file mode 100644 index 00000000..a92edf7a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rle.h @@ -0,0 +1,51 @@ +/* + * RLE encoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RLE_H +#define AVCODEC_RLE_H + +#include + +/** + * Count up to 127 consecutive pixels which are either all the same or + * all differ from the previous and next pixels. + * @param start Pointer to the first pixel + * @param len Maximum number of pixels + * @param bpp Bytes per pixel + * @param same 1 if searching for identical pixel values, 0 for differing + * @return Number of matching consecutive pixels found + */ +int ff_rle_count_pixels(const uint8_t *start, int len, int bpp, int same); + +/** + * RLE compress the row, with maximum size of out_size. + * Value before repeated bytes is (count ^ xor_rep) + add_rep. + * Value before raw bytes is (count ^ xor_raw) + add_raw. + * @param outbuf Output buffer + * @param out_size Maximum output size + * @param inbuf Input buffer + * @param bpp Bytes per pixel + * @param w Image width + * @return Size of output in bytes, or -1 if larger than out_size + */ +int ff_rle_encode(uint8_t *outbuf, int out_size, const uint8_t *inbuf, int bpp, + int w, int add_rep, int xor_rep, int add_raw, int xor_raw); + +#endif /* AVCODEC_RLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rnd_avg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rnd_avg.h new file mode 100644 index 00000000..344775e3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rnd_avg.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2001-2003 BERO + * Copyright (c) 2011 Oskar Arvidsson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RND_AVG_H +#define AVCODEC_RND_AVG_H + +#include +#include + +#define BYTE_VEC32(c) ((c) * 0x01010101UL) +#define BYTE_VEC64(c) ((c) * 0x0001000100010001UL) + +static inline uint32_t rnd_avg32(uint32_t a, uint32_t b) +{ + return (a | b) - (((a ^ b) & ~BYTE_VEC32(0x01)) >> 1); +} + +static inline uint32_t no_rnd_avg32(uint32_t a, uint32_t b) +{ + return (a & b) + (((a ^ b) & ~BYTE_VEC32(0x01)) >> 1); +} + +static inline uint64_t rnd_avg64(uint64_t a, uint64_t b) +{ + return (a | b) - (((a ^ b) & ~BYTE_VEC64(0x01)) >> 1); +} + +static inline uint64_t no_rnd_avg64(uint64_t a, uint64_t b) +{ + return (a & b) + (((a ^ b) & ~BYTE_VEC64(0x01)) >> 1); +} + +#endif /* AVCODEC_RND_AVG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/roqvideo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/roqvideo.h new file mode 100644 index 00000000..3da6eaa9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/roqvideo.h @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2003 Mike Melanson + * Copyright (C) 2003 Dr. Tim Ferguson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ROQVIDEO_H +#define AVCODEC_ROQVIDEO_H + +#include "libavutil/lfg.h" +#include "avcodec.h" +#include "bytestream.h" + +typedef struct roq_cell { + unsigned char y[4]; + unsigned char u, v; +} roq_cell; + +typedef struct roq_qcell { + int idx[4]; +} roq_qcell; + +typedef struct motion_vect { + int d[2]; +} motion_vect; + +struct RoqTempData; + +typedef struct RoqContext { + + const AVClass *class; + AVCodecContext *avctx; + AVFrame *last_frame; + AVFrame *current_frame; + int first_frame; + + roq_cell cb2x2[256]; + roq_qcell cb4x4[256]; + + GetByteContext gb; + int width, height; + + /* Encoder only data */ + AVLFG randctx; + uint64_t lambda; + + motion_vect *this_motion4; + motion_vect *last_motion4; + + motion_vect *this_motion8; + motion_vect *last_motion8; + + unsigned int framesSinceKeyframe; + + const AVFrame *frame_to_enc; + uint8_t *out_buf; + struct RoqTempData *tmpData; + + int quake3_compat; // Quake 3 compatibility option + +} RoqContext; + +#define RoQ_INFO 0x1001 +#define RoQ_QUAD_CODEBOOK 0x1002 +#define RoQ_QUAD_VQ 0x1011 +#define RoQ_SOUND_MONO 0x1020 +#define RoQ_SOUND_STEREO 0x1021 + +#define RoQ_ID_MOT 0x00 +#define RoQ_ID_FCC 0x01 +#define RoQ_ID_SLD 0x02 +#define RoQ_ID_CCC 0x03 + +void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell); +void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell); + +void ff_apply_motion_4x4(RoqContext *ri, int x, int y, int deltax, int deltay); + +void ff_apply_motion_8x8(RoqContext *ri, int x, int y, int deltax, int deltay); + +#endif /* AVCODEC_ROQVIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rtjpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rtjpeg.h new file mode 100644 index 00000000..d22ff407 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rtjpeg.h @@ -0,0 +1,49 @@ +/* + * RTJpeg decoding functions + * copyright (c) 2006 Reimar Doeffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RTJPEG_H +#define AVCODEC_RTJPEG_H + +#include + +#include "libavutil/mem.h" +#include "idctdsp.h" + +#define RTJPEG_FILE_VERSION 0 +#define RTJPEG_HEADER_SIZE 12 + +typedef struct RTJpegContext { + int w, h; + IDCTDSPContext idsp; + uint8_t scan[64]; + uint32_t lquant[64]; + uint32_t cquant[64]; + DECLARE_ALIGNED(16, int16_t, block)[64]; +} RTJpegContext; + +void ff_rtjpeg_init(RTJpegContext *c, AVCodecContext *avctx); + +void ff_rtjpeg_decode_init(RTJpegContext *c, int width, int height, + const uint32_t *lquant, const uint32_t *cquant); + +int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, + const uint8_t *buf, int buf_size); +#endif /* AVCODEC_RTJPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv10.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv10.h new file mode 100644 index 00000000..364270e7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv10.h @@ -0,0 +1,33 @@ +/* + * RV10/RV20 decoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_RV10_H +#define AVCODEC_RV10_H + +#include + +#include "mpegvideo.h" + +int ff_rv_decode_dc(MpegEncContext *s, int n); + +int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number); +void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number); + +#endif /* AVCODEC_RV10_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv30data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv30data.h new file mode 100644 index 00000000..5c4cb971 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv30data.h @@ -0,0 +1,181 @@ +/* + * RealVideo 3 decoder + * copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * miscellaneous RV30 tables + */ + +#ifndef AVCODEC_RV30DATA_H +#define AVCODEC_RV30DATA_H + +#include + +/** DC quantizer mapping for RV30 */ +static const uint8_t rv30_luma_dc_quant[32] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 22, 22, 23, 23, 23, 24, 24, 25, 25 +}; + +/** + * This table is used for storing the differences + * between the predicted and the real intra type. + */ +static const uint8_t rv30_itype_code[9*9*2] = { + 0, 0, 0, 1, 1, 0, 1, 1, 0, 2, 2, 0, 0, 3, 3, 0, 1, 2, + 2, 1, 0, 4, 4, 0, 3, 1, 1, 3, 0, 5, 5, 0, 2, 2, 1, 4, + 4, 1, 0, 6, 3, 2, 1, 5, 2, 3, 5, 1, 6, 0, 0, 7, 4, 2, + 2, 4, 3, 3, 6, 1, 1, 6, 7, 0, 0, 8, 5, 2, 4, 3, 2, 5, + 3, 4, 1, 7, 4, 4, 7, 1, 8, 0, 6, 2, 3, 5, 5, 3, 2, 6, + 1, 8, 2, 7, 7, 2, 8, 1, 5, 4, 4, 5, 3, 6, 6, 3, 8, 2, + 4, 6, 5, 5, 6, 4, 2, 8, 7, 3, 3, 7, 6, 5, 5, 6, 7, 4, + 4, 7, 8, 3, 3, 8, 7, 5, 8, 4, 5, 7, 4, 8, 6, 6, 7, 6, + 5, 8, 8, 5, 6, 7, 8, 6, 7, 7, 6, 8, 8, 7, 7, 8, 8, 8, +}; + +/** + * This table is used for retrieving the current intra type + * based on its neighbors and adjustment provided by + * code read and decoded before. + * + * This is really a three-dimensional matrix with dimensions + * [-1..9][-1..9][0..9]. The first and second coordinates are + * determined by the top and left neighbors (-1 if unavailable). + */ +static const uint8_t rv30_itype_from_context[900] = { + 0, 9, 9, 9, 9, 9, 9, 9, 9, + 0, 2, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 2, 0, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 0, 1, 9, 9, 9, 9, 9, 9, 9, + 0, 2, 1, 6, 4, 8, 5, 7, 3, + 1, 0, 2, 6, 5, 4, 3, 8, 7, + 2, 8, 0, 1, 7, 4, 3, 6, 5, + 2, 0, 1, 3, 8, 5, 4, 7, 6, + 2, 0, 1, 4, 6, 7, 8, 3, 5, + 0, 1, 5, 2, 6, 3, 8, 4, 7, + 0, 1, 6, 2, 4, 7, 5, 8, 3, + 2, 7, 0, 1, 4, 8, 6, 3, 5, + 2, 8, 0, 1, 7, 3, 4, 5, 6, + + 1, 0, 9, 9, 9, 9, 9, 9, 9, + 1, 2, 5, 6, 3, 0, 4, 8, 7, + 1, 6, 2, 5, 3, 0, 4, 8, 7, + 2, 1, 7, 6, 8, 3, 5, 0, 4, + 1, 2, 5, 3, 6, 8, 4, 7, 0, + 1, 6, 2, 0, 4, 5, 8, 7, 3, + 1, 5, 2, 6, 3, 8, 4, 0, 7, + 1, 6, 0, 2, 4, 5, 7, 3, 8, + 2, 1, 7, 6, 0, 8, 5, 4, 3, + 1, 2, 7, 8, 3, 4, 5, 6, 0, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 0, 2, 1, 8, 7, 6, 5, 4, 3, + 1, 2, 0, 6, 5, 7, 4, 8, 3, + 2, 8, 7, 1, 0, 6, 4, 3, 5, + 2, 0, 8, 1, 3, 7, 5, 4, 6, + 2, 0, 4, 1, 7, 8, 6, 3, 5, + 2, 0, 1, 5, 8, 4, 6, 7, 3, + 2, 0, 6, 1, 4, 7, 8, 5, 3, + 2, 7, 8, 1, 0, 5, 4, 6, 3, + 2, 8, 7, 1, 0, 4, 3, 6, 5, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 0, 2, 1, 3, 5, 8, 6, 4, 7, + 1, 0, 2, 5, 3, 6, 4, 8, 7, + 2, 8, 1, 0, 3, 5, 7, 6, 4, + 3, 2, 5, 8, 1, 4, 6, 7, 0, + 4, 2, 0, 6, 1, 5, 8, 3, 7, + 5, 3, 1, 2, 8, 6, 4, 0, 7, + 1, 6, 0, 2, 4, 5, 8, 3, 7, + 2, 7, 0, 1, 5, 4, 8, 6, 3, + 2, 8, 3, 5, 1, 0, 7, 6, 4, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 2, 0, 6, 1, 4, 7, 5, 8, 3, + 1, 6, 2, 0, 4, 5, 3, 7, 8, + 2, 8, 7, 6, 4, 0, 1, 5, 3, + 4, 2, 1, 0, 6, 8, 3, 5, 7, + 4, 2, 6, 0, 1, 5, 7, 8, 3, + 1, 2, 5, 0, 6, 3, 4, 7, 8, + 6, 4, 0, 1, 2, 7, 5, 3, 8, + 2, 7, 4, 6, 0, 1, 8, 5, 3, + 2, 8, 7, 4, 6, 1, 3, 5, 0, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 5, 1, 2, 3, 6, 8, 0, 4, 7, + 1, 5, 6, 3, 2, 0, 4, 8, 7, + 2, 1, 5, 3, 6, 8, 7, 4, 0, + 5, 3, 1, 2, 6, 8, 4, 7, 0, + 1, 6, 2, 4, 5, 8, 0, 3, 7, + 5, 1, 3, 6, 2, 0, 8, 4, 7, + 1, 6, 5, 2, 0, 4, 3, 7, 8, + 2, 7, 1, 6, 5, 0, 8, 3, 4, + 2, 5, 1, 3, 6, 8, 4, 0, 7, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 1, 6, 2, 0, 5, 4, 3, 7, 8, + 1, 6, 5, 4, 2, 3, 0, 7, 8, + 2, 1, 6, 7, 4, 8, 5, 3, 0, + 2, 1, 6, 5, 8, 4, 3, 0, 7, + 6, 4, 1, 2, 0, 5, 7, 8, 3, + 1, 6, 5, 2, 3, 0, 4, 8, 7, + 6, 1, 4, 0, 2, 7, 5, 3, 8, + 2, 7, 4, 6, 1, 5, 0, 8, 3, + 2, 1, 6, 8, 4, 7, 3, 5, 0, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 2, 0, 4, 7, 6, 1, 8, 5, 3, + 6, 1, 2, 0, 4, 7, 5, 8, 3, + 2, 7, 8, 0, 1, 6, 4, 3, 5, + 2, 4, 0, 8, 3, 1, 7, 6, 5, + 4, 2, 7, 0, 6, 1, 8, 5, 3, + 2, 1, 0, 8, 5, 6, 7, 4, 3, + 2, 6, 4, 1, 7, 0, 5, 8, 3, + 2, 7, 4, 0, 8, 6, 1, 5, 3, + 2, 8, 7, 4, 1, 0, 3, 6, 5, + + 9, 9, 9, 9, 9, 9, 9, 9, 9, + 2, 0, 8, 1, 3, 4, 6, 5, 7, + 1, 2, 0, 6, 8, 5, 7, 3, 4, + 2, 8, 7, 1, 0, 3, 6, 5, 4, + 8, 3, 2, 5, 1, 0, 4, 7, 6, + 2, 0, 4, 8, 5, 1, 7, 6, 3, + 2, 1, 0, 8, 5, 3, 6, 4, 7, + 2, 1, 6, 0, 8, 4, 5, 7, 3, + 2, 7, 8, 4, 0, 6, 1, 5, 3, + 2, 8, 3, 0, 7, 4, 1, 6, 5, +}; + +/** + * Loop filter limits are taken from this table. + */ +static const uint8_t rv30_loop_filt_lim[32] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5 +}; +#endif /* AVCODEC_RV30DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34.h new file mode 100644 index 00000000..1d552253 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34.h @@ -0,0 +1,141 @@ +/* + * RV30/40 decoder common data declarations + * Copyright (c) 2007 Mike Melanson, Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30 and RV40 decoder common data declarations + */ + +#ifndef AVCODEC_RV34_H +#define AVCODEC_RV34_H + +#include "avcodec.h" +#include "mpegvideo.h" + +#include "h264pred.h" +#include "rv34dsp.h" + +#define MB_TYPE_SEPARATE_DC 0x01000000 +#define IS_SEPARATE_DC(a) ((a) & MB_TYPE_SEPARATE_DC) + +/** + * RV30 and RV40 Macroblock types + */ +enum RV40BlockTypes{ + RV34_MB_TYPE_INTRA, ///< Intra macroblock + RV34_MB_TYPE_INTRA16x16, ///< Intra macroblock with DCs in a separate 4x4 block + RV34_MB_P_16x16, ///< P-frame macroblock, one motion frame + RV34_MB_P_8x8, ///< P-frame macroblock, 8x8 motion compensation partitions + RV34_MB_B_FORWARD, ///< B-frame macroblock, forward prediction + RV34_MB_B_BACKWARD, ///< B-frame macroblock, backward prediction + RV34_MB_SKIP, ///< Skipped block + RV34_MB_B_DIRECT, ///< Bidirectionally predicted B-frame macroblock, no motion vectors + RV34_MB_P_16x8, ///< P-frame macroblock, 16x8 motion compensation partitions + RV34_MB_P_8x16, ///< P-frame macroblock, 8x16 motion compensation partitions + RV34_MB_B_BIDIR, ///< Bidirectionally predicted B-frame macroblock, two motion vectors + RV34_MB_P_MIX16x16, ///< P-frame macroblock with DCs in a separate 4x4 block, one motion vector + RV34_MB_TYPES +}; + +/** + * VLC tables used by the decoder + * + * Intra frame VLC sets do not contain some of those tables. + */ +typedef struct RV34VLC{ + VLC cbppattern[2]; ///< VLCs used for pattern of coded block patterns decoding + VLC cbp[2][4]; ///< VLCs used for coded block patterns decoding + VLC first_pattern[4]; ///< VLCs used for decoding coefficients in the first subblock + VLC second_pattern[2]; ///< VLCs used for decoding coefficients in the subblocks 2 and 3 + VLC third_pattern[2]; ///< VLCs used for decoding coefficients in the last subblock + VLC coefficient; ///< VLCs used for decoding big coefficients +}RV34VLC; + +/** essential slice information */ +typedef struct SliceInfo{ + int type; ///< slice type (intra, inter) + int quant; ///< quantizer used for this slice + int vlc_set; ///< VLCs used for this slice + int start, end; ///< start and end macroblocks of the slice + int width; ///< coded width + int height; ///< coded height + int pts; ///< frame timestamp +}SliceInfo; + +/** decoder context */ +typedef struct RV34DecContext{ + MpegEncContext s; + RV34DSPContext rdsp; + int8_t *intra_types_hist;///< old block types, used for prediction + int8_t *intra_types; ///< block types + int intra_types_stride;///< block types array stride + const uint8_t *luma_dc_quant_i;///< luma subblock DC quantizer for intraframes + const uint8_t *luma_dc_quant_p;///< luma subblock DC quantizer for interframes + + RV34VLC *cur_vlcs; ///< VLC set used for current frame decoding + H264PredContext h; ///< functions for 4x4 and 16x16 intra block prediction + SliceInfo si; ///< current slice information + + int *mb_type; ///< internal macroblock types + int block_type; ///< current block type + int luma_vlc; ///< which VLC set will be used for decoding of luma blocks + int chroma_vlc; ///< which VLC set will be used for decoding of chroma blocks + int is16; ///< current block has additional 16x16 specific features or not + int dmv[4][2]; ///< differential motion vectors for the current macroblock + + int rv30; ///< indicates which RV variant is currently decoded + int max_rpr; + + int cur_pts, last_pts, next_pts; + int scaled_weight; + int weight1, weight2; ///< B-frame distance fractions (0.14) used in motion compensation + int mv_weight1, mv_weight2; + + int orig_width, orig_height; + + uint16_t *cbp_luma; ///< CBP values for luma subblocks + uint8_t *cbp_chroma; ///< CBP values for chroma subblocks + uint16_t *deblock_coefs; ///< deblock coefficients for each macroblock + + /** 8x8 block available flags (for MV prediction) */ + DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4]; + + /** temporary blocks for RV4 weighted MC */ + uint8_t *tmp_b_block_y[2]; + uint8_t *tmp_b_block_uv[4]; + uint8_t *tmp_b_block_base; + + int (*parse_slice_header)(struct RV34DecContext *r, GetBitContext *gb, SliceInfo *si); + int (*decode_mb_info)(struct RV34DecContext *r); + int (*decode_intra_types)(struct RV34DecContext *r, GetBitContext *gb, int8_t *dst); + void (*loop_filter)(struct RV34DecContext *r, int row); +}RV34DecContext; + +/** + * common decoding functions + */ +int ff_rv34_get_start_offset(GetBitContext *gb, int blocks); +int ff_rv34_decode_init(AVCodecContext *avctx); +int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt); +int ff_rv34_decode_end(AVCodecContext *avctx); +int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); + +#endif /* AVCODEC_RV34_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34data.h new file mode 100644 index 00000000..4b2701fe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34data.h @@ -0,0 +1,126 @@ +/* + * RealVideo 4 decoder + * copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * miscellaneous RV30/40 tables + */ + +#ifndef AVCODEC_RV34DATA_H +#define AVCODEC_RV34DATA_H + +#include + +/** + * number of ones in nibble minus one + */ +static const uint8_t rv34_count_ones[16] = { + 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3 +}; + +/** + * values used to reconstruct coded block pattern + */ +static const uint8_t rv34_cbp_code[16] = { + 0x00, 0x20, 0x10, 0x30, 0x02, 0x22, 0x12, 0x32, + 0x01, 0x21, 0x11, 0x31, 0x03, 0x23, 0x13, 0x33 +}; + +/** + * precalculated results of division by three and modulo three for values 0-107 + * + * A lot of four-tuples in RV40 are represented as c0*27+c1*9+c2*3+c3. + * This table allows conversion from a value back to a vector. + */ +static const uint8_t modulo_three_table[108] = { + 0x00, 0x01, 0x02, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, + 0x10, 0x11, 0x12, 0x14, 0x15, 0x16, 0x18, 0x19, 0x1A, + 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2A, + + 0x40, 0x41, 0x42, 0x44, 0x45, 0x46, 0x48, 0x49, 0x4A, + 0x50, 0x51, 0x52, 0x54, 0x55, 0x56, 0x58, 0x59, 0x5A, + 0x60, 0x61, 0x62, 0x64, 0x65, 0x66, 0x68, 0x69, 0x6A, + + 0x80, 0x81, 0x82, 0x84, 0x85, 0x86, 0x88, 0x89, 0x8A, + 0x90, 0x91, 0x92, 0x94, 0x95, 0x96, 0x98, 0x99, 0x9A, + 0xA0, 0xA1, 0xA2, 0xA4, 0xA5, 0xA6, 0xA8, 0xA9, 0xAA, + + 0xC0, 0xC1, 0xC2, 0xC4, 0xC5, 0xC6, 0xC8, 0xC9, 0xCA, + 0xD0, 0xD1, 0xD2, 0xD4, 0xD5, 0xD6, 0xD8, 0xD9, 0xDA, + 0xE0, 0xE1, 0xE2, 0xE4, 0xE5, 0xE6, 0xE8, 0xE9, 0xEA, +}; + +/** + * quantizer values used for AC and DC coefficients in chroma blocks + */ +static const uint8_t rv34_chroma_quant[2][32] = { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, 23, 24, 24, 25, 25 }, + { 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 15, 16, 17, 18, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23 } +}; + +/** + * This table is used for dequantizing. + */ +static const uint16_t rv34_qscale_tab[32] = { + 60, 67, 76, 85, 96, 108, 121, 136, + 152, 171, 192, 216, 242, 272, 305, 341, + 383, 432, 481, 544, 606, 683, 767, 854, + 963, 1074, 1212, 1392, 1566, 1708, 1978, 2211 +}; + +/** + * tables used to translate a quantizer value into a VLC set for decoding + * The first table is used for intraframes. + */ +static const uint8_t rv34_quant_to_vlc_set[2][31] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, + 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 }, +}; + +/** + * table for obtaining the quantizer difference + * @todo Use with ff_modified_quant_tab from h263data.h. + */ +static const uint8_t rv34_dquant_tab[2][32]={ +// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 +{ + 0, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9,10,11,12,13,14,15,16,17,18,18,19,20,21,22,23,24,25,26,27,28 +},{ + 0, 2, 3, 4, 5, 6, 7, 8, 9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,31,31,26 +} +}; + +/** + * maximum number of macroblocks for each of the possible slice offset sizes + * @todo This is the same as ff_mba_max, maybe use it instead. + */ +static const uint16_t rv34_mb_max_sizes[6] = { 0x2F, 0x62, 0x18B, 0x62F, 0x18BF, 0x23FF }; +/** + * bits needed to code the slice offset for the given size + * @todo This is the same as ff_mba_length, maybe use it instead. + */ +static const uint8_t rv34_mb_bits_sizes[6] = { 6, 7, 9, 11, 13, 14 }; + +#endif /* AVCODEC_RV34DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34dsp.h new file mode 100644 index 00000000..2e9ec4ee --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34dsp.h @@ -0,0 +1,88 @@ +/* + * RV30/40 decoder motion compensation functions + * Copyright (c) 2008 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30/40 decoder motion compensation functions + */ + +#ifndef AVCODEC_RV34DSP_H +#define AVCODEC_RV34DSP_H + +#include "h264chroma.h" +#include "qpeldsp.h" + +typedef void (*rv40_weight_func)(uint8_t *dst/*align width (8 or 16)*/, + uint8_t *src1/*align width (8 or 16)*/, + uint8_t *src2/*align width (8 or 16)*/, + int w1, int w2, ptrdiff_t stride); + +typedef void (*rv34_inv_transform_func)(int16_t *block); + +typedef void (*rv34_idct_add_func)(uint8_t *dst, ptrdiff_t stride, int16_t *block); +typedef void (*rv34_idct_dc_add_func)(uint8_t *dst, ptrdiff_t stride, + int dc); + +typedef void (*rv40_weak_loop_filter_func)(uint8_t *src, ptrdiff_t stride, + int filter_p1, int filter_q1, + int alpha, int beta, + int lims, int lim_q1, int lim_p1); + +typedef void (*rv40_strong_loop_filter_func)(uint8_t *src, ptrdiff_t stride, + int alpha, int lims, + int dmode, int chroma); + +typedef int (*rv40_loop_filter_strength_func)(uint8_t *src, ptrdiff_t stride, + int beta, int beta2, int edge, + int *p1, int *q1); + +typedef struct RV34DSPContext { + qpel_mc_func put_pixels_tab[4][16]; + qpel_mc_func avg_pixels_tab[4][16]; + h264_chroma_mc_func put_chroma_pixels_tab[3]; + h264_chroma_mc_func avg_chroma_pixels_tab[3]; + /** + * Biweight functions, first dimension is transform size (16/8), + * second is whether the weight is prescaled by 1/512 to skip + * the intermediate shifting. + */ + rv40_weight_func rv40_weight_pixels_tab[2][2]; + rv34_inv_transform_func rv34_inv_transform; + rv34_inv_transform_func rv34_inv_transform_dc; + rv34_idct_add_func rv34_idct_add; + rv34_idct_dc_add_func rv34_idct_dc_add; + rv40_weak_loop_filter_func rv40_weak_loop_filter[2]; + rv40_strong_loop_filter_func rv40_strong_loop_filter[2]; + rv40_loop_filter_strength_func rv40_loop_filter_strength[2]; +} RV34DSPContext; + +void ff_rv30dsp_init(RV34DSPContext *c); +void ff_rv34dsp_init(RV34DSPContext *c); +void ff_rv40dsp_init(RV34DSPContext *c); + +void ff_rv34dsp_init_arm(RV34DSPContext *c); +void ff_rv34dsp_init_x86(RV34DSPContext *c); + +void ff_rv40dsp_init_aarch64(RV34DSPContext *c); +void ff_rv40dsp_init_x86(RV34DSPContext *c); +void ff_rv40dsp_init_arm(RV34DSPContext *c); + +#endif /* AVCODEC_RV34DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34vlc.h new file mode 100644 index 00000000..aa29357c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv34vlc.h @@ -0,0 +1,4055 @@ +/* + * RealVideo 3/4 decoder + * Copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV30/40 VLC tables + */ + +#ifndef AVCODEC_RV34VLC_H +#define AVCODEC_RV34VLC_H + +#include + +#define NUM_INTRA_TABLES 5 +#define NUM_INTER_TABLES 7 + +#define CBPPAT_VLC_SIZE 1296 +#define CBP_VLC_SIZE 16 +#define FIRSTBLK_VLC_SIZE 864 +#define OTHERBLK_VLC_SIZE 108 +#define COEFF_VLC_SIZE 32 +#define MAX_VLC_SIZE 1296 + +static const uint8_t rv34_table_intra_cbppat[NUM_INTRA_TABLES][2][CBPPAT_VLC_SIZE] = { + { + { + 8, 10, 10, 10, 10, 10, 11, 10, 10, 11, 10, 10, 10, 10, 10, 6, + 12, 12, 13, 12, 13, 12, 13, 11, 13, 13, 13, 12, 13, 12, 12, 8, + 14, 13, 16, 13, 15, 13, 16, 12, 16, 16, 16, 14, 16, 13, 14, 10, + 12, 13, 12, 12, 13, 13, 13, 12, 13, 13, 12, 12, 13, 12, 12, 8, + 13, 14, 14, 12, 14, 14, 14, 12, 14, 15, 14, 12, 14, 13, 13, 8, + 16, 16, 16, 12, 16, 16, 16, 13, 16, 16, 16, 13, 16, 14, 14, 9, + 14, 16, 13, 13, 16, 16, 16, 14, 15, 16, 14, 13, 15, 15, 14, 10, + 16, 16, 14, 13, 16, 16, 16, 13, 16, 16, 16, 13, 16, 15, 14, 10, + 16, 16, 16, 11, 16, 16, 16, 12, 16, 16, 16, 12, 16, 16, 15, 9, + 12, 13, 13, 13, 12, 12, 14, 12, 12, 14, 13, 12, 12, 12, 12, 8, + 14, 14, 16, 14, 13, 12, 14, 12, 14, 15, 14, 13, 13, 12, 13, 8, + 16, 16, 16, 15, 16, 13, 16, 13, 16, 16, 16, 15, 16, 13, 15, 10, + 14, 16, 14, 14, 14, 14, 15, 13, 14, 16, 14, 13, 13, 13, 13, 9, + 16, 16, 16, 14, 16, 14, 16, 12, 16, 16, 14, 13, 14, 13, 13, 8, + 16, 16, 16, 14, 16, 14, 16, 13, 16, 16, 16, 14, 16, 14, 14, 9, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 14, 10, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 16, 14, 16, 15, 14, 9, + 16, 16, 16, 13, 16, 16, 16, 12, 16, 16, 16, 13, 16, 15, 15, 8, + 14, 16, 16, 16, 14, 14, 16, 14, 16, 16, 16, 15, 13, 13, 14, 10, + 16, 16, 16, 16, 15, 13, 16, 13, 16, 16, 16, 16, 16, 13, 14, 10, + 16, 16, 16, 16, 16, 11, 16, 12, 16, 16, 16, 16, 16, 12, 16, 9, + 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 14, 14, 10, + 16, 16, 16, 16, 16, 15, 16, 13, 16, 16, 16, 15, 16, 13, 14, 9, + 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 16, 16, 13, 14, 8, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 11, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14, 9, + 16, 16, 16, 14, 16, 15, 16, 11, 16, 16, 16, 14, 16, 14, 14, 8, + 12, 13, 13, 13, 13, 13, 14, 12, 12, 13, 12, 12, 12, 12, 12, 8, + 14, 14, 16, 14, 15, 14, 16, 13, 14, 15, 14, 13, 14, 13, 13, 9, + 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 16, 14, 16, 14, 16, 10, + 14, 15, 14, 14, 15, 14, 15, 13, 14, 14, 13, 12, 13, 13, 13, 9, + 15, 16, 15, 14, 16, 16, 16, 13, 15, 16, 14, 12, 14, 13, 13, 8, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 16, 13, 16, 14, 14, 9, + 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 13, 13, 16, 16, 14, 10, + 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 15, 13, 16, 14, 14, 9, + 16, 16, 16, 12, 16, 16, 16, 13, 16, 16, 16, 12, 16, 16, 15, 8, + 13, 14, 14, 14, 14, 14, 16, 13, 13, 14, 14, 13, 12, 12, 12, 8, + 16, 16, 16, 14, 15, 14, 16, 13, 15, 16, 14, 13, 13, 12, 13, 8, + 16, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 14, 16, 13, 14, 9, + 15, 16, 16, 15, 16, 15, 16, 13, 14, 16, 14, 13, 13, 13, 12, 8, + 16, 16, 16, 14, 16, 14, 15, 12, 15, 15, 14, 12, 13, 12, 12, 7, + 16, 16, 16, 14, 16, 14, 16, 12, 16, 16, 16, 13, 16, 13, 13, 7, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 14, 14, 16, 14, 13, 9, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 14, 12, 16, 13, 12, 7, + 16, 16, 16, 12, 16, 16, 16, 11, 16, 16, 15, 12, 16, 13, 13, 6, + 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 15, 13, 13, 14, 10, + 16, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 14, 13, 14, 9, + 16, 16, 16, 16, 16, 13, 16, 13, 16, 16, 16, 16, 16, 12, 14, 8, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 14, 13, 13, 9, + 16, 16, 16, 16, 16, 14, 16, 13, 16, 16, 16, 13, 14, 12, 12, 7, + 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 13, 14, 12, 13, 6, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 14, 9, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 13, 15, 13, 12, 7, + 16, 16, 16, 13, 16, 14, 16, 11, 16, 16, 16, 12, 16, 12, 12, 5, + 14, 16, 15, 16, 16, 16, 16, 15, 14, 15, 14, 14, 13, 14, 13, 10, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 14, 16, 10, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 11, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 14, 14, 15, 14, 13, 10, + 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 14, 13, 16, 14, 14, 9, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 15, 9, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12, 13, 16, 16, 13, 10, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 13, 16, 16, 13, 9, + 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 15, 12, 16, 16, 14, 8, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 15, 14, 13, 13, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 14, 13, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 15, 9, + 16, 16, 16, 16, 16, 16, 16, 15, 15, 16, 14, 14, 14, 13, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 14, 12, 13, 12, 12, 7, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 13, 16, 13, 13, 7, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 13, 16, 14, 13, 9, + 16, 16, 16, 15, 16, 16, 16, 13, 16, 16, 13, 12, 14, 13, 12, 6, + 16, 16, 16, 13, 16, 16, 16, 12, 16, 16, 14, 10, 15, 12, 12, 5, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12, 13, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 15, 13, 12, 13, 8, + 16, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 15, 12, 14, 8, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 13, 13, 13, 8, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 15, 13, 12, 11, 12, 6, + 16, 16, 16, 15, 16, 14, 16, 12, 16, 16, 16, 12, 13, 10, 12, 5, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 13, 14, 12, 8, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 13, 12, 13, 12, 10, 5, + 16, 16, 16, 13, 16, 13, 16, 10, 16, 16, 13, 10, 13, 10, 10, 1, + }, + { + 2, 7, 7, 8, 7, 8, 9, 8, 7, 9, 8, 8, 8, 8, 9, 7, + 6, 9, 10, 10, 10, 10, 11, 10, 10, 11, 11, 11, 10, 11, 11, 9, + 9, 11, 12, 12, 12, 13, 14, 13, 13, 14, 14, 13, 13, 13, 14, 11, + 6, 10, 9, 10, 10, 11, 11, 11, 10, 11, 10, 11, 11, 11, 11, 9, + 6, 9, 10, 10, 10, 11, 12, 11, 10, 12, 11, 11, 11, 11, 11, 8, + 9, 11, 12, 12, 12, 13, 13, 13, 12, 14, 14, 13, 13, 13, 13, 10, + 9, 13, 11, 13, 13, 14, 14, 13, 13, 14, 13, 13, 14, 14, 14, 12, + 9, 12, 12, 12, 12, 14, 14, 13, 13, 14, 13, 13, 13, 14, 13, 11, + 8, 12, 12, 11, 12, 14, 14, 12, 13, 14, 14, 13, 13, 13, 14, 11, + 6, 10, 10, 11, 9, 10, 12, 11, 10, 12, 11, 11, 10, 11, 11, 9, + 7, 10, 10, 11, 10, 11, 12, 11, 11, 12, 11, 11, 11, 11, 11, 9, + 9, 12, 13, 13, 12, 12, 14, 13, 13, 14, 14, 13, 14, 13, 14, 11, + 8, 11, 11, 12, 11, 12, 12, 12, 11, 13, 12, 12, 12, 12, 12, 10, + 7, 10, 10, 11, 10, 11, 12, 11, 10, 12, 11, 11, 11, 11, 11, 8, + 9, 11, 12, 12, 12, 12, 13, 12, 12, 13, 13, 12, 13, 12, 13, 10, + 10, 13, 13, 14, 14, 14, 15, 14, 14, 15, 14, 15, 14, 14, 14, 12, + 9, 12, 12, 13, 12, 13, 14, 13, 12, 13, 13, 12, 13, 13, 13, 10, + 9, 12, 12, 12, 12, 13, 14, 12, 12, 14, 13, 12, 13, 13, 13, 10, + 9, 12, 13, 13, 11, 13, 14, 13, 13, 14, 14, 14, 12, 13, 13, 11, + 10, 12, 13, 13, 12, 12, 14, 13, 13, 14, 14, 14, 13, 13, 14, 11, + 10, 13, 14, 14, 13, 12, 15, 13, 14, 14, 14, 14, 15, 13, 14, 11, + 11, 14, 14, 14, 13, 14, 15, 14, 14, 15, 15, 14, 13, 14, 14, 12, + 10, 13, 12, 13, 12, 12, 14, 13, 13, 14, 13, 13, 13, 13, 13, 10, + 10, 12, 13, 13, 13, 12, 14, 12, 13, 14, 14, 13, 13, 13, 13, 10, + 13, 15, 16, 16, 15, 15, 16, 16, 15, 16, 15, 16, 16, 16, 16, 14, + 11, 14, 14, 14, 14, 14, 15, 14, 14, 15, 15, 14, 14, 14, 15, 11, + 10, 13, 13, 13, 13, 13, 14, 12, 13, 14, 14, 13, 13, 13, 13, 10, + 6, 10, 10, 11, 10, 11, 12, 11, 10, 12, 10, 11, 10, 11, 11, 9, + 8, 11, 11, 12, 11, 12, 13, 12, 11, 12, 12, 12, 12, 12, 12, 10, + 11, 13, 14, 14, 13, 14, 15, 14, 13, 15, 15, 14, 14, 14, 15, 12, + 7, 11, 10, 12, 11, 12, 12, 12, 11, 12, 11, 12, 11, 12, 12, 10, + 7, 10, 10, 11, 10, 11, 12, 11, 11, 12, 11, 11, 11, 11, 11, 9, + 10, 12, 13, 13, 12, 13, 14, 13, 13, 14, 13, 13, 13, 13, 13, 10, + 10, 13, 12, 14, 13, 14, 14, 14, 13, 14, 12, 14, 15, 14, 14, 11, + 10, 12, 12, 12, 12, 13, 14, 13, 13, 14, 13, 12, 13, 13, 13, 10, + 9, 12, 13, 13, 13, 14, 14, 13, 13, 14, 14, 13, 13, 13, 13, 10, + 7, 10, 10, 11, 10, 11, 12, 11, 10, 12, 12, 11, 9, 11, 11, 9, + 7, 10, 11, 11, 10, 11, 12, 11, 10, 12, 12, 11, 11, 11, 11, 9, + 10, 12, 13, 13, 13, 13, 15, 13, 13, 14, 13, 13, 13, 13, 13, 10, + 8, 11, 11, 11, 11, 11, 12, 11, 11, 12, 12, 11, 11, 12, 11, 9, + 6, 9, 9, 10, 9, 10, 10, 10, 9, 11, 10, 10, 9, 10, 10, 7, + 8, 10, 11, 11, 11, 11, 12, 11, 11, 12, 12, 11, 11, 11, 11, 8, + 10, 13, 13, 13, 13, 14, 14, 13, 13, 14, 13, 13, 13, 13, 13, 11, + 8, 11, 11, 11, 11, 12, 12, 11, 11, 12, 11, 11, 11, 11, 11, 8, + 8, 11, 11, 11, 11, 12, 12, 10, 11, 12, 12, 11, 11, 11, 11, 8, + 10, 13, 13, 13, 12, 13, 14, 13, 12, 14, 14, 14, 10, 13, 13, 11, + 10, 12, 12, 13, 12, 13, 14, 12, 12, 13, 13, 13, 12, 12, 13, 10, + 11, 13, 14, 14, 13, 13, 14, 13, 13, 15, 14, 13, 13, 13, 13, 10, + 10, 12, 13, 13, 12, 13, 14, 13, 13, 14, 14, 13, 12, 13, 13, 11, + 8, 11, 11, 11, 11, 11, 12, 11, 11, 12, 12, 11, 11, 11, 11, 8, + 9, 11, 12, 12, 11, 11, 12, 11, 12, 12, 12, 11, 12, 11, 11, 8, + 12, 15, 14, 14, 14, 15, 15, 14, 14, 15, 15, 14, 14, 14, 15, 12, + 10, 12, 12, 12, 12, 12, 13, 12, 12, 13, 13, 12, 12, 12, 12, 9, + 9, 11, 11, 11, 11, 11, 12, 10, 11, 12, 12, 11, 11, 11, 11, 7, + 10, 13, 13, 13, 13, 14, 15, 14, 13, 14, 14, 14, 12, 14, 15, 12, + 11, 14, 14, 14, 14, 15, 15, 14, 14, 15, 15, 15, 14, 15, 15, 12, + 13, 16, 16, 16, 15, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 14, + 10, 13, 13, 14, 13, 15, 14, 14, 13, 15, 13, 14, 14, 14, 14, 12, + 10, 13, 13, 13, 13, 13, 14, 13, 13, 14, 13, 13, 13, 13, 14, 11, + 12, 14, 14, 14, 14, 15, 15, 14, 14, 15, 15, 14, 15, 14, 14, 12, + 11, 14, 14, 15, 14, 15, 15, 14, 14, 15, 12, 14, 15, 16, 15, 12, + 11, 13, 13, 14, 13, 14, 14, 14, 14, 14, 13, 13, 14, 14, 14, 11, + 11, 14, 14, 14, 14, 15, 15, 14, 14, 16, 14, 13, 14, 14, 14, 11, + 10, 13, 13, 13, 12, 14, 14, 14, 12, 15, 14, 14, 11, 13, 13, 12, + 10, 12, 13, 14, 12, 13, 14, 13, 13, 14, 14, 13, 12, 13, 13, 11, + 12, 14, 14, 15, 14, 15, 16, 15, 15, 15, 15, 15, 14, 14, 15, 12, + 10, 13, 13, 13, 12, 13, 14, 13, 13, 14, 13, 13, 12, 13, 13, 11, + 9, 11, 11, 12, 11, 12, 12, 11, 11, 12, 12, 11, 11, 11, 11, 9, + 10, 12, 12, 12, 12, 12, 13, 12, 12, 13, 13, 12, 13, 12, 12, 9, + 11, 13, 13, 15, 14, 14, 15, 14, 14, 15, 14, 14, 14, 14, 14, 11, + 10, 12, 12, 12, 12, 12, 13, 12, 12, 13, 11, 11, 12, 12, 12, 8, + 9, 12, 12, 11, 12, 12, 13, 11, 12, 12, 12, 11, 12, 11, 11, 8, + 10, 13, 13, 14, 12, 14, 15, 14, 13, 15, 15, 14, 10, 13, 13, 11, + 11, 13, 14, 13, 13, 14, 14, 13, 13, 14, 14, 14, 11, 13, 13, 11, + 12, 14, 14, 14, 14, 14, 15, 14, 15, 16, 15, 14, 13, 13, 14, 11, + 11, 14, 13, 14, 13, 14, 15, 14, 13, 15, 14, 14, 11, 13, 13, 11, + 9, 12, 12, 12, 11, 12, 13, 11, 12, 13, 12, 11, 10, 11, 11, 8, + 10, 12, 12, 12, 12, 12, 13, 11, 12, 12, 12, 11, 11, 11, 11, 8, + 12, 15, 14, 15, 14, 15, 16, 15, 15, 15, 15, 14, 14, 14, 14, 12, + 10, 12, 12, 12, 12, 12, 13, 11, 12, 13, 12, 11, 11, 11, 11, 8, + 8, 10, 10, 10, 10, 10, 11, 9, 10, 11, 10, 9, 10, 9, 9, 5, + }, + }, + { + { + 12, 12, 11, 9, 11, 10, 11, 9, 11, 11, 10, 9, 9, 8, 9, 5, + 14, 13, 14, 11, 14, 11, 13, 10, 14, 13, 12, 10, 12, 10, 11, 6, + 16, 13, 16, 12, 16, 12, 16, 11, 16, 14, 16, 12, 15, 12, 13, 8, + 14, 14, 12, 11, 14, 12, 13, 10, 13, 13, 11, 10, 12, 11, 10, 6, + 16, 15, 14, 11, 16, 13, 14, 10, 15, 14, 13, 10, 13, 11, 11, 7, + 16, 16, 16, 11, 16, 14, 16, 11, 16, 16, 15, 12, 15, 13, 13, 8, + 16, 16, 13, 12, 16, 16, 15, 12, 16, 16, 12, 11, 15, 13, 12, 8, + 16, 16, 14, 11, 16, 16, 16, 11, 16, 16, 14, 11, 15, 14, 13, 8, + 16, 16, 15, 10, 16, 16, 16, 10, 16, 16, 15, 11, 16, 14, 14, 8, + 14, 14, 14, 12, 13, 11, 13, 10, 13, 13, 12, 11, 11, 10, 10, 6, + 16, 15, 16, 13, 13, 11, 14, 11, 15, 14, 13, 11, 12, 10, 11, 7, + 16, 15, 16, 14, 16, 11, 16, 11, 16, 16, 16, 13, 16, 12, 13, 8, + 16, 16, 14, 13, 15, 13, 14, 11, 14, 15, 13, 11, 13, 11, 11, 7, + 16, 16, 15, 13, 15, 13, 14, 11, 16, 15, 14, 11, 13, 11, 11, 7, + 16, 16, 16, 13, 16, 13, 16, 11, 16, 16, 16, 12, 16, 12, 13, 8, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 14, 13, 15, 14, 13, 9, + 16, 16, 16, 13, 16, 16, 16, 12, 16, 16, 14, 12, 15, 13, 13, 8, + 16, 16, 16, 12, 16, 16, 16, 11, 16, 16, 15, 12, 16, 13, 13, 7, + 16, 16, 16, 16, 13, 12, 16, 12, 16, 16, 14, 13, 12, 11, 12, 8, + 16, 16, 16, 15, 14, 11, 16, 11, 16, 16, 16, 13, 14, 11, 13, 8, + 16, 16, 16, 16, 15, 10, 16, 11, 16, 16, 16, 14, 15, 11, 13, 8, + 16, 16, 16, 16, 16, 14, 16, 13, 16, 16, 14, 14, 14, 12, 13, 9, + 16, 16, 16, 15, 16, 13, 16, 12, 16, 16, 16, 13, 14, 12, 13, 8, + 16, 16, 16, 14, 16, 12, 16, 11, 16, 16, 16, 13, 15, 12, 13, 7, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 15, 16, 14, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 14, 16, 13, 13, 8, + 16, 16, 16, 14, 16, 14, 16, 10, 16, 16, 16, 13, 16, 13, 13, 7, + 14, 14, 13, 12, 13, 12, 13, 11, 12, 13, 11, 10, 11, 10, 10, 6, + 16, 16, 15, 13, 16, 13, 15, 11, 14, 14, 13, 11, 13, 11, 11, 7, + 16, 16, 16, 14, 16, 14, 16, 12, 16, 16, 16, 13, 16, 13, 14, 9, + 16, 16, 13, 13, 15, 14, 14, 11, 13, 14, 11, 11, 12, 11, 11, 7, + 16, 16, 15, 12, 16, 14, 15, 11, 14, 14, 12, 11, 13, 11, 11, 7, + 16, 16, 16, 13, 16, 14, 16, 12, 16, 16, 14, 12, 16, 13, 13, 8, + 16, 16, 14, 14, 16, 16, 16, 13, 16, 16, 12, 11, 15, 13, 12, 8, + 16, 16, 15, 13, 16, 16, 16, 12, 16, 16, 13, 11, 16, 13, 12, 8, + 16, 16, 16, 11, 16, 16, 16, 11, 16, 16, 14, 11, 16, 14, 13, 7, + 16, 16, 15, 13, 14, 13, 14, 11, 14, 14, 12, 11, 11, 10, 11, 7, + 16, 16, 16, 13, 14, 12, 15, 11, 15, 14, 13, 11, 12, 11, 11, 7, + 16, 16, 16, 14, 16, 13, 16, 12, 16, 16, 16, 13, 14, 12, 13, 8, + 16, 16, 15, 13, 15, 14, 14, 12, 14, 14, 12, 11, 12, 11, 11, 7, + 16, 16, 14, 12, 15, 13, 14, 11, 15, 14, 13, 11, 12, 11, 11, 6, + 16, 16, 16, 13, 16, 13, 16, 11, 16, 15, 14, 11, 14, 11, 12, 6, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 13, 12, 14, 13, 12, 8, + 16, 16, 15, 13, 16, 14, 15, 11, 16, 16, 13, 11, 14, 12, 11, 6, + 16, 16, 16, 12, 16, 14, 15, 11, 16, 16, 13, 10, 14, 12, 12, 6, + 16, 16, 16, 16, 16, 14, 16, 13, 16, 16, 14, 13, 12, 11, 12, 8, + 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 15, 13, 13, 11, 12, 8, + 16, 16, 16, 15, 16, 12, 16, 12, 16, 16, 16, 14, 14, 11, 13, 7, + 16, 16, 16, 16, 16, 15, 16, 13, 16, 16, 14, 13, 13, 12, 12, 8, + 16, 16, 16, 14, 15, 13, 15, 11, 16, 15, 14, 12, 13, 11, 11, 6, + 16, 16, 16, 14, 16, 12, 15, 11, 16, 16, 15, 12, 14, 11, 12, 6, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 15, 13, 14, 13, 12, 8, + 16, 16, 16, 14, 16, 14, 16, 12, 16, 16, 14, 12, 13, 12, 11, 6, + 16, 16, 16, 13, 16, 13, 15, 10, 16, 16, 14, 11, 14, 11, 11, 5, + 16, 16, 15, 14, 16, 16, 16, 13, 14, 14, 12, 12, 12, 12, 12, 8, + 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 14, 13, 14, 13, 13, 9, + 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 16, 13, 15, 9, + 16, 16, 14, 15, 16, 16, 16, 14, 14, 16, 12, 12, 13, 13, 12, 8, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 15, 13, 12, 14, 12, 12, 8, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 14, 12, 16, 13, 13, 8, + 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 11, 11, 15, 14, 12, 8, + 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 12, 11, 15, 13, 12, 8, + 16, 16, 16, 13, 16, 16, 16, 12, 16, 16, 13, 10, 16, 13, 12, 7, + 16, 16, 16, 16, 16, 15, 16, 13, 14, 16, 13, 13, 12, 12, 12, 8, + 16, 16, 16, 15, 16, 14, 16, 13, 16, 16, 14, 13, 13, 12, 12, 8, + 16, 16, 16, 16, 16, 15, 16, 13, 16, 16, 16, 13, 15, 12, 14, 8, + 16, 16, 16, 15, 16, 16, 16, 13, 14, 16, 13, 12, 12, 12, 11, 8, + 16, 16, 16, 14, 16, 14, 16, 12, 14, 14, 13, 11, 13, 11, 11, 6, + 16, 16, 16, 14, 16, 14, 16, 12, 16, 15, 14, 11, 14, 11, 12, 6, + 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 12, 12, 14, 13, 11, 8, + 16, 16, 15, 14, 16, 16, 16, 12, 16, 15, 12, 11, 13, 12, 11, 6, + 16, 16, 16, 13, 16, 14, 16, 11, 16, 14, 13, 10, 14, 11, 11, 5, + 16, 16, 16, 16, 16, 16, 16, 14, 14, 16, 15, 13, 11, 11, 11, 8, + 16, 16, 16, 16, 16, 15, 16, 13, 16, 16, 16, 13, 12, 11, 12, 7, + 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 13, 13, 11, 13, 7, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 14, 13, 12, 12, 11, 7, + 16, 16, 16, 15, 16, 14, 15, 12, 16, 14, 13, 12, 12, 11, 11, 6, + 16, 16, 16, 14, 16, 13, 15, 11, 16, 14, 14, 11, 13, 10, 11, 5, + 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 13, 12, 12, 12, 11, 7, + 16, 16, 16, 14, 16, 14, 15, 12, 16, 15, 12, 11, 12, 11, 10, 5, + 16, 16, 16, 13, 16, 13, 14, 10, 16, 14, 12, 9, 12, 10, 9, 3, + }, + { + 2, 6, 6, 7, 6, 7, 8, 7, 7, 8, 7, 8, 7, 8, 8, 5, + 5, 8, 9, 9, 9, 9, 12, 10, 10, 11, 10, 10, 10, 11, 11, 8, + 9, 10, 13, 12, 13, 12, 15, 13, 13, 14, 13, 14, 13, 13, 14, 11, + 5, 10, 9, 10, 10, 10, 12, 10, 10, 12, 10, 11, 11, 11, 11, 8, + 6, 9, 10, 9, 10, 11, 12, 10, 10, 12, 11, 11, 10, 11, 11, 8, + 9, 11, 12, 11, 12, 13, 14, 12, 13, 14, 14, 12, 13, 13, 13, 11, + 10, 13, 11, 12, 14, 14, 15, 13, 13, 15, 12, 13, 14, 14, 14, 12, + 9, 12, 12, 12, 13, 13, 15, 13, 13, 14, 13, 13, 14, 13, 15, 11, + 8, 11, 12, 10, 12, 13, 14, 12, 13, 14, 14, 13, 13, 13, 14, 11, + 5, 9, 10, 10, 9, 10, 12, 11, 10, 12, 11, 11, 9, 11, 11, 9, + 6, 10, 10, 11, 10, 10, 12, 11, 11, 12, 11, 11, 11, 11, 11, 9, + 9, 11, 13, 13, 12, 11, 14, 12, 13, 15, 13, 13, 14, 13, 14, 11, + 8, 11, 11, 12, 11, 12, 13, 12, 12, 13, 12, 13, 12, 12, 12, 10, + 7, 10, 10, 11, 10, 11, 12, 11, 11, 12, 11, 11, 11, 11, 12, 9, + 9, 12, 12, 12, 12, 12, 14, 12, 13, 14, 13, 13, 13, 13, 13, 11, + 11, 14, 13, 15, 15, 16, 16, 15, 15, 16, 15, 15, 16, 16, 15, 13, + 10, 12, 13, 13, 13, 14, 15, 13, 13, 14, 13, 13, 14, 14, 14, 11, + 9, 12, 12, 12, 13, 13, 14, 12, 13, 14, 14, 13, 13, 13, 14, 11, + 9, 13, 13, 13, 11, 12, 15, 13, 13, 15, 14, 14, 11, 13, 14, 11, + 10, 13, 13, 13, 12, 12, 15, 13, 13, 15, 14, 14, 13, 13, 14, 11, + 10, 12, 13, 13, 12, 11, 14, 12, 13, 15, 13, 13, 13, 13, 14, 11, + 11, 14, 15, 15, 13, 14, 16, 14, 14, 16, 16, 14, 14, 15, 15, 13, + 10, 13, 13, 13, 12, 13, 14, 13, 13, 14, 14, 14, 13, 13, 14, 11, + 10, 12, 13, 13, 13, 12, 14, 13, 13, 14, 14, 13, 13, 13, 13, 11, + 13, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 12, 15, 15, 15, 14, 15, 16, 14, 15, 16, 16, 15, 16, 15, 15, 13, + 10, 12, 12, 12, 13, 13, 14, 12, 13, 14, 13, 13, 13, 13, 13, 11, + 6, 10, 10, 11, 10, 11, 12, 11, 10, 12, 11, 11, 10, 11, 11, 9, + 8, 11, 12, 12, 12, 12, 13, 12, 12, 13, 12, 13, 12, 13, 13, 10, + 11, 13, 15, 14, 15, 14, 16, 14, 15, 16, 16, 14, 15, 15, 15, 13, + 7, 11, 10, 12, 11, 11, 13, 11, 11, 13, 10, 11, 12, 12, 12, 10, + 7, 11, 11, 11, 11, 11, 13, 11, 11, 13, 11, 12, 12, 12, 12, 9, + 10, 12, 13, 13, 13, 13, 15, 13, 14, 15, 14, 14, 14, 14, 15, 11, + 10, 13, 12, 14, 14, 14, 15, 13, 13, 15, 12, 13, 15, 15, 14, 12, + 10, 13, 12, 12, 13, 13, 15, 14, 13, 15, 13, 13, 14, 14, 14, 11, + 10, 13, 13, 12, 13, 14, 15, 13, 13, 15, 13, 13, 14, 14, 14, 11, + 7, 10, 11, 11, 10, 11, 12, 11, 10, 12, 12, 12, 9, 11, 12, 9, + 7, 11, 11, 11, 11, 11, 13, 11, 11, 13, 12, 12, 11, 12, 12, 9, + 10, 12, 14, 13, 13, 13, 16, 13, 14, 16, 14, 14, 13, 13, 14, 11, + 8, 11, 11, 12, 11, 12, 13, 12, 12, 13, 12, 12, 12, 12, 12, 10, + 6, 9, 9, 10, 9, 10, 11, 10, 10, 11, 10, 10, 10, 10, 10, 8, + 8, 11, 11, 11, 12, 11, 13, 11, 12, 13, 12, 12, 12, 12, 12, 10, + 11, 14, 13, 14, 14, 14, 16, 14, 14, 16, 14, 14, 15, 15, 14, 12, + 9, 12, 11, 12, 12, 12, 13, 12, 12, 13, 12, 12, 12, 12, 12, 10, + 8, 11, 11, 11, 11, 11, 13, 11, 12, 12, 12, 12, 12, 12, 12, 9, + 10, 13, 14, 13, 11, 13, 14, 14, 13, 15, 15, 14, 10, 13, 14, 11, + 10, 13, 13, 13, 12, 13, 14, 13, 13, 14, 14, 14, 13, 13, 13, 11, + 10, 13, 14, 13, 13, 12, 15, 13, 14, 15, 14, 14, 14, 13, 14, 12, + 11, 14, 14, 14, 13, 13, 15, 14, 14, 15, 14, 15, 13, 14, 14, 12, + 9, 11, 12, 12, 11, 11, 13, 12, 12, 13, 12, 12, 12, 12, 12, 10, + 9, 11, 12, 12, 12, 11, 13, 11, 12, 13, 12, 12, 12, 12, 12, 10, + 13, 15, 15, 16, 15, 16, 16, 15, 16, 16, 16, 15, 15, 15, 16, 14, + 10, 13, 13, 13, 13, 13, 14, 13, 13, 14, 13, 13, 13, 13, 13, 11, + 8, 11, 11, 11, 11, 11, 12, 11, 11, 12, 12, 11, 12, 11, 12, 9, + 11, 14, 14, 15, 14, 15, 15, 14, 13, 15, 14, 15, 12, 14, 15, 13, + 12, 15, 15, 15, 15, 15, 16, 15, 15, 16, 16, 16, 15, 16, 15, 13, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 11, 14, 13, 15, 14, 14, 16, 14, 14, 16, 13, 14, 15, 14, 15, 12, + 11, 14, 13, 14, 14, 14, 16, 15, 14, 16, 14, 14, 15, 15, 15, 12, + 13, 15, 15, 15, 15, 16, 16, 15, 16, 16, 16, 15, 16, 16, 16, 13, + 11, 14, 13, 14, 14, 14, 15, 14, 14, 16, 12, 14, 16, 16, 14, 12, + 11, 14, 14, 14, 14, 15, 16, 15, 14, 16, 13, 14, 16, 15, 14, 12, + 12, 14, 14, 14, 14, 14, 16, 14, 15, 16, 14, 14, 14, 15, 15, 12, + 11, 14, 14, 14, 13, 14, 16, 15, 13, 16, 15, 15, 11, 14, 14, 12, + 11, 14, 14, 15, 14, 14, 16, 14, 14, 15, 14, 14, 13, 15, 15, 12, + 13, 15, 16, 15, 15, 15, 16, 15, 16, 16, 16, 16, 15, 15, 16, 13, + 11, 14, 14, 14, 14, 14, 15, 14, 14, 16, 14, 14, 14, 15, 14, 12, + 9, 12, 12, 12, 12, 12, 13, 12, 12, 13, 12, 13, 12, 12, 12, 10, + 11, 13, 13, 13, 13, 13, 14, 13, 13, 14, 13, 14, 13, 13, 14, 11, + 12, 15, 14, 15, 15, 15, 16, 15, 14, 16, 14, 14, 16, 16, 14, 13, + 10, 12, 12, 12, 12, 12, 14, 12, 13, 13, 12, 12, 13, 13, 13, 10, + 10, 12, 12, 12, 12, 12, 14, 12, 12, 13, 12, 12, 12, 12, 12, 10, + 10, 14, 14, 14, 12, 14, 16, 14, 13, 16, 16, 16, 10, 13, 14, 12, + 11, 14, 14, 14, 13, 14, 16, 14, 14, 16, 15, 14, 12, 13, 14, 12, + 12, 14, 14, 14, 14, 14, 16, 14, 14, 16, 15, 15, 14, 14, 15, 12, + 12, 14, 15, 15, 14, 15, 16, 14, 15, 15, 15, 15, 13, 15, 14, 12, + 9, 12, 12, 12, 12, 13, 13, 12, 12, 13, 13, 12, 11, 12, 12, 10, + 10, 12, 12, 12, 12, 12, 13, 12, 12, 13, 12, 12, 12, 12, 12, 10, + 13, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 15, 16, 15, 13, + 10, 12, 12, 13, 12, 13, 13, 12, 13, 14, 13, 13, 12, 13, 13, 10, + 7, 10, 10, 10, 10, 10, 11, 10, 10, 11, 10, 10, 10, 10, 10, 7, + }, + }, + { + { + 10, 10, 9, 8, 9, 8, 9, 7, 9, 9, 8, 7, 8, 7, 7, 4, + 13, 11, 12, 9, 12, 9, 12, 9, 12, 11, 11, 9, 10, 9, 9, 6, + 15, 12, 15, 11, 14, 10, 14, 10, 14, 13, 13, 11, 13, 11, 12, 7, + 13, 12, 11, 9, 12, 11, 12, 9, 12, 12, 10, 9, 10, 10, 9, 6, + 14, 13, 12, 10, 13, 12, 13, 9, 13, 12, 11, 10, 12, 11, 10, 6, + 16, 14, 14, 10, 15, 13, 14, 10, 15, 15, 14, 11, 14, 12, 12, 8, + 15, 14, 12, 11, 15, 14, 13, 11, 14, 14, 11, 10, 13, 12, 11, 8, + 15, 16, 13, 11, 16, 14, 14, 11, 15, 15, 12, 10, 14, 13, 12, 8, + 16, 15, 14, 10, 16, 14, 14, 10, 16, 15, 14, 10, 14, 13, 12, 7, + 13, 12, 12, 11, 11, 9, 12, 9, 12, 12, 11, 10, 10, 9, 9, 6, + 13, 13, 14, 12, 12, 10, 12, 10, 14, 13, 12, 11, 11, 10, 10, 7, + 16, 14, 16, 13, 14, 11, 15, 10, 16, 15, 14, 12, 14, 11, 12, 8, + 14, 14, 13, 12, 13, 12, 13, 10, 13, 13, 12, 11, 11, 10, 10, 7, + 15, 14, 14, 12, 14, 12, 13, 10, 14, 13, 12, 11, 12, 11, 11, 7, + 16, 15, 16, 13, 15, 13, 15, 10, 16, 15, 14, 12, 14, 12, 12, 7, + 15, 16, 14, 13, 16, 14, 14, 12, 15, 15, 12, 12, 13, 12, 12, 8, + 16, 16, 14, 13, 16, 14, 14, 11, 15, 15, 14, 11, 14, 12, 12, 8, + 16, 16, 15, 12, 16, 14, 15, 10, 16, 16, 13, 12, 14, 13, 12, 7, + 14, 14, 14, 13, 13, 11, 13, 11, 14, 14, 13, 12, 11, 10, 11, 8, + 16, 15, 16, 13, 13, 11, 14, 11, 15, 14, 14, 13, 12, 11, 12, 8, + 15, 15, 16, 14, 14, 10, 14, 10, 16, 15, 15, 13, 14, 10, 12, 8, + 16, 16, 16, 14, 15, 13, 14, 12, 15, 15, 13, 13, 13, 12, 12, 8, + 16, 16, 16, 14, 15, 13, 14, 11, 16, 16, 14, 13, 13, 12, 12, 8, + 16, 16, 16, 14, 16, 12, 15, 11, 16, 15, 15, 13, 14, 12, 12, 8, + 16, 16, 16, 16, 16, 15, 15, 13, 16, 16, 14, 13, 14, 13, 12, 9, + 16, 16, 16, 14, 16, 15, 15, 11, 16, 16, 14, 13, 15, 13, 12, 8, + 16, 16, 16, 14, 16, 14, 14, 10, 16, 16, 15, 13, 14, 12, 12, 7, + 12, 12, 12, 11, 12, 11, 12, 10, 11, 11, 10, 9, 9, 9, 9, 6, + 14, 13, 14, 12, 13, 12, 13, 10, 13, 13, 12, 10, 12, 10, 11, 7, + 16, 14, 16, 13, 15, 13, 16, 12, 15, 14, 14, 12, 14, 12, 13, 8, + 14, 14, 13, 11, 14, 12, 13, 11, 12, 12, 10, 10, 11, 10, 10, 7, + 14, 14, 13, 12, 14, 12, 13, 11, 13, 13, 12, 10, 12, 11, 10, 7, + 16, 15, 15, 12, 16, 14, 15, 11, 16, 14, 13, 11, 14, 12, 12, 8, + 16, 16, 13, 13, 16, 15, 14, 12, 14, 14, 11, 11, 13, 12, 11, 8, + 16, 16, 14, 12, 16, 14, 14, 12, 15, 14, 12, 11, 14, 12, 12, 8, + 16, 15, 14, 11, 16, 15, 15, 11, 16, 15, 13, 11, 14, 13, 12, 8, + 14, 13, 13, 12, 13, 11, 13, 10, 12, 13, 11, 10, 10, 10, 10, 7, + 15, 14, 14, 13, 13, 12, 13, 11, 14, 13, 12, 11, 12, 10, 11, 7, + 16, 15, 16, 14, 15, 12, 15, 11, 16, 14, 14, 12, 14, 11, 12, 8, + 14, 15, 13, 12, 14, 13, 13, 11, 13, 13, 11, 11, 11, 10, 10, 7, + 14, 14, 14, 12, 14, 13, 13, 10, 14, 13, 12, 10, 12, 10, 10, 6, + 16, 15, 15, 13, 16, 13, 15, 11, 15, 14, 13, 11, 13, 11, 11, 7, + 16, 16, 14, 13, 16, 15, 14, 12, 15, 15, 12, 11, 13, 12, 11, 8, + 16, 16, 14, 13, 16, 14, 14, 11, 15, 14, 12, 11, 13, 12, 11, 7, + 16, 16, 15, 12, 16, 14, 14, 11, 15, 15, 13, 11, 14, 12, 11, 6, + 16, 15, 15, 14, 14, 12, 14, 12, 13, 14, 13, 12, 11, 11, 11, 8, + 16, 16, 16, 14, 14, 12, 15, 12, 15, 14, 14, 12, 12, 11, 12, 8, + 16, 16, 16, 15, 14, 12, 15, 12, 16, 15, 14, 13, 13, 11, 12, 8, + 16, 16, 16, 15, 15, 14, 15, 12, 14, 14, 13, 12, 12, 11, 11, 8, + 16, 16, 15, 14, 14, 12, 14, 11, 14, 14, 13, 12, 12, 11, 11, 7, + 16, 16, 16, 14, 15, 12, 14, 11, 15, 15, 14, 12, 13, 11, 12, 7, + 16, 16, 16, 16, 16, 15, 16, 13, 15, 15, 14, 12, 13, 12, 11, 8, + 16, 16, 16, 14, 15, 14, 14, 12, 16, 15, 13, 12, 13, 12, 11, 7, + 16, 16, 16, 13, 16, 13, 14, 10, 16, 15, 14, 11, 13, 11, 11, 6, + 14, 15, 13, 13, 14, 13, 14, 12, 12, 13, 11, 11, 11, 11, 10, 8, + 16, 16, 15, 13, 16, 14, 16, 13, 14, 14, 13, 12, 13, 12, 12, 8, + 16, 16, 16, 14, 16, 14, 16, 13, 16, 14, 15, 13, 15, 13, 13, 9, + 15, 15, 14, 14, 15, 14, 14, 12, 13, 14, 11, 11, 12, 12, 11, 8, + 15, 16, 15, 13, 15, 14, 14, 12, 14, 14, 12, 11, 13, 12, 12, 8, + 16, 16, 16, 13, 16, 15, 15, 13, 16, 15, 14, 11, 15, 12, 13, 8, + 16, 16, 14, 13, 16, 15, 15, 13, 14, 14, 10, 11, 14, 12, 11, 8, + 16, 16, 15, 13, 16, 16, 15, 13, 15, 14, 12, 11, 14, 13, 12, 8, + 16, 16, 15, 13, 16, 15, 16, 12, 16, 14, 13, 10, 15, 13, 12, 7, + 15, 15, 15, 14, 14, 14, 15, 12, 13, 14, 12, 12, 11, 11, 11, 8, + 16, 15, 16, 14, 15, 13, 15, 12, 14, 14, 13, 12, 12, 11, 12, 8, + 16, 16, 16, 15, 16, 14, 16, 13, 16, 15, 14, 12, 14, 11, 13, 8, + 16, 16, 15, 14, 16, 14, 15, 13, 14, 14, 12, 11, 12, 11, 11, 8, + 15, 16, 15, 14, 15, 14, 14, 12, 14, 13, 12, 11, 12, 11, 11, 7, + 16, 16, 16, 14, 16, 13, 16, 12, 15, 14, 13, 11, 13, 11, 12, 7, + 16, 16, 15, 14, 16, 15, 15, 13, 14, 15, 11, 11, 13, 12, 11, 8, + 16, 16, 15, 13, 16, 14, 15, 12, 15, 14, 12, 11, 13, 11, 11, 7, + 16, 16, 15, 13, 16, 14, 16, 12, 15, 14, 13, 10, 13, 11, 11, 6, + 16, 16, 16, 14, 14, 14, 15, 13, 14, 14, 14, 12, 11, 11, 11, 8, + 16, 16, 16, 14, 15, 14, 16, 13, 15, 14, 14, 13, 12, 11, 11, 7, + 16, 16, 16, 16, 15, 13, 16, 12, 15, 15, 14, 12, 13, 10, 12, 7, + 16, 16, 16, 14, 15, 15, 14, 13, 14, 14, 13, 12, 12, 11, 11, 8, + 16, 15, 16, 14, 16, 13, 15, 12, 14, 14, 13, 12, 12, 10, 10, 6, + 16, 15, 16, 14, 16, 13, 16, 11, 16, 14, 13, 11, 13, 10, 11, 6, + 16, 16, 16, 15, 16, 16, 15, 13, 14, 16, 12, 12, 12, 12, 10, 7, + 16, 16, 16, 14, 16, 14, 14, 12, 15, 15, 12, 11, 12, 11, 10, 6, + 16, 16, 16, 13, 16, 13, 15, 10, 15, 14, 13, 10, 13, 10, 10, 4, + }, + { + 1, 6, 6, 7, 6, 7, 9, 8, 7, 9, 7, 8, 7, 8, 8, 6, + 6, 9, 10, 10, 10, 10, 12, 11, 10, 12, 11, 11, 11, 11, 12, 9, + 9, 10, 13, 11, 13, 12, 14, 13, 14, 14, 14, 14, 14, 14, 14, 12, + 6, 10, 9, 10, 10, 11, 13, 11, 11, 13, 10, 12, 11, 12, 12, 9, + 6, 10, 10, 10, 10, 11, 13, 11, 11, 13, 12, 12, 11, 12, 12, 9, + 9, 11, 13, 12, 13, 14, 15, 13, 14, 16, 14, 14, 14, 14, 15, 12, + 10, 13, 11, 13, 14, 14, 16, 14, 14, 15, 13, 14, 15, 15, 16, 12, + 9, 13, 12, 12, 14, 14, 16, 14, 14, 15, 14, 14, 15, 15, 15, 12, + 8, 11, 12, 11, 13, 14, 15, 13, 13, 15, 14, 14, 13, 15, 15, 11, + 6, 10, 10, 11, 9, 10, 13, 11, 10, 13, 11, 12, 10, 12, 12, 9, + 6, 10, 10, 11, 11, 10, 13, 11, 11, 13, 11, 12, 12, 12, 13, 10, + 9, 12, 13, 13, 13, 12, 16, 13, 14, 15, 14, 14, 15, 14, 15, 12, + 8, 12, 12, 13, 12, 13, 15, 14, 13, 15, 13, 14, 13, 13, 14, 11, + 7, 11, 11, 12, 11, 12, 13, 12, 12, 13, 12, 13, 12, 13, 13, 10, + 9, 12, 13, 13, 13, 13, 16, 13, 13, 15, 14, 14, 14, 15, 15, 12, + 11, 15, 14, 15, 15, 16, 16, 16, 15, 16, 15, 16, 16, 16, 16, 14, + 10, 13, 13, 14, 14, 14, 16, 15, 14, 16, 15, 15, 15, 15, 16, 13, + 9, 12, 13, 13, 13, 14, 16, 14, 13, 15, 14, 14, 14, 16, 15, 12, + 10, 13, 14, 14, 11, 13, 16, 14, 14, 16, 15, 15, 12, 14, 15, 12, + 10, 13, 14, 14, 12, 12, 16, 15, 14, 16, 15, 15, 14, 14, 16, 12, + 9, 12, 13, 14, 13, 11, 16, 13, 14, 15, 13, 14, 14, 14, 15, 12, + 11, 15, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 13, 14, 14, 13, 14, 16, 15, 14, 16, 16, 16, 14, 15, 16, 13, + 10, 13, 13, 14, 13, 13, 16, 13, 13, 14, 14, 15, 15, 14, 15, 13, + 13, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 12, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 12, 13, 14, 13, 13, 14, 13, 13, 14, 13, 14, 14, 14, 15, 12, + 6, 10, 11, 11, 10, 11, 13, 12, 11, 13, 11, 12, 11, 12, 12, 10, + 8, 12, 13, 13, 12, 13, 14, 14, 13, 15, 14, 14, 14, 14, 15, 12, + 12, 14, 16, 15, 15, 15, 16, 15, 16, 16, 16, 16, 16, 16, 16, 14, + 7, 11, 11, 12, 12, 12, 14, 13, 12, 14, 11, 12, 13, 13, 13, 11, + 8, 11, 12, 12, 12, 12, 14, 13, 12, 14, 12, 13, 13, 14, 14, 11, + 11, 13, 14, 14, 14, 14, 16, 15, 15, 16, 15, 15, 16, 16, 16, 13, + 10, 14, 12, 14, 14, 15, 16, 15, 13, 16, 12, 14, 16, 16, 15, 13, + 10, 13, 13, 14, 14, 15, 16, 15, 14, 16, 14, 15, 15, 16, 16, 12, + 10, 13, 14, 13, 14, 14, 16, 15, 14, 16, 15, 15, 14, 16, 16, 13, + 7, 11, 11, 11, 10, 12, 14, 13, 11, 14, 13, 13, 10, 12, 13, 10, + 8, 11, 12, 12, 11, 12, 14, 13, 12, 15, 13, 13, 12, 13, 14, 11, + 11, 13, 14, 14, 14, 14, 16, 15, 14, 16, 15, 16, 16, 16, 16, 14, + 8, 12, 12, 13, 12, 13, 15, 14, 12, 15, 13, 13, 13, 14, 14, 11, + 6, 10, 10, 11, 10, 11, 13, 12, 11, 13, 11, 12, 11, 12, 12, 9, + 9, 12, 13, 13, 13, 13, 14, 13, 13, 15, 14, 14, 14, 14, 14, 12, + 11, 15, 14, 15, 14, 15, 16, 16, 16, 16, 15, 16, 16, 16, 16, 14, + 9, 13, 12, 13, 13, 13, 15, 14, 13, 14, 13, 14, 14, 15, 14, 12, + 9, 12, 12, 12, 12, 13, 14, 13, 13, 14, 13, 13, 13, 13, 14, 11, + 10, 13, 15, 14, 12, 14, 16, 14, 14, 16, 15, 15, 12, 14, 16, 12, + 10, 14, 14, 14, 13, 14, 16, 15, 14, 16, 16, 16, 13, 14, 16, 13, + 11, 13, 14, 14, 14, 13, 16, 14, 14, 16, 15, 15, 15, 15, 16, 13, + 11, 15, 15, 15, 14, 15, 16, 16, 15, 16, 16, 16, 14, 16, 16, 13, + 9, 13, 13, 13, 12, 13, 15, 14, 13, 15, 14, 14, 13, 14, 15, 11, + 9, 12, 12, 13, 12, 12, 14, 13, 13, 14, 13, 14, 14, 14, 14, 11, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 11, 14, 14, 15, 15, 14, 16, 16, 14, 16, 14, 15, 15, 16, 16, 12, + 9, 12, 12, 13, 12, 12, 14, 12, 12, 14, 13, 13, 13, 13, 14, 11, + 11, 14, 14, 16, 14, 16, 16, 16, 13, 16, 14, 16, 14, 16, 16, 13, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 15, 14, 16, 14, 15, 16, 16, 15, 16, 14, 15, 16, 16, 16, 13, + 11, 15, 14, 16, 15, 16, 16, 16, 15, 16, 15, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 11, 14, 13, 14, 15, 14, 16, 15, 14, 16, 12, 14, 16, 16, 15, 13, + 11, 14, 14, 16, 14, 15, 16, 16, 15, 16, 14, 15, 16, 16, 16, 14, + 12, 14, 14, 15, 14, 16, 16, 15, 14, 16, 15, 15, 15, 16, 16, 13, + 11, 14, 15, 15, 13, 15, 16, 16, 14, 16, 16, 16, 12, 15, 15, 13, + 11, 15, 16, 16, 15, 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 11, 15, 14, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 10, 13, 13, 14, 14, 14, 16, 15, 14, 16, 14, 15, 14, 14, 15, 12, + 12, 15, 14, 16, 14, 15, 16, 15, 15, 16, 15, 15, 16, 15, 16, 13, + 12, 16, 14, 16, 15, 16, 16, 16, 16, 16, 14, 15, 16, 16, 16, 14, + 10, 13, 13, 14, 14, 13, 16, 14, 13, 16, 13, 14, 15, 15, 15, 12, + 10, 13, 13, 14, 13, 13, 16, 14, 14, 15, 14, 14, 14, 14, 15, 12, + 10, 14, 15, 14, 13, 15, 16, 15, 14, 16, 16, 16, 11, 14, 16, 12, + 11, 14, 14, 16, 14, 15, 16, 15, 15, 16, 16, 16, 13, 15, 16, 13, + 12, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 15, 16, 13, + 12, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 13, + 10, 13, 14, 14, 13, 14, 16, 14, 13, 16, 15, 14, 12, 14, 16, 11, + 10, 13, 13, 14, 13, 14, 16, 14, 14, 15, 14, 14, 13, 14, 14, 11, + 13, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 11, 13, 14, 15, 14, 14, 16, 15, 14, 16, 14, 15, 14, 15, 16, 12, + 8, 11, 11, 11, 11, 12, 13, 12, 11, 13, 11, 12, 11, 12, 12, 9, + }, + }, + { + { + 8, 8, 8, 7, 8, 7, 8, 6, 8, 8, 7, 6, 7, 6, 6, 4, + 11, 10, 11, 9, 11, 9, 11, 8, 11, 10, 10, 9, 10, 8, 9, 6, + 13, 11, 13, 10, 12, 10, 13, 9, 13, 12, 13, 10, 12, 10, 11, 7, + 11, 11, 10, 9, 11, 10, 11, 9, 10, 11, 9, 8, 10, 9, 9, 6, + 12, 12, 11, 9, 12, 11, 12, 9, 12, 12, 11, 9, 11, 10, 10, 7, + 14, 13, 13, 10, 15, 12, 13, 10, 15, 13, 13, 10, 13, 12, 12, 8, + 13, 13, 11, 10, 14, 13, 12, 10, 13, 13, 10, 10, 12, 11, 10, 8, + 15, 14, 13, 10, 14, 13, 13, 10, 14, 13, 12, 10, 13, 12, 11, 8, + 14, 14, 13, 10, 16, 13, 13, 10, 15, 14, 13, 10, 13, 12, 12, 8, + 11, 11, 11, 10, 10, 9, 10, 9, 10, 10, 10, 9, 9, 8, 9, 6, + 12, 12, 12, 11, 11, 9, 12, 9, 12, 12, 11, 10, 11, 9, 10, 7, + 14, 13, 14, 12, 13, 10, 13, 10, 15, 13, 14, 12, 12, 10, 12, 8, + 13, 13, 12, 11, 12, 11, 12, 10, 12, 12, 11, 10, 11, 10, 10, 7, + 14, 13, 13, 11, 13, 12, 12, 10, 13, 13, 12, 11, 12, 10, 10, 7, + 16, 15, 15, 12, 14, 12, 13, 10, 15, 14, 13, 12, 13, 12, 12, 8, + 15, 15, 13, 13, 14, 14, 14, 12, 14, 14, 12, 11, 13, 12, 11, 8, + 15, 16, 14, 12, 15, 14, 13, 11, 15, 15, 13, 12, 13, 12, 11, 8, + 16, 15, 15, 12, 16, 14, 14, 10, 15, 15, 14, 12, 14, 12, 12, 8, + 13, 13, 13, 13, 11, 10, 12, 10, 12, 13, 12, 11, 10, 10, 10, 8, + 14, 13, 14, 13, 12, 10, 13, 10, 14, 14, 13, 12, 12, 10, 11, 8, + 15, 14, 16, 14, 13, 10, 14, 10, 16, 14, 14, 13, 13, 10, 12, 8, + 15, 15, 14, 14, 14, 13, 13, 12, 14, 14, 13, 12, 12, 11, 11, 9, + 15, 15, 15, 14, 14, 12, 14, 11, 15, 14, 13, 13, 13, 11, 11, 8, + 16, 15, 16, 14, 15, 12, 14, 11, 16, 16, 15, 13, 14, 12, 12, 8, + 16, 16, 16, 14, 15, 14, 14, 12, 15, 15, 14, 13, 13, 12, 11, 9, + 16, 16, 15, 15, 16, 14, 14, 11, 16, 16, 14, 13, 14, 12, 12, 8, + 16, 16, 16, 13, 15, 13, 14, 10, 16, 16, 15, 13, 14, 12, 12, 8, + 11, 11, 11, 10, 11, 10, 11, 9, 10, 10, 9, 8, 9, 9, 9, 6, + 12, 12, 13, 11, 12, 11, 12, 10, 12, 12, 11, 10, 11, 10, 10, 7, + 15, 13, 15, 12, 14, 13, 14, 11, 14, 13, 13, 11, 13, 11, 12, 8, + 12, 13, 12, 11, 13, 11, 12, 10, 11, 12, 10, 9, 11, 10, 10, 7, + 14, 13, 13, 11, 14, 12, 13, 11, 12, 12, 11, 10, 12, 11, 10, 7, + 15, 14, 15, 12, 15, 13, 15, 11, 15, 14, 13, 11, 13, 12, 12, 8, + 14, 14, 13, 12, 15, 14, 13, 12, 13, 13, 11, 10, 13, 12, 11, 8, + 16, 15, 13, 12, 15, 14, 14, 12, 14, 14, 12, 11, 14, 12, 11, 8, + 16, 15, 14, 12, 16, 15, 15, 11, 15, 14, 13, 11, 14, 13, 12, 8, + 12, 12, 12, 11, 12, 11, 12, 10, 11, 11, 11, 10, 10, 9, 9, 7, + 13, 13, 14, 12, 13, 11, 13, 11, 13, 12, 12, 11, 11, 10, 10, 7, + 15, 14, 16, 13, 14, 12, 14, 11, 14, 14, 14, 12, 13, 11, 12, 8, + 13, 13, 13, 12, 13, 12, 13, 11, 12, 12, 11, 10, 11, 10, 10, 7, + 14, 14, 13, 12, 13, 12, 13, 10, 13, 13, 11, 10, 12, 10, 10, 7, + 16, 15, 15, 13, 15, 12, 14, 11, 15, 14, 13, 11, 13, 11, 11, 7, + 15, 16, 14, 13, 15, 14, 14, 12, 14, 14, 12, 11, 13, 12, 11, 8, + 16, 15, 14, 13, 15, 14, 14, 11, 14, 14, 12, 11, 13, 12, 11, 7, + 16, 15, 15, 12, 16, 14, 14, 11, 15, 14, 13, 11, 14, 12, 11, 7, + 14, 15, 14, 14, 13, 12, 13, 12, 13, 13, 12, 12, 11, 10, 11, 8, + 15, 15, 15, 14, 13, 12, 14, 12, 14, 14, 13, 12, 12, 11, 11, 8, + 16, 15, 16, 14, 14, 12, 15, 12, 16, 14, 14, 13, 13, 11, 12, 8, + 15, 15, 15, 14, 14, 13, 14, 12, 14, 14, 13, 12, 12, 11, 11, 8, + 15, 15, 15, 14, 14, 13, 14, 12, 14, 14, 13, 12, 12, 11, 11, 7, + 16, 15, 16, 14, 15, 12, 15, 11, 15, 14, 14, 12, 13, 11, 12, 7, + 16, 16, 16, 15, 16, 15, 14, 13, 15, 15, 13, 12, 13, 12, 11, 9, + 16, 16, 16, 14, 15, 14, 14, 12, 15, 15, 13, 12, 14, 12, 11, 8, + 16, 16, 16, 14, 16, 14, 14, 11, 15, 15, 14, 12, 14, 12, 11, 7, + 13, 13, 13, 12, 13, 12, 13, 11, 11, 12, 11, 10, 10, 10, 10, 8, + 15, 14, 14, 13, 14, 13, 14, 12, 13, 13, 12, 11, 13, 11, 11, 8, + 16, 15, 16, 14, 16, 14, 16, 13, 15, 14, 14, 12, 14, 12, 13, 9, + 14, 15, 13, 13, 14, 13, 14, 12, 12, 13, 11, 11, 12, 11, 11, 8, + 15, 15, 14, 13, 15, 14, 14, 12, 13, 13, 12, 11, 13, 12, 11, 8, + 16, 16, 16, 13, 16, 15, 16, 13, 15, 14, 14, 12, 14, 13, 13, 9, + 14, 15, 13, 13, 16, 15, 15, 13, 13, 14, 11, 11, 13, 12, 11, 9, + 16, 16, 14, 13, 16, 15, 16, 13, 14, 14, 12, 11, 14, 13, 12, 8, + 16, 16, 15, 12, 16, 15, 15, 12, 15, 14, 13, 11, 14, 13, 12, 8, + 14, 14, 14, 13, 14, 13, 14, 12, 12, 13, 12, 11, 11, 11, 11, 8, + 15, 15, 15, 14, 14, 13, 15, 12, 14, 13, 13, 12, 12, 11, 11, 8, + 16, 16, 16, 15, 15, 14, 16, 13, 15, 14, 14, 12, 14, 12, 12, 9, + 15, 15, 14, 14, 14, 14, 14, 13, 13, 14, 12, 11, 12, 11, 11, 8, + 15, 15, 15, 13, 15, 14, 14, 12, 13, 13, 12, 11, 12, 11, 11, 7, + 16, 15, 16, 14, 16, 14, 15, 12, 15, 14, 14, 12, 13, 12, 12, 8, + 16, 16, 15, 14, 16, 15, 15, 13, 14, 14, 12, 11, 13, 12, 11, 8, + 16, 16, 15, 13, 16, 14, 14, 12, 14, 15, 12, 11, 13, 12, 11, 7, + 16, 16, 16, 13, 16, 15, 15, 12, 15, 14, 13, 11, 14, 12, 11, 7, + 15, 15, 15, 14, 13, 13, 14, 13, 13, 14, 13, 12, 11, 11, 11, 8, + 16, 16, 16, 14, 15, 13, 15, 12, 14, 14, 14, 13, 12, 11, 12, 8, + 16, 16, 16, 14, 15, 13, 15, 12, 15, 14, 14, 12, 13, 11, 12, 8, + 15, 16, 16, 14, 15, 14, 15, 13, 14, 14, 12, 12, 11, 11, 11, 8, + 16, 15, 15, 14, 15, 14, 14, 12, 14, 14, 13, 12, 12, 11, 11, 7, + 16, 16, 16, 13, 15, 13, 15, 12, 15, 14, 14, 12, 13, 11, 11, 7, + 16, 16, 16, 15, 15, 16, 15, 13, 14, 14, 12, 12, 12, 12, 11, 8, + 16, 16, 16, 14, 16, 14, 14, 12, 15, 15, 13, 11, 12, 11, 10, 7, + 16, 16, 15, 13, 16, 14, 14, 11, 15, 14, 13, 10, 13, 11, 10, 5, + }, + { + 1, 6, 6, 7, 6, 7, 9, 7, 6, 9, 7, 8, 7, 8, 8, 5, + 5, 8, 10, 10, 10, 10, 12, 11, 11, 12, 11, 11, 11, 12, 12, 9, + 9, 10, 12, 11, 13, 12, 15, 13, 14, 15, 15, 14, 14, 15, 15, 12, + 6, 10, 9, 10, 10, 11, 13, 12, 11, 13, 11, 12, 12, 12, 12, 10, + 6, 10, 10, 10, 11, 11, 13, 11, 11, 13, 12, 12, 11, 12, 12, 10, + 9, 12, 13, 12, 13, 13, 16, 13, 14, 16, 15, 14, 14, 15, 16, 12, + 9, 13, 11, 13, 14, 14, 16, 15, 14, 16, 13, 15, 15, 15, 15, 12, + 9, 13, 12, 13, 14, 15, 16, 15, 14, 16, 15, 15, 15, 15, 16, 12, + 8, 12, 12, 11, 13, 14, 15, 13, 13, 15, 14, 14, 14, 14, 14, 12, + 6, 10, 10, 11, 9, 10, 13, 11, 11, 13, 12, 12, 10, 12, 12, 9, + 6, 10, 11, 11, 11, 10, 13, 12, 11, 13, 12, 12, 12, 12, 13, 10, + 9, 12, 13, 13, 13, 12, 16, 13, 14, 16, 14, 15, 16, 14, 15, 12, + 8, 12, 13, 13, 13, 13, 16, 14, 13, 16, 13, 14, 14, 14, 14, 12, + 7, 11, 11, 12, 11, 12, 14, 13, 12, 14, 13, 13, 12, 13, 13, 11, + 9, 12, 13, 13, 13, 13, 15, 14, 14, 16, 16, 15, 15, 15, 16, 12, + 11, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 14, 14, 15, 15, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 13, + 9, 13, 13, 13, 14, 14, 16, 14, 14, 16, 15, 14, 14, 16, 16, 13, + 9, 13, 14, 14, 11, 13, 16, 14, 13, 16, 15, 16, 13, 14, 15, 12, + 10, 13, 14, 15, 13, 12, 16, 14, 14, 16, 15, 15, 14, 14, 16, 13, + 9, 12, 13, 14, 12, 11, 15, 13, 13, 15, 13, 14, 15, 14, 16, 12, + 11, 15, 16, 16, 14, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 13, + 11, 14, 14, 15, 13, 14, 16, 15, 15, 16, 16, 16, 16, 16, 16, 13, + 10, 12, 13, 14, 13, 13, 16, 14, 14, 14, 14, 16, 15, 14, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 9, 12, 13, 14, 13, 13, 16, 13, 13, 15, 15, 16, 15, 15, 16, 12, + 6, 11, 11, 12, 10, 12, 13, 12, 11, 13, 11, 12, 11, 12, 13, 10, + 9, 12, 13, 13, 13, 13, 16, 14, 14, 15, 14, 14, 14, 14, 14, 12, + 12, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 7, 11, 11, 12, 12, 12, 14, 13, 12, 14, 11, 13, 13, 13, 13, 11, + 8, 12, 12, 13, 12, 13, 14, 13, 13, 14, 13, 13, 13, 14, 14, 11, + 11, 14, 14, 15, 16, 15, 16, 16, 15, 16, 16, 16, 16, 16, 16, 13, + 10, 14, 12, 14, 15, 15, 16, 16, 14, 16, 12, 15, 16, 16, 16, 13, + 11, 14, 13, 15, 15, 15, 16, 16, 14, 16, 14, 14, 16, 16, 16, 13, + 11, 14, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 13, + 7, 11, 12, 11, 10, 12, 14, 13, 12, 14, 13, 13, 10, 12, 13, 10, + 8, 12, 12, 13, 12, 12, 15, 13, 13, 14, 13, 13, 13, 13, 14, 11, + 11, 13, 15, 16, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 9, 12, 13, 13, 13, 13, 15, 14, 13, 15, 13, 14, 13, 14, 14, 12, + 7, 11, 11, 11, 11, 11, 13, 12, 11, 13, 11, 12, 11, 12, 12, 10, + 9, 12, 13, 13, 13, 13, 16, 13, 14, 16, 15, 14, 14, 14, 16, 12, + 12, 14, 14, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 14, + 10, 13, 13, 14, 14, 14, 16, 15, 14, 16, 14, 14, 16, 15, 15, 12, + 9, 12, 13, 13, 13, 15, 16, 14, 13, 16, 14, 13, 13, 14, 14, 11, + 10, 14, 15, 14, 12, 14, 16, 15, 13, 16, 16, 16, 12, 14, 16, 12, + 11, 14, 14, 14, 14, 14, 16, 15, 15, 16, 16, 16, 14, 15, 16, 13, + 11, 14, 14, 16, 14, 13, 16, 15, 14, 16, 15, 16, 15, 15, 16, 13, + 12, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 14, + 10, 13, 14, 14, 13, 14, 16, 14, 13, 16, 15, 15, 13, 14, 14, 12, + 9, 12, 13, 14, 13, 12, 16, 14, 13, 16, 14, 14, 14, 14, 15, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 9, 12, 13, 13, 13, 13, 14, 13, 12, 15, 14, 14, 14, 14, 14, 11, + 11, 14, 14, 16, 14, 16, 16, 16, 13, 16, 14, 16, 14, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 14, 14, 16, 16, 15, 16, 16, 15, 16, 14, 16, 16, 16, 16, 14, + 12, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 14, 12, 15, 15, 15, 16, 16, 14, 16, 12, 14, 16, 16, 15, 14, + 12, 15, 14, 16, 16, 16, 16, 16, 15, 16, 14, 16, 16, 16, 16, 14, + 12, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, + 11, 15, 15, 16, 14, 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 13, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 11, 15, 14, 16, 14, 14, 16, 15, 14, 16, 15, 16, 15, 16, 16, 12, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 12, 16, 15, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 14, + 10, 14, 13, 14, 15, 14, 16, 15, 14, 16, 13, 16, 16, 16, 15, 13, + 10, 14, 14, 14, 13, 14, 16, 15, 15, 16, 14, 14, 14, 16, 16, 12, + 10, 14, 15, 14, 13, 16, 16, 15, 13, 16, 16, 16, 12, 14, 16, 12, + 11, 16, 16, 16, 14, 15, 16, 16, 16, 16, 16, 16, 14, 16, 16, 13, + 12, 15, 14, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 14, + 11, 14, 14, 14, 14, 15, 16, 14, 14, 16, 16, 16, 13, 15, 15, 12, + 10, 14, 13, 14, 14, 14, 16, 15, 14, 16, 15, 15, 14, 14, 16, 12, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 12, 14, 14, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 13, + 8, 11, 11, 12, 12, 12, 13, 12, 11, 13, 12, 12, 12, 13, 12, 10, + }, + }, + { + { + 5, 6, 6, 6, 6, 6, 7, 6, 6, 7, 6, 6, 6, 6, 6, 4, + 9, 9, 9, 8, 9, 8, 10, 8, 10, 10, 9, 9, 9, 8, 9, 6, + 11, 10, 12, 10, 11, 10, 12, 9, 12, 11, 11, 10, 11, 10, 11, 8, + 9, 10, 9, 8, 10, 10, 10, 9, 9, 10, 8, 8, 9, 9, 8, 7, + 10, 11, 10, 9, 11, 11, 11, 9, 11, 11, 10, 9, 10, 10, 10, 7, + 13, 12, 12, 10, 13, 12, 13, 10, 13, 12, 12, 11, 13, 12, 11, 9, + 11, 12, 10, 10, 12, 12, 11, 10, 11, 12, 10, 10, 11, 11, 10, 8, + 12, 12, 11, 10, 13, 13, 13, 10, 13, 13, 12, 11, 13, 12, 11, 9, + 12, 12, 12, 10, 13, 13, 13, 10, 13, 13, 12, 10, 13, 12, 12, 9, + 9, 9, 10, 10, 9, 8, 10, 9, 9, 10, 9, 9, 8, 8, 9, 6, + 10, 11, 11, 11, 10, 9, 11, 9, 11, 11, 11, 10, 10, 9, 10, 7, + 12, 12, 13, 12, 12, 10, 13, 10, 13, 13, 13, 12, 12, 11, 11, 9, + 11, 12, 11, 11, 11, 11, 11, 10, 11, 12, 10, 10, 10, 10, 10, 8, + 12, 12, 12, 11, 12, 11, 11, 10, 12, 12, 11, 11, 11, 11, 10, 8, + 14, 13, 13, 12, 13, 12, 13, 10, 14, 14, 13, 12, 13, 12, 12, 9, + 13, 14, 13, 12, 13, 13, 13, 12, 13, 13, 12, 12, 12, 12, 11, 9, + 14, 14, 13, 12, 13, 13, 13, 11, 14, 14, 13, 12, 13, 12, 12, 9, + 14, 15, 14, 12, 15, 13, 13, 11, 15, 14, 14, 12, 14, 13, 12, 9, + 11, 11, 12, 12, 10, 10, 12, 11, 11, 12, 11, 11, 10, 10, 10, 8, + 12, 12, 14, 13, 11, 10, 12, 11, 13, 13, 13, 12, 12, 10, 11, 9, + 13, 13, 14, 14, 12, 10, 13, 11, 14, 14, 14, 13, 12, 11, 12, 9, + 13, 13, 13, 13, 12, 13, 13, 12, 13, 14, 12, 12, 12, 12, 11, 9, + 13, 14, 14, 13, 13, 12, 13, 11, 14, 14, 13, 12, 13, 12, 12, 9, + 14, 14, 14, 14, 14, 12, 13, 11, 15, 15, 15, 13, 14, 12, 12, 9, + 14, 15, 15, 13, 14, 14, 13, 12, 13, 14, 13, 13, 12, 12, 11, 10, + 16, 16, 15, 14, 15, 14, 13, 11, 15, 15, 14, 13, 13, 13, 12, 9, + 15, 15, 15, 13, 14, 13, 13, 11, 15, 15, 15, 13, 14, 13, 12, 9, + 8, 9, 9, 9, 9, 9, 10, 9, 8, 10, 9, 9, 8, 8, 9, 7, + 11, 11, 11, 11, 11, 11, 12, 10, 11, 11, 11, 10, 10, 10, 10, 8, + 13, 13, 14, 12, 13, 12, 14, 11, 13, 13, 13, 12, 13, 11, 12, 9, + 10, 11, 10, 11, 11, 11, 12, 10, 10, 11, 10, 10, 10, 10, 10, 8, + 12, 12, 12, 11, 12, 12, 12, 11, 11, 12, 11, 10, 11, 11, 10, 8, + 14, 13, 14, 12, 14, 13, 14, 12, 14, 13, 13, 11, 13, 12, 12, 9, + 12, 13, 12, 12, 13, 13, 13, 12, 12, 13, 11, 11, 12, 12, 11, 9, + 13, 14, 13, 12, 14, 14, 14, 12, 14, 13, 12, 11, 13, 12, 12, 9, + 14, 14, 13, 12, 15, 14, 15, 12, 14, 14, 13, 11, 13, 13, 12, 9, + 10, 11, 11, 11, 10, 10, 12, 10, 10, 11, 10, 10, 9, 9, 10, 7, + 12, 12, 13, 12, 12, 11, 12, 11, 12, 12, 12, 11, 11, 10, 10, 8, + 14, 13, 14, 13, 14, 12, 13, 12, 14, 13, 14, 12, 13, 11, 12, 9, + 12, 13, 12, 12, 12, 12, 12, 11, 11, 12, 11, 10, 10, 10, 10, 8, + 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 11, 10, 11, 10, 10, 7, + 14, 14, 14, 12, 14, 12, 14, 11, 14, 13, 13, 11, 13, 11, 11, 8, + 13, 15, 13, 13, 14, 14, 14, 12, 13, 14, 12, 12, 12, 12, 11, 9, + 14, 15, 13, 12, 14, 13, 13, 11, 13, 13, 12, 11, 13, 12, 11, 8, + 15, 15, 15, 12, 15, 14, 14, 11, 14, 14, 13, 11, 13, 12, 12, 8, + 12, 13, 13, 13, 12, 12, 13, 12, 12, 13, 12, 12, 11, 11, 11, 9, + 13, 14, 15, 14, 13, 12, 14, 12, 13, 13, 14, 12, 12, 11, 12, 9, + 14, 14, 15, 14, 14, 12, 14, 12, 14, 14, 14, 13, 13, 11, 12, 9, + 13, 14, 14, 14, 13, 13, 14, 13, 13, 13, 12, 12, 12, 12, 11, 9, + 14, 14, 14, 13, 13, 13, 13, 12, 13, 14, 13, 12, 12, 11, 11, 8, + 15, 14, 15, 14, 14, 13, 14, 11, 15, 14, 14, 12, 13, 11, 12, 8, + 14, 15, 14, 14, 15, 14, 14, 13, 14, 15, 13, 13, 12, 12, 11, 10, + 16, 15, 14, 14, 14, 14, 13, 12, 14, 14, 13, 12, 13, 12, 11, 9, + 15, 15, 15, 14, 16, 14, 14, 11, 15, 15, 14, 12, 13, 12, 11, 8, + 11, 12, 11, 12, 12, 12, 12, 11, 10, 11, 10, 10, 10, 10, 10, 8, + 13, 13, 13, 13, 13, 13, 14, 12, 12, 12, 12, 12, 12, 11, 12, 9, + 14, 14, 14, 13, 15, 13, 15, 13, 14, 14, 14, 12, 14, 12, 13, 10, + 12, 13, 12, 13, 13, 13, 13, 12, 11, 12, 11, 11, 12, 11, 11, 9, + 14, 14, 13, 13, 14, 14, 14, 12, 12, 13, 12, 11, 13, 12, 12, 9, + 14, 14, 15, 13, 15, 15, 15, 13, 15, 13, 13, 12, 14, 12, 13, 10, + 13, 15, 12, 13, 14, 14, 14, 13, 12, 13, 11, 11, 13, 12, 11, 10, + 14, 15, 14, 13, 15, 14, 15, 13, 14, 14, 12, 11, 13, 13, 12, 9, + 14, 15, 14, 13, 15, 14, 15, 13, 14, 14, 13, 11, 14, 13, 12, 9, + 12, 13, 13, 13, 12, 13, 13, 12, 11, 12, 12, 11, 11, 11, 11, 9, + 13, 14, 14, 13, 14, 13, 14, 12, 13, 13, 13, 12, 12, 11, 11, 9, + 15, 15, 16, 14, 15, 14, 14, 13, 15, 14, 14, 13, 13, 12, 13, 10, + 13, 14, 14, 13, 13, 14, 14, 13, 12, 13, 12, 12, 11, 11, 11, 9, + 14, 14, 14, 13, 14, 13, 14, 12, 13, 13, 12, 11, 12, 11, 11, 8, + 15, 15, 15, 13, 15, 14, 14, 12, 14, 13, 13, 12, 13, 12, 12, 9, + 14, 15, 14, 14, 15, 15, 14, 13, 13, 14, 12, 12, 13, 12, 12, 9, + 15, 15, 14, 13, 15, 14, 14, 13, 14, 14, 12, 11, 13, 12, 11, 8, + 15, 16, 14, 13, 15, 15, 15, 12, 14, 14, 13, 11, 14, 12, 12, 8, + 12, 14, 13, 13, 13, 13, 14, 12, 12, 13, 12, 12, 10, 11, 11, 9, + 14, 15, 15, 14, 13, 13, 15, 13, 13, 14, 14, 12, 12, 11, 12, 9, + 15, 15, 16, 14, 14, 13, 15, 13, 14, 14, 14, 13, 13, 11, 12, 9, + 14, 15, 14, 14, 14, 14, 14, 13, 13, 14, 13, 12, 12, 12, 11, 9, + 14, 15, 15, 14, 14, 14, 14, 12, 13, 14, 13, 12, 12, 11, 11, 8, + 15, 15, 15, 14, 14, 13, 15, 12, 15, 14, 14, 12, 13, 11, 11, 8, + 14, 16, 14, 14, 14, 15, 14, 13, 13, 14, 12, 12, 12, 12, 11, 9, + 15, 15, 15, 14, 15, 14, 14, 12, 14, 14, 13, 12, 12, 11, 11, 8, + 15, 15, 14, 13, 15, 13, 14, 12, 14, 14, 13, 11, 13, 11, 11, 7, + }, + { + 1, 5, 6, 7, 6, 7, 9, 8, 6, 9, 8, 8, 7, 8, 8, 6, + 5, 8, 10, 10, 10, 11, 13, 12, 11, 13, 12, 12, 12, 12, 13, 10, + 8, 10, 13, 12, 13, 13, 16, 14, 14, 16, 16, 14, 16, 16, 16, 12, + 5, 10, 9, 11, 11, 12, 13, 12, 11, 13, 11, 12, 12, 12, 13, 10, + 6, 10, 11, 11, 11, 12, 14, 12, 11, 13, 13, 13, 12, 13, 13, 11, + 8, 12, 13, 12, 14, 14, 16, 14, 14, 16, 16, 16, 16, 16, 16, 13, + 9, 13, 11, 14, 14, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 13, + 9, 13, 13, 13, 14, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 14, + 8, 12, 13, 12, 13, 14, 16, 14, 14, 16, 16, 16, 14, 16, 16, 13, + 5, 10, 11, 12, 9, 11, 13, 12, 11, 13, 13, 13, 11, 12, 13, 10, + 6, 10, 11, 12, 11, 11, 14, 13, 12, 14, 12, 13, 13, 13, 13, 11, + 9, 12, 14, 15, 13, 13, 16, 16, 14, 16, 16, 16, 16, 16, 16, 13, + 8, 13, 13, 14, 13, 14, 16, 16, 14, 16, 14, 16, 14, 16, 14, 13, + 7, 11, 12, 13, 12, 12, 14, 13, 12, 14, 13, 14, 13, 14, 14, 12, + 9, 13, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 15, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 9, 13, 14, 14, 14, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14, + 9, 13, 14, 15, 11, 13, 16, 14, 14, 16, 16, 16, 13, 14, 16, 13, + 9, 13, 14, 16, 13, 13, 16, 16, 14, 16, 16, 16, 16, 15, 16, 14, + 8, 12, 13, 16, 13, 12, 16, 14, 13, 16, 14, 16, 16, 16, 16, 13, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 14, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 9, 13, 16, 16, 14, 14, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 13, 14, 15, 14, 14, 16, 14, 13, 16, 16, 16, 14, 16, 16, 14, + 6, 11, 11, 12, 11, 12, 14, 13, 11, 14, 12, 13, 12, 13, 13, 11, + 9, 13, 13, 14, 13, 14, 16, 16, 14, 16, 16, 16, 15, 16, 16, 13, + 11, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 7, 11, 11, 13, 12, 13, 16, 14, 12, 16, 12, 14, 14, 14, 14, 12, + 8, 12, 12, 13, 12, 14, 16, 14, 13, 16, 14, 14, 14, 14, 14, 12, + 11, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 14, 13, 16, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 16, + 10, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 7, 11, 12, 12, 11, 13, 16, 14, 12, 15, 14, 14, 11, 13, 13, 12, + 8, 12, 12, 13, 13, 13, 16, 14, 13, 16, 13, 15, 13, 14, 14, 12, + 11, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 8, 12, 13, 14, 13, 14, 16, 16, 14, 16, 14, 16, 14, 16, 15, 13, + 6, 11, 11, 12, 11, 12, 13, 13, 11, 13, 12, 13, 12, 13, 13, 11, + 9, 13, 14, 14, 14, 14, 16, 14, 14, 16, 16, 16, 16, 16, 14, 13, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 14, 13, 14, 14, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 13, + 9, 13, 14, 13, 13, 16, 16, 14, 13, 16, 16, 16, 13, 16, 14, 13, + 10, 14, 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 14, + 11, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 14, 16, 16, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 14, 14, 14, 14, 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 13, + 9, 13, 13, 16, 14, 14, 16, 16, 14, 16, 14, 16, 16, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 13, 14, 14, 13, 16, 16, 14, 13, 16, 14, 16, 14, 14, 16, 12, + 10, 14, 14, 16, 16, 16, 16, 16, 13, 16, 16, 16, 14, 16, 16, 14, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 14, 13, 16, 16, 16, 16, 16, 14, 16, 12, 16, 16, 16, 16, 14, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 14, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 11, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 15, 14, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 14, + 10, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 10, 14, 16, 16, 13, 16, 16, 16, 14, 16, 16, 16, 12, 16, 16, 14, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, + 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 15, 14, 16, 14, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 13, + 10, 15, 14, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 8, 12, 12, 13, 12, 14, 14, 14, 12, 16, 13, 14, 12, 14, 14, 11, + }, + }, +}; + + +static const uint8_t rv34_table_intra_cbp[NUM_INTRA_TABLES][8][CBP_VLC_SIZE] = { + { + { 0, 3, 3, 4, 3, 5, 5, 5, 2, 5, 4, 6, 4, 6, 6, 6, }, + { 0, 2, 3, 4, 2, 5, 6, 7, 3, 6, 5, 7, 4, 7, 8, 8, }, + { 0, 3, 4, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 3, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 6, 3, 5, 6, 5, }, + { 0, 4, 4, 4, 4, 5, 5, 4, 4, 5, 4, 5, 4, 4, 4, 2, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 6, 6, 5, 6, 5, 6, 4, 6, 6, 5, 4, 4, 4, 4, 1, }, + { 0, 4, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 4, 4, 2, }, + }, + { + { 0, 4, 3, 4, 3, 4, 5, 4, 3, 5, 4, 5, 3, 5, 5, 5, }, + { 0, 2, 3, 4, 2, 5, 6, 7, 3, 6, 5, 7, 4, 7, 8, 8, }, + { 0, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 3, 4, 4, 3, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 6, 3, 5, 6, 5, }, + { 0, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 5, 4, 4, 4, 2, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 5, 6, 5, 5, 5, 6, 4, 6, 6, 5, 4, 5, 4, 4, 1, }, + { 0, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 4, 4, 4, 5, 2, }, + }, + { + { 0, 3, 3, 4, 3, 4, 4, 5, 3, 5, 4, 5, 4, 5, 5, 5, }, + { 0, 2, 3, 4, 2, 4, 6, 7, 3, 6, 5, 7, 5, 7, 8, 8, }, + { 0, 4, 4, 4, 4, 4, 5, 4, 3, 5, 4, 4, 4, 4, 4, 3, }, + { 0, 3, 3, 4, 3, 3, 6, 6, 3, 6, 4, 6, 3, 6, 6, 5, }, + { 0, 4, 4, 4, 3, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 5, 5, 4, 4, 1, }, + { 0, 4, 4, 4, 4, 4, 6, 4, 4, 6, 5, 4, 4, 4, 4, 2, }, + }, + { + { 0, 3, 3, 4, 3, 4, 4, 5, 3, 5, 4, 5, 4, 5, 5, 5, }, + { 0, 2, 3, 4, 2, 4, 7, 6, 3, 7, 5, 7, 5, 7, 7, 7, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 3, 3, 3, 3, 4, 6, 6, 3, 6, 4, 6, 3, 6, 6, 5, }, + { 0, 3, 4, 4, 3, 4, 5, 4, 4, 5, 4, 5, 4, 5, 4, 3, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 4, 5, 4, 4, 4, 5, 4, 4, 5, 5, 4, 4, 4, 4, 2, }, + { 0, 4, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 4, 4, 2, }, + }, + { + { 0, 3, 3, 4, 3, 4, 5, 6, 2, 5, 4, 7, 4, 6, 6, 7, }, + { 0, 2, 3, 4, 2, 4, 6, 7, 3, 7, 5, 7, 5, 7, 7, 7, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 2, 3, 4, 3, 4, 6, 5, 3, 6, 4, 6, 4, 6, 6, 6, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, }, + { 0, 4, 4, 4, 4, 5, 5, 4, 4, 5, 5, 4, 4, 4, 4, 2, }, + { 0, 3, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3, }, + }, +}; + + +static const uint8_t rv34_table_intra_firstpat[NUM_INTRA_TABLES][4][FIRSTBLK_VLC_SIZE] = { + { + { + 0, 10, 5, 10, 7, 12, 9, 11, 8, 13, 9, 12, 10, 13, 11, 12, + 16, 16, 14, 15, 15, 16, 13, 14, 5, 12, 6, 11, 9, 13, 10, 11, + 9, 14, 9, 12, 11, 14, 11, 12, 16, 16, 14, 15, 15, 16, 13, 13, + 10, 15, 9, 12, 12, 16, 11, 12, 12, 16, 10, 13, 13, 16, 11, 12, + 16, 16, 13, 14, 15, 16, 13, 12, 6, 12, 8, 11, 8, 12, 10, 11, + 9, 14, 10, 12, 10, 13, 11, 12, 15, 16, 14, 15, 14, 16, 13, 13, + 8, 13, 9, 12, 10, 13, 10, 12, 10, 14, 9, 12, 11, 14, 10, 12, + 15, 16, 13, 15, 14, 16, 13, 13, 11, 16, 10, 13, 13, 16, 11, 12, + 12, 16, 11, 13, 13, 16, 11, 12, 16, 16, 13, 14, 15, 16, 12, 12, + 10, 16, 12, 14, 10, 14, 11, 12, 12, 16, 13, 14, 11, 14, 12, 12, + 16, 16, 15, 16, 14, 15, 13, 13, 11, 16, 12, 14, 11, 14, 11, 12, + 12, 16, 12, 14, 11, 14, 11, 12, 16, 16, 14, 15, 13, 15, 13, 12, + 14, 16, 13, 14, 13, 16, 12, 12, 14, 16, 13, 14, 13, 16, 12, 12, + 16, 16, 14, 14, 14, 15, 12, 11, 2, 10, 6, 10, 7, 12, 9, 11, + 8, 12, 9, 11, 10, 13, 10, 11, 15, 16, 14, 15, 14, 16, 13, 13, + 5, 12, 6, 11, 9, 13, 10, 11, 9, 13, 9, 11, 10, 13, 10, 11, + 15, 16, 13, 14, 14, 16, 13, 13, 9, 15, 8, 12, 12, 15, 11, 11, + 11, 16, 10, 12, 13, 15, 11, 11, 15, 16, 13, 14, 15, 16, 12, 12, + 6, 12, 8, 11, 8, 12, 9, 11, 9, 14, 9, 12, 10, 13, 10, 11, + 15, 16, 14, 15, 14, 16, 13, 13, 7, 13, 8, 11, 9, 13, 10, 11, + 9, 14, 9, 12, 10, 13, 10, 11, 14, 16, 13, 14, 13, 16, 12, 12, + 11, 16, 10, 12, 12, 15, 11, 11, 11, 16, 10, 12, 12, 15, 11, 11, + 15, 16, 12, 13, 14, 16, 12, 11, 9, 15, 11, 13, 9, 13, 11, 12, + 11, 16, 12, 14, 10, 14, 11, 12, 16, 16, 14, 15, 13, 15, 12, 12, + 11, 16, 11, 14, 10, 14, 11, 12, 11, 16, 12, 13, 11, 14, 11, 11, + 15, 16, 14, 15, 13, 14, 12, 12, 13, 16, 12, 14, 13, 15, 11, 11, + 13, 16, 12, 14, 13, 15, 11, 11, 16, 16, 13, 14, 13, 15, 11, 10, + 5, 12, 7, 11, 8, 13, 10, 11, 9, 13, 9, 12, 10, 14, 11, 12, + 16, 16, 14, 15, 14, 16, 13, 13, 7, 13, 7, 11, 9, 13, 10, 11, + 9, 14, 9, 12, 11, 14, 11, 12, 16, 16, 14, 14, 14, 16, 13, 13, + 9, 15, 8, 12, 12, 15, 11, 12, 11, 16, 10, 12, 13, 16, 11, 12, + 16, 16, 13, 14, 15, 16, 12, 12, 7, 13, 8, 12, 9, 13, 10, 11, + 10, 14, 10, 12, 10, 14, 11, 12, 16, 16, 14, 15, 14, 16, 13, 13, + 8, 14, 9, 12, 10, 13, 10, 11, 9, 14, 9, 12, 10, 14, 10, 11, + 15, 16, 13, 14, 14, 16, 12, 12, 11, 16, 10, 12, 12, 15, 11, 12, + 11, 16, 10, 12, 12, 15, 11, 11, 15, 16, 12, 14, 14, 16, 12, 11, + 10, 16, 11, 13, 9, 14, 11, 12, 12, 16, 12, 14, 11, 14, 11, 12, + 16, 16, 14, 16, 14, 15, 13, 12, 11, 16, 11, 14, 10, 14, 11, 12, + 11, 16, 12, 14, 11, 14, 11, 11, 15, 16, 14, 15, 13, 15, 12, 12, + 13, 16, 12, 14, 13, 15, 11, 11, 13, 16, 12, 14, 12, 14, 11, 11, + 15, 16, 12, 13, 13, 14, 11, 10, 6, 13, 8, 11, 9, 13, 10, 11, + 10, 14, 10, 12, 10, 13, 10, 11, 15, 16, 13, 13, 13, 14, 12, 11, + 7, 13, 8, 11, 9, 13, 9, 11, 10, 14, 9, 11, 10, 13, 10, 11, + 15, 16, 13, 13, 13, 14, 11, 11, 9, 14, 8, 11, 10, 13, 9, 10, + 11, 15, 9, 11, 11, 13, 9, 10, 15, 16, 12, 13, 13, 14, 10, 9, + 7, 13, 8, 11, 9, 13, 9, 11, 10, 14, 10, 12, 10, 13, 10, 11, + 15, 16, 13, 13, 13, 14, 11, 11, 8, 13, 8, 11, 9, 13, 9, 10, + 9, 14, 9, 11, 10, 13, 9, 10, 14, 16, 12, 13, 13, 14, 11, 10, + 9, 14, 8, 11, 10, 13, 9, 9, 10, 14, 8, 11, 10, 13, 9, 9, + 14, 16, 11, 12, 12, 14, 10, 9, 9, 14, 9, 12, 8, 12, 9, 10, + 11, 15, 10, 12, 10, 13, 9, 10, 15, 16, 13, 13, 12, 13, 11, 10, + 9, 14, 9, 12, 9, 12, 9, 10, 10, 14, 10, 12, 9, 12, 9, 9, + 14, 16, 12, 13, 11, 13, 10, 9, 10, 14, 9, 11, 10, 12, 8, 8, + 10, 14, 9, 11, 10, 12, 8, 8, 12, 14, 9, 10, 10, 11, 8, 7, + }, + { + 0, 9, 6, 9, 6, 10, 8, 9, 7, 11, 8, 11, 9, 11, 9, 10, + 14, 16, 13, 14, 13, 14, 12, 11, 5, 11, 7, 10, 8, 10, 8, 9, + 8, 12, 8, 11, 9, 12, 9, 10, 14, 16, 12, 13, 13, 14, 11, 11, + 10, 14, 9, 11, 11, 13, 10, 10, 11, 15, 9, 11, 12, 13, 10, 10, + 15, 16, 12, 12, 13, 14, 11, 9, 6, 11, 7, 10, 7, 10, 8, 9, + 8, 12, 9, 11, 9, 11, 9, 10, 14, 16, 13, 13, 13, 14, 11, 11, + 7, 12, 8, 11, 8, 11, 9, 9, 9, 13, 9, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 12, 14, 11, 10, 11, 14, 10, 12, 11, 13, 10, 10, + 12, 15, 10, 12, 12, 13, 10, 10, 15, 16, 12, 12, 13, 14, 10, 9, + 10, 14, 11, 13, 9, 12, 10, 10, 11, 15, 12, 13, 10, 12, 10, 10, + 14, 16, 13, 14, 12, 13, 11, 10, 11, 14, 11, 13, 10, 12, 10, 10, + 12, 15, 11, 13, 10, 12, 10, 10, 15, 16, 13, 13, 12, 13, 11, 9, + 13, 16, 12, 13, 12, 13, 10, 9, 14, 16, 12, 13, 12, 13, 10, 9, + 16, 16, 12, 12, 13, 13, 10, 7, 4, 10, 6, 9, 7, 10, 8, 9, + 8, 12, 9, 11, 9, 11, 9, 9, 14, 16, 13, 13, 13, 14, 11, 11, + 6, 11, 7, 10, 8, 11, 8, 9, 9, 12, 9, 11, 9, 12, 9, 9, + 14, 16, 12, 13, 13, 14, 11, 10, 10, 14, 9, 11, 11, 13, 9, 9, + 11, 14, 9, 11, 11, 13, 10, 9, 14, 16, 11, 12, 13, 14, 10, 9, + 6, 11, 8, 10, 7, 10, 8, 9, 9, 12, 9, 11, 9, 11, 9, 9, + 14, 16, 13, 13, 12, 13, 11, 10, 8, 12, 8, 10, 8, 11, 9, 9, + 9, 12, 9, 11, 9, 11, 9, 9, 14, 16, 12, 13, 12, 13, 11, 10, + 11, 14, 10, 11, 11, 13, 9, 9, 11, 14, 10, 11, 11, 13, 9, 9, + 14, 16, 11, 12, 13, 14, 10, 8, 10, 14, 11, 12, 9, 12, 10, 10, + 11, 14, 11, 13, 10, 12, 10, 10, 14, 16, 13, 14, 12, 13, 11, 9, + 11, 14, 11, 12, 10, 12, 10, 10, 11, 14, 11, 12, 10, 12, 10, 9, + 14, 16, 13, 13, 11, 12, 10, 9, 13, 16, 12, 13, 12, 13, 10, 9, + 13, 16, 11, 12, 11, 13, 10, 8, 15, 16, 12, 12, 12, 12, 9, 7, + 8, 12, 8, 11, 9, 12, 9, 10, 10, 14, 10, 12, 11, 13, 10, 10, + 16, 16, 14, 14, 14, 14, 12, 11, 8, 13, 8, 11, 9, 12, 10, 10, + 11, 14, 10, 12, 11, 13, 10, 10, 16, 16, 13, 14, 14, 14, 12, 11, + 11, 14, 9, 12, 11, 13, 10, 10, 12, 15, 10, 12, 12, 14, 10, 10, + 15, 16, 12, 12, 14, 14, 11, 9, 9, 13, 9, 11, 9, 12, 10, 10, + 11, 14, 10, 12, 10, 12, 10, 10, 15, 16, 14, 14, 13, 14, 12, 11, + 9, 13, 9, 11, 10, 12, 10, 10, 10, 14, 10, 12, 10, 12, 10, 10, + 15, 16, 13, 13, 13, 14, 11, 10, 11, 15, 10, 12, 11, 13, 10, 10, + 11, 15, 10, 12, 12, 13, 10, 9, 15, 16, 11, 12, 13, 14, 10, 9, + 11, 15, 11, 13, 10, 12, 10, 10, 12, 16, 12, 13, 11, 13, 10, 10, + 16, 16, 14, 14, 12, 13, 11, 9, 11, 15, 11, 13, 10, 13, 10, 10, + 12, 15, 12, 13, 10, 12, 10, 10, 14, 16, 13, 13, 12, 13, 10, 9, + 13, 16, 12, 13, 12, 13, 10, 9, 13, 16, 11, 12, 11, 13, 10, 9, + 14, 16, 11, 12, 12, 12, 9, 7, 10, 15, 10, 12, 11, 13, 10, 10, + 12, 16, 12, 13, 12, 13, 11, 10, 16, 16, 14, 14, 14, 15, 12, 10, + 10, 14, 10, 12, 10, 13, 10, 10, 12, 15, 11, 12, 11, 13, 10, 10, + 16, 16, 14, 13, 14, 14, 11, 9, 11, 14, 10, 11, 11, 12, 9, 9, + 12, 15, 10, 11, 11, 13, 9, 8, 16, 16, 12, 12, 13, 13, 10, 7, + 10, 15, 10, 12, 10, 13, 10, 10, 12, 15, 11, 12, 11, 13, 10, 10, + 16, 16, 14, 13, 14, 14, 11, 9, 10, 14, 10, 12, 10, 12, 10, 10, + 12, 15, 11, 12, 11, 13, 10, 10, 16, 16, 13, 13, 13, 14, 11, 9, + 11, 14, 10, 11, 10, 12, 9, 8, 11, 14, 9, 11, 11, 12, 9, 8, + 14, 16, 10, 11, 12, 13, 9, 7, 11, 15, 11, 12, 10, 12, 10, 9, + 13, 16, 11, 12, 11, 12, 10, 9, 16, 16, 13, 13, 12, 13, 10, 7, + 11, 15, 10, 12, 10, 12, 9, 8, 12, 15, 11, 12, 10, 12, 9, 8, + 14, 16, 12, 12, 11, 12, 9, 7, 11, 14, 10, 11, 10, 12, 8, 7, + 11, 14, 9, 10, 10, 11, 8, 6, 12, 15, 9, 9, 9, 10, 7, 4, + }, + { + 0, 6, 3, 7, 3, 7, 6, 7, 5, 9, 6, 9, 7, 9, 8, 8, + 16, 16, 16, 16, 16, 16, 16, 11, 3, 8, 5, 8, 6, 8, 7, 7, + 7, 11, 7, 10, 8, 10, 8, 9, 16, 16, 16, 16, 16, 16, 14, 10, + 8, 16, 7, 11, 10, 16, 9, 9, 11, 16, 9, 14, 16, 16, 10, 9, + 16, 16, 16, 16, 16, 16, 16, 10, 3, 8, 5, 8, 5, 8, 7, 7, + 7, 11, 8, 10, 8, 10, 8, 9, 16, 16, 16, 16, 16, 16, 16, 11, + 6, 10, 7, 9, 7, 10, 8, 8, 8, 11, 8, 10, 8, 11, 8, 8, + 16, 16, 16, 16, 16, 16, 11, 10, 10, 16, 9, 13, 11, 16, 10, 9, + 11, 16, 9, 11, 16, 16, 10, 9, 16, 16, 11, 16, 16, 16, 11, 9, + 9, 16, 10, 11, 8, 11, 9, 9, 11, 16, 12, 16, 10, 16, 10, 10, + 16, 16, 16, 16, 16, 16, 16, 10, 10, 16, 11, 16, 10, 16, 10, 10, + 11, 16, 11, 16, 10, 16, 10, 9, 16, 16, 16, 16, 16, 16, 11, 9, + 16, 16, 16, 16, 16, 16, 11, 9, 16, 16, 16, 16, 16, 16, 11, 9, + 16, 16, 11, 16, 16, 16, 9, 7, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 2, 8, 5, 9, 6, 9, 8, 8, 8, 12, 9, 11, 9, 11, 10, 10, + 16, 16, 14, 16, 14, 16, 14, 12, 5, 10, 6, 9, 8, 10, 8, 9, + 9, 12, 9, 11, 10, 12, 10, 10, 16, 16, 14, 15, 15, 16, 13, 12, + 10, 13, 9, 12, 11, 12, 10, 10, 12, 15, 11, 12, 12, 13, 11, 10, + 16, 16, 15, 14, 15, 16, 13, 12, 6, 10, 8, 10, 7, 10, 8, 9, + 9, 13, 10, 11, 10, 12, 10, 10, 16, 16, 14, 16, 14, 16, 13, 12, + 7, 11, 8, 11, 9, 11, 9, 9, 10, 13, 10, 11, 10, 12, 10, 9, + 16, 16, 14, 14, 14, 15, 12, 11, 11, 14, 11, 12, 11, 13, 10, 10, + 12, 15, 11, 13, 12, 13, 11, 10, 16, 16, 14, 16, 15, 15, 13, 11, + 10, 13, 11, 12, 10, 12, 10, 10, 12, 15, 12, 13, 11, 13, 11, 11, + 16, 16, 15, 16, 14, 15, 13, 11, 11, 14, 11, 13, 11, 12, 11, 10, + 12, 16, 12, 13, 12, 13, 11, 10, 16, 16, 15, 16, 13, 15, 12, 11, + 13, 15, 12, 13, 13, 14, 11, 11, 14, 16, 13, 13, 13, 14, 11, 11, + 16, 16, 15, 14, 15, 15, 12, 10, 3, 8, 6, 9, 7, 9, 8, 8, + 8, 12, 9, 11, 9, 11, 9, 9, 16, 16, 15, 15, 15, 16, 13, 12, + 6, 10, 7, 9, 8, 10, 8, 8, 9, 12, 9, 11, 10, 12, 10, 9, + 16, 16, 14, 14, 14, 15, 13, 11, 10, 13, 9, 11, 11, 12, 10, 10, + 12, 14, 11, 12, 12, 13, 11, 10, 16, 16, 14, 14, 15, 15, 13, 11, + 6, 10, 8, 10, 7, 10, 8, 9, 10, 12, 10, 11, 10, 11, 10, 9, + 16, 16, 14, 15, 14, 15, 13, 11, 8, 11, 8, 10, 9, 11, 9, 9, + 9, 13, 9, 11, 10, 11, 9, 9, 16, 16, 13, 14, 14, 14, 12, 10, + 11, 14, 10, 12, 11, 12, 10, 10, 12, 14, 11, 12, 12, 13, 10, 10, + 16, 16, 13, 14, 15, 15, 12, 10, 10, 13, 11, 12, 10, 12, 10, 10, + 12, 14, 12, 13, 11, 13, 11, 10, 16, 16, 15, 14, 14, 14, 12, 11, + 11, 14, 11, 12, 10, 12, 10, 10, 12, 15, 12, 12, 11, 13, 10, 10, + 16, 16, 14, 15, 13, 14, 12, 10, 13, 15, 12, 13, 12, 13, 11, 10, + 13, 16, 12, 13, 12, 13, 11, 10, 16, 16, 13, 14, 13, 15, 11, 9, + 6, 10, 8, 10, 8, 11, 9, 10, 11, 13, 11, 12, 11, 13, 11, 10, + 16, 16, 16, 16, 16, 16, 13, 12, 8, 11, 9, 11, 9, 11, 10, 10, + 11, 14, 11, 12, 11, 12, 11, 10, 16, 16, 15, 15, 16, 16, 13, 12, + 11, 14, 10, 12, 12, 13, 11, 10, 13, 16, 12, 13, 13, 14, 11, 11, + 16, 16, 15, 16, 16, 16, 13, 12, 8, 12, 9, 11, 9, 11, 10, 10, + 11, 14, 11, 12, 11, 12, 11, 10, 16, 16, 16, 16, 16, 16, 13, 12, + 9, 12, 10, 11, 10, 12, 10, 10, 11, 14, 11, 12, 11, 13, 10, 10, + 16, 16, 15, 14, 15, 15, 13, 11, 12, 14, 11, 13, 12, 13, 11, 10, + 12, 15, 11, 12, 13, 13, 11, 10, 16, 16, 14, 15, 16, 15, 13, 11, + 11, 15, 12, 13, 11, 13, 11, 10, 13, 16, 13, 14, 12, 14, 11, 11, + 16, 16, 16, 16, 15, 15, 13, 12, 12, 14, 12, 13, 11, 13, 11, 10, + 13, 15, 12, 13, 11, 13, 11, 10, 16, 16, 15, 15, 13, 15, 13, 11, + 13, 16, 13, 13, 13, 13, 12, 11, 13, 16, 13, 13, 13, 13, 11, 10, + 16, 16, 13, 15, 14, 14, 12, 9, 9, 13, 10, 12, 11, 13, 11, 11, + 13, 16, 13, 14, 13, 14, 12, 11, 16, 16, 16, 16, 16, 16, 14, 12, + 10, 14, 11, 13, 11, 13, 11, 10, 13, 16, 13, 13, 13, 14, 12, 11, + 16, 16, 16, 16, 16, 16, 14, 12, 11, 15, 11, 13, 12, 13, 11, 10, + 14, 16, 12, 13, 13, 14, 12, 10, 16, 16, 15, 16, 16, 16, 13, 11, + 10, 14, 11, 12, 11, 13, 11, 10, 13, 16, 12, 13, 12, 14, 12, 11, + 16, 16, 16, 16, 16, 16, 14, 12, 11, 14, 11, 12, 11, 13, 11, 10, + 13, 15, 12, 13, 12, 13, 11, 10, 16, 16, 15, 15, 16, 16, 13, 11, + 12, 15, 12, 13, 12, 13, 11, 10, 13, 16, 12, 13, 13, 13, 11, 10, + 16, 16, 14, 14, 16, 15, 13, 10, 12, 15, 12, 13, 12, 13, 11, 10, + 14, 16, 13, 14, 13, 14, 12, 11, 16, 16, 16, 16, 15, 16, 13, 11, + 12, 16, 12, 13, 12, 13, 11, 10, 13, 16, 13, 13, 12, 14, 11, 10, + 16, 16, 15, 16, 14, 15, 13, 10, 12, 15, 12, 14, 12, 13, 11, 10, + 13, 16, 12, 13, 12, 13, 11, 10, 16, 16, 13, 14, 13, 14, 11, 8, + }, + }, + { + { + 0, 11, 5, 11, 7, 13, 10, 12, 7, 13, 9, 13, 10, 14, 12, 13, + 16, 16, 15, 16, 16, 16, 15, 15, 4, 13, 6, 12, 10, 14, 11, 12, + 8, 14, 9, 13, 11, 15, 12, 13, 16, 16, 15, 16, 15, 16, 15, 14, + 9, 16, 9, 13, 13, 16, 12, 13, 12, 16, 10, 14, 14, 16, 13, 13, + 16, 16, 14, 16, 16, 16, 14, 14, 5, 13, 8, 13, 8, 13, 11, 12, + 9, 14, 10, 13, 10, 14, 12, 13, 16, 16, 15, 16, 15, 16, 14, 15, + 7, 14, 9, 13, 10, 14, 11, 13, 9, 15, 10, 13, 11, 14, 12, 13, + 16, 16, 14, 16, 15, 16, 14, 14, 11, 16, 11, 14, 13, 16, 12, 13, + 12, 16, 11, 14, 14, 16, 12, 13, 16, 16, 14, 15, 16, 16, 14, 13, + 10, 16, 12, 15, 10, 15, 12, 14, 12, 16, 13, 16, 11, 15, 13, 14, + 16, 16, 16, 16, 14, 16, 14, 14, 11, 16, 12, 15, 11, 16, 12, 13, + 12, 16, 13, 15, 12, 16, 12, 13, 16, 16, 16, 16, 14, 16, 14, 14, + 14, 16, 13, 15, 14, 16, 13, 13, 14, 16, 14, 15, 14, 16, 13, 13, + 16, 16, 15, 16, 15, 16, 13, 13, 2, 12, 6, 11, 7, 13, 10, 12, + 7, 13, 9, 12, 10, 14, 11, 12, 16, 16, 15, 16, 15, 16, 14, 15, + 5, 13, 6, 12, 9, 13, 10, 12, 8, 14, 9, 13, 11, 14, 11, 13, + 16, 16, 14, 16, 15, 16, 14, 14, 9, 16, 8, 13, 12, 16, 11, 13, + 11, 16, 10, 13, 13, 16, 12, 13, 16, 16, 13, 15, 16, 16, 13, 13, + 5, 13, 8, 12, 7, 13, 10, 12, 8, 14, 10, 13, 10, 14, 11, 13, + 16, 16, 14, 16, 15, 16, 14, 14, 7, 14, 8, 12, 9, 14, 11, 12, + 8, 14, 9, 13, 10, 14, 11, 12, 15, 16, 14, 15, 14, 16, 13, 14, + 11, 16, 10, 13, 13, 16, 12, 13, 11, 16, 10, 13, 13, 16, 12, 13, + 16, 16, 13, 15, 15, 16, 13, 13, 9, 16, 12, 15, 9, 14, 11, 13, + 11, 16, 13, 15, 11, 14, 12, 13, 16, 16, 15, 16, 14, 16, 14, 14, + 11, 16, 12, 14, 11, 15, 12, 13, 11, 16, 12, 14, 11, 15, 12, 13, + 16, 16, 15, 16, 14, 16, 13, 13, 13, 16, 13, 15, 13, 16, 12, 13, + 14, 16, 13, 15, 13, 16, 12, 12, 16, 16, 14, 15, 14, 16, 12, 12, + 4, 13, 7, 12, 8, 14, 11, 12, 9, 14, 10, 13, 11, 14, 12, 13, + 16, 16, 15, 16, 16, 16, 15, 15, 6, 14, 7, 12, 10, 14, 11, 12, + 9, 15, 10, 13, 11, 15, 12, 13, 16, 16, 15, 16, 16, 16, 14, 14, + 9, 16, 8, 13, 12, 16, 11, 13, 12, 16, 10, 14, 13, 16, 12, 13, + 16, 16, 14, 16, 16, 16, 14, 14, 6, 14, 8, 13, 8, 14, 11, 13, + 9, 15, 10, 13, 11, 14, 12, 13, 16, 16, 15, 16, 16, 16, 14, 14, + 7, 15, 9, 13, 10, 14, 11, 13, 9, 15, 10, 13, 11, 14, 11, 13, + 16, 16, 14, 16, 15, 16, 14, 14, 10, 16, 10, 13, 12, 16, 12, 13, + 11, 16, 10, 13, 13, 16, 12, 13, 16, 16, 13, 14, 15, 16, 13, 13, + 9, 16, 12, 14, 9, 14, 11, 13, 12, 16, 12, 15, 11, 15, 12, 13, + 16, 16, 16, 16, 15, 16, 14, 14, 10, 16, 12, 15, 11, 15, 12, 13, + 11, 16, 12, 14, 11, 15, 12, 13, 16, 16, 14, 16, 13, 16, 13, 13, + 13, 16, 13, 15, 13, 16, 12, 13, 13, 16, 12, 14, 13, 16, 12, 12, + 15, 16, 13, 14, 13, 16, 12, 12, 6, 14, 8, 13, 9, 14, 10, 12, + 10, 15, 10, 12, 11, 14, 11, 12, 16, 16, 14, 14, 14, 16, 13, 13, + 7, 15, 8, 13, 9, 14, 10, 12, 10, 15, 10, 13, 11, 14, 11, 12, + 16, 16, 14, 14, 14, 16, 13, 12, 9, 16, 8, 12, 11, 14, 10, 11, + 11, 16, 10, 13, 11, 14, 10, 11, 16, 16, 13, 14, 14, 16, 12, 11, + 7, 14, 9, 13, 9, 14, 10, 12, 10, 16, 10, 13, 11, 14, 11, 12, + 16, 16, 14, 14, 14, 15, 13, 12, 7, 14, 9, 13, 9, 14, 10, 12, + 9, 14, 10, 12, 10, 14, 11, 12, 15, 16, 13, 14, 14, 15, 12, 12, + 9, 15, 9, 12, 11, 14, 10, 11, 10, 15, 9, 12, 11, 14, 10, 11, + 14, 16, 11, 13, 13, 15, 11, 11, 9, 16, 10, 13, 9, 14, 10, 11, + 11, 16, 11, 13, 10, 14, 10, 11, 16, 16, 14, 15, 13, 15, 12, 12, + 9, 16, 10, 13, 9, 13, 10, 11, 10, 15, 10, 13, 10, 13, 10, 11, + 14, 16, 13, 14, 12, 14, 11, 11, 11, 16, 10, 13, 11, 13, 9, 10, + 11, 14, 10, 12, 10, 13, 9, 9, 13, 15, 10, 11, 11, 12, 9, 8, + }, + { + 0, 10, 5, 10, 6, 11, 8, 10, 7, 12, 8, 11, 9, 12, 9, 10, + 14, 16, 13, 13, 13, 14, 12, 11, 5, 12, 6, 10, 8, 12, 9, 10, + 8, 13, 8, 11, 9, 12, 9, 10, 14, 16, 12, 13, 13, 14, 11, 11, + 9, 15, 8, 12, 11, 14, 10, 10, 11, 16, 9, 12, 12, 14, 10, 10, + 14, 16, 11, 12, 13, 14, 11, 10, 5, 12, 8, 11, 7, 11, 9, 10, + 8, 13, 9, 11, 9, 12, 9, 10, 14, 16, 12, 13, 13, 14, 11, 11, + 7, 13, 8, 11, 9, 12, 9, 10, 9, 13, 9, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 12, 13, 11, 10, 11, 15, 10, 12, 12, 14, 10, 10, + 12, 16, 10, 12, 12, 14, 10, 10, 14, 16, 11, 12, 13, 14, 10, 9, + 10, 15, 11, 13, 9, 13, 10, 10, 11, 15, 12, 13, 10, 12, 10, 10, + 14, 16, 13, 14, 12, 13, 11, 10, 11, 16, 11, 13, 10, 13, 10, 10, + 11, 16, 11, 13, 10, 13, 10, 10, 14, 16, 13, 14, 12, 13, 11, 9, + 13, 16, 12, 13, 12, 14, 11, 10, 14, 16, 12, 13, 12, 14, 10, 9, + 16, 16, 12, 13, 13, 13, 10, 8, 3, 11, 6, 10, 7, 11, 9, 10, + 8, 12, 8, 11, 9, 12, 9, 10, 14, 16, 13, 13, 13, 14, 11, 11, + 5, 12, 6, 10, 8, 12, 9, 10, 8, 13, 8, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 13, 14, 11, 10, 9, 14, 8, 11, 11, 14, 10, 10, + 11, 15, 9, 11, 12, 14, 10, 10, 14, 16, 11, 12, 13, 14, 11, 9, + 6, 12, 8, 11, 7, 11, 9, 10, 8, 13, 9, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 13, 13, 11, 10, 7, 13, 8, 11, 8, 12, 9, 10, + 9, 13, 9, 11, 9, 12, 9, 9, 14, 16, 12, 13, 12, 13, 11, 10, + 10, 15, 9, 12, 11, 14, 10, 10, 11, 15, 9, 11, 11, 13, 10, 9, + 14, 16, 11, 12, 13, 14, 10, 9, 9, 15, 11, 13, 9, 12, 10, 10, + 11, 15, 11, 13, 9, 12, 10, 10, 14, 16, 13, 14, 12, 13, 11, 10, + 10, 15, 11, 13, 10, 13, 10, 10, 11, 15, 11, 13, 10, 12, 10, 10, + 14, 16, 12, 13, 11, 12, 10, 9, 13, 16, 12, 13, 12, 14, 10, 9, + 13, 16, 11, 12, 12, 13, 10, 9, 14, 16, 11, 12, 12, 13, 9, 8, + 7, 13, 8, 12, 9, 13, 10, 11, 10, 14, 10, 12, 11, 13, 11, 11, + 16, 16, 13, 14, 14, 14, 12, 11, 8, 14, 8, 12, 9, 13, 10, 10, + 10, 14, 10, 12, 11, 13, 10, 10, 16, 16, 13, 13, 14, 14, 12, 11, + 10, 15, 9, 12, 11, 14, 10, 10, 12, 16, 10, 12, 12, 14, 10, 10, + 16, 16, 12, 13, 14, 15, 11, 10, 8, 14, 9, 12, 9, 13, 10, 11, + 10, 15, 10, 12, 10, 13, 10, 11, 16, 16, 13, 14, 14, 14, 12, 11, + 8, 14, 9, 12, 9, 13, 10, 10, 10, 14, 10, 12, 10, 13, 10, 10, + 15, 16, 13, 13, 13, 14, 11, 10, 10, 15, 10, 12, 12, 14, 10, 10, + 11, 16, 9, 12, 12, 14, 10, 10, 14, 16, 11, 12, 13, 14, 10, 9, + 11, 16, 11, 13, 10, 13, 10, 10, 12, 16, 12, 13, 10, 13, 11, 10, + 15, 16, 14, 14, 12, 13, 11, 10, 11, 16, 11, 13, 10, 13, 10, 10, + 11, 16, 12, 13, 10, 12, 10, 10, 14, 16, 13, 14, 11, 13, 11, 9, + 13, 16, 12, 13, 12, 14, 10, 10, 12, 16, 11, 12, 12, 13, 10, 9, + 14, 16, 11, 12, 11, 12, 9, 8, 10, 16, 10, 13, 11, 14, 11, 11, + 12, 16, 11, 13, 12, 14, 11, 11, 16, 16, 14, 13, 14, 14, 12, 10, + 10, 15, 10, 13, 10, 13, 10, 11, 12, 16, 11, 13, 11, 13, 11, 10, + 16, 16, 14, 13, 14, 14, 12, 10, 11, 15, 9, 12, 11, 13, 10, 9, + 12, 16, 10, 12, 12, 13, 10, 9, 16, 16, 12, 12, 13, 14, 10, 8, + 10, 16, 10, 13, 10, 14, 11, 11, 12, 16, 11, 13, 12, 14, 11, 10, + 16, 16, 14, 13, 14, 14, 12, 10, 9, 15, 9, 12, 10, 13, 10, 10, + 11, 16, 10, 12, 11, 13, 10, 10, 16, 16, 13, 13, 13, 14, 11, 9, + 10, 15, 9, 11, 11, 13, 9, 9, 11, 15, 9, 11, 11, 13, 9, 8, + 14, 16, 10, 11, 13, 13, 10, 8, 11, 16, 11, 13, 10, 13, 10, 9, + 13, 16, 11, 13, 11, 13, 10, 9, 16, 16, 13, 13, 13, 13, 10, 8, + 11, 16, 10, 12, 10, 13, 10, 9, 11, 16, 11, 12, 10, 12, 9, 9, + 15, 16, 12, 13, 11, 12, 10, 8, 11, 16, 10, 12, 11, 12, 9, 8, + 11, 15, 9, 11, 10, 12, 9, 7, 13, 15, 9, 9, 10, 10, 7, 5, + }, + { + 0, 7, 3, 8, 4, 9, 7, 8, 5, 10, 7, 10, 8, 11, 8, 9, + 16, 16, 16, 16, 16, 16, 11, 10, 2, 10, 4, 9, 7, 10, 7, 8, + 7, 16, 7, 10, 9, 16, 8, 9, 16, 16, 16, 16, 16, 16, 11, 10, + 8, 16, 7, 10, 10, 16, 9, 8, 10, 16, 9, 11, 16, 16, 9, 9, + 16, 16, 16, 16, 16, 16, 11, 9, 3, 10, 6, 9, 6, 11, 8, 8, + 7, 16, 8, 10, 9, 16, 9, 9, 16, 16, 16, 16, 16, 16, 11, 10, + 5, 16, 7, 10, 8, 11, 8, 8, 8, 16, 8, 10, 9, 16, 8, 8, + 16, 16, 11, 16, 16, 16, 10, 9, 9, 16, 9, 11, 11, 16, 9, 9, + 11, 16, 9, 11, 11, 16, 9, 8, 16, 16, 10, 16, 16, 16, 10, 9, + 8, 16, 10, 16, 8, 16, 10, 9, 12, 16, 11, 16, 10, 16, 10, 9, + 16, 16, 16, 16, 16, 16, 12, 10, 10, 16, 11, 16, 10, 16, 10, 9, + 11, 16, 11, 16, 10, 16, 10, 9, 16, 16, 16, 16, 16, 16, 11, 9, + 16, 16, 16, 16, 16, 16, 10, 9, 16, 16, 11, 16, 16, 16, 10, 9, + 16, 16, 10, 11, 11, 16, 9, 7, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 2, 9, 6, 9, 6, 10, 8, 9, 8, 12, 9, 11, 9, 12, 10, 10, + 16, 16, 14, 14, 15, 15, 13, 12, 5, 11, 7, 10, 8, 11, 9, 9, + 9, 13, 9, 11, 10, 12, 10, 10, 15, 16, 14, 14, 14, 16, 12, 11, + 10, 14, 9, 11, 11, 13, 10, 10, 12, 15, 10, 12, 12, 13, 11, 10, + 16, 16, 14, 15, 14, 15, 12, 11, 5, 11, 8, 10, 7, 11, 9, 9, + 9, 13, 9, 12, 9, 12, 10, 10, 15, 16, 13, 14, 13, 16, 12, 11, + 7, 12, 8, 11, 9, 11, 9, 10, 9, 13, 9, 11, 10, 12, 9, 9, + 16, 16, 13, 14, 13, 14, 11, 11, 10, 14, 10, 12, 11, 13, 10, 10, + 11, 16, 11, 12, 12, 13, 10, 10, 16, 16, 13, 14, 13, 14, 12, 11, + 10, 14, 11, 13, 10, 13, 10, 11, 12, 16, 12, 13, 10, 12, 11, 11, + 16, 16, 14, 15, 13, 14, 12, 11, 11, 15, 11, 13, 11, 13, 10, 10, + 12, 15, 12, 13, 11, 13, 11, 10, 15, 16, 14, 15, 13, 15, 12, 11, + 12, 16, 12, 13, 12, 14, 11, 11, 13, 16, 12, 13, 12, 14, 11, 10, + 16, 16, 13, 14, 13, 14, 11, 10, 3, 10, 6, 9, 7, 10, 8, 9, + 9, 12, 9, 11, 10, 12, 9, 10, 15, 16, 14, 14, 14, 14, 12, 11, + 6, 11, 7, 10, 8, 10, 9, 9, 9, 13, 9, 11, 10, 12, 9, 9, + 15, 16, 13, 14, 14, 15, 12, 11, 10, 14, 9, 11, 11, 12, 10, 10, + 12, 14, 10, 12, 11, 13, 10, 10, 15, 16, 13, 14, 14, 16, 12, 11, + 6, 11, 8, 10, 7, 11, 9, 9, 9, 13, 9, 11, 9, 12, 9, 9, + 15, 16, 14, 14, 13, 14, 12, 11, 7, 11, 8, 11, 8, 11, 9, 9, + 9, 12, 9, 11, 9, 12, 9, 9, 15, 16, 13, 13, 13, 14, 11, 10, + 10, 13, 10, 12, 11, 13, 10, 10, 11, 15, 10, 12, 11, 13, 10, 10, + 14, 16, 12, 13, 13, 14, 11, 10, 10, 14, 11, 12, 9, 12, 10, 10, + 11, 15, 11, 13, 10, 13, 10, 10, 15, 16, 14, 14, 13, 14, 12, 11, + 10, 14, 10, 12, 10, 12, 10, 10, 11, 15, 11, 12, 10, 12, 10, 10, + 15, 16, 13, 14, 12, 14, 11, 10, 12, 16, 11, 13, 12, 14, 11, 10, + 12, 16, 12, 13, 11, 13, 10, 10, 15, 16, 12, 14, 12, 14, 11, 9, + 7, 12, 9, 11, 9, 12, 10, 10, 11, 14, 11, 12, 11, 13, 11, 11, + 16, 16, 15, 16, 15, 16, 13, 12, 8, 12, 9, 11, 9, 12, 10, 10, + 11, 14, 11, 12, 11, 13, 10, 10, 16, 16, 14, 15, 15, 16, 13, 12, + 11, 14, 10, 12, 11, 13, 10, 10, 12, 16, 11, 13, 12, 14, 11, 10, + 16, 16, 14, 15, 14, 16, 12, 11, 8, 13, 9, 11, 9, 12, 10, 10, + 11, 14, 11, 12, 11, 13, 10, 10, 16, 16, 15, 15, 14, 15, 13, 12, + 9, 13, 9, 12, 9, 12, 10, 10, 11, 14, 10, 12, 10, 12, 10, 10, + 16, 16, 14, 15, 14, 14, 12, 11, 11, 15, 11, 12, 11, 13, 11, 10, + 12, 16, 11, 12, 12, 13, 11, 10, 16, 16, 13, 15, 14, 15, 11, 11, + 11, 16, 11, 13, 10, 13, 11, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 16, 16, 14, 15, 14, 15, 13, 11, 11, 16, 11, 13, 11, 13, 11, 10, + 12, 16, 12, 13, 10, 13, 11, 10, 16, 16, 14, 14, 12, 14, 12, 10, + 12, 16, 12, 14, 12, 14, 11, 11, 13, 16, 12, 14, 12, 14, 11, 10, + 15, 16, 12, 14, 12, 14, 11, 9, 9, 14, 11, 13, 11, 13, 11, 11, + 13, 16, 12, 14, 13, 14, 12, 11, 16, 16, 16, 16, 16, 16, 14, 12, + 9, 14, 10, 12, 10, 13, 11, 11, 12, 16, 12, 13, 13, 14, 11, 11, + 16, 16, 16, 16, 16, 14, 13, 12, 10, 15, 11, 13, 11, 14, 11, 10, + 13, 16, 12, 13, 12, 15, 11, 10, 16, 16, 14, 16, 15, 16, 13, 11, + 10, 14, 10, 13, 11, 14, 11, 11, 13, 16, 12, 13, 12, 14, 11, 11, + 16, 16, 16, 16, 15, 16, 13, 12, 10, 14, 10, 12, 10, 13, 10, 11, + 12, 15, 12, 13, 12, 13, 11, 10, 16, 16, 14, 14, 15, 15, 13, 11, + 11, 16, 11, 13, 11, 14, 11, 10, 12, 16, 11, 13, 12, 14, 11, 10, + 16, 16, 13, 14, 14, 15, 12, 10, 11, 16, 12, 13, 11, 14, 11, 10, + 13, 16, 13, 14, 12, 14, 11, 11, 16, 16, 15, 16, 15, 15, 12, 11, + 11, 16, 12, 13, 11, 14, 11, 10, 13, 16, 12, 13, 11, 14, 11, 10, + 16, 16, 14, 15, 13, 14, 12, 10, 12, 16, 12, 14, 12, 14, 10, 10, + 12, 16, 11, 13, 11, 14, 10, 10, 14, 16, 11, 13, 12, 13, 10, 8, + }, + }, + { + { + 0, 12, 6, 13, 7, 14, 11, 14, 8, 14, 10, 14, 11, 15, 13, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 5, 14, 7, 13, 10, 16, 12, 14, + 9, 16, 10, 14, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 9, 14, 14, 16, 13, 16, 12, 16, 11, 16, 16, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 5, 14, 9, 14, 8, 14, 12, 14, + 9, 16, 11, 14, 11, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 14, 11, 16, 12, 14, 10, 16, 11, 15, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 12, 16, 14, 16, 14, 16, + 13, 16, 12, 16, 15, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 13, 16, 11, 16, 14, 16, 13, 16, 14, 16, 13, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 14, 16, 13, 16, 14, 16, + 13, 16, 14, 16, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 15, 16, 16, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 12, 6, 12, 8, 14, 11, 13, + 8, 14, 10, 13, 11, 14, 13, 14, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 14, 7, 13, 10, 14, 11, 14, 9, 16, 10, 14, 12, 16, 13, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 9, 14, 13, 16, 13, 14, + 12, 16, 11, 15, 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 14, 9, 13, 8, 14, 12, 14, 9, 16, 11, 14, 11, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 15, 9, 14, 10, 16, 12, 14, + 9, 16, 10, 14, 11, 16, 12, 14, 16, 16, 16, 16, 16, 16, 15, 16, + 11, 16, 11, 15, 14, 16, 13, 15, 12, 16, 11, 15, 14, 16, 13, 14, + 16, 16, 14, 16, 16, 16, 14, 16, 10, 16, 13, 16, 10, 16, 13, 16, + 12, 16, 14, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 13, 16, 12, 16, 13, 16, 12, 16, 13, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 15, 16, 14, 16, 14, 16, 16, 16, 14, 16, + 15, 16, 14, 16, 14, 16, 14, 16, 16, 16, 16, 16, 16, 16, 14, 14, + 4, 14, 8, 13, 9, 16, 12, 14, 9, 16, 11, 14, 11, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 15, 8, 13, 10, 16, 12, 14, + 10, 16, 11, 14, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 9, 14, 13, 16, 13, 15, 12, 16, 11, 16, 14, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 9, 14, 9, 16, 12, 14, + 10, 16, 11, 15, 12, 16, 13, 15, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 14, 11, 16, 12, 14, 10, 16, 11, 14, 12, 16, 13, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 11, 15, 14, 16, 13, 15, + 12, 16, 11, 15, 14, 16, 13, 14, 16, 16, 14, 16, 16, 16, 14, 16, + 10, 16, 13, 16, 10, 16, 13, 15, 13, 16, 14, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 13, 16, 12, 16, 13, 16, + 12, 16, 13, 16, 11, 16, 13, 16, 16, 16, 16, 16, 15, 16, 15, 16, + 14, 16, 14, 16, 15, 16, 14, 16, 14, 16, 14, 16, 14, 16, 14, 14, + 16, 16, 14, 16, 15, 16, 14, 14, 6, 16, 9, 14, 10, 16, 12, 14, + 10, 16, 11, 13, 12, 16, 13, 14, 16, 16, 16, 16, 16, 16, 14, 14, + 7, 16, 9, 14, 10, 16, 12, 13, 11, 16, 11, 14, 12, 16, 12, 14, + 16, 16, 16, 16, 16, 16, 14, 14, 9, 16, 9, 14, 12, 16, 11, 13, + 12, 16, 11, 14, 12, 16, 12, 13, 16, 16, 14, 16, 16, 16, 13, 14, + 7, 16, 10, 14, 10, 16, 12, 14, 11, 16, 11, 14, 11, 16, 12, 14, + 16, 16, 16, 16, 16, 16, 14, 14, 8, 16, 10, 14, 10, 16, 11, 13, + 10, 16, 11, 13, 11, 16, 12, 13, 16, 16, 14, 16, 16, 16, 14, 14, + 10, 16, 9, 13, 12, 16, 11, 13, 11, 16, 10, 13, 12, 16, 11, 12, + 16, 16, 13, 15, 15, 16, 13, 13, 9, 16, 11, 14, 9, 16, 11, 13, + 12, 16, 12, 16, 12, 16, 12, 13, 16, 16, 16, 16, 15, 16, 14, 14, + 10, 16, 11, 14, 10, 16, 11, 13, 11, 16, 12, 14, 10, 15, 11, 13, + 16, 16, 15, 16, 13, 16, 13, 13, 12, 16, 11, 13, 12, 16, 11, 12, + 12, 16, 11, 13, 11, 14, 11, 11, 13, 16, 12, 13, 12, 14, 11, 11, + }, + { + 0, 10, 5, 10, 6, 11, 8, 10, 7, 12, 8, 11, 8, 12, 9, 10, + 14, 16, 13, 13, 13, 14, 12, 11, 4, 12, 6, 10, 8, 12, 9, 10, + 8, 13, 8, 11, 9, 12, 9, 10, 14, 16, 12, 13, 13, 14, 11, 11, + 9, 15, 8, 12, 12, 14, 10, 11, 11, 16, 9, 12, 12, 14, 10, 10, + 14, 16, 11, 13, 13, 15, 11, 11, 4, 12, 8, 11, 6, 11, 9, 10, + 8, 13, 9, 11, 8, 12, 9, 10, 14, 16, 12, 13, 13, 14, 11, 11, + 7, 13, 8, 11, 9, 12, 9, 10, 8, 13, 9, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 12, 13, 11, 10, 11, 16, 10, 12, 12, 14, 10, 11, + 11, 16, 10, 12, 12, 14, 10, 10, 15, 16, 11, 13, 13, 14, 11, 10, + 10, 16, 11, 13, 9, 13, 10, 11, 11, 15, 12, 13, 10, 12, 10, 11, + 15, 16, 13, 14, 12, 13, 11, 11, 11, 16, 11, 13, 10, 13, 10, 11, + 12, 16, 11, 13, 10, 13, 10, 10, 15, 16, 13, 14, 12, 13, 11, 10, + 13, 16, 12, 13, 13, 14, 11, 11, 14, 16, 12, 13, 12, 14, 11, 10, + 16, 16, 13, 13, 13, 14, 11, 9, 3, 11, 6, 10, 6, 11, 9, 10, + 8, 12, 8, 11, 9, 12, 9, 10, 14, 16, 13, 13, 13, 13, 12, 11, + 5, 12, 6, 10, 8, 12, 9, 10, 8, 13, 8, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 13, 14, 11, 11, 9, 15, 8, 11, 11, 14, 10, 10, + 11, 15, 9, 11, 12, 14, 10, 10, 14, 16, 11, 12, 13, 14, 11, 10, + 5, 12, 8, 11, 7, 11, 9, 10, 8, 13, 9, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 13, 13, 11, 11, 7, 13, 8, 11, 8, 12, 9, 10, + 8, 13, 8, 11, 9, 12, 9, 9, 13, 16, 11, 13, 12, 13, 11, 10, + 10, 15, 9, 12, 11, 14, 10, 10, 11, 15, 9, 11, 11, 13, 10, 10, + 14, 16, 11, 12, 13, 14, 10, 10, 9, 16, 11, 13, 9, 12, 10, 10, + 11, 16, 11, 13, 9, 12, 10, 10, 15, 16, 13, 14, 12, 13, 11, 10, + 11, 16, 11, 13, 10, 13, 10, 10, 11, 15, 11, 13, 9, 12, 10, 10, + 14, 16, 12, 13, 11, 13, 10, 10, 13, 16, 12, 13, 12, 14, 11, 10, + 13, 16, 11, 13, 12, 13, 10, 10, 14, 16, 11, 12, 12, 13, 10, 9, + 7, 14, 8, 12, 9, 13, 10, 11, 10, 14, 10, 12, 11, 13, 11, 11, + 16, 16, 14, 14, 14, 14, 12, 12, 7, 14, 8, 12, 9, 13, 10, 11, + 10, 14, 10, 12, 11, 13, 10, 11, 16, 16, 13, 13, 14, 14, 12, 11, + 10, 15, 9, 12, 12, 14, 10, 10, 12, 16, 9, 12, 12, 14, 10, 10, + 16, 16, 12, 13, 14, 15, 12, 11, 8, 14, 9, 12, 9, 13, 10, 11, + 10, 15, 10, 12, 10, 13, 10, 11, 16, 16, 14, 14, 14, 14, 12, 11, + 8, 14, 9, 12, 9, 13, 10, 11, 10, 14, 10, 12, 10, 13, 10, 10, + 15, 16, 13, 13, 13, 14, 12, 11, 10, 15, 10, 12, 12, 14, 10, 10, + 11, 16, 9, 12, 12, 14, 10, 10, 14, 16, 11, 12, 13, 14, 11, 10, + 11, 16, 11, 14, 9, 13, 10, 11, 12, 16, 12, 14, 10, 13, 11, 11, + 16, 16, 14, 15, 13, 14, 12, 11, 11, 16, 12, 14, 10, 13, 11, 11, + 11, 16, 11, 13, 10, 13, 10, 10, 15, 16, 13, 14, 12, 13, 11, 10, + 13, 16, 12, 14, 13, 14, 11, 10, 12, 16, 11, 13, 12, 13, 10, 10, + 14, 16, 11, 12, 11, 13, 10, 9, 10, 16, 10, 13, 11, 14, 11, 11, + 12, 16, 11, 13, 12, 14, 11, 11, 16, 16, 14, 13, 14, 15, 12, 11, + 10, 16, 10, 13, 10, 14, 11, 11, 12, 16, 11, 13, 11, 14, 11, 11, + 16, 16, 14, 13, 14, 14, 12, 11, 11, 15, 9, 12, 11, 14, 10, 10, + 13, 16, 10, 12, 12, 14, 10, 10, 16, 16, 13, 13, 14, 14, 11, 10, + 10, 16, 10, 13, 11, 14, 11, 11, 12, 16, 11, 13, 12, 14, 11, 11, + 16, 16, 14, 14, 14, 14, 12, 11, 9, 16, 10, 13, 10, 14, 11, 11, + 11, 15, 11, 12, 11, 13, 11, 11, 16, 16, 13, 13, 14, 14, 12, 10, + 10, 15, 9, 12, 11, 14, 10, 10, 11, 16, 9, 11, 11, 13, 10, 9, + 15, 16, 11, 12, 13, 14, 10, 9, 11, 16, 11, 13, 10, 13, 10, 10, + 13, 16, 12, 13, 11, 13, 10, 10, 16, 16, 14, 14, 13, 13, 11, 10, + 11, 16, 11, 13, 10, 13, 10, 10, 12, 16, 11, 13, 10, 13, 10, 10, + 15, 16, 13, 13, 12, 13, 11, 9, 11, 16, 11, 12, 11, 13, 10, 9, + 11, 15, 10, 11, 11, 12, 9, 8, 13, 15, 10, 10, 10, 11, 8, 7, + }, + { + 0, 9, 3, 8, 5, 9, 7, 8, 5, 11, 6, 9, 8, 11, 8, 9, + 16, 16, 16, 16, 16, 16, 11, 10, 2, 10, 4, 9, 7, 10, 7, 8, + 7, 16, 7, 10, 9, 11, 8, 9, 16, 16, 11, 16, 16, 16, 11, 10, + 7, 16, 7, 10, 10, 16, 8, 9, 10, 16, 8, 10, 11, 16, 9, 9, + 16, 16, 16, 16, 16, 16, 11, 10, 3, 11, 6, 9, 6, 11, 8, 8, + 7, 16, 8, 10, 8, 11, 8, 9, 16, 16, 15, 16, 16, 16, 11, 10, + 5, 11, 7, 9, 8, 11, 8, 8, 7, 16, 7, 10, 8, 11, 8, 8, + 16, 16, 11, 16, 16, 16, 10, 9, 9, 16, 8, 11, 11, 16, 9, 9, + 10, 16, 8, 11, 11, 16, 9, 9, 16, 16, 10, 16, 16, 16, 10, 9, + 8, 16, 10, 11, 8, 16, 9, 9, 11, 16, 11, 16, 10, 16, 10, 9, + 16, 16, 16, 16, 16, 16, 11, 10, 9, 16, 10, 16, 10, 16, 9, 9, + 10, 16, 10, 16, 9, 16, 9, 9, 16, 16, 16, 16, 15, 16, 10, 9, + 16, 16, 11, 16, 16, 16, 10, 10, 13, 16, 11, 16, 11, 16, 10, 9, + 16, 16, 10, 11, 11, 16, 9, 8, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 1, 10, 6, 10, 7, 11, 9, 10, 8, 12, 9, 12, 9, 12, 10, 10, + 16, 16, 14, 16, 14, 15, 13, 12, 5, 12, 7, 10, 9, 11, 9, 10, + 9, 13, 9, 12, 10, 13, 10, 10, 16, 16, 14, 15, 14, 14, 13, 12, + 10, 15, 10, 12, 12, 14, 11, 11, 12, 16, 11, 13, 12, 14, 11, 11, + 16, 16, 14, 16, 15, 16, 13, 12, 6, 12, 8, 11, 8, 11, 10, 10, + 9, 13, 10, 12, 10, 12, 10, 10, 15, 16, 13, 15, 13, 14, 12, 12, + 7, 13, 9, 11, 9, 12, 10, 10, 9, 14, 10, 12, 10, 13, 10, 10, + 15, 16, 13, 15, 13, 14, 12, 11, 11, 15, 11, 13, 12, 14, 11, 11, + 12, 16, 11, 13, 12, 14, 11, 11, 16, 16, 13, 15, 14, 16, 12, 11, + 10, 16, 12, 14, 10, 13, 11, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 16, 16, 15, 16, 14, 16, 13, 12, 11, 16, 12, 14, 11, 14, 11, 11, + 12, 16, 12, 14, 11, 14, 11, 11, 16, 16, 14, 15, 13, 15, 12, 12, + 13, 16, 13, 15, 13, 15, 12, 12, 13, 16, 12, 15, 12, 15, 11, 11, + 16, 16, 13, 16, 13, 15, 12, 11, 4, 11, 7, 10, 7, 11, 9, 10, + 9, 13, 9, 12, 10, 12, 10, 10, 15, 16, 14, 15, 14, 15, 13, 12, + 6, 12, 7, 11, 9, 11, 9, 10, 9, 13, 9, 12, 10, 12, 10, 10, + 15, 16, 14, 15, 14, 15, 12, 12, 10, 15, 9, 12, 12, 13, 11, 11, + 12, 15, 11, 13, 12, 14, 11, 11, 16, 16, 13, 15, 14, 16, 12, 12, + 6, 12, 8, 11, 8, 11, 9, 10, 9, 14, 10, 12, 10, 12, 10, 10, + 14, 16, 13, 14, 13, 14, 12, 12, 8, 13, 9, 11, 9, 12, 10, 10, + 9, 13, 9, 12, 9, 12, 9, 10, 14, 16, 13, 14, 13, 14, 12, 11, + 11, 15, 11, 13, 11, 14, 11, 11, 12, 16, 10, 13, 12, 13, 11, 10, + 15, 16, 12, 15, 13, 16, 12, 11, 10, 15, 11, 13, 10, 13, 11, 11, + 12, 16, 12, 14, 11, 13, 11, 11, 16, 16, 14, 15, 13, 16, 13, 12, + 11, 16, 11, 14, 11, 13, 11, 11, 12, 16, 12, 14, 10, 13, 11, 11, + 15, 16, 13, 16, 12, 14, 12, 11, 12, 16, 12, 14, 12, 15, 11, 11, + 13, 16, 12, 14, 12, 14, 11, 11, 15, 16, 13, 15, 13, 15, 11, 10, + 7, 13, 9, 12, 10, 13, 11, 11, 11, 15, 12, 13, 12, 13, 11, 11, + 16, 16, 15, 16, 16, 16, 14, 13, 8, 13, 9, 12, 10, 13, 11, 11, + 12, 15, 11, 13, 12, 13, 11, 11, 16, 16, 14, 15, 15, 16, 13, 12, + 11, 16, 11, 13, 12, 14, 11, 11, 13, 16, 12, 14, 13, 15, 12, 11, + 16, 16, 14, 16, 15, 16, 13, 12, 9, 15, 10, 13, 10, 13, 11, 11, + 12, 15, 11, 13, 11, 13, 11, 11, 16, 16, 14, 16, 16, 16, 13, 12, + 9, 14, 10, 13, 10, 13, 11, 11, 11, 14, 11, 13, 11, 13, 11, 11, + 16, 16, 14, 16, 14, 16, 12, 12, 11, 16, 11, 14, 12, 14, 12, 11, + 12, 16, 11, 13, 13, 14, 11, 11, 16, 16, 13, 15, 14, 16, 12, 11, + 12, 16, 12, 14, 11, 14, 11, 11, 13, 16, 13, 14, 12, 15, 12, 11, + 16, 16, 16, 16, 14, 16, 13, 12, 12, 16, 12, 14, 11, 14, 12, 11, + 12, 16, 12, 15, 11, 14, 11, 11, 16, 16, 14, 16, 13, 15, 12, 12, + 13, 16, 13, 16, 13, 16, 12, 12, 13, 16, 12, 15, 12, 16, 11, 11, + 14, 16, 12, 15, 12, 15, 11, 10, 9, 16, 11, 14, 12, 14, 12, 12, + 13, 16, 13, 15, 14, 16, 12, 12, 16, 16, 16, 16, 16, 16, 14, 13, + 10, 16, 11, 14, 12, 14, 12, 12, 13, 16, 13, 14, 13, 16, 12, 12, + 16, 16, 15, 16, 16, 16, 13, 12, 11, 16, 11, 14, 12, 15, 12, 11, + 13, 16, 12, 14, 13, 16, 12, 11, 16, 16, 14, 16, 16, 16, 13, 12, + 11, 16, 11, 14, 12, 14, 12, 12, 13, 16, 12, 15, 13, 16, 12, 12, + 16, 16, 16, 16, 16, 16, 14, 13, 10, 16, 11, 14, 11, 15, 11, 11, + 13, 16, 12, 14, 12, 14, 12, 11, 16, 16, 14, 16, 16, 16, 13, 12, + 11, 16, 11, 15, 12, 15, 12, 11, 13, 16, 11, 14, 13, 15, 12, 11, + 16, 16, 13, 16, 14, 16, 12, 11, 12, 16, 12, 15, 11, 15, 12, 11, + 14, 16, 13, 15, 12, 16, 12, 11, 16, 16, 15, 16, 14, 16, 13, 12, + 11, 16, 12, 15, 11, 15, 11, 11, 13, 16, 13, 16, 11, 15, 11, 11, + 16, 16, 14, 16, 13, 15, 12, 11, 12, 16, 12, 15, 12, 16, 11, 11, + 12, 16, 11, 15, 12, 14, 11, 11, 13, 16, 12, 13, 11, 13, 10, 9, + }, + }, + { + { + 0, 13, 6, 13, 8, 14, 12, 16, 8, 16, 11, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 16, 7, 14, 11, 16, 13, 16, + 9, 16, 11, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 10, 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 5, 16, 10, 16, 8, 16, 13, 16, + 10, 16, 12, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 11, 16, 13, 16, 10, 16, 12, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 12, 16, 16, 16, 16, 16, + 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 11, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, + 14, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 13, 7, 13, 8, 16, 12, 16, + 8, 16, 10, 16, 11, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 7, 14, 10, 16, 12, 16, 9, 16, 10, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 10, 16, 9, 16, 14, 16, 14, 16, + 13, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 9, 16, 8, 16, 12, 16, 9, 16, 11, 16, 11, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 10, 16, 11, 16, 13, 16, + 9, 16, 11, 16, 11, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 12, 16, 16, 16, 14, 16, 13, 16, 12, 16, 16, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 10, 16, 13, 16, 11, 16, 14, 16, + 13, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 14, 16, 13, 16, 14, 16, 13, 16, 14, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 8, 16, 9, 16, 13, 16, 10, 16, 11, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 8, 16, 11, 16, 13, 16, + 10, 16, 11, 16, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 9, 16, 13, 16, 13, 16, 13, 16, 12, 16, 16, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 10, 16, 10, 16, 13, 16, + 10, 16, 12, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 11, 16, 13, 16, 10, 16, 11, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 11, 16, 16, 16, 14, 16, + 12, 16, 11, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 13, 16, 10, 16, 13, 16, 13, 16, 16, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 13, 16, 12, 16, 14, 16, + 12, 16, 15, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 10, 16, 10, 16, 13, 16, + 11, 16, 11, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 9, 16, 11, 16, 12, 16, 11, 16, 11, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 9, 16, 12, 16, 12, 16, + 13, 16, 11, 16, 13, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 10, 16, 12, 16, 11, 16, 12, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 10, 16, 11, 16, 12, 16, + 10, 16, 11, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 10, 14, 12, 16, 12, 16, 11, 16, 10, 14, 13, 16, 12, 14, + 16, 16, 14, 16, 16, 16, 14, 16, 9, 16, 12, 16, 10, 16, 12, 16, + 13, 16, 13, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 11, 16, 12, 16, 11, 16, 12, 16, 11, 16, 12, 15, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 12, 16, 13, 16, 12, 13, + 12, 16, 12, 16, 12, 16, 12, 13, 16, 16, 13, 14, 13, 16, 13, 13, + }, + { + 0, 10, 5, 10, 5, 10, 8, 10, 6, 11, 8, 11, 8, 11, 9, 10, + 14, 16, 13, 14, 13, 14, 12, 12, 4, 12, 5, 10, 8, 12, 9, 10, + 7, 12, 8, 11, 9, 12, 9, 10, 14, 16, 12, 13, 13, 14, 12, 12, + 9, 16, 8, 12, 12, 14, 10, 11, 11, 16, 9, 12, 12, 14, 11, 11, + 14, 16, 12, 13, 14, 15, 12, 12, 4, 12, 7, 11, 6, 11, 9, 10, + 8, 12, 9, 11, 8, 11, 9, 10, 14, 16, 12, 14, 13, 14, 12, 12, + 7, 13, 8, 11, 8, 12, 9, 10, 8, 13, 8, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 12, 13, 11, 11, 11, 16, 10, 12, 12, 14, 11, 11, + 12, 16, 10, 12, 12, 14, 11, 11, 16, 16, 12, 13, 14, 15, 12, 11, + 10, 16, 11, 14, 9, 13, 10, 11, 11, 16, 12, 14, 10, 13, 11, 11, + 15, 16, 13, 14, 13, 14, 12, 12, 11, 16, 12, 14, 10, 13, 11, 11, + 12, 16, 12, 14, 11, 13, 11, 11, 15, 16, 13, 14, 13, 14, 12, 11, + 14, 16, 13, 14, 13, 15, 12, 12, 14, 16, 12, 14, 13, 15, 11, 11, + 16, 16, 13, 14, 14, 15, 12, 11, 3, 11, 5, 10, 6, 11, 9, 10, + 7, 12, 8, 11, 9, 11, 9, 10, 14, 16, 13, 13, 13, 14, 12, 12, + 5, 12, 6, 10, 8, 12, 9, 10, 8, 13, 8, 11, 9, 12, 9, 10, + 14, 16, 12, 13, 13, 14, 12, 12, 9, 16, 8, 11, 11, 14, 10, 11, + 11, 16, 9, 12, 12, 14, 10, 11, 15, 16, 12, 13, 14, 15, 12, 11, + 5, 12, 7, 11, 6, 11, 9, 10, 8, 13, 9, 11, 8, 11, 9, 10, + 14, 16, 12, 14, 13, 13, 12, 12, 7, 13, 8, 11, 8, 12, 9, 10, + 8, 12, 8, 11, 9, 12, 9, 10, 13, 16, 12, 13, 12, 13, 11, 11, + 10, 16, 9, 12, 12, 14, 10, 11, 11, 15, 9, 12, 12, 14, 10, 11, + 14, 16, 11, 13, 13, 14, 11, 11, 9, 16, 11, 14, 8, 13, 10, 11, + 11, 16, 12, 13, 10, 13, 10, 11, 16, 16, 13, 15, 13, 14, 12, 12, + 11, 16, 11, 14, 10, 13, 10, 11, 11, 16, 11, 13, 10, 13, 10, 11, + 14, 16, 13, 14, 12, 13, 11, 11, 14, 16, 12, 14, 13, 15, 11, 11, + 13, 16, 12, 13, 12, 14, 11, 11, 14, 16, 12, 13, 12, 13, 11, 10, + 6, 14, 8, 12, 9, 13, 10, 11, 10, 14, 10, 12, 11, 13, 11, 12, + 16, 16, 14, 14, 14, 14, 13, 12, 7, 14, 8, 12, 9, 13, 10, 11, + 10, 14, 10, 12, 11, 13, 11, 11, 16, 16, 13, 14, 14, 15, 13, 12, + 10, 16, 8, 12, 12, 14, 10, 11, 12, 16, 10, 12, 13, 15, 11, 11, + 16, 16, 13, 14, 15, 16, 12, 12, 8, 15, 9, 13, 9, 13, 10, 11, + 10, 15, 10, 13, 10, 13, 11, 11, 16, 16, 14, 14, 14, 14, 13, 12, + 8, 15, 9, 12, 10, 13, 10, 11, 10, 14, 10, 12, 10, 13, 10, 11, + 16, 16, 13, 14, 13, 14, 12, 12, 10, 16, 10, 13, 12, 15, 11, 11, + 11, 16, 9, 12, 12, 14, 11, 11, 14, 16, 11, 13, 14, 16, 12, 11, + 10, 16, 12, 14, 9, 13, 11, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 16, 16, 15, 16, 14, 14, 13, 12, 11, 16, 12, 14, 11, 14, 11, 11, + 11, 16, 12, 14, 10, 13, 11, 11, 15, 16, 13, 15, 12, 14, 12, 11, + 14, 16, 13, 14, 13, 16, 12, 12, 12, 16, 12, 13, 12, 14, 11, 11, + 14, 16, 11, 12, 12, 13, 10, 10, 9, 16, 10, 14, 11, 15, 12, 12, + 12, 16, 11, 13, 12, 15, 12, 12, 16, 16, 14, 13, 15, 15, 13, 12, + 10, 16, 10, 14, 11, 15, 11, 12, 12, 16, 11, 13, 12, 14, 12, 12, + 16, 16, 14, 13, 15, 14, 13, 12, 11, 16, 9, 12, 12, 14, 11, 11, + 13, 16, 11, 13, 13, 15, 11, 11, 16, 16, 14, 14, 16, 16, 12, 12, + 10, 16, 10, 14, 11, 14, 11, 12, 12, 16, 11, 13, 12, 14, 12, 12, + 16, 16, 14, 14, 15, 15, 13, 12, 10, 16, 10, 13, 11, 14, 11, 12, + 11, 16, 11, 13, 11, 14, 11, 12, 16, 16, 14, 14, 14, 14, 13, 12, + 11, 16, 10, 12, 12, 15, 11, 11, 12, 16, 9, 12, 12, 14, 10, 11, + 16, 16, 12, 13, 14, 15, 11, 11, 11, 16, 12, 14, 10, 14, 11, 11, + 13, 16, 12, 14, 12, 14, 11, 11, 16, 16, 15, 15, 14, 15, 12, 12, + 11, 16, 12, 14, 11, 14, 11, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 16, 16, 14, 14, 13, 14, 12, 11, 12, 16, 11, 13, 12, 14, 10, 10, + 12, 15, 11, 12, 12, 13, 10, 10, 14, 15, 11, 11, 12, 12, 10, 9, + }, + { + 0, 8, 3, 8, 5, 9, 7, 8, 5, 10, 6, 10, 8, 11, 8, 9, + 16, 16, 15, 16, 16, 16, 11, 11, 2, 10, 4, 9, 7, 10, 7, 8, + 7, 16, 7, 10, 9, 11, 8, 9, 16, 16, 15, 16, 16, 16, 11, 11, + 7, 16, 6, 11, 10, 16, 9, 10, 10, 16, 9, 11, 11, 16, 9, 10, + 16, 16, 16, 16, 16, 16, 16, 11, 3, 10, 6, 9, 5, 10, 7, 9, + 7, 16, 8, 10, 8, 11, 8, 9, 16, 16, 16, 16, 16, 16, 11, 11, + 5, 11, 7, 10, 8, 11, 8, 9, 7, 14, 7, 10, 8, 11, 8, 9, + 16, 16, 11, 16, 16, 16, 10, 11, 9, 16, 9, 11, 11, 16, 9, 10, + 10, 16, 8, 11, 11, 16, 9, 10, 16, 16, 11, 16, 16, 16, 11, 10, + 8, 16, 9, 16, 7, 16, 9, 10, 11, 16, 11, 16, 10, 16, 10, 10, + 16, 16, 16, 16, 16, 16, 16, 11, 9, 16, 10, 16, 9, 16, 9, 10, + 10, 16, 10, 16, 9, 16, 9, 10, 16, 16, 16, 16, 11, 16, 11, 11, + 16, 16, 16, 16, 16, 16, 10, 10, 11, 16, 11, 16, 11, 16, 10, 10, + 16, 16, 11, 16, 11, 16, 10, 9, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 1, 10, 6, 10, 7, 11, 9, 10, 8, 12, 9, 12, 9, 12, 10, 10, + 15, 16, 14, 15, 14, 16, 13, 12, 5, 12, 7, 11, 8, 11, 9, 10, + 9, 13, 9, 12, 10, 12, 10, 10, 16, 16, 14, 15, 13, 16, 13, 12, + 10, 15, 10, 13, 12, 14, 11, 11, 12, 16, 11, 13, 12, 14, 11, 11, + 16, 16, 14, 16, 14, 16, 13, 12, 5, 12, 8, 11, 7, 11, 9, 10, + 9, 13, 10, 12, 9, 12, 10, 10, 14, 16, 14, 15, 13, 14, 13, 12, + 7, 13, 9, 12, 9, 12, 10, 10, 9, 13, 9, 12, 9, 12, 10, 10, + 14, 16, 13, 14, 13, 15, 12, 12, 11, 16, 11, 13, 12, 14, 11, 11, + 12, 16, 11, 14, 12, 14, 11, 11, 16, 16, 14, 16, 14, 16, 13, 12, + 10, 16, 11, 14, 10, 13, 11, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 15, 16, 15, 16, 14, 16, 13, 12, 11, 16, 12, 14, 11, 14, 11, 12, + 12, 16, 12, 14, 11, 14, 11, 11, 15, 16, 14, 16, 13, 16, 13, 12, + 13, 16, 13, 16, 13, 16, 12, 12, 13, 16, 13, 16, 13, 16, 12, 12, + 16, 16, 14, 15, 14, 16, 13, 12, 4, 11, 7, 10, 7, 11, 9, 10, + 9, 13, 9, 11, 9, 12, 10, 10, 15, 16, 14, 15, 14, 15, 13, 12, + 6, 12, 7, 11, 8, 11, 9, 10, 9, 13, 9, 12, 10, 12, 10, 10, + 15, 16, 13, 14, 14, 15, 12, 12, 10, 14, 10, 12, 12, 13, 11, 11, + 12, 16, 11, 13, 12, 14, 11, 11, 16, 16, 14, 15, 15, 16, 13, 12, + 6, 12, 8, 11, 8, 11, 9, 10, 9, 13, 10, 12, 9, 12, 10, 10, + 16, 16, 14, 15, 13, 14, 12, 12, 8, 13, 9, 11, 9, 12, 9, 10, + 9, 13, 9, 12, 9, 12, 9, 10, 14, 16, 13, 14, 13, 14, 12, 11, + 11, 15, 11, 13, 12, 14, 11, 11, 11, 16, 10, 13, 12, 14, 11, 11, + 15, 16, 13, 15, 14, 16, 12, 11, 10, 16, 12, 13, 10, 13, 11, 11, + 11, 16, 12, 14, 10, 13, 11, 11, 16, 16, 14, 16, 13, 16, 13, 12, + 11, 16, 12, 14, 10, 14, 11, 11, 11, 16, 12, 14, 10, 13, 11, 11, + 16, 16, 14, 16, 12, 15, 12, 11, 13, 16, 13, 15, 13, 15, 12, 12, + 13, 16, 12, 15, 12, 15, 12, 11, 15, 16, 13, 16, 13, 16, 12, 11, + 8, 14, 9, 12, 10, 13, 11, 11, 11, 16, 11, 13, 11, 13, 11, 11, + 16, 16, 16, 16, 16, 16, 14, 13, 9, 14, 10, 12, 10, 13, 11, 11, + 11, 16, 11, 13, 12, 13, 11, 11, 16, 16, 15, 16, 15, 16, 14, 12, + 11, 16, 11, 13, 12, 14, 12, 11, 13, 16, 12, 14, 13, 14, 12, 11, + 16, 16, 15, 16, 16, 16, 14, 13, 9, 14, 10, 13, 10, 13, 11, 11, + 11, 16, 11, 13, 11, 13, 11, 11, 16, 16, 15, 16, 14, 15, 14, 13, + 9, 14, 10, 13, 10, 13, 11, 11, 11, 15, 11, 13, 11, 13, 11, 11, + 16, 16, 14, 16, 14, 16, 13, 12, 12, 16, 12, 14, 13, 14, 12, 11, + 12, 16, 11, 14, 12, 15, 12, 11, 16, 16, 13, 16, 15, 16, 13, 11, + 11, 16, 12, 14, 11, 14, 12, 11, 13, 16, 13, 15, 12, 14, 12, 12, + 16, 16, 16, 16, 14, 16, 14, 13, 12, 16, 13, 15, 11, 14, 12, 12, + 12, 16, 13, 14, 11, 15, 12, 11, 16, 16, 15, 16, 13, 15, 13, 12, + 13, 16, 13, 15, 13, 16, 12, 12, 13, 16, 13, 15, 13, 15, 12, 12, + 15, 16, 13, 16, 13, 15, 11, 10, 10, 16, 12, 14, 12, 15, 12, 12, + 14, 16, 13, 15, 13, 16, 13, 12, 16, 16, 16, 16, 16, 16, 15, 13, + 10, 16, 12, 14, 12, 15, 12, 12, 13, 16, 13, 15, 13, 15, 13, 12, + 16, 16, 16, 16, 16, 16, 14, 13, 11, 16, 12, 15, 13, 16, 12, 12, + 14, 16, 13, 16, 13, 16, 12, 12, 16, 16, 15, 16, 15, 16, 14, 12, + 11, 16, 12, 14, 12, 16, 12, 12, 14, 16, 13, 15, 13, 15, 13, 12, + 16, 16, 16, 16, 16, 16, 15, 13, 11, 16, 12, 14, 12, 15, 12, 12, + 13, 16, 12, 14, 12, 15, 12, 12, 16, 16, 16, 16, 16, 16, 14, 12, + 12, 16, 12, 15, 13, 16, 12, 12, 13, 16, 12, 15, 13, 15, 12, 11, + 16, 16, 14, 16, 15, 16, 13, 12, 12, 16, 13, 16, 12, 16, 12, 12, + 15, 16, 14, 16, 13, 16, 12, 12, 16, 16, 16, 16, 16, 16, 14, 13, + 12, 16, 13, 15, 12, 16, 12, 12, 13, 16, 13, 15, 12, 15, 12, 12, + 16, 16, 15, 16, 14, 16, 13, 12, 13, 16, 13, 16, 12, 16, 12, 12, + 13, 16, 12, 16, 12, 15, 12, 12, 14, 16, 12, 14, 12, 14, 11, 10, + }, + }, + { + { + 0, 16, 6, 16, 8, 16, 16, 16, 9, 16, 11, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 16, 7, 16, 11, 16, 16, 16, + 10, 16, 11, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 10, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 5, 16, 10, 16, 9, 16, 16, 16, + 10, 16, 13, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 11, 16, 12, 16, 16, 16, 10, 16, 12, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 7, 16, 8, 16, 13, 16, + 9, 16, 11, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 7, 16, 11, 16, 13, 16, 9, 16, 11, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 9, 16, 16, 16, 16, 16, + 13, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 10, 16, 8, 16, 16, 16, 10, 16, 12, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 10, 16, 11, 16, 16, 16, + 9, 16, 11, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 12, 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 10, 16, 16, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 8, 16, 10, 16, 16, 16, 10, 16, 11, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 8, 16, 11, 16, 16, 16, + 10, 16, 12, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 9, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 10, 16, 10, 16, 16, 16, + 11, 16, 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 11, 16, 11, 16, 16, 16, 10, 16, 12, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 12, 16, 16, 16, 16, 16, + 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 16, 16, 12, 16, 16, 16, + 12, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 10, 16, 11, 16, 16, 16, + 11, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 9, 16, 11, 16, 13, 16, 11, 16, 12, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 9, 16, 13, 16, 12, 16, + 13, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 10, 16, 14, 16, 12, 16, 12, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 11, 16, 11, 16, 13, 16, + 10, 16, 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 10, 16, 13, 16, 12, 16, 12, 16, 11, 16, 16, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 12, 16, 10, 16, 13, 16, + 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 13, 16, 11, 16, 13, 16, 12, 16, 13, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 13, 16, 16, 16, 12, 16, + 13, 16, 12, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 0, 10, 4, 10, 5, 11, 9, 11, 6, 11, 8, 11, 8, 12, 10, 12, + 15, 16, 13, 15, 14, 15, 13, 14, 4, 12, 5, 11, 8, 12, 9, 11, + 7, 13, 8, 12, 9, 13, 10, 12, 15, 16, 13, 15, 14, 16, 13, 14, + 10, 16, 9, 13, 12, 16, 11, 13, 11, 16, 10, 14, 13, 16, 12, 13, + 16, 16, 14, 16, 15, 16, 14, 15, 4, 12, 7, 12, 6, 12, 9, 11, + 8, 13, 9, 12, 9, 12, 10, 12, 15, 16, 13, 15, 14, 15, 13, 14, + 7, 13, 8, 12, 9, 13, 10, 12, 8, 13, 9, 12, 9, 13, 10, 12, + 14, 16, 13, 15, 13, 15, 13, 14, 12, 16, 11, 14, 13, 16, 12, 13, + 12, 16, 11, 14, 13, 16, 12, 13, 16, 16, 14, 16, 15, 16, 14, 15, + 10, 16, 12, 16, 10, 14, 12, 13, 12, 16, 13, 16, 11, 14, 12, 13, + 16, 16, 16, 16, 15, 16, 14, 15, 12, 16, 13, 16, 11, 15, 12, 13, + 13, 16, 13, 16, 12, 15, 12, 14, 16, 16, 16, 16, 14, 16, 13, 14, + 16, 16, 14, 16, 14, 16, 13, 15, 16, 16, 14, 16, 14, 16, 13, 15, + 16, 16, 16, 16, 16, 16, 14, 16, 2, 11, 5, 11, 6, 11, 9, 11, + 7, 12, 8, 11, 9, 12, 10, 12, 15, 16, 14, 14, 14, 14, 13, 14, + 4, 13, 6, 11, 8, 12, 9, 11, 8, 13, 8, 12, 10, 13, 10, 12, + 15, 16, 13, 15, 14, 15, 13, 14, 9, 16, 8, 13, 12, 15, 11, 12, + 11, 16, 10, 14, 13, 16, 12, 13, 16, 16, 14, 16, 16, 16, 14, 15, + 5, 13, 8, 12, 7, 12, 9, 11, 8, 13, 9, 12, 9, 12, 10, 12, + 16, 16, 14, 15, 14, 15, 13, 13, 7, 13, 8, 12, 9, 13, 10, 12, + 8, 13, 8, 12, 9, 13, 10, 12, 14, 16, 13, 14, 13, 15, 12, 13, + 11, 16, 10, 14, 13, 16, 12, 13, 11, 16, 10, 13, 12, 15, 11, 13, + 14, 16, 12, 14, 14, 16, 13, 14, 10, 16, 12, 15, 9, 14, 11, 13, + 12, 16, 12, 16, 11, 14, 12, 13, 16, 16, 15, 16, 16, 16, 14, 15, + 11, 16, 12, 15, 11, 15, 12, 13, 12, 16, 12, 15, 11, 14, 12, 13, + 16, 16, 14, 16, 13, 15, 13, 14, 15, 16, 14, 16, 14, 16, 13, 14, + 14, 16, 13, 16, 14, 16, 13, 14, 16, 16, 14, 16, 14, 16, 13, 14, + 7, 15, 8, 13, 9, 14, 11, 13, 10, 14, 10, 13, 11, 14, 12, 13, + 16, 16, 15, 16, 15, 16, 15, 14, 7, 16, 8, 13, 10, 14, 11, 13, + 11, 15, 10, 13, 12, 14, 12, 13, 16, 16, 16, 16, 16, 16, 15, 15, + 10, 16, 9, 13, 13, 16, 12, 13, 13, 16, 11, 14, 14, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 16, 8, 16, 10, 14, 9, 14, 11, 13, + 11, 16, 11, 14, 11, 14, 12, 13, 16, 16, 16, 16, 16, 16, 14, 15, + 8, 16, 10, 14, 10, 14, 11, 13, 10, 15, 10, 14, 11, 14, 12, 13, + 16, 16, 14, 16, 15, 16, 14, 14, 11, 16, 10, 14, 13, 16, 12, 13, + 11, 16, 10, 13, 13, 16, 12, 13, 16, 16, 13, 16, 16, 16, 14, 14, + 11, 16, 12, 16, 10, 15, 12, 13, 14, 16, 14, 16, 12, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 13, 16, 11, 16, 12, 14, + 12, 16, 13, 16, 11, 14, 12, 13, 16, 16, 16, 16, 14, 16, 14, 14, + 15, 16, 14, 16, 16, 16, 13, 14, 13, 16, 13, 15, 14, 16, 13, 14, + 14, 16, 13, 14, 14, 15, 13, 14, 9, 16, 11, 16, 12, 16, 13, 14, + 12, 16, 12, 15, 13, 16, 13, 14, 16, 16, 16, 15, 16, 16, 15, 15, + 10, 16, 10, 16, 12, 16, 12, 14, 12, 16, 12, 14, 13, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 15, 11, 16, 10, 14, 14, 16, 12, 13, + 14, 16, 12, 16, 14, 16, 13, 14, 16, 16, 16, 16, 16, 16, 16, 15, + 10, 16, 12, 16, 11, 16, 12, 14, 13, 16, 12, 15, 13, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 15, 10, 16, 11, 16, 12, 16, 12, 14, + 12, 16, 12, 15, 13, 16, 13, 14, 16, 16, 16, 16, 16, 16, 14, 14, + 11, 16, 10, 14, 14, 16, 12, 13, 13, 16, 11, 14, 14, 16, 12, 13, + 16, 16, 15, 16, 16, 16, 14, 14, 12, 16, 13, 16, 11, 16, 12, 14, + 15, 16, 14, 16, 13, 16, 13, 14, 16, 16, 16, 16, 16, 16, 14, 16, + 12, 16, 13, 16, 12, 16, 12, 14, 13, 16, 13, 16, 12, 16, 12, 13, + 16, 16, 16, 16, 16, 16, 14, 15, 13, 16, 13, 16, 14, 16, 12, 13, + 13, 16, 13, 14, 14, 16, 12, 13, 16, 16, 14, 14, 14, 15, 13, 13, + }, + { + 0, 9, 3, 9, 5, 9, 7, 9, 5, 10, 7, 11, 8, 11, 9, 10, + 16, 16, 16, 16, 16, 16, 16, 16, 2, 11, 4, 10, 7, 11, 8, 10, + 7, 16, 7, 11, 9, 16, 9, 11, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 7, 16, 11, 16, 10, 11, 11, 16, 10, 16, 16, 16, 11, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 2, 11, 6, 10, 6, 10, 8, 10, + 7, 16, 8, 16, 8, 11, 9, 11, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 13, 7, 11, 8, 11, 9, 11, 6, 12, 8, 12, 8, 12, 9, 11, + 16, 16, 16, 16, 16, 16, 16, 16, 10, 16, 10, 16, 12, 16, 10, 13, + 10, 16, 9, 16, 11, 16, 11, 12, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 8, 16, 10, 12, 11, 16, 12, 16, 10, 16, 11, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 10, 16, 11, 16, 10, 16, 11, 16, + 11, 16, 12, 16, 10, 16, 11, 12, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 1, 10, 5, 10, 6, 10, 9, 10, 7, 12, 9, 12, 9, 12, 10, 10, + 16, 16, 15, 16, 14, 16, 13, 13, 5, 12, 7, 11, 8, 11, 9, 10, + 8, 13, 9, 12, 10, 12, 10, 11, 16, 16, 16, 16, 14, 16, 13, 12, + 10, 16, 10, 13, 12, 14, 12, 12, 12, 16, 11, 14, 13, 15, 12, 12, + 16, 16, 16, 15, 16, 16, 14, 13, 5, 12, 8, 11, 7, 11, 9, 10, + 8, 13, 10, 12, 9, 12, 10, 10, 15, 16, 14, 15, 14, 14, 13, 13, + 7, 13, 9, 12, 9, 12, 10, 10, 9, 13, 10, 13, 10, 13, 10, 10, + 14, 16, 14, 15, 14, 16, 13, 12, 11, 16, 12, 14, 12, 15, 12, 12, + 12, 16, 12, 15, 13, 16, 12, 12, 16, 16, 15, 16, 16, 16, 14, 13, + 10, 16, 12, 14, 10, 14, 12, 12, 12, 16, 13, 14, 11, 14, 12, 12, + 16, 16, 16, 16, 14, 16, 14, 13, 11, 16, 12, 14, 11, 14, 12, 12, + 12, 16, 13, 16, 11, 15, 12, 12, 16, 16, 16, 16, 14, 16, 14, 13, + 13, 16, 14, 16, 14, 16, 13, 13, 13, 16, 13, 16, 13, 16, 13, 12, + 16, 16, 16, 16, 16, 16, 13, 13, 4, 11, 7, 10, 7, 11, 9, 10, + 8, 12, 9, 12, 9, 12, 10, 11, 15, 16, 14, 15, 14, 16, 13, 13, + 6, 12, 7, 11, 8, 11, 9, 10, 9, 13, 9, 12, 10, 12, 10, 10, + 16, 16, 15, 16, 15, 16, 13, 12, 10, 16, 10, 13, 12, 14, 12, 11, + 12, 16, 11, 14, 13, 14, 12, 12, 16, 16, 16, 14, 16, 16, 14, 13, + 6, 12, 8, 11, 7, 11, 9, 10, 9, 14, 10, 12, 9, 12, 10, 10, + 15, 16, 14, 16, 14, 16, 14, 13, 7, 13, 9, 12, 9, 12, 10, 10, + 9, 13, 9, 12, 9, 12, 10, 10, 14, 16, 13, 14, 14, 16, 12, 11, + 11, 16, 11, 14, 12, 14, 12, 12, 12, 16, 11, 14, 12, 14, 12, 11, + 16, 16, 13, 16, 14, 16, 13, 12, 10, 16, 12, 14, 10, 14, 11, 11, + 12, 16, 13, 14, 11, 14, 12, 12, 16, 16, 16, 16, 14, 16, 13, 13, + 11, 16, 12, 16, 11, 14, 12, 12, 12, 16, 12, 14, 11, 14, 12, 11, + 16, 16, 15, 16, 13, 15, 13, 12, 13, 16, 14, 16, 13, 16, 13, 12, + 13, 16, 13, 16, 13, 16, 13, 12, 16, 16, 14, 16, 14, 16, 12, 11, + 8, 13, 10, 12, 10, 13, 11, 11, 11, 14, 12, 14, 12, 14, 12, 12, + 16, 16, 16, 16, 16, 16, 14, 13, 9, 14, 10, 13, 10, 13, 11, 11, + 12, 16, 12, 13, 12, 13, 12, 11, 16, 16, 16, 16, 16, 16, 15, 14, + 12, 16, 11, 14, 13, 15, 12, 12, 13, 16, 12, 15, 14, 15, 13, 12, + 16, 16, 16, 16, 16, 16, 15, 13, 9, 14, 11, 13, 10, 13, 11, 11, + 11, 16, 12, 14, 12, 14, 12, 12, 16, 16, 16, 16, 16, 16, 16, 13, + 10, 15, 11, 13, 11, 14, 12, 11, 11, 16, 12, 14, 11, 14, 12, 11, + 16, 16, 16, 16, 16, 16, 14, 12, 12, 16, 12, 14, 13, 15, 13, 12, + 12, 16, 12, 14, 13, 15, 12, 12, 16, 16, 14, 16, 16, 16, 14, 12, + 12, 16, 13, 16, 11, 14, 12, 12, 14, 16, 14, 16, 12, 16, 13, 12, + 16, 16, 16, 16, 16, 16, 16, 13, 12, 16, 13, 16, 12, 16, 13, 12, + 12, 16, 13, 16, 12, 16, 12, 12, 16, 16, 16, 16, 14, 16, 14, 12, + 14, 16, 14, 16, 14, 16, 14, 13, 13, 16, 13, 16, 13, 16, 13, 12, + 16, 16, 13, 16, 13, 16, 12, 11, 9, 16, 12, 15, 13, 16, 13, 12, + 13, 16, 14, 16, 14, 16, 14, 13, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 16, 12, 15, 12, 15, 13, 12, 13, 16, 14, 16, 13, 16, 13, 12, + 16, 16, 16, 16, 16, 16, 16, 13, 12, 16, 12, 16, 13, 16, 13, 12, + 14, 16, 13, 16, 14, 16, 13, 12, 16, 16, 16, 16, 16, 16, 16, 13, + 11, 16, 12, 15, 12, 16, 13, 12, 14, 16, 14, 16, 13, 16, 13, 13, + 16, 16, 16, 16, 16, 16, 15, 13, 11, 16, 12, 16, 12, 16, 13, 12, + 13, 16, 13, 15, 13, 16, 13, 12, 16, 16, 16, 16, 16, 16, 15, 13, + 12, 16, 12, 16, 13, 16, 13, 12, 13, 16, 12, 16, 13, 16, 13, 12, + 16, 16, 14, 16, 16, 16, 14, 12, 12, 16, 14, 16, 11, 16, 13, 12, + 14, 16, 14, 16, 13, 16, 13, 12, 16, 16, 16, 16, 16, 16, 16, 13, + 12, 16, 13, 16, 12, 16, 13, 12, 13, 16, 13, 16, 12, 16, 13, 12, + 16, 16, 16, 16, 14, 16, 14, 12, 13, 16, 13, 16, 13, 16, 13, 13, + 13, 16, 12, 16, 12, 16, 12, 12, 14, 16, 13, 15, 13, 16, 12, 11, + }, + }, +}; + + +static const uint8_t rv34_table_intra_secondpat[NUM_INTRA_TABLES][2][OTHERBLK_VLC_SIZE] = { + { + { + 0, 5, 10, 3, 6, 10, 7, 8, 9, 4, 6, 10, 6, 7, 9, 8, + 8, 9, 8, 8, 9, 8, 9, 9, 9, 9, 8, 3, 6, 10, 4, 6, + 10, 7, 7, 9, 5, 7, 10, 6, 7, 9, 7, 7, 8, 7, 8, 9, + 8, 8, 9, 8, 8, 7, 6, 8, 10, 6, 8, 10, 7, 8, 9, 7, + 8, 10, 7, 8, 10, 8, 8, 8, 8, 9, 9, 8, 8, 9, 9, 8, + 7, 7, 8, 9, 7, 8, 9, 7, 7, 7, 8, 8, 9, 7, 8, 9, + 7, 7, 7, 8, 8, 8, 7, 7, 7, 7, 6, 5, + }, + { + 0, 5, 11, 3, 6, 11, 8, 9, 11, 3, 6, 10, 6, 7, 11, 9, + 9, 11, 7, 9, 11, 9, 9, 11, 10, 10, 11, 2, 6, 10, 4, 7, + 10, 7, 9, 11, 4, 7, 11, 6, 7, 10, 9, 9, 11, 7, 9, 11, + 8, 9, 10, 10, 10, 10, 5, 8, 11, 6, 8, 11, 8, 9, 11, 6, + 8, 11, 7, 8, 11, 9, 9, 11, 8, 10, 11, 9, 9, 11, 10, 10, + 10, 8, 9, 11, 8, 9, 11, 9, 9, 10, 8, 9, 11, 8, 9, 11, + 9, 9, 10, 8, 9, 10, 9, 9, 10, 9, 9, 8, + }, + }, + { + { + 0, 5, 10, 4, 6, 10, 7, 8, 10, 4, 6, 10, 6, 7, 9, 8, + 8, 9, 8, 8, 9, 8, 9, 9, 9, 9, 9, 2, 6, 10, 4, 6, + 10, 7, 7, 9, 5, 7, 10, 6, 7, 9, 7, 7, 9, 7, 8, 9, + 8, 8, 9, 9, 8, 8, 6, 8, 10, 6, 8, 10, 7, 8, 9, 6, + 8, 10, 7, 8, 10, 8, 8, 9, 8, 9, 10, 8, 8, 9, 9, 9, + 8, 8, 8, 10, 7, 8, 9, 7, 8, 8, 7, 8, 10, 7, 8, 9, + 7, 7, 8, 8, 8, 9, 8, 8, 8, 7, 7, 6, + }, + { + 0, 5, 12, 4, 7, 12, 8, 10, 13, 4, 7, 12, 6, 8, 12, 10, + 10, 12, 8, 9, 12, 10, 10, 12, 12, 12, 12, 1, 6, 12, 4, 7, + 12, 8, 9, 12, 4, 7, 12, 6, 8, 11, 9, 10, 12, 8, 9, 12, + 9, 10, 11, 11, 11, 12, 6, 8, 12, 7, 9, 12, 9, 10, 13, 6, + 9, 12, 8, 9, 12, 10, 10, 12, 9, 10, 12, 10, 10, 12, 12, 12, + 12, 8, 10, 12, 9, 10, 12, 10, 10, 12, 8, 10, 12, 9, 10, 12, + 10, 10, 11, 9, 10, 12, 10, 10, 11, 11, 10, 10, + }, + }, + { + { + 0, 5, 10, 3, 6, 10, 7, 8, 11, 4, 6, 10, 6, 7, 10, 8, + 9, 10, 8, 8, 10, 9, 9, 10, 10, 10, 10, 2, 6, 10, 4, 6, + 10, 7, 8, 10, 4, 7, 10, 6, 7, 10, 8, 8, 10, 7, 8, 10, + 8, 8, 9, 10, 9, 9, 5, 8, 11, 6, 8, 10, 7, 9, 10, 6, + 8, 11, 7, 8, 10, 8, 8, 10, 8, 9, 11, 9, 9, 10, 10, 9, + 9, 8, 9, 10, 8, 9, 10, 8, 9, 10, 8, 9, 10, 8, 8, 10, + 8, 8, 9, 8, 9, 10, 8, 8, 9, 9, 8, 8, + }, + { + 0, 6, 13, 4, 7, 14, 9, 11, 14, 3, 7, 13, 7, 8, 13, 11, + 11, 14, 8, 10, 13, 10, 11, 13, 13, 13, 14, 1, 6, 12, 4, 8, + 13, 9, 10, 15, 4, 8, 13, 7, 8, 12, 11, 11, 14, 8, 10, 13, + 10, 10, 13, 13, 13, 14, 5, 9, 13, 7, 9, 13, 10, 11, 14, 6, + 10, 14, 8, 10, 14, 11, 11, 14, 9, 11, 14, 11, 11, 13, 13, 13, + 14, 9, 10, 14, 9, 11, 13, 11, 12, 14, 9, 11, 13, 9, 11, 14, + 11, 12, 13, 10, 12, 15, 11, 11, 13, 13, 12, 13, + }, + }, + { + { + 0, 5, 11, 3, 6, 11, 7, 9, 12, 3, 6, 11, 6, 7, 11, 9, + 9, 11, 8, 9, 11, 9, 9, 11, 11, 11, 12, 2, 6, 11, 4, 6, + 11, 7, 9, 11, 4, 7, 11, 5, 7, 10, 9, 9, 11, 7, 8, 11, + 9, 9, 10, 11, 11, 11, 5, 8, 11, 6, 8, 11, 8, 9, 12, 6, + 8, 11, 7, 8, 11, 9, 9, 11, 8, 9, 12, 9, 9, 11, 11, 11, + 11, 8, 10, 12, 8, 10, 11, 9, 10, 12, 8, 10, 12, 8, 9, 12, + 10, 10, 12, 9, 10, 12, 9, 9, 11, 11, 10, 11, + }, + { + 0, 6, 13, 3, 8, 14, 10, 12, 16, 3, 8, 15, 7, 9, 15, 12, + 13, 15, 9, 11, 15, 11, 12, 16, 14, 16, 16, 1, 7, 13, 4, 8, + 14, 9, 11, 15, 4, 8, 14, 7, 9, 14, 12, 13, 15, 8, 10, 14, + 11, 11, 14, 16, 14, 16, 6, 9, 14, 7, 10, 14, 11, 13, 15, 7, + 10, 14, 9, 10, 13, 12, 12, 15, 10, 11, 14, 11, 11, 14, 14, 14, + 16, 9, 11, 14, 10, 11, 14, 13, 14, 15, 9, 12, 14, 10, 12, 16, + 13, 14, 16, 10, 13, 16, 12, 12, 14, 15, 14, 15, + }, + }, + { + { + 0, 6, 12, 3, 7, 12, 9, 11, 13, 4, 7, 12, 6, 8, 12, 10, + 11, 13, 8, 10, 13, 10, 11, 13, 13, 13, 14, 1, 6, 12, 4, 7, + 12, 9, 10, 14, 4, 7, 12, 6, 7, 12, 10, 11, 13, 8, 9, 13, + 10, 10, 12, 13, 13, 14, 6, 9, 13, 7, 9, 13, 10, 12, 14, 7, + 9, 13, 8, 10, 13, 11, 11, 14, 9, 11, 13, 11, 11, 14, 13, 13, + 14, 10, 12, 14, 10, 12, 14, 12, 13, 15, 10, 12, 14, 10, 12, 14, + 12, 13, 15, 11, 13, 15, 12, 12, 15, 14, 14, 14, + }, + { + 0, 6, 16, 3, 8, 16, 10, 13, 16, 3, 8, 16, 7, 9, 16, 13, + 16, 16, 8, 10, 16, 11, 13, 16, 16, 16, 16, 1, 7, 14, 4, 8, + 16, 10, 12, 16, 4, 8, 13, 7, 9, 16, 13, 14, 16, 8, 10, 16, + 11, 11, 14, 16, 16, 16, 6, 9, 14, 8, 10, 14, 12, 16, 16, 6, + 10, 13, 9, 11, 16, 13, 14, 16, 9, 12, 16, 12, 11, 16, 16, 16, + 16, 10, 12, 16, 11, 12, 16, 16, 14, 16, 9, 12, 16, 11, 12, 16, + 16, 15, 16, 10, 13, 16, 12, 13, 16, 16, 16, 16, + }, + }, +}; + +static const uint8_t rv34_table_intra_thirdpat[NUM_INTRA_TABLES][2][OTHERBLK_VLC_SIZE] = { + { + { + 0, 5, 10, 3, 6, 10, 7, 8, 10, 4, 7, 10, 6, 7, 10, 8, + 8, 10, 8, 9, 10, 9, 9, 10, 9, 9, 9, 2, 6, 10, 4, 7, + 10, 7, 8, 9, 5, 7, 10, 6, 7, 10, 8, 8, 9, 8, 9, 10, + 8, 8, 9, 9, 9, 8, 6, 8, 11, 6, 8, 10, 7, 8, 10, 6, + 8, 11, 7, 8, 10, 8, 8, 9, 8, 9, 10, 9, 9, 10, 9, 9, + 9, 7, 8, 10, 7, 8, 10, 7, 8, 8, 7, 8, 10, 7, 8, 9, + 7, 8, 8, 8, 8, 9, 8, 8, 8, 7, 7, 7, + }, + { + 0, 4, 10, 3, 6, 10, 7, 8, 11, 3, 6, 10, 5, 7, 10, 9, + 9, 11, 9, 10, 11, 9, 10, 11, 11, 11, 11, 2, 6, 10, 4, 6, + 10, 7, 8, 10, 4, 7, 10, 6, 7, 10, 8, 9, 10, 8, 9, 11, + 9, 9, 11, 10, 10, 11, 6, 8, 11, 6, 8, 11, 8, 9, 11, 7, + 9, 11, 7, 8, 11, 9, 9, 11, 9, 10, 12, 10, 10, 12, 11, 11, + 11, 8, 9, 11, 8, 9, 11, 9, 9, 11, 9, 10, 11, 9, 10, 11, + 9, 10, 11, 10, 11, 12, 10, 10, 12, 10, 10, 10, + }, + }, + { + { + 0, 5, 10, 3, 6, 10, 7, 8, 10, 4, 7, 10, 6, 7, 10, 8, + 9, 10, 8, 9, 11, 8, 9, 10, 10, 10, 10, 2, 6, 10, 4, 6, + 10, 7, 8, 10, 4, 7, 10, 5, 7, 10, 8, 8, 10, 8, 9, 10, + 8, 9, 10, 9, 9, 9, 5, 7, 11, 6, 8, 11, 7, 8, 11, 6, + 8, 11, 7, 8, 10, 8, 9, 10, 8, 9, 11, 9, 9, 10, 10, 9, + 10, 7, 8, 10, 7, 8, 10, 8, 9, 10, 8, 9, 10, 8, 9, 10, + 8, 8, 10, 9, 9, 10, 9, 9, 10, 9, 9, 9, + }, + { + 0, 5, 11, 3, 6, 11, 8, 9, 12, 4, 7, 12, 6, 7, 12, 9, + 10, 13, 10, 11, 13, 10, 11, 14, 12, 13, 14, 1, 6, 11, 4, 7, + 11, 8, 9, 12, 5, 7, 11, 6, 8, 12, 9, 10, 13, 10, 11, 14, + 10, 11, 13, 12, 12, 14, 6, 8, 12, 7, 9, 13, 9, 10, 14, 7, + 10, 13, 8, 10, 12, 11, 11, 13, 11, 13, 14, 11, 12, 14, 13, 13, + 15, 9, 10, 12, 9, 11, 14, 10, 11, 14, 11, 11, 13, 10, 11, 13, + 11, 12, 14, 12, 14, 15, 13, 13, 14, 13, 13, 14, + }, + }, + { + { + 0, 5, 11, 3, 6, 11, 7, 9, 11, 4, 6, 11, 5, 7, 10, 9, + 9, 11, 8, 9, 11, 9, 10, 11, 11, 11, 11, 2, 6, 10, 3, 6, + 10, 7, 9, 11, 4, 7, 10, 5, 7, 10, 8, 9, 11, 8, 9, 11, + 9, 9, 11, 11, 11, 11, 5, 8, 11, 6, 8, 11, 8, 10, 12, 6, + 8, 11, 7, 8, 11, 9, 10, 11, 9, 10, 12, 9, 10, 11, 11, 11, + 11, 8, 9, 11, 8, 10, 12, 9, 11, 12, 8, 10, 12, 9, 10, 12, + 10, 11, 12, 10, 11, 12, 10, 10, 11, 11, 11, 11, + }, + { + 0, 5, 13, 2, 7, 16, 9, 11, 16, 4, 8, 16, 7, 9, 16, 12, + 12, 16, 12, 16, 16, 12, 16, 16, 16, 16, 16, 1, 6, 13, 4, 8, + 16, 9, 11, 16, 6, 9, 16, 7, 10, 16, 13, 13, 16, 13, 15, 16, + 12, 16, 16, 16, 16, 16, 7, 9, 16, 8, 11, 15, 11, 13, 16, 10, + 12, 16, 10, 12, 16, 16, 13, 16, 16, 16, 16, 14, 16, 16, 16, 16, + 16, 12, 12, 16, 12, 16, 16, 16, 16, 16, 13, 14, 16, 12, 13, 16, + 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 6, 11, 3, 7, 11, 8, 10, 12, 4, 7, 11, 6, 8, 11, 10, + 11, 12, 9, 10, 12, 10, 10, 12, 12, 12, 13, 1, 6, 11, 4, 7, + 11, 8, 10, 12, 4, 7, 11, 6, 8, 11, 10, 10, 12, 9, 10, 12, + 10, 10, 12, 13, 13, 13, 6, 8, 12, 7, 10, 12, 10, 12, 13, 7, + 9, 12, 8, 10, 12, 11, 11, 13, 11, 12, 14, 11, 11, 13, 13, 13, + 13, 9, 11, 13, 10, 12, 14, 12, 13, 15, 10, 12, 14, 11, 12, 14, + 13, 13, 14, 12, 13, 15, 13, 13, 14, 14, 14, 14, + }, + { + 0, 5, 16, 2, 6, 16, 10, 14, 16, 4, 8, 16, 7, 9, 16, 11, + 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 1, 6, 12, 4, 8, + 12, 12, 12, 16, 6, 8, 16, 8, 10, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 12, 16, 16, 7, 10, 16, 8, 11, 14, 16, 16, 16, 10, + 12, 16, 10, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 5, 11, 3, 6, 11, 10, 10, 12, 3, 7, 11, 6, 8, 11, 11, + 11, 12, 10, 10, 12, 11, 11, 13, 14, 13, 14, 1, 6, 11, 4, 7, + 11, 10, 11, 13, 5, 7, 11, 7, 8, 11, 11, 11, 13, 10, 11, 13, + 11, 11, 12, 13, 13, 14, 7, 10, 12, 9, 11, 13, 12, 13, 14, 9, + 10, 13, 9, 10, 13, 12, 11, 13, 12, 13, 16, 12, 13, 13, 14, 14, + 14, 11, 14, 16, 12, 14, 15, 14, 13, 16, 13, 13, 15, 13, 14, 16, + 14, 13, 16, 13, 13, 16, 13, 14, 15, 15, 14, 15, + }, + { + 0, 4, 16, 2, 7, 16, 10, 16, 16, 4, 10, 16, 7, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1, 6, 13, 4, 11, + 16, 16, 16, 16, 6, 10, 16, 8, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 8, 16, 16, 10, 16, 16, 16, 16, 16, 10, + 16, 16, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, +}; + + +static const uint8_t rv34_intra_coeff[NUM_INTRA_TABLES][COEFF_VLC_SIZE] = { +{ + 1, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, + 9, 9, 10, 10, 10, 11, 11, 11, 10, 10, 10, 12, 13, 14, 15, 15, +}, +{ + 1, 2, 3, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 10, 11, + 11, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, + 13, 13, 14, 14, 14, 14, 16, 16, 14, 16, 16, 16, 14, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 10, 10, 11, 12, 12, 12, + 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, 14, 12, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 7, 7, 8, 8, 9, 10, 10, 12, 11, 13, 12, + 15, 13, 14, 13, 12, 15, 14, 13, 12, 12, 10, 11, 16, 16, 16, 16, +} +}; + + +static const uint8_t rv34_inter_cbppat[NUM_INTER_TABLES][CBPPAT_VLC_SIZE] = { +{ + 7, 9, 9, 8, 9, 8, 9, 8, 9, 9, 8, 8, 8, 8, 8, 4, + 7, 10, 11, 10, 11, 10, 12, 10, 12, 11, 11, 10, 11, 10, 10, 7, + 10, 11, 15, 12, 15, 12, 15, 12, 15, 14, 14, 12, 14, 12, 14, 9, + 7, 11, 10, 10, 12, 11, 11, 10, 11, 12, 10, 10, 11, 10, 10, 7, + 8, 12, 12, 11, 13, 12, 12, 10, 13, 13, 12, 10, 12, 11, 11, 7, + 11, 13, 15, 11, 15, 13, 15, 12, 16, 14, 14, 12, 15, 13, 13, 9, + 10, 15, 11, 12, 15, 14, 14, 12, 15, 15, 12, 12, 14, 14, 12, 9, + 11, 15, 13, 12, 16, 15, 14, 12, 15, 15, 13, 12, 15, 14, 13, 9, + 13, 15, 14, 10, 16, 15, 16, 11, 16, 16, 15, 12, 16, 15, 15, 9, + 7, 11, 11, 11, 11, 10, 11, 10, 11, 12, 11, 10, 10, 10, 10, 7, + 9, 12, 13, 12, 12, 11, 13, 10, 13, 13, 12, 11, 12, 10, 11, 7, + 12, 13, 16, 14, 15, 12, 16, 12, 16, 15, 15, 13, 15, 12, 14, 9, + 9, 13, 13, 12, 13, 12, 13, 11, 13, 13, 12, 11, 12, 11, 11, 7, + 9, 13, 13, 12, 13, 12, 13, 11, 13, 13, 13, 11, 12, 11, 11, 7, + 12, 14, 15, 13, 16, 13, 15, 11, 16, 14, 15, 12, 15, 12, 13, 8, + 12, 16, 14, 14, 16, 15, 15, 13, 16, 15, 14, 13, 15, 14, 13, 9, + 12, 15, 14, 13, 15, 14, 15, 12, 16, 15, 14, 12, 14, 13, 13, 8, + 13, 16, 16, 12, 16, 14, 16, 11, 16, 16, 15, 12, 16, 14, 14, 8, + 10, 15, 15, 15, 12, 12, 14, 12, 14, 15, 15, 14, 12, 12, 13, 9, + 11, 15, 16, 14, 13, 12, 15, 12, 16, 15, 15, 14, 14, 12, 13, 9, + 14, 15, 16, 16, 15, 11, 16, 12, 16, 16, 16, 15, 16, 12, 15, 9, + 12, 16, 16, 15, 14, 14, 14, 13, 16, 16, 15, 14, 14, 13, 13, 9, + 12, 15, 15, 14, 14, 13, 15, 12, 16, 15, 14, 13, 14, 13, 13, 8, + 13, 16, 16, 15, 16, 12, 16, 11, 16, 16, 16, 14, 16, 13, 14, 8, + 14, 16, 16, 16, 16, 16, 15, 14, 16, 16, 16, 15, 16, 15, 14, 11, + 13, 16, 16, 15, 16, 15, 15, 12, 16, 16, 16, 14, 15, 14, 14, 9, + 14, 16, 16, 13, 16, 14, 16, 10, 16, 16, 16, 13, 16, 14, 14, 8, + 7, 12, 11, 11, 11, 11, 12, 10, 11, 11, 10, 10, 10, 10, 10, 7, + 9, 13, 13, 12, 13, 12, 13, 11, 13, 13, 12, 11, 12, 11, 11, 8, + 12, 14, 16, 14, 16, 14, 16, 13, 16, 14, 15, 13, 15, 13, 14, 9, + 9, 13, 12, 12, 13, 12, 13, 11, 12, 13, 11, 10, 12, 11, 11, 7, + 9, 13, 13, 12, 13, 12, 13, 11, 13, 13, 12, 11, 12, 11, 11, 7, + 12, 14, 16, 13, 16, 14, 15, 12, 15, 15, 14, 12, 15, 13, 13, 8, + 11, 15, 13, 14, 15, 15, 14, 13, 15, 15, 12, 12, 14, 14, 12, 9, + 11, 15, 14, 13, 15, 14, 14, 12, 15, 14, 13, 11, 14, 13, 12, 8, + 13, 16, 15, 12, 16, 15, 16, 12, 16, 16, 14, 11, 15, 14, 14, 8, + 8, 13, 13, 12, 12, 12, 13, 11, 12, 13, 12, 11, 11, 10, 10, 7, + 9, 13, 14, 12, 13, 12, 13, 11, 13, 13, 13, 11, 12, 11, 11, 7, + 12, 14, 16, 14, 15, 13, 15, 12, 15, 15, 15, 13, 14, 12, 13, 8, + 9, 13, 13, 12, 13, 12, 13, 11, 13, 13, 12, 11, 12, 11, 11, 7, + 9, 13, 12, 12, 13, 12, 12, 10, 13, 13, 12, 10, 12, 10, 10, 6, + 11, 14, 14, 12, 14, 12, 14, 11, 14, 14, 13, 11, 13, 11, 12, 7, + 12, 16, 14, 14, 15, 15, 14, 13, 15, 15, 13, 12, 14, 13, 12, 8, + 11, 14, 13, 12, 14, 13, 13, 11, 14, 14, 13, 11, 13, 12, 11, 7, + 11, 14, 14, 12, 15, 13, 14, 11, 15, 14, 13, 11, 14, 12, 12, 6, + 11, 16, 15, 15, 13, 14, 15, 13, 14, 15, 15, 13, 12, 12, 12, 9, + 12, 15, 15, 14, 14, 13, 15, 12, 15, 15, 14, 13, 13, 11, 12, 8, + 13, 16, 16, 15, 16, 13, 16, 13, 16, 16, 15, 14, 14, 12, 14, 8, + 11, 16, 15, 14, 14, 14, 14, 13, 15, 15, 14, 13, 13, 12, 12, 8, + 11, 14, 14, 13, 13, 12, 14, 11, 14, 14, 13, 12, 12, 11, 11, 7, + 12, 14, 15, 13, 14, 12, 14, 11, 15, 14, 14, 12, 13, 11, 12, 7, + 13, 16, 16, 16, 16, 15, 16, 14, 16, 16, 15, 14, 15, 14, 13, 9, + 12, 15, 14, 13, 15, 13, 14, 12, 15, 15, 13, 12, 13, 12, 12, 7, + 11, 15, 14, 12, 14, 13, 14, 10, 15, 14, 13, 11, 13, 11, 11, 5, + 10, 15, 15, 15, 15, 14, 15, 13, 12, 14, 12, 12, 12, 13, 12, 9, + 12, 16, 16, 15, 16, 15, 16, 14, 14, 15, 14, 13, 14, 13, 13, 9, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, 16, 14, 15, 11, + 11, 15, 15, 14, 15, 15, 15, 14, 14, 15, 12, 12, 13, 13, 12, 9, + 12, 15, 15, 14, 16, 14, 15, 13, 14, 14, 13, 12, 14, 13, 12, 8, + 13, 16, 16, 15, 16, 16, 16, 14, 16, 16, 15, 12, 16, 14, 14, 9, + 13, 16, 14, 16, 16, 16, 16, 15, 15, 16, 11, 12, 16, 15, 12, 9, + 13, 16, 15, 14, 16, 15, 16, 14, 15, 16, 12, 11, 15, 14, 13, 8, + 13, 16, 16, 13, 16, 16, 16, 13, 16, 16, 13, 11, 16, 14, 14, 8, + 11, 15, 15, 15, 14, 14, 15, 13, 13, 15, 14, 13, 12, 12, 12, 9, + 11, 15, 16, 14, 15, 14, 15, 13, 14, 14, 14, 13, 13, 12, 13, 8, + 13, 16, 16, 16, 16, 15, 16, 14, 16, 16, 16, 13, 15, 12, 14, 9, + 11, 16, 15, 14, 14, 14, 15, 13, 14, 14, 13, 12, 13, 12, 11, 8, + 11, 14, 14, 13, 14, 13, 14, 12, 13, 13, 12, 11, 12, 11, 11, 7, + 12, 15, 15, 13, 15, 14, 15, 12, 15, 14, 14, 11, 13, 12, 12, 7, + 13, 16, 15, 15, 16, 16, 16, 14, 15, 16, 12, 12, 14, 14, 12, 8, + 11, 15, 14, 13, 15, 13, 14, 12, 14, 14, 12, 11, 13, 12, 11, 6, + 11, 14, 14, 12, 15, 13, 14, 11, 15, 14, 12, 10, 13, 11, 11, 5, + 12, 16, 16, 16, 15, 15, 16, 15, 14, 16, 15, 15, 10, 12, 12, 9, + 13, 16, 16, 16, 15, 14, 16, 13, 15, 15, 15, 14, 12, 11, 13, 8, + 14, 16, 16, 16, 16, 14, 16, 13, 16, 16, 16, 14, 14, 11, 14, 8, + 13, 16, 16, 15, 15, 15, 15, 14, 15, 16, 14, 13, 12, 12, 11, 8, + 11, 15, 15, 13, 14, 13, 14, 12, 14, 14, 13, 12, 12, 11, 11, 6, + 11, 15, 15, 13, 15, 12, 14, 11, 14, 14, 13, 11, 12, 10, 11, 5, + 13, 16, 16, 15, 16, 16, 16, 14, 16, 16, 14, 14, 14, 13, 11, 8, + 11, 14, 14, 13, 14, 13, 14, 11, 14, 14, 12, 11, 12, 11, 10, 5, + 10, 13, 13, 11, 13, 12, 13, 9, 13, 13, 12, 9, 12, 10, 10, 3, +}, +{ + 5, 7, 7, 7, 7, 7, 8, 7, 7, 8, 7, 7, 7, 7, 7, 4, + 7, 9, 11, 9, 11, 9, 11, 9, 11, 10, 10, 9, 10, 9, 10, 6, + 11, 11, 14, 11, 14, 11, 14, 11, 15, 13, 14, 12, 14, 12, 13, 9, + 6, 11, 10, 9, 11, 10, 11, 9, 11, 11, 9, 9, 10, 10, 9, 6, + 8, 11, 11, 10, 12, 11, 12, 10, 12, 12, 11, 10, 12, 11, 11, 7, + 11, 13, 14, 11, 15, 13, 15, 11, 15, 14, 14, 12, 14, 13, 13, 9, + 10, 14, 11, 11, 15, 14, 13, 12, 14, 14, 11, 11, 14, 13, 12, 9, + 11, 14, 13, 11, 15, 14, 14, 11, 15, 15, 13, 11, 14, 14, 13, 9, + 12, 14, 14, 10, 16, 15, 16, 11, 16, 16, 15, 11, 16, 15, 14, 9, + 6, 10, 11, 10, 10, 9, 11, 9, 10, 11, 10, 10, 9, 9, 9, 6, + 9, 12, 12, 11, 12, 10, 12, 10, 12, 12, 12, 11, 11, 10, 11, 7, + 12, 13, 15, 13, 14, 11, 15, 11, 15, 15, 14, 13, 14, 12, 14, 9, + 9, 12, 12, 11, 12, 11, 12, 11, 12, 13, 11, 11, 12, 11, 11, 7, + 9, 12, 12, 11, 13, 11, 12, 10, 13, 13, 12, 11, 12, 11, 11, 7, + 12, 14, 15, 12, 15, 12, 14, 11, 15, 15, 14, 12, 14, 13, 13, 8, + 12, 15, 14, 13, 15, 14, 14, 13, 16, 16, 14, 13, 15, 14, 13, 9, + 12, 15, 14, 13, 15, 14, 14, 12, 15, 15, 13, 12, 14, 13, 13, 9, + 13, 15, 15, 12, 16, 14, 15, 11, 16, 16, 15, 12, 15, 14, 14, 9, + 10, 14, 14, 14, 12, 11, 13, 12, 14, 15, 14, 13, 12, 11, 12, 9, + 12, 14, 15, 14, 13, 11, 14, 12, 15, 15, 15, 14, 13, 11, 13, 9, + 13, 15, 16, 15, 14, 11, 16, 11, 16, 16, 16, 14, 15, 12, 15, 9, + 12, 15, 15, 14, 14, 14, 14, 13, 15, 15, 14, 14, 14, 13, 13, 9, + 12, 15, 15, 14, 14, 13, 14, 12, 15, 15, 14, 13, 14, 13, 13, 9, + 13, 15, 16, 14, 15, 13, 16, 11, 16, 16, 15, 14, 15, 13, 14, 9, + 14, 16, 16, 16, 16, 16, 15, 14, 16, 16, 16, 16, 16, 16, 14, 11, + 14, 16, 16, 14, 16, 15, 15, 12, 16, 16, 16, 14, 15, 14, 14, 9, + 14, 16, 16, 14, 16, 14, 16, 11, 16, 16, 16, 14, 16, 14, 14, 9, + 6, 11, 10, 10, 10, 10, 11, 10, 10, 11, 9, 9, 9, 9, 9, 6, + 9, 12, 12, 11, 13, 11, 13, 11, 12, 12, 11, 11, 12, 11, 11, 7, + 12, 14, 16, 13, 16, 14, 16, 13, 15, 14, 15, 12, 15, 13, 14, 9, + 8, 12, 11, 11, 12, 12, 12, 11, 11, 12, 10, 10, 11, 11, 10, 7, + 9, 12, 12, 11, 13, 12, 13, 11, 13, 12, 11, 10, 12, 11, 11, 7, + 12, 14, 15, 12, 15, 14, 15, 12, 15, 14, 14, 12, 14, 13, 13, 9, + 11, 15, 13, 13, 15, 14, 14, 13, 14, 15, 11, 11, 14, 14, 12, 9, + 11, 14, 13, 12, 15, 14, 14, 12, 14, 14, 12, 11, 14, 13, 12, 8, + 13, 15, 15, 12, 16, 15, 15, 12, 15, 15, 14, 11, 15, 14, 14, 8, + 8, 12, 12, 11, 11, 11, 12, 11, 11, 12, 11, 11, 10, 10, 10, 7, + 9, 13, 13, 12, 13, 11, 13, 11, 12, 13, 12, 11, 11, 10, 11, 7, + 12, 14, 15, 14, 15, 13, 15, 12, 15, 14, 14, 13, 14, 12, 13, 9, + 9, 13, 12, 12, 12, 12, 12, 11, 12, 13, 11, 11, 11, 11, 10, 7, + 9, 12, 12, 11, 12, 11, 12, 10, 12, 12, 11, 10, 11, 10, 10, 7, + 11, 13, 14, 12, 14, 12, 14, 11, 14, 13, 13, 11, 13, 11, 12, 7, + 12, 15, 14, 13, 15, 14, 14, 13, 15, 15, 13, 12, 13, 13, 12, 9, + 11, 14, 13, 12, 14, 13, 13, 11, 14, 14, 12, 11, 13, 12, 11, 7, + 11, 14, 14, 12, 14, 13, 14, 11, 14, 14, 13, 11, 13, 12, 12, 7, + 11, 15, 15, 14, 13, 13, 14, 13, 14, 15, 14, 13, 11, 11, 12, 9, + 12, 15, 15, 14, 14, 12, 14, 12, 14, 14, 14, 13, 12, 11, 12, 8, + 13, 16, 16, 15, 15, 12, 16, 13, 16, 15, 15, 14, 14, 12, 14, 9, + 12, 15, 15, 14, 14, 14, 14, 13, 15, 15, 14, 13, 12, 12, 12, 9, + 11, 14, 14, 13, 13, 12, 13, 11, 14, 13, 13, 12, 12, 11, 11, 7, + 12, 14, 15, 13, 14, 12, 14, 11, 15, 14, 13, 12, 13, 11, 12, 7, + 13, 16, 16, 15, 16, 15, 15, 14, 16, 16, 15, 14, 14, 14, 12, 9, + 12, 15, 14, 13, 14, 13, 14, 12, 15, 14, 13, 12, 13, 12, 12, 8, + 12, 14, 14, 13, 15, 13, 14, 11, 14, 14, 13, 12, 13, 12, 12, 6, + 10, 14, 14, 13, 14, 14, 14, 13, 12, 13, 12, 12, 12, 12, 11, 9, + 12, 15, 15, 14, 15, 14, 16, 14, 14, 14, 13, 12, 14, 13, 13, 9, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, 16, 14, 16, 11, + 11, 15, 14, 14, 15, 14, 14, 14, 13, 14, 11, 12, 13, 13, 12, 9, + 12, 15, 14, 14, 15, 14, 15, 13, 14, 14, 13, 12, 14, 13, 13, 9, + 13, 16, 16, 14, 16, 15, 16, 14, 16, 15, 15, 12, 16, 14, 14, 9, + 13, 16, 14, 15, 16, 16, 16, 14, 14, 16, 11, 12, 15, 14, 12, 9, + 13, 16, 15, 14, 16, 15, 16, 14, 15, 15, 12, 11, 15, 14, 13, 9, + 14, 16, 16, 13, 16, 16, 16, 14, 16, 15, 13, 11, 16, 14, 14, 9, + 11, 15, 15, 14, 14, 14, 14, 13, 13, 14, 13, 13, 11, 11, 11, 9, + 12, 15, 15, 14, 15, 14, 15, 13, 14, 14, 13, 13, 13, 12, 12, 9, + 13, 16, 16, 16, 16, 14, 16, 14, 16, 15, 16, 14, 15, 12, 14, 9, + 11, 15, 14, 14, 15, 14, 14, 13, 14, 14, 12, 12, 12, 12, 11, 8, + 11, 14, 14, 13, 14, 13, 13, 12, 13, 13, 12, 11, 12, 11, 11, 7, + 12, 14, 15, 13, 15, 13, 14, 13, 14, 14, 13, 12, 13, 12, 12, 8, + 13, 16, 15, 15, 16, 15, 15, 14, 15, 16, 12, 12, 14, 14, 11, 9, + 12, 15, 14, 13, 15, 13, 14, 12, 14, 14, 12, 11, 13, 12, 11, 7, + 12, 14, 14, 13, 15, 13, 14, 12, 15, 14, 13, 10, 13, 12, 12, 6, + 12, 16, 16, 15, 14, 14, 15, 14, 13, 15, 14, 14, 10, 11, 11, 9, + 13, 16, 16, 15, 15, 14, 15, 14, 15, 15, 15, 14, 12, 11, 12, 8, + 14, 16, 16, 16, 16, 14, 16, 14, 16, 15, 15, 14, 14, 11, 14, 8, + 12, 16, 16, 15, 15, 14, 15, 14, 14, 16, 14, 14, 12, 12, 11, 8, + 11, 14, 14, 13, 14, 13, 14, 12, 14, 14, 13, 12, 12, 11, 11, 7, + 12, 14, 15, 13, 14, 13, 14, 12, 14, 14, 13, 12, 13, 11, 12, 6, + 14, 16, 16, 16, 16, 16, 15, 14, 16, 16, 14, 13, 13, 13, 11, 8, + 12, 15, 15, 13, 15, 13, 14, 12, 14, 14, 13, 12, 13, 12, 10, 6, + 11, 14, 13, 12, 14, 12, 13, 10, 14, 13, 12, 10, 12, 10, 10, 4, +}, +{ + 4, 6, 6, 6, 6, 6, 7, 6, 6, 7, 6, 6, 6, 6, 6, 3, + 6, 9, 10, 9, 10, 9, 11, 9, 10, 10, 10, 9, 10, 9, 10, 6, + 10, 11, 14, 11, 14, 11, 14, 11, 14, 13, 14, 11, 14, 11, 13, 9, + 6, 10, 9, 9, 10, 10, 10, 9, 10, 11, 9, 9, 10, 10, 9, 6, + 8, 11, 11, 9, 12, 11, 12, 10, 12, 12, 11, 10, 12, 11, 11, 7, + 11, 13, 14, 11, 15, 13, 15, 11, 15, 14, 14, 11, 15, 13, 14, 9, + 10, 13, 11, 11, 14, 14, 13, 11, 14, 14, 11, 11, 13, 13, 11, 9, + 11, 14, 12, 11, 15, 14, 14, 11, 15, 15, 13, 11, 14, 14, 13, 9, + 12, 14, 13, 10, 16, 15, 16, 11, 16, 16, 14, 11, 16, 14, 14, 9, + 6, 10, 10, 10, 9, 9, 10, 9, 10, 11, 10, 10, 9, 9, 9, 6, + 8, 11, 12, 11, 11, 10, 12, 10, 12, 12, 12, 11, 11, 10, 11, 7, + 11, 13, 15, 13, 14, 11, 15, 11, 15, 14, 14, 13, 14, 12, 14, 9, + 8, 12, 12, 12, 12, 12, 12, 11, 12, 13, 11, 11, 11, 11, 11, 8, + 9, 12, 12, 11, 12, 12, 13, 11, 13, 13, 12, 11, 12, 11, 11, 8, + 11, 14, 15, 13, 14, 13, 15, 11, 15, 15, 14, 13, 15, 13, 14, 9, + 12, 16, 14, 14, 15, 15, 14, 12, 15, 16, 14, 13, 14, 14, 13, 10, + 11, 15, 14, 13, 15, 14, 15, 12, 15, 16, 14, 13, 15, 14, 13, 9, + 13, 15, 15, 12, 16, 15, 16, 12, 16, 16, 15, 13, 15, 14, 14, 9, + 10, 14, 14, 14, 11, 11, 13, 11, 14, 14, 14, 13, 11, 11, 11, 9, + 11, 14, 15, 14, 13, 11, 14, 12, 15, 15, 15, 14, 13, 11, 13, 9, + 13, 14, 16, 15, 14, 11, 16, 12, 16, 16, 16, 14, 15, 12, 15, 10, + 12, 16, 15, 15, 14, 14, 14, 12, 16, 16, 14, 14, 14, 13, 13, 10, + 12, 15, 15, 14, 14, 13, 14, 12, 15, 16, 14, 14, 14, 13, 13, 9, + 13, 16, 16, 14, 16, 13, 16, 12, 16, 16, 16, 14, 16, 13, 15, 10, + 14, 16, 16, 16, 16, 16, 15, 14, 16, 16, 16, 16, 16, 16, 14, 11, + 13, 16, 16, 15, 16, 16, 16, 13, 16, 16, 16, 15, 16, 15, 14, 10, + 14, 16, 16, 14, 16, 14, 16, 12, 16, 16, 16, 15, 16, 15, 15, 10, + 6, 10, 10, 10, 10, 10, 11, 10, 9, 10, 9, 9, 9, 9, 9, 6, + 9, 12, 12, 11, 12, 11, 13, 11, 12, 12, 11, 10, 12, 11, 11, 8, + 12, 14, 15, 14, 15, 14, 16, 13, 15, 14, 14, 12, 15, 13, 14, 10, + 8, 12, 11, 11, 12, 12, 12, 11, 11, 12, 10, 10, 11, 11, 10, 7, + 9, 12, 12, 11, 13, 12, 13, 11, 12, 13, 11, 10, 12, 12, 11, 8, + 11, 14, 14, 13, 15, 14, 15, 13, 15, 14, 14, 12, 15, 13, 14, 9, + 11, 15, 12, 13, 15, 15, 14, 13, 14, 15, 11, 11, 14, 14, 12, 9, + 11, 14, 13, 13, 15, 14, 15, 13, 15, 15, 13, 11, 15, 14, 13, 9, + 13, 15, 15, 12, 16, 15, 16, 13, 16, 15, 14, 11, 16, 15, 14, 9, + 8, 12, 12, 11, 11, 11, 12, 11, 11, 12, 11, 11, 9, 10, 10, 7, + 9, 12, 13, 12, 12, 11, 13, 11, 12, 13, 12, 12, 11, 11, 11, 8, + 12, 14, 15, 14, 15, 13, 16, 13, 15, 14, 15, 13, 14, 12, 14, 9, + 9, 13, 12, 12, 12, 12, 13, 12, 12, 13, 11, 11, 11, 11, 10, 8, + 9, 12, 12, 12, 12, 12, 13, 11, 12, 13, 11, 11, 12, 11, 11, 7, + 11, 13, 14, 13, 14, 13, 15, 12, 14, 14, 14, 12, 14, 12, 13, 8, + 12, 15, 14, 14, 15, 15, 14, 13, 15, 16, 13, 13, 14, 14, 12, 9, + 11, 14, 13, 13, 14, 14, 14, 12, 14, 15, 13, 12, 14, 13, 12, 8, + 11, 14, 14, 13, 15, 14, 15, 12, 15, 15, 14, 12, 14, 13, 13, 8, + 11, 14, 14, 14, 13, 13, 14, 13, 13, 14, 14, 13, 11, 11, 11, 9, + 11, 15, 15, 14, 14, 13, 15, 13, 14, 15, 14, 14, 13, 11, 13, 9, + 13, 16, 16, 16, 15, 13, 16, 13, 16, 16, 16, 15, 15, 12, 15, 10, + 11, 15, 15, 15, 14, 14, 14, 13, 15, 15, 14, 14, 13, 13, 12, 9, + 11, 14, 14, 13, 13, 13, 14, 12, 14, 14, 13, 13, 13, 12, 12, 8, + 12, 15, 15, 14, 15, 13, 15, 12, 15, 15, 14, 13, 14, 12, 13, 8, + 13, 16, 16, 16, 16, 16, 16, 14, 16, 16, 15, 15, 15, 15, 13, 10, + 12, 15, 15, 14, 15, 14, 15, 13, 15, 16, 14, 13, 14, 14, 13, 9, + 12, 15, 15, 14, 15, 14, 15, 12, 15, 15, 14, 13, 14, 13, 13, 8, + 10, 14, 13, 13, 14, 13, 14, 13, 11, 13, 11, 11, 11, 11, 11, 9, + 12, 15, 16, 14, 15, 14, 16, 14, 14, 14, 14, 13, 14, 13, 13, 10, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 13, 16, 14, 16, 11, + 11, 15, 14, 14, 15, 14, 15, 14, 13, 14, 11, 12, 13, 13, 11, 9, + 12, 15, 15, 14, 15, 15, 16, 14, 14, 14, 13, 12, 14, 13, 13, 9, + 13, 16, 16, 15, 16, 16, 16, 15, 16, 15, 15, 12, 16, 14, 15, 10, + 12, 16, 14, 15, 16, 16, 16, 14, 14, 16, 11, 12, 14, 15, 12, 9, + 13, 16, 15, 14, 16, 16, 16, 14, 15, 16, 13, 12, 15, 15, 13, 9, + 14, 16, 16, 14, 16, 16, 16, 15, 16, 16, 14, 12, 16, 15, 15, 10, + 11, 14, 14, 14, 14, 14, 14, 13, 12, 14, 13, 13, 11, 11, 11, 9, + 11, 15, 15, 14, 14, 14, 16, 14, 14, 14, 14, 13, 13, 12, 13, 9, + 13, 16, 16, 16, 16, 15, 16, 15, 16, 15, 16, 14, 15, 13, 15, 10, + 11, 15, 15, 14, 14, 14, 15, 14, 14, 15, 13, 13, 12, 13, 11, 9, + 11, 14, 14, 13, 14, 14, 14, 13, 13, 14, 13, 12, 13, 12, 12, 8, + 12, 15, 15, 14, 16, 14, 16, 14, 15, 15, 15, 13, 14, 13, 14, 9, + 13, 16, 15, 16, 16, 16, 16, 15, 15, 16, 13, 13, 14, 14, 12, 9, + 12, 15, 14, 14, 15, 15, 15, 13, 14, 15, 13, 12, 14, 13, 12, 8, + 12, 15, 14, 14, 15, 15, 15, 13, 15, 15, 14, 12, 14, 13, 13, 8, + 12, 16, 15, 15, 13, 14, 15, 14, 13, 15, 14, 14, 10, 11, 11, 9, + 12, 16, 16, 15, 15, 14, 16, 14, 15, 15, 15, 14, 13, 12, 13, 9, + 14, 16, 16, 16, 16, 14, 16, 15, 16, 15, 16, 15, 14, 12, 15, 10, + 12, 16, 15, 15, 15, 15, 15, 14, 15, 16, 14, 14, 12, 13, 11, 9, + 11, 15, 15, 14, 14, 14, 15, 13, 14, 15, 14, 13, 13, 12, 12, 8, + 12, 15, 15, 14, 15, 14, 15, 13, 15, 15, 14, 13, 14, 12, 13, 8, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 14, 14, 14, 14, 11, 9, + 12, 15, 15, 14, 15, 15, 15, 13, 15, 15, 14, 13, 14, 13, 12, 8, + 11, 14, 14, 13, 14, 13, 14, 12, 13, 14, 13, 12, 13, 12, 12, 7, +}, +{ + 2, 6, 6, 5, 6, 6, 7, 6, 6, 7, 6, 6, 6, 6, 6, 3, + 6, 9, 10, 9, 10, 9, 11, 9, 10, 10, 10, 9, 10, 9, 10, 7, + 10, 11, 14, 11, 14, 11, 14, 11, 14, 13, 14, 12, 14, 12, 13, 9, + 6, 10, 9, 9, 10, 10, 10, 9, 10, 11, 9, 9, 10, 10, 9, 7, + 8, 11, 11, 9, 12, 11, 12, 10, 12, 12, 11, 10, 12, 11, 11, 8, + 11, 13, 14, 11, 16, 13, 15, 12, 16, 14, 14, 12, 15, 13, 14, 10, + 10, 13, 11, 11, 14, 14, 13, 11, 13, 14, 11, 11, 13, 13, 11, 9, + 11, 13, 13, 11, 15, 14, 14, 12, 15, 15, 13, 12, 15, 14, 13, 10, + 12, 14, 14, 11, 16, 15, 16, 12, 16, 16, 15, 12, 16, 15, 15, 10, + 6, 10, 10, 10, 9, 9, 10, 9, 10, 11, 10, 10, 9, 9, 9, 7, + 8, 11, 12, 11, 11, 10, 12, 10, 12, 12, 12, 11, 11, 10, 11, 8, + 12, 13, 16, 13, 14, 11, 16, 12, 16, 15, 15, 13, 14, 12, 14, 10, + 9, 13, 12, 12, 12, 12, 12, 11, 13, 13, 12, 12, 12, 12, 11, 8, + 10, 13, 13, 12, 13, 12, 13, 11, 14, 14, 13, 12, 13, 12, 12, 9, + 12, 14, 16, 13, 15, 13, 15, 12, 16, 16, 16, 13, 16, 14, 14, 10, + 12, 16, 14, 14, 16, 15, 14, 13, 16, 16, 14, 14, 15, 15, 13, 11, + 12, 16, 15, 14, 16, 15, 15, 12, 16, 16, 15, 14, 16, 15, 14, 10, + 14, 16, 16, 14, 16, 15, 16, 13, 16, 16, 16, 14, 16, 16, 15, 11, + 10, 14, 14, 13, 11, 11, 13, 12, 14, 14, 13, 13, 11, 11, 12, 9, + 12, 14, 16, 14, 13, 11, 14, 12, 16, 15, 15, 14, 14, 12, 13, 10, + 13, 14, 16, 15, 14, 11, 16, 12, 16, 16, 16, 15, 16, 13, 15, 11, + 12, 16, 15, 15, 14, 14, 14, 13, 16, 16, 15, 15, 14, 14, 13, 11, + 13, 16, 16, 15, 14, 14, 15, 13, 16, 16, 16, 15, 15, 14, 14, 11, + 14, 16, 16, 15, 16, 14, 16, 13, 16, 16, 16, 15, 16, 14, 15, 11, + 15, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14, 12, + 15, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 15, 12, + 15, 16, 16, 15, 16, 15, 16, 13, 16, 16, 16, 16, 16, 16, 16, 11, + 6, 10, 10, 10, 10, 10, 11, 10, 9, 10, 9, 9, 9, 9, 9, 7, + 9, 12, 13, 12, 13, 12, 14, 12, 12, 12, 12, 11, 12, 11, 11, 8, + 12, 14, 16, 14, 16, 14, 16, 14, 15, 14, 15, 13, 16, 13, 14, 11, + 8, 12, 11, 11, 12, 12, 12, 11, 11, 12, 10, 10, 11, 11, 10, 8, + 10, 13, 13, 12, 14, 13, 14, 12, 13, 13, 12, 11, 13, 12, 12, 9, + 12, 15, 15, 13, 16, 15, 16, 14, 16, 15, 15, 12, 16, 14, 15, 10, + 11, 15, 13, 13, 16, 15, 14, 13, 14, 15, 11, 12, 14, 14, 12, 10, + 12, 16, 14, 13, 16, 16, 16, 14, 16, 15, 13, 12, 15, 15, 14, 10, + 14, 16, 16, 14, 16, 16, 16, 14, 16, 16, 15, 13, 16, 16, 15, 11, + 8, 12, 12, 12, 11, 11, 12, 11, 11, 12, 11, 11, 9, 10, 10, 8, + 10, 13, 14, 13, 13, 12, 14, 12, 13, 13, 13, 12, 12, 11, 12, 9, + 13, 15, 16, 15, 16, 14, 16, 14, 16, 15, 16, 14, 15, 13, 15, 11, + 10, 13, 13, 13, 13, 13, 13, 12, 13, 14, 12, 12, 12, 12, 11, 9, + 10, 13, 13, 13, 13, 13, 14, 12, 13, 14, 13, 12, 12, 12, 12, 9, + 12, 15, 15, 14, 16, 14, 16, 13, 16, 15, 15, 13, 15, 13, 14, 10, + 13, 16, 15, 15, 16, 16, 15, 14, 16, 16, 13, 14, 15, 15, 12, 10, + 12, 16, 14, 14, 16, 16, 15, 13, 16, 16, 14, 13, 15, 14, 13, 10, + 13, 16, 16, 14, 16, 15, 16, 13, 16, 16, 16, 13, 16, 15, 15, 10, + 11, 15, 15, 14, 13, 13, 14, 13, 13, 15, 14, 14, 11, 12, 12, 10, + 12, 15, 16, 15, 14, 13, 16, 14, 16, 15, 16, 14, 13, 12, 13, 10, + 14, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 16, 13, 16, 11, + 12, 16, 16, 16, 15, 15, 15, 14, 15, 16, 14, 14, 13, 14, 12, 10, + 12, 16, 16, 15, 15, 14, 16, 13, 16, 16, 15, 14, 14, 13, 13, 10, + 13, 16, 16, 15, 16, 14, 16, 13, 16, 16, 16, 15, 16, 14, 15, 10, + 15, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 13, 12, + 14, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 15, 16, 15, 14, 11, + 14, 16, 16, 15, 16, 16, 16, 13, 16, 16, 16, 15, 16, 15, 14, 10, + 10, 14, 13, 13, 13, 13, 14, 13, 11, 13, 11, 11, 11, 11, 11, 9, + 12, 15, 16, 15, 16, 15, 16, 14, 14, 14, 14, 13, 14, 13, 14, 11, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 14, 16, 12, + 11, 15, 14, 14, 15, 15, 15, 14, 13, 14, 11, 12, 13, 13, 12, 10, + 13, 16, 15, 15, 16, 16, 16, 15, 15, 15, 13, 12, 15, 14, 13, 10, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 12, + 13, 16, 14, 15, 16, 16, 16, 15, 14, 16, 11, 12, 15, 15, 12, 10, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 13, 16, 16, 14, 11, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 11, + 11, 15, 15, 14, 13, 14, 14, 14, 13, 14, 13, 13, 11, 12, 11, 10, + 12, 16, 16, 16, 16, 15, 16, 15, 15, 15, 15, 14, 13, 12, 14, 10, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 14, 16, 12, + 12, 16, 15, 15, 16, 16, 16, 14, 14, 15, 13, 13, 13, 13, 12, 10, + 12, 16, 16, 15, 15, 15, 16, 14, 14, 15, 14, 13, 14, 13, 13, 10, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, 16, 14, 15, 11, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 15, 15, 12, 11, + 13, 16, 16, 15, 16, 16, 16, 14, 16, 16, 14, 13, 16, 14, 13, 10, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, 16, 14, 15, 10, + 12, 16, 16, 15, 14, 15, 16, 14, 13, 15, 14, 14, 11, 12, 12, 10, + 13, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 15, 13, 12, 14, 11, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 11, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 15, 15, 13, 14, 12, 11, + 13, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, 14, 13, 13, 10, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 15, 15, 14, 14, 10, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 15, 16, 13, 11, + 14, 16, 16, 16, 16, 16, 16, 14, 16, 16, 15, 14, 15, 14, 13, 10, + 12, 15, 15, 14, 15, 14, 16, 14, 14, 16, 15, 13, 14, 13, 13, 9, +}, +{ + 2, 5, 5, 5, 5, 5, 6, 6, 5, 6, 5, 6, 5, 6, 6, 4, + 6, 8, 10, 8, 10, 9, 11, 9, 10, 10, 10, 9, 10, 9, 10, 8, + 10, 11, 13, 11, 13, 11, 14, 11, 14, 13, 13, 12, 13, 12, 13, 10, + 6, 10, 8, 9, 10, 10, 10, 9, 10, 11, 9, 9, 10, 10, 9, 7, + 8, 11, 11, 10, 12, 11, 12, 10, 12, 12, 11, 10, 12, 12, 11, 9, + 11, 13, 14, 11, 15, 14, 15, 12, 16, 14, 14, 12, 15, 14, 14, 11, + 10, 13, 11, 11, 14, 13, 13, 12, 13, 14, 11, 11, 13, 13, 12, 10, + 11, 14, 13, 11, 16, 14, 14, 12, 15, 15, 14, 12, 15, 14, 14, 11, + 12, 14, 14, 11, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 15, 12, + 6, 10, 10, 10, 8, 9, 10, 9, 10, 11, 10, 10, 9, 9, 9, 8, + 8, 11, 12, 12, 11, 10, 12, 11, 12, 12, 12, 12, 12, 11, 12, 9, + 11, 13, 16, 14, 14, 12, 15, 12, 16, 15, 16, 14, 14, 13, 14, 11, + 9, 13, 12, 12, 12, 12, 12, 11, 13, 13, 12, 12, 12, 12, 11, 10, + 10, 13, 13, 12, 13, 12, 13, 11, 14, 14, 13, 13, 13, 13, 12, 10, + 13, 14, 16, 14, 15, 14, 16, 13, 16, 16, 16, 14, 16, 14, 15, 12, + 12, 16, 14, 14, 16, 15, 14, 13, 16, 16, 14, 14, 15, 15, 13, 12, + 13, 16, 15, 14, 16, 16, 15, 13, 16, 16, 15, 14, 16, 16, 14, 12, + 14, 16, 16, 14, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 12, + 10, 13, 14, 13, 11, 11, 13, 12, 13, 14, 13, 13, 11, 12, 12, 10, + 11, 14, 15, 15, 13, 12, 14, 13, 16, 16, 16, 15, 14, 13, 14, 11, + 12, 14, 16, 16, 14, 12, 16, 13, 16, 16, 16, 16, 15, 13, 16, 12, + 12, 16, 15, 16, 14, 15, 14, 14, 16, 16, 15, 16, 14, 14, 13, 12, + 13, 16, 16, 16, 16, 14, 16, 13, 16, 16, 16, 16, 16, 14, 15, 12, + 14, 16, 16, 16, 16, 14, 16, 14, 16, 16, 16, 16, 16, 15, 16, 13, + 15, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 15, 13, + 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 13, + 15, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 13, + 6, 10, 10, 10, 10, 10, 10, 10, 8, 10, 9, 9, 8, 9, 9, 7, + 9, 12, 13, 12, 13, 12, 13, 12, 12, 12, 12, 11, 12, 11, 12, 10, + 12, 14, 16, 14, 16, 14, 16, 14, 16, 15, 15, 14, 16, 14, 15, 12, + 8, 12, 11, 11, 12, 12, 12, 11, 11, 12, 10, 10, 11, 12, 10, 9, + 10, 13, 13, 12, 14, 13, 14, 12, 13, 13, 12, 11, 13, 13, 12, 10, + 13, 15, 16, 14, 16, 16, 16, 14, 16, 15, 15, 13, 16, 15, 15, 12, + 11, 15, 13, 13, 15, 15, 15, 14, 14, 14, 11, 12, 14, 14, 12, 11, + 13, 16, 14, 14, 16, 16, 16, 14, 16, 15, 13, 13, 16, 14, 14, 11, + 14, 16, 16, 14, 16, 16, 16, 15, 16, 16, 16, 14, 16, 16, 16, 12, + 8, 12, 12, 12, 11, 11, 12, 12, 11, 12, 11, 11, 9, 10, 10, 9, + 10, 13, 14, 13, 13, 12, 14, 13, 13, 13, 13, 13, 12, 11, 12, 10, + 13, 15, 16, 15, 16, 14, 16, 14, 16, 16, 16, 15, 16, 13, 15, 12, + 10, 14, 13, 13, 13, 13, 13, 13, 13, 14, 12, 12, 12, 12, 11, 10, + 10, 13, 13, 13, 13, 13, 14, 12, 13, 14, 13, 12, 13, 12, 12, 10, + 13, 16, 16, 14, 16, 15, 16, 14, 16, 16, 15, 14, 16, 14, 15, 11, + 13, 16, 15, 16, 16, 16, 15, 14, 16, 16, 14, 14, 15, 15, 13, 12, + 13, 16, 15, 14, 16, 16, 16, 14, 16, 16, 14, 14, 15, 15, 14, 11, + 14, 16, 16, 15, 16, 16, 16, 14, 16, 16, 16, 15, 16, 16, 15, 12, + 11, 14, 15, 14, 13, 13, 14, 14, 13, 15, 14, 14, 11, 12, 12, 11, + 13, 16, 16, 16, 14, 14, 16, 14, 16, 16, 16, 15, 14, 13, 14, 12, + 14, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 14, 16, 13, + 13, 16, 16, 16, 15, 16, 15, 15, 16, 16, 15, 16, 14, 14, 13, 12, + 13, 16, 16, 15, 15, 14, 16, 14, 16, 16, 16, 15, 14, 14, 14, 11, + 14, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 15, 16, 12, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 13, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12, + 9, 13, 13, 13, 13, 13, 14, 13, 10, 12, 11, 12, 11, 12, 11, 10, + 12, 15, 16, 15, 16, 16, 16, 16, 14, 14, 14, 13, 14, 13, 14, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 14, + 11, 15, 14, 14, 15, 14, 15, 14, 13, 14, 11, 12, 13, 13, 12, 11, + 13, 16, 16, 15, 16, 16, 16, 15, 15, 15, 14, 13, 16, 15, 14, 12, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 13, + 12, 16, 14, 15, 16, 16, 16, 16, 14, 16, 11, 13, 15, 16, 13, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 16, 16, 15, 12, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 13, + 11, 15, 14, 14, 13, 14, 15, 14, 12, 14, 13, 13, 11, 12, 12, 11, + 13, 16, 16, 16, 16, 15, 16, 16, 15, 15, 15, 15, 14, 13, 14, 12, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 15, 14, 16, 13, 14, 13, 14, 13, 11, + 13, 16, 16, 16, 16, 16, 16, 15, 15, 16, 15, 14, 14, 14, 14, 11, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 15, 16, 16, 13, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 16, 16, 15, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 12, + 11, 16, 16, 15, 13, 15, 16, 15, 13, 15, 15, 15, 11, 12, 12, 11, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 15, 12, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 13, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 14, 14, 13, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 14, 14, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 12, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 14, 13, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 12, + 12, 14, 14, 14, 14, 15, 16, 14, 14, 16, 15, 14, 14, 15, 14, 11, +}, +{ + 1, 5, 5, 6, 5, 6, 7, 7, 5, 7, 6, 7, 5, 6, 6, 6, + 6, 9, 10, 9, 10, 9, 11, 10, 11, 11, 11, 10, 11, 10, 11, 9, + 10, 11, 14, 12, 14, 12, 16, 12, 16, 13, 16, 13, 14, 13, 16, 12, + 6, 10, 9, 9, 10, 11, 11, 10, 10, 11, 9, 10, 10, 11, 10, 9, + 8, 11, 11, 10, 13, 12, 13, 12, 13, 13, 12, 12, 13, 13, 13, 11, + 11, 13, 16, 12, 16, 16, 16, 13, 16, 16, 16, 14, 16, 16, 16, 13, + 10, 14, 11, 12, 14, 14, 13, 13, 13, 16, 12, 13, 14, 16, 13, 12, + 11, 14, 13, 12, 16, 16, 16, 14, 16, 16, 14, 14, 16, 16, 16, 13, + 12, 14, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 6, 10, 10, 11, 9, 9, 11, 10, 10, 11, 11, 11, 9, 10, 10, 9, + 9, 12, 13, 12, 12, 11, 13, 12, 13, 13, 13, 13, 12, 12, 13, 11, + 12, 13, 16, 16, 16, 13, 16, 14, 16, 16, 16, 16, 16, 14, 16, 13, + 9, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 13, 12, 11, + 10, 14, 14, 13, 14, 13, 14, 13, 16, 16, 14, 15, 14, 14, 14, 12, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 14, 14, 16, 11, 12, 14, 13, 14, 16, 16, 16, 12, 13, 13, 12, + 12, 16, 16, 16, 13, 13, 16, 14, 16, 16, 16, 16, 16, 14, 16, 13, + 13, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 6, 10, 10, 10, 10, 11, 11, 11, 9, 11, 9, 10, 9, 10, 10, 9, + 9, 13, 13, 13, 13, 13, 14, 13, 12, 13, 13, 12, 13, 12, 13, 11, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 8, 13, 12, 12, 13, 13, 13, 13, 11, 13, 10, 12, 12, 13, 12, 11, + 10, 14, 13, 13, 16, 16, 16, 14, 14, 14, 13, 13, 14, 14, 14, 12, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 11, 16, 13, 16, 16, 16, 16, 16, 14, 16, 12, 13, 16, 16, 14, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 13, 13, 13, 11, 12, 13, 13, 11, 13, 12, 13, 10, 12, 12, 11, + 10, 14, 16, 16, 14, 13, 16, 14, 14, 16, 16, 14, 13, 13, 14, 12, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 16, 14, 16, 14, 14, 14, 14, 13, 16, 13, 14, 13, 14, 12, 12, + 10, 14, 14, 14, 14, 16, 16, 14, 14, 16, 14, 14, 14, 14, 14, 12, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 13, 16, 16, 16, 14, 16, 16, 16, 12, 14, 14, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 14, 13, 14, 13, 14, 16, 16, 11, 13, 12, 13, 11, 13, 12, 12, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 14, 16, 16, 16, 16, 16, 13, 16, 12, 13, 14, 16, 13, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 14, 16, 12, 16, 16, 16, 14, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 14, 16, 16, 16, 13, 16, 14, 16, 12, 13, 13, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 16, 12, 16, 14, 14, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, +}, +{ + 1, 5, 5, 6, 5, 6, 7, 8, 5, 7, 6, 8, 6, 7, 7, 7, + 5, 9, 10, 10, 10, 10, 12, 11, 10, 11, 11, 11, 10, 11, 12, 10, + 9, 11, 13, 12, 13, 12, 16, 14, 16, 14, 16, 16, 16, 13, 16, 13, + 5, 10, 9, 10, 10, 11, 11, 11, 10, 11, 9, 11, 10, 11, 11, 10, + 8, 11, 11, 11, 12, 13, 13, 13, 12, 13, 12, 12, 13, 13, 13, 12, + 11, 13, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 14, 11, 12, 14, 16, 13, 14, 13, 16, 12, 14, 16, 16, 13, 13, + 11, 16, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 14, 14, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 10, 11, 11, 9, 10, 11, 11, 10, 12, 11, 12, 9, 11, 11, 11, + 8, 12, 13, 13, 11, 11, 14, 13, 13, 14, 13, 16, 12, 12, 13, 12, + 11, 13, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 13, 12, 13, 12, 13, 13, 14, 13, 16, 13, 16, 13, 16, 13, 13, + 10, 14, 13, 14, 13, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 14, 16, 16, 11, 12, 14, 16, 13, 16, 16, 16, 12, 14, 13, 13, + 11, 16, 16, 16, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 14, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 10, 10, 11, 10, 11, 12, 12, 8, 11, 10, 11, 9, 11, 11, 11, + 9, 12, 13, 13, 13, 13, 16, 16, 12, 13, 13, 13, 13, 13, 16, 13, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 13, 11, 13, 12, 13, 13, 14, 11, 13, 10, 13, 12, 14, 12, 12, + 10, 14, 13, 14, 16, 16, 16, 16, 13, 16, 13, 14, 16, 16, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 13, 16, 16, 16, 16, 16, 13, 16, 12, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 13, 13, 13, 11, 13, 14, 16, 11, 13, 13, 14, 10, 12, 12, 12, + 10, 14, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, 13, 13, 16, 14, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 14, 16, 13, 16, 16, 16, 13, 16, 13, 16, 13, 16, 13, 14, + 10, 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 13, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 13, 16, 16, 16, 14, 16, 16, 16, 12, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 14, 13, 16, 13, 16, 16, 16, 10, 14, 12, 14, 11, 13, 13, 13, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 16, 16, 16, 16, 12, 16, 12, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 16, 16, 16, 16, 13, 16, 13, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 14, 16, 16, 16, 12, 16, 16, 16, 12, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 14, 16, 16, 16, 14, 16, 16, 16, 12, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14, +} +}; + + +static const uint8_t rv34_inter_cbp[NUM_INTER_TABLES][4][CBP_VLC_SIZE] = { +{ + { 0, 6, 6, 3, 6, 4, 5, 3, 6, 5, 4, 3, 3, 4, 4, 3 }, + { 0, 6, 6, 4, 6, 4, 5, 3, 6, 5, 4, 3, 4, 4, 4, 2 }, + { 0, 7, 7, 4, 7, 5, 5, 4, 7, 5, 5, 4, 5, 4, 4, 1 }, + { 0, 7, 7, 5, 7, 5, 6, 4, 7, 6, 5, 3, 5, 4, 4, 1 } +}, +{ + { 0, 6, 6, 3, 6, 3, 5, 4, 6, 5, 3, 4, 3, 4, 4, 3 }, + { 0, 6, 6, 4, 6, 4, 4, 4, 6, 4, 4, 3, 4, 4, 4, 2 }, + { 0, 6, 6, 4, 6, 4, 5, 4, 6, 5, 4, 3, 4, 4, 3, 2 }, + { 0, 7, 7, 5, 7, 5, 6, 4, 7, 6, 5, 3, 5, 4, 4, 1 } +}, +{ + { 0, 6, 6, 3, 6, 3, 5, 4, 6, 5, 3, 4, 3, 4, 4, 3 }, + { 0, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2 }, + { 0, 6, 6, 4, 6, 4, 5, 3, 6, 5, 4, 3, 4, 4, 4, 2 }, + { 0, 7, 7, 5, 7, 5, 6, 4, 7, 6, 5, 3, 5, 4, 4, 1 } +}, +{ + { 0, 6, 6, 3, 6, 3, 5, 4, 6, 5, 3, 4, 3, 4, 4, 3 }, + { 0, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2 }, + { 0, 6, 6, 4, 6, 4, 5, 3, 6, 5, 4, 3, 4, 4, 4, 2 }, + { 0, 7, 7, 4, 7, 5, 6, 4, 7, 6, 5, 4, 4, 4, 4, 1 } +}, +{ + { 0, 5, 5, 3, 5, 3, 5, 4, 5, 5, 3, 4, 3, 4, 4, 4 }, + { 0, 5, 5, 3, 5, 4, 5, 4, 5, 5, 3, 4, 3, 4, 4, 3 }, + { 0, 6, 6, 4, 6, 4, 5, 4, 6, 5, 4, 3, 4, 4, 3, 2 }, + { 0, 7, 7, 4, 7, 5, 6, 4, 7, 6, 5, 4, 4, 4, 4, 1 } +}, +{ + { 0, 5, 5, 3, 5, 3, 5, 4, 5, 5, 3, 4, 3, 4, 4, 4 }, + { 0, 5, 5, 3, 5, 4, 5, 4, 5, 5, 3, 4, 3, 4, 4, 3 }, + { 0, 5, 5, 3, 5, 4, 4, 4, 5, 4, 4, 4, 3, 4, 4, 3 }, + { 0, 6, 6, 4, 6, 4, 5, 4, 6, 5, 4, 3, 4, 4, 3, 2 } +}, +{ + { 0, 4, 4, 3, 4, 3, 5, 5, 4, 5, 3, 5, 3, 5, 4, 5 }, + { 0, 4, 4, 3, 4, 4, 5, 4, 4, 5, 3, 5, 3, 5, 4, 4 }, + { 0, 4, 4, 3, 4, 4, 5, 4, 4, 5, 4, 4, 3, 4, 4, 4 }, + { 0, 4, 4, 3, 5, 4, 5, 4, 5, 5, 4, 4, 3, 4, 4, 3 } +} +}; + + +static const uint8_t rv34_table_inter_firstpat[NUM_INTER_TABLES][2][FIRSTBLK_VLC_SIZE] = { + { + { + 0, 7, 5, 7, 5, 7, 6, 6, 7, 10, 7, 9, 8, 9, 8, 7, + 12, 14, 11, 12, 12, 12, 11, 9, 6, 9, 6, 8, 7, 9, 7, 7, + 8, 11, 8, 9, 9, 10, 9, 8, 13, 15, 12, 12, 12, 13, 11, 9, + 10, 13, 9, 10, 11, 12, 9, 8, 12, 14, 10, 11, 12, 13, 10, 9, + 16, 16, 12, 12, 14, 13, 11, 9, 6, 9, 7, 9, 7, 9, 8, 7, + 9, 11, 9, 10, 9, 10, 9, 8, 14, 16, 12, 12, 13, 13, 11, 9, + 8, 11, 8, 10, 9, 10, 9, 8, 10, 13, 10, 11, 10, 11, 9, 8, + 14, 16, 12, 12, 13, 13, 11, 9, 12, 14, 10, 11, 12, 13, 10, 9, + 13, 16, 11, 12, 13, 13, 10, 9, 16, 16, 13, 12, 14, 14, 11, 9, + 11, 13, 11, 12, 10, 11, 10, 9, 13, 14, 12, 12, 11, 12, 10, 9, + 16, 16, 13, 13, 13, 13, 11, 9, 12, 15, 12, 12, 11, 12, 10, 9, + 13, 16, 13, 13, 12, 12, 11, 9, 16, 16, 14, 13, 13, 13, 11, 9, + 14, 16, 13, 13, 13, 14, 11, 9, 16, 16, 13, 13, 14, 14, 11, 9, + 16, 16, 13, 13, 14, 13, 11, 8, 4, 9, 6, 8, 6, 9, 7, 7, + 8, 11, 8, 9, 9, 10, 8, 8, 13, 15, 12, 12, 13, 13, 11, 9, + 7, 10, 7, 9, 8, 10, 8, 8, 9, 12, 9, 10, 10, 11, 9, 8, + 14, 16, 12, 12, 13, 13, 11, 9, 11, 13, 9, 10, 11, 12, 9, 8, + 12, 14, 10, 11, 12, 13, 10, 9, 16, 16, 13, 12, 14, 14, 11, 9, + 7, 10, 8, 9, 8, 10, 8, 8, 10, 12, 10, 11, 10, 11, 9, 8, + 14, 16, 13, 13, 13, 13, 11, 9, 9, 12, 9, 10, 9, 11, 9, 8, + 11, 13, 10, 11, 10, 11, 10, 9, 15, 16, 13, 13, 13, 13, 11, 9, + 12, 14, 11, 11, 12, 13, 10, 9, 13, 16, 11, 12, 13, 13, 10, 9, + 16, 16, 12, 12, 14, 13, 11, 8, 11, 14, 11, 12, 10, 11, 10, 9, + 13, 15, 12, 13, 11, 12, 10, 9, 16, 16, 14, 13, 13, 13, 11, 9, + 12, 15, 12, 13, 11, 12, 10, 9, 13, 16, 13, 13, 12, 12, 11, 9, + 16, 16, 14, 13, 13, 13, 11, 9, 15, 16, 13, 13, 13, 13, 11, 9, + 16, 16, 13, 13, 13, 13, 11, 9, 16, 16, 13, 12, 13, 13, 10, 7, + 8, 11, 8, 10, 9, 11, 9, 9, 10, 13, 10, 11, 11, 12, 10, 9, + 15, 16, 13, 13, 14, 14, 12, 10, 9, 12, 9, 11, 10, 11, 9, 9, + 12, 14, 11, 11, 11, 12, 10, 9, 16, 16, 13, 13, 14, 14, 12, 10, + 12, 14, 10, 11, 12, 13, 10, 9, 14, 16, 11, 12, 13, 14, 10, 9, + 16, 16, 13, 13, 15, 14, 11, 9, 9, 12, 10, 11, 9, 11, 10, 9, + 12, 14, 11, 12, 11, 12, 10, 9, 16, 16, 14, 13, 14, 14, 12, 10, + 11, 14, 10, 12, 11, 12, 10, 9, 12, 15, 11, 12, 12, 13, 11, 10, + 16, 16, 14, 13, 14, 14, 12, 10, 13, 16, 11, 12, 13, 14, 11, 9, + 14, 16, 12, 12, 13, 14, 11, 9, 16, 16, 13, 13, 14, 14, 11, 9, + 12, 15, 12, 13, 10, 12, 10, 9, 14, 16, 13, 13, 11, 12, 11, 10, + 16, 16, 14, 14, 14, 13, 12, 9, 13, 16, 13, 13, 12, 13, 11, 10, + 14, 16, 13, 13, 12, 13, 11, 10, 16, 16, 14, 14, 13, 13, 12, 9, + 15, 16, 13, 13, 13, 14, 11, 9, 16, 16, 13, 13, 13, 14, 11, 9, + 16, 16, 13, 12, 13, 13, 10, 8, 10, 13, 10, 11, 10, 12, 10, 9, + 12, 14, 11, 12, 12, 13, 11, 10, 16, 16, 13, 13, 14, 14, 12, 9, + 11, 14, 10, 11, 11, 12, 10, 9, 13, 16, 11, 12, 12, 13, 11, 10, + 16, 16, 14, 13, 14, 14, 12, 9, 12, 15, 10, 11, 12, 13, 9, 8, + 14, 16, 11, 11, 13, 14, 10, 8, 16, 16, 12, 12, 14, 14, 10, 8, + 11, 14, 11, 12, 11, 12, 10, 9, 13, 16, 12, 13, 12, 13, 11, 10, + 16, 16, 14, 13, 14, 14, 12, 9, 12, 15, 11, 12, 11, 13, 10, 10, + 13, 16, 12, 13, 12, 13, 11, 10, 16, 16, 14, 13, 14, 14, 12, 9, + 13, 16, 11, 11, 13, 13, 10, 8, 14, 16, 11, 12, 13, 14, 10, 8, + 16, 16, 12, 12, 14, 14, 10, 8, 12, 15, 12, 13, 10, 11, 10, 9, + 14, 16, 13, 13, 11, 12, 10, 9, 16, 16, 14, 13, 13, 13, 11, 8, + 13, 16, 12, 13, 11, 12, 10, 9, 14, 16, 13, 13, 12, 12, 10, 9, + 16, 16, 14, 13, 13, 12, 10, 8, 14, 16, 12, 12, 12, 13, 10, 8, + 14, 16, 12, 12, 12, 13, 10, 7, 16, 16, 11, 11, 12, 11, 8, 5, + }, + { + 0, 7, 4, 8, 5, 8, 7, 8, 6, 10, 7, 10, 8, 10, 9, 9, + 13, 16, 12, 13, 13, 14, 12, 12, 4, 10, 6, 9, 8, 11, 8, 9, + 8, 12, 8, 11, 10, 12, 10, 10, 14, 16, 12, 13, 14, 15, 12, 12, + 9, 14, 9, 11, 12, 14, 11, 11, 11, 15, 10, 12, 13, 14, 11, 11, + 15, 16, 13, 14, 15, 16, 13, 12, 5, 10, 7, 10, 7, 10, 9, 9, + 8, 12, 9, 11, 10, 11, 10, 10, 14, 16, 13, 14, 14, 14, 12, 12, + 8, 12, 8, 11, 10, 12, 10, 10, 10, 14, 10, 12, 11, 13, 10, 11, + 15, 16, 13, 14, 14, 15, 13, 12, 11, 16, 10, 12, 13, 15, 11, 11, + 13, 16, 11, 13, 14, 15, 12, 12, 16, 16, 14, 14, 16, 16, 13, 12, + 11, 15, 11, 13, 11, 13, 11, 11, 13, 16, 12, 14, 12, 13, 12, 12, + 16, 16, 14, 15, 15, 15, 13, 12, 12, 16, 12, 14, 12, 14, 12, 12, + 14, 16, 13, 14, 13, 14, 12, 12, 16, 16, 14, 16, 16, 16, 13, 12, + 14, 16, 13, 14, 15, 16, 13, 12, 16, 16, 14, 15, 16, 16, 13, 12, + 16, 16, 15, 16, 16, 16, 13, 12, 2, 9, 5, 8, 6, 9, 8, 9, + 7, 11, 8, 10, 9, 11, 9, 10, 13, 16, 12, 13, 14, 14, 12, 12, + 5, 11, 6, 10, 9, 11, 9, 9, 9, 13, 9, 11, 10, 12, 10, 10, + 14, 16, 12, 14, 14, 15, 12, 12, 9, 14, 9, 11, 12, 14, 10, 11, + 11, 16, 10, 12, 13, 14, 11, 11, 16, 16, 13, 14, 15, 16, 13, 12, + 6, 11, 7, 10, 8, 11, 9, 9, 9, 13, 9, 11, 10, 12, 10, 10, + 14, 16, 13, 14, 14, 14, 12, 12, 8, 13, 8, 11, 10, 12, 10, 10, + 10, 13, 10, 12, 11, 13, 10, 11, 14, 16, 13, 14, 14, 15, 12, 12, + 11, 15, 10, 12, 13, 15, 11, 11, 12, 16, 11, 13, 13, 15, 12, 11, + 16, 16, 13, 14, 15, 16, 13, 12, 11, 15, 11, 13, 10, 13, 11, 11, + 13, 16, 12, 14, 12, 13, 12, 11, 16, 16, 14, 15, 15, 15, 13, 12, + 12, 16, 12, 13, 12, 14, 12, 12, 13, 16, 12, 14, 13, 14, 12, 12, + 16, 16, 14, 15, 15, 15, 13, 12, 14, 16, 13, 14, 15, 16, 12, 12, + 16, 16, 13, 14, 15, 16, 12, 12, 16, 16, 14, 15, 16, 16, 13, 12, + 6, 12, 7, 10, 9, 12, 9, 10, 9, 13, 9, 12, 11, 13, 11, 11, + 14, 16, 13, 14, 15, 15, 13, 12, 8, 13, 8, 11, 10, 13, 10, 10, + 10, 14, 10, 12, 12, 14, 11, 11, 15, 16, 13, 14, 16, 16, 13, 12, + 10, 15, 9, 12, 12, 15, 11, 11, 12, 16, 11, 13, 14, 16, 12, 12, + 16, 16, 14, 14, 16, 16, 13, 12, 8, 13, 9, 11, 10, 12, 10, 11, + 11, 14, 11, 12, 11, 13, 11, 11, 16, 16, 14, 15, 15, 16, 13, 12, + 10, 14, 10, 12, 11, 13, 11, 11, 11, 15, 11, 13, 12, 14, 11, 11, + 15, 16, 13, 14, 15, 16, 13, 12, 12, 16, 11, 13, 13, 16, 12, 12, + 13, 16, 11, 13, 14, 16, 12, 12, 16, 16, 13, 14, 16, 16, 13, 12, + 12, 16, 12, 14, 11, 13, 11, 11, 13, 16, 13, 14, 12, 14, 12, 12, + 16, 16, 15, 16, 16, 16, 14, 13, 13, 16, 12, 14, 12, 14, 12, 12, + 14, 16, 13, 14, 13, 14, 12, 12, 16, 16, 14, 16, 14, 16, 13, 12, + 15, 16, 13, 15, 15, 16, 13, 12, 15, 16, 13, 15, 14, 16, 13, 12, + 16, 16, 14, 15, 15, 16, 13, 11, 8, 13, 8, 11, 10, 13, 10, 11, + 11, 15, 10, 12, 12, 14, 11, 11, 15, 16, 13, 14, 15, 15, 13, 12, + 9, 14, 9, 12, 11, 14, 10, 11, 11, 16, 10, 12, 13, 14, 11, 11, + 16, 16, 13, 14, 15, 16, 13, 12, 11, 15, 9, 12, 12, 14, 10, 10, + 12, 16, 11, 12, 14, 15, 11, 11, 16, 16, 13, 14, 16, 16, 12, 11, + 9, 14, 10, 12, 11, 13, 11, 11, 12, 16, 11, 13, 12, 14, 11, 11, + 16, 16, 14, 14, 15, 15, 13, 12, 10, 15, 10, 12, 12, 14, 11, 11, + 12, 16, 11, 13, 13, 14, 11, 11, 16, 16, 14, 14, 15, 16, 13, 12, + 12, 16, 10, 12, 13, 15, 11, 11, 13, 16, 11, 13, 14, 15, 11, 11, + 16, 16, 13, 13, 15, 16, 12, 11, 12, 16, 11, 13, 10, 13, 11, 11, + 14, 16, 13, 14, 12, 14, 11, 11, 16, 16, 15, 16, 14, 15, 13, 11, + 13, 16, 12, 14, 12, 14, 11, 11, 13, 16, 12, 14, 12, 14, 11, 11, + 16, 16, 14, 15, 14, 14, 12, 11, 14, 16, 12, 13, 13, 15, 11, 11, + 14, 16, 12, 13, 13, 14, 11, 11, 15, 16, 12, 13, 13, 13, 10, 9, + }, + }, + { + { + 0, 7, 4, 7, 5, 7, 6, 6, 6, 10, 7, 8, 8, 9, 8, 7, + 13, 14, 11, 12, 12, 12, 11, 9, 5, 9, 6, 8, 7, 9, 7, 7, + 8, 11, 8, 9, 9, 10, 9, 8, 13, 16, 12, 12, 12, 13, 11, 9, + 10, 13, 8, 10, 11, 12, 9, 9, 12, 14, 10, 11, 12, 13, 10, 9, + 15, 16, 12, 12, 14, 14, 11, 9, 6, 10, 7, 9, 7, 9, 8, 7, + 8, 11, 9, 10, 9, 10, 9, 8, 14, 16, 12, 12, 13, 12, 11, 9, + 8, 11, 8, 10, 9, 10, 9, 8, 10, 13, 10, 11, 10, 11, 9, 9, + 14, 16, 12, 12, 13, 13, 11, 9, 12, 15, 10, 11, 12, 13, 10, 9, + 13, 16, 11, 12, 13, 13, 10, 9, 16, 16, 12, 13, 14, 14, 11, 9, + 10, 14, 11, 12, 9, 11, 10, 9, 12, 15, 12, 13, 11, 12, 11, 9, + 16, 16, 13, 13, 13, 13, 11, 9, 12, 15, 12, 13, 11, 12, 11, 9, + 13, 16, 12, 13, 12, 13, 11, 10, 16, 16, 13, 13, 13, 13, 11, 9, + 14, 16, 13, 13, 13, 14, 11, 10, 16, 16, 13, 13, 13, 14, 11, 10, + 16, 16, 13, 13, 14, 14, 11, 9, 4, 9, 6, 8, 6, 9, 7, 7, + 8, 11, 8, 9, 9, 10, 9, 8, 13, 15, 12, 12, 13, 13, 11, 9, + 6, 10, 7, 9, 8, 10, 8, 8, 9, 12, 9, 10, 10, 11, 9, 8, + 14, 16, 12, 12, 13, 13, 11, 10, 10, 13, 8, 10, 11, 12, 9, 9, + 12, 15, 10, 11, 12, 13, 10, 9, 16, 16, 12, 12, 14, 14, 11, 9, + 7, 11, 8, 9, 7, 10, 8, 8, 9, 12, 10, 11, 9, 11, 9, 9, + 14, 16, 12, 13, 13, 13, 11, 10, 9, 12, 9, 10, 9, 11, 9, 9, + 10, 13, 10, 11, 10, 11, 10, 9, 14, 16, 12, 13, 13, 13, 11, 9, + 12, 15, 10, 11, 12, 13, 10, 9, 13, 16, 11, 12, 13, 13, 10, 9, + 16, 16, 12, 12, 14, 14, 11, 9, 10, 14, 11, 12, 9, 11, 10, 9, + 12, 16, 12, 13, 11, 12, 11, 9, 16, 16, 14, 14, 13, 13, 11, 9, + 12, 16, 12, 13, 11, 12, 10, 10, 13, 16, 12, 13, 11, 12, 11, 10, + 16, 16, 13, 13, 13, 13, 11, 9, 14, 16, 13, 13, 13, 14, 11, 9, + 15, 16, 13, 13, 13, 14, 11, 9, 16, 16, 13, 13, 13, 13, 10, 8, + 7, 11, 8, 10, 9, 11, 9, 9, 10, 13, 10, 11, 11, 12, 10, 10, + 15, 16, 13, 13, 14, 14, 12, 10, 9, 13, 9, 11, 10, 12, 10, 9, + 11, 14, 10, 12, 12, 13, 10, 10, 16, 16, 13, 13, 14, 14, 12, 10, + 11, 15, 9, 11, 12, 13, 10, 9, 13, 16, 11, 12, 13, 14, 11, 10, + 16, 16, 13, 13, 15, 15, 11, 10, 9, 13, 10, 11, 9, 11, 10, 9, + 11, 14, 11, 12, 11, 12, 11, 10, 16, 16, 14, 14, 14, 14, 12, 10, + 10, 14, 10, 12, 11, 12, 10, 10, 12, 15, 11, 12, 12, 13, 11, 10, + 16, 16, 13, 13, 14, 14, 12, 10, 13, 16, 11, 12, 13, 14, 11, 10, + 13, 16, 11, 12, 13, 14, 11, 10, 16, 16, 12, 13, 14, 14, 11, 9, + 11, 15, 12, 13, 10, 12, 10, 10, 13, 16, 13, 14, 11, 13, 11, 10, + 16, 16, 14, 14, 14, 14, 12, 10, 13, 16, 13, 13, 11, 13, 11, 10, + 14, 16, 13, 14, 12, 13, 11, 10, 16, 16, 14, 14, 13, 13, 12, 10, + 15, 16, 13, 14, 14, 14, 11, 10, 15, 16, 13, 13, 13, 14, 11, 10, + 16, 16, 12, 13, 13, 13, 10, 8, 9, 13, 10, 11, 10, 12, 10, 10, + 12, 15, 11, 12, 12, 13, 11, 10, 16, 16, 14, 13, 14, 14, 12, 10, + 10, 14, 10, 12, 11, 13, 10, 10, 13, 16, 11, 12, 12, 14, 11, 10, + 16, 16, 13, 13, 14, 14, 12, 10, 12, 16, 9, 11, 12, 14, 10, 9, + 13, 16, 10, 12, 13, 14, 10, 9, 16, 16, 12, 12, 14, 14, 11, 9, + 10, 14, 11, 12, 10, 12, 10, 10, 13, 16, 12, 13, 12, 13, 11, 10, + 16, 16, 14, 14, 14, 14, 12, 10, 11, 16, 11, 12, 11, 13, 11, 10, + 13, 16, 12, 13, 12, 14, 11, 10, 16, 16, 14, 14, 14, 14, 12, 10, + 13, 16, 11, 12, 13, 14, 10, 9, 14, 16, 11, 12, 13, 14, 10, 9, + 16, 16, 12, 12, 14, 14, 10, 8, 12, 16, 12, 13, 10, 12, 10, 9, + 14, 16, 13, 13, 11, 12, 11, 9, 16, 16, 14, 14, 13, 13, 11, 9, + 13, 16, 12, 13, 11, 12, 10, 9, 14, 16, 13, 13, 11, 13, 11, 9, + 16, 16, 14, 14, 13, 13, 11, 9, 14, 16, 12, 13, 12, 13, 10, 8, + 14, 16, 12, 12, 12, 13, 10, 8, 15, 16, 11, 11, 11, 12, 9, 6, + }, + { + 0, 7, 4, 7, 5, 8, 7, 8, 5, 10, 7, 10, 8, 10, 9, 10, + 13, 16, 12, 14, 14, 14, 13, 12, 4, 10, 6, 9, 8, 11, 9, 9, + 8, 12, 8, 11, 10, 12, 10, 10, 14, 16, 13, 14, 14, 15, 13, 12, + 9, 14, 9, 12, 12, 14, 11, 11, 12, 16, 11, 13, 13, 15, 12, 12, + 15, 16, 14, 15, 15, 16, 13, 13, 5, 10, 7, 10, 7, 10, 9, 9, + 8, 12, 9, 11, 9, 11, 10, 10, 14, 16, 13, 14, 14, 15, 13, 12, + 7, 12, 8, 11, 10, 12, 10, 10, 10, 13, 10, 12, 11, 13, 11, 11, + 15, 16, 13, 15, 14, 16, 13, 13, 11, 16, 11, 13, 13, 16, 12, 12, + 13, 16, 12, 14, 14, 16, 12, 12, 16, 16, 14, 16, 16, 16, 14, 13, + 11, 15, 12, 14, 11, 13, 11, 12, 13, 16, 12, 14, 12, 14, 12, 12, + 16, 16, 14, 16, 14, 16, 13, 13, 13, 16, 12, 14, 12, 14, 12, 12, + 14, 16, 13, 15, 13, 15, 13, 13, 16, 16, 15, 16, 16, 16, 14, 13, + 15, 16, 13, 16, 15, 16, 13, 13, 16, 16, 14, 16, 16, 16, 14, 13, + 16, 16, 16, 16, 16, 16, 14, 13, 2, 9, 5, 8, 6, 9, 8, 9, + 7, 11, 8, 10, 9, 11, 9, 10, 14, 16, 13, 14, 14, 15, 13, 12, + 5, 11, 6, 10, 9, 11, 9, 10, 8, 13, 9, 11, 11, 12, 10, 11, + 14, 16, 13, 14, 14, 16, 13, 13, 9, 15, 9, 12, 12, 14, 11, 11, + 12, 16, 11, 13, 13, 15, 12, 12, 16, 16, 14, 15, 16, 16, 14, 13, + 6, 11, 7, 10, 8, 11, 9, 10, 9, 13, 9, 12, 10, 12, 10, 11, + 14, 16, 13, 14, 14, 15, 13, 13, 8, 12, 8, 11, 10, 12, 10, 11, + 9, 13, 10, 12, 11, 13, 11, 11, 14, 16, 13, 14, 14, 16, 13, 13, + 12, 16, 11, 13, 13, 15, 12, 12, 13, 16, 11, 13, 14, 16, 12, 12, + 16, 16, 14, 15, 16, 16, 13, 13, 11, 15, 11, 14, 10, 13, 11, 12, + 13, 16, 13, 15, 12, 14, 12, 12, 16, 16, 15, 16, 15, 16, 14, 13, + 12, 16, 12, 14, 12, 14, 12, 12, 13, 16, 13, 15, 13, 14, 12, 13, + 16, 16, 15, 16, 15, 16, 13, 13, 15, 16, 13, 16, 15, 16, 13, 13, + 16, 16, 14, 16, 16, 16, 13, 13, 16, 16, 15, 16, 16, 16, 14, 13, + 5, 12, 7, 10, 9, 12, 10, 10, 9, 13, 9, 12, 11, 13, 11, 11, + 15, 16, 13, 14, 15, 15, 13, 13, 7, 13, 8, 11, 10, 13, 10, 11, + 10, 14, 10, 12, 12, 14, 11, 12, 16, 16, 14, 15, 16, 16, 14, 13, + 10, 16, 9, 12, 13, 15, 11, 12, 13, 16, 11, 13, 14, 16, 12, 12, + 16, 16, 14, 16, 16, 16, 14, 13, 8, 13, 9, 12, 9, 12, 10, 11, + 11, 15, 11, 13, 11, 13, 11, 12, 16, 16, 14, 16, 16, 16, 14, 13, + 9, 14, 10, 12, 11, 13, 11, 12, 11, 15, 11, 13, 12, 14, 12, 12, + 16, 16, 14, 16, 15, 16, 14, 13, 12, 16, 11, 14, 14, 16, 12, 12, + 13, 16, 12, 14, 14, 16, 13, 13, 16, 16, 13, 15, 16, 16, 14, 13, + 11, 16, 12, 14, 10, 13, 12, 12, 13, 16, 13, 15, 12, 14, 12, 13, + 16, 16, 16, 16, 16, 16, 14, 14, 13, 16, 13, 15, 12, 15, 12, 13, + 13, 16, 13, 15, 12, 15, 13, 13, 16, 16, 15, 16, 14, 16, 14, 13, + 16, 16, 14, 16, 16, 16, 14, 13, 15, 16, 14, 16, 15, 16, 14, 13, + 16, 16, 14, 16, 15, 16, 13, 12, 8, 14, 9, 12, 10, 14, 11, 12, + 11, 16, 10, 13, 12, 14, 12, 12, 16, 16, 14, 15, 15, 16, 14, 13, + 9, 15, 9, 12, 12, 14, 11, 12, 12, 16, 11, 13, 13, 15, 12, 12, + 16, 16, 14, 15, 16, 16, 14, 13, 11, 16, 9, 12, 13, 15, 11, 11, + 13, 16, 11, 13, 14, 16, 12, 12, 16, 16, 14, 14, 16, 16, 13, 12, + 9, 15, 10, 13, 11, 14, 11, 12, 12, 16, 11, 14, 12, 14, 12, 12, + 16, 16, 14, 16, 16, 16, 14, 13, 10, 16, 10, 13, 12, 15, 12, 12, + 12, 16, 12, 14, 13, 15, 12, 12, 16, 16, 14, 16, 16, 16, 14, 13, + 12, 16, 11, 13, 13, 16, 12, 12, 13, 16, 11, 13, 14, 16, 12, 12, + 16, 16, 13, 14, 16, 16, 13, 12, 11, 16, 12, 14, 10, 13, 11, 12, + 13, 16, 13, 15, 12, 14, 12, 12, 16, 16, 16, 16, 15, 16, 13, 12, + 12, 16, 12, 15, 12, 14, 12, 12, 13, 16, 13, 15, 12, 14, 12, 12, + 16, 16, 15, 16, 14, 15, 13, 12, 14, 16, 13, 14, 13, 16, 12, 12, + 13, 16, 12, 14, 13, 15, 12, 12, 14, 16, 12, 13, 13, 14, 11, 10, + }, + }, + { + { + 0, 7, 4, 7, 5, 7, 6, 6, 6, 10, 7, 8, 8, 9, 8, 8, + 13, 14, 11, 12, 12, 12, 11, 10, 5, 9, 6, 8, 7, 9, 7, 7, + 8, 11, 8, 9, 9, 10, 9, 8, 13, 16, 12, 12, 13, 13, 11, 10, + 10, 14, 8, 10, 11, 13, 9, 9, 12, 15, 10, 11, 12, 13, 10, 10, + 16, 16, 12, 13, 14, 14, 11, 10, 5, 10, 7, 9, 6, 9, 8, 8, + 8, 11, 9, 10, 9, 10, 9, 8, 14, 16, 12, 12, 13, 13, 11, 10, + 8, 12, 8, 10, 9, 10, 9, 9, 10, 13, 9, 11, 10, 11, 9, 9, + 14, 16, 12, 13, 13, 13, 11, 10, 12, 16, 10, 12, 12, 13, 10, 10, + 13, 16, 11, 12, 13, 14, 11, 10, 16, 16, 12, 13, 14, 14, 11, 10, + 10, 14, 11, 13, 9, 11, 10, 10, 12, 16, 12, 13, 11, 12, 11, 10, + 16, 16, 13, 14, 13, 13, 12, 10, 12, 16, 12, 13, 11, 13, 11, 10, + 13, 16, 12, 13, 12, 13, 11, 10, 16, 16, 13, 14, 13, 14, 12, 10, + 14, 16, 13, 14, 13, 14, 12, 11, 16, 16, 13, 14, 14, 15, 12, 11, + 16, 16, 13, 14, 14, 14, 11, 10, 3, 9, 5, 8, 6, 9, 7, 7, + 8, 11, 8, 10, 9, 10, 9, 8, 14, 15, 12, 12, 13, 13, 11, 10, + 6, 11, 6, 9, 8, 10, 8, 8, 9, 12, 9, 10, 10, 11, 9, 9, + 14, 16, 12, 13, 13, 13, 11, 10, 10, 14, 8, 11, 12, 13, 9, 9, + 12, 16, 10, 11, 12, 13, 10, 10, 16, 16, 12, 13, 14, 14, 11, 10, + 6, 11, 8, 10, 7, 10, 8, 8, 9, 12, 10, 11, 9, 11, 9, 9, + 14, 16, 12, 13, 13, 13, 12, 10, 9, 12, 9, 11, 9, 11, 9, 9, + 10, 13, 10, 11, 10, 12, 10, 9, 14, 16, 12, 13, 13, 13, 11, 10, + 12, 16, 10, 12, 12, 14, 10, 10, 13, 16, 10, 12, 13, 14, 11, 10, + 16, 16, 12, 13, 14, 14, 11, 10, 10, 15, 11, 13, 9, 11, 10, 10, + 12, 16, 12, 13, 11, 12, 11, 10, 16, 16, 14, 14, 13, 14, 12, 10, + 12, 16, 12, 13, 11, 13, 11, 10, 13, 16, 12, 13, 11, 13, 11, 10, + 16, 16, 13, 14, 13, 13, 12, 10, 14, 16, 13, 14, 14, 14, 11, 11, + 15, 16, 13, 14, 13, 14, 11, 10, 16, 16, 13, 13, 13, 14, 11, 9, + 7, 12, 8, 11, 9, 11, 9, 10, 10, 14, 10, 12, 11, 12, 11, 10, + 16, 16, 13, 13, 14, 14, 12, 11, 9, 13, 9, 11, 10, 12, 10, 10, + 11, 15, 10, 12, 12, 13, 11, 10, 16, 16, 13, 14, 14, 14, 12, 11, + 11, 16, 9, 11, 12, 14, 10, 10, 13, 16, 10, 12, 13, 14, 11, 10, + 16, 16, 13, 14, 16, 16, 12, 11, 9, 13, 10, 12, 9, 12, 10, 10, + 11, 15, 11, 13, 11, 13, 11, 11, 16, 16, 14, 14, 14, 14, 13, 11, + 10, 14, 10, 12, 11, 13, 11, 10, 12, 16, 11, 13, 12, 13, 11, 11, + 16, 16, 13, 14, 14, 14, 12, 11, 13, 16, 11, 13, 13, 14, 11, 11, + 13, 16, 11, 13, 13, 14, 11, 11, 16, 16, 12, 13, 14, 15, 12, 10, + 11, 16, 12, 14, 10, 12, 11, 10, 13, 16, 13, 14, 11, 13, 11, 11, + 16, 16, 15, 16, 14, 14, 13, 11, 13, 16, 13, 14, 12, 13, 11, 11, + 13, 16, 13, 14, 12, 13, 11, 11, 16, 16, 14, 14, 13, 14, 12, 11, + 15, 16, 13, 14, 14, 16, 12, 11, 14, 16, 13, 14, 13, 14, 12, 11, + 16, 16, 12, 13, 13, 14, 11, 9, 9, 14, 10, 12, 10, 13, 11, 11, + 12, 16, 12, 13, 12, 14, 12, 11, 16, 16, 14, 14, 14, 14, 13, 11, + 10, 16, 10, 13, 12, 14, 11, 11, 13, 16, 12, 13, 13, 14, 12, 11, + 16, 16, 14, 14, 15, 15, 13, 11, 12, 16, 9, 12, 13, 14, 10, 10, + 14, 16, 11, 12, 13, 15, 11, 10, 16, 16, 13, 13, 15, 16, 11, 10, + 10, 16, 11, 13, 11, 13, 11, 11, 13, 16, 12, 14, 12, 14, 12, 11, + 16, 16, 14, 14, 14, 14, 13, 11, 11, 16, 11, 13, 12, 14, 11, 11, + 13, 16, 12, 14, 13, 14, 12, 11, 16, 16, 14, 14, 14, 15, 13, 11, + 13, 16, 11, 13, 13, 14, 11, 10, 14, 16, 11, 13, 13, 14, 11, 10, + 16, 16, 12, 13, 14, 15, 11, 9, 12, 16, 12, 14, 10, 13, 11, 10, + 14, 16, 13, 14, 11, 13, 11, 10, 16, 16, 14, 15, 13, 14, 12, 10, + 13, 16, 13, 14, 11, 13, 11, 10, 14, 16, 13, 14, 12, 13, 11, 10, + 16, 16, 14, 14, 13, 13, 11, 10, 14, 16, 12, 13, 13, 14, 11, 9, + 14, 16, 12, 13, 12, 13, 10, 9, 14, 16, 11, 11, 12, 12, 9, 7, + }, + { + 0, 7, 3, 8, 5, 8, 7, 9, 5, 10, 7, 10, 8, 11, 10, 10, + 14, 16, 14, 15, 14, 16, 14, 14, 4, 10, 6, 10, 8, 11, 9, 10, + 8, 12, 9, 11, 10, 12, 11, 11, 15, 16, 14, 16, 15, 16, 14, 14, + 10, 16, 10, 13, 13, 16, 12, 13, 13, 16, 12, 14, 14, 16, 13, 13, + 16, 16, 16, 16, 16, 16, 14, 15, 4, 10, 7, 10, 7, 10, 9, 10, + 8, 12, 9, 12, 10, 12, 11, 12, 14, 16, 14, 16, 15, 16, 14, 14, + 8, 12, 9, 12, 10, 13, 11, 12, 10, 14, 11, 13, 11, 14, 12, 13, + 16, 16, 14, 16, 16, 16, 14, 15, 12, 16, 12, 14, 14, 16, 13, 14, + 14, 16, 13, 16, 16, 16, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 12, 16, 11, 14, 13, 13, 13, 16, 13, 16, 13, 15, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 16, 13, 16, 13, 16, 13, 16, 13, 14, + 14, 16, 14, 16, 14, 16, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 15, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 2, 9, 5, 9, 6, 10, 8, 10, + 7, 11, 8, 11, 9, 12, 10, 11, 14, 16, 14, 16, 15, 16, 14, 14, + 5, 11, 6, 10, 9, 12, 10, 11, 9, 13, 9, 12, 11, 13, 11, 12, + 16, 16, 14, 16, 16, 16, 14, 14, 10, 16, 9, 13, 13, 16, 12, 13, + 13, 16, 12, 14, 14, 16, 13, 13, 16, 16, 16, 16, 16, 16, 16, 14, + 5, 11, 8, 11, 7, 11, 10, 11, 9, 13, 10, 13, 10, 13, 11, 12, + 16, 16, 14, 16, 16, 16, 14, 14, 8, 13, 9, 12, 10, 13, 11, 12, + 10, 14, 10, 13, 11, 14, 12, 12, 16, 16, 14, 16, 15, 16, 14, 14, + 12, 16, 12, 14, 14, 16, 13, 14, 14, 16, 12, 16, 15, 16, 13, 14, + 16, 16, 15, 16, 16, 16, 15, 15, 11, 16, 12, 16, 10, 14, 12, 13, + 13, 16, 14, 16, 13, 16, 13, 14, 16, 16, 16, 16, 16, 16, 15, 16, + 13, 16, 13, 16, 13, 16, 13, 14, 14, 16, 14, 16, 13, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 15, 16, 16, 16, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, + 5, 13, 7, 12, 9, 13, 11, 12, 10, 14, 10, 13, 11, 13, 12, 13, + 16, 16, 16, 16, 16, 16, 16, 15, 7, 14, 8, 12, 11, 14, 11, 12, + 11, 16, 11, 13, 13, 16, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 10, 14, 14, 16, 12, 13, 13, 16, 12, 15, 16, 16, 14, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 14, 10, 13, 9, 13, 11, 12, + 11, 16, 12, 14, 12, 14, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 11, 14, 12, 14, 12, 13, 11, 16, 12, 14, 12, 15, 13, 13, + 16, 16, 15, 16, 16, 16, 15, 16, 13, 16, 12, 16, 15, 16, 14, 14, + 13, 16, 12, 16, 16, 16, 14, 14, 16, 16, 14, 16, 16, 16, 14, 16, + 11, 16, 13, 16, 10, 14, 12, 13, 14, 16, 14, 16, 13, 16, 14, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 13, 16, 14, 16, 13, 16, 14, 15, + 13, 16, 14, 16, 13, 16, 14, 15, 16, 16, 16, 16, 15, 16, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 15, 16, + 16, 16, 15, 16, 16, 16, 14, 14, 8, 16, 10, 14, 11, 16, 12, 13, + 12, 16, 12, 14, 13, 16, 13, 14, 16, 16, 16, 16, 16, 16, 16, 14, + 10, 16, 10, 14, 12, 16, 12, 13, 13, 16, 12, 15, 14, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 15, 11, 16, 10, 13, 13, 16, 12, 13, + 14, 16, 12, 14, 15, 16, 13, 13, 16, 16, 16, 16, 16, 16, 15, 14, + 10, 16, 11, 14, 11, 16, 12, 13, 13, 16, 13, 16, 13, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 15, 11, 16, 12, 14, 13, 16, 13, 14, + 13, 16, 13, 16, 14, 16, 13, 14, 16, 16, 16, 16, 16, 16, 16, 15, + 13, 16, 12, 14, 14, 16, 13, 13, 13, 16, 12, 15, 14, 16, 13, 13, + 16, 16, 14, 16, 16, 16, 14, 13, 11, 16, 12, 16, 11, 15, 12, 13, + 14, 16, 14, 16, 13, 16, 13, 14, 16, 16, 16, 16, 16, 16, 14, 14, + 12, 16, 13, 16, 12, 16, 13, 14, 13, 16, 14, 16, 13, 16, 13, 14, + 16, 16, 16, 16, 14, 16, 14, 14, 14, 16, 13, 16, 14, 16, 13, 13, + 13, 16, 13, 16, 14, 16, 13, 13, 15, 16, 13, 14, 13, 15, 12, 12, + }, + }, + { + { + 0, 7, 4, 6, 4, 7, 6, 7, 6, 9, 7, 8, 7, 9, 8, 8, + 13, 14, 12, 12, 12, 13, 11, 11, 5, 9, 5, 8, 7, 9, 7, 8, + 8, 11, 8, 10, 9, 10, 9, 9, 13, 15, 12, 13, 12, 13, 11, 11, + 9, 14, 8, 11, 11, 13, 10, 10, 11, 15, 10, 12, 12, 13, 10, 11, + 14, 16, 12, 13, 14, 14, 12, 11, 5, 9, 7, 9, 6, 9, 8, 8, + 8, 11, 8, 10, 8, 10, 9, 9, 13, 16, 12, 13, 13, 13, 11, 11, + 7, 11, 8, 10, 9, 11, 9, 9, 9, 13, 9, 11, 10, 11, 10, 10, + 14, 16, 12, 13, 13, 13, 12, 11, 11, 16, 10, 12, 12, 14, 11, 11, + 13, 16, 11, 13, 13, 14, 11, 11, 16, 16, 13, 14, 14, 15, 12, 11, + 10, 15, 11, 13, 9, 12, 10, 10, 12, 16, 12, 13, 11, 12, 11, 11, + 15, 16, 13, 14, 13, 14, 12, 11, 12, 16, 12, 14, 11, 13, 11, 11, + 13, 16, 12, 14, 12, 13, 12, 11, 16, 16, 13, 14, 14, 14, 12, 11, + 14, 16, 13, 14, 14, 15, 12, 12, 16, 16, 13, 14, 14, 16, 12, 12, + 16, 16, 14, 14, 14, 15, 12, 11, 3, 9, 5, 8, 6, 9, 7, 8, + 7, 11, 8, 10, 9, 10, 9, 9, 13, 14, 12, 13, 13, 13, 12, 11, + 6, 11, 6, 9, 8, 10, 8, 9, 9, 12, 8, 10, 10, 11, 9, 10, + 14, 16, 12, 13, 13, 14, 12, 11, 9, 14, 8, 11, 11, 13, 10, 10, + 12, 16, 10, 12, 12, 14, 11, 11, 16, 16, 12, 13, 14, 15, 12, 11, + 6, 11, 8, 10, 7, 10, 8, 9, 9, 12, 9, 11, 9, 11, 10, 10, + 14, 16, 13, 13, 13, 14, 12, 11, 8, 12, 9, 11, 9, 11, 9, 10, + 10, 13, 9, 11, 10, 12, 10, 10, 14, 16, 12, 13, 13, 14, 12, 11, + 12, 16, 10, 12, 12, 14, 11, 11, 12, 16, 10, 12, 13, 14, 11, 11, + 15, 16, 12, 13, 14, 14, 11, 11, 10, 15, 11, 13, 9, 12, 10, 10, + 12, 16, 12, 14, 11, 13, 11, 11, 16, 16, 14, 14, 14, 14, 12, 11, + 12, 16, 12, 14, 11, 13, 11, 11, 13, 16, 12, 14, 11, 13, 11, 11, + 16, 16, 13, 14, 13, 14, 12, 11, 14, 16, 13, 14, 14, 15, 12, 11, + 14, 16, 13, 14, 13, 15, 12, 11, 16, 16, 13, 14, 13, 14, 11, 10, + 6, 13, 8, 11, 9, 12, 10, 10, 10, 14, 10, 12, 11, 13, 11, 11, + 16, 16, 13, 14, 14, 14, 13, 12, 8, 14, 8, 12, 10, 13, 10, 11, + 11, 15, 10, 12, 12, 13, 11, 11, 16, 16, 14, 14, 15, 16, 13, 12, + 11, 16, 9, 12, 12, 14, 11, 11, 13, 16, 11, 13, 13, 16, 11, 11, + 16, 16, 13, 14, 16, 16, 13, 12, 8, 14, 10, 12, 9, 12, 10, 11, + 11, 15, 11, 13, 11, 13, 11, 11, 16, 16, 14, 15, 14, 15, 13, 12, + 10, 15, 10, 13, 11, 13, 11, 11, 11, 15, 11, 13, 12, 13, 11, 11, + 16, 16, 13, 15, 14, 15, 13, 12, 12, 16, 11, 13, 13, 15, 11, 11, + 13, 16, 11, 13, 13, 15, 11, 11, 16, 16, 12, 14, 14, 16, 12, 11, + 11, 16, 12, 14, 10, 13, 11, 11, 13, 16, 13, 15, 12, 14, 12, 12, + 16, 16, 15, 16, 14, 15, 13, 12, 12, 16, 13, 14, 12, 14, 12, 12, + 13, 16, 13, 14, 12, 14, 12, 12, 16, 16, 14, 15, 13, 14, 12, 12, + 15, 16, 13, 15, 14, 16, 12, 12, 14, 16, 13, 14, 13, 15, 12, 12, + 15, 16, 12, 13, 13, 14, 11, 10, 9, 15, 10, 13, 11, 14, 11, 12, + 12, 16, 12, 14, 12, 14, 12, 12, 16, 16, 14, 14, 14, 15, 13, 12, + 10, 16, 10, 13, 12, 14, 12, 12, 13, 16, 12, 14, 13, 15, 12, 12, + 16, 16, 14, 14, 15, 16, 13, 12, 11, 16, 9, 12, 13, 15, 11, 11, + 14, 16, 11, 13, 14, 16, 11, 11, 16, 16, 13, 14, 16, 16, 12, 11, + 10, 16, 11, 14, 11, 14, 12, 12, 13, 16, 13, 14, 12, 14, 12, 12, + 16, 16, 14, 15, 15, 15, 13, 12, 11, 16, 12, 14, 12, 15, 12, 12, + 13, 16, 12, 14, 13, 15, 12, 12, 16, 16, 14, 15, 15, 16, 13, 12, + 12, 16, 11, 13, 13, 15, 11, 11, 13, 16, 11, 13, 13, 15, 11, 11, + 16, 16, 12, 13, 14, 16, 12, 10, 11, 16, 12, 14, 10, 13, 11, 11, + 14, 16, 13, 14, 12, 14, 11, 11, 16, 16, 15, 16, 14, 14, 12, 11, + 12, 16, 13, 14, 11, 14, 11, 11, 13, 16, 13, 14, 12, 14, 11, 11, + 16, 16, 14, 15, 13, 14, 12, 11, 14, 16, 12, 14, 13, 14, 11, 10, + 13, 16, 12, 13, 12, 14, 11, 10, 14, 16, 11, 12, 12, 12, 10, 8, + }, + { + 0, 8, 4, 9, 5, 9, 8, 10, 6, 11, 8, 11, 9, 12, 11, 12, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 11, 6, 11, 9, 12, 10, 12, + 9, 13, 10, 13, 11, 16, 12, 13, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 11, 16, 16, 16, 14, 16, 14, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 11, 8, 12, 7, 12, 10, 12, + 8, 13, 10, 13, 10, 13, 12, 14, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 13, 10, 14, 11, 16, 12, 14, 11, 16, 12, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 14, 16, 12, 16, 16, 16, 13, 16, 16, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 10, 5, 10, 7, 11, 9, 11, + 8, 12, 9, 12, 10, 13, 12, 13, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 12, 7, 12, 10, 13, 11, 12, 9, 16, 10, 13, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 10, 16, 16, 16, 14, 16, + 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 6, 12, 9, 13, 8, 12, 11, 13, 10, 16, 11, 16, 11, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 10, 14, 11, 16, 12, 16, + 10, 16, 11, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 14, 16, 11, 16, 14, 16, + 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 6, 16, 9, 13, 10, 16, 12, 14, 11, 16, 12, 16, 12, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 9, 14, 12, 16, 13, 16, + 12, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 10, 16, 16, 16, 14, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 11, 16, 10, 16, 12, 16, + 12, 16, 13, 16, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 13, 16, 14, 16, 11, 16, 13, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 13, 16, 16, 16, 16, 16, + 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 11, 16, 14, 16, 16, 16, 16, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 11, 16, 12, 16, 13, 16, + 13, 16, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 11, 16, 13, 16, 14, 16, 14, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 10, 16, 16, 16, 13, 16, + 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 12, 16, 13, 16, 13, 16, 16, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 13, 16, 14, 16, 16, 16, + 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 12, 16, 16, 16, 14, 16, 14, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 13, 16, 11, 16, 13, 16, + 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 14, 15, + }, + }, + { + { + 0, 7, 3, 7, 4, 7, 6, 7, 6, 9, 7, 9, 7, 9, 8, 9, + 13, 14, 12, 13, 13, 13, 12, 12, 4, 9, 5, 9, 7, 9, 8, 9, + 7, 11, 8, 10, 9, 11, 9, 10, 13, 16, 12, 14, 13, 14, 12, 12, + 9, 14, 8, 12, 12, 14, 10, 11, 11, 16, 10, 13, 13, 14, 11, 12, + 15, 16, 13, 14, 14, 16, 12, 12, 5, 10, 7, 9, 6, 9, 8, 9, + 8, 11, 8, 11, 8, 10, 9, 10, 14, 16, 12, 14, 13, 14, 12, 12, + 7, 12, 8, 11, 9, 11, 9, 10, 9, 13, 9, 12, 10, 12, 10, 11, + 14, 16, 12, 14, 13, 14, 12, 12, 12, 16, 11, 13, 13, 15, 11, 12, + 13, 16, 11, 14, 13, 15, 12, 12, 15, 16, 13, 15, 14, 16, 13, 13, + 10, 15, 12, 14, 9, 13, 11, 12, 12, 16, 12, 14, 11, 13, 12, 12, + 15, 16, 13, 15, 14, 15, 13, 13, 12, 16, 12, 14, 12, 14, 12, 12, + 13, 16, 13, 14, 12, 14, 12, 12, 16, 16, 14, 15, 14, 16, 13, 13, + 15, 16, 13, 15, 14, 16, 12, 13, 16, 16, 14, 16, 14, 16, 13, 13, + 16, 16, 14, 16, 15, 16, 13, 13, 3, 9, 5, 9, 6, 9, 8, 9, + 7, 11, 8, 10, 9, 11, 9, 10, 14, 15, 13, 14, 13, 14, 12, 12, + 5, 11, 6, 10, 8, 11, 9, 10, 9, 12, 9, 11, 10, 12, 10, 11, + 14, 16, 13, 14, 14, 15, 13, 13, 9, 15, 8, 12, 12, 14, 10, 11, + 12, 16, 10, 13, 13, 15, 11, 12, 15, 16, 13, 14, 14, 16, 13, 13, + 6, 11, 8, 11, 7, 10, 9, 10, 9, 13, 10, 12, 9, 12, 10, 11, + 14, 16, 13, 14, 14, 14, 13, 13, 8, 13, 9, 12, 9, 12, 10, 11, + 9, 13, 9, 12, 10, 12, 10, 11, 14, 16, 12, 14, 13, 14, 12, 12, + 12, 16, 11, 13, 13, 15, 11, 12, 12, 16, 11, 13, 13, 15, 11, 12, + 14, 16, 12, 14, 14, 15, 12, 12, 10, 15, 11, 14, 9, 13, 11, 12, + 12, 16, 12, 14, 11, 14, 12, 12, 16, 16, 14, 16, 14, 15, 13, 13, + 12, 16, 12, 14, 11, 14, 12, 12, 12, 16, 13, 14, 11, 14, 12, 12, + 15, 16, 14, 15, 13, 15, 12, 13, 14, 16, 13, 15, 14, 16, 13, 13, + 14, 16, 13, 15, 14, 16, 12, 13, 15, 16, 13, 15, 13, 15, 12, 12, + 6, 13, 8, 12, 9, 12, 10, 11, 10, 14, 11, 13, 11, 13, 12, 12, + 15, 16, 14, 15, 15, 15, 14, 13, 8, 14, 9, 12, 11, 13, 11, 12, + 11, 15, 11, 13, 12, 14, 12, 12, 16, 16, 14, 15, 15, 16, 14, 14, + 10, 16, 9, 13, 12, 15, 11, 12, 13, 16, 11, 14, 13, 16, 12, 12, + 16, 16, 14, 15, 16, 16, 13, 13, 8, 14, 10, 13, 9, 13, 11, 12, + 11, 15, 12, 14, 11, 14, 12, 12, 16, 16, 15, 16, 15, 16, 14, 14, + 10, 15, 10, 13, 11, 14, 11, 12, 11, 15, 11, 14, 12, 14, 12, 12, + 15, 16, 14, 15, 14, 16, 13, 13, 12, 16, 11, 14, 13, 16, 12, 12, + 12, 16, 11, 14, 13, 15, 12, 12, 15, 16, 12, 14, 15, 16, 13, 13, + 11, 16, 12, 14, 10, 14, 11, 12, 13, 16, 13, 16, 12, 14, 12, 13, + 16, 16, 16, 16, 15, 16, 14, 13, 12, 16, 13, 15, 12, 14, 12, 13, + 13, 16, 13, 15, 12, 14, 12, 13, 16, 16, 14, 16, 13, 15, 13, 13, + 15, 16, 14, 16, 14, 16, 13, 13, 14, 16, 13, 15, 13, 16, 13, 13, + 14, 16, 12, 14, 13, 14, 12, 12, 9, 16, 11, 14, 11, 15, 12, 13, + 13, 16, 12, 14, 12, 15, 13, 13, 16, 16, 14, 15, 15, 15, 14, 13, + 11, 16, 11, 14, 12, 16, 12, 13, 13, 16, 12, 14, 13, 16, 13, 13, + 16, 16, 14, 15, 16, 16, 14, 13, 11, 16, 10, 13, 13, 16, 11, 12, + 14, 16, 11, 14, 14, 16, 12, 12, 16, 16, 14, 14, 16, 16, 13, 12, + 11, 16, 12, 14, 11, 15, 12, 13, 13, 16, 13, 15, 13, 16, 13, 13, + 16, 16, 15, 16, 15, 16, 14, 13, 11, 16, 12, 15, 12, 16, 12, 13, + 13, 16, 13, 15, 13, 16, 13, 13, 16, 16, 15, 16, 15, 16, 14, 13, + 12, 16, 11, 14, 13, 16, 12, 12, 13, 16, 11, 14, 13, 16, 12, 12, + 16, 16, 13, 14, 15, 16, 12, 12, 11, 16, 12, 14, 10, 14, 11, 12, + 14, 16, 13, 15, 12, 15, 12, 12, 16, 16, 16, 16, 14, 15, 13, 12, + 12, 16, 13, 15, 12, 14, 12, 12, 13, 16, 13, 15, 12, 14, 12, 12, + 16, 16, 14, 16, 14, 15, 12, 12, 14, 16, 13, 15, 13, 16, 11, 12, + 13, 16, 12, 14, 13, 15, 11, 11, 14, 16, 12, 13, 12, 13, 11, 10, + }, + { + 0, 8, 4, 9, 5, 10, 9, 11, 5, 11, 9, 12, 9, 13, 12, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 11, 6, 12, 9, 13, 11, 13, + 9, 16, 10, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 12, 8, 13, 7, 12, 11, 16, + 8, 16, 11, 16, 11, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 10, 16, 11, 16, 13, 16, 11, 16, 12, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 10, 6, 11, 7, 12, 10, 13, + 7, 12, 10, 13, 10, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 13, 7, 12, 10, 16, 12, 16, 10, 16, 11, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 11, 16, 16, 16, 16, 16, + 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 13, 9, 16, 8, 16, 12, 16, 9, 16, 12, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 11, 16, 12, 16, 13, 16, + 10, 16, 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 6, 16, 9, 16, 10, 16, 13, 16, 11, 16, 12, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 9, 16, 12, 16, 13, 16, + 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 10, 16, 16, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 11, 16, 11, 16, 13, 16, + 12, 16, 13, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 13, 16, 16, 16, 11, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 11, 16, 12, 16, 16, 16, + 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 11, 16, 13, 16, 16, 16, 16, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 10, 16, 16, 16, 16, 16, + 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 13, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 12, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 16, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 16, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 7, 4, 8, 4, 8, 7, 8, 6, 10, 7, 10, 8, 10, 9, 10, + 13, 16, 13, 15, 13, 15, 13, 14, 4, 10, 5, 10, 7, 10, 9, 10, + 7, 12, 8, 11, 9, 12, 10, 11, 13, 16, 13, 15, 13, 16, 13, 14, + 9, 16, 9, 13, 12, 16, 11, 13, 11, 16, 11, 14, 13, 16, 12, 14, + 15, 16, 14, 16, 15, 16, 14, 14, 4, 10, 7, 10, 6, 10, 9, 10, + 8, 12, 9, 12, 9, 11, 10, 12, 13, 16, 13, 16, 14, 16, 13, 14, + 7, 12, 8, 12, 9, 12, 10, 12, 9, 13, 10, 13, 10, 13, 11, 12, + 14, 16, 13, 16, 14, 16, 13, 14, 12, 16, 11, 14, 13, 16, 12, 14, + 13, 16, 12, 16, 14, 16, 13, 14, 16, 16, 14, 16, 15, 16, 14, 14, + 10, 16, 12, 15, 10, 14, 12, 13, 12, 16, 13, 16, 12, 14, 13, 14, + 15, 16, 14, 16, 14, 16, 14, 14, 12, 16, 13, 16, 12, 16, 13, 14, + 13, 16, 13, 16, 13, 16, 13, 14, 16, 16, 14, 16, 15, 16, 14, 15, + 15, 16, 14, 16, 15, 16, 13, 15, 16, 16, 14, 16, 15, 16, 14, 15, + 16, 16, 16, 16, 16, 16, 15, 15, 2, 9, 5, 10, 6, 10, 8, 10, + 7, 11, 8, 11, 9, 11, 10, 11, 14, 16, 13, 15, 14, 15, 14, 14, + 5, 11, 6, 11, 8, 12, 9, 11, 8, 13, 9, 12, 10, 13, 11, 12, + 14, 16, 13, 15, 14, 16, 14, 14, 9, 16, 8, 13, 12, 16, 11, 13, + 12, 16, 11, 14, 13, 16, 12, 13, 16, 16, 14, 16, 15, 16, 14, 15, + 5, 12, 8, 11, 7, 11, 9, 11, 9, 13, 10, 13, 10, 13, 11, 12, + 14, 16, 14, 16, 14, 16, 14, 15, 8, 13, 9, 13, 10, 13, 11, 12, + 9, 13, 10, 13, 10, 13, 11, 13, 13, 16, 13, 15, 13, 16, 13, 14, + 12, 16, 11, 14, 13, 16, 12, 14, 12, 16, 11, 14, 13, 16, 12, 14, + 14, 16, 13, 16, 14, 16, 13, 14, 10, 16, 12, 15, 9, 14, 11, 13, + 12, 16, 13, 16, 12, 15, 12, 14, 16, 16, 15, 16, 15, 16, 14, 14, + 12, 16, 13, 16, 12, 16, 12, 14, 12, 16, 13, 16, 12, 15, 13, 14, + 15, 16, 14, 16, 14, 16, 14, 14, 15, 16, 14, 16, 14, 16, 14, 15, + 14, 16, 13, 16, 14, 16, 13, 14, 16, 16, 14, 16, 14, 16, 13, 14, + 6, 14, 9, 13, 9, 14, 11, 12, 10, 14, 11, 13, 11, 14, 12, 13, + 16, 16, 15, 16, 15, 16, 14, 15, 8, 15, 9, 13, 11, 14, 11, 13, + 11, 16, 11, 14, 12, 15, 12, 14, 16, 16, 15, 16, 16, 16, 15, 16, + 10, 16, 9, 14, 12, 16, 12, 13, 13, 16, 11, 15, 14, 16, 13, 14, + 16, 16, 15, 16, 16, 16, 15, 16, 8, 15, 10, 13, 10, 14, 11, 13, + 11, 16, 12, 14, 12, 14, 12, 14, 16, 16, 16, 16, 16, 16, 15, 16, + 10, 16, 11, 14, 11, 15, 12, 13, 11, 16, 11, 14, 12, 15, 12, 14, + 16, 16, 14, 16, 15, 16, 14, 15, 12, 16, 11, 15, 13, 16, 13, 14, + 12, 16, 11, 14, 13, 16, 13, 14, 15, 16, 13, 16, 16, 16, 14, 15, + 10, 16, 12, 15, 10, 15, 12, 13, 13, 16, 13, 16, 12, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 15, 12, 16, 13, 16, 12, 16, 13, 14, + 12, 16, 13, 16, 12, 16, 13, 14, 16, 16, 15, 16, 14, 16, 14, 15, + 15, 16, 14, 16, 15, 16, 14, 15, 14, 16, 13, 16, 14, 16, 13, 14, + 14, 16, 13, 15, 14, 16, 13, 14, 9, 16, 11, 16, 11, 16, 12, 14, + 13, 16, 12, 16, 13, 16, 13, 14, 16, 16, 15, 16, 16, 16, 15, 15, + 11, 16, 11, 16, 12, 16, 13, 14, 13, 16, 12, 16, 13, 16, 13, 14, + 16, 16, 15, 16, 16, 16, 15, 15, 11, 16, 10, 15, 13, 16, 12, 13, + 14, 16, 12, 16, 14, 16, 13, 14, 16, 16, 15, 16, 16, 16, 14, 14, + 11, 16, 12, 16, 11, 16, 13, 14, 13, 16, 13, 16, 13, 16, 13, 14, + 16, 16, 16, 16, 16, 16, 15, 15, 11, 16, 12, 16, 12, 16, 13, 14, + 13, 16, 13, 16, 13, 16, 13, 14, 16, 16, 15, 16, 16, 16, 15, 14, + 12, 16, 12, 15, 13, 16, 12, 14, 13, 16, 12, 16, 14, 16, 13, 14, + 16, 16, 14, 16, 16, 16, 14, 14, 11, 16, 12, 16, 11, 16, 12, 14, + 14, 16, 14, 16, 12, 16, 13, 14, 16, 16, 16, 16, 16, 16, 15, 14, + 12, 16, 13, 16, 12, 16, 12, 14, 13, 16, 13, 16, 12, 16, 13, 14, + 16, 16, 16, 16, 15, 16, 14, 14, 14, 16, 13, 16, 14, 16, 12, 14, + 13, 16, 13, 16, 13, 16, 12, 13, 15, 16, 13, 14, 14, 15, 13, 13, + }, + { + 0, 8, 4, 10, 5, 11, 10, 16, 5, 12, 9, 16, 10, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 12, 7, 12, 9, 16, 12, 16, + 9, 16, 11, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 12, 9, 16, 8, 16, 12, 16, + 8, 16, 11, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 8, 16, 11, 16, 12, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 11, 6, 12, 7, 16, 11, 16, + 7, 16, 10, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 7, 16, 10, 16, 12, 16, 9, 16, 11, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 11, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 10, 16, 8, 16, 12, 16, 9, 16, 12, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 11, 16, 12, 16, 16, 16, + 10, 16, 12, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 9, 16, 10, 16, 16, 16, 11, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 9, 16, 12, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 11, 16, 11, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 10, 16, 12, 16, 16, 16, + 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 9, 16, 16, 16, 16, 16, + 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 13, 16, 12, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 16, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 8, 4, 10, 5, 9, 8, 10, 6, 11, 8, 12, 8, 11, 10, 13, + 14, 16, 14, 16, 14, 16, 16, 16, 3, 11, 5, 11, 8, 12, 10, 12, + 7, 12, 9, 13, 10, 13, 11, 13, 14, 16, 14, 16, 16, 16, 16, 16, + 9, 16, 9, 16, 12, 16, 12, 16, 11, 16, 11, 16, 14, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 11, 7, 12, 6, 11, 10, 12, + 8, 13, 9, 13, 9, 13, 11, 14, 13, 16, 14, 16, 14, 16, 16, 16, + 7, 13, 9, 13, 9, 13, 11, 13, 9, 14, 10, 16, 11, 16, 12, 16, + 15, 16, 14, 16, 16, 16, 16, 16, 12, 16, 12, 16, 14, 16, 13, 16, + 13, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 10, 16, 13, 16, 12, 16, 13, 16, 12, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 13, 16, 13, 16, 14, 16, + 13, 16, 14, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 2, 10, 5, 11, 6, 11, 9, 11, + 7, 12, 9, 13, 9, 13, 11, 13, 14, 16, 16, 16, 16, 16, 16, 16, + 4, 12, 6, 12, 8, 13, 10, 13, 8, 13, 9, 13, 11, 16, 12, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 8, 16, 12, 16, 12, 16, + 12, 16, 11, 16, 13, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 12, 8, 13, 7, 13, 10, 13, 8, 14, 10, 14, 10, 14, 12, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 14, 9, 16, 10, 16, 11, 14, + 8, 14, 10, 16, 11, 16, 12, 16, 13, 16, 14, 16, 16, 16, 16, 16, + 11, 16, 11, 16, 13, 16, 13, 16, 12, 16, 12, 16, 14, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 12, 16, 10, 16, 12, 16, + 12, 16, 13, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 13, 16, 12, 16, 14, 16, 12, 16, 13, 16, 12, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 6, 16, 8, 16, 9, 16, 11, 13, 10, 16, 11, 16, 11, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 9, 16, 10, 16, 12, 16, + 11, 16, 11, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 9, 16, 12, 16, 13, 16, 13, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 10, 16, 9, 16, 12, 16, + 11, 16, 12, 16, 12, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 11, 16, 11, 16, 12, 16, 11, 16, 12, 16, 13, 16, 13, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 12, 16, 14, 16, 14, 16, + 12, 16, 12, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 10, 16, 13, 16, 13, 16, 14, 16, 13, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 13, 16, 12, 16, 14, 16, + 12, 16, 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 11, 16, 11, 16, 13, 16, + 12, 16, 13, 16, 13, 16, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 11, 16, 13, 16, 13, 16, 13, 16, 13, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 11, 16, 14, 16, 13, 16, + 14, 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 12, 16, 12, 16, 13, 16, 13, 16, 13, 16, 13, 16, 14, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 12, 16, 13, 16, 14, 16, + 13, 16, 13, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 12, 16, 14, 16, 14, 16, 14, 16, 14, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 13, 16, 11, 16, 14, 16, + 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 14, 16, 13, 16, 14, 16, 16, 16, 16, 16, 14, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 0, 10, 4, 12, 5, 16, 11, 16, 6, 16, 10, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 3, 16, 7, 16, 10, 16, 16, 16, + 9, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 4, 16, 10, 16, 9, 16, 16, 16, + 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 12, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 6, 16, 8, 16, 16, 16, + 8, 16, 11, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 8, 16, 11, 16, 16, 16, 10, 16, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 11, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 11, 16, 9, 16, 16, 16, 10, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 9, 16, 12, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 5, 16, 9, 16, 11, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 10, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 11, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 12, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 6, 16, 11, 16, 15, 16, 16, 16, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 9, 16, 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 9, 16, 16, 16, 16, 16, + 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 10, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, +}; + +static const uint8_t rv34_table_inter_secondpat[NUM_INTER_TABLES][2][OTHERBLK_VLC_SIZE] = { + { + { + 0, 4, 8, 3, 6, 8, 6, 7, 8, 4, 6, 8, 6, 7, 8, 7, + 8, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 3, 6, 8, 4, 6, + 9, 7, 7, 8, 5, 7, 9, 6, 7, 9, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 7, 6, 8, 9, 7, 8, 9, 7, 8, 9, 7, + 8, 9, 7, 8, 9, 8, 8, 9, 8, 8, 9, 8, 9, 9, 8, 8, + 8, 8, 9, 9, 8, 9, 9, 7, 8, 8, 8, 9, 9, 8, 9, 9, + 8, 8, 8, 7, 8, 8, 8, 8, 8, 7, 7, 6, + }, + { + 0, 4, 9, 3, 6, 9, 7, 8, 10, 3, 6, 9, 5, 7, 10, 9, + 9, 10, 7, 8, 10, 8, 9, 10, 10, 10, 10, 2, 6, 9, 4, 7, + 10, 8, 9, 10, 4, 7, 10, 6, 7, 10, 9, 9, 10, 7, 8, 10, + 8, 9, 10, 10, 10, 10, 6, 8, 10, 7, 9, 11, 9, 10, 11, 7, + 9, 11, 8, 9, 11, 10, 10, 11, 8, 9, 11, 9, 10, 11, 11, 11, + 10, 8, 10, 11, 9, 10, 11, 9, 10, 11, 8, 10, 11, 9, 10, 11, + 10, 10, 11, 8, 10, 11, 9, 10, 10, 10, 10, 9, + }, + }, + { + { + 0, 4, 8, 3, 6, 8, 6, 7, 9, 4, 6, 8, 5, 7, 8, 8, + 8, 9, 7, 7, 8, 8, 8, 8, 8, 9, 8, 3, 6, 8, 4, 6, + 9, 7, 7, 9, 5, 6, 9, 6, 7, 9, 8, 8, 9, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 6, 8, 9, 7, 8, 10, 7, 8, 9, 7, + 8, 10, 7, 8, 10, 8, 8, 9, 7, 8, 9, 8, 9, 9, 9, 9, + 8, 7, 9, 10, 8, 9, 10, 8, 8, 8, 8, 9, 10, 8, 9, 9, + 8, 8, 8, 7, 8, 8, 8, 8, 8, 8, 7, 6, + }, + { + 0, 4, 9, 3, 6, 10, 8, 9, 11, 3, 5, 9, 5, 7, 10, 9, + 10, 11, 7, 8, 10, 9, 9, 11, 11, 11, 12, 2, 5, 10, 4, 7, + 10, 8, 9, 11, 4, 6, 10, 6, 7, 10, 9, 10, 11, 7, 9, 10, + 9, 9, 11, 11, 11, 11, 6, 8, 11, 7, 9, 11, 9, 10, 12, 7, + 9, 11, 8, 9, 12, 10, 10, 12, 8, 10, 11, 10, 10, 11, 12, 11, + 11, 8, 10, 12, 9, 11, 12, 10, 11, 12, 9, 10, 12, 10, 11, 12, + 11, 11, 12, 9, 10, 12, 10, 10, 11, 11, 11, 10, + }, + }, + { + { + 0, 4, 8, 3, 6, 9, 7, 8, 9, 4, 6, 8, 5, 7, 9, 8, + 9, 9, 7, 8, 9, 8, 8, 9, 9, 9, 9, 2, 6, 9, 4, 6, + 9, 7, 8, 10, 5, 7, 9, 6, 7, 9, 8, 8, 9, 7, 8, 9, + 8, 8, 9, 9, 9, 9, 6, 8, 10, 7, 8, 10, 8, 9, 10, 6, + 8, 10, 8, 8, 10, 9, 9, 10, 8, 9, 10, 9, 9, 10, 10, 10, + 9, 8, 9, 10, 8, 9, 10, 8, 9, 10, 8, 9, 10, 9, 9, 10, + 9, 9, 9, 8, 9, 9, 8, 9, 9, 9, 9, 8, + }, + { + 0, 4, 10, 3, 6, 10, 8, 10, 12, 2, 6, 10, 6, 8, 11, 10, + 11, 12, 7, 9, 11, 9, 10, 12, 12, 13, 13, 2, 6, 10, 4, 7, + 11, 9, 10, 13, 4, 7, 11, 7, 8, 11, 10, 11, 12, 8, 9, 12, + 10, 10, 12, 12, 12, 13, 6, 9, 12, 8, 10, 13, 10, 12, 14, 7, + 10, 13, 9, 10, 13, 11, 11, 13, 9, 11, 13, 11, 11, 13, 13, 13, + 13, 9, 11, 13, 10, 12, 14, 11, 12, 14, 9, 11, 14, 11, 12, 14, + 12, 12, 14, 9, 12, 13, 11, 12, 13, 13, 12, 12, + }, + }, + { + { + 0, 4, 9, 3, 6, 9, 7, 8, 10, 3, 6, 9, 6, 7, 9, 9, + 9, 10, 7, 8, 9, 8, 9, 10, 10, 10, 11, 2, 6, 9, 4, 7, + 10, 7, 9, 10, 4, 7, 10, 6, 7, 10, 9, 9, 10, 7, 8, 10, + 8, 9, 10, 10, 10, 10, 6, 8, 11, 7, 9, 11, 8, 10, 11, 6, + 9, 11, 8, 9, 11, 9, 9, 11, 8, 9, 11, 9, 10, 11, 11, 10, + 10, 8, 10, 11, 9, 10, 11, 9, 10, 11, 8, 10, 11, 9, 10, 11, + 10, 10, 11, 8, 10, 11, 9, 10, 11, 10, 10, 10, + }, + { + 0, 4, 12, 3, 7, 12, 10, 11, 14, 3, 6, 12, 7, 9, 13, 12, + 13, 14, 8, 11, 13, 11, 12, 14, 14, 14, 14, 1, 7, 12, 5, 8, + 13, 10, 12, 14, 4, 8, 13, 8, 9, 13, 12, 13, 14, 9, 11, 14, + 11, 12, 14, 14, 14, 14, 7, 10, 14, 9, 11, 14, 11, 13, 16, 8, + 11, 14, 10, 12, 14, 13, 13, 16, 10, 12, 15, 12, 13, 15, 15, 15, + 15, 10, 13, 15, 12, 13, 14, 13, 15, 15, 10, 13, 15, 12, 13, 15, + 13, 14, 15, 10, 13, 14, 12, 13, 14, 14, 14, 14, + }, + }, + { + { + 0, 4, 9, 3, 6, 10, 7, 9, 11, 3, 5, 9, 5, 7, 10, 9, + 10, 12, 7, 8, 10, 9, 10, 11, 11, 12, 12, 2, 6, 10, 4, 7, + 10, 7, 9, 12, 4, 7, 10, 6, 7, 11, 9, 10, 12, 7, 9, 11, + 9, 9, 11, 11, 11, 12, 5, 8, 11, 7, 9, 12, 9, 10, 13, 6, + 9, 12, 8, 9, 12, 10, 10, 12, 8, 10, 12, 10, 10, 12, 12, 12, + 12, 8, 10, 12, 9, 11, 13, 10, 11, 13, 9, 11, 13, 10, 11, 13, + 11, 11, 13, 9, 11, 12, 10, 11, 12, 11, 11, 12, + }, + { + 0, 4, 12, 3, 7, 13, 10, 12, 15, 3, 7, 13, 7, 9, 14, 12, + 12, 13, 8, 11, 14, 11, 13, 15, 15, 14, 14, 1, 6, 13, 5, 8, + 13, 10, 13, 15, 4, 8, 13, 8, 9, 14, 13, 13, 15, 8, 11, 14, + 12, 12, 15, 15, 14, 14, 7, 10, 13, 9, 11, 13, 12, 14, 16, 8, + 11, 14, 10, 12, 15, 13, 13, 16, 10, 12, 15, 12, 13, 15, 15, 14, + 15, 11, 12, 14, 12, 14, 14, 13, 15, 15, 10, 12, 14, 12, 13, 15, + 14, 15, 15, 10, 13, 13, 12, 13, 15, 14, 14, 15, + }, + }, + { + { + 0, 5, 10, 3, 7, 11, 9, 11, 14, 3, 7, 11, 7, 8, 12, 11, + 12, 14, 7, 9, 12, 10, 11, 14, 13, 14, 16, 1, 7, 11, 5, 8, + 12, 9, 11, 15, 4, 8, 12, 7, 9, 13, 11, 12, 15, 8, 10, 13, + 10, 11, 14, 14, 14, 16, 6, 9, 13, 8, 11, 14, 10, 13, 16, 7, + 10, 14, 9, 11, 15, 12, 13, 16, 9, 11, 15, 12, 12, 15, 14, 14, + 16, 10, 12, 14, 11, 13, 15, 12, 14, 16, 10, 12, 15, 11, 13, 16, + 13, 14, 16, 10, 13, 16, 12, 13, 15, 14, 15, 16, + }, + { + 0, 5, 16, 3, 8, 14, 11, 13, 14, 2, 8, 14, 8, 10, 16, 13, + 13, 14, 9, 13, 16, 12, 13, 16, 16, 14, 16, 1, 7, 14, 6, 10, + 14, 12, 16, 16, 5, 9, 14, 9, 11, 16, 15, 16, 16, 10, 12, 16, + 13, 13, 16, 16, 14, 16, 8, 11, 14, 11, 13, 14, 14, 14, 16, 8, + 12, 14, 11, 13, 16, 16, 16, 16, 10, 12, 15, 13, 14, 16, 16, 16, + 16, 11, 14, 14, 14, 15, 16, 16, 15, 16, 10, 13, 16, 13, 14, 14, + 16, 16, 16, 10, 13, 16, 13, 14, 16, 16, 16, 16, + }, + }, + { + { + 0, 5, 11, 3, 7, 13, 9, 12, 16, 3, 7, 12, 6, 9, 14, 11, + 13, 16, 7, 10, 16, 11, 12, 16, 16, 16, 16, 1, 6, 12, 5, 9, + 16, 9, 13, 16, 4, 8, 16, 7, 10, 16, 12, 15, 16, 7, 11, 16, + 11, 12, 16, 16, 16, 16, 6, 10, 15, 8, 11, 16, 11, 14, 16, 7, + 11, 16, 10, 12, 16, 13, 16, 16, 9, 13, 16, 13, 14, 16, 16, 16, + 16, 10, 12, 16, 12, 16, 16, 16, 16, 16, 11, 13, 16, 13, 16, 16, + 16, 16, 16, 12, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 0, 5, 16, 3, 8, 16, 12, 12, 16, 2, 8, 16, 8, 10, 16, 13, + 13, 16, 9, 13, 16, 12, 13, 16, 16, 16, 16, 1, 8, 16, 6, 10, + 16, 12, 16, 16, 5, 9, 16, 9, 11, 16, 13, 16, 16, 9, 12, 14, + 12, 12, 16, 16, 16, 16, 8, 11, 13, 11, 12, 16, 14, 16, 16, 8, + 12, 16, 11, 13, 16, 16, 15, 16, 9, 13, 14, 12, 13, 16, 16, 16, + 16, 10, 12, 13, 14, 13, 16, 16, 16, 16, 9, 13, 16, 13, 12, 16, + 16, 16, 16, 10, 12, 16, 14, 15, 16, 16, 16, 16, + }, + }, +}; + +static const uint8_t rv34_table_inter_thirdpat[NUM_INTER_TABLES][2][OTHERBLK_VLC_SIZE] = { + { + { + 0, 5, 8, 3, 6, 9, 6, 7, 9, 4, 6, 9, 6, 7, 9, 8, + 8, 9, 7, 8, 9, 8, 9, 9, 9, 9, 9, 2, 6, 9, 4, 7, + 9, 7, 8, 9, 5, 7, 9, 6, 7, 9, 8, 8, 9, 7, 8, 9, + 8, 9, 9, 9, 9, 8, 5, 8, 10, 6, 8, 10, 8, 9, 9, 7, + 8, 10, 7, 9, 10, 8, 9, 9, 8, 9, 10, 9, 9, 10, 9, 9, + 9, 7, 9, 10, 8, 9, 10, 8, 8, 9, 8, 9, 10, 8, 9, 10, + 8, 8, 9, 8, 9, 9, 8, 9, 9, 8, 8, 7, + }, + { + 0, 4, 9, 2, 6, 10, 7, 8, 10, 3, 6, 10, 6, 7, 10, 9, + 9, 10, 8, 9, 11, 9, 10, 11, 10, 11, 11, 2, 6, 10, 4, 7, + 10, 8, 9, 10, 5, 7, 10, 7, 8, 10, 9, 9, 10, 9, 10, 11, + 10, 10, 11, 11, 11, 11, 6, 9, 11, 7, 9, 11, 9, 10, 12, 8, + 9, 11, 8, 10, 11, 10, 10, 11, 10, 11, 12, 11, 11, 12, 11, 11, + 11, 9, 11, 12, 10, 11, 12, 10, 11, 12, 10, 11, 12, 10, 11, 12, + 11, 11, 12, 11, 12, 12, 11, 12, 12, 12, 11, 11, + }, + }, + { + { + 0, 4, 9, 3, 6, 9, 6, 8, 9, 4, 6, 9, 5, 7, 9, 8, + 8, 9, 7, 8, 10, 8, 9, 10, 9, 9, 9, 2, 6, 9, 4, 7, + 9, 7, 8, 9, 5, 7, 9, 6, 7, 10, 8, 9, 9, 7, 9, 10, + 8, 9, 10, 9, 9, 9, 5, 8, 10, 6, 8, 10, 8, 9, 10, 7, + 8, 10, 7, 9, 11, 9, 9, 10, 8, 9, 10, 9, 10, 10, 10, 10, + 9, 7, 9, 10, 8, 9, 11, 8, 9, 10, 8, 9, 11, 8, 9, 11, + 9, 9, 10, 9, 9, 10, 9, 9, 10, 9, 9, 8, + }, + { + 0, 4, 9, 2, 5, 10, 7, 8, 11, 3, 6, 10, 6, 7, 10, 9, + 10, 11, 8, 9, 11, 9, 10, 11, 11, 11, 12, 2, 6, 10, 4, 7, + 10, 8, 9, 11, 5, 7, 10, 6, 8, 10, 9, 10, 11, 9, 10, 12, + 10, 10, 12, 11, 12, 12, 6, 9, 11, 8, 9, 12, 9, 11, 13, 8, + 10, 12, 9, 10, 12, 11, 11, 12, 10, 12, 13, 11, 12, 13, 13, 12, + 13, 10, 11, 13, 10, 12, 13, 11, 12, 13, 11, 12, 13, 11, 12, 13, + 12, 12, 13, 12, 13, 14, 13, 13, 14, 13, 13, 13, + }, + }, + { + { + 0, 4, 9, 3, 6, 9, 7, 8, 10, 3, 6, 9, 5, 7, 10, 8, + 9, 10, 7, 9, 10, 8, 9, 10, 10, 10, 10, 2, 6, 9, 4, 7, + 10, 7, 9, 10, 4, 7, 10, 6, 8, 10, 8, 9, 10, 8, 9, 10, + 9, 9, 10, 10, 10, 10, 5, 8, 11, 7, 9, 11, 8, 10, 11, 7, + 9, 11, 8, 9, 11, 9, 10, 11, 9, 10, 11, 10, 10, 11, 11, 11, + 11, 8, 10, 11, 9, 10, 11, 9, 10, 11, 9, 10, 12, 9, 10, 12, + 10, 11, 11, 9, 10, 11, 10, 11, 11, 10, 10, 10, + }, + { + 0, 4, 10, 3, 6, 11, 8, 10, 12, 3, 6, 11, 6, 8, 11, 10, + 11, 13, 9, 10, 13, 11, 12, 14, 13, 13, 14, 1, 6, 10, 5, 8, + 12, 9, 10, 13, 5, 8, 11, 7, 9, 12, 11, 11, 13, 10, 12, 13, + 11, 12, 14, 14, 13, 15, 7, 10, 12, 9, 11, 14, 11, 12, 15, 9, + 11, 13, 10, 11, 14, 12, 12, 14, 12, 14, 16, 13, 13, 16, 14, 14, + 16, 12, 13, 15, 12, 14, 15, 13, 14, 16, 13, 14, 16, 14, 14, 16, + 14, 15, 16, 14, 16, 16, 15, 16, 16, 15, 15, 16, + }, + }, + { + { + 0, 4, 9, 2, 6, 9, 7, 9, 11, 3, 6, 10, 6, 7, 10, 9, + 10, 11, 7, 9, 10, 9, 10, 11, 11, 11, 12, 2, 6, 10, 4, 7, + 10, 8, 9, 11, 5, 7, 10, 7, 8, 10, 9, 10, 11, 8, 9, 11, + 9, 10, 11, 11, 12, 11, 6, 9, 11, 7, 10, 12, 9, 11, 12, 7, + 10, 12, 9, 10, 12, 11, 11, 12, 9, 11, 12, 10, 11, 12, 12, 12, + 12, 9, 11, 12, 9, 11, 13, 11, 12, 13, 9, 11, 13, 10, 12, 13, + 11, 12, 13, 11, 12, 13, 11, 12, 13, 12, 13, 12, + }, + { + 0, 4, 11, 2, 6, 12, 9, 11, 16, 4, 7, 12, 7, 9, 15, 11, + 12, 16, 10, 11, 16, 11, 13, 16, 16, 16, 16, 1, 6, 11, 5, 8, + 16, 9, 12, 16, 6, 9, 15, 8, 10, 16, 12, 13, 16, 12, 14, 16, + 12, 16, 16, 16, 16, 16, 8, 11, 14, 10, 12, 16, 12, 16, 16, 10, + 13, 16, 12, 16, 16, 13, 14, 16, 14, 16, 16, 16, 16, 16, 16, 16, + 16, 13, 13, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 5, 9, 3, 6, 10, 8, 10, 12, 3, 6, 10, 6, 8, 10, 10, + 11, 12, 8, 9, 11, 10, 10, 12, 13, 13, 13, 1, 6, 10, 5, 8, + 11, 9, 11, 13, 5, 8, 11, 7, 9, 11, 11, 11, 13, 8, 9, 11, + 10, 10, 12, 13, 13, 14, 6, 9, 12, 8, 11, 13, 11, 13, 15, 8, + 10, 13, 10, 11, 13, 12, 13, 15, 10, 12, 13, 12, 12, 13, 14, 14, + 14, 9, 12, 14, 11, 13, 15, 13, 15, 16, 11, 13, 15, 12, 14, 15, + 14, 15, 16, 13, 14, 15, 14, 14, 15, 15, 16, 16, + }, + { + 0, 4, 16, 2, 7, 16, 10, 13, 16, 3, 8, 16, 7, 10, 16, 16, + 16, 16, 12, 16, 16, 15, 16, 16, 16, 16, 16, 1, 7, 16, 6, 9, + 16, 10, 16, 16, 7, 12, 16, 9, 13, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 9, 16, 16, 11, 13, 16, 16, 16, 16, 12, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 4, 9, 3, 6, 11, 9, 12, 16, 3, 6, 10, 6, 8, 11, 12, + 13, 16, 8, 9, 12, 10, 11, 13, 16, 16, 16, 1, 6, 10, 5, 8, + 12, 10, 13, 16, 5, 8, 11, 8, 9, 13, 13, 14, 16, 9, 10, 14, + 11, 12, 15, 16, 16, 16, 6, 10, 13, 9, 12, 16, 14, 16, 16, 9, + 12, 14, 11, 13, 16, 16, 16, 16, 12, 14, 16, 14, 16, 16, 16, 16, + 16, 11, 16, 16, 13, 16, 16, 16, 16, 16, 12, 16, 16, 13, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 0, 4, 16, 2, 8, 16, 10, 16, 16, 3, 9, 16, 8, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1, 7, 16, 5, 10, + 16, 16, 16, 16, 7, 16, 16, 11, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 10, 15, 16, 10, 16, 16, 16, 16, 16, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, + { + { + 0, 3, 9, 3, 7, 11, 11, 15, 16, 3, 6, 11, 7, 9, 12, 16, + 16, 16, 8, 10, 16, 11, 16, 16, 16, 16, 16, 1, 6, 11, 6, 9, + 15, 16, 16, 16, 5, 8, 16, 9, 11, 16, 16, 16, 16, 10, 16, 16, + 16, 16, 16, 16, 16, 16, 7, 11, 16, 11, 16, 16, 16, 16, 16, 11, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + { + 0, 4, 16, 2, 8, 16, 16, 16, 16, 3, 12, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 1, 7, 16, 5, 12, + 16, 16, 16, 16, 6, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + }, + }, +}; + + +static const uint8_t rv34_inter_coeff[NUM_INTER_TABLES][COEFF_VLC_SIZE] = { +{ + 1, 2, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10, + 10, 10, 10, 11, 11, 11, 11, 12, 11, 11, 11, 13, 14, 15, 16, 16, +}, +{ + 1, 2, 3, 5, 5, 6, 6, 7, 7, 8, 9, 9, 9, 10, 10, 10, + 11, 11, 12, 12, 12, 12, 13, 13, 12, 12, 13, 14, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, + 12, 12, 13, 13, 13, 14, 14, 15, 14, 14, 16, 16, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, + 13, 13, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 7, 8, 10, 10, 11, 11, 13, 12, 12, 13, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, +}, +{ + 1, 2, 3, 4, 5, 6, 7, 8, 10, 10, 10, 11, 14, 13, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 16, 16, 16, +} +}; + +#endif /* AVCODEC_RV34VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40data.h new file mode 100644 index 00000000..36f9f919 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40data.h @@ -0,0 +1,101 @@ +/* + * RealVideo 4 decoder + * copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * miscellaneous RV40 tables + */ + +#ifndef AVCODEC_RV40DATA_H +#define AVCODEC_RV40DATA_H + +#include + +/** + * standard widths and heights coded in RV40 + */ +//@{ +static const int rv40_standard_widths[] = { 160, 172, 240, 320, 352, 640, 704, 0}; +static const int rv40_standard_heights[] = { 120, 132, 144, 240, 288, 480, -8, -10, 180, 360, 576, 0}; +//@} + +#define MODE2_PATTERNS_NUM 20 +/** + * intra types table + * + * These values are actually coded 3-tuples + * used for detecting standard block configurations. + */ +static const uint16_t rv40_aic_table_index[MODE2_PATTERNS_NUM] = { + 0x000, 0x100, 0x200, + 0x011, 0x111, 0x211, 0x511, 0x611, + 0x022, 0x122, 0x222, 0x722, + 0x272, 0x227, + 0x822, 0x282, 0x228, + 0x112, 0x116, 0x221 +}; + +/** + * luma quantizer values + * The second table is used for inter blocks. + */ +static const uint8_t rv40_luma_dc_quant[2][32] = { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 22, 22, 22, 22 }, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 20, 21, 21, 22, 23, 23, 23, 24, 24, 24, 24 } +}; + +/** + * @name Coefficients used by the RV40 loop filter + * @{ + */ + +/** alpha parameter for RV40 loop filter - almost the same as in JVT-A003r1 */ +static const uint8_t rv40_alpha_tab[32] = { + 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 122, 96, 75, 59, 47, 37, + 29, 23, 18, 15, 13, 11, 10, 9, + 8, 7, 6, 5, 4, 3, 2, 1 +}; +/** beta parameter for RV40 loop filter - almost the same as in JVT-A003r1 */ +static const uint8_t rv40_beta_tab[32] = { + 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 4, 4, 4, 6, 6, + 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 13, 14, 15, 16, 17 +}; +/** clip table for RV40 loop filter - the same as in JVT-A003r1 */ +static const uint8_t rv40_filter_clip_tbl[3][32] = { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5 + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 7, 8, 9 + } +}; +/** @} */ // end loopfilter group + +#endif /* AVCODEC_RV40DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40vlc2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40vlc2.h new file mode 100644 index 00000000..15119a14 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/rv40vlc2.h @@ -0,0 +1,706 @@ +/* + * RealVideo 4 decoder + * copyright (c) 2007 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * RV40 VLC tables used for macroblock information decoding + */ + +#ifndef AVCODEC_RV40VLC2_H +#define AVCODEC_RV40VLC2_H + +#include + +/** + * codes used for the first four block types + */ +//@{ +#define AIC_TOP_BITS 8 +#define AIC_TOP_SIZE 16 +static const uint8_t rv40_aic_top_vlc_codes[AIC_TOP_SIZE] = { + 0x01, 0x05, 0x01, 0x00, 0x03, 0x3D, 0x1D, 0x02, + 0x04, 0x3C, 0x3F, 0x1C, 0x0D, 0x3E, 0x0C, 0x01 +}; + +static const uint8_t rv40_aic_top_vlc_bits[AIC_TOP_SIZE] = { + 1, 4, 5, 5, 5, 7, 6, 5, 4, 7, 7, 6, 5, 7, 5, 3 +}; +//@} + +/** + * codes used for determining a pair of block types + */ +//@{ +#define AIC_MODE2_NUM 20 +#define AIC_MODE2_SIZE 81 +#define AIC_MODE2_BITS 9 + +static const uint16_t aic_mode2_vlc_codes[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { +{ 0x0001, 0x0001, 0x0005, 0x01F5, 0x0011, 0x0049, 0x0000, 0x0048, 0x004B, + 0x0035, 0x0003, 0x0034, 0x03C9, 0x01F4, 0x00C9, 0x004A, 0x0FD9, 0x03C8, + 0x0010, 0x0037, 0x0001, 0x00C8, 0x0075, 0x01F7, 0x00CB, 0x0074, 0x0002, + 0x01F6, 0x00CA, 0x01F1, 0x01F0, 0x1F81, 0x07F9, 0x1F80, 0x1F83, 0x07F8, + 0x0077, 0x00F5, 0x0036, 0x07FB, 0x0076, 0x1F82, 0x00F4, 0x00F7, 0x07FA, + 0x0071, 0x00F6, 0x03CB, 0x03CA, 0x0FD8, 0x00F1, 0x03F5, 0x1F8D, 0x07E5, + 0x0013, 0x0031, 0x00F0, 0x0FDB, 0x00F3, 0x07E4, 0x0030, 0x01F3, 0x07E7, + 0x03F4, 0x07E6, 0x0070, 0x3F19, 0x01F2, 0x3F18, 0x0FDA, 0x0033, 0x07E1, + 0x01FD, 0x01FC, 0x0073, 0x01FF, 0x0FC5, 0x0FC4, 0x0FC7, 0x03F7, 0x0072, }, +{ 0x0005, 0x0005, 0x0005, 0x0079, 0x0005, 0x000D, 0x001D, 0x0078, 0x0069, + 0x0004, 0x0001, 0x0007, 0x0068, 0x001C, 0x001F, 0x0004, 0x006B, 0x000C, + 0x0004, 0x001E, 0x0006, 0x006A, 0x0015, 0x000F, 0x0014, 0x0017, 0x0007, + 0x0016, 0x000E, 0x0011, 0x0009, 0x00D1, 0x00D0, 0x0181, 0x00D3, 0x007B, + 0x0010, 0x0013, 0x0004, 0x00D2, 0x0007, 0x0319, 0x0008, 0x007A, 0x00DD, + 0x0019, 0x0006, 0x000B, 0x0065, 0x00DC, 0x0012, 0x0064, 0x0180, 0x00DF, + 0x0006, 0x0018, 0x0001, 0x00DE, 0x001D, 0x00D9, 0x001B, 0x0067, 0x000A, + 0x00D8, 0x00DB, 0x001C, 0x0318, 0x00DA, 0x0635, 0x0183, 0x0000, 0x00C5, + 0x0066, 0x0061, 0x0035, 0x00C4, 0x0182, 0x0634, 0x031B, 0x00C7, 0x001F, }, +{ 0x0005, 0x0001, 0x001D, 0x01C1, 0x0035, 0x00F1, 0x006D, 0x00F0, 0x0049, + 0x0000, 0x0004, 0x0003, 0x00F3, 0x0048, 0x0034, 0x006C, 0x01C0, 0x01C3, + 0x0007, 0x0006, 0x0001, 0x006F, 0x0002, 0x004B, 0x006E, 0x001C, 0x0005, + 0x0069, 0x0068, 0x006B, 0x0037, 0x01C2, 0x00F2, 0x0395, 0x01CD, 0x00FD, + 0x006A, 0x0036, 0x0015, 0x01CC, 0x0014, 0x0394, 0x004A, 0x00FC, 0x00FF, + 0x0017, 0x0031, 0x00FE, 0x01CF, 0x0397, 0x00F9, 0x01CE, 0x0725, 0x0396, + 0x0016, 0x0030, 0x0075, 0x0724, 0x00F8, 0x0727, 0x0033, 0x0391, 0x0390, + 0x0011, 0x0032, 0x001F, 0x00FB, 0x0074, 0x0726, 0x00FA, 0x001E, 0x0077, + 0x0019, 0x0018, 0x0004, 0x0010, 0x003D, 0x0076, 0x0071, 0x0013, 0x0001, }, +{ 0x000D, 0x0019, 0x0011, 0x0015, 0x0061, 0x0019, 0x0014, 0x01AD, 0x0060, + 0x0018, 0x0001, 0x0005, 0x001B, 0x0010, 0x0019, 0x0005, 0x0017, 0x0018, + 0x0016, 0x0004, 0x0004, 0x0013, 0x000C, 0x0012, 0x001A, 0x0018, 0x0005, + 0x000F, 0x001B, 0x0004, 0x001D, 0x0011, 0x001C, 0x0010, 0x000E, 0x001B, + 0x0013, 0x001F, 0x001A, 0x0029, 0x0005, 0x0063, 0x001E, 0x0009, 0x0062, + 0x0008, 0x0007, 0x0007, 0x0019, 0x0004, 0x001A, 0x0018, 0x006D, 0x0007, + 0x001B, 0x0007, 0x001A, 0x006C, 0x0006, 0x0012, 0x0005, 0x006F, 0x000B, + 0x006E, 0x0069, 0x001D, 0x0359, 0x0028, 0x002B, 0x002A, 0x001C, 0x00D5, + 0x0358, 0x001F, 0x0001, 0x001E, 0x0068, 0x00D4, 0x00D7, 0x0019, 0x0000, }, +{ 0x00B9, 0x0061, 0x0060, 0x00B8, 0x02B5, 0x01AD, 0x00BB, 0x0AF5, 0x0151, + 0x0001, 0x0001, 0x0005, 0x0000, 0x0003, 0x0005, 0x0004, 0x0063, 0x0025, + 0x00BA, 0x0004, 0x0007, 0x0062, 0x00A5, 0x0024, 0x006D, 0x0002, 0x006C, + 0x02B4, 0x000D, 0x006F, 0x0027, 0x00A4, 0x0026, 0x01AC, 0x0150, 0x01AF, + 0x01AE, 0x0021, 0x006E, 0x02B7, 0x0020, 0x0153, 0x0023, 0x00A7, 0x0152, + 0x00A6, 0x0006, 0x000C, 0x0022, 0x01A9, 0x0019, 0x002D, 0x02B6, 0x01A8, + 0x000F, 0x0007, 0x000E, 0x00A1, 0x0069, 0x002C, 0x0001, 0x01AB, 0x00A0, + 0x02B1, 0x00A3, 0x002F, 0x0AF4, 0x02B0, 0x0AF7, 0x02B3, 0x0068, 0x015D, + 0x0AF6, 0x01AA, 0x0055, 0x015C, 0x02B2, 0x0579, 0x0578, 0x015F, 0x00A2, }, +{ 0x0905, 0x013D, 0x013C, 0x0904, 0x121D, 0x049D, 0x049C, 0x243D, 0x0907, + 0x00ED, 0x0001, 0x0015, 0x0041, 0x013F, 0x0031, 0x0014, 0x025D, 0x025C, + 0x013E, 0x000D, 0x0000, 0x0040, 0x0139, 0x0043, 0x0030, 0x0017, 0x0033, + 0x0906, 0x0032, 0x0042, 0x00EC, 0x025F, 0x00EF, 0x025E, 0x049F, 0x0138, + 0x0901, 0x013B, 0x0259, 0x121C, 0x049E, 0x0900, 0x0258, 0x243C, 0x121F, + 0x0903, 0x003D, 0x00EE, 0x025B, 0x025A, 0x004D, 0x013A, 0x0902, 0x0245, + 0x00E9, 0x0016, 0x00E8, 0x0499, 0x0125, 0x0244, 0x004C, 0x0498, 0x090D, + 0x00EB, 0x003C, 0x0011, 0x049B, 0x049A, 0x0485, 0x00EA, 0x003F, 0x0124, + 0x090C, 0x003E, 0x0039, 0x0095, 0x0247, 0x0246, 0x0484, 0x0094, 0x0038, }, +{ 0x0F09, 0x00CD, 0x01FD, 0x0791, 0x1E6D, 0x0790, 0x03D9, 0x3CD1, 0x3CD0, + 0x0075, 0x0001, 0x0001, 0x0035, 0x00CC, 0x0011, 0x0000, 0x03D8, 0x01FC, + 0x03DB, 0x0010, 0x0003, 0x00CF, 0x03DA, 0x00CE, 0x0074, 0x0034, 0x0077, + 0x0793, 0x0013, 0x0076, 0x0071, 0x03C5, 0x0070, 0x01FF, 0x0792, 0x01FE, + 0x01F9, 0x0037, 0x00C9, 0x0F08, 0x01F8, 0x03C4, 0x00C8, 0x0F0B, 0x079D, + 0x03C7, 0x0001, 0x0012, 0x0073, 0x00CB, 0x0005, 0x0036, 0x03C6, 0x0072, + 0x007D, 0x0002, 0x00CA, 0x079C, 0x01FB, 0x00F5, 0x0031, 0x079F, 0x0F0A, + 0x0F35, 0x079E, 0x01FA, 0x1E6C, 0x1E6F, 0x3CD3, 0x0799, 0x03C1, 0x1E6E, + 0x3CD2, 0x0030, 0x00F4, 0x007C, 0x03C0, 0x03C3, 0x0798, 0x01E5, 0x00F7, }, +{ 0x01A5, 0x0001, 0x001D, 0x0021, 0x00A1, 0x000D, 0x0061, 0x06B9, 0x00A0, + 0x0060, 0x0001, 0x0005, 0x000C, 0x0020, 0x001C, 0x0004, 0x01A4, 0x01A7, + 0x00A3, 0x001F, 0x001E, 0x0023, 0x0022, 0x002D, 0x002C, 0x0063, 0x0062, + 0x1A81, 0x01A6, 0x01A1, 0x06B8, 0x06BB, 0x00A2, 0x06BA, 0x0D59, 0x06A5, + 0x01A0, 0x000F, 0x006D, 0x06A4, 0x002F, 0x00AD, 0x006C, 0x06A7, 0x00AC, + 0x0D58, 0x000E, 0x01A3, 0x00AF, 0x00AE, 0x006F, 0x01A2, 0x0D5B, 0x00A9, + 0x0019, 0x0001, 0x0009, 0x00A8, 0x006E, 0x002E, 0x0000, 0x01AD, 0x00AB, + 0x00AA, 0x0355, 0x0029, 0x1A80, 0x1A83, 0x1A82, 0x0354, 0x01AC, 0x0D5A, + 0x1A8D, 0x01AF, 0x0357, 0x0D45, 0x0D44, 0x0D47, 0x1A8C, 0x06A6, 0x06A1, }, +{ 0x0001, 0x0011, 0x0005, 0x0775, 0x00F9, 0x00F8, 0x0031, 0x0030, 0x0049, + 0x00FB, 0x0010, 0x0033, 0x0EC9, 0x038D, 0x038C, 0x00FA, 0x038F, 0x0774, + 0x0048, 0x0032, 0x0000, 0x01D5, 0x00E5, 0x038E, 0x00E4, 0x0013, 0x000D, + 0x0389, 0x0777, 0x0388, 0x038B, 0x1DF9, 0x0EC8, 0x3BC9, 0x1DF8, 0x038A, + 0x03B5, 0x0776, 0x00E7, 0x3BC8, 0x01D4, 0x3BCB, 0x0ECB, 0x0771, 0x0ECA, + 0x01D7, 0x03B4, 0x01D6, 0x1DFB, 0x0EF5, 0x0770, 0x0EF4, 0x3BCA, 0x0773, + 0x00E6, 0x03B7, 0x004B, 0x1DFA, 0x03B6, 0x0EF7, 0x00E1, 0x0EF6, 0x0EF1, + 0x03B1, 0x01D1, 0x003D, 0x0EF0, 0x0772, 0x077D, 0x077C, 0x003C, 0x01D0, + 0x03B0, 0x01D3, 0x003F, 0x03B3, 0x01D2, 0x0EF3, 0x077F, 0x00E0, 0x004A, }, +{ 0x0015, 0x0049, 0x0014, 0x07D1, 0x03FD, 0x03FC, 0x01C1, 0x01C0, 0x00F1, + 0x0017, 0x0001, 0x0001, 0x01C3, 0x0048, 0x004B, 0x0016, 0x0031, 0x01C2, + 0x004A, 0x0011, 0x0000, 0x01CD, 0x00F0, 0x01CC, 0x0075, 0x0010, 0x000D, + 0x03FF, 0x01CF, 0x01CE, 0x07D0, 0x0F81, 0x07D3, 0x1F1D, 0x0F80, 0x07D2, + 0x01C9, 0x03FE, 0x0074, 0x07DD, 0x00F3, 0x1F1C, 0x07DC, 0x03F9, 0x07DF, + 0x00F2, 0x00FD, 0x0077, 0x07DE, 0x07D9, 0x01C8, 0x07D8, 0x0F83, 0x03F8, + 0x0030, 0x0076, 0x0013, 0x0F82, 0x00FC, 0x03FB, 0x0033, 0x03FA, 0x03E5, + 0x03E4, 0x01CB, 0x0032, 0x1F1F, 0x03E7, 0x07DB, 0x07DA, 0x003D, 0x01CA, + 0x07C5, 0x03E6, 0x0071, 0x0F8D, 0x07C4, 0x1F1E, 0x0F8C, 0x03E1, 0x01F5, }, +{ 0x0019, 0x0065, 0x0018, 0x0351, 0x0350, 0x0353, 0x0021, 0x0020, 0x0064, + 0x001D, 0x0005, 0x0005, 0x01A5, 0x0023, 0x0067, 0x0005, 0x0066, 0x0022, + 0x001B, 0x0004, 0x0001, 0x0004, 0x001C, 0x0061, 0x001A, 0x0005, 0x0004, + 0x0007, 0x002D, 0x0006, 0x002C, 0x01A4, 0x002F, 0x0352, 0x035D, 0x0060, + 0x0001, 0x002E, 0x001F, 0x035C, 0x0000, 0x06B1, 0x01A7, 0x0029, 0x01A6, + 0x0028, 0x0063, 0x0062, 0x035F, 0x01A1, 0x002B, 0x06B0, 0x06B3, 0x01A0, + 0x0003, 0x006D, 0x001E, 0x035E, 0x006C, 0x06B2, 0x0002, 0x01A3, 0x01A2, + 0x000D, 0x0005, 0x0007, 0x01AD, 0x006F, 0x002A, 0x006E, 0x0004, 0x0004, + 0x000C, 0x0007, 0x0006, 0x000F, 0x000E, 0x00D5, 0x0009, 0x0006, 0x0007, }, +{ 0x0065, 0x0181, 0x0064, 0x36C9, 0x06D5, 0x0DB5, 0x0379, 0x0180, 0x0183, + 0x00D5, 0x001D, 0x001C, 0x0DB4, 0x0182, 0x0378, 0x00D4, 0x00D7, 0x06D4, + 0x0067, 0x001F, 0x0001, 0x00D6, 0x00D1, 0x018D, 0x0066, 0x0001, 0x0000, + 0x037B, 0x06D7, 0x037A, 0x0DB7, 0x36C8, 0x06D6, 0x0DB6, 0x1B79, 0x0DB1, + 0x018C, 0x0365, 0x00D0, 0x1B78, 0x00D3, 0x1B7B, 0x0364, 0x06D1, 0x06D0, + 0x018F, 0x018E, 0x00D2, 0x36CB, 0x0367, 0x0366, 0x06D3, 0x0DB0, 0x06D2, + 0x0361, 0x06DD, 0x0189, 0x36CA, 0x0360, 0x36F5, 0x0188, 0x0DB3, 0x36F4, + 0x0009, 0x0008, 0x0005, 0x06DC, 0x00DD, 0x018B, 0x00DC, 0x0004, 0x000B, + 0x018A, 0x0061, 0x0003, 0x0363, 0x00DF, 0x06DF, 0x0362, 0x000A, 0x001E, }, +{ 0x001D, 0x0061, 0x000D, 0x0D55, 0x06B9, 0x06B8, 0x01A5, 0x0021, 0x0020, + 0x0023, 0x000C, 0x0060, 0x0D54, 0x00AD, 0x00AC, 0x0022, 0x00AF, 0x06BB, + 0x000F, 0x001C, 0x0001, 0x002D, 0x0063, 0x01A4, 0x000E, 0x0001, 0x0005, + 0x01A7, 0x06BA, 0x01A6, 0x06A5, 0x0D57, 0x0D56, 0x1ABD, 0x0D51, 0x00AE, + 0x002C, 0x00A9, 0x002F, 0x0D50, 0x01A1, 0x1ABC, 0x06A4, 0x06A7, 0x06A6, + 0x00A8, 0x06A1, 0x01A0, 0x1ABF, 0x0D53, 0x06A0, 0x0D52, 0x1ABE, 0x06A3, + 0x0062, 0x002E, 0x0009, 0x0D5D, 0x01A3, 0x0D5C, 0x006D, 0x00AB, 0x06A2, + 0x006C, 0x001F, 0x0001, 0x06AD, 0x0029, 0x01A2, 0x0028, 0x0004, 0x001E, + 0x01AD, 0x006F, 0x0000, 0x01AC, 0x01AF, 0x06AC, 0x00AA, 0x006E, 0x0019, }, +{ 0x0019, 0x007D, 0x0018, 0x01B5, 0x000D, 0x01B4, 0x007C, 0x007F, 0x01B7, + 0x000C, 0x001B, 0x001A, 0x01B6, 0x000F, 0x00D5, 0x0019, 0x007E, 0x00D4, + 0x0018, 0x001B, 0x0001, 0x000E, 0x0011, 0x0009, 0x0005, 0x0005, 0x0005, + 0x00D7, 0x01B1, 0x0008, 0x01B0, 0x0079, 0x06FD, 0x0371, 0x0370, 0x00D6, + 0x0078, 0x01B3, 0x0010, 0x0373, 0x0013, 0x06FC, 0x007B, 0x007A, 0x00D1, + 0x00D0, 0x00D3, 0x0065, 0x0372, 0x06FF, 0x0064, 0x06FE, 0x037D, 0x00D2, + 0x00DD, 0x0067, 0x0004, 0x037C, 0x0012, 0x01B2, 0x0007, 0x0066, 0x01BD, + 0x0006, 0x0061, 0x0004, 0x01BC, 0x001A, 0x0060, 0x001D, 0x0004, 0x001C, + 0x0063, 0x0001, 0x0007, 0x000B, 0x0000, 0x0062, 0x000A, 0x0005, 0x0007, }, +{ 0x0069, 0x0045, 0x0068, 0x04BD, 0x0255, 0x04BC, 0x00E5, 0x00E4, 0x0031, + 0x0030, 0x0019, 0x0001, 0x0121, 0x00E7, 0x00E6, 0x0033, 0x00E1, 0x00E0, + 0x006B, 0x0018, 0x0001, 0x0044, 0x0032, 0x0047, 0x006A, 0x001B, 0x0005, + 0x003D, 0x0046, 0x0015, 0x0041, 0x0120, 0x0123, 0x04BF, 0x0122, 0x0040, + 0x003C, 0x00E3, 0x0014, 0x0254, 0x0043, 0x0975, 0x012D, 0x00E2, 0x00ED, + 0x0042, 0x00EC, 0x004D, 0x0257, 0x0256, 0x0251, 0x04BE, 0x0974, 0x0250, + 0x00EF, 0x00EE, 0x004C, 0x04B9, 0x012C, 0x04B8, 0x004F, 0x04BB, 0x0253, + 0x003F, 0x0017, 0x0001, 0x0252, 0x00E9, 0x00E8, 0x00EB, 0x0000, 0x0003, + 0x0016, 0x0002, 0x0004, 0x004E, 0x003E, 0x00EA, 0x0049, 0x000D, 0x0007, }, +{ 0x000D, 0x01BD, 0x000C, 0x0D31, 0x0D30, 0x0D33, 0x0359, 0x0358, 0x002D, + 0x0065, 0x001D, 0x001C, 0x0D32, 0x035B, 0x035A, 0x002C, 0x01BC, 0x0345, + 0x000F, 0x001F, 0x0001, 0x002F, 0x0064, 0x01BF, 0x0067, 0x0001, 0x0005, + 0x0066, 0x002E, 0x0061, 0x0029, 0x0695, 0x0694, 0x0697, 0x0696, 0x0060, + 0x01BE, 0x0D3D, 0x0028, 0x1A49, 0x0344, 0x1A48, 0x1A4B, 0x0D3C, 0x0691, + 0x002B, 0x01B9, 0x002A, 0x0D3F, 0x0690, 0x0347, 0x0D3E, 0x1A4A, 0x0346, + 0x00D5, 0x0341, 0x0063, 0x0D39, 0x0340, 0x0D38, 0x01B8, 0x0D3B, 0x0D3A, + 0x00D4, 0x0062, 0x0000, 0x0693, 0x01BB, 0x0343, 0x0342, 0x001E, 0x000E, + 0x006D, 0x0009, 0x0001, 0x006C, 0x00D7, 0x034D, 0x01BA, 0x0008, 0x0004, }, +{ 0x0075, 0x00CD, 0x0035, 0x03C1, 0x03C0, 0x07F9, 0x03C3, 0x1F8D, 0x00CC, + 0x0074, 0x0011, 0x0010, 0x03C2, 0x0FD9, 0x01F1, 0x00CF, 0x03CD, 0x00CE, + 0x0034, 0x0001, 0x0001, 0x0037, 0x00C9, 0x00C8, 0x0036, 0x0000, 0x0001, + 0x0FD8, 0x03CC, 0x00CB, 0x01F0, 0x07F8, 0x03CF, 0x07FB, 0x07FA, 0x00CA, + 0x01F3, 0x03CE, 0x00F5, 0x0FDB, 0x00F4, 0x07E5, 0x07E4, 0x07E7, 0x01F2, + 0x07E6, 0x03C9, 0x01FD, 0x0FDA, 0x1F8C, 0x07E1, 0x1F8F, 0x1F8E, 0x03C8, + 0x03CB, 0x0077, 0x0076, 0x0FC5, 0x03CA, 0x07E0, 0x00F7, 0x0FC4, 0x03F5, + 0x00F6, 0x01FC, 0x0003, 0x03F4, 0x0071, 0x03F7, 0x00F1, 0x0013, 0x0031, + 0x0030, 0x0070, 0x0005, 0x0012, 0x0073, 0x01FF, 0x0072, 0x007D, 0x0002, }, +{ 0x0061, 0x0055, 0x0060, 0x02C9, 0x02C8, 0x02CB, 0x0171, 0x00B5, 0x0054, + 0x0001, 0x0001, 0x0001, 0x0057, 0x0001, 0x0063, 0x001D, 0x0062, 0x0039, + 0x006D, 0x0000, 0x0005, 0x0038, 0x0056, 0x00B4, 0x006C, 0x0003, 0x001C, + 0x006F, 0x003B, 0x0002, 0x003A, 0x0170, 0x00B7, 0x0173, 0x0051, 0x006E, + 0x0025, 0x0050, 0x0069, 0x02CA, 0x0024, 0x0027, 0x0172, 0x00B6, 0x00B1, + 0x000D, 0x000C, 0x001F, 0x017D, 0x0026, 0x0068, 0x0053, 0x017C, 0x006B, + 0x001E, 0x000F, 0x0004, 0x017F, 0x006A, 0x02F5, 0x0019, 0x0021, 0x0052, + 0x02F4, 0x02F7, 0x0020, 0x0BCD, 0x05E5, 0x05E4, 0x0BCC, 0x0023, 0x00B0, + 0x02F6, 0x00B3, 0x0022, 0x02F1, 0x02F0, 0x0BCF, 0x0BCE, 0x017E, 0x005D, }, +{ 0x00BD, 0x0025, 0x01A1, 0x0159, 0x0299, 0x00BC, 0x0024, 0x0505, 0x0504, + 0x01A0, 0x0001, 0x001D, 0x006D, 0x001C, 0x0001, 0x0005, 0x0027, 0x01A3, + 0x0158, 0x001F, 0x001E, 0x01A2, 0x0026, 0x0021, 0x000D, 0x0020, 0x0023, + 0x0298, 0x006C, 0x0022, 0x00BF, 0x00BE, 0x01AD, 0x002D, 0x029B, 0x00B9, + 0x01AC, 0x00B8, 0x01AF, 0x029A, 0x006F, 0x015B, 0x006E, 0x0285, 0x0284, + 0x01AE, 0x0019, 0x002C, 0x01A9, 0x01A8, 0x000C, 0x000F, 0x015A, 0x00BB, + 0x000E, 0x0000, 0x0069, 0x01AB, 0x0018, 0x01AA, 0x0004, 0x0055, 0x00BA, + 0x0507, 0x0145, 0x0054, 0x0506, 0x00A5, 0x0501, 0x00A4, 0x0057, 0x0500, + 0x0A05, 0x0144, 0x00A7, 0x0287, 0x0286, 0x0503, 0x0147, 0x0A04, 0x0146, }, +{ 0x0759, 0x0041, 0x00E5, 0x03BD, 0x0E9D, 0x012D, 0x012C, 0x3A1D, 0x03BC, + 0x012F, 0x000D, 0x0040, 0x00E4, 0x03BF, 0x0043, 0x0042, 0x0758, 0x03BE, + 0x00E7, 0x0001, 0x0000, 0x003D, 0x00E6, 0x0015, 0x0014, 0x0017, 0x003C, + 0x743D, 0x012E, 0x03B9, 0x03B8, 0x0E9C, 0x03BB, 0x075B, 0x3A1C, 0x0E9F, + 0x0129, 0x00E1, 0x0128, 0x0E9E, 0x012B, 0x075A, 0x00E0, 0x0E99, 0x0745, + 0x3A1F, 0x03BA, 0x0744, 0x0E98, 0x1D0D, 0x03A5, 0x0E9B, 0x743C, 0x0E9A, + 0x012A, 0x004D, 0x00E3, 0x0E85, 0x01D5, 0x0E84, 0x004C, 0x0747, 0x1D0C, + 0x01D4, 0x003F, 0x0016, 0x0746, 0x03A4, 0x0741, 0x004F, 0x003E, 0x01D7, + 0x0740, 0x000C, 0x0011, 0x004E, 0x00E2, 0x00ED, 0x00EC, 0x0049, 0x0048, }, +}; + +static const uint8_t aic_mode2_vlc_bits[AIC_MODE2_NUM][AIC_MODE2_SIZE] = { +{ 1, 5, 4, 10, 6, 8, 5, 8, 8, + 7, 5, 7, 11, 10, 9, 8, 13, 11, + 6, 7, 3, 9, 8, 10, 9, 8, 5, + 10, 9, 10, 10, 14, 12, 14, 14, 12, + 8, 9, 7, 12, 8, 14, 9, 9, 12, + 8, 9, 11, 11, 13, 9, 11, 14, 12, + 6, 7, 9, 13, 9, 12, 7, 10, 12, + 11, 12, 8, 15, 10, 15, 13, 7, 12, + 10, 10, 8, 10, 13, 13, 13, 11, 8, }, +{ 4, 6, 5, 11, 8, 10, 7, 11, 9, + 4, 1, 4, 9, 7, 7, 5, 9, 10, + 6, 7, 4, 9, 9, 10, 9, 9, 6, + 9, 10, 9, 10, 12, 12, 13, 12, 11, + 9, 9, 8, 12, 8, 14, 10, 11, 12, + 7, 8, 10, 11, 12, 9, 11, 13, 12, + 6, 7, 8, 12, 9, 12, 7, 11, 10, + 12, 12, 9, 14, 12, 15, 13, 8, 12, + 11, 11, 10, 12, 13, 15, 14, 12, 9, }, +{ 5, 7, 6, 12, 9, 11, 8, 11, 10, + 7, 5, 7, 11, 10, 9, 8, 12, 12, + 5, 5, 1, 8, 7, 10, 8, 6, 4, + 8, 8, 8, 9, 12, 11, 13, 12, 11, + 8, 9, 8, 12, 8, 13, 10, 11, 11, + 8, 9, 11, 12, 13, 11, 12, 14, 13, + 8, 9, 10, 14, 11, 14, 9, 13, 13, + 8, 9, 6, 11, 10, 14, 11, 6, 10, + 6, 6, 4, 8, 9, 10, 10, 8, 5, }, +{ 11, 7, 8, 10, 12, 9, 10, 14, 12, + 7, 1, 5, 7, 8, 6, 4, 10, 9, + 10, 5, 4, 8, 11, 8, 7, 6, 7, + 11, 6, 7, 8, 10, 8, 10, 11, 9, + 10, 8, 9, 13, 9, 12, 8, 11, 12, + 11, 4, 7, 8, 9, 6, 8, 12, 9, + 8, 5, 8, 12, 9, 10, 6, 12, 11, + 12, 12, 10, 15, 13, 13, 13, 10, 13, + 15, 10, 9, 10, 12, 13, 13, 10, 9, }, +{ 11, 8, 8, 11, 13, 10, 11, 15, 12, + 7, 1, 4, 7, 7, 5, 4, 8, 9, + 11, 5, 5, 8, 11, 9, 8, 7, 8, + 13, 7, 8, 9, 11, 9, 10, 12, 10, + 10, 9, 8, 13, 9, 12, 9, 11, 12, + 11, 5, 7, 9, 10, 6, 9, 13, 10, + 7, 4, 7, 11, 8, 9, 5, 10, 11, + 13, 11, 9, 15, 13, 15, 13, 8, 12, + 15, 10, 10, 12, 13, 14, 14, 12, 11, }, +{ 12, 9, 9, 12, 13, 11, 11, 14, 12, + 8, 2, 5, 7, 9, 6, 5, 10, 10, + 9, 4, 2, 7, 9, 7, 6, 5, 6, + 12, 6, 7, 8, 10, 8, 10, 11, 9, + 12, 9, 10, 13, 11, 12, 10, 14, 13, + 12, 6, 8, 10, 10, 7, 9, 12, 10, + 8, 5, 8, 11, 9, 10, 7, 11, 12, + 8, 6, 5, 11, 11, 11, 8, 6, 9, + 12, 6, 6, 8, 10, 10, 11, 8, 6, }, +{ 13, 9, 10, 12, 14, 12, 11, 15, 15, + 8, 1, 5, 7, 9, 6, 5, 11, 10, + 11, 6, 5, 9, 11, 9, 8, 7, 8, + 12, 6, 8, 8, 11, 8, 10, 12, 10, + 10, 7, 9, 13, 10, 11, 9, 13, 12, + 11, 3, 6, 8, 9, 4, 7, 11, 8, + 8, 5, 9, 12, 10, 9, 7, 12, 13, + 13, 12, 10, 14, 14, 15, 12, 11, 14, + 15, 7, 9, 8, 11, 11, 12, 10, 9, }, +{ 10, 5, 6, 9, 11, 7, 8, 12, 11, + 8, 1, 4, 7, 9, 6, 4, 10, 10, + 11, 6, 6, 9, 9, 9, 9, 8, 8, + 14, 10, 10, 12, 12, 11, 12, 13, 12, + 10, 7, 8, 12, 9, 11, 8, 12, 11, + 13, 7, 10, 11, 11, 8, 10, 13, 11, + 6, 3, 7, 11, 8, 9, 5, 10, 11, + 11, 11, 9, 14, 14, 14, 11, 10, 13, + 14, 10, 11, 13, 13, 13, 14, 12, 12, }, +{ 2, 5, 3, 11, 8, 8, 6, 6, 7, + 8, 5, 6, 12, 10, 10, 8, 10, 11, + 7, 6, 2, 9, 8, 10, 8, 5, 4, + 10, 11, 10, 10, 13, 12, 14, 13, 10, + 10, 11, 8, 14, 9, 14, 12, 11, 12, + 9, 10, 9, 13, 12, 11, 12, 14, 11, + 8, 10, 7, 13, 10, 12, 8, 12, 12, + 10, 9, 6, 12, 11, 11, 11, 6, 9, + 10, 9, 6, 10, 9, 12, 11, 8, 7, }, +{ 6, 8, 6, 12, 11, 11, 10, 10, 9, + 6, 1, 3, 10, 8, 8, 6, 7, 10, + 8, 6, 3, 10, 9, 10, 8, 6, 5, + 11, 10, 10, 12, 13, 12, 14, 13, 12, + 10, 11, 8, 12, 9, 14, 12, 11, 12, + 9, 9, 8, 12, 12, 10, 12, 13, 11, + 7, 8, 6, 13, 9, 11, 7, 11, 11, + 11, 10, 7, 14, 11, 12, 12, 7, 10, + 12, 11, 8, 13, 12, 14, 13, 11, 10, }, +{ 7, 10, 7, 13, 13, 13, 11, 11, 10, + 8, 5, 6, 12, 11, 10, 9, 10, 11, + 7, 5, 1, 9, 8, 10, 7, 4, 4, + 9, 11, 9, 11, 12, 11, 13, 13, 10, + 9, 11, 8, 13, 9, 14, 12, 11, 12, + 11, 10, 10, 13, 12, 11, 14, 14, 12, + 9, 10, 8, 13, 10, 14, 9, 12, 12, + 9, 7, 4, 12, 10, 11, 10, 6, 7, + 9, 7, 4, 9, 9, 11, 9, 7, 5, }, +{ 7, 9, 7, 14, 11, 12, 10, 9, 9, + 8, 5, 5, 12, 9, 10, 8, 8, 11, + 7, 5, 2, 8, 8, 9, 7, 4, 4, + 10, 11, 10, 12, 14, 11, 12, 13, 12, + 9, 10, 8, 13, 8, 13, 10, 11, 11, + 9, 9, 8, 14, 10, 10, 11, 12, 11, + 10, 11, 9, 14, 10, 14, 9, 12, 14, + 6, 6, 3, 11, 8, 9, 8, 3, 6, + 9, 7, 4, 10, 8, 11, 10, 6, 5, }, +{ 6, 8, 7, 13, 12, 12, 10, 9, 9, + 9, 7, 8, 13, 11, 11, 9, 11, 12, + 7, 6, 1, 9, 8, 10, 7, 5, 4, + 10, 12, 10, 12, 13, 13, 14, 13, 11, + 9, 11, 9, 13, 10, 14, 12, 12, 12, + 11, 12, 10, 14, 13, 12, 13, 14, 12, + 8, 9, 7, 13, 10, 13, 8, 11, 12, + 8, 6, 3, 12, 9, 10, 9, 4, 6, + 10, 8, 5, 10, 10, 12, 11, 8, 6, }, +{ 7, 10, 7, 12, 9, 12, 10, 10, 12, + 9, 7, 7, 12, 9, 11, 6, 10, 11, + 6, 6, 1, 9, 8, 9, 7, 4, 5, + 11, 12, 9, 12, 10, 14, 13, 13, 11, + 10, 12, 8, 13, 8, 14, 10, 10, 11, + 11, 11, 10, 13, 14, 10, 14, 13, 11, + 11, 10, 7, 13, 8, 12, 7, 10, 12, + 7, 10, 4, 12, 6, 10, 8, 5, 8, + 10, 7, 4, 9, 7, 10, 9, 6, 5, }, +{ 7, 9, 7, 13, 12, 13, 10, 10, 8, + 8, 5, 6, 11, 10, 10, 8, 10, 10, + 7, 5, 2, 9, 8, 9, 7, 5, 3, + 8, 9, 7, 9, 11, 11, 13, 11, 9, + 8, 10, 7, 12, 9, 14, 11, 10, 10, + 9, 10, 9, 12, 12, 12, 13, 14, 12, + 10, 10, 9, 13, 11, 13, 9, 13, 12, + 8, 7, 4, 12, 10, 10, 10, 6, 6, + 7, 6, 3, 9, 8, 10, 9, 6, 3, }, +{ 7, 10, 7, 13, 13, 13, 11, 11, 9, + 8, 6, 6, 13, 11, 11, 9, 10, 11, + 7, 6, 1, 9, 8, 10, 8, 5, 4, + 8, 9, 8, 9, 12, 12, 12, 12, 8, + 10, 13, 9, 14, 11, 14, 14, 13, 12, + 9, 10, 9, 13, 12, 11, 13, 14, 11, + 9, 11, 8, 13, 11, 13, 10, 13, 13, + 9, 8, 5, 12, 10, 11, 11, 6, 7, + 8, 7, 3, 8, 9, 11, 10, 7, 4, }, +{ 8, 9, 7, 11, 11, 12, 11, 14, 9, + 8, 6, 6, 11, 13, 10, 9, 11, 9, + 7, 5, 1, 7, 9, 9, 7, 5, 3, + 13, 11, 9, 10, 12, 11, 12, 12, 9, + 10, 11, 9, 13, 9, 12, 12, 12, 10, + 12, 11, 10, 13, 14, 12, 14, 14, 11, + 11, 8, 8, 13, 11, 12, 9, 13, 11, + 9, 10, 5, 11, 8, 11, 9, 6, 7, + 7, 8, 4, 6, 8, 10, 8, 8, 5, }, +{ 8, 10, 8, 13, 13, 13, 12, 11, 10, + 5, 1, 3, 10, 7, 8, 6, 8, 9, + 8, 7, 4, 9, 10, 11, 8, 7, 6, + 8, 9, 7, 9, 12, 11, 12, 10, 8, + 9, 10, 8, 13, 9, 9, 12, 11, 11, + 7, 7, 6, 12, 9, 8, 10, 12, 8, + 6, 7, 4, 12, 8, 13, 6, 9, 10, + 13, 13, 9, 15, 14, 14, 15, 9, 11, + 13, 11, 9, 13, 13, 15, 15, 12, 10, }, +{ 10, 8, 9, 11, 12, 10, 8, 13, 13, + 9, 2, 5, 7, 5, 4, 3, 8, 9, + 11, 5, 5, 9, 8, 8, 6, 8, 8, + 12, 7, 8, 10, 10, 9, 8, 12, 10, + 9, 10, 9, 12, 7, 11, 7, 12, 12, + 9, 5, 8, 9, 9, 6, 6, 11, 10, + 6, 4, 7, 9, 5, 9, 3, 9, 10, + 13, 11, 9, 13, 10, 13, 10, 9, 13, + 14, 11, 10, 12, 12, 13, 11, 14, 11, }, +{ 11, 7, 8, 10, 12, 9, 9, 14, 10, + 9, 4, 7, 8, 10, 7, 7, 11, 10, + 8, 2, 2, 6, 8, 5, 5, 5, 6, + 15, 9, 10, 10, 12, 10, 11, 14, 12, + 9, 8, 9, 12, 9, 11, 8, 12, 11, + 14, 10, 11, 12, 13, 10, 12, 15, 12, + 9, 7, 8, 12, 9, 12, 7, 11, 13, + 9, 6, 5, 11, 10, 11, 7, 6, 9, + 11, 4, 5, 7, 8, 8, 8, 7, 7, }, +}; +//@} + +/** + * Codes used for determining block type + */ +//@{ +#define AIC_MODE1_NUM 90 +#define AIC_MODE1_SIZE 9 +#define AIC_MODE1_BITS 7 + +static const uint8_t aic_mode1_vlc_codes[AIC_MODE1_NUM][AIC_MODE1_SIZE] = { + { 0x01, 0x01, 0x01, 0x11, 0x00, 0x09, 0x03, 0x10, 0x05,}, + { 0x09, 0x01, 0x01, 0x05, 0x11, 0x00, 0x03, 0x21, 0x20,}, + { 0x01, 0x01, 0x01, 0x11, 0x09, 0x10, 0x05, 0x00, 0x03,}, + { 0x01, 0x01, 0x00, 0x03, 0x21, 0x05, 0x09, 0x20, 0x11,}, + { 0x01, 0x09, 0x00, 0x29, 0x08, 0x15, 0x03, 0x0B, 0x28,}, + { 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02,}, + { 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x01, 0x09, 0x08,}, + { 0x01, 0x01, 0x01, 0x09, 0x01, 0x08, 0x00, 0x03, 0x05,}, + { 0x01, 0x01, 0x01, 0x00, 0x05, 0x11, 0x09, 0x10, 0x03,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x01, 0x01, 0x05, 0x01, 0x00, 0x03, 0x09, 0x08,}, + { 0x09, 0x01, 0x01, 0x05, 0x11, 0x00, 0x03, 0x21, 0x20,}, + { 0x01, 0x01, 0x01, 0x0D, 0x05, 0x04, 0x00, 0x07, 0x0C,}, + { 0x01, 0x01, 0x00, 0x05, 0x11, 0x03, 0x09, 0x21, 0x20,}, + { 0x05, 0x01, 0x01, 0x11, 0x00, 0x09, 0x03, 0x21, 0x20,}, + { 0x09, 0x01, 0x01, 0x00, 0x05, 0x01, 0x03, 0x11, 0x10,}, + { 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x03, 0x02,}, + { 0x01, 0x01, 0x01, 0x09, 0x00, 0x05, 0x01, 0x03, 0x08,}, + { 0x01, 0x01, 0x01, 0x09, 0x11, 0x05, 0x00, 0x10, 0x03,}, + { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x00, 0x01, 0x09, 0x08, 0x15, 0x14, 0x0B, 0x03,}, + { 0x0D, 0x01, 0x01, 0x05, 0x0C, 0x04, 0x01, 0x00, 0x07,}, + { 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x03, 0x01, 0x01,}, + { 0x05, 0x01, 0x01, 0x04, 0x19, 0x07, 0x18, 0x0D, 0x00,}, + { 0x11, 0x09, 0x01, 0x21, 0x05, 0x20, 0x01, 0x00, 0x03,}, + { 0x41, 0x01, 0x00, 0x05, 0x40, 0x03, 0x09, 0x21, 0x11,}, + { 0x29, 0x01, 0x00, 0x28, 0x09, 0x15, 0x03, 0x08, 0x0B,}, + { 0x01, 0x00, 0x01, 0x11, 0x09, 0x10, 0x05, 0x01, 0x03,}, + { 0x05, 0x01, 0x01, 0x04, 0x0D, 0x0C, 0x07, 0x00, 0x01,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x00, 0x03, 0x05, 0x11, 0x10, 0x25, 0x24, 0x13,}, + { 0x21, 0x01, 0x01, 0x00, 0x11, 0x03, 0x05, 0x20, 0x09,}, + { 0x01, 0x01, 0x01, 0x00, 0x09, 0x11, 0x10, 0x05, 0x03,}, + { 0x21, 0x05, 0x01, 0x01, 0x09, 0x00, 0x11, 0x20, 0x03,}, + { 0x05, 0x01, 0x00, 0x04, 0x01, 0x19, 0x07, 0x18, 0x0D,}, + { 0x11, 0x01, 0x00, 0x01, 0x09, 0x01, 0x03, 0x10, 0x05,}, + { 0x1D, 0x01, 0x05, 0x0D, 0x0C, 0x04, 0x00, 0x1C, 0x0F,}, + { 0x05, 0x19, 0x01, 0x04, 0x00, 0x18, 0x1B, 0x1A, 0x07,}, + { 0x09, 0x01, 0x00, 0x01, 0x05, 0x03, 0x11, 0x10, 0x01,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x00, 0x03, 0x41, 0x05, 0x40, 0x09, 0x11, 0x21,}, + { 0x05, 0x01, 0x01, 0x19, 0x04, 0x07, 0x00, 0x18, 0x0D,}, + { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x01, 0x00, 0x03,}, + { 0x01, 0x05, 0x00, 0x0D, 0x01, 0x04, 0x07, 0x19, 0x18,}, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, + { 0x31, 0x01, 0x05, 0x19, 0x04, 0x07, 0x00, 0x30, 0x0D,}, + { 0x01, 0x00, 0x03, 0x11, 0x01, 0x05, 0x01, 0x09, 0x10,}, + { 0x01, 0x05, 0x01, 0x11, 0x01, 0x10, 0x00, 0x03, 0x09,}, + { 0x01, 0x09, 0x00, 0x29, 0x03, 0x08, 0x28, 0x15, 0x0B,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x01, 0x00, 0x09, 0x15, 0x03, 0x08, 0x14, 0x0B,}, + { 0x11, 0x01, 0x01, 0x00, 0x09, 0x01, 0x03, 0x10, 0x05,}, + { 0x01, 0x00, 0x03, 0x25, 0x11, 0x05, 0x10, 0x24, 0x13,}, + { 0x11, 0x01, 0x00, 0x01, 0x09, 0x01, 0x05, 0x10, 0x03,}, + { 0x05, 0x01, 0x00, 0x0D, 0x0C, 0x04, 0x0F, 0x1D, 0x1C,}, + { 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02,}, + { 0x21, 0x01, 0x05, 0x09, 0x11, 0x00, 0x03, 0x41, 0x40,}, + { 0x05, 0x01, 0x00, 0x1D, 0x1C, 0x0D, 0x0C, 0x0F, 0x04,}, + { 0x05, 0x01, 0x00, 0x0D, 0x31, 0x04, 0x19, 0x30, 0x07,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x01, 0x00, 0x21, 0x05, 0x11, 0x03, 0x09, 0x20,}, + { 0x01, 0x01, 0x00, 0x11, 0x03, 0x05, 0x01, 0x09, 0x10,}, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, + { 0x05, 0x01, 0x04, 0x19, 0x07, 0x0D, 0x00, 0x31, 0x30,}, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, + { 0x05, 0x01, 0x01, 0x11, 0x09, 0x00, 0x03, 0x21, 0x20,}, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02,}, + { 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x01, 0x01, 0x02,}, + { 0x09, 0x01, 0x00, 0x29, 0x08, 0x15, 0x03, 0x28, 0x0B,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x00, 0x01, 0x03,}, + { 0x09, 0x01, 0x00, 0x29, 0x28, 0x15, 0x08, 0x03, 0x0B,}, + { 0x01, 0x00, 0x01, 0x11, 0x05, 0x10, 0x09, 0x01, 0x03,}, + { 0x05, 0x04, 0x01, 0x1D, 0x0D, 0x0C, 0x1C, 0x00, 0x0F,}, + { 0x09, 0x11, 0x01, 0x41, 0x00, 0x40, 0x05, 0x03, 0x21,}, + { 0x0D, 0x05, 0x01, 0x1D, 0x1C, 0x0C, 0x04, 0x00, 0x0F,}, + { 0x41, 0x09, 0x01, 0x40, 0x00, 0x11, 0x05, 0x03, 0x21,}, + { 0x01, 0x01, 0x01, 0x05, 0x01, 0x04, 0x00, 0x01, 0x03,}, + { 0x05, 0x04, 0x01, 0x0D, 0x01, 0x0C, 0x07, 0x01, 0x00,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, + + { 0x05, 0x04, 0x01, 0x07, 0x19, 0x31, 0x30, 0x0D, 0x00,}, + { 0x21, 0x01, 0x01, 0x00, 0x11, 0x09, 0x20, 0x05, 0x03,}, + { 0x05, 0x01, 0x01, 0x04, 0x07, 0x0D, 0x0C, 0x00, 0x01,}, + { 0x21, 0x09, 0x01, 0x00, 0x20, 0x05, 0x23, 0x22, 0x03,}, + { 0x31, 0x0D, 0x01, 0x19, 0x05, 0x30, 0x04, 0x07, 0x00,}, + { 0x31, 0x05, 0x01, 0x04, 0x19, 0x00, 0x0D, 0x30, 0x07,}, + { 0x31, 0x01, 0x00, 0x0D, 0x05, 0x19, 0x04, 0x30, 0x07,}, + { 0x01, 0x01, 0x01, 0x00, 0x01, 0x03, 0x02, 0x01, 0x01,}, + { 0x01, 0x00, 0x01, 0x01, 0x05, 0x09, 0x08, 0x03, 0x01,}, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}, +}; + +static const uint8_t aic_mode1_vlc_bits[AIC_MODE1_NUM][AIC_MODE1_SIZE] = { + { 1, 4, 2, 7, 4, 6, 4, 7, 5,}, + { 5, 1, 3, 4, 6, 3, 3, 7, 7,}, + { 1, 4, 2, 7, 6, 7, 5, 4, 4,}, + { 1, 3, 3, 3, 7, 4, 5, 7, 6,}, + { 2, 4, 2, 6, 4, 5, 2, 4, 6,}, + { 7, 2, 3, 4, 7, 1, 5, 7, 7,}, + { 5, 1, 3, 6, 5, 5, 2, 7, 7,}, + { 2, 5, 1, 7, 3, 7, 5, 5, 6,}, + { 2, 4, 1, 4, 5, 7, 6, 7, 4,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 2, 1, 3, 6, 5, 5, 5, 7, 7,}, + { 5, 1, 3, 4, 6, 3, 3, 7, 7,}, + { 4, 1, 2, 6, 5, 5, 4, 5, 6,}, + { 3, 1, 3, 4, 6, 3, 5, 7, 7,}, + { 4, 1, 3, 6, 3, 5, 3, 7, 7,}, + { 6, 1, 4, 4, 5, 2, 4, 7, 7,}, + { 7, 1, 5, 7, 4, 3, 2, 7, 7,}, + { 5, 3, 2, 7, 5, 6, 1, 5, 7,}, + { 4, 1, 2, 6, 7, 5, 4, 7, 4,}, + { 1, 0, 1, 0, 0, 0, 0, 0, 0,}, + + { 3, 3, 1, 5, 5, 6, 6, 5, 3,}, + { 6, 2, 1, 5, 6, 5, 4, 4, 5,}, + { 6, 4, 1, 7, 6, 7, 6, 3, 2,}, + { 4, 3, 1, 4, 6, 4, 6, 5, 3,}, + { 6, 5, 1, 7, 4, 7, 3, 3, 3,}, + { 7, 2, 2, 3, 7, 2, 4, 6, 5,}, + { 6, 2, 2, 6, 4, 5, 2, 4, 4,}, + { 4, 4, 1, 7, 6, 7, 5, 2, 4,}, + { 5, 4, 1, 5, 6, 6, 5, 4, 2,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 2, 2, 2, 3, 5, 5, 6, 6, 5,}, + { 7, 1, 3, 3, 6, 3, 4, 7, 5,}, + { 2, 4, 1, 4, 6, 7, 7, 5, 4,}, + { 7, 4, 3, 1, 5, 3, 6, 7, 3,}, + { 4, 3, 3, 4, 1, 6, 4, 6, 5,}, + { 7, 4, 4, 2, 6, 1, 4, 7, 5,}, + { 5, 2, 3, 4, 4, 3, 2, 5, 4,}, + { 3, 5, 2, 3, 2, 5, 5, 5, 3,}, + { 6, 4, 4, 2, 5, 4, 7, 7, 1,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 2, 2, 2, 7, 3, 7, 4, 5, 6,}, + { 4, 1, 3, 6, 4, 4, 3, 6, 5,}, + { 2, 4, 1, 7, 3, 7, 6, 6, 6,}, + { 3, 4, 3, 5, 1, 4, 4, 6, 6,}, + { 4, 5, 2, 7, 1, 7, 3, 7, 7,}, + { 6, 2, 3, 5, 3, 3, 2, 6, 4,}, + { 4, 4, 4, 7, 2, 5, 1, 6, 7,}, + { 4, 5, 2, 7, 1, 7, 4, 4, 6,}, + { 2, 4, 2, 6, 2, 4, 6, 5, 4,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 1, 3, 3, 5, 6, 3, 5, 6, 5,}, + { 7, 1, 4, 4, 6, 2, 4, 7, 5,}, + { 2, 2, 2, 6, 5, 3, 5, 6, 5,}, + { 7, 4, 4, 2, 6, 1, 5, 7, 4,}, + { 3, 2, 2, 4, 4, 3, 4, 5, 5,}, + { 7, 2, 5, 3, 7, 1, 4, 7, 7,}, + { 6, 2, 3, 4, 5, 2, 2, 7, 7,}, + { 3, 2, 2, 5, 5, 4, 4, 4, 3,}, + { 3, 2, 2, 4, 6, 3, 5, 6, 3,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 1, 3, 3, 7, 4, 6, 3, 5, 7,}, + { 4, 1, 4, 7, 4, 5, 2, 6, 7,}, + { 2, 4, 1, 7, 5, 7, 3, 7, 7,}, + { 3, 2, 3, 5, 3, 4, 2, 6, 6,}, + { 3, 5, 4, 7, 2, 7, 1, 7, 7,}, + { 4, 1, 3, 6, 5, 3, 3, 7, 7,}, + { 4, 2, 5, 7, 3, 7, 1, 7, 7,}, + { 7, 4, 1, 7, 3, 7, 2, 5, 7,}, + { 4, 2, 2, 6, 4, 5, 2, 6, 4,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 3, 4, 1, 7, 6, 7, 6, 2, 6,}, + { 4, 2, 2, 6, 6, 5, 4, 2, 4,}, + { 4, 4, 1, 7, 5, 7, 6, 2, 4,}, + { 3, 3, 2, 5, 4, 4, 5, 2, 4,}, + { 4, 5, 2, 7, 2, 7, 3, 2, 6,}, + { 4, 3, 2, 5, 5, 4, 3, 2, 4,}, + { 7, 4, 2, 7, 2, 5, 3, 2, 6,}, + { 4, 6, 2, 7, 3, 7, 6, 1, 6,}, + { 5, 5, 1, 6, 4, 6, 5, 2, 4,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, + + { 3, 3, 2, 3, 5, 6, 6, 4, 2,}, + { 7, 1, 3, 3, 6, 5, 7, 4, 3,}, + { 5, 4, 1, 5, 5, 6, 6, 4, 2,}, + { 6, 4, 2, 2, 6, 3, 6, 6, 2,}, + { 6, 4, 2, 5, 3, 6, 3, 3, 2,}, + { 6, 3, 2, 3, 5, 2, 4, 6, 3,}, + { 6, 2, 2, 4, 3, 5, 3, 6, 3,}, + { 7, 5, 1, 7, 4, 7, 7, 3, 2,}, + { 5, 5, 2, 3, 6, 7, 7, 5, 1,}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0,}, +}; + +//@} + +#define PBTYPE_ESCAPE 0xFF + +/** tables used for P-frame macroblock type decoding */ +//@{ +#define NUM_PTYPE_VLCS 7 +#define PTYPE_VLC_SIZE 8 +#define PTYPE_VLC_BITS 7 + +static const uint8_t ptype_vlc_codes[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE] = { + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x0D, 0x05, 0x01, 0x04, 0x01, 0x00, 0x07, 0x0C }, + { 0x09, 0x11, 0x01, 0x00, 0x05, 0x03, 0x21, 0x20 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 } +}; + +static const uint8_t ptype_vlc_bits[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE] = { + { 1, 2, 3, 6, 5, 4, 7, 7 }, + { 3, 1, 2, 7, 6, 5, 4, 7 }, + { 5, 4, 1, 4, 3, 3, 4, 5 }, + { 4, 5, 2, 2, 3, 2, 6, 6 }, + { 5, 6, 1, 4, 2, 3, 7, 7 }, + { 5, 6, 1, 4, 3, 2, 7, 7 }, + { 6, 3, 2, 7, 5, 4, 1, 7 } +}; + +static const uint8_t ptype_vlc_syms[PTYPE_VLC_SIZE] = { + 0, 1, 2, 3, 8, 9, 11, PBTYPE_ESCAPE +}; + +/** reverse of ptype_vlc_syms */ +static const uint8_t block_num_to_ptype_vlc_num[12] = { + 0, 1, 2, 3, 0, 0, 2, 0, 4, 5, 0, 6 +}; +//@} + +/** tables used for P-frame macroblock type decoding */ +//@{ +#define NUM_BTYPE_VLCS 6 +#define BTYPE_VLC_SIZE 7 +#define BTYPE_VLC_BITS 6 + +static const uint8_t btype_vlc_codes[NUM_BTYPE_VLCS][BTYPE_VLC_SIZE] = { + { 0x01, 0x05, 0x00, 0x03, 0x11, 0x09, 0x10 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x09, 0x01, 0x00, 0x01, 0x05, 0x03, 0x08 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 }, + { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00 } +}; + +static const uint8_t btype_vlc_bits[NUM_BTYPE_VLCS][PTYPE_VLC_SIZE] = { + { 2, 3, 2, 2, 5, 4, 5 }, + { 4, 1, 3, 2, 6, 5, 6 }, + { 6, 4, 1, 2, 5, 3, 6 }, + { 5, 3, 3, 1, 4, 3, 5 }, + { 6, 5, 3, 2, 4, 1, 6 }, + { 6, 5, 3, 1, 4, 2, 6 } +}; + +static const uint8_t btype_vlc_syms[BTYPE_VLC_SIZE] = { + 0, 1, 4, 5, 10, 7, PBTYPE_ESCAPE +}; + +/** reverse of btype_vlc_syms */ +static const uint8_t block_num_to_btype_vlc_num[12] = { + 0, 1, 0, 0, 2, 3, 0, 5, 0, 0, 4, 0 +}; +//@} +#endif /* AVCODEC_RV40VLC2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbc.h new file mode 100644 index 00000000..de9c8d9a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbc.h @@ -0,0 +1,118 @@ +/* + * Bluetooth low-complexity, subband codec (SBC) + * + * Copyright (C) 2017 Aurelien Jacobs + * Copyright (C) 2012-2014 Intel Corporation + * Copyright (C) 2008-2010 Nokia Corporation + * Copyright (C) 2004-2010 Marcel Holtmann + * Copyright (C) 2004-2005 Henryk Ploetz + * Copyright (C) 2005-2006 Brad Midgley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SBC common definitions for the encoder and decoder + */ + +#ifndef AVCODEC_SBC_H +#define AVCODEC_SBC_H + +#include "avcodec.h" +#include "libavutil/crc.h" + +#define MSBC_BLOCKS 15 + +/* sampling frequency */ +#define SBC_FREQ_16000 0x00 +#define SBC_FREQ_32000 0x01 +#define SBC_FREQ_44100 0x02 +#define SBC_FREQ_48000 0x03 + +/* blocks */ +#define SBC_BLK_4 0x00 +#define SBC_BLK_8 0x01 +#define SBC_BLK_12 0x02 +#define SBC_BLK_16 0x03 + +/* channel mode */ +#define SBC_MODE_MONO 0x00 +#define SBC_MODE_DUAL_CHANNEL 0x01 +#define SBC_MODE_STEREO 0x02 +#define SBC_MODE_JOINT_STEREO 0x03 + +/* allocation method */ +#define SBC_AM_LOUDNESS 0x00 +#define SBC_AM_SNR 0x01 + +/* subbands */ +#define SBC_SB_4 0x00 +#define SBC_SB_8 0x01 + +/* synchronisation words */ +#define SBC_SYNCWORD 0x9C +#define MSBC_SYNCWORD 0xAD + +/* extra bits of precision for the synthesis filter input data */ +#define SBCDEC_FIXED_EXTRA_BITS 2 + +/* + * Enforce 16 byte alignment for the data, which is supposed to be used + * with SIMD optimized code. + */ +#define SBC_ALIGN 16 + +/* This structure contains an unpacked SBC frame. + Yes, there is probably quite some unused space herein */ +struct sbc_frame { + uint8_t frequency; + uint8_t blocks; + enum { + MONO = SBC_MODE_MONO, + DUAL_CHANNEL = SBC_MODE_DUAL_CHANNEL, + STEREO = SBC_MODE_STEREO, + JOINT_STEREO = SBC_MODE_JOINT_STEREO + } mode; + uint8_t channels; + enum { + LOUDNESS = SBC_AM_LOUDNESS, + SNR = SBC_AM_SNR + } allocation; + uint8_t subbands; + uint8_t bitpool; + uint16_t codesize; + + /* bit number x set means joint stereo has been used in subband x */ + uint8_t joint; + + /* only the lower 4 bits of every element are to be used */ + DECLARE_ALIGNED(SBC_ALIGN, uint32_t, scale_factor)[2][8]; + + /* raw integer subband samples in the frame */ + DECLARE_ALIGNED(SBC_ALIGN, int32_t, sb_sample_f)[16][2][8]; + + /* modified subband samples */ + DECLARE_ALIGNED(SBC_ALIGN, int32_t, sb_sample)[16][2][8]; + + const AVCRC *crc_ctx; +}; + +uint8_t ff_sbc_crc8(const AVCRC *crc_ctx, const uint8_t *data, size_t len); +void ff_sbc_calculate_bits(const struct sbc_frame *frame, int (*bits)[8]); + +#endif /* AVCODEC_SBC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdec_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdec_data.h new file mode 100644 index 00000000..1b79d1de --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdec_data.h @@ -0,0 +1,44 @@ +/* + * Bluetooth low-complexity, subband codec (SBC) + * + * Copyright (C) 2017 Aurelien Jacobs + * Copyright (C) 2008-2010 Nokia Corporation + * Copyright (C) 2004-2010 Marcel Holtmann + * Copyright (C) 2004-2005 Henryk Ploetz + * Copyright (C) 2005-2006 Brad Midgley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SBC decoder tables + */ + +#ifndef AVCODEC_SBCDEC_DATA_H +#define AVCODEC_SBCDEC_DATA_H + +#include + +extern const int32_t ff_sbc_proto_4_40m0[]; +extern const int32_t ff_sbc_proto_4_40m1[]; +extern const int32_t ff_sbc_proto_8_80m0[]; +extern const int32_t ff_sbc_proto_8_80m1[]; +extern const int32_t ff_synmatrix4[8][4]; +extern const int32_t ff_synmatrix8[16][8]; + +#endif /* AVCODEC_SBCDEC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp.h new file mode 100644 index 00000000..334c058e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp.h @@ -0,0 +1,86 @@ +/* + * Bluetooth low-complexity, subband codec (SBC) + * + * Copyright (C) 2017 Aurelien Jacobs + * Copyright (C) 2008-2010 Nokia Corporation + * Copyright (C) 2004-2010 Marcel Holtmann + * Copyright (C) 2004-2005 Henryk Ploetz + * Copyright (C) 2005-2006 Brad Midgley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SBC basic "building bricks" + */ + +#ifndef AVCODEC_SBCDSP_H +#define AVCODEC_SBCDSP_H + +#include "sbc.h" +#include "sbcdsp_data.h" + +#define SCALE_OUT_BITS 15 +#define SBC_X_BUFFER_SIZE 328 + +typedef struct sbc_dsp_context SBCDSPContext; + +struct sbc_dsp_context { + int position; + /* Number of consecutive blocks handled by the encoder */ + uint8_t increment; + DECLARE_ALIGNED(SBC_ALIGN, int16_t, X)[2][SBC_X_BUFFER_SIZE]; + void (*sbc_analyze_4)(const int16_t *in, int32_t *out, const int16_t *consts); + void (*sbc_analyze_8)(const int16_t *in, int32_t *out, const int16_t *consts); + /* Polyphase analysis filter for 4 subbands configuration, + * it handles "increment" blocks at once */ + void (*sbc_analyze_4s)(SBCDSPContext *s, + int16_t *x, int32_t *out, int out_stride); + /* Polyphase analysis filter for 8 subbands configuration, + * it handles "increment" blocks at once */ + void (*sbc_analyze_8s)(SBCDSPContext *s, + int16_t *x, int32_t *out, int out_stride); + /* Process input data (deinterleave, endian conversion, reordering), + * depending on the number of subbands and input data byte order */ + int (*sbc_enc_process_input_4s)(int position, const uint8_t *pcm, + int16_t X[2][SBC_X_BUFFER_SIZE], + int nsamples, int nchannels); + int (*sbc_enc_process_input_8s)(int position, const uint8_t *pcm, + int16_t X[2][SBC_X_BUFFER_SIZE], + int nsamples, int nchannels); + /* Scale factors calculation */ + void (*sbc_calc_scalefactors)(int32_t sb_sample_f[16][2][8], + uint32_t scale_factor[2][8], + int blocks, int channels, int subbands); + /* Scale factors calculation with joint stereo support */ + int (*sbc_calc_scalefactors_j)(int32_t sb_sample_f[16][2][8], + uint32_t scale_factor[2][8], + int blocks, int subbands); +}; + +/* + * Initialize pointers to the functions which are the basic "building bricks" + * of SBC codec. Best implementation is selected based on target CPU + * capabilities. + */ +void ff_sbcdsp_init(SBCDSPContext *s); + +void ff_sbcdsp_init_arm(SBCDSPContext *s); +void ff_sbcdsp_init_x86(SBCDSPContext *s); + +#endif /* AVCODEC_SBCDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp_data.h new file mode 100644 index 00000000..10fad5ca --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbcdsp_data.h @@ -0,0 +1,55 @@ +/* + * Bluetooth low-complexity, subband codec (SBC) + * + * Copyright (C) 2017 Aurelien Jacobs + * Copyright (C) 2008-2010 Nokia Corporation + * Copyright (C) 2004-2010 Marcel Holtmann + * Copyright (C) 2004-2005 Henryk Ploetz + * Copyright (C) 2005-2006 Brad Midgley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * miscellaneous SBC tables + */ + +#ifndef AVCODEC_SBCDSP_DATA_H +#define AVCODEC_SBCDSP_DATA_H + +#include "sbc.h" + +#define SBC_PROTO_FIXED_SCALE 16 +#define SBC_COS_TABLE_FIXED_SCALE 15 + +/* + * Constant tables for the use in SIMD optimized analysis filters + * Each table consists of two parts: + * 1. reordered "proto" table + * 2. reordered "cos" table + * + * Due to non-symmetrical reordering, separate tables for "even" + * and "odd" cases are needed + */ + +extern const int16_t ff_sbcdsp_analysis_consts_fixed4_simd_even[]; +extern const int16_t ff_sbcdsp_analysis_consts_fixed4_simd_odd[]; +extern const int16_t ff_sbcdsp_analysis_consts_fixed8_simd_even[]; +extern const int16_t ff_sbcdsp_analysis_consts_fixed8_simd_odd[]; + +#endif /* AVCODEC_SBCDSP_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbr.h new file mode 100644 index 00000000..eb7d1aec --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbr.h @@ -0,0 +1,217 @@ +/* + * Spectral Band Replication definitions and structures + * Copyright (c) 2008-2009 Robert Swain ( rob opendot cl ) + * Copyright (c) 2010 Alex Converse + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Spectral Band Replication definitions and structures + * @author Robert Swain ( rob opendot cl ) + */ + +#ifndef AVCODEC_SBR_H +#define AVCODEC_SBR_H + +#include +#include "fft.h" +#include "aacps.h" +#include "sbrdsp.h" + +typedef struct AACContext AACContext; + +/** + * Spectral Band Replication header - spectrum parameters that invoke a reset if they differ from the previous header. + */ +typedef struct SpectrumParameters { + uint8_t bs_start_freq; + uint8_t bs_stop_freq; + uint8_t bs_xover_band; + + /** + * @name Variables associated with bs_header_extra_1 + * @{ + */ + uint8_t bs_freq_scale; + uint8_t bs_alter_scale; + uint8_t bs_noise_bands; + /** @} */ +} SpectrumParameters; + +#define SBR_SYNTHESIS_BUF_SIZE ((1280-128)*2) + +/** + * Spectral Band Replication per channel data + */ +typedef struct SBRData { + /** + * @name Main bitstream data variables + * @{ + */ + unsigned bs_frame_class; + unsigned bs_add_harmonic_flag; + AAC_SIGNE bs_num_env; + uint8_t bs_freq_res[7]; + AAC_SIGNE bs_num_noise; + uint8_t bs_df_env[5]; + uint8_t bs_df_noise[2]; + uint8_t bs_invf_mode[2][5]; + uint8_t bs_add_harmonic[48]; + unsigned bs_amp_res; + /** @} */ + + /** + * @name State variables + * @{ + */ + DECLARE_ALIGNED(32, INTFLOAT, synthesis_filterbank_samples)[SBR_SYNTHESIS_BUF_SIZE]; + DECLARE_ALIGNED(32, INTFLOAT, analysis_filterbank_samples) [1312]; + int synthesis_filterbank_samples_offset; + ///l_APrev and l_A + int e_a[2]; + ///Chirp factors + INTFLOAT bw_array[5]; + ///QMF values of the original signal + INTFLOAT W[2][32][32][2]; + ///QMF output of the HF adjustor + int Ypos; + DECLARE_ALIGNED(16, INTFLOAT, Y)[2][38][64][2]; + DECLARE_ALIGNED(16, AAC_FLOAT, g_temp)[42][48]; + AAC_FLOAT q_temp[42][48]; + uint8_t s_indexmapped[8][48]; + ///Envelope scalefactors + uint8_t env_facs_q[6][48]; + AAC_FLOAT env_facs[6][48]; + ///Noise scalefactors + uint8_t noise_facs_q[3][5]; + AAC_FLOAT noise_facs[3][5]; + ///Envelope time borders + uint8_t t_env[8]; + ///Envelope time border of the last envelope of the previous frame + uint8_t t_env_num_env_old; + ///Noise time borders + uint8_t t_q[3]; + unsigned f_indexnoise; + unsigned f_indexsine; + /** @} */ +} SBRData; + +typedef struct SpectralBandReplication SpectralBandReplication; + +/** + * aacsbr functions pointers + */ +typedef struct AACSBRContext { + int (*sbr_lf_gen)(AACContext *ac, SpectralBandReplication *sbr, + INTFLOAT X_low[32][40][2], const INTFLOAT W[2][32][32][2], + int buf_idx); + void (*sbr_hf_assemble)(INTFLOAT Y1[38][64][2], + const INTFLOAT X_high[64][40][2], + SpectralBandReplication *sbr, SBRData *ch_data, + const int e_a[2]); + int (*sbr_x_gen)(SpectralBandReplication *sbr, INTFLOAT X[2][38][64], + const INTFLOAT Y0[38][64][2], const INTFLOAT Y1[38][64][2], + const INTFLOAT X_low[32][40][2], int ch); + void (*sbr_hf_inverse_filter)(SBRDSPContext *dsp, + INTFLOAT (*alpha0)[2], INTFLOAT (*alpha1)[2], + const INTFLOAT X_low[32][40][2], int k0); +} AACSBRContext; + +/** + * Spectral Band Replication + */ +struct SpectralBandReplication { + int sample_rate; + int start; + int ready_for_dequant; + int id_aac; + int reset; + SpectrumParameters spectrum_params; + int bs_amp_res_header; + /** + * @name Variables associated with bs_header_extra_2 + * @{ + */ + unsigned bs_limiter_bands; + unsigned bs_limiter_gains; + unsigned bs_interpol_freq; + unsigned bs_smoothing_mode; + /** @} */ + unsigned bs_coupling; + AAC_SIGNE k[5]; ///< k0, k1, k2 + ///kx', and kx respectively, kx is the first QMF subband where SBR is used. + ///kx' is its value from the previous frame + AAC_SIGNE kx[2]; + ///M' and M respectively, M is the number of QMF subbands that use SBR. + AAC_SIGNE m[2]; + unsigned kx_and_m_pushed; + ///The number of frequency bands in f_master + AAC_SIGNE n_master; + SBRData data[2]; + PSContext ps; + ///N_Low and N_High respectively, the number of frequency bands for low and high resolution + AAC_SIGNE n[2]; + ///Number of noise floor bands + AAC_SIGNE n_q; + ///Number of limiter bands + AAC_SIGNE n_lim; + ///The master QMF frequency grouping + uint16_t f_master[49]; + ///Frequency borders for low resolution SBR + uint16_t f_tablelow[25]; + ///Frequency borders for high resolution SBR + uint16_t f_tablehigh[49]; + ///Frequency borders for noise floors + uint16_t f_tablenoise[6]; + ///Frequency borders for the limiter + uint16_t f_tablelim[30]; + AAC_SIGNE num_patches; + uint8_t patch_num_subbands[6]; + uint8_t patch_start_subband[6]; + ///QMF low frequency input to the HF generator + DECLARE_ALIGNED(16, INTFLOAT, X_low)[32][40][2]; + ///QMF output of the HF generator + DECLARE_ALIGNED(16, INTFLOAT, X_high)[64][40][2]; + ///QMF values of the reconstructed signal + DECLARE_ALIGNED(16, INTFLOAT, X)[2][2][38][64]; + ///Zeroth coefficient used to filter the subband signals + DECLARE_ALIGNED(16, INTFLOAT, alpha0)[64][2]; + ///First coefficient used to filter the subband signals + DECLARE_ALIGNED(16, INTFLOAT, alpha1)[64][2]; + ///Dequantized envelope scalefactors, remapped + AAC_FLOAT e_origmapped[7][48]; + ///Dequantized noise scalefactors, remapped + AAC_FLOAT q_mapped[7][48]; + ///Sinusoidal presence, remapped + uint8_t s_mapped[7][48]; + ///Estimated envelope + AAC_FLOAT e_curr[7][48]; + ///Amplitude adjusted noise scalefactors + AAC_FLOAT q_m[7][48]; + ///Sinusoidal levels + AAC_FLOAT s_m[7][48]; + AAC_FLOAT gain[7][48]; + DECLARE_ALIGNED(32, INTFLOAT, qmf_filter_scratch)[5][64]; + FFTContext mdct_ana; + FFTContext mdct; + SBRDSPContext dsp; + AACSBRContext c; +}; + +#endif /* AVCODEC_SBR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbrdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbrdsp.h new file mode 100644 index 00000000..e6fd76d8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sbrdsp.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2012 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SBRDSP_H +#define AVCODEC_SBRDSP_H + +#include +#include "aac_defines.h" +#include "libavutil/softfloat.h" + +typedef struct SBRDSPContext { + void (*sum64x5)(INTFLOAT *z); + AAC_FLOAT (*sum_square)(INTFLOAT (*x)[2], int n); + void (*neg_odd_64)(INTFLOAT *x); + void (*qmf_pre_shuffle)(INTFLOAT *z); + void (*qmf_post_shuffle)(INTFLOAT W[32][2], const INTFLOAT *z); + void (*qmf_deint_neg)(INTFLOAT *v, const INTFLOAT *src); + void (*qmf_deint_bfly)(INTFLOAT *v, const INTFLOAT *src0, const INTFLOAT *src1); + void (*autocorrelate)(const INTFLOAT x[40][2], AAC_FLOAT phi[3][2][2]); + void (*hf_gen)(INTFLOAT (*X_high)[2], const INTFLOAT (*X_low)[2], + const INTFLOAT alpha0[2], const INTFLOAT alpha1[2], + INTFLOAT bw, int start, int end); + void (*hf_g_filt)(INTFLOAT (*Y)[2], const INTFLOAT (*X_high)[40][2], + const AAC_FLOAT *g_filt, int m_max, intptr_t ixh); + void (*hf_apply_noise[4])(INTFLOAT (*Y)[2], const AAC_FLOAT *s_m, + const AAC_FLOAT *q_filt, int noise, + int kx, int m_max); +} SBRDSPContext; + +extern const INTFLOAT AAC_RENAME(ff_sbr_noise_table)[][2]; + +void AAC_RENAME(ff_sbrdsp_init)(SBRDSPContext *s); +void ff_sbrdsp_init_arm(SBRDSPContext *s); +void ff_sbrdsp_init_aarch64(SBRDSPContext *s); +void ff_sbrdsp_init_x86(SBRDSPContext *s); +void ff_sbrdsp_init_mips(SBRDSPContext *s); + +#endif /* AVCODEC_SBRDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr.h new file mode 100644 index 00000000..15cb87c4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr.h @@ -0,0 +1,365 @@ +/* + * ScreenPressor decoder + * + * Copyright (c) 2017 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SCPR_H +#define AVCODEC_SCPR_H + +#include +#include +#include + +#include "avcodec.h" +#include "bytestream.h" +#include "internal.h" +#include "scpr3.h" + +typedef struct RangeCoder { + uint32_t code; + uint32_t range; + uint32_t code1; +} RangeCoder; + +typedef struct PixelModel { + uint32_t freq[256]; + uint32_t lookup[16]; + uint32_t total_freq; +} PixelModel; + +typedef struct SCPRContext { + int version; + AVFrame *last_frame; + AVFrame *current_frame; + GetByteContext gb; + RangeCoder rc; + PixelModel pixel_model[3][4096]; + uint32_t op_model[6][7]; + uint32_t run_model[6][257]; + uint32_t range_model[257]; + uint32_t count_model[257]; + uint32_t fill_model[6]; + uint32_t sxy_model[4][17]; + uint32_t mv_model[2][513]; + uint32_t nbx, nby; + uint32_t nbcount; + uint32_t *blocks; + uint32_t cbits; + int cxshift; + + PixelModel3 pixel_model3[3][4096]; + RunModel3 run_model3[6]; + RunModel3 range_model3; + RunModel3 count_model3; + FillModel3 fill_model3; + SxyModel3 sxy_model3[4]; + MVModel3 mv_model3[2]; + OpModel3 op_model3[6]; + + int (*get_freq)(RangeCoder *rc, uint32_t total_freq, uint32_t *freq); + int (*decode)(GetByteContext *gb, RangeCoder *rc, uint32_t cumFreq, uint32_t freq, uint32_t total_freq); +} SCPRContext; + +static int decode_run_i(AVCodecContext *avctx, uint32_t ptype, int run, + int *px, int *py, uint32_t clr, uint32_t *dst, + int linesize, uint32_t *plx, uint32_t *ply, + uint32_t backstep, int off, int *cx, int *cx1) +{ + uint32_t r, g, b; + int z; + int x = *px, + y = *py; + uint32_t lx = *plx, + ly = *ply; + + if (y >= avctx->height) + return AVERROR_INVALIDDATA; + + switch (ptype) { + case 0: + while (run-- > 0) { + dst[y * linesize + x] = clr; + lx = x; + ly = y; + (x)++; + if (x >= avctx->width) { + x = 0; + (y)++; + if (y >= avctx->height && run) + return AVERROR_INVALIDDATA; + } + } + break; + case 1: + while (run-- > 0) { + dst[y * linesize + x] = dst[ly * linesize + lx]; + lx = x; + ly = y; + (x)++; + if (x >= avctx->width) { + x = 0; + (y)++; + if (y >= avctx->height && run) + return AVERROR_INVALIDDATA; + } + } + clr = dst[ly * linesize + lx]; + break; + case 2: + if (y < 1) + return AVERROR_INVALIDDATA; + + while (run-- > 0) { + clr = dst[y * linesize + x + off + 1]; + dst[y * linesize + x] = clr; + lx = x; + ly = y; + (x)++; + if (x >= avctx->width) { + x = 0; + (y)++; + if (y >= avctx->height && run) + return AVERROR_INVALIDDATA; + } + } + break; + case 4: + if (y < 1 || (y == 1 && x == 0)) + return AVERROR_INVALIDDATA; + + while (run-- > 0) { + uint8_t *odst = (uint8_t *)dst; + int off1 = (ly * linesize + lx) * 4; + int off2 = ((y * linesize + x) + off) * 4; + + if (x == 0) { + z = backstep * 4; + } else { + z = 0; + } + + r = odst[off1] + + odst[off2 + 4] - + odst[off2 - z ]; + g = odst[off1 + 1] + + odst[off2 + 5] - + odst[off2 - z + 1]; + b = odst[off1 + 2] + + odst[off2 + 6] - + odst[off2 - z + 2]; + clr = ((b & 0xFF) << 16) + ((g & 0xFF) << 8) + (r & 0xFF); + dst[y * linesize + x] = clr; + lx = x; + ly = y; + (x)++; + if (x >= avctx->width) { + x = 0; + (y)++; + if (y >= avctx->height && run) + return AVERROR_INVALIDDATA; + } + } + break; + case 5: + if (y < 1 || (y == 1 && x == 0)) + return AVERROR_INVALIDDATA; + + while (run-- > 0) { + if (x == 0) { + z = backstep; + } else { + z = 0; + } + + clr = dst[y * linesize + x + off - z]; + dst[y * linesize + x] = clr; + lx = x; + ly = y; + (x)++; + if (x >= avctx->width) { + x = 0; + (y)++; + if (y >= avctx->height && run) + return AVERROR_INVALIDDATA; + } + } + break; + } + + *px = x; + *py = y; + *plx= lx; + *ply= ly; + + if (avctx->bits_per_coded_sample == 16) { + *cx1 = (clr & 0x3F00) >> 2; + *cx = (clr & 0x3FFFFF) >> 16; + } else { + *cx1 = (clr & 0xFC00) >> 4; + *cx = (clr & 0xFFFFFF) >> 18; + } + + return 0; +} + +static int decode_run_p(AVCodecContext *avctx, uint32_t ptype, int run, + int x, int y, uint32_t clr, + uint32_t *dst, uint32_t *prev, + int linesize, int plinesize, + uint32_t *bx, uint32_t *by, + uint32_t backstep, int sx1, int sx2, + int *cx, int *cx1) +{ + uint32_t r, g, b; + int z; + + switch (ptype) { + case 0: + while (run-- > 0) { + if (*by >= avctx->height) + return AVERROR_INVALIDDATA; + + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + case 1: + while (run-- > 0) { + if (*bx == 0) { + if (*by < 1) + return AVERROR_INVALIDDATA; + z = backstep; + } else { + z = 0; + } + + if (*by >= avctx->height) + return AVERROR_INVALIDDATA; + + clr = dst[*by * linesize + *bx - 1 - z]; + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + case 2: + while (run-- > 0) { + if (*by < 1 || *by >= avctx->height) + return AVERROR_INVALIDDATA; + + clr = dst[(*by - 1) * linesize + *bx]; + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + case 3: + while (run-- > 0) { + if (*by >= avctx->height) + return AVERROR_INVALIDDATA; + + clr = prev[*by * plinesize + *bx]; + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + case 4: + while (run-- > 0) { + uint8_t *odst = (uint8_t *)dst; + + if (*by < 1 || *by >= avctx->height) + return AVERROR_INVALIDDATA; + + if (*bx == 0) { + if (*by < 2) + return AVERROR_INVALIDDATA; + z = backstep; + } else { + z = 0; + } + + r = odst[((*by - 1) * linesize + *bx) * 4] + + odst[(*by * linesize + *bx - 1 - z) * 4] - + odst[((*by - 1) * linesize + *bx - 1 - z) * 4]; + g = odst[((*by - 1) * linesize + *bx) * 4 + 1] + + odst[(*by * linesize + *bx - 1 - z) * 4 + 1] - + odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 1]; + b = odst[((*by - 1) * linesize + *bx) * 4 + 2] + + odst[(*by * linesize + *bx - 1 - z) * 4 + 2] - + odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 2]; + clr = ((b & 0xFF) << 16) + ((g & 0xFF) << 8) + (r & 0xFF); + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + case 5: + while (run-- > 0) { + if (*by < 1 || *by >= avctx->height) + return AVERROR_INVALIDDATA; + + if (*bx == 0) { + if (*by < 2) + return AVERROR_INVALIDDATA; + z = backstep; + } else { + z = 0; + } + + clr = dst[(*by - 1) * linesize + *bx - 1 - z]; + dst[*by * linesize + *bx] = clr; + (*bx)++; + if (*bx >= x * 16 + sx2 || *bx >= avctx->width) { + *bx = x * 16 + sx1; + (*by)++; + } + } + break; + } + + if (avctx->bits_per_coded_sample == 16) { + *cx1 = (clr & 0x3F00) >> 2; + *cx = (clr & 0x3FFFFF) >> 16; + } else { + *cx1 = (clr & 0xFC00) >> 4; + *cx = (clr & 0xFFFFFF) >> 18; + } + + return 0; +} + +#endif /* AVCODEC_SCPR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr3.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr3.h new file mode 100644 index 00000000..92ad9688 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/scpr3.h @@ -0,0 +1,82 @@ +/* + * ScreenPressor version 3 decoder + * + * Copyright (c) 2017 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SCPR3_H +#define AVCODEC_SCPR3_H + +#include +#include +#include + +#include "avcodec.h" +#include "internal.h" + +typedef struct PixelModel3 { + uint8_t type; + uint8_t length; + uint8_t maxpos; + uint8_t fshift; + uint16_t size; + uint32_t cntsum; + uint8_t symbols[256]; + uint16_t freqs[256]; + uint16_t freqs1[256]; + uint16_t cnts[256]; + uint8_t dectab[32]; +} PixelModel3; + +typedef struct FillModel3 { + uint32_t cntsum; + uint16_t freqs[2][5]; + uint16_t cnts[5]; + uint8_t dectab[32]; +} FillModel3; + +typedef struct OpModel3 { + uint32_t cntsum; + uint16_t freqs[2][6]; + uint16_t cnts[6]; + uint8_t dectab[32]; +} OpModel3; + +typedef struct RunModel3 { + uint32_t cntsum; + uint16_t freqs[2][256]; + uint16_t cnts[256]; + uint8_t dectab[32]; +} RunModel3; + +typedef struct SxyModel3 { + uint32_t cntsum; + uint16_t freqs[2][16]; + uint16_t cnts[16]; + uint8_t dectab[32]; +} SxyModel3; + +typedef struct MVModel3 { + uint32_t cntsum; + uint16_t freqs[2][512]; + uint16_t cnts[512]; + uint8_t dectab[32]; +} MVModel3; + +#endif /* AVCODEC_SCPR3_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sgi.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sgi.h new file mode 100644 index 00000000..5ec891e4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sgi.h @@ -0,0 +1,36 @@ +/* + * SGI image encoder + * Xiaohui Sun + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SGI_H +#define AVCODEC_SGI_H + +/** + * SGI image file signature + */ +#define SGI_MAGIC 474 + +#define SGI_HEADER_SIZE 512 + +#define SGI_GRAYSCALE 1 +#define SGI_RGB 3 +#define SGI_RGBA 4 + +#endif /* AVCODEC_SGI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sheervideodata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sheervideodata.h new file mode 100644 index 00000000..3b6e2f65 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sheervideodata.h @@ -0,0 +1,1097 @@ +/* + * BitJazz SheerVideo decoder + * Copyright (c) 2016 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SHEERVIDEODATA_H +#define AVCODEC_SHEERVIDEODATA_H + +#include "libavutil/common.h" + +static const uint8_t l_r_rgb[256] = { + 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, +}; + +static const uint8_t l_r_rgbi[256] = { + 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, + 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 4, 4, 4, +}; + +static const uint8_t l_g_rgbi[256] = { + 1, 3, 4, 5, 6, 7, 7, 8, 9, 9, 10, 10, 10, 10, 11, 11, + 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, + 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, + 11, 11, 11, 10, 10, 10, 9, 9, 9, 8, 8, 7, 6, 5, 5, 3, +}; + +static const uint8_t l_g_rgb[256] = { + 2, 2, 4, 4, 6, 7, 9, 9, 10, 11, 11, 11, 12, 12, 12, 13, + 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 12, 12, 12, 11, 11, 11, 10, 9, 9, 8, 6, 4, 3, 3, +}; + +static const uint8_t l_y_ybr[256] = { + 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 4, 4, 3, +}; + +static const uint8_t l_u_ybr[256] = { + 1, 2, 4, 6, 9, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 8, 5, 3, +}; + +static const uint8_t l_y_ybyr[256] = { + 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, + 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, +}; + +static const uint8_t l_u_ybyr[256] = { + 1, 2, 4, 6, 8, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 14, 14, + 14, 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 9, 8, 7, 6, 3, +}; + +static const uint8_t l_y_byry[256] = { + 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 4, 4, 3, +}; + +static const uint8_t l_u_byry[256] = { + 1, 2, 4, 6, 8, 9, 9, 10, 11, 11, 12, 12, 13, 13, 13, 14, + 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 14, + 14, 14, 14, 13, 13, 12, 12, 12, 11, 11, 10, 9, 8, 7, 6, 3, +}; + +static const uint8_t l_y_ybr10i[1024] = { + 3, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, +}; + +static const uint8_t l_y_ybr10[1024] = { + 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, +}; + +static const uint8_t l_u_ybr10i[1024] = { + 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, + 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 6, 5, 5, 4, 4, 3, +}; + +static const uint8_t l_u_ybr10[1024] = { + 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 10, 10, 11, 11, + 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, 12, + 12, 11, 11, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 4, 3, +}; + +static const uint8_t l_r_rgbx[1024] = { + 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, +}; + +static const uint8_t l_g_rgbx[1024] = { + 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, + 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, + 12, 12, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, + 8, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, +}; + +static const uint8_t l_y_yry10[1024] = { + 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, + 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, +}; + +static const uint8_t l_y_yry10i[1024] = { + 3, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, +}; + +static const uint8_t l_u_yry10[1024] = { + 2, 3, 3, 4, 5, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 10, 10, 10, 10, 9, 9, 9, 8, 8, 7, 7, 6, 5, 4, 4, 3, +}; + +static const uint8_t l_u_yry10i[1024] = { + 2, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, + 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 9, 9, 9, + 9, 9, 8, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, +}; + +static const uint8_t l_y_ybri[256] = { + 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 3, +}; + +static const uint8_t l_u_ybri[256] = { + 1, 3, 5, 6, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, + 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, + 14, 13, 13, 13, 12, 12, 11, 11, 10, 10, 9, 8, 8, 6, 5, 2, +}; + +static const uint8_t l_y_byryi[256] = { + 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, + 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 8, 8, + 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 6, 5, 4, 4, 3, +}; + +static const uint8_t l_u_byryi[256] = { + 1, 3, 4, 6, 6, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, 15, 15, + 15, 15, 15, 15, 14, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, + 12, 11, 11, 11, 10, 10, 10, 9, 9, 8, 8, 7, 7, 5, 4, 3, +}; + +static const uint8_t l_r_rgbxi[1024] = { + 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, + 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 5, 5, 4, 4, 4, +}; + +static const uint8_t l_g_rgbxi[1024] = { + 2, 3, 4, 4, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, + 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, + 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, + 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 6, 6, 4, 4, 3, +}; + +#endif /* AVCODEC_SHEERVIDEODATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/simple_idct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/simple_idct.h new file mode 100644 index 00000000..20578b33 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/simple_idct.h @@ -0,0 +1,64 @@ +/* + * Simple IDCT + * + * Copyright (c) 2001 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * simple idct header. + */ + +#ifndef AVCODEC_SIMPLE_IDCT_H +#define AVCODEC_SIMPLE_IDCT_H + +#include +#include + +void ff_simple_idct_put_int16_8bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_int16_8bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_int16_8bit(int16_t *block); + +void ff_simple_idct_put_int16_10bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_int16_10bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_int16_10bit(int16_t *block); + +void ff_simple_idct_put_int32_10bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_int32_10bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_int32_10bit(int16_t *block); + +void ff_simple_idct_put_int16_12bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_add_int16_12bit(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_int16_12bit(int16_t *block); + +/** + * Special version of ff_simple_idct_int16_10bit() which does dequantization + * and scales by a factor of 2 more between the two IDCTs to account + * for larger scale of input coefficients. + */ +void ff_prores_idct_10(int16_t *block, const int16_t *qmat); +void ff_prores_idct_12(int16_t *block, const int16_t *qmat); + +void ff_simple_idct248_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct84_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct48_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct44_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +#endif /* AVCODEC_SIMPLE_IDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin.h new file mode 100644 index 00000000..329e9bb5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2008 Robert Swain + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SINEWIN_H +#define AVCODEC_SINEWIN_H + +#include "config.h" +#include "libavutil/mem.h" +#include "libavcodec/aac_defines.h" + +#if CONFIG_HARDCODED_TABLES +# define SINETABLE_CONST const +#else +# define SINETABLE_CONST +#endif + +#ifndef USE_FIXED +#define USE_FIXED 0 +#endif + +#define SINETABLE(size) \ + SINETABLE_CONST DECLARE_ALIGNED(32, INTFLOAT, AAC_RENAME(ff_sine_##size))[size] + +#define SINETABLE120960(size) \ + DECLARE_ALIGNED(32, INTFLOAT, AAC_RENAME(ff_sine_##size))[size] + +/** + * Generate a sine window. + * @param window pointer to half window + * @param n size of half window + */ +void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n); + +/** + * initialize the specified entry of ff_sine_windows + */ +void AAC_RENAME(ff_init_ff_sine_windows)(int index); + +extern SINETABLE( 32); +extern SINETABLE( 64); +extern SINETABLE120960(120); +extern SINETABLE( 128); +extern SINETABLE( 256); +extern SINETABLE( 512); +extern SINETABLE120960(960); +extern SINETABLE(1024); +extern SINETABLE(2048); +extern SINETABLE(4096); +extern SINETABLE(8192); + +extern SINETABLE_CONST INTFLOAT * const AAC_RENAME(ff_sine_windows)[16]; + +#endif /* AVCODEC_SINEWIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin_tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin_tablegen.h new file mode 100644 index 00000000..dc52234e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sinewin_tablegen.h @@ -0,0 +1,83 @@ +/* + * Header file for hardcoded sine windows + * + * Copyright (c) 2009 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SINEWIN_TABLEGEN_H +#define AVCODEC_SINEWIN_TABLEGEN_H + +#include +// do not use libavutil/libm.h since this is compiled both +// for the host and the target and config.h is only valid for the target +#include +#include "libavcodec/aac_defines.h" +#include "libavutil/attributes.h" +#include "libavutil/common.h" + +#if !USE_FIXED +SINETABLE120960(120); +SINETABLE120960(960); +#endif +#if !CONFIG_HARDCODED_TABLES +SINETABLE( 32); +SINETABLE( 64); +SINETABLE( 128); +SINETABLE( 256); +SINETABLE( 512); +SINETABLE(1024); +SINETABLE(2048); +SINETABLE(4096); +SINETABLE(8192); +#else +#if USE_FIXED +#include "libavcodec/sinewin_fixed_tables.h" +#else +#include "libavcodec/sinewin_tables.h" +#endif +#endif + +#if USE_FIXED +#define SIN_FIX(a) (int)floor((a) * 0x80000000 + 0.5) +#else +#define SIN_FIX(a) a +#endif + +SINETABLE_CONST INTFLOAT * const AAC_RENAME(ff_sine_windows)[] = { + NULL, NULL, NULL, NULL, NULL, // unused + AAC_RENAME(ff_sine_32) , AAC_RENAME(ff_sine_64), AAC_RENAME(ff_sine_128), + AAC_RENAME(ff_sine_256), AAC_RENAME(ff_sine_512), AAC_RENAME(ff_sine_1024), + AAC_RENAME(ff_sine_2048), AAC_RENAME(ff_sine_4096), AAC_RENAME(ff_sine_8192), +}; + +// Generate a sine window. +av_cold void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n) { + int i; + for(i = 0; i < n; i++) + window[i] = SIN_FIX(sinf((i + 0.5) * (M_PI / (2.0 * n)))); +} + +av_cold void AAC_RENAME(ff_init_ff_sine_windows)(int index) { + assert(index >= 0 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows))); +#if !CONFIG_HARDCODED_TABLES + AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index); +#endif +} + +#endif /* AVCODEC_SINEWIN_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr.h new file mode 100644 index 00000000..34f7f994 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr.h @@ -0,0 +1,109 @@ +/* + * SIPR / ACELP.NET decoder + * + * Copyright (c) 2008 Vladimir Voroshilov + * Copyright (c) 2009 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SIPR_H +#define AVCODEC_SIPR_H + +#include "avcodec.h" +#include "acelp_pitch_delay.h" +#include "libavutil/mem.h" + +#define LP_FILTER_ORDER_16k 16 +#define L_SUBFR_16k 80 +#define PITCH_MIN 30 +#define PITCH_MAX 281 + +#define LSFQ_DIFF_MIN (0.0125 * M_PI) + +#define LP_FILTER_ORDER 10 + +/** Number of past samples needed for excitation interpolation */ +#define L_INTERPOL (LP_FILTER_ORDER + 1) + +/** Subframe size for all modes except 16k */ +#define SUBFR_SIZE 48 + +#define SUBFRAME_COUNT_16k 2 + +typedef enum { + MODE_16k, + MODE_8k5, + MODE_6k5, + MODE_5k0, + MODE_COUNT +} SiprMode; + +typedef struct SiprParameters { + int ma_pred_switch; ///< switched moving average predictor + int vq_indexes[5]; + int pitch_delay[5]; ///< pitch delay + int gp_index[5]; ///< adaptive-codebook gain indexes + int16_t fc_indexes[5][10]; ///< fixed-codebook indexes + int gc_index[5]; ///< fixed-codebook gain indexes +} SiprParameters; + +typedef struct SiprContext { + AVCodecContext *avctx; + + SiprMode mode; + + float past_pitch_gain; + float lsf_history[LP_FILTER_ORDER_16k]; + + float excitation[L_INTERPOL + PITCH_MAX + 2 * L_SUBFR_16k]; + + DECLARE_ALIGNED(16, float, synth_buf)[LP_FILTER_ORDER + 5*SUBFR_SIZE + 6]; + + float lsp_history[LP_FILTER_ORDER]; + float gain_mem; + float energy_history[4]; + float highpass_filt_mem[2]; + float postfilter_mem[PITCH_DELAY_MAX + LP_FILTER_ORDER]; + + /* 5k0 */ + float tilt_mem; + float postfilter_agc; + float postfilter_mem5k0[PITCH_DELAY_MAX + LP_FILTER_ORDER]; + float postfilter_syn5k0[LP_FILTER_ORDER + SUBFR_SIZE*5]; + + /* 16k */ + int pitch_lag_prev; + float iir_mem[LP_FILTER_ORDER_16k+1]; + float filt_buf[2][LP_FILTER_ORDER_16k+1]; + float *filt_mem[2]; + float mem_preemph[LP_FILTER_ORDER_16k]; + float synth[LP_FILTER_ORDER_16k]; + double lsp_history_16k[16]; + + void (*decode_frame)(struct SiprContext *ctx, SiprParameters *params, + float *out_data); +} SiprContext; + +extern const float ff_pow_0_5[16]; + +void ff_sipr_init_16k(SiprContext *ctx); + +void ff_sipr_decode_frame_16k(SiprContext *ctx, SiprParameters *params, + float *out_data); + +#endif /* AVCODEC_SIPR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr16kdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr16kdata.h new file mode 100644 index 00000000..16a653da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sipr16kdata.h @@ -0,0 +1,533 @@ +/* + * SIPR decoder for the 16k mode + * + * Copyright (c) 2008 Vladimir Voroshilov + * Copyright (c) 2009 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SIPR16KDATA_H +#define AVCODEC_SIPR16KDATA_H + +static const float pred_16k[2] = {0.8, 0.6}; +static const float qu[2] = { 0.12, 0.5}; + +static const float gain_cb_16k[32] = { + 0.07499, 0.10593, 0.14125, 0.18836, + 0.23714, 0.28184, 0.32734, 0.37584, + 0.42170, 0.47315, 0.53088, 0.59566, + 0.66834, 0.74989, 0.84140, 0.94406, + 1.05925, 1.18850, 1.33352, 1.49624, + 1.67880, 1.88365, 2.11349, 2.37137, + 2.66073, 3.05492, 3.54813, 4.21697, + 5.30884, 7.07946, 9.44061, 13.33521, +}; + +static const float gain_pitch_cb_16k[16] = { + 0.00, 0.2, 0.40, 0.5, 0.60, 0.7, 0.75, 0.8, + 0.85, 0.9, 0.95, 1.0, 1.05, 1.1, 1.15, 1.2, +}; + + +static const float mean_lsf_16k[16] = { + 0.131554, 0.246615, 0.435896, 0.644419, + 0.827810, 1.017876, 1.198910, 1.379159, + 1.562157, 1.736908, 1.940719, 2.131963, + 2.347162, 2.521521, 2.717870, 2.847068 +}; + +/** + * Hamming windowed sinc function, like in AMR + */ +static const float sinc_win[40] = { + 0.874475, 0.755101, 0.455962, 0.118807, -0.114223, -0.176778, + -0.101923, 0.015553, 0.086555, 0.078193, 0.018660, -0.037513, + -0.052733, -0.027459, 0.009967, 0.030278, 0.024050, 0.003055, + -0.013862, -0.016162, -0.006725, 0.004212, 0.008634, 0.005721, + -0.000000, -0.003710, -0.003690, -0.001228, 0.001409, 0.002610, +}; + +static const float lsf_cb1_16k[128][3] = { + {-0.089990, -0.172485, -0.203391}, {-0.094710, -0.178687, -0.134483}, + {-0.056398, -0.131952, -0.154500}, {-0.051362, -0.128138, -0.198549}, + {-0.061700, -0.142830, -0.251623}, {-0.041512, -0.115637, -0.229420}, + {-0.036544, -0.107512, -0.173125}, {-0.024158, -0.088450, -0.204144}, + {-0.038690, -0.103368, -0.132674}, {-0.056954, -0.128472, -0.104669}, + {-0.020963, -0.076785, -0.163199}, {-0.012952, -0.077249, -0.128385}, + {-0.032787, -0.097044, -0.093967}, {-0.035214, -0.053838, -0.111940}, + {-0.013850, -0.036926, -0.139328}, {-0.004956, -0.065092, -0.087709}, + {-0.065354, -0.065595, -0.079064}, {-0.023627, -0.081457, -0.054195}, + {-0.027335, -0.035244, -0.068034}, { 0.016555, -0.047075, -0.128286}, + { 0.021066, -0.037252, -0.092041}, { 0.014681, -0.043044, -0.057739}, + {-0.008493, -0.008143, -0.102486}, {-0.002303, -0.061540, -0.022952}, + {-0.006061, -0.014278, -0.033652}, {-0.005276, 0.011246, -0.062762}, + { 0.043411, -0.006303, -0.063730}, { 0.035885, -0.010052, -0.115290}, + { 0.030628, -0.031538, -0.017807}, { 0.022345, 0.028210, -0.032335}, + { 0.026535, 0.027536, -0.091150}, {-0.003365, -0.008077, 0.015687}, + {-0.026013, 0.017493, -0.010355}, { 0.059069, 0.010634, -0.007530}, + { 0.044038, -0.019424, 0.030453}, {-0.036065, -0.034215, -0.007758}, + { 0.022486, 0.042543, 0.027870}, {-0.049985, -0.016085, 0.021768}, + {-0.021715, 0.021168, 0.052076}, {-0.004243, -0.061228, 0.027640}, + {-0.033950, -0.017287, 0.064656}, { 0.016151, 0.000727, 0.062757}, + {-0.063456, -0.043152, 0.056707}, {-0.067715, 0.006126, 0.058178}, + {-0.038931, 0.051673, 0.030636}, {-0.073017, -0.074716, 0.026387}, + {-0.039893, -0.104629, 0.039616}, {-0.073179, -0.074601, 0.082069}, + {-0.066154, -0.027180, 0.099439}, {-0.075167, -0.121149, 0.071938}, + {-0.030382, -0.092582, 0.091067}, {-0.084519, -0.137542, 0.023626}, + {-0.060956, -0.121259, -0.015264}, {-0.030069, -0.093823, -0.008692}, + {-0.063564, -0.065225, -0.025820}, {-0.052074, -0.117595, -0.059689}, + {-0.091652, -0.165173, -0.045573}, {-0.070167, -0.121342, 0.131707}, + {-0.061024, -0.005833, -0.051035}, { 0.007837, -0.051816, 0.074575}, + {-0.070643, -0.053927, 0.149498}, {-0.014358, -0.066681, 0.139708}, + {-0.058186, 0.029576, 0.092923}, {-0.023371, 0.007058, 0.112484}, + {-0.057969, 0.022786, 0.148420}, { 0.029439, -0.017673, 0.121423}, + {-0.015811, 0.056785, 0.091594}, { 0.004347, 0.056680, 0.137848}, + {-0.004464, 0.002342, 0.184013}, { 0.029660, 0.046870, 0.082654}, + { 0.059408, 0.001016, 0.086063}, { 0.055263, 0.027574, 0.155037}, + { 0.062166, 0.064323, 0.117371}, { 0.022967, 0.100050, 0.077227}, + { 0.041795, 0.096343, 0.170421}, { 0.053189, 0.122931, 0.118549}, + { 0.094247, 0.094448, 0.078395}, { 0.082407, 0.033408, 0.041085}, + { 0.096820, 0.115960, 0.149433}, { 0.067804, 0.121849, 0.025336}, + {-0.008421, 0.104316, 0.032314}, { 0.031013, 0.073218, -0.004899}, + { 0.085079, 0.060323, -0.009687}, { 0.028174, 0.092766, -0.055590}, + { 0.070133, 0.039160, -0.061035}, {-0.039211, 0.072517, -0.028756}, + { 0.129686, 0.100233, -0.046998}, { 0.154189, 0.107616, 0.022791}, + {-0.049331, 0.094184, 0.087984}, {-0.013179, 0.126552, 0.125099}, + {-0.058716, 0.098524, 0.150886}, {-0.022753, 0.080011, 0.191127}, + { 0.013451, 0.164593, 0.153768}, { 0.074818, 0.181214, 0.108211}, + { 0.091323, 0.169249, 0.168460}, { 0.033885, 0.155516, 0.213745}, + {-0.032128, 0.227238, 0.135815}, {-0.059176, 0.168980, 0.229110}, + { 0.033917, 0.229753, 0.222264}, { 0.082702, 0.116370, 0.224697}, + { 0.127737, 0.186658, 0.212783}, { 0.047528, 0.063920, 0.216856}, + {-0.002446, 0.114174, 0.263289}, {-0.077783, 0.082523, 0.249697}, + { 0.010023, 0.024267, 0.256874}, { 0.053190, 0.111422, 0.310407}, + {-0.078804, 0.004444, 0.224078}, {-0.055253, -0.059180, 0.217892}, + {-0.065371, 0.008124, 0.333405}, {-0.076188, -0.098767, 0.286983}, + {-0.071911, -0.115804, 0.198031}, {-0.062473, 0.183639, 0.370162}, + {-0.042666, 0.255210, 0.262720}, { 0.011999, 0.217530, 0.318291}, + {-0.042144, 0.322087, 0.326387}, { 0.090663, 0.205835, 0.294784}, + { 0.058218, 0.293649, 0.277927}, { 0.157506, 0.282870, 0.294610}, + { 0.118248, 0.261007, 0.148614}, { 0.065261, 0.332362, 0.411912}, + { 0.141269, 0.451850, 0.315726}, { 0.001706, 0.456301, 0.357590}, + {-0.052947, 0.356559, 0.456944}, { 0.247707, 0.263837, 0.152591}, + { 0.306847, 0.417373, 0.258553}, { 0.166347, 0.149222, 0.118973}, + { 0.379709, 0.292172, 0.139875}, { 0.010171, -0.055170, -0.174523} +}; + +static const float lsf_cb2_16k[256][3] = { + {-0.213011, -0.293385, -0.330597}, {-0.212582, -0.240992, -0.338239}, + {-0.223373, -0.306214, -0.277192}, {-0.231138, -0.287729, -0.229412}, + {-0.238466, -0.228571, -0.260954}, {-0.140931, -0.247018, -0.258566}, + {-0.136239, -0.249669, -0.350143}, {-0.149738, -0.192970, -0.281475}, + {-0.167058, -0.261052, -0.196301}, {-0.177049, -0.201324, -0.207897}, + {-0.116915, -0.200629, -0.212526}, {-0.162247, -0.143805, -0.245093}, + {-0.082042, -0.191842, -0.266338}, {-0.098846, -0.208511, -0.320481}, + {-0.113510, -0.152470, -0.222474}, {-0.066197, -0.179112, -0.207813}, + {-0.129490, -0.169320, -0.155238}, {-0.078843, -0.190292, -0.155172}, + {-0.087790, -0.147729, -0.169351}, {-0.141037, -0.127207, -0.177910}, + {-0.126525, -0.223961, -0.153639}, {-0.101464, -0.189953, -0.114559}, + {-0.102450, -0.106303, -0.151171}, {-0.103208, -0.144457, -0.105378}, + {-0.170794, -0.140525, -0.136428}, {-0.168641, -0.203064, -0.135368}, + {-0.138193, -0.116042, -0.111905}, {-0.145085, -0.168581, -0.092613}, + {-0.126379, -0.220431, -0.091327}, {-0.212934, -0.184797, -0.101632}, + {-0.193711, -0.140556, -0.078304}, {-0.173674, -0.197276, -0.060140}, + {-0.197897, -0.241907, -0.091997}, {-0.156037, -0.258519, -0.111628}, + {-0.241964, -0.191124, -0.063140}, {-0.261340, -0.240847, -0.103132}, + {-0.221621, -0.242972, -0.041255}, {-0.224166, -0.232742, -0.161568}, + {-0.203591, -0.294470, -0.126035}, {-0.209540, -0.303149, -0.053170}, + {-0.253859, -0.295066, -0.156050}, {-0.278143, -0.331105, -0.085237}, + {-0.300273, -0.198750, -0.094834}, {-0.260477, -0.169713, -0.132476}, + {-0.211889, -0.172454, -0.164281}, {-0.228370, -0.122149, -0.124178}, + {-0.254629, -0.135668, -0.081692}, {-0.263813, -0.154928, -0.213596}, + {-0.308224, -0.106877, -0.084404}, {-0.242644, -0.082862, -0.085835}, + {-0.252084, -0.064888, -0.146498}, {-0.198162, -0.105721, -0.188887}, + {-0.189238, -0.088028, -0.109736}, {-0.197598, -0.099831, -0.044030}, + {-0.269017, -0.105991, -0.021513}, {-0.231349, -0.058825, -0.041407}, + {-0.225589, -0.027501, -0.087160}, {-0.160347, -0.058341, -0.079789}, + {-0.158729, -0.108951, -0.067262}, {-0.170483, -0.053023, -0.017561}, + {-0.175207, -0.013649, -0.049513}, {-0.156004, -0.108378, -0.004052}, + {-0.219958, -0.082362, 0.014950}, {-0.217785, -0.012981, -0.009410}, + {-0.123290, -0.040849, -0.040910}, {-0.119861, -0.095078, -0.060246}, + {-0.117537, -0.065479, 0.002968}, {-0.103231, -0.113298, -0.023282}, + {-0.136365, -0.149524, -0.051387}, {-0.119332, -0.164400, -0.009103}, + {-0.104522, -0.060948, -0.083056}, {-0.071461, -0.070787, -0.037347}, + {-0.081116, -0.149015, -0.056740}, {-0.069561, -0.108099, -0.069167}, + {-0.055624, -0.117369, -0.025091}, {-0.091941, -0.190091, -0.060020}, + {-0.072003, -0.168433, -0.006540}, {-0.033305, -0.154427, -0.054608}, + {-0.062988, -0.127093, -0.108307}, {-0.056690, -0.170813, -0.102834}, + {-0.018273, -0.127863, -0.094998}, {-0.056239, -0.123678, -0.146262}, + {-0.023442, -0.154617, -0.137417}, {-0.051903, -0.078379, -0.093395}, + {-0.014599, -0.104412, -0.135959}, {-0.051582, -0.081280, -0.140643}, + {-0.092727, -0.091930, -0.107816}, {-0.024814, -0.140993, -0.183243}, + {-0.064307, -0.113024, -0.194788}, {-0.000118, -0.098858, -0.195336}, + {-0.028090, -0.048258, -0.164101}, {-0.093414, -0.055969, -0.172743}, + {-0.114445, -0.104336, -0.215204}, {-0.048518, -0.132063, -0.242991}, + {-0.159620, -0.060240, -0.178592}, {-0.135728, -0.067473, -0.131876}, + {-0.078464, -0.038040, -0.125105}, {-0.011061, -0.064011, -0.102496}, + {-0.033887, -0.026485, -0.109493}, {-0.129128, -0.014216, -0.111329}, + {-0.190687, -0.030660, -0.135825}, {-0.082037, 0.010997, -0.100167}, + {-0.183403, 0.001651, -0.098962}, {-0.074775, -0.030335, -0.062217}, + {-0.031759, -0.050551, -0.059420}, {-0.051439, 0.010827, -0.052148}, + {-0.126744, 0.008689, -0.047785}, {-0.145916, 0.042019, -0.077431}, + {-0.093552, 0.054143, -0.060473}, {-0.090660, 0.012868, -0.018195}, + {-0.079783, -0.033071, 0.001482}, {-0.033010, -0.022331, -0.014506}, + {-0.004798, -0.017339, -0.060120}, {-0.025021, 0.026390, -0.003263}, + {-0.001437, 0.025994, -0.040892}, {-0.074821, 0.019005, 0.027549}, + {-0.030811, -0.012114, 0.034284}, { 0.006785, 0.004618, 0.018717}, + { 0.013392, -0.032597, -0.023731}, { 0.035994, 0.005963, -0.011757}, + { 0.008071, -0.045750, 0.024889}, { 0.013055, 0.017040, 0.054121}, + {-0.012989, 0.044864, 0.036327}, { 0.025054, 0.047137, 0.009974}, + { 0.053801, 0.024178, 0.031774}, { 0.056442, -0.030647, 0.021291}, + { 0.032247, 0.052680, 0.049886}, { 0.035369, 0.090207, 0.031394}, + { 0.064720, 0.070390, 0.040938}, { 0.022112, 0.054834, 0.091059}, + { 0.041765, 0.086248, 0.070196}, { 0.070645, 0.060852, 0.078825}, + { 0.058506, 0.016920, 0.081612}, { 0.000009, 0.086500, 0.059849}, + { 0.071253, 0.107392, 0.059046}, { 0.094702, 0.096160, 0.090982}, + { 0.047639, 0.110877, 0.111227}, { 0.122444, 0.090909, 0.057396}, + { 0.101916, 0.052299, 0.029909}, { 0.076560, 0.086094, -0.007252}, + { 0.123411, 0.030769, 0.082749}, { 0.135579, 0.103022, 0.009540}, + { 0.120576, 0.065284, -0.024095}, { 0.077483, 0.028526, -0.012369}, + { 0.128747, 0.017901, -0.003874}, { 0.158254, 0.046962, 0.029577}, + { 0.102287, -0.002211, 0.037329}, { 0.089654, -0.021372, -0.006857}, + { 0.137917, 0.027228, -0.053223}, { 0.098728, -0.012192, -0.048518}, + { 0.083974, 0.036153, -0.062266}, { 0.048230, -0.010241, -0.052293}, + { 0.110135, 0.007715, -0.095233}, { 0.068294, -0.014317, -0.104029}, + { 0.063909, -0.056416, -0.063023}, { 0.059133, -0.044675, -0.023780}, + { 0.030748, 0.021845, -0.086332}, { 0.023994, -0.045574, -0.076232}, + { 0.052147, -0.059825, -0.109667}, { 0.013087, -0.020420, -0.121945}, + { 0.018163, -0.096765, -0.088758}, { 0.020196, -0.076470, -0.048112}, + { 0.020282, -0.084204, -0.135535}, { 0.040076, -0.053464, -0.161949}, + {-0.017796, -0.103070, -0.059559}, {-0.016484, -0.070138, -0.016866}, + { 0.004849, -0.112481, -0.017731}, { 0.040160, -0.073873, -0.005327}, + { 0.002202, -0.094723, 0.045366}, {-0.056918, -0.081578, 0.017875}, + {-0.031099, -0.141708, 0.009186}, {-0.102802, -0.122675, 0.030060}, + {-0.061717, -0.145116, 0.076680}, {-0.073607, -0.050464, 0.072853}, + {-0.117403, -0.194921, 0.040101}, {-0.185236, -0.133620, 0.045939}, + {-0.160174, -0.057226, 0.056641}, {-0.178489, -0.173435, -0.007806}, + {-0.199916, -0.204866, 0.047342}, {-0.152337, -0.249651, 0.034656}, + {-0.185637, -0.230942, -0.002072}, {-0.122548, -0.215209, -0.024552}, + {-0.249578, -0.209714, 0.009470}, {-0.160108, -0.257702, -0.040992}, + {-0.216694, -0.289353, 0.027182}, {-0.226390, -0.147844, -0.022742}, + {-0.288737, -0.272150, -0.013948}, {-0.262554, -0.237035, 0.072473}, + {-0.306267, -0.188335, -0.032894}, {-0.259666, -0.345816, 0.024138}, + {-0.271093, -0.137143, 0.040404}, {-0.201317, -0.286782, 0.107615}, + {-0.235725, -0.163396, 0.113844}, {-0.159988, -0.209788, 0.112140}, + {-0.262985, -0.056741, 0.093506}, {-0.277226, -0.037306, 0.016008}, + {-0.293486, -0.040422, -0.062018}, {-0.214921, 0.022900, 0.055295}, + {-0.253889, 0.058575, -0.000151}, {-0.246689, 0.024242, -0.058488}, + {-0.143790, 0.006767, 0.014061}, {-0.187077, 0.048882, -0.035625}, + {-0.196369, 0.112085, 0.031546}, {-0.124264, 0.086197, -0.020800}, + {-0.126249, 0.016960, 0.095741}, {-0.079816, 0.080398, 0.051038}, + {-0.056269, 0.075380, -0.028262}, {-0.120493, 0.148495, 0.028430}, + {-0.161750, 0.101290, 0.117806}, {-0.003247, 0.083393, -0.017061}, + {-0.034007, 0.142542, 0.007402}, {-0.037618, 0.025871, 0.089496}, + {-0.082819, 0.184435, 0.073224}, { 0.006448, 0.167015, 0.080548}, + { 0.035315, 0.144022, 0.003218}, {-0.023459, 0.088147, 0.152604}, + { 0.006247, -0.024099, 0.077792}, { 0.039894, 0.057586, -0.042455}, + {-0.020417, 0.035400, -0.093971}, { 0.075465, 0.052063, 0.145582}, + { 0.078027, 0.184720, 0.092096}, { 0.107295, 0.148380, 0.022264}, + { 0.066928, -0.052831, 0.065108}, { 0.093295, 0.118157, 0.149815}, + { 0.119373, 0.137114, 0.099536}, { 0.138653, 0.075509, 0.121545}, + { 0.174025, 0.077531, 0.077169}, { 0.165839, 0.150080, 0.133423}, + { 0.173276, 0.155887, 0.048150}, { 0.162910, 0.095898, 0.171896}, + { 0.214577, 0.112888, 0.115579}, { 0.204755, 0.106392, 0.032337}, + { 0.178853, 0.205034, 0.114760}, { 0.177401, 0.070504, -0.013778}, + { 0.241624, 0.166921, 0.066087}, { 0.219595, 0.183553, 0.172332}, + { 0.123671, 0.170842, 0.167216}, { 0.177104, 0.240197, 0.186359}, + { 0.272003, 0.220214, 0.126073}, { 0.093748, 0.235843, 0.160998}, + { 0.141510, 0.190012, 0.240416}, { 0.046878, 0.168984, 0.190412}, + { 0.094898, 0.107038, 0.235003}, { 0.108592, 0.269536, 0.262528}, + {-0.027754, 0.234355, 0.134544}, { 0.265127, 0.267540, 0.199041}, + { 0.199523, 0.291507, 0.265171}, { 0.266177, 0.209339, 0.350369}, + { 0.322159, 0.344794, 0.270823}, { 0.399957, 0.264065, 0.110387}, + { 0.277817, 0.127407, -0.035625}, {-0.177038, 0.208155, 0.119077}, + { 0.049075, -0.076294, 0.145711}, { 0.187246, 0.042865, -0.127097}, + { 0.117885, -0.023489, -0.138658}, {-0.284256, 0.068153, 0.124259} +}; + +static const float lsf_cb3_16k[128][3] = { + {-0.223412, -0.236300, -0.188067}, {-0.202286, -0.218711, -0.102947}, + {-0.251652, -0.161020, -0.125280}, {-0.169223, -0.138155, -0.140430}, + {-0.176427, -0.146628, -0.222632}, {-0.120584, -0.187276, -0.180164}, + {-0.195559, -0.074225, -0.169109}, {-0.144551, -0.142774, -0.073340}, + {-0.111001, -0.111310, -0.130696}, {-0.095221, -0.174684, -0.111841}, + {-0.112158, -0.103049, -0.195130}, {-0.059989, -0.142170, -0.157850}, + {-0.127598, -0.051759, -0.153109}, {-0.063753, -0.067898, -0.164117}, + {-0.141753, -0.068274, -0.091999}, {-0.060482, -0.101054, -0.099475}, + {-0.104699, -0.104456, -0.066496}, {-0.073649, -0.052614, -0.091612}, + {-0.088268, -0.019072, -0.129956}, {-0.018837, -0.104115, -0.127837}, + {-0.021630, -0.033055, -0.129868}, {-0.083768, -0.047549, -0.041407}, + {-0.055892, -0.108526, -0.043200}, {-0.027816, -0.062499, -0.048190}, + {-0.002248, -0.110428, -0.062868}, { 0.001270, -0.033245, -0.072404}, + {-0.042747, -0.013835, -0.033829}, {-0.037615, -0.147833, -0.083912}, + {-0.045023, 0.006011, -0.092182}, {-0.050411, -0.081832, 0.005787}, + { 0.000357, -0.104282, -0.009428}, {-0.003893, -0.047892, -0.001506}, + {-0.040077, -0.147110, -0.009065}, {-0.060858, -0.030972, 0.012999}, + {-0.014674, 0.001370, 0.005554}, {-0.101362, -0.126061, -0.001898}, + {-0.102519, -0.000390, -0.015721}, {-0.132687, -0.069608, -0.019928}, + {-0.102227, -0.076131, 0.043306}, {-0.055193, 0.027001, 0.011857}, + {-0.156427, -0.016629, 0.017480}, {-0.078736, 0.002809, 0.057979}, + {-0.157789, -0.016693, -0.055073}, {-0.179397, -0.095520, 0.022065}, + {-0.110219, 0.010408, -0.081927}, {-0.125392, 0.049111, 0.044595}, + {-0.112528, 0.063173, -0.024954}, {-0.185525, 0.053093, -0.032102}, + {-0.176887, -0.019379, -0.115125}, {-0.249706, -0.017664, -0.059188}, + {-0.200243, -0.103311, -0.066846}, {-0.055404, 0.045106, -0.046991}, + {-0.000544, 0.022690, -0.044831}, { 0.022298, -0.016367, -0.022509}, + { 0.028278, 0.017585, -0.100612}, { 0.061781, -0.020826, -0.068190}, + { 0.029157, -0.074477, -0.098898}, { 0.043073, -0.067234, -0.032293}, + { 0.060157, 0.034636, -0.034885}, { 0.071153, -0.013881, -0.009036}, + { 0.054196, -0.029989, -0.131139}, { 0.030193, 0.024976, 0.009861}, + { 0.055943, -0.045304, 0.031927}, { 0.033217, -0.002418, 0.038165}, + { 0.063814, 0.045625, 0.025309}, { 0.033689, 0.038819, 0.049700}, + { 0.073582, 0.028527, 0.060200}, {-0.007957, 0.022531, 0.043687}, + {-0.000984, 0.054518, 0.018742}, { 0.057004, 0.060916, 0.060573}, + { 0.009883, 0.015238, 0.080211}, { 0.022742, 0.070832, 0.068855}, + { 0.053001, 0.029790, 0.091446}, {-0.042447, 0.060379, 0.061462}, + { 0.076826, 0.062468, 0.089653}, { 0.039065, 0.069768, 0.119128}, + { 0.064145, 0.095353, 0.071621}, { 0.094411, 0.069527, 0.054197}, + { 0.042812, 0.093060, 0.027980}, { 0.094791, 0.099189, 0.101112}, + { 0.117611, 0.048601, 0.093111}, { 0.119951, 0.122758, 0.051546}, + { 0.103558, 0.085245, -0.010700}, { 0.150126, 0.059766, 0.020280}, + { 0.108066, 0.017170, 0.008606}, { 0.108422, 0.023253, -0.063942}, + { 0.019652, 0.072284, -0.030331}, { 0.192719, 0.075624, 0.071156}, + { 0.221140, 0.069191, -0.035085}, { 0.188367, 0.126200, 0.035225}, + { 0.185760, 0.043537, -0.101714}, {-0.042518, 0.099646, 0.003244}, + {-0.015308, -0.027521, 0.046006}, { 0.034086, -0.045777, 0.095989}, + { 0.007174, -0.093358, 0.046459}, {-0.051248, -0.062095, 0.083161}, + {-0.045626, -0.133301, 0.052997}, {-0.037840, 0.024042, 0.131097}, + {-0.020217, -0.115942, 0.126170}, {-0.134550, -0.036291, 0.111322}, + {-0.110576, -0.160024, 0.091841}, {-0.093308, -0.184958, 0.013939}, + {-0.082735, -0.167417, -0.051725}, {-0.169934, -0.173003, -0.007155}, + {-0.128244, -0.213123, -0.053337}, {-0.079852, -0.154116, -0.246546}, + {-0.032242, -0.108756, -0.204133}, {-0.140117, -0.199495, -0.284505}, + { 0.010842, -0.074979, -0.166333}, {-0.093313, 0.145006, 0.034110}, + {-0.039236, 0.113213, 0.111053}, { 0.040613, -0.031783, 0.174058}, + {-0.164232, 0.131421, 0.149842}, { 0.026893, 0.107281, 0.179297}, + { 0.047086, 0.158606, 0.103267}, {-0.070567, 0.210459, 0.134734}, + { 0.094392, 0.137050, 0.166892}, { 0.086039, 0.063657, 0.168825}, + { 0.159371, 0.120897, 0.154357}, { 0.147101, 0.160684, 0.114882}, + { 0.120158, 0.199650, 0.180948}, { 0.191417, 0.174500, 0.170734}, + { 0.159153, 0.142165, 0.233347}, { 0.232002, 0.150181, 0.102736}, + { 0.188299, 0.221738, 0.228748}, { 0.256786, 0.209685, 0.161534}, + { 0.257861, 0.247793, 0.250516}, {-0.164461, -0.000143, 0.232461} +}; + +static const float lsf_cb4_16k[128][3] = { + {-0.193369, -0.304643, -0.253777}, {-0.164125, -0.277786, -0.153116}, + {-0.135681, -0.209120, -0.211724}, {-0.121822, -0.215734, -0.292207}, + {-0.198781, -0.161674, -0.242538}, {-0.164147, -0.180570, -0.138070}, + {-0.095915, -0.198695, -0.154309}, {-0.248386, -0.234462, -0.136984}, + {-0.164968, -0.108318, -0.175635}, {-0.124171, -0.111809, -0.224402}, + {-0.067398, -0.157017, -0.195759}, {-0.090132, -0.119174, -0.165253}, + {-0.099460, -0.146895, -0.106799}, {-0.141493, -0.108103, -0.108880}, + {-0.085088, -0.098340, -0.109953}, {-0.105526, -0.054463, -0.154315}, + {-0.040480, -0.144285, -0.124042}, {-0.040969, -0.084039, -0.142880}, + {-0.049082, -0.118553, -0.066686}, {-0.096336, -0.087515, -0.055741}, + {-0.058605, -0.059327, -0.089275}, {-0.121842, -0.058681, -0.086949}, + {-0.053792, -0.022025, -0.124451}, {-0.036744, -0.068891, -0.045865}, + { 0.003900, -0.098237, -0.091158}, {-0.001664, -0.045089, -0.081353}, + {-0.072829, -0.034087, -0.038416}, {-0.100822, -0.007330, -0.088715}, + {-0.035911, -0.005864, -0.062577}, {-0.020205, -0.026547, -0.019634}, + { 0.004291, -0.041290, -0.138181}, { 0.023404, -0.010932, -0.044904}, + { 0.013557, 0.014823, -0.092943}, { 0.059673, -0.031024, -0.095739}, + { 0.021130, -0.080607, -0.034594}, { 0.024655, -0.035564, 0.003243}, + { 0.017106, 0.006952, -0.000308}, { 0.075208, -0.030910, -0.031181}, + { 0.024965, 0.048632, -0.039448}, { 0.057028, 0.021547, -0.009418}, + {-0.018577, 0.023697, -0.009759}, { 0.024077, 0.033053, 0.024324}, + { 0.037052, -0.003436, 0.044530}, {-0.012871, -0.007179, 0.031795}, + { 0.077877, 0.021547, 0.023131}, { 0.053365, 0.052078, 0.029433}, + { 0.011429, 0.070426, 0.028734}, {-0.001827, 0.033115, 0.061505}, + {-0.044870, 0.038568, 0.026239}, { 0.061633, 0.034799, 0.059784}, + { 0.034261, 0.060342, 0.065185}, { 0.058981, 0.082481, 0.047252}, + { 0.090008, 0.065942, 0.044470}, { 0.066961, 0.073728, -0.000428}, + { 0.074763, 0.060293, 0.085632}, { 0.066366, 0.103375, 0.079642}, + { 0.122297, 0.036558, 0.058745}, { 0.111042, 0.092093, 0.085412}, + { 0.099243, 0.115476, 0.039254}, { 0.019973, 0.122844, 0.050255}, + { 0.159571, 0.098965, 0.051740}, { 0.137624, 0.072405, -0.006922}, + { 0.130240, 0.146091, 0.089698}, { 0.138335, 0.092968, 0.136193}, + { 0.066031, 0.149304, 0.125476}, { 0.202749, 0.145751, 0.077122}, + { 0.002224, 0.082811, 0.131200}, { 0.124476, 0.178073, 0.162336}, + { 0.174722, 0.190298, 0.127106}, { 0.202193, 0.153569, 0.163840}, + { 0.242604, 0.197796, 0.136929}, { 0.185809, 0.229348, 0.193353}, + {-0.058814, 0.195178, 0.141821}, { 0.253646, 0.247175, 0.205766}, + { 0.061433, -0.025542, 0.119311}, {-0.057816, 0.082445, 0.073243}, + {-0.069239, 0.148678, 0.031146}, {-0.030217, -0.008503, 0.106194}, + {-0.026708, 0.087469, -0.009589}, {-0.090418, 0.000265, 0.056807}, + {-0.050607, -0.019383, 0.010494}, {-0.079397, 0.008233, -0.011469}, + {-0.072634, -0.061165, 0.046917}, {-0.075741, -0.072343, -0.007557}, + {-0.025162, -0.073363, 0.005173}, {-0.123371, -0.041257, -0.008375}, + {-0.139904, 0.018285, 0.009920}, {-0.143421, -0.104238, 0.033457}, + {-0.100923, -0.134400, -0.023257}, {-0.157791, -0.095042, -0.036959}, + {-0.219890, -0.078637, 0.001815}, {-0.183607, -0.023053, -0.043678}, + {-0.145303, -0.158923, -0.059045}, {-0.197615, -0.165199, 0.028099}, + {-0.225131, -0.167756, -0.056401}, {-0.216572, -0.104751, -0.102964}, + {-0.171336, -0.241967, -0.063404}, {-0.134035, -0.205614, 0.011831}, + {-0.297116, -0.211173, -0.015352}, {-0.086464, -0.200592, -0.070454}, + {-0.217777, -0.278403, 0.030398}, {-0.236248, -0.323694, -0.087588}, + {-0.222074, -0.210785, 0.106210}, {-0.283400, -0.097077, 0.041303}, + {-0.078417, -0.154464, 0.062956}, {-0.214417, -0.100695, 0.121909}, + {-0.178576, -0.028847, 0.061042}, {-0.037999, -0.144233, -0.010546}, + {-0.086695, -0.070996, 0.125282}, { 0.010788, -0.085006, 0.058527}, + {-0.154015, 0.066560, 0.071038}, {-0.143503, 0.033260, 0.154393}, + {-0.134069, 0.032420, -0.056293}, {-0.110851, 0.086908, 0.003920}, + {-0.057254, 0.047674, -0.055571}, {-0.214206, 0.068784, -0.004735}, + {-0.257264, 0.050468, 0.081702}, {-0.291834, 0.004120, -0.022366}, + {-0.173309, -0.029081, -0.115901}, {-0.207622, 0.168664, 0.136030}, + { 0.090541, 0.032754, -0.057330}, { 0.140219, -0.000735, -0.015633}, + { 0.136697, -0.017163, -0.100909}, { 0.029838, -0.089515, -0.147130}, + {-0.055367, -0.072683, -0.214015}, { 0.048680, -0.057633, -0.212429}, + {-0.013134, -0.113898, -0.196403}, {-0.071702, -0.159408, -0.254895} +}; + +static const float lsf_cb5_16k[128][4] = { + {-0.201277, -0.278679, -0.173262, -0.198580}, + {-0.214667, -0.151922, -0.117551, -0.192713}, + {-0.160962, -0.207728, -0.124750, -0.129749}, + {-0.131043, -0.137818, -0.155281, -0.166308}, + {-0.179134, -0.169602, -0.165223, -0.066293}, + {-0.136474, -0.177035, -0.250127, -0.134370}, + {-0.066970, -0.146274, -0.170638, -0.134436}, + {-0.083288, -0.165860, -0.103437, -0.140361}, + {-0.130474, -0.119317, -0.124393, -0.086408}, + {-0.127609, -0.134415, -0.073592, -0.116103}, + {-0.113027, -0.091756, -0.107786, -0.131935}, + {-0.125530, -0.182152, -0.093796, -0.045088}, + {-0.077122, -0.138052, -0.166271, -0.038886}, + {-0.073027, -0.106845, -0.067073, -0.113910}, + {-0.049146, -0.107019, -0.112531, -0.063388}, + {-0.101539, -0.119586, -0.050297, -0.040670}, + {-0.107784, -0.066913, -0.080993, -0.052352}, + {-0.152155, -0.103010, -0.090461, -0.015526}, + {-0.153087, -0.087656, -0.029889, -0.037367}, + {-0.215281, -0.138062, -0.089162, -0.050839}, + {-0.053350, -0.060169, -0.063459, -0.024499}, + {-0.051674, -0.076355, -0.033733, -0.077211}, + {-0.045047, -0.107006, -0.020880, -0.024525}, + {-0.083003, -0.063672, -0.013243, -0.028324}, + {-0.104104, -0.075450, -0.032746, 0.024480}, + {-0.085695, -0.019502, -0.045121, -0.025016}, + {-0.123120, -0.030844, -0.003533, -0.016224}, + {-0.025568, -0.049172, -0.003911, -0.027522}, + {-0.039029, -0.019857, -0.043211, -0.058087}, + {-0.040122, -0.023067, -0.001356, 0.008607}, + {-0.063351, -0.001776, 0.016015, -0.027088}, + {-0.068110, -0.038838, 0.042525, 0.001076}, + {-0.043623, -0.020736, -0.047862, 0.037710}, + {-0.041052, 0.021954, -0.025660, 0.000758}, + {-0.013035, 0.002583, -0.008233, -0.037300}, + {-0.005523, -0.014670, 0.019651, -0.012667}, + {-0.004409, -0.014437, -0.059412, -0.019701}, + { 0.024946, -0.011663, -0.014351, -0.028762}, + { 0.012660, 0.018489, -0.010205, 0.012695}, + {-0.004423, 0.017827, 0.040544, 0.003629}, + { 0.020684, 0.026743, 0.007752, -0.025595}, + { 0.032071, 0.000043, 0.026188, -0.006444}, + { 0.058793, 0.015820, -0.001119, -0.017415}, + { 0.020156, -0.047590, 0.004227, 0.008670}, + { 0.054770, 0.032135, 0.029770, -0.009767}, + { 0.030884, 0.047757, 0.033068, 0.006866}, + { 0.062039, 0.011646, 0.056037, 0.016859}, + { 0.013798, -0.028196, 0.060710, 0.014299}, + { 0.100043, 0.041445, 0.023379, -0.014889}, + { 0.062728, -0.042821, 0.002180, -0.055380}, + { 0.061663, 0.018767, -0.015571, -0.074095}, + { 0.062980, 0.080497, 0.011808, -0.031787}, + { 0.084964, 0.043100, -0.025877, 0.020309}, + { 0.014707, 0.035421, -0.041440, -0.053373}, + { 0.081268, 0.005791, -0.066290, -0.039825}, + { 0.017691, -0.020401, -0.040513, -0.083960}, + { 0.120874, 0.055753, -0.025988, -0.059552}, + { 0.079912, 0.007894, -0.085380, -0.114587}, + { 0.036856, -0.039331, -0.104237, -0.069116}, + { 0.008526, -0.064273, -0.048312, -0.038595}, + { 0.033461, -0.028956, -0.066505, 0.038722}, + {-0.042064, -0.043989, -0.100653, -0.071550}, + {-0.015342, -0.064850, -0.065675, -0.122769}, + {-0.006581, -0.004919, -0.113564, -0.145753}, + { 0.008273, -0.070702, -0.164998, -0.095541}, + {-0.001698, -0.063744, -0.129971, -0.011162}, + {-0.048471, -0.087500, -0.111006, -0.161823}, + {-0.032193, -0.091955, -0.080642, 0.012288}, + {-0.095873, -0.015986, -0.072722, -0.101745}, + {-0.079477, -0.082060, -0.203008, -0.100297}, + {-0.023883, -0.064022, -0.168341, -0.211739}, + {-0.070530, -0.103547, -0.123858, 0.055049}, + {-0.033503, -0.076812, -0.016287, 0.044159}, + {-0.088427, -0.161682, -0.058579, 0.013873}, + {-0.083068, -0.168222, -0.016773, -0.080209}, + {-0.080548, -0.139090, 0.030544, 0.007171}, + {-0.117482, -0.083718, 0.027074, -0.003674}, + {-0.163085, -0.156856, -0.012618, -0.022329}, + {-0.176540, -0.113042, -0.020148, 0.051770}, + {-0.153891, -0.199293, -0.043244, 0.028331}, + {-0.107822, -0.150615, 0.016430, 0.092919}, + {-0.137676, -0.183224, 0.066026, 0.029343}, + {-0.191106, -0.099250, 0.045370, 0.004084}, + {-0.237042, -0.130815, -0.022543, -0.029428}, + {-0.201014, -0.053591, -0.007305, -0.033547}, + {-0.249286, -0.228408, 0.005002, 0.007146}, + {-0.206509, -0.211998, -0.061352, -0.047233}, + {-0.255702, -0.135114, 0.076375, 0.036630}, + {-0.296271, -0.073946, -0.007273, -0.019601}, + {-0.302917, -0.175111, -0.070024, -0.043905}, + {-0.239275, -0.043962, -0.084982, -0.067446}, + {-0.254583, -0.294720, -0.088762, -0.070451}, + {-0.205583, -0.238996, -0.124753, 0.033076}, + {-0.205583, -0.215882, -0.028472, 0.118679}, + {-0.153640, -0.204464, -0.039654, -0.134441}, + {-0.145929, -0.191970, -0.175308, 0.021366}, + {-0.149348, -0.212569, -0.118324, 0.103812}, + {-0.166397, -0.220581, -0.265260, -0.029113}, + {-0.164171, -0.231262, -0.258828, 0.061427}, + {-0.200198, -0.263453, -0.212016, 0.115359}, + {-0.130088, -0.212168, -0.202368, 0.118563}, + {-0.206387, -0.078075, -0.227856, -0.111165}, + {-0.129605, -0.176848, -0.241584, -0.259900}, + {-0.176826, -0.045901, -0.141712, -0.209345}, + {-0.351173, -0.031097, -0.133935, -0.182412}, + {-0.164232, 0.027006, -0.014039, -0.053567}, + {-0.171037, -0.025924, 0.030972, 0.017329}, + {-0.080862, -0.021577, 0.007652, 0.063968}, + {-0.061788, 0.042024, -0.018783, -0.057979}, + {-0.110311, 0.054760, 0.031446, -0.006710}, + {-0.136637, 0.022171, 0.084991, 0.028039}, + {-0.254471, -0.004376, 0.078034, 0.033649}, + {-0.234464, 0.088157, 0.040999, 0.002639}, + {-0.037095, 0.059443, 0.072180, 0.015027}, + {-0.046841, -0.004813, 0.088266, 0.038786}, + {-0.086782, 0.120100, 0.082655, 0.020271}, + {-0.118361, -0.069242, 0.094867, 0.039200}, + {-0.023342, -0.084303, 0.052684, 0.017093}, + {-0.014194, 0.001012, 0.011946, 0.074125}, + {-0.015342, 0.076396, 0.022365, -0.028001}, + { 0.027706, 0.037047, 0.107573, 0.060815}, + { 0.030615, 0.040664, 0.010467, 0.074289}, + { 0.038646, 0.115584, 0.069627, 0.007642}, + { 0.096463, 0.069818, 0.062494, 0.015413}, + { 0.054834, 0.065232, 0.054286, 0.110088}, + { 0.152312, 0.092371, 0.026420, -0.013184}, + { 0.144264, 0.123438, 0.080131, 0.023233}, + { 0.124405, 0.009943, -0.148477, -0.205184} +}; + +static const float * const lsf_codebooks_16k[] = { + lsf_cb1_16k[0], lsf_cb2_16k[0], lsf_cb3_16k[0], lsf_cb4_16k[0], + lsf_cb5_16k[0] +}; + +#endif /* AVCODEC_SIPR16KDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/siprdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/siprdata.h new file mode 100644 index 00000000..0dbc113f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/siprdata.h @@ -0,0 +1,263 @@ +/* + * SIPR / ACELP.NET decoder + * + * Copyright (c) 2008 Vladimir Voroshilov + * Copyright (c) 2009 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SIPRDATA_H +#define AVCODEC_SIPRDATA_H + +static const float mean_lsf[10] = { + 0.297151, 0.452308, 0.765443, 1.134803, 1.421125, + 1.773822, 2.049173, 2.375914, 2.585097, 0.075756 +}; + +static const float lsf_cb1[64][2] = { + { 0.007587, -0.005843}, { 0.042163, -0.028048}, {-0.017147, -0.060705}, + { 0.013773, -0.038108}, {-0.041563, -0.078571}, {-0.076928, -0.119343}, + { 0.012654, 0.176005}, { 0.059737, 0.156869}, { 0.171767, 0.231837}, + { 0.114030, 0.242047}, { 0.168977, 0.283101}, { 0.146210, 0.397961}, + { 0.249446, 0.268421}, { 0.137074, 0.186724}, {-0.057736, -0.135638}, + {-0.109664, -0.124611}, {-0.021234, -0.031174}, {-0.013990, -0.091819}, + {-0.040046, -0.111426}, {-0.016830, 0.055361}, { 0.057815, 0.071606}, + { 0.060670, 0.114436}, { 0.106695, 0.140838}, { 0.093601, 0.092793}, + { 0.039593, 0.006142}, {-0.066589, -0.092463}, {-0.102589, -0.171380}, + {-0.059621, -0.050671}, { 0.166131, 0.139773}, { 0.213069, 0.190761}, + { 0.061820, 0.037661}, { 0.136471, 0.090823}, {-0.019789, 0.013515}, + { 0.022280, 0.079473}, { 0.215281, 0.461959}, { 0.206497, 0.340077}, + { 0.012249, -0.065596}, { 0.091345, 0.190871}, { 0.019506, 0.037266}, + {-0.050702, -0.013223}, {-0.057334, 0.028943}, { 0.291512, 0.371415}, + {-0.053467, 0.084160}, { 0.025372, 0.375310}, { 0.269995, 0.566520}, + {-0.095259, -0.012353}, { 0.050479, 0.212893}, { 0.101219, 0.049320}, + { 0.072426, 0.283362}, {-0.084116, -0.150542}, {-0.031485, 0.144922}, + { 0.012714, 0.256910}, {-0.009528, 0.102768}, {-0.039572, 0.204967}, + {-0.098800, 0.055038}, { 0.020719, 0.128387}, {-0.045559, -0.178373}, + {-0.082338, 0.136933}, {-0.058270, 0.292806}, { 0.084242, 0.505112}, + { 0.121825, 0.326386}, {-0.102658, -0.069341}, { 0.071675, 0.004744}, + {-0.117763, -0.202608} +}; + +static const float lsf_cb2[128][2] = { + { 0.025412, 0.006095}, {-0.069803, 0.010650}, {-0.175957, -0.185800}, + {-0.139298, -0.048013}, {-0.156150, -0.129688}, {-0.160523, 0.068022}, + { 0.199683, 0.259982}, { 0.258038, 0.236147}, { 0.367089, 0.304716}, + { 0.251764, 0.305853}, { 0.394314, 0.382153}, { 0.448579, 0.337438}, + { 0.323286, 0.425563}, { 0.015369, 0.123820}, {-0.026770, 0.083881}, + {-0.112161, -0.097993}, {-0.221847, -0.161311}, {-0.050014, -0.092862}, + {-0.214960, -0.398498}, {-0.114062, -0.241381}, { 0.137950, 0.138852}, + { 0.031529, 0.065719}, { 0.208734, 0.084760}, { 0.157862, 0.057535}, + { 0.124750, 0.011922}, {-0.035227, -0.154397}, {-0.105523, -0.291427}, + {-0.073488, -0.201948}, {-0.224184, -0.273290}, {-0.168019, -0.240297}, + {-0.271591, -0.384682}, {-0.124784, 0.014253}, { 0.004210, -0.110418}, + { 0.074270, -0.014272}, { 0.053058, -0.068672}, {-0.090098, -0.145019}, + { 0.303214, 0.210323}, { 0.413443, 0.272002}, { 0.356904, 0.230646}, + {-0.035186, -0.028579}, {-0.117558, 0.115105}, {-0.159225, 0.218385}, + {-0.230178, 0.172901}, {-0.216148, -0.110195}, { 0.309444, 0.101508}, + { 0.250489, 0.118338}, { 0.293324, 0.151205}, {-0.023634, 0.033084}, + { 0.076708, 0.114024}, { 0.123119, 0.087704}, {-0.060265, 0.126543}, + {-0.223766, -0.021903}, {-0.241987, -0.328089}, { 0.205598, 0.147925}, + {-0.087010, 0.064601}, {-0.287892, -0.286099}, {-0.179451, -0.350781}, + {-0.219572, 0.043816}, {-0.217263, 0.245550}, {-0.286743, -0.180981}, + { 0.172659, 0.112620}, {-0.105422, 0.176856}, { 0.006176, -0.051491}, + { 0.099802, 0.176322}, {-0.186620, -0.068980}, { 0.164689, 0.185018}, + { 0.519877, 0.376111}, { 0.521941, 0.533731}, { 0.473375, 0.439534}, + { 0.214235, 0.202476}, { 0.579215, 0.466969}, { 0.310414, 0.271057}, + { 0.257450, 0.058939}, { 0.023936, -0.169464}, {-0.268817, -0.064531}, + {-0.174182, -0.000198}, {-0.268405, -0.234529}, {-0.296522, 0.247140}, + { 0.115950, -0.072194}, {-0.303666, 0.149084}, {-0.347762, -0.011002}, + {-0.223829, -0.214137}, {-0.278958, -0.457975}, { 0.135500, 0.238466}, + { 0.312730, 0.342760}, { 0.071754, -0.125912}, { 0.485938, 0.260429}, + { 0.037536, 0.179771}, { 0.391493, 0.156938}, { 0.397320, 0.484446}, + {-0.308630, -0.342418}, {-0.269599, -0.128453}, {-0.086683, -0.043863}, + { 0.421115, 0.213521}, { 0.082417, 0.049006}, {-0.087873, 0.238126}, + { 0.338899, 0.166131}, {-0.166988, 0.147105}, {-0.167214, -0.294075}, + { 0.588706, 0.328303}, { 0.207270, 0.017671}, {-0.141658, 0.291147}, + {-0.140850, 0.374321}, { 0.028180, 0.322510}, {-0.229858, 0.328036}, + {-0.060743, -0.260916}, {-0.011131, 0.246442}, {-0.058151, 0.310760}, + {-0.127536, -0.186432}, {-0.128523, -0.334884}, {-0.283899, 0.077729}, + {-0.031595, 0.181015}, {-0.329330, -0.108630}, {-0.215739, 0.107458}, + { 0.175734, 0.327134}, { 0.255801, 0.176077}, { 0.228265, 0.396859}, + {-0.370909, -0.185081}, {-0.355138, -0.300405}, { 0.061669, 0.242616}, + { 0.104489, 0.307995}, {-0.320021, -0.234002}, { 0.077349, 0.416286}, + {-0.339471, -0.407609}, {-0.019384, -0.215111}, { 0.168229, -0.032453}, + {-0.040140, 0.399658}, {-0.275141, 0.008218} +}; + +static const float lsf_cb3[128][2] = { + { 0.024608, 0.006198}, {-0.216616, -0.398169}, {-0.089601, -0.201370}, + {-0.121878, -0.305281}, { 0.037913, 0.059320}, { 0.245126, 0.244089}, + { 0.266853, 0.182476}, { 0.319362, 0.203481}, { 0.349945, 0.252644}, + { 0.393849, 0.279272}, { 0.445707, 0.258063}, { 0.387321, 0.200855}, + {-0.038818, 0.129603}, {-0.009510, 0.076441}, {-0.023892, -0.028199}, + {-0.117134, -0.145990}, {-0.186585, -0.052886}, {-0.034250, -0.084547}, + {-0.087443, -0.095426}, {-0.453322, -0.174493}, {-0.363975, -0.148186}, + {-0.334413, -0.202479}, {-0.221313, -0.181320}, {-0.131146, -0.050611}, + {-0.104706, 0.115139}, { 0.192765, 0.275417}, { 0.014184, 0.194251}, + { 0.154215, 0.226949}, { 0.084031, 0.221759}, { 0.189438, 0.164566}, + { 0.130737, 0.170962}, {-0.066815, 0.062954}, {-0.177176, -0.145167}, + {-0.247608, -0.129767}, {-0.187886, -0.293720}, {-0.244036, -0.344655}, + {-0.203063, -0.234947}, {-0.292715, -0.158421}, { 0.064990, -0.028164}, + { 0.147664, 0.085995}, { 0.107977, 0.002253}, { 0.071286, 0.027533}, + { 0.021017, -0.049807}, {-0.272056, -0.217857}, {-0.065596, 0.008375}, + {-0.150818, -0.195514}, {-0.012767, -0.150787}, { 0.238541, 0.136606}, + { 0.291741, 0.114024}, { 0.202677, 0.103701}, { 0.140985, 0.037759}, + {-0.257347, -0.442383}, {-0.320666, -0.319742}, {-0.488725, -0.603660}, + {-0.319170, -0.469806}, { 0.014970, -0.101074}, { 0.102209, 0.066790}, + {-0.076202, -0.044884}, { 0.073868, 0.152565}, { 0.070755, -0.091358}, + {-0.016751, 0.027216}, { 0.071201, 0.096981}, {-0.060975, -0.145638}, + { 0.114156, 0.117587}, {-0.284757, -0.029101}, {-0.253005, -0.073645}, + {-0.204028, -0.098492}, {-0.114508, 0.001219}, {-0.225284, -0.011998}, + {-0.235670, 0.084330}, { 0.161921, 0.128334}, { 0.025717, 0.119456}, + {-0.255292, -0.281471}, {-0.392803, -0.095809}, { 0.039229, -0.152110}, + {-0.310905, -0.099233}, {-0.268773, 0.032308}, {-0.340150, 0.013129}, + {-0.344890, -0.045157}, {-0.188423, 0.265603}, {-0.168235, -0.000936}, + { 0.000462, 0.297000}, { 0.263674, 0.371214}, {-0.146797, -0.098225}, + {-0.386557, -0.282426}, {-0.070940, -0.255550}, { 0.293258, 0.252785}, + { 0.408332, 0.387751}, {-0.381914, -0.358918}, {-0.463621, -0.315560}, + {-0.323681, -0.258465}, { 0.250055, 0.071195}, {-0.405256, -0.429754}, + {-0.135748, -0.251274}, { 0.186827, 0.060177}, { 0.116742, -0.053526}, + {-0.403321, -0.220339}, {-0.414144, -0.021108}, {-0.416877, 0.050184}, + {-0.470083, -0.079564}, {-0.315554, 0.219217}, {-0.273183, 0.138437}, + { 0.253231, 0.306374}, { 0.177802, 0.346298}, { 0.210358, 0.207697}, + {-0.323480, 0.077519}, {-0.193136, 0.048170}, { 0.114492, 0.292778}, + {-0.130766, 0.056677}, {-0.171572, -0.349267}, {-0.370076, -0.536392}, + {-0.311109, -0.389953}, { 0.334928, 0.367664}, { 0.351246, 0.438664}, + { 0.518803, 0.331253}, { 0.437061, 0.327257}, { 0.318906, 0.307389}, + {-0.025972, -0.206758}, { 0.373278, 0.325438}, { 0.473488, 0.389441}, + { 0.478553, 0.477990}, { 0.332783, 0.153825}, { 0.212098, 0.452336}, + { 0.161522, -0.011212}, { 0.209368, 0.020687}, {-0.086262, 0.204493}, + {-0.388643, 0.133640}, {-0.177016, 0.134404} +}; + +static const float lsf_cb4[128][2] = { + {-0.003594, -0.022447}, { 0.070651, 0.028334}, {-0.290374, -0.018347}, + {-0.224495, -0.370312}, {-0.269555, -0.131227}, {-0.122714, -0.267733}, + { 0.173325, 0.138698}, { 0.161946, 0.020687}, { 0.111706, 0.022510}, + { 0.097638, 0.056049}, { 0.139754, 0.059920}, { 0.056549, -0.050586}, + { 0.036301, 0.021501}, {-0.066347, 0.012324}, {-0.066972, 0.096136}, + {-0.120062, -0.084201}, { 0.011225, 0.047425}, {-0.012846, -0.067390}, + {-0.116201, 0.122874}, {-0.027819, 0.035453}, {-0.024743, 0.072835}, + {-0.034061, -0.001310}, { 0.077469, 0.081609}, { 0.128347, 0.139584}, + { 0.183416, 0.086563}, {-0.155839, -0.053775}, {-0.190403, -0.018639}, + {-0.202548, -0.062841}, {-0.373733, -0.275094}, {-0.394260, -0.186513}, + {-0.465700, -0.220031}, { 0.064400, -0.095825}, {-0.262053, -0.199837}, + {-0.167233, -0.094402}, { 0.048600, 0.057567}, {-0.007122, 0.168506}, + { 0.050938, 0.156451}, {-0.060828, 0.147083}, {-0.171889, 0.195822}, + {-0.218934, 0.138431}, {-0.270532, 0.195775}, {-0.405818, 0.075643}, + {-0.440187, 0.193387}, {-0.484968, 0.157607}, {-0.480560, 0.067230}, + {-0.436757, -0.111847}, {-0.040731, -0.040363}, {-0.202319, -0.170457}, + {-0.158515, -0.134551}, {-0.356709, -0.378549}, {-0.268820, -0.289831}, + {-0.188486, -0.289306}, {-0.148139, -0.177616}, {-0.071591, -0.191128}, + {-0.052270, -0.150589}, {-0.020543, -0.116220}, { 0.039584, -0.012592}, + {-0.268226, 0.042704}, {-0.209755, 0.069423}, {-0.168964, 0.124504}, + {-0.363240, 0.188266}, {-0.524935, -0.025010}, {-0.105894, -0.002699}, + {-0.251830, -0.062018}, {-0.310480, -0.082325}, { 0.014652, 0.083127}, + {-0.136512, 0.033116}, {-0.073755, -0.025236}, { 0.110766, 0.095954}, + { 0.002878, 0.011838}, {-0.074977, -0.244586}, {-0.047023, -0.081339}, + {-0.183249, 0.029525}, { 0.263435, 0.206934}, {-0.156721, -0.229993}, + {-0.112224, -0.208941}, {-0.116534, -0.123191}, {-0.073988, -0.111668}, + { 0.029484, -0.137573}, {-0.009802, -0.161685}, {-0.023273, 0.114043}, + {-0.332651, 0.049072}, {-0.394009, 0.018608}, {-0.433543, -0.035318}, + {-0.368459, -0.108024}, {-0.350215, -0.037617}, {-0.321140, -0.178537}, + { 0.020307, -0.048487}, {-0.210512, -0.232274}, {-0.082140, -0.065443}, + { 0.081961, -0.009340}, { 0.146794, 0.101973}, { 0.213999, 0.124687}, + { 0.100217, -0.054095}, {-0.114411, -0.041403}, {-0.097631, 0.037061}, + {-0.099651, -0.157978}, {-0.215790, -0.116550}, {-0.107100, 0.076300}, + { 0.084653, 0.126088}, { 0.246439, 0.091442}, { 0.160077, 0.188536}, + { 0.273900, 0.279190}, { 0.320417, 0.232550}, { 0.132710, -0.018988}, + { 0.018950, -0.091681}, {-0.032073, -0.202906}, { 0.212789, 0.178188}, + { 0.208580, 0.239726}, { 0.049420, 0.099840}, {-0.145695, -0.010619}, + {-0.132525, -0.322660}, { 0.019666, 0.126603}, { 0.260809, 0.147727}, + {-0.232795, -0.001090}, {-0.049826, 0.225987}, {-0.154774, 0.076614}, + { 0.045032, 0.221397}, { 0.321014, 0.161632}, {-0.062379, 0.053586}, + { 0.132252, 0.246675}, { 0.392627, 0.271905}, {-0.264585, 0.102344}, + {-0.327200, 0.121624}, {-0.399642, 0.124445}, {-0.108335, 0.179171}, + { 0.100374, 0.182731}, { 0.203852, 0.049505} +}; + +static const float lsf_cb5[32][2] = { + {-0.047705, 0.008002}, { 0.011332, 0.065028}, {-0.021796, -0.034777}, + {-0.147394, -0.001241}, {-0.001577, 0.020599}, {-0.083827, -0.028975}, + {-0.177707, 0.066046}, {-0.043241, -0.165144}, { 0.053322, 0.096519}, + {-0.097688, 0.106484}, {-0.023392, 0.111234}, {-0.146747, -0.159360}, + { 0.027241, -0.011806}, {-0.043156, 0.057667}, { 0.019516, -0.062116}, + { 0.025990, 0.162533}, { 0.091888, 0.009720}, {-0.098511, 0.036414}, + { 0.013722, -0.116512}, { 0.054833, -0.180975}, { 0.119497, 0.128774}, + { 0.118378, -0.125997}, { 0.065882, -0.030932}, { 0.120581, -0.039964}, + {-0.050561, -0.088577}, { 0.050134, 0.033194}, {-0.129654, -0.075112}, + {-0.225334, -0.040234}, { 0.070629, -0.084455}, { 0.095508, 0.063548}, + { 0.150514, 0.034366}, { 0.186092, -0.069272} +}; + +static const float * const lsf_codebooks[] = { + lsf_cb1[0], lsf_cb2[0], lsf_cb3[0], lsf_cb4[0], lsf_cb5[0] +}; + +static const float gain_cb[128][2] = { + {0.035230, 0.161540}, {0.049223, 0.448359}, {0.057443, 0.809043}, + {0.072434, 1.760306}, {0.111491, 0.566418}, {0.112820, 1.098524}, + {0.143493, 0.726856}, {0.144840, 0.347800}, {0.180341, 1.050010}, + {0.188171, 2.197256}, {0.189771, 0.256947}, {0.198260, 0.484678}, + {0.210622, 0.755825}, {0.220694, 0.590788}, {0.237062, 1.322214}, + {0.255175, 0.338710}, {0.298980, 0.919051}, {0.314627, 0.520961}, + {0.337106, 1.469863}, {0.341422, 2.804546}, {0.363257, 0.736222}, + {0.363881, 0.367640}, {0.369850, 1.937934}, {0.370136, 1.075201}, + {0.397152, 0.549410}, {0.426557, 0.876015}, {0.450686, 0.215588}, + {0.468116, 0.671848}, {0.470495, 1.242034}, {0.474180, 1.739845}, + {0.484875, 0.490564}, {0.498917, 0.971238}, {0.530996, 0.785765}, + {0.539768, 2.130689}, {0.546021, 0.589544}, {0.546632, 3.050846}, + {0.552336, 0.389775}, {0.556302, 1.400103}, {0.559688, 1.105421}, + {0.574140, 0.667513}, {0.595547, 0.828943}, {0.597771, 0.496929}, + {0.617079, 1.863075}, {0.619657, 1.221713}, {0.621172, 0.950275}, + {0.628426, 0.630766}, {0.628689, 4.242164}, {0.640899, 1.529846}, + {0.645813, 0.331127}, {0.653056, 0.748168}, {0.662909, 1.077438}, + {0.669505, 2.631114}, {0.681570, 1.839298}, {0.687844, 0.903400}, + {0.688660, 1.270830}, {0.695070, 0.578227}, {0.697926, 0.428440}, + {0.715454, 0.812355}, {0.729981, 1.539357}, {0.737434, 1.106765}, + {0.740241, 2.033374}, {0.740871, 0.568460}, {0.752689, 0.698461}, + {0.756587, 0.893078}, {0.767797, 0.499246}, {0.768516, 3.712434}, + {0.773153, 1.332360}, {0.786125, 1.042996}, {0.788792, 0.238388}, + {0.790861, 2.273229}, {0.795338, 1.582767}, {0.809621, 0.595501}, + {0.821032, 0.756460}, {0.824590, 0.922925}, {0.826019, 1.186793}, + {0.827426, 1.885076}, {0.830080, 6.088666}, {0.837028, 2.819993}, + {0.845561, 1.490623}, {0.848323, 0.410436}, {0.856522, 0.729725}, + {0.862636, 0.966880}, {0.874561, 1.681660}, {0.874751, 1.177630}, + {0.879289, 2.301300}, {0.886671, 0.613068}, {0.896729, 0.781097}, + {0.904777, 3.484111}, {0.906098, 1.330892}, {0.919182, 1.877203}, + {0.919901, 0.569511}, {0.921772, 1.034126}, {0.922439, 0.376000}, + {0.934221, 1.485214}, {0.938842, 0.869135}, {0.939166, 2.378294}, + {0.958933, 1.122722}, {0.959042, 0.694098}, {0.960995, 1.743430}, + {0.970763, 2.884897}, {0.982881, 0.814506}, {0.990141, 1.330022}, + {0.996447, 1.823381}, {1.000013, 0.967498}, {1.000743, 0.480597}, + {1.008020, 5.095226}, {1.013883, 2.105435}, {1.026438, 0.691312}, + {1.027361, 1.558169}, {1.030123, 3.586526}, {1.033916, 1.118036}, + {1.039315, 2.543360}, {1.068596, 0.836380}, {1.081023, 1.318768}, + {1.093150, 2.267843}, {1.095607, 1.712383}, {1.102816, 1.037334}, + {1.103231, 3.536292}, {1.107320, 0.508615}, {1.150000, 7.999000}, + {1.156731, 1.236772}, {1.168428, 2.268084}, {1.184130, 0.775839}, + {1.210609, 1.511840}, {1.220663, 4.365683}, {1.224016, 0.983179}, + {1.252236, 2.778535}, {1.301176, 1.923126} +}; + +static const float pred[4] = { + 0.200, 0.334, 0.504, 0.691 +}; + +#endif /* AVCODEC_SIPRDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snappy.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snappy.h new file mode 100644 index 00000000..a65cb3aa --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snappy.h @@ -0,0 +1,60 @@ +/* + * Snappy module + * Copyright (c) Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Snappy decompression + * + * Snappy is a compression/decompression algorithm that does not aim for + * maximum compression, but rather for very high speeds and reasonable + * compression. + * + * http://en.wikipedia.org/wiki/Snappy_%28software%29 + */ + +#ifndef AVCODEC_SNAPPY_H +#define AVCODEC_SNAPPY_H + +#include + +#include "bytestream.h" + +/** + * Get the uncompressed length of an input buffer compressed using the Snappy + * algorithm. The GetByteContext is not advanced. + * + * @param gb input GetByteContext. + * @return A positive length on success, AVERROR otherwise. + */ + int64_t ff_snappy_peek_uncompressed_length(GetByteContext *gb); + +/** + * Decompress an input buffer using Snappy algorithm. + * + * @param gb input GetByteContext. + * @param buf input buffer pointer. + * @param size input/output on input, the size of buffer, on output, the size + * of the uncompressed data. + * @return 0 if success, AVERROR otherwise. + */ +int ff_snappy_uncompress(GetByteContext *gb, uint8_t *buf, int64_t *size); + +#endif /* AVCODEC_SNAPPY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow.h new file mode 100644 index 00000000..41a3bef4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow.h @@ -0,0 +1,710 @@ +/* + * Copyright (C) 2004 Michael Niedermayer + * Copyright (C) 2006 Robert Edele + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SNOW_H +#define AVCODEC_SNOW_H + +#include "libavutil/motion_vector.h" + +#include "hpeldsp.h" +#include "me_cmp.h" +#include "qpeldsp.h" +#include "snow_dwt.h" + +#include "rangecoder.h" +#include "mathops.h" + +#include "mpegvideo.h" +#include "h264qpel.h" + +#define FF_ME_ITER 3 + +#define MID_STATE 128 + +#define MAX_PLANES 4 +#define QSHIFT 5 +#define QROOT (1<>1]; + (*i)--; + } +} + +static av_always_inline void snow_interleave_line_footer(int * i, IDWTELEM * low, IDWTELEM * high){ + for (; (*i)>=0; (*i)-=2){ + low[(*i)+1] = high[(*i)>>1]; + low[*i] = low[(*i)>>1]; + } +} + +static av_always_inline void snow_horizontal_compose_lift_lead_out(int i, IDWTELEM * dst, IDWTELEM * src, IDWTELEM * ref, int width, int w, int lift_high, int mul, int add, int shift){ + for(; i> shift); + } + + if((width^lift_high)&1){ + dst[w] = src[w] - ((mul * 2 * ref[w] + add) >> shift); + } +} + +static av_always_inline void snow_horizontal_compose_liftS_lead_out(int i, IDWTELEM * dst, IDWTELEM * src, IDWTELEM * ref, int width, int w){ + for(; i> W_BS); + } + + if(width&1){ + dst[w] = src[w] + ((2 * ref[w] + W_BO + 4 * src[w]) >> W_BS); + } +} + +/* common code */ + +int ff_snow_common_init(AVCodecContext *avctx); +int ff_snow_common_init_after_header(AVCodecContext *avctx); +void ff_snow_common_end(SnowContext *s); +void ff_snow_release_buffer(AVCodecContext *avctx); +void ff_snow_reset_contexts(SnowContext *s); +int ff_snow_alloc_blocks(SnowContext *s); +int ff_snow_frame_start(SnowContext *s); +void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, ptrdiff_t stride, + int sx, int sy, int b_w, int b_h, const BlockNode *block, + int plane_index, int w, int h); +int ff_snow_get_buffer(SnowContext *s, AVFrame *frame); +/* common inline functions */ +//XXX doublecheck all of them should stay inlined + +static inline void pred_mv(SnowContext *s, int *mx, int *my, int ref, + const BlockNode *left, const BlockNode *top, const BlockNode *tr){ + if(s->ref_frames == 1){ + *mx = mid_pred(left->mx, top->mx, tr->mx); + *my = mid_pred(left->my, top->my, tr->my); + }else{ + const int *scale = ff_scale_mv_ref[ref]; + *mx = mid_pred((left->mx * scale[left->ref] + 128) >>8, + (top ->mx * scale[top ->ref] + 128) >>8, + (tr ->mx * scale[tr ->ref] + 128) >>8); + *my = mid_pred((left->my * scale[left->ref] + 128) >>8, + (top ->my * scale[top ->ref] + 128) >>8, + (tr ->my * scale[tr ->ref] + 128) >>8); + } +} + +static av_always_inline int same_block(BlockNode *a, BlockNode *b){ + if((a->type&BLOCK_INTRA) && (b->type&BLOCK_INTRA)){ + return !((a->color[0] - b->color[0]) | (a->color[1] - b->color[1]) | (a->color[2] - b->color[2])); + }else{ + return !((a->mx - b->mx) | (a->my - b->my) | (a->ref - b->ref) | ((a->type ^ b->type)&BLOCK_INTRA)); + } +} + +//FIXME name cleanup (b_w, block_w, b_width stuff) +//XXX should we really inline it? +static av_always_inline void add_yblock(SnowContext *s, int sliced, slice_buffer *sb, IDWTELEM *dst, uint8_t *dst8, const uint8_t *obmc, int src_x, int src_y, int b_w, int b_h, int w, int h, int dst_stride, int src_stride, int obmc_stride, int b_x, int b_y, int add, int offset_dst, int plane_index){ + const int b_width = s->b_width << s->block_max_depth; + const int b_height= s->b_height << s->block_max_depth; + const int b_stride= b_width; + BlockNode *lt= &s->block[b_x + b_y*b_stride]; + BlockNode *rt= lt+1; + BlockNode *lb= lt+b_stride; + BlockNode *rb= lb+1; + uint8_t *block[4]; + // When src_stride is large enough, it is possible to interleave the blocks. + // Otherwise the blocks are written sequentially in the tmp buffer. + int tmp_step= src_stride >= 7*MB_SIZE ? MB_SIZE : MB_SIZE*src_stride; + uint8_t *tmp = s->scratchbuf; + uint8_t *ptmp; + int x,y; + + if(b_x<0){ + lt= rt; + lb= rb; + }else if(b_x + 1 >= b_width){ + rt= lt; + rb= lb; + } + if(b_y<0){ + lt= lb; + rt= rb; + }else if(b_y + 1 >= b_height){ + lb= lt; + rb= rt; + } + + if(src_x<0){ //FIXME merge with prev & always round internal width up to *16 + obmc -= src_x; + b_w += src_x; + if(!sliced && !offset_dst) + dst -= src_x; + src_x=0; + } + if(src_x + b_w > w){ + b_w = w - src_x; + } + if(src_y<0){ + obmc -= src_y*obmc_stride; + b_h += src_y; + if(!sliced && !offset_dst) + dst -= src_y*dst_stride; + src_y=0; + } + if(src_y + b_h> h){ + b_h = h - src_y; + } + + if(b_w<=0 || b_h<=0) return; + + if(!sliced && offset_dst) + dst += src_x + src_y*dst_stride; + dst8+= src_x + src_y*src_stride; +// src += src_x + src_y*src_stride; + + ptmp= tmp + 3*tmp_step; + block[0]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[0], tmp, src_stride, src_x, src_y, b_w, b_h, lt, plane_index, w, h); + + if(same_block(lt, rt)){ + block[1]= block[0]; + }else{ + block[1]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[1], tmp, src_stride, src_x, src_y, b_w, b_h, rt, plane_index, w, h); + } + + if(same_block(lt, lb)){ + block[2]= block[0]; + }else if(same_block(rt, lb)){ + block[2]= block[1]; + }else{ + block[2]= ptmp; + ptmp+=tmp_step; + ff_snow_pred_block(s, block[2], tmp, src_stride, src_x, src_y, b_w, b_h, lb, plane_index, w, h); + } + + if(same_block(lt, rb) ){ + block[3]= block[0]; + }else if(same_block(rt, rb)){ + block[3]= block[1]; + }else if(same_block(lb, rb)){ + block[3]= block[2]; + }else{ + block[3]= ptmp; + ff_snow_pred_block(s, block[3], tmp, src_stride, src_x, src_y, b_w, b_h, rb, plane_index, w, h); + } + if(sliced){ + s->dwt.inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8); + }else{ + for(y=0; y>1); + const uint8_t *obmc3= obmc1+ obmc_stride*(obmc_stride>>1); + const uint8_t *obmc4= obmc3+ (obmc_stride>>1); + for(x=0; x>= 8 - FRAC_BITS; + } + if(add){ + v += dst[x + y*dst_stride]; + v = (v + (1<<(FRAC_BITS-1))) >> FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*src_stride] = v; + }else{ + dst[x + y*dst_stride] -= v; + } + } + } + } +} + +static av_always_inline void predict_slice(SnowContext *s, IDWTELEM *buf, int plane_index, int add, int mb_y){ + Plane *p= &s->plane[plane_index]; + const int mb_w= s->b_width << s->block_max_depth; + const int mb_h= s->b_height << s->block_max_depth; + int x, y, mb_x; + int block_size = MB_SIZE >> s->block_max_depth; + int block_w = plane_index ? block_size>>s->chroma_h_shift : block_size; + int block_h = plane_index ? block_size>>s->chroma_v_shift : block_size; + const uint8_t *obmc = plane_index ? ff_obmc_tab[s->block_max_depth+s->chroma_h_shift] : ff_obmc_tab[s->block_max_depth]; + const int obmc_stride= plane_index ? (2*block_size)>>s->chroma_h_shift : 2*block_size; + int ref_stride= s->current_picture->linesize[plane_index]; + uint8_t *dst8= s->current_picture->data[plane_index]; + int w= p->width; + int h= p->height; + av_assert2(s->chroma_h_shift == s->chroma_v_shift); // obmc params assume squares + if(s->keyframe || (s->avctx->debug&512)){ + if(mb_y==mb_h) + return; + + if(add){ + for(y=block_h*mb_y; y>= FRAC_BITS; + if(v&(~255)) v= ~(v>>31); + dst8[x + y*ref_stride]= v; + } + } + }else{ + for(y=block_h*mb_y; yb_height << s->block_max_depth; + int mb_y; + for(mb_y=0; mb_y<=mb_h; mb_y++) + predict_slice(s, buf, plane_index, add, mb_y); +} + +static inline void set_blocks(SnowContext *s, int level, int x, int y, int l, int cb, int cr, int mx, int my, int ref, int type){ + const int w= s->b_width << s->block_max_depth; + const int rem_depth= s->block_max_depth - level; + const int index= (x + y*w) << rem_depth; + const int block_w= 1<block[index + i + j*w]= block; + } + } +} + +static inline void init_ref(MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index){ + SnowContext *s = c->avctx->priv_data; + const int offset[3]= { + y*c-> stride + x, + ((y*c->uvstride + x)>>s->chroma_h_shift), + ((y*c->uvstride + x)>>s->chroma_h_shift), + }; + int i; + for(i=0; i<3; i++){ + c->src[0][i]= src [i]; + c->ref[0][i]= ref [i] + offset[i]; + } + av_assert2(!ref_index); +} + + +/* bitstream functions */ + +extern const int8_t ff_quant3bA[256]; + +#define QEXPSHIFT (7-FRAC_BITS+8) //FIXME try to change this to 0 + +static inline void put_symbol(RangeCoder *c, uint8_t *state, int v, int is_signed){ + int i; + + if(v){ + const int a= FFABS(v); + const int e= av_log2(a); + const int el= FFMIN(e, 10); + put_rac(c, state+0, 0); + + for(i=0; i=el; i--){ + put_rac(c, state+22+9, (a>>i)&1); //22..31 + } + for(; i>=0; i--){ + put_rac(c, state+22+i, (a>>i)&1); //22..31 + } + + if(is_signed) + put_rac(c, state+11 + el, v < 0); //11..21 + }else{ + put_rac(c, state+0, 1); + } +} + +static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ + if(get_rac(c, state+0)) + return 0; + else{ + int i, e; + unsigned a; + e= 0; + while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10 + e++; + if (e > 31) + return AVERROR_INVALIDDATA; + } + + a= 1; + for(i=e-1; i>=0; i--){ + a += a + get_rac(c, state+22 + FFMIN(i,9)); //22..31 + } + + e= -(is_signed && get_rac(c, state+11 + FFMIN(e,10))); //11..21 + return (a^e)-e; + } +} + +static inline void put_symbol2(RangeCoder *c, uint8_t *state, int v, int log2){ + int i; + int r= log2>=0 ? 1<=0); + av_assert2(log2>=-4); + + while(v >= r){ + put_rac(c, state+4+log2, 1); + v -= r; + log2++; + if(log2>0) r+=r; + } + put_rac(c, state+4+log2, 0); + + for(i=log2-1; i>=0; i--){ + put_rac(c, state+31-i, (v>>i)&1); + } +} + +static inline int get_symbol2(RangeCoder *c, uint8_t *state, int log2){ + int i; + int r= log2>=0 ? 1<=-4); + + while(log2<28 && get_rac(c, state+4+log2)){ + v+= r; + log2++; + if(log2>0) r+=r; + } + + for(i=log2-1; i>=0; i--){ + v+= get_rac(c, state+31-i)<width; + const int h= b->height; + int x,y; + + int run, runs; + x_and_coeff *xc= b->x_coeff; + x_and_coeff *prev_xc= NULL; + x_and_coeff *prev2_xc= xc; + x_and_coeff *parent_xc= parent ? parent->x_coeff : NULL; + x_and_coeff *prev_parent_xc= parent_xc; + + runs= get_symbol2(&s->c, b->state[30], 0); + if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); + else run= INT_MAX; + + for(y=0; yx == 0){ + rt= prev_xc->coeff; + } + for(x=0; xx <= x) + prev_xc++; + if(prev_xc->x == x + 1) + rt= prev_xc->coeff; + else + rt=0; + } + if(parent_xc){ + if(x>>1 > parent_xc->x){ + parent_xc++; + } + if(x>>1 == parent_xc->x){ + p= parent_xc->coeff; + } + } + if(/*ll|*/l|lt|t|rt|p){ + int context= av_log2(/*FFABS(ll) + */3*(l>>1) + (lt>>1) + (t&~1) + (rt>>1) + (p>>1)); + + v=get_rac(&s->c, &b->state[0][context]); + if(v){ + v= 2*(get_symbol2(&s->c, b->state[context + 2], context-4) + 1); + v+=get_rac(&s->c, &b->state[0][16 + 1 + 3 + ff_quant3bA[l&0xFF] + 3*ff_quant3bA[t&0xFF]]); + if ((uint16_t)v != v) { + av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n"); + v = 1; + } + xc->x=x; + (xc++)->coeff= v; + } + }else{ + if(!run){ + if(runs-- > 0) run= get_symbol2(&s->c, b->state[1], 3); + else run= INT_MAX; + v= 2*(get_symbol2(&s->c, b->state[0 + 2], 0-4) + 1); + v+=get_rac(&s->c, &b->state[0][16 + 1 + 3]); + if ((uint16_t)v != v) { + av_log(s->avctx, AV_LOG_ERROR, "Coefficient damaged\n"); + v = 1; + } + + xc->x=x; + (xc++)->coeff= v; + }else{ + int max_run; + run--; + v=0; + av_assert2(run >= 0); + if(y) max_run= FFMIN(run, prev_xc->x - x - 2); + else max_run= FFMIN(run, w-x-1); + if(parent_xc) + max_run= FFMIN(max_run, 2*parent_xc->x - x - 1); + av_assert2(max_run >= 0 && max_run <= run); + + x+= max_run; + run-= max_run; + } + } + } + (xc++)->x= w+1; //end marker + prev_xc= prev2_xc; + prev2_xc= xc; + + if(parent_xc){ + if(y&1){ + while(parent_xc->x != parent->width+1) + parent_xc++; + parent_xc++; + prev_parent_xc= parent_xc; + }else{ + parent_xc= prev_parent_xc; + } + } + } + + (xc++)->x= w+1; //end marker +} + +#endif /* AVCODEC_SNOW_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow_dwt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow_dwt.h new file mode 100644 index 00000000..ee699de3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snow_dwt.h @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2004-2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SNOW_DWT_H +#define AVCODEC_SNOW_DWT_H + +#include +#include + +struct MpegEncContext; + +typedef int DWTELEM; +typedef short IDWTELEM; + +#define MAX_DECOMPOSITIONS 8 + +typedef struct DWTCompose { + IDWTELEM *b0; + IDWTELEM *b1; + IDWTELEM *b2; + IDWTELEM *b3; + int y; +} DWTCompose; + +/** Used to minimize the amount of memory used in order to + * optimize cache performance. **/ +typedef struct slice_buffer_s { + IDWTELEM **line; ///< For use by idwt and predict_slices. + IDWTELEM **data_stack; ///< Used for internal purposes. + int data_stack_top; + int line_count; + int line_width; + int data_count; + IDWTELEM *base_buffer; ///< Buffer that this structure is caching. +} slice_buffer; + +struct SnowDWTContext; + +typedef struct SnowDWTContext { + void (*vertical_compose97i)(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, + IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, + int width); + void (*horizontal_compose97i)(IDWTELEM *b, IDWTELEM *temp, int width); + void (*inner_add_yblock)(const uint8_t *obmc, const int obmc_stride, + uint8_t **block, int b_w, int b_h, int src_x, + int src_y, int src_stride, slice_buffer *sb, + int add, uint8_t *dst8); +} SnowDWTContext; + + +#define DWT_97 0 +#define DWT_53 1 + +#define liftS lift +#define W_AM 3 +#define W_AO 0 +#define W_AS 1 + +#undef liftS +#define W_BM 1 +#define W_BO 8 +#define W_BS 4 + +#define W_CM 1 +#define W_CO 0 +#define W_CS 0 + +#define W_DM 3 +#define W_DO 4 +#define W_DS 3 + +#define slice_buffer_get_line(slice_buf, line_num) \ + ((slice_buf)->line[line_num] ? (slice_buf)->line[line_num] \ + : ff_slice_buffer_load_line((slice_buf), \ + (line_num))) + +int ff_slice_buffer_init(slice_buffer *buf, int line_count, + int max_allocated_lines, int line_width, + IDWTELEM *base_buffer); +void ff_slice_buffer_release(slice_buffer *buf, int line); +void ff_slice_buffer_flush(slice_buffer *buf); +void ff_slice_buffer_destroy(slice_buffer *buf); +IDWTELEM *ff_slice_buffer_load_line(slice_buffer *buf, int line); + +void ff_snow_vertical_compose97i(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, + IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, + int width); +void ff_snow_horizontal_compose97i(IDWTELEM *b, IDWTELEM *temp, int width); +void ff_snow_inner_add_yblock(const uint8_t *obmc, const int obmc_stride, + uint8_t **block, int b_w, int b_h, int src_x, + int src_y, int src_stride, slice_buffer *sb, + int add, uint8_t *dst8); + +int ff_w53_32_c(struct MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t line_size, int h); +int ff_w97_32_c(struct MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, ptrdiff_t line_size, int h); + +void ff_spatial_dwt(int *buffer, int *temp, int width, int height, int stride, + int type, int decomposition_count); + +void ff_spatial_idwt_buffered_init(DWTCompose *cs, slice_buffer *sb, int width, + int height, int stride_line, int type, + int decomposition_count); +void ff_spatial_idwt_buffered_slice(SnowDWTContext *dsp, DWTCompose *cs, + slice_buffer *slice_buf, IDWTELEM *temp, + int width, int height, int stride_line, + int type, int decomposition_count, int y); +void ff_spatial_idwt(IDWTELEM *buffer, IDWTELEM *temp, int width, int height, + int stride, int type, int decomposition_count); + +void ff_dwt_init(SnowDWTContext *c); +void ff_dwt_init_x86(SnowDWTContext *c); + +#endif /* AVCODEC_DWT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snowdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snowdata.h new file mode 100644 index 00000000..490fdf8b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/snowdata.h @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2004 Michael Niedermayer + * Copyright (C) 2006 Robert Edele + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SNOWDATA_H +#define AVCODEC_SNOWDATA_H + +#include "snow.h" + +static const uint8_t obmc32[1024]={ + 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, + 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, + 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, + 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, + 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, + 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, + 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, + 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, + 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, + 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, + 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, + 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, + 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, + 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, + 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, + 8, 24, 40, 56, 68, 84,100,116,132,148,164,180,192,208,224,240,240,224,208,192,180,164,148,132,116,100, 84, 68, 56, 40, 24, 8, + 8, 20, 36, 52, 64, 80, 96,108,124,136,152,168,180,196,212,224,224,212,196,180,168,152,136,124,108, 96, 80, 64, 52, 36, 20, 8, + 8, 20, 32, 48, 60, 76, 88,100,116,128,140,156,168,184,196,208,208,196,184,168,156,140,128,116,100, 88, 76, 60, 48, 32, 20, 8, + 8, 20, 32, 44, 56, 68, 80, 92,108,120,132,144,156,168,180,192,192,180,168,156,144,132,120,108, 92, 80, 68, 56, 44, 32, 20, 8, + 4, 16, 28, 40, 52, 64, 76, 88, 96,108,120,132,144,156,168,180,180,168,156,144,132,120,108, 96, 88, 76, 64, 52, 40, 28, 16, 4, + 4, 16, 28, 36, 48, 56, 68, 80, 88,100,112,120,132,140,152,164,164,152,140,132,120,112,100, 88, 80, 68, 56, 48, 36, 28, 16, 4, + 4, 16, 24, 32, 44, 52, 60, 72, 80, 92,100,108,120,128,136,148,148,136,128,120,108,100, 92, 80, 72, 60, 52, 44, 32, 24, 16, 4, + 4, 12, 20, 28, 40, 48, 56, 64, 72, 80, 88, 96,108,116,124,132,132,124,116,108, 96, 88, 80, 72, 64, 56, 48, 40, 28, 20, 12, 4, + 4, 12, 20, 28, 32, 40, 48, 56, 64, 72, 80, 88, 92,100,108,116,116,108,100, 92, 88, 80, 72, 64, 56, 48, 40, 32, 28, 20, 12, 4, + 4, 8, 16, 24, 28, 36, 44, 48, 56, 60, 68, 76, 80, 88, 96,100,100, 96, 88, 80, 76, 68, 60, 56, 48, 44, 36, 28, 24, 16, 8, 4, + 4, 8, 12, 20, 24, 32, 36, 40, 48, 52, 56, 64, 68, 76, 80, 84, 84, 80, 76, 68, 64, 56, 52, 48, 40, 36, 32, 24, 20, 12, 8, 4, + 4, 8, 12, 16, 20, 24, 28, 32, 40, 44, 48, 52, 56, 60, 64, 68, 68, 64, 60, 56, 52, 48, 44, 40, 32, 28, 24, 20, 16, 12, 8, 4, + 0, 4, 8, 12, 16, 20, 24, 28, 28, 32, 36, 40, 44, 48, 52, 56, 56, 52, 48, 44, 40, 36, 32, 28, 28, 24, 20, 16, 12, 8, 4, 0, + 0, 4, 8, 8, 12, 12, 16, 20, 20, 24, 28, 28, 32, 32, 36, 40, 40, 36, 32, 32, 28, 28, 24, 20, 20, 16, 12, 12, 8, 8, 4, 0, + 0, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 16, 20, 20, 20, 24, 24, 20, 20, 20, 16, 16, 16, 12, 12, 8, 8, 8, 4, 4, 4, 0, + 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + //error:0.000020 +}; +static const uint8_t obmc16[256]={ + 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, + 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, + 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, + 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, + 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, + 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, + 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, + 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, + 16, 44, 76,104,136,164,196,224,224,196,164,136,104, 76, 44, 16, + 12, 40, 64, 92,116,144,168,196,196,168,144,116, 92, 64, 40, 12, + 12, 32, 56, 76,100,120,144,164,164,144,120,100, 76, 56, 32, 12, + 8, 28, 44, 64, 80,100,116,136,136,116,100, 80, 64, 44, 28, 8, + 8, 20, 36, 48, 64, 76, 92,104,104, 92, 76, 64, 48, 36, 20, 8, + 4, 16, 24, 36, 44, 56, 64, 76, 76, 64, 56, 44, 36, 24, 16, 4, + 4, 8, 16, 20, 28, 32, 40, 44, 44, 40, 32, 28, 20, 16, 8, 4, + 0, 4, 4, 8, 8, 12, 12, 16, 16, 12, 12, 8, 8, 4, 4, 0, +//error:0.000015 +}; + +//linear *64 +static const uint8_t obmc8[64]={ + 4, 12, 20, 28, 28, 20, 12, 4, + 12, 36, 60, 84, 84, 60, 36, 12, + 20, 60,100,140,140,100, 60, 20, + 28, 84,140,196,196,140, 84, 28, + 28, 84,140,196,196,140, 84, 28, + 20, 60,100,140,140,100, 60, 20, + 12, 36, 60, 84, 84, 60, 36, 12, + 4, 12, 20, 28, 28, 20, 12, 4, +//error:0.000000 +}; + +//linear *64 +static const uint8_t obmc4[16]={ + 16, 48, 48, 16, + 48,144,144, 48, + 48,144,144, 48, + 16, 48, 48, 16, +//error:0.000000 +}; + +const int8_t ff_quant3bA[256]={ + 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, + 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, +}; + +const uint8_t * const ff_obmc_tab[4]= { + obmc32, obmc16, obmc8, obmc4 +}; + +/* runtime generated tables */ +uint8_t ff_qexp[QROOT]; +int ff_scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]; + + +#endif /* AVCODEC_SNOW_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sp5x.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sp5x.h new file mode 100644 index 00000000..21c45715 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sp5x.h @@ -0,0 +1,238 @@ +/* + * Sunplus JPEG tables + * Copyright (c) 2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SP5X_H +#define AVCODEC_SP5X_H + +#include + +static const uint8_t sp5x_data_sof[] = +{ + 0xFF, 0xC0, /* SOF */ + 0x00, 0x11, /* len */ + 0x08, /* bits */ + 0x00, 0xf0, /* height (default: 240) */ + 0x01, 0x40, /* width (default: 240) */ + 0x03, /* nb components */ + 0x01, 0x22, 0x00, /* 21 vs 22 ? */ + 0x02, 0x11, 0x01, + 0x03, 0x11, 0x01 +}; + +static const uint8_t sp5x_data_sos[] = +{ + 0xFF, 0xDA, /* SOS */ + 0x00, 0x0C, /* len */ + 0x03, /* nb components */ + 0x01, 0x00, + 0x02, 0x11, + 0x03, 0x11, + 0x00, /* Ss */ + 0x3F, /* Se */ + 0x00 /* Ah/Al */ +}; + +static const uint8_t sp5x_data_dqt[] = +{ + 0xFF, 0xDB, /* DQT */ + 0x00, 0x84, /* len */ + 0x00, + 0x05, 0x03, 0x04, 0x04, 0x04, 0x03, 0x05, 0x04, + 0x04, 0x04, 0x06, 0x05, 0x05, 0x06, 0x08, 0x0D, + 0x08, 0x08, 0x07, 0x07, 0x08, 0x10, 0x0C, 0x0C, + 0x0A, 0x0D, 0x14, 0x11, 0x15, 0x14, 0x13, 0x11, + 0x13, 0x13, 0x16, 0x18, 0x1F, 0x1A, 0x16, 0x17, + 0x1E, 0x17, 0x13, 0x13, 0x1B, 0x25, 0x1C, 0x1E, + 0x20, 0x21, 0x23, 0x23, 0x23, 0x15, 0x1A, 0x27, + 0x29, 0x26, 0x22, 0x29, 0x1F, 0x22, 0x23, 0x22, + 0x01, + 0x05, 0x06, 0x06, 0x08, 0x07, 0x08, 0x10, 0x08, + 0x08, 0x10, 0x22, 0x16, 0x13, 0x16, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22 +}; + +static const uint8_t sp5x_data_dht[] = { + 0xFF, 0xC4, /* DHT */ + 0x01, 0xA2, /* len */ + 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x01, 0x00, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, + 0x0A, 0x0B, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, + 0x02, 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, + 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, + 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, + 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, + 0x91, 0xA1, 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, + 0x52, 0xD1, 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, + 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25, + 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, + 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, + 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, + 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, + 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, + 0x77, 0x78, 0x79, 0x7A, 0x83, 0x84, 0x85, 0x86, + 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, + 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, + 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, + 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, + 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, + 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, + 0xDA, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, + 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0x11, 0x00, 0x02, + 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, + 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, + 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, + 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, + 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, + 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, + 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, 0xE1, 0x25, + 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27, 0x28, + 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, + 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, + 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, + 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, + 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, + 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, + 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, + 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, + 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, + 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, + 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA +}; + + +static const uint8_t sp5x_quant_table[20][64]= +{ + /* index 0, Q50 */ + { 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40, + 26, 24, 22, 22, 24, 49, 35, 37, 29, 40, 58, 51, 61, 60, 57, 51, + 56, 55, 64, 72, 92, 78, 64, 68, 87, 69, 55, 56, 80,109, 81, 87, + 95, 98,103,104,103, 62, 77,113,121,112,100,120, 92,101,103, 99 }, + { 17, 18, 18, 24, 21, 24, 47, 26, 26, 47, 99, 66, 56, 66, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 }, + + /* index 1, Q70 */ + { 10, 7, 7, 8, 7, 6, 10, 8, 8, 8, 11, 10, 10, 11, 14, 24, + 16, 14, 13, 13, 14, 29, 21, 22, 17, 24, 35, 31, 37, 36, 34, 31, + 34, 33, 38, 43, 55, 47, 38, 41, 52, 41, 33, 34, 48, 65, 49, 52, + 57, 59, 62, 62, 62, 37, 46, 68, 73, 67, 60, 72, 55, 61, 62, 59 }, + { 10, 11, 11, 14, 13, 14, 28, 16, 16, 28, 59, 40, 34, 40, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 }, + + /* index 2, Q80 */ + { 6, 4, 5, 6, 5, 4, 6, 6, 5, 6, 7, 7, 6, 8, 10, 16, + 10, 10, 9, 9, 10, 20, 14, 15, 12, 16, 23, 20, 24, 24, 23, 20, + 22, 22, 26, 29, 37, 31, 26, 27, 35, 28, 22, 22, 32, 44, 32, 35, + 38, 39, 41, 42, 41, 25, 31, 45, 48, 45, 40, 48, 37, 40, 41, 40 }, + { 7, 7, 7, 10, 8, 10, 19, 10, 10, 19, 40, 26, 22, 26, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 }, + + /* index 3, Q85 */ + { 5, 3, 4, 4, 4, 3, 5, 4, 4, 4, 5, 5, 5, 6, 7, 12, + 8, 7, 7, 7, 7, 15, 11, 11, 9, 12, 17, 15, 18, 18, 17, 15, + 17, 17, 19, 22, 28, 23, 19, 20, 26, 21, 17, 17, 24, 33, 24, 26, + 29, 29, 31, 31, 31, 19, 23, 34, 36, 34, 30, 36, 28, 30, 31, 30 }, + { 5, 5, 5, 7, 6, 7, 14, 8, 8, 14, 30, 20, 17, 20, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 }, + + /* index 4, Q90 */ + { 3, 2, 2, 3, 2, 2, 3, 3, 3, 3, 4, 3, 3, 4, 5, 8, + 5, 5, 4, 4, 5, 10, 7, 7, 6, 8, 12, 10, 12, 12, 11, 10, + 11, 11, 13, 14, 18, 16, 13, 14, 17, 14, 11, 11, 16, 22, 16, 17, + 19, 20, 21, 21, 21, 12, 15, 23, 24, 22, 20, 24, 18, 20, 21, 20 }, + { 3, 4, 4, 5, 4, 5, 9, 5, 5, 9, 20, 13, 11, 13, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 }, + + /* index 5, Q60 */ + { 13, 9, 10, 11, 10, 8, 13, 11, 10, 11, 14, 14, 13, 15, 19, 32, + 21, 19, 18, 18, 19, 39, 28, 30, 23, 32, 46, 41, 49, 48, 46, 41, + 45, 44, 51, 58, 74, 62, 51, 54, 70, 55, 44, 45, 64, 87, 65, 70, + 76, 78, 82, 83, 82, 50, 62, 90, 97, 90, 80, 96, 74, 81, 82, 79 }, + { 14, 14, 14, 19, 17, 19, 38, 21, 21, 38, 79, 53, 45, 53, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 }, + + /* index 6, Q25 */ + { 32, 22, 24, 28, 24, 20, 32, 28, 26, 28, 36, 34, 32, 38, 48, 80, + 52, 48, 44, 44, 48, 98, 70, 74, 58, 80,116,102,122,120,114,102, + 112,110,128,144,184,156,128,136,174,138,110,112,160,218,162,174, + 190,196,206,208,206,124,154,226,242,224,200,240,184,202,206,198 }, + { 34, 36, 36, 48, 42, 48, 94, 52, 52, 94,198,132,112,132,198,198, + 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198, + 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198, + 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198 }, + + /* index 7, Q95 */ + { 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, + 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5, + 6, 6, 6, 7, 9, 8, 6, 7, 9, 7, 6, 6, 8, 11, 8, 9, + 10, 10, 10, 10, 10, 6, 8, 11, 12, 11, 10, 12, 9, 10, 10, 10 }, + { 2, 2, 2, 2, 2, 2, 5, 3, 3, 5, 10, 7, 6, 7, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }, + + /* index 8, Q93 */ + { 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 6, + 4, 3, 3, 3, 3, 7, 5, 5, 4, 6, 8, 7, 9, 8, 8, 7, + 8, 8, 9, 10, 13, 11, 9, 10, 12, 10, 8, 8, 11, 15, 11, 12, + 13, 14, 14, 15, 14, 9, 11, 16, 17, 16, 14, 17, 13, 14, 14, 14 }, + { 2, 3, 3, 3, 3, 3, 7, 4, 4, 7, 14, 9, 8, 9, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 }, + + /* index 9, Q40 */ + { 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30, 50, + 33, 30, 28, 28, 30, 61, 44, 46, 36, 50, 73, 64, 76, 75, 71, 64, + 70, 69, 80, 90,115, 98, 80, 85,109, 86, 69, 70,100,136,101,109, + 119,123,129,130,129, 78, 96,141,151,140,125,150,115,126,129,124 }, + { 21, 23, 23, 30, 26, 30, 59, 33, 33, 59,124, 83, 70, 83,124,124, + 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, + 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, + 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124 } +}; + +#endif /* AVCODEC_SP5X_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/startcode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/startcode.h new file mode 100644 index 00000000..cfa02b08 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/startcode.h @@ -0,0 +1,32 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Accelerated start code search function for start codes common to + * MPEG-1/2/4 video, VC-1, H.264/5 + */ + +#ifndef AVCODEC_STARTCODE_H +#define AVCODEC_STARTCODE_H + +#include + +int ff_startcode_find_candidate_c(const uint8_t *buf, int size); + +#endif /* AVCODEC_STARTCODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sunrast.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sunrast.h new file mode 100644 index 00000000..d162e63b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/sunrast.h @@ -0,0 +1,56 @@ +/* + * Sun Rasterfile Image Format + * Copyright (c) 2007, 2008 Ivo van Poorten + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SUNRAST_H +#define AVCODEC_SUNRAST_H + +#define RAS_MAGIC 0x59a66a95 + +#define RMT_NONE 0 +#define RMT_EQUAL_RGB 1 +#define RMT_RAW 2 ///< the data layout of this map type is unknown + +/* The Old and Standard format types indicate that the image data is + * uncompressed. There is no difference between the two formats. */ +#define RT_OLD 0 +#define RT_STANDARD 1 + +/* The Byte-Encoded format type indicates that the image data is compressed + * using a run-length encoding scheme. */ +#define RT_BYTE_ENCODED 2 +#define RLE_TRIGGER 0x80 + +/* The RGB format type indicates that the image is uncompressed with reverse + * component order from Old and Standard (RGB vs BGR). */ +#define RT_FORMAT_RGB 3 + +/* The TIFF and IFF format types indicate that the raster file was originally + * converted from either of these file formats. We do not have any samples or + * documentation of the format details. */ +#define RT_FORMAT_TIFF 4 +#define RT_FORMAT_IFF 5 + +/* The Experimental format type is implementation-specific and is generally an + * indication that the image file does not conform to the Sun Raster file + * format specification. */ +#define RT_EXPERIMENTAL 0xffff + +#endif /* AVCODEC_SUNRAST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1.h new file mode 100644 index 00000000..0ebc73a9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1.h @@ -0,0 +1,56 @@ +/* + * SVQ1 decoder + * ported to MPlayer by Arpi + * ported to libavcodec by Nick Kurshev + * + * Copyright (c) 2002 The Xine project + * Copyright (c) 2002 The FFmpeg project + * + * SVQ1 Encoder (c) 2004 Mike Melanson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Sorenson Vector Quantizer #1 (SVQ1) video codec. + * For more information of the SVQ1 algorithm, visit: + * http://www.pcisys.net/~melanson/codecs/ + */ + +#ifndef AVCODEC_SVQ1_H +#define AVCODEC_SVQ1_H + +#include + +#define SVQ1_BLOCK_SKIP 0 +#define SVQ1_BLOCK_INTER 1 +#define SVQ1_BLOCK_INTER_4V 2 +#define SVQ1_BLOCK_INTRA 3 + +extern const int8_t *const ff_svq1_inter_codebooks[6]; +extern const int8_t *const ff_svq1_intra_codebooks[6]; + +extern const uint8_t ff_svq1_block_type_vlc[4][2]; +extern const uint8_t ff_svq1_intra_multistage_vlc[6][8][2]; +extern const uint8_t ff_svq1_inter_multistage_vlc[6][8][2]; +extern const uint16_t ff_svq1_intra_mean_vlc[256][2]; +extern const uint16_t ff_svq1_inter_mean_vlc[512][2]; + +extern const uint16_t ff_svq1_frame_size_table[7][2]; + +#endif /* AVCODEC_SVQ1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_cb.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_cb.h new file mode 100644 index 00000000..11f79691 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_cb.h @@ -0,0 +1,1525 @@ +/* + * SVQ1 decoder + * ported to MPlayer by Arpi + * ported to libavcodec by Nick Kurshev + * + * Copyright (c) 2002 The Xine project + * Copyright (c) 2002 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * svq1 code books. + */ + +#ifndef AVCODEC_SVQ1_CB_H +#define AVCODEC_SVQ1_CB_H + +#include +#include + +#include "libavutil/mem.h" + +/* 6x16-entry codebook for inter-coded 4x2 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_inter_codebook_4x2)[768] = { + 7, 2, -6, -7, 7, 3, -3, -4, -7, -2, 7, 8, -8, -4, 3, 4, + 19, 17, 9, 3,-14,-16,-12, -8,-18,-16, -8, -3, 11, 14, 12, 8, + 7,-16,-10, 20, 7,-17,-10, 20, -6, 18, 8,-21, -7, 18, 9,-20, + 25, 3,-20,-14, 29, 7,-18,-13,-29, -4, 21, 14,-31, -6, 20, 14, + -19,-26,-28,-24, 31, 32, 22, 10, 15, 24, 31, 28,-32,-32,-22,-13, + 2, -8,-23,-26, -9, 3, 27, 35, 3, 11, 21, 21, 8, -4,-27,-34, + -30,-31, 12, 47,-29,-30, 13, 47, 38, 30,-17,-46, 34, 26,-19,-46, + -42,-50,-51,-43, 34, 48, 55, 48, 48, 54, 51, 42,-44,-52,-53,-47, + 4, 5, 0, -6, -2, -2, 0, 1,-11, -6, -1, -2, 1, 8, 9, 1, + 0, 1, -6, 5, 8, 1,-12, 2, 7,-14, -7, 8, 5, -8, 0, 8, + 1, 4, 11, 8,-12, -8, 0, -5, -1, 1, 0, 4,-15, -8, 3, 16, + 17, 8, -4, -6, 9, -4,-13, -8, 2, 6, 1,-18, -1, 11, 11,-12, + 6, 0, 2, 0, 14, 6, -7,-21, 1, -1,-13,-20, 1, 1, 10, 21, + -22, -5, 7, 13,-11, -1, 4, 12, -7, 0, 14, 19, -4, 3, -5,-19, + -26,-14, 10, 15, 18, 4, -6, -2, 25, 19, -5,-18,-20, -7, 4, 2, + -13, -6, -1, -4, 25, 37, -2,-35, 5, 4, 1, 1,-21,-36, 2, 43, + 2, -2, -1, 3, 8, -2, -6, -1, -2, -3, 2, 12, -5, -2, -2, -1, + -3, -1, -1, -5, -1, 7, 8, -2, 2, 7, 5, -3, 1, 1, -3, -8, + -3, -1, -3, -2, -2, -3, 2, 13, 15, 0,-11, -6, 3, 0, 0, 0, + -6, -9, -5, -4, 18, 4, 1, 3, 12, 3, 0, 4,-16, -3, 3, -3, + -17, 3, 18, 2, -1, -3, -1, -1, -6, 16, -8, 0, -9, 14, -7, 0, + 3,-13, 14, -5, 3,-13, 14, -4, -7, 20, 14,-23, 8, -7, -8, 4, + 8,-15,-19, 16,-10, 13, 11, -3, 9, -1, 1, 26, 5,-15,-27, 2, + -20, 7, 16, -4,-40, 9, 31, 1, 26,-12,-30, -7, 40, -2,-19, 4, + 6, 0, 0, 0, -6, -2, 1, 2, 0, -1, 0, -6, 9, 0, -2, -1, + -7, 8, 2, -3, -1, 2, -3, 2, 7, -4, -2, 4, 2, 0, 0, -6, + -3, -2, 9, 2, -2, -1, 0, -4, -3, -3, 0, -3, -6, 2, 10, 4, + 3, 0,-10, 8, 0, 0, -4, 4, -1, 1, 4, 2, 3, -7, -9, 7, + 2, 1, -9, -4, -1, 12, 0, 0, 3, -1, 7, -4, 3,-14, 4, 2, + -12, -9, 1, 11, 2, 5, 1, 0, 3, 1, 0, 2, 0, 8, 6,-19, + -6,-10, -7, -4, 9, 7, 5, 7, 6, 21, 3, -3,-11, -9, -5, -2, + -4, -9,-16, -1, -2, -5, 1, 36, 8, 11, 19, 0, 2, 5, -4,-41, + -1, -1, -2, -1, -2, -2, 1, 6, 0, 4, 1, -8, 1, 1, 1, 0, + -2, -3, 4, 0, 2, -1, 3, -3, 1, 3, -4, 1, -1, 3, 0, -5, + 3, 4, 2, 3, -2, -3, -6, -1, -2, -3, -2, 2, -4, 8, 1, 0, + -7, 4, 2, 6, -7, -1, 1, 0, -2, 2, -4, 1, 8, -6, 2, -1, + -6, 2, 0, 2, 5, 4, -8, -1, -1,-11, 0, 9, 0, -2, 2, 2, + 17, -5, -4, -1, -1, -4, -2, -2, 0,-13, 9, -3, -1, 12, -7, 2, + 0, -2, -5, 2, -7, -5, 20, -3, 7, 7, -1,-30, 3, 5, 8, 1, + -6, 3, -1, -4, 2, -2,-11, 18, 0, -7, 3, 14, 20, -3,-18, -9, + 7, -2, 0, -1, -2, 0, 0, -1, -4, -1, 1, 0, -2, 2, 0, 4, + 1, -3, 2, 1, 3, 1, -5, 1, -3, 0, -1, -2, 7, 1, 0, -3, + 2, 5, 0, -2, 2, -5, -1, 1, -1, -2, 4, -1, 0, -3, 5, 0, + 0, 3, -1, -2, -4, 1, 5, -1, -1, 0, -1, 9, -1, -2, -1, -1, + -2, 5, 5, -1, -2, 2, -3, -2, 1, 2,-11, 1, 2, 1, 3, 2, + 2,-10, -1, -2, 4, 2, 4, 1, 4, 5, -5, 1, 0, 6,-11, 1, + 1, 0, 6, 6, 0, 2, 1,-15, 7, 3, 5, 9,-30, 2, 2, 2, + -34, 1, 9, 2, 5, 8, 8, 2, 7, 2, 6, 6, 2,-27, 1, 4 +}; + +/* 6x16-entry codebook for inter-coded 4x4 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_inter_codebook_4x4)[1536] = { + 4, 0, -6, -7, -4, -8,-13, -9, -8, -8, -1, 6, -2, 5, 22, 27, + -16, -7, 11, 10,-18, -7, 13, 10,-15, -4, 12, 8, -9, -1, 9, 5, + -2, 2, 15,-16, -3, 2, 19,-19, -3, 2, 19,-19, -2, 3, 15,-14, + 17, 22, 22, 16, -6, -7, -5, -2,-12,-16,-16,-12, 1, 1, -1, -3, + 11,-17, 0, 8, 14,-21, -1, 9, 14,-21, -2, 8, 11,-16, -2, 6, + 7, -2,-16, 11, 9, -2,-21, 14, 10, -1,-22, 14, 8, -1,-18, 10, + -10, 16, 3, -9,-13, 20, 4,-11,-14, 21, 4,-10,-11, 16, 3, -8, + 11, 4, -9, -9, 15, 6,-12,-14, 17, 8,-12,-14, 16, 10, -7,-11, + 4, 10, 14, 13, -1, 7, 15, 16,-12, -7, 3, 8,-20,-23,-18,-10, + -10,-18,-26,-25, 4, 1, -6,-11, 13, 15, 11, 3, 12, 15, 13, 8, + -16,-19,-16,-11, 7, 12, 15, 11, 11, 16, 16, 11, -6, -9,-11,-10, + 18, 19, 12, 5, 18, 16, 5, -4, 6, 0,-10,-15, -9,-17,-23,-22, + -10,-14, -1, 21,-11,-17, 0, 29,-11,-16, 1, 30,-10,-14, 0, 23, + -16,-17,-12, -6,-19,-19,-14, -7, -3, -1, 1, 2, 27, 35, 29, 19, + -37, -8, 23, 23,-42, -9, 28, 29,-43,-10, 26, 28,-38,-11, 19, 22, + 32, 16,-16,-33, 39, 20,-18,-37, 38, 19,-19,-38, 32, 15,-17,-34, + 24, 9, -6, -4, -1,-10, -6, 3, -8, -9, -1, 3, 3, 7, 2, -6, + -1, -3, -1, 0, -1, 4, 2, -7, -3, 11, 3,-16, 1, 20, 9,-18, + -3, -8, 6, 12, -5,-10, 7, 13, -6, -9, 5, 7, -5, -5, 2, -1, + -8, 12, -3, -1,-10, 15, -3, 1,-11, 13, -4, 1,-11, 8, -3, 2, + 9, 6, -5,-12, 3, 0, -8,-13, -4, -4, -1, -1, -4, 1, 15, 18, + 9, 13, 14, 12, 4, 3, -1, -2, -2, -5, -8, -5, -7,-11, -9, -4, + 7, -5, -7, -4, 14, -2, -7, -4, 17, 0, -8, -5, 15, 1, -7, -5, + -10, -1, 6, 4,-15, -9, 2, 4, 2, -1, -3, 0, 25, 13, -8,-10, + 7, 11, -3,-16, 7, 11, -3,-15, 6, 7, -2, -9, 4, 2, -3, -5, + -7, -1, -1, 0, -9, -2, 2, 6,-12, -4, 6, 14,-13, -6, 8, 19, + -18,-18,-11, -5, -3, 0, 3, 4, 6, 8, 6, 6, 6, 6, 6, 6, + -5, 3, 13,-10, -6, 1, 15, -9, -6, -3, 15, -6, -6, -6, 10, -3, + 9, 1, -9, -9, 11, 9, 6, 5, 0, 3, 8, 7,-15,-14, -6, -5, + -11, -6, 11, 19, -2, -5, -9, -8, 6, 2, -9,-10, 6, 5, 4, 5, + -7, -3, 8, 15, -1, 3, 10, 15, 5, 5, -1, -2, 4, -2,-21,-25, + 6, -6, -6, 5, 8, -9, -7, 9, 8,-12, -7, 13, 4,-14, -7, 14, + -4, -3, 1, 1, -3, -5, -2, -3, 7, 0, -2, -4, 20, 7, -4, -4, + -3,-20, -6, 10, 6, 0, 0, 1, 5, 8, 5, -1, -3, 0, 0, -2, + 13, 6, -1, 2, 5, 3, 2, 3, -3, 0, 3, 0,-16, -8, -2, -5, + -2, -7, -6, 0, -3, -6, -3, 1, -5, -1, 2, -1, -1, 12, 16, 5, + -7, 1, 9, 8,-10, -2, 5, 3, -6, 2, 7, 3, -4, 0, -1, -7, + 3, 4, -9,-24, 0, 2, 6, 3, -1, -1, 4, 7, 5, 3, -1, -2, + 3, 6, -9, 2, 1, 6,-13, 1, 1, 8,-10, 2, 1, 8, -7, 1, + -3, -3, 2, 22, -2, -3, -5, 12, -2, -3,-10, 2, -3, -1, -4, 2, + 11, 12, 8, 2, -5, -5, -5, -8, -6, -4, 0, -3, -2, -1, 3, 3, + 12, -6, -2, -1, 12, -8, -2, -2, 9, -7, 0, -3, 4, -6, 2, -2, + -19, 1, 12, -3, -4, 4, 5, -4, 6, 1, -2, -1, 4, -4, -2, 7, + -3, -4, -7, -8, -4, -4, -2, 0, -1, 2, 14, 16, -4, -2, 4, 4, + -1, 7, 2, -5, -2, 0, -1, 1, 4, -3, -1, 13, 6,-12,-14, 8, + -1, 5, 4, -5, -2, 5, 3, -9, -2, 7, 4,-12, -1, 7, 4, -9, + -6, -3, 1, 1, 11, 11, 0, -6, 6, 4, -2, -7,-12,-10, 3, 10, + -2, -3, -3, -2, 6, 11, 14, 10, -9,-11,-10,-10, 2, 2, 3, 2, + -7, -5, -7, -1, -1, 2, 0, 7, -1, 1, 0, 9, 3, 4, -5, -1, + 10, -1,-15, -1, 4, 1, -5, 2, -3, 1, -1, 1, -3, 1, 4, 4, + 2, -1, 4, 10, 6, 2, -1, 0, 2, 2, -7,-12, -4, 2, 0, -3, + -1, -4, -1, -8, 3, -1, 2, -9, 4, 0, 5, -5, 2, 0, 8, 3, + 3, 2, 1, 1, 4, -2, 0, 3, 2, -1, 4, 1, 0, 6, -1,-25, + -1, -2, -2, -4, -3, 0, -1, -4, -1, -1, -4, 2, 0, -6, 2, 25, + -11, -1, 5, 0, 7, 0, -2, 2, 10, -1, -3, 4, -5, -5, -2, -1, + 0, 6, 3, -1, -2, -1, -1, 1, -1, -7,-12, -5, 8, 6, 2, 4, + 2, 6, -1, -6, 9, 10, -1, -4, 1, 0, -4, 0, 3, -2, -9, -5, + -4, 3, 4, 0, -4, 3, 3, 0,-11, 0, 3, 2,-11, 3, 7, 2, + 2, -4, 7, 3, 1, -8, 7, 1, -1,-12, 4, 1, 3, -9, 2, 2, + 2, -2, -2, 9,-17, -3, 3, 1, -4, 7, 1, -6, 5, 4, -1, 3, + -1, 2, 0, -4, -7, 8, 12, -1, -2, 5, 4, -5, 3, -5, -8, -2, + 0, 0, -5, -2, -2, -8, 3, 27, -1, -4, -3, 6, -3, 1, -2, -7, + 4, 4, 1, -1, -7,-10, -7, -3, 10, 10, 5, 3, -2, -2, -4, -3, + 0, 1, 5, 7, 4, -2,-16,-20, 0, 4, 7, 8, 2, 0, -2, -1, + -2, 1, 3, 17, -3, 1, -2, -1, -1, -2, -1, -2, -1, -5, -1, 0, + 5, -3, 1, 0, 6, -2, 0, 0, -1, -2, 0, -3,-11, 1, 8, -1, + 3, 0, 0, 0, 0, 2, 4, 1, 2, 0, 6, 1, -2,-18, -3, 2, + -14, 0, 6, 1, -5, -2, -1, 1, -1, 1, 0, 1, 1, 7, 4, 0, + -1, 0, 1, -4, 1, 8, 3, -4, -3, 4, 1, 3, -6, 1, -4, 1, + 1,-12, 3, 3, -1,-10, 0, -1, 2, 0, 2, 1, 3, 2, 2, 4, + 3, 0, 0, 3, 2, 0, -2, 1, 5, 2, -5, 0, 6, -1,-14, -1, + -2, -6, -3, -3, 2, -1, 4, 5, 6, -1, -2, 0, 4, 4, -1, -5, + -4, 1,-11, 0, -1, 2, -4, 1, 2, -3, 3, -1, 1, -2, 15, 0, + 1, -1, 0, -2, 1, -4, -7, 1, -2, -6, -1, 21, -2, 2, -1, 1, + 21, -1, -2, 0, -1, -3, 1, -2, -9, -2, 2, -1, 2, 1, -4, -1, + 1, 8, 2, -6,-10, -1, 4, 0, -4, -3, 3, 3, 5, 0, -1, -1, + 3, 2, 1, -2, -2, -2, 4, 3, 5, 2, -4,-17, 0, -2, 4, 3, + -7, -4, 0, 3, 9, 9, 2, -1,-11, -6, 0, -1, 5, 1, 0, 1, + 0, 17, 5,-11, 3, -2, -6, 0, 2, -2, -4, 1, -4, 1, 2, -1, + -5, -1, -5, -3, -3, 5, -3, -2, 4, 16, 2, -5, -2, 5, -1, -1, + 0, 0, -4, 1, -1, 2, 5, 11, -1, -1, -2, 1, -4, -2, -3, -1, + -5, -1, 10, 0, 6, 1, 0, -3, 0, -4, 1, 0, -2, -4, 3, -1, + 6, 9, 3, 0, -2, 1, -2, 0, -2, -3, -2, -2, 1, 0, 1, -6, + 1, 0, 2, 1, -1, 3, -2, 1, 0, -1,-15, 0, -1, 5, 2, 6, + 2, 0, 2, 2, 0,-12, -4, 6, 0, 1, 4, -1, 1, 2, 1, -4, + 1, -2, -7, 0, 0, 0, 0, -1, -5, 2, 11, 3, 1, 3, 0, -6, + 0, -3, -9, -4, 1, 3, -1, 0, 4, 1, -2, 0, 7, -3, -1, 6, + 1, -2, 6, 2, 0, -1, 3, -2, -2, 4, 0, 2, -1, 2,-14, 2, + 2, 2, 0, -1, -2, 3, -3,-14, 0, 2, 3, -3, 5, 1, 3, 2, + 1, -3, 4,-14, 1, -2, 11, -1, 0, -1, 3, 0, -1, 1, 0, 2, + -2, 3, -3, 2, -4, -1, -4, 3, -1, 2, 1, 3, -6, -2, 2, 7, + -2, 1, 2, 0, -2, 0, 0, -1, 12, 5, -1, 2, -8, -1, 1, -7, + 2, -2, -4, 2, 11, 0,-11, -2, 3, 1, -3, -1, 0, 3, 1, -1, + 0, 3, 0, -2, 0, -6, -1, -3, 12, -7, -2, 0, 7, -2, 1, 1, + 1, 2, 2, 2, -1, 2, 0, 2,-23, 0, 4, 0, 3, 2, 1, 3, + -4, -5, -1, 5, -3, 5, 10, -1, 0, 0, 3, -4, 1, -1, 2, -5 +}; + +/* 6x16-entry codebook for inter-coded 8x4 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_inter_codebook_8x4)[3072] = { + 9, 8, 4, 0, -3, -4, -4, -3, 9, 8, 4, -1, -4, -5, -5, -3, + 8, 7, 3, -2, -5, -5, -5, -4, 6, 4, 1, -2, -4, -5, -4, -3, + -12,-14,-11, -4, 1, 5, 6, 6, -8,-10, -7, -5, -2, 1, 1, 1, + 5, 4, 3, 1, 0, 0, -1, -1, 13, 13, 9, 6, 3, 0, -1, -2, + -4, -4, -3, -1, 1, 4, 8, 11, -5, -6, -4, -2, 0, 3, 8, 12, + -7, -7, -6, -4, -2, 2, 7, 10, -7, -7, -5, -4, -2, 1, 5, 8, + -3, -2, -1, 1, 3, 6, 7, 6, 2, 3, 5, 7, 8, 8, 6, 4, + 4, 5, 4, 3, 1, -2, -6, -7, 1, 0, -2, -7,-10,-14,-17,-16, + -5, -4, 1, 8, 9, 3, -3, -7, -7, -6, 1, 11, 12, 5, -3, -8, + -8, -7, 0, 9, 11, 5, -3, -7, -8, -6, -1, 5, 8, 4, -2, -6, + -4, -5, -7, -8, -9, -9, -8, -6, -4, -5, -6, -7, -7, -6, -4, -2, + 0, 1, 2, 3, 5, 8, 10, 9, 1, 2, 3, 6, 9, 12, 14, 13, + 5, 6, 6, 5, 4, 3, 2, 1, 5, 6, 7, 7, 6, 6, 6, 4, + -1, 0, 1, 1, 3, 5, 5, 5,-13,-16,-17,-17,-14,-10, -6, -4, + 9, 11, 13, 16, 15, 13, 12, 10, -4, -5, -6, -7, -7, -7, -6, -5, + -6, -6, -7, -7, -7, -7, -6, -5, -2, -1, 0, 0, 0, 0, 0, -1, + -11,-13,-15,-16,-16,-14,-12,-10, 2, 3, 4, 5, 4, 3, 3, 3, + 6, 7, 8, 8, 8, 7, 6, 5, 3, 4, 3, 3, 3, 3, 3, 3, + 3, 4, 4, 1, -2, -7,-13,-17, 5, 7, 7, 5, 1, -5,-13,-19, + 6, 8, 9, 8, 5, -1, -9,-16, 6, 8, 10, 10, 7, 2, -4,-11, + 18, 9, -1,-10,-13, -9, -4, 0, 22, 12, -1,-12,-15,-10, -4, 2, + 23, 13, 0,-10,-13, -9, -3, 2, 20, 12, 2, -6, -9, -6, -2, 2, + -6, -6, -6, -7, -7, -7, -7, -6, -6, -7, -8, -8, -9, -9, -9, -8, + -3, -3, -3, -3, -3, -3, -3, -3, 12, 15, 18, 21, 21, 19, 17, 14, + 14, 16, 18, 18, 18, 16, 15, 13, 5, 6, 6, 5, 5, 4, 4, 3, + -6, -7, -9,-10,-10,-10, -9, -7,-10,-11,-13,-14,-14,-13,-12,-10, + -27,-17, -4, 5, 9, 10, 10, 7,-32,-19, -3, 7, 11, 12, 11, 8, + -30,-16, -2, 8, 12, 12, 10, 7,-23,-12, 0, 7, 10, 11, 9, 6, + 16, 17, 16, 12, 6, -1, -8,-12, 17, 18, 15, 10, 1, -8,-15,-18, + 15, 14, 10, 4, -5,-14,-20,-23, 10, 8, 4, -1, -9,-16,-21,-22, + -10,-12,-12,-11, -5, 4, 14, 20,-11,-13,-15,-12, -4, 7, 19, 27, + -11,-13,-14,-11, -3, 8, 21, 28,-10,-11,-12, -9, -2, 8, 18, 25, + -1, -1, -1, 1, 4, 6, 6, 5, 0, 0, 0, 2, 4, 3, 1, -2, + 0, 0, 2, 4, 4, -1, -7,-10, 0, 0, 3, 5, 3, -3,-11,-15, + -14,-13, -8, -1, 3, 3, -1, -4, -5, -4, -1, 4, 8, 8, 3, 0, + 3, 2, 2, 3, 4, 5, 3, 1, 5, 3, 0, -2, -2, -1, -1, -1, + 9, 1, -6, -6, -5, -3, -2, -1, 12, 1, -6, -6, -4, -2, -1, 0, + 14, 4, -4, -4, -2, -2, -1, -1, 14, 6, -1, -1, -1, -1, -1, -1, + 4, 6, 8, 10, 11, 9, 7, 5, -1, -1, -1, 0, 0, -1, -1, -2, + -2, -4, -4, -5, -5, -5, -5, -4, -2, -3, -3, -4, -4, -3, -2, -1, + 2, 3, 4, 4, 3, 1, 0, 0, -1, 1, 4, 5, 6, 5, 4, 3, + -8, -6, -2, 2, 3, 4, 4, 3,-14,-13, -9, -5, -2, -1, 0, 0, + -3, -4, -5, -4, 0, 7, 12, 13, -3, -4, -5, -5, -2, 4, 9, 10, + -2, -3, -4, -5, -4, -1, 3, 4, -1, -1, -2, -3, -3, -2, 0, 1, + 9, 5, -2, -8,-11,-10, -7, -4, 12, 10, 6, 2, 0, -1, 0, 0, + 2, 2, 3, 4, 3, 1, 1, 1, -9, -8, -4, 0, 1, 2, 1, 0, + 6, 8, 8, 5, 1, -5,-11,-13, 0, 1, 2, 2, -1, -4, -8,-11, + -3, -2, 1, 3, 3, 1, -1, -4, -2, -1, 2, 5, 6, 6, 4, 1, + 3, 4, 5, 5, 4, 1, -3, -6, 5, 6, 4, 2, 2, 2, 0, -3, + 6, 5, 0, -5, -5, -2, -1, -2, 7, 4, -3,-11,-12, -7, -3, -2, + 1, 0, -1, -1, -1, 0, 0, 0, 2, 3, 4, 4, 5, 5, 4, 3, + -7, -9, -9,-10,-10, -9, -7, -6, 3, 4, 5, 6, 5, 5, 5, 5, + -7, -7, -7, -7, -6, -6, -5, -4, -5, -4, -3, -1, -1, -1, 0, 0, + -3, -2, 1, 4, 5, 5, 5, 5, -2, -1, 3, 6, 9, 10, 10, 9, + -14, 1, 10, 3, -2, 0, 1, 1,-16, 2, 13, 3, -3, -1, 1, 0, + -15, 2, 12, 3, -4, -2, 1, 1,-10, 3, 10, 2, -3, -1, 1, 1, + 0, 1, 4, 2, -5,-10, -3, 11, -1, 1, 4, 2, -6,-13, -2, 15, + -1, 0, 3, 1, -6,-12, -1, 15, -1, 1, 2, 1, -4, -8, 0, 11, + 10, 5, -2, -2, 2, 5, 1, -4, 7, 0, -8, -6, 1, 5, 2, -4, + 2, -5,-12, -7, 2, 7, 4, -1, -1, -7,-10, -4, 4, 9, 7, 2, + -5, -5, -4, -6, -6, -5, -5, -3, -1, -2, -2, -4, -5, -6, -5, -4, + 6, 7, 7, 4, 0, -2, -3, -3, 13, 14, 13, 10, 5, 1, -1, -2, + 1, 1, 2, 2, 2, 2, 2, 2, -5, -6, -8, -9, -9, -8, -7, -6, + 7, 9, 10, 11, 11, 9, 7, 5, -1, -2, -3, -3, -4, -4, -4, -3, + -1, -1, 0, 0, 0, 0, -1, -1, -3, -3, -4, -5, -4, -3, -3, -2, + 2, 1, -1, -3, -3, -2, -1, 0, 12, 12, 8, 3, 1, 0, 0, 1, + -6, -8, -8, -6, -2, 2, 6, 8, 1, 1, -1, -2, 0, 3, 5, 7, + 3, 3, 1, -1, -1, 0, 0, 2, 0, 1, 0, -1, -1, -1, -2, -1, + 1, 0, 0, 0, 0, 0, 2, 4, 2, 1, 3, 4, 3, 1, 0, 2, + 2, 1, 0, 0, -1, -1, 0, 3, 5, 1, -6,-12,-13, -8, -1, 4, + -2, 0, -1, -2, -1, 0, 2, 3, -6, -3, -2, 0, 1, 1, 1, 1, + -9, -5, 0, 4, 5, 3, 1, 0, -8, -3, 3, 7, 8, 4, 1, 0, + 1, 2, 2, 3, 3, 1, -1, -3, 4, 5, 5, 6, 6, 5, 2, 0, + 0, 0, 0, 0, 1, 0, -2, -4, -3, -3, -4, -3, -3, -4, -7, -8, + 14, 12, 6, -1, -3, -3, 0, 0, 7, 5, 1, -3, -5, -4, -2, -1, + -2, -2, -2, -2, -2, -2, -1, -1, -6, -4, -1, 1, 1, 1, 0, -1, + 2, 2, 1, -3, -6, -7, -6, -3, 1, 0, -1, -3, -2, 1, 4, 6, + 0, 0, 1, 2, 4, 7, 8, 7, 0, 0, 0, 0, -1, -4, -7, -8, + 0, 2, 1, -2, -3, -3, -2, -1, -1, 1, 0, -3, -5, -2, 0, 2, + -2, -1, -2, -5, -4, 1, 6, 9, -3, -2, -3, -4, -2, 5, 11, 13, + -4, -2, 2, 6, 4, -3,-10,-14, -2, -1, 1, 4, 4, 1, -1, -2, + 0, 0, -1, -2, -2, 0, 4, 6, 2, 2, 0, -3, -3, 0, 5, 9, + -4, -4, -2, 1, 6, 9, 3, -7, -2, -2, -2, -1, 4, 8, 0,-11, + 1, 1, 0, 0, 2, 6, -1,-10, 2, 2, 1, 0, 2, 4, 0, -7, + -1, -2, -3, -6, -7, -8, -8, -8, 2, 3, 3, 1, -1, -2, -3, -4, + 5, 5, 5, 4, 3, 2, 0, -1, 3, 3, 3, 3, 2, 2, 1, 1, + 3, 3, 2, -2, -3, 0, 7, 10, 1, 2, 2, -2, -5, -4, 0, 3, + 0, 3, 4, 2, -3, -5, -6, -4, 0, 2, 4, 4, 1, -4, -7, -7, + 2, 4, 5, 5, 5, 5, 6, 6, -4, -4, -3, -5, -5, -3, -3, -2, + -3, -4, -4, -5, -4, -2, -2, -2, 1, 1, 0, 0, 2, 4, 5, 4, + -2, 0, 3, 4, 4, 3, 2, 2, -9, -7, -4, 0, 3, 6, 6, 6, + -5, -5, -3, -2, 0, 1, 3, 4, 5, 5, 2, -2, -4, -6, -5, -3, + 1, -6, -4, 7, 5, -2, -2, 1, 5, -5, -4, 6, 4, -5, -4, 1, + 5, -5, -4, 6, 4, -5, -3, 1, 1, -7, -3, 8, 7, -1, -3, 1, + -8, -7, -4, 0, 2, 4, 5, 5, 5, 6, 5, 2, -1, -5, -7, -7, + 5, 6, 4, 1, -3, -5, -6, -5, -7, -7, -5, -2, 1, 6, 9, 10, + 6, 3, 0, 1, 3, 0, -8,-14, 3, 0, -1, 1, 4, 3, 0, -4, + 1, 0, 0, 1, 2, 1, 1, 1, -1, -1, 1, 2, 1, -1, -1, 0, + 1, 1, 1, 1, 0, -2, -3, 0, 1, 2, 1, 0, -2, -8, -9, -4, + 1, 3, 3, 2, 1, -3, -3, 1, 0, 1, 1, 1, 1, 1, 4, 8, + 2, 5, 9, 7, 2, -1, -1, 1, -4, -1, 1, 0, -3, -4, -1, 2, + -3, 0, 3, 3, 0, -1, 0, 2, -4, -1, 1, 1, -2, -4, -5, -4, + 1, -1, -2, -2, -1, 2, 4, 5, 2, 1, 1, 0, -1, -1, 0, 0, + 2, 3, 4, 5, 4, 2, 1, 0, -9, -9, -6, -3, -1, -1, -1, -1, + -6, -6, 4, 7, 0, -2, -1, -2, -1, -2, 5, 6, -1, -2, 0, -1, + 4, -1, 1, 0, -4, -2, 0, -2, 7, 1, -1, -2, -3, 1, 3, 1, + 4, 2, 1, 3, 3, 1, 1, 2, 2, -2, -4, 0, 3, 1, 0, 0, + 1, -4, -8, -4, 1, 2, 1, 0, 2, -3, -9, -6, 0, 3, 3, 2, + -1, -1, 0, -1, -1, 0, 1, 2, 3, 1, -4, -8, -7, -3, 1, 2, + 2, -1, -3, -2, -1, 0, 1, 0, -1, 0, 5, 11, 9, 3, -1, -3, + -1, -2, -2, -1, 1, 1, 1, 1, 0, -1, 0, 3, 6, 6, 5, 5, + 2, 1, -1, -1, -2, -5, -6, -4, 2, 2, 2, 1, -1, -4, -5, -5, + -1, -3, -6, -7, -6, -4, -1, 1, 5, 5, 3, 4, 4, 3, 4, 5, + -1, -2, -3, -2, -2, -2, 0, 1, 0, 0, 0, 0, 0, 1, 2, 3, + -6, -6, -4, -1, 2, 2, 2, 2, -6, -7, -5, -2, 0, -1, -1, 0, + 2, 2, 2, 4, 4, 3, 3, 4, 2, 1, 0, -1, 0, 0, 2, 4, + 12, 5, -5, -8, -5, 0, 2, 2, 2, -3, -6, -3, 0, 0, -1, -2, + -2, -3, -1, 3, 4, 1, -2, -3, 2, 2, 3, 4, 3, 1, -1, -1, + 3, 2, 1, 0, 1, 4, 3, 0, 4, 3, 0, -5, -6, 0, 3, 3, + 2, 3, 1, -7,-12, -6, 1, 3, 1, 3, 4, -1, -6, -4, 0, 1, + -9, -4, 2, 6, 7, 4, 1, 0, -7, -1, 4, 6, 4, 0, -3, -3, + -6, 0, 4, 4, 1, -2, -3, -2, -4, 1, 3, 2, 0, -2, -1, 0, + 0, 5, 2, -5, -3, 3, 1, -4, -2, 4, 2, -6, -3, 6, 4, -3, + -1, 5, 3, -5, -1, 7, 3, -4, -1, 2, 0, -6, -3, 5, 3, -3, + -8, -3, 3, 5, 3, 1, -2, -2, 2, 4, 4, -2, -4, -3, 1, 3, + 2, 1, -3, -5, -3, 3, 4, 3, -5, -6, -5, 3, 10, 8, -1, -5, + 0, 3, 2, -4, -9, -7, 0, 6, -5, -1, 5, 7, 4, -1, -3, -3, + -5, -5, -2, 3, 6, 5, -1, -4, 9, 6, 0, -4, -2, 1, 1, -1, + -1, -1, -1, 1, 1, 0, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, + 2, 1, -2, -1, 1, 1, 0, 0, 12, 8, 2, -1, -1, -4, -7, -7, + 2, 1, 3, 6, 7, 4, 2, 0, 1, 0, -1, 0, -1, -4, -7, -8, + 0, 0, -1, 0, 0, 0, -1, -3, 0, 0, 0, 0, 1, 1, 0, -2, + -1, 0, 1, 1, 0, 0, -1, -2, 0, 0, -1, -3, -4, -3, -1, 1, + -1, 0, 0, 0, 1, 4, 10, 12, -1, 0, -2, -2, -3, -3, -1, 1, + -3, -1, -2, -4, 2, 9, 9, 7, -3, 0, -1, -3, 0, 2, -1, 1, + -1, 1, -2, -3, 0, -1, -3, 0, 0, 0, -3, -2, 0, -1, -1, 1, + -1, -2, -1, -1, -2, -1, -1, -2, 2, -1, -2, -1, 0, 1, 0, -2, + 3, -1, -2, 2, 5, 3, -1, -3, 1, -5, -5, 1, 6, 6, 2, 0, + 1, 2, 0, -1, 0, 1, 0, -2, -5, -3, -1, 0, 1, 2, 1, -2, + -7, -5, -2, -2, -2, -2, 0, 1, -1, 0, 1, 1, 0, 3, 9, 12, + 0, 6, 5, 1, -2, -3, 0, 3, 0, 6, 5, 1, 1, 1, 2, 3, + -5, -2, -2, -3, 0, 0, 0, 0, -6, -3, -3, -2, 0, 0, -1, -2, + 4, 4, 2, 1, 0, -1, -1, 0, -2, -2, 0, 1, 2, 1, 1, 0, + 2, 2, 1, -1, -3, -5, -9,-10, 2, 1, -1, -1, 1, 4, 4, 1, + 4, 0, -2, -2, -2, -2, -1, 0, 7, 1, -4, -3, -2, 0, 1, 1, + 10, 5, -1, -2, 0, 1, 1, 0, 5, 1, -3, -4, -3, -1, -1, -2, + 2, 1, -1, -3, -3, 1, 1, -1, -2, -1, 3, 0, -1, 1, 1, 0, + -3, 1, 7, 2, -3, -2, -1, 0, -2, 4, 8, -1, -8, -5, 0, 2, + -4, -1, 1, 2, 1, -3, -4, -2, -5, -3, -2, 1, 4, 4, 4, 6, + -3, -2, -4, -3, 0, 1, 1, 2, 2, 2, 2, 1, 2, 1, -1, -1, + -4, -1, 0, -1, -3, -3, -1, -1, 1, 4, 4, 2, 0, -1, -2, -3, + 4, 6, 5, 3, 2, 1, -2, -4, 0, 1, 1, 1, 1, -1, -4, -6, + 1, 2, 2, -1, -6, -5, -1, 2, -3, -2, 1, 1, -4, -3, 2, 5, + -2, -1, 2, 2, -3, -4, 0, 3, -2, -2, 2, 6, 5, 2, 1, 2, + 2, -3, -3, 0, 0, 2, 3, 1, 3, -1, 1, 3, 1, 2, -1, -5, + -5, -7, -4, -2, 1, 8, 8, 1, -1, 0, 2, 0, -3, 0, 1, -3, + -2, -5, -5, -2, -3, -1, 0, -2, -1, -4, 0, 4, 0, 2, 4, 0, + 0, 0, 8, 10, 2, 1, 3, -1, -4, -3, 2, 3, -3, -3, 1, -1, + 1, -2, -4, 2, 7, 3, -2, -1, 6, 4, -2, -1, 2, 0, -1, 3, + 1, 1, -2, -2, -2, -5, -3, 4, -6, -2, 1, 1, -1, -4, -2, 4, + -2, -1, -2, -2, 0, 1, 0, -2, -1, 1, 0, -1, 0, 0, -1, -3, + 0, 1, -2, -4, -3, -1, 0, 0, 6, 8, 5, 0, 0, 1, 2, 3, + -2, -2, 2, 5, 2, 0, 0, 1, 2, -2, -2, -1, -1, 1, 2, 4, + 2, -1, 0, 1, 0, 0, 0, 1, -8, -7, -1, 1, -1, -1, 1, 3, + 0, 3, 6, 2, -2, 1, 2, 0,-10, -7, -1, 0, -3, -1, 2, 1, + 0, 0, 2, 2, 1, 1, 1, -1, 3, 0, -2, -2, 0, 2, 1, 0, + 8, 1, 0, 0, -2, -3, -1, 0, 2, -2, 2, 5, 1, -2, -1, 1, + -3, -6, -3, -1, -3, -3, -1, 2, 2, 0, 1, 2, 2, 1, 0, 0, + 1, -1, -1, -2, -1, 0, 1, 0, 15, 9, 2, -1, -2, -3, -3, -3, + 0, -3, -2, 0, 0, -1, -1, -1, 1, 0, 1, 0, 0, -1, -1, -1, + 0, 2, 2, -2, -3, -3, -7, -8, 0, 2, 2, 0, 1, 2, 1, 1, + 1, 2, 2, 2, 3, 1, 0, 3, 1, 0, -1, -2, -1, -2, 0, 5, + -11, -6, -1, 1, 2, 3, 1, -3, 1, 4, 3, -1, -2, 1, 2, -1, + 2, 2, 1, -1, -2, 0, 1, -1, 0, 0, -1, -1, 0, 2, 3, 2, + 1, 1, 2, 1, -1, 1, 0, -4, 0, 0, 0, -2, -2, 2, 4, -2, + -2, -3, 0, 0, -1, 2, 1, -6, 0, 2, 5, 5, 3, 2, -1, -7, + 4, 2, 0, 0, 3, 3, 1, -1, 0, -1, -1, 3, 6, 4, 1, -1, + -2, -2, 0, 2, 2, 0, -2, -2, -1, 0, -1, -5, -7, -5, -1, 1, + 5, -1, -2, 0, 2, 4, 2, -5, 0, -5, -2, 2, 1, 2, 0, -6, + 6, 1, 0, 1, -2, -1, 4, 2, 2, -3, -3, 0, -1, -2, 0, 0, + 1, -1, 0, 2, 0, 0, 6, 11, 2, -1, -1, 0, -3, -2, 3, 5, + 0, -2, -1, 0, -1, 0, 0, -3, 1, -1, -1, -1, -2, -1, -3, -7, + 1, 1, -2, -2, 1, 3, 1, -2, -1, 2, 0, -1, -1, 1, 0, 0, + -4, 2, 3, -1, -2, -2, 0, 1,-11, -2, 4, 5, 6, 2, -1, -2, + -6, -2, 1, -1, -3, -4, 1, 9, -3, 0, 3, 3, 2, -3, -3, 3, + 1, 1, 0, 0, 1, -1, -2, 3, 2, 0, -3, -3, 0, -1, -1, 3, + 1, -1, -3, 1, 2, -6, -4, 6, 0, -2, -5, -2, 0, -3, -2, 3, + 2, 2, 1, -2, -2, 1, 2, -1, -1, 1, 1, -2, -1, 6, 7, -1, + 1, 0, -4, -2, 1, -2, -3, 1, -4, 0, -3, -2, 2, 0, -3, 0, + -3, 4, 3, 1, 8, 7, 0, -1, -3, 4, 1, -4, 2, 3, -2, -3, + -3, 6, 1, -4, 1, 1, -1, -1, -2, 4, -3, -3, 3, 0, -1, -1, + 1, 2, -4, 2, 4, -3, -1, 2, 3, -1, -4, 5, 4, -6, -3, 2 +}; + +/* 6x16-entry codebook for inter-coded 8x8 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_inter_codebook_8x8)[6144] = { + -4, -3, 4, 5, 2, 1, 1, 0, -5, -3, 5, 5, 2, 1, 0, 0, + -6, -4, 5, 5, 2, 1, 0, 0, -7, -4, 4, 5, 2, 1, 0, 0, + -8, -5, 3, 4, 2, 1, 0, 0, -8, -6, 3, 4, 1, 1, 1, 0, + -8, -6, 2, 4, 2, 1, 1, 0, -8, -6, 2, 4, 1, 1, 1, 1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, + -2, -3, -3, -3, -3, -3, -3, -3, -2, -3, -3, -3, -3, -3, -4, -3, + -2, -2, -2, -2, -2, -3, -3, -2, 1, 1, 1, 1, 1, 0, -1, -1, + 4, 5, 5, 5, 4, 3, 3, 2, 7, 7, 8, 8, 8, 7, 6, 5, + 2, 1, 2, 4, 4, 0, -4, -6, 1, 1, 2, 5, 5, 1, -5, -7, + 1, 2, 1, 4, 5, 1, -5, -8, 1, 1, 1, 5, 5, 0, -6, -8, + 0, 1, 1, 5, 6, 1, -6, -9, 0, 0, 1, 4, 5, 0, -5, -8, + 0, 0, 1, 4, 5, 0, -5, -7, 0, 0, 1, 4, 4, 1, -4, -7, + 1, 2, 3, 0, -3, -4, -3, -1, 1, 3, 4, 0, -3, -4, -3, -1, + 2, 4, 5, 1, -3, -4, -3, -2, 2, 5, 6, 1, -3, -5, -4, -2, + 3, 6, 6, 1, -3, -5, -4, -2, 3, 6, 6, 1, -3, -5, -4, -2, + 3, 6, 6, 1, -3, -5, -4, -2, 3, 5, 5, 1, -3, -4, -4, -2, + 2, 2, 2, 2, 1, 0, 0, -1, 4, 4, 4, 3, 2, 1, 1, 0, + 4, 5, 4, 4, 3, 3, 2, 1, 4, 4, 4, 4, 4, 3, 2, 2, + 2, 3, 3, 3, 3, 3, 2, 1, -1, -1, -1, -1, 0, 0, 0, 0, + -5, -6, -6, -5, -5, -4, -3, -3, -7, -9, -9, -8, -7, -6, -6, -5, + 6, 6, 6, 6, 6, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, + 0, -1, -1, -1, -2, -2, -1, -1, -3, -5, -6, -6, -6, -6, -5, -4, + -3, -5, -6, -7, -6, -6, -5, -4, -1, -2, -2, -2, -2, -2, -1, -1, + 0, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 1, -2, -5, -4, 0, 2, 5, 2, 1, -2, -6, -5, 0, 3, 5, + 2, 1, -2, -6, -6, -1, 3, 6, 3, 2, -2, -7, -6, 0, 4, 7, + 2, 1, -2, -7, -5, 0, 5, 7, 2, 1, -2, -6, -5, 0, 4, 7, + 2, 1, -2, -6, -4, 0, 4, 6, 1, 1, -2, -5, -4, 0, 3, 6, + -10, -9, -6, -4, -1, 2, 3, 2,-10, -9, -5, -3, 0, 4, 4, 3, + -9, -7, -3, -1, 2, 5, 5, 3, -7, -5, -2, 0, 3, 5, 5, 3, + -6, -3, 0, 1, 4, 6, 5, 3, -4, -2, 1, 2, 3, 5, 4, 2, + -2, 0, 1, 2, 2, 4, 3, 1, -1, 1, 2, 2, 2, 3, 3, 1, + -4, -5, -5, -6, -6, -6, -6, -5, -3, -3, -4, -4, -4, -4, -4, -4, + 0, 0, 0, 0, -1, -1, -1, -1, 5, 5, 6, 5, 5, 4, 3, 2, + 5, 6, 7, 7, 7, 6, 5, 4, 3, 3, 4, 4, 4, 4, 3, 2, + 0, -1, 0, 0, -1, -1, 0, -1, -3, -3, -4, -4, -4, -4, -3, -3, + 1, -2, -5, 1, 5, 4, 2, 0, 1, -3, -6, 1, 6, 5, 2, 0, + 0, -4, -7, 0, 6, 6, 2, 1, -1, -5, -9, -1, 6, 6, 3, 1, + -1, -6,-10, -2, 6, 6, 3, 1, -1, -6, -9, -2, 5, 6, 3, 1, + -2, -6, -9, -2, 5, 5, 3, 1, -2, -6, -7, -2, 4, 4, 2, 1, + -5, -7, -8, -9, -9, -8, -7, -6, -5, -6, -6, -7, -7, -6, -6, -5, + -3, -3, -3, -4, -5, -5, -4, -4, -1, 0, 0, -1, -1, -1, -1, -1, + 0, 1, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 5, 5, 5, 4, + 3, 4, 5, 6, 8, 8, 8, 7, 3, 4, 5, 6, 7, 7, 7, 6, + 5, 6, 7, 8, 9, 10, 10, 9, 3, 4, 6, 7, 8, 9, 9, 8, + 0, 1, 2, 3, 4, 5, 5, 5, -1, -2, -1, -1, 0, 1, 2, 2, + -2, -3, -3, -3, -3, -2, -1, 0, -3, -4, -5, -5, -5, -5, -5, -4, + -4, -5, -5, -6, -7, -7, -6, -5, -3, -4, -5, -6, -7, -7, -6, -6, + 13, 7, 0, -3, -3, -4, -4, -5, 14, 7, 0, -3, -3, -4, -4, -4, + 15, 8, -1, -4, -4, -4, -5, -4, 15, 8, -1, -4, -4, -5, -4, -3, + 15, 7, -1, -4, -5, -5, -5, -4, 14, 7, -1, -4, -4, -4, -4, -3, + 12, 6, -1, -4, -4, -4, -4, -3, 11, 5, -1, -4, -4, -4, -4, -3, + -17, -4, 5, 4, 4, 4, 3, 3,-18, -5, 5, 4, 4, 4, 3, 3, + -19, -5, 6, 4, 4, 4, 3, 2,-20, -5, 6, 4, 4, 4, 3, 3, + -20, -4, 6, 4, 4, 5, 3, 3,-19, -5, 6, 4, 4, 5, 3, 3, + -18, -4, 5, 4, 4, 4, 3, 2,-17, -5, 4, 3, 4, 4, 3, 3, + -6, -6, -6, -4, -2, 1, 6, 11, -6, -7, -7, -4, -2, 2, 8, 13, + -8, -8, -7, -4, -2, 3, 9, 14, -8, -8, -7, -5, -1, 4, 10, 16, + -8, -8, -7, -5, -1, 4, 10, 17, -8, -8, -7, -4, 0, 5, 10, 16, + -8, -8, -6, -3, 0, 4, 9, 15, -7, -7, -5, -3, 0, 4, 8, 12, + 8, 7, 7, 5, 2, -2, -8,-14, 8, 8, 7, 5, 2, -2, -8,-15, + 8, 8, 7, 5, 1, -3, -9,-16, 8, 8, 7, 5, 1, -3,-10,-17, + 8, 9, 8, 5, 1, -3,-10,-17, 8, 8, 7, 4, 1, -4,-10,-16, + 7, 7, 7, 4, 1, -3, -9,-14, 6, 7, 6, 3, 0, -3, -9,-13, + 5, 1, -4, -4, -3, -1, 0, 0, 7, 2, -3, -3, -2, -1, 1, 0, + 7, 1, -3, -3, -1, 0, 1, 1, 6, 1, -3, -2, -1, 1, 1, 0, + 6, 0, -4, -2, -1, 0, 1, 0, 5, 0, -4, -3, -1, 0, 0, -1, + 5, 0, -3, -1, 0, 0, 0, -2, 4, 1, -2, -1, 0, 1, 0, -1, + 2, 2, 1, 1, -2, -6, -8, -8, 1, 1, 1, 1, -2, -5, -8, -8, + 1, 1, 1, 0, -1, -3, -5, -5, 0, 0, 0, 0, -1, -1, -1, -2, + 0, -1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 2, 3, 2, + 2, 1, 1, 1, 2, 3, 4, 3, 3, 3, 3, 3, 4, 4, 5, 4, + -4, -4, -3, -2, 0, 0, 1, 1, -4, -4, -3, -2, -1, 0, 0, 1, + -2, -2, -2, -1, -1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, + 2, 2, 2, 2, 2, 2, 1, 1, 3, 4, 4, 4, 4, 4, 4, 3, + 1, 1, 1, 3, 3, 4, 3, 3, -5, -6, -5, -4, -3, -3, -2, -2, + -4, -2, -1, -1, -1, -1, 0, 1, -4, -2, -1, -1, -1, -1, 0, 1, + -3, -2, -1, -1, -1, 0, 1, 2, -4, -3, -2, -1, -1, 1, 3, 3, + -4, -3, -3, -1, -1, 1, 4, 5, -4, -3, -2, -2, -1, 1, 4, 7, + -2, -2, -1, -1, 0, 2, 6, 8, -1, 0, 0, 1, 1, 4, 7, 8, + -3, -3, -3, -2, -2, -1, -1, 0, -1, -1, 0, 1, 2, 2, 3, 3, + 0, 1, 2, 4, 5, 6, 6, 5, -1, 0, 2, 3, 5, 6, 5, 3, + -1, -1, 0, 2, 3, 3, 2, 1, -2, -2, -1, 0, -1, -3, -4, -4, + 0, 0, -1, -1, -2, -4, -8, -7, 1, 2, 1, 0, -1, -4, -6, -7, + -2, 4, 1, -6, 0, 3, 0, 0, -2, 5, 1, -7, 0, 3, 0, 0, + -3, 5, 1, -8, 0, 3, -1, -1, -2, 6, 1, -9, 0, 3, 0, -1, + -2, 6, 2, -8, 0, 4, 0, -1, -3, 5, 1, -7, 1, 4, 0, 0, + -2, 4, 1, -7, 0, 4, 1, 0, -1, 4, 1, -6, 0, 3, 1, 0, + 0, 0, 0, 3, 4, 5, 4, 1, 1, 1, 1, 2, 3, 3, 2, 0, + 2, 2, 1, 2, 2, 1, -1, -2, 4, 3, 1, 1, 0, -1, -3, -5, + 5, 3, 1, -1, -2, -3, -4, -6, 5, 3, 0, -2, -3, -5, -6, -7, + 4, 3, 0, -2, -3, -4, -5, -5, 4, 3, 0, -1, -2, -2, -3, -3, + 0, 0, 0, 0, -1, -5, -2, 6, 0, 0, 0, 1, -1, -6, -2, 8, + 0, 0, 0, 2, 0, -6, -3, 9, 0, -1, 0, 2, 0, -7, -2, 10, + 0, -1, 0, 2, -1, -8, -3, 10, 0, -1, -1, 2, -1, -7, -3, 9, + 0, -1, 0, 1, -1, -6, -3, 8, 0, 0, 0, 1, 0, -5, -2, 7, + 2, 3, 3, 2, 1, 0, -1, -1, 3, 4, 3, 2, 1, 0, -1, -2, + 3, 4, 4, 2, 1, -1, -2, -3, 2, 3, 3, 2, 0, -1, -2, -3, + -1, 0, 1, 1, 0, -1, -2, -2, -5, -4, -3, -1, 0, 1, 1, 1, + -8, -8, -5, -1, 1, 3, 4, 3,-10, -9, -5, 0, 3, 5, 6, 5, + -5, -1, 4, 5, 3, 1, 0, 0, -6, -1, 4, 5, 2, 0, -1, -2, + -6, -1, 5, 4, 2, -1, -2, -2, -7, -1, 4, 4, 1, -2, -3, -3, + -6, -1, 5, 4, 1, -2, -3, -3, -5, 0, 4, 4, 1, -1, -2, -2, + -4, 0, 5, 4, 1, -1, -1, -2, -3, 1, 4, 3, 1, -1, -1, -2, + -2, -3, -2, 1, 4, 6, 5, 3, -3, -4, -4, 0, 3, 5, 4, 2, + -3, -5, -5, -1, 2, 4, 3, 1, -4, -6, -4, -1, 2, 4, 2, -1, + -2, -4, -3, 1, 2, 4, 2, -1, -2, -4, -2, 1, 3, 3, 1, -2, + -2, -3, -2, 1, 3, 3, 1, -2, -2, -2, -1, 1, 3, 3, 0, -2, + -4, -4, -3, -2, -1, 2, 5, 7, -4, -4, -3, -3, -2, 1, 5, 7, + -2, -3, -2, -3, -3, -1, 3, 5, -1, -1, 0, -2, -3, -2, 2, 4, + 1, 1, 1, -1, -4, -3, 1, 3, 4, 3, 2, -1, -4, -3, -1, 1, + 6, 4, 3, 0, -3, -3, -2, 0, 6, 5, 3, 1, -2, -3, -2, -1, + 12, 11, 8, 4, 0, -2, -2, -1, 10, 9, 6, 2, -1, -2, -1, 0, + 4, 3, 2, 0, -1, -1, 0, 1, -1, -1, -1, -1, -2, 0, 1, 2, + -3, -5, -4, -2, -2, 0, 2, 3, -5, -5, -4, -2, -1, 0, 1, 2, + -5, -5, -4, -2, -1, 0, 1, 1, -4, -4, -3, -2, -2, -1, 0, 0, + 3, 3, 2, -1, -3, -4, -3, -2, 3, 2, 0, -2, -4, -4, -3, -2, + 2, 2, 1, -1, -3, -5, -4, -3, 3, 3, 3, 1, -2, -3, -3, -3, + 4, 4, 4, 3, 0, -2, -2, -2, 5, 5, 5, 3, 0, -1, -2, -2, + 5, 5, 4, 2, -1, -2, -3, -2, 3, 3, 3, 0, -2, -4, -4, -4, + -1, -1, 4, -2, -2, 6, 2, -5, -1, 0, 4, -2, -3, 6, 2, -6, + -1, 0, 4, -2, -3, 7, 3, -7, -1, -1, 4, -3, -4, 8, 3, -7, + 0, -1, 4, -3, -4, 7, 3, -6, -1, -1, 4, -3, -4, 7, 3, -6, + -1, -1, 3, -3, -4, 6, 3, -6, -1, 0, 3, -2, -3, 6, 3, -5, + 1, -2, -7, 2, 5, -2, -1, 1, 1, -2, -8, 3, 6, -3, -1, 2, + 2, -2, -9, 4, 7, -4, -2, 2, 3, -1, -9, 5, 7, -4, -1, 3, + 3, -1, -9, 4, 7, -4, -2, 2, 3, -1, -7, 4, 6, -4, -2, 1, + 2, 0, -6, 4, 6, -4, -1, 1, 2, 0, -5, 3, 4, -3, -1, 1, + -2, 2, 2, 0, 0, -1, -3, -4, -2, 2, 2, 1, 1, 0, -2, -4, + -2, 2, 2, 2, 2, 1, -1, -2, -3, 2, 3, 3, 4, 2, 0, -2, + -3, 2, 3, 2, 4, 2, 0, -3, -4, 1, 2, 1, 2, 1, -1, -3, + -5, 0, 1, 0, 1, 1, -2, -3, -4, 0, 0, 0, 1, 0, -2, -3, + 0, 0, -1, -2, -2, 2, 7, 8, 0, 0, -1, -3, -2, 1, 6, 7, + 0, 1, -1, -3, -3, 0, 4, 5, 0, 1, 0, -1, -1, 0, 1, 3, + 0, 2, 1, 1, 0, -1, 0, 1, -2, 0, 1, 2, 1, 0, -1, -1, + -5, -2, 0, 1, 1, 0, -3, -3, -6, -4, -1, 1, 1, -1, -3, -4, + -4, -2, 2, 5, 6, 4, 3, 2, -5, -3, 1, 4, 4, 2, 0, 0, + -4, -2, 0, 2, 1, -1, -2, -2, -2, -1, 0, 1, 0, -2, -3, -2, + -2, 0, 0, 0, -1, -1, -2, -1, -2, -1, -1, 0, 0, 0, 1, 2, + -2, -2, -1, -1, 0, 1, 3, 4, -2, -3, -2, -1, 0, 2, 4, 5, + 2, 1, -2, -2, -1, 0, 1, 0, 1, 0, -3, -3, -1, 0, 1, 0, + 0, -1, -3, -3, -1, 1, 1, 1, 0, 0, -3, -1, 1, 2, 3, 3, + 0, -1, -3, -1, 1, 3, 3, 3, -2, -2, -4, -2, 1, 3, 4, 4, + -3, -3, -4, -2, 1, 3, 3, 4, -2, -3, -5, -2, 1, 2, 3, 3, + 4, 5, 3, 4, 4, 4, 4, 5, 3, 3, 1, 0, 0, 0, 0, 1, + 1, 1, -1, -2, -3, -4, -3, -2, 2, 2, 0, -2, -2, -4, -3, -2, + 2, 3, 1, -1, -1, -3, -3, -2, 1, 2, 0, 0, -1, -2, -2, -1, + 0, 1, 0, -1, -1, -3, -2, -1, 1, 1, 0, -1, -1, -2, -2, -2, + -2, -1, -1, 0, 1, 2, 1, 0, 1, 2, 3, 5, 6, 5, 5, 3, + 1, 2, 3, 4, 5, 5, 4, 3, -2, -2, -3, -3, -2, -1, 0, 0, + -3, -3, -4, -5, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1, 0, 0, + 0, 1, 0, -1, -1, 0, 0, 1, -1, 0, -1, -2, -3, -2, -2, -1, + 7, 7, 6, 5, 4, 2, -1, -2, 3, 3, 2, 2, 1, 0, -2, -3, + 0, -1, -1, -1, 0, -1, -2, -2, -1, -3, -2, -1, 0, 0, 0, 1, + 0, -2, -2, -1, -1, 1, 2, 2, 3, 1, -1, -1, -1, 1, 2, 2, + 3, 1, -2, -3, -2, -1, 1, 2, 1, -2, -5, -6, -5, -3, -2, 0, + 0, -1, -2, -3, -1, 0, -2, -2, 0, 0, -1, -1, 0, 1, -1, -2, + 0, 0, -2, -1, 0, 0, 0, -2, -1, -2, -3, -3, -2, -1, -3, -3, + -1, -2, -3, -3, -2, -2, -3, -4, 2, 2, 0, 0, 0, 0, -1, -2, + 5, 5, 3, 2, 2, 2, 0, -1, 8, 8, 6, 5, 4, 4, 2, 1, + -7, -8, -6, -3, -1, -1, -2, -1, -5, -5, -3, 0, 2, 1, 0, 0, + -1, -1, 0, 3, 4, 3, 1, 1, 2, 1, 1, 3, 4, 3, 2, 2, + 3, 2, 0, 2, 3, 2, 1, 2, 4, 2, -1, -1, 0, 1, 1, 1, + 3, 2, -2, -3, -2, -1, 0, 1, 3, 1, -3, -4, -3, -2, 0, 1, + -4, -2, -1, 2, 3, 3, 1, 0, -7, -5, -4, -2, 0, 0, -1, -2, + -6, -5, -5, -4, -2, -2, -2, -3, -1, 0, -1, -1, 0, 0, 0, -1, + 2, 3, 2, 2, 2, 2, 1, 0, 3, 5, 4, 3, 1, 0, 1, 0, + 3, 4, 3, 2, 0, -1, -1, -1, 5, 5, 3, 1, 0, -1, -1, -1, + 1, 1, 0, -1, -3, -5, -6, -4, 1, 1, 0, 0, 0, -3, -3, -1, + 0, -1, -1, 0, 1, 0, 1, 3, -2, -2, -3, -1, 2, 2, 4, 7, + -2, -2, -2, 0, 2, 2, 3, 6, -1, 0, 0, 1, 1, 0, 0, 3, + 0, 3, 3, 3, 1, -2, -3, -1, 1, 3, 4, 3, 0, -3, -5, -4, + 0, 2, 0, -1, -3, -4, -2, -2, 1, 4, 2, 0, -2, -3, -2, -1, + 3, 6, 3, 1, -2, -2, 0, -1, 4, 7, 4, 1, -2, -3, -1, 0, + 3, 6, 3, 0, -3, -3, -1, 0, 1, 3, 0, -1, -3, -2, 1, 1, + 0, 1, -1, -2, -3, -1, 2, 2, -2, -1, -3, -3, -3, -1, 1, 2, + 3, 1, -1, 0, 1, 0, 0, 0, 2, -1, -2, -1, 1, 0, -1, -1, + 1, -1, -2, 0, 1, 0, -2, -3, 0, -2, -1, 1, 3, 1, -3, -5, + 0, -2, -1, 2, 5, 2, -3, -5, 0, -2, -1, 4, 6, 3, -2, -5, + 0, -2, 0, 4, 7, 4, -2, -4, 0, -2, 0, 4, 6, 4, -2, -4, + -2, -2, -3, -4, -3, -2, -1, 0, 1, 1, 0, -1, -1, -1, 0, 1, + 3, 3, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 0, 0, 1, + 0, 0, 0, 0, -1, -1, -1, -1, -4, -4, -4, -4, -4, -4, -4, -3, + -3, -3, -2, -3, -2, -1, -1, 0, 3, 4, 4, 5, 5, 6, 6, 7, + -1, -2, 7, -2, -4, -1, -1, 0, -1, -2, 9, -1, -4, -1, -1, 0, + -1, -3, 10, -1, -4, -1, -1, 1, -1, -3, 10, -2, -3, -1, -1, 2, + -1, -2, 10, -2, -4, -1, -1, 2, -1, -2, 9, -2, -4, -1, -1, 2, + -1, -2, 8, -2, -4, 0, -1, 1, 0, -2, 7, -2, -3, -1, 0, 2, + 3, -4, 1, 3, -3, -2, 1, 0, 3, -5, 1, 4, -3, -2, 1, 0, + 3, -6, 2, 5, -3, -1, 3, 0, 3, -6, 2, 5, -3, -1, 2, 0, + 3, -6, 1, 5, -4, -2, 3, 0, 3, -6, 1, 5, -3, -2, 2, 0, + 2, -6, 1, 4, -3, -1, 1, 0, 2, -6, 1, 4, -2, -1, 1, 0, + 0, 0, 1, 1, 1, 0, 0, 2, 0, -1, 1, 1, 1, 0, 0, 2, + 0, -1, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0, -1, 0, + 1, 0, 1, 0, 0, -1, -2, -1, 3, 1, 1, 0, 0, -2, -4, -3, + 5, 3, 2, 1, 0, -3, -5, -4, 5, 4, 2, 0, -1, -4, -5, -5, + 1, 0, -1, -2, -2, -3, -6, -9, 2, 0, -1, -1, 0, 0, -3, -6, + 1, 0, 0, -1, 0, 0, -2, -5, 2, 1, 1, 1, 1, 2, -1, -3, + 1, 1, 2, 1, 2, 2, 1, -1, 1, 1, 2, 1, 1, 1, 1, 1, + 0, 0, 2, 1, 0, 0, 2, 2, 0, 1, 2, 2, 0, 0, 2, 2, + -4, -3, 0, 1, 4, 6, 4, 3, -3, -2, 0, 0, 2, 4, 1, 0, + -1, -1, 0, 0, 1, 1, -2, -3, 1, 1, 1, 0, 1, 1, -3, -5, + 1, 1, 1, 0, 1, 1, -3, -5, -1, 0, 0, -1, 1, 1, -2, -4, + -1, 0, 0, -1, 1, 2, 0, -2, -1, 0, 0, 0, 2, 3, 1, 0, + -1, 0, 3, 4, 0, -4, -5, -5, 0, 0, 4, 5, 2, -2, -3, -2, + 0, -1, 2, 4, 2, -1, -1, 0, 0, -2, -1, 1, 0, -2, 0, 1, + 1, -2, -2, 0, 0, -1, -1, 1, 1, -2, -3, 0, 1, 0, -1, 0, + 1, -2, -2, 1, 3, 1, 0, 0, 1, -2, -1, 2, 4, 2, 0, 0, + 1, 2, 3, 2, 0, 2, 2, 1, -1, 0, 1, 0, -3, 1, 1, 1, + -1, 0, 0, -2, -4, 0, 2, 1, -1, 2, 2, -1, -5, 0, 2, 1, + -1, 3, 4, -1, -5, 0, 2, 1, -2, 2, 4, 0, -4, -1, 0, 0, + -4, 0, 2, 0, -4, -2, 0, 0, -5, -1, 2, 1, -2, 1, 3, 2, + 1, 0, 1, 0, 1, 2, -1, -2, 2, 0, -1, -2, 1, 3, 0, -1, + 3, 0, -2, -4, 0, 3, 1, 0, 5, 1, -3, -5, -2, 2, 1, 1, + 6, 1, -2, -5, -2, 1, 0, 1, 5, 1, -1, -5, -2, 0, -1, 0, + 3, 0, -2, -4, -2, 0, -1, 0, 1, -1, 0, -2, 0, 1, 0, 1, + 1, 1, 2, 3, 2, 1, 1, 2, -1, -1, 0, 1, 1, 0, 1, 1, + -4, -3, 0, 0, 1, 1, 1, 2, -4, -3, 0, 2, 2, 2, 3, 2, + -5, -4, 0, 1, 1, 1, 1, 2, -5, -4, -1, -1, -2, -2, -1, 0, + -3, -2, 0, 0, -2, -3, -2, -1, 2, 3, 4, 4, 2, 0, 0, 0, + -4, -2, 0, 1, 0, 0, 0, 0, -3, -1, 1, 1, 0, 0, 0, 0, + -2, 0, 2, 2, 0, 0, 0, 2, -1, 1, 2, 1, -1, 0, 3, 5, + 0, 2, 1, -1, -2, 0, 5, 6, 0, 1, 0, -3, -3, 0, 4, 6, + 1, 1, -2, -4, -4, -3, 1, 2, 1, 0, -2, -4, -5, -4, -2, 0, + -1, -3, -3, -3, -3, -2, -1, -1, 3, 2, 1, 0, 0, 1, 1, 1, + 5, 4, 3, 2, 1, 1, 2, 2, 2, 1, 0, -2, -2, -2, -1, -1, + 0, 0, 0, -1, -2, -2, -2, -2, 0, 1, 3, 3, 2, 1, -1, -1, + 0, 1, 3, 4, 3, 2, 1, -1, -4, -3, -1, 1, 0, -2, -3, -3, + -3, -4, -7, -8, -7, -4, -1, 2, 0, -1, -3, -4, -4, -2, 0, 2, + 1, 0, 0, -1, -3, -2, 0, 2, 2, 1, 1, 0, -1, -1, 0, 2, + 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 2, 3, 3, 2, 2, 0, 0, 1, 3, 4, 4, 3, 2, + 3, 3, 3, 0, -1, 0, 1, 2, 1, 1, 1, -1, -2, -1, -1, 1, + -2, -2, -1, -3, -3, -2, -2, 0, -4, -4, -2, -2, -2, -2, -3, 0, + -4, -4, -1, 1, 1, 0, -1, 2, -3, -1, 2, 3, 4, 3, 3, 5, + -2, 0, 2, 3, 3, 3, 3, 3, -2, -2, 0, 0, 0, 0, 0, 1, + 0, 2, 1, -1, -3, -1, 3, -2, -1, 0, -1, -1, -3, 0, 4, -2, + -2, -2, -2, -2, -2, 1, 5, -2, -3, -2, -3, -1, -2, 1, 4, -3, + -2, 0, -1, 0, -1, 0, 3, -5, 1, 2, 1, 2, 0, 0, 2, -5, + 2, 4, 2, 3, 1, 1, 3, -3, 1, 2, 1, 1, 0, 1, 4, -2, + 4, -3, -4, -1, 3, 3, 1, 3, 4, -4, -4, -1, 3, 2, 0, 2, + 4, -3, -4, 0, 2, 2, -1, 1, 4, -3, -2, 1, 2, 1, -2, 0, + 2, -4, -2, 1, 2, 0, -3, 0, 2, -3, -2, 0, 1, 0, -2, 2, + 3, -1, -1, 0, 0, 0, 0, 3, 2, -2, -2, -2, -1, -1, -1, 2, + 2, 2, 3, 4, 3, 1, 0, -1, 1, 0, 1, 2, 1, -1, -2, -2, + 2, 1, 2, 1, 1, 0, -1, -1, 4, 3, 4, 3, 2, 1, 1, 1, + 3, 2, 2, 2, 1, 1, 1, 1, -1, -2, -1, 0, -1, -1, -1, -1, + -3, -3, -2, -1, -2, -2, -2, -2, -4, -4, -3, -3, -4, -4, -3, -3, + 2, 1, -1, -3, -4, -2, 3, 4, 2, 2, 1, -1, -3, -2, 1, 2, + 1, 2, 3, 3, 0, -2, -1, -2, -1, 0, 2, 4, 2, 0, -1, -3, + -2, -2, 0, 3, 3, 2, 0, -3, 0, -2, -3, -1, 1, 2, 2, -1, + 3, -1, -4, -5, -3, 0, 2, 0, 6, 3, -2, -6, -5, 0, 3, 1, + -2, 3, -2, 0, 3, -2, -2, 1, -3, 4, -3, 0, 3, -2, -1, 2, + -3, 5, -3, 0, 4, -2, -1, 2, -2, 4, -4, -1, 3, -3, -2, 2, + -3, 4, -3, 0, 3, -3, -1, 2, -2, 5, -2, 0, 3, -3, -1, 2, + -2, 4, -3, 1, 3, -2, -1, 2, -2, 3, -2, 1, 3, -2, 0, 2, + 1, 0, 0, -1, 1, 2, -4, -1, 2, 0, 0, -1, 1, 2, -4, -2, + 1, 1, 1, -1, 2, 4, -2, 0, 0, -1, 1, -1, 2, 5, -1, 1, + 0, -1, 0, -2, 1, 5, -1, 1, 0, -1, -1, -2, 0, 3, -3, -1, + 1, 1, 0, -2, 0, 3, -3, -1, 1, 1, 0, -3, 0, 3, -2, 0, + 1, 0, -1, 1, 1, 2, 4, 5, 1, 0, -1, 1, 1, 1, 5, 7, + 0, 0, -2, -1, -1, 0, 3, 5, 0, -1, -2, -1, -1, -1, 2, 3, + 0, -1, -3, -1, -1, -1, 1, 2, -1, -2, -4, -2, -2, -2, 0, 0, + -1, -2, -2, -1, -2, -2, 0, 0, 0, -1, -1, 0, -1, -1, 0, 0, + 3, 3, 0, -1, -1, 1, 4, 4, 2, 3, 0, -2, -2, 0, 1, 1, + 2, 3, 1, -1, -1, 0, 1, 0, 1, 2, 0, -1, -1, -1, 0, -2, + 0, 1, 0, -1, -2, -1, 0, -2, 0, 1, 0, -1, -2, -1, 1, 0, + 1, 1, -1, -3, -4, -3, 1, 3, 1, 2, -1, -3, -5, -4, 1, 3, + -3, -2, 0, 1, 1, 1, 0, -2, 0, 1, 1, 1, 0, 0, -1, -3, + 1, 2, 1, 1, 0, -1, -1, -2, 0, -1, -3, -1, -1, -1, 0, -1, + 0, -3, -6, -3, -2, -1, 1, 1, 2, -1, -4, -3, -2, 0, 2, 2, + 5, 4, 1, 1, 0, 1, 3, 2, 5, 4, 2, 1, 0, -1, 0, 1, + -2, 0, -2, -5, -6, -3, 0, 0, -2, 0, 1, 0, -1, 1, 2, 2, + -2, 0, 1, 3, 2, 2, 2, 1, -2, 0, 2, 4, 3, 2, 1, 1, + -2, 0, 2, 3, 2, 0, -1, 0, -3, -1, 1, 1, 0, -1, -1, 1, + -4, -1, 1, 0, -1, -2, 0, 2, -4, -1, 0, -1, -1, -2, 1, 4, + -3, 0, 0, -1, 1, 1, 1, 0, -3, 1, 0, -1, 0, 0, -1, -1, + -1, 3, 3, 0, 1, 0, 0, 1, -3, 2, 2, -2, -1, 0, 0, 1, + -5, 0, 0, -2, -1, 1, 0, 2, -7, -2, 1, 0, 1, 2, 2, 2, + -5, 0, 3, 2, 3, 3, 2, 2, -3, 2, 4, 1, 0, 0, -2, -3, + 5, 2, -2, -2, 0, -1, -1, -1, 2, -1, -4, -3, -1, -2, -1, -1, + 0, -2, -2, 1, 2, -1, 0, 1, -1, -2, -1, 3, 3, -1, 0, 2, + 1, 0, 0, 3, 3, -2, -1, 2, 2, 1, 1, 3, 2, -2, -2, 0, + 1, 0, -1, 1, 1, -3, -3, -2, 1, 0, 1, 2, 3, 0, 0, 0, + -4, -5, -3, 0, 1, -1, -2, -1, -2, -3, -1, 1, 2, 0, 0, 0, + 1, 1, 2, 1, 2, 1, 1, 1, 3, 4, 3, 1, 0, -2, -1, -1, + 3, 3, 2, 0, -2, -3, -3, -2, 1, 1, 0, -1, -2, -4, -2, -2, + 2, 1, 0, 0, 0, -1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 3, + 0, 0, 0, -1, -2, -1, 1, 0, -2, -1, -1, -2, -3, -2, 0, 0, + -1, 0, 0, -1, -2, 0, 1, 1, 1, 1, 0, -1, -1, 1, 3, 1, + 2, 2, 0, -2, -1, 2, 3, 0, 3, 1, -1, -1, 1, 4, 2, -2, + 2, 0, -3, -1, 3, 5, 0, -5, 1, -1, -2, 0, 3, 3, -1, -6, + -1, 0, 3, 4, 2, 0, 1, 2, -2, -1, 0, 1, -1, -2, 0, 1, + -2, -3, -2, -3, -6, -7, -6, -3, 2, 2, 3, 1, -1, -2, -3, -2, + 2, 2, 3, 1, 0, 0, 0, 0, 2, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 0, 0, 0, 1, 1, 2, 1, 0, -1, 0, 0, 2, 2, 1, + 1, 1, 3, 1, -1, -1, -1, 1, -2, -1, 0, 0, -2, -2, -1, 2, + -2, -2, 1, 1, 1, 0, 1, 3, -2, -2, 0, -1, 0, -1, 0, 2, + 0, 0, 1, 0, -1, -1, -2, 1, 3, 2, 2, 1, 0, -2, -2, 1, + 5, 3, 3, 2, 1, 1, 1, 4, 0, -3, -4, -5, -4, -3, -1, 1, + -6, -4, -1, 2, 2, 0, 0, -1, -4, -2, 1, 3, 3, 2, 2, 0, + -3, -2, -1, 2, 3, 3, 2, 0, -3, -2, -2, 1, 2, 1, 1, -1, + -2, -2, -2, 0, 2, 2, 1, -1, -1, -1, -1, 1, 2, 3, 2, 0, + -1, -1, -2, 1, 2, 2, 2, -1, 0, -1, -2, 0, 2, 1, 0, -1, + 6, 4, 2, 1, 0, 0, 0, 1, 4, 2, -1, -2, -2, -2, -1, -1, + 2, 1, -1, -2, -2, -2, -2, -1, 2, 2, 0, -2, -2, -2, -1, 0, + 0, 0, -1, -2, -2, -1, 0, 1, -3, -3, -2, -1, -1, -2, -1, 0, + -3, -2, 2, 3, 2, 0, -1, -2, -2, 0, 4, 5, 5, 2, 0, -1, + 5, 4, 2, 0, -1, -2, -1, -1, 4, 3, 2, 1, 0, -1, 0, -1, + 1, 1, 0, 1, 1, 0, 1, -1, -2, -1, -1, 0, 0, -2, -2, -3, + -1, 0, 0, 0, -1, -3, -3, -5, 0, 1, 1, -1, -1, -2, -2, -3, + -1, -1, -1, -2, -1, 1, 3, 1, -1, -2, -2, -1, 2, 5, 6, 5, + -3, -3, -2, 1, 1, -2, -1, -1, 1, 2, 3, 4, 1, -3, -1, -3, + 3, 2, 0, 1, -1, -3, -1, -3, 1, 0, -1, 0, -1, -1, 1, 0, + 1, 1, 0, 1, 2, 2, 5, 3, 1, 1, 1, 2, 2, 2, 3, 0, + -3, -1, -2, -2, -3, -3, -1, -3, -1, 1, 1, 0, -1, -1, 0, -2, + 2, 0, -2, -2, 2, 4, 1, -2, 1, 0, -2, -1, 3, 5, 2, -1, + -1, -2, -3, -2, 1, 3, 1, -2, -1, -2, -1, -1, 0, 2, 1, -1, + 0, 0, 1, 1, 1, 2, 2, 0, 0, 1, 4, 4, 2, 2, 3, 1, + -2, -1, 2, 1, -2, -3, -2, -3, -1, 0, 1, 0, -3, -4, -4, -5, + 4, 0, -3, -4, -4, -4, -2, -1, 5, 0, -1, 0, -1, -3, -2, -1, + 4, 0, 0, 1, 1, 0, 0, 0, 0, -3, -2, -1, 0, 0, 1, 0, + 0, -2, 0, 0, 1, 1, 2, 1, 2, 0, 0, 0, 1, 1, 1, 0, + 2, 0, -1, -1, 1, 1, 1, 0, 1, -1, -2, -2, 0, 2, 2, 2, + -3, -5, -2, 0, -1, -3, -3, 0, 0, -2, 0, 2, 2, 0, 0, 3, + 2, -1, -2, 0, 0, -1, -1, 2, 5, 2, -1, -1, -1, -1, -1, 2, + 5, 2, 0, -1, -1, 0, -1, 2, 2, 1, 0, 0, 0, 1, 0, 2, + -1, -1, 1, 1, 2, 2, 1, 2, -3, -2, 0, 0, 0, 0, -2, -1, + 0, 3, 2, 0, -2, -3, -3, -3, 0, 3, 3, 1, 0, 0, 1, 2, + -1, 0, -1, -2, -1, -1, 1, 3, -1, 0, -1, -2, -1, -1, 0, 2, + -1, 0, -1, -2, 0, 0, -1, 2, -1, 0, -1, -2, -1, -1, -2, 1, + 0, 1, 0, -3, -1, -1, -1, 2, 5, 5, 2, -1, -1, -1, 1, 3, + 0, 0, 1, -1, -3, -2, 0, 2, 1, 1, 3, 0, -2, -2, 0, 1, + 1, 1, 3, 1, 0, 0, -1, -1, 0, -1, 2, 1, 1, 0, -1, -3, + -1, -2, 1, 1, 1, 0, -2, -4, -1, 0, 2, 1, 1, 0, -1, -3, + 1, 1, 3, 2, 1, 0, -2, -3, 2, 2, 4, 2, 1, -1, -2, -4, + 1, 2, 2, 2, 0, -2, 0, 2, -1, -1, -2, -3, -4, -5, -3, 1, + 0, 1, 1, 0, -1, -1, -1, 1, 0, 1, 1, 1, 0, 0, 0, 2, + 0, 1, 1, 2, 1, 1, 1, 2, -1, -1, 0, 2, 2, 2, 2, 3, + -2, -4, -4, -1, -2, -2, -2, 0, 1, 0, 0, 1, 0, 0, 0, 1, + 0, -1, -3, -2, 0, 2, 2, 1, 0, -1, -2, -3, 0, 1, 1, 2, + 1, 0, -2, -3, -1, 0, 0, 1, -1, 0, -1, -2, 0, 0, -1, 0, + -1, 1, 1, 0, 2, 2, 0, 0, 0, 2, 3, 1, 3, 5, 3, 2, + -1, 1, 1, -2, 0, 3, 1, 1, -1, 0, 0, -4, -4, -1, -1, -1, + -1, 1, 1, 0, 1, 2, 1, 2, -3, 0, 1, 0, 1, 1, 0, 2, + -5, -3, -1, -1, 0, 1, 0, 1, -4, -3, -2, -3, -2, -1, -1, 0, + 0, 0, -1, -2, -2, -2, -2, 0, 3, 4, 2, 0, 0, 0, 0, 1, + 2, 1, 0, 0, 0, 0, -1, 0, 0, 1, 2, 3, 4, 4, 3, 2, + -1, 4, 7, 4, 0, 0, 0, 0, -1, 4, 6, 3, 0, 1, 1, 1, + 0, 3, 4, 0, -1, 0, 0, 1, 0, 1, 1, -2, -1, 0, -1, -1, + -1, 0, -1, -1, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, + -1, -3, -3, 0, 1, -1, -2, -1, -3, -4, -4, -2, -1, -2, -2, -1, + 2, 2, 1, 0, 1, 1, 0, -3, -2, -1, 0, 0, 1, 1, 0, -3, + -2, -1, 0, 1, 2, 1, 1, -2, 1, 2, 2, 2, 3, 3, 2, -1, + 1, 2, 1, 0, 1, 1, 2, -1, 0, 1, -2, -4, -2, 0, 1, -1, + 1, 1, -1, -3, -2, 0, -1, -3, 1, 2, 0, -1, 0, 1, -1, -4, + -1, -1, -2, -2, 0, 3, 4, 3, 1, 1, -1, -3, -2, 0, 0, 0, + 2, 2, 2, 2, 2, 1, -1, -1, 1, 1, 1, 3, 3, 0, -2, -2, + 0, -1, -1, -1, 0, -2, -1, -1, -1, -3, -4, -3, -2, -2, 0, 2, + -1, -1, 0, 1, 2, 2, 3, 5, -2, -1, -1, 0, 0, 0, 0, 1, + -2, -3, 2, 0, 0, 1, 1, -1, -1, -4, 1, -2, -1, 2, 2, 0, + 1, -4, 0, -2, -2, 1, 1, -1, 2, -3, 1, -1, -1, 1, 1, -1, + 3, -2, 3, 1, 0, 1, 1, -1, 1, -3, 2, 1, 0, 1, 0, -1, + -1, -5, 1, 0, -1, 0, 1, 1, 0, -3, 3, 3, 1, 2, 3, 3, + 0, -1, -2, 1, 5, 5, 2, -1, 1, -1, -2, -1, 1, 1, -2, -5, + 1, 1, -1, -2, -1, -1, -1, -3, 1, 1, -1, -1, -1, 2, 4, 3, + -1, -1, -1, -1, -1, 0, 4, 3, -1, -1, 0, 1, -1, -3, -1, -1, + 0, 0, 0, 2, 2, 0, 0, -1, 0, -2, -3, 0, 1, 1, 3, 2, + 2, 3, 2, 1, 0, 0, -2, -2, 2, 3, 0, 1, 1, 3, 3, 2, + 0, 0, -3, -1, -1, 2, 2, 3, -2, -2, -3, 1, 1, 2, 1, 1, + -2, -1, -2, 2, 1, 1, -1, -2, 0, 1, 0, 2, 0, 0, -2, -2, + 0, 1, 0, 2, 0, 0, -2, -2, -3, -2, -2, 0, -1, -2, -2, -3, + 0, 1, -1, 3, -1, 1, 3, -1, 0, 1, -1, 3, -1, -1, 2, -3, + 1, 1, -2, 3, -1, -3, 0, -3, 2, 2, -2, 3, 0, -2, 1, -2, + 1, 1, -3, 3, -1, -2, 1, -3, 1, 1, -3, 3, 0, -1, 1, -2, + 1, 2, -1, 4, 0, -1, 1, -2, 0, 1, -1, 3, -1, -3, 0, -3, + -3, -3, -1, 1, 2, 1, -1, -2, -2, -2, 0, 2, 1, 0, -2, -2, + -3, -2, 1, 2, 1, -1, -2, -1, -3, -2, 2, 4, 0, -2, -2, 1, + -3, -1, 2, 4, 0, -2, -2, 2, -1, 1, 4, 3, -1, -3, -2, 2, + 0, 2, 4, 2, -1, -2, -1, 2, 0, 1, 2, 0, -1, 0, 1, 3, + 3, 0, -5, 1, 4, 0, 0, 1, 1, -2, -5, 2, 5, -1, -2, 1, + -1, 0, 0, 3, 3, 1, 0, -1, -2, 3, 4, -2, -3, -1, 0, -2, + -3, 3, 5, -3, -3, 0, 0, -2, -1, 3, 2, -2, -2, 2, 2, -1, + 2, 0, 0, -1, 0, 0, 0, 0, 0, -3, -2, 1, 3, 0, -2, -2 +}; + +/* list of codebooks for inter-coded vectors */ +const int8_t* const ff_svq1_inter_codebooks[6] = { + svq1_inter_codebook_4x2, svq1_inter_codebook_4x4, + svq1_inter_codebook_8x4, svq1_inter_codebook_8x8, + NULL, NULL, +}; + +/* 6x16-entry codebook for intra-coded 4x2 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_intra_codebook_4x2)[768] = { + 12, 13, 13, 11, -7,-10,-15,-17,-16,-15,-12,-10, 11, 15, 15, 12, + 2, 17, 20, 15,-45,-24, 2, 13, 21, 20, -6,-36, 12, 16, -1,-27, + -18,-21, 10, 45,-11,-20, -7, 21, 43, -8,-28, 0, 33,-16,-28, 3, + -12,-18,-18, -6,-20,-10, 28, 55, -5,-18,-21,-18, 56, 30, -6,-20, + -34, 27, 29,-22,-30, 29, 26,-25, 30, 34, 33, 26,-25,-31,-35,-33, + -31,-35,-36,-32, 29, 36, 37, 31,-71,-12, 38, 34,-63, -1, 42, 33, + 58, 37,-31,-60, 55, 34,-33,-61,-57,-57, 22, 93,-57,-58, 21, 93, + 59, 69, 70, 62,-63,-68,-68,-60,-64,-71,-71,-64, 63, 73, 72, 62, + -2, 0, 7, 15,-11,-10, -3, 5, -5, -8,-10,-10, 1, 9, 14, 9, + 15, 8, -4,-11, 12, 2,-11,-12, -8, 0, 19, 28, 4, -1,-15,-26, + -15, 27, 2,-14,-14, 22, 1, -9, -4, -6,-13,-10, -6,-14, 6, 47, + -35,-20, 6, 23, 6, 9, 6, 4, -6, 2, 23,-22, -7, 4, 28,-21, + 20,-22, -2, 6, 22,-28, -5, 8,-10,-18,-16,-12, 36, 19, 2, -1, + -3, 0, 4, 8,-45,-10, 23, 23, 40, 15,-20,-35, -4, -1, 4, 1, + 9, -5,-33, 24, 8, 3,-26, 19, -1, 4, 6, -3, 32, 25,-13,-49, + 24, 24, 15, 7,-17,-27,-19, -7,-47, 0, 39, 24,-21, -6, 7, 4, + -1, 0,-10,-13, 1, 1, 5, 16, 20, 5, -3, -9, -1, -4, -2, -6, + -17, -7, 1, 4, 12, 7, 0, 0, 3, 0, 12, 11, -3, 1, 0,-23, + 4, 17, -6, 0, 6, 3,-25, 0,-17, 10, 8, 5,-14, 4, 1, 4, + 13, 10, 4, 2,-23, -9, 1, 2, 3, -3, 1, 7, 1,-23, -7, 20, + -7,-18, 2, 12, -5, -4, 10, 9, 4, 10, 7,-24, 6, 3, 4,-10, + 22,-14,-22, 6, 0, 5, 5, -1, -4, 3,-11, -4, -7, 31, 7,-14, + -5,-16, -1, 42, -4, -2, -9, -5, 5, -8, -6, -3, 42, -4,-21, -5, + -18, 12, 20,-12, 13,-13,-10, 7, -8, -9, -2,-18,-16, 6, 40, 8, + 10, -1, 0, 4, -3, 4, -1,-13, -2, 6, 1,-15, 5, 3, 1, 2, + -4, -2, 1, 3, 15, 0, -9, -4, -3, -4, -4, -4, -3, 5, 16, -3, + 2, 13, 3, 4, -3, -8,-10, 0, -6, -2, -4, -1, -2, -3, -6, 23, + 6, -6, 7, 1, 4,-18, 5, 1, -1, 1,-15, 14, -5, 6, -4, 4, + 2, 2, 2, 6,-24, 2, 7, 3,-26, 0, 3, 3, 5, 7, 1, 6, + 14, -2,-18, -3, 7, 5, -4, 2, -6, 3, 32, 1, -6, -6, -6,-12, + 5,-36, 7, 6, 9, -1, 11, 0, 4, 4, 5, 3, 4, 15, 3,-38, + 10, 23, -5,-42, 0, 4, 4, 4, 23, 17, -6,-13,-13,-37, 1, 29, + 5,-14, -1, 1, 5, 0, 3, 1, 0, 4, -5, 2, 8, 0, 0,-10, + 4, 7, -2, -3,-10, 3, 1, 1,-12, -1, 13, 3, 0, -1, 1, -3, + 0, -1, 3, 1, -6, -9, 3, 9, -6, 1, -4, -6, 8, -1, 0, 8, + -3, -3, 0, 18, -5, -1, -4, -1, -8, -2, 3, -4, 0, 17, -1, -5, + 5, -2, 9,-10, 1, -5, 6, -5, 4, 2, 2, 3, 10,-14, -8, 1, + -1, -2,-18, -1, -1, 20, 1, 2, -1, 1, -9, 1, -1, -9, 22, -4, + 6, -4, 8, -3, -1, 7,-19, 5, -7, 31, -4, -4, -6, 0, -5, -5, + -7, -8,-19, -4, 1, 1, 4, 32, 38, -1, -8, 4, -7, -8, -6,-12, + -1, 0, -7, 1, -1, 9, -1, 0, 9, -1, -1, 0, 2, -6, 1, -3, + -12, 0, 2, 1, 1, 1, 8, 0, 9, 1, 0, 2, -2, 1,-11, 0, + 0, 8, 2,-10, -1, 2, -1, 0, -2, -4, 0, -5, -2, -1, -1, 14, + -3, 7, -1, 5, 0,-10, 1, 1, -1, -5, 14, -1, -2, 1, -3, -2, + -6, 0, 0, 6, 2, 3, -9, 4, 4, -5, -1, -1, -7, 3, 8, -1, + 2, -4, -1,-11, 11, 2, 1, 0, -1, 2, 3, 9, 0, 2, 0,-15, + 3, 5,-20, 3, 3, -1, 3, 3, 1, -1, 16, 1, 2,-29, 9, 2, + -13, -6, -1, -3, 36, -1, -8, -3, 2, 5, 4, 2,-37, 9, 11, 3 +}; + +/* 6x16-entry codebook for intra-coded 4x4 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_intra_codebook_4x4)[1536] = { + -11, -3, 3, 6,-10, -1, 5, 7, -9, -1, 6, 7, -9, -1, 4, 6, + 5, 7, 0,-14, 6, 9, 2,-15, 6, 9, 2,-15, 4, 6, 0,-14, + 16, 3, -5, -6, 16, 1, -8, -8, 14, -1, -9, -9, 12, 0, -8, -8, + 8, 12, 16, 17, -2, 2, 6, 9,-10, -8, -4, 0,-15,-14,-11, -7, + -7,-10, -2, 16, -7,-11, -3, 18, -7,-11, -1, 20, -6, -8, 1, 19, + -9,-13,-16,-17, 2, -2, -7, -9, 11, 8, 4, -1, 16, 15, 11, 7, + -22, -2, 13, 15,-24, -2, 14, 16,-25, -4, 13, 15,-25, -6, 10, 13, + 26, 26, 22, 16, 17, 15, 9, 3, -2, -6,-11,-14,-20,-25,-28,-28, + -27,-27,-25,-21,-16,-15,-11, -7, 3, 8, 12, 13, 23, 28, 31, 30, + 20, 16, -7,-33, 22, 19, -6,-35, 22, 19, -6,-34, 20, 17, -6,-32, + -20,-20, 2, 38,-21,-22, 2, 40,-21,-22, 2, 40,-20,-20, 3, 38, + -47, -4, 24, 26,-50, -3, 26, 27,-50, -3, 26, 27,-47, -4, 24, 26, + 45, 6,-23,-27, 48, 5,-25,-28, 48, 5,-26,-28, 44, 6,-24,-27, + -30,-36,-10, 76,-31,-37,-11, 78,-31,-37,-11, 78,-31,-36,-10, 77, + -53,-32, 35, 52,-54,-34, 36, 52,-54,-34, 36, 52,-53,-33, 34, 51, + -93,-34, 62, 65,-93,-34, 62, 66,-93,-34, 62, 65,-93,-34, 60, 64, + -7, 0, 2, 2, -8, -1, 3, 3, -8, 0, 4, 5, -6, 1, 5, 5, + 3, 7, 11, 11, 2, 2, 3, 3, 1, -2, -6, -7, 1, -5,-11,-13, + 3, -2, -4, -3, 7, 0, -5, -5, 12, 4, -5, -7, 14, 6, -4, -7, + 18, 14, 3, -2, 6, 4, 0, -3, -8, -5, -2, 0,-16,-11, -2, 2, + -8, -6, 7, 18, -7, -8, 2, 13, -4, -6, -2, 6, 0, -4, -3, 1, + 1, -3,-13,-18, 0, -1, -5, -7, -1, 1, 6, 7, -2, 4, 15, 17, + -15,-14, -7, -2, -6, -5, -1, 0, 6, 6, 3, 1, 15, 13, 6, 1, + 2, -2,-11, 10, 2, -1,-12, 11, 3, -1,-12, 11, 2, -2,-11, 11, + -9, 14, -1, -5, -9, 15, -2, -5, -8, 16, -2, -5, -7, 15, -1, -4, + 2, 6, 8, 8, -2, 3, 9, 12,-11, -5, 4, 10,-19,-16, -8, 0, + 14, 8, -7,-15, 12, 7, -7,-14, 8, 5, -4, -9, 5, 3, -1, -4, + 12,-14, -2, 2, 13,-15, -1, 3, 14,-15, -1, 3, 13,-14, -1, 3, + 0, 6, 10,-13, 0, 6, 10,-15, 0, 7, 9,-17, 1, 6, 8,-16, + -8, -5, 15, -2, -8, -6, 17, -2, -8, -6, 16, -3, -8, -5, 15, -2, + -9,-11,-11,-10, 9, 10, 9, 8, 8, 10, 10, 9, -8, -9, -8, -7, + 9, 10, 9, 7, -8,-10,-10,-10, -7,-10,-11,-11, 11, 12, 11, 8, + 0, 10, 7, 0, 0, 7, 0, -6, 0, 2, -5, -6, -2, -1, -4, -1, + 5, 0, -6, -9, 2, 2, 2, 1, -2, 0, 5, 7, -6, -5, 1, 4, + 3, -8, 2, -1, 4, -9, 3, 0, 5, -7, 3, 0, 7, -5, 3, 0, + -5, -3, 2, 9, -6, -3, 1, 8, -6, -3, 1, 7, -5, -2, 0, 4, + 13, 8, 3, 1, -3, -5, -4, -1, -8, -7, -3, 0, -1, 1, 3, 2, + 3, 2, -5,-12, 4, 3, -2, -9, 3, 4, 1, -4, 3, 5, 4, -1, + -9, -8, -4, 0, 8, 6, 2, 0, 10, 8, 3, 0, -6, -5, -3, -1, + -3, -9,-12, -5, 0, -3, -5, 0, 2, 3, 2, 4, 5, 8, 7, 6, + -1, -2, 5, 12, -1, -1, 5, 9, 2, 1, -1, -2, 2, -1,-11,-17, + -7, 3, 3, -1, -9, 3, 4, -1,-10, 4, 6, -1, -9, 5, 7, 0, + -18, -7, 2, 2, -8, 1, 5, 3, 3, 4, 1, 0, 9, 5, -2, -3, + -2, 0, 6, 8, -4, -5, -5, -3, 1, -2, -6, -8, 10, 9, 3, -1, + 0, -2, -2, 0, 0, -4, -5, 0, -2, -8, -4, 8, -5, -7, 6, 24, + 9, 1, -7, 1, 9, 1, -8, 1, 8, 0,-10, 1, 8, -1,-11, -1, + 8, 8, 6, 3, 5, 4, 3, 2, -2, -3, -1, 0,-10,-13, -8, -4, + 0, 4, 2, -3, 0, 6, 3, -5, 3, 10, 2,-12, 5, 10, -4,-22, + 0, -4, -1, 3, 1, -4, -1, 5, 1, -5, 0, 8, -1, -6, -2, 7, + -1, -1, -2, -4, -1, -2, -4, -6, -1, -1, -1, -2, 1, 5, 10, 9, + 10, 3, 0, -2, 6, -1, -2, -5, 3, -1, -2, -6, 2, 0, 0, -5, + 6, 3, 0, 0, 6, 3, 1, 1, 4, -2, -2, 1, 0, -9, -9, -2, + -11, -3, 1, 2, -6, 2, 4, 5, -3, 2, 3, 4, -2, 1, 1, 2, + -6, -4, -1, -2, 2, -1, -1, -2, 10, 2, -2, -2, 11, 2, -4, -1, + 6, 0, -2, 2, 3, 3, 0, 0, -6, 3, 3, 0,-17, -1, 5, 0, + -1, 4, 10, 11, -3, -2, 0, 1, -3, -4, -5, -3, -1, -2, -2, -1, + 2, -3, -9,-12, 3, 3, 3, 2, 2, 2, 4, 4, 2, 1, -1, -2, + -2, 9, 5,-10, -3, 5, 5, -5, -2, 1, 2, 0, -1, -2, -2, 1, + -2, -3, 7, -2, -1, -3, 7, -3, -1, -2, 8, -4, -2, -2, 7, -3, + 1, -8, -3, 12, 2, -2, -2, 4, 1, 3, 0, -5, -1, 5, 2, -7, + -1, 3, 1, -5, -7, -2, 3, 1, -2, -7, -2, 2, 20, 3, -5, -1, + 5, 0, -3, -2, -7, -7, 0, 6, -6, 0, 7, 6, 2, 6, 0, -7, + -2, 6, -7, 1, -2, 7, -8, 3, -2, 7, -7, 3, -1, 7, -6, 2, + -5, -2, 5, 7, 4, 1, -4, -8, 6, 3, -2, -5, -7, -5, 3, 7, + -1, -1, 6, 5, 0, -1, 1, -4, 2, 1, 0, -7, 1, 0, 0, -4, + -8, 0, 3, 1, -2, 1, -1, -1, 1, -1, -3, 1, 1, -2, 1, 9, + 5, 2, -3, -4, -1, 0, -1, -3, -3, 1, 3, 1, -4, 0, 4, 2, + 2, -2, -2, 12, 0, -2, -5, 3, -1, 0, -3, 1, -3, -1, -2, 1, + 1, 5, 3, 0, -6, -4, -2, 1, 0, -2, -2, 2, 6, 1, -4, -1, + -3, -5, -5, -1, 3, 5, 5, 4, 0, 3, 1, -1, -2, 1, -2, -3, + 2, -4, -5, -3, 4, -2, -3, -2, 6, 0, -1, -1, 7, 1, 0, 0, + -3, -2, -2, 0, -2, -3, -5, -1, -2, 2, 0, -1, -1, 11, 9, -1, + 0, 1, -1,-10, -1, 1, 0, -6, 1, 0, 1, 4, 2, -5, -1, 13, + -2, 4, 5, 0, -5, 1, 6, 3, -6, -2, 3, 2, -5, -2, 0, -2, + -1, 1, 1, -2, -1, -2, 0, 2, 5, 5, 5, 7, 0, -4, -8, -7, + 0, 2, -1, -5, -1, 2, 2, -3, 0, 5, 3, -5, 3, 8, 2,-12, + 8, 4, 0, -2, 10, -1, -4, -1, 3, -6, -3, 0, -4, -5, 0, 0, + 0,-10, -4, 2, -1, -6, 3, 5, -1, -3, 6, 4, 0, -2, 4, 2, + 0, 8, 1, -1, 0, 11, 1, -3, -1, 6, -2, -4, -3, -2, -7, -4, + 0, -1, -1, -1, 4, 5, 6, 5, -5, -9, -8, -5, 2, 2, 3, 2, + 0, 2, 6, 1, 2, 0, 3, 0, 1, -2, -1, -2, 0, -1, -3, -6, + 0, 0, 2, 0, 4, 0, 2, 1, 5, -2, 0, 0, -2, -9, -1, 2, + 0, 1, 0,-10, -1, 1, 8, 0, -1, -2, 4, 0, 1, -1, 2, -1, + -3, -2, 2, -1, -3, -1, 2, -3, 0, -1, 1, 0, 8, 1, -1, 3, + 0, 1, 1, 2, 0, -4, -2, 0, -1, -5, 1, -1, -2, -1, 11, 2, + 1, 5, -2, -2, 0, 2, -4, 0, -2, 1, -5, 1, 0, 5, 0, 1, + -5, -3, 0, 6, -4, 2, 0, 0, -3, 5, 1, 0, -3, 3, 0, 0, + 3, -2, -3, 1, 1, -4, 0, 8, -2, -3, -2, 3, 1, 2, -1, -1, + 1, 1, 0, 2, 2, 0, 1, 6, 1, -1, 2, 1, 0, 3, 0,-19, + 1, -3, -2, 2, 6, 5, -2, -7, -3, 1, 3, 1, -1, -1, 0, 2, + -8, -1, -1, -4, 1, 1, -1, 2, 4, 3, 2, 3, -5, 1, 3, 0, + 0, 2, -1, 1, -3, 0, 0, 5, -5, -2, 0, 8, -4, -4, -4, 6, + 1, 2, 1, 2, 2, 2, -3, 2, 4, 0, -9, 0, 7, 0,-11, 1, + 0, 0, 0, -2, 3, 3, -1, -6, 4, 3, -3,-10, -1, 2, 6, 2, + 7, -2, -3, 5, -4, 0, 3, -1, -4, 2, 1, -7, 2, -1, -1, 3, + 3, 2, 2, 2, -5, -7, -7, -5, 5, 6, 4, 2, -2, -1, 0, 1 +}; + +/* 6x16-entry codebook for intra-coded 8x4 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_intra_codebook_8x4)[3072] = { + 5, 6, 6, 6, 7, 7, 8, 8, 0, 0, 0, 0, 0, 1, 2, 3, + -3, -4, -4, -5, -5, -4, -3, -2, -4, -4, -4, -5, -4, -4, -3, -3, + 1, 2, 2, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 5, 5, 5, + -1, 0, 1, 1, 2, 3, 4, 4, -9,-10, -9, -9, -8, -7, -6, -5, + -4, -4, -5, -6, -6, -7, -7, -7, 0, -1, -2, -2, -3, -3, -4, -4, + 4, 4, 3, 3, 2, 1, 1, 0, 7, 7, 7, 6, 6, 5, 4, 4, + 2, 4, 5, 6, 4, 1, -3, -6, 3, 4, 5, 5, 4, 0, -5, -8, + 2, 3, 4, 4, 2, -2, -7,-10, 2, 2, 2, 1, 0, -4, -9,-12, + -9, -7, -3, 1, 4, 4, 3, 3,-10, -7, -2, 3, 5, 5, 3, 3, + -9, -6, -2, 3, 6, 5, 4, 3, -8, -6, -1, 3, 4, 4, 3, 2, + -5, -5, -5, -5, -3, 1, 4, 7, -5, -5, -5, -4, -2, 1, 6, 8, + -4, -5, -4, -3, -1, 3, 8, 10, -3, -4, -3, -2, 1, 5, 9, 11, + -2, -2, -2, -2, -2, -2, -2, -2, -4, -5, -5, -5, -5, -5, -5, -4, + -3, -4, -4, -4, -4, -4, -4, -3, 9, 10, 10, 11, 11, 11, 10, 10, + 7, 4, 1, -2, -4, -6, -9,-10, 9, 7, 3, 0, -2, -4, -8, -9, + 11, 8, 4, 2, 0, -3, -6, -8, 11, 9, 5, 3, 1, -2, -5, -7, + -13,-13,-13,-12,-11,-10, -8, -8, 0, 1, 2, 3, 4, 4, 4, 3, + 3, 4, 5, 6, 6, 6, 5, 4, 3, 4, 4, 4, 3, 3, 3, 2, + 10, 10, 11, 10, 9, 9, 8, 7, 6, 6, 6, 6, 5, 4, 3, 2, + 0, 0, 0, -1, -2, -3, -4, -4,-10,-10,-11,-12,-13,-14,-14,-14, + 16, 16, 17, 16, 15, 13, 12, 11, -1, -2, -3, -4, -4, -4, -4, -3, + -4, -5, -6, -6, -6, -6, -6, -6, -5, -6, -6, -6, -6, -6, -5, -5, + -13,-13,-13,-12,-11,-10, -8, -6, -9, -8, -7, -6, -4, -2, 0, 1, + -2, -1, 1, 3, 5, 7, 8, 9, 5, 7, 9, 11, 13, 14, 15, 15, + 16, 14, 11, 7, 2, -3, -7, -9, 14, 12, 8, 3, -1, -6, -9,-11, + 11, 9, 4, 0, -4, -8,-11,-13, 8, 5, 1, -3, -6,-10,-12,-14, + -18,-15, -9, -3, 1, 6, 9, 11,-17,-13, -7, -1, 3, 7, 11, 12, + -15,-11, -5, 1, 5, 9, 12, 13,-13, -9, -3, 2, 5, 9, 11, 13, + 22, 21, 19, 15, 10, 3, -4, -9, 20, 18, 15, 9, 2, -5,-12,-17, + 16, 13, 8, 1, -7,-14,-20,-24, 10, 6, -1, -8,-15,-21,-25,-27, + -25,-23,-20,-14, -7, 1, 9, 14,-23,-21,-16, -9, 0, 9, 16, 21, + -20,-16,-10, -1, 8, 16, 22, 25,-15,-11, -3, 6, 14, 20, 25, 27, + -4, -2, 0, 1, 2, 2, 2, 2, -5, -2, 0, 2, 3, 3, 3, 3, + -6, -4, -1, 1, 2, 3, 3, 3, -7, -5, -2, 0, 1, 1, 2, 2, + 2, 1, 1, 1, 1, 0, -2, -3, 3, 3, 2, 1, 0, -1, -3, -4, + 4, 3, 2, 1, 0, -2, -4, -6, 5, 4, 3, 1, -1, -3, -5, -6, + 5, 6, 6, 4, 2, 0, -2, -3, 3, 4, 4, 4, 3, 1, 0, -1, + -2, -2, -1, -1, -1, -1, -2, -2, -5, -4, -3, -2, -2, -2, -3, -3, + -1, -1, -1, -1, -1, -1, -1, -1, -3, -4, -4, -4, -3, -3, -3, -3, + -1, -1, -1, -1, -1, -1, -1, -2, 5, 6, 6, 6, 6, 5, 4, 3, + 4, 4, 4, 4, 4, 5, 6, 7, 0, -1, -1, -1, -1, 0, 1, 2, + -2, -3, -3, -3, -3, -2, -1, 0, -3, -3, -4, -4, -4, -3, -2, -1, + 0, -2, -4, -4, -2, 0, 2, 3, 0, -2, -3, -3, -1, 2, 4, 5, + -1, -2, -4, -3, 0, 3, 5, 6, -2, -3, -4, -3, -1, 2, 4, 5, + 9, 4, 0, -3, -3, -1, 0, 1, 8, 4, -1, -4, -3, -1, 1, 2, + 6, 2, -3, -5, -4, -2, 0, 1, 5, 1, -3, -4, -4, -2, 0, 1, + 5, 3, 1, -1, -4, -8,-10,-10, 3, 3, 2, 1, 0, -2, -3, -4, + 1, 1, 1, 2, 3, 2, 1, 0, -1, 0, 1, 2, 3, 4, 3, 2, + 0, 1, 2, 2, 1, -1, -3, -3, 0, 1, 1, 1, -1, -2, -4, -3, + -3, -3, -3, -3, -3, -3, -1, 2, -4, -4, -3, 0, 3, 7, 12, 14, + -5, -5, -6, -6, -6, -6, -6, -5, 2, 2, 2, 1, 0, 0, 0, 0, + 4, 4, 3, 2, 1, 0, 0, 0, 6, 6, 5, 4, 2, 2, 1, 1, + -7, -7, -6, -3, 0, 4, 7, 8, -1, -2, -3, -3, -2, -1, 1, 2, + 3, 3, 1, -1, -2, -2, -2, -1, 6, 6, 4, 2, 0, -2, -2, -2, + -6, -5, -2, 2, 5, 9, 11, 12, -4, -4, -2, 0, 2, 4, 5, 6, + -3, -2, -2, -2, -2, -1, 0, 1, -2, -2, -2, -3, -3, -3, -3, -2, + -7, -3, 1, 3, 3, 0, -3, -5, -6, -2, 3, 5, 4, 1, -3, -5, + -5, -1, 4, 6, 5, 2, -3, -4, -4, 0, 5, 7, 6, 3, -1, -3, + 0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -3, -3, -3, -3, -2, -1, + 6, 7, 8, 9, 9, 8, 7, 6, -4, -4, -5, -5, -6, -6, -5, -4, + -9, -8, -6, -4, 0, 3, 6, 6, -5, -4, -1, 3, 5, 6, 5, 3, + 1, 3, 6, 6, 4, 1, -2, -5, 6, 7, 5, 1, -3, -7,-10,-11, + 10, 9, 5, 1, -3, -6, -6, -4, 5, 3, -1, -5, -6, -5, -2, 2, + -2, -4, -6, -6, -4, 1, 6, 10, -6, -7, -7, -4, 1, 7, 11, 12, + 6, 5, 3, 2, 0, 0, 0, 0, 2, 1, -1, -2, -3, -2, -1, -1, + 0, -1, -2, -4, -4, -2, -1, 1, 0, 0, -1, -2, -1, 0, 2, 3, + 0, -1, -2, -2, -2, -2, -1, -1, 5, 4, 2, 1, 0, 0, 0, 0, + 6, 5, 3, 1, 0, 0, 0, 0, 2, 0, -2, -4, -4, -3, -2, -2, + -7, -4, 0, 2, 2, 2, 2, 1, -7, -3, 0, 0, 0, 0, 0, 0, + -4, -1, 1, 1, 0, 0, 0, 1, -1, 1, 2, 2, 2, 2, 3, 3, + -2, 0, 2, 2, 1, 1, 1, 1, -1, 1, 2, 2, 1, 0, 0, -1, + 0, 2, 4, 2, 0, -1, -2, -3, 1, 2, 3, 1, -2, -4, -6, -6, + 1, 2, 2, 4, 5, 6, 4, 1, 0, -1, -1, -1, 0, 0, -2, -4, + 0, 0, -1, -2, -2, -2, -4, -6, 2, 1, 0, 0, 1, 1, -1, -3, + 1, 1, 1, 1, 1, 2, 3, 3, 0, 0, 1, 0, 1, 2, 4, 4, + -1, -1, -1, -1, 0, 1, 2, 3, -4, -4, -5, -5, -5, -3, -1, 0, + -6, -5, -5, -4, -3, -2, -1, -1, -1, 0, 0, 1, 1, 2, 3, 3, + 0, 1, 1, 1, 2, 2, 3, 4, 0, 0, -1, -1, 0, 1, 2, 3, + 0, 1, 1, 1, 0, 0, -1, -1, 1, 3, 3, 2, 1, -1, -2, -2, + -2, 0, 2, 2, 2, 2, 1, 1, -9, -8, -4, -2, 1, 3, 3, 3, + -1, -1, -1, -2, -3, -3, -3, -4, 0, 0, 0, -1, -2, -2, -3, -3, + 2, 2, 2, 0, -1, -1, -1, -1, 5, 5, 4, 3, 2, 2, 2, 2, + 6, 3, -1, -4, -3, -1, 1, 1, 2, -1, -3, -4, -1, 2, 2, 0, + -1, -2, -2, 1, 4, 4, 1, -3, -2, -1, 1, 4, 6, 3, -3, -8, + 3, 3, 2, 1, -1, -2, -2, -2, -4, -4, -2, -1, 1, 3, 4, 4, + -4, -5, -5, -4, -2, 0, 2, 2, 7, 7, 4, 1, -1, -2, -3, -2, + -1, 1, 3, 0, -4, -6, 0, 6, -2, 1, 4, 1, -4, -6, -1, 7, + -3, 1, 4, 2, -3, -6, -1, 6, -2, 0, 3, 2, -2, -5, -1, 4, + 1, -1, -2, 1, 4, 4, -1, -7, 1, -1, -4, -1, 5, 6, 0, -6, + 3, 0, -4, -3, 3, 6, 2, -4, 3, 0, -5, -4, 1, 4, 1, -3, + 2, 2, 3, 3, 3, 3, 2, 2, -4, -5, -6, -7, -7, -7, -7, -6, + 1, 2, 3, 3, 3, 3, 2, 2, 0, 0, 1, 1, 1, 2, 2, 1, + 3, -3, -3, 3, 4, -2, -2, 2, 3, -4, -4, 4, 4, -4, -4, 2, + 4, -4, -4, 4, 4, -4, -3, 3, 3, -3, -4, 3, 3, -3, -3, 3, + -2, -2, -2, -2, -2, -2, -1, -1, 6, 7, 8, 8, 8, 7, 6, 5, + -5, -6, -7, -7, -8, -7, -6, -5, 1, 1, 2, 2, 2, 2, 1, 1, + 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, + -2, -3, -2, -2, -2, -3, -3, -3, 2, 3, 5, 6, 4, 2, 1, 0, + 8, 6, 2, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, -1, -1, -1, + 1, -1, 0, 0, 0, -1, -2, -3, -2, -2, -1, 0, 0, -2, -4, -5, + 3, 1, -1, -2, -3, -4, -5, -5, 2, 1, 0, 0, 1, 1, 0, 0, + 0, -1, -1, 0, 2, 2, 2, 2, -1, -2, -1, 1, 2, 2, 2, 2, + 0, -1, -2, -1, -1, -1, -1, 0, -1, -2, -2, -1, -1, 0, 0, 1, + 2, 1, 1, 2, 2, 1, 1, 0, 6, 5, 3, 1, 0, -2, -4, -4, + -3, -2, -1, 0, 1, 1, 0, -1, 0, 1, 3, 4, 5, 5, 3, 1, + -1, -1, -1, 0, 1, 0, -1, -2, -2, -2, -2, -1, 0, -1, -2, -3, + 0, -1, -2, -2, -1, -1, 0, 2, 1, -1, -2, -1, -1, -1, 0, 2, + 1, 0, -2, -2, -2, -2, 1, 5, 1, -1, -2, -2, -2, 0, 5, 10, + 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, 0, 0, 0, 1, 2, + 1, 2, 2, 3, 4, 4, 6, 5, -3, -3, -3, -2, -2, -3, -3, -3, + 1, -1, -2, -2, 0, 3, 5, 7, 2, 0, -2, -3, -2, 0, 2, 3, + 3, 1, -2, -3, -3, -2, -1, -1, 3, 1, 0, -1, -1, -1, -1, -1, + 1, 3, 5, 4, 2, -1, -3, -4, -3, -2, 1, 2, 1, 0, -1, -2, + -5, -3, 0, 2, 2, 1, 0, 0, -3, -1, 1, 2, 2, 1, 0, 0, + 0, -1, -1, -1, 1, 2, 3, 4, -3, -4, -4, -3, -1, 0, 0, 1, + -2, -3, -2, -1, 1, 1, 1, 1, -2, -2, 0, 3, 4, 4, 3, 2, + -4, -4, -3, -2, -1, 1, 2, 3, 0, 1, 1, 1, -1, -2, -3, -3, + 3, 4, 5, 4, 2, -1, -3, -3, -2, -2, 0, 2, 2, 2, 1, 0, + -4, 0, 5, 7, 4, -1, -4, -4, -1, 2, 4, 3, 0, -3, -3, -2, + 2, 1, 0, -1, -2, -2, 0, 1, 0, 0, -1, -2, -2, -1, 1, 2, + -4, -3, -2, -1, 0, 1, 2, 2, 10, 9, 5, 0, -3, -4, -3, -2, + 1, -1, -2, -2, -1, 0, 0, 0, -2, -2, -1, 1, 1, 1, 0, -1, + -5, -3, 0, 3, 4, 2, 0, -2, -2, -1, 0, 1, 1, 0, -1, -1, + 3, 2, -1, -2, -2, -1, 1, 1, 7, 5, -1, -5, -6, -2, 2, 4, + -2, 3, 3, -3, -4, 1, 2, -2, -3, 3, 4, -3, -4, 2, 3, -2, + -3, 3, 4, -3, -4, 2, 3, -2, -4, 2, 4, -2, -3, 1, 2, -1, + 4, 3, -1, -3, -3, -1, 1, 2, -4, -6, -4, 0, 4, 5, 4, 1, + 0, 2, 5, 6, 2, -3, -5, -4, 1, 1, -1, -3, -5, -2, 2, 4, + -1, 0, 1, 2, 2, 3, 3, 4, -1, 0, 1, 1, 0, -1, -1, -1, + -1, 0, 1, 2, 2, 1, -1, -2, -3, -2, -1, 0, 0, -1, -2, -3, + 1, 1, 1, 1, 0, 0, 1, 2, 1, 0, -1, 0, 0, 1, 1, 0, + 1, -2, -4, -1, 1, 2, 1, 0, 1, -4, -7, -3, 1, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 0, 1, 2, 2, 0, + 1, 1, 0, 0, 0, 2, 0, -3, 3, 2, 0, -1, -1, -2, -6, -9, + 0, 0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 0, -1, -1, 0, 2, + 0, 1, 1, 1, -1, -3, -2, 0, -7, -5, 1, 6, 6, 2, -1, -1, + 3, 1, -1, -3, -4, -2, 1, 4, 2, 0, -2, -3, -4, -3, -1, 2, + 2, 2, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, + -1, 1, 1, -2, -5, -6, -4, -1, -1, 1, 4, 3, 2, 0, 1, 2, + -1, 0, 2, 3, 1, 0, 0, 1, -1, 0, 1, 0, 0, -1, -1, 0, + 0, 1, 2, 2, 0, -2, -1, 1, -2, -1, -1, -2, -1, 2, 6, 8, + -1, -1, -2, -3, -2, 0, 1, 2, -1, 0, 0, -1, -1, 0, -1, -1, + 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, -1, -1, 1, + -1, 0, 2, 2, -1, -3, -2, 3, 0, 2, 3, 0, -5, -7, -2, 4, + -1, 0, 0, 0, -1, -2, -3, -3, -1, 0, -1, -2, -2, -2, -2, -2, + 1, 1, 0, 0, 1, 2, 0, -1, 1, 2, 1, 2, 5, 6, 2, 0, + -2, -4, -3, 0, 2, 2, 0, -3, 3, 1, 0, 1, 2, 1, -2, -3, + 3, 1, 0, 0, 0, 0, 0, -1, 1, -1, -2, -2, -1, 1, 3, 3, + 3, 2, 1, 2, 4, 3, 1, -2, -2, -4, -4, -3, -1, 0, -2, -3, + 1, 0, -1, -1, 0, 1, 0, -1, 3, 2, 0, 0, 0, 1, 1, 0, + 1, 1, 0, 0, 0, 0, 0, 0, 2, 3, 3, 2, 2, 2, 1, 1, + 0, -1, -2, -3, -5, -5, -5, -4, 1, 1, 0, -1, 0, 1, 3, 3, + -9, -6, -2, 0, 1, 1, 2, 2, -6, -2, 1, 2, 1, 1, 0, 1, + -2, 1, 2, 2, 1, 1, 1, 1, 0, 2, 2, 1, 0, 1, 1, 1, + 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, -3, -2, 0, + -3, -3, -3, -2, -1, 3, 7, 9, 1, 2, 2, 2, 0, -2, -4, -3, + 2, 0, -2, -1, 3, 4, -1, -6, 1, 0, -2, -3, -1, 3, 3, 0, + 0, 3, 3, 0, -2, -1, 1, 1, -6, -1, 3, 2, -1, -2, 0, 1, + 5, 3, 0, -2, -3, 0, 2, 1, 1, 1, 2, 2, 0, -2, -4, -7, + -3, -2, 1, 2, 2, 1, -1, -4, 2, 2, 0, -2, -2, 0, 2, 2, + 0, 0, -2, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, + -2, -1, 0, 1, 0, 1, 2, 3, -4, -2, 0, 0, -1, 0, 2, 3, + -2, -2, -2, -1, -1, 0, 2, 4, 0, 0, 0, 0, -1, -1, 0, 1, + 0, -1, -1, -1, -1, -1, 0, 0, 6, 4, 2, 0, -1, -2, -1, -1, + 0, 1, 1, 1, 1, -1, -5,-10, 1, 1, 1, 1, 1, 1, 0, -4, + 1, 0, 1, 1, 1, 1, 1, -1, 2, 1, 1, 1, 0, 0, 0, 0, + -3, 1, 4, 3, 3, 1, -1, 0, -4, 0, 1, 0, -1, 0, 0, 0, + -5, 0, 2, 1, 1, 1, 0, -1, -1, 2, 1, -2, -2, -1, 0, -1, + 2, 4, 5, 3, 0, -1, 1, 2, 0, 0, 1, 0, -2, -2, -1, -1, + -2, -2, -2, -2, -3, -2, -1, 0, 0, 0, 1, 0, 0, 0, 1, 2, + 0, -2, -2, -3, -1, 2, 2, -1, 1, 0, 0, 0, 1, 5, 3, -2, + -1, -1, 0, -1, 0, 2, 0, -5, -1, 0, 1, 0, 0, 2, 2, -2, + 3, 1, -1, -1, 0, 1, 1, 2, 1, 0, 0, 1, 1, 1, 1, 1, + -10, -8, -2, 1, 2, 1, 1, 1, -1, 1, 2, 1, 0, 0, 0, 0, + -1, -1, 0, 1, 2, 2, 2, 1, -1, -1, -1, 0, -1, -3, -5, -4, + 1, 1, 2, 1, 1, 0, 0, 2, -1, -2, -1, -1, -1, 0, 2, 4, + -3, -7, -5, 0, 2, 0, 0, 0, 3, -1, -2, 1, 2, 1, 1, 2, + 1, -2, -1, 1, 2, 1, 0, 1, 0, -1, 0, 3, 2, -1, -1, -1, + 2, 1, 1, 0, 0, 0, 0, 0, -9, -7, -2, 3, 3, 2, 1, 1, + 3, 2, 0, -2, -2, -1, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, + -2, -1, 1, 1, 1, 0, 0, 0, 1, 2, 1, -2, -4, -3, 1, 2, + 1, 2, 1, -2, -3, 0, 3, 1, -1, -1, 0, 0, 1, 3, 0, -4, + 2, 0, -1, 1, 2, -2, -2, 3, 2, 0, -1, 2, 3, -2, -4, 1, + 0, 1, 1, 1, 2, -2, -6, -2, -1, 0, 0, 0, 2, 0, -2, -1, + -1, -1, 1, 2, 1, -2, -3, -2, 3, -1, -2, -1, -1, 0, 1, 2, + 10, 4, 0, 0, -1, -2, -2, -1, 3, -1, -2, -1, 0, -1, -1, 0, + -5, 2, 7, 1, -4, -2, 1, 0, -2, 2, 3, -1, -3, 0, 2, 0, + 2, 1, 0, 0, 1, 1, -1, -2, 1, -2, -2, -1, -1, -2, 0, 0, + 0, 3, -2, -7, -1, 3, 0, 0, 1, 3, -3, -5, 2, 3, -1, 0, + 0, 2, -2, -2, 4, 2, -2, 0, -1, 1, -1, 0, 2, -1, -2, 1, + 4, 0, -3, -4, -2, 1, 2, 1, 0, 0, 3, 5, 3, 1, -1, -2, + 1, 1, 1, -1, -3, -1, 1, 1, 1, -1, -2, -2, 0, 0, -1, -2 +}; + +/* 6x16-entry codebook for intra-coded 8x8 vectors */ +DECLARE_ALIGNED(4, static const int8_t, svq1_intra_codebook_8x8)[6144] = { + 4, 4, 3, 2, 2, 1, 0, -1, 4, 3, 3, 2, 1, 0, -1, -1, + 3, 3, 2, 2, 1, 0, -1, -2, 3, 2, 2, 1, 0, -1, -2, -3, + 2, 2, 1, 0, -1, -1, -2, -3, 2, 1, 0, 0, -1, -2, -3, -4, + 1, 0, 0, -1, -2, -3, -4, -4, 0, 0, -1, -2, -2, -3, -4, -4, + 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, + 1, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, + -1, 0, 0, 0, 0, 0, 1, 1, -2, -2, -1, -1, -1, -1, -1, -1, + -3, -3, -3, -3, -3, -3, -2, -2, -5, -4, -4, -4, -4, -4, -4, -3, + -4, -2, -1, 0, 1, 2, 2, 3, -4, -2, -1, 0, 1, 2, 3, 3, + -4, -3, -1, 0, 1, 2, 3, 3, -4, -3, -1, 0, 1, 2, 3, 3, + -5, -3, -1, 0, 1, 2, 3, 3, -5, -3, -1, 0, 1, 2, 3, 3, + -5, -3, -1, 0, 1, 1, 2, 3, -5, -3, -2, -1, 0, 1, 2, 3, + 4, 4, 5, 5, 6, 6, 7, 7, 2, 2, 2, 3, 3, 4, 4, 4, + 0, 0, 0, 0, 1, 1, 1, 2, -2, -2, -2, -2, -1, -1, -1, 0, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -1, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -2, -2, -2, -2, + 5, 3, 1, -1, -2, -3, -3, -3, 5, 3, 1, -1, -2, -3, -3, -3, + 5, 3, 1, -1, -2, -3, -3, -3, 5, 3, 1, -1, -2, -3, -3, -3, + 5, 4, 1, 0, -2, -3, -3, -3, 6, 4, 2, 0, -2, -2, -3, -3, + 6, 4, 2, 0, -1, -2, -2, -3, 6, 4, 2, 1, -1, -2, -2, -2, + -1, 1, 3, 3, 2, 0, -3, -6, -1, 1, 3, 4, 3, 0, -3, -6, + -1, 1, 4, 4, 3, 1, -3, -6, -1, 1, 3, 4, 3, 1, -3, -6, + -2, 1, 3, 4, 3, 1, -3, -6, -2, 1, 3, 4, 3, 1, -3, -7, + -2, 1, 3, 3, 2, 0, -3, -7, -2, 0, 2, 3, 2, 0, -3, -6, + 10, 9, 8, 6, 6, 5, 4, 4, 6, 5, 4, 3, 2, 2, 2, 1, + 2, 1, 0, -1, -2, -2, -2, -1, -1, -2, -3, -4, -4, -4, -4, -3, + -2, -3, -4, -4, -5, -4, -4, -3, -2, -2, -3, -3, -3, -3, -2, -2, + -1, -1, -1, -1, -1, -1, -1, 0, 1, 1, 1, 1, 1, 1, 1, 2, + -2, -1, 1, 2, 4, 5, 7, 8, -3, -2, 0, 1, 3, 5, 7, 8, + -4, -3, -1, 0, 2, 4, 6, 7, -5, -4, -2, -1, 1, 3, 5, 7, + -6, -5, -3, -2, 0, 2, 4, 6, -6, -5, -4, -2, -1, 1, 3, 5, + -7, -6, -5, -3, -2, 0, 2, 3, -8, -7, -5, -4, -3, -1, 1, 2, + 11, 9, 7, 5, 3, 1, -1, -1, 10, 8, 6, 3, 1, 0, -2, -2, + 9, 7, 5, 2, 0, -2, -3, -4, 8, 6, 3, 1, -1, -3, -4, -4, + 6, 4, 2, -1, -3, -4, -5, -5, 5, 3, 0, -2, -4, -5, -6, -6, + 3, 1, -1, -3, -5, -6, -7, -7, 2, 0, -2, -4, -6, -6, -7, -7, + 5, 6, 7, 7, 7, 8, 8, 8, 3, 4, 5, 5, 6, 6, 6, 6, + 0, 2, 2, 3, 4, 4, 4, 5, -2, -1, 0, 1, 2, 2, 3, 3, + -4, -3, -2, -1, 0, 1, 1, 2, -6, -5, -4, -3, -2, -2, -1, 0, + -8, -7, -6, -6, -5, -4, -3, -3,-10, -9, -8, -8, -7, -6, -6, -5, + 6, 5, 3, 1, -1, -3, -6, -8, 6, 5, 4, 2, -1, -3, -6, -8, + 6, 5, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, 0, -3, -6, -8, + 6, 6, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, 0, -3, -6, -8, + 6, 5, 4, 2, 0, -3, -6, -8, 6, 5, 4, 2, -1, -3, -5, -8, + 11, 10, 9, 8, 7, 6, 5, 4, 8, 8, 7, 6, 5, 4, 3, 2, + 6, 5, 4, 4, 2, 2, 1, 0, 3, 3, 2, 1, 0, 0, -1, -2, + 1, 1, 0, -1, -2, -2, -3, -3, -1, -1, -2, -3, -4, -4, -5, -5, + -3, -4, -4, -5, -6, -6, -7, -7, -5, -5, -6, -7, -8, -8, -8, -8, + -14,-13,-12,-11, -9, -7, -6, -4,-12,-11,-10, -9, -7, -5, -3, -1, + -10, -9, -7, -6, -3, -2, 0, 2, -8, -6, -4, -2, 0, 2, 4, 5, + -5, -3, 0, 2, 4, 5, 7, 8, -2, 0, 2, 4, 6, 8, 9, 10, + 0, 3, 5, 7, 8, 10, 11, 12, 3, 5, 7, 8, 10, 11, 12, 12, + -19,-19,-18,-18,-17,-16,-15,-14,-15,-15,-14,-13,-12,-11,-10, -9, + -11,-10, -9, -8, -6, -5, -4, -3, -6, -5, -3, -2, -1, 0, 1, 2, + -1, 0, 2, 3, 4, 5, 6, 6, 4, 6, 7, 8, 9, 10, 10, 10, + 9, 10, 11, 12, 13, 14, 14, 14, 12, 14, 14, 15, 16, 16, 16, 16, + 22, 21, 19, 17, 14, 11, 9, 5, 20, 19, 17, 14, 11, 8, 4, 1, + 17, 15, 13, 10, 6, 3, 0, -4, 13, 11, 8, 5, 1, -2, -5, -9, + 9, 6, 3, -1, -4, -7,-11,-13, 4, 0, -3, -6, -9,-12,-15,-17, + -2, -5, -8,-11,-14,-16,-18,-20, -8,-10,-13,-16,-17,-19,-21,-22, + 17, 18, 18, 18, 17, 16, 16, 14, 16, 16, 15, 15, 14, 13, 12, 11, + 12, 12, 11, 10, 9, 8, 7, 5, 7, 6, 6, 4, 3, 2, 1, -1, + 1, 0, -1, -2, -3, -4, -5, -6, -5, -6, -7, -8, -9,-10,-11,-12, + -11,-12,-13,-14,-15,-16,-16,-17,-16,-17,-17,-18,-19,-20,-20,-20, + 0, 0, 0, 0, -1, -1, -2, -3, 1, 0, 0, 0, 0, -1, -2, -3, + 1, 1, 0, 0, -1, -1, -2, -2, 1, 1, 1, 0, 0, -1, -1, -2, + 2, 1, 1, 1, 0, -1, -1, -2, 2, 2, 1, 1, 0, 0, -1, -2, + 2, 2, 1, 1, 1, 0, -1, -1, 2, 2, 1, 1, 1, 0, 0, -2, + 0, -1, -1, 0, 0, 1, 2, 3, 0, -1, -1, 0, 1, 1, 2, 2, + -1, -1, -1, -1, 0, 1, 2, 2, -1, -1, -2, -1, 0, 1, 1, 2, + -1, -2, -2, -1, 0, 0, 1, 2, -1, -2, -2, -2, -1, 0, 1, 2, + -1, -1, -2, -1, 0, 0, 1, 2, -1, -1, -1, -1, 0, 1, 1, 2, + 3, 2, 2, 2, 1, 1, 0, 0, 3, 2, 2, 2, 2, 1, 0, 0, + 2, 2, 2, 1, 1, 1, 0, 0, 2, 2, 1, 1, 1, 0, 0, -1, + 1, 1, 1, 0, 0, 0, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -2, -2, -2, -2, + 5, 2, 0, 0, -1, 0, 0, 0, 4, 2, 0, -1, -1, -1, 0, -1, + 4, 1, -1, -1, -2, -1, -1, -1, 4, 1, -1, -1, -2, -1, -1, -1, + 4, 1, -1, -2, -2, -1, -1, -1, 4, 1, -1, -2, -2, -1, -1, -1, + 4, 1, -1, -1, -1, -1, -1, -1, 4, 2, 0, -1, 0, 0, 0, -1, + -2, -1, 0, 1, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 1, 1, + -3, -1, 0, 1, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 1, 1, + -3, -2, 0, 1, 2, 2, 1, 1, -4, -2, 0, 1, 2, 2, 2, 2, + -5, -3, -1, 1, 1, 2, 1, 2, -5, -3, -2, 0, 1, 1, 1, 1, + 3, 3, 1, 0, -2, -4, -4, -5, 3, 3, 2, 0, -1, -2, -3, -4, + 2, 2, 1, 1, 0, -1, -2, -2, 1, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, -2, -1, -1, 0, 0, 1, 2, 2, + -3, -2, -2, -1, 0, 1, 2, 3, -3, -3, -2, -1, 0, 1, 2, 3, + -3, -3, -3, -3, -3, -2, -2, -2, -3, -3, -2, -2, -2, -1, -1, -1, + -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 2, 2, 2, 2, + 1, 1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, + -8, -7, -5, -3, -2, -1, 0, -1, -4, -3, -1, 0, 1, 2, 1, 1, + -1, 1, 2, 3, 3, 2, 2, 1, 1, 2, 3, 3, 2, 2, 1, 0, + 2, 3, 3, 2, 1, 0, 0, -1, 1, 2, 1, 0, -1, -1, -1, -1, + 1, 1, 0, -1, -1, -2, -2, -1, 1, 1, 0, 0, -1, -1, 0, -1, + -4, -3, -2, 0, 1, 2, 3, 3, -4, -3, -2, 0, 1, 2, 2, 2, + -3, -3, -2, -1, 0, 1, 1, 1, -2, -2, -2, -1, -1, 0, 0, 0, + 0, -1, -1, -1, -1, -1, -1, -1, 2, 1, 1, 0, 0, -1, -1, -2, + 3, 3, 3, 1, 0, -1, -2, -2, 5, 4, 4, 2, 1, 0, -1, -2, + 0, 0, 0, 0, 1, 2, 3, 3, 0, -1, 0, 0, 1, 2, 3, 3, + 0, -1, 0, 0, 1, 2, 3, 2, 0, 0, 0, 1, 1, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 1, 0, 0, -1, -2, + 2, 1, 0, 0, -2, -3, -5, -6, 0, -1, -1, -3, -5, -6, -8, -9, + -2, 0, 1, 2, 2, 1, -1, -4, -2, 0, 2, 2, 2, 1, -1, -4, + -2, 0, 2, 2, 2, 1, -1, -3, -2, 0, 2, 2, 2, 1, -1, -3, + -2, -1, 2, 2, 2, 1, -1, -3, -2, -1, 1, 2, 2, 1, -1, -3, + -3, -1, 1, 2, 2, 1, -1, -3, -2, -1, 1, 2, 2, 1, -1, -3, + -1, 1, 1, -1, -3, -3, 0, 4, -1, 1, 1, -1, -3, -3, 0, 4, + -1, 1, 1, 0, -3, -3, 0, 4, -1, 1, 2, 0, -3, -3, 0, 5, + 0, 1, 2, 0, -3, -4, 0, 4, 0, 1, 2, 0, -3, -4, 0, 5, + 0, 1, 2, 0, -3, -3, 0, 4, 0, 1, 2, -1, -2, -2, 0, 4, + 6, 6, 5, 6, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, + -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, + -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 0, 0, 0, 0, 0, + -1, -2, -2, -2, -2, -2, -2, -1, -3, -3, -3, -3, -3, -3, -3, -2, + -3, -4, -4, -3, -3, -3, -2, -2, -2, -2, -2, -2, -1, -1, 0, 0, + 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, + 4, 1, -2, -3, -3, -1, 1, 3, 4, 1, -2, -4, -3, -1, 1, 3, + 5, 1, -2, -4, -3, -1, 1, 4, 5, 1, -2, -3, -3, -1, 2, 4, + 5, 1, -2, -3, -3, -1, 2, 4, 4, 0, -3, -4, -3, -1, 2, 4, + 4, 0, -3, -3, -3, -1, 1, 3, 3, 0, -2, -3, -2, -1, 1, 3, + -3, -4, -4, -4, -4, -4, -4, -4, -1, -1, -1, -1, -1, -1, -2, -2, + 2, 1, 1, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 3, 3, 3, + 3, 3, 3, 4, 4, 4, 3, 3, 1, 2, 1, 2, 2, 2, 2, 2, + -2, -2, -2, -1, -1, -1, 0, 0, -4, -4, -4, -4, -3, -3, -3, -3, + -1, -2, -3, -3, -2, -2, -1, 0, 0, -1, -2, -2, -2, -1, 0, 1, + 2, 1, -1, -1, -1, -1, 0, 1, 3, 1, 0, -1, -1, 0, 0, 1, + 3, 2, 0, -1, 0, 0, 0, 1, 3, 1, 0, -1, 0, 0, 0, 1, + 3, 1, 0, -1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 1, 1, 2, 3, 4, 0, 0, -1, 0, 0, 0, 2, 3, + 0, -1, -1, -1, -1, -1, 0, 1, 0, -1, -1, -1, -1, -1, -1, 0, + 0, 0, -1, -1, -1, -2, -2, -1, 1, 0, 0, -1, -1, -2, -2, -1, + 2, 2, 1, 0, -1, -1, -1, -1, 3, 3, 2, 1, 0, -1, -1, 0, + 1, 0, 1, 0, 0, -1, -2, -1, 0, 0, 0, 0, -1, -1, -2, -1, + 0, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, + -1, -1, -1, 0, 0, 0, 1, 1, -1, -1, -1, 0, 1, 1, 2, 3, + -2, -2, -1, 0, 1, 2, 3, 4, -2, -2, -1, 0, 1, 2, 4, 5, + -3, -1, 1, 0, 0, -1, 0, 1, -3, 0, 1, 0, -1, -1, 0, 2, + -3, 0, 1, 0, -1, -1, 0, 2, -2, 1, 2, 0, -1, -1, 0, 2, + -2, 1, 2, 0, -1, -1, 0, 2, -2, 1, 2, 0, -1, -1, 0, 2, + -1, 2, 2, 0, -1, -1, 0, 2, -1, 1, 1, 0, -1, -1, -1, 1, + -2, -2, -1, 1, 3, 4, 3, 1, -2, -2, -1, 0, 2, 3, 2, 0, + -2, -2, -1, 0, 1, 2, 1, -1, -1, -1, -1, 0, 1, 2, 1, -1, + -1, -1, -1, 0, 1, 1, 0, -2, 0, -1, -1, 0, 1, 1, 0, -1, + 0, -1, -1, 0, 1, 1, 1, -1, 0, -1, -1, 0, 0, 1, 0, -1, + -2, -1, 0, 1, 1, 1, 1, 1, -2, -1, 0, 0, 0, 0, 0, 0, + -2, -1, -1, 0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -2, -2, -3, + -1, 0, 1, 1, 0, -1, -2, -2, 1, 2, 3, 3, 2, 1, 0, 0, + 1, 2, 3, 3, 3, 2, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, + 0, -1, -1, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, -1, 0, 0, 1, 1, 0, 0, 0, + -3, -2, -1, -1, -1, -1, 0, -1, -5, -5, -4, -3, -2, -2, -2, -1, + 1, 1, 1, 1, 2, 1, 0, -1, 1, 1, 1, 2, 1, 1, 0, -1, + 1, 1, 1, 1, 1, 1, 0, -2, 2, 1, 1, 1, 1, 1, 0, -2, + 1, 1, 0, 0, 0, 0, -1, -3, 1, 1, 0, 0, 0, -1, -2, -3, + 1, 1, 0, 0, -1, -1, -2, -4, 1, 0, 0, -1, -2, -2, -3, -4, + 8, 7, 5, 3, 2, 1, 1, 1, 2, 1, 0, 0, -1, -1, -2, -1, + -1, -1, -1, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, -1, -1, 0, + 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, + -1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -1, -1, -1, -2, -2, -1, + 9, 4, 0, -2, -2, -2, -1, -1, 7, 2, -1, -2, -2, -1, 0, 0, + 4, 0, -2, -2, -1, 0, 1, 1, 1, -2, -2, -2, -1, 0, 1, 1, + -1, -2, -2, -1, 0, 1, 1, 1, -1, -2, -1, 0, 1, 1, 1, 0, + -1, -1, 0, 1, 1, 1, 0, -1, 0, -1, 0, 1, 0, 0, -1, -1, + 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 2, 2, 1, 0, 0, 0, + 2, 2, 2, 2, 1, 0, -1, -1, 1, 1, 1, 0, -1, -2, -2, -2, + 0, 0, 0, -1, -2, -3, -2, -2, -1, -1, -1, -2, -2, -2, -1, 0, + -1, -1, -1, -1, 0, 0, 1, 2, -1, -1, -1, 0, 1, 2, 3, 4, + -1, -1, 0, 0, -1, -2, -3, -3, -1, -1, 0, 0, 0, -1, -1, -1, + -2, -2, -1, 0, 1, 1, 1, 1, -2, -2, -2, 0, 1, 2, 3, 3, + -1, -1, -1, 0, 1, 3, 3, 3, 1, 0, 0, 0, 1, 1, 2, 2, + 2, 2, 1, 0, 0, -1, -1, -1, 3, 2, 1, 0, -1, -2, -3, -3, + -1, -1, -1, -2, -2, -3, -4, -5, 0, 0, 0, -1, -1, -3, -3, -4, + 1, 1, 1, 0, 0, -1, -2, -3, 2, 2, 2, 1, 1, 0, -1, -1, + 2, 2, 2, 2, 1, 1, 0, -1, 2, 2, 2, 2, 2, 1, 0, 0, + 1, 1, 2, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, -1, + -2, 2, 3, 1, -1, 1, 1, -1, -3, 2, 3, 0, -1, 1, 1, -1, + -3, 2, 3, 0, -1, 1, 1, -1, -4, 2, 3, 0, -1, 1, 1, -2, + -4, 1, 3, 0, -1, 1, 1, -2, -4, 1, 3, -1, -2, 1, 1, -2, + -3, 1, 2, 0, -1, 1, 1, -2, -3, 1, 2, 0, -1, 1, 1, -1, + -1, -1, -1, -2, -2, -2, -2, -2, 1, 1, 1, 1, 0, 0, 0, 0, + 1, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 2, 2, 2, + -2, -2, -1, -1, -1, 0, 0, 0, -3, -3, -3, -3, -3, -3, -3, -2, + -1, -1, -1, -1, -2, -2, -2, -2, 4, 4, 4, 4, 4, 3, 3, 2, + -3, -3, -2, -1, 0, 1, 2, 5, -3, -3, -3, -2, -1, 1, 3, 6, + -3, -3, -2, -2, 0, 2, 3, 5, -3, -2, -2, -2, 0, 1, 3, 5, + -2, -2, -2, -1, -1, 1, 3, 5, -2, -2, -1, -1, 0, 1, 2, 4, + -1, -1, -1, -1, 0, 1, 1, 4, -1, -1, -1, -1, 0, 1, 2, 3, + 0, -1, 0, 1, 1, 0, -1, -1, 0, 0, 0, 1, 2, 0, -1, -1, + 1, 0, -1, 0, 1, 0, 0, 0, 1, -1, -2, -1, 0, 0, 0, 0, + 1, -2, -3, -1, 0, 0, 0, 1, 1, -1, -3, -2, 0, 1, 1, 2, + 1, -1, -2, -1, 0, 1, 1, 2, 2, 0, -1, 0, 1, 1, 2, 2, + 1, 1, 1, 1, 0, 0, 1, 2, -1, 0, 0, -1, 0, 0, 0, 1, + -3, -2, -1, -1, -1, 0, 1, 1, -4, -2, -1, 0, 0, 1, 1, 1, + -3, -2, 0, 0, 1, 1, 1, 1, -3, -1, 0, 1, 1, 1, 0, 0, + -1, 0, 1, 1, 1, 0, 0, -1, 0, 1, 2, 2, 1, 0, 0, -1, + -4, -4, -4, -3, -2, -1, -1, -1, -2, -2, -2, -1, 0, 0, 0, 0, + -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 0, + 1, 2, 2, 2, 1, -1, -2, -4, 1, 1, 2, 2, 1, 0, -2, -4, + 0, 1, 1, 1, 1, 0, -1, -3, -1, 0, 1, 1, 0, 0, -1, -2, + -1, 0, 1, 1, 1, 0, 0, -1, -2, -1, 0, 0, 0, 0, 0, -1, + -1, -1, 0, 1, 1, 0, 0, 0, -1, 0, 1, 1, 1, 1, 1, 0, + 2, 2, 0, -1, -2, -1, -1, -2, 1, 1, -1, -2, -2, -1, -1, -2, + 1, 1, -1, -2, -2, 0, 0, -1, 1, 1, 0, -2, -1, 1, 1, 0, + 1, 1, 0, -1, -1, 1, 2, 1, 1, 1, 0, -1, -1, 1, 2, 1, + 1, 1, 0, -1, -1, 1, 1, 1, 1, 1, 0, -1, 0, 1, 1, 1, + 0, 0, -1, -2, -4, -4, -4, -4, 3, 3, 3, 2, 1, 0, 0, 0, + 3, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 1, + -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, + -1, -1, 0, -1, -1, 1, 2, -1, 1, 1, 0, 0, 0, 2, 3, -1, + 1, 1, 0, -1, -1, 1, 3, -1, 1, 1, 0, -2, -2, 0, 1, -2, + 1, 0, 0, -2, -2, 0, 1, -3, 0, 0, 0, 0, -1, 1, 1, -3, + 0, 1, 1, 0, 1, 2, 1, -3, -1, 0, 1, 1, 1, 2, 1, -4, + -4, -3, 0, 1, 1, 1, 0, 0, -4, -2, 0, 1, 1, 1, 0, -1, + -3, -1, 1, 1, 1, 0, -1, -1, -1, 1, 1, 1, 1, 0, -1, 0, + 1, 2, 2, 1, 0, -1, 0, 0, 2, 2, 1, 0, -1, -1, 0, 1, + 2, 1, 0, -1, -2, -1, 0, 1, 2, 2, 0, -1, -2, -1, 1, 1, + 1, 1, 0, 0, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, + 1, 0, 0, -1, -1, -1, -1, -1, 2, 1, 0, 0, -1, -1, -1, -1, + 5, 3, 2, 1, 0, 0, 0, 0, 6, 5, 3, 2, 1, 0, 0, 0, + 4, 4, 3, 1, 0, 0, 0, 1, 3, 3, 2, 1, 0, 0, 0, 1, + 2, 2, 1, 0, -1, -1, 0, 1, 0, 0, 0, -1, -1, -1, 0, 1, + 0, 0, -1, -1, -2, -1, 0, 2, 0, -1, -1, -2, -2, -2, 0, 1, + 0, -1, -1, -2, -2, -2, -1, 0, 0, 0, -1, -2, -2, -2, -1, 0, + 0, 0, -1, -1, -1, 0, 2, 3, 0, -1, -2, -2, -1, -1, 1, 2, + 1, 0, -1, -1, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0, -1, -1, + 1, 2, 1, 0, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, + -3, -2, -1, -1, 0, 1, 1, 2, -4, -3, -1, 1, 2, 3, 5, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, -1, 0, 0, 0, 1, -1, -1, -2, -2, -2, -1, -1, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, + 1, 1, 1, 1, 2, 2, 1, 1, -4, -3, -4, -4, -4, -4, -3, -3, + -1, 0, 1, 2, 2, 3, 3, 3, -1, -1, -1, -1, 0, 0, 0, 0, + 0, 0, -1, -2, -2, -3, -3, -2, 3, 2, 1, 0, -1, -2, -2, -2, + 4, 3, 2, 1, 1, 0, 0, 0, 2, 2, 1, 1, 0, 1, 1, 1, + 0, -1, -1, -1, -1, 0, 0, 1, -2, -2, -2, -2, -2, -1, 0, 0, + 1, -1, 0, 2, 1, -2, -1, 1, 1, -1, 0, 2, 1, -2, -2, 1, + 1, -1, 0, 3, 2, -2, -1, 1, 0, -2, 0, 3, 2, -2, -2, 1, + 0, -2, 0, 3, 2, -2, -2, 1, 0, -2, 0, 3, 1, -2, -1, 1, + 0, -2, 0, 2, 1, -2, -2, 1, 0, -1, 0, 2, 1, -2, -1, 1, + 0, 1, 2, 2, 3, 3, 2, 2, 0, 1, 1, 2, 3, 3, 2, 1, + 0, 0, 1, 2, 2, 2, 2, 1, -1, 0, 0, 1, 1, 1, 1, 1, + -1, -1, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, + -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -1, + 0, 0, -1, -2, -1, 0, 3, 5, 0, 0, -1, -1, -1, 0, 2, 4, + 1, 1, 0, 0, -1, -1, 1, 2, 1, 2, 1, 1, 0, -1, -1, 0, + 0, 1, 2, 1, 0, -1, -2, -2, -1, 0, 1, 2, 1, 0, -3, -3, + -2, -1, 1, 2, 2, 0, -2, -4, -2, -1, 0, 2, 2, 1, -1, -3, + 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, + -1, -1, -1, -1, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, -1, -1, 0, + 0, 0, 1, 1, 0, 0, 0, 1, 3, 3, 3, 4, 3, 3, 3, 3, + 5, 1, -2, -2, 0, 0, 0, -1, 4, -1, -3, -1, 0, 0, 0, -1, + 3, -1, -1, 0, 1, 1, 0, -1, 2, 0, 0, 1, 1, 1, 0, -2, + 1, 0, 0, 1, 1, 1, 0, -2, 0, -1, -1, -1, 0, 0, 0, -1, + 0, -1, -1, -1, -1, 0, 0, -1, 2, 1, 0, 0, 0, 1, 0, 0, + 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, + 1, -1, -1, 0, 0, 0, 0, 0, 2, 0, -1, -1, -1, -1, -1, 0, + 3, 1, -1, -1, -2, -2, -2, -1, 4, 2, 1, 0, -1, -2, -2, -1, + 2, 1, 0, 0, -1, -1, 0, 0, 0, -1, -1, -1, -1, 0, 1, 1, + 0, 1, 2, 2, 2, 1, -1, -3, 0, 0, 1, 1, 1, 0, -1, -2, + 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, 0, 0, 1, 1, 0, + 0, 0, -1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, + 0, 0, 1, 1, 2, 1, -1, -3, 0, 0, 0, 1, 1, -1, -4, -5, + -2, -2, -2, -1, 0, 2, 2, 2, 0, 0, 0, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 1, 0, -2, -3, 0, 0, 1, 1, 0, -1, -3, -4, + -1, -1, 0, 1, 0, 0, -2, -3, -1, -1, 0, 1, 1, 1, 0, -1, + 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, + 0, 1, 0, 0, 1, 1, 1, 2, 1, 2, 0, 0, 0, 0, -1, 1, + 0, 2, 0, -1, 1, 0, -1, 0, 0, 1, 0, 0, 2, 1, 0, 1, + 0, 1, -1, 0, 2, 2, 0, 1, -1, 0, -1, -1, 2, 1, 1, 2, + -2, -2, -3, -2, 0, 1, 1, 1, -2, -2, -3, -3, -1, -1, -1, 0, + -3, -1, 0, 1, 2, 1, 1, 0, -3, -1, 0, 1, 2, 1, 1, 1, + -2, 0, 0, 1, 1, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, + -2, 0, 0, 0, 0, -1, -1, 0, -2, 0, 0, 0, 0, 0, -1, -1, + -3, 0, 1, 1, 1, 1, 0, 1, -5, -2, 0, 1, 2, 2, 1, 2, + -2, -1, -1, 0, 0, 1, 2, 3, 0, 0, 1, 1, 0, 0, 1, 2, + 0, 0, 1, 0, -1, -1, 0, 1, -1, -1, -1, -1, -2, -2, -1, 0, + -2, -2, -2, -2, -2, -1, 0, 1, 0, 0, 0, -1, 0, 1, 2, 2, + 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 0, -1, -1, -1, 0, 0, + 0, 1, 1, 1, 1, 1, -1, -4, -1, -1, 0, 1, 1, 1, 0, -3, + -2, -1, 0, 0, 1, 2, 2, -2, -1, 0, 0, 0, 0, 2, 3, -1, + -1, 0, 0, 0, 0, 1, 2, 0, 0, 0, -1, -2, -1, 1, 1, 0, + 0, 0, -1, -2, -2, 0, 2, 1, 0, 0, -1, -2, -1, 1, 2, 2, + 1, 0, 0, 0, -2, -3, -2, -3, 0, 0, 1, 0, -2, -2, -1, -1, + 0, -1, 1, 1, -1, -1, 0, 0, 0, -1, 1, 1, -1, -1, 0, 0, + 0, 1, 2, 1, -1, -1, 0, 1, 1, 2, 3, 2, 0, 0, 1, 2, + -1, 0, 2, 1, 0, 0, 2, 3, -2, -1, 0, 0, -1, 0, 1, 2, + 1, 1, 0, -1, -2, -2, -1, 1, 1, 1, 1, -1, -2, -2, 0, 2, + 1, 1, 1, -1, -1, -1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 2, + -1, -1, -1, 0, 0, 0, 1, 2, -1, -2, -1, 1, 1, 1, 0, 0, + -1, -2, -1, 1, 2, 2, 0, -1, -1, -2, -1, 2, 2, 2, 0, -1, + -1, -1, -1, -2, -1, -1, 0, 1, 0, 0, -1, -1, -1, 0, 1, 2, + 1, 0, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, + 1, 2, 1, 0, -1, -2, -2, -3, 2, 2, 1, 0, -2, -3, -4, -4, + -4, -2, 1, 1, 1, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, 0, + 0, 1, 1, -2, -2, -1, 0, 1, 2, 2, 1, -2, -2, -1, 1, 2, + 1, 2, 1, -2, -2, -1, 1, 2, -1, 1, 1, -1, -1, -1, 0, 1, + -2, 0, 1, 1, 0, -1, -1, 0, -2, 0, 2, 2, 1, -1, -1, 0, + 1, 1, 0, 0, 0, 1, 0, 0, -2, -3, -3, -2, -2, -1, 0, 0, + -3, -4, -3, -2, -1, 0, 0, 0, -1, -1, 0, 1, 2, 3, 2, 1, + 0, 1, 2, 3, 3, 3, 2, 1, 1, 1, 1, 2, 1, 0, 0, -1, + 0, 0, 0, 0, -1, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0, + 1, 1, 0, 0, -1, -1, 0, 2, 0, 0, 1, 0, -1, -1, 1, 1, + -2, -1, 0, 1, 1, 1, 1, 1, -3, -3, 0, 2, 2, 1, 1, 0, + -2, -2, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, -1, -1, + 3, 1, -1, -3, -2, -1, 0, 1, 4, 2, -1, -3, -3, -1, 1, 2, + 0, 0, 0, -1, -1, -1, -1, -1, 1, 2, 1, 0, 0, 0, -1, -1, + 2, 3, 3, 2, 1, 0, -1, -1, 3, 4, 4, 2, 1, 0, -1, -2, + 3, 3, 2, 1, 0, -1, -2, -2, 1, 1, 0, -1, -1, -2, -2, -3, + 0, 0, 0, -1, -1, -2, -2, -2, -1, -1, -1, -1, -1, -2, -2, -1, + 1, 2, 2, 2, 2, 1, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 0, -1, -2, 0, 0, 0, 0, 1, 0, -1, -4, + 1, 0, 0, 0, 0, 0, -2, -5, 1, 0, 0, 0, 0, 0, -1, -4, + 1, 0, -1, 0, 0, 0, -1, -3, 0, -1, -1, 0, 1, 1, 1, -1, + -2, -1, 0, 0, -1, -1, -1, -2, -1, 0, 0, 0, -1, -1, -2, -2, + 0, 1, 1, 0, -1, -1, -1, -2, 0, 1, 1, 0, 0, 0, -1, -1, + 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 2, 2, 1, + 1, 1, 0, 0, 1, 2, 2, 1, 1, 1, 0, -1, 0, 1, 1, 0, + 4, 2, 1, 0, 0, 1, 1, 1, 4, 2, 1, 0, 0, 0, 0, 1, + 3, 1, 0, 0, -1, -1, -1, 0, 1, 0, 0, -1, -1, -2, -1, 0, + 0, 0, 0, 0, -1, -1, -1, 0, -1, -1, 0, 0, -1, -1, 0, 1, + -2, -1, 0, -1, -1, 0, 0, 1, -2, -2, -1, -2, -1, 0, 0, 1, + 0, 1, 1, 1, 2, 1, 0, -1, -1, -1, -1, 0, 0, -1, -2, -2, + -1, 0, -1, 0, 0, -1, -2, -1, 0, 0, 0, 0, 0, 0, 1, 2, + 0, 0, 0, 0, 0, 0, 2, 3, -1, 0, -1, -1, -1, -1, 0, 3, + -1, 0, 0, -1, -1, -2, 0, 3, 0, 0, 0, 0, -1, -1, 1, 4, + 2, 2, 0, 0, 0, 0, 0, 1, 1, 1, -1, -2, -1, -2, -1, 1, + -1, -1, -2, -2, -2, -3, -2, 0, -1, 0, -1, -1, -1, -2, -1, 1, + 1, 1, 0, 0, 1, 0, 0, 1, 2, 2, 0, 0, 1, 0, 0, 1, + 2, 2, 0, 0, 0, 0, -1, -1, 2, 2, 0, 0, 1, 0, -1, -1, + -1, 0, 1, 1, 0, -1, -1, -1, 1, 2, 3, 2, 1, 0, 0, 0, + 0, 1, 1, 1, 0, -1, 0, 0, -2, -2, -1, 0, 1, 0, 0, 0, + -2, -2, -1, 2, 2, 2, 1, 0, -2, -1, 0, 1, 1, 0, 0, -1, + -1, -1, 0, 0, -1, -2, -1, -2, 0, 1, 1, 1, 0, 0, 1, 1, + -3, -3, -3, -2, -1, -1, -2, -2, -1, -1, 0, 1, 2, 1, 0, 0, + 1, 1, 1, 2, 2, 1, 0, 0, 1, 1, 1, 1, 1, 0, -1, 1, + 1, 0, -1, -1, 0, 0, -1, 1, 0, -1, -1, -1, 0, -1, -1, 1, + 1, 0, -1, 0, 0, -1, 0, 2, 2, 0, -1, 0, 0, 0, 0, 2, + 1, 0, -2, -1, 0, 1, 1, 0, 2, 0, -1, -1, 0, 1, 1, 0, + 1, 0, -2, -1, 0, 1, 0, -1, 1, 0, -1, -1, 0, 1, 0, -1, + 0, 1, 1, 0, 1, 1, 0, 0, -2, 1, 2, 1, 0, 0, 0, 1, + -5, 0, 2, 1, 0, -1, 0, 1, -6, -1, 2, 1, 0, -1, 0, 0, + 5, 3, 0, -1, -2, -1, -1, -1, 1, 1, 0, -1, -1, 0, -1, -1, + -1, 0, 1, 1, 2, 2, 1, 0, -2, -1, 0, 1, 2, 1, 1, 1, + -2, -1, -1, -1, 0, -1, 0, 1, 0, 1, 0, 0, -1, -1, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, -3, -2, 0, 1, 1, 0, 0, -1, + -1, 0, 1, 0, -1, 0, 2, 3, -1, 0, 0, -2, -4, -2, -1, 0, + 0, 1, 1, 0, -2, -1, 0, -1, 1, 2, 3, 1, 0, 1, 1, 0, + -1, 0, 1, 1, 1, 1, 1, 0, -2, -3, -2, 0, 0, 0, 1, 0, + -1, -2, -2, 0, 1, 0, 0, -1, 3, 1, 0, 0, 1, 0, -1, -1, + -2, -1, 0, 0, -1, -1, 0, 0, -1, 0, 0, 0, 0, 1, 1, 1, + -1, -1, -1, 0, 1, 1, 1, 1, 0, -2, -3, -1, 1, 0, 0, 0, + 1, -1, -3, -1, 1, 1, 0, -1, 3, 1, -1, 1, 2, 2, 0, -1, + 3, 1, 0, 1, 2, 1, 1, 0, 0, -2, -2, -1, -1, 0, 0, 0, + 1, 0, -1, -1, 1, 2, 1, 0, 0, -1, -2, -1, 1, 2, 2, 1, + -1, -1, -1, 0, 0, 1, 2, 0, -2, 0, 0, 0, 0, 0, 1, -1, + -1, 0, 1, 0, -1, -1, -1, -1, 0, 1, 1, 2, 0, -2, -1, 0, + 1, 2, 2, 2, 1, -1, -1, 0, 0, 1, 1, 1, 0, -2, -2, -1, + 0, 0, -1, -1, -1, -1, -2, -2, 0, 0, -1, 0, 1, 2, 2, 1, + 0, 0, -1, -1, 0, 1, 2, 2, 1, 1, -1, -2, -1, -1, -1, -1, + 2, 2, 1, 0, 0, -1, -2, -2, 1, 2, 2, 1, 0, 0, -2, -2, + 0, 0, 0, 0, 1, 1, 0, -1, 0, -1, -1, -1, 2, 3, 2, 1, + 0, -2, 1, 2, -1, 0, 0, 1, -1, -2, 2, 3, -1, 0, 0, 0, + 0, -2, 2, 3, -1, -1, 0, 0, 0, -1, 3, 2, -2, 0, 1, 0, + 0, -1, 3, 1, -2, 0, 1, 0, 0, -1, 2, 1, -1, 1, 0, -1, + 0, 0, 1, -1, -2, 0, 0, -1, 1, 0, 0, -2, -2, -1, -1, -1, + 1, 1, 1, 1, 1, -1, -1, -2, 0, 0, 0, 1, 1, 1, 1, 1, + 0, 0, 0, 1, 1, 1, 2, 3, 1, 0, 0, -1, 0, 0, 1, 2, + 0, -1, -1, -2, -1, 0, 1, 2, -2, -2, -2, -2, -1, 0, 1, 1, + -1, -1, -1, -1, 0, 0, 0, -1, 2, 2, 2, 0, -1, -1, -2, -4, + -1, -2, -1, -1, 0, 1, 2, 3, -1, -1, -1, -1, 0, 1, 2, 3, + 1, 0, -1, 0, -1, 0, 1, 2, 1, 0, 0, 0, -1, 0, 2, 2, + 1, 0, -1, -1, -2, 0, 1, 2, 0, -2, -2, -2, -3, -1, 0, 1, + 0, -2, -2, -2, -2, -1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2 +}; + +/* list of codebooks for intra-coded vectors */ +const int8_t* const ff_svq1_intra_codebooks[6] = { + svq1_intra_codebook_4x2, svq1_intra_codebook_4x4, + svq1_intra_codebook_8x4, svq1_intra_codebook_8x8, + NULL, NULL, +}; + +#endif /* AVCODEC_SVQ1_CB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_vlc.h new file mode 100644 index 00000000..06e3509e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1_vlc.h @@ -0,0 +1,268 @@ +/* + * Copyright (C) 2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SVQ1_VLC_H +#define AVCODEC_SVQ1_VLC_H + +#include + +/* values in this table range from 0..3; adjust retrieved value by +0 */ +const uint8_t ff_svq1_block_type_vlc[4][2] = { + /* { code, length } */ + { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, { 0x0, 3 } +}; + +/* values in this table range from -1..6; adjust retrieved value by -1 */ +const uint8_t ff_svq1_intra_multistage_vlc[6][8][2] = { + /* { code, length } */ + { { 0x1, 5 }, { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, + { 0x3, 4 }, { 0x2, 4 }, { 0x0, 5 }, { 0x1, 4 } }, + { { 0x1, 4 }, { 0x3, 2 }, { 0x5, 3 }, { 0x4, 3 }, + { 0x3, 3 }, { 0x2, 3 }, { 0x0, 4 }, { 0x1, 3 } }, + { { 0x1, 5 }, { 0x1, 1 }, { 0x3, 3 }, { 0x0, 5 }, + { 0x3, 4 }, { 0x2, 3 }, { 0x2, 4 }, { 0x1, 4 } }, + { { 0x1, 6 }, { 0x1, 1 }, { 0x1, 2 }, { 0x0, 6 }, + { 0x3, 4 }, { 0x2, 4 }, { 0x1, 5 }, { 0x1, 4 } }, + { { 0x1, 6 }, { 0x1, 1 }, { 0x1, 2 }, { 0x3, 5 }, + { 0x2, 5 }, { 0x0, 6 }, { 0x1, 5 }, { 0x1, 3 } }, + { { 0x1, 7 }, { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, + { 0x1, 4 }, { 0x1, 6 }, { 0x0, 7 }, { 0x1, 5 } } +}; + +/* values in this table range from -1..6; adjust retrieved value by -1 */ +const uint8_t ff_svq1_inter_multistage_vlc[6][8][2] = { + /* { code, length } */ + { { 0x3, 2 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 3 }, + { 0x2, 3 }, { 0x1, 3 }, { 0x1, 4 }, { 0x0, 4 } }, + { { 0x3, 2 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 3 }, + { 0x2, 3 }, { 0x1, 3 }, { 0x1, 4 }, { 0x0, 4 } }, + { { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, { 0x3, 4 }, + { 0x2, 4 }, { 0x1, 4 }, { 0x1, 5 }, { 0x0, 5 } }, + { { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, { 0x3, 4 }, + { 0x2, 4 }, { 0x1, 4 }, { 0x1, 5 }, { 0x0, 5 } }, + { { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, { 0x3, 4 }, + { 0x2, 4 }, { 0x1, 4 }, { 0x1, 5 }, { 0x0, 5 } }, + { { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, { 0x3, 5 }, + { 0x2, 5 }, { 0x1, 5 }, { 0x1, 6 }, { 0x0, 6 } } +}; + +/* values in this table range from 0..255; adjust retrieved value by +0 */ +const uint16_t ff_svq1_intra_mean_vlc[256][2] = { + /* { code, length } */ + { 0x37, 6 }, { 0x56, 7 }, { 0x01, 17 }, { 0x01, 20 }, + { 0x02, 20 }, { 0x03, 20 }, { 0x00, 20 }, { 0x04, 20 }, + { 0x05, 20 }, { 0x03, 19 }, { 0x15, 11 }, { 0x42, 9 }, + { 0x14, 11 }, { 0x03, 14 }, { 0x02, 14 }, { 0x01, 15 }, + { 0x01, 16 }, { 0x01, 12 }, { 0x2B, 10 }, { 0x18, 11 }, + { 0x0C, 11 }, { 0x41, 9 }, { 0x78, 8 }, { 0x6C, 8 }, + { 0x55, 7 }, { 0x0F, 4 }, { 0x0E, 4 }, { 0x34, 6 }, + { 0x51, 7 }, { 0x72, 8 }, { 0x6E, 8 }, { 0x40, 9 }, + { 0x3F, 9 }, { 0x3E, 9 }, { 0x3D, 9 }, { 0x3C, 9 }, + { 0x3B, 9 }, { 0x3A, 9 }, { 0x39, 9 }, { 0x38, 9 }, + { 0x37, 9 }, { 0x43, 9 }, { 0x46, 9 }, { 0x47, 9 }, + { 0x45, 9 }, { 0x44, 9 }, { 0x49, 9 }, { 0x48, 9 }, + { 0x4A, 8 }, { 0x79, 8 }, { 0x76, 8 }, { 0x77, 8 }, + { 0x71, 8 }, { 0x75, 8 }, { 0x74, 8 }, { 0x73, 8 }, + { 0x6A, 8 }, { 0x55, 8 }, { 0x70, 8 }, { 0x6F, 8 }, + { 0x52, 8 }, { 0x6D, 8 }, { 0x4C, 8 }, { 0x6B, 8 }, + { 0x40, 7 }, { 0x69, 8 }, { 0x68, 8 }, { 0x67, 8 }, + { 0x66, 8 }, { 0x65, 8 }, { 0x64, 8 }, { 0x63, 8 }, + { 0x62, 8 }, { 0x61, 8 }, { 0x60, 8 }, { 0x5F, 8 }, + { 0x5E, 8 }, { 0x5D, 8 }, { 0x5C, 8 }, { 0x5B, 8 }, + { 0x5A, 8 }, { 0x59, 8 }, { 0x58, 8 }, { 0x57, 8 }, + { 0x56, 8 }, { 0x3D, 7 }, { 0x54, 8 }, { 0x53, 8 }, + { 0x3F, 7 }, { 0x51, 8 }, { 0x50, 8 }, { 0x4F, 8 }, + { 0x4E, 8 }, { 0x4D, 8 }, { 0x41, 7 }, { 0x4B, 8 }, + { 0x53, 7 }, { 0x3E, 7 }, { 0x48, 8 }, { 0x4F, 7 }, + { 0x52, 7 }, { 0x45, 8 }, { 0x50, 7 }, { 0x43, 8 }, + { 0x42, 8 }, { 0x41, 8 }, { 0x42, 7 }, { 0x43, 7 }, + { 0x3E, 8 }, { 0x44, 7 }, { 0x3C, 8 }, { 0x45, 7 }, + { 0x46, 7 }, { 0x47, 7 }, { 0x48, 7 }, { 0x49, 7 }, + { 0x4A, 7 }, { 0x4B, 7 }, { 0x4C, 7 }, { 0x4D, 7 }, + { 0x4E, 7 }, { 0x58, 7 }, { 0x59, 7 }, { 0x5A, 7 }, + { 0x5B, 7 }, { 0x5C, 7 }, { 0x5D, 7 }, { 0x44, 8 }, + { 0x49, 8 }, { 0x29, 8 }, { 0x3F, 8 }, { 0x3D, 8 }, + { 0x3B, 8 }, { 0x2C, 8 }, { 0x28, 8 }, { 0x25, 8 }, + { 0x26, 8 }, { 0x5E, 7 }, { 0x57, 7 }, { 0x54, 7 }, + { 0x5F, 7 }, { 0x62, 7 }, { 0x63, 7 }, { 0x64, 7 }, + { 0x61, 7 }, { 0x65, 7 }, { 0x67, 7 }, { 0x66, 7 }, + { 0x35, 6 }, { 0x36, 6 }, { 0x60, 7 }, { 0x39, 8 }, + { 0x3A, 8 }, { 0x38, 8 }, { 0x37, 8 }, { 0x36, 8 }, + { 0x35, 8 }, { 0x34, 8 }, { 0x33, 8 }, { 0x32, 8 }, + { 0x31, 8 }, { 0x30, 8 }, { 0x2D, 8 }, { 0x2B, 8 }, + { 0x2A, 8 }, { 0x27, 8 }, { 0x40, 8 }, { 0x46, 8 }, + { 0x47, 8 }, { 0x26, 9 }, { 0x25, 9 }, { 0x24, 9 }, + { 0x23, 9 }, { 0x22, 9 }, { 0x2E, 8 }, { 0x2F, 8 }, + { 0x1F, 9 }, { 0x36, 9 }, { 0x1D, 9 }, { 0x21, 9 }, + { 0x1B, 9 }, { 0x1C, 9 }, { 0x19, 9 }, { 0x1A, 9 }, + { 0x18, 9 }, { 0x17, 9 }, { 0x16, 9 }, { 0x1E, 9 }, + { 0x20, 9 }, { 0x27, 9 }, { 0x28, 9 }, { 0x29, 9 }, + { 0x2A, 9 }, { 0x2B, 9 }, { 0x2C, 9 }, { 0x2D, 9 }, + { 0x2E, 9 }, { 0x2F, 9 }, { 0x30, 9 }, { 0x35, 9 }, + { 0x31, 9 }, { 0x32, 9 }, { 0x33, 9 }, { 0x34, 9 }, + { 0x19, 10 }, { 0x2A, 10 }, { 0x17, 10 }, { 0x16, 10 }, + { 0x15, 10 }, { 0x28, 10 }, { 0x26, 10 }, { 0x25, 10 }, + { 0x22, 10 }, { 0x21, 10 }, { 0x18, 10 }, { 0x14, 10 }, + { 0x29, 10 }, { 0x12, 10 }, { 0x0D, 10 }, { 0x0E, 10 }, + { 0x0F, 10 }, { 0x10, 10 }, { 0x11, 10 }, { 0x1A, 10 }, + { 0x1B, 10 }, { 0x1C, 10 }, { 0x1D, 10 }, { 0x1E, 10 }, + { 0x1F, 10 }, { 0x20, 10 }, { 0x13, 10 }, { 0x23, 10 }, + { 0x24, 10 }, { 0x09, 11 }, { 0x08, 11 }, { 0x07, 11 }, + { 0x27, 10 }, { 0x05, 11 }, { 0x0B, 11 }, { 0x06, 11 }, + { 0x04, 11 }, { 0x03, 11 }, { 0x02, 11 }, { 0x01, 11 }, + { 0x0A, 11 }, { 0x16, 11 }, { 0x19, 11 }, { 0x17, 11 }, + { 0x0D, 11 }, { 0x0E, 11 }, { 0x0F, 11 }, { 0x10, 11 }, + { 0x11, 11 }, { 0x12, 11 }, { 0x13, 11 }, { 0x01, 14 } +}; + +/* values in this table range from -256..255; adjust retrieved value by -256 */ +const uint16_t ff_svq1_inter_mean_vlc[512][2] = { + /* { code, length } */ + { 0x5A, 22 }, { 0xD4, 22 }, { 0xD5, 22 }, { 0xD6, 22 }, + { 0xD7, 22 }, { 0xD8, 22 }, { 0xD9, 22 }, { 0xDA, 22 }, + { 0xDB, 22 }, { 0xDC, 22 }, { 0xDD, 22 }, { 0xDE, 22 }, + { 0xDF, 22 }, { 0xE0, 22 }, { 0xE1, 22 }, { 0xE2, 22 }, + { 0xE3, 22 }, { 0xE4, 22 }, { 0xE5, 22 }, { 0xE6, 22 }, + { 0xE8, 22 }, { 0xCB, 22 }, { 0xE9, 22 }, { 0xEA, 22 }, + { 0xE7, 22 }, { 0xEC, 22 }, { 0xED, 22 }, { 0xEE, 22 }, + { 0xEF, 22 }, { 0xF0, 22 }, { 0xF1, 22 }, { 0xF2, 22 }, + { 0xF3, 22 }, { 0xF4, 22 }, { 0xF5, 22 }, { 0xF6, 22 }, + { 0xF7, 22 }, { 0xF8, 22 }, { 0x102,22 }, { 0xEB, 22 }, + { 0xF9, 22 }, { 0xFC, 22 }, { 0xFD, 22 }, { 0xFE, 22 }, + { 0x100,22 }, { 0x5C, 22 }, { 0x60, 22 }, { 0x101,22 }, + { 0x71, 22 }, { 0x104,22 }, { 0x105,22 }, { 0xFB, 22 }, + { 0xFF, 22 }, { 0x86, 21 }, { 0xFA, 22 }, { 0x7C, 22 }, + { 0x75, 22 }, { 0x103,22 }, { 0x78, 22 }, { 0xD3, 22 }, + { 0x7B, 22 }, { 0x82, 22 }, { 0xD2, 22 }, { 0xD1, 22 }, + { 0xD0, 22 }, { 0xCF, 22 }, { 0xCE, 22 }, { 0xCD, 22 }, + { 0xCC, 22 }, { 0xC3, 22 }, { 0xCA, 22 }, { 0xC9, 22 }, + { 0xC8, 22 }, { 0xC7, 22 }, { 0xC6, 22 }, { 0xC5, 22 }, + { 0x8B, 22 }, { 0xC4, 22 }, { 0xC2, 22 }, { 0xC1, 22 }, + { 0xC0, 22 }, { 0xBF, 22 }, { 0xBE, 22 }, { 0xBD, 22 }, + { 0xBC, 22 }, { 0xBB, 22 }, { 0xBA, 22 }, { 0xB9, 22 }, + { 0x61, 22 }, { 0x84, 22 }, { 0x85, 22 }, { 0x86, 22 }, + { 0x87, 22 }, { 0x88, 22 }, { 0x89, 22 }, { 0x8A, 22 }, + { 0x8C, 22 }, { 0x8D, 22 }, { 0x8E, 22 }, { 0x8F, 22 }, + { 0x90, 22 }, { 0x91, 22 }, { 0x92, 22 }, { 0x93, 22 }, + { 0x94, 22 }, { 0x95, 22 }, { 0x96, 22 }, { 0x97, 22 }, + { 0x98, 22 }, { 0x99, 22 }, { 0x9A, 22 }, { 0x9B, 22 }, + { 0x9C, 22 }, { 0x9D, 22 }, { 0x9E, 22 }, { 0x9F, 22 }, + { 0xA0, 22 }, { 0xA1, 22 }, { 0xA2, 22 }, { 0xA3, 22 }, + { 0xA4, 22 }, { 0xA5, 22 }, { 0xA6, 22 }, { 0xA7, 22 }, + { 0xA8, 22 }, { 0xA9, 22 }, { 0xAA, 22 }, { 0xAB, 22 }, + { 0x7F, 22 }, { 0x8F, 21 }, { 0xAC, 22 }, { 0xAD, 22 }, + { 0xAE, 22 }, { 0xAF, 22 }, { 0xB0, 22 }, { 0xB1, 22 }, + { 0x53, 20 }, { 0x90, 21 }, { 0xB2, 22 }, { 0x91, 21 }, + { 0xB3, 22 }, { 0xB4, 22 }, { 0x54, 20 }, { 0xB5, 22 }, + { 0xB6, 22 }, { 0x8C, 21 }, { 0x34, 19 }, { 0x3D, 18 }, + { 0x55, 20 }, { 0xB7, 22 }, { 0xB8, 22 }, { 0x8B, 21 }, + { 0x56, 20 }, { 0x3D, 19 }, { 0x57, 20 }, { 0x58, 20 }, + { 0x40, 19 }, { 0x43, 19 }, { 0x47, 19 }, { 0x2A, 18 }, + { 0x2E, 19 }, { 0x2C, 18 }, { 0x46, 19 }, { 0x59, 20 }, + { 0x49, 19 }, { 0x2D, 19 }, { 0x38, 18 }, { 0x36, 18 }, + { 0x39, 18 }, { 0x45, 19 }, { 0x28, 18 }, { 0x30, 18 }, + { 0x35, 18 }, { 0x20, 17 }, { 0x44, 19 }, { 0x32, 18 }, + { 0x31, 18 }, { 0x1F, 17 }, { 0x2F, 18 }, { 0x2E, 18 }, + { 0x2D, 18 }, { 0x21, 17 }, { 0x22, 17 }, { 0x23, 17 }, + { 0x24, 17 }, { 0x27, 16 }, { 0x23, 16 }, { 0x20, 16 }, + { 0x1D, 16 }, { 0x25, 16 }, { 0x1E, 16 }, { 0x24, 16 }, + { 0x2A, 16 }, { 0x26, 16 }, { 0x21, 15 }, { 0x29, 16 }, + { 0x22, 15 }, { 0x23, 15 }, { 0x24, 15 }, { 0x1B, 15 }, + { 0x1A, 15 }, { 0x1D, 15 }, { 0x1F, 15 }, { 0x27, 15 }, + { 0x17, 14 }, { 0x18, 14 }, { 0x19, 14 }, { 0x1B, 14 }, + { 0x1C, 14 }, { 0x1E, 14 }, { 0x25, 14 }, { 0x20, 14 }, + { 0x21, 14 }, { 0x13, 13 }, { 0x14, 13 }, { 0x15, 13 }, + { 0x16, 13 }, { 0x17, 13 }, { 0x18, 13 }, { 0x19, 13 }, + { 0x1A, 13 }, { 0x18, 12 }, { 0x17, 12 }, { 0x15, 12 }, + { 0x14, 12 }, { 0x13, 12 }, { 0x12, 12 }, { 0x0F, 11 }, + { 0x10, 11 }, { 0x12, 11 }, { 0x13, 11 }, { 0x1B, 11 }, + { 0x1A, 11 }, { 0x0E, 10 }, { 0x13, 10 }, { 0x0F, 10 }, + { 0x10, 10 }, { 0x11, 10 }, { 0x12, 10 }, { 0x0D, 9 }, + { 0x14, 9 }, { 0x15, 9 }, { 0x0C, 9 }, { 0x13, 9 }, + { 0x0F, 8 }, { 0x0E, 8 }, { 0x10, 8 }, { 0x11, 8 }, + { 0x0C, 7 }, { 0x09, 7 }, { 0x0A, 7 }, { 0x08, 6 }, + { 0x09, 6 }, { 0x09, 5 }, { 0x08, 5 }, { 0x05, 4 }, + { 0x01, 1 }, { 0x03, 3 }, { 0x07, 5 }, { 0x06, 5 }, + { 0x0B, 6 }, { 0x0A, 6 }, { 0x0E, 7 }, { 0x0F, 7 }, + { 0x0B, 7 }, { 0x0D, 7 }, { 0x0B, 8 }, { 0x0D, 8 }, + { 0x0C, 8 }, { 0x0F, 9 }, { 0x10, 9 }, { 0x11, 9 }, + { 0x0E, 9 }, { 0x12, 9 }, { 0x17, 10 }, { 0x14, 10 }, + { 0x16, 10 }, { 0x15, 10 }, { 0x19, 11 }, { 0x18, 11 }, + { 0x17, 11 }, { 0x16, 11 }, { 0x15, 11 }, { 0x14, 11 }, + { 0x11, 11 }, { 0x19, 12 }, { 0x1A, 12 }, { 0x16, 12 }, + { 0x1D, 12 }, { 0x1B, 12 }, { 0x1C, 12 }, { 0x20, 13 }, + { 0x1C, 13 }, { 0x23, 13 }, { 0x22, 13 }, { 0x21, 13 }, + { 0x1F, 13 }, { 0x1E, 13 }, { 0x1B, 13 }, { 0x1D, 13 }, + { 0x24, 14 }, { 0x16, 14 }, { 0x1A, 14 }, { 0x22, 14 }, + { 0x1D, 14 }, { 0x1F, 14 }, { 0x15, 14 }, { 0x23, 14 }, + { 0x18, 15 }, { 0x20, 15 }, { 0x29, 15 }, { 0x28, 15 }, + { 0x26, 15 }, { 0x25, 15 }, { 0x19, 15 }, { 0x1C, 15 }, + { 0x1E, 15 }, { 0x17, 15 }, { 0x2C, 16 }, { 0x2B, 16 }, + { 0x1C, 16 }, { 0x21, 16 }, { 0x2D, 16 }, { 0x28, 16 }, + { 0x1F, 16 }, { 0x1B, 16 }, { 0x1A, 16 }, { 0x22, 16 }, + { 0x2D, 17 }, { 0x32, 17 }, { 0x2C, 17 }, { 0x27, 17 }, + { 0x31, 17 }, { 0x33, 17 }, { 0x2F, 17 }, { 0x2B, 17 }, + { 0x37, 18 }, { 0x2A, 17 }, { 0x2E, 17 }, { 0x30, 17 }, + { 0x29, 17 }, { 0x28, 17 }, { 0x26, 17 }, { 0x25, 17 }, + { 0x2F, 19 }, { 0x33, 18 }, { 0x34, 18 }, { 0x30, 19 }, + { 0x3A, 18 }, { 0x3B, 18 }, { 0x31, 19 }, { 0x3C, 18 }, + { 0x2B, 18 }, { 0x29, 18 }, { 0x48, 19 }, { 0x27, 18 }, + { 0x42, 19 }, { 0x41, 19 }, { 0x26, 18 }, { 0x52, 20 }, + { 0x51, 20 }, { 0x3F, 19 }, { 0x3E, 19 }, { 0x39, 19 }, + { 0x3C, 19 }, { 0x3B, 19 }, { 0x3A, 19 }, { 0x25, 18 }, + { 0x38, 19 }, { 0x50, 20 }, { 0x37, 19 }, { 0x36, 19 }, + { 0x87, 21 }, { 0x4F, 20 }, { 0x35, 19 }, { 0x4E, 20 }, + { 0x33, 19 }, { 0x32, 19 }, { 0x4D, 20 }, { 0x4C, 20 }, + { 0x83, 22 }, { 0x4B, 20 }, { 0x81, 22 }, { 0x80, 22 }, + { 0x8E, 21 }, { 0x7E, 22 }, { 0x7D, 22 }, { 0x84, 21 }, + { 0x8D, 21 }, { 0x7A, 22 }, { 0x79, 22 }, { 0x4A, 20 }, + { 0x77, 22 }, { 0x76, 22 }, { 0x89, 21 }, { 0x74, 22 }, + { 0x73, 22 }, { 0x72, 22 }, { 0x49, 20 }, { 0x70, 22 }, + { 0x6F, 22 }, { 0x6E, 22 }, { 0x6D, 22 }, { 0x6C, 22 }, + { 0x6B, 22 }, { 0x6A, 22 }, { 0x69, 22 }, { 0x68, 22 }, + { 0x67, 22 }, { 0x66, 22 }, { 0x65, 22 }, { 0x64, 22 }, + { 0x63, 22 }, { 0x62, 22 }, { 0x8A, 21 }, { 0x88, 21 }, + { 0x5F, 22 }, { 0x5E, 22 }, { 0x5D, 22 }, { 0x85, 21 }, + { 0x5B, 22 }, { 0x83, 21 }, { 0x59, 22 }, { 0x58, 22 }, + { 0x57, 22 }, { 0x56, 22 }, { 0x55, 22 }, { 0x54, 22 }, + { 0x53, 22 }, { 0x52, 22 }, { 0x51, 22 }, { 0x50, 22 }, + { 0x4F, 22 }, { 0x4E, 22 }, { 0x4D, 22 }, { 0x4C, 22 }, + { 0x4B, 22 }, { 0x4A, 22 }, { 0x49, 22 }, { 0x48, 22 }, + { 0x47, 22 }, { 0x46, 22 }, { 0x45, 22 }, { 0x44, 22 }, + { 0x43, 22 }, { 0x42, 22 }, { 0x41, 22 }, { 0x40, 22 }, + { 0x3F, 22 }, { 0x3E, 22 }, { 0x3D, 22 }, { 0x3C, 22 }, + { 0x3B, 22 }, { 0x3A, 22 }, { 0x39, 22 }, { 0x38, 22 }, + { 0x37, 22 }, { 0x36, 22 }, { 0x35, 22 }, { 0x34, 22 }, + { 0x33, 22 }, { 0x32, 22 }, { 0x31, 22 }, { 0x30, 22 }, + { 0x2F, 22 }, { 0x2E, 22 }, { 0x2D, 22 }, { 0x2C, 22 }, + { 0x2B, 22 }, { 0x2A, 22 }, { 0x29, 22 }, { 0x28, 22 }, + { 0x27, 22 }, { 0x26, 22 }, { 0x25, 22 }, { 0x24, 22 }, + { 0x23, 22 }, { 0x22, 22 }, { 0x21, 22 }, { 0x20, 22 }, + { 0x1F, 22 }, { 0x1E, 22 }, { 0x1D, 22 }, { 0x1C, 22 }, + { 0x1B, 22 }, { 0x1A, 22 }, { 0x19, 22 }, { 0x18, 22 }, + { 0x17, 22 }, { 0x16, 22 }, { 0x15, 22 }, { 0x14, 22 }, + { 0x13, 22 }, { 0x12, 22 }, { 0x11, 22 }, { 0x10, 22 }, + { 0x0F, 22 }, { 0x0E, 22 }, { 0x0D, 22 }, { 0x0C, 22 }, + { 0x0B, 22 }, { 0x0A, 22 }, { 0x09, 22 }, { 0x08, 22 }, + { 0x07, 22 }, { 0x06, 22 }, { 0x05, 22 }, { 0x04, 22 }, + { 0x03, 22 }, { 0x02, 22 }, { 0x01, 22 }, { 0x00, 22 } +}; + +#endif /* AVCODEC_SVQ1_VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc.h new file mode 100644 index 00000000..b4ef7634 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc.h @@ -0,0 +1,85 @@ +/* + * SVQ1 encoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SVQ1ENC_H +#define AVCODEC_SVQ1ENC_H + +#include + +#include "libavutil/frame.h" + +#include "avcodec.h" +#include "hpeldsp.h" +#include "me_cmp.h" +#include "mpegvideo.h" +#include "put_bits.h" + +typedef struct SVQ1EncContext { + /* FIXME: Needed for motion estimation, should not be used for anything + * else, the idea is to make the motion estimation eventually independent + * of MpegEncContext, so this will be removed then. */ + MpegEncContext m; + AVCodecContext *avctx; + MECmpContext mecc; + HpelDSPContext hdsp; + AVFrame *current_picture; + AVFrame *last_picture; + PutBitContext pb; + + /* Some compression statistics */ + enum AVPictureType pict_type; + int quality; + + /* why ooh why this sick breadth first order, + * everything is slower and more complex */ + PutBitContext reorder_pb[6]; + + int frame_width; + int frame_height; + + /* Y plane block dimensions */ + int y_block_width; + int y_block_height; + + /* U & V plane (C planes) block dimensions */ + int c_block_width; + int c_block_height; + + DECLARE_ALIGNED(16, int16_t, encoded_block_levels)[6][7][256]; + + uint16_t *mb_type; + uint32_t *dummy; + int16_t (*motion_val8[3])[2]; + int16_t (*motion_val16[3])[2]; + + int64_t rd_total; + + uint8_t *scratchbuf; + + int motion_est; + + int (*ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2, + intptr_t size); +} SVQ1EncContext; + +void ff_svq1enc_init_ppc(SVQ1EncContext *c); +void ff_svq1enc_init_x86(SVQ1EncContext *c); + +#endif /* AVCODEC_SVQ1ENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc_cb.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc_cb.h new file mode 100644 index 00000000..1edb4ecf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/svq1enc_cb.h @@ -0,0 +1,86 @@ +/* + * SVQ1 Encoder + * Copyright (C) 2004 Mike Melanson + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * svq1 code books. + */ + +#ifndef AVCODEC_SVQ1ENC_CB_H +#define AVCODEC_SVQ1ENC_CB_H + +#include + +static const int8_t svq1_inter_codebook_sum[4][16*6] = { + { -1, 1, -2, 0, 1, -1, -1, -1, -2, -1, 1, -1, -1, 0, -1, -1, + 0, -1, -1, -1, -1, 0, -1, 0, 0, 0, -3, 1, -1, 0, 1, -1, + 1, -1, 2, 2, 1, 1, 2, 0, 0, 0, -1, 1, 1, 0, 0, 0, + 1, -1, 0, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, 0, 0, + -2, 0, 0, -2, 0, 0, -2, 0, -2, -1, -2, -1, 0, 0, -1, 0, + 1, 0, 1, -1, 2, 2, 1, 2, 2, 1, 0, 1, 1, 0, 1, 1, }, + { -2, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, + 0, 0, 0, -2, 0, 1, 0, -1, -1, 0, 2, -3, 1, -2, 3, -1, + 2, 0, 2, 1, 1, -1, 1, 1, 0, 0, 1, 1, 2, -2, 1, 0, + -2, -1, 2, -2, -2, 0, -3, 0, -1, 0, -1, 0, -1, 0, -2, -3, + 1, -2, -2, -1, 1, -1, -1, 1, -1, 1, 1, 0, -2, 0, 1, 1, + 1, 1, 2, 1, 0, 0, -1, 0, 0, 1, 0, 1, -1, 1, 0, 2, }, + { 0, 0, 0, -3, 1, 1, 1, -3, 0, -1, 0, -3, 1, -3, 0, -2, + 1, 2, -1, -3, 0, -3, 1, -1, 0, -1, 0, 0, 1, 2, 1, 1, + -1, 2, -3, 3, 1, 0, -5, 1, 0, -1, -3, 1, 0, 2, 0, -3, + 4, 2, 0, -2, 1, -2, 3, -2, 1, 1, 0, -1, 2, 5, 3, 1, + -1, 0, 2, -3, -2, 0, 0, -2, 2, -3, -1, -1, 2, 1, 0, -2, + 3, -1, 1, -1, 2, 4, 0, 1, 0, 1, 0, -1, -3, -2, -1, 0, }, + { 0, 2, -1, -1, 2, -4, -2, 3, 0, -1, -5, 1, 0, 1, 0, 6, + -2, 2, 0, 1, 1, -1, -1, -2, 1, -2, -1, 0, 2, -2, -2, -1, + -4, 2, -1, -3, -1, -2, 2, -1, 2, -1, 2, 0, 3, -3, -3, 0, + -3, 0, 0, -2, 4, -4, 0, -1, 4, 0, -2, -2, 3, -2, 0, 4, + 5, 0, 1, 0, -3, 3, 3, 2, 0, 0, 1, 2, -5, -2, -3, 0, + -3, 2, -2, 2, -2, 4, 7, -3, 4, 2, 3, 2, -1, 0, -3, 1, } +}; + +static const int8_t svq1_intra_codebook_sum[4][16*6] = { + { 0, 0, 0, -1, -1, -1, -1, -2, 0, -1, -1, 0, -1, 0, 1, 0, + 1, 0, -1, 1, 0, 0, -1, 1, -1, 0, 0, 0, -1, 1, 0, 0, + -1, 0, 0, 1, -1, 1, 0, -1, -1, 0, 1, 1, 0, 0, -1, 1, + 0, 1, 0, 0, 1, -1, 0, 0, 0, -1, 1, 0, 1, 0, -2, 1, + 0, -1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, + 0, 1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 1, 1, -1, }, + { -1, -2, 0, -1, 1, 0, -1, 0, -1, -4, -1, -2, -1, -2, 1, -2, + 0, 0, 4, -2, -1, 1, 1, 0, 2, 1, 1, 0, 2, 0, 0, 0, + 1, 1, 0, -1, -1, -1, 1, 0, -1, -3, -3, 1, -1, 1, -2, -1, + 1, -1, 0, 1, 2, 1, -1, -1, 1, 1, 1, 2, 1, 0, 1, -2, + -2, 0, -1, -2, -2, 0, -1, -1, -1, 0, 1, 0, -1, -1, 0, -1, + 0, 2, 1, 2, 2, 1, -1, 1, 0, 2, 0, -1, 1, 0, 0, 0, }, + { -2, 0, -1, -1, 1, 1, -2, 0, -2, 0, 1, -2, -2, 1, -1, -1, + 3, -2, 0, -3, -4, -3, 2, 1, 0, 3, -2, 2, 3, 2, 2, -1, + -3, 1, 0, 1, 0, 0, 0, 1, -2, 1, -2, -2, -1, -2, -2, 2, + 0, -4, 0, 2, -1, 0, 2, 2, 2, 1, 0, -1, -1, 1, -3, 2, + 2, 1, 0, 3, 1, -1, 1, 3, 1, 0, 1, 1, 2, -1, 1, -1, + -2, -1, 0, -1, 1, -1, 1, -2, -2, -1, -1, -3, 1, -4, -3, 1, }, + { -2, 0, -2, 3, -1, -1, 0, 2, 2, -1, -3, 2, 1, 0, -2, -1, + -3, -2, -2, 1, 2, -3, 0, 1, -5, -2, -3, 0, -2, -1, 2, 0, + -1, -1, 0, -2, 1, 3, -7, -2, -2, -1, 2, -1, 0, 3, 1, 3, + 1, 0, 0, 1, 2, 3, 1, 2, 0, -2, -2, 1, 1, 2, 2, 3, + 4, 1, -1, 2, -2, 4, 0, 0, 0, 4, 2, 0, -2, -2, 2, -4, + -1, 5, -2, -2, -3, 2, -3, -1, 3, -3, 0, 4, 3, 0, 1, -2, } +}; + +#endif /* AVCODEC_SVQ1ENC_CB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/synth_filter.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/synth_filter.h new file mode 100644 index 00000000..df3589a8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/synth_filter.h @@ -0,0 +1,52 @@ +/* + * copyright (c) 2008 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_SYNTH_FILTER_H +#define AVCODEC_SYNTH_FILTER_H + +#include "fft.h" +#include "dcadct.h" + +typedef struct SynthFilterContext { + void (*synth_filter_float)(FFTContext *imdct, + float *synth_buf_ptr, int *synth_buf_offset, + float synth_buf2[32], const float window[512], + float out[32], const float in[32], + float scale); + void (*synth_filter_float_64)(FFTContext *imdct, + float *synth_buf_ptr, int *synth_buf_offset, + float synth_buf2[64], const float window[1024], + float out[64], const float in[64], float scale); + void (*synth_filter_fixed)(DCADCTContext *imdct, + int32_t *synth_buf_ptr, int *synth_buf_offset, + int32_t synth_buf2[32], const int32_t window[512], + int32_t out[32], const int32_t in[32]); + void (*synth_filter_fixed_64)(DCADCTContext *imdct, + int32_t *synth_buf_ptr, int *synth_buf_offset, + int32_t synth_buf2[64], const int32_t window[1024], + int32_t out[64], const int32_t in[64]); +} SynthFilterContext; + +void ff_synth_filter_init(SynthFilterContext *c); +void ff_synth_filter_init_aarch64(SynthFilterContext *c); +void ff_synth_filter_init_arm(SynthFilterContext *c); +void ff_synth_filter_init_x86(SynthFilterContext *c); + +#endif /* AVCODEC_SYNTH_FILTER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint.h new file mode 100644 index 00000000..6f61c712 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint.h @@ -0,0 +1,134 @@ +/* + * Generate a file for hardcoded tables + * + * Copyright (c) 2009 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TABLEPRINT_H +#define AVCODEC_TABLEPRINT_H + +#include +#include + +#include "libavutil/common.h" + +#define WRITE_1D_FUNC_ARGV(type, linebrk, fmtstr, ...)\ +void write_##type##_array(const type *data, int len)\ +{\ + int i;\ + printf(" ");\ + for (i = 0; i < len - 1; i++) {\ + printf(" "fmtstr",", __VA_ARGS__);\ + if ((i & linebrk) == linebrk) printf("\n ");\ + }\ + printf(" "fmtstr"\n", __VA_ARGS__);\ +} + +#define WRITE_1D_FUNC(type, fmtstr, linebrk)\ + WRITE_1D_FUNC_ARGV(type, linebrk, fmtstr, data[i]) + +#define WRITE_2D_FUNC(type)\ +void write_##type##_2d_array(const void *arg, int len, int len2)\ +{\ + const type *data = arg;\ + int i;\ + printf(" {\n");\ + for (i = 0; i < len; i++) {\ + write_##type##_array(data + i * len2, len2);\ + printf(i == len - 1 ? " }\n" : " }, {\n");\ + }\ +} + +/** + * @name Predefined functions for printing tables + * + * @{ + */ +void write_int8_t_array (const int8_t *, int); +void write_uint8_t_array (const uint8_t *, int); +void write_uint16_t_array (const uint16_t *, int); +void write_uint32_t_array (const uint32_t *, int); +void write_int32_t_array (const int32_t *, int); +void write_float_array (const float *, int); +void write_int8_t_2d_array (const void *, int, int); +void write_uint8_t_2d_array (const void *, int, int); +void write_uint32_t_2d_array(const void *, int, int); +void write_float_2d_array (const void *, int, int); +/** @} */ // end of printfuncs group + +/* + * MSVC doesn't have %zu, since it was introduced in C99, + * but has its own %Iu for printing size_t values. + */ +#if defined(_MSC_VER) +#define FMT "Iu" +#else +#define FMT "zu" +#endif + +#define WRITE_ARRAY_ALIGNED(prefix, align, type, name) \ + do { \ + const size_t array_size = FF_ARRAY_ELEMS(name); \ + printf(prefix" DECLARE_ALIGNED("#align", " \ + #type", "#name")[%"FMT"] = {\n", \ + array_size); \ + write_##type##_array(name, array_size); \ + printf("};\n"); \ + } while(0) + +#define WRITE_ARRAY(prefix, type, name) \ + do { \ + const size_t array_size = FF_ARRAY_ELEMS(name); \ + printf(prefix" "#type" "#name"[%"FMT"] = {\n", \ + array_size); \ + write_##type##_array(name, array_size); \ + printf("};\n"); \ + } while(0) + +#define WRITE_2D_ARRAY(prefix, type, name) \ + do { \ + const size_t array_size1 = FF_ARRAY_ELEMS(name); \ + const size_t array_size2 = FF_ARRAY_ELEMS(name[0]); \ + printf(prefix" "#type" "#name"[%"FMT"][%"FMT"] = {\n", \ + array_size1, array_size2 ); \ + write_##type##_2d_array(name, array_size1, array_size2); \ + printf("};\n"); \ + } while(0) + + +WRITE_1D_FUNC(int8_t, "%3"PRIi8, 15) +WRITE_1D_FUNC(uint8_t, "0x%02"PRIx8, 15) +WRITE_1D_FUNC(uint16_t, "0x%08"PRIx16, 7) +WRITE_1D_FUNC(int16_t, "%5"PRIi16, 7) +WRITE_1D_FUNC(uint32_t, "0x%08"PRIx32, 7) +WRITE_1D_FUNC(int32_t, "0x%08"PRIx32, 7) +WRITE_1D_FUNC(float, "%.18e", 3) + +WRITE_2D_FUNC(int8_t) +WRITE_2D_FUNC(uint8_t) +WRITE_2D_FUNC(uint32_t) +WRITE_2D_FUNC(float) + +static inline void write_fileheader(void) +{ + printf("/* This file was automatically generated. */\n"); + printf("#include \n"); +} + +#endif /* AVCODEC_TABLEPRINT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint_vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint_vlc.h new file mode 100644 index 00000000..b3ff3656 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tableprint_vlc.h @@ -0,0 +1,84 @@ +/* + * Helpers for generating hard-coded VLC tables + * + * Copyright (c) 2014 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TABLEPRINT_VLC_H +#define AVCODEC_TABLEPRINT_VLC_H + +#define FFMPEG_CONFIG_H +#define AVUTIL_LOG_H +#define av_log(a, ...) while(0) +#define ff_dlog(a, ...) while(0) +#define AVUTIL_MEM_H +#define av_malloc(s) NULL +#define av_malloc_array(a, b) NULL +#define av_realloc_f(p, o, n) NULL +#define av_free(p) while(0) +#define av_freep(p) while(0) +#define AVCODEC_AVCODEC_H +#define AVCODEC_INTERNAL_H +#define AV_INPUT_BUFFER_PADDING_SIZE 64 // the value does not matter for this +#define avpriv_request_sample(...) +#include "tableprint.h" +#include "get_bits.h" +#include "mathtables.c" +#include "libavutil/reverse.c" +#include "bitstream.c" + +#define REPLACE_DEFINE2(type) write_##type##_array +#define REPLACE_DEFINE(type) REPLACE_DEFINE2(type) +static void write_VLC_TYPE_array(const VLC_TYPE *p, int s) { + REPLACE_DEFINE(VLC_TYPE)(p, s); +} + +WRITE_2D_FUNC(VLC_TYPE) + +static void write_vlc_type(const VLC *vlc, VLC_TYPE (*base_table)[2], const char *base_table_name) +{ + printf(" .bits = %i,\n", vlc->bits); + // Unfortunately need to cast away const currently + printf(" .table = (VLC_TYPE (*)[2])(%s + 0x%x),\n", base_table_name, (int)(vlc->table - base_table)); + printf(" .table_size = 0x%x,\n", vlc->table_size); + printf(" .table_allocated = 0x%x,\n", vlc->table_allocated); +} + +#define WRITE_VLC_TYPE(prefix, name, base_table) \ + do { \ + printf(prefix" VLC "#name" = {\n"); \ + write_vlc_type(&name, base_table, #base_table); \ + printf("};\n"); \ + } while(0) + +#define WRITE_VLC_ARRAY(prefix, name, base_table) \ + do { \ + int i; \ + const size_t array_size = FF_ARRAY_ELEMS(name); \ + printf(prefix" VLC "#name"[%"FMT"] = {{\n", \ + array_size); \ + for (i = 0; i < array_size; i++) { \ + write_vlc_type(name + i, \ + base_table, #base_table); \ + if (i != array_size - 1) printf("}, {\n"); \ + } \ + printf("}};\n"); \ + } while(0) + +#endif /* AVCODEC_TABLEPRINT_VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tak.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tak.h new file mode 100644 index 00000000..dc45a8c0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tak.h @@ -0,0 +1,166 @@ +/* + * TAK decoder/demuxer common code + * Copyright (c) 2012 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * TAK (Tom's lossless Audio Kompressor) decoder/demuxer common functions + */ + +#ifndef AVCODEC_TAK_H +#define AVCODEC_TAK_H + +#include + +#include "avcodec.h" +#include "get_bits.h" + +#define TAK_FORMAT_DATA_TYPE_BITS 3 +#define TAK_FORMAT_SAMPLE_RATE_BITS 18 +#define TAK_FORMAT_BPS_BITS 5 +#define TAK_FORMAT_CHANNEL_BITS 4 +#define TAK_FORMAT_VALID_BITS 5 +#define TAK_FORMAT_CH_LAYOUT_BITS 6 +#define TAK_SIZE_FRAME_DURATION_BITS 4 +#define TAK_SIZE_SAMPLES_NUM_BITS 35 +#define TAK_LAST_FRAME_POS_BITS 40 +#define TAK_LAST_FRAME_SIZE_BITS 24 +#define TAK_ENCODER_CODEC_BITS 6 +#define TAK_ENCODER_PROFILE_BITS 4 +#define TAK_ENCODER_VERSION_BITS 24 +#define TAK_SAMPLE_RATE_MIN 6000 +#define TAK_CHANNELS_MIN 1 +#define TAK_BPS_MIN 8 +#define TAK_FRAME_HEADER_FLAGS_BITS 3 +#define TAK_FRAME_HEADER_SYNC_ID 0xA0FF +#define TAK_FRAME_HEADER_SYNC_ID_BITS 16 +#define TAK_FRAME_HEADER_SAMPLE_COUNT_BITS 14 +#define TAK_FRAME_HEADER_NO_BITS 21 +#define TAK_FRAME_DURATION_QUANT_SHIFT 5 +#define TAK_CRC24_BITS 24 + + +#define TAK_FRAME_FLAG_IS_LAST 0x1 +#define TAK_FRAME_FLAG_HAS_INFO 0x2 +#define TAK_FRAME_FLAG_HAS_METADATA 0x4 + +#define TAK_MAX_CHANNELS (1 << TAK_FORMAT_CHANNEL_BITS) + +#define TAK_MIN_FRAME_HEADER_BITS (TAK_FRAME_HEADER_SYNC_ID_BITS + \ + TAK_FRAME_HEADER_FLAGS_BITS + \ + TAK_FRAME_HEADER_NO_BITS + \ + TAK_CRC24_BITS) + +#define TAK_MIN_FRAME_HEADER_LAST_BITS (TAK_MIN_FRAME_HEADER_BITS + 2 + \ + TAK_FRAME_HEADER_SAMPLE_COUNT_BITS) + +#define TAK_ENCODER_BITS (TAK_ENCODER_CODEC_BITS + \ + TAK_ENCODER_PROFILE_BITS) + +#define TAK_SIZE_BITS (TAK_SIZE_SAMPLES_NUM_BITS + \ + TAK_SIZE_FRAME_DURATION_BITS) + +#define TAK_FORMAT_BITS (TAK_FORMAT_DATA_TYPE_BITS + \ + TAK_FORMAT_SAMPLE_RATE_BITS + \ + TAK_FORMAT_BPS_BITS + \ + TAK_FORMAT_CHANNEL_BITS + 1 + \ + TAK_FORMAT_VALID_BITS + 1 + \ + TAK_FORMAT_CH_LAYOUT_BITS * \ + TAK_MAX_CHANNELS) + +#define TAK_STREAMINFO_BITS (TAK_ENCODER_BITS + \ + TAK_SIZE_BITS + \ + TAK_FORMAT_BITS) + +#define TAK_MAX_FRAME_HEADER_BITS (TAK_MIN_FRAME_HEADER_LAST_BITS + \ + TAK_STREAMINFO_BITS + 31) + +#define TAK_STREAMINFO_BYTES ((TAK_STREAMINFO_BITS + 7) / 8) +#define TAK_MAX_FRAME_HEADER_BYTES ((TAK_MAX_FRAME_HEADER_BITS + 7) / 8) +#define TAK_MIN_FRAME_HEADER_BYTES ((TAK_MIN_FRAME_HEADER_BITS + 7) / 8) + +enum TAKCodecType { + TAK_CODEC_MONO_STEREO = 2, + TAK_CODEC_MULTICHANNEL = 4, +}; + +enum TAKMetaDataType { + TAK_METADATA_END = 0, + TAK_METADATA_STREAMINFO, + TAK_METADATA_SEEKTABLE, + TAK_METADATA_SIMPLE_WAVE_DATA, + TAK_METADATA_ENCODER, + TAK_METADATA_PADDING, + TAK_METADATA_MD5, + TAK_METADATA_LAST_FRAME, +}; + +enum TAKFrameSizeType { + TAK_FST_94ms = 0, + TAK_FST_125ms, + TAK_FST_188ms, + TAK_FST_250ms, + TAK_FST_4096, + TAK_FST_8192, + TAK_FST_16384, + TAK_FST_512, + TAK_FST_1024, + TAK_FST_2048, +}; + +typedef struct TAKStreamInfo { + int flags; + enum TAKCodecType codec; + int data_type; + int sample_rate; + int channels; + int bps; + int frame_num; + int frame_samples; + int last_frame_samples; + uint64_t ch_layout; + int64_t samples; +} TAKStreamInfo; + +int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size); + +/** + * Parse the Streaminfo metadata block. + * @param[out] s storage for parsed information + * @param[in] buf input buffer + * @param[in] size size of input buffer in bytes + * @return non-zero on error, 0 if OK + */ +int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size); + +void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb); + +/** + * Validate and decode a frame header. + * @param avctx AVCodecContext to use as av_log() context + * @param[in] gb GetBitContext from which to read frame header + * @param[out] s frame information + * @param log_level_offset log level offset, can be used to silence + * error messages. + * @return non-zero on error, 0 if OK + */ +int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, + TAKStreamInfo *s, int log_level_offset); +#endif /* AVCODEC_TAK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/takdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/takdsp.h new file mode 100644 index 00000000..c05b5741 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/takdsp.h @@ -0,0 +1,34 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TAKDSP_H +#define AVCODEC_TAKDSP_H + +#include + +typedef struct TAKDSPContext { + void (*decorrelate_ls)(int32_t *p1, int32_t *p2, int length); + void (*decorrelate_sr)(int32_t *p1, int32_t *p2, int length); + void (*decorrelate_sm)(int32_t *p1, int32_t *p2, int length); + void (*decorrelate_sf)(int32_t *p1, int32_t *p2, int length, int dshift, int dfactor); +} TAKDSPContext; + +void ff_takdsp_init(TAKDSPContext *c); +void ff_takdsp_init_x86(TAKDSPContext *c); + +#endif /* AVCODEC_TAKDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/targa.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/targa.h new file mode 100644 index 00000000..c2f52246 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/targa.h @@ -0,0 +1,48 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TARGA_H +#define AVCODEC_TARGA_H + +/** + * @file + * targa file common definitions + * + * Based on: + * http://www.gamers.org/dEngine/quake3/TGA.txt + * + * and other specs you can find referenced for example in: + * http://en.wikipedia.org/wiki/Truevision_TGA + */ + +enum TargaCompr { + TGA_NODATA = 0, // no image data + TGA_PAL = 1, // palettized + TGA_RGB = 2, // true-color + TGA_BW = 3, // black & white or grayscale + TGA_RLE = 8, // flag pointing that data is RLE-coded +}; + +enum TargaFlags { + TGA_RIGHTTOLEFT = 0x10, // right-to-left (flipped horizontally) + TGA_TOPTOBOTTOM = 0x20, // top-to-bottom (NOT flipped vertically) + TGA_INTERLEAVE2 = 0x40, // 2-way interleave, odd then even lines + TGA_INTERLEAVE4 = 0x80, // 4-way interleave +}; + +#endif /* AVCODEC_TARGA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/texturedsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/texturedsp.h new file mode 100644 index 00000000..90ceb2b6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/texturedsp.h @@ -0,0 +1,66 @@ +/* + * Texture block module + * Copyright (C) 2015 Vittorio Giovara + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Texture block (4x4) module + * + * References: + * https://www.opengl.org/wiki/S3_Texture_Compression + * https://www.opengl.org/wiki/Red_Green_Texture_Compression + * https://msdn.microsoft.com/en-us/library/bb694531%28v=vs.85%29.aspx + * + * All functions return how much data has been written or read. + * + * Pixel input or output format is always AV_PIX_FMT_RGBA. + */ + +#ifndef AVCODEC_TEXTUREDSP_H +#define AVCODEC_TEXTUREDSP_H + +#include +#include + +#define TEXTURE_BLOCK_W 4 +#define TEXTURE_BLOCK_H 4 + +typedef struct TextureDSPContext { + int (*dxt1_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt1a_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt2_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt3_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt4_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt5_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt5y_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxt5ys_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc1s_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc1u_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc1u_gray_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc1u_alpha_block)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc2s_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*rgtc2u_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); + int (*dxn3dc_block) (uint8_t *dst, ptrdiff_t stride, const uint8_t *block); +} TextureDSPContext; + +void ff_texturedsp_init(TextureDSPContext *c); +void ff_texturedspenc_init(TextureDSPContext *c); + +#endif /* AVCODEC_TEXTUREDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/thread.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/thread.h new file mode 100644 index 00000000..540135fb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/thread.h @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2008 Alexander Strange + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Multithreading support functions + * @author Alexander Strange + */ + +#ifndef AVCODEC_THREAD_H +#define AVCODEC_THREAD_H + +#include "libavutil/buffer.h" + +#include "avcodec.h" + +typedef struct ThreadFrame { + AVFrame *f; + AVCodecContext *owner[2]; + // progress->data is an array of 2 ints holding progress for top/bottom + // fields + AVBufferRef *progress; +} ThreadFrame; + +/** + * Wait for decoding threads to finish and reset internal state. + * Called by avcodec_flush_buffers(). + * + * @param avctx The context. + */ +void ff_thread_flush(AVCodecContext *avctx); + +/** + * Submit a new frame to a decoding thread. + * Returns the next available frame in picture. *got_picture_ptr + * will be 0 if none is available. + * The return value on success is the size of the consumed packet for + * compatibility with avcodec_decode_video2(). This means the decoder + * has to consume the full packet. + * + * Parameters are the same as avcodec_decode_video2(). + */ +int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture, + int *got_picture_ptr, AVPacket *avpkt); + +/** + * If the codec defines update_thread_context(), call this + * when they are ready for the next thread to start decoding + * the next frame. After calling it, do not change any variables + * read by the update_thread_context() method, or call ff_thread_get_buffer(). + * + * @param avctx The context. + */ +void ff_thread_finish_setup(AVCodecContext *avctx); + +/** + * Notify later decoding threads when part of their reference picture is ready. + * Call this when some part of the picture is finished decoding. + * Later calls with lower values of progress have no effect. + * + * @param f The picture being decoded. + * @param progress Value, in arbitrary units, of how much of the picture has decoded. + * @param field The field being decoded, for field-picture codecs. + * 0 for top field or frame pictures, 1 for bottom field. + */ +void ff_thread_report_progress(ThreadFrame *f, int progress, int field); + +/** + * Wait for earlier decoding threads to finish reference pictures. + * Call this before accessing some part of a picture, with a given + * value for progress, and it will return after the responsible decoding + * thread calls ff_thread_report_progress() with the same or + * higher value for progress. + * + * @param f The picture being referenced. + * @param progress Value, in arbitrary units, to wait for. + * @param field The field being referenced, for field-picture codecs. + * 0 for top field or frame pictures, 1 for bottom field. + */ +void ff_thread_await_progress(ThreadFrame *f, int progress, int field); + +/** + * Wrapper around get_format() for frame-multithreaded codecs. + * Call this function instead of avctx->get_format(). + * Cannot be called after the codec has called ff_thread_finish_setup(). + * + * @param avctx The current context. + * @param fmt The list of available formats. + */ +enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt); + +/** + * Wrapper around get_buffer() for frame-multithreaded codecs. + * Call this function instead of ff_get_buffer(f). + * Cannot be called after the codec has called ff_thread_finish_setup(). + * + * @param avctx The current context. + * @param f The frame to write into. + */ +int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags); + +/** + * Wrapper around release_buffer() frame-for multithreaded codecs. + * Call this function instead of avctx->release_buffer(f). + * The AVFrame will be copied and the actual release_buffer() call + * will be performed later. The contents of data pointed to by the + * AVFrame should not be changed until ff_thread_get_buffer() is called + * on it. + * + * @param avctx The current context. + * @param f The picture being released. + */ +void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f); + +int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src); + +int ff_thread_init(AVCodecContext *s); +int ff_slice_thread_execute_with_mainfunc(AVCodecContext *avctx, + int (*action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr), + int (*main_func)(AVCodecContext *c), void *arg, int *ret, int job_count); +void ff_thread_free(AVCodecContext *s); +int ff_alloc_entries(AVCodecContext *avctx, int count); +void ff_reset_entries(AVCodecContext *avctx); +void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n); +void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift); + +#endif /* AVCODEC_THREAD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff.h new file mode 100644 index 00000000..c07a5d4f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff.h @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * TIFF constants & data structures + * + * For more information about the TIFF format, check the official docs at: + * http://partners.adobe.com/public/developer/tiff/index.html + * @author Konstantin Shishkov + */ + +#ifndef AVCODEC_TIFF_H +#define AVCODEC_TIFF_H + +#include +#include "tiff_common.h" + +/** TIFF types in ascenting priority (last in the list is highest) */ +enum TiffType { + /** TIFF image based on the TIFF 6.0 or TIFF/EP (ISO 12234-2) specifications */ + TIFF_TYPE_TIFF, + /** Digital Negative (DNG) image */ + TIFF_TYPE_DNG, + /** Digital Negative (DNG) image part of an CinemaDNG image sequence */ + TIFF_TYPE_CINEMADNG, +}; + +/** abridged list of TIFF and TIFF/EP tags */ +enum TiffTags { + TIFF_SUBFILE = 0xfe, + TIFF_WIDTH = 0x100, + TIFF_HEIGHT, + TIFF_BPP, + TIFF_COMPR, + TIFF_PHOTOMETRIC = 0x106, + TIFF_FILL_ORDER = 0x10A, + TIFF_DOCUMENT_NAME = 0x10D, + TIFF_IMAGE_DESCRIPTION = 0x10E, + TIFF_MAKE = 0x10F, + TIFF_MODEL = 0x110, + TIFF_STRIP_OFFS = 0x111, + TIFF_SAMPLES_PER_PIXEL = 0x115, + TIFF_ROWSPERSTRIP = 0x116, + TIFF_STRIP_SIZE, + TIFF_XRES = 0x11A, + TIFF_YRES = 0x11B, + TIFF_PLANAR = 0x11C, + TIFF_PAGE_NAME = 0x11D, + TIFF_XPOS = 0x11E, + TIFF_YPOS = 0x11F, + TIFF_T4OPTIONS = 0x124, + TIFF_T6OPTIONS, + TIFF_RES_UNIT = 0x128, + TIFF_PAGE_NUMBER = 0x129, + TIFF_SOFTWARE_NAME = 0x131, + TIFF_DATE = 0x132, + TIFF_ARTIST = 0x13B, + TIFF_HOST_COMPUTER = 0x13C, + TIFF_PREDICTOR = 0x13D, + TIFF_PAL = 0x140, + TIFF_TILE_WIDTH = 0x142, + TIFF_TILE_LENGTH = 0x143, + TIFF_TILE_OFFSETS = 0x144, + TIFF_TILE_BYTE_COUNTS = 0x145, + TIFF_SUB_IFDS = 0x14A, + TIFF_EXTRASAMPLES = 0x152, + TIFF_YCBCR_COEFFICIENTS = 0x211, + TIFF_YCBCR_SUBSAMPLING = 0x212, + TIFF_YCBCR_POSITIONING = 0x213, + TIFF_REFERENCE_BW = 0x214, + TIFF_CFA_PATTERN_DIM = 0x828D, + TIFF_CFA_PATTERN = 0x828E, + TIFF_COPYRIGHT = 0x8298, + TIFF_MODEL_TIEPOINT = 0x8482, + TIFF_MODEL_PIXEL_SCALE = 0x830E, + TIFF_MODEL_TRANSFORMATION= 0x8480, + TIFF_ICC_PROFILE = 0x8773, + TIFF_GEO_KEY_DIRECTORY = 0x87AF, + TIFF_GEO_DOUBLE_PARAMS = 0x87B0, + TIFF_GEO_ASCII_PARAMS = 0x87B1, +}; + +/** abridged list of DNG tags */ +enum DngTags { + DNG_VERSION = 0xC612, + DNG_BACKWARD_VERSION = 0xC613, + DNG_LINEARIZATION_TABLE = 0xC618, + DNG_BLACK_LEVEL = 0xC61A, + DNG_WHITE_LEVEL = 0xC61D, +}; + +/** list of CinemaDNG tags */ +enum CinemaDngTags { + CINEMADNG_TIME_CODES = 0xC763, + CINEMADNG_FRAME_RATE = 0xC764, + CINEMADNG_T_STOP = 0xC772, + CINEMADNG_REEL_NAME = 0xC789, + CINEMADNG_CAMERA_LABEL = 0xC7A1, +}; + +/** list of TIFF, TIFF/EP and DNG compression types */ +enum TiffCompr { + TIFF_RAW = 1, + TIFF_CCITT_RLE, + TIFF_G3, + TIFF_G4, + TIFF_LZW, + TIFF_JPEG, + TIFF_NEWJPEG, + TIFF_ADOBE_DEFLATE, + TIFF_PACKBITS = 0x8005, + TIFF_DEFLATE = 0x80B2, + TIFF_LZMA = 0x886D, +}; + +enum TiffGeoTagKey { + TIFF_GT_MODEL_TYPE_GEOKEY = 1024, + TIFF_GT_RASTER_TYPE_GEOKEY = 1025, + TIFF_GT_CITATION_GEOKEY = 1026, + TIFF_GEOGRAPHIC_TYPE_GEOKEY = 2048, + TIFF_GEOG_CITATION_GEOKEY = 2049, + TIFF_GEOG_GEODETIC_DATUM_GEOKEY = 2050, + TIFF_GEOG_PRIME_MERIDIAN_GEOKEY = 2051, + TIFF_GEOG_LINEAR_UNITS_GEOKEY = 2052, + TIFF_GEOG_LINEAR_UNIT_SIZE_GEOKEY = 2053, + TIFF_GEOG_ANGULAR_UNITS_GEOKEY = 2054, + TIFF_GEOG_ANGULAR_UNIT_SIZE_GEOKEY = 2055, + TIFF_GEOG_ELLIPSOID_GEOKEY = 2056, + TIFF_GEOG_SEMI_MAJOR_AXIS_GEOKEY = 2057, + TIFF_GEOG_SEMI_MINOR_AXIS_GEOKEY = 2058, + TIFF_GEOG_INV_FLATTENING_GEOKEY = 2059, + TIFF_GEOG_AZIMUTH_UNITS_GEOKEY = 2060, + TIFF_GEOG_PRIME_MERIDIAN_LONG_GEOKEY = 2061, + TIFF_PROJECTED_CS_TYPE_GEOKEY = 3072, + TIFF_PCS_CITATION_GEOKEY = 3073, + TIFF_PROJECTION_GEOKEY = 3074, + TIFF_PROJ_COORD_TRANS_GEOKEY = 3075, + TIFF_PROJ_LINEAR_UNITS_GEOKEY = 3076, + TIFF_PROJ_LINEAR_UNIT_SIZE_GEOKEY = 3077, + TIFF_PROJ_STD_PARALLEL1_GEOKEY = 3078, + TIFF_PROJ_STD_PARALLEL2_GEOKEY = 3079, + TIFF_PROJ_NAT_ORIGIN_LONG_GEOKEY = 3080, + TIFF_PROJ_NAT_ORIGIN_LAT_GEOKEY = 3081, + TIFF_PROJ_FALSE_EASTING_GEOKEY = 3082, + TIFF_PROJ_FALSE_NORTHING_GEOKEY = 3083, + TIFF_PROJ_FALSE_ORIGIN_LONG_GEOKEY = 3084, + TIFF_PROJ_FALSE_ORIGIN_LAT_GEOKEY = 3085, + TIFF_PROJ_FALSE_ORIGIN_EASTING_GEOKEY = 3086, + TIFF_PROJ_FALSE_ORIGIN_NORTHING_GEOKEY = 3087, + TIFF_PROJ_CENTER_LONG_GEOKEY = 3088, + TIFF_PROJ_CENTER_LAT_GEOKEY = 3089, + TIFF_PROJ_CENTER_EASTING_GEOKEY = 3090, + TIFF_PROJ_CENTER_NORTHING_GEOKEY = 3091, + TIFF_PROJ_SCALE_AT_NAT_ORIGIN_GEOKEY = 3092, + TIFF_PROJ_SCALE_AT_CENTER_GEOKEY = 3093, + TIFF_PROJ_AZIMUTH_ANGLE_GEOKEY = 3094, + TIFF_PROJ_STRAIGHT_VERT_POLE_LONG_GEOKEY = 3095, + TIFF_VERTICAL_CS_TYPE_GEOKEY = 4096, + TIFF_VERTICAL_CITATION_GEOKEY = 4097, + TIFF_VERTICAL_DATUM_GEOKEY = 4098, + TIFF_VERTICAL_UNITS_GEOKEY = 4099 +}; + +/** list of TIFF, TIFF/AP and DNG PhotometricInterpretation (TIFF_PHOTOMETRIC) values */ +enum TiffPhotometric { + TIFF_PHOTOMETRIC_NONE = -1, + TIFF_PHOTOMETRIC_WHITE_IS_ZERO, /* mono or grayscale, 0 is white */ + TIFF_PHOTOMETRIC_BLACK_IS_ZERO, /* mono or grayscale, 0 is black */ + TIFF_PHOTOMETRIC_RGB, /* RGB or RGBA*/ + TIFF_PHOTOMETRIC_PALETTE, /* Uses a palette */ + TIFF_PHOTOMETRIC_ALPHA_MASK, /* Transparency mask */ + TIFF_PHOTOMETRIC_SEPARATED, /* CMYK or some other ink set */ + TIFF_PHOTOMETRIC_YCBCR, /* YCbCr */ + TIFF_PHOTOMETRIC_CIE_LAB = 8, /* 1976 CIE L*a*b* */ + TIFF_PHOTOMETRIC_ICC_LAB, /* ICC L*a*b* */ + TIFF_PHOTOMETRIC_ITU_LAB, /* ITU L*a*b* */ + TIFF_PHOTOMETRIC_CFA = 32803, /* Color Filter Array (TIFF/AP and DNG) */ + TIFF_PHOTOMETRIC_LOG_L = 32844, /* CIE Log2(L) */ + TIFF_PHOTOMETRIC_LOG_LUV, /* CIE Log L*u*v* */ + TIFF_PHOTOMETRIC_LINEAR_RAW = 34892, /* Linear Raw (DNG) */ +}; + +enum TiffGeoTagType { + GEOTIFF_SHORT = 0, + GEOTIFF_DOUBLE = 34736, + GEOTIFF_STRING = 34737 +}; + +typedef struct TiffGeoTag { + enum TiffGeoTagKey key; + enum TiffTags type; + int count; + int offset; + char *val; +} TiffGeoTag; + +typedef struct TiffGeoTagKeyName { + const enum TiffGeoTagKey key; + const char *const name; +} TiffGeoTagKeyName; + +typedef struct TiffGeoTagNameType { + const char *const name; + const enum TiffGeoTagType type; +} TiffGeoTagNameType; + +#endif /* AVCODEC_TIFF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_common.h new file mode 100644 index 00000000..03558c31 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_common.h @@ -0,0 +1,152 @@ +/* + * TIFF Common Routines + * Copyright (c) 2013 Thilo Borgmann + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * TIFF Common Routines + * @author Thilo Borgmann + */ + +#ifndef AVCODEC_TIFF_COMMON_H +#define AVCODEC_TIFF_COMMON_H + +#include "avcodec.h" +#include "tiff.h" +#include "bytestream.h" +#include "libavutil/bprint.h" + +/** data type identifiers for TIFF tags */ +enum TiffTypes { + TIFF_BYTE = 1, + TIFF_STRING, + TIFF_SHORT, + TIFF_LONG, + TIFF_RATIONAL, + TIFF_SBYTE, + TIFF_UNDEFINED, + TIFF_SSHORT, + TIFF_SLONG, + TIFF_SRATIONAL, + TIFF_FLOAT, + TIFF_DOUBLE, + TIFF_IFD +}; + +/** sizes of various TIFF field types (string size = 100)*/ +static const uint8_t type_sizes[14] = { + 0, 1, 100, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4 +}; + +static const uint16_t ifd_tags[] = { + 0x8769, // EXIF IFD + 0x8825, // GPS IFD + 0xA005 // Interoperability IFD +}; + + +/** Returns a value > 0 if the tag is a known IFD-tag. + * The return value is the array index + 1 within ifd_tags[]. + */ +int ff_tis_ifd(unsigned tag); + +/** Reads a short from the bytestream using given endianness. */ +unsigned ff_tget_short(GetByteContext *gb, int le); + +/** Reads a long from the bytestream using given endianness. */ +unsigned ff_tget_long(GetByteContext *gb, int le); + +/** Reads a double from the bytestream using given endianness. */ +double ff_tget_double(GetByteContext *gb, int le); + +/** Reads a byte from the bytestream using given endianness. */ +unsigned ff_tget(GetByteContext *gb, int type, int le); + +/** Returns an allocated string containing count + * rational values using the given separator. + */ +char *ff_trationals2str(int *rp, int count, const char *sep); + +/** Returns an allocated string containing count + * long values using the given separator. + */ +char *ff_tlongs2str(int32_t *lp, int count, const char *sep); + +/** Returns an allocated string containing count + * double values using the given separator. + */ +char *ff_tdoubles2str(double *dp, int count, const char *sep); + +/** Returns an allocated string containing count + * short values using the given separator. + */ +char *ff_tshorts2str(int16_t *sp, int count, const char *sep); + +/** Adds count rationals converted to a string + * into the metadata dictionary. + */ +int ff_tadd_rational_metadata(int count, const char *name, const char *sep, + GetByteContext *gb, int le, AVDictionary **metadata); + +/** Adds count longs converted to a string + * into the metadata dictionary. + */ +int ff_tadd_long_metadata(int count, const char *name, const char *sep, + GetByteContext *gb, int le, AVDictionary **metadata); + +/** Adds count doubles converted to a string + * into the metadata dictionary. + */ +int ff_tadd_doubles_metadata(int count, const char *name, const char *sep, + GetByteContext *gb, int le, AVDictionary **metadata); + +/** Adds count shorts converted to a string + * into the metadata dictionary. + */ +int ff_tadd_shorts_metadata(int count, const char *name, const char *sep, + GetByteContext *gb, int le, int is_signed, AVDictionary **metadata); + +/** Adds count bytes converted to a string + * into the metadata dictionary. + */ +int ff_tadd_bytes_metadata(int count, const char *name, const char *sep, + GetByteContext *gb, int le, int is_signed, AVDictionary **metadata); + +/** Adds a string of count characters + * into the metadata dictionary. + */ +int ff_tadd_string_metadata(int count, const char *name, + GetByteContext *gb, int le, AVDictionary **metadata); + +/** Decodes a TIFF header from the input bytestream + * and sets the endianness in *le and the offset to + * the first IFD in *ifd_offset accordingly. + */ +int ff_tdecode_header(GetByteContext *gb, int *le, int *ifd_offset); + +/** Reads the first 3 fields of a TIFF tag, which are + * the tag id, the tag type and the count of values for that tag. + * Afterwards the bytestream is located at the first value to read and + * *next holds the bytestream offset of the following tag. + */ +int ff_tread_tag(GetByteContext *gb, int le, unsigned *tag, unsigned *type, + unsigned *count, int *next); + +#endif /* AVCODEC_TIFF_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_data.h new file mode 100644 index 00000000..57515f90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tiff_data.h @@ -0,0 +1,92 @@ +/* + * TIFF data tables + * Copyright (c) 2011 Thomas Kuehnel + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * TIFF data tables + * @author Thomas Kuehnel + * @see GeoTIFF specification at + * http://www.remotesensing.org/geotiff/spec/geotiffhome.html + */ + +#ifndef AVCODEC_TIFF_DATA_H +#define AVCODEC_TIFF_DATA_H + +#include "tiff.h" + +#define TIFF_CONF_KEY_ID_OFFSET 1024 +extern const TiffGeoTagNameType ff_tiff_conf_name_type_map[3]; + +#define TIFF_GEOG_KEY_ID_OFFSET 2048 +extern const TiffGeoTagNameType ff_tiff_geog_name_type_map[14]; + +#define TIFF_PROJ_KEY_ID_OFFSET 3072 +extern const TiffGeoTagNameType ff_tiff_proj_name_type_map[24]; + +#define TIFF_VERT_KEY_ID_OFFSET 4096 +extern const TiffGeoTagNameType ff_tiff_vert_name_type_map[4]; + +#define TIFF_GEO_KEY_UNDEFINED 0 +#define TIFF_GEO_KEY_USER_DEFINED 32767 + +#define TIFF_GT_MODEL_TYPE_OFFSET 1 +extern const char *const ff_tiff_gt_model_type_codes[3]; + +#define TIFF_GT_RASTER_TYPE_OFFSET 1 +extern const char *const ff_tiff_gt_raster_type_codes[2]; + +#define TIFF_LINEAR_UNIT_OFFSET 9001 +extern const char *const ff_tiff_linear_unit_codes[15]; + +#define TIFF_ANGULAR_UNIT_OFFSET 9101 +extern const char *const ff_tiff_angular_unit_codes[8]; + +#define TIFF_GCS_TYPE_OFFSET 4201 +extern const char *const ff_tiff_gcs_type_codes[133]; + +#define TIFF_GCSE_TYPE_OFFSET 4001 +extern const char *const ff_tiff_gcse_type_codes[35]; + +#define TIFF_GEODETIC_DATUM_OFFSET 6201 +extern const char *const ff_tiff_geodetic_datum_codes[120]; + +#define TIFF_GEODETIC_DATUM_E_OFFSET 6001 +extern const char *const ff_tiff_geodetic_datum_e_codes[35]; + +#define TIFF_ELLIPSOID_OFFSET 7001 +extern const char *const ff_tiff_ellipsoid_codes[35]; + +#define TIFF_PRIME_MERIDIAN_OFFSET 8901 +extern const char *const ff_tiff_prime_meridian_codes[11]; + +extern const TiffGeoTagKeyName ff_tiff_proj_cs_type_codes[978]; + +extern const TiffGeoTagKeyName ff_tiff_projection_codes[298]; + +#define TIFF_COORD_TRANS_OFFSET 1 +extern const char *const ff_tiff_coord_trans_codes[27]; + +#define TIFF_VERT_CS_OFFSET 5001 +extern const char *const ff_tiff_vert_cs_codes[32]; + +#define TIFF_ORTHO_VERT_CS_OFFSET 5101 +extern const char *const ff_tiff_ortho_vert_cs_codes[6]; +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tpeldsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tpeldsp.h new file mode 100644 index 00000000..3732f179 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tpeldsp.h @@ -0,0 +1,59 @@ +/* + * thirdpel DSP functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * thirdpel DSP functions + */ + +#ifndef AVCODEC_TPELDSP_H +#define AVCODEC_TPELDSP_H + +#include + +/* add and put pixel (decoding) */ +// blocksizes for hpel_pixels_func are 8x4,8x8 16x8 16x16 +// h for hpel_pixels_func is limited to {width/2, width} but never larger +// than 16 and never smaller than 4 +typedef void (*tpel_mc_func)(uint8_t *block /* align width (8 or 16) */, + const uint8_t *pixels /* align 1 */, + int line_size, int w, int h); + +/** + * thirdpel DSP context + */ +typedef struct TpelDSPContext { + /** + * Thirdpel motion compensation with rounding (a + b + 1) >> 1. + * this is an array[12] of motion compensation functions for the + * 9 thirdpel positions
+ * *pixels_tab[xthirdpel + 4 * ythirdpel] + * @param block destination where the result is stored + * @param pixels source + * @param line_size number of bytes in a horizontal line of block + * @param h height + */ + tpel_mc_func put_tpel_pixels_tab[11]; // FIXME individual func ptr per width? + tpel_mc_func avg_tpel_pixels_tab[11]; // FIXME individual func ptr per width? +} TpelDSPContext; + +void ff_tpeldsp_init(TpelDSPContext *c); + +#endif /* AVCODEC_TPELDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truemotion1data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truemotion1data.h new file mode 100644 index 00000000..3e581434 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truemotion1data.h @@ -0,0 +1,832 @@ +/* + * Duck Truemotion v1 Decoding Tables + * + * Data in this file was originally part of VpVision from On2 which is + * distributed under the GNU GPL. It is redistributed with libavcodec under + * the GNU LGPL using the common understanding that data tables necessary + * for decoding algorithms are not necessarily copyrightable. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVCODEC_TRUEMOTION1DATA_H +#define AVCODEC_TRUEMOTION1DATA_H + +#include +#include + +/* Y delta tables, skinny and fat */ +static const int16_t ydt1[8] = { 0, -2, 2, -6, 6, -12, 12, -12 }; +static const int16_t ydt2[8] = { 0, -2, 4, -6, 8, -12, 12, -12 }; +static const int16_t ydt3[8] = { 4, -6, 20, -20, 46, -46, 94, -94 }; +static const int16_t fat_ydt3[8] = { 0, -15, 50, -50, 115, -115, 235, -235 }; +static const int16_t ydt4[8] = { 0, -4, 4, -16, 16, -36, 36, -80 }; +/* NOTE: This table breaks the [+,-] pattern that the rest of the + * tables maintain. Is this intentional? */ +static const int16_t fat_ydt4[8] = { 0, 40, 80, -76, 160, -154, 236, -236 }; + +/* C delta tables, skinny and fat */ +static const int16_t cdt1[8] = { 0, -1, 1, -2, 3, -4, 5, -4 }; +static const int16_t cdt2[8] = { 0, -4, 3, -16, 20, -32, 36, -32 }; +static const int16_t fat_cdt2[8] = { 0, -20, 15, -80, 100, -160, 180, -160 }; +static const int16_t cdt3[8] = { 0, -2, 2, -8, 8, -18, 18, -40 }; + +/* all the delta tables to choose from, at all 4 delta levels */ +static const int16_t * const ydts[] = { ydt1, ydt2, ydt3, ydt4, NULL }; +static const int16_t * const fat_ydts[] = { fat_ydt3, fat_ydt3, fat_ydt3, fat_ydt4, NULL }; +static const int16_t * const cdts[] = { cdt1, cdt1, cdt2, cdt3, NULL }; +static const int16_t * const fat_cdts[] = { fat_cdt2, fat_cdt2, fat_cdt2, fat_ydt4, NULL }; + +static const uint8_t pc_tbl2[] = { +0x8,0x00,0x00,0x00,0x00, +0x8,0x00,0x00,0x00,0x00, +0x8,0x10,0x00,0x00,0x00, +0x8,0x01,0x00,0x00,0x00, +0x8,0x00,0x10,0x00,0x00, +0x8,0x00,0x01,0x00,0x00, +0x8,0x00,0x00,0x10,0x00, +0x8,0x00,0x00,0x01,0x00, +0x8,0x00,0x00,0x00,0x10, +0x8,0x00,0x00,0x00,0x01, +0x6,0x00,0x00,0x00, +0x6,0x10,0x00,0x00, +0x6,0x01,0x00,0x00, +0x6,0x00,0x10,0x00, +0x6,0x00,0x01,0x00, +0x6,0x00,0x00,0x01, +0x6,0x00,0x00,0x10, +0x6,0x00,0x00,0x02, +0x6,0x00,0x00,0x20, +0x6,0x20,0x10,0x00, +0x6,0x00,0x02,0x01, +0x6,0x00,0x20,0x10, +0x6,0x02,0x01,0x00, +0x6,0x11,0x00,0x00, +0x6,0x00,0x20,0x00, +0x6,0x00,0x02,0x00, +0x6,0x20,0x00,0x00, +0x6,0x01,0x10,0x00, +0x6,0x02,0x00,0x00, +0x6,0x01,0x00,0x02, +0x6,0x10,0x00,0x20, +0x6,0x00,0x01,0x02, +0x6,0x10,0x01,0x00, +0x6,0x00,0x10,0x20, +0x6,0x10,0x10,0x00, +0x6,0x10,0x00,0x01, +0x6,0x20,0x00,0x10, +0x6,0x02,0x00,0x01, +0x6,0x01,0x01,0x00, +0x6,0x01,0x00,0x10, +0x6,0x00,0x11,0x00, +0x6,0x10,0x00,0x02, +0x6,0x00,0x01,0x10, +0x6,0x00,0x00,0x11, +0x6,0x10,0x00,0x10, +0x6,0x01,0x00,0x01, +0x6,0x00,0x00,0x22, +0x6,0x02,0x01,0x01, +0x6,0x10,0x20,0x10, +0x6,0x01,0x02,0x01, +0x6,0x20,0x10,0x10, +0x6,0x01,0x00,0x20, +0x6,0x00,0x10,0x01, +0x6,0x21,0x10,0x00, +0x6,0x10,0x02,0x01, +0x6,0x12,0x01,0x00, +0x6,0x01,0x20,0x10, +0x6,0x01,0x02,0x00, +0x6,0x10,0x20,0x00, +0x6,0x00,0x10,0x02, +0x6,0x00,0x01,0x20, +0x6,0x00,0x02,0x21, +0x6,0x00,0x02,0x20, +0x6,0x00,0x00,0x12, +0x6,0x00,0x00,0x21, +0x6,0x20,0x11,0x00, +0x6,0x00,0x01,0x01, +0x6,0x11,0x10,0x00, +0x6,0x00,0x20,0x12, +0x6,0x00,0x20,0x11, +0x6,0x20,0x10,0x02, +0x6,0x02,0x01,0x20, +0x6,0x00,0x22,0x11, +0x6,0x00,0x10,0x10, +0x6,0x02,0x11,0x00, +0x6,0x00,0x21,0x10, +0x6,0x00,0x02,0x03, +0x6,0x20,0x10,0x01, +0x6,0x00,0x12,0x01, +0x4,0x11,0x00, +0x4,0x00,0x22, +0x4,0x20,0x00, +0x4,0x01,0x10, +0x4,0x02,0x20, +0x4,0x00,0x20, +0x4,0x02,0x00, +0x4,0x10,0x01, +0x4,0x00,0x11, +0x4,0x02,0x01, +0x4,0x02,0x21, +0x4,0x00,0x02, +0x4,0x20,0x02, +0x4,0x01,0x01, +0x4,0x10,0x10, +0x4,0x10,0x02, +0x4,0x22,0x00, +0x4,0x10,0x00, +0x4,0x01,0x00, +0x4,0x21,0x00, +0x4,0x12,0x00, +0x4,0x00,0x10, +0x4,0x20,0x12, +0x4,0x01,0x11, +0x4,0x00,0x01, +0x4,0x01,0x02, +0x4,0x11,0x02, +0x4,0x11,0x01, +0x4,0x10,0x20, +0x4,0x20,0x01, +0x4,0x22,0x11, +0x4,0x00,0x12, +0x4,0x20,0x10, +0x4,0x22,0x01, +0x4,0x01,0x20, +0x4,0x00,0x21, +0x4,0x10,0x11, +0x4,0x21,0x10, +0x4,0x10,0x22, +0x4,0x02,0x03, +0x4,0x12,0x01, +0x4,0x20,0x11, +0x4,0x11,0x10, +0x4,0x20,0x30, +0x4,0x11,0x20, +0x4,0x02,0x10, +0x4,0x22,0x10, +0x4,0x11,0x11, +0x4,0x30,0x20, +0x4,0x30,0x00, +0x4,0x01,0x22, +0x4,0x01,0x12, +0x4,0x02,0x11, +0x4,0x03,0x02, +0x4,0x03,0x00, +0x4,0x10,0x21, +0x4,0x12,0x20, +0x4,0x00,0x00, +0x4,0x12,0x21, +0x4,0x21,0x11, +0x4,0x02,0x22, +0x4,0x10,0x12, +0x4,0x31,0x00, +0x4,0x20,0x20, +0x4,0x00,0x03, +0x4,0x02,0x02, +0x4,0x22,0x20, +0x4,0x01,0x21, +0x4,0x21,0x02, +0x4,0x21,0x12, +0x4,0x11,0x22, +0x4,0x00,0x30, +0x4,0x12,0x11, +0x4,0x20,0x22, +0x4,0x31,0x20, +0x4,0x21,0x30, +0x4,0x22,0x02, +0x4,0x22,0x22, +0x4,0x20,0x31, +0x4,0x13,0x02, +0x4,0x03,0x10, +0x4,0x11,0x12, +0x4,0x00,0x13, +0x4,0x21,0x01, +0x4,0x12,0x03, +0x4,0x13,0x00, +0x4,0x13,0x10, +0x4,0x02,0x13, +0x4,0x30,0x01, +0x4,0x12,0x10, +0x4,0x22,0x13, +0x4,0x03,0x12, +0x4,0x31,0x01, +0x4,0x30,0x22, +0x4,0x00,0x31, +0x4,0x01,0x31, +0x4,0x02,0x23, +0x4,0x01,0x30, +0x4,0x11,0x21, +0x4,0x22,0x21, +0x4,0x01,0x13, +0x4,0x10,0x03, +0x4,0x22,0x03, +0x4,0x30,0x21, +0x4,0x21,0x31, +0x4,0x33,0x00, +0x4,0x13,0x12, +0x4,0x11,0x31, +0x4,0x30,0x02, +0x4,0x12,0x02, +0x4,0x11,0x13, +0x4,0x12,0x22, +0x4,0x20,0x32, +0x4,0x10,0x13, +0x4,0x22,0x31, +0x4,0x21,0x20, +0x4,0x01,0x33, +0x4,0x33,0x10, +0x4,0x20,0x13, +0x4,0x31,0x22, +0x4,0x13,0x30, +0x4,0x01,0x03, +0x4,0x11,0x33, +0x4,0x20,0x21, +0x4,0x13,0x31, +0x4,0x03,0x22, +0x4,0x31,0x02, +0x4,0x00,0x24, +0x2,0x00, +0x2,0x10, +0x2,0x20, +0x2,0x30, +0x2,0x40, +0x2,0x50, +0x2,0x60, +0x2,0x01, +0x2,0x11, +0x2,0x21, +0x2,0x31, +0x2,0x41, +0x2,0x51, +0x2,0x61, +0x2,0x02, +0x2,0x12, +0x2,0x22, +0x2,0x32, +0x2,0x42, +0x2,0x52, +0x2,0x62, +0x2,0x03, +0x2,0x13, +0x2,0x23, +0x2,0x33, +0x2,0x43, +0x2,0x53, +0x2,0x63, +0x2,0x04, +0x2,0x14, +0x2,0x24, +0x2,0x34, +0x2,0x44, +0x2,0x54, +0x2,0x64, +0x2,0x05, +0x2,0x15, +0x2,0x25, +0x2,0x35, +0x2,0x45, +0x2,0x55, +0x2,0x65, +0x2,0x06, +0x2,0x16, +0x2,0x26, +0x2,0x36, +0x2,0x46, +0x2,0x56, +0x2,0x66 +}; + +static const uint8_t pc_tbl3[] = { +0x6,0x00,0x00,0x00, +0x6,0x00,0x00,0x00, +0x6,0x00,0x00,0x01, +0x6,0x00,0x00,0x10, +0x6,0x00,0x00,0x11, +0x6,0x00,0x01,0x00, +0x6,0x00,0x01,0x01, +0x6,0x00,0x01,0x10, +0x6,0x00,0x01,0x11, +0x6,0x00,0x10,0x00, +0x6,0x00,0x10,0x01, +0x6,0x00,0x10,0x10, +0x6,0x00,0x10,0x11, +0x6,0x00,0x11,0x00, +0x6,0x00,0x11,0x01, +0x6,0x00,0x11,0x10, +0x6,0x00,0x11,0x11, +0x6,0x01,0x00,0x00, +0x6,0x01,0x00,0x01, +0x6,0x01,0x00,0x10, +0x6,0x01,0x00,0x11, +0x6,0x01,0x01,0x00, +0x6,0x01,0x01,0x01, +0x6,0x01,0x01,0x10, +0x6,0x01,0x01,0x11, +0x6,0x01,0x10,0x00, +0x6,0x01,0x10,0x01, +0x6,0x01,0x10,0x10, +0x6,0x01,0x10,0x11, +0x6,0x01,0x11,0x00, +0x6,0x01,0x11,0x01, +0x6,0x01,0x11,0x10, +0x6,0x01,0x11,0x11, +0x6,0x10,0x00,0x00, +0x6,0x10,0x00,0x01, +0x6,0x10,0x00,0x10, +0x6,0x10,0x00,0x11, +0x6,0x10,0x01,0x00, +0x6,0x10,0x01,0x01, +0x6,0x10,0x01,0x10, +0x6,0x10,0x01,0x11, +0x6,0x10,0x10,0x00, +0x6,0x10,0x10,0x01, +0x6,0x10,0x10,0x10, +0x6,0x10,0x10,0x11, +0x6,0x10,0x11,0x00, +0x6,0x10,0x11,0x01, +0x6,0x10,0x11,0x10, +0x6,0x10,0x11,0x11, +0x6,0x11,0x00,0x00, +0x6,0x11,0x00,0x01, +0x6,0x11,0x00,0x10, +0x6,0x11,0x00,0x11, +0x6,0x11,0x01,0x00, +0x6,0x11,0x01,0x01, +0x6,0x11,0x01,0x10, +0x6,0x11,0x01,0x11, +0x6,0x11,0x10,0x00, +0x6,0x11,0x10,0x01, +0x6,0x11,0x10,0x10, +0x6,0x11,0x10,0x11, +0x6,0x11,0x11,0x00, +0x6,0x11,0x11,0x01, +0x6,0x11,0x11,0x10, +0x4,0x00,0x00, +0x4,0x00,0x01, +0x4,0x00,0x02, +0x4,0x00,0x03, +0x4,0x00,0x10, +0x4,0x00,0x11, +0x4,0x00,0x12, +0x4,0x00,0x13, +0x4,0x00,0x20, +0x4,0x00,0x21, +0x4,0x00,0x22, +0x4,0x00,0x23, +0x4,0x00,0x30, +0x4,0x00,0x31, +0x4,0x00,0x32, +0x4,0x00,0x33, +0x4,0x01,0x00, +0x4,0x01,0x01, +0x4,0x01,0x02, +0x4,0x01,0x03, +0x4,0x01,0x10, +0x4,0x01,0x11, +0x4,0x01,0x12, +0x4,0x01,0x13, +0x4,0x01,0x20, +0x4,0x01,0x21, +0x4,0x01,0x22, +0x4,0x01,0x23, +0x4,0x01,0x30, +0x4,0x01,0x31, +0x4,0x01,0x32, +0x4,0x01,0x33, +0x4,0x02,0x00, +0x4,0x02,0x01, +0x4,0x02,0x02, +0x4,0x02,0x03, +0x4,0x02,0x10, +0x4,0x02,0x11, +0x4,0x02,0x12, +0x4,0x02,0x13, +0x4,0x02,0x20, +0x4,0x02,0x21, +0x4,0x02,0x22, +0x4,0x02,0x23, +0x4,0x02,0x30, +0x4,0x02,0x31, +0x4,0x02,0x32, +0x4,0x02,0x33, +0x4,0x03,0x00, +0x4,0x03,0x01, +0x4,0x03,0x02, +0x4,0x03,0x03, +0x4,0x03,0x10, +0x4,0x03,0x11, +0x4,0x03,0x12, +0x4,0x03,0x13, +0x4,0x03,0x20, +0x4,0x03,0x21, +0x4,0x03,0x22, +0x4,0x03,0x23, +0x4,0x03,0x30, +0x4,0x03,0x31, +0x4,0x03,0x32, +0x4,0x03,0x33, +0x4,0x10,0x00, +0x4,0x10,0x01, +0x4,0x10,0x02, +0x4,0x10,0x03, +0x4,0x10,0x10, +0x4,0x10,0x11, +0x4,0x10,0x12, +0x4,0x10,0x13, +0x4,0x10,0x20, +0x4,0x10,0x21, +0x4,0x10,0x22, +0x4,0x10,0x23, +0x4,0x10,0x30, +0x4,0x10,0x31, +0x4,0x10,0x32, +0x4,0x10,0x33, +0x4,0x11,0x00, +0x4,0x11,0x01, +0x4,0x11,0x02, +0x4,0x11,0x03, +0x4,0x11,0x10, +0x4,0x11,0x11, +0x4,0x11,0x12, +0x4,0x11,0x13, +0x4,0x11,0x20, +0x4,0x11,0x21, +0x4,0x11,0x22, +0x4,0x11,0x23, +0x4,0x11,0x30, +0x4,0x11,0x31, +0x4,0x11,0x32, +0x4,0x11,0x33, +0x4,0x12,0x00, +0x4,0x12,0x01, +0x4,0x12,0x02, +0x4,0x12,0x03, +0x4,0x12,0x10, +0x4,0x12,0x11, +0x4,0x12,0x12, +0x4,0x12,0x13, +0x4,0x12,0x20, +0x4,0x12,0x21, +0x4,0x12,0x22, +0x4,0x12,0x23, +0x4,0x12,0x30, +0x4,0x12,0x31, +0x4,0x12,0x32, +0x4,0x12,0x33, +0x4,0x13,0x00, +0x4,0x13,0x01, +0x4,0x13,0x02, +0x4,0x13,0x03, +0x4,0x13,0x10, +0x4,0x13,0x11, +0x4,0x13,0x12, +0x4,0x13,0x13, +0x4,0x13,0x20, +0x4,0x13,0x21, +0x4,0x13,0x22, +0x4,0x13,0x23, +0x4,0x13,0x30, +0x4,0x13,0x31, +0x4,0x13,0x32, +0x4,0x13,0x33, +0x2,0x00, +0x2,0x10, +0x2,0x20, +0x2,0x30, +0x2,0x40, +0x2,0x50, +0x2,0x60, +0x2,0x70, +0x2,0x01, +0x2,0x11, +0x2,0x21, +0x2,0x31, +0x2,0x41, +0x2,0x51, +0x2,0x61, +0x2,0x71, +0x2,0x02, +0x2,0x12, +0x2,0x22, +0x2,0x32, +0x2,0x42, +0x2,0x52, +0x2,0x62, +0x2,0x72, +0x2,0x03, +0x2,0x13, +0x2,0x23, +0x2,0x33, +0x2,0x43, +0x2,0x53, +0x2,0x63, +0x2,0x73, +0x2,0x04, +0x2,0x14, +0x2,0x24, +0x2,0x34, +0x2,0x44, +0x2,0x54, +0x2,0x64, +0x2,0x74, +0x2,0x05, +0x2,0x15, +0x2,0x25, +0x2,0x35, +0x2,0x45, +0x2,0x55, +0x2,0x65, +0x2,0x75, +0x2,0x06, +0x2,0x16, +0x2,0x26, +0x2,0x36, +0x2,0x46, +0x2,0x56, +0x2,0x66, +0x2,0x76, +0x2,0x07, +0x2,0x17, +0x2,0x27, +0x2,0x37, +0x2,0x47, +0x2,0x57, +0x2,0x67, +0x2,0x77 +}; + +static const uint8_t pc_tbl4[] = { +0x8,0x00,0x00,0x00,0x00, +0x8,0x00,0x00,0x00,0x00, +0x8,0x20,0x00,0x00,0x00, +0x8,0x00,0x00,0x00,0x01, +0x8,0x10,0x00,0x00,0x00, +0x8,0x00,0x00,0x00,0x02, +0x8,0x01,0x00,0x00,0x00, +0x8,0x00,0x00,0x00,0x10, +0x8,0x02,0x00,0x00,0x00, +0x6,0x00,0x00,0x00, +0x6,0x20,0x00,0x00, +0x6,0x00,0x00,0x01, +0x6,0x10,0x00,0x00, +0x6,0x00,0x00,0x02, +0x6,0x00,0x10,0x00, +0x6,0x00,0x20,0x00, +0x6,0x00,0x02,0x00, +0x6,0x00,0x01,0x00, +0x6,0x01,0x00,0x00, +0x6,0x00,0x00,0x20, +0x6,0x02,0x00,0x00, +0x6,0x00,0x00,0x10, +0x6,0x10,0x00,0x20, +0x6,0x01,0x00,0x02, +0x6,0x20,0x00,0x10, +0x6,0x02,0x00,0x01, +0x6,0x20,0x10,0x00, +0x6,0x00,0x12,0x00, +0x6,0x00,0x02,0x01, +0x6,0x02,0x01,0x00, +0x6,0x00,0x21,0x00, +0x6,0x00,0x01,0x02, +0x6,0x00,0x20,0x10, +0x6,0x00,0x00,0x21, +0x6,0x00,0x00,0x12, +0x6,0x00,0x01,0x20, +0x6,0x12,0x00,0x00, +0x6,0x00,0x10,0x20, +0x6,0x01,0x20,0x00, +0x6,0x02,0x10,0x00, +0x6,0x10,0x20,0x00, +0x6,0x01,0x02,0x00, +0x6,0x21,0x00,0x00, +0x6,0x00,0x02,0x10, +0x6,0x20,0x01,0x00, +0x6,0x00,0x22,0x00, +0x6,0x10,0x02,0x00, +0x6,0x00,0x10,0x02, +0x6,0x11,0x00,0x00, +0x6,0x00,0x11,0x00, +0x6,0x22,0x00,0x00, +0x6,0x20,0x00,0x02, +0x6,0x10,0x00,0x01, +0x6,0x00,0x20,0x01, +0x6,0x02,0x20,0x00, +0x6,0x01,0x10,0x00, +0x6,0x01,0x00,0x20, +0x6,0x00,0x20,0x02, +0x6,0x01,0x20,0x02, +0x6,0x10,0x01,0x00, +0x6,0x02,0x00,0x10, +0x6,0x00,0x10,0x01, +0x6,0x10,0x01,0x20, +0x6,0x20,0x02,0x10, +0x6,0x00,0x00,0x22, +0x6,0x10,0x00,0x02, +0x6,0x00,0x02,0x20, +0x6,0x20,0x02,0x00, +0x6,0x00,0x00,0x11, +0x6,0x02,0x10,0x01, +0x6,0x00,0x01,0x10, +0x6,0x00,0x02,0x11, +0x4,0x01,0x02, +0x4,0x02,0x01, +0x4,0x01,0x00, +0x4,0x10,0x20, +0x4,0x20,0x10, +0x4,0x20,0x00, +0x4,0x11,0x00, +0x4,0x02,0x00, +0x4,0x12,0x00, +0x4,0x00,0x21, +0x4,0x22,0x00, +0x4,0x00,0x12, +0x4,0x21,0x00, +0x4,0x02,0x11, +0x4,0x00,0x01, +0x4,0x10,0x02, +0x4,0x02,0x20, +0x4,0x20,0x11, +0x4,0x01,0x10, +0x4,0x21,0x10, +0x4,0x10,0x00, +0x4,0x10,0x22, +0x4,0x20,0x20, +0x4,0x00,0x22, +0x4,0x01,0x22, +0x4,0x20,0x01, +0x4,0x02,0x02, +0x4,0x00,0x20, +0x4,0x00,0x10, +0x4,0x00,0x11, +0x4,0x22,0x01, +0x4,0x11,0x20, +0x4,0x12,0x01, +0x4,0x12,0x20, +0x4,0x11,0x02, +0x4,0x10,0x10, +0x4,0x01,0x01, +0x4,0x02,0x21, +0x4,0x20,0x12, +0x4,0x01,0x12, +0x4,0x22,0x11, +0x4,0x21,0x12, +0x4,0x22,0x10, +0x4,0x21,0x02, +0x4,0x20,0x02, +0x4,0x10,0x01, +0x4,0x00,0x02, +0x4,0x10,0x21, +0x4,0x01,0x20, +0x4,0x11,0x22, +0x4,0x12,0x21, +0x4,0x22,0x20, +0x4,0x02,0x10, +0x4,0x02,0x22, +0x4,0x11,0x10, +0x4,0x22,0x02, +0x4,0x20,0x21, +0x4,0x01,0x11, +0x4,0x11,0x01, +0x4,0x10,0x12, +0x4,0x02,0x12, +0x4,0x20,0x22, +0x4,0x21,0x20, +0x4,0x01,0x21, +0x4,0x12,0x02, +0x4,0x21,0x11, +0x4,0x12,0x22, +0x4,0x12,0x10, +0x4,0x22,0x21, +0x4,0x10,0x11, +0x4,0x21,0x01, +0x4,0x11,0x12, +0x4,0x12,0x11, +0x4,0x66,0x66, +0x4,0x22,0x22, +0x4,0x11,0x21, +0x4,0x11,0x11, +0x4,0x21,0x22, +0x4,0x00,0x00, +0x4,0x22,0x12, +0x4,0x12,0x12, +0x4,0x21,0x21, +0x4,0x42,0x00, +0x4,0x00,0x04, +0x4,0x40,0x00, +0x4,0x30,0x00, +0x4,0x31,0x00, +0x4,0x00,0x03, +0x4,0x00,0x14, +0x4,0x00,0x13, +0x4,0x01,0x24, +0x4,0x20,0x13, +0x4,0x01,0x42, +0x4,0x14,0x20, +0x4,0x42,0x02, +0x4,0x13,0x00, +0x4,0x00,0x24, +0x4,0x31,0x20, +0x4,0x22,0x13, +0x4,0x11,0x24, +0x4,0x12,0x66, +0x4,0x30,0x01, +0x4,0x02,0x13, +0x4,0x12,0x42, +0x4,0x40,0x10, +0x4,0x40,0x02, +0x4,0x01,0x04, +0x4,0x24,0x00, +0x4,0x42,0x10, +0x4,0x21,0x13, +0x4,0x13,0x12, +0x4,0x31,0x21, +0x4,0x21,0x24, +0x4,0x00,0x40, +0x4,0x10,0x24, +0x4,0x10,0x42, +0x4,0x32,0x01, +0x4,0x11,0x42, +0x4,0x20,0x31, +0x4,0x12,0x40, +0x2,0x00, +0x2,0x10, +0x2,0x20, +0x2,0x30, +0x2,0x40, +0x2,0x50, +0x2,0x60, +0x2,0x70, +0x2,0x01, +0x2,0x11, +0x2,0x21, +0x2,0x31, +0x2,0x41, +0x2,0x51, +0x2,0x61, +0x2,0x71, +0x2,0x02, +0x2,0x12, +0x2,0x22, +0x2,0x32, +0x2,0x42, +0x2,0x52, +0x2,0x62, +0x2,0x72, +0x2,0x03, +0x2,0x13, +0x2,0x23, +0x2,0x33, +0x2,0x43, +0x2,0x53, +0x2,0x63, +0x2,0x73, +0x2,0x04, +0x2,0x14, +0x2,0x24, +0x2,0x34, +0x2,0x44, +0x2,0x54, +0x2,0x64, +0x2,0x74, +0x2,0x05, +0x2,0x15, +0x2,0x25, +0x2,0x35, +0x2,0x45, +0x2,0x55, +0x2,0x65, +0x2,0x75, +0x2,0x06, +0x2,0x16, +0x2,0x26, +0x2,0x36, +0x2,0x46, +0x2,0x56, +0x2,0x66, +0x2,0x76, +0x2,0x07, +0x2,0x17, +0x2,0x27, +0x2,0x37, +0x2,0x47, +0x2,0x57, +0x2,0x67, +0x2,0x77 +}; + +static const uint8_t * const tables[] = { pc_tbl2, pc_tbl3, pc_tbl4 }; + +#endif /* AVCODEC_TRUEMOTION1DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truespeech_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truespeech_data.h new file mode 100644 index 00000000..73ebda5e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/truespeech_data.h @@ -0,0 +1,159 @@ +/* + * DSP Group TrueSpeech compatible decoder + * copyright (c) 2005 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TRUESPEECH_DATA_H +#define AVCODEC_TRUESPEECH_DATA_H + +#include + +/* codebooks fo expanding input filter */ +static const int16_t ts_cb_0[32] = { + 0x8240, 0x8364, 0x84CE, 0x865D, 0x8805, 0x89DE, 0x8BD7, 0x8DF4, + 0x9051, 0x92E2, 0x95DE, 0x990F, 0x9C81, 0xA079, 0xA54C, 0xAAD2, + 0xB18A, 0xB90A, 0xC124, 0xC9CC, 0xD339, 0xDDD3, 0xE9D6, 0xF893, + 0x096F, 0x1ACA, 0x29EC, 0x381F, 0x45F9, 0x546A, 0x63C3, 0x73B5, +}; + +static const int16_t ts_cb_1[32] = { + 0x9F65, 0xB56B, 0xC583, 0xD371, 0xE018, 0xEBB4, 0xF61C, 0xFF59, + 0x085B, 0x1106, 0x1952, 0x214A, 0x28C9, 0x2FF8, 0x36E6, 0x3D92, + 0x43DF, 0x49BB, 0x4F46, 0x5467, 0x5930, 0x5DA3, 0x61EC, 0x65F9, + 0x69D4, 0x6D5A, 0x709E, 0x73AD, 0x766B, 0x78F0, 0x7B5A, 0x7DA5, +}; + +static const int16_t ts_cb_2[16] = { + 0x96F8, 0xA3B4, 0xAF45, 0xBA53, 0xC4B1, 0xCECC, 0xD86F, 0xE21E, + 0xEBF3, 0xF640, 0x00F7, 0x0C20, 0x1881, 0x269A, 0x376B, 0x4D60, +}; + +static const int16_t ts_cb_3[16] = { + 0xC654, 0xDEF2, 0xEFAA, 0xFD94, 0x096A, 0x143F, 0x1E7B, 0x282C, + 0x3176, 0x3A89, 0x439F, 0x4CA2, 0x557F, 0x5E50, 0x6718, 0x6F8D, +}; + +static const int16_t ts_cb_4[16] = { + 0xABE7, 0xBBA8, 0xC81C, 0xD326, 0xDD0E, 0xE5D4, 0xEE22, 0xF618, + 0xFE28, 0x064F, 0x0EB7, 0x17B8, 0x21AA, 0x2D8B, 0x3BA2, 0x4DF9, +}; + +static const int16_t ts_cb_5[8] = { + 0xD51B, 0xF12E, 0x042E, 0x13C7, 0x2260, 0x311B, 0x40DE, 0x5385, +}; + +static const int16_t ts_cb_6[8] = { + 0xB550, 0xC825, 0xD980, 0xE997, 0xF883, 0x0752, 0x1811, 0x2E18, +}; + +static const int16_t ts_cb_7[8] = { + 0xCEF0, 0xE4F9, 0xF6BB, 0x0646, 0x14F5, 0x23FF, 0x356F, 0x4A8D, +}; + +static const int16_t * const ts_codebook[8] = { + ts_cb_0, ts_cb_1, ts_cb_2, ts_cb_3, ts_cb_4, ts_cb_5, ts_cb_6, ts_cb_7 +}; + +/* table used for decoding pulse positions */ +static const int16_t ts_pulse_values[120] = { + 0x0E46, 0x0CCC, 0x0B6D, 0x0A28, 0x08FC, 0x07E8, 0x06EB, 0x0604, + 0x0532, 0x0474, 0x03C9, 0x0330, 0x02A8, 0x0230, 0x01C7, 0x016C, + 0x011E, 0x00DC, 0x00A5, 0x0078, 0x0054, 0x0038, 0x0023, 0x0014, + 0x000A, 0x0004, 0x0001, 0x0000, 0x0000, 0x0000, + + 0x0196, 0x017A, 0x015F, 0x0145, 0x012C, 0x0114, 0x00FD, 0x00E7, + 0x00D2, 0x00BE, 0x00AB, 0x0099, 0x0088, 0x0078, 0x0069, 0x005B, + 0x004E, 0x0042, 0x0037, 0x002D, 0x0024, 0x001C, 0x0015, 0x000F, + 0x000A, 0x0006, 0x0003, 0x0001, 0x0000, 0x0000, + + 0x001D, 0x001C, 0x001B, 0x001A, 0x0019, 0x0018, 0x0017, 0x0016, + 0x0015, 0x0014, 0x0013, 0x0012, 0x0011, 0x0010, 0x000F, 0x000E, + 0x000D, 0x000C, 0x000B, 0x000A, 0x0009, 0x0008, 0x0007, 0x0006, + 0x0005, 0x0004, 0x0003, 0x0002, 0x0001, 0x0000, + + 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, + 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, + 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, + 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001 +}; + +/* filter for correlated input filter */ +static const int16_t ts_decay_994_1000[8] = + { 0x7F3B, 0x7E78, 0x7DB6, 0x7CF5, 0x7C35, 0x7B76, 0x7AB8, 0x79FC }; + +/* two-point filters table */ +static const int16_t ts_order2_coeffs[25 * 2] = { + 0xED2F, 0x5239, + 0x54F1, 0xE4A9, + 0x2620, 0xEE3E, + 0x09D6, 0x2C40, + 0xEFB5, 0x2BE0, + + 0x3FE1, 0x3339, + 0x442F, 0xE6FE, + 0x4458, 0xF9DF, + 0xF231, 0x43DB, + 0x3DB0, 0xF705, + + 0x4F7B, 0xFEFB, + 0x26AD, 0x0CDC, + 0x33C2, 0x0739, + 0x12BE, 0x43A2, + 0x1BDF, 0x1F3E, + + 0x0211, 0x0796, + 0x2AEB, 0x163F, + 0x050D, 0x3A38, + 0x0D1E, 0x0D78, + 0x150F, 0x3346, + + 0x38A4, 0x0B7D, + 0x2D5D, 0x1FDF, + 0x19B7, 0x2822, + 0x0D99, 0x1F12, + 0x194C, 0x0CE6 +}; + +/* possible pulse values */ +static const int16_t ts_pulse_scales[64] = { + 0x0002, 0x0006, 0xFFFE, 0xFFFA, + 0x0004, 0x000C, 0xFFFC, 0xFFF4, + 0x0006, 0x0012, 0xFFFA, 0xFFEE, + 0x000A, 0x001E, 0xFFF6, 0xFFE2, + 0x0010, 0x0030, 0xFFF0, 0xFFD0, + 0x0019, 0x004B, 0xFFE7, 0xFFB5, + 0x0028, 0x0078, 0xFFD8, 0xFF88, + 0x0040, 0x00C0, 0xFFC0, 0xFF40, + 0x0065, 0x012F, 0xFF9B, 0xFED1, + 0x00A1, 0x01E3, 0xFF5F, 0xFE1D, + 0x0100, 0x0300, 0xFF00, 0xFD00, + 0x0196, 0x04C2, 0xFE6A, 0xFB3E, + 0x0285, 0x078F, 0xFD7B, 0xF871, + 0x0400, 0x0C00, 0xFC00, 0xF400, + 0x0659, 0x130B, 0xF9A7, 0xECF5, + 0x0A14, 0x1E3C, 0xF5EC, 0xE1C4 +}; + +/* filters used in final output calculations */ +static const int16_t ts_decay_35_64[8] = + { 0x4666, 0x26B8, 0x154C, 0x0BB6, 0x0671, 0x038B, 0x01F3, 0x0112 }; +static const int16_t ts_decay_3_4[8] = + { 0x6000, 0x4800, 0x3600, 0x2880, 0x1E60, 0x16C8, 0x1116, 0x0CD1 }; + +#endif /* AVCODEC_TRUESPEECH_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tscc2data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tscc2data.h new file mode 100644 index 00000000..5e8d18b3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/tscc2data.h @@ -0,0 +1,928 @@ +/* + * TechSmith Screen Codec 2 (aka Dora) decoder + * Copyright (c) 2012 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TSCC2DATA_H +#define AVCODEC_TSCC2DATA_H + +#include + +#define NUM_VLC_SETS 13 + +static const uint16_t tscc2_quants[NUM_VLC_SETS][3] = { + { 655, 861, 1130 }, { 983, 1291, 1695 }, { 1311, 1721, 2260 }, + { 1638, 2151, 2825 }, { 1966, 2582, 3390 }, { 2294, 3012, 3955 }, + { 2621, 3442, 4520 }, { 2949, 3872, 5085 }, { 3277, 4303, 5650 }, + { 3604, 4733, 6215 }, { 3932, 5163, 6780 }, { 4260, 5593, 7345 }, + { 4588, 6024, 7910 }, +}; + +#define DC_VLC_COUNT 47 + +static const uint16_t tscc2_dc_vlc_syms[DC_VLC_COUNT] = { + 0x100, 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, + 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, + 0xF0, 0xEF, 0xEE, 0xED, 0xEC, 0xEB, 0xEA, 0x17, + 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F, + 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07, + 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, +}; + +static const uint16_t tscc2_dc_vlc_codes[DC_VLC_COUNT] = { + 0x000A, 0x0000, 0x0006, 0x002E, 0x0002, 0x000E, 0x001A, 0x007E, + 0x004E, 0x005A, 0x00E2, 0x01BE, 0x01BA, 0x00BA, 0x0072, 0x0022, + 0x02BE, 0x00BE, 0x033A, 0x03F2, 0x01F2, 0x03A2, 0x0122, 0x0322, + 0x01A2, 0x0172, 0x0372, 0x013A, 0x00CE, 0x02CE, 0x02FE, 0x00FE, + 0x00A2, 0x00F2, 0x003A, 0x01CE, 0x01FE, 0x0062, 0x00DA, 0x003E, + 0x0032, 0x007A, 0x0012, 0x001E, 0x0016, 0x0004, 0x0001, +}; + +static const uint8_t tscc2_dc_vlc_bits[DC_VLC_COUNT] = { + 5, 3, 5, 6, 6, 7, 7, 8, + 8, 8, 8, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 9, 9, 9, 9, 9, 8, 8, 8, + 7, 7, 6, 6, 5, 3, 1, +}; + +static const uint8_t tscc2_nc_vlc_syms[16] = { + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, + 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, +}; + +static const uint16_t tscc2_nc_vlc_codes[NUM_VLC_SETS][16] = { + { 0x0023, 0x0003, 0x0031, 0x0021, 0x0011, 0x0053, 0x0013, 0x0001, + 0x0009, 0x0029, 0x0033, 0x0019, 0x000B, 0x0005, 0x0007, 0x0000, }, + { 0x0030, 0x0022, 0x0028, 0x0020, 0x0008, 0x0000, 0x0032, 0x0072, + 0x0010, 0x0002, 0x0012, 0x0018, 0x000A, 0x0004, 0x0006, 0x0001, }, + { 0x0032, 0x0038, 0x0020, 0x0008, 0x0002, 0x0018, 0x0072, 0x0000, + 0x0028, 0x0022, 0x0012, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, }, + { 0x0032, 0x0010, 0x0072, 0x0030, 0x0022, 0x0038, 0x0008, 0x0028, + 0x0018, 0x0002, 0x0012, 0x0000, 0x000A, 0x0004, 0x0006, 0x0001, }, + { 0x0012, 0x0052, 0x0000, 0x0020, 0x0018, 0x0022, 0x0008, 0x0028, + 0x0038, 0x0002, 0x0032, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, }, + { 0x0016, 0x0096, 0x0006, 0x0046, 0x0056, 0x0002, 0x0036, 0x0076, + 0x0012, 0x0022, 0x0032, 0x0026, 0x000A, 0x000E, 0x0000, 0x0001, }, + { 0x001A, 0x009A, 0x0032, 0x0072, 0x005A, 0x007A, 0x003A, 0x0002, + 0x0012, 0x0022, 0x000A, 0x002A, 0x0006, 0x000E, 0x0000, 0x0001, }, + { 0x002A, 0x00AA, 0x0002, 0x0042, 0x006A, 0x003A, 0x007A, 0x0022, + 0x0032, 0x0012, 0x000A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, }, + { 0x0042, 0x00C2, 0x0002, 0x000A, 0x004A, 0x003A, 0x007A, 0x0022, + 0x0012, 0x0032, 0x002A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, }, + { 0x00BA, 0x01BA, 0x003A, 0x0012, 0x0052, 0x007A, 0x0002, 0x0022, + 0x0032, 0x000A, 0x002A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, }, + { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012, + 0x0032, 0x000A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, }, + { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012, + 0x0032, 0x000A, 0x003A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, }, + { 0x008A, 0x018A, 0x000A, 0x0022, 0x0062, 0x004A, 0x0002, 0x0012, + 0x0032, 0x002A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, }, +}; + +static const uint8_t tscc2_nc_vlc_bits[NUM_VLC_SETS][16] = { + { 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, + { 6, 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 5, 4, 3, 3, 1 }, + { 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, + { 7, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, + { 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 }, + { 8, 8, 7, 7, 7, 6, 7, 7, 6, 6, 6, 6, 4, 4, 2, 1 }, + { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, + { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, + { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 }, + { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, + { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, + { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, + { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 }, +}; + +static const uint16_t ac_vlc_desc0_syms[172] = { + 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, + 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, + 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB2, 0xFB1, + 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, 0xF91, 0xF90, + 0xF83, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70, 0xF61, 0xF60, + 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31, 0xF30, 0xF21, + 0xF20, 0xF10, 0xF00, 0xEF0, 0xEE0, 0xED5, 0xED1, 0xED0, + 0xEC0, 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50, + 0xE40, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE0, 0xDD0, + 0xDC0, 0xDB0, 0xDA0, 0xD90, 0xD80, 0xD60, 0xCD1, 0x280, + 0x270, 0x260, 0x250, 0x240, 0x230, 0x220, 0x210, 0x200, + 0x1F0, 0x1E0, 0x1D0, 0x1C0, 0x1B0, 0x1A1, 0x1A0, 0x190, + 0x180, 0x170, 0x160, 0x150, 0x140, 0x130, 0x121, 0x120, + 0x111, 0x110, 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0, + 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1, + 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070, + 0x065, 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051, + 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, + 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, + 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, + 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc0_codes[172] = { + 0x001F, 0x0D71, 0x013F, 0x006C, 0x00A7, 0x0067, 0x001C, 0x0008, + 0x0005, 0x06F1, 0x002C, 0x04BA, 0x0072, 0x01AA, 0x0002, 0x0006, + 0x06AC, 0x02AF, 0x06EF, 0x018F, 0x000A, 0x0009, 0x02AC, 0x042A, + 0x06E1, 0x068F, 0x00B1, 0x0000, 0x0317, 0x0C17, 0x0612, 0x010F, + 0x0011, 0x0FBA, 0x002A, 0x0172, 0x000C, 0x05AC, 0x03D7, 0x0037, + 0x0E8F, 0x02F2, 0x0041, 0x0BE1, 0x057F, 0x004A, 0x00AF, 0x006F, + 0x06AA, 0x0097, 0x0101, 0x0012, 0x0081, 0x0571, 0x0092, 0x0EAF, + 0x01BF, 0x00D7, 0x0031, 0x0001, 0x01F2, 0x0F17, 0x053A, 0x00BF, + 0x038F, 0x0217, 0x0371, 0x01F1, 0x01BA, 0x022A, 0x02BF, 0x028F, + 0x008F, 0x03F1, 0x00E1, 0x00BA, 0x00F2, 0x0EBF, 0x06AF, 0x048F, + 0x0FE1, 0x0271, 0x07BA, 0x0D3A, 0x0C12, 0x08AC, 0x0717, 0x00AC, + 0x0412, 0x0901, 0x04E1, 0x07E1, 0x0417, 0x0CAF, 0x04AC, 0x01AC, + 0x04F2, 0x03BA, 0x05D7, 0x07F1, 0x01D7, 0x04AF, 0x04EF, 0x03AC, + 0x00AA, 0x01E1, 0x0071, 0x00F1, 0x012C, 0x03EF, 0x082A, 0x0112, + 0x03E1, 0x01FA, 0x0DAC, 0x0131, 0x0E12, 0x000F, 0x0B17, 0x007F, + 0x0AEF, 0x007A, 0x02AA, 0x0061, 0x0671, 0x0027, 0x013A, 0x058F, + 0x00FF, 0x033A, 0x0032, 0x0301, 0x0021, 0x0C8F, 0x037F, 0x0077, + 0x02F1, 0x02E1, 0x003A, 0x003C, 0x0212, 0x0817, 0x0CE1, 0x003F, + 0x0007, 0x0017, 0x0501, 0x02BA, 0x06BF, 0x0057, 0x0010, 0x02EF, + 0x0117, 0x017F, 0x00EF, 0x006A, 0x0019, 0x0171, 0x01EF, 0x06BA, + 0x012A, 0x00FA, 0x0022, 0x000E, 0x0AE1, 0x01AF, 0x0052, 0x002F, + 0x004F, 0x001A, 0x0004, 0x0003, +}; + +static const uint8_t ac_vlc_desc0_bits[172] = { + 6, 12, 9, 7, 8, 7, 6, 4, + 3, 11, 9, 11, 9, 9, 6, 4, + 11, 11, 11, 11, 7, 5, 11, 11, + 11, 12, 8, 5, 12, 12, 12, 9, + 6, 12, 12, 9, 6, 12, 10, 7, + 12, 10, 7, 12, 11, 7, 11, 8, + 11, 8, 12, 11, 8, 12, 8, 12, + 9, 9, 9, 9, 9, 12, 12, 10, + 10, 10, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, + 12, 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 11, 11, + 11, 11, 11, 11, 11, 12, 11, 10, + 10, 10, 10, 10, 9, 10, 12, 9, + 12, 9, 12, 9, 12, 9, 12, 9, + 12, 8, 11, 8, 11, 8, 11, 11, + 8, 10, 7, 10, 7, 12, 10, 7, + 11, 12, 9, 6, 11, 12, 12, 9, + 6, 12, 11, 11, 12, 8, 5, 12, + 10, 11, 11, 7, 5, 11, 10, 11, + 9, 9, 6, 4, 12, 9, 7, 8, + 7, 6, 4, 3, +}; + +static const uint16_t ac_vlc_desc1_syms[169] = { + 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, + 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, + 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2, + 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, + 0xF93, 0xF91, 0xF90, 0xF85, 0xF81, 0xF80, 0xF71, 0xF70, + 0xF61, 0xF60, 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31, + 0xF30, 0xF21, 0xF20, 0xF11, 0xF10, 0xF01, 0xF00, 0xEF1, + 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC6, 0xEC0, 0xEB6, 0xEB0, + 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50, 0xE40, 0xE33, + 0xE31, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE1, 0xDE0, + 0xDC0, 0xDB0, 0xDA0, 0x250, 0x240, 0x1F0, 0x1E0, 0x1D0, + 0x1C0, 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150, + 0x140, 0x130, 0x120, 0x111, 0x110, 0x101, 0x100, 0x0F1, + 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C6, 0x0C1, 0x0C0, + 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x095, 0x091, 0x090, 0x085, + 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061, + 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x046, 0x045, + 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x033, 0x032, + 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, + 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, + 0x010, +}; + +static const uint16_t ac_vlc_desc1_codes[169] = { + 0x0019, 0x027D, 0x0084, 0x0044, 0x009D, 0x003D, 0x000A, 0x0002, + 0x0003, 0x00EA, 0x02FD, 0x017A, 0x01C6, 0x00B6, 0x0026, 0x000E, + 0x0095, 0x0260, 0x032A, 0x0360, 0x0006, 0x0005, 0x05B6, 0x036A, + 0x06F6, 0x0704, 0x00FA, 0x0010, 0x0279, 0x04D4, 0x00F6, 0x066A, + 0x001D, 0x0029, 0x05F9, 0x0846, 0x04F6, 0x01D4, 0x0038, 0x0446, + 0x0160, 0x031D, 0x0075, 0x0054, 0x02D4, 0x005A, 0x05FD, 0x0040, + 0x06EA, 0x0055, 0x0460, 0x009A, 0x052A, 0x00A0, 0x00D8, 0x0380, + 0x017D, 0x092A, 0x00F9, 0x0D7A, 0x0179, 0x0304, 0x002A, 0x0104, + 0x01A0, 0x0780, 0x007D, 0x03F9, 0x0C46, 0x03EA, 0x0E6A, 0x0204, + 0x01FD, 0x051D, 0x02AA, 0x05EA, 0x00AA, 0x0080, 0x067D, 0x09EA, + 0x0C95, 0x09F9, 0x07B6, 0x0DB6, 0x012A, 0x0904, 0x0454, 0x0FB6, + 0x0960, 0x08D4, 0x0495, 0x0F80, 0x0560, 0x0B04, 0x057A, 0x0079, + 0x0795, 0x0E7D, 0x0060, 0x076A, 0x03B6, 0x0395, 0x0180, 0x02A0, + 0x006A, 0x0195, 0x0295, 0x0646, 0x03FD, 0x01F9, 0x0154, 0x0DF9, + 0x00C6, 0x0F95, 0x01F6, 0x0480, 0x0000, 0x0A79, 0x04AA, 0x00E0, + 0x0246, 0x001A, 0x0479, 0x0015, 0x0D60, 0x0280, 0x0018, 0x01EA, + 0x037A, 0x003A, 0x011D, 0x00FD, 0x0035, 0x0A7D, 0x04A0, 0x0146, + 0x0024, 0x01B6, 0x0504, 0x0046, 0x0020, 0x0009, 0x00D4, 0x03AA, + 0x0679, 0x026A, 0x0036, 0x0008, 0x02F6, 0x01AA, 0x016A, 0x0254, + 0x0039, 0x000D, 0x0004, 0x0176, 0x02EA, 0x007A, 0x0076, 0x0016, + 0x0001, 0x0879, 0x0058, 0x0014, 0x00D5, 0x005D, 0x0034, 0x000C, + 0x0007, +}; + +static const uint8_t ac_vlc_desc1_bits[169] = { + 6, 12, 8, 7, 8, 7, 6, 4, + 3, 10, 10, 11, 9, 9, 6, 4, + 11, 10, 10, 10, 7, 5, 12, 11, + 11, 11, 8, 5, 12, 11, 11, 12, + 9, 6, 12, 12, 11, 9, 6, 12, + 12, 10, 7, 11, 10, 7, 11, 7, + 11, 8, 11, 8, 11, 11, 8, 11, + 9, 12, 9, 12, 9, 12, 9, 12, + 9, 12, 10, 10, 12, 10, 12, 10, + 11, 11, 10, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 12, 12, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 11, 10, 12, 9, 12, + 9, 12, 9, 11, 8, 12, 11, 8, + 11, 8, 11, 8, 12, 10, 7, 12, + 10, 7, 11, 10, 7, 12, 11, 9, + 6, 11, 11, 12, 8, 6, 12, 10, + 11, 11, 8, 5, 11, 10, 10, 10, + 7, 5, 10, 9, 11, 9, 9, 6, + 4, 12, 8, 7, 8, 7, 6, 4, + 3, +}; + +static const uint16_t ac_vlc_desc2_syms[165] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, + 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, + 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, + 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF75, 0xF71, 0xF70, + 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40, 0xF36, 0xF31, + 0xF30, 0xF26, 0xF21, 0xF20, 0xF16, 0xF11, 0xF10, 0xF06, + 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC0, + 0xEB3, 0xEB1, 0xEB0, 0xEA3, 0xEA1, 0xEA0, 0xE90, 0xE81, + 0xE80, 0xE71, 0xE70, 0xE61, 0xE60, 0xE50, 0xE40, 0xE30, + 0xE10, 0xE00, 0x241, 0x240, 0x231, 0x1D0, 0x1C0, 0x1B3, + 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150, 0x140, + 0x130, 0x120, 0x110, 0x100, 0x0F0, 0x0E0, 0x0D1, 0x0D0, + 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1, 0x0A0, 0x096, + 0x095, 0x091, 0x090, 0x086, 0x085, 0x081, 0x080, 0x075, + 0x071, 0x070, 0x065, 0x063, 0x061, 0x060, 0x055, 0x053, + 0x052, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, + 0x036, 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, + 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, + 0x014, 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc2_codes[165] = { + 0x0034, 0x059C, 0x0280, 0x001C, 0x004C, 0x00BD, 0x0020, 0x003C, + 0x000A, 0x0003, 0x00FD, 0x008C, 0x0332, 0x01D5, 0x0055, 0x003E, + 0x0001, 0x07E4, 0x0264, 0x00B2, 0x00A2, 0x005C, 0x0005, 0x02A2, + 0x011D, 0x0132, 0x076C, 0x0012, 0x0018, 0x01E4, 0x05E4, 0x02B2, + 0x0432, 0x017D, 0x000E, 0x055D, 0x0955, 0x0164, 0x0028, 0x0D62, + 0x0B24, 0x02DE, 0x001E, 0x0340, 0x0014, 0x0555, 0x0180, 0x00DD, + 0x01B2, 0x0092, 0x036C, 0x00EC, 0x00E4, 0x00C0, 0x0C64, 0x095D, + 0x01DE, 0x0AE4, 0x0C32, 0x01A2, 0x06E4, 0x0832, 0x01A4, 0x015D, + 0x0732, 0x031D, 0x0F9C, 0x03E2, 0x09E2, 0x02FD, 0x0224, 0x051D, + 0x02E4, 0x019C, 0x05B2, 0x0355, 0x0064, 0x016C, 0x038C, 0x0880, + 0x0480, 0x06B2, 0x0540, 0x0080, 0x075D, 0x0155, 0x0424, 0x0680, + 0x0A62, 0x0A80, 0x078C, 0x0D9C, 0x0F8C, 0x0562, 0x0FF2, 0x0464, + 0x0B55, 0x01E2, 0x0032, 0x07F2, 0x0140, 0x03E4, 0x0662, 0x0755, + 0x0380, 0x026C, 0x0232, 0x001D, 0x0040, 0x00E2, 0x035D, 0x00F2, + 0x0162, 0x01FD, 0x03F2, 0x000C, 0x0EA2, 0x05F2, 0x0072, 0x04E4, + 0x0F32, 0x018C, 0x009D, 0x0324, 0x079C, 0x006C, 0x0054, 0x0F5D, + 0x021D, 0x0015, 0x0024, 0x06A2, 0x009C, 0x0004, 0x0062, 0x056C, + 0x0262, 0x0000, 0x002E, 0x01F2, 0x0124, 0x039C, 0x005E, 0x0010, + 0x0724, 0x00A4, 0x00DE, 0x0362, 0x0052, 0x000D, 0x03B2, 0x007D, + 0x05E2, 0x00D5, 0x005D, 0x0035, 0x0009, 0x099C, 0x0022, 0x002C, + 0x003D, 0x0008, 0x0002, 0x0006, 0x0007, +}; + +static const uint8_t ac_vlc_desc2_bits[165] = { + 6, 12, 12, 8, 7, 8, 6, 6, + 4, 3, 10, 9, 11, 9, 9, 6, + 4, 11, 10, 10, 10, 7, 5, 11, + 11, 10, 11, 8, 5, 11, 11, 11, + 12, 9, 6, 11, 12, 9, 6, 12, + 12, 10, 7, 10, 7, 11, 10, 8, + 11, 8, 11, 8, 11, 8, 12, 12, + 9, 12, 12, 9, 11, 12, 9, 12, + 12, 10, 12, 10, 12, 10, 10, 11, + 12, 12, 11, 12, 11, 11, 11, 12, + 11, 11, 11, 12, 12, 12, 11, 11, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 11, 11, 11, 11, + 10, 10, 10, 10, 9, 9, 11, 9, + 11, 9, 11, 8, 12, 11, 8, 11, + 12, 10, 8, 12, 12, 10, 7, 12, + 10, 7, 11, 12, 9, 6, 10, 11, + 12, 8, 6, 11, 10, 11, 8, 5, + 11, 9, 10, 10, 7, 5, 10, 9, + 11, 9, 9, 6, 4, 12, 8, 7, + 8, 6, 6, 4, 3, +}; + +static const uint16_t ac_vlc_desc3_syms[162] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, + 0xFC6, 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, + 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, + 0xF93, 0xF91, 0xF90, 0xF85, 0xF83, 0xF81, 0xF80, 0xF71, + 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50, 0xF46, + 0xF41, 0xF40, 0xF36, 0xF31, 0xF30, 0xF26, 0xF21, 0xF20, + 0xF11, 0xF10, 0xF01, 0xF00, 0xEF3, 0xEF1, 0xEF0, 0xEE3, + 0xEE1, 0xEE0, 0xED3, 0xED1, 0xED0, 0xEC1, 0xEC0, 0xEB1, + 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0x1E1, 0x1D1, 0x1D0, + 0x1C1, 0x1B1, 0x1A1, 0x180, 0x170, 0x163, 0x160, 0x150, + 0x140, 0x130, 0x123, 0x120, 0x113, 0x110, 0x100, 0x0F0, + 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, + 0x0A0, 0x095, 0x091, 0x090, 0x085, 0x081, 0x080, 0x076, + 0x075, 0x073, 0x071, 0x070, 0x066, 0x065, 0x063, 0x061, + 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x045, 0x043, + 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, + 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, + 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, + 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc3_codes[162] = { + 0x001D, 0x087C, 0x0AE8, 0x003A, 0x001C, 0x0008, 0x000C, 0x0032, + 0x0006, 0x0003, 0x03A5, 0x01EC, 0x01A5, 0x0080, 0x0030, 0x0005, + 0x0001, 0x0040, 0x03FC, 0x02D4, 0x0154, 0x02FC, 0x003C, 0x0015, + 0x051A, 0x0000, 0x02EC, 0x077C, 0x00D2, 0x0018, 0x03E8, 0x04EC, + 0x027C, 0x01FA, 0x0022, 0x0765, 0x0EA5, 0x0054, 0x0010, 0x08EC, + 0x0AAC, 0x03BA, 0x0042, 0x065D, 0x0AD4, 0x005C, 0x0028, 0x03C0, + 0x00E5, 0x035C, 0x04FA, 0x00DC, 0x06A5, 0x075C, 0x00C8, 0x05A5, + 0x04D4, 0x00BA, 0x01C0, 0x05E8, 0x012C, 0x00E8, 0x01B0, 0x00B0, + 0x025D, 0x002C, 0x0A52, 0x025C, 0x01E8, 0x00FA, 0x0348, 0x0652, + 0x0B7C, 0x0365, 0x031A, 0x0E52, 0x011A, 0x0200, 0x01BA, 0x02AC, + 0x06D4, 0x01FC, 0x05BA, 0x0DFC, 0x0248, 0x0EE8, 0x0B1A, 0x0CFC, + 0x0F65, 0x0B5C, 0x0DC0, 0x007C, 0x0548, 0x08A5, 0x00FC, 0x03B0, + 0x0148, 0x06AC, 0x0252, 0x071A, 0x02E8, 0x0240, 0x00AC, 0x021A, + 0x0140, 0x08E8, 0x01AC, 0x00EC, 0x0152, 0x00A5, 0x0068, 0x001A, + 0x006C, 0x05C0, 0x015C, 0x0025, 0x05B0, 0x017C, 0x0014, 0x047C, + 0x00D4, 0x06E8, 0x00C0, 0x0002, 0x0A5D, 0x04E8, 0x0A7C, 0x01D4, + 0x0020, 0x04A5, 0x07B0, 0x037C, 0x015D, 0x002A, 0x005D, 0x0048, + 0x067C, 0x007A, 0x0004, 0x04FC, 0x02FA, 0x0648, 0x0100, 0x0052, + 0x005A, 0x000D, 0x0165, 0x0065, 0x02A5, 0x0070, 0x00F0, 0x003D, + 0x0009, 0x05FC, 0x0E48, 0x009A, 0x0012, 0x00DD, 0x0034, 0x000A, + 0x000E, 0x0007, +}; + +static const uint8_t ac_vlc_desc3_bits[162] = { + 7, 12, 12, 8, 7, 7, 6, 6, + 4, 3, 10, 9, 11, 8, 8, 6, + 4, 10, 10, 12, 9, 10, 7, 5, + 11, 10, 10, 11, 8, 5, 10, 11, + 12, 9, 6, 12, 12, 9, 6, 12, + 12, 10, 7, 11, 12, 10, 7, 10, + 8, 12, 11, 8, 12, 11, 8, 11, + 11, 9, 11, 11, 9, 12, 11, 9, + 12, 9, 12, 10, 11, 11, 10, 12, + 12, 11, 12, 12, 11, 10, 11, 12, + 11, 11, 11, 12, 11, 12, 12, 12, + 12, 12, 12, 12, 11, 12, 11, 11, + 11, 11, 12, 11, 12, 10, 10, 10, + 9, 12, 9, 12, 9, 12, 8, 10, + 8, 12, 10, 8, 11, 10, 7, 11, + 11, 12, 9, 7, 12, 11, 12, 9, + 6, 11, 11, 12, 9, 6, 10, 10, + 11, 8, 5, 12, 10, 12, 9, 10, + 7, 5, 10, 9, 11, 8, 8, 6, + 4, 12, 12, 8, 7, 8, 6, 6, + 4, 3, +}; + +static const uint16_t ac_vlc_desc4_syms[131] = { + 0x1000, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, 0xFF0, + 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, 0xFD6, + 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, 0xFC3, 0xFC2, + 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, 0xFA5, 0xFA3, + 0xFA1, 0xFA0, 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF76, + 0xF71, 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50, + 0xF41, 0xF40, 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF13, + 0xF11, 0xF10, 0xF03, 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE0, + 0xED0, 0xEC0, 0xEB0, 0x191, 0x181, 0x180, 0x171, 0x161, + 0x140, 0x130, 0x123, 0x120, 0x110, 0x100, 0x0F3, 0x0F0, + 0x0E0, 0x0D0, 0x0C0, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091, + 0x090, 0x085, 0x081, 0x080, 0x075, 0x071, 0x070, 0x066, + 0x065, 0x063, 0x061, 0x060, 0x056, 0x055, 0x053, 0x051, + 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, + 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, + 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, + 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc4_codes[131] = { + 0x006B, 0x00BE, 0x0052, 0x00F3, 0x005B, 0x003A, 0x0009, 0x0007, + 0x00DA, 0x03FB, 0x0123, 0x00B3, 0x01B3, 0x002E, 0x0006, 0x030A, + 0x005A, 0x004A, 0x034A, 0x0072, 0x0005, 0x02DA, 0x0173, 0x04FB, + 0x0032, 0x0013, 0x039B, 0x0B9B, 0x011E, 0x0002, 0x00FB, 0x021E, + 0x009B, 0x007E, 0x0E1A, 0x03CA, 0x007B, 0x02FB, 0x0033, 0x03AB, + 0x0463, 0x008A, 0x0773, 0x041E, 0x002B, 0x031B, 0x065A, 0x011A, + 0x060A, 0x01DA, 0x0963, 0x0323, 0x0BAB, 0x059E, 0x010A, 0x05AB, + 0x0CFB, 0x071B, 0x079E, 0x0F9E, 0x0263, 0x079B, 0x0563, 0x019E, + 0x01AB, 0x0E63, 0x029B, 0x04CA, 0x0DAB, 0x0663, 0x0B1B, 0x020A, + 0x0A1E, 0x021A, 0x0063, 0x061E, 0x06FB, 0x025A, 0x0163, 0x0573, + 0x000A, 0x0223, 0x011B, 0x0C1A, 0x015A, 0x0863, 0x00AB, 0x02CA, + 0x00B2, 0x0A0A, 0x01CA, 0x00A3, 0x0B73, 0x0023, 0x0012, 0x039E, + 0x001A, 0x0CCA, 0x01FB, 0x005E, 0x0A9B, 0x00CA, 0x0373, 0x009E, + 0x0022, 0x07AB, 0x001E, 0x0EFB, 0x009A, 0x000B, 0x041A, 0x019B, + 0x0363, 0x014A, 0x006A, 0x0015, 0x069B, 0x0073, 0x0523, 0x001B, + 0x012B, 0x0003, 0x0001, 0x061A, 0x003E, 0x002A, 0x00E3, 0x003B, + 0x000E, 0x000D, 0x0000, +}; + +static const uint8_t ac_vlc_desc4_bits[131] = { + 7, 8, 7, 8, 7, 6, 4, 3, + 10, 10, 11, 9, 9, 6, 4, 10, + 10, 9, 10, 7, 5, 10, 11, 12, + 8, 6, 12, 12, 9, 6, 11, 12, + 10, 7, 12, 10, 8, 11, 8, 12, + 11, 8, 11, 11, 9, 12, 11, 9, + 11, 9, 12, 10, 12, 11, 10, 12, + 12, 11, 12, 12, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, 12, + 12, 11, 12, 11, 12, 11, 12, 11, + 10, 10, 10, 12, 9, 12, 9, 10, + 8, 12, 10, 8, 12, 10, 7, 11, + 11, 12, 10, 7, 12, 11, 12, 9, + 6, 11, 11, 12, 8, 6, 12, 10, + 10, 10, 7, 5, 11, 9, 11, 9, + 9, 6, 4, 12, 8, 7, 8, 7, + 6, 4, 2, +}; + +static const uint16_t ac_vlc_desc5_syms[132] = { + 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, + 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, + 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, + 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF93, 0xF91, 0xF90, 0xF86, + 0xF85, 0xF81, 0xF80, 0xF76, 0xF75, 0xF71, 0xF70, 0xF66, + 0xF61, 0xF60, 0xF51, 0xF50, 0xF43, 0xF41, 0xF40, 0xF33, + 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF11, 0xF10, 0xF00, + 0xEF0, 0xEE0, 0xEC1, 0xEC0, 0x151, 0x141, 0x140, 0x131, + 0x121, 0x120, 0x111, 0x110, 0x103, 0x100, 0x0F0, 0x0E0, + 0x0D3, 0x0D0, 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, + 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070, + 0x065, 0x061, 0x060, 0x056, 0x055, 0x053, 0x052, 0x051, + 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x035, + 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, + 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, + 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc5_codes[132] = { + 0x0001, 0x0D62, 0x00BD, 0x0022, 0x009B, 0x0032, 0x0019, 0x0005, + 0x0007, 0x034D, 0x009A, 0x012B, 0x0052, 0x006B, 0x003A, 0x0006, + 0x06FD, 0x017D, 0x081A, 0x031B, 0x031A, 0x0012, 0x0011, 0x0202, + 0x00FD, 0x051B, 0x00D2, 0x001D, 0x011A, 0x0782, 0x018D, 0x007B, + 0x067D, 0x037D, 0x0021, 0x0E8D, 0x0562, 0x008D, 0x00BB, 0x053D, + 0x082A, 0x0002, 0x000D, 0x0302, 0x007D, 0x053B, 0x003B, 0x0A4D, + 0x027D, 0x01FD, 0x042A, 0x01C2, 0x041A, 0x0182, 0x014D, 0x0162, + 0x00C2, 0x032A, 0x0D9A, 0x012A, 0x0102, 0x087D, 0x072B, 0x039A, + 0x0362, 0x019A, 0x0C62, 0x04C2, 0x0D1B, 0x028D, 0x0762, 0x0E7D, + 0x0E41, 0x059A, 0x024D, 0x093B, 0x052B, 0x011B, 0x064D, 0x013D, + 0x0382, 0x0262, 0x0641, 0x0462, 0x004D, 0x0CC2, 0x033B, 0x068D, + 0x0141, 0x0D2B, 0x001B, 0x0041, 0x00C1, 0x0C41, 0x01E2, 0x00EB, + 0x062A, 0x0082, 0x0061, 0x02FD, 0x047D, 0x013B, 0x002A, 0x003D, + 0x005B, 0x022A, 0x02C2, 0x0241, 0x0062, 0x00AA, 0x000B, 0x00E2, + 0x001A, 0x033D, 0x021A, 0x006A, 0x0009, 0x032B, 0x002B, 0x04FD, + 0x0042, 0x016B, 0x002D, 0x000E, 0x0441, 0x00CD, 0x005A, 0x00AB, + 0x000A, 0x0039, 0x0003, 0x0000, +}; + +static const uint8_t ac_vlc_desc5_bits[132] = { + 7, 12, 8, 7, 8, 6, 6, 4, + 3, 10, 9, 11, 8, 9, 6, 4, + 11, 10, 12, 10, 10, 7, 5, 10, + 11, 12, 8, 6, 10, 11, 9, 7, + 12, 10, 7, 12, 12, 10, 8, 11, + 12, 10, 8, 10, 12, 11, 9, 12, + 11, 9, 11, 9, 11, 10, 10, 11, + 11, 10, 12, 10, 10, 12, 11, 10, + 11, 11, 12, 12, 12, 11, 11, 12, + 12, 12, 12, 12, 12, 11, 11, 11, + 11, 10, 12, 12, 10, 12, 10, 12, + 9, 12, 9, 11, 8, 12, 9, 8, + 11, 9, 7, 11, 11, 12, 12, 9, + 7, 11, 10, 11, 11, 8, 6, 9, + 12, 10, 10, 7, 5, 11, 9, 11, + 8, 9, 6, 4, 12, 8, 7, 8, + 6, 6, 4, 2, +}; + +static const uint16_t ac_vlc_desc6_syms[130] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, + 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, + 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93, + 0xF91, 0xF90, 0xF86, 0xF85, 0xF81, 0xF80, 0xF76, 0xF71, + 0xF70, 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF43, + 0xF41, 0xF40, 0xF31, 0xF30, 0xF20, 0xF10, 0xF00, 0xEF0, + 0xEE1, 0x131, 0x121, 0x120, 0x111, 0x110, 0x101, 0x100, + 0x0F1, 0x0F0, 0x0E3, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C3, + 0x0C0, 0x0B3, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091, 0x090, + 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061, + 0x060, 0x056, 0x055, 0x053, 0x051, 0x050, 0x046, 0x045, + 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, + 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, + 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012, + 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc6_codes[130] = { + 0x0022, 0x0BB2, 0x0942, 0x002B, 0x0072, 0x0002, 0x001A, 0x0039, + 0x000D, 0x0007, 0x007B, 0x008E, 0x06DB, 0x00EA, 0x015B, 0x002E, + 0x0006, 0x0959, 0x027B, 0x0A0E, 0x01AB, 0x008A, 0x0012, 0x001E, + 0x0575, 0x005B, 0x02AB, 0x00C2, 0x0015, 0x036A, 0x04B2, 0x0099, + 0x001B, 0x0519, 0x0C19, 0x00DB, 0x004E, 0x0042, 0x0159, 0x03B2, + 0x030E, 0x00EB, 0x0252, 0x0EAB, 0x018A, 0x00E2, 0x06AB, 0x0242, + 0x017B, 0x0452, 0x0319, 0x0152, 0x025B, 0x016A, 0x00AB, 0x0052, + 0x05B2, 0x010E, 0x038E, 0x028A, 0x0359, 0x0019, 0x078A, 0x0C52, + 0x0D8E, 0x0ED9, 0x02D9, 0x0662, 0x0119, 0x09B2, 0x0BAB, 0x0D19, + 0x0C5B, 0x00B2, 0x0542, 0x0B8A, 0x02B2, 0x0142, 0x065B, 0x058E, + 0x0062, 0x018E, 0x038A, 0x00D9, 0x0419, 0x0162, 0x03AB, 0x0075, + 0x07B2, 0x0032, 0x020E, 0x07AB, 0x006B, 0x045B, 0x01B2, 0x0199, + 0x002A, 0x0375, 0x0775, 0x0AAB, 0x01D9, 0x003B, 0x060E, 0x0342, + 0x0175, 0x0262, 0x000A, 0x0005, 0x0559, 0x006A, 0x0D59, 0x0219, + 0x000E, 0x004A, 0x0009, 0x0719, 0x0059, 0x02DB, 0x00D2, 0x01DB, + 0x0025, 0x0001, 0x06D9, 0x00F5, 0x0035, 0x00FB, 0x003A, 0x000B, + 0x0003, 0x0000, +}; + +static const uint8_t ac_vlc_desc6_bits[130] = { + 7, 12, 12, 8, 7, 7, 6, 6, + 4, 3, 10, 9, 11, 8, 9, 6, + 4, 12, 10, 12, 10, 10, 7, 5, + 11, 11, 12, 8, 6, 10, 11, 9, + 7, 12, 12, 10, 7, 10, 12, 12, + 10, 8, 10, 12, 10, 8, 12, 10, + 9, 12, 11, 9, 11, 10, 10, 11, + 11, 10, 10, 10, 10, 11, 11, 12, + 12, 12, 11, 11, 11, 12, 12, 12, + 12, 11, 11, 12, 10, 12, 11, 12, + 10, 11, 12, 10, 12, 9, 12, 9, + 11, 8, 12, 11, 8, 12, 12, 9, + 7, 11, 11, 12, 9, 7, 11, 10, + 11, 11, 8, 6, 12, 9, 12, 10, + 10, 7, 5, 11, 9, 11, 8, 9, + 6, 4, 12, 8, 7, 8, 6, 6, + 4, 2, +}; + +static const uint16_t ac_vlc_desc7_syms[125] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, + 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93, + 0xF91, 0xF90, 0xF86, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70, + 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF41, 0xF40, + 0xF31, 0xF30, 0xF20, 0xF10, 0xF01, 0xF00, 0x121, 0x111, + 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0, + 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0, + 0x093, 0x091, 0x090, 0x081, 0x080, 0x071, 0x070, 0x065, + 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, + 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, + 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, + 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015, + 0x014, 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc7_codes[125] = { + 0x0053, 0x009A, 0x0EE2, 0x00D3, 0x006A, 0x0052, 0x003A, 0x0035, + 0x000D, 0x0007, 0x0062, 0x0125, 0x0142, 0x0019, 0x01F3, 0x0029, + 0x000E, 0x0082, 0x0ADA, 0x02E3, 0x00E2, 0x0022, 0x0006, 0x0065, + 0x05E3, 0x0765, 0x0032, 0x0039, 0x0F99, 0x05E2, 0x0099, 0x0033, + 0x0362, 0x0799, 0x0F65, 0x0073, 0x004A, 0x02A5, 0x0162, 0x0742, + 0x01A5, 0x00D9, 0x0342, 0x005A, 0x00AA, 0x0EF3, 0x0182, 0x01DA, + 0x0382, 0x035A, 0x00F3, 0x0673, 0x0165, 0x00E5, 0x06F3, 0x0225, + 0x0842, 0x025A, 0x07E3, 0x0399, 0x07A5, 0x072A, 0x0F2A, 0x09E3, + 0x0273, 0x049A, 0x02E5, 0x0B99, 0x02E2, 0x0E73, 0x0562, 0x02F3, + 0x032A, 0x0F42, 0x00DA, 0x0999, 0x012A, 0x0365, 0x00A5, 0x00E3, + 0x0199, 0x03E3, 0x019A, 0x01E2, 0x0173, 0x06E5, 0x0059, 0x01E3, + 0x02DA, 0x002A, 0x000A, 0x06DA, 0x0FA5, 0x0042, 0x01E5, 0x0013, + 0x03E2, 0x015A, 0x03A5, 0x0442, 0x001A, 0x0005, 0x04A5, 0x0265, + 0x08A5, 0x0025, 0x029A, 0x0072, 0x0016, 0x0599, 0x00C2, 0x0242, + 0x00B2, 0x0002, 0x0015, 0x0001, 0x0BE3, 0x06E2, 0x0063, 0x0023, + 0x0012, 0x0009, 0x0003, 0x000B, 0x0000, +}; + +static const uint8_t ac_vlc_desc7_bits[125] = { + 8, 11, 12, 8, 7, 7, 6, 6, + 4, 3, 9, 9, 10, 8, 9, 6, + 4, 9, 12, 10, 10, 7, 5, 10, + 11, 12, 8, 6, 12, 11, 9, 7, + 10, 12, 12, 10, 7, 10, 11, 12, + 10, 8, 11, 10, 8, 12, 10, 9, + 10, 10, 10, 12, 10, 10, 12, 10, + 12, 10, 11, 12, 12, 12, 12, 12, + 11, 11, 11, 12, 11, 12, 11, 11, + 11, 12, 10, 12, 10, 11, 12, 10, + 12, 12, 9, 11, 9, 11, 8, 12, + 12, 9, 7, 11, 12, 12, 9, 7, + 10, 10, 11, 11, 8, 6, 11, 10, + 12, 10, 10, 7, 5, 11, 8, 10, + 8, 8, 6, 4, 12, 12, 8, 7, + 7, 6, 6, 4, 2, +}; + +static const uint16_t ac_vlc_desc8_syms[121] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB1, + 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, + 0xF93, 0xF91, 0xF90, 0xF86, 0xF83, 0xF81, 0xF80, 0xF73, + 0xF71, 0xF70, 0xF63, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, + 0xF40, 0xF30, 0xF21, 0xF20, 0x111, 0x101, 0x0F1, 0x0E1, + 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B3, 0x0B1, 0x0B0, + 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081, + 0x080, 0x073, 0x071, 0x070, 0x065, 0x063, 0x061, 0x060, + 0x055, 0x053, 0x051, 0x050, 0x046, 0x045, 0x043, 0x042, + 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031, + 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, + 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, + 0x010, +}; + +static const uint16_t ac_vlc_desc8_codes[121] = { + 0x00F6, 0x0676, 0x0EB6, 0x00F3, 0x0056, 0x006A, 0x0039, 0x0003, + 0x000D, 0x0007, 0x00A2, 0x0173, 0x00CA, 0x0025, 0x0082, 0x0019, + 0x0001, 0x00B6, 0x0276, 0x02E3, 0x00B2, 0x0062, 0x001A, 0x0175, + 0x01E3, 0x0BE5, 0x004A, 0x0029, 0x07A5, 0x00E3, 0x030A, 0x0176, + 0x0023, 0x0042, 0x05CA, 0x00A5, 0x0142, 0x0052, 0x04A5, 0x0B02, + 0x0D22, 0x0375, 0x0065, 0x0522, 0x0DE3, 0x010A, 0x00F5, 0x0136, + 0x0275, 0x01B2, 0x03F5, 0x03E3, 0x0002, 0x08E3, 0x01A2, 0x0B36, + 0x020A, 0x0076, 0x0CE3, 0x07E5, 0x070A, 0x03A5, 0x02B6, 0x0036, + 0x01E5, 0x02A5, 0x05E3, 0x07B6, 0x07F5, 0x0736, 0x0BA5, 0x0075, + 0x0302, 0x0FE5, 0x01B6, 0x0102, 0x04E3, 0x0022, 0x08A5, 0x01CA, + 0x00E5, 0x0F0A, 0x05E5, 0x0096, 0x0A76, 0x0336, 0x0236, 0x0012, + 0x03B6, 0x0BF5, 0x0073, 0x0035, 0x02B2, 0x000A, 0x0476, 0x0122, + 0x0016, 0x0009, 0x0322, 0x01F5, 0x03E5, 0x01A5, 0x03CA, 0x0072, + 0x0006, 0x06A5, 0x0032, 0x02CA, 0x008A, 0x00C2, 0x0015, 0x000E, + 0x0702, 0x06B6, 0x0063, 0x0033, 0x002A, 0x0005, 0x0013, 0x000B, + 0x0000, +}; + +static const uint8_t ac_vlc_desc8_bits[121] = { + 8, 11, 12, 8, 7, 7, 6, 6, + 4, 3, 9, 9, 10, 8, 8, 6, + 4, 10, 12, 10, 10, 7, 5, 10, + 11, 12, 8, 6, 11, 12, 11, 9, + 7, 9, 11, 12, 9, 7, 11, 12, + 12, 10, 8, 12, 12, 10, 9, 10, + 10, 9, 12, 10, 9, 12, 9, 12, + 10, 11, 12, 12, 12, 12, 11, 10, + 11, 11, 12, 11, 11, 11, 12, 10, + 12, 12, 10, 10, 12, 9, 12, 11, + 9, 12, 11, 8, 12, 12, 10, 7, + 11, 12, 9, 7, 10, 10, 11, 11, + 8, 6, 10, 10, 12, 10, 10, 7, + 5, 11, 8, 10, 8, 8, 6, 4, + 11, 12, 8, 7, 7, 6, 6, 4, + 2, +}; + +static const uint16_t ac_vlc_desc9_syms[114] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, + 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2, + 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, + 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73, 0xF71, + 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF40, 0xF31, 0xF30, + 0xF21, 0x121, 0x0F1, 0x0E1, 0x0D1, 0x0D0, 0x0C1, 0x0C0, + 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090, + 0x083, 0x081, 0x080, 0x073, 0x071, 0x070, 0x065, 0x063, + 0x061, 0x060, 0x055, 0x053, 0x051, 0x050, 0x045, 0x043, + 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, + 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, + 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, + 0x011, 0x010, +}; + +static const uint16_t ac_vlc_desc9_codes[114] = { + 0x0061, 0x0403, 0x0DB1, 0x0012, 0x0071, 0x0056, 0x0035, 0x0023, + 0x000D, 0x0007, 0x0243, 0x01D3, 0x026A, 0x00A1, 0x00A2, 0x0011, + 0x000E, 0x01AA, 0x0531, 0x0093, 0x0222, 0x0032, 0x0006, 0x07F2, + 0x04D3, 0x0C43, 0x0072, 0x0001, 0x0343, 0x05F2, 0x04AA, 0x03F2, + 0x0031, 0x0045, 0x0143, 0x00AA, 0x0B31, 0x00F2, 0x00C3, 0x0693, + 0x0BF2, 0x0203, 0x00E1, 0x03B1, 0x02D3, 0x00B1, 0x056A, 0x01D2, + 0x008A, 0x046A, 0x01E2, 0x0003, 0x0103, 0x01B1, 0x02E2, 0x0293, + 0x016A, 0x04E2, 0x0443, 0x0521, 0x0321, 0x0043, 0x00D3, 0x00E2, + 0x0703, 0x00D2, 0x0731, 0x0A93, 0x0393, 0x0803, 0x0422, 0x0383, + 0x018A, 0x006A, 0x0021, 0x096A, 0x0303, 0x0052, 0x0CE2, 0x0D31, + 0x038A, 0x0013, 0x01F2, 0x0E93, 0x0083, 0x0005, 0x02D2, 0x0121, + 0x0022, 0x00EA, 0x0036, 0x0122, 0x0193, 0x0331, 0x0183, 0x02AA, + 0x004A, 0x001A, 0x0131, 0x002A, 0x036A, 0x000A, 0x0062, 0x0025, + 0x0009, 0x06E2, 0x05B1, 0x0053, 0x0002, 0x0016, 0x0015, 0x0033, + 0x000B, 0x0000, +}; + +static const uint8_t ac_vlc_desc9_bits[114] = { + 8, 11, 12, 7, 7, 7, 6, 6, + 4, 3, 10, 9, 10, 8, 8, 6, + 4, 9, 12, 10, 10, 7, 5, 11, + 11, 12, 8, 6, 10, 11, 11, 12, + 9, 7, 10, 11, 12, 9, 8, 12, + 12, 10, 8, 10, 10, 9, 11, 9, + 9, 11, 9, 12, 10, 11, 11, 12, + 12, 12, 12, 11, 10, 11, 11, 11, + 11, 10, 11, 12, 10, 12, 11, 10, + 10, 11, 9, 12, 11, 8, 12, 12, + 10, 8, 11, 12, 9, 7, 10, 11, + 11, 8, 6, 9, 10, 12, 10, 10, + 7, 5, 11, 8, 10, 8, 8, 6, + 4, 11, 12, 8, 6, 7, 6, 6, + 4, 2, +}; + +static const uint16_t ac_vlc_descA_syms[110] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, + 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, + 0xFB2, 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, + 0xF96, 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73, + 0xF71, 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40, + 0xF31, 0x0E1, 0x0D1, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1, + 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073, + 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051, + 0x050, 0x045, 0x044, 0x043, 0x042, 0x041, 0x040, 0x036, + 0x035, 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, + 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, + 0x015, 0x014, 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_descA_codes[110] = { + 0x002A, 0x04C5, 0x02A3, 0x004A, 0x0015, 0x0005, 0x0003, 0x0013, + 0x000D, 0x0007, 0x0171, 0x0032, 0x0371, 0x0076, 0x0042, 0x0011, + 0x000E, 0x00AA, 0x04D5, 0x03A3, 0x06A3, 0x0062, 0x001A, 0x06D5, + 0x07F2, 0x0223, 0x0CD5, 0x006A, 0x0001, 0x00F6, 0x0623, 0x03F2, + 0x07EA, 0x01F1, 0x0021, 0x03D5, 0x08C2, 0x07F6, 0x00F2, 0x00E3, + 0x0FEA, 0x02C5, 0x01AA, 0x0082, 0x04A3, 0x00B6, 0x0071, 0x03B2, + 0x0023, 0x01B6, 0x08A3, 0x0002, 0x0BB2, 0x00C5, 0x02EA, 0x0C23, + 0x0FF6, 0x0423, 0x07B2, 0x01C5, 0x07D5, 0x01EA, 0x06EA, 0x02C2, + 0x01F6, 0x01D5, 0x01B2, 0x00B2, 0x04F1, 0x03EA, 0x01A2, 0x02A2, + 0x02D5, 0x0123, 0x00D5, 0x01F2, 0x0055, 0x05B2, 0x04C2, 0x0102, + 0x0061, 0x05D5, 0x00C2, 0x00F1, 0x00A3, 0x0045, 0x0016, 0x01A3, + 0x01C2, 0x08D5, 0x03C5, 0x00EA, 0x000A, 0x0006, 0x00A2, 0x0036, + 0x02F1, 0x0072, 0x0022, 0x0025, 0x0009, 0x03F6, 0x0AA3, 0x0063, + 0x0012, 0x0031, 0x0035, 0x0033, 0x000B, 0x0000, +}; + +static const uint8_t ac_vlc_descA_bits[110] = { + 8, 11, 12, 7, 7, 7, 6, 6, + 4, 3, 10, 8, 10, 8, 8, 6, + 4, 9, 12, 10, 11, 7, 5, 11, + 11, 11, 12, 8, 6, 9, 11, 11, + 12, 9, 7, 11, 12, 12, 9, 8, + 12, 10, 9, 8, 11, 9, 9, 12, + 11, 9, 12, 9, 12, 11, 11, 12, + 12, 12, 11, 10, 11, 10, 11, 10, + 10, 11, 11, 9, 11, 11, 9, 10, + 11, 9, 12, 10, 8, 11, 11, 9, + 7, 11, 12, 11, 12, 8, 6, 10, + 9, 12, 10, 10, 7, 5, 10, 8, + 10, 8, 8, 6, 4, 11, 12, 8, + 6, 7, 6, 6, 4, 2, +}; + +static const uint16_t ac_vlc_descB_syms[101] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, + 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, + 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91, + 0xF90, 0xF83, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60, + 0xF51, 0xF50, 0xF41, 0x0F1, 0x0D1, 0x0C1, 0x0B1, 0x0B0, + 0x0A1, 0x0A0, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073, + 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051, + 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, + 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, + 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015, + 0x014, 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_descB_codes[101] = { + 0x00EE, 0x03A5, 0x0B73, 0x004E, 0x0035, 0x0015, 0x0023, 0x0013, + 0x000D, 0x0007, 0x0673, 0x01F3, 0x02FE, 0x0096, 0x0133, 0x001E, + 0x0001, 0x0116, 0x00F5, 0x03F5, 0x0473, 0x0052, 0x001A, 0x01D5, + 0x0025, 0x0073, 0x0633, 0x0086, 0x0036, 0x012E, 0x0155, 0x0006, + 0x0055, 0x000E, 0x0106, 0x023E, 0x0192, 0x0075, 0x0173, 0x01AE, + 0x00D5, 0x08F5, 0x002E, 0x01FE, 0x0406, 0x00AE, 0x0E3E, 0x0206, + 0x013E, 0x0373, 0x0D55, 0x063E, 0x0E33, 0x033E, 0x01F5, 0x0273, + 0x003E, 0x06A5, 0x0092, 0x03D5, 0x04F5, 0x053E, 0x0016, 0x00FE, + 0x07A5, 0x0125, 0x0506, 0x0292, 0x00BE, 0x0425, 0x0F73, 0x02F5, + 0x0056, 0x0233, 0x02A5, 0x0C25, 0x007E, 0x0026, 0x0355, 0x0033, + 0x0555, 0x01A5, 0x0306, 0x0046, 0x000A, 0x0225, 0x006E, 0x00A5, + 0x0012, 0x00F3, 0x0005, 0x0009, 0x073E, 0x0773, 0x00B3, 0x0032, + 0x0065, 0x0003, 0x0002, 0x000B, 0x0000, +}; + +static const uint8_t ac_vlc_descB_bits[101] = { + 8, 11, 12, 7, 7, 7, 6, 6, + 4, 3, 11, 9, 10, 8, 9, 6, + 4, 9, 12, 10, 11, 7, 5, 10, + 11, 11, 12, 8, 6, 9, 11, 11, + 9, 7, 11, 11, 9, 8, 10, 9, + 9, 12, 9, 9, 11, 9, 12, 10, + 11, 12, 12, 12, 12, 11, 10, 11, + 10, 11, 10, 10, 11, 11, 9, 10, + 11, 9, 11, 10, 8, 12, 12, 10, + 7, 11, 11, 12, 8, 6, 10, 10, + 12, 10, 10, 7, 5, 10, 8, 10, + 8, 9, 6, 4, 11, 12, 8, 6, + 7, 6, 5, 4, 2, +}; + +static const uint16_t ac_vlc_descC_syms[96] = { + 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, + 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, + 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, + 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, + 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91, + 0xF90, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60, 0xF51, + 0x0E1, 0x0C1, 0x0B1, 0x0A1, 0x0A0, 0x091, 0x090, 0x083, + 0x081, 0x080, 0x073, 0x071, 0x070, 0x063, 0x061, 0x060, + 0x055, 0x053, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041, + 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031, 0x030, + 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, + 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, 0x010, +}; + +static const uint16_t ac_vlc_descC_codes[96] = { + 0x00DE, 0x072E, 0x0576, 0x006E, 0x0075, 0x0055, 0x0013, 0x0033, + 0x000D, 0x0007, 0x07D2, 0x0052, 0x0065, 0x00CE, 0x0183, 0x003E, + 0x0001, 0x002E, 0x0F35, 0x0003, 0x0243, 0x001A, 0x0006, 0x01A5, + 0x0043, 0x0012, 0x0E43, 0x00B6, 0x0016, 0x0135, 0x0176, 0x0643, + 0x0035, 0x001E, 0x0735, 0x0283, 0x0125, 0x00AE, 0x00D2, 0x0165, + 0x0103, 0x0603, 0x00E5, 0x0C43, 0x02B5, 0x04A5, 0x00A5, 0x0443, + 0x0265, 0x0476, 0x0212, 0x0112, 0x0376, 0x012E, 0x02D2, 0x0083, + 0x0483, 0x015E, 0x06A5, 0x0335, 0x005E, 0x0025, 0x01D2, 0x00F6, + 0x03D2, 0x032E, 0x03B5, 0x005A, 0x0203, 0x02A5, 0x0BD2, 0x004E, + 0x0032, 0x01B5, 0x00B5, 0x0A65, 0x0225, 0x0276, 0x000E, 0x000A, + 0x03E5, 0x0143, 0x01E5, 0x0036, 0x0092, 0x0005, 0x0009, 0x0665, + 0x0076, 0x00C3, 0x003A, 0x0015, 0x0023, 0x0002, 0x000B, 0x0000, +}; + +static const uint8_t ac_vlc_descC_bits[96] = { + 8, 11, 11, 7, 7, 7, 6, 6, + 4, 3, 11, 8, 10, 8, 9, 6, + 4, 9, 12, 10, 11, 7, 5, 9, + 11, 10, 12, 8, 6, 10, 11, 12, + 9, 7, 12, 10, 9, 8, 10, 9, + 9, 11, 9, 12, 10, 11, 11, 12, + 12, 11, 10, 9, 10, 10, 10, 11, + 11, 9, 11, 11, 9, 10, 10, 8, + 12, 11, 10, 7, 11, 11, 12, 8, + 6, 10, 10, 12, 10, 10, 7, 5, + 10, 9, 10, 8, 8, 6, 4, 11, + 11, 8, 6, 7, 6, 5, 4, 2, +}; + +static const int tscc2_ac_vlc_sizes[NUM_VLC_SETS] = { + 172, 169, 165, 162, 131, 132, 130, 125, 121, 114, 110, 101, 96 +}; + +static const uint16_t * const tscc2_ac_vlc_syms[NUM_VLC_SETS] = { + ac_vlc_desc0_syms, ac_vlc_desc1_syms, ac_vlc_desc2_syms, ac_vlc_desc3_syms, + ac_vlc_desc4_syms, ac_vlc_desc5_syms, ac_vlc_desc6_syms, ac_vlc_desc7_syms, + ac_vlc_desc8_syms, ac_vlc_desc9_syms, ac_vlc_descA_syms, ac_vlc_descB_syms, + ac_vlc_descC_syms, +}; + +static const uint16_t * const tscc2_ac_vlc_codes[NUM_VLC_SETS] = { + ac_vlc_desc0_codes, ac_vlc_desc1_codes, ac_vlc_desc2_codes, + ac_vlc_desc3_codes, ac_vlc_desc4_codes, ac_vlc_desc5_codes, + ac_vlc_desc6_codes, ac_vlc_desc7_codes, ac_vlc_desc8_codes, + ac_vlc_desc9_codes, ac_vlc_descA_codes, ac_vlc_descB_codes, + ac_vlc_descC_codes, +}; + +static const uint8_t * const tscc2_ac_vlc_bits[NUM_VLC_SETS] = { + ac_vlc_desc0_bits, ac_vlc_desc1_bits, ac_vlc_desc2_bits, ac_vlc_desc3_bits, + ac_vlc_desc4_bits, ac_vlc_desc5_bits, ac_vlc_desc6_bits, ac_vlc_desc7_bits, + ac_vlc_desc8_bits, ac_vlc_desc9_bits, ac_vlc_descA_bits, ac_vlc_descB_bits, + ac_vlc_descC_bits, +}; + +#endif /* AVCODEC_TSCC2DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadata.h new file mode 100644 index 00000000..48c4cd03 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadata.h @@ -0,0 +1,50 @@ +/* + * TTA (The Lossless True Audio) data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TTADATA_H +#define AVCODEC_TTADATA_H + +#include "internal.h" + +#define MAX_ORDER 16 +typedef struct TTAFilter { + int32_t shift, round, error; + int32_t qm[MAX_ORDER]; + int32_t dx[MAX_ORDER]; + int32_t dl[MAX_ORDER]; +} TTAFilter; + +typedef struct TTARice { + uint32_t k0, k1, sum0, sum1; +} TTARice; + +typedef struct TTAChannel { + int32_t predictor; + TTAFilter filter; + TTARice rice; +} TTAChannel; + +extern const uint32_t ff_tta_shift_1[]; +extern const uint32_t * const ff_tta_shift_16; +extern const uint8_t ff_tta_filter_configs[]; + +void ff_tta_rice_init(TTARice *c, uint32_t k0, uint32_t k1); +void ff_tta_filter_init(TTAFilter *c, int32_t shift); +#endif /* AVCODEC_TTADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadsp.h new file mode 100644 index 00000000..737d9bdb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttadsp.h @@ -0,0 +1,33 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TTADSP_H +#define AVCODEC_TTADSP_H + +#include + +typedef struct TTADSPContext { + void (*filter_process)(int32_t *qm, int32_t *dx, int32_t *dl, + int32_t *error, int32_t *in, int32_t shift, + int32_t round); +} TTADSPContext; + +void ff_ttadsp_init(TTADSPContext *c); +void ff_ttadsp_init_x86(TTADSPContext *c); + +#endif /* AVCODEC_TTADSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttaencdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttaencdsp.h new file mode 100644 index 00000000..4b00728f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ttaencdsp.h @@ -0,0 +1,33 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TTAENCDSP_H +#define AVCODEC_TTAENCDSP_H + +#include + +typedef struct TTAEncDSPContext { + void (*filter_process)(int32_t *qm, int32_t *dx, int32_t *dl, + int32_t *error, int32_t *in, int32_t shift, + int32_t round); +} TTAEncDSPContext; + +void ff_ttaencdsp_init(TTAEncDSPContext *c); +void ff_ttaencdsp_init_x86(TTAEncDSPContext *c); + +#endif /* AVCODEC_TTAENCDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/twinvq.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/twinvq.h new file mode 100644 index 00000000..24e5ebcd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/twinvq.h @@ -0,0 +1,203 @@ +/* + * TwinVQ decoder + * Copyright (c) 2009 Vitor Sessak + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_TWINVQ_H +#define AVCODEC_TWINVQ_H + +#include +#include + +#include "libavutil/common.h" +#include "libavutil/float_dsp.h" +#include "avcodec.h" +#include "fft.h" +#include "internal.h" + +enum TwinVQCodec { + TWINVQ_CODEC_VQF, + TWINVQ_CODEC_METASOUND, +}; + +enum TwinVQFrameType { + TWINVQ_FT_SHORT = 0, ///< Short frame (divided in n sub-blocks) + TWINVQ_FT_MEDIUM, ///< Medium frame (divided in m +#include + +/* + * The bark_tab_* tables are constructed so that + * + * /i-1 \ + * |-- | + * bark |\ bark_tab[j] | == i + * |/ | + * |-- | + * \j=0 / + * + * + * for some slightly nonconventional bark-scale function + */ +static const uint16_t bark_tab_l08_512[] = { + 7, 8, 7, 8, 8, 8, 8, 8, 8, 9, + 9, 10, 10, 11, 11, 12, 12, 14, 15, 16, + 18, 19, 21, 24, 27, 30, 35, 40, 46, 53 +}; + +static const uint16_t bark_tab_l11_512[] = { + 6, 6, 6, 6, 6, 6, 7, 6, 7, 7, + 8, 8, 8, 9, 10, 10, 11, 13, 13, 15, + 17, 18, 21, 25, 27, 33, 38, 45, 54, 66 +}; + +static const uint16_t bark_tab_l16_1024[] = { + 9, 9, 8, 9, 10, 9, 10, 10, 10, 12, + 11, 13, 13, 14, 16, 17, 19, 20, 24, 26, + 30, 35, 40, 48, 56, 68, 83, 102, 128, 165 +}; + +static const uint16_t bark_tab_l22_1024[] = { + 6, 7, 6, 6, 7, 7, 7, 7, 7, 8, + 9, 8, 10, 10, 11, 12, 13, 15, 16, 18, + 21, 24, 27, 33, 38, 46, 55, 68, 84, 107, + 140, 191 +}; + +static const uint16_t bark_tab_l22_512[] = { + 3, 3, 3, 4, 3, 3, 4, 3, 4, 4, + 4, 5, 4, 5, 6, 6, 7, 7, 8, 9, + 10, 12, 14, 16, 20, 22, 28, 34, 42, 53, + 71, 95 +}; + +static const uint16_t bark_tab_l44_2048[] = { + 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, + 7, 7, 7, 8, 8, 9, 9, 10, 11, 11, + 13, 14, 16, 17, 19, 22, 25, 29, 33, 39, + 46, 54, 64, 79, 98, 123, 161, 220, 320, 512 +}; + +static const uint16_t bark_tab_m08_256[] = { + 6, 5, 6, 6, 6, 6, 7, 7, 8, 8, + 9, 10, 11, 13, 15, 18, 20, 25, 31, 39 +}; + +static const uint16_t bark_tab_m11_256[] = { + 4, 5, 4, 5, 5, 5, 6, 5, 7, 7, + 8, 9, 10, 12, 15, 17, 22, 28, 35, 47 +}; + +static const uint16_t bark_tab_m16_512[] = { + 7, 6, 7, 7, 7, 8, 9, 9, 10, 11, + 14, 15, 18, 22, 27, 34, 44, 59, 81, 117 +}; + +static const uint16_t bark_tab_m22_256[] = { + 3, 2, 3, 2, 3, 3, 4, 3, 4, 5, + 5, 7, 8, 9, 13, 16, 22, 30, 44, 70 +}; + +static const uint16_t bark_tab_m22_512[] = { + 5, 5, 5, 6, 5, 7, 6, 7, 9, 9, + 11, 13, 15, 20, 24, 33, 43, 61, 88, 140 +}; + +static const uint16_t bark_tab_m44_512[] = { + 3, 2, 3, 3, 3, 4, 3, 5, 4, 6, + 7, 8, 10, 14, 18, 25, 36, 55, 95, 208 +}; + +static const uint16_t bark_tab_s08_64[] = { + 3, 3, 3, 3, 4, 5, 6, 8, 12, 17 +}; + +static const uint16_t bark_tab_s11_64[] = { + 2, 3, 2, 3, 3, 4, 6, 8, 12, 21 +}; + +static const uint16_t bark_tab_s16_128[] = { + 3, 4, 4, 4, 5, 7, 10, 16, 26, 49 +}; + +static const uint16_t bark_tab_s22_128[] = { + 3, 2, 3, 4, 4, 6, 9, 14, 26, 57 +}; + +static const uint16_t bark_tab_s44_128[] = { + 1, 2, 1, 2, 3, 4, 6, 10, 23, 76 +}; + +/** + * TwinVQ codebooks. They are coded in a struct so we can use code such as + * + * float val = tab.fcb0808l[get_bits(gb, 12)]; + * + * without risking a segfault on malformed files. + */ +static const struct twinvq_data { + float lsp08[504]; + int16_t fcb08l[640]; + int16_t fcb08m[320]; + int16_t fcb08s[320]; + int16_t shape08[1280]; + + int16_t cb0808l0[1088]; + int16_t cb0808l1[1088]; + int16_t cb0808s0[1152]; + int16_t cb0808s1[1152]; + int16_t cb0808m0[1024]; + int16_t cb0808m1[1024]; + + int16_t cb1108l0[1728]; + int16_t cb1108l1[1728]; + int16_t cb1108m0[1536]; + int16_t cb1108m1[1536]; + int16_t cb1108s0[1856]; + int16_t cb1108s1[1856]; + + int16_t fcb11l[640]; + int16_t fcb11m[320]; + int16_t fcb11s[320]; + int16_t shape11[1280]; + float lsp11[1312]; + + int16_t cb1110l0[1280]; + int16_t cb1110l1[1280]; + int16_t cb1110m0[1152]; + int16_t cb1110m1[1152]; + int16_t cb1110s0[1344]; + int16_t cb1110s1[1344]; + + int16_t fcb16l[640]; + int16_t fcb16m[320]; + int16_t fcb16s[320]; + int16_t shape16[1920]; + float lsp16[1400]; + + int16_t cb1616l0[1024]; + int16_t cb1616l1[1024]; + int16_t cb1616m0[960]; + int16_t cb1616m1[960]; + int16_t cb1616s0[1024]; + int16_t cb1616s1[1024]; + + int16_t cb2220l0[1152]; + int16_t cb2220l1[1152]; + int16_t cb2220m0[1088]; + int16_t cb2220m1[1088]; + int16_t cb2220s0[1152]; + int16_t cb2220s1[1152]; + + int16_t fcb22l_1[512]; + int16_t fcb22m_1[640]; + int16_t fcb22s_1[640]; + int16_t shape22_1[1152]; + float lsp22_1[1312]; + + int16_t cb2224l0[960]; + int16_t cb2224l1[960]; + int16_t cb2224m0[896]; + int16_t cb2224m1[896]; + int16_t cb2224s0[960]; + int16_t cb2224s1[960]; + + int16_t fcb22l_2[512]; + int16_t fcb22m_2[640]; + int16_t fcb22s_2[640]; + int16_t shape22_2[1152]; + float lsp22_2[1312]; + + int16_t cb2232l0[768]; + int16_t cb2232l1[768]; + int16_t cb2232m0[704]; + int16_t cb2232m1[704]; + int16_t cb2232s0[704]; + int16_t cb2232s1[704]; + + int16_t cb4440l0[1088]; + int16_t cb4440l1[1088]; + int16_t cb4440m0[1088]; + int16_t cb4440m1[1088]; + int16_t cb4440s0[1152]; + int16_t cb4440s1[1152]; + + int16_t fcb44l[640]; + int16_t fcb44m[640]; + int16_t fcb44s[640]; + int16_t shape44[1152]; + float lsp44[1640]; + + int16_t cb4448l0[896]; + int16_t cb4448l1[896]; + int16_t cb4448m0[896]; + int16_t cb4448m1[896]; + int16_t cb4448s0[960]; + int16_t cb4448s1[960]; +} tab = { +.cb0808l0 = { + 96, -12592, -12443, 425, 182, -456, -341, -843, + 615, 689, 982, 1470, -518, 231, -538, 282, + 409, -600, -303, -29, 51, -4, -115, 79, + -27, 450, -937, -461, -554, -159, 426, 710, +-29106, -2148, 99, 3426, 1838, 12427, 585, -2080, + -2524, -474, 1572, 718, 578, -344, 188, 328, + 12125, 112, 654, -1232, -1644, 288, 553, 1513, + 966, 1012, 49, 631, -111, -238, -116, -182, + -21, -46, 334, 11013, -454, -261, 12, 21, + 52, -20440, -295, -502, -516, -329, -230, 465, + 59, 270, 971, -127, 505, -194, 43, -30, + 300, 38, 665, -613, 33, -172, -153, 323, + -166, 54, 399, 109, 186, -1765, -222, 138, + 16, 204, 30111, 208, -564, -612, 156, -146, + -345, 321, -138, 202, -184, 93, 710, -15945, +-13401, 234, -1113, 146, -9, 56, -628, -834, + -1268, 872, 61, -1184, -126, -205, 145, -109, + -8248, 113, -146, 1288, 9142, 857, -782, -686, + -256, -650, 1061, -202, 12, -709, -88, 273, + 497, 150, -59, -8807, 240, 532, 16, 1482, + 11012, -444, 1918, -1786, 1934, 172, 598, -1324, + 5638, -3166, 492, -545, -770, 1067, 0, -356, + -421, 1684, 273, -502, 316, 1116, 807, -529, + -831, -13379, -420, 236, 470, -2590, -193, -47, + 580, -1613, 798, 27, -16, -12768, -893, 256, + 0, 1659, 1463, 544, 196, -30444, 314, -421, + 508, -276, -173, 414, -380, -371, -40, -121, + 375, 432, -438, 1, -350, -280, 1198, -373, + 452, 100, -68, 9053, 165, 770, 73, 291, + 717, 515, 596, -323, -4, -2, 803, 738, + 2605, 30, 73, 455, 11280, 1534, -283, 1502, + -9126, -4760, -570, 483, -179, -8628, -1639, 322, + -56, 6149, -3330, 114, 4598, -1976, -34, -56, + 840, 753, 12292, -7100, -492, 320, -412, 908, + 1186, 444, 6546, -788, 5394, 697, 13105, 194, + -394, 294, 2639, 12, -1009, -1426, -36, 2106, + -252, -31979, -66, 341, 996, 298, 105, 6, + 10, 106, -498, -244, -105, -574, 16, -206, + 24, -2067, -381, 10265, -103, -762, -785, -2036, +-11927, 16, -710, -35, -270, -99, 4, 772, + -272, -186, -328, -14936, -57, -1357, -175, -606, + 220, 918, -11, 398, -189, -278, 138, 429, + 509, -701, -43, -42, -630, -560, 11736, -528, + 10286, -633, -870, 423, 550, -888, 297, -170, + 258, 2234, 486, 292, -446, -11858, 10008, 52, + 1203, -164, 810, -1527, -604, -883, -588, -96, + 332, 148, -180, 223, 356, 285, 434, -57, + -172, -520, -432, -72, 294, -93, -134, 316, + 30647, -351, 278, 84, -439, 589, 105, 1001, + 297, 660, 196, 171, 178, -90, -55, 1172, + 21100, 227, -288, 372, 162, 458, -555, -1329, + 380, 366, -104, 105, 674, -378, 1328, 283, + -1928, 549, 762, 454, 55, 606, 12499, 24, + 435, 23, 29, 6170, 1129, -95, 97, 569, + 132, 491, 164, -288, -1011, -134, 1234, -427, + -254, -524, 226, -14114, 328, -70, 1666, -189, + -2352, 1097, 619, 632, -981, 745, 587, -27, + -200, -871, 50, 470, -246, 2610, 581, 254, + 9893, -586, 880, -11894, 386, 1135, 117, 1072, + 116, -830, -160, -1002, -699, -66, -230, -260, + 112, 106, 221, 297, -47, 7642, 170, -330, + -599, -51, -476, 33, 475, 624, 6199, -350, + -406, 184, 906, -528, 382, 401, 348, 26, + -186, 33, -130, -62, -50, 1268, -132, -109, + 1164, -354, 675, 3, -402, -244, 644, 648, + -132, -4, 45, 20386, -136, 568, 126, 376, + 14476, -376, 267, 13518, -260, 111, 1014, 758, + 439, 551, -164, 207, 128, -416, 616, 690, + -9460, -1856, 1123, 826, -265, -762, 1596, -632, + 52, -622, -894, 367, -433, -100, 1873, 756, +-17436, 168, -541, 550, 145, -5612, -1057, -1344, + -656, -194, 216, -500, -245, 246, 64, 688, + 727, 12538, -5492, 252, -908, -424, -532, -659, + -277, -230, -736, -183, 35, -228, 200, -12, + -248, -60, -493, 433, 446, 366, -644, 92, + -324, 29, 833, -21542, -977, 94, 379, 49, + -1058, 248, -178, 85, -961, -1198, -48, 467, + -242, -10202, 1556, 11263, -716, 814, -1686, 3594, + -27, 694, -802, 390, 4144, -663, 44, -546, + 312, -28, -484, 981, -307, 496, 408, 203, + 12543, 296, -1240, 159, 846, -957, -1493, -618, + 1593, 11868, 2616, 1954, 412, -922, -1320, 3325, + -254, -1892, 607, -2223, -8745, -1486, 17, 343, + -50, -562, 22011, -350, -491, -70, -60, 617, + 768, -346, 387, 660, 1409, 222, 616, 173, + -1323, 4017, -207, -525, -13243, 11, 440, -614, + -280, 549, -670, -79, 459, 560, -102, -214, + -54, -1201, 230, -526, 857, 1044, -369, 2470, +-11010, -12586, 243, -205, 838, -920, 348, -738, + 1319, 86, -78, -428, -1909, -155, 2, 508, + 711, -292, 1699, 225, -101, -163, 540, 9692, + 235, -183, -38, 198, -466, -204, -8957, -914, + -299, 193, 10, 723, 643, -533, -1418, 323, + 20, 334, -886, -331, 368, 130, -30233, -152, + -14, 637, 132, -232, -149, -430, 64, -243, + -376, 370, 388, 196, -1098, 117, -794, -16, + -274, 348, 464, -28156, 184, 322, -101, 2, + -27, -183, 610, 256, -160, -573, -226, 588, + 1613, 1028, 9518, -2151, -1602, -528, -356, -116, +-11511, 1828, -2206, -47, -757, -1479, -1429, -14717, + 1686, 253, 802, 462, -37, -916, -289, -401, + 13383, 353, -74, 114, -189, 636, 434, -639, + 1013, 234, 11752, 219, 1464, -132, -12838, 125, + -592, -40, -162, -1772, 506, 479, 422, 36, + 15, -960, 799, 517, 1311, -409, 748, 729, + 446, 11029, -13039, 1257, -651, -13, -742, 1416, + -388, -274, -795, 163, -572, 74, 430, -90, + -126, -74, -598, 140, 125, -20, -20332, 208, + 37, 19, -174, -209, 305, 28, -402, 28, + -315, -1, -134, 440, -832, 79, -635, -304, + 8, -32768, 625, 470, -1224, -351, 546, -1171, + -706, 652, 31, 7484, -448, 916, 1244, -379, + -300, 68, 868, 607, 247, 70, -984, 14314, + 21, -350, -82, 368, 456, -742, 472, 34, + 782, -498, -879, 700, 417, 216, 415, -161, + -181, -608, 1570, 862, -96, -114, 8095, -26, + 168, -363, -804, -36, -770, 139, -171, 6645, + -1425, 4826, -5288, 1358, -11747, -64, 650, -3206, + -1692, 789, -2047, -279, 916, -1648, 1164, 2044, + -144, -717, -392, -216, 372, 348, 1052, -175, + 668, 308, -15, 29112, -406, -774, 365, -1006, + -526, 1076, 59, -672, -87, -106, 174, 96, + 615, 462, -43, -496, 112, 149, -56, -182, + -268, -32768, -205, -676, 165, -1210, -325, 7964, + -44, 546, -699, 285, -418, 355, 238, 550, + 67, 425, 384, -950, -330, -208, -452, 212, + 11610, -190, 37, -907, -11137, -982, 585, -783, + -864, 164, -24, -514, -211, 2, -510, -580, + 595, 128, 100, -229, -55, 290, -539, 40, + -7786, -270, 295, -508, 562, -1196, 218, 33, + 3788, -8954, -1082, 297, -906, -322, 123, 1162, + -343, -11655, 88, -28, 1173, 9, -99, 36, +-11987, 356, 12630, 767, -183, -983, -559, 186, + 1148, 530, -440, 1230, -456, -133, -424, 35, + -357, 418, 1457, -687, 740, -242, 17855, -368, + -1057, -262, -646, 406, -712, -1058, -84, 454 +}, + +.cb0808l1 = { + 982, -26, -721, 359, 509, 13290, 2391, 727, + 325, 328, 269, -156, 346, -242, -31, -356, + 741, 396, -98, 108, 35, -237, -29684, 196, + -69, 462, -339, 24, -1221, 352, -658, 396, + 243, -1658, -458, -1153, 5, -662, -47, 18, + -572, -567, -2084, -980, -210, 150, -396, 14836, + -210, 0, -162, -539, 588, -868, 248, -8576, + 1020, 526, 1056, 262, -149, 818, -1353, -1120, + 767, -738, -634, -14742, -105, 811, 1718, -116, + -64, 307, 920, -1244, 2388, 10213, -4505, -250, + 617, -1725, -645, 1258, 1146, -590, 707, -12, + 372, 1794, 1012, -149, 404, -978, -306, 168, + -1536, 89, 142, 938, -19891, 973, -481, -419, + -904, -455, -1821, -1617, 654, -2022, 1906, -497, +-11346, -330, -11679, -14, 1, 535, -377, 1057, + -214, -213, 430, -13, -3379, -11250, 911, -716, + -240, -10, 260, 132, -611, -64, -594, -8540, + 837, -3717, -1154, 906, 10623, -502, -167, 67, + 119, 13501, -1469, 213, -1048, -1403, 432, -1079, + 45, -230, -730, -203, -595, -1150, -460, -97, + 395, -304, 27816, -300, -16, 153, -671, 551, + 436, -956, -182, 194, 113, -5504, 194, 263, + -332, -517, -244, -396, 540, 56, -371, 446, + 147, -66, 7, -306, 1440, -308, 327, 645, + 597, -6642, 72, 392, -138, -50, -144, -262, + 504, -230, 114, 2076, 8175, 1188, 290, -872, + 202, 69, 82, -281, -126, -291, -158, -152, + -45, 239, 153, -516, -422, -691, 801, 28, + 496, -298, -11118, 10430, -227, -851, 214, -801, + 538, 834, -137, 942, 573, 405, 1308, 2234, + 300, 1269, 12361, -752, 2177, -743, 60, 464, + 946, 302, -422, 116, -1200, -110, -843, 284, + -578, 732, -308, 153, -64, 156, 225, -29232, + -452, -466, -130, 888, 240, 305, -83, 236, + 208, 417, 1530, 294, 594, 351, 508, 137, + -7274, -184, 201, 44, -635, -891, -652, -596, + 380, -652, -8670, -76, -3746, -732, 262, -1860, + -1030, 1366, -279, 444, 911, 209, 330, 251, + -208, -747, 65, -10154, -204, 12960, -325, 347, + -465, -730, -727, 385, -89, -763, -427, 868, + -39, -859, 34, -29, -388, -1324, -218, 2051, + -1593, 5511, 10507, -8516, 2254, 5847, -1474, 1994, + 4704, -1876, 880, -3810, -489, -946, -1225, -1104, + 125, 139, -668, 2232, -537, 179, -215, 63, + 144, 72, 1198, 9750, 248, -709, 308, 10552, + -434, -462, 13569, 1096, -491, -262, 804, -1599, + 679, 569, 604, 1326, 213, -2026, 324, -2612, + -373, -12818, -20, 38, -171, 316, 15516, 306, + 763, 97, 91, -832, 23, -437, -390, 505, + -1226, 2518, 106, -2065, 315, 86, 523, 172, + -1012, -13851, 3358, 2610, -381, -194, 1200, -4106, + -1298, -3637, -1534, 780, 1367, -544, -770, 1690, + 1047, -54, 2136, 12502, 32, 6689, 706, -1172, + 846, -4853, 2146, 2548, -39, -465, -596, 177, + 213, 421, 28, -388, 11, 69, 31, -83, + -28, -166, -150, -19836, -323, 3, 659, 783, + 390, 139, -138, 31, -111, 453, -80, 432, + -519, -259, 686, 11431, 163, -13179, 554, 40, + -379, -120, -692, 340, 169, 120, -476, 643, + 778, 501, -128, 543, 1275, -134, 20568, 201, + 401, 512, -362, -210, -269, -812, 112, 75, + 149, -547, -494, -418, -100, -13621, -1002, 1176, + 1634, -395, -4289, -1531, -47, 850, -1102, 13558, + -403, 683, -164, -2215, -1180, -1750, 344, 630, + -968, 669, 540, 26, -594, 192, -17, -336, + 19645, 1133, 18, -56, 418, -426, -1535, 409, + 732, 186, 268, -20422, -22, 62, -621, 722, + 440, 96, -307, -128, 480, 5, 87, 668, + -361, -599, -22, 652, -176, -114, 214, -12233, + -698, 232, 608, -126, -714, -488, -228, 929, + -1582, -19845, 245, -460, 124, 57, 328, -436, + -158, 236, -196, -534, 209, 69, 229, 210, + -251, 1100, 583, 415, 210, 189, -219, 1242, + 19482, -105, 190, -374, -43, -232, 253, 561, + -297, -376, -1077, -308, 13486, -12462, 64, -190, + -298, -643, 460, 232, -987, -478, 1596, 168, + -722, 616, -873, -98, -948, 231, -1102, 11915, + 746, -495, 1248, 1203, 11067, -32, 160, -94, + -24, -153, -209, -1453, -1059, -313, -922, 1143, + -538, -1348, -323, 679, -54, -232, -470, 2075, +-19135, 628, -774, 35, 247, -86, 721, 512, + 1305, 850, 9760, 248, -2404, -220, 6, -73, + -1370, 567, 1432, -2529, -1508, 14358, -992, -1111, + -940, -111, 968, -530, 576, 102, -1045, 453, + 180, -94, -7936, -310, 512, 996, -32, -1062, + -150, -26, -6687, -181, -336, -1510, 616, 70, + -332, -175, 624, -546, 171, 364, 1011, 68, + -284, -368, 711, 46, 73, -34, -419, 404, + 28270, 283, -324, 335, -131, 316, 212, -27, + -342, -1062, 470, 1269, 454, 286, -1928, -1674, + -739, -389, 1073, -6172, -317, -586, -194, -182, +-13034, -848, 4596, -659, 709, -630, -310, 400, + 344, -276, 430, 876, -2047, -1012, -1672, -180, + 64, 22005, -736, 829, 266, 182, 436, -112, + -36, 131, 252, -63, 154, 368, 107, 93, + -42, -32768, 0, 200, -230, 271, -1776, 4329, + 986, -553, 481, 1888, -2770, 848, -6305, 264, + 12244, 1610, -640, 1348, -2742, -2078, 907, -1115, + 370, -16539, -1571, -176, 24, -515, 234, 954, + 605, 613, -154, 463, 535, -160, 684, 470, + 827, 10458, 150, -669, -6684, 339, -542, -730, + -351, 984, 212, 116, -7, 62, 926, 2175, + -185, -552, 489, -209, 5247, 38, 366, 53, + 16, 263, -142, -535, -224, 338, -174, -125, + 113, -12750, 400, -410, 281, -12, 744, -173, + 486, -12159, -107, -183, -484, 2, 150, 1, + -239, 7, -399, -608, -873, 698, -1623, 701, + -773, 272, -832, -94, -921, 885, 13588, 178, + 192, 148, 1346, 44, 59, -275, -14, -328, + 212, 133, -223, 300, -394, -275, -43, -76, + -47, 322, -208, 21713, 484, 329, 1860, 40, + -916, 502, 130, 477, 1754, 503, 7984, -338, + -323, -230, 354, 928, 430, -89, -94, 108, + -543, 365, -130, 70, 902, -131, 58, 469, + 580, -30949, 36, 232, -410, -451, 104, -8698, + 113, -1682, -42, -279, -92, -280, -477, -386, + -531, 832, 80, -15002, -56, 93, 164, -721, + 8388, -412, -2396, 584, 1004, -310, -2229, -304, + -383, 275, 1062, 1266, 297, -70, -909, 891, + 131, -1046, 539, 32502, 1000, -21, -229, 138, + 1528, -175, 546, 326, 168, -320, 716, -291, + -298, -227, 1094, -59, -12561, 12943, 786, 600, + -206, 889, -761, 54, 332, -1253, -597, 357, + -1124, -50, -168, 1172, 2266, 75, -174, 583, + 408, -157, 14666, 378, 302, -5, 48, 109, + 28, -21, 1044, 529, -859, -1182, -202, 1984, + 308, 402, 66, -1139, 2595, -380, 1119, 309, + 482, -10705, 100, -4591, 11646, -1364, -365, 9521, + -318, -23, 1076, -135, -2742, -833, 78, 910, + 96, -20, -599, 46, 855, -1265, 4748, 2394, + -250, -9096, -962, 191, -346, 348, 342, 1909, + 15330, 266, 540, 271, 2986, 1356, 1542, -1019, + -895, 737, 281, 684, -538, 10414, -922, 287, + 679, 204, -11142, -2321, -346, -1572, -250, -315, + -604, 1336, 311, 1317, -1111, 409, -104, -221, +-14125, -1511, -990, 705, -808, 587, 676, 348 +}, + +.cb0808s0 = { + -7488, -1327, -5244, -2049, -3736, -45, 446, 1558, + -755, -6052, 6034, -4326, 740, -348, 12369, 2115, + -662, -685, -6592, 10176, 8575, -1035, -2752, -4453, + -283, 1547, 4776, -2932, 700, 3425, -3905, 1073, + 2356, -7094, -1705, -435, 4840, -1944, 1188, 780, + -3963, -6170, -1726, 4759, -4356, -2124, -1686, 321, + -901, 1414, -923, -2678, -1198, -14777, -2038, -3528, + 123, 11216, 1904, -1914, 7588, 2744, -4265, -4886, + -3530, -1495, -1709, -5857, 3829, 2196, -4842, -817, + -874, -5649, -2181, -3871, 3774, -1368, 322, -1126, + -996, -3873, 13698, -9369, -848, 3797, -667, -1083, + 2429, -3351, -1672, -3562, -1590, -3507, 552, 6610, + -4137, -10061, -5452, -6142, -1454, 1726, -1298, -4479, + 6126, 1626, -2791, 1584, 1300, 5726, 2584, 11109, + 696, -3344, -2418, 9029, 4346, -3554, 1393, 144, + 2051, 8916, 6174, 5170, 376, 9778, -2298, -4119, + 3733, -35, -2673, 2222, 1383, 2046, 2859, -16131, + 1637, -1195, -662, 2800, -2241, 3801, -5062, -978, + 5670, -5449, -79, 3479, 606, 3766, -1325, -265, + 907, -745, 1005, -14528, -4227, -3955, -7194, 3690, + 2166, -2520, 11555, -511, 5900, -388, -3854, -3440, + 2136, -868, -2986, 722, 1286, -4027, 10382, -1646, + 5193, 2539, 1239, 7819, -67, 3382, -3297, -46, + -3808, 830, 1313, -2188, -4346, 5922, -1057, -6294, + 14317, 2001, 968, 4150, -4121, 1412, -302, -8401, + -1388, 10649, -9513, 1042, 840, -4606, 2098, 1166, + 1472, -802, -2810, 420, -561, -325, 2652, -2866, + 1334, 4878, 958, 83, 456, 1203, -7594, 14590, + -1210, 2202, -1954, -1938, -3413, -1096, 6036, -1675, + -1320, -4485, -10665, 10026, -2484, -3273, 4753, -275, + -3542, 924, 1262, 7348, -2959, -749, -408, 4594, + 4876, -491, 3409, 4616, 110, 557, -1378, -1616, + -4532, 1699, 1412, 579, -494, 716, 197, -23346, + -2284, 156, 1096, -151, -1827, 688, -322, 2371, + -7909, -1324, -1683, 7861, 7074, -451, 258, 9088, + 1900, 8660, 840, 3491, -3275, 3029, -475, -2122, + -5725, -8668, -6069, -3458, 4240, -3007, -5463, 9395, + -2686, 4718, -717, 42, -1802, 3122, -3197, -5212, + -1572, -243, -451, 8213, -2199, -3372, 4110, -8176, +-10525, -5551, 4312, 682, 2069, 1985, -3713, -6780, + 1193, 2831, -2228, 486, -3667, -789, -1691, 4567, + 464, -2114, -2340, -1881, 1921, 1602, 18418, 1535, + -567, 228, -9359, -6027, -267, 3628, 32767, 1423, + -74, -2817, 2112, -128, -1516, -2446, 1673, 2812, + -1582, 2125, 618, 2569, 2714, -1710, 340, 3255, + 848, 3379, -2317, -2361, -1823, 412, -2496, -18164, + -1224, 2552, -3040, 144, -597, 7716, 4916, -2867, + -2172, 2120, -2776, 675, -11985, 1692, -1384, -3588, + 4310, 1020, -4215, -251, -7090, -1916, 1914, -2804, + 6189, -6732, -1370, -3704, 450, -2652, 6553, -38, + 10348, 1244, -2246, -3729, -2158, -1340, 2357, 3118, + 9378, -1727, 3150, -3867, 1277, -15, 769, -2352, + -411, 1428, -14032, -1029, 2828, -1894, 6084, -36, + 518, 13159, 1095, -1185, -3207, -555, -3256, -76, + 3884, 3394, 1010, 1946, 160, -4863, 4714, -7087, + -3985, 5602, 3350, 7822, -5729, -7701, 9296, 3067, + 3582, 5256, 13629, -4012, -2206, -3867, -664, -104, + 4397, -7862, 36, 955, -38, -973, 3458, 5004, + 364, -9116, -2764, -2168, -1892, -7632, -4834, -5788, + -3565, -1245, -4544, 6552, 4601, 2342, 6625, 1040, + 2154, -6985, 5838, -1912, -3439, 1189, -2422, -555, + 3286, -14872, -776, 1228, 2434, 120, 13673, 904, + -1354, 645, -1550, -1377, -1888, 1416, -679, -1685, + 1731, 2404, -5786, 3285, -193, -123, 1973, 3663, + -1388, -14961, -3597, 5555, -1420, 284, 1527, -2575, + 1941, 871, 3900, -2168, -12763, 2970, -408, -3131, + -6426, 1892, 782, 6768, -284, 1034, 9785, 6029, + -3873, -4102, -4349, 2548, -3686, -5622, 4769, -351, + 8178, -7253, 3687, 624, -4386, 4028, -2780, -1938, + -4061, -1872, -1264, 7300, 760, 8530, -821, -874, +-14225, -1143, -5400, -850, -2537, 478, 1668, -1244, + -362, 877, 3481, -1338, -5218, 2091, 3996, -577, + 390, 8626, 820, 181, -988, 5604, 9694, 1112, + -3064, -266, 1234, -486, 1264, -2173, -13671, 3729, + -3212, 2548, 1745, -9363, 8065, 3713, -3343, -4847, + 2808, -4716, -2175, 25, -5718, 4056, 1855, 4663, + 2324, -1166, 543, 2, 3931, -3196, 2771, -920, + -2907, -746, -1241, -306, 2793, -22, -2642, 3048, + 3256, 1804, -1310, 17876, -1816, 56, -1694, -465, + -534, -2274, 6139, -2247, -2515, -1077, 3305, 1519, + 273, 1128, -1637, 2561, -1534, 874, -22808, -1119, + -2551, -10344, -2229, -3510, 194, 2594, 1737, 4713, + 13767, 3532, -311, 8097, -1012, -841, -4360, 793, + -267, -206, 12905, -2683, -6424, 196, 7098, -1690, + -690, 1236, -2882, -2668, -2020, 8291, -2714, -4607, + -923, -2077, -2878, 1687, -10457, -1575, 2172, -3974, + 5795, 1748, -1852, -5143, 4763, -5097, -2840, -1851, + 2634, 5970, 180, -3326, -1655, 1226, 375, 5137, + -2678, -5246, 4327, -3670, 9956, -1976, 2189, 2952, + -6785, -697, 1129, -5768, -5819, 6532, 3650, -1711, + 3857, 47, -9618, -1941, 2524, -1244, 7242, 11646, + -64, 2304, 201, -3707, -700, 149, 2692, -805, + 3978, 2738, -977, -1004, -5776, 12779, 7454, -353, + -4731, -3866, 7076, 146, -3302, 3065, 1955, -343, + -1459, -426, -5906, -1318, 500, -1014, -1002, -2090, + -2924, -20521, 2610, 1581, 397, -3380, -2885, 510, + -1147, 3398, 1914, 99, -119, 144, -3128, 2445, + 1791, 397, 3734, -80, -3410, -3798, -1142, -1515, + -2615, -1540, 5193, 2187, 940, 4969, -2334, -16589, + 325, -2186, -4567, 5121, -894, -6848, -6002, 1832, + -568, 8259, 833, 3420, -4459, -748, 3442, 4358, + -3041, -10203, 9303, -1511, -4821, 1950, -966, 3573, + 453, 705, 16238, -901, -163, -2866, -104, -1767, + -1779, -1249, 3251, 1975, 1254, -838, -390, -3150, + 1020, 2526, -2025, 662, -2817, -1338, -855, -3442, +-21123, 241, -134, -952, -588, 2572, 2080, 8153, + 114, 9732, -6774, -5266, -2462, 2286, -599, -426, + 1396, -7051, -1228, 312, -4495, -2525, 4649, -1305, + -1106, -2366, 2232, 4065, -18674, -1295, -3259, -1004, + -5136, 206, 1177, -5130, 2394, 2518, -1381, 2564, + -138, 4341, 16988, 2546, 6782, -3433, 850, -970, + -255, 1308, 2228, 1704, -1283, 1452, -2608, 1487, + 3106, -2267, -2998, -6814, 1654, 21195, 1555, 968, + 154, 124, -1258, 714, -407, 44, 247, 992, + 2228, 2824, 1435, -341, 1212, -1612, 6126, 1636, + -8368, 578, -5418, 217, -191, 204, -7147, 5110, + 3766, 5055, -5979, 6683, 368, -3597, -4595, 7630, + -3611, -2384, 1369, 6995, -3299, -53, 2036, -4654, + 4259, 9618, -1012, -2964, 4397, -2112, 11885, -1648, + -942, -3474, -544, -1410, -1958, -1535, 2981, -1591, +-16787, 335, 4609, -1990, 3821, -645, 1842, -64, + -3485, 3202, -374, -58, -1410, 7304, -1958, -2142, +-11412, -2533, 513, -6149, -6679, 2152, 3153, 5102, + 2216, -1361, 2260, 4863, -7031, 1538, -5250, -2511, + 96, 3339, -3447, -3708, 7168, -4168, 838, -3134, + 3228, -1531, -5598, 14125, 208, -2150, 819, -1085, + 12282, 6714, -2778, -9252, -5117, -6623, -1711, -4253, + -6306, -1292, -1370, -1027, -908, -2863, -1832, 4645, + -722, -284, -161, -5106, 7110, -12494, -1514, -5453, + -3308, 3520, 1101, -1096, -2325, -746, -33, 2645, + -4458, -797, -684, 1514, 1716, -6204, 6580, -3427, + -650, -10493, 4868, 5833, -2385, -274, 1530, 3892, + -1940, -1415, -2389, -11499, -2064, 937, -333, 1361, + -1583, 5458, -2296, -3263, -8344, -4236, -6357, -2372, + -3115, 1336, -2184, 194, -4262, -7838, 6946, 4535, + 749, 7332, 67, -327, 273, 3211, -1825, -357, + 7039, 3346, 6282, 488, -3940, 10196, 6463, 327, + 4407, 909, 889, -4943, -622, -4049, 2532, 1870, + 652, 1778, 663, 3063, -1012, -1390, 4162, 20486, + -86, 3166, 325, -1912, 511, -634, 1262, -4719, + -1490, 6767, -3314, -125, 4490, -10334, 5386, 9932, + 781, 290, 2198, 1695, 3790, -1878, 7760, -300, + 2021, 5508, 2200, 232, 7138, 1370, -3268, 3496, + 13934, -1230, -2303, 958, 141, 3348, -2867, -987 +}, + +.cb0808s1 = { + 9313, 734, 6610, -3629, -12020, 5317, -244, -1858, + 2, -1812, -6486, 892, 926, -236, 1016, -1249, + -469, -238, -1908, -10594, -4704, -907, -7746, 3847, + 564, -5956, 3395, 371, -5136, 4001, 1180, 769, + -555, -1872, -2943, -1744, 8620, 1485, 9901, -1392, + 3425, -7940, 151, 376, 1984, 3031, 3815, -974, + 537, -7038, 1964, -5625, 4457, -10214, -1787, -2768, + -8514, 176, -3692, 6441, 3148, 602, -2000, 13769, + -2792, 1104, -2067, -6219, 1515, -288, 3240, -5490, + 11589, 3742, -2343, -1752, 3701, 7525, -1676, 845, + 6895, 2884, 3540, 2454, 1010, 2454, -5761, 2035, + 3369, -9628, -862, -7060, 1802, 5676, 2396, 2757, + 5891, -701, -11896, -4061, 7932, -272, 2562, 83, + 560, -5180, -2223, -356, -3343, 2874, -1370, -7612, + 1773, 2006, -4258, 5312, 342, 8196, 4939, 519, + 3568, 4420, 2768, -11872, -3021, 1893, 1690, -5483, + -8129, 7540, -116, -2064, -4473, 1141, 1930, 656, + -7728, -2742, -3276, 2782, 2860, -6082, 5198, -4751, + -486, -789, -16932, -566, 5116, 1196, 832, 4282, + 78, 3088, 2768, 2125, 1027, 1712, 310, 808, + -1595, -106, 3174, 4598, -2945, 1551, -7688, 620, + -1640, 339, 4538, 3339, 532, -351, 260, 249, + -2135, -543, -18362, -648, -3871, 5514, -1782, -11301, + -374, -2078, 1610, 50, -4439, -2546, -3058, 839, + -9221, 2618, 1790, 103, -1061, -363, 285, -3542, + 503, -437, 30, 1382, 75, -2852, -1028, 3095, + 4318, -2316, 739, 801, -22765, 2162, 913, 1698, + 149, 2049, -313, -803, 3393, -1476, 4396, -4003, + 854, -1344, 1062, 10009, 6332, -8522, -2616, -9904, + -390, -3146, -2951, 4222, 5538, 495, 3776, -13684, + 4687, -2187, -905, 4997, 6209, 4775, -1234, 1956, + -4607, 3006, -370, -670, -12448, -5802, 8151, 140, + 1485, -6340, 2139, 1231, 22, -212, 2090, -676, + 2366, -701, -4113, 365, 2970, -577, 918, 7324, + -709, 2035, 5162, 7232, -13287, -3259, -908, -1900, + -4255, -2590, 318, 4891, 696, -40, -1647, 1572, + -1221, 4896, 5241, 49, -2083, -5068, 7645, 8978, + 1628, 2895, -4930, -8068, 2266, 2025, -1868, 3250, + 2642, -785, -14571, 9979, 3481, -2246, 1154, 2646, + 2616, -2033, -2936, -1300, 2490, 879, -1237, -1228, + -724, -1780, 524, -6619, -3339, -2526, 3533, 844, + 2946, 2208, -3522, -12411, -3062, 2380, 448, 604, + -4708, 2403, 1914, -58, 149, -3704, -2019, 4246, + -7020, -3197, -712, -2219, 10036, -2776, -3166, 2648, + 2947, 3386, 6445, 1587, -268, -536, 1895, -9005, + 10791, -982, 8215, 6414, 5166, 4751, 160, 3050, + -865, 6216, -1187, -7077, 1640, 5078, 4354, 1762, + -3869, 1174, -149, 1078, 1884, 5149, 15091, -432, + -2441, -1102, -1194, 1078, -1535, 8289, -2702, 4007, + 694, 72, 685, 2816, 13244, -422, -7094, 432, + 2044, -12004, -276, 2174, -908, -4784, 5725, -250, + 22, 5116, -2, 2686, 955, -8509, -7697, -3735, + 672, -1202, 4299, 4284, 12352, -2362, 5757, 1317, + 4293, 508, 3050, -524, 1097, 3346, -537, -2440, + -1596, -5659, 4188, -625, 1659, 3061, 2791, 1712, + -2991, 966, -16903, 610, -3314, 4160, -3750, 580, + -3407, -340, -11829, -520, -1625, 2905, 674, -147, + -5284, -4278, -5021, 4635, 6299, 2207, 2595, -7811, + -68, 4107, 4314, -1540, -11044, -2214, -803, 232, + -7602, -95, 1130, 4991, -361, 1675, 4487, 3607, + -6192, -130, 137, -1440, 2826, 178, -13834, -984, + 1149, 1230, 1587, 1571, 3286, 5293, -2259, 2021, + -6211, -7608, -2710, 2502, 4315, -539, -8530, -746, + -654, -4003, -5917, -3728, 4522, -10350, -1266, 210, + 5078, -2988, -3866, 3919, 969, -1063, -6300, -4584, + -2420, -2094, -884, 2338, -3150, 5461, -1145, -734, + 1644, 2183, 19114, -1144, -2313, -404, 1236, 3583, + 134, 1802, -4088, -2795, 681, 3738, 1831, 16571, + 917, -2290, -3648, -1588, -158, -528, -792, 394, + -7432, 2446, 402, -391, -73, -1398, 1286, -6503, + 5216, 1094, -939, 1673, -2038, 15842, -1971, 4160, + -1664, 7231, 642, 5770, 4209, -1839, 220, -266, + 165, 2055, 5222, -3344, -6544, 5412, 1514, 586, + 1591, -15256, -2715, 941, 1308, -9170, -2863, 4935, + -2913, -1291, 2791, 7967, 14, -1101, 3774, 3580, + 848, 1337, 1138, -2839, -3564, -5300, 12429, 14, + 1466, -7114, 1198, -3474, -237, -2577, -1305, 445, + 1069, -174, 1684, 3902, 229, 5842, -690, 978, + -754, 1182, -859, 21078, -185, 710, 797, -2155, + 367, -2168, 1002, 3805, -924, 468, -2322, -3590, + 1608, 3387, 18, 1536, -858, 642, -7964, 17689, + 9843, -4878, -3003, 7373, 5934, 4286, 10484, -63, + -4629, 974, -2227, 2602, 3810, 1905, -1668, -2130, + 2020, -2360, 2853, 612, 5070, -1248, -868, -497, + 3478, -1937, -3006, -645, 3589, 3019, -3293, 16469, + -5243, -2918, 1788, -2569, 3717, -9630, -1352, -3870, + -416, -4190, -8863, -6888, -498, -814, -783, -4625, + 5841, 1562, -2173, 481, 280, 816, 4742, -9962, + 11799, -2029, -2460, 4972, -600, -1452, -1901, -2122, + 3130, 2686, -819, -2366, 866, -2093, 1052, -58, + 284, 3830, -4738, -4114, -1321, 1307, -2820, 4915, +-11701, 522, -1982, 7024, 8403, 1762, -46, 532, + 5097, 5013, -615, 3086, 2089, 6899, -1107, -4047, + -2903, 5356, -4802, -965, 6706, 3895, 9022, 1388, + 10971, 5927, -2954, -965, -3473, -5177, -2654, 3418, + -5315, -16695, -6587, -416, 404, 1230, -2586, -3292, + 1390, 14, -481, -4446, 1335, 109, 1060, 3958, + 1275, -5655, 1253, -2411, 207, -12550, 6208, -2447, + -3415, 2503, 848, 3094, 9336, 2647, 2455, 2238, + 2356, -2132, 5347, 915, 2227, -103, 5832, -2504, + 7562, 9568, -6100, 4091, 2668, -1722, 287, 6763, + 4058, -387, -2060, 5522, 3184, 4766, -158, 650, +-11284, 11841, 6230, -4232, 5308, 3174, 4926, -2970, + -4761, -980, 117, 1944, -1974, -5484, 6534, -266, + -7222, 924, -2654, -588, 9609, -2337, 1892, -2110, + 5088, 1856, 7964, -4029, -940, 1429, 805, -4705, + -1362, 892, -189, -8354, 3259, 194, 767, -2877, + -4165, -990, 12185, -160, -2002, -1384, -5388, -1604, + 226, -6353, -4157, 1773, 2360, -4356, -730, -5462, + -4054, -15669, -1528, -394, 4101, -203, 2792, -787, + 3391, -299, 6384, -1630, -7186, -12765, 4618, 934, + -401, 2790, 2284, -4932, -1260, -6009, -2590, -2285, + -1289, 3366, -4192, -4462, 32767, -3135, -1888, 67, + -2874, 150, 4760, -1571, 584, -2187, 358, -1733, + -1286, -4573, -2003, 1872, 940, -1942, -255, -8856, + -1320, -3348, 4854, -509, 2836, -14, 2490, -1537, + 882, 1188, -3132, -15209, -1633, -44, -2827, 368, + -1099, -1073, -467, 6318, 5863, 2840, -5200, 569, + -2984, 6587, 9596, -4924, 457, 4879, -4449, 3528, + 1868, -3894, -3905, 15420, -2590, -599, -4975, 3892, + -1454, -616, 1890, -2700, -3268, -1386, -1065, -3078, + -2454, -1902, 4726, -34, -4218, 1619, -3074, 5540, + -6392, -3570, 2687, -8742, 333, -106, 2326, -1737, + -3775, 397, -3553, -6632, -6066, 9567, 2904, -889, + 1136, 1295, 19390, -268, -3127, -180, 1696, -814, + -775, -4914, -456, -758, -866, 1102, -3740, -374, + 469, -6902, 1440, -10243, -6221, -4797, -3074, -1142, + 297, 5069, -1547, 5474, 716, -454, 3806, 4100, + 2901, -2169, -744, 5032, -5586, -2986, 2286, 2414, + 7860, -2672, -46, -10046, 5348, -1018, 1016, 9142, + 4543, 5587, 2228, -2684, -4594, -2457, -1850, -3651, + -1806, 4826, -11686, 1940, -3529, 1078, -5234, -2420, + -83, -2322, -5134, -775, 677, -9257, -864, -915, + 4494, 411, -4820, 5999, 4472, 5823, -4597, 3121, + -1868, -1539, 2338, -4249, 1154, -13422, 791, -1235, + -1240, 364, 177, -1508, -2527, -2949, -2062, 118, + -3115, 293, -1927, 18644, -1100, 152, -2528, 1914, + -1380, -1624, 302, -831, -920, 320, -879, -1252, + 813, -11, 6960, -522, 3092, -119, 1486, 3068, + 6690, -3079, 13305, 6342, 937, 1632, -1026, 1896, + -2335, -3961, 5510, 2782, 187, -2448, -1251, 756, +-15856, 3179, -1155, 808, -1748, -6593, 1494, -3122, + -98, -3808, 491, 1752, 3188, 2158, -1924, 763, + 1165, 148, -3161, -1284, 18082, -195, -1125, 845 +}, + +.cb0808m0 = { +-18656, -461, 236, -1122, -796, -101, 851, -3748, + 1374, -8549, -3366, -1482, 1026, 2046, 4394, -521, + 232, -486, -1656, 32767, 1954, -1183, -130, 392, + 194, -868, 2883, -168, -1674, -910, -34, 819, + -1105, 1628, -4871, -585, -1170, -572, 451, 3911, + 10770, -35, -4126, 7124, 7110, -860, -3914, -3294, + 272, -647, 220, 11965, -3378, 2726, 1990, 1624, + -3689, 9884, 2394, 3096, -518, 5169, -4018, 3108, + 168, 1256, -410, -3851, -11176, -10479, 2042, 1421, + 1488, -992, -1562, -653, -1191, 2246, 467, 4732, + 154, 729, 7244, -18, 1313, -51, -1824, 1218, + 1473, -6763, -11270, -4295, 4118, 1043, -5782, 1370, + 46, -11027, 4086, -1501, -11, -621, 464, 781, + 13680, 257, 554, 3119, 750, -1857, 1046, -1252, + -512, 739, 14811, 12642, 3841, 2824, 163, 1620, + 39, 4766, 1411, -2197, 525, 658, 419, 5, + 92, 1544, 290, -2038, 10603, -5764, -3335, -6629, + -2579, 4020, -3107, 2779, 849, 5678, 260, 2804, + 99, 1339, 544, 1438, -450, -598, 764, 1568, + -1034, -4560, 2604, -18205, 1644, 1003, -675, 3217, + -334, -832, -1452, 322, 608, 300, -4776, -812, + -36, 627, 1654, -248, -838, 21571, -89, -1626, + 530, -1151, 9440, 522, -6138, 2213, -10095, -562, + 1000, 5037, -122, -3, 7064, 397, -2118, 362, + 15791, -1047, -15010, -1527, -1356, -2805, -560, -3148, + 266, -45, 1324, -3312, -1772, 2382, 189, 6537, + 124, -1272, 156, 588, -2678, -3106, 2828, -3684, + 689, 3884, 4650, 192, -323, -5426, -722, 11486, + -607, 3591, 4299, 2117, 362, -9114, 11700, -3391, + 2357, 7639, 2197, 4350, 2970, -2525, 169, -6112, + 91, 1520, -19, 1558, -4588, -837, -8163, 897, + -7992, 2080, -3102, 774, -10592, -314, -137, -524, + 87, -799, -111, 74, 1312, 862, 266, 243, + 199, -288, 1205, -829, 1650, 2880, -24776, 3867, +-13101, 597, -9778, -2084, -3089, -1112, 548, -638, + 3727, -446, 4877, 2099, 68, -2736, -4914, -7103, + 263, -9228, -782, -2109, 1088, -1881, -1424, -30, + -1353, 586, 4085, -3573, -11921, 2366, 516, -1028, + 834, -234, 2150, -15893, 2305, -3619, -2567, -8366, + 610, 2946, -2383, 2293, 946, -3550, -6770, -1481, + -758, -864, -232, 2855, 40, -2330, 2069, -345, + 1801, -589, -1241, 647, 6988, -2625, 14308, 2801, + 759, -2740, -680, 964, 365, -506, 22268, 1766, + -202, -2751, -293, 3754, 1280, -521, -3355, 4615, + 594, -1783, -39, -46, 48, -2638, -551, 2548, + -1880, 3730, -1726, 939, -345, -7, -1630, -23405, + -1002, 5655, 2100, 440, 1682, 1020, -594, 344, + 1511, -1286, 5518, 473, -11398, -4552, 720, 4701, + 7726, 126, -1953, -484, -1648, -1766, 1589, 996, + -688, -381, 1678, 1498, -528, -860, -667, -823, + 32767, -463, -243, -1242, 1074, 2460, -1411, -459, + -1533, 1462, -2603, -784, -391, 338, 3444, 2170, + -924, 949, 1972, 1520, -3062, -671, 12908, 2636, + 2805, 722, -12016, -26, 616, 1192, 1193, -1028, + -128, -22850, 191, 408, -3105, -592, -440, 1264, + -2580, 847, 850, 2300, -278, 126, 2214, -2693, + -21, -194, -594, -533, 45, 570, 38, 636, + 1276, 171, 29846, 648, 911, -358, 300, 602, + 413, -10167, -54, -1353, 42, -1770, 491, -12154, + -1808, 26, 425, 2009, 910, -8134, 362, 2001, + -114, -2586, -1049, -249, -312, 160, 1677, 27043, + -44, 160, 834, 243, -606, -272, -979, -1605, + 105, -491, 754, -230, 2442, 24, -5139, -395, + -3562, 14436, -1208, -3232, 2555, -12980, -906, 429, + 217, -432, -1263, -244, -225, 912, -64, 780, + 1101, 854, -240, 308, -28630, 518, 32, 976, + -8642, -3041, 1801, -742, -1513, 128, -3189, 857, +-14277, -1802, 1229, -68, -565, 65, 4094, 1614, + -8254, -1153, -640, 16225, 3508, -1383, -3882, -347, + 1346, 3845, 2665, 2340, -1862, -5318, 1402, -1352, +-21682, -694, -1182, 286, -806, 2133, 1848, -532, + -3750, 7564, 1054, 284, -3742, 2559, 2748, 3408, + -1544, -342, -22578, 1225, 958, 2559, 267, 378, + -3608, -1404, -1669, -13, 1135, 153, -625, 1436, + 211, 556, 739, 1094, 10452, 850, 5128, 11469, + 121, 4937, -3643, 1371, -373, -6686, 229, -3256, + -75, 1304, -1023, -452, 288, 12709, 13572, -501, + 1840, -1044, -2014, -4077, -2726, -1010, -3826, -629, + -466, -923, -847, 5784, 898, -12036, 1253, -1741, + 1546, -3710, 2782, -3430, -1810, 263, -8254, 3126, + 55, -376, 202, 968, -1686, 944, -15300, -2664, + 1393, 783, -11080, 1714, -1666, -1064, -4859, -2344, + 334, 1313, -1209, 877, -1828, -2130, -3057, 340, + 8030, -3222, 11622, -5620, 1469, 3340, 2862, -3945, + -868, 351, -1314, 2277, -2346, 12384, 996, -2460, + 1810, 703, -2158, 3168, -9887, 8754, 3503, -1414, + 445, 850, -30, 2389, -617, 3271, -1606, -5633, + 2993, 10009, 5704, -11589, 4278, 1304, -2418, 479, +-16596, -12349, 2915, 327, 895, 1278, 1412, -310, + -653, -1287, 880, -4294, 38, 2179, -2074, -1810, + 198, -1544, -8008, 2456, -2821, -3223, -3713, 11763, + -2081, -141, 4833, 1652, 3598, 551, -1655, -1154, + -60, -302, 739, -1494, 2595, -1006, 2665, 10834, +-11270, -2996, -636, -446, 1816, -1539, 4149, -184, + -100, -55, 265, 2207, 639, -162, -2210, -626, + 605, -21149, 2163, -970, -330, -4655, 3396, -3092, + -544, -650, -304, 93, -1484, -888, -8982, 1871, + 1701, -1423, 1671, -11, -1287, -14292, 592, 1040, + -622, 13202, -660, -12745, -2836, -1832, 3481, 1546, + 235, -646, 2132, -602, 2391, 1534, 3599, -4932, + -296, -1855, -2075, -2646, -219, -10248, 1161, 5955, + 6954, 9109, 3498, -5932, -1787, 373, 1234, 1244, + -813, -76, 9083, -5120, -499, -1774, -2150, 10601, + -170, 1160, 982, -597, 95, 151, -534, 6554, + 840, -958, -720, 2066, -50, -2877, -74, -2068, +-24760, -725, -357, 1273, 1941, 2525, 46, -819, + -230, 1030, 2291, -287, 1092, -2315, 427, -19, + 448, 1698, 9797, 10962, 3034, 2622, -2652, -1128, + -194, -180, -1176, -1794, -22248, 244, -3, -1856, + -1054, -2751, -459, -62, -433, -2274, -1790, -192, + -720, -421, 55, -721, 1960, 1094, 2500, -2353, + -480, -784, -1221, -505, 1738, -9960, -10772, -13657, + 122, 387, -667, -454, 988, 30780, -757, -2319, + 878, 962, 753, 1306, 716, -771, 539, -705, + 508, 1915, 2114, 937, 447, 935, -1432, -1143, + 4435, 11759, -2442, -53, -10601, 1979, 5419, -2296, + -172, -5987, -1168, -2012, 2257, -1451, 97, -1253, + 5548, 884, -14448, 3134, 2549, 172, 5404, 869, + -83, 597, -12416, 762, -1035, -805, -1369, -804, + 664, 9644, -4329, 1130, -1526, -2900, 628, 620, + -6436, -2370, 2107, -11836, 37, 864, 2105, 314, + 216, -529, 810, 3141, 3716, 7019, -2653, 1466, +-14940, 13128, 1218, 2287, -145, -443, -923, 476, + 2411, 5428, -611, 2212, 1450, -3042, -4750, 3562, + 587, -15378, -15151, 600, 1029, -2353, -934, 1986, + 1444, -2171, 1020, -700, -1508, 195, -2466, -798, + 16460, -2164, 520, 2711, -13832, -2024, -871, -5268, + 3556, 117, -416, -8, 2128, -1570, 2052, -3169 +}, + +.cb0808m1 = { + 16492, -295, 2556, 1303, -440, 7584, 3305, -3422, + -1196, -1809, 2142, -1292, 1048, 314, 1945, 578, + 1080, -255, 1109, 617, 1597, 198, -29081, -243, + 54, -33, 76, -418, 1332, 475, 1495, 1554, + -782, 308, -1286, 1044, 300, 1544, 646, 9441, + 2577, -11140, 1421, 1107, -483, -590, 625, 8544, + 446, -1814, 1714, 685, 9620, -4981, -3100, -724, + 8439, -2333, 506, 3557, -1160, -2199, -659, 4107, + 8620, -1406, -3745, 1729, 10756, 868, -82, 2584, + -3140, 3632, 2617, 3880, -1175, -163, 1864, -980, + 551, 201, -433, -1464, 708, 1926, -8471, 3870, + -2376, 15567, 2112, 753, -2450, 72, 1131, 2932, + -139, 6392, 1547, 3, 625, -823, -1750, 811, + -977, -1389, 1300, 1184, 399, 4684, 196, 3679, + -1672, -218, -11023, 98, 492, 4072, 1213, -2004, + 3602, -1787, 1288, -9442, 4157, -4267, 3509, 5317, + -574, -11094, 1078, 6240, 1593, -12773, 408, 3960, + 1116, 1517, -816, -577, -696, 554, 1645, -936, + 83, -20255, -754, 1460, 1110, 1412, -757, 377, + 2373, -1608, -1414, -1028, -3152, 1534, -4145, 2274, + -286, -7058, 2286, 4013, 2515, 2681, -5602, 0, + -1740, 257, 756, 11496, 954, 4513, 3968, 4851, + 278, -511, 829, 2853, -9743, -3723, -1550, -444, + 4256, -679, -11411, -4290, -1470, -4191, -952, -239, + -198, 1361, 9527, 1481, -981, 1403, 991, -255, + 9326, 1832, -1936, -135, 1123, 2756, 1932, 2543, + 795, 12612, 2429, -498, -13185, 3812, -1628, 196, + 1822, 4333, 2760, -676, -2902, 1244, -1974, -7046, +-12216, 1503, -2176, 1916, 365, 636, -11348, -5030, + -3319, -3794, -1016, 1157, -4158, 3424, 344, 4494, + 812, -3074, 4356, 293, -3463, 1232, 1746, 2696, + -8269, -961, -4316, 130, -4278, -14007, 3025, -2703, + 179, -10176, 1511, -1460, -1100, -1171, -1575, -2596, + -2026, -11400, 2689, 1480, 743, -1669, 2728, 742, + -60, 11452, 84, -662, 1424, -15103, -410, 2141, + -1664, -1378, -122, 97, -358, -820, 382, -3865, + 374, 1698, -21, -752, 595, -8771, -731, 9368, + 1698, -2586, -6790, -2507, -1776, 4993, -3867, -2807, + -190, 14465, -13938, 3095, -1198, 374, 1682, 1888, + 286, -576, -2094, 454, -690, 1396, -1139, -422, + 405, 238, 1718, 2048, 13448, -151, -247, 202, + -900, -5630, 3121, -10988, -1615, 1955, -3901, 3360, + 1429, 3928, 1951, -1099, -435, 1572, 1500, 19176, + 731, -439, 3686, -3039, 244, -4270, -34, 1289, + 296, -406, 2216, -1400, -1946, 264, 1536, 2992, + 54, 892, -181, -1545, 278, 24923, 989, 1301, + -1279, -188, -198, -661, 612, -1520, 2355, -12972, + -694, -560, 1364, -2988, -6236, 2555, -6630, 1423, + 440, -598, -1092, 304, -2529, -1698, -909, 2560, + 844, 768, -2988, -661, 18432, 1158, -639, 5070, + 11015, -14, 2313, 756, -1941, -10986, -490, -5235, + 2646, 2406, 170, -546, 337, 6499, -4450, 5598, + 299, -504, 14322, -972, 9356, -2056, 8812, -1599, + -1931, 2084, 119, -983, -305, 1437, 403, 2651, + -159, 229, 209, 1438, -1789, -1159, 1017, 416, + 408, 454, 858, -652, -1554, 1198, 18278, 122, + 433, -165, 162, -10532, 11563, 4754, -2022, 4246, + -1396, -2417, -1796, -1496, -1279, 3877, -1217, -770, + 983, -609, 1766, -184, -5664, 546, 7948, 1978, + -250, 4350, 3498, 2797, 802, 846, -12628, -1092, + -240, 781, -11252, -955, 9944, -222, 1177, 1262, + -534, 1790, -7396, 1452, 4251, 303, -3714, -2295, + -290, -227, 672, 22690, -622, -466, 1599, -496, + 326, 871, -1948, 148, 449, 214, -2175, 713, + 394, 1921, -28716, -786, 1083, -641, 1232, -246, + 1572, 1575, -879, -2962, -57, 369, 1633, -1457, + 1194, -1222, 304, -955, 104, -1249, -935, 135, + -758, 3483, -1190, 1457, 1130, -1284, -3709, 18042, + 6, 25, 1233, -328, 347, -512, 2071, 328, +-18037, 4582, 3841, -434, -745, 332, -576, 3006, + 336, -11505, -646, 3509, -996, 1270, 2041, 1353, + 1193, 2976, 11569, -3165, 1450, 4351, 2522, -10022, + -6, 12602, 874, 518, 475, 1251, -3290, -2674, + 4802, -11794, -946, -426, -2846, 1619, 1105, -1022, + -1, 1759, 646, 10347, -2937, 13505, 1104, 614, + 1149, -800, 2377, -115, 792, -948, -2431, -1779, + -1142, 809, -3130, 447, -15516, 313, 11235, -1346, + -2426, -2737, -1738, 2236, 1094, 802, 1323, 3612, + -213, 1383, 2800, 10394, 1210, -2360, -10203, -1991, + -102, -2669, 2303, -2184, 1830, -1158, -5633, -4083, + -252, 311, 612, -331, -2786, -12421, 9994, -6006, + -4996, -954, 1014, -1147, 860, 1252, 1114, -2069, + 266, -230, -591, -4442, 230, 20603, 1386, 1130, + -1468, -3600, 2168, 836, -1754, -511, -542, 216, + 26, 3476, 1165, -4293, 3098, -245, -579, 1830, + 2248, 5326, -18357, 397, 5466, 734, 3920, -3678, + 319, -1062, -610, -7509, -1064, 1456, -5729, 1088, + 9099, 2266, 241, 201, -10017, -1545, -2799, 1491, + 27098, -60, -1736, 1387, 859, -1474, -79, -1122, + -971, -1302, 906, -1133, -2659, -296, 1344, -2698, + -448, -1476, -212, -1585, 1310, 14353, -2165, -2229, + -656, 5219, -3266, -1850, 7942, 4997, -2295, 519, + 608, -9498, -1700, 1770, -15308, 1286, -2914, 2252, + -717, 2136, 2478, -3747, 2362, -5, -237, 2334, + 701, -774, -672, -20, -599, 623, -700, -713, + -979, -29926, -1090, 848, -141, 1273, -711, 1782, + -221, -103, 170, -185, -1059, 3066, 1321, 1182, + 3641, -217, 1959, 11806, 2390, -10312, -2575, 1612, + 596, -352, 2197, -2041, 2385, -898, -9363, -1144, +-10896, 20, -7842, -1047, 3687, 2147, 2584, -249, + -72, 32767, 1936, 446, -889, -845, -896, 1269, + 448, 327, -3411, 4, 702, -1900, -646, 799, + -770, 662, -911, -856, 287, 1667, -108, -64, + 16, 1578, -2059, -27327, 112, -188, 2504, -692, + 250, 360, 564, 868, 4147, 1340, 18080, -3584, + 445, 364, -2623, -412, -2918, -116, 2611, -2396, + -44, 10934, -1512, -1166, 239, 913, 190, -14681, + -767, 2610, 2931, -2389, 3590, -1680, 6287, -531, + -616, 1317, -1034, -900, 871, -329, 467, 1200, + -1914, 1108, 3150, -6878, 544, -14411, 2807, 5427, + 13361, 1448, -1753, 524, -5851, 1467, -1866, 6888, + -8742, 1372, -1515, 4883, -2248, -1042, 4628, 10768, + 149, -358, -1287, -1289, 32767, -1137, 941, -2112, + 451, -1436, 174, 294, 475, -3667, 1610, 1641, + -599, 626, 2058, 671, 1626, -985, -123, 2040, + 421, 1797, 18448, 2538, -359, -5042, 3096, -1136, + -320, 1823, 30, -12002, -1297, -850, -418, -1497, + -1761, 5073, 10944, 212, -4713, -1614, -1752, -2135, + 483, 1043, -1989, -293, 39, -1049, 67, -7482, + 712, -5358, 896, 12460, -1744, -1793, 1538, 3577, + -6, 418, -72, 1072, 1367, 1080, 3564, 1468, + 482, -1298, -6442, -299, -12934, -757, -4199, 3842, +-11331, -1216, -206, 1598, -1135, -3240, 3294, -286, + -540, 777, 1188, -1189, 4516, 2638, 2071, 9702, + -900, 1002, 18707, -705, -1856, 1185, -4832, -1694, + -3502, -2324, -2826, -4600, 1996, -3110, 110, 117, + 405, -16854, -510, -14725, 1699, 1922, -2117, -2718, + 45, 1064, 507, -1781, 2106, -2310, 1239, 5860 +}, + +.cb1108l0 = { + 2354, 8016, 12528, -947, -348, 1760, 2054, -3960, + -2125, -3578, 3932, 1647, -3316, 6053, 392, -3128, + 3209, -2445, 463, -2835, -1555, 1259, 296, -1465, + 1839, -4811, 420, -215, 469, -1013, -272, 185, +-27061, -1154, 8, 298, 259, -953, -555, 472, + 617, -1127, -673, 982, -398, -1681, 328, 882, + 614, 800, 431, 84, 880, -240, 15758, -14324, + 1301, 1578, 932, -694, -1456, 2435, -1651, 1464, + 227, 1527, 527, -128, 698, 2405, -726, 1489, + 1016, 1938, -1897, -1478, -238, 932, 2507, -519, + -1147, 557, 2334, 700, -12914, 14861, 158, 255, + 1195, -883, 3359, -1045, 2095, 520, 249, 926, + 789, 1392, -185, -1654, 902, 9, -2166, -1916, + 543, -2126, 2842, -332, 1356, -344, 436, -404, + -174, -489, 858, 258, 229, -45, 327, -316, + -1176, -454, 115, -220, -458, -194, 271, -530, + 1572, -574, -25068, 167, 601, -1027, -1705, -3144, + -4231, -1636, -1012, -1002, -519, -825, -458, 945, + 546, 193, -17909, -156, -1067, 826, 338, 1152, + 562, -506, 848, 239, 188, 656, 97, -174, + -59, 242, 1946, -67, 745, 2043, 424, -192, + 574, -524, 1553, 566, 1480, -747, 487, -20623, + 872, -1089, 1034, 1357, 919, 153, 154, 498, + 54, 555, -989, 707, -85, -21, 700, -1424, + 90, 655, -399, 123, -709, 117, 438, 330, + -720, 190, 812, -138, 460, -32768, -162, -410, + -327, -122, -1208, -554, -502, -178, -309, 373, + 4295, -945, -5502, -2752, -6615, -1241, 1278, -1315, + -7683, -986, -419, -50, 2384, -4640, -6246, -11804, + -308, -446, 3486, -4824, 1736, -590, 960, 195, + 593, 164, 3355, 1655, 1233, 66, -787, -347, +-13751, 74, -1209, -812, -4098, -102, 910, -1659, + -2036, -3147, -2075, -2605, -1240, 4499, 1727, -9484, + 549, 728, 3411, 1958, -4439, -1064, 5690, -1600, + -1984, 1695, -588, 4815, -138, -3380, -512, 1553, + 1978, 4310, -730, -402, 828, 2124, 14216, -222, + 2757, -8686, 523, 2516, 1017, 790, -136, -470, + -252, -717, 808, -1113, 13766, -114, -1182, 3053, + -5238, -2231, 1720, -511, -987, 1592, -1257, -2578, + 1777, 1075, 2367, -227, 2330, -672, -2620, -1449, + 2122, 362, 1249, 1338, -327, -21631, -1540, 24, + -2356, -656, 1981, -92, -207, -2188, 34, -457, + -1291, 1231, -460, -128, -396, 593, -671, -1513, + 136, -335, 560, -1121, 490, 1008, 948, 8629, + -3344, 467, 881, -5731, 1120, -300, -1432, 1227, + 1558, 990, -1078, 214, -922, -81, 1120, -15586, + -1176, 1203, -1911, 151, 1484, 1555, -421, -420, + -428, -762, 292, -59, 1075, -649, -841, 494, + 194, 27, -768, -356, 54, 163, -73, 293, + -1717, -392, 750, 234, 751, -111, 26858, 911, + -389, 451, 442, 260, -117, 270, 19, -2429, + 618, -962, 378, 10, -1954, -1336, 525, -258, + -693, -4155, 10265, 2924, -1361, 3197, 10199, 6870, + -2608, -5792, 619, -1994, -2035, -701, 2598, 465, + -575, 311, 175, 162, -1191, 162, -157, -147, + 325, 551, 536, -188, -290, -165, 343, 14, + -268, -27113, 278, 127, -233, -68, 606, 125, + 665, 438, -442, 2510, 800, -1991, -641, -386, + -1574, 78, 946, 189, 106, -2249, -268, -1708, + -1192, 986, 3076, 1807, 21, -5884, -964, 256, +-15916, -1320, -2867, -3562, 491, 3502, -337, -1542, + 496, -3182, 1676, -2371, -4264, -2053, 14342, -5674, + 1744, 1813, -3731, -3761, 1350, 1783, -438, -920, + 2366, 1438, -687, 512, -1934, 323, -3158, 1775, + 1964, -6742, 10162, 7763, 1469, 1967, 851, 2742, + 7413, -3338, 742, 1854, 310, -192, -936, -1770, + -775, -976, -1532, -1436, -670, -4032, 1194, -1336, + -4369, 332, 604, 962, -27563, -972, 842, -743, + 275, 713, -251, -799, -1190, 372, -213, -423, + 202, 1189, -31, 1084, -974, 756, -148, -1669, + 640, -549, -339, -1506, -112, -598, -870, 410, +-13307, 13141, -1911, 2308, -92, -776, 221, 1503, + 1578, 803, -308, -1672, -404, -83, -3517, -1327, + -606, -2426, -61, -513, 318, -1805, 2049, 1887, + -777, 1268, -542, -116, 3550, -18840, -2986, -979, + 2653, -2875, -922, -10520, 804, 107, 3234, -1270, + -608, 1042, 3599, 965, -342, -2096, -267, 1704, + -3939, 791, 2180, -985, 816, -716, -2661, 99, + 1523, 11902, -1782, 775, -12517, 3244, -3762, 2046, + -278, 1539, 2895, -2425, -10, 990, 1484, -1377, + -3399, -984, 3171, 1513, 696, -785, 155, -1072, + 414, 2016, -1932, -3124, -1126, 68, 3855, 1360, + 4074, 17596, 1714, -596, 4000, 1656, 230, -258, + 2266, 843, -1720, 4624, -714, 854, 696, 636, + -1357, 350, -1256, -523, 168, -9933, -766, 198, + 2680, 8060, 2168, -2789, -14255, 1444, -520, 169, + 1032, 1478, 294, -644, -320, 856, 1282, -216, + -1000, -925, 2, -890, 679, -629, 1152, -1329, +-13941, -16385, -1050, -1022, 106, -1151, -41, -709, + 1771, -882, -729, -1420, 1544, -120, 386, -838, + -2744, 1559, 904, 273, -4221, -1065, -312, -1046, + 234, 830, 387, 172, -956, -332, 360, 408, + 125, 90, 348, 915, -264, 911, 263, 124, + -620, -612, 220, 164, 202, 124, -30252, -159, + 1006, -320, 283, -1641, -1312, -9057, 5525, 7520, + -2884, -12194, 2771, -1164, 1842, 1261, -582, 766, + 2498, 393, 953, -617, -756, -323, -1862, 1195, + -1326, -436, -965, 366, -6727, -1226, 9014, 400, + -1258, -812, -279, -404, 1621, 86, 1622, -16, + 96, -515, -257, -39, -134, 1843, -294, -491, + -908, -120, -720, -1162, -1555, 405, -134, 528, + 23596, -77, 183, -444, 2077, 955, 649, 2246, + 3236, 735, -1202, 7954, 9440, 6134, -7267, 28, + -3398, 500, 4965, -1230, 306, 357, 2942, -906, + -4733, 903, -3945, 4447, 1046, -1125, 465, 1183, +-12710, -1018, -11302, 5177, -219, -6232, 1552, 2061, + -1372, -1290, -822, 295, 814, -3003, -527, -614, + -856, 802, 167, 1178, -494, -1625, 754, -1550, + 682, -1286, -480, -694, 86, -67, -1429, -1235, + -559, -311, 322, -308, -56, 296, -158, -24, + -748, -197, 26954, 1054, 209, -226, 165, 681, + -131, 341, 341, 1510, 615, 907, -264, 1355, + 388, 198, -5, 418, -783, 28539, 82, -559, + -459, -344, 279, -114, 966, -529, -423, 286, + -418, -766, 42, 186, 461, 418, -688, 2937, + 2793, 146, 1709, -665, 2022, 293, -1522, -2740, +-15926, -600, -1503, -1732, -2827, -1027, 1702, 252, + -643, 470, -815, 858, -1954, 1190, 1847, -16, + 266, 29, 486, 25985, 139, 220, 433, -330, + 168, -362, -562, 180, 906, 386, -845, 664, + 1064, -616, -1498, -335, -164, -930, -854, -869, + -101, -204, 835, 117, -16034, -4478, 2634, 1629, + -1873, -1156, -373, -526, 2537, 967, -2433, -857, + 1264, -1670, 113, 845, 7654, -1343, 5245, -1605, + 2236, -1190, -48, 3340, -1981, -1606, -1369, -227, + -727, -570, 1136, 1868, 667, 92, -144, 531, + 949, -1086, 530, 1764, 302, 190, -28036, 182, + 825, 229, -656, 585, 444, 200, -1195, -1855, + -387, -781, 1156, 692, -1164, -517, -464, -275, + -328, 218, -970, 174, -384, -561, -38, -720, + -140, 1021, -271, -57, 463, -25313, -342, -40, + 26, 159, -854, 916, -1532, -1033, 265, 105, + -719, -588, 96, -435, -296, -226, 224, 357, + 30, 576, -66, -30037, -72, 374, 32, 256, + 304, -852, -706, 248, -741, -379, 980, 629, + 1344, 3858, -2211, -153, -3914, -3775, 1570, 718, + -1042, -1338, -4409, 1338, 5118, 5186, 3619, 2142, + 9081, -2784, 4169, 3598, 6621, 4562, -170, -614, + 1196, -1174, 5024, 721, -71, 267, 4, 25598, + -369, 356, 331, 1099, 377, -356, -938, 1161, + -863, 1107, -132, 222, 148, 1410, 908, 60, + 377, 1280, 468, 690, 454, 247, -4552, 6122, + -267, 2973, -5932, -6424, -4983, -4193, -3386, 1691, + 1349, 1419, -3730, 300, 12150, -2927, 1588, -34, + -2435, -271, -961, -1744, 1881, -73, -453, -788, + -798, 9166, 2744, 858, 342, 991, -287, 822, + -37, 1156, -1493, 723, -14127, -1755, 2029, -933, + -1276, 632, -5249, 464, -272, 1149, -290, 4693, + -728, -1475, 841, 10, -283, 92, -268, -295, + 358, 160, 405, 2, -381, 679, 716, -190, + 128, 275, 255, 123, -412, -453, -273, 26, + -174, -340, 644, -376, 27584, -25, 66, 3107, + -1707, 911, 500, -1029, 1029, -1557, 9020, -398, + -2512, -582, 1131, -16696, -429, -1284, -3, 2320, + -532, -302, -174, -146, -413, 2152, 1009, 42, + 402, -1471, 157, 5742, -782, -229, 2379, 646, + 2842, -1776, -463, -2749, -3617, -1710, -12281, -566, + 263, -3174, -2337, 9590, -1150, 2465, 4577, 2064, + -648, -2175, -1877, -674, -634, -338, 343, -1492, + 878, -530, 1072, 13670, -4542, 746, 9704, -4188, + -7076, 1179, -740, -589, -876, 268, -1080, -986, + -4584, 2692, 3032, -2067, 230, -3533, 944, -4950, + -1908, 1452, -255, -698, 1460, -606, -250, -154, +-22303, -945, 1626, -588, -482, -1549, -129, 978, + -631, -722, 1094, 1771, -311, 532, -508, 696, + -1128, 1270, 854, -84, 4290, 414, 3351, 1061, + 931, -2936, -9606, -35, 2514, -1095, 567, -452, + -8520, 4037, -431, 2744, -2276, 2647, -1188, -454, + -400, -3698, -315, 11558, -667, 512, 162, -395, +-13015, -11, -1944, -890, -14358, -3850, -4296, 1310, + -580, -248, 1305, 402, -1049, 115, 2085, -1797, + -1172, -321, -919, -313, -512, -131, 1619, 576, + 499, -2024, 130, 14, -76, -6324, 495, 2445, +-16757, -2348, -2706, -1906, 2377, -2252, -619, -2579, + 643, -661, -1276, 935, 893, 992, -2204, -2451, + -395, -508, 1163, -216, -13034, -718, -1018, -1675, + -698, 710, -257, 2658, 1178, 2046, -2270, -2588, +-14442, -1142, -1026, 2247, -536, 314, 123, -1175, + -673, 1576, -2600, 5, 964, 619, -1714, -14811, + -1502, -1646, -1151, -93, -11652, -222, 343, -2203, + -351, -928, -289, 2679, 2101, 742, 747, -2245, + 146, -1828, -2728, 1058, 1048, 3046, 242, 4432, + 246, 350, -13419, 768, -805, 1819, 14332, 1316, + -370, 391, -1421, -1426, -355, -812, -64, 196, + -2917, 1097, -1550, -1246, 436, -62, -813, 1350, + 555, -2236, -1589, 980, -1483, 10122, -2434, 7236, +-15225, 1513, 2090, -1224, -83, -2821, 664, 658, + -3242, -1031, 1509, 2667, -160, -1315, 1060, 891, + 432, -1311, -2503, 1304, 1295, 1745, -722, -2496, + -4409, -3360, -2776, -2793, -4921, 12616, -1031, -443, + 1495, -2416, -4640, 4508, -2944, 2608, 1323, -394, + -415, -2111, -2065, 1030, -3636, -1338, 2916, -3007, + -3680, -3152, -115, 577, 2742, 785, -4429, -1945, + -304, -4883, -133, -3136, -1927, -576, 618, 1780, + 2568, -2102, -158, -3986, -1187, 280, 655, 162, + -1352, -5730, 15372, -1314, 1553, 274, -2873, 4221, + 4610, -4143, -13699, 2760, -1255, -238, 1487, 1583, + 1422, -2272, 4734, -6368, 795, -406, 1498, 1588, + -500, -2744, -875, 2080, 1901, 960, 344, 979, + -258, 952, 2526, -11785, 893, 669, 1361, 518, + -1368, 3854, 2539, 623, -1835, -4177, 2686, -2956, + -2804, 1121, -8890, 1377, 1125, -3990, 140, 3594, + 1757, 2271, 366, 1723, 2150, 13557, -1768, -1433, + -6632, -578, 3266, 2509, 7142, 680, 1532, 1318, + -1123, 5668, 1283, -412, -5404, 2893, -2647, -2695, + -1412, 340, -650, 863, 1895, 2867, 384, 626, + 856, 508, 1365, -295, 960, -26080, 234, -4, + 239, -412, -6, -765, 736, -30, 136, 912, + 538, -792, 413, 871, -437, 305, 30, -194, + 1105, -1113, 3550, -4854, 449, -549, -7626, 3706, + -3698, 1778, 1441, 2240, 73, 513, -3383, -2346, + -1372, 3955, 2973, 1175, -6087, 5071, -2135, 8552, + 4961, -1201, -1458, -2627, -730, 515, -756, 476, + -1104, 2115, -1276, 498, 336, -451, 809, -1030, + 556, -211, -70, -93, 89, -755, 296, 872, + -282, 380, -298, 2774, 660, 1339, -545, 429 +}, + +.cb1108l1 = { +-13570, -9232, -673, 267, -819, 1633, -33, 623, + -850, -4376, -1135, 999, -262, 1928, 695, -1751, + -2793, 772, 5064, -1158, 280, -2144, 1313, 888, + -2482, 469, 2996, -1406, 12525, -1200, -1202, 939, + -3, 847, 818, -924, 135, -1308, -12000, -544, + -592, -3914, 441, 3372, 3188, 1314, -1836, -706, + -844, -1319, 1029, -1754, 172, 2468, -903, -889, +-14602, -2054, 11694, -1980, -730, -1661, 214, 1243, + -337, -646, -95, 1432, -854, -236, 88, -2, + 514, -1643, -84, 3561, 302, 770, -1248, 480, + 664, 738, 1728, -1783, -2227, -702, -3582, -16641, + 1713, 1506, 660, -2471, 2061, -48, -3161, 1697, + 900, -1477, 558, 287, -5515, 1023, -1972, 999, + -1856, -3022, -228, 711, 1270, 2644, -648, 1064, + 3899, -1205, -754, 1080, 1262, 18, 860, 2274, + 655, 494, -221, -15647, 1334, -473, -1648, -341, + 3541, 3109, -1671, 639, -2491, 185, 477, -388, + 5198, -5680, 812, 700, 2180, -536, -19468, -2508, + 2592, 2901, 32, -1165, 1500, -422, -790, -1914, + 971, 111, 1226, -1302, 541, -3862, -832, 642, + 305, -3870, 8921, 570, 180, 1734, -1572, -891, + 17672, -756, 702, 2740, -647, 2122, 102, -1371, + 461, 454, 204, -307, -1248, -2330, 1353, -1783, + -1939, -601, 512, 2118, -2178, 254, 1190, -1252, + 923, 1166, 360, 320, 320, 1210, -142, -416, + 1260, -205, 1403, -1025, 19252, 328, 58, 21, + -1044, 1786, 2153, 697, -436, -1617, -869, -493, + -2419, -3102, 1995, 1519, -1799, -153, 2689, -665, + -1371, -915, 18486, 941, -2612, -1057, 1076, -3351, + -48, -1478, 575, 728, 130, -168, 40, 898, + 2141, 1518, -965, -1910, 896, 838, 1220, 416, + -1494, 1404, -126, 21472, 604, 1740, 102, -812, + -796, -734, 1082, -507, -468, -1732, 1171, 252, + 359, 436, -765, 791, 726, -810, 1838, -1798, + 5662, -2362, 1275, -2829, -4041, 1398, 2681, 480, + 13740, -752, 2252, 1306, -1026, 1834, 54, 9993, + 559, 1370, 711, 1918, -1757, 646, 16, -3262, + 2676, 1751, -2595, 4782, -1050, 2401, -15131, 1100, + 386, 708, -359, 455, -25, -950, 241, -482, + 268, 2327, -2766, -142, -1992, -566, -36, 990, + -6302, 3245, -1394, -1579, 760, -757, -2115, -8542, + -2945, -800, -4027, -3102, -1319, -1989, -1787, -426, + 590, 1031, 467, 31, 2674, 1686, -14352, 1174, + -1446, -813, -1267, 2919, 2052, -1574, -753, 3369, + -1090, 3830, 2042, 11376, 1140, 895, 1130, -720, + -1284, -2277, 49, -724, 397, 13201, -985, 1599, + -365, 1517, -496, 978, 2152, 1391, 1777, 3032, + -936, 280, 1719, -4551, 4874, -941, -160, 956, + -676, -229, -548, 183, -16606, -855, -3433, 1248, + -578, 2254, -532, 3081, -1406, -1859, -605, 1809, + -1001, -114, -1222, 3890, -609, 3114, -2430, -2142, + 440, 1780, 1606, -4211, 1047, -456, 8280, 9, + 5866, -1718, -932, -13049, -562, 3097, -583, -21, + -1972, 1254, -172, 527, 2282, 5064, -5391, 1074, + 357, 1845, 24, -996, 100, -50, 1098, 2905, + -417, -937, -439, 247, 18502, -2380, -2088, -402, + -580, 83, -282, -70, 969, 540, -219, -1132, + -1701, -195, -3030, -2748, -1974, -1304, -1909, 1080, + 1042, 1124, -128, 5816, 2303, 2840, -2420, 35, + 16550, 721, -2079, -1489, 1023, -654, 2025, 1479, + -185, -2449, 500, 3034, 2663, 3911, 1203, 998, + 594, -533, -163, -262, 739, 13, -426, 182, + 394, 350, -30055, -371, 150, -430, 147, -1122, + 43, -390, 298, 831, -194, 158, -114, -257, + -1346, -585, 206, -456, 478, -502, -1710, -1719, + -581, -536, 45, -861, 825, 1093, -255, -685, + 38, -20, 419, -594, 10, -1408, -526, -19191, + 196, -1496, 255, 1844, -8759, -3565, -1009, -926, + -818, -1195, 236, 2898, -182, 14344, -1384, 1064, + 1181, -1846, 543, -583, 170, -3305, -1187, -2406, + -40, -1051, -1071, -28, 1482, -1060, -1057, 3028, + -2023, 913, 1052, 980, -5158, 4642, -14067, 3920, + 1450, -4497, -1591, 842, -2222, -392, -42, -3546, + -258, -3566, 2595, 225, -2696, 4624, 2283, 1483, + -1506, 2164, 151, 380, -3207, -1086, -10594, 2005, + 2379, -2567, -925, -363, -1261, 13174, -73, 1168, + 2215, -1721, 726, 525, 1048, 322, -827, 2117, + 3890, 1346, -3512, 2243, 638, 2259, -1371, -2260, + 10590, 851, -1247, -894, 1871, -882, -1955, 3822, + -3654, -1730, 906, 2074, -548, 885, -2501, -1316, + -3275, -10694, 2031, 1077, 3013, -1105, 2951, 1907, + 1218, 194, 1860, -1662, 178, 915, 1092, 809, + -451, -610, -728, 799, -129, -101, -905, -2, + 2470, 1292, -137, 544, -18795, -1081, -300, -59, + 282, -329, -544, -1324, 2155, 9326, 462, -388, + -303, -2940, -608, -13652, 532, -1350, -1026, 1330, + 5559, -333, 4961, 707, -1832, 1070, 2483, -2016, + -315, 2197, 849, -348, 379, -2179, -15691, 903, + 3192, 3888, 396, 4610, 3261, -2589, -4903, -643, + 3604, -1380, 1524, -2155, 469, -3528, -790, 429, + -3862, 1797, -104, 2364, -1162, -1559, 1011, 1849, + -235, -1952, -2088, 1436, 2502, -3862, -1704, -14859, + -2863, 710, 624, 4373, -6302, -616, -807, -1577, + -2492, -620, -917, 948, 4957, -848, -863, 514, + -2210, 2162, -753, -15168, -2068, 12472, -2611, -723, + 2797, -8573, -2270, 978, -2597, 2215, -684, 2535, + 3114, -261, -178, 2385, -4869, 1161, -32, -1469, + 2074, -1407, 3226, -992, 4546, -3158, 1044, 463, + -5285, 4, -1396, -1395, 1770, -1767, -860, -6, + -2242, -1548, -667, 587, -982, -2246, -1312, 1550, + -542, 5302, -716, 135, -15895, 3382, -478, 1279, + 615, 3365, 1620, -12613, -230, 3101, 3230, -1307, + 2860, 628, 647, -3595, -214, -1631, 2783, 748, + 1088, -57, -6014, 2496, 359, 719, 1476, -750, + -1644, -2125, 3913, -3788, 565, -1118, -1411, 1377, + -1020, -246, 18851, -1438, -1150, -1492, -681, -798, + -776, 960, 911, -1449, 336, -1114, -2111, -877, + -532, 668, 1018, 1098, 408, 2032, -607, -656, + -5997, 3089, 2462, -18368, -1027, 78, -4066, 439, + -845, 1476, 290, 490, -452, 1638, -3381, 80, + 1699, 458, 260, 1215, -516, 1883, -62, 35, + -2540, -1703, -1042, 1751, -422, 1222, 207, -104, + 1112, 151, -473, -522, 26426, 562, 884, -2201, + -281, 238, -839, 1037, -588, 81, -109, -2, + -32, 75, 654, 489, 524, -388, -1408, -906, + -1193, -936, -273, -40, -100, -662, -522, -145, + 119, 614, -922, -25329, -180, -668, -574, 161, + -448, 173, 750, -609, -812, -125, 814, 572, + 2602, 20372, 244, 1820, 724, 515, 932, -1290, + -712, -990, -305, -13, -763, -1157, 481, -764, + 320, 624, -620, 642, -1494, -568, -601, -655, + -790, -1348, 334, -1302, 382, 782, -1122, -641, +-23549, 180, 463, -634, -666, 599, -356, -1071, + 816, -576, 1208, 912, -377, 624, 1049, 42, + -95, 370, 1932, -167, -275, 142, -159, -410, + 595, -562, -632, 748, 1192, 614, -41, -18, + -156, -61, 1280, -686, 363, 759, 756, -19362, + -614, 2151, -1185, 169, 327, 1494, 782, -1313, + -134, 841, 218, -76, -2980, 202, 80, 281, + 89, -61, -1678, 59, -125, 195, 320, -1310, + -56, 806, 47, -65, 249, 18432, -666, -506, + -204, -194, -560, -416, -3641, 330, -268, 842, + 10600, -176, 424, -1744, -3609, -1682, -844, -309, + -538, 435, 14251, -1281, 373, 2748, -702, -1358, + -766, 3480, -679, 4039, 529, -5698, -38, -813, + 1203, 4734, 318, -1044, -5109, 2187, -3474, 415, + 2436, -3021, -1628, -456, -1451, 3406, -1798, 1001, + -8648, 468, 1188, 497, 4628, -948, -4073, -11894, + -2750, -738, 1520, -4070, -810, -5755, -1370, 2978, + 4460, 917, 1221, -324, -1166, 2339, -1221, -2048, + 714, 6884, 3096, 6998, 13, -275, -3879, 790, + 104, 1383, 2056, 1957, -9216, -430, -199, 261, + 764, -109, -210, 795, 884, -334, 1546, -272, + -35, 738, -268, -13, -448, 645, 97, 76, + 1284, -343, -654, 112, 643, 22846, 634, -597, + -621, -784, -380, 951, -452, -685, 140, 688, + -770, 247, -679, -228, -26856, 311, -546, -444, + 606, 69, -195, 18, -220, -334, -42, 543, + -28, 492, 766, 208, -1206, -554, 213, -1112, + -1675, -608, 382, 2011, 5077, -17442, 1367, -702, + -856, -416, -1728, -1987, 2966, -1952, 38, 152, + 712, 210, -589, 3029, -1189, -2016, -8071, 10746, + -2143, -556, -1964, 162, -504, 995, 982, -2565, + -634, -985, -1668, 444, -2098, -411, 488, 1397, + -1134, 1888, -920, -279, 15057, -757, -1258, -3040, + -890, -105, -670, -490, -238, -2419, -1302, 915, + -784, -929, 1653, -89, 1076, 445, 2538, -1424, + 19175, -91, 437, 752, 254, 935, 854, -1666, + -86, -543, 1053, 664, -155, -485, -3994, -50, + 50, -58, -2626, 1801, -314, -16052, -1831, 1009, + 2344, -3030, -938, 1761, -1283, -150, -425, -6660, + -900, 1374, 803, 549, -2683, 837, 483, -655, + 4610, 1259, -45, 834, 1103, -3250, -3604, -2882, + -2463, -5331, 11312, -1653, -3505, -1855, -4962, 8579, + 2370, -2474, 501, -1282, 985, -924, 3452, 456, + -242, 3878, -2095, 2994, 7076, -459, 2574, 16116, + 8277, -88, 572, -38, 0, 1664, -553, 1820, + -2096, 1076, 415, -420, 1900, -1696, -130, 298, + -1555, 201, -404, -1831, -932, 844, 9606, -497, +-16304, 3278, 918, -523, -1573, 2488, -813, 147, + 1540, 3795, 1390, 1061, -78, -10, 574, 2620, + -1143, -512, -582, -1496, 736, -4323, 786, -2873, + -1342, 3932, 14508, 12635, -899, 1730, -673, 386, + -676, 2787, -2780, -2960, 375, 475, -2188, 2250, + 851, 788, 268, 1264, 2973, -94, 1062, 1006, + -697, 669, -635, -986, -4848, -1486, -6, -3914, + 6267, -1560, 8, -503, 5273, -3545, 69, 15146, + 2263, -1490, -548, 1740, 1636, -892, -895, 769, + -471, 226, 6497, -2466, -2037, -1068, 1075, -902, + 13668, -1213, 12424, -3523, -124, -1090, 972, -1134, + -494, -2568, 881, -3081, 369, -254, -618, -914, + 443, -1254, 658, 1322, 546, -14, 778, -116, + -378, -802, -268, 48, 1140, 25942, 503, -637, + -871, 1050, 298, -187, 387, -406, 343, 212, + 110, 723, 695, -47, -50, -568, -66, 347, + -1588, 20, 701, -485, -98, -787, 4502, 1046, + -1628, -2526, 185, 1016, -256, -700, -403, -154, + 103, -752, -689, 2084, -1463, 2294, 360, 17590, + -698, -1262, 788, 116, 755, 751, -440, -610, + -469, 1235, -2314, 1240, -308, 553, 1065, 24442, + -733, 667, 4, -484, 93, -263, -361, -278, + -1524, 176, 1311, 1561, 435, -436, -1079, 260, + -366, 472, -1049, 647, 158, 302, -931, -36, + -990, 736, -444, 1077, -1560, -251, 148, 1000, + 1096, -300, -224, -307, -17646, 39, 206, 74, + 505, -3051, -1285, -793, -724, 718, 324, 803, + 874, 6062, -2235, -3321, -550, 9264, 3483, -4172, + -4024, -471, 858, 2682, -1078, -1922, 2088, 1135, + -878, 545, 2205, 836, -1088, 547, 12461, 2222, + -828, -3841, 4797, -2360, -2510, -4029, -2213, 13736, + 1032, -958, 1895, 264, -1499, -2066, -241, 1324, + -224, -792, 776, 2130, 2600, -2276, -4239, 3260, + 1610, -1620, -1220, -2752, 979, -2028, 19626, -2146, + 684, -729, -235, -289, 588, -600, 245, -879, + -816, 413, -87, -1158, -246, 69, 970, -111, + 500, 1097, 1087, -138, -1356, 30, -434, -452, +-22802, 177, 492, 206, -257, -854, 1445, 37, + 1384, 97, -258, 811, -222, 53, 548, 1744, + 124, -1031, 1076, 186, 453, -173, 1180, -2235, + 583, -392, -1542, -726, 2937, -3635, -856, 1446, + 7796, -2779, -962, -2277, 1651, 1960, -1460, -1277, + -9794, -288, 2459, 2350, -2521, 84, 578, 2286, + 480, 1620, 6421, -200, 170, 1513, 198, -1001, + -491, -1000, 161, -482, 607, 214, 743, -292, + -394, -192, 92, 73, -415, -316, 593, -42, + -346, 456, 44, 950, 129, -189, 806, -221 +}, + +.cb1108s0 = { +-32768, -828, 9569, 331, 6938, 3122, -1008, 2847, + 646, -5690, 1712, -795, -4406, 1368, 307, -526, + -2206, 26, -210, 1358, 746, 1920, 667, 3866, + -413, -720, -4328, -2475, -1189, -863, -3809, -5052, + -8567, 2859, 1915, 4895, 12440, -13002, 2757, -5969, + 4054, 1100, -9430, 4930, 10266, -1522, 7092, -8778, + -1968, 4325, 8440, 3888, -1966, -688, -2455, 2966, + -2380, 1682, 4956, -2310, -3706, 404, 6774, 17562, +-12437, -2667, 4864, -9411, -6436, -9316, -903, -5526, + 3463, -1690, -5250, -12568, 2338, -1310, -3019, 776, + -641, 3483, 54, -10732, -3878, -691, -17615, 4530, + 10267, 7830, 8488, -12624, -4514, -17183, 7070, 3115, + 4176, 383, -4558, 410, 6379, 6242, 4702, 4853, + -217, 446, -3811, -2396, 244, -2120, 3275, 5122, + 180, 4523, 8680, -1868, -6164, 2636, -5056, -4039, +-11618, 4014, 11349, -2616, 8240, -5119, 1988, -2552, + 6060, 3206, -662, 2686, 1116, -10447, -3004, 650, + 7811, -12148, -327, 856, -916, -397, -600, 4621, + 3011, 5539, 5417, -2374, 9667, -4714, 7821, -2819, + 573, 4492, 1882, -26770, 1486, -6963, 1103, 2515, + 8196, 1849, -7492, -5243, 2106, -5290, -11000, -1410, + -3448, -8548, -4536, -7730, 3083, 6109, -14458, -8624, + -381, 7840, 4694, -3906, 8223, 3315, 5849, 13112, +-13132, 6081, 11801, -7624, -376, -6372, -6817, 6834, + 1760, -1435, 1072, 3505, -1494, -709, 5786, 454, + 1807, 2650, 7728, 1357, -1002, -5366, -2368, 2052, + 333, 6312, -336, 8274, -1653, -4309, -6630, 2841, + 2448, 8398, 5376, -7248, -1474, -1842, -4119, 838, + 501, -4206, 4052, -1250, -20943, -3338, -592, -2973, + 7057, -128, -3235, -4313, -2510, -11313, -4925, 3103, + 1448, -5186, -1322, -16815, 1956, -7950, 2641, -2890, + 4396, 2322, -1381, -1911, 448, 2543, 3535, 782, + 3719, -624, 1610, -2843, 7583, 1794, 700, 3107, + 4528, 5461, 2540, -1074, 5976, 741, 576, 4426, + 4400, -4920, 5724, -3734, -1186, 10645, 1100, 10537, + 2828, 11670, -8391, -32572, -9405, -6807, -875, 2277, + 736, -4546, -18693, 1204, -1083, 3422, -3328, 6013, + -2992, 5812, 2744, -11668, -2519, -2384, -3635, 6532, + 6874, -2820, -5222, -12261, -14266, -6663, -1150, -2032, + 2099, 4642, 1638, -4162, -644, 249, -3133, 11830, +-10712, 12370, 4818, -1924, -5639, -6448, 2455, -4898, + -613, 1760, 2393, 1414, 7039, -7018, 5901, -2900, + 3786, -3230, -3718, 3514, -4040, -4676, 6367, -1449, + -2758, -2888, 4066, -7140, 408, -7656, 3156, 19919, + -1858, 6671, 352, -3355, 3074, 5524, -1429, 1954, + -6664, -10082, 4405, -1598, -806, 1779, -6913, 7062, + 5064, 6518, -1042, 3400, -5530, -1192, 590, -3298, + -772, 571, -6239, 9810, -12380, 1302, 1344, -3430, + 3830, 4106, 5792, -6196, 224, -2604, 3954, -12551, + -5539, -8306, 1801, -4521, 3578, -4349, -5716, 4960, + 3620, 1516, 5779, 5550, -3710, 3329, 10542, 4198, + 5148, -3291, 196, 6232, 6943, -1303, -10306, 1862, + 6547, -1544, -2996, 2868, -4389, -6894, 28557, -13130, + 1397, -2331, -4076, 2870, 3592, 6613, 265, -4790, + -3514, -3152, 8710, 230, 3142, -1264, 1822, -769, + 6168, -1792, 2189, 2660, -2664, 3402, -533, -3100, + -476, -1164, 6092, -2930, 3372, -5895, 8507, -918, + -4716, -1582, 23959, 1506, 2360, -117, 2029, -452, + -6575, 964, -13132, -2838, 3800, -3355, 3168, 5230, + 11116, 826, -1711, -3546, 7398, -4092, -2884, 743, + -1784, -3824, -3437, 1050, -3306, 928, -5109, -7999, + 1581, 8609, -4662, -3594, -1618, 9929, -3982, -5591, + -8789, -1444, -12011, 1304, 12668, -5138, 10837, -7951, + -4089, 3921, -5375, -2486, -2590, 11398, -80, 7734, + -4547, -11286, -7098, -7758, 5303, 7380, -11266, -11138, + -8676, 30, 6328, 597, 7852, 3144, -3933, 15142, + 3954, 12197, -507, -1667, 5517, -4187, 709, -1330, + 2094, 4739, 1341, 8276, 8544, -10107, -10151, 3641, + 771, 4798, 4839, -3254, -9246, -7304, 14850, -18155, + 3068, 4993, -4930, 10985, 6270, 8528, 5904, -13010, + -7824, 1300, -706, -156, -4228, 302, 9962, -3087, + 4472, 4541, 13179, -6576, -2541, 8284, -51, 5366, + -4369, 289, 3890, -3671, 1894, 21820, -3031, 5336, + -8412, 2487, -1211, -6759, 1292, 3749, -8904, 638, + 6863, 154, 1145, -684, 6648, -3874, 2005, 4670, + 4408, 4191, 3984, 632, 2957, -1532, -3974, -2576, + -1636, -3714, -136, -4946, 3900, 367, 27072, 1864, + 1426, -3321, 860, -1768, -2009, -3436, 2666, -9899, + -1328, -2330, -3078, -3258, -4600, 5604, -5248, 1703, + 4403, -4781, -8275, 6717, -3860, 10980, -10634, -8360, + -2291, 20311, 7602, -4028, 483, -4886, 2677, -4921, + 6065, 5393, -2145, 6201, -472, 1796, 2869, -3578, + 3053, -2342, -3193, -2589, -3215, 1322, 536, -164, + -314, 4800, -1903, -1338, -11833, -23399, 5562, 4440, + -1864, 2520, -4251, -1464, 5053, -8553, -3852, -5932, + -849, -7113, -3493, -5338, -1671, 1496, 4504, -1830, + 5716, -210, 1397, -2060, 2242, -583, 2604, 5355, + 13938, 13150, 1346, 2649, -1527, -4568, 8891, 7399, + -6492, -10371, -4885, 13056, -8262, -1267, -2959, -868, + 5941, 299, -601, 8834, 1436, 5404, 1914, -3775, + 980, 8848, -2270, -1952, 6902, 8642, -25725, 9556, + 14540, 1998, -13157, 308, -13844, -10126, -2147, 8296, + 1772, 1094, -9712, -8560, -7552, 5527, -1446, -1097, + -5798, -17270, 2860, -210, 2136, 175, 729, 11775, + -5154, -4202, 13342, 3977, 14494, -5659, 9105, -11067, + -3694, 4794, -593, 6817, 1875, -4975, 3663, 4141, + -8317, -8932, 2127, -4176, 1136, -148, 7640, 8127, + -744, 2354, 389, 1600, -6475, -4558, 10735, 11407, + 3896, 13098, 1814, 5191, -3850, 2629, 18430, 8343, + 4630, -4624, -702, -3834, -2276, -2894, -1556, 1437, + 424, 5652, -6260, 2387, -5845, 7496, 10657, -2754, + 4806, 1169, 1308, -4114, -5347, 15076, 5686, 7287, + 3004, -6254, 5186, -14096, 10323, -1974, -9355, -5544, + -986, -5998, 261, 4494, 2467, -1911, -603, -4548, + -1344, 1995, -1603, 10464, 5222, 3714, -5342, -8039, + 12530, -26465, -1813, 4044, 746, 8123, -12078, -4703, + 2971, -4487, 2556, 3904, -2518, 1504, 5774, 5431, + 1120, -934, -5202, -6826, -8774, 7156, -2392, 10643, + -2918, -4298, 3361, -3758, -894, 5828, -203, -4905, + 6480, 11771, -19830, -17545, -4920, -17263, 10066, 10125, + -8980, -19719, 23554, 27907, 2607, -7014, 6128, -23759, + -4802, -7099, 874, 13103, 21667, -8475, -12938, -13122, + -3694, -18860, -3518, -3586, 12658, -793, 10661, 6925, + -730, -11373, -7845, 94, -2627, -6044, -2213, -4381, +-10198, -5816, -56, -4349, 3722, 3911, -1719, -2513, +-13290, 3218, 105, 1876, -76, -1107, 2563, 4520, + 10288, 5862, -7738, 6180, 9863, 1380, 6756, 2632, +-18798, 9314, 7190, -7454, 432, -15141, 8462, 2128, + -2386, -2710, 292, -751, -3125, 6147, 4941, 3146, + 3046, 120, 321, -5884, 5105, -4300, 6264, -317, + 1667, -694, 7950, 5639, -3284, 1089, -6456, -14694, + -3527, -1104, 4313, -20858, 7920, -10782, -13536, 933, + 4523, 2640, 2118, 97, -614, 9834, -9515, 232, + 5086, -6720, -1529, 568, 3139, -3665, -8567, -13771, + 6274, -4370, -5653, -8920, -7667, -9391, -6653, 12489, + -3666, -5103, -12324, 4796, -540, 10396, 3668, -3467, + 7124, -4398, 87, -12139, -204, 1213, -2190, 11948, + -2641, -2434, -5647, 2819, 3148, 3558, -6455, 3705, + 1644, -3090, -4225, -5998, 112, 17789, -7220, 2166, + 4153, 4516, -1100, -1667, -1402, -8837, 6344, -1586, + -3451, 2357, 616, -392, -8163, -11579, 6160, -2783, + 7895, 11321, -11847, 8070, 5231, -6496, -3172, -3470, + -2960, -11437, 465, -470, -2568, 11197, -9417, -4117, + -1162, -1893, -2361, 551, 14478, 3510, -1372, 3117, + -8236, -2904, 14556, 3191, 200, 2166, -13974, 2718, + 3946, 2444, 1982, 5320, 2087, -2222, 1573, 742, + -8828, -3917, -11080, -241, -8472, 6119, 290, -2364, + -3163, 1923, -1964, -582, 2564, -5566, -6411, 2069, + 7392, 9115, 25316, 1504, 2540, -814, -1746, 566, + -1580, -2290, 170, 698, 105, 9567, -6714, -584, + -4934, -379, -491, -978, 4580, 1180, -3355, 1882, + -4343, 4817, 1503, 9968, -8878, -4908, 3419, -4818, + -2254, 6694, -4368, -10849, -5093, 4510, -3129, 152, + 1926, -4490, 1510, -17764, -6699, 962, 3474, 4981, + 25, -7128, 1432, 5386, 3108, -4545, 1092, 1663, + -1363, 3076, -8916, 6158, 244, -1181, -825, -933, + -5570, 17221, -535, -2892, -5031, -1297, -3010, 5840, + 678, 748, 3944, 1630, -3648, -5457, -2618, 876, + 6655, -2834, 2597, -6667, 1330, -40, -4423, 6257, + 743, 6083, -584, -3742, -1401, 1779, -5166, 4559, + 5558, 8588, -6476, 7521, -1561, 4950, -778, 3564, + 11403, -1010, -3151, -14151, -1020, 2595, -3278, 24555, + -4859, -909, 2314, 1301, 2098, -5664, 3938, -4050, + -203, 3368, -2580, 3061, -9266, -6263, -6748, 3890, + 1950, -329, 1050, -1106, 588, 23705, -661, 6913, + 722, -5820, 2147, 3789, -1689, 661, 5389, -8519, + 1152, 3800, 7160, 5234, 1343, 3218, -2900, -391, + -4258, 5084, -4783, 7262, -10013, -811, -5252, 6474, +-17338, -2388, -2596, -8715, 5836, 9523, 639, 4652, + 3071, 3114, -1648, 1563, -931, -10143, 4394, -2838, +-11900, -1012, 841, -5812, -3048, -2715, -196, -5794, +-20022, 1949, 3464, -770, 2200, -3564, 1975, -6242, + -1937, 3954, 5678, -2744, 1888, -3825, 5770, 3869, + 8315, -7386, 1318, 1302, -5534, -4554, 924, -3804, + -4292, -22757, -7972, -7469, -3543, 7858, -10125, -2637, + -4765, -10644, -5944, 1159, -3293, 4363, -1219, -12248, + 5060, -7232, 6947, -1609, -3037, -5084, 6580, 15873, + 5336, 7295, 2386, 2961, 4655, 9714, 5080, 11635, + 1790, 2897, 687, -914, -692, -6653, -8562, -1412, + 244, 4478, 1650, 7175, 1046, -6689, 3693, -3520, + 6046, -1336, 1976, 16822, -1176, 792, -1733, 8286, + -7359, -2402, -8536, 1392, -3271, 6580, -4939, 1562, + 595, -4237, 4872, 4266, -1798, -6589, 7457, 4207, + 9978, -3996, -2236, -3078, 1861, 10101, -2394, -3250, + -7619, -7082, -14305, 5664, -1337, -11019, -3839, 10190, + 7249, 3086, -1782, 24, -3566, 10769, -4102, -6408, + -688, -8987, 3018, -5942, 7478, -368, -7931, -3018, + 6766, -78, 5705, -3264, -1100, 4850, 4518, -28, + -6276, 4905, 7094, -4394, -2846, -88, 434, 2039, + 352, 9827, 12372, 1207, -8561, -4476, 1496, -4927, + 2087, -6730, 1134, -81, 57, -8701, -2918, 3953, + -2844, -1842, 4804, -5315, -401, 7060, -16397, -4802, + -9849, 17542, -11715, -12432, -6676, 9323, -13189, -5761, + 8054, -620, -7431, 3726, 17790, 7880, 251, 2983, + 3736, 7118, 17197, 8613, 1445, -15290, -16184, 11084, + -4971, -5922, -1893, 9067, 9321, -8139, 714, 182, + -3138, 7258, -1874, -2781, 10800, 2915, 5316, -5206, + -2581, 10219, -484, 862, 119, 6628, 1514, 3883, + -880, 7586, -2573, 3279, 3801, 4492, -3850, 9416, + -38, 7518, -574, 4052, -1136, -668, 9672, -9536, + 2551, -4223, -1074, -3616, 8446, 158, 3262, 7965, + 1311, -8634, -6786, 700, 4973, 917, -754, -1156, + 6054, 2067, 10757, 421, 1030, 11351, 2149, -4286, + 12075, 4593, 1193, -5290, -8566, -2965, 6824, -6238, + 2392, -3395, 5350, -2789, 7529, -1873, 3032, -1494, + -2703, -18535, 1583, 9539, 2556, -4422, -6079, -2699, + -7860, -4573, -8236, 4281, -1079, -17578, -2840, 7468, + 4675, -5002, -1268, -1529, -8222, 8285, -766, -4314, + 6048, 11507, 5046, -2444, 3186, 1732, 7872, 6598, + 2828, -2920, 8278, 13263, -10204, 1334, -5552, 10532, + 5412, 2554, -10076, 1128, -3959, -3210, 4091, 1824, + 4984, 5558, -2204, 2080, -3802, 6614, -7380, 3612, + -4624, 6366, -1795, 4038, 6227, -4312, -4910, -2127, + 15077, 4144, -16885, 3757, 2303, -670, 5625, -2590, + -2594, 2491, -3174, 4199, 1152, -1532, -7308, -8578, + 6431, 2975, 6032, 3037, -7451, -2643, 5503, -7856, + -2451, 5309, -3678, 8145, 1864, -8341, -15575, 7716, +-10337, 8935, 12350, -10418, -4092, 734, 10400, 10934, + 5724, 1778, 5836, -3203, -10700, 2766, 4178, -18135, +-16589, -5465, -5005, 7239, 25480, 7310, -6408, 6142, + -7748, -1423, -4318, -321, -2899, 3728, -3184, -3578, +-11598, -1223, -8554, 656, -3945, -4084, -724, 301, + 9539, 9695, -1799, -2602, -1379, -5282, -4709, 11858, + 9562, -7508, 4886, 896, 5780, -160, -12724, -9598, + 1220, -5411, -5072, -6476, -11763, -104, 9311, 5230, + 591, 4342, 263, 13198, -17801, -1892, 2619, 18194, + -2080, 16536, 18497, -25926, 25541, 66, -6648, 1627, + 2794, -3790, 9424, 1387, 20702, 5260, 5211, 1702, + 1019, -11143, -6501, -18711, 10869, -4204, 4994, 1722, + 8569, 3670, 4386, -16874, 8876, -2297, -2743, -4562, + -9207, 8033, -346, -3586, -9451, 3242, 1552, 4278, + -6787, 7118, 3630, 4602, -7371, -12789, -10424, -14922, + -3010, 1885, 4144, -4490, 4074, 7796, -1201, -7244, + 2675, 1221, -7060, -12828, -3520, 1983, -4615, 8207, + 1606, 517, 3646, -7252, 816, -3690, -674, 13100, +-16254, 4727, -8184, -968, -5366, -2288, -20260, 1174, +-19384, -4199, -5292, 582, -13118, 1836, 1698, -2034, +-14601, 6642, -10530, 482, -851, 9968, 7050, -13366, + -8354, 4740, -20050, -193, -1881, -1205, -4042, 7067, + 12872, 5846, -4792, -1833, 2504, -3222, -1607, 2634, + 4587, 6761, 1549, 1124, 9427, 3978, -8305, 7524, + 2507, -5744, 3238, 5238, -3664, 694, -28496, -1674 +}, + +.cb1108s1 = { +-10979, 8698, -630, 4660, 3060, -7292, 10140, 11942, + 1448, -5820, -3144, 3100, 10575, 6888, 3505, 9996, + 2787, -484, 8057, 1503, 6329, 3074, 3954, 9419, + -736, 2333, -1858, 3264, -4026, 16130, -14501, -5284, + -472, 850, -7258, 1542, 1473, -2348, -7055, -9574, + -2275, -4383, 7542, -360, -2945, -3878, 28, 809, + 600, 2246, 587, -1779, -3456, -737, 3242, -2523, + -1862, 6127, 899, 1070, -15614, 10990, -3084, 9546, + 7339, 8899, -1490, -10379, -9193, -3857, 8289, 7261, + 12489, 7814, -6458, 1223, 15486, -10960, -1880, 4922, + -7819, -527, -2370, 3687, 1358, 10367, -14266, -1496, + 1060, -9325, -5582, -3947, -17536, 1470, 4878, 10793, + 2904, -2566, -4995, 6549, 6141, 11048, 3177, -494, + 9087, 797, -2575, -5616, 1197, 2966, -11287, 4658, + -504, 4571, 1814, 18830, 26254, 2399, 8750, 2656, + 8206, -12987, -9119, -1027, -457, 1228, 6137, 2322, + 1732, -5694, -892, -249, -178, -7009, -4368, 402, + -5564, -5183, 2470, -4745, 2788, -3255, -5181, -706, + 40, -4915, 8926, -3633, -2455, 15054, 5376, -867, + -7270, -979, 7053, -7433, 13749, 5039, -2234, 8474, + 7031, -3917, 5127, -7602, 580, 12067, 2252, 149, + 86, -582, -5729, 2193, 4178, -9195, -11824, 3897, + 1298, -1044, 6450, 1885, -19562, 6205, -4610, -2544, + 5192, -4885, 5021, -2373, -102, 7358, -2434, -3512, + -4048, 3070, 45, -1344, 202, -2189, 448, 1172, + 2939, -547, 1003, -6370, 3643, -1157, 3932, -6044, +-12882, 1959, -1574, 2574, 14854, -16317, -6627, 505, + 1102, -9361, -8087, 7525, -1466, 284, 3756, -383, + 5147, 5060, -474, 531, -6144, -1872, -1206, 527, + -4861, -12410, 7508, -7226, 5046, -12233, -4153, 4628, +-14402, -5265, 534, 1528, -13408, -62, -18757, -1280, + -9301, -10254, -8990, -6335, -7724, -3394, 1951, -13271, + -1389, -5274, -4616, -9643, -10295, 1332, -5618, -10737, + -7536, -9314, -7006, -760, 7694, 2955, -404, -2800, + 15250, -3828, 5994, 5408, 8411, 16568, -7280, -6901, + -222, -1554, -862, -1871, 939, -3678, -4348, -3200, + 3220, 1614, 8598, 8162, 1749, -7378, -1658, 931, + 3870, 9183, 1509, -5068, -17, 5733, -8121, 2769, + -3195, -3296, 8940, 2828, -2470, -2448, 7413, -2851, + -1058, -4505, -9653, -5074, 73, -3286, -4014, -1760, + 2562, 13690, -3464, 5438, -3394, 16997, -2944, 291, + 4224, 1175, -2237, -6894, -5479, -1291, 3390, 5455, + 898, 3461, -7914, -4785, 1879, 1059, -3721, -5796, + 5054, -3931, 6315, -2460, 1909, 573, -3373, 3052, + -178, 986, 572, -5976, 5781, -4928, -10539, 580, +-18727, 757, 1759, -4049, 2232, 1890, 4115, 699, + -2934, 4926, 2391, 10848, 5103, 4340, -1518, 2288, + 2283, 8886, -5131, -4429, -4384, -3265, 11933, 3993, + 11474, 3721, 1532, 976, 6112, 1954, -2360, -1783, + 2080, -6356, 2482, -4646, -1992, 1590, 1790, 3290, + -2312, -564, 508, -1688, -7522, -9263, 3059, 1883, + -3005, -1303, -9146, 10282, 1333, 4692, -2083, -15792, + 2208, 1128, -11574, -7149, -1126, -4995, 18963, -6262, + 5045, 2179, -822, -1249, 10092, -338, 5744, 1635, + 2535, 6114, -1339, -8337, -4370, 4288, 2468, 3051, + 12491, -9554, -4034, 522, -1085, 5852, -2759, 4918, +-10717, -194, -11376, 3059, 12075, 1037, 5260, 816, + 5918, -1987, 7924, -6022, -10374, 11607, 25035, -11598, + 16894, 2458, -5461, -2039, 385, 6002, 7574, 1229, + -834, -1032, -7453, 2694, -1447, 3632, 4215, 3541, + 2936, -3294, 1001, -6451, -4595, -11682, 7880, 2261, + 3786, -2849, 2276, -826, 3742, 7586, -334, 2837, + -2331, -12849, 1170, -1150, -5253, -997, -8996, 8124, + 2234, 904, -2294, 3144, 7352, -5452, 1536, -8800, + 1886, -18282, -9787, -8066, -12066, 1536, 4460, -1345, + 1418, 7471, 13451, -7299, 5507, 6795, -184, 8905, + -2040, -4933, 4998, 7317, -6667, -5134, 9094, -8561, + -2534, 3422, 2278, 3118, 205, 5811, 2247, 5946, + 1078, -2105, -6946, 170, -1625, -4734, -1447, -4329, + -4553, -2230, -8738, -15289, 7311, 6665, 5047, 1984, + 11896, 13922, -10490, -9313, 1424, -2991, 1408, 335, + 8914, 3773, 8814, 7917, -4560, -114, -624, 8984, + -1598, -580, 3233, 590, -2172, -3162, -3985, 5394, + 13842, -11625, 73, 12826, -1204, 5119, 10304, -10006, + -2695, 1318, 156, 84, -760, -4638, -3804, 3041, + -782, -2994, -3113, 637, -3256, -5831, 452, -1204, + 1614, -11626, -4769, 10612, -8710, -20019, 10542, -4279, + 6912, -1429, 3812, 2844, 3903, -11622, -8954, 180, + 3898, 3858, 119, 1385, 4038, -5899, -969, -5454, + 13305, -6748, 5934, 8027, -7348, -3797, -29781, -4956, + 2037, -2331, -3292, 8254, 6597, 4446, -7848, 6250, + 1400, -1182, -4966, -3490, -1410, -2286, 3334, 350, + 9271, 2987, -934, -5702, -3881, -97, -671, 5108, + -133, 1302, 11630, -8858, -3027, -42, 3682, -1507, + 3992, 5641, 2778, -8698, -2509, -1360, 77, 2116, + 98, 2853, -6334, 5915, -1214, -2721, 8921, 1380, + -4158, -4315, -4740, -21049, 7044, 866, 2094, -9442, + 9003, -5147, -4897, 3407, -11558, 4280, 4508, 6697, + 1612, 1508, 8547, -14257, -151, -9530, -7250, 11321, +-14430, -4944, -2488, 1349, -248, -1490, 1749, 3970, + -5830, 20767, 4642, 3236, 36, -17079, -11099, 5996, +-10759, -39, 7822, -7527, -1431, 179, -3841, 2298, + 1407, -241, -2303, 9244, -3626, 6609, 1959, -518, + 368, 1678, -5334, -5849, -4986, -2363, 607, 2809, + -1006, -7695, 10022, 2216, -8992, 4282, 807, 14707, + 9528, -11065, 3014, 3157, 5597, 1139, -1298, -3642, + 7839, 860, -4336, 2624, -4171, 1791, -2825, 5362, + -529, 1494, 337, -4487, -671, 5360, 3283, 4933, +-14692, 4033, -4365, 2713, -6903, -1784, -10862, 6173, + 5278, 14859, -852, 10020, 12304, 8898, -3089, 9183, + 1841, 8276, 4929, -261, -1264, 615, 3615, 14535, + 6557, 519, 4228, 7382, -1805, -4529, 4992, 4277, + -342, -9610, -5193, -7022, -23264, 2402, -740, 2875, + -5052, 1983, 4987, 3336, -3806, 1335, -2868, 846, + 7652, 936, 3510, -4570, -3010, -8805, 6177, -4413, + 5879, -15204, -1632, 13416, -4543, 3838, -9293, 1744, + 920, 15544, 3820, -5852, 3935, 2357, -6486, 1932, + 12044, -6374, -2545, -2389, 2755, -8073, -8203, 4659, + 4286, 16128, -987, 434, -4495, -4428, -4816, -10329, + -4529, -13408, -13283, -1136, 4002, -1271, 3547, -5274, + -5577, 701, -365, -2764, 370, -369, 2611, -832, + 3862, 4604, -7786, 11170, -1453, -1568, 10758, 168, + 402, -1985, 1436, -8858, 10080, -8559, 3998, -4310, +-13478, -3104, -11458, 506, -18194, -3724, -6768, 7960, + -4213, 1121, -1658, -1141, -1874, -383, -5090, 748, + -1032, -1207, 1046, -1865, -2387, 2126, -3672, 6733, + -2794, 3797, 15562, -11989, 170, 6129, 658, 929, + 4800, -4296, -955, -2189, -188, 3180, -118, -766, + -2182, -6928, -2254, 6615, -4422, 6324, -31, 3742, + -5832, -5022, 4671, 1574, -6309, 288, -2768, -2492, + -4818, -5192, -248, -3236, -429, 120, 1182, -10486, + -2964, -3713, -5978, 11817, -20052, -6525, 2054, -879, + -602, -2843, 7244, -1372, 417, -172, 3322, -6556, + -7021, 5842, 7357, -2799, 3660, 7579, 4682, -2242, + 73, -9247, 21061, -2060, -3614, 2486, 4793, -2959, + -510, -74, -5982, 2274, -4147, 3260, 1994, -1678, + -7494, -13624, 2560, -7375, -896, -4945, -2838, -11096, + -1969, 5879, 444, -3220, 14630, 4915, -2376, -8475, + 9854, 11380, 11060, 1534, -14413, 4366, -9544, -10646, + -7654, -17916, 3481, -3240, 1776, -2436, -8403, 3679, + -1914, 12537, -5540, -5294, 5995, 5968, -2609, -16882, + 789, -9506, -10075, -12142, -7580, -7090, -2046, 11065, + 7617, -3503, -2013, 3516, 6347, -195, -3119, 2444, + 14, -4998, 767, 4976, -3974, 9038, 579, 1804, + -8206, 32767, -5633, 1018, 13388, 996, -12737, -3179, + -2058, 13663, 1274, -4475, 7386, -1698, 17927, -6118, + 15942, -2922, -3434, 5903, 6333, -9149, 14140, -1488, + 2999, 1151, 2361, -1935, -10243, -11566, -5319, 965, + 5146, 3652, -441, -2173, -3484, 3685, -13595, -1703, + -78, -1408, 18517, -3788, -3266, 3162, 996, 19950, + -8560, 4989, 6593, -5329, 2950, -13896, -3524, 5590, + 4055, 6084, 2493, 12659, -5786, 4858, 7252, -7111, + -7318, 5411, 7393, -8714, -3454, -1562, 1919, -49, + -680, 7285, -398, -2956, 7100, 5563, -538, 1719, + -16, -3824, 437, -6842, 1504, 5694, 1214, 3209, +-15562, -4365, 9329, -25577, 1425, -2598, -8389, -6891, + -3275, 3304, -3993, -6391, -934, 7862, 4844, -134, + 9890, -4646, 2468, -9901, -4111, -3080, -5056, 476, +-13099, 1447, 205, -2424, 7098, -12075, -4646, -13725, + 8367, -2910, -8461, 1387, 3553, -10228, -2771, 4698, + -6483, 12234, -8086, 3329, 2374, 452, -1805, 5083, + 2014, 164, 7143, 81, 6062, 2838, 5318, -4982, + 1440, 2014, -3273, -6658, -798, -3204, 1398, -599, + -5834, 2070, 4644, -17238, 390, -1684, -4932, 8961, +-12217, -3079, 6574, 1387, -5991, -7803, 1285, 7439, + -395, -3048, 2038, -847, -690, -5127, 2228, -4180, + -3499, 530, -584, 9884, -323, 446, -15644, -9162, + -1683, 3643, -3578, 2634, 496, 8097, 109, 1056, + 1422, 5452, 6517, -449, -2389, 302, 6827, 1507, + -3106, -7188, -4909, -441, 12955, -3933, -5322, 5155, +-23171, -2780, -2655, -4048, 12844, -3709, 6555, -5700, + 3780, -6566, -4415, 11091, 11291, 6443, 9146, -796, + -1420, 5600, 12098, -5790, 6619, -10474, -12177, -5890, + 21700, 11148, 3427, 3130, -5727, 14646, 13953, -2721, + 1404, -3102, -4693, 4762, 1757, 2533, 3998, -530, + -758, 5301, -1426, 8948, -720, 6877, -3863, 2396, + 5266, -685, 890, -7188, 2742, -270, 8125, -804, + 32292, 6964, 8599, -3466, -1080, -8423, 2070, -295, + -157, -5432, 152, 2478, -3738, 1104, 1500, -5290, + -2463, -6386, -2537, -2331, -3290, -2398, 159, 6588, + -2547, -2424, -2184, 8316, 5670, -5608, -2600, 2659, + 166, 14828, 2622, -10490, -16378, 64, 434, 4576, + -3010, 2479, -6798, 3431, 360, -1067, 3421, 664, + 4029, -4050, -240, 3875, 672, 3587, 501, 2494, + -48, 9997, 3259, 8551, -7624, 17342, 10765, 4328, + -3721, 1729, -2844, -6330, 5114, 15589, -261, -7554, + 2708, 7260, 5852, -8736, 436, -6160, -588, -5919, + 5752, 3127, -4558, 540, 74, -4048, 3735, 7873, + -2869, -544, -111, 5182, 1032, 2315, -159, 5105, + 4106, -494, 678, -4756, -3865, -7389, -2492, 7193, + 5146, -7926, 12043, 11137, 1719, 2307, -5476, 12679, + 7996, 726, 933, 3222, 7515, 678, -5858, -2716, + 1503, -3014, -2125, 4982, -4984, 467, 986, 5450, + -1472, 5314, -1285, 218, -3411, 4511, 8047, 4268, + -8307, -10587, 17200, 3303, 7553, 5361, 1108, -7982, + 8240, -5856, -3376, -3952, -2884, 4401, -7252, 4078, + 7538, 3420, -13834, -1139, 10742, -2536, 636, 7758, + 4282, -3505, 1190, -7382, -8164, 5306, -408, -5005, + 2776, 7806, 4781, -7903, -2370, 13884, 542, 5643, + 6948, 6471, 2699, 815, 4454, 1882, 2290, -3856, + -3086, 8215, 3234, 4444, -1580, 2835, -3083, 6706, + 7409, 4626, 2658, 2308, 7965, -1034, -2584, 344, + 704, 12280, 10344, -8032, -4410, -6168, 6860, 7977, + -5630, -6680, -5001, -6199, -10378, -1764, -3322, -4284, + -1048, 2721, -11738, -11800, -7975, 2754, 3424, -7641, + -2245, -4945, -194, -1948, -2850, 4111, -21846, -8750, + 4306, 24494, 10428, 26998, 4976, -2701, -3283, -723, + -1539, 6758, -9730, -3517, 6401, -4546, -410, -9900, + -4947, 6996, 10983, 5110, 19948, -78, -1794, 11051, + -14, 316, 6447, -20430, 9363, 9062, -2134, 13711, + 6448, 6655, -5232, 4610, -10352, -3042, -8713, 5777, + -2438, -2602, -7293, -755, 6736, 2960, -3676, -2882, + -9806, 1342, 1242, 2122, 2749, 631, 6502, 2266, +-12996, 13620, 19762, 8096, 702, -4394, -8668, -1460, + -3228, -173, -6239, 4643, -1916, 4098, -2234, 1202, + 1763, 6170, -6320, 12984, -5936, 8301, 6021, 2191, + 466, -4044, -1913, -3458, 8197, -3249, -5935, 2383, + -4241, 4977, -4415, 704, 3488, -8356, 10229, 562, + 14, -4828, -3890, -7599, -4208, -3166, 1132, -16584, + -506, 1397, 6266, 3307, 5782, 2349, 3257, -3017, + 7814, 1216, 7440, -10096, 12698, 944, 1221, -1683, + 152, 6020, -7910, 3897, -6954, -9439, -9838, -3860, + -5383, -4228, -1980, -4045, 7442, -5504, 2145, 636, + 2857, -4538, -820, 4275, -2104, 5076, 5191, -363, +-23254, 1962, -66, 7550, 88, 8721, -1361, 7733, + -2661, 5282, -5112, -24, -975, -3200, -2235, 5144, + 213, -6340, -3974, 1266, -2383, 2432, -124, -233, + -3504, 10604, 806, -918, 11601, 19332, 206, 7456, + -8885, -9692, 3087, 3685, -2183, -7538, 11970, -5098, + -7364, -1173, -3099, 6532, -6850, 4622, -828, 390, + 467, -5364, 4442, -1878, 8949, -4340, -261, -2720, + 6659, 16184, -6552, -3736, -15416, 15774, -306, -4240, + -1807, -10304, 11073, 2743, 3974, -5557, -3499, 5315, +-10742, -378, -4517, -5949, -7664, -2830, -6510, -6096, + 2052, 3425, 1971, -3328, 5326, -1362, 1806, -14286, +-12774, 6058, -3365, -735, -2586, -18658, 6664, 9502, + -1590, 323, 6445, -17766, 14694, -9786, 3696, -4547, + 1601, 3645, -584, 910, 2516, 8197, 3898, 4306, + 631, -2020, 4309, -765, -6591, 2083, 8969, -1474, + -27, 9130, -5808, 8492, -135, 2230, 2296, -4509, + 4600, 4951, 1930, -2564, -5889, -1338, -11737, 6387, + -3649, -5447, -2462, -4751, -1012, 3523, -3504, -9510 +}, + +.cb1108m0 = { + -2417, 4623, 2916, -4257, 120, -10323, 1198, -10252, + -117, 8767, 3160, 2323, 1162, -650, 2237, -4171, + 2386, 432, 1627, -7255, 38, 124, -3658, -1558, +-11711, 10, 8146, 1700, -1975, -16731, 2397, 1056, + -2502, -2660, -2731, -2477, 1488, 1220, 4880, -1156, + 1805, -3, -3009, -6233, -2216, 3440, -3082, 2124, + 70, -2461, 1125, 1919, 11949, -2506, -622, 2209, + -702, 2685, 9183, -510, -2806, -1129, -1823, -1746, + -3600, 2298, -3360, 10793, -1714, 1662, -62, 395, + 14142, -261, -144, -9896, 11481, -884, -2197, 352, + -326, -453, -1984, 2027, -1466, 3290, 94, 3481, + 2533, 4401, 5492, 3803, 247, -896, -1688, -3166, + 1130, -1125, -1973, 322, 867, -1936, 714, -880, + 8, 2313, 23418, -1682, -677, 384, -2140, -386, + 920, -2523, -495, -1494, 3027, -707, 1172, -1403, + 2177, -2137, -885, -1035, -1637, 375, 2452, -3709, + -1171, 2069, 1095, -1937, -686, -956, 2034, 3410, + -3075, -359, -598, -2084, 18550, 1781, -45, 1400, + -1580, -13180, -609, -1376, -3145, -248, 5661, 6886, + -3915, -194, 9876, 1065, 3879, -1726, -837, -660, + -7467, -3055, 3516, 283, -1604, -625, 1165, 3023, + -1531, -1825, 1430, -561, -881, 1346, -129, -1817, + 851, -32768, -294, -188, -116, -646, 1176, 630, + 903, 417, -2487, 352, -789, 571, -127, -2054, + -2112, 418, 1631, 266, -270, 362, -2765, -1198, + -182, 3586, -1272, 1470, -66, -18384, -1230, 823, + 1171, 1350, 1101, 1410, -3730, 1535, -101, -3234, + 2315, -34, -458, 1361, -16497, -990, 1438, 2542, + -1193, 586, -1708, 2689, 2741, 6010, 4209, -5974, + -628, 1556, 2238, 6134, -3040, -2937, 2188, -1660, + 1137, 1316, -2650, 905, -502, -93, -1177, -31964, + -1170, 1504, -1284, -104, 168, 55, 3478, -161, + 2818, -484, -32, -1536, 1218, -854, -351, 4465, + 16922, 681, 4198, 419, -414, 6824, -3906, 11598, + 75, 4904, 1374, 64, -2692, -3759, 3065, -1397, + -202, -347, -2466, 96, 1035, -765, -258, 3711, + 1437, -18250, 566, 976, 2483, 4, -1096, 1906, + 3745, -2621, -2756, 1864, -560, 98, 821, -4094, + 5349, 1369, -5245, -2170, 2932, -1052, 3932, -413, + -400, 31206, 1125, 1631, 43, -764, 1666, 780, + 2036, -564, 64, 1311, -202, 843, -2030, 856, + 1766, -3163, -1158, -626, 316, 127, 1783, 1918, + 3384, -2887, -5885, 1763, 4910, -248, 17100, -3022, + -1880, -2927, -1287, -3308, -1767, -2622, -1460, -250, + 3597, -4526, 946, -1533, 1059, -8, -807, -1283, + 1436, -11184, 643, 398, -1565, 1983, -60, -9862, + 1219, 322, 3132, -2043, 1138, 6258, -3540, 790, + -923, -4692, -1401, 2733, -8918, 4905, 6181, 192, + 82, -1094, 4, -634, -1323, -2865, 1036, 1484, + -2461, -937, 414, 221, 2179, -438, 1273, -2690, + 18442, 2781, 1788, 2264, -1230, 4284, -4708, 1190, + -4810, -975, 230, -3728, 2504, 3602, 3488, 88, + 1322, 487, 2965, -3731, -2341, 5937, 8545, 1716, + 7308, 9017, 6426, 727, 3992, -4584, 388, 3714, + 1164, 18, 445, 1253, 398, -1989, -824, -430, + 745, -5447, 2176, -1986, -3963, 2861, 194, 17739, + 1891, -5368, 4172, 125, 530, -2766, 1179, 401, + 1759, -1609, 31234, 910, 1100, 1036, -948, -1101, + -614, 1768, -344, 840, -696, -842, 320, -1444, + -2560, -3199, 58, -2172, 1375, -3002, -821, -863, +-12096, -2484, -677, -2130, 4450, 3568, -3192, -1114, + -3218, 3121, -503, 5570, -561, 3896, 10566, -3065, + -2768, 1398, 1719, -2708, 1952, -142, 4777, -978, + 2238, -5780, -430, 1228, -1298, -2923, 4353, -1621, + -2368, -2908, -8012, 4398, -502, 518, -6964, 622, + -377, 3758, 6598, 4438, 6849, -7696, 470, 3585, + 466, -14664, 3438, 14706, -1944, -2544, -785, 3653, + 1274, 443, -694, 1968, -3499, 2855, -3930, -1210, + -528, 1931, 3849, -772, -2659, 4499, -3624, -540, + -1645, -949, -382, 979, 595, 165, 429, -80, +-20468, 1040, 544, 2545, -5010, -2122, -2840, -335, + -405, 404, -50, -2996, 1226, 519, -1046, 3745, + -2317, 6211, -14500, 9754, -5802, 5230, -3112, 1506, + 3741, 664, -902, 197, 2476, -3618, 2040, -1066, + 2338, -257, -2580, -293, 2740, -576, 2050, -865, + -3666, -2090, -1831, -32056, 658, 1549, 1602, 1728, + -534, 390, -1517, -627, -4025, -797, -2351, 2759, + -102, 2574, -56, 796, -232, -886, 1639, -2773, + 1007, 830, 5880, -2220, 762, -3834, -2865, -415, + 584, -3498, -4546, -16108, 344, -4072, 551, -5435, + 2007, -1418, 3838, -1662, 1981, 3545, 1424, 769, + 2135, 1705, -15076, -636, 283, 3386, 97, -1048, + -3933, 204, -8616, -556, -2936, 4241, 5100, 1777, + 98, 719, 6202, -1496, 708, 2160, -2396, 4060, + 1513, 2253, -46, -1823, -132, 709, -756, -944, + 575, 1070, -1583, 587, -24575, -1989, 874, -568, + 1040, 1116, -4002, 3196, 2826, 117, 1590, 2456, + 938, 112, -938, -1268, 5056, -2851, 2995, 2559, +-13121, -8374, 3593, -6684, 3663, 766, 747, 1016, + -921, 2241, -1942, 4269, -3312, -1012, 2340, 2781, + -3881, 2532, -1976, -1436, -3219, 420, 22088, -742, + -640, 3270, 1446, 1935, 1279, 1913, 1377, -3297, + -751, 4209, -1052, 2381, 2938, -1330, 2154, 2784, + -2420, 1270, 2334, -526, 1480, -435, 2206, 252, + -510, -1018, -1469, -1294, -950, 424, 1058, -2317, + -846, -20737, -1877, 88, -431, -1268, 116, -378, + -2326, 3115, -246, 30, -4725, 648, 2084, 14286, + -817, 2496, -1947, -4869, -9703, 1505, -2476, -2108, + 747, -449, 3002, -5464, -514, 1805, 2559, 2494, + 12782, -1232, 12091, 2118, 3996, 2592, 1058, 510, + -1384, -3050, 2533, -408, 5219, 3044, 3242, -185, + 2654, -3723, 16, -1723, 1823, 6144, -4806, 182, + 1772, 4841, 16390, -96, 2505, -7713, -5244, -3316, + -6776, 1448, -1470, 4238, 294, 889, -2372, -6281, + -2423, 5423, 2119, 2897, 1378, 817, -993, -1599, +-14662, 3014, -3397, -6182, -245, 4897, 5116, 2285, + -2863, 1174, 415, -6777, 3863, -6009, -4722, -119, + 606, -2247, 4447, 1064, -1935, 2705, -2629, -1144, +-11980, 3805, 882, 1634, 5446, -4300, 643, 3436, + 7632, 592, 998, 674, -2647, 4644, -6854, 1368, + -146, -3395, 10599, 1369, 3852, 1689, 2437, -3937, + 3405, 2517, 1895, -14092, -1142, 2570, 10163, 1608, + -2445, 850, -1678, 3112, -3465, 3138, 4413, -1973, + -4151, 1163, 1822, -3819, -1568, -407, -2642, 424, + 365, -3599, 164, -1448, 1062, 1536, 1590, -1982, + 200, 18572, -230, -638, -1253, 1650, 2280, 4945, + 4527, -2353, -4216, 3752, -3807, 3686, -4816, 2382, +-14833, 1306, 17246, -739, 2012, 3521, 1473, -1436, + 1514, -142, -461, 1038, 2462, 971, 1354, 1272, + 1787, 2420, -922, 3364, 2250, 497, 1349, 2795, +-32768, 425, 1874, -72, 2461, 389, -306, -1180, + -646, 251, 299, -2735, 577, 1055, 1826, 1620, + -1214, 1422, -901, -1273, -2367, -1241, 366, 521, + -433, 55, 4000, 3035, -1390, 2505, 1786, -15397, + 413, -5916, -234, 3559, -6776, -5068, 2251, 36, + -180, 596, 5744, -2450, -1276, -4786, -1872, 24, + 252, 464, 2833, -136, -25600, -33, 873, 2646, + 1471, -1336, -1330, -276, 1778, -242, -951, 1580, + -79, -858, -927, -4310, -604, 7568, -1713, -948, + 192, -260, -1334, -1116, -705, 638, 132, 1186, + -952, 1157, 428, 2039, 1568, 1778, 22453, -2190, + 2176, 1674, -3996, 1294, 1162, 274, 415, -2877, + 464, 505, -1842, -1066, -2241, -761, -291, 8, + -987, -104, 796, -32768, 1302, -809, 571, 1214, + 455, 686, 656, -1752, 886, -790, 644, -1114, + 2358, 11452, -4398, 1334, 13095, 3230, -1818, 4053, + -1990, -1093, 878, 3796, 2712, -1523, -1229, 1077, + 960, 1250, -75, -3233, -7734, 2783, 8430, -327, + -1428, -1687, -4092, 269, 3161, -569, -1267, 1774, + 2772, -2033, 171, -520, 1551, 3719, -3364, -220, + 1904, -1282, -2008, -818, 4261, -886, -19201, -3454, + -478, -2645, -2601, -2124, -3977, 2960, 1563, -432, + -989, 2682, 1734, -9085, 4614, -4454, 2535, -7201, + -220, -10022, -431, -7907, 889, -9658, 6653, 762, + -1827, 5886, 862, -1836, -430, -16363, 5709, 851, + 1814, 304, 5045, 1685, -1004, 5108, -5936, -3143, + 940, 1832, -270, -674, 1441, -241, 3222, -551, + -434, -69, -3584, 349, -1354, -12080, 3639, 5219, + 7583, -1023, 2078, 3263, -5807, -873, 4085, -5153, + -3623, -436, -4717, -1803, -6274, -2049, -247, 2516, + 1922, 10204, 2194, -1574, -535, 656, 1638, -3091, + 1156, 1377, -1220, 4956, -221, 4984, -1154, 4603, + -1618, -5655, -2583, 13494, -2442, -3968, 3086, 1098, + -1625, -13781, -12826, 2659, 3604, -702, -1900, -3508, + -6283, 2320, 1979, -2823, -4890, -1728, 2, -4402, + -437, 1932, -3272, 2853, -3018, 840, -632, -6691, + -484, 9579, 1008, 11677, -2814, -2029, 8048, -1170, + -7366, -2664, 3349, 1319, -1160, -1864, 606, 1568, + 5428, -4763, -2470, 2145, 1798, -502, -1538, -3736, + -1376, 1330, -3567, -78, 478, -743, 890, -800, + -44, -1832, -1761, -1022, -996, -846, 1188, -1042, + -3202, -2439, 1602, 3601, 564, 18338, -17, 1327, + -387, -1998, -1260, 3352, 849, -4780, 1932, -56, + 2625, 10753, -1676, -10536, 2980, 1542, 1177, -3113, + -859, 522, 3092, 9588, 2882, -4540, -1406, -5183, + 50, -4245, 3649, -420, -3612, -5290, -1919, 14559, + -2605, 1169, -2009, 10760, -2372, 339, -2538, 4476, + 3001, -4570, -3158, -3465, 2873, 650, -2099, 76, + 1166, -1469, -2769, -391, 4215, -630, -1448, -1796, + -1573, 5914, 807, -1580, 2072, 99, 580, -2999, + 1079, -202, 17940, -1233, -4909, 1079, 390, -891, + 1834, -2155, -2642, -1703, 1856, -14125, 2081, 3178, + -2480, -4342, -11991, -2050, 1046, 2412, 436, 1046, + -2291, -1718, -3087, 1710, -963, -1914, -3423, 6190, + -1238, -4333, 115, -10550, -2742, -919, -4849, 1502, + -3054, -3304, 2300, -1850, 2337, -6643, 1995, -1279, + -238, 738, -124, 13593, 252, -1424, -165, 2786, + -1717, -838, -11244, -10971, -902, -3330, -2580, -2735, + -171, 4041, -2149, 2502, 6726, -738, -4235, 368, + 6144, -1718, -8620, -1888, 112, -282, -19, 4126, + 10797, 610, -3097, 7783, -2974, -2058, -3558, 470, + -5914, 10322, -20, 85, -1652, 6111, -1398, 2613, + 3733, -3716, 1930, -4325, -1199, -921, -446, 1095, + 1006, 910, -2323, -351, 808, -32768, 274, 1346, + 105, 2360, -1184, 2249, -970, 153, 3180, 1307, + 2207, -962, 2209, -921, 1504, -117, -2111, -3734, + 5738, 8014, 76, 1566, 3013, -462, -3600, 3939, + 4862, 1038, 4312, -790, -426, -1656, 20, -10568, + -6389, -6597, 4230, 2910, 2504, -2962, 256, 814, + -488, 824, -355, 3574, -1890, -2657, -767, 2730, + -1087, -2538, -3522, -4067, 6249, -3354, 13923, 4070, +-11004, 4703, 909, -5968, -5483, -4242, -780, -2489 +}, + +.cb1108m1 = { + 752, -4098, 7726, 592, -9487, 2004, 318, -4322, + 6989, -3350, -478, -4308, 2023, 753, -7081, -3934, + -866, 6267, -5710, 2100, -8467, 100, -4654, -6773, + 4271, 10728, 11618, 1128, 12733, 1471, -5518, -1162, + -2159, -402, -632, -4720, -28, -1412, -1037, 897, + -1242, -1735, -2632, -3460, 3389, -582, 206, 325, + -2547, 46, 1340, -4424, -13408, -4918, -2832, 1454, + 2127, 1276, 2292, -3973, -3230, -7810, 542, 4227, + 2673, -8490, -902, 1361, -1398, -1986, -991, -680, + 602, -2887, -557, 2656, 3214, 1794, 31241, 1462, + -1457, -3750, -1923, -2381, 1313, -128, -172, -647, + -574, 1045, 2438, 1662, 503, 288, 1535, -1016, + 2487, -820, 4692, 2799, -31949, 166, -1655, -2192, + -636, 1357, -2361, -459, -1752, 2782, -293, -144, + 1900, 685, 1766, 1900, -347, -4488, 590, 915, + 798, 1133, -4494, -1388, 75, 884, 13088, -2392, + 679, -315, -7520, 1086, 3873, 3297, -812, -626, + -9443, 2548, -6417, 1619, 7196, -57, 5, 3594, + -1922, 184, 2784, -261, -3310, 2779, 174, 2814, + -965, -2912, -1835, 425, -4285, 896, 2001, 3717, + 775, -1192, 22365, -175, 1522, -711, -1135, 5123, + -517, 870, 4323, 585, -437, 260, -1737, -1984, + 2522, -2539, -973, -8812, -16173, 4678, -4107, 130, + -7832, 1140, 2792, 3394, -692, -4105, -299, 1488, + 1246, 604, 2796, -3767, 579, 188, -1544, 86, + 424, 1204, 4441, -1000, 15227, 3459, -3444, -1631, + -2177, 3497, 1684, 925, 2872, -3905, 5729, 647, + 913, -758, -547, 566, 1787, 792, -1509, -1641, + -926, -1515, -116, 1266, 481, -3944, 28526, -2279, + 5577, 1026, 4082, -605, 696, 1094, -478, 5732, + 7247, 1461, 1521, -234, -42, -878, 270, -554, + 3702, -71, 1362, 7719, 305, -13654, -4985, -1072, + -2044, 6851, 438, -8435, 923, -537, 1511, -1003, + 2056, -2299, -15578, 503, 1944, 3188, 2318, 1761, + 1290, -2322, -568, -1591, -2746, -1966, -9784, 1514, + -5596, 4070, -181, -3006, -1903, -240, -1143, 393, + -1530, -822, 520, 989, -1600, -3374, 946, 678, + 86, -1957, 1947, 1188, 356, 719, -2874, -2245, +-19010, 547, 9067, 439, -2384, 847, -3307, -116, + -1114, -445, -3505, -967, -1252, 4880, 625, 1478, + -2970, -2275, 1337, 422, 3870, -1906, -1033, 1724, + -532, 1734, 1011, -21848, -477, -251, -615, 770, + 7520, 1030, -4372, -446, -3156, -2314, 172, 901, + 70, 1837, 1205, -1344, 2933, 1080, -1290, 1353, + 10205, 1158, 11135, 560, -3480, -2376, 7539, -5418, +-14092, 2138, -253, -9344, -1907, 2177, 687, 2772, + -2730, -546, -4180, 2021, -577, 2530, -3822, -7080, + 971, 2083, -1220, 203, 3187, 3705, -752, -2591, + -704, -17469, -1168, -214, 2518, 308, -585, 1117, + -1893, 2488, 1856, -23, 2418, -2922, 1960, 235, + -1629, -8277, 1088, 2032, 874, 2763, -1867, 60, + 1684, 834, -2676, 1574, -3098, 3250, -3723, -126, + 59, -787, 2710, 930, 1384, 475, -3915, -1162, + 1640, -16818, 2356, -70, 761, 4151, -778, 523, + -183, 19374, -4223, -1379, -1667, -1690, -512, 8742, + -34, 3816, -678, 2749, 2418, -341, -1216, 4280, + -2208, -264, -2884, 4679, -821, 1824, -6724, -1528, +-12042, -9908, 935, 4338, -116, 612, 6, -161, + 1935, 1600, -442, 4059, 2510, 2186, -7678, 3600, + -2460, -1072, -122, -1817, -246, 2786, 9079, 525, + -226, 2628, -2549, 1459, 4533, 1111, -17410, 4529, + -2545, -3272, 403, -2758, -1876, 2734, 2136, -6171, + -2055, 1163, -2820, 2992, 2978, 1458, 1572, 2508, + 13576, -1545, 14861, -796, -6444, 4022, -4358, -529, + 3439, -2630, -2457, 3030, -2972, -398, 471, 2547, + 1127, 1344, 202, 420, -1858, -589, 594, 1478, + 5590, 1682, -1560, -378, -2198, 400, 2231, 566, + -80, -2042, -4557, -2309, 8743, -4258, 1291, 11770, + 718, 2342, 2912, 5170, 2470, 6832, 833, 4990, + 2009, -1258, -898, -1414, 1214, 670, -2104, -5068, + 788, -18997, -743, -864, -356, 1592, -5786, 652, + 4952, -2319, -1097, 2177, -1654, 2879, -1645, -172, + -1581, -3062, -805, -1065, -2222, 20857, -1146, 864, + 1690, -1794, 855, 307, 2320, 3618, 6184, -4129, + 187, -2423, 4946, -3072, -213, -2621, -2026, -5793, + -986, -1597, 2125, 1474, 1766, 360, -4652, -1030, + 1546, -1085, -253, 1016, -96, -1608, -7017, -4855, + 1295, -271, 3751, 341, 19804, -2006, 2322, -2298, + 353, -2077, -764, 212, 150, -1140, 564, -614, + 268, -2023, -332, -699, -937, 1684, -1617, -22863, + 1202, -144, 62, 373, -598, 184, 987, 3721, + -611, 86, 3676, 362, -652, -214, -311, -694, + -1973, 2351, -733, -1601, -1189, 28227, -154, 10, + -347, 3400, 1333, -1695, -773, 1362, -447, -2999, + -626, -1776, 2474, 2195, -1041, -797, 1828, 62, + 3397, -1779, -2924, 1740, -1694, 4083, 15100, 3871, + -7821, -108, 292, 998, 3141, 5813, -918, -1290, + -902, 895, -1336, -50, 2014, -2066, 2383, 68, + 31769, -334, 1243, 1981, -715, 125, -380, -1272, + 1068, -357, -1734, -1138, -630, 1042, 688, -438, + -558, -2460, -2894, 4196, -1004, -2177, -2291, -4701, +-13990, 747, -5558, -2754, 1950, -2780, 8414, -1286, + -946, 220, -2507, -192, 3726, -1361, 1296, -2215, + 872, 8270, -2797, -6732, 1256, -1957, -2916, 107, +-14847, 1868, 4638, 1292, -1006, 5285, 2947, -5028, + 942, 153, 420, -1152, -391, 3612, 4621, 172, + 762, -876, -3561, -14406, -552, -2570, -4448, -15704, + -806, -928, 3380, -686, -2604, -3895, -714, -626, + -1763, 1144, 485, 34, -1922, 1528, -213, 5050, + -804, 185, 96, 3320, -621, -329, -1444, 864, + -1684, 16583, 1872, 3327, 2146, 1132, -8216, 73, + 6524, 1623, -4147, -4985, 1450, -646, -7189, 4524, + -1596, 2120, 3913, 680, 2094, 1660, 752, -1221, + 2414, 3986, -10314, 2096, 129, -5458, 634, -5426, + -594, -9731, 2083, -2284, -5085, -4777, -1323, -1740, + 6157, -841, -126, 247, -1163, -7005, 3863, -764, + -1552, 1356, 10788, -745, -12481, -73, 5234, -3220, + 2979, 635, 3372, -540, -36, 2887, 5221, 931, + -1724, -4824, 780, -49, 120, -739, 890, 714, + -1438, -458, -1861, -16732, -1858, -13282, 2182, -6796, + -3307, 556, -2968, 542, -2358, 1463, -3536, 1866, + 2833, -1369, -1576, -2825, 3561, -1625, 1858, -1052, + -1079, 1302, -2049, 19052, -1188, -4137, 1592, -4705, + 1082, -1168, 2355, 649, -1900, -2582, 1000, -3065, + -2399, 3625, 1062, 860, 2586, -2645, 14755, 3147, + 5002, -6720, 1728, -2114, 5090, -2838, 3020, -5048, + 4182, 2237, 706, -4945, -86, -1908, -1207, 135, + 675, -200, -22134, 1492, 2490, -1324, -1135, -842, + 1457, 185, 1342, 3516, -882, 1069, 1159, -52, + 1844, -1186, 554, 3860, 1824, -2136, -881, -1281, +-13259, -705, -90, 2150, 573, 2787, 1068, -1968, + 121, 805, 4382, -1033, -9220, -744, -1446, 7180, + 257, -5983, -1643, -6198, 1854, -3524, 1060, -118, + 56, -843, 2832, -98, -3493, 368, 6, -1877, + -3615, -1954, 17971, 962, 1532, -1754, 3776, 661, + -2025, -60, -1013, -1222, -3062, -69, -4933, 3064, + -1176, 213, 477, 1081, 1679, -2328, 1984, -21759, + -881, -54, -1101, -1092, 598, 1648, -3384, -213, + 379, -1318, -1972, 630, -536, -1970, -461, -356, +-22416, -1855, -113, 876, -2809, -587, -2323, -56, + 2177, -797, 1649, -4069, 1350, -2075, 101, -1384, + 1703, 1085, 471, 8093, 1020, -4112, 970, 866, + -1456, -341, 1418, -12938, 379, 9787, 1814, 2337, + -1705, 9913, 1026, 1962, -744, -2900, -1690, 1534, + -959, -629, 2330, 3735, 4742, -3139, -2135, 2298, + -2765, -1389, -3634, 27139, 671, 2208, 494, 1015, + -1197, -239, -321, -1145, -679, -637, -3116, 544, + -952, 882, 396, 1087, -3163, -2684, 759, -725, + -2186, -542, 2545, 3669, 24, 1689, 10473, 1836, + -419, 322, 2475, 1908, -1346, 50, -6401, -3644, + 552, 2348, 1327, 11853, 2467, 5493, 1544, 464, + 1796, -2801, 8217, 1014, -2103, 3764, 8091, 170, +-12422, 1708, -2438, -1873, 1970, 2160, -5027, -647, + -118, 2830, 2379, -1091, -5723, 124, 3017, 417, + 55, 1376, -1079, 7122, 3086, 17847, 2468, 3273, + -599, 3302, -922, -2073, -1696, 805, 2022, -1899, + 3188, 1425, -4364, -140, -3760, 437, 1393, -1298, + 17166, -1283, -2904, -692, 518, -404, 944, -1990, + -968, 1323, 2376, -11708, 2187, 3164, -559, 2212, + 1598, -1741, 360, 633, 3075, -660, -1012, 778, + 565, -2020, -123, 5, -2217, -2967, 374, 272, + 336, -1725, -408, -2270, -2645, -1044, -517, 1911, + -386, -4439, -7603, -1000, 7660, 589, 14931, 2901, + 11998, -13102, -1919, 3904, 86, 1617, 7324, 3078, + 1714, 4636, -2504, -194, -3274, -710, 33, -1965, + -2298, 2513, 726, 75, 67, 884, 2104, 4110, + 1936, 10387, 2722, -1970, -12496, 4799, 3086, -2938, + 1719, -2138, -338, -1124, 971, -4200, 480, -3361, + 6220, 5954, 1830, 1001, 2996, 4166, -2854, -437, + -1430, 1072, -312, -12949, 3113, -2479, -2034, 6956, + 2805, 2128, 856, -8803, -4709, -1274, -120, 1252, + 3898, 6526, -3914, -2276, 2754, -2604, -3038, 4136, + 2598, -2172, 4861, -2457, 2, -2693, -808, 3527, + -1184, 392, -2202, 2406, 960, -1064, -2589, 1161, + 2418, 728, -466, -4865, 211, 14720, -2093, -1977, + 85, -12618, -2073, -3028, -1067, 1734, -2491, 9506, + -422, -2718, -2966, 3883, -2852, 336, 1306, -2297, + 2009, 2589, 3071, 192, -1239, -10553, 2, -1174, + -3036, 9939, -27, -1278, 1448, 18655, 761, 931, + 445, -94, 206, 448, -1865, 232, -4353, 4596, + -260, -976, 594, 648, 796, -1376, -1186, 3056, + 3171, -5675, 6179, -1287, 16934, -1478, 1090, 577, + 8075, 1119, 2943, -3208, 1852, 1986, 6003, 901, + -962, -3196, -1907, 392, -2605, 2796, 4082, -456, + -3109, -1219, 123, 2470, 174, -1254, -1350, -4919, + 1271, 12302, -1154, -6317, -3346, -1315, -144, 1214, + -49, 3491, -1029, -2043, -8373, 4197, 4971, 9808, + 9732, 700, 2247, -2755, -2034, 3260, 839, -10554, + 1661, 11484, -3180, -1909, 1089, -813, 3116, -2103, + -3726, -4514, 663, 1152, 3902, 4862, 2739, -3828, + 707, 2712, -8009, -832, -16492, -1472, -2422, -5593, + 322, -1894, 2810, 109, -1788, 2050, 3539, -3112, + -6178, 2487, 2102, -135, 3163, 2096, 4123, -310, + -1090, -2, -2662, -17087, 1373, 1448, 162, 527, + 655, -2248, -3530, 194, 1305, 7590, -5515, 1225, + 1607, -3816, 2185, -2679, -4486, -582, 4981, -1675, + 147, 14790, 119, 11771, -1228, 1012, -6133, -2247, + -3913, 1348, -1846, -513, -6386, -749, 6726, 745, + -809, -799, 3224, 43, -2230, 2598, 2994, -1590, +-11198, -14476, -256, 695, 877, -3680, -2734, -1448, + 1336, -1633, 3327, 3497, 2956, -782, 2958, -1866, + 2876, 2003, -856, 1282, 5068, 391, -10539, 1703 +}, + +.cb1110l0 = { +-14944, -14950, -73, -1141, 1532, -575, -620, -816, + 1185, -1597, -2651, 1426, -1458, 1317, -1320, -19, + -209, -352, -163, 912, -85, -180, -546, -1121, + -435, -345, 229, 364, -850, 632, -426, -359, +-32768, 278, -1021, 310, -31, -355, -442, -234, + 415, -202, -10393, 1645, -378, -2270, 837, -1857, + 556, -935, -1344, 3016, 3452, 1597, 1378, 466, +-13740, -878, 1475, 237, -1301, 9756, -592, 23, + -192, 335, -58, 285, 376, 40, 24, 292, + 426, -1962, -798, 745, 1379, -34, 397, -14748, + -6285, 7343, -6374, 4442, -14800, 1878, -24, 1606, + -728, -476, 1754, -1052, 911, 3139, -1444, -222, + -1968, 1858, 1330, 244, 213, 935, -92, -348, + 155, 418, 29128, 236, -190, -226, -309, -178, + -690, 46, 716, -534, 147, -630, -75, -826, + 37, 4745, -1056, 2400, 1398, 1494, 460, -221, + 2908, -656, -15611, -2940, 2342, -98, 581, -3144, + -471, 3772, 2057, 1583, 13738, -139, 330, 1175, + 429, 63, -14544, -374, 1439, -1226, -422, -690, + 816, 1279, -592, 1642, 700, 1338, 0, -714, + 46, 377, -188, -366, -197, -637, -622, -262, + -69, -637, -1266, 257, 620, -1040, 324, -19064, + -602, -463, -1329, 513, 2699, -421, -1918, 2250, + -404, 403, -1514, 134, 147, 3, 426, 605, + 276, 561, -26, -294, 630, -500, -480, -133, + -712, -1144, 238, -633, 173, -29164, -1182, -274, + -138, -271, -232, 30, 706, -168, -848, 704, + -2132, -248, -108, 669, 1165, 234, 1243, -12201, + 2208, -1971, -829, 10305, -3964, -1502, -409, -3918, + 4520, -2259, -797, 2235, -5560, -1710, -2472, 280, + -1747, -980, -4529, -5208, -1813, 330, 890, -6220, + -710, -5583, -4704, -913, 2920, -12484, -4340, 334, + -1303, 283, -740, -1261, 3556, 3210, -11640, -14438, + -2557, -795, 747, 546, -2488, 1891, 485, 725, + 338, 1579, 2092, 2354, 284, 2812, 490, 1442, + 187, -2699, 1196, -1783, 1228, 2364, 13364, 258, + 2102, -6163, -200, -5475, 2804, -576, 6878, -2852, + 2246, 1186, 584, -136, 5258, 3825, 3045, -1661, + -5246, 2548, -5054, -4383, -1542, 12912, -1580, 1268, + -1415, -2012, 1021, -2106, 979, 2390, 3411, -1076, + -439, 5416, 1333, 440, 3422, -13384, 2540, 2544, + -3668, -2308, 1042, 589, 4166, 5090, 1539, -3447, + 7003, -4396, 319, -590, 481, -471, 22260, -1936, + -297, 1302, 1163, 937, -164, 847, 768, 827, + -430, 792, 472, -1557, 712, -602, -1007, -278, + -974, -3198, 10560, -2124, 335, -1206, 629, -13712, + 12, -1673, -691, -666, -2890, 826, 1792, -1547, + -2016, 807, 1810, 841, -814, 1214, 760, -1056, + 404, -94, 144, 297, -584, 106, 116, -132, + 236, -507, 86, 853, -670, 413, 32767, 730, + 10835, -502, 1297, -3857, -1035, -1602, -164, -1721, + 1468, 507, 1064, 1478, 4323, -760, -882, -4331, + 2564, -10933, 3000, 2101, -2492, -72, 12636, 2743, + -1113, -8334, 6720, 2348, 491, -23, -1065, 1506, + 2090, -1731, -1997, 675, 425, 8165, 695, 2285, + -433, 515, -465, -347, -1006, 357, -55, 57, + 481, -31494, -816, 60, 76, -439, -328, -217, + 265, 123, 839, 218, 1355, 243, -878, -12819, + 5168, 318, 1376, -2931, 12689, -83, -220, 2848, + -770, 150, 1631, 1955, 1552, -1371, -3053, 1752, + -7250, -24, -514, -5568, -1529, -112, 419, -1136, + -672, -1847, -1136, 90, 453, 4810, 13012, -2355, + -2477, 1393, 451, 3390, 12, -2228, 1840, -2543, + -2404, -2969, 186, -444, 204, -265, -11467, 2204, + 1821, 3591, 67, 8821, 4015, -183, -5902, -1468, + 11394, 3062, -128, -476, 2495, -2888, 13482, 686, + -1320, 371, -884, 1829, -1810, 337, -1124, -1442, + 432, 1950, -1203, 663, -10445, 2310, 766, 137, + 4418, 2821, 135, 116, -12164, -3592, 686, 2310, + 1229, 1930, -1756, -1309, 1439, -3741, -305, 1547, + -9940, 3198, 1333, 2403, -2847, -3892, -259, -1766, + 881, 14310, -1711, -840, 2259, 3027, -1527, 1156, + 2904, -75, -728, 1536, -127, 152, -3240, -726, +-11914, 1037, -851, -1893, -748, -3294, -1114, 6072, + 103, -1539, 4573, -1637, 5242, 2705, -9890, 254, + -1565, -407, 1818, -23004, 1110, 119, 256, -707, + -451, -679, 374, -935, -669, 403, -10, -594, + -525, 1403, -1016, -553, 595, -169, 2523, -82, + 947, 11572, -1166, 11668, -4962, 842, -860, 89, + -3308, -640, 558, -851, 622, -1002, -4933, 2762, + 1991, -121, 1401, -111, -49, 868, 135, -1392, + -279, -560, 412, -241, 1414, -802, -1256, -298, + 447, 17738, -320, -1150, 1650, -398, 5626, 6076, + -8919, 455, 12716, -2094, 157, 1361, -1515, 1494, + -6210, -553, -1785, -424, -3049, -4066, -1188, -732, + 1992, -1926, 1495, 1085, -22434, 1187, 391, -1512, + 747, -313, -502, 1331, 456, -323, 246, -581, + 56, 1448, 2071, 535, 782, 520, -136, -290, +-12350, -11858, -456, 2340, -310, 22, 2210, -2531, + -392, -898, 3919, 1354, -332, -4255, 169, 425, + -476, 2577, -1172, 1984, 266, 514, -516, 2481, + 81, 2103, -710, 273, 1405, -14811, 5858, 3621, + -982, 345, 2044, 158, -2050, -602, 954, 342, + 239, 157, -317, -35, -260, 307, -31972, 228, + -77, 225, -154, 643, -883, -518, 32, 372, + 208, -22488, -458, 530, 104, 254, -775, -1264, + -571, 900, -263, -323, -296, 962, 520, 548, + -2196, 42, 1408, -211, -16117, 2052, 12656, -822, + 507, 321, -772, -786, -144, -3539, 892, -3430, + 19, -1831, 1161, 1836, 988, -1134, -704, -2994, + 692, 765, 457, 1624, 502, 13, 364, 337, + 32108, 1517, -225, 189, 141, 985, -572, 262, + -146, 31, 236, 269, -278, -1686, -13968, 1247, + -1009, 1046, 13467, 1276, -268, 307, -1383, 1544, + 136, 949, 70, 446, 1391, -2188, 745, -374, +-14231, -712, -15202, -533, -108, -2244, -1232, 450, + -895, 1086, -782, -1082, -718, -660, 796, -2095, + 2722, -468, -1717, 147, -23566, 377, -220, -1731, + -1416, 486, -241, 266, -802, -322, 1066, -544, + -167, 520, -1297, -100, 622, 670, -188, 711, + 32, 1155, 628, 350, -112, -154, -1048, -44, + 36, -454, 304, 32767, 356, 462, -1194, 549, + 138, 0, 1044, -119, 195, 1098, 521, 3294, + -3776, -224, 4297, -1256, -303, 2107, 300, -13283, + 2933, -3194, -1408, -4152, 4195, 287, -932, 1247, + 13453, 277, 418, -598, 87, 1132, -80, -405, +-13400, 656, -1310, -1447, -3974, 1719, 313, 500, + 1078, -114, 1449, -293, -120, -4754, 5583, 235, + -5140, -865, -484, 15572, 336, -1854, -154, -454, + -1475, -726, -3718, -4048, 1575, 480, 1094, -2209, + -3202, 420, -564, -48, 964, -2667, 2172, -1666, + 112, -730, 203, 3618, -15857, -4853, 48, -1084, + 1512, -937, 3353, -453, 223, 2267, 139, 190, + 1959, -720, 4389, 681, 10383, -112, 12390, -882, + 1695, 3539, -169, 3131, -122, 3627, 252, 185, + -523, 112, -219, 214, -182, -102, 118, 230, + -60, -801, -25, 42, -279, 262, -32358, 344, + -542, 382, -223, -404, 1201, -2646, -163, -803, + 3041, -1009, 3818, 756, 5834, 14249, -1828, 139, + -218, -658, -1314, -4980, -3322, -1461, -1598, -91, + 2464, -954, -5203, -791, 1339, -13598, 594, 702, + -388, -1115, -2377, -370, -3658, -3322, 1871, 2513, + 2910, 4095, -2195, 4291, 886, -567, 1182, -302, + -672, -21, -268, -29244, -199, -1024, -1284, 485, + 1432, -1086, 119, 1030, 418, -643, -1165, 1847, + -30, -844, -909, -416, -604, -609, -289, -391, + -238, -94, -391, -810, 413, 356, 954, -1935, + 30996, 441, 138, 1381, 1130, -2313, 558, -203, + -248, -951, 408, 1815, 256, -429, -892, -695, + 1138, 439, -760, -63, 6498, 570, 15252, -3397, + 170, 935, 338, 1, -528, 524, -541, -281, + -3, 499, -333, 685, 436, 32176, 389, -153, + 572, 256, 53, 16, -902, 724, 2849, 2503, + 80, 667, -1867, 742, 15205, -8715, -2588, -476, + -450, -733, -891, 1178, -1751, -1630, -114, 144, + -138, 10145, -188, -1608, -131, -247, -544, 9774, + -610, -2868, -3472, 345, -9294, 3724, 2634, -5124, + -392, 2551, -649, 782, -18, -160, -351, 12074, + 13865, -1294, 1262, -3135, -2861, 18, 753, 167, + 620, -2432, 1998, 740, 1902, 400, -206, 3518, + -3563, -632, 72, -1810, 1520, -827, -572, 1604, + -613, 3704, -736, 11100, 12702, -3189, -792, -3552, + 1621, 1841, 1236, 1215, -457, 9542, 9278, 2633, + -8801, 862, 1741, -4840, -2620, 616, 324, 2152, + 3632, 880, -472, 1927, -3456, -2105, -965, 3426, + -1893, 3095, -1152, -3542, 182, 998, -386, 1202, + 481, -1951, -510, -931, 1688, 151, -13664, -3894, + -973, -906, 1524, 9576, 2607, 12497, -819, -5214, + 5936, -634, -610, -4148, -421, -486, -1864, -306, + 2421, 724, -219, -1304, -2106, -504, 6762, 5266 +}, + +.cb1110l1 = { + -2972, -1201, -1388, -1762, 340, 21127, -999, 126, + 111, -1224, -1738, 311, -712, -450, -114, -648, + -752, -172, 67, 375, -967, -1032, -10763, -1885, + -2223, -3258, 480, -228, -143, -1299, 13128, -3062, + 1418, 6, -649, -1816, -288, 767, 345, 876, + -491, 948, 540, -167, 1969, -1883, -455, 20584, + -656, 114, 308, 279, 1105, -594, 1332, 255, + -356, -186, -540, 1898, -873, -477, 1404, 30475, + 370, -322, -337, -206, -440, -894, -54, -466, + -640, -408, -256, -560, -1503, 626, -573, -1684, + 419, 407, 2076, 5022, 3143, -1135, -12118, -12082, + -1462, -2060, -5432, -1092, 1575, 1958, -968, 122, + 958, -5312, 677, -1952, -12276, -1594, 1211, -1094, + 1992, -11032, -2993, -834, -1297, -1139, 312, -1546, + -4253, 1191, 21, 2771, 639, -2514, 6623, 746, + 1830, 2967, 1688, -14893, 7988, 4099, -97, 1165, + -2350, 65, -1308, 1834, -2084, 1683, 5118, -1633, + -10, -5282, 403, -1489, -264, 398, -2420, 12854, + -1498, -2642, -1486, 826, 699, -2213, -2296, 11849, + 478, -2202, -561, -250, 199, -2433, -948, -402, + 433, 403, 13031, -124, -180, 1499, -643, 527, + 11368, 5833, 938, 3202, -452, 2875, -1163, -117, + -2047, -1068, 211, 3122, -236, 13548, -702, 352, + -312, -1901, -2145, 2334, -12100, -76, -419, 362, + 3501, -220, -3086, 572, 1537, 3240, -1489, -1012, + 640, -513, 930, 390, 31019, 724, -78, -706, + 183, -157, -122, -847, -1156, 301, 508, -456, + 321, 317, 1300, -512, -1743, 10190, -294, -116, + 4183, 1374, 13360, -1339, 1832, 2547, -702, -2782, + -1464, 1176, -1287, 2256, 2169, 836, 2096, -248, + 1777, 11306, -211, 265, -3834, 336, 1936, -586, + 633, 1037, -1915, 12862, 930, -273, 2333, -3239, + 429, 374, 2518, -671, 570, -2208, 385, -284, +-15613, -1752, 1341, -531, -744, -1111, 290, -2302, + -1012, -2933, -366, -30, -4595, 1400, 560, 48, + 15739, -945, 411, 1876, 2441, -2144, -1222, 12448, + 54, -726, -2743, 2548, 2100, 1307, 408, -198, + -1802, -63, -1919, 933, -329, -528, -15918, 1704, + 3028, 217, 606, -2804, 2052, 9320, 592, 969, + 6836, 647, -671, 584, -1, 3564, -2575, 436, + -2195, 414, -201, 1099, -772, -220, -578, -467, + 125, -934, 271, -21476, 288, 215, 216, 476, + -560, 768, 1142, -169, -1112, -14096, -14436, 2769, + -1464, -61, 1373, -3539, -1067, 1175, -1549, -861, + -332, -1876, 3159, 340, 1711, -2453, 457, 2536, + 1114, -2278, 2464, -3253, -466, 12291, 12484, -2868, + -800, 1142, -4244, -178, 3781, 1542, -663, 1976, + 3105, 145, -100, -1774, -1039, 1627, 15540, 4194, + 5392, 741, 1816, -544, -9100, 4255, -1083, -1266, + 2580, -4200, 1934, 1721, 129, 2276, -2704, -1341, + -1310, -11926, -1478, 199, 755, 619, 4231, -478, + -1627, -1242, 1842, 13170, -2416, 778, 192, 273, + 782, 774, 2188, -838, 3139, -1532, -1639, -1073, + -596, 770, -353, -53, 82, -322, -20584, -344, + -443, 158, -144, -554, 50, 954, -145, -336, + -2050, 596, -950, -2690, 13908, -13783, 4792, 879, + 584, -2987, 967, 192, -585, -783, -1341, -3108, + -1622, 2478, -1362, -1470, -1556, -430, -110, -736, + -8097, 2073, 964, -417, 1669, -5425, -7846, 536, + 12883, -1690, 1143, -242, -438, -2274, 57, 302, + -574, 637, 2816, -1642, 2166, -172, 893, 421, + -614, -565, -338, -526, -1085, -939, -1138, -991, + 1919, 1720, -18845, -1950, -342, 1930, 321, 184, + -956, -374, -462, -216, -6, 26, 386, -50, + 603, -720, 634, -252, 261, -860, 218, 22846, + 11544, -459, -946, 452, -102, -1203, -1802, -1105, + -310, 787, -220, -1113, -2043, 650, 13767, -3638, + -296, -902, -413, 252, -816, -172, -505, -1335, + 890, 768, -523, 808, -331, 20000, -264, 1763, + 133, -1, -464, 949, -954, -147, 1780, -190, + 30, -7422, -4615, -1006, -470, -742, 500, 7509, + 1500, 1550, -3614, 810, 2595, 1506, -12926, 3588, + 402, -2547, 1505, 65, 4, 3382, -2201, -2441, + -1521, -5450, -3820, 282, 5212, 1186, -1056, -2334, + 988, 12987, 390, 4141, -2680, 1663, -8034, -1792, + -225, -674, -7147, 13254, 1631, 10163, -3332, -7, + -675, -735, 772, -2299, -326, 1641, -1174, -1911, + 82, 776, 891, -445, 18590, 238, 1417, -2372, + -9718, -2682, 600, -1401, 604, -1791, -22, 1546, + -1764, 525, -1355, 348, 3260, 1115, 204, 524, + 225, -12776, -679, -15595, -1188, 1078, 82, -859, + 28, 819, -1220, 563, 2309, 331, -1158, -2010, + -264, -383, 1732, -424, -2742, -775, -329, 132, + 391, 1261, 1033, -9812, -11829, 2433, 2690, 606, + -2724, 7216, -296, -1834, -1694, 456, -4732, -400, + -3192, 1428, -316, -13674, -2702, 2320, -6548, -2025, + 1222, 1749, 4005, 2924, -3539, -5104, -2333, -1438, + 2598, 62, -757, 760, 343, 154, -31947, -534, + 1296, 697, 88, 345, -577, -500, -174, -326, + -198, 272, 157, -815, -636, -1163, -867, -273, + 1054, 774, 1624, 989, 107, -1088, -673, 2143, +-22962, -566, 151, 72, -27, 1034, -444, 501, + 1905, -1455, 21, 289, -10670, -789, -2421, -2686, + -327, 804, -3009, 907, 960, 1379, -43, -552, + 2203, -1406, -911, -11094, -529, 4458, -4152, -70, + 3162, -12546, 326, 874, 1426, 3019, 2315, 104, +-12516, -1591, -2877, 772, 1982, 1160, -4491, 3417, + -1524, -2139, 130, 930, 9359, -18308, -376, 4090, + -468, 156, -216, 60, -643, -3440, 256, -835, + -2389, 1660, -542, -1628, 4270, 3574, -3136, 433, + 1069, 30024, 561, 268, 790, 294, 207, -1552, + -736, -97, -215, -98, 690, 686, -202, -736, + -453, 655, 511, -156, 1006, 361, 1424, -1254, + -361, -1253, -1419, -290, 78, 555, 565, -488, + -923, -18193, -630, -908, 188, 925, -1684, 241, + -319, -14478, 17007, -1415, 274, 592, 1344, 1784, + -731, 344, 992, 141, 290, 481, 628, 623, + -1166, -2092, 140, -1056, 13736, 754, 1980, -238, + 2132, -1372, -2216, -12057, -1662, 66, 1742, 2209, + -962, -1574, -3044, 173, -3066, 183, -4476, -1016, + 6160, 780, -1193, -3334, 179, -371, 244, 160, + -686, 669, 330, 426, 65, 159, -664, -186, + 479, -742, 54, 605, 32603, -941, 370, -91, + 856, 825, 1042, 374, 651, 313, 734, -240, + -49, -685, -1994, -604, -875, 44, -884, 886, + 13012, -1506, -4317, -1926, 3050, -1027, -482, -40, + 137, -2560, 1366, -11812, 2112, 2266, -2690, -1339, + -700, -243, 2322, -1042, 4635, -3210, 4281, 47, + 670, 9218, 1165, 814, -62, -2276, 12987, -714, + 2481, 1355, 896, 2840, -1664, 2048, -345, 2285, + 1754, -669, 2284, -288, -575, 944, -1528, 44, + 1071, -706, -543, -1347, 880, 257, 1364, 1444, +-17896, 99, 1539, 1813, -611, 355, -2290, 980, + -787, 132, 300, 2353, 204, -798, -296, -594, + 895, 842, 18755, 1129, 79, -189, 515, 882, + -286, 109, 305, 374, 1323, 861, -18, -78, + 294, -320, 674, 504, -159, -549, -95, -32403, + -90, 658, 1082, 1611, -137, -74, 1160, -794, + -55, 822, 2627, 1203, -3540, 9829, -7860, -9063, + -4015, -894, -2218, 729, -879, -1869, -2446, 4050, + -488, 13211, -290, -820, 371, 14196, 866, -891, + 218, -1838, 2162, 1144, -186, 512, 1416, 546, + 3298, -1253, 128, 1202, 557, -1967, 680, 545, + -139, -3008, 18453, -3322, -137, 163, 1377, 1116, + 2572, -1577, -1846, 651, -1319, 796, -862, 331, + 4383, 2453, -1894, 3264, 14137, 842, -3087, 3740, + -1100, -2400, -1364, 2406, 417, -2393, -868, -3158, + -9712, 3480, -1403, 1896, 201, 1285, -593, -11718, + 99, -539, -186, 45, -2266, -12228, -2658, 2802, + -1198, 1022, -3840, 1401, -1918, 1655, 1725, 96, + -205, -913, 1629, 568, -1285, 1264, -1160, 594, + 223, -336, -1436, -472, -19792, 553, 1494, -195, + 570, 282, -653, -54, -1115, 153, -484, 141, + -188, -278, -173, 464, 13, -634, -42, 390, + -464, -246, 622, 1229, -692, 29175, -574, 1150, + -135, 2685, 2452, 63, -962, -918, -1657, -1978, + -172, -677, -3414, 1345, -3964, 2875, -1412, -654, + -3000, 10739, 11348, -2232, 516, 8303, -189, 2564, + -150, -373, 903, -275, 2394, -1135, 508, 424, + -1704, -2222, -3789, 1938, 216, -12702, 2488, -1364, + -2175, 1114, -819, -2756, 1564, 952, 36, 609, + -933, -1568, 110, 143, -1575, -4236, 528, 15042, + -1920, 348, -2623, 5217, 1911, -1088, 259, -590, + 364, 2081, -3585, 662, 249, -119, -111, 778, + 2167, 11, 2500, 7182, 14452, 4388, 4121, 3623, + 1598, 532, -507, 877, 3830, 372, -2184, -2810, + 11748, -2095, -1079, -3070, -768, 2901, -3587, -2572, + 10008, 563, -4588, 1026, 1117, 1879, -12004, -416, + 317, 2032, 1800, 1058, -84, -296, -1748, 2588, +-11019, -1627, -3264, 2480, 96, 2146, -2672, 2418 +}, + +.cb1110s0 = { +-32746, 360, -2774, -672, -1808, -14, -1037, -1327, + 1409, -2215, 172, 1557, 945, 2031, -702, 1844, + -1106, 472, 2603, -978, 2782, -5691, 1473, -5668, + 7129, 6600, -2160, 108, -1844, 2062, -2395, -740, + 1690, -45, -725, 77, 7236, -12903, -3356, -764, + 1870, 720, -2201, 790, 9950, -3694, -5340, -4031, + 4115, 6863, 2352, 1484, 3606, -4855, 714, 4104, + 6240, 7261, -6855, 4919, -2847, 6701, 7469, -616, +-11442, -1935, 9157, -4072, 133, -5976, 2455, -9360, + -2898, -4353, -7721, -3098, -3505, 2568, -5432, -576, +-10072, 250, 2173, -4196, -4322, 2688, 5220, -6026, + -346, 11678, 2071, -7344, -2182, -530, -180, -2568, + 1524, -1617, -8825, -4845, 2794, -2813, -2669, -2423, + -2709, -8985, 2105, -4629, 708, 2040, -5680, -2470, + -7277, 6841, 6523, 4196, -6788, -1982, 3844, -5000, + 156, 1930, 1780, -3824, -286, 3908, 1703, 7304, + 1145, 144, 1180, 7145, 3175, -13823, 6580, -3066, + -6321, -9739, 4432, -1145, 2923, -2636, 3838, -7037, + -3913, 1262, -1398, 363, -141, -886, -5667, -212, + -2118, -2717, 2724, -18802, -2098, -155, -1399, 782, + 797, 766, 2613, 5374, -3767, -1711, 624, 693, + 2544, -6153, 7179, 6835, -762, 5061, 655, 2600, + 9208, -7030, 7047, 1654, -3404, 176, -5486, 1374, +-15378, -487, 7456, -1954, 2404, -2994, -1608, 2362, + -498, -7952, -6143, -3996, 1596, -3013, 1181, -1534, + -5265, 220, -2677, 1047, -4629, -15066, 3966, -446, +-11713, -5694, -393, -250, -1336, -7394, 1508, 6239, + 3788, 6273, 6215, 822, 2657, 8057, 8391, -658, + -2561, -11587, -2589, -6702, -9227, -1016, -2220, -9702, + 5988, 1859, -6100, -4594, 221, 2529, 2217, 8273, + 1804, -6128, -2859, -8259, -4707, -2494, 1913, -352, + -4561, -289, -1801, -994, -4445, -1001, 5422, 10868, + -7366, 1679, -5195, -6859, 2982, -406, 2400, 4520, + -3611, -1892, 4900, -3504, 771, 2774, -772, -1929, + -7354, 375, 628, 4522, 1069, -969, 8083, -155, + 3178, -1138, 1752, -17288, 4390, -2483, -2071, -1353, + -1155, -456, -2683, 6798, -1908, 1797, -6657, -2770, + 5610, -14518, 5922, -3964, -938, -853, 1416, -1077, + -4562, -160, 5820, -3031, 5091, 1987, -2746, -3779, + 238, -264, -3074, -11718, 9370, 9806, -6302, 3979, + -2938, 4034, 393, -1399, -4466, 2181, 756, 394, + 2264, -3664, 78, 470, -3228, 3942, -1714, 708, + 4988, 1938, -2722, 4555, -5054, -1026, 19312, 354, + 107, -5357, -4364, 597, -2566, -2812, -2278, -446, + 1384, -371, -2566, -388, -3964, -8989, 9136, 3389, + 8440, -5570, -1262, -5874, 2056, -5973, -185, 4540, + -4924, 154, -3653, -1113, -3048, 7099, -2734, 2940, + -6704, 1543, -8120, 10134, -9485, -6645, 4816, -442, + -32, -2430, 4932, -6129, -5050, 6120, -2147, -6910, + -1342, 1075, -2458, 50, -4747, -3080, 1886, 1490, + 18972, 48, 787, 2441, -405, 1668, -1399, 2202, + 2175, -3592, 1548, -2728, -4864, 504, 383, 376, + -1073, 2142, 504, -3114, 6378, -5516, 13462, 196, + 1840, 7087, 792, -3583, 302, 1012, -5504, 270, + 3354, -4486, -2312, -2522, -2872, -3899, -2261, 5211, + 1417, -3075, -151, -985, -772, -1630, 164, 659, + 1496, -349, -621, -32, -2982, -1720, -3475, -7370, + -1541, 1122, 20474, 1726, 4474, -3228, 7024, 3265, + 522, -2193, -2113, 5388, 1912, 5929, 11768, -1162, + 2600, 4048, 652, 3360, -3215, 376, 10028, 6054, + -3814, -1155, 93, 4512, -3581, -4037, 7484, -1481, + 2797, 2635, -12275, -2780, -6235, 5739, 2687, 376, + 5984, -2547, -8834, 4332, 2752, 1942, 1002, -3312, + 5251, -86, -7794, 918, -2413, 3131, -3316, 2095, + -4569, -15382, -5534, 1290, 5179, 2928, 3034, 2365, + 270, -7476, -3024, 6910, 1355, -6262, -2040, 10490, + 1432, 12284, 1125, -3160, 4518, 973, -2351, -1726, + 1967, 1488, 382, 3559, -3742, -2908, -944, -1662, + 682, 902, -4360, 5026, -4252, -1212, -3269, -6024, + -3788, 9128, -2638, -1625, 315, 3087, -3265, -10441, + -7207, -4078, -3266, -7543, -5223, 5460, 2496, -9258, + -227, 4048, 860, -520, 13616, -3458, 3837, 809, + -104, -4062, -4846, -136, -1631, 13977, -1136, 3380, + 1099, -4022, 1831, 3360, -9034, -52, -516, 10144, + 5074, 4866, 8282, -972, 2496, 2336, 8766, 2881, + 2417, -5588, 3064, 3934, -4202, 627, -986, 1750, + 958, -2348, 5006, -2597, -90, 133, 23271, 2431, + -3984, 1894, -2094, -1816, 5007, -3164, 2526, -1862, + 2651, 1809, 7173, 3410, 154, 14930, 3032, -5314, + 44, 8868, -543, -2158, 5341, 258, -8188, 3772, + 2804, 7544, 8339, -3560, -63, -735, 1300, -4308, + -1085, -4986, 1564, -6744, -2605, -310, 1275, 1166, + -640, 4814, 4373, 3103, -1242, 6049, -4786, 597, + 182, 2371, 6950, -2265, 389, -14669, -1942, -2733, + -485, -865, -597, -1376, 1626, -3956, -1244, 1532, + 3918, -3311, 1574, -88, -20573, -5471, -71, -1731, + 1436, 2428, 3982, -4576, -914, 5460, -4973, 1650, + -2364, -2486, 3212, 5424, -2501, 4595, -937, 728, + -5140, -9948, 1437, 10560, -5704, -264, -2752, 949, + 5229, -1445, 430, 827, 4103, -1999, -4625, -4171, + -8769, -8927, 7161, 4539, 6968, 5975, -4626, -2793, + 10080, -10386, -2479, 1724, 2992, 354, 3650, 3328, + 4490, -1931, 7348, 7283, -3304, 4446, -1698, -1224, + -3002, 4340, 1041, 607, -454, -4261, -18071, -1199, + -3902, 570, 5808, 5582, 6710, 235, -205, -4288, + 3472, -686, -103, -3658, -436, -9680, -190, 275, + -919, 2522, -2087, 9096, 5060, -6450, 10282, 3344, + -8167, -7688, 11881, 3101, -1280, -9942, -11741, 2213, + 712, 3976, -4218, -5285, 2797, 2996, 4006, 2053, + 2344, 6200, 141, 2616, -3981, 6970, -4194, -1621, +-13724, 7772, 2800, 2220, 445, -266, 4030, 444, + -228, 2642, 1617, -2511, 1699, 8740, 3438, -2063, + -2093, 1806, 950, -7112, -1513, -2886, -8789, 870, + 3456, -4126, -3330, 541, -10173, -1789, 3156, 4466, + -5965, 479, 5177, -2806, 2506, -1646, -3609, 1617, + -7373, -3146, -2389, 3601, 7850, 89, -3373, 4670, + -4180, -3186, 3056, -1691, 1314, 9234, -7799, 1323, + -4360, -9866, -1930, 8091, -13452, 8503, 1980, 11247, + 7688, -5953, -4165, -3192, 540, 1631, 131, 2250, + 5330, -146, -8724, -3148, 2834, 1148, -3886, 374, + -1836, -3898, 9649, 1119, 10221, 128, 8868, -7301, + 2601, 1252, 2340, -3789, 4682, 181, 4434, -1740, + 4368, 879, -620, 2046, 1842, 844, -925, -2506, + -3344, -8820, -722, -451, 521, 903, -1286, -3059, + -5308, -4759, -2706, -1429, 2762, 927, -1459, -7274, +-12028, 8838, 3987, 2406, 8626, -3128, 6505, -4322, + -197, -2464, 2738, -46, 161, 13919, 2252, 2059, + 981, 204, 1161, 4910, 683, -4311, 2081, -1932, + 1119, -6067, -5325, 8528, -4704, -5522, -6183, 5744, + -3407, -2021, 2688, -3230, 2490, -976, -500, -7834, + 2064, 3191, 4740, 3686, 1762, 2604, -2442, -5720, + -7550, 457, -3478, -8097, -6510, -9105, 8031, -4895, + 500, -2436, 1483, -4415, -2023, -3768, -2497, -1911, + 789, 566, -969, -4204, 6128, -5076, 2664, -4222, + 6755, 1774, 6881, 64, 1205, -9243, 4782, 4432, + 5193, -2258, -4787, -7433, 1755, -794, 1297, -7535, + 12773, 9124, 806, 2348, -8112, 7874, -4348, -1410, + -350, -2528, 576, 661, 272, 4598, 691, 1913, + -3349, -1881, -1854, -779, -821, 8444, 60, 2570, + -1813, -1354, -4512, -5471, 4728, 3289, 2617, -9326, + -6670, -859, -2713, -9839, 4676, -2657, 3106, -1393, + 10278, -3069, -2253, 1015, 2246, -2227, 16, -388, + 7962, 1493, -3122, -2707, 7982, -6106, -1462, -1665, + -1302, 2347, 3640, -15122, -2211, 417, 6819, 959, + -2876, -6868, 11060, -2329, -302, 1595, -4610, 9514, + 12677, -4614, -2899, -141, -4857, 1447, 6400, -2894, + 1696, -2888, 1889, 3489, 2775, -504, -6597, -5258, + -7256, -379, -1249, -136, 3118, -3537, 3295, -3458, + 2103, -399, 15281, -222, -1809, 172, 2257, 1947, + 707, 3562, -5691, 3575, -2210, 5750, 815, 4059, + -16, 1306, -13308, -1733, -1338, -3477, 5247, -1950, + -5148, -678, 8074, 1740, 290, 2033, 4639, -4240, + -536, -5214, -1366, 2491, 501, -59, -4480, 430, + -285, -5947, -755, -14559, 5696, 6960, 4462, 2317, + 6414, -13174, 4962, -899, 5924, 11100, 5303, -970, + -2528, -6239, 2253, 2236, 553, 458, -2229, 8016, + -7082, 2869, -4209, -4460, -6536, 3557, -1766, 7815, + -655, -6029, -5250, -1627, 2646, -3466, -3584, 901, + 10305, -895, -427, 949, -2776, 3436, 769, -4131, + 9019, -4898, -3562, -7978, -359, 1358, -1528, -3095, + 5840, -6214, 2591, -2086, 9480, 640, 2858, 216, + -3625, 5740, -7008, -1097, -2091, -143, 4832, 6210, + -1358, 3998, -714, 835, -4004, 3664, 1980, 1240, + 2902, 510, -1565, 427, -2052, -4208, -1505, 1187, + -1229, 3732, -932, -1014, 4784, 18474, -5111, 3047, + -54, -1547, -3892, 8612, 274, 1446, -3548, -7689, + -423, 1192, -4508, -10403, -8735, -446, 444, -6353, + 4008, -1462, -8906, -1161, -2395, 2442, 2204, -5472, +-17376, 2471, -689, 1394, -3657, -2119, -769, 2872, + 1393, -2701, -3536, 3650, -378, 859, -3338, 1412, + 3010, -3243, -335, -3619, -511, -1931, -7126, -5018, + -9332, -4440, 1906, -2265, 1386, 8072, -6576, -1300, + 5458, -4894, 630, -7146, 2263, 810, 2968, 1124, + -2219, 2292, -3914, -1836, -6683, 1511, -2755, 1396, + 2425, -23842, 2249, -53, -891, -1678, -1766, -1788, + 502, -4210, 211, 10376, -5507, 837, -6196, 2132, + -472, -10153, 7234, -1456, -148, 4886, 2427, 2371, + 1234, -962, 6298, 1016, 1735, -566, -878, -8071 +}, + +.cb1110s1 = { + 2525, 12164, 4861, 9505, -7371, -414, 3002, 576, + -347, -998, 2861, -804, 3034, 810, -788, -539, + -2092, 4970, 1828, -2869, -2802, 6649, 3673, -193, + -4034, 722, 1642, 3792, 8770, 10428, -3303, -3849, + -4520, -234, -4190, -1219, -1300, -4128, 8384, -1150, + 1578, -6174, -1072, -4871, -8180, -6698, 3806, -7386, + -2545, 1052, -550, -1148, -1308, -8834, -2654, 1982, + 8716, 6579, 1360, -2404, 1893, 2680, 3801, 11097, + 1455, 2453, -7585, -7503, -12710, -420, 2023, -656, + 1124, 2872, 9676, -4309, -202, 1458, -6526, -534, + -1535, 924, 3068, -1142, 5073, 1284, -5632, 869, + -1637, -2898, 4900, -10202, -10488, -1097, 1890, 11006, + -44, 1368, -1979, 6507, 316, 961, 8, -4085, + 2561, -2034, -1077, 2594, -465, -5134, -868, 54, + -6694, 9608, -3516, 7165, 11011, 9542, 4780, -2800, + -1130, -1714, -2684, -369, 4746, -2688, 4146, -7652, + 984, -3263, -276, -9134, -2848, -3983, 9994, 3608, + 3234, -596, 263, 3102, -178, -2264, 3820, -4293, + -5752, -3577, -3914, 1095, -1562, 22110, 4610, 69, + -2999, 254, 2178, -2901, -1203, -1292, 2642, -3254, + -1389, 2955, 1340, 542, 810, 1369, 3208, -795, + -3272, -2717, -1129, 8781, -6854, -3028, -616, 729, + 529, -6946, 1621, 9574, -14909, 5398, 854, -774, + -9978, -5417, -2516, -4683, 5715, -66, 3336, -5040, + 640, -7566, 3494, 7016, -2269, 1376, -13994, 6448, + -3948, -1697, -3988, -6559, 2376, 4231, -3131, 2045, + -2417, -5919, -7016, -1695, 9046, -7966, 5187, -2553, + 1402, -2351, -220, 5931, -1823, -2270, 584, -3784, + 2924, 6166, -3035, 2370, 4923, -1080, 682, -7899, +-10827, -1824, -908, 1568, -3565, 4033, -4266, -1948, + 923, 5488, -203, -2396, -907, 2783, -3278, 1415, + 7710, -190, -5208, -2279, 1266, -1132, -3392, 10251, + -1064, 11283, 2162, 2213, -5088, 4479, -4658, -1803, + 1534, -4233, -4073, 6938, 3966, -4878, -332, 5961, + 9217, 488, 6520, 4430, 7988, 9383, -2586, 1206, + -6983, -873, 1251, 1849, 5945, -2144, -2032, -1852, + 416, 3720, 2419, 8462, 3173, 11524, -2894, -5517, + -211, 17830, 3170, 1098, -721, -2066, -1956, -3097, + -1061, 2815, 447, 701, 449, -485, 2609, 1239, + 2257, -1760, 3091, 7538, 3710, -2689, -3092, 6903, + -2457, 3271, 6355, -1486, -828, 1994, -3575, 3949, + 3185, 2606, -4912, -16039, -8833, 1831, 2580, 1993, + -1117, -3408, -7590, -7278, -141, 2696, 805, 1896, + 308, 378, 9308, 2894, -4324, 1042, 837, 4716, + -4702, 2493, -5173, 8616, -468, -14829, 3759, 3251, + -4237, -1340, 5224, 2099, -764, -8263, -1699, 76, + -1464, 2115, -582, 3286, -3653, 1017, 1696, -1414, + -668, -9748, -5730, 2413, -1270, -6070, 17002, 2164, + -5440, 1801, -2123, 800, 2135, 4801, -887, -2141, + -647, -4846, -463, -577, -1846, -555, -1929, 2046, + 8272, -8399, 3886, -5950, -4202, -12600, -2805, 477, + 65, 6140, 1089, -4737, 8967, 1952, -1968, -3660, + 6641, 850, -3304, -1775, 4010, 10819, 14365, -696, + -1331, -1724, -237, -3611, 244, 3005, 4349, -182, + -4124, 2466, 2746, -61, 3391, -1392, 3788, 1582, + 3723, 7140, -2207, -3678, -2675, -252, -7476, 9426, + -6196, 3226, 3554, -6326, -4284, 6346, -4432, 5199, + -2633, -2499, 1200, -1140, -3910, 6624, 16732, 5946, + -766, 2630, -1200, 1988, 5510, -1199, 4126, 1287, + 454, -1795, 2664, 5001, 1058, 500, -437, 2992, + -2012, -160, 796, -4846, -6572, -10088, 603, 483, + -4510, -12799, 3502, -1784, 3510, -3956, 6038, 9044, + -6029, 7170, -1608, 120, 914, -200, 3939, -6274, + 3020, 6235, -2754, 5368, -1693, -6028, 386, -2006, + 1898, -11704, -9973, -525, -2624, 1799, 4140, 3248, + -57, -3731, 3764, 5582, -3830, -2484, -2066, 1517, + -900, -8250, -8191, 2676, 1147, 6752, 6908, 1196, + -2634, 3408, 2980, -1042, 3971, 632, -4946, -5690, + 133, 2445, -446, -1294, -777, 3356, -5628, -6020, + -8042, 5069, -1421, -2701, -15117, 3074, -912, -2574, + 2643, 5252, -2118, 3849, -3793, -850, 4170, 6240, + -697, 6976, -3752, 1155, 7769, -8912, -7728, 4224, + -2362, -3760, 3688, 2402, -3411, -3165, -2550, -8, + -209, -334, -837, 5688, 3425, -4564, 9999, -4780, + 3093, 4346, -5556, 1636, 1755, -14696, 1810, 6547, + -60, 4054, 10539, 6118, -4414, 1760, 3581, -841, + 4471, -23, 180, 259, -4439, -13230, -1326, 1913, + -621, -1641, -2882, -4934, 516, -3886, -4468, -110, + -4526, -5157, 7550, -4449, 813, -4364, 1768, -8829, + 2003, -1372, 1873, -209, 1539, 1076, -12408, -1464, + -1878, 1563, 2020, 704, 1425, -275, -3718, 4618, + -1120, -5057, -3590, 4022, -1977, 620, 143, -2507, + 3697, -3263, 616, -3002, -3347, 21051, -4398, 364, + -1924, 284, -2724, -2297, 4916, 2702, 4866, 4293, + -2781, 1094, -1525, -562, 5487, -2098, 4658, 1362, + -597, -3426, 3173, -5174, 3922, -3844, 1482, 4711, + 5853, 1490, 5499, -17537, 956, 544, 268, -4782, + -504, -4003, -911, 599, 1746, -7322, 1907, 1990, + 16985, 3171, -2645, 1040, -7239, 5618, 304, 3606, + -3377, 3630, 7319, 108, -496, 1026, 3062, -392, + 2366, 1948, -530, 806, 2700, -2676, -2717, 5238, +-16008, -823, -264, -1560, -1014, -760, -3684, -330, + 5644, -1668, -10239, -2583, 7411, -593, 2193, -1479, + -2892, 3834, -3625, -12234, -1103, 1868, -5121, 3879, + 2748, 1936, 2026, 4572, -6037, 3310, -8678, 11724, + 5290, -2316, 4131, 834, -3915, 869, -1734, -5752, + 1255, 9534, -3625, -115, -5912, -125, 2298, -1494, + 5910, -496, -2719, 1320, 3175, -3012, -3906, 4602, + -4760, -5918, -2568, 6632, -8802, -5876, 6358, 2349, + 207, 5191, 8369, -5932, 2710, 7950, 3673, -2592, + 1311, 8384, -4360, 8614, -5662, 1180, 2147, 1044, + 1591, -5555, -1597, 4418, 38, -1579, 4675, -1725, + -1693, -6470, 3066, -7601, -12822, 524, -2986, -3406, + 8860, -1266, -930, 4316, 1171, -2908, 199, -1785, + -2851, -3588, 3072, -3585, -2668, -1123, 1508, 460, + 6780, -19480, 2854, -1574, 1004, 5074, 1907, -1988, + 1177, 74, -1436, 2224, 1232, -3008, -3454, -862, + 604, -653, 2778, 2349, 3242, 8426, -430, 3684, + 4814, -1886, 5118, 1487, 442, -2322, -900, -2854, + -234, -10350, -7922, -745, -1490, -5638, -6014, -4079, + -2979, -351, 9493, -2274, -11362, -8166, -7364, 8261, + 1554, -1722, 4651, -831, 2276, 1502, 2600, 1266, + 4456, -4145, -3837, -3584, 4242, 4058, -2395, -6971, + 4486, 3233, 6226, 1306, -11506, -6223, -5132, 1537, + -4407, 1510, 5732, 2808, 5817, -4972, -2900, 897, + -2441, -1819, 5651, -6988, -10063, -2288, -5820, -1250, + 925, 3120, 6125, -9901, -137, 3684, -6601, 1077, + 3272, 21, 3341, -838, -3643, -1727, -4417, 660, + -6551, -184, -8125, -1780, 5232, 6077, -7968, 6423, + 3823, 3026, 4555, 464, 3318, -5504, 837, -3571, + 3853, -2277, -1864, -742, -5380, 6096, 6856, 1076, + 877, -642, 1926, -4712, -14482, -3323, -2672, 7485, + -2116, -3932, 2233, -3270, 326, 2221, 132, -1893, + -748, 453, 3597, -2308, -4371, 5632, 3609, -1033, + -444, -2591, 17359, -3120, -2604, 3157, -370, 9242, + -1606, 2675, -853, 1475, -416, -3280, -1159, 191, + -3670, 282, 4282, -957, -2978, 3564, 91, -20520, + -3046, 1248, 1277, 3368, 1118, 311, -598, 1406, + -2377, -1444, 1417, -3626, 167, -6440, 3341, 629, + -2523, 4398, -1187, 4322, -383, 1934, -3298, -8530, + 2195, 5220, 510, -1256, -6932, -1061, 5141, -16242, + -1390, -546, -3760, -2029, -929, -6044, -3503, 312, + 8478, 701, 8865, 4715, 1987, 1342, 1400, -71, + -5229, -1547, -8827, 2349, 12836, -1479, 4621, 6003, + -6749, -3184, -5667, -2930, -1074, 3204, 330, 4692, + 2872, -10808, 75, -1260, 18003, 4100, -1462, 1391, + -1667, -2039, -687, -4806, 5913, 2682, 7730, 7034, + 2703, 1666, 120, 1601, 2123, 1402, -4702, -11229, + 7875, -5591, 4634, -2274, 3015, -597, -7520, -1095, + -4814, -173, 5562, 1533, 2807, 8466, 5195, 7806, + 2585, -2877, 6938, -3942, 402, -3825, 4162, 9149, + -6423, 2447, 7041, 2932, -9813, 2124, -58, -3, +-12856, -7973, 1484, 907, 180, 8042, -2124, 4356, + -4117, 1126, -9706, -2101, 3957, -1877, 1139, 7148, + 3707, -1341, 4509, -1220, 4570, -1650, -6504, 7036, +-10268, -328, 4678, -12205, 5062, 6089, -496, -7740, + 2207, 4489, -205, 1386, -2695, -1442, 4730, 892, + 12061, 3818, -3305, 4431, 9300, 3470, 4608, 4315, + 892, 866, -1714, 1529, 2569, -11398, -3068, -282, + 1626, 587, -1568, -1630, -220, -2033, 7141, -2732, + -3541, 3404, 15514, 1883, -2697, -926, 5972, 6485, + -6794, 2111, 2490, 1201, 5467, -2352, 3264, -97, + 2400, -728, -3364, 3417, 1481, 2862, 462, 2855, + -5233, 5740, 7208, -10508, -3254, 1450, -1270, -293, + 3400, -6978, 10035, -1213, 4308, 2641, 8579, 8518, + -2919, -351, -459, -2069, -617, 638, -1347, 107, + 6009, 2035, -280, 2009, 3280, -1236, -14960, -5177, + -2440, 965, -2646, -2095, 5274, 1825, 3705, 3831, + -446, -4018, 7178, -2415, 4344, 1850, -509, -500, + 1056, -4374, 5709, 1336, 3352, 7915, -2302, 12209, +-14362, 6429, 1423, 2912, 6474, -1599, 1116, 2280, + -1738, 3108, -5792, -3554, 623, -1110, -6114, 4488, + 8941, -3176, 13670, -3320, -327, -2657, -7349, 3782, + -1481, 5737, -200, 2968, -9474, 5752, 5056, 4688, + -5352, -432, -906, -3832, -8519, -7, 3667, 3583, + 6250, 8724, 10737, 9371, 950, -1630, -10740, 5788, + 4111, -2910, 437, -2482, 1910, 185, -2168, -3155, + -3515, -1754, 4978, 4298, -6921, 476, -2778, 546 +}, + +.cb1110m0 = { + 3666, -1078, -175, 1370, 2491, -10050, -685, -7617, + 4002, 11104, 903, 5948, 2821, 3050, -2465, 1151, + -848, -2139, 12321, -1408, -1469, 2046, -2693, 2479, + -3498, 3077, -3822, 1841, -2404, -11172, -407, -3062, + -1725, -5475, 597, 1924, -197, 434, -1648, 2678, + -2462, 1148, 599, 1284, -13171, -949, -6508, 754, + 7466, 5924, 1411, -536, 10825, 588, 297, -310, + -593, -896, 784, -242, 716, 501, -52, 4043, + -755, -690, 2630, 17762, -2159, 2126, 954, -1316, + 11129, 1570, 387, -2639, 13953, -311, 5231, -2297, + -3612, -678, -1117, 690, -279, 2403, -1541, 493, + -1692, -2048, -771, -933, 423, 700, 840, 739, + 1956, -944, 612, -2678, 101, 245, -786, 850, + 269, 1355, 21773, 463, -2589, 596, -519, 788, + -43, 1220, 10674, 4847, 1192, 335, 875, -106, + 10644, 2600, 5391, -262, 2296, -5928, -1072, -122, + 2504, 1313, 1117, -981, 350, 375, -810, 8, + 1462, -2020, -2368, 8, 22663, 1537, 87, 908, + 832, -4884, 312, 620, 1042, -4444, 660, 1582, + -2710, -2954, 10012, -9580, 8102, 5696, -1371, -3035, + -3347, 402, 218, 1096, -1924, 88, -2270, 4175, + -1083, -497, -2437, -3332, -824, 212, -2362, 4600, + -7800, -11501, 7795, 236, -1336, -12920, 705, 4532, + -1488, 11746, -3213, -2650, 2524, -2638, -128, -328, + 3402, 453, -242, -2500, 2224, 708, 450, -3014, + -132, 1251, -131, -831, -710, -21985, 222, -2132, + -3261, 490, -3020, -860, 2550, 892, -623, -3666, + -664, -131, 2018, 2817, -12005, 496, -610, -7238, + -3909, -2867, 6872, 1903, 848, 6644, 3812, -5686, + -4055, -377, -2096, -10247, -1068, 1486, 415, -253, + -2186, 1050, 771, -6856, 1044, 7466, 2953, -7514, + 1601, 7015, -1778, -1622, -3364, -1755, 2835, 176, + 2700, 991, 2560, -554, 4867, 1571, -5610, 2610, + 12438, -3751, -9964, -2753, 4856, -2595, -5423, 10025, + 812, 687, 2715, 4013, 3086, -12039, 328, -3992, + 4044, -3920, -111, -553, -1720, 2454, 1706, -1365, + 804, -32329, -471, 897, -4670, 780, -3680, -1409, + -2630, 20, 184, -157, -290, 2794, -546, -160, + 1564, 1146, 628, -4787, -239, 11233, -492, 1955, + 608, 9273, -3220, 3830, 390, -5982, -3342, -3384, + 2356, 1820, -3473, 979, -40, -20190, 47, -200, + 5106, -381, 1824, -197, 2280, 2434, -2633, -1409, + -1109, -1072, 857, 1554, 7459, 6, 12130, -1078, + 1038, -300, -13748, 3201, -762, 2670, -1051, -445, + 914, -172, -558, 2634, -1158, 3129, -74, -3415, + 1086, -8892, 118, -647, 285, 186, 3022, -5077, + 1342, 3453, -7991, -65, 4690, 944, 3717, -1909, + -9783, -367, -1699, -772, -32768, 1286, -408, 340, + -340, 430, 1274, 596, -109, -727, 276, -946, + 139, 1804, -1050, -3562, -1392, -1179, 257, 1639, + 25708, 2278, 2415, 2174, 153, 126, -60, 592, + 994, -334, -268, 1826, -306, -2241, 2774, -3188, + 758, -450, 8023, 542, 6819, -1712, 14195, -2198, + 281, -12, -590, -1153, 4568, -3676, 1973, -5221, + -1839, -603, 3324, 2492, -3070, -846, 123, -1184, + 667, -10886, -65, -2615, 971, 10219, -1245, 7378, + -2122, -2306, 571, -2298, 1958, -4356, -9210, 4321, + 2805, 1888, 11129, 1282, -5819, -2528, -873, 1123, + -5968, -2644, -5515, -2151, -944, -7712, -2007, -2260, + -1920, 2100, -325, 153, 1050, 10, 1462, 650, +-12559, 3530, 754, 4493, 1528, -6991, -4842, 1483, + -2408, 2785, -1651, -830, 1433, -2464, 18899, -1891, + -3137, 996, 2485, 3056, -1061, -4015, -2282, 1356, + -2572, -490, 1209, 1137, 4, -636, -1282, 1001, + -1190, -172, -14049, -4256, -1972, 2225, -4738, -1054, + 5254, 8113, 4294, 36, 11765, -3993, -1084, 3864, + -3016, -10356, 353, 2963, -1228, 536, 609, -343, + 1246, 3617, -3667, 4794, -20360, 473, 725, -1246, + -1649, 1900, -2589, -2869, -2550, -886, -1164, -1876, + 307, 3784, -4782, -476, -700, 2118, -1860, 1533, + -5013, 2356, 3305, 3338, -14312, -1278, -322, 1950, + -954, -1990, 1438, 3358, 7479, 3046, -6677, -3078, + 1717, 3113, -12484, -1302, -221, -510, 10423, -3497, + 4170, -3606, 6983, -2902, 458, 667, 566, 2415, + -403, -2898, -44, -1832, -110, 1799, 1172, 7, + -1534, 90, 686, -26902, 1601, -822, 658, 182, + -151, 345, 1488, 1416, -272, 1560, 9774, 2084, + 16, -14344, 1428, 514, 2658, -1312, 2095, 454, + -1783, -2056, 4529, 1154, -2239, 956, 668, -1396, + -2898, 405, -12659, -12556, -650, -587, 3461, -2470, + 0, -3156, 3186, -4104, 1729, 1438, -1842, -422, + 4476, 1945, -932, -1439, -702, -1398, 3349, 1876, + -999, -2086, -17879, -432, 4036, -2299, 1133, 88, + -2221, -2730, -938, -998, -132, -426, 2084, 2060, + -1134, -313, 402, -538, -2593, 2022, 725, 1566, + -2070, 21622, 1767, -424, -32672, 205, -1239, -3253, + 198, -1257, 2342, -1918, 1505, 452, 1348, -604, + 978, 1079, -4, 2476, -1247, -146, -861, -1928, +-12222, -13042, -1384, -1971, -1428, 1224, -639, -83, + 1034, 3488, -2310, -565, 74, -335, 2774, 602, + 872, -2132, -147, 2160, 244, 162, 12600, 628, +-10194, -1296, 1068, -1824, -4945, 3194, 2066, -895, + -784, 2347, -1982, 73, 1030, 12589, -62, -2272, + 3827, -1776, 2546, -1417, 3310, 4726, -3078, -548, + -8522, 1632, -6667, 1008, 1128, 805, 954, 616, + 499, -31526, -1327, 790, -190, 1058, -1157, 1432, + -16, 411, -3180, 827, 327, 914, 1716, 1442, + 1052, -1635, -1805, -4145, -13678, 3597, -2273, -5920, + 3592, 1136, -211, 717, 3901, -5132, 3036, -601, + 12976, 1633, 10316, -1674, -468, 905, 2331, 841, + -247, -6053, -593, -3281, 4291, 5159, -1053, -1814, + 2613, 2221, 1146, 871, -421, -542, 923, -3567, + -1138, 10051, 10860, -6121, -661, -5677, -890, -266, + 2100, 6223, -70, -2658, -78, 3424, 714, 2138, + -1355, -981, 1990, 772, 938, 1311, -1963, 924, +-22516, 260, -341, 1251, -1578, 23, 1375, 1068, + 2688, -3965, 713, -5342, -257, 37, -6034, -276, + 228, -1240, -7171, -3402, -14677, 1708, -317, -2880, + 874, 1466, 524, 2091, 565, -4220, -265, 52, + -3373, -220, -3175, 2646, 448, -1628, -1986, 2200, + 3722, -15752, 7120, -2036, -2170, -627, -1079, -4060, + 2257, -925, -3418, -13488, -1308, 3476, -783, -3924, + -820, -860, 2418, 2982, -8753, 9001, 294, -11915, + -969, 3329, -761, 1459, -5308, 1811, 379, 306, + 632, -2732, 2512, 1188, -3470, -2167, -572, -2274, + -1657, 24074, -159, -138, -1826, -2527, -3117, -906, + -1770, -1182, 1240, -3064, 2313, -790, 336, -3843, +-13384, -423, 13066, -14, -1908, -32, 2607, 487, + -2426, 195, 135, 2742, 1540, -1034, 856, -2288, + -287, -774, 497, 1760, 191, 178, 298, 38, +-30898, 801, -1456, 2311, 1272, -1845, 334, -933, + 183, -1614, 739, 1881, -13548, -13589, 1496, -2075, + -1281, -1510, 108, 3683, -1120, 752, -980, -277, + -1289, 2016, -290, 1838, -321, -139, -881, -12391, +-14713, 1906, 990, -3202, 2320, 749, 1872, -2545, + -1457, -1727, 734, -327, -316, 1062, -3149, -2959, + 2210, 912, 952, 1926, -8918, 1098, 594, -1439, + -1402, 11097, 3482, -472, 219, -3845, -662, 9715, + 3928, 1254, -2009, 12375, -1724, 13938, 1892, -1390, + 686, 2174, 1010, -1297, -199, 1855, 463, 2601, + 4408, 1978, 1679, -1614, -3, -11965, 16220, 828, + 1497, -747, -484, 519, -1804, -3814, 3287, 2104, + 1149, 478, -3918, 1504, 2376, -316, -520, -1449, + -3918, 664, 2772, -16434, 334, -540, -778, -2812, + -6026, -4392, -2446, 3479, 3742, -624, 3895, 1145, + -344, 333, 11898, -2725, 12873, -1145, -1807, -279, + -452, -1581, 548, -5180, -2012, 3411, 1188, -1407, + -4016, -468, 1904, -1724, -11390, -30, 14402, 1610, + -2138, 1249, 346, 6097, -1433, -655, -174, 3652, + 4010, 954, -1458, -354, -1872, -2689, 880, -846, + -1304, -1725, 1750, -1186, 1520, 499, -583, 18201, + -1083, -3323, 3072, -5440, -182, 1065, -1112, -984, + 2501, -529, 613, 2054, 460, -5245, 2827, -1445, + -2403, -12898, 1504, -8428, -1035, -4620, 1704, -2586 +}, + +.cb1110m1 = { + 1442, 12425, -2072, 741, -3624, 12979, 2031, -364, + 3750, -5082, -1968, 146, 670, -3988, -831, 3962, + 397, 6213, -1178, 816, -88, -432, -9620, 11572, + 194, 289, -1958, -2115, -871, 5372, -3145, 3612, + 1644, 826, 525, -2545, -514, -537, 2485, -1014, + 1276, 541, -936, -302, -1172, 183, 827, 23939, + 1120, -346, -313, 2759, 3934, -3082, -2260, -906, + -967, 1496, 102, -2782, 323, -1109, -37, 2554, + -2920, 998, -930, -1952, -1138, 1842, -1593, 17345, + -1214, -1065, 2182, -1169, 11745, 278, 8310, 1491, + -564, 1169, 8406, 1359, -1249, -2094, -1365, 4069, + 1828, 897, 1258, 1083, 4319, 610, 766, 2273, + 4057, 621, 338, 1317, -20941, 548, -2012, 563, + 1102, -27, 3007, 1129, -1068, 1282, -2939, 2983, + 1958, 1800, 1912, 1728, -606, 1804, -4768, 5068, + -1365, 4543, 399, -14152, -6206, 6187, -2205, 1174, + -1892, -3284, -206, 2872, -2622, -43, 11268, -104, + 292, -1836, -6276, 725, 2066, -604, 11382, -448, + 742, 2854, -910, -838, -1802, 3678, -397, -530, +-10647, 2356, 12161, 1506, 2649, -3335, 3128, 2169, + 5942, 2152, 14124, 428, 187, 248, 1592, -44, + -59, -2934, 1883, -923, 2673, -847, 150, -2142, + -7620, 11078, -595, 6490, -13673, 948, 219, -1314, + -3080, 1339, 11020, 1362, 247, -1863, 1069, -3786, + 1706, 1064, 320, 4535, 136, 3795, 1465, -1356, + -449, 13, -421, 1769, 20470, 2181, -371, 2444, + -744, 2263, -155, -688, -236, -4481, 1551, 2812, + 2476, -1436, -470, -272, 2276, 594, -858, -978, + 1122, 2468, -9350, -353, -1020, 494, 13167, 1770, + 1734, -70, -4630, 12358, -818, -979, -3931, 1000, + -4343, 2570, 5567, 3322, 2930, -236, -4796, 6987, + -1658, 4291, 1118, 1710, -2050, -13566, -2, -23, + 2104, 1101, -316, 1906, 1643, 340, 5940, 3180, + -837, 1978, -10514, 1466, -6936, 3600, 1205, 957, + -211, -8272, 1611, 5330, -5217, -2264, -5681, -3085, + -9201, -62, 3366, 1370, -9494, 244, -5516, 1210, + 2930, -432, -1265, 376, -1910, -1016, -845, 3228, + 1094, -3168, 634, -265, -3426, 4367, -4004, -277, +-15081, 3998, 9671, 3418, 691, 9124, -2723, 1939, + 2311, 581, -4980, 3381, -1502, 878, -1037, 1496, + 3002, 904, -5388, -3300, 263, 1277, -694, 766, + 1781, 1134, 250, -32602, -285, 210, 2550, -383, + 908, 302, 292, -352, 2615, -97, -1863, 1908, + 2685, -502, -3767, 416, 990, -602, -1533, 43, + 1288, 1326, 16638, 433, -1204, 1850, -1609, 1407, + -7196, 2319, 5770, 1584, 1150, -634, -1686, 1359, + -1396, 438, 246, 186, -11262, -1194, -3790, -3267, + 2692, 755, 142, 16276, -2338, -1341, 10433, 38, + -1510, -2520, -3205, 913, 3783, -1622, -4744, 1891, + 2502, -8, -2962, 2091, 14986, 1270, 2931, 682, + 1073, -10215, 1606, -1010, -822, 1168, -1403, 254, + 1156, 3206, 3958, 1739, -402, -654, -4862, -1869, + 2643, -2858, 658, -910, -2548, 5428, -1992, -208, + 1950, -15526, 520, -4212, 3182, 4160, 1524, -2916, + 586, 3213, 675, 185, -629, 669, -838, 502, + -4065, 353, -4072, -1832, -2108, 5034, 2484, 15386, + -2102, 4988, 70, 1011, 2568, 1360, -2821, 3352, +-11074, -2686, 611, 460, 1811, 3093, 34, -9140, + -1163, 26, -875, 2510, 1134, -1322, 2274, -960, + -823, -510, 1092, 1490, 1466, -1978, 32767, -2379, + -1019, -633, -1306, -242, 2050, 1336, -2668, -2195, + -442, 8, 2292, 4344, -2439, -1472, 1035, -14443, + -1820, 6309, -2096, 45, 3617, 1561, 1252, 2828, + 10682, -894, 10841, 2373, -101, 913, 2160, 2653, + 2960, -4433, 1193, 4892, -2123, -7911, 991, -2643, + -1364, -3641, -9736, 444, 869, 2990, 926, -1220, + -1676, 7492, 4376, -3742, -6964, 4531, 7522, -2686, + 164, 1070, -7305, 1863, 542, 146, -800, 18492, + -4849, -3876, 2162, 5111, 2606, 4243, -3035, -2990, + -1710, -426, -5315, -2332, -1020, -268, -1242, -39, + -1684, -32768, 1288, -726, -1768, 304, 702, -2969, + -700, 586, 1541, -1099, -348, -2816, -2181, -1260, + -1658, 2278, 323, -1548, 2513, 11816, -2416, -5837, + -118, 6770, 3360, -4097, -264, -1270, 1064, -9862, + -3669, -56, 603, -1475, 1464, -9553, 6, -3091, + 5331, -396, 892, -2774, -4674, 3667, -9982, -5160, + -1146, -4026, -2032, 2936, 1805, -1026, 1065, -420, + -572, 1756, -479, -583, 30760, -732, 750, 270, + -1541, 28, -1114, -96, -264, 1167, 548, 570, + 84, -1981, -2110, -1136, 358, -6337, -257, -14658, + 1144, -9032, 322, -3730, -3086, -1351, -3320, -4116, + -396, -129, -3202, 1403, -347, 2400, -371, 532, + 1555, -2760, 1078, 804, -1314, 21956, 2231, -2808, + -1947, 838, 12428, -14514, -384, -1554, -675, -885, + 1358, 1612, -3266, -98, 1876, -447, 2241, 3375, + -1765, 2792, 674, -1513, -1132, -3696, 11368, -1916, + -2778, -466, -377, 2090, 3897, 5422, -2550, 2360, + 3279, 8657, 990, -2128, 2592, -970, -2397, -269, + 22742, 694, 310, -2433, 920, -690, 1478, 1370, + -450, 445, -1379, -1244, 2374, 1400, -1040, -5692, + -1700, -1630, -4068, -1193, -719, -2953, -3562, 264, +-13247, -4629, 5, 3245, -5724, 2449, 3190, -5375, + -3560, -3834, 1271, 1568, -762, 2938, 782, -1390, + 243, -466, 1376, 974, -1646, -1784, 249, -514, +-13543, 1904, 10778, -772, -155, 7838, -30, 3634, + -473, -9100, -112, -3990, -840, 1495, -2346, -326, + 3655, 1292, -292, -10972, 3431, -262, 171, -9775, + -985, 578, 312, -2553, 3375, -8316, 1410, -1326, + 2459, -3116, 1079, 7194, 2720, 1998, 2742, 4672, + -1589, -8932, -124, -652, -72, 2409, -926, -3661, + -3762, 14832, -1350, -2234, 1258, -1604, 169, 103, + 1263, -400, -765, 144, 824, 855, -13344, -1629, + 1977, 2995, -1964, -650, -219, -11607, -6062, -792, + -1243, -1438, 1757, 1436, -3739, 812, -856, -9603, + -2428, -11372, 3273, -2318, -8263, 1551, -2054, -3646, + 3149, 2255, 594, -412, -3030, 1558, 694, -1211, + 618, 3256, 6526, -1572, -9054, 6655, -3208, 3616, + 2162, 3137, 4254, 4610, -10040, 1188, 335, -615, + 640, -1990, -314, 6014, -2392, -2174, 343, 6730, + -1320, 183, -97, -3566, 2988, -13343, -1573, -9070, + 428, 2839, 6728, -1109, -1113, -1102, 5012, 1308, + -3943, 3207, 764, -2928, 1144, -3044, 4033, 1846, + 6460, -4165, 8509, 9824, 15708, -642, 748, 124, + -406, 13033, 807, -299, 1319, 1499, -1206, -1102, + -3129, 3795, 47, -2483, -2470, 2287, 4028, 1656, + -364, -1712, -1568, -3940, -2770, -13688, 796, 3380, + 363, 1673, 1160, -3934, 2884, -5060, 832, 4799, + 364, -3030, -10596, -1805, -3256, -2492, -1831, 1088, + 11108, 3236, 5128, 3052, 4486, 84, 2078, 200, + -4071, 1713, 1539, 24597, -1019, 32, -48, 82, + 81, 1171, -1261, -1783, -1693, 2194, 1714, -225, + -1989, 402, 2611, -708, -15901, 222, -507, 12855, + 1162, -1536, -2884, 1911, -1256, -926, -1875, -1448, + -2730, 3059, -1231, 1680, 1824, 1288, -215, -9, + 40, -957, 27662, -1844, -1927, -846, -1144, -439, + -3507, -2844, -1880, 637, 1042, 237, 1007, -387, +-11913, -2584, -142, 624, -494, 1439, 2225, -13017, + -1901, -1253, -1071, -7083, -2154, 814, 3867, 1130, + -2611, -2260, 1548, -12389, -1018, 102, 1178, 1058, +-14863, 2020, 4094, -1259, -861, -886, -3119, 2638, + 1725, -1364, -2086, 183, 507, -978, -3086, -14966, + 759, -1341, -70, 8538, 2974, -140, 2509, -4460, + 2724, -1372, 491, -6138, -345, -2170, -1187, -330, +-11090, 15657, -300, 2105, 496, -2093, -447, 2000, + 3451, 1482, 758, 4142, 562, -4042, 1491, 3183, + 1685, -2729, 1611, 11698, 14918, 25, 842, -2766, + -667, -1564, -2619, 646, 1391, 862, -909, -2141, + -589, 1468, -755, 1324, -765, 634, 195, -19622, + -1006, -1161, 2434, -1808, 4168, 4108, -2580, -635, + -2533, -2170, -3701, -1047, -363, 769, 5064, -8, + -654, 2346, 752, 13736, -4056, 7, 5492, 7326, + -4894, -3860, 3325, -3947, 4721, 5557, -3699, 194, +-12957, 1052, -1317, -2642, -2931, 1050, -3951, 2392, + -9683, 2519, 2880, -3700, -1820, 831, 4370, -1177 +}, + +.cb1616l0 = { + -185, -20290, 476, -272, 31, -638, 806, -61, + 220, 176, 178, -788, -441, -333, -360, -263, + -116, -512, 9794, -727, 8904, 1192, -277, 756, + -670, 795, -311, 240, -617, -675, -970, 756, + 857, 529, -166, 674, 890, -522, 837, 79, + -618, -1308, -13832, 744, 5422, 2688, 531, 398, + 1500, -1965, -209, -346, 613, 2147, 10053, -1398, + 189, -108, 471, -1202, 999, 178, 762, -601, + 1116, 9468, -281, 763, -1204, -822, -20, -160, + -806, 14720, -269, 143, -1362, -532, -788, -1532, + -405, 85, -271, -4959, 276, -34, -28, -66, + 112, -188, -582, -678, 128, 680, 982, 596, + 12154, -10468, -167, -380, 734, -296, 282, -223, + -86, -342, -812, 514, 387, -418, -364, -1216, + 14, 373, 357, 10897, 11235, -714, 206, -618, + -607, 596, 190, 726, 496, -300, 95, 1022, + -153, 212, -540, 252, 281, 238, -234, 28, + 24, 184, 32767, -627, 569, 323, 486, 544, + -348, -589, -284, 238, 228, 475, 83, -7753, + 182, 745, 400, -633, -207, 137, 382, 90, + 78, 715, 448, 463, 937, 10203, -12047, -667, + -370, -1516, -360, 94, 832, 1027, 1013, 92, + -5446, 834, 302, 764, -94, -462, 8095, 1057, + 308, -635, 308, -877, -946, -616, 51, 1090, +-13351, 490, -819, 15182, -384, 411, -546, -242, + 460, -323, 76, 277, 1582, 900, -1119, 345, + 1316, 1138, 2020, 1612, -148, 812, 1241, -10350, + -9495, -965, -69, 1967, -168, -128, 1042, 447, + 491, -133, -5083, -450, -164, 50, 326, 269, + -283, 226, -40, -334, -110, 60, -47, 169, + 9166, 1188, -942, -14, 2112, -230, 634, -741, + -214, -336, -606, 3102, 59, 216, 1805, -1176, + 211, -8, 564, 156, -261, 300, 597, -21842, + 66, -232, -506, -1126, 1057, 603, 1448, -391, + 249, -9445, -10240, 694, 167, -1158, -645, -385, + -209, 330, 519, -345, -600, 192, 78, -229, + 208, -9053, -383, 10646, -264, 84, 295, -148, + 87, 1292, 257, 1080, -564, -2395, -1200, -484, + -48, -513, -383, -11, -516, -17356, -1172, -218, + 124, -327, 31, 328, -80, 231, 58, -951, + 560, -501, -392, 30528, -56, 382, -515, -50, + -155, 338, 0, -414, -899, 95, 11, 378, + -350, 459, 673, 76, 86, 379, 32222, 143, + -48, 425, -394, -60, -348, 450, -489, 220, + 56, 1129, -125, 322, 168, -16, 322, -293, + 294, -38, 328, 141, 692, -82, -160, -32768, + -140, -1543, 1079, 1052, -924, -569, 168, -1782, + 815, 706, -1318, -3436, 2860, 10922, 236, 10311, + 882, -1911, 11, 1638, -189, 245, -858, 11060, + -826, 696, 224, 1707, 1766, 472, 10832, -265, + -161, 163, 478, -258, -284, -86, 496, 425, + -71, -10344, -141, 425, -1457, 1145, -63, -713, + -583, -327, 628, 368, -18, -1746, -525, -338, + -110, -359, 92, -233, -21328, 460, -275, -98, + -58, 51, 208, 56, -1145, -51, -242, 65, + 76, 214, 141, 28, -86, 26, 925, 193, + 9980, -326, 11342, 176, -534, -303, 130, -1575, + 189, -496, -699, 381, 411, 644, 229, -147, + 694, -1998, 523, -1576, 8028, -10385, -1924, 1174, + 608, 2402, 575, -1753, 437, -816, 1267, 147, + 1448, -614, 865, 1076, -156, 5000, 2020, 2021, + 10283, -460, -2381, -3226, -3991, 4904, -284, 105, + -268, 1049, 203, -646, 732, 6490, -128, 932, + 10, -866, 74, -64, 834, 204, 159, -162, + -170, -110, -28908, 52, -512, -72, 327, 615, + 534, -484, 131, -262, 31, -407, 284, 33, + 11118, -170, 318, 12848, -1126, -659, 500, 310, + -403, -234, 237, -544, 1232, -243, -1178, -965, + -117, 108, -1304, 11728, -2254, 1231, -1077, -136, + -632, -103, -256, -1644, -300, 1680, -1175, -956, + -43, 1718, 175, 144, 275, -802, -223, 1116, + 321, -871, -1174, -1175, 1008, 255, 31172, 28, + -621, -222, -12473, -10995, -712, 247, 1762, 418, + -181, 90, 92, -406, -435, -105, -596, 2262, + -116, -1574, -3402, 6796, 7944, 973, -2661, 2260, + 621, -6984, 382, -1375, -2604, 1550, -1453, 1133, + 966, 403, 284, -72, -36, 174, 457, -90, + 38, -437, -476, -370, 469, 32767, -267, 350, + 694, -169, -782, 2110, -620, -782, -669, -6478, + 10550, -3294, 485, 177, 553, -3232, 1628, 2335, + -870, -360, -1112, 2197, -474, -5113, 3346, 878, + 566, -3823, -1175, 357, 10509, 1077, -514, 1012, + 38, 59, 669, 654, 349, -1046, 355, 192, + 57, 95, 11869, -702, 10201, 204, 45, -608, + -444, 921, -1070, -316, 1286, -2566, 2026, -127, + -79, -954, 93, -1288, -10024, 693, 8820, -366, + -84, -6378, 1682, -627, 386, 254, 503, -152, + -336, 38, -341, 373, -85, 1088, -1707, 119, + -242, 242, -326, -162, 109, 70, -114, -831, + -279, -32768, 62, 58, 214, 136, 194, -103, +-10047, -610, 91, -310, 12059, 346, -656, 986, + 478, 364, 1777, -173, -663, -103, 1011, -373, + 200, 1632, -13098, 3651, 418, 478, 68, -217, + 169, 78, -1176, -1191, -1664, -328, 152, -1053, + 547, 527, -10435, -176, 11131, -137, -36, 1062, + 33, 71, -730, 2080, 2061, -372, -637, -84, + 744, 109, -357, 550, 309, -239, -134, 135, +-20461, -177, -690, -488, -36, -415, 275, 64, + 378, 11250, -802, -569, -200, 1499, 13103, -1090, + -175, 189, -162, -751, 1052, -949, -98, 1249, + 479, -1304, 3293, 771, 1642, -381, 1423, 2258, + 1184, 4806, -10950, -3873, 348, -815, -5315, -3306, + -3307, 2337, 776, -125, -48, -435, -155, -30, + 294, 116, 96, -47, 1022, -391, -183, 252, + 826, -32, 293, -1369, 18310, -146, 239, -266, + 34, -154, -704, -498, -135, 228, -563, -210, + -158, -514, -201, -571, -341, -428, 74, -152, + 297, -162, -644, -216, -252, -13810, 705, 464, + 21097, 74, -169, 792, 12, 131, 320, -398, + -446, 44, -362, 388, -22, -13, -209, 1205, + 9341, 590, -683, -351, 177, -1618, 495, 14, + -319, 755, 11352, 249, -989, 1574, -922, -364, + 366, -10348, 337, -558, -124, 12056, 102, 802, + -548, -254, 1532, 7, -282, -459, -839, 171, + -4445, -1610, -1515, -37, 970, 306, -881, -238, + -154, -58, 27, 435, 166, 571, 225, -844, + -9967, -192, -874, -459, -1283, -1431, 1552, -38, + -686, -207, 709, 11982, -383, 1922, -92, -60, + 708, -900, 867, 39, 1470, 517, -182, -456, + 90, 1026, -192, 9988, 942, 48, 789, 981, + 74, -692, -1283, 1239, 1625, -1121, -286, -1115, + 294, 13228, 980, 312, -745, 11711, 1055, 1052, + -907, 201, 688, 364, 1171, 96, -591, -981, + -246, 875, -352, 677, 881, -397, 12890, 10, + 0, 412, 76, 464, 275, -721, -28, -197, + 104, -238, -372, -272, 490, 1426, 963, -13232, + -1190, 790, 161, -321, 1138, 646, 359, -183, + -659, -129, 348, -22703, 1016, -147, 26, -80 +}, + +.cb1616l1 = { + 292, 310, -255, 305, 69, 25001, -16, -668, + 210, 17, -12, 45, -758, -76, -544, -882, + 61, 26, -1682, -8820, 154, -11775, 64, 472, + -464, 245, 478, -1560, 869, 2192, 98, 645, + -95, -9369, -594, -635, -11132, 900, 1606, -904, + 841, 2570, -1464, 961, 1056, 669, 461, 3307, + -157, -644, 121, -694, 170, 116, 393, 1507, + -233, -654, -162, 108, 98, 17471, 347, -11344, + -701, -284, -246, -337, -1903, 14, 9865, 453, +-11318, -3662, 2373, 1106, -1424, -1709, -2743, -860, + 11008, 1579, -38, -1381, 467, -487, -1306, 369, + 426, -424, 128, 1078, 1085, 683, 12552, 792, + -184, -278, 186, 2006, 363, 310, -75, 862, + 377, 490, -256, -1568, -124, -10785, -1456, -524, + -1259, 517, -1844, 914, 769, 945, 739, -1053, + -691, 177, 96, -1070, -162, -707, -594, -9885, + 103, 452, -734, -6774, -753, 192, 88, -292, + 201, -532, 231, -281, -691, -1232, -1768, -753, + 369, 1556, -139, 668, 941, 264, 10372, 9740, + 976, 2519, -88, 941, 446, -130, 2131, -631, + 325, 285, 176, -236, -634, -91, 112, 32767, + -233, -726, 156, 881, -217, -497, -236, -1106, + 283, 164, -328, -629, -27442, -17, 176, -338, + -192, 538, -773, 634, -180, 872, -190, -530, + 586, 6994, 3060, -336, 736, -1268, -1142, -69, + -1359, -1047, -975, -86, 12489, 1162, -509, -478, + 717, -514, -502, -1755, 11064, 7668, 340, 230, + -127, 1490, -63, 680, -297, 125, 1700, 2505, + 3, -2043, 255, 1547, 569, -2483, 733, -896, + 881, 4780, 1544, -13442, 1328, 1937, -4448, -384, + 749, 173, 7350, 156, -144, 52, -527, -34, + -3, -173, 118, -528, -75, 39, 42, -874, +-14636, 474, -413, -106, -115, -431, 54, 722, + 156, -468, 369, 149, -68, -791, 1318, 2150, + 69, 454, 19032, 3, 111, -40, 349, 88, + 385, -54, -395, -224, -519, 0, -219, 179, + -253, -11379, 11005, 1857, -126, -248, 304, -616, + 351, 324, 500, 1494, -1390, 2349, -1257, -1114, + -213, 8156, -2066, 9746, 763, -848, 349, -7, + 723, -966, 469, 91, -252, 1336, 579, 1816, + 1372, -941, 364, 276, -33, 7, -425, -433, + -21, 546, -671, -31271, -926, 101, 147, 302, + -552, 224, 568, -2386, 519, -458, 13171, -1464, + 1161, 639, -10, -877, 331, 3372, -72, 5158, + -706, 906, 2668, 1008, -2732, 3264, 105, 630, + 673, -1948, -196, -13130, 1726, 737, 4829, 93, + 654, 2175, 3858, -5, 245, -471, 369, 5435, + 356, -12934, 61, 1984, 975, 706, -2454, -642, + -93, -780, -443, -1487, -460, 1112, 385, 309, +-10268, 197, -1692, -1870, 50, -1934, 5380, -1193, + 775, -493, -992, -557, 2952, 408, 4616, -1341, + 10774, 5305, 854, 3031, 67, 617, 2436, -2072, + -1469, 804, -578, 243, 264, 9150, 200, 10753, + -350, 182, -52, -406, 508, -761, -161, -1142, + 25, 484, 127, 126, 477, -341, 110, 371, + 32767, 1090, 678, 175, 146, 1020, -897, 878, + -137, -507, -534, 658, 678, 505, -753, -207, + 391, 60, -23279, -772, -1323, -1578, -3, 196, + -749, 220, -482, -785, 456, 38, 1034, -579, + -58, -1539, 421, -746, 238, 1531, 21290, 586, + -441, -276, 1512, 553, -1407, -276, 60, -1068, + 299, 650, -25, 12590, 2058, 925, -295, -1744, + 5152, 4935, -419, 272, -383, -665, -194, -255, + 574, -267, 541, 1031, -282, -648, 622, -1464, + -28, -269, -533, -80, -476, 282, -336, 125, + 104, 464, -8948, 849, 171, 1518, -296, 51, + -27, 3097, -5103, -412, -494, -194, -713, -1277, + 102, 1740, -445, 3432, 1180, 6404, -10908, -970, + 31, 142, -242, -79, -78, -76, 124, 1031, + 83, -55, 1522, -613, -32768, -394, 1306, 287, + 701, -4725, -1085, 415, -122, -538, -675, 82, + 116, -728, -99, 500, 659, -329, 292, -106, + 9243, -340, -11933, -498, 341, -825, -401, -402, + 142, -13, -309, -722, 141, 0, -681, 494, + 671, -1210, 1466, -1335, 11743, -280, 1616, -11481, + 52, 317, 902, -653, -967, -494, -162, -685, + -438, 756, 81, -207, 577, -7476, -353, 918, + -31, -107, 181, 523, -46, -752, 373, -908, + -1808, -916, 632, 1508, -35, -6943, 64, 13072, + -655, 163, 1221, -1655, -2568, -446, -401, 470, + -622, -944, 3744, -458, 203, 125, 238, 5196, + 21, 12193, 1095, 1091, -787, -1157, -980, -1154, + 7707, -29, 106, 1226, 696, -974, -379, -537, + 56, 95, -477, -528, -11245, -1014, 140, 380, + 89, 540, 84, -619, -322, -572, -240, -26, + 727, 310, 43, -790, -31, -24318, 110, 618, + 44, -108, 89, -191, -33, -201, -490, 43, + -136, 1366, -2, 162, -832, 469, -140, -278, + 600, -15775, -1699, 184, 1825, 728, -1803, -876, + 152, 60, -813, 3063, -929, 972, -282, 718, + 8426, -888, 1383, -664, 571, 958, 982, 236, + -548, 66, 1898, -274, 10715, -1693, 79, -1254, + 296, 609, 682, -1074, 272, 157, -18972, 377, + -12, 438, 536, -672, 292, 719, -464, 1106, + -296, -812, 6, -334, 67, 678, 382, 678, + 301, -22165, 184, 80, -671, -86, 139, -298, + 416, -610, 1057, 15, -230, 376, -768, 643, + 58, 27, 178, -742, 60, -500, 485, -19923, + -1016, 717, 1126, 287, 2171, -388, 1453, -21, + -268, -1555, -263, 713, 1709, -1103, -10699, 1788, + -8, -501, -892, 11476, -2006, 466, 8070, -286, + 163, 35, 494, 76, 1428, -2249, 100, -1542, + 319, -214, -701, 10130, -294, -11962, -656, 227, + -512, -1014, 213, -600, -720, 63, -180, 1286, + 1063, -9671, -1056, 1269, 1484, 20, 790, 29, + -9906, -373, 608, 361, -659, 43, -1034, -96, + -219, -65, 392, -19615, -464, 212, 820, -182, + -227, 463, 301, 642, -219, 386, -1170, 108, + -5583, 422, -507, 530, -1058, -131, 20, -14487, + 101, -14, -415, 32, -1133, -917, 944, -832, + 580, 2509, -959, 470, 1184, 432, -1238, 193, +-13382, 2329, 1993, 1035, 80, 3139, -553, 1683, + 390, 1480, 642, 564, -11173, 422, -984, -559, + -686, 168, -777, -810, -1278, -427, -96, 1691, + 29172, -435, -50, -968, 221, 685, 52, -373, + 525, -563, 350, 528, 305, 705, 313, 612, + -254, -220, -1638, -156, 24, 109, -893, -697, + 245, 2579, 667, -142, 12315, -694, 3799, 5, + -438, -473, -426, 59, -5381, -56, 200, -280, + -276, 96, 435, 729, 336, 123, -714, -372, +-12609, -12053, -238, 223, -242, 230, 663, -645, + 98, 515, 3, 724, 510, -48, 1090, -173, + -5024, 536, 635, -143, 702, 172, -196, 164, + 190, -152, -180, 238, -142, -329, 191, -296, + -416, 11775, -496, -95, 392, 994, -584, -925, + -963, 286, -458, 3104, -1990, 968, -1430, 998, + -407, 28485, 436, 42, 378, -210, 148, -149, + -532, 94, -628, 186, -186, -274, 250, -316 +}, + +.cb1616s0 = { + 5604, 1491, -2064, 1321, -2846, -3007, -1899, -896, + 556, 1969, -2225, 18515, 4156, 1333, 3489, -2168, + 1897, -1440, -1514, -13837, 1017, 4797, 453, -2101, + -6822, 923, 185, 754, -201, -4151, 126, -793, + -437, 2474, 4286, -6405, 4007, -1644, -757, -13106, + 2460, -1874, -1867, -1099, -5146, 2945, 2162, -4427, + 1692, 763, 1756, -821, 66, -348, 2001, 702, + 1046, -1365, -570, 1073, 32655, -9, 450, -761, + 908, -200, -572, -1306, 2589, 2406, 1926, 1772, + 11042, -1989, 3914, -1192, 1817, -11710, 2985, -2942, + 15684, 1919, -667, -1267, 5212, 444, 864, -3844, + 438, -2382, 974, 983, -887, -822, 185, 245, + -3192, 1030, 1441, -28152, -2616, -380, 300, 1990, + -94, -999, 285, 553, 2107, 960, -859, 1001, + -1632, 2208, -1302, 1331, -3956, 10593, -1931, -4486, + 9376, -6587, -463, -3605, 2460, 1306, 2, 1987, + 1643, -552, 1327, 1124, -581, 1347, 650, -29514, + 278, 1062, 1459, 951, 2416, 396, -594, 930, + 434, 3308, -2816, 5466, 4831, -2869, -68, -894, + 58, -13036, 210, -1940, -2524, 1139, 2044, -32, + 969, 2187, 516, 581, 8185, 2080, 176, -708, + 1529, 1132, -675, -1384, -10949, 1174, -5245, 580, + 7490, 3258, 4314, 2706, -13676, -1735, 1937, 577, + -108, 2676, 612, -966, -966, 3255, 1401, 1443, + -1850, -252, 9270, 5037, -1492, -1957, -2134, 1198, + 3470, 10482, -468, -671, -1655, -955, 3248, 3360, + 448, -1854, -25145, -2771, -3318, 561, -672, 1791, + 2194, -598, 1673, -420, 547, 122, -160, -172, + 1686, -397, 1187, 11, -879, -58, 323, 180, + -2588, -2139, -1794, -2924, 999, -26969, -1280, -1401, + -770, 6159, -4449, -4174, 5270, -4813, 4139, -2023, + 2694, 2884, 3418, -5948, 3118, -1176, 4691, 8566, +-32768, -681, -553, -216, -216, -931, -507, 579, + -932, -740, 349, 81, 2120, -1222, 564, -1576, + 1241, 159, 2579, 3236, 19205, -744, -1727, -1803, + 1247, -575, -261, 261, 540, -255, -60, -1428, +-14184, -5194, 863, 997, 1043, -828, 466, -12553, + 2106, 56, -566, 1142, 401, 1360, 2322, 629, + 937, 2954, -10086, -12, 2554, -5760, 523, -15184, + 636, 156, 165, -2638, 1134, 658, 4398, -1385, + -1924, 1179, 3222, -908, -1153, 18082, 1011, 1948, + -1007, 352, -172, -6446, -22, -228, -264, 73, + 76, 2229, -1349, 6103, -11588, 576, 3374, -1616, + 7904, 3146, 984, 1056, -1626, 3113, -3674, 203, + -452, -938, 2074, 2409, -1228, -8186, -2766, 11098, + 1598, -8658, -735, 556, 1610, -7419, -5267, 1158, + 2841, 4497, 7551, -2066, 1105, 761, 2549, -1764, + 2870, 3889, -1478, 1912, 2504, -1417, 963, -14602, + 579, 28, -2953, 1589, 3962, -1372, -3304, 566, + 2687, 9700, -2464, -13110, 3005, -772, -3775, -138, + -4244, 5031, 2523, -2883, 582, -446, -274, 3311, + -157, -784, -948, -292, 3085, -781, 954, -2133, + -6693, 13909, -2236, 416, -2589, -3194, 668, -1988, + -2234, 2365, 1034, 1201, -100, 1688, 372, 156, + -254, 931, 576, -4680, 566, -1823, 294, 1645, + 27678, -1353, -1230, 1744, 570, 1679, 608, -35, + -7150, -4383, -11992, -2910, -2096, 512, 1838, 3129, + -410, -2306, -551, -3904, 4140, -12782, -1743, -106, + -4190, -5554, 12975, -573, -3532, -4050, 15, 1307, + 62, 1643, -1988, 5774, 2064, 4734, 1009, 2038, + -2794, -2704, 2275, -279, -1588, -910, 31315, 1249, + -1642, 78, 164, -260, -878, 698, 1189, 159, + -6137, -1994, 775, 3484, 1635, 1121, 4391, -5883, +-11300, 3722, -422, -2180, -3206, -3181, -1490, 291, + 1326, 399, 1952, -8405, 2240, 175, 3541, 4258, + 1518, -781, 1105, 498, -348, 771, 15918, 120, + 379, -2036, -3723, 10948, -1827, 3220, 40, 210, + -294, -813, -2349, -707, 967, 953, 2625, -13614, + -1519, 9454, 11606, -903, 817, 6237, -8878, -160, + -1768, 444, -2812, -1697, -1010, -964, 1846, 2997, + 2633, -1924, 501, -1464, 2402, -986, -1143, 527, + 1187, -929, 20923, -563, 785, -486, -940, 1625, + -796, -697, 348, -428, 1451, 1087, -2252, -2481, + 939, 890, -2508, -1357, -1868, 1395, -6386, -21986, + 2574, -384, -324, 7752, 2996, -641, -7903, -5745, + -4226, -4178, -4394, 9307, 3906, -227, -496, 4556, + 1099, -838, -2546, 1190, 9937, 11057, 3846, -156, + 433, -2873, -1769, 36, 3188, 4490, 4369, 4714, + -4681, -2804, -1525, -947, -5064, -4180, -1348, -1404, + -1097, -3922, -1088, -444, -13636, -1547, 1685, -1625, + -8494, 2492, -72, 9893, 2470, 705, 105, 5609, + -5403, 846, 90, -688, 1184, 6286, -253, -1610, + 3348, -2082, 8838, -2453, -1315, -1235, -719, -4607, + -2138, -5522, -10466, 1900, 1541, -2688, 729, 368, + -8845, 1282, 438, -2532, -2328, 4833, -6145, 4037, + 3584, 7965, -1495, 6999, -5037, -1364, 7095, 4253, + 2711, -8336, 3946, -1347, 192, -820, -328, -1152, + 1554, 869, 5053, 9707, -5888, -4294, -3858, -3344, + 8344, -644, 1750, -1796, -149, -3706, -14823, 656, + -1487, -2466, 640, -2286, -2902, 2906, 44, 211, + -336, 29976, -298, 2092, -688, 1857, 1807, -1705, + 3211, 425, -1046, 128, 1191, -1966, -726, -3040, + -3632, 1212, 2986, 5266, 1086, 3624, 3068, 422, + 989, 24479, 3791, -2229, -3713, -2379, -1370, -1799, + 2742, -3259, -4973, -626, 2287, 5655, 663, -918, + 13266, 7762, -1131, 2490, -3123, 2869, -846, -2828, + 119, 14540, 4588, -2784, -3713, -2547, 3698, 3189, + 3372, -5436, 856, 4382, 4124, 3406, -336, -911, + -137, 4268, -4436, 1566, 1169, -3020, 13980, -162, + -7226, -2550, -946, -2408, -1056, -587, -273, -932, + -219, -8021, -1086, -2587, 3852, 1235, -22, 222, + -1100, -1594, 137, -1985, 10225, 4998, -348, -450, + 6651, -2217, -7705, 2508, 10061, -4512, -2262, 6156, + 2962, 150, -2456, 1089, -927, -609, -3130, -1682, + -1215, -9251, -130, -3776, -309, -13872, -276, -6922, + -82, 2660, -1255, -6562, 2640, 2646, 422, -84, + -6020, -11551, -1710, -3462, -2666, 12510, 3145, -218, + 2956, 447, 30, 2268, -2410, -1400, 660, 431, + 3068, 258, -2862, 3919, 2693, -744, 3070, -2179, + -1192, -932, -2095, -279, 2045, -8205, 15263, -4415, + 2116, 4047, 10308, 3110, 1368, -1547, 10919, 988, + -81, -907, -1728, -1052, -3539, -4769, -2576, -1038, + 9255, 152, 431, 2455, -1544, 1880, -312, 2724, +-13336, -4197, -1199, 709, -695, -1687, 442, -2564, + -1626, -1888, 1870, 3539, -2922, -3506, -7890, -5486, + -1640, 2178, 2173, -3200, -4626, 1116, 13161, -5221, + -852, -1047, -3328, -3975, -4441, 2870, -1458, 5664, + -28, 3853, 1809, 2721, 658, -15262, 3611, 3223, + 595, 44, -5327, -2486, -1806, 606, -2474, -1236, + 983, 1741, -8390, 1948, 1875, -1806, -6294, -814, + -747, 2209, -1332, 2058, -1326, 5808, 1113, -10765, + -584, 4038, 1412, -3356, 24, -12826, -4322, -2287, +-10793, 3008, -6903, -1273, 1590, -608, -514, -309, + -144, -2024, 1822, 4375, 1122, -631, -76, -595, + 192, -11323, 8168, 10180, -646, 2478, 4516, 1095, + 94, 6, 1251, -658, 2620, 626, 3078, 727, + 7769, 966, -3593, -6990, -2358, 1022, 1288, 2733, + -259, -291, 2482, 297, -1268, 10338, 739, -1862 +}, + +.cb1616s1 = { +-12873, -2429, 6659, 4401, -2250, 1684, 1508, 1780, + -1081, -10, -6012, 895, -2373, -1263, 125, 1448, + 4744, 1556, -7267, 2354, -11368, 1155, -7699, -1424, + -914, -591, 2472, 538, 1431, 953, 5, -3066, + -1063, 3, 406, 979, 922, -668, 1633, 2, + 649, -139, 964, 860, -18807, 1944, 2183, -1358, + 1395, -1167, 5369, -3525, 735, -2698, 10556, -1137, + -3979, 1383, -1997, 5995, 6465, 2310, 1781, -311, + 3376, 7199, -2745, -1656, -5702, 3180, 3017, -5673, + -712, -8902, 2058, -570, 170, 2276, 3869, -9332, + -7965, 1130, 2111, 5638, -1507, 2944, 1574, -919, + -1459, -970, 11093, 544, -2952, -146, -4684, -303, + -528, -1199, -890, -2720, -1665, -10952, 373, 1657, + 1960, -1386, 299, -4356, -4527, 8948, 7378, 1580, + 1301, -6057, 7650, -7399, 4646, -1768, 2756, -263, + -286, -334, 1369, -786, -3760, 824, -13524, -5099, + -1693, -347, -1821, 1992, 3462, 1421, 4900, -462, +-13331, -1617, -2350, 4083, -8721, -5880, 4900, 2912, + 235, 10369, -1340, 776, -2598, 14344, -3805, -568, + -3788, 3591, -394, -1077, 3908, 6080, 1953, -1454, + -1013, 507, 10097, 3396, -4662, -763, 2506, 1486, + 3088, 580, -86, 1117, 1606, -3454, -10782, 4870, + 6170, 4020, -5675, 6848, 439, -8765, 3877, 6250, + 734, 3245, -874, -4312, -879, -4368, -1287, 3212, + -2130, -1435, 1619, -280, -3082, -1070, -18921, 940, + -2428, -1548, -1142, -271, 193, -240, -890, 918, + -4350, -5042, -8994, 5060, -6495, 3455, -259, 892, + -1290, 1348, -1049, -12681, -49, 18286, 75, 791, + 1830, -4116, 10240, -12, -459, 2477, -2582, -3344, + -1598, 982, -324, -48, -4229, -8476, 11120, 100, + -6238, 1164, 2369, -2052, 247, 626, 2213, 2279, + -2627, 289, -471, -1136, -1818, 15413, 579, 1034, + -6835, -8645, -12667, 758, -932, -4398, 565, 458, + -2024, -4050, -3100, 1897, 1324, 3191, 1876, 7660, + 385, -1066, -1539, -1317, -2632, 766, 63, 389, + -189, 1136, -653, 802, 755, 70, -29812, 640, +-11953, 10901, 2078, -529, 10373, 2509, -2776, -104, + -2232, 174, -837, 158, 1507, 1963, -273, 1534, + 1084, 8469, 2568, 12662, -2276, 2808, 2052, -7430, + 434, 3777, 991, 664, 2724, 1631, -3632, 2099, + -582, 4140, 757, 11248, 540, -1425, -10204, 1604, + 600, -2034, -1060, 977, 1843, 3831, -933, -816, + 2975, -6413, 1589, -915, -696, 2155, -556, -17893, + 3348, -1239, 1014, -2539, 1588, -320, 2402, -1485, + -8062, -1046, -1458, 200, 1323, 357, -3752, 2836, + 5774, -11638, -913, -648, 1676, 246, -1277, -1065, + 2334, 14911, 228, 880, -2172, 3072, -2520, 1445, + 1442, 2568, -1254, 730, -1950, -192, 12003, -1587, + 2558, 714, 33, 4324, -4642, -231, -279, -255, + 17824, 1292, 3530, -766, -64, 245, 1677, 1716, + 2507, -3594, -3532, 3000, 1996, -5342, -1868, -5642, + -21, 1132, -1202, 1104, -6543, 1242, 457, -1711, +-32768, 49, -458, 295, 858, 2043, 1268, -1257, + -346, 793, 554, 1260, -1082, 985, -1453, 1704, + 2431, -2858, 1466, -5424, -8870, 4714, -1539, 5767, + 110, -2568, -1482, -348, -11580, -2838, 1213, -599, + -1591, -3472, -6907, 6191, 3928, 4708, 1326, -1510, + 6322, 3849, -4112, 7689, 5976, -3298, 372, -5450, + -2208, 6564, -6915, 911, 4216, 1682, -739, -2146, + 203, 350, -816, 351, -3386, -3016, -15045, -10824, + -553, -4969, 138, 256, 1672, -1840, 2851, 15838, + 2934, 1871, -600, -3293, -845, -2696, 1463, -1075, + 720, -1177, -1538, 2415, 7315, -484, 1082, 962, + 766, -845, -10687, -5932, -4410, 3840, 362, 194, + -4576, 10209, -3548, -127, -1202, 246, -734, 770, + 311, -3126, 772, -2422, -1141, -12330, 960, 1567, + 2816, 80, -4414, -778, 665, 2308, -420, -180, + -1242, -423, 12138, 113, -1477, 2899, 214, 348, + -927, -764, 26, -1127, -2288, -32768, 1302, 394, + 646, -453, -946, -838, 1649, -2292, 1182, -1558, + -6413, -265, -1942, -3467, 1863, -3526, 3446, -863, + 886, 202, -202, 15706, 2226, 1763, 894, 936, + 16191, -693, 1682, 6678, 1742, 1365, 700, -1765, + -803, 299, -2194, 1259, 689, 1670, -635, 28, + 11890, -14, -878, -5439, 103, 11124, 528, 1179, + -62, 868, -664, 749, -1128, 1429, -485, 1920, + -866, 1176, 1051, 379, -29470, 2354, -252, -1648, + -412, -804, 1339, -383, -812, 959, 893, -1741, + 1462, -1868, 470, 2112, -1889, -2236, -1668, -755, + -2562, 1354, 6183, -10964, 5651, -1062, 2550, -6225, + -194, 1687, -782, 1568, -85, 10, -8, 1128, + -521, -1090, -1933, -3441, -2698, 3049, -5822, 20847, + 710, 789, -1872, 1082, -1242, 4152, 1624, 10795, + -2149, -134, 1087, 900, -7943, 5178, -3429, -11622, + -3617, -7444, -824, 3462, -579, -830, 1010, -3301, + 12202, -5446, -1763, 340, -744, -509, 554, 1140, + 12266, -1328, 4652, 992, -1931, -708, 1074, 2762, + 2931, -414, -217, 10166, -4167, -903, 660, 1000, + 27, -1037, -1532, 1308, 8655, 9087, -2998, 9928, + -3722, -556, 4812, 3062, 600, 1281, 3879, 114, + -5404, 1869, 2174, 2083, -11631, -301, -3609, 2443, + 2300, 4863, -838, -29, 2166, 1319, 2110, 1387, + -741, -1225, -1729, -13536, -7376, -1520, 619, -4919, + 2517, -4338, -1650, 475, 456, 4372, 792, 3224, + 1963, -547, -2071, 2142, -254, 1549, -6846, 2430, + -96, 19844, 595, 1197, -1367, 2019, 2014, -1547, + -3775, -1186, -9690, -394, -4106, -1728, -1036, 2945, + 509, 14242, -1893, -2494, -3004, 458, -1753, 2628, + 9790, 3450, -1652, -322, 8263, 3952, -2156, -2110, + -442, 1256, 1561, -4913, -3452, 74, 3051, 8907, + -3376, -96, 16654, 557, 520, -446, -2520, -1712, + 2151, -2423, 3761, -3507, 487, 2103, 777, -416, + 509, 468, 3629, -3155, 11460, 2106, -2191, -1014, + 1154, 9317, 704, -282, 3098, 2722, 84, 150, + -5922, 3063, 8373, -11896, -1157, -2286, -1781, 7331, + 1331, -334, -974, -1653, 752, -1970, -89, -3470, + 2418, -1334, 3615, 12770, -116, 1965, -1643, 1480, + -2225, -10686, -1174, 530, -972, -933, 719, 722, + 1530, -317, 105, -14155, 2569, 4506, -8502, -681, + -1544, -542, -2814, -1161, -629, -1776, -3540, -1366, + -3681, 1838, -1630, -703, 12613, -12335, -2020, 2173, + 27, 315, 4766, 4590, -1603, -68, 1154, -2940, + 1198, 7884, 2502, -586, 440, -5124, -2454, -2597, + -826, 7401, 2803, 4552, -3212, 2966, -5567, 588, + 2216, 7444, -2633, -5922, 434, 3423, 4084, 2296, + 13258, 2070, -4624, -1226, 166, -367, -527, 1110, + -1407, -150, 140, 584, -373, -2649, 862, 500, + 3292, -3506, -679, -20109, 1775, -726, 3378, 754, + -1962, -5764, -1338, -3628, -691, 4554, -1890, -6021, + -6566, 2590, 262, 2509, 257, -4386, -2480, 6352, + -2026, 1234, -399, 22808, -2221, -626, -714, -339, + -1196, -455, -80, 713, 1662, 474, -2324, -527, + 4101, -10526, -4617, 10492, -1143, 805, 1360, 3796, + 942, 684, 2596, 1313, 1589, -570, 5476, -27, + 9220, -1493, 2631, -6726, -2976, -14295, 137, -734, + -2015, 658, 323, 83, 2539, -1230, 1714, -2080, + 658, -18803, 2978, 996, -3374, -28, -1335, 150, + 2154, 1069, -852, 293, 535, -1004, -993, -3692 +}, + +.cb1616m0 = { +-16476, -11442, -305, -196, -767, -2167, -1, 378, + -2200, 22, 2405, 944, -1786, -806, 669, 952, + 10435, -2752, -1625, 1060, -12314, 1283, 234, -2405, + 627, 798, -1058, 311, -2794, -2715, 73, -214, + 813, -2749, 10732, -445, -12147, -2507, -1972, 1652, + -1920, 215, 298, 1106, 826, -7445, 69, -1679, + -675, 1249, 1444, -1109, -48, -1452, -2368, 3034, + -492, 13068, 311, -3446, 326, -1426, 2384, -2146, + 2916, 8957, -196, 2212, 447, 1775, 2607, -11962, + -278, 4335, -1743, 135, 212, -41, -92, 164, + -11, -504, 828, -519, -834, 251, 1919, 762, + 24917, -180, -132, -330, 138, 225, 1038, 3, + 32138, -388, 208, -638, -1338, -165, 200, -230, + 225, -777, -2270, 8198, 583, 3946, -1534, 1666, + -1032, 11384, 202, 30, 2758, -505, -2815, 1265, + 64, -17, -360, 636, 134, 502, 259, 872, +-28148, -1046, -348, -86, -739, 55, 448, 168, + -656, 1094, -1074, 4552, -834, 2296, 2356, -572, + -1917, 10979, 3127, -52, -9969, -527, 1994, -1626, + 1041, 3310, -2319, 2232, -11444, -2400, -1788, -1254, + 5265, 3198, 7088, 4522, 1292, -191, -15886, 2787, + 22, -1610, 184, 380, 521, 336, -158, 877, + 468, 6515, -756, -5484, 100, -464, 9244, -2726, + -1644, -2741, -5362, -1635, 894, -1849, 10118, -3264, + -4472, 1255, -3571, -437, -1050, 1505, -11178, -193, +-11513, -24, 719, 212, -1999, -725, 502, -1164, + -1060, -618, -91, -738, 740, -2254, -4635, 2700, + 95, -853, 1093, -11620, -968, 9492, -25, -664, + 367, 1105, 5501, -112, 7516, 10286, 821, -484, + 204, 1425, -3491, -1234, -4240, 3807, 2877, 1824, + 423, 466, -428, -845, -86, 13276, 8436, -690, + -688, 574, -2874, -552, 4540, 926, -5443, 629, + -395, 2090, -17468, 335, 2419, 1275, -3750, -1589, + 470, -1735, 330, 2532, 1094, -6218, -884, -236, + -9678, -9945, -447, 542, -728, -1922, 108, -2193, + -946, 3270, 2121, 2624, 1010, -10742, -102, 2813, +-13070, 1523, -1532, -1291, 420, -1999, 262, -1194, + -4226, -1450, -275, 83, 1168, 1590, -1517, -426, + -1424, 152, 676, 11463, 824, -2092, -1106, -11502, + -2327, -278, 2597, -11, 793, -118, 393, 580, + -499, -743, -77, -427, -408, -692, -29195, -247, + -2014, -922, 97, 581, 5469, -1419, -698, 1490, + -3814, -2818, -13816, 680, 3595, 1544, 2366, -3018, + 2479, 323, 346, -260, 337, 2730, 12214, -1118, +-11301, -3028, 212, -41, 1764, -580, 553, 5454, + -8, -366, -1202, 901, -796, -8350, 4380, -1452, + -300, 1152, 3058, -3476, -27, 13046, 34, -11438, + -1321, -1528, 13237, 114, 2514, 976, -571, -1192, + -2050, -1635, -964, 416, -23, -1083, -9, 32767, + -548, 556, -1217, -56, 325, 1048, -145, 202, + 1520, 44, 402, 400, -611, 8667, -1083, 1068, + 1224, -12031, 2318, -1109, 1266, 1306, 4673, 285, + -5603, 1555, -100, -1059, 403, -213, -680, -904, + 11443, 581, 12160, -638, 309, -65, 933, -2280, + 1958, 2642, 1808, 7945, -2088, 850, -428, 785, + -989, 1234, -1413, 745, -10756, 1943, -184, 3252, + -96, 932, -664, 13222, 11326, -1374, -327, 1901, + 1069, -1540, 104, -139, -904, 106, 1664, 925, + 46, 353, -835, -554, 1618, -956, -437, -727, + -3403, 1038, 968, 436, 46, -4385, 340, -16903, + -498, 47, -554, -399, -2418, -347, 358, 23280, + 234, -172, -338, 1058, -2172, -1, 1710, -64, + -583, -2224, -780, -637, 3500, 108, 1045, 828, + -728, 9466, -2487, -12773, 1924, -1158, 208, 49, + 136, 12055, 42, -1381, -375, -11534, -249, 1602, + 996, 204, -710, 4761, -511, -15761, 166, -1184, + -192, 50, -105, 890, -9566, 2062, -1536, 133, + -185, -643, -172, -894, -355, -16, -1395, 542, + 2160, -481, -1104, -793, 517, -20454, 698, -181, + -135, -434, 1677, -181, -415, -738, -1574, 1664, +-14058, 597, -12354, -460, -313, 1724, -686, 85, + -1162, -648, 865, 165, -225, -1947, 2818, -778, + -4010, 402, 686, 11170, -332, 10336, -757, 4794, + 2204, -477, -292, -366, 8412, -2476, 494, 510, + 10514, 769, 642, -441, 1079, 6954, 4246, -2272, + -290, -224, 1312, 398, 1536, -692, 330, 157, + -946, -100, -1830, 214, -25652, 1382, -1836, -440, + 110, -506, -438, -2370, 126, 562, -3515, 1014, + 8526, -1641, -2493, 4411, -9210, 2110, 625, 114, + 323, 2450, 2407, 682, 1999, -9424, 2480, 69, + -2091, -11845, -3684, -429, -1622, -919, -518, 70, + 1450, -3523, 5126, 5706, -1451, 2633, 820, -204, + 11338, -8014, 753, -103, 290, -923, 1408, 298, + -1962, -887, 9691, -1366, -11048, -55, -223, -1040, + -163, 132, 676, -760, 4990, -310, -9286, -2427, + 14442, -418, -802, -359, -323, 2877, -210, -1436, + 1574, -1206, 265, -155, -225, -32768, 347, 222, + -1165, 200, 924, 1135, -843, -66, -343, -334, + -113, 209, 14, -203, 1214, -896, 910, -1496, + 1831, -7833, -841, -10453, 1605, -8514, -477, -48, + -241, -58, -32768, 213, 108, 450, 1155, -30, + 89, 240, -768, 1332, 290, -1377, 951, 586, + -8939, 1298, 496, 705, -1661, 1798, -1906, -2233, + -1716, -986, -2204, -1149, 2686, 8578, 32767, 645, + -661, -135, 770, -432, -550, -385, -272, 625, + 1234, -729, 19, 1753, -284, -106, -655, 750, + -442, 23143, -328, -520, -506, 790, -1048, -730, + -471, -438, 483, -374, 939, -226, -397, -849, +-12054, -772, -40, -11776, 232, -540, -2497, -679, + 337, 1357, 458, -341, -7542, 1001, 492, -416, + -1496, -8966, 9814, -1752, -674, 2526, -544, -2900, + -1318, -1578, -238, 75, 11181, 1750, -3182, 564, + -570, 528, 1004, 146, 1144, 7430, 158, 9524, + -36, -340, -441, 596, -1659, 1420, -686, -36, + -596, 2215, -1295, -19722, -2149, -1046, -2339, -1166, + 3057, -370, -556, -33, -322, 260, -23, -106, + -323, 147, -57, 179, 458, 684, -1283, 1251, + 1231, -18548, -513, -480, -695, 593, 3072, 1960, + 322, -702, -1043, -544, 6005, 1378, 100, -225, + -848, -1294, -3346, 828, -2610, -3010, 9623, -1329, + 1956, -1098, -3730, 1137, 12413, -1260, 2457, -10844, + 6824, -4289, -653, -302, -4415, 650, -1684, 6129, + -370, -652, -3245, -473, -150, -3018, 1864, -1258, + 928, -2379, 14451, -119, 2282, -248, 3139, 6502, + 4318, 2214, -1627, 126, -422, 326, -622, -302, + 32252, -268, 456, -260, -260, -968, 391, -497, + 152, 1764, -10580, -369, 277, 70, -13137, -1114, + -1111, 464, 2266, -2968, 728, -1216, 1726, 1044, + 344, -16436, 1558, 3178, -551, 604, 442, -891, + 9570, 1596, -541, -2182, 730, -906, 242, 935 +}, + +.cb1616m1 = { + -116, -53, -24868, -544, -783, 97, -912, -1202, + -622, -147, -215, -362, -16, -522, -1694, -358, + -724, 2628, 439, -18106, -1566, 3048, 4133, -1238, + -3233, -1130, -2884, -2762, 1031, -1037, 63, -2219, + 10701, -1518, -10322, 1425, 792, -1820, 380, -777, + -3017, 1531, -1052, -3491, 1085, -428, -765, -113, + 42, -265, 365, 99, -859, 35, 610, 44, + -495, 262, 1689, 2082, 21605, 412, -717, -1163, + -3285, -5062, -1583, 599, -277, -62, 615, 6014, + -1781, 465, -544, -14114, 11277, -20, 696, 663, + 1156, -240, 631, -2802, 333, -2544, -1628, 775, + -960, -553, 496, -378, 526, -421, -426, 290, + 555, 403, 390, -31714, 25, 449, 654, -334, + -1317, 165, 496, 1554, -88, -777, 626, -1511, + -9020, -1725, 12705, -798, -1240, 195, 1932, -833, + -939, 43, 182, 2547, 4879, 9234, 370, 2058, + -7757, 544, 1106, -660, 546, 9983, 225, 124, + 952, -2153, -1732, 2760, -1270, -176, 3334, -6735, + -526, 10475, -627, 7835, -2263, 475, 731, 908, + 8264, 1605, -192, 5026, 2414, 5223, 595, 1093, + 2345, -796, 8663, 1028, 8188, -185, -1506, -3044, + -100, -1818, -6369, -170, 1728, -9249, 886, -2111, + -349, -1146, 2127, 11622, -8043, 2880, 2215, 1693, + -2303, 1698, 1121, -3575, -927, -716, 1940, 2514, +-11672, 1619, 916, -7, -585, 508, -1316, -972, + 778, 9774, -2126, 2368, -56, 6716, 1169, -3656, + -1330, 9530, -12158, 1188, -11426, -353, 945, -1941, + 1750, 962, -1133, 1793, 2318, -2641, 1109, 933, + 804, 505, 60, -1642, -2238, -2328, -1558, -1568, + -27, 952, 4, 1376, -862, -18404, -1828, 4107, + -454, 52, -1202, 1150, 686, -1950, -497, -10883, + 400, -422, 1734, -54, 11165, -3309, 6402, -877, +-19967, -400, 1642, 1305, -2432, -3115, 375, 3898, + 1812, -5305, -946, 1717, -757, 3322, 126, 747, + 1836, 9957, 1904, 658, 13043, -1779, 675, 716, + -453, 670, -1572, 210, -1533, -133, 294, 546, +-24084, -1036, -485, -117, -184, -624, 273, -901, + 866, 609, -1119, 28, 250, 13, 70, 1178, + 882, -632, -21624, -1339, 926, -1814, -1279, 1868, + -181, 383, -679, -1070, 5091, 1148, 1034, 2144, + -2779, -3810, 4536, 1713, 1003, 13322, 2866, -3217, + 2508, 4395, 480, 14, 167, 763, -34, 1034, + -1342, -1349, -100, -225, 464, -914, -1403, -1851, + 23767, 770, -457, -257, -1072, 1201, 583, -59, + 2627, 1469, -7, -11642, 3352, -1003, -6, 11588, + -311, -2435, -2180, -2352, 1952, 5532, 1945, 7281, + 504, 11882, -603, 45, 42, -1396, -1115, -1041, + -1061, 566, -2733, -765, 687, 118, -1174, -20412, + -244, -986, -151, 2888, 1102, -1303, -135, 529, + 1186, 13220, -183, 906, -4209, -4455, 2247, 246, + -6474, 2794, 1450, -6495, -1819, 598, -438, 244, + -1064, -673, -672, -1563, 543, -2278, -3087, -811, + 1866, 80, -18987, -682, 569, -551, 514, 6876, + 7582, 839, -4031, 823, 2342, -1300, 1180, 702, +-10168, -1957, 485, -374, -151, -11066, -461, -12824, + -1221, 1281, -718, 2012, 330, -289, -487, -207, + -722, 394, 156, -2023, -11006, -373, -4, -238, + 10581, 991, -1236, -814, 553, 1295, -2269, 2783, + -1973, 681, 9759, 3674, -1680, -12118, -1340, -2372, + -288, 2143, -328, 809, 312, 2038, 736, -10, + 908, -11319, 74, 6362, -1122, 1546, -184, 1630, + -1851, -2143, 1048, 8858, -462, -6458, -1540, 811, + 130, -3542, -10424, 9353, 388, 1168, -1797, 1796, + -4151, -2329, 1, -272, 846, -642, 248, -1144, + -9863, -1684, -190, 7611, -4147, -692, 5354, -2363, + 609, -4926, 3166, 2094, 857, -369, 118, 725, + -899, -601, -6, 556, -32540, 950, -478, 757, + 136, -560, -754, 562, -448, 223, -704, 616, + 365, 22610, 1191, -1264, -94, 927, -294, -1270, + -16, -2520, -2026, 420, -6621, -504, 9666, 452, + -379, -1888, 536, 1161, -3021, 609, -4890, -231, + 3926, -943, 32767, -615, 300, 870, -742, 429, + -42, 155, 1060, -900, -347, 34, 491, -3625, + -1529, 10175, 178, -7938, -406, 1628, -362, -7340, + -433, 489, 568, 674, 536, -2886, -6118, -16, + -531, 182, 1498, -4194, -306, 63, -1429, 1109, + 631, -10386, -16, -5938, -52, 10638, -793, 35, + -874, 1633, -252, 709, -286, -780, 17172, -32, + 912, 137, -1684, 2781, -5637, 338, 10961, 1401, + 176, 1890, 563, -371, 578, -235, -882, -616, + -591, -672, -821, 12194, 917, 778, -427, 358, + -1411, 2032, -1372, 1891, -1784, 1830, -1808, -464, + 13973, 2016, 8606, -914, -7329, -1853, -2627, 2219, + 2628, 2161, 2185, 2414, 8857, -273, 1016, 2253, + 1070, 907, 367, -430, 574, 1039, 93, 170, + 255, -267, 550, -668, 287, 1827, 19833, 244, + -3731, 4, 21365, -127, 356, 643, 2016, 3290, + 1242, 46, -734, -2298, -316, -6618, -296, -1465, + 657, -1451, 469, 212, 2823, -2803, -11862, 931, + 44, 660, 1576, 1848, -10529, 2813, -1163, -260, + -195, 16320, -3447, -262, -76, -439, -3487, 1292, + 3330, -616, 1477, 1900, 8843, 81, -846, 6845, + -95, -112, -231, 129, 6982, 165, -3115, 2456, + 2032, 12201, 2747, 1691, -728, -1935, -239, 968, + 15578, -2260, -1813, 440, 2188, -3845, 1278, -136, + -1388, -7850, -462, 2921, -1740, -136, 164, 103, + -206, 32767, -459, 1249, 736, -590, -797, 628, + 612, 327, 396, 552, -128, -76, -258, -557, + 429, 170, 532, -347, 169, -593, 28319, -633, + -1339, -997, -258, 324, 628, 3254, -1118, 8902, + -63, 4762, -2820, 2429, 820, -46, -5366, -2193, + -9005, -1304, -597, -10143, 555, -3000, 294, -1577, + -871, -140, 726, 3700, -2226, 903, -253, 10330, + -2946, 656, 725, -668, -920, 1653, 1312, 1623, + -1150, -11970, 2157, 4532, -340, -8648, -616, -1429, + -980, -30, 647, -474, 442, 5098, 188, -1258, + -8172, -10927, -4207, -112, 2501, -3241, -1949, 159, + -525, 1090, 420, 10418, -11897, 1072, -78, -1028, + 3367, -2647, 3421, 2021, 2358, -973, 272, 27911, + 472, -402, 1397, -927, -1032, -1274, 848, 221, + -2745, -710, -692, -409, 1922, 142, 594, 1053, +-11350, -791, 3767, 1569, 541, 11921, 134, 368, + -948, -2689, 896, -1193, 1190, 8514, 1436, 1017, + 599, -3358, 4002, 12936, -675, 1044, -1210, 296, + -1109, 1992, 1282, 774, -13102, -608, -11145, 134, + 278, 944, -888, 350, -1574, 189, -2542, 3476, + -3018, 3368, -9304, -1839, 533, -2, 1057, 686, +-11819, -1146, -973, 1594, 3526, -2890, -1528, 3489, + -475, -259, -9610, -475, -984, -3559, -742, 408, + -130, -2291, 899, 12177, -1934, -162, -3238, 1610 +}, + +.cb2220l0 = { +-12528, 350, 1782, -474, 1439, -14269, -8, -1782, + -753, -1720, 167, -440, -2706, 222, -1629, -288, + 671, -111, 10270, 878, 152, 330, -1000, 639, + -1280, 1111, -2072, 1439, -476, 553, -2974, -614, + 1666, -466, 11811, -1393, 154, 624, -697, 176, + 1108, 504, 250, 572, -6, 704, 16, 647, + -1143, -1407, -411, 23745, 319, -189, -404, -641, + -86, -707, -770, -302, 13, -398, 76, -681, + -525, 354, -1225, -757, -23170, -484, -965, -430, + 13477, 898, 505, -17, 13812, -890, 357, 662, + 1000, -935, -60, 944, 400, -432, -221, 1047, + 307, -180, 5260, 16509, 650, -269, 1563, -6002, + -3082, 186, -3334, -5770, 1010, -394, 128, -699, + 537, -27, 1014, -531, -50, -163, -1664, -1026, + 732, -1296, 21856, 574, 416, -745, -443, -1382, + 272, 791, 1308, -308, -1636, 168, -10922, 119, + -1190, 1123, 1492, 1706, 1076, -2016, 3270, -994, + 876, -2316, -2992, 12625, -412, -159, 5249, 1424, + -304, 557, -431, -360, -340, -561, -292, 1748, + -224, 1789, -352, 386, 136, 76, 1309, -270, +-24204, -515, 1142, 2119, 1144, -173, 1008, -693, + -430, -1052, 1890, -12483, -11416, 2918, 1591, -1202, + -1782, -1335, 1354, 1703, -510, 4287, -854, 1153, + 2018, -518, -960, 11825, 1295, -563, 11252, 190, + 4078, 222, -3115, 3306, 747, 2638, 1015, -1674, + 8032, -2386, 573, -349, -832, 96, 9564, 11708, + -483, 1326, 1804, -2903, -2024, -234, 1009, 3229, + -232, 803, 275, 444, -629, -192, 381, -1289, + -109, -29019, 270, -420, -408, -466, 113, -537, + -266, 296, 180, 506, 1015, -565, -517, 1494, +-11053, 3968, -1735, 3474, -1991, -8326, 8075, 1740, + -3995, -1287, -2558, 1030, 3742, -618, -2600, -1783, + 2696, 1480, 1054, 341, 3762, 4225, -1742, -11582, + 4348, -8756, 493, -404, 3840, -1049, -683, -962, + 163, 10997, -97, -848, -4632, 2794, 2684, 2540, + 739, 8534, 3688, -878, 3138, 2576, 6444, 3674, + -2371, -218, 2864, 12270, 2866, 189, 4549, 4894, + -6378, -1050, -3166, -5897, 2245, 2803, -70, -1909, + 2783, 3951, 153, 11221, -658, 12780, -238, 3418, + -2235, 754, 311, -739, -2414, 702, 1076, 303, + -320, 47, -3288, -234, -1376, 3022, -103, -1780, + 716, 11886, 10942, -5402, -5431, 1196, -624, -885, + -652, -3248, 74, -435, -686, 154, 8675, 3325, + -1779, -341, 564, -901, 1335, -639, 3494, -1820, + 290, -92, -3088, 4775, -2140, 2334, 710, 10536, +-15042, 14823, -1082, -1045, 1008, 734, 241, -1048, + -933, 245, 913, 114, 322, -1798, 246, 1067, + 348, 408, -183, -728, -12915, 685, 1525, 1694, + 183, -168, 12703, -1268, 1613, -2072, 1546, 743, + 2356, 2135, -550, -153, 1327, 2, 12487, -3111, + 2347, -1722, -300, -193, 2222, -1928, -658, -384, + -5738, -1141, 3634, 10312, -69, -1549, 10879, 1795, + -361, -1838, 143, 1202, 327, -15549, -1268, -194, + 3284, -12, -344, -2042, 1663, 334, -798, -873, + 1736, -324, 195, -417, -382, -22936, 812, -478, + -962, -451, 730, 382, -135, 1311, -290, 122, + 148, -775, -305, -32218, -84, 98, 374, 369, + -44, 923, -432, 156, -1471, 236, -39, 143, + -146, 835, 135, 229, -297, 1690, 6786, -12169, + 815, -176, 1868, -9, -3052, 108, 114, 260, + 11337, -2689, -132, 765, -239, 54, 691, -9737, + -627, -474, 12212, 2222, -7595, -239, 1793, 2115, + 563, -2390, -1991, 2906, 675, 923, 146, -3605, + 981, -1725, 92, -562, -21192, 304, -450, -323, + -889, -726, 688, -1186, 2590, 466, 326, -734, + 308, -782, -3219, 963, 454, 1348, -513, 953, + -1414, -320, 1012, -1148, 1185, -17356, -15, 1546, + 1346, 2182, -2457, 1426, -1690, 155, 8793, 1394, + 510, 2608, -203, 2697, 608, 2612, -13542, 177, + 4642, -824, 1877, -1864, 1681, -1033, 1487, -749, + 356, -11, -1, -366, -215, 1531, -38, -922, + -378, -296, 1245, 19967, -2389, -459, -3729, -163, + 6578, 354, -1471, 195, 353, 1831, -605, -2291, + -359, 947, 8409, 3454, 12416, 2434, 3485, 40, + 350, 1640, 738, -9827, 935, -171, -944, 1407, + -399, 571, 2805, -13108, 784, 678, 2405, 328, + -417, 1188, -1596, -649, -1358, -1130, 341, 202, + -2459, 11307, -2250, -3518, -1812, 3338, -924, 10027, + 3004, 703, -184, -666, 223, -1644, -7221, 3507, + 10108, 1324, -412, -371, -92, 2496, 3182, 10, + 10269, -998, -1010, 610, 3296, -1842, 407, 406, + -1609, -181, 2202, -662, -1450, 1360, 1488, -212, + 1501, -214, -555, 168, 275, 301, -950, 3272, + -323, 20632, -21, -1729, 11013, 2149, -9278, 6735, + -593, -7374, -430, -2776, 2343, -1374, 519, -4876, + 827, -2477, -1971, 1249, -23380, -1810, 199, -761, + 2182, 1654, 447, -488, -1219, 364, -53, -382, + -989, 154, -545, -872, 776, -211, 7706, -767, + 8006, -138, 1989, -180, 306, 486, 1112, -648, + -12, 1538, -300, 2458, -5833, -1181, -7680, -6700, + -621, -308, -29995, 602, -24, 94, 752, 517, + 86, -249, 1058, 704, -404, -387, 106, -632, + -159, 1275, -197, -1263, -1210, -1689, -10488, 1950, + -2037, 5974, -3960, 38, 1284, 2851, -2813, -1613, + -1646, 10164, 138, -2956, 196, -118, -484, 860, + 124, -262, 30, -1448, 128, 287, 327, 590, + 27272, 391, -738, -1631, -481, -1511, 82, -574, + -737, -614, -447, -80, 292, -19, 252, -2, +-28117, 332, 141, 1485, -154, 1382, -1755, -422, + -1692, -2144, 910, 1004, 1894, -1537, 897, -458, + 19483, -1321, 2280, 622, 288, -2253, -1001, -976, + -408, -394, 132, -250, -428, -22, 140, 287, + -141, 30981, -293, 631, 729, -2, -231, -127, + 377, -879, -294, -107, 253, -964, 1258, 570, + 71, 9421, 8358, 9295, 8354, -546, 1153, -1807, + 1577, 2911, -1808, 1808, -1631, -1348, -6977, -382, + 1625, -2793, 10633, 1977, -1793, -12480, 1, 2010, + 23, 423, 1102, -1920, -478, 1845, 1016, 465, + 758, 800, -1540, 5448, -10472, -2749, -989, -6362, + 9283, 373, -2560, -5478, -1618, 20, -564, -1074, + 4075, -471, -515, 409, -2069, 359, -788, -11618, + 2524, 917, 2757, 243, -3261, 6922, 6268, -3148, + -2804, -3412, -4262, -1903, 1043, -12255, -162, 1598, + 496, 454, 1401, -1635, -12711, -673, 3392, 1255, + 1602, -1206, -297, -2066, 3009, 1149, 1285, -1307, + 412, 27971, 183, 569, 1304, -706, 824, -635, + -358, -340, -28, -1344, 955, 14, 676, -243, + -20, -11947, 1350, 8122, 196, -10161, 4925, -3764, + 1661, -401, 145, 253, 680, 718, -614, -613, + 498, -293, -4257, -684, -14853, -10522, 698, 1537, + -2016, 1162, -2684, -1578, 8, -238, -3214, -2749, + -1577, -1187, 113, -1457, 1068, 590, 25, -644, + 1000, 2430, -1612, 13246, -2684, -1642, -4648, 816, + -1103, -7556, 5753, -3998, -1338, -776, -1958, -9652, + -1288, -290, -4240, -2788, -8191, 1625, 2558, 1238, + -1824, -39, -3129, -8916, -3302, -5632, -1768, 866, + 708, 684, 3530, -8772, 1485, 677, -10398, 686, + -852, -6974, 5286, -2658, 612, 1180, -3367, 4285, + 5708, 1416, 166, 2787, -3697, 1431, 1648, 7942, + -544, -1064, -514, -840, -870, 1246, -3582, -9310, + -3802, 4025, -8251, 5978, 132, -619, 2792, 9786, + 1244, 242, -1948, -4701, -5904, 951, 7486, -3494, + 48, -4468, -2403, 6090, -2343, -4175, 1336, -2546, + -281, -736, -1758, -1720, 11066, -918, -1354, 3885, + -33, -4116, 1246, -218, -8082, -766, 7796, 1505, + 1559, -964, 1741, -454, -1628, -762, 3034, -804, + -888, -9682, 9603, -2556, 2874, -5456, 3066, -7747, + 956, -660, -1538, -381, -760, 1747, 547, -517, + -697, -1411, 410, -514, -3988, -219, 13358, -2393, + -280, 11230, 2640, 795, 2534, -8094, -1838, 71, + 16, -203, 4224, -96, -2829, 2010, 1961, -1312, + -1266, 3952, 6894, 6996, -8062, 4708, 1193, -3439, + 1549, 935, 170, 614, -868, 43, -246, -188, + -940, 130, 126, -736, 697, -510, -56, 1596 +}, + +.cb2220l1 = { +-13582, 1049, 15596, -101, 707, 2677, 542, -522, + -636, 194, -2361, -1252, 524, -32, 227, -419, + -652, -601, 84, -10428, -1417, 13117, -573, 3774, + -3632, 2025, -1237, -692, -1486, 192, 1221, 452, + 436, -764, -2636, -153, -685, 118, -424, -635, + -458, 209, -577, -12042, 4240, -10861, 49, -1534, + -991, -2416, -280, 2095, -1841, 1278, -94, -423, + -572, -949, 734, -1087, 12449, 6514, -4582, -7845, + -3722, 1446, 2531, -1238, -2070, 1515, -1331, 2382, + 1066, -1298, -1189, 6811, -1868, -1082, -1732, 356, + -2622, 493, -3345, 1367, 1737, 4497, -14734, -1350, + -354, -1340, 8478, -1152, 1832, 1793, 830, 974, +-13918, 522, -1472, -2502, -2625, -157, -360, -17, + -830, 673, 36, -1339, -14860, 522, -13377, 851, + 937, -1103, -44, 408, -364, -953, -392, 1837, + 2342, 1236, 111, -218, -919, 985, 10077, -1065, + 1840, -124, 3780, -11015, 204, 437, -830, 6712, + -1720, 288, -991, 1094, 5647, -1296, -2284, 1642, + 1000, -35, -115, 208, -244, -1099, -832, -2092, + 802, -163, 3343, -964, 314, 126, -1204, 754, +-17838, -826, 4414, 8331, -770, 1246, -3500, 1680, + 833, -108, 494, -910, -6314, -2832, 2553, -6230, + 1165, 3631, -1717, 2404, -32768, 520, -38, 1228, + -708, 58, 260, 771, 588, -448, 389, 156, + 606, -830, 400, -488, -188, 536, -1428, 11982, + -156, -1407, 1796, 1036, 905, 1371, -1472, 325, + 3098, -1436, 6449, 2105, -11183, 1632, -1848, 1019, + 1247, 1308, -1351, -823, 1679, -651, 978, 296, + 1088, 3965, -1414, -11838, 139, 8664, -3452, -1804, + 3088, -2044, -221, -1347, 1232, -909, -1323, -1409, + 1399, 2557, 14552, 1535, -5088, 1699, 1012, 3333, + 3940, 2294, 1189, -2256, -484, -3307, -1333, 464, + -305, -744, -24, -20464, 332, 2968, 308, -649, + 292, -402, 1226, -2575, -1505, -100, 1413, 733, + -1024, 616, -121, -322, 67, -161, -708, 251, + 462, -26697, -1112, -1381, -324, -286, 1091, 662, + 15830, 13124, -1049, -1816, -355, 1848, -801, -1710, + 2513, 458, -798, 386, -726, -356, -1240, -1133, + -388, 631, 91, 1867, 2511, -306, 3097, 14399, + -571, 2191, -2916, 2850, 761, -2442, 698, -2193, + -2739, -1914, -4077, -4631, 12702, 333, 1162, -6248, +-12466, -310, -107, -2465, -163, 1970, -998, -1253, + 2007, 79, -426, -276, 365, 568, -520, 23642, + 276, 1059, 184, 1081, 650, 2286, -191, 883, + -1946, 246, 64, -225, 800, 910, -136, 1187, + 955, -15604, 12847, -747, 874, 506, -646, 1920, + -449, -321, 1152, 1341, 1653, 341, -32, 907, + 673, 1045, 1245, -499, -10331, 4683, -1121, -3164, + 3382, 6397, -1341, -769, 1186, 229, -1354, -7370, + 155, 1858, 5617, -3487, -247, -783, 724, 508, + 14029, -528, 1853, 1572, 580, -708, 528, -1394, + 8922, 2284, 550, 3084, -1726, -3235, -700, 7132, + -3540, -200, 3288, -815, -2189, 1232, 2412, 2088, + -1101, 12592, 806, 1508, 1741, 13, 1124, -3883, + -687, -8180, -3094, -3346, 1781, 11836, -657, -3469, + 1429, -1822, -3433, 87, 3871, 651, -965, -1757, + 6778, 109, 112, -131, 710, 11943, -12107, -3460, + -726, 1002, -3803, 580, 2756, -1293, 116, 457, + 581, 3834, -1678, -977, 1242, -2040, 232, -10034, + 1644, -2290, 1368, 172, -3012, 1423, -2620, 3608, +-10831, -303, -1610, 3246, 562, 5212, 448, -877, + 954, 688, -8981, 579, 717, 1315, -952, 6817, + 662, 3218, 7213, -2116, 10446, 1012, 2270, -858, + 10, -1066, 10618, 6108, -547, 3221, -893, 3888, + -1088, -10085, -247, 1064, -3500, 3123, -2480, -2128, + 2788, -2253, -9756, -472, -166, -680, 727, 74, +-14151, -189, -1734, 610, -1169, 845, 94, -786, + 394, -581, 500, 1981, -10940, 354, 500, 399, + -1952, -373, 2197, -4712, -2582, 2751, 654, 613, + -1254, 1406, 2056, -12518, 1583, -582, 4834, -1541, + 508, -20580, 270, 1214, 515, -1082, 5, 7, + -533, -28, 1270, -1307, 497, -57, -331, 933, + 92, -856, -10458, -4576, -9991, 2426, 6552, -3022, + 279, -562, -192, 1878, -2237, 4978, -1753, 332, + -1462, -853, 238, 478, 9746, -7385, -10290, -8278, + 457, 3121, 841, 48, -3745, -1298, -637, -1820, + -468, -248, 1400, 394, -125, -950, 11524, -1860, + 426, -773, 12669, -1620, -158, 1625, 1045, 768, + -66, -12, 1625, -770, 559, 54, 593, 14468, + 14994, 490, 543, -811, 700, -277, 900, -178, + -2000, 475, 241, 950, 106, -1260, 874, -862, + 18907, -1947, -844, 205, 1253, -83, 1966, 2300, + -2694, 852, 2450, 661, -334, -518, -1136, -2377, + 325, 1152, 511, 881, -22205, 898, 574, -582, + -265, -1362, -253, -40, -780, -1967, 469, 1484, + -818, -926, 958, -415, -7934, -330, 330, 1439, + 1643, 77, 1034, -156, -12094, 3782, -5725, -520, + -598, 2345, 3506, 5333, -322, 99, -48, 1490, + 20, 11393, 3468, -1144, 7013, -3728, 7145, 1432, + 1810, 26, -912, -6530, -1079, 1771, 95, 4007, +-11346, -43, 249, -14616, -249, 1, -725, 244, + 1053, 1815, -626, 408, -344, 1972, 2222, 2288, + -2324, -411, -3993, 494, -706, -5078, -11695, -3645, + -2090, 2465, 5893, -5096, 6815, -537, 5003, 1258, + 185, -1555, -875, -2047, -170, -433, -194, -1020, + 349, -724, -31811, 197, 251, -418, -222, -618, + 278, 554, 363, 183, -898, 14, 350, 745, + -2054, -1623, 806, -770, -1246, 1594, -54, -18501, + 1516, 840, -86, 484, 514, 1209, 978, 564, + -537, 34, -431, 128, 938, -1807, 832, -90, +-29509, -642, 1397, -52, 523, -393, 216, 908, + 9, -63, 710, -949, 3, -184, 175, 613, + -687, -408, 27, -855, 18258, 1282, -948, -219, + 2374, 1668, -4567, 1063, -2045, 12026, 461, 3074, + 1050, -1788, 169, -13442, 612, 19, -2019, 685, + 452, -152, 299, 310, -2327, 348, -215, 1634, + -201, 2162, -10300, 12452, -3733, -420, 2388, 518, + -2308, -160, 1552, 3347, 1650, 3293, -1108, 2065, +-12618, 20, -42, -643, 202, -1298, 251, 2489, + 1322, 2362, 3698, -190, 592, -12484, -937, 2072, + 1531, 302, -409, -899, -1016, -388, 1103, 30006, + 789, -1609, -548, -1002, 1055, 605, -955, 1557, + 452, -623, 810, 597, -696, 10628, -1174, 606, + 2628, -553, -2297, 6668, -2600, 787, 3504, -3606, + 4087, 1052, 6276, -7619, 337, 2565, -13, 1205, + -124, 1222, -28082, -79, -553, 628, 542, 1315, + -609, 322, -895, -377, -694, 610, 239, -152, + -2901, 9890, 716, 1030, -3306, 988, -738, 562, + -2209, -1676, 4507, 1165, -12924, 866, -154, 3664, + -367, -2580, -7286, -572, 2167, 118, 508, -4429, + -480, 842, 2489, -1636, -2042, 1125, 1847, 2586, + -5639, 3361, -760, 11189, 623, -282, 1353, -279, + 515, -816, 713, 322, 417, -2820, -1114, -1563, + 401, -21604, -1300, -972, -2298, -483, 2176, -830, + 2135, -4084, 1095, 1950, -1937, 539, -374, 3197, + 682, 472, -1368, -8095, -12026, 4833, 5586, 467, + 2400, 148, 381, -138, 954, -459, -724, 970, + 156, -1955, -1363, 560, -761, -1708, -1599, -17408, + -1064, -1372, -500, 1160, 735, 441, -773, -228, + 420, -1128, 260, 930, 12879, -926, -231, 1355, + -850, 559, 11377, -1729, 2478, 961, 336, 1056, + 5081, 9788, -555, 4067, 8664, -2720, -1462, 3012, + -7280, 965, 1462, -4703, 3649, 2084, -699, -262, + 408, -188, 2193, -2216, -4509, -736, -1039, -4848, + -8243, -7958, -172, -1318, 9566, 4665, 3363, -3672, + 1581, -551, -2024, 1630, 1543, 90, -1728, -792, + -1799, 2571, 80, -412, -301, -2870, 1796, -5327, + 111, 17342, 592, -2108, 477, 1541, 1266, -1062, + -215, -2210, 223, 1215, -197, 87, -18340, -67, + 804, -398, -118, -3457, -741, -1935, -704, -274, + 566, -872, -1821, 12874, 5057, 2069, 1742, -6205, + -6115, -1614, -294, 187, -5210, 1734, -1466, -2162, + -2266, -642, -148, 440, 2, 233, -319, -637, + -734, -230, 301, 508, -433, 311, -313, -1206 +}, + +.cb2220s0 = { +-15119, 7508, 1337, 4182, -2914, -3733, 2686, -470, + 2249, -3901, 1444, 3805, 99, -1771, -354, -903, + -2755, -709, -4980, 214, -2750, -652, -1042, 1434, + -1090, -612, -2574, 1274, 1310, -760, 1420, -112, + 2776, -4843, 15060, -4929, -3942, -5721, -1628, -1142, + 3023, -1435, 1402, 1010, 623, -3527, 2624, 184, + 988, 98, 340, 16676, -1262, -1162, 3183, -4816, + -592, 1019, -1406, -2478, 2371, -1004, 3944, 803, + 5665, -2261, 16427, 349, 3113, -916, 442, -1754, + -3551, -1351, 1563, -1316, 532, 343, -392, 1509, + -717, -122, 2462, -929, -185, -683, -18780, 2682, + -123, 518, -379, -5160, 245, 1940, 13964, -12311, + 590, -30, 159, -1558, -1940, 36, -1528, -515, + -1178, 856, -395, 29, -5854, -12943, 13286, -2572, + 1049, 768, 3292, -3921, -52, -462, 1968, 4933, + 630, 930, 1026, 2606, 319, -277, 6333, -2119, + -4700, 2164, 1583, 154, 2107, -1467, 339, 634, +-17240, -595, -3525, -2690, -1788, -476, -41, 165, + -1016, -1456, -348, 11289, -2920, -3804, 2357, 12012, + 3848, 1796, 2164, -5555, 4527, -201, 965, -4893, + 3419, 6441, 1691, -77, 348, -769, 27319, -345, + -336, -541, -320, 972, 926, -1026, 1052, 702, + 224, 76, 742, 220, 6292, 8625, -3742, 4139, + -5989, -5615, -641, -231, -837, 6156, 4141, 3792, + 4746, 9972, 1800, -397, -2237, -2218, -7595, -2761, + -496, -1451, 1178, -970, -1226, 2527, -2105, 1778, + 1446, 1986, 9970, -13107, -985, -1142, -1367, -329, + -4498, 590, 36, 2073, -1069, 862, 133, 2516, + -27, 4494, -11602, -1638, 2524, 1449, 5684, -611, + -9452, -2618, 5006, 3481, -639, 379, -2333, -498, + -713, 382, 784, 269, -5692, -350, 524, -18705, + -1042, -1349, 1210, 1770, 3964, 4908, -1131, 17535, + -788, -1896, 30, -2682, 1044, 1604, -3740, 18, + 1771, 331, 4279, 2634, -368, -447, -6995, -1224, + -688, -5368, -236, -8872, 2449, -12189, 4465, 1895, + 2484, 1315, -5446, -457, -575, 101, 2356, -1585, + 3204, -104, -7244, -1678, -801, -2620, -4603, -11876, + -1787, 2962, -1796, -3385, -411, 5796, 2900, -562, + 835, 293, 7127, 4939, 721, -2972, -482, 121, + -2694, -2277, 412, 12770, -342, 718, 3306, 502, + -7281, -307, 552, 7158, 3289, -5051, 5230, -1185, + 3024, -942, -1347, -283, -13937, -208, 2576, -906, + 1848, 5692, -2434, 175, 7837, 1872, -4536, -3341, + -957, 14787, -1598, 9058, 3776, 407, -1734, 1259, + -3011, -131, -3589, -614, 272, -2968, -1611, 3645, + -8126, 2120, 4868, -5462, -13235, -3452, -6077, 5064, + -1593, -1395, -2427, -1139, -958, 1585, -1330, 2178, + -778, 3545, 2836, 7712, 5993, -432, 3575, 929, + -7951, 115, 2180, 3904, -193, 1556, -252, -913, + 2574, 11948, -4525, 1391, -8513, 4540, -12815, -3379, + -4676, 1838, -5676, 1321, -6168, 1397, 1020, 438, + -141, 3424, 392, -512, -1614, -1396, -318, -2451, + 1545, -7132, -1763, -424, 3575, -828, 19216, 1978, + 1624, -1969, -1667, -772, -2031, -781, 1732, 244, + -212, 416, 900, -8960, 1002, -1077, 4667, -3527, + 1586, -13109, -2442, 3829, 4358, 1056, 2960, -1087, + -662, 4775, -6316, 6157, -3736, -2040, -187, 904, + 1254, -636, 2032, -734, -1271, -2691, 3376, 564, + -7769, -5482, 840, 14171, -5828, -966, 1685, -10192, + -388, -434, 3706, 594, 2188, 365, 209, 298, + 1825, -236, 12762, 1644, 3199, -468, 12876, 130, + -2169, -3406, -3571, -4655, 2339, 10757, 1292, 2920, + 289, -314, -591, -1631, -1778, -1296, -254, 469, + -9408, 1154, 334, -4, -1922, 2787, 317, 416, + -1703, 14075, 1601, 638, -2260, -973, -824, 2816, + -2954, 3282, -3716, -882, -3447, 3058, -6701, 1233, + 177, 3579, 3508, -3539, -10511, 7507, 7608, -1928, + 2482, -719, 2278, 5167, 9828, 10572, -3635, -2750, + 3407, -116, 3343, -3432, -3375, 982, 903, -3239, + -444, -1574, -333, 9613, -1914, -532, 1879, -78, +-17944, -7029, 1586, -3122, 360, -401, 1219, -2086, + 3066, 878, 5780, -948, 102, 1952, 418, -416, + 1002, 1380, 1297, -92, -640, -555, -1159, -28517, + -1757, -696, 124, -618, 1590, 300, -598, 924, + -190, -1734, -4196, -5345, -14068, 5971, 8293, -3878, + -1448, -1777, -174, 921, -1555, -866, 560, 232, + -1914, -4002, -772, 1960, -4945, 3424, 6492, 3675, + -800, 5346, 4404, -639, 10697, 1631, -1446, -4469, + -7804, 3721, 4824, -620, 1099, -2956, 5175, -2453, + -4894, 2562, -1842, 4940, 1391, 2818, 1095, -4285, + 6469, -1966, -14564, -2232, 592, 5570, -2682, 2651, + 4678, -7444, -2387, 6812, -12757, -5664, -42, 134, + -2861, -1780, -158, 1410, -4990, 673, 2083, -2639, + 3019, -2, 8305, -1981, -2114, -54, 2892, 1659, +-14913, -74, -1092, -1187, 2465, -2218, 791, -608, + 3077, 26, -1096, -1692, 3234, -7116, -1835, -5244, + 398, 10137, 698, 2298, 498, 7060, 6430, 1393, + 2540, 487, -1534, -1926, -5139, 3425, 4533, 5067, + -535, -924, 938, -1799, 16120, 2037, -3727, -821, + 2986, 2314, -223, 1358, 9, 2697, -1806, -940, + -3630, -1843, -2776, -2246, 580, -1678, 2427, 2126, + -1935, 2956, 849, 18234, 638, 342, 1036, 249, + -24, 2713, -1973, -134, -4469, -2014, -6162, -19776, + 703, -50, 2295, -2294, 1971, 1179, 1014, 2374, + -1480, 1513, 630, 1542, 24716, 3534, 2926, 662, + -2886, -521, -348, 402, 1112, -371, 1587, 1822, + 1880, 1284, 302, 1873, 1284, -924, 6420, 4650, + 7986, 427, 361, -8276, 304, -11911, -1305, -2018, + 189, 258, 839, -942, 479, -3162, -1195, -1138, + 1560, -1850, -5304, -10132, -10533, -1301, -3147, -680, + 56, 4260, -6867, -1350, -1094, -1385, 1831, -2, + -941, 3740, 7701, -855, 3304, 3444, -4467, 269, + -4092, 588, 13957, -1566, -3561, 1936, 2816, 2982, + 1804, 2710, 419, 685, 4468, 488, -9520, -2738, + 3974, -9978, -1681, -2418, 2340, -717, -899, -2855, +-10470, 1030, -2346, -5555, 2559, 2180, -5324, 1832, + 10294, 342, 11318, -2376, -3904, -1524, -3806, 1078, + -1896, 7199, -3522, 1364, 2291, -911, -156, -4327, + -778, -30451, -577, -158, 560, 2749, 799, 2689, + 337, -301, -1218, 1243, 687, -880, -419, 40, + -280, 4, 1834, 9908, 1953, 408, 1080, 8777, + 3861, 552, -6906, -3546, -6666, 35, -1903, 4788, + 5080, 2865, -233, 1031, -4519, -13752, -2417, -1742, + -7389, 3191, -626, -411, -7351, 3063, -1801, -4377, + -2974, -124, 2778, 2733, 349, -1191, -6528, -1699, + 6907, 239, -2765, -5706, 3627, 2096, -20, 2285, + 7164, 3523, -11582, 3616, -614, 6266, -285, 3643, + 1506, 3665, 1261, -2338, 418, -5062, 4893, 2945, + 1923, -2990, -4531, -8858, 2769, -5029, 2202, 3337, + 10703, 716, 5614, -14982, -2366, -5415, 25, -1665, + 4353, 3060, -2159, 1005, -1587, -368, -949, -2788, + 1063, 1307, -59, -46, -6337, 500, -1194, 2914, + 2372, -1393, -1914, 3820, -1160, -135, 3777, -14151, + 5208, -2290, 5738, 1018, 385, 1883, -2626, -9289, + 1082, 1558, -1756, 2720, -519, -13050, -3672, 1759, + -13, 3471, 4071, -5977, 167, -4210, 2219, 1344, + -2412, 4497, -6946, 660, 8774, -3141, 6080, -4478, + 2520, -609, -3080, -741, 7864, 7428, -333, 1154, + -1849, 1478, 460, -338, -6651, -2480, 1692, 2104, + 1642, 2720, 1017, 2759, -1822, -2668, -2265, -1019, + -8926, 1487, 733, -15128, 5543, -4214, -7044, 666, + 7108, 2222, -2454, 4995, 5108, 1481, 2242, 5743, + -487, 9669, 295, 3539, 4836, 487, -1541, 824, + -5946, 6692, -368, -1390, -6103, 4545, 2671, -12272, + 3160, 760, -2080, 3523, -2752, -2940, -718, 2202, + -5523, 2346, -5580, -5007, 6212, -5406, -11348, 1272, + 5389, 2331, 3691, -1184, -3585, -4500, -603, -38, + -5285, -531, 4844, -3850, 3944, -6525, -5723, -2313, + -985, 879, 578, -3217, -3600, -2814, 1432, 11568, + -1461, -1761, -4110, -4104, -103, -1803, 5195, -1477, + 1348, 107, 3902, 1215, 3522, -3404, 9098, -237, + 68, 34, -2524, -12040, -6183, 2122, 470, -1257, + 346, -232, -1725, 5913, -1525, -5873, 1846, -11368, + 1043, -1027, 4201, -3864, -4294, 7756, 1847, -3688 +}, + +.cb2220s1 = { + 32767, -2256, 16, 2156, 267, 1128, 1394, -1936, + -488, -405, -345, 1068, 578, 1504, -1192, -405, + 292, 1149, 4243, 152, 1036, 1782, 2655, -23349, + -1100, -1933, 354, 966, -1554, 1173, -1186, 495, + 618, 1009, -2715, 461, 5974, 939, 3552, 1325, + 3385, -956, 2177, 2101, -145, -1000, 2326, 2466, + 2822, 15822, -581, -713, 4398, 828, -3249, -3942, + 1990, -862, 2272, 348, -2972, 241, -2678, -1881, +-22307, 417, -587, 312, 280, -2524, 2380, 299, + 3931, 178, 2910, -2544, -356, -786, 546, -73, + -862, 240, -1653, 1286, -3875, -2072, -1477, 16800, + -1148, 2099, 3216, 5174, 2177, 3042, -796, 414, + -506, 883, 1837, 1451, 2864, 850, 2395, -414, + 3254, -1937, -16379, -3976, 2178, -1473, 4759, -832, + 8890, 3324, -3053, -407, -1530, -431, -1220, 128, + -3472, 980, 52, -14716, 1732, 1931, -6518, -1784, +-11113, 4466, -24, -8559, 105, 5478, -4116, -2213, + -3006, 1738, -4189, 3310, -753, 1869, 580, -885, + 3089, 8146, -4990, -1825, -524, 3620, -6920, 621, + -1064, 4633, -1509, 80, -10949, -2752, 476, -3684, + 3547, -1967, 3364, 2887, -729, 7921, -4216, -3681, +-14417, -3978, 261, -1146, -1124, -901, 777, 783, + -2, -989, -1582, 3988, 7785, -6371, -2258, 3344, + 354, 13289, 3339, 316, -3186, -2088, -1951, 310, + -545, -704, -40, 4416, -392, -1033, 5650, 99, + -3008, -3716, 2448, -3758, 9463, -1793, -130, 1705, + 6501, -2214, 2970, -10476, 564, -5952, -541, 2077, + -90, 6588, -2858, -1733, -9247, -345, -3170, 4986, + 3353, -4868, 8873, 113, -5223, 1562, -163, -2446, + -4459, -8052, 1106, -10883, 1185, -1756, -152, 3109, + 181, -1427, 8291, 11419, -6265, 2116, -469, 5150, + 1355, 182, -740, 779, -7754, 1868, 144, 3936, + -60, -784, -231, 879, 17032, -2273, 1886, -538, + 1015, 1798, -633, 1090, 1910, 128, -6094, -1946, + -1570, -727, -18457, 498, 784, -4419, 1656, -21, + 154, 2430, 3815, -41, -2708, -1594, 228, -784, + 7284, -452, -7634, -12868, 3564, 5473, -1244, 2231, + 28, 4321, -1464, 1402, -1358, 2241, 656, -1128, + 1160, -2352, 3641, -680, 1816, 6864, -42, 1269, + -280, -1265, -2048, 238, -653, 13571, 3874, -269, + 7977, 2238, -1246, -2066, 4741, 1706, 3498, 595, + 2559, 55, 593, 1681, 1612, 43, -2756, 2702, + 2439, -2471, -809, 1890, 17032, -787, -4280, 1167, + -1926, -4973, -1181, -2764, -4151, 2962, 3444, 844, + 2446, 14013, 3326, -1195, -1829, 1588, 1765, -3140, + 8562, -14425, 4040, 2003, -738, -1032, -3314, -2236, + 548, 768, -2348, 436, 1755, 31, -4616, 1259, + 269, 1543, -1393, 5338, -16463, 2900, -2480, 1659, + 217, -5864, 3878, 5268, 1244, -520, -1202, 1238, + 182, -1049, -695, -320, -6832, -5904, 2914, -2616, + 2586, -10958, -3258, -1846, -4633, 2371, 3251, -3583, + 2631, -4162, 3035, 2718, 616, 2890, 206, 16128, + 979, 3551, -6864, -3221, 5881, 3692, 1718, 234, + -2844, 1668, 102, 2687, -838, 988, 1116, 533, + 4026, -7235, 5972, -13781, -3394, -3518, -294, -6383, + 1675, 4507, 5444, 385, -1931, 930, 699, 1639, + 415, 6720, 7854, 1514, 3192, -2253, -14786, -1307, + 871, 1329, 1881, 6628, 2851, -85, -2284, -4538, + -837, -2232, 269, -2227, 13930, -2063, -7540, 8978, + 1195, 2717, -1282, -972, 1305, 3864, 2412, 2308, + -4824, -3282, -864, -489, -1458, 2192, 15903, 2460, + 2792, -4137, 1034, -359, 5, 2297, -6, -3859, + 478, -1535, 2080, -741, 2030, -603, -2640, -1902, + -8208, 3818, -1273, -8138, 2015, 9169, -3440, -1779, + 4076, -576, -93, -1718, 744, 2563, 6744, -3841, + 1355, 1590, -4196, -13924, 356, 13381, 2552, -2862, + 2790, -578, 3562, 2711, -686, -3783, -489, 1230, + 896, 1208, -1101, -3482, -2478, 772, 1254, 320, + -1825, -327, 1070, -1712, 295, -18141, -2618, 1537, + -603, 3782, -1272, -1901, 414, 169, -6574, -6966, + 2711, -3292, 13204, -1324, 3620, 4962, 2835, 4177, + 4861, -2378, -5534, 3701, -4224, -631, -3199, -653, + 4785, -1045, -2097, 580, 2190, -140, 48, 3075, + -1346, -810, 2016, 566, -2543, 235, -5930, 1956, + 481, 19003, -3938, 6489, 2697, 4796, 3435, 7102, + 3062, 1460, -5814, 2723, 4181, -4979, -2534, -2058, + -136, 3554, -2684, 15252, 4112, -3146, 2812, 7182, + -2642, 5443, -1043, -803, 2786, -1622, 1988, -780, + 1482, -13015, -1762, -1377, -4005, 161, -9568, 8166, + 1832, 330, -6484, 945, -4388, 1090, -524, 1556, + -582, 320, 770, -938, -8757, 977, 1084, -7062, + 3552, 775, -4708, -2281, -552, -10027, 4263, 1197, + -672, -93, 5716, -3825, -4526, 1781, 9799, 4450, + 1981, -3149, -9664, 3119, 3794, -91, 6710, 840, + -1098, 11310, -2933, 785, -2573, 748, 1803, -1401, + -1547, -4118, 849, -580, -1404, 1536, -9382, -1610, + 2335, 403, -2939, -3015, -3753, -7593, 1640, 3346, + -2594, -8028, 5485, 2189, -3369, 2106, 5369, -2573, + -515, 1459, 6996, 1344, -389, -7009, 10332, -840, + -3869, 901, -6449, -2348, -2461, -4103, -810, -2060, + 1040, 117, 32241, -231, 945, 999, -1183, 180, + 1443, 188, 855, -1634, 774, -202, 99, 1714, + 286, -849, 1968, -9743, -15458, -859, -3726, 2257, + 355, -167, -1674, 1808, -488, 1118, -1416, -1685, + 2928, 1471, -1145, -536, 2307, -972, -1191, 1625, + -1436, 378, 20178, -638, 1826, 472, -300, -845, + -1045, 1074, -1041, -510, -39, 516, 4548, 2741, +-10197, -2336, 3828, 2093, -4148, -9138, 4239, 2520, + -3536, -3807, 2998, -2226, -6898, 4838, 2552, -2024, + -5579, 1370, 11706, -7626, 1566, 989, -4934, -1345, + -5962, 4259, 1158, -3712, -2710, -1037, 105, -2733, + 1068, 3682, 3904, 2044, 184, 537, -3438, -1376, + 332, 17812, -3170, 2386, -2090, 3481, -1352, 431, + -1016, -1062, -564, -1752, -2602, 1299, 6720, 789, + 1275, -9801, 5320, 2327, -4048, 4443, -7820, 1112, + 1232, -1139, -920, -744, -845, -3754, 5958, -5388, + 3336, -3578, -4027, 688, -7043, -136, -163, -1395, + 13400, 1729, -1862, 2612, 321, -3874, 947, -990, + -3164, 11487, 46, -1978, -2139, 1222, 3897, -9664, + 3692, 5431, -3364, -3706, 180, -4009, 2563, -313, + 3228, -1631, -9763, -9184, -6058, -4594, 1040, -3323, + 321, -3233, 5035, -1919, -5525, 1899, 1196, -1834, + -391, 549, -2114, -1436, -2624, 2441, 618, -27606, + -841, -936, 1067, 1157, 230, 784, -755, 1798, + -219, -1026, -1119, 320, -2611, -1382, 8776, 1151, + 3739, -607, 2997, -7704, -5870, 1800, 1357, 4973, + -9674, -5182, -50, -886, 2056, -802, -1909, 574, + -1716, -6388, -2882, -3526, -3188, -543, 244, 9648, + 5129, -5069, 598, -9049, 1834, -3375, 1369, 1461, + -1295, -380, -274, 7258, -9353, -2401, 11915, -5087, + 1505, 4211, -719, -902, 1762, -168, 642, 699, + -2067, -933, 1092, -958, 715, -1978, -1968, -1613, + -1263, -777, 1170, -9652, -9570, 612, -3935, 237, + 386, 4237, -1468, -10172, -4964, 2919, -6428, -7184, + 119, 3610, 59, 3168, -5474, -853, -5735, -1765, + 3063, -1352, 944, -1934, -3500, 9282, 5920, 784, + 90, 275, 3211, 2418, -8570, -10498, -2026, -1020, + -2989, 1511, -41, -11462, -1980, 5296, 2614, -21, + 770, -156, -2817, -4748, -8672, 3447, -7231, 4598, + -1347, -689, -3198, 434, 56, -2065, 1798, 13761, + -533, -1280, -796, 2481, 56, 1377, -5473, 9116, + -1185, -602, 2547, -3693, -8880, 2978, 9093, 1829, + 4844, -649, 316, -162, 1520, -5814, 4860, 199, + -1330, -5182, -6269, 2642, 1220, 2816, -4098, -3981, +-13264, -398, 361, 2768, -4786, 1023, -97, 655, + -397, 2403, -1576, -386, -1112, 792, -1195, -759, + 742, 729, -2916, -1020, 21350, -26, -3577, 659, + -1263, 1378, -4339, 1880, 4842, -669, -1203, 5936, + 816, -8356, 3660, 1673, -677, -2370, 1652, 8710, + -1254, 6171, -6868, -891, -6752, -169, -5678, -7588, + -3247, 2982, 5281, -4941, -359, -3354, 851, -1609, +-11194, 610, 261, -1936, 2715, -3540, -2488, 2086, + 6110, 914, -3224, 1777, -1558, 937, 3736, -3109, + 1903, 4250, -4478, 2636, 2292, -1451, 10231, 7600 +}, + +.cb2220m0 = { +-26430, -533, 1599, 208, -293, 2303, 704, 1586, + -1064, -1630, 690, 1697, 623, 1786, 332, 682, + 199, 12695, 475, 1288, -2471, -797, -68, 9659, + -816, -2465, 546, -1421, 1596, -926, 4471, 2360, + 5551, -900, 297, 96, 400, 936, 1548, -1066, + -1625, 652, 1416, -118, -525, 683, 1545, 1340, + 20684, 936, -1033, -773, 8416, 954, -4822, 4223, +-10815, -312, -896, 531, 3140, -1649, 508, 10294, + -315, -2078, 584, 1523, 118, 997, -11837, -605, + -262, -1732, -613, 12220, -2666, -1802, -507, -4410, + -100, 2127, -114, -886, -2806, 500, 1034, -2811, + 12642, 1015, -9193, -4201, 238, 1096, -1159, 1619, + 2534, 1644, -3465, 4797, 639, 2583, -1316, -9884, + 948, 1479, 1186, -1760, -343, -1286, -1653, 678, + -7439, 4542, -6295, -1600, -6978, 48, 448, 369, + 1597, -3696, -2121, 1002, 2428, -11368, 5385, 827, +-10674, -2252, 2240, 1230, -3074, -1894, 296, -2216, + 571, 114, -497, -1675, 1311, -2297, 1843, -350, + -856, 2067, 1198, -588, 270, -470, 2640, 274, + 19586, -762, -11471, -623, -506, 4236, -10981, -214, + -1856, 409, -1276, -935, -1681, 5116, 774, 3008, + 4388, -112, -9493, -1108, 1454, 1385, 1065, 519, + -486, 308, -1141, 289, 1424, -3672, -15989, -3738, + -1592, -258, 3304, 62, 1441, 45, -686, -1070, + -1616, -701, 2313, 1918, 4843, 654, -16902, 263, + 1837, -4062, 2727, -709, 1524, -1628, 2025, -281, + 264, 1238, -1023, -11981, -2990, -1293, 801, -9606, + -604, -210, 1248, 4014, 3652, -11286, -2094, -470, + -1330, 14523, -2388, 1413, -3968, 641, 2936, 161, + -1687, -1260, 1722, -1968, 364, -854, -14386, 10146, + 792, 133, 1746, 261, 3345, -408, 2036, 272, + 1412, 720, -3302, -1495, -4334, 2210, 799, 17546, + 2600, 1314, 764, 1327, 3433, -377, 4296, 2402, + -1074, 470, 7220, -2556, 3326, -4338, -2086, -1945, + 11865, 3525, 1513, 1520, -1814, -13020, -929, -2001, + -1496, 580, -3293, -3146, -2185, 1442, 390, -2026, + -2141, -192, -18700, -2039, -4330, 1691, -250, 1451, + -2913, 2832, -3284, 2899, 1529, -888, 486, -2381, + -1459, -2663, 530, -717, -248, -1714, 12662, 1820, +-11488, -1044, 3035, 3872, -2430, 679, 1075, 475, + -593, 930, -1751, 405, -2308, 2148, 510, -2798, + 445, -240, -6865, 2106, -11323, 670, 4342, 154, + -7748, -1805, 5381, -842, -697, -709, 688, -498, + 5525, 15212, -2006, -4146, -2452, 2392, -3522, -2023, + 1306, 5522, 916, -3616, -287, -653, 333, -330, + 4, -24886, 635, 119, -1949, 899, -36, -37, + 2658, -133, 2064, -534, -549, -1745, -70, 32767, + 1089, -869, 150, -599, -1146, -574, -424, 377, + -648, -303, 590, 453, 1910, -351, 553, 304, + -752, -752, -502, -42, -31211, -634, 449, 638, + 1086, -1406, 1220, 802, -924, -1874, -212, 86, + -200, -1140, 618, -621, -605, -10976, 1699, -603, + 2056, -4448, -1519, 2564, -743, 12304, 1482, 547, + -1589, -817, -217, -1633, -1089, -2270, 181, -634, + 3890, 734, -1319, -2035, 3304, 13144, -9076, -4067, + 70, 1309, 1067, -354, 1529, 1379, -1002, -3324, + -525, -817, -1438, 10834, 1036, 12441, 1242, 2461, + 2858, 2257, 430, -1177, 1142, -870, 844, 1102, + 1208, -1482, 830, 17622, -2753, 6, 174, 4385, + -339, 2157, -155, -68, -190, -1181, 29, -2046, + -2140, 27, 949, 1889, 446, -54, 16696, -49, + -3304, -1929, 1833, 3735, -495, -1225, -11743, -2259, + 891, -1954, 2848, -504, 1164, -2489, 861, 579, +-11547, 976, -42, 1477, -2428, -1561, 112, 74, + -2721, 12046, 632, 1283, -1900, 1990, -1193, 1606, + -1370, -2812, -1309, -1419, -12526, 3391, -4213, -2710, + 269, 90, 14575, -345, 820, 6118, 892, 6302, + -2825, 332, -3071, 2279, 3756, 185, -3029, 2402, + 245, 1010, -273, -32751, -140, -600, 482, 1516, + -462, 1931, 1941, 272, -310, 544, -422, -815, + -1116, 803, -617, -1640, -4336, -11735, 3656, -1176, + 1170, -6209, 2139, -1571, 2067, 1011, 9842, 790, + 1702, -191, 911, 2771, -253, 794, -3862, -1885, + -494, 2070, -2682, 772, 763, 4304, -15657, -2194, + -1998, -963, -5222, -175, 238, 32, 10067, -692, + 2824, -474, 3016, -11994, -51, 713, 2423, 2864, + -338, 4838, -1095, 215, -13471, -2, 704, 752, +-14654, 1396, 484, 564, -886, -775, -1099, 775, + -1035, 1661, -1013, -1118, 449, 822, 14253, -13238, + -1084, -1107, -1672, 996, 472, 2237, -440, 1186, + 1200, -2112, -1388, -1093, -1902, 555, -328, -1493, + -2034, 426, -2144, -388, -20028, 1285, 1122, 730, + 1661, -1576, -2084, 2930, 337, -66, 1591, 8685, + 2361, 146, 1370, 22, 1371, -105, -4190, 371, +-13252, 328, 1301, -995, 3689, 6422, -79, -1407, + -384, 828, 840, 854, 266, 1222, 796, -550, + -729, -1213, -87, 524, 1070, 22334, -2333, 574, + 680, -624, 463, 4047, -236, 114, 1020, -692, + 1575, -320, -3229, 222, 520, 996, 2104, -5404, +-18197, -1105, -184, -1057, 10712, -2509, -7140, -2307, + 1333, 3041, 183, 1241, -7861, -3060, 1432, 9, + -1431, -2605, 2663, 273, 250, 770, -740, 6699, +-10929, -7227, 105, -2983, -1203, 1637, -6072, -6630, + 933, -1526, 658, 2612, 5377, -91, -66, 4944, + 3025, 2723, -869, 142, 10532, 9858, -207, 3072, + -2610, 0, 81, 1078, 2136, -266, 223, 931, + -385, 983, 1029, 108, 2290, -491, 26685, 565, + -140, -662, 680, -2206, -803, -777, -250, -467, + 98, 2944, -12296, -4190, -2254, -748, -2076, 4780, + -510, -221, 1428, -6162, 2693, 6238, -4030, 266, + 6540, 2502, 5147, -4649, 1804, -10514, -3413, 2503, + 2143, -1924, -3811, 3674, 4341, -1054, -3130, -1260, + -576, 887, 25908, -773, 1186, 548, -606, -744, + -995, 1320, -507, 279, 1803, -2451, 880, -31, + -5, 1615, 770, -11818, 1062, -1126, 472, -297, +-12126, -1197, 1912, -962, 1241, 2348, 2332, -3047, + 1561, 3844, 720, -387, 371, 2942, 1174, -2347, + 1244, 10148, -1620, -11788, 1315, -31, -1867, 3450, + -1589, 5180, 3184, -2614, -13, 130, 107, 297, + 113, -1407, 29190, -544, -173, 990, 913, -1848, + -990, 1230, 264, 1896, -6974, -102, -2232, 3826, + -2269, -5027, 94, -12612, 436, -5979, 1757, 1757, + -724, 2378, 2584, 728, -1022, -7274, 668, 744, + -516, 420, -11866, 246, -1357, 2406, 3674, -2594, + 1638, -3037, -2402, 1525, -7304, -1078, 1772, 9264, + 12366, 202, 2, -728, 684, -437, 1446, -3546, + 828, -2106, -2736, 964, -180, 6524, 2250, 514, + -782, 675, 1418, -11225, 2760, -3970, -545, 9128, + -6601, -556, -1966, -4625, -149, -198, -3330, -1575, + -6198, 656, 674, 367, 1809, 155, -5126, 6109, + -572, 4927, 1448, -1855, 1636, 8648, 2010, 8973, + 3087, 10172, 34, -1183, -12, -1057, 192, -2955, + 1034, -374, 2500, 9318, -4090, -5220, -404, -1022, + -1458, -1367, 765, -1193, 1542, 302, -1337, -34, + 1449, 1434, 2210, 404, -3277, -8024, 1363, -7591, + 9096, -9179, 1176, -7311, 544, -8942, -713, -56, + 2623, -35, 1623, 2212, 1733, -712, -1327, -320, + -1966, 11352, -1276, -3804, -550, 520, -4848, 550, + 1488, 944, 10756, -782, 5643, -2647, -6513, -3500, + -2877, 1880, -6634, 2349, 256, 440, 188, -8428, + -4580, 2479, 4763, -1807, -513, -4292, -1729, -6878, + 448, -6706, -1162, 4938, -721, 5465, 1409, -8759, + -898, -4254, -5230, -3886, -7969, 1730, 3656, 1198, + 3537, 33, 4091, -2088, -7646, 1160, 2922, 855, + -1254, -2616, -770, -685, -100, -577, -4927, -792, + -2107, 9613, 2563, 5096, 6143, -3404, -8630, 4164 +}, + +.cb2220m1 = { + 32524, -324, 411, -34, -697, 818, -71, 2326, + -142, -989, -1512, 358, -260, 3791, -575, 93, + 224, 208, -1101, 32767, 1147, -203, 2015, 461, + 668, -296, -3340, -38, 720, -993, 1765, -1344, + 1323, 648, -997, 729, 581, 349, 861, -2035, + 1791, -2142, -822, -1425, 820, -6555, -811, -15708, + -912, 4835, 1500, -604, 527, -937, -640, -1240, + 4692, 1259, 174, -12040, 450, 8196, 2796, -5123, + 1595, 538, -101, -218, 5581, 367, -2700, 277, + 2111, 2718, 1458, 155, -100, 3284, -498, 9961, + -1505, -10336, -1170, 5337, 1032, -14947, 1154, -578, +-11773, -945, -660, 669, 2340, -1038, 1520, 713, + 2663, 422, -1242, 1918, -234, -1793, -1580, -271, + -5628, -2010, -12209, -1784, -4417, -2804, -3123, -4316, + 126, 6353, -2391, -2088, 836, -2550, 521, -1258, + 918, 4471, -528, 4243, -615, 3453, -6683, 1784, + 790, 13200, 700, 322, -815, 6049, -290, 928, + -1121, -1531, -878, -1150, 1404, 325, -530, -435, + -254, -804, -2536, 589, 8439, -1087, -16248, -637, + -1528, 305, -1577, 642, -22699, -139, 1319, 588, + -3079, 800, -597, -1408, -1150, 3145, -868, 3244, + -1004, 1004, -1459, -11618, -4557, -3643, -914, 4238, + -626, 4025, 3227, 537, -4285, 2010, 747, 1595, + 1599, 5994, -797, -911, 2854, -3426, -8488, -1899, + -301, -2146, -111, -522, -1852, 3075, -3864, -1531, + 654, 193, -11264, 5561, 304, 525, 346, -2761, + -1124, 1134, 8354, -12460, -1023, -7634, -2750, -1518, + 5001, 1480, -1039, -502, 1455, 586, 1012, -1270, + 12435, 895, 1169, 466, -10696, -3861, 4381, 1790, + 767, -1808, -537, -1057, -2374, -2058, 9992, -858, + -1568, -678, -3812, -1520, 1521, 230, -1716, 13418, + -1930, -979, 3272, 1116, -4555, -559, -320, 12080, + 13696, -286, 652, 2420, 1725, -277, 213, -1046, + 1642, -576, -1514, -973, -1501, 77, 537, -606, + 1144, -680, -568, 1104, 2176, -969, 1657, -784, + 1107, -1056, -59, -5607, 64, 11913, -178, 8703, + 3744, 276, -50, -12807, 1122, -6138, 1901, -439, + 733, 6829, 3001, -61, -1005, 3816, 3987, -3588, + -778, 2257, 12101, 196, 13796, 355, 1407, 989, + 101, 1041, 988, 1274, -1478, -1127, 1320, -442, + 3452, -1717, 1244, -466, -868, -323, 502, 1243, + -70, 897, 958, 2781, -2492, 788, 744, -12324, + 1111, -11704, -452, -734, 19574, -45, -584, -2387, + -830, 603, 380, 787, -2962, 2046, 2524, -2403, + 699, -4144, 1587, 573, 588, 238, -88, 31, + -278, -32768, -1173, -745, 667, -188, 1221, -369, + -261, 322, -2054, 651, 100, -2092, 315, 1558, + 596, -407, -146, -1234, -30970, -71, 633, 536, + -1345, 1819, 655, 680, -1453, 492, -1265, -1292, + 1780, -68, 1008, 215, -19980, -521, -3148, -256, + 193, 916, 453, 86, 116, 108, 1518, -1420, + -1501, 688, 669, 1196, -1579, -942, 868, 804, + 110, 1126, 202, 1086, 23516, 1070, -1623, 747, + -38, -116, 1176, 554, -2361, 1008, 1085, 1972, + -1794, -96, 464, -20910, -1208, -3857, -466, -2173, + 2461, 2364, -931, -684, 3056, -719, -936, 887, + -3149, 1004, 7085, -2985, -9393, 5142, -9621, 150, + 174, 572, -2232, -390, 1356, 160, -10796, 2256, + 2238, 242, 1663, 485, 12378, 1236, 688, -2908, + 1084, 1047, 4850, -72, -642, 1604, 152, -850, + 670, 968, -3207, 1690, 105, -2516, 11539, 390, + -1117, -588, -10771, 2879, 4742, -8351, 1571, -850, + -605, -1959, 395, 12324, 1750, 2290, -92, 774, + -2897, 1025, -1841, 546, 3904, 3908, 11494, 9, + 1340, -11976, -525, 1522, -43, -43, -1860, -6160, + -199, 2479, 4593, -2876, -2985, 1044, -62, -812, + 10424, -2489, -1098, 796, -1292, -2070, 1096, -1944, + -2145, -4374, 1041, -1014, 9036, -2142, 328, -8232, + 152, -13336, -2225, 13716, -367, -558, -1942, 161, + -472, 2224, -748, 3550, -809, -493, 2121, 1234, + 772, 5146, 2485, -2282, 7546, -1441, 1595, 9176, + 6208, 1292, 1704, 3968, -1500, -1974, -3519, -2826, + 149, -903, 504, -187, -940, 121, -215, -615, + -257, -1954, 958, 2057, -191, 21258, -726, 2081, + 1278, 1670, -854, 2730, -8132, -530, 1004, 2574, + 1430, -2536, -10851, 1389, 155, -140, 2158, 2762, + 3807, 3850, -3728, -954, -11366, 709, 14727, 514, + 694, -87, 857, -249, -419, 617, -418, -1144, + -32, -2182, -839, 1449, -1072, -785, -246, 13634, + 12488, 358, -447, -2262, 926, 1023, -901, -345, + 2260, -1530, -1466, -2973, -2170, 2090, 44, -23476, + 603, -1740, -345, -438, -3004, 1322, -3088, 1274, + 341, -348, -534, 1055, 3026, -932, 514, 8958, +-15489, -374, 1077, 1166, 48, 1016, -918, -27, + -410, -266, -1401, -3888, -2918, -2146, 2815, 1834, + -875, 162, -678, 1876, -2033, 1999, -12854, -1563, + 192, 414, 782, -3109, 1432, -4197, 2358, 8517, + 784, 1256, -1362, 2938, -11355, -5184, -10314, -39, + -2182, -1686, 241, -195, -232, -6169, 206, 181, + -470, 1008, -599, -284, 733, -836, 648, -138, + 2078, 313, 24432, 548, -441, 1446, -1628, -1218, + -64, -716, -2456, 1987, -352, -1025, -1951, 1320, + 350, 744, 2598, -984, -18328, 622, -4, -1572, + 893, -3043, -4365, 127, -1, -226, -1696, 1332, + -1360, 6756, 2596, 12059, 370, -3690, 497, 585, + 1619, -778, 9174, -2046, 2214, 2004, 1133, 1069, + 132, -250, -1555, -906, 561, -12904, -1039, -8006, + 1876, 2300, -1116, 1895, 1782, 3734, -1108, 1338, + -1409, -248, 16117, -1458, 156, -2626, 64, -1199, + -3544, 4283, -3390, -404, 1426, -907, -2768, -780, + -34, -18656, 2003, 515, 3171, -653, 762, -3352, + -154, -1171, -452, -1590, -5936, 519, 1210, 502, + -409, 2262, 695, 1028, 8652, 2532, -2636, 3472, + -1186, 1350, -651, -639, 8382, -3234, 630, -10323, + -2285, -1916, 826, -1449, -738, -344, 1022, -3248, +-20921, -200, 568, -84, 777, -1570, -2756, 2834, + 26, 3878, -1709, 101, 1433, -2238, 305, 61, + -1041, 2399, 628, -1509, -388, 946, 733, -1538, + -650, 19935, 478, -10696, 850, -682, 447, 2311, + 35, -1258, 2332, -11417, 1743, -834, 660, 3170, + 2378, -2734, -762, -1151, -1802, -9324, 4625, 2304, + -1186, 1180, 4894, 662, -7067, 869, 613, 1802, + 4839, 3412, -5460, -862, -4202, 7876, -1057, 2872, + -1336, 1731, -10788, 1088, 3433, 42, -939, 2479, + 6425, 991, -1621, 3222, -2464, 2988, -29, 481, + 11606, -2800, -8315, 7660, -3385, 1217, -728, -3670, + 684, -2295, -724, -567, -2150, -106, -1920, -2143, + 3465, 1968, -1089, -11953, -2704, 3049, -1351, 7225, + 5727, -525, 2639, 1955, 2259, 6489, -1867, 1544, + -3199, -4992, 2420, 4119, -2860, -9505, -2152, 10204, + -1133, -1201, -1468, -2989, 4658, 578, 1115, 368, + 1570, -776, -503, 1554, 1329, -696, -760, 575, + -1527, -3865, 8372, -3378, -8137, -8392, -3471, -1854, + -4852, 5270, -634, 608, 1289, -7660, 4983, -1266, + -2070, -906, 3291, 2459, 4807, -4241, 5773, -2258, + -4500, 2634, -13176, 6412, 282, -5849, 294, -626, + 888, -1088, 656, 192, -630, -3405, -12469, 2882, + 2184, 3920, 2715, -6852, -1111, 869, -161, 341, + 1856, -9450, 2719, -579, -3840, -8763, 1153, -3532, + -571, -766, 8301, 2936, -10501, -1073, 10068, -2930, + 6308, -2747, 3093, -1710, -3865, -1464, -4447, 446, + 898, 5386, -1074, -4651, 6205, 455, -1773, -1270, + 6986, -2493, 4076, 10605, -2522, 977, 4098, 1153, + -434, 4071, -2890, 2920, 9175, 2276, 4699, 642, + -1067, -968, 508, -1752, 728, 3260, -500, 1414, + 5554, 2761, 1973, -4704, 2127, 1397, -1070, -14536 +}, + +.cb2224l0 = { +-12451, 389, 917, 1238, -626, -904, -1877, 2328, +-12808, -1345, 406, 80, 383, -3841, 1188, -907, + 2369, -13409, 11191, -2547, -532, 762, -1627, 680, + -2305, -811, -1118, 3232, 3413, -2010, -453, -6816, + -4100, 1643, 11209, 933, -2272, 1440, -2465, -6862, + 186, 1563, -8468, -1832, -1166, -596, -326, 105, + -115, -352, -624, 31621, 129, -301, -615, -313, + -176, 620, -5, -1354, -3563, 678, -301, 621, + 904, -769, -1314, -956, -2294, -362, 381, -2398, + 17085, 100, 3962, -830, 18705, 237, -1296, 3534, + 1452, 259, 1690, -3106, -3624, -316, -16, 5900, + 2195, -1008, 14335, 14173, -1637, 1130, 1110, 499, + -1516, 500, -720, -494, -1010, -1264, -773, 1389, + 212, 8036, 780, 608, -415, 931, -301, -2186, + 2256, -706, 12972, -3461, -3695, 2073, -2768, -1525, + -7539, -441, -753, 4558, -8171, -1751, -6885, 4077, + 6714, 53, 1090, -3006, 3688, -1162, -59, 302, + 928, -450, 238, 10809, 353, 698, -476, 172, + -2198, -4377, -7518, 1605, 6348, 5147, -165, 165, + -463, -93, 1251, 671, 587, -402, -227, -462, +-27960, 215, -56, -958, -657, 508, 98, -2811, + -1443, 3076, 6218, -9760, -10465, -770, 345, 3076, + -116, -2884, 2215, -2652, 1306, 2638, -124, -317, + 366, 1461, -295, 5073, 460, 1920, 12216, -7032, + 6816, 3037, -2630, -1087, -1315, 123, -582, -2137, + 5061, 291, 1740, -214, 1920, -3470, 10895, 9491, + 3558, -1256, -448, -10304, -2391, 1890, 484, 11057, + 6636, 422, 2316, -1663, -348, 633, 1200, 1788, + -1124, -24435, 140, 869, 738, 223, -1429, 602, + 433, -196, -1127, -1937, -879, -310, -564, 1022, + -4380, 7247, -3938, 4461, 2219, -8465, 9266, -4564, + -3169, -3463, -477, 749, 2460, -776, 294, -171, + 1072, 1748, 1000, -208, 1908, -998, -1898, -10485, + 2360, -11950, -2412, -2609, 3885, -2738, 1348, -559, + -1342, 9366, 1560, -816, 1178, 342, -175, 1286, + 3014, 10641, 246, 3128, 6618, -305, 10906, 6359, + -4395, 1415, 196, 11136, 1772, -3047, 3313, -1231, + -1974, -3021, -1480, -1345, -830, 1551, 2521, -506, + 7821, 7715, 5078, 8215, 2102, 1552, 2247, 3766, + -3158, -1811, 631, 3980, -397, 9030, -1267, -1974, + 1539, -360, -315, 796, -4749, 2076, -1017, 717, + 2290, 11212, 9365, 1626, 379, 2060, 1329, 4, + -25, -1348, 566, -1266, 1670, 2166, 13123, 42, + 2416, -2170, -6380, 172, 316, 40, 300, -487, + 402, -220, 846, -894, -1413, -2227, 1962, 19478, +-14756, 14377, -582, -770, -186, -1008, -1520, -722, + -885, 2622, 311, -753, 480, 539, -1011, -1748, + -832, -603, -2015, 869, -14860, -600, 2110, 484, + -5874, 1532, 3290, -222, -4670, -33, -794, -2061, + -1185, -96, 337, 515, -1887, 26, 20283, -455, + -799, -62, -1083, 236, -1721, -569, -1259, 361, + 1090, -226, 1480, 13367, -638, 940, 3736, 6419, + -5995, 830, -6599, 4549, 1583, -9001, 1104, -1281, + -1270, -94, 1104, -2076, 652, 2263, 1465, -25, + 9046, -8139, -2646, -13200, -534, -15244, -1448, -1390, + 452, 584, -314, -1192, 951, 885, 396, 776, + 1303, 1298, -448, -32641, -234, -62, 31, -164, + -1042, -82, -26, -272, -559, -164, 669, -500, + 516, 1347, 9615, 1123, -1346, -1898, 8341, -10583, + 2286, -5233, 1503, 454, -2024, 4248, -2298, -2117, + 13390, -849, 2078, 1096, -651, -12232, -374, -812, + -3729, -829, -144, 1213, -469, 1112, 1146, 816, + 818, -912, -967, 907, 12, 2443, -759, -1833, + -174, -838, 488, -1560, -18242, -558, 5510, -1316, + 1758, 3957, -7130, -1394, 4962, 3870, -1907, -9247, + 2217, -3880, -4413, 1893, -3085, -202, 599, 1307, + 1574, -1070, -2593, -2722, 9506, -10170, 1105, 4879, + 2208, 38, 5596, -5990, -3205, 35, 9405, -219, + 618, 1308, 353, 3457, 1712, 717, -12937, 25, + 2176, -2590, -1223, 528, 1318, 4588, 7678, 5743, + -8430, -4487, 1364, 8082, -1727, -387, 469, 3172, + 401, -2771, 694, 14554, -2278, 3640, -11084, 924, + -593, -3841, -4338, 227, 750, 2974, -2834, -1765, + 2133, -1181, 5149, 11758, 11949, 3538, 2442, 2801, + 1457, -822, -3419, -2468, 191, -646, -975, -1271, + 832, 3088, -495, -10022, 1817, 1319, -880, 1342, + -1448, -3597, -3310, 8753, -161, -6550, 1422, -640, + -508, 11542, -277, -165, 837, 7389, -942, 11009, + -97, 1548, 1418, -445, 2105, -946, -8676, 5274, + 8842, 576, -1392, -1737, -1276, 5491, 312, 3624, + 2806, 2157, -537, 1656, 1982, -1300, -146, 463, + 496, 16792, -140, -1755, -832, -2123, -399, 5811, + -702, 2891, -3630, -1843, 346, 508, -364, -498, + -558, 32048, -744, 90, -372, 430, 704, 871, + 139, 772, 696, -108, -18, 310, -411, -798, + 465, -165, -321, 745, -27861, -752, 499, -215, + 172, 35, -196, -770, 274, -546, -96, -470, + -8976, 9156, 581, 904, -4644, -7801, 3525, -607, + 6444, 4058, -696, -1107, -632, 1475, 196, -933, + 883, 1101, 278, 433, 544, -497, 4, -1882, + 1504, 594, -30386, 218, 211, 850, -989, 319, + -867, -42, 754, 498, -70, -562, 660, -11561, + 54, 803, 425, 966, -1017, -1224, -12630, 1834, + -41, 98, -1083, 3508, 1750, -1751, 72, -503, + -38, 22211, 252, 88, 221, 690, 82, -1340, + 508, 638, 832, 482, 51, 7954, 2702, -1176, + 8830, -311, 2536, -6072, -4147, 5234, 494, -157, + -1289, -5678, -1617, 1508, -140, -55, 713, 440, +-32583, 105, -394, -613, -972, 578, 1122, -32, + 114, -228, 342, -1237, 1123, 1126, -188, -106, + 11308, -3787, 563, 3423, -9926, 1623, -2551, -1448, + -4125, 918, -1366, -476, -66, 4, 761, 164, + -61, 20445, 238, 296, 492, -1126, -98, -1201, + 14, -1840, -865, 1178, -869, 105, 907, 248, + 1538, 2990, 11691, 7783, 1566, -6704, 2397, 594, + -1825, -383, 4264, 1911, 468, 1018, -676, -2676, + -7756, -2623, 10705, 2710, -8078, -5256, 1699, -2100, + -355, -2086, 10828, 611, 18, -830, 978, -4181, + 1324, -5262, -327, 1796, -9777, 1306, -1934, -8930, + 9520, -2364, -3997, -10209, -6326, 1394, -1758, 868, + 1192, -2916, -23, -1586, -296, 438, -279, -14171, + -1554, -206, 2383, 506, 1181, 8298, -491, -2771, + -4286, -7116, -1680, 506, 1729, -12965, -925, -985, + 420, -1746, -267, -478, -11763, -1030, 187, -3878, + 1516, 2472, -371, 29, 809, -1700, -152, 560, + 1833, 14397, 968, -96, -3242, -2497, -76, 2096, + 9593, -1200, 446, 1505, 8058, 1722, 501, 923, + -1171, -9516, -2536, 7368, -2, -5304, -2440, -352, + 510, 320, 301, 120, 687, -942, 137, 824, + -316, 1312, 510, -1133, -27448, -404, 1041, 272 +}, + +.cb2224l1 = { +-14840, -1361, 12733, 798, -496, 1691, -1668, -1730, + 928, -3233, 338, -578, 156, 784, -787, -242, + -618, -853, -1282, -11766, 3970, 12178, -2034, 244, + -3411, 300, 159, 3494, -3060, -1459, -2484, -10680, + 752, 227, -1612, -922, -549, 158, 2260, -7640, + -4479, -4075, -2412, -7707, 600, -12358, 93, -1666, + -795, -13060, 61, 511, -2102, -2122, 364, -157, + 2310, -1552, 1260, 158, 9503, 7050, 7, -5902, + -7098, 444, 3736, -1836, 3109, -2328, 457, -871, + -327, -780, 661, 8684, 2530, -268, 954, 1380, + -1029, 418, -136, -3515, 1953, -1688, -8623, -3292, + 7758, 2796, 11643, -931, -501, -873, -444, -1342, +-13900, -246, -283, -1779, 998, -1318, 408, 1505, + -462, 10667, -1813, 78, -16514, 360, -2029, 942, + 1674, 171, 317, 244, 1183, 724, 760, 1634, + 863, 793, 126, -326, 980, -629, 22219, -649, + 1274, 717, 1355, -1853, -1792, -1017, -2104, -768, + -1708, 2302, 2353, 11167, 10734, -3412, -2266, 75, + -104, 425, -880, 2072, 2934, -930, 270, -2414, + -925, 1023, -746, -236, -1620, 825, 1324, -101, +-19348, -1291, 585, 2165, 2891, 3662, -577, 1800, + 408, -1486, 107, 351, -319, 1104, 956, 403, + 628, -277, -57, 938, -32768, -71, -441, -208, + -32, 191, 314, -171, 613, 749, 844, -472, + -444, 952, 42, -8026, 2720, 1911, -2780, 12311, + -122, 3569, -91, 6048, -776, 1694, -63, -1272, + 3581, 1622, 2538, 190, -13108, -820, -3056, 1189, + -1428, -244, -752, -6187, -3473, -697, 1368, 1043, + 7702, 352, -140, -12999, -80, 12672, -1473, 3113, + 1505, 667, 2392, 1767, 537, 1949, 657, -130, + 980, 1743, 8269, 2380, -2311, 197, -651, 2531, + 553, -1117, -396, 472, 4565, -12672, 2322, -360, +-12766, 2205, -2651, -10690, -218, 586, 5229, 34, + 59, 1730, 1226, 2106, 4008, -1878, -9520, -1366, + -1174, -290, -1037, 1642, 1234, 305, -1279, -642, + 1126, -13199, -29, 642, 2928, 1936, -260, 588, + 11690, 9282, -3362, 7732, 1073, 2738, 4688, -1507, + -1461, -2271, -1131, 1969, -2152, 1637, -774, 66, + -1190, -206, -491, -1080, 644, -378, 367, 17980, + -1583, 2162, 918, -121, -432, 115, 5, 791, + 1968, -2287, -1574, -9545, 11146, 3540, -4700, -515, + -4548, 881, 591, 1044, -259, -978, 2, 232, + 778, -198, -1161, -378, -83, 421, 282, 26564, + -801, -1628, -1983, -301, 931, 886, 2196, 1453, + 752, 2956, -3478, 490, -1420, 13303, 1293, -9466, + 462, -12829, 11130, 8061, 593, 3697, -611, -534, + -698, -1148, 1598, 293, -726, -698, 289, 180, + 876, -369, -43, 234, -21629, -1448, -753, -480, + 956, 994, 531, -916, 630, 720, -2300, -9544, + -1418, 993, 2130, -2359, 2460, -339, -277, 1577, + 12206, -3507, -1280, 1938, 871, -1850, -809, -3364, + 6918, 1134, 5010, 8772, 2103, -9775, -1404, 5148, + -1494, 1549, 1761, -812, 654, -611, 822, -229, + -384, 10466, -337, 2207, 131, 2818, -2925, -3374, + -8786, -8552, -2282, 88, -1058, 8571, 2900, -529, + -1569, 1882, -981, 204, 2955, -4227, 4196, -3041, + 10804, 1822, 82, 1936, 2380, 12992, -5659, -3449, + 1329, -1668, 1291, -1726, 8328, 314, 2737, -677, + 2384, -910, -878, 687, 640, -721, -912, -12772, + -2079, -398, -1788, -2516, -8711, -1038, -985, -7151, + -9057, 890, 459, -298, 918, -10061, 848, -716, + 1822, 836, -9516, -985, -1379, -409, -2237, 1036, + -1082, -1704, 1333, -1432, 11463, -2355, -5975, -1674, + -640, -554, 8352, 2732, -5251, 4243, -354, 3662, + -592, -9317, -1205, -1084, -995, 11288, -2098, -1620, + 2367, -1286, -5312, -64, 540, -2327, -2703, -2013, + -8649, -1306, -948, 1443, 664, 2400, 4706, 4061, + 387, -20, 1859, 9283, -18175, 806, -1401, 1253, + 596, 2176, -1682, 2209, 733, 1404, -6652, 2754, + 950, 2346, 3629, -6875, 5069, -9302, 1472, 942, + 1184, -10432, 960, 3987, 1985, 421, 300, -716, + 938, 500, -160, 226, -87, -1648, -1857, -1977, + -323, 2305, -13843, -4148, -2978, 5430, -3422, -1138, + -2146, 1548, -1430, 734, -339, 8598, -4568, -496, + 477, 4969, 2593, 2842, 8645, -2365, -7455, -2687, + 249, 7516, -53, 219, 1139, -668, 566, -522, + 1289, 33, -141, -920, 2526, -2797, 16456, -2000, + -758, -194, 10984, 187, 1686, -4799, 9671, 1838, + -1224, 1325, 656, -5434, 3207, 1813, 1833, 14375, + 12259, -95, -536, -1746, -3568, -442, 964, -1472, + 1345, 2692, -589, 520, 616, 357, 326, -1363, + 28603, 700, 473, -908, -1129, 1046, 1106, -471, + -472, -980, 29, 574, -350, -545, -585, -1936, + 279, 882, -880, -52, -30552, 371, -154, -1275, + -1914, 104, -110, 1122, -719, 729, -743, 360, + 766, 198, -11674, 612, -10602, 1157, 186, -3132, + 3070, 1535, 155, 774, -9432, 4966, -6717, 320, + 5167, 112, 2727, 11228, 1368, 1864, 1197, -1519, + 1504, 17863, 49, 2212, 611, -1788, 2932, 395, + 32, -566, 2425, -9457, 673, 670, -247, 1617, +-12578, 1408, 462, -14935, 1438, -808, -1850, -784, + 1856, -1648, 767, -1452, -1652, -1621, 1016, 1428, +-11203, 4217, -6410, 2570, -1016, -1720, -9036, -390, + 62, -1245, 3027, -255, 1646, 1358, -907, -864, + -118, 874, 268, 252, 104, -926, -552, -1206, + 965, -208, -24472, 890, -1516, -630, -885, -804, + -374, -22520, -1143, -777, 532, 185, 603, 1775, + -1887, 413, -458, -1036, -211, 2693, 6976, -9498, + 1437, 10163, 2450, -1574, 4941, 884, -470, -3366, + 4664, 420, -568, 5703, 10, -1692, 143, 1592, +-10966, 2891, -2961, 3938, 1990, 1726, -5247, 3326, + -6575, 584, -277, -441, 1679, -520, 1339, 1077, +-11462, -267, -351, 201, 10939, 4150, 3890, 1484, + 2615, -676, -448, 2316, -1278, 9734, -3039, 2841, + 964, -7557, 156, -7228, -120, 5533, -4322, 1796, + 2555, -9912, -3038, 2236, 1190, 222, -1684, 3273, + -1768, 6233, -6442, 8545, -49, -45, 2366, 293, + 308, -689, 308, 368, -452, 1125, 2326, -2335, +-17793, 2027, -779, 734, -2032, 1246, -2898, 4174, + -74, -40, -3105, -2135, 996, -12714, 3614, 4936, + -1928, 1528, -4158, -1791, -2318, 907, -326, 22513, + -660, 1022, 434, -564, 28, -112, 252, 372, + -842, -2, 648, 2323, -614, 23377, -263, 486, + -408, -362, -821, -724, 972, 1248, 444, -1741, + -420, -1371, 1088, -565, 22, -394, -64, -292, + -103, -501, -30510, -294, -266, 433, -700, 742, + -756, -407, -961, -148, -1416, -1041, -481, 121, + 346, 10240, 12629, 1476, -2647, 1350, -2012, -262, + -5621, 714, 4398, -2732, -10473, 9834, -5165, -991, + -557, -2733, -3460, 5779, 659, 1472, 2029, -2339 +}, + +.cb2224s0 = { +-27522, 2628, -2486, 277, 874, -2351, 2725, 915, + 994, -1209, -439, 2936, 46, 1014, -1816, -3561, +-14386, 3113, -10400, -1025, 2114, 1328, -278, 1182, + -1820, 3928, -1062, -282, -1327, -1468, 5975, 2342, + -630, -4217, 10116, -1254, -2646, -5210, -9942, 1904, + 21, 504, 2325, 1443, 6470, 2598, 8130, 810, + 304, -1059, -645, 14634, -3198, 4277, -669, -7170, + 1554, -2321, 2386, -1072, 2483, -4141, 2841, 3414, + 8014, -3141, 10857, 6634, 3138, 3199, -320, 36, + -1366, -4129, 3157, 2602, 4273, -2435, 2645, 2986, + -3712, -3995, -5476, -4693, -1664, 6384, -11201, 1320, + 2184, -5102, -2984, -1569, -2116, -1513, 14284, -11182, + -2925, -731, -1321, -6363, 1483, 3463, 1292, -2065, + -357, 9108, 6371, 3840, -6905, -8918, 2906, -1658, + 757, 1998, -580, -708, 2198, 1867, 960, 4522, + 1896, -1674, -4943, 2695, -2465, -2078, 9755, -4853, + -2602, 3466, 3897, -3633, 4918, -2049, 3730, -1982, +-10085, -3458, -1866, 32, -1706, 3648, -308, -942, + -1630, 1730, 512, 14612, 3415, 974, 3079, 765, + 897, -270, -1813, -1533, 1118, -2805, -2764, 1130, + -1798, 4594, -3134, 964, -20082, 2574, 32450, -1379, + 52, 358, -226, 1902, 257, -1071, -650, -399, + -381, 2073, 2310, 2164, 8221, 1433, -629, 1440, + 1120, -3362, -4642, 2000, 378, 1208, -2648, 4534, + 3307, 13200, 2780, 3100, -3194, -10606, -11563, -4491, + 2218, -4500, 622, 1313, 2682, 3003, -1387, -3886, + -1567, -4864, 10899, -20606, -1606, -60, 602, 125, + -730, -1112, 979, 325, -13, -185, 1241, -288, + -552, 6042, -7049, -7359, -1456, 493, 11204, -65, + -2170, -5248, 2248, -1046, 591, 2085, -2844, 244, + -3454, 581, 1315, 3043, 304, -620, 405, -19944, + 769, 1076, -1456, -694, 2560, -1046, 2514, 14552, + 1586, -7027, -4710, 1366, 1552, 4354, 3296, 462, + 600, 500, 3225, 5083, -792, 3199, -698, -3589, + -2596, -3350, 2758, -3019, 5664, -9387, 4716, -3125, + 3306, 6268, -592, -622, -4144, -6290, 4990, -748, + 1854, -1042, -2996, -4279, 338, -1864, -8639, -11208, + 932, -722, 1788, -1927, 450, 2191, 11828, -6400, + 5364, -2236, 3212, 8340, -3229, -2846, -4676, -1825, + 2628, -303, -589, 7728, -4216, -3866, -4400, -194, +-11316, 5646, 3716, 4827, 232, -583, 308, -1833, + 2153, -2508, -46, 857, -9587, 2768, 5136, 1462, + 5142, 7990, -3424, 1067, 7462, 4944, 98, 1014, + -4750, 13824, 1130, 2334, 9393, 2416, -4519, 27, + 2000, 929, -204, 481, -2780, -3720, 1267, 269, + -5383, -1999, 1249, -4238, -9351, -7440, -5964, 6154, + -6827, 3112, -2613, -164, 1604, 1245, -50, 8619, + -4044, 4652, 2846, 8359, 5345, -2902, 2295, 4801, + -5016, -6270, 2893, 2732, -3510, -2613, 4548, -6376, + 4510, 10566, 1859, 1038, -8381, 2782, -1622, 159, + -1035, -3232, -3766, 1580, -720, -4476, -3863, -920, + -2135, -458, 352, -2645, 3029, 301, -1145, -478, + 3696, -11700, 9930, 6649, 7290, 2362, 17226, 3238, + 1786, 662, 971, -736, -647, 1745, -506, -777, + 1458, 2406, -1417, -7933, -846, -2654, 1104, 618, + -2783, -10168, -3322, 9498, -939, -2342, -1876, -1914, + 84, 3468, -6533, 7796, -3797, -1318, -2183, 1310, + -895, 4943, 1062, -4468, 142, -244, 884, 613, +-13963, -5853, -947, 18703, -964, 1090, 1070, 1388, + -1572, -1110, 671, 1706, 620, -262, -2421, -2277, + -5665, -5212, 4994, 2379, -593, 2048, 14489, 1165, + -1775, -2093, 2466, 419, 404, 5429, 3089, -1350, + 1975, 2281, 60, 599, -1600, 2286, 2358, 6698, +-16423, 3760, 666, -1309, -1346, 2786, 2364, 1448, + 1114, 17956, -5301, 2430, 1178, -164, 2195, 3927, + -122, -737, 1468, 307, -1863, 1592, -7714, -2428, + 958, 220, 59, 4124, -1945, 11151, 8604, -2077, + -4787, -4578, 1096, 2685, 6478, 8314, -6221, -3842, + 2173, -43, 104, -2510, 3109, -2324, -4238, -4709, + -3233, 3228, 11454, 2428, 578, 780, -1096, 72, +-22624, -1421, -4104, 226, 464, -1726, -1971, 2068, + 1142, 1412, 1412, 798, -2605, -3451, -1104, -2224, + -2250, -3470, -572, -1420, -1292, -58, -217, -21417, + -172, -6368, 30, -2170, 95, 378, -2926, -2180, + 2820, -683, 2018, -4313, -13469, 5396, 1808, -592, + 4732, -6602, -5602, -983, -4130, -477, -1236, -2263, + 3992, -12962, -1778, -2631, -2421, -746, 1964, 1754, + -760, 2753, -116, -3860, 10246, -448, -1318, -100, +-10372, 1420, -210, 2768, 48, -2373, 7721, -3217, + -328, 1543, -2527, 3709, 4024, -916, -4588, -726, + -4302, -982, -14714, 3615, -1190, 9051, 199, 2252, + 1348, -4204, 693, 1241, -14160, -2460, -2017, 2997, + 766, -360, -450, -2919, -7976, 3210, -179, 8935, + 670, 1155, 6888, -2249, 2729, 1810, 6283, 684, + -9717, -1763, -921, -4578, 3941, -6408, 1431, -2742, + -91, -2094, -2118, -9752, 2801, -2497, 147, -5901, + -5270, 13170, 2810, 1576, -3191, 10253, 4226, -1340, + 2456, 1079, 12541, -5124, -8356, -1000, -558, 180, + -2070, -1880, -5718, -687, 10549, 1066, 220, -4147, + -695, 3648, -3460, -3143, -1623, 2150, -11222, -2566, + -6395, 3552, -4176, -698, 1248, 112, -4628, -960, + -724, 1191, 2084, 15207, -346, 371, 190, 5345, + -4283, -7482, 1354, -4424, -3775, -4143, 1444, -14876, + -589, 2498, 1305, -486, 1628, -867, 1584, 1094, + -10, -1260, -1046, 2528, 27472, 910, -1069, 829, + -117, -1097, 770, 252, -1412, 2353, 2200, -11, + 624, 8459, 6320, -9465, 1225, 2532, 5415, 9252, + -1441, -1378, 1081, -1997, -3904, -14740, -5220, 3627, + 5725, 6180, -5336, 72, 4638, 915, -496, 628, + 1880, -420, 2800, -7143, -7578, 3180, -4210, -1111, + 2979, -442, -182, 2778, 2398, -13878, 2209, -282, + -888, 180, 3584, -1005, 2, 999, -3074, 1205, + -4605, 5250, 17255, 2839, 2718, -678, -2651, 160, + 1596, 4685, 2324, 3100, 3744, -1954, -11674, 621, + -678, -6242, -3449, -1890, 3134, -289, -7162, 2268, + -8437, -624, 4999, -5946, 13013, 244, -200, -1494, + -1108, 3768, 445, 2429, -1264, 786, -2993, 3482, + 2448, -968, -1184, 213, -772, 4931, 42, -3850, + 2020, -17970, 84, 3016, -602, 1805, 731, 3522, + -2606, -637, 25535, 680, 1083, 4138, 1602, 190, + -1854, -962, -379, -2499, 2453, -362, -4552, 4689, + 2168, -5930, -10552, -5585, -4694, 2447, 2047, 5420, + 3908, -1449, -90, -68, 496, -12713, -2127, 1406, +-10766, 2438, 2278, 2962, -6411, -22, -1966, 2814, + -1746, -383, -2381, -5981, 10920, -12354, -656, 2260, + 5200, -1908, -2275, 4276, 1174, -932, -532, 2832, + 601, 1551, -8434, -4170, -6411, 9099, -6886, 2243, + 561, 2026, -3598, -1125, 646, -5188, 6017, -632, + 772, -2919, -3776, -9938, 2461, -122, 128, -1416, + -1533, 343, 1318, -13738, -1528, -6418, -1196, 832 +}, + +.cb2224s1 = { + 32767, -749, -1885, -806, 739, -1858, 3902, 1029, + 332, -2122, 1240, 2705, 1362, 190, 1058, -1404, + 1224, 1122, 1208, 190, 1984, -1355, 1694, -21000, + -1012, 2418, -1269, -1154, 1113, 2291, -2317, 315, + 12872, -2296, -1510, 1104, 11324, -1146, -1018, 1326, + -902, 168, 647, -1828, -3838, -5682, 2732, -238, + -134, 13450, 1570, 2424, 996, -3494, -3720, 4897, + 5875, 149, -6367, 6659, -2329, 6916, 1134, 425, +-19014, -479, -1900, 3470, -1777, -811, 1723, -46, + -2103, -1298, 2929, -4279, -639, -2443, 7231, -1187, + -2145, -777, -3287, 4895, 8878, -9318, 289, 4015, + -3148, -598, 2226, 11700, 114, 3237, 9586, -4570, + 2592, 3614, -2272, -2829, -3356, -1095, -5290, 4709, + -1867, -1930, -20722, 937, 892, 1415, 1544, 2950, + 5090, 937, -1411, 123, -31, -1568, 338, -938, + 5465, 5796, 480, -2782, 3351, -2489, -383, 1529, + -5686, 2446, -693, -12796, -599, 1894, -1576, -2244, + -4686, 10165, -1085, 10050, 2681, 1138, 2544, -1809, + -806, 5278, -8730, -3740, -2343, 971, -3254, -165, + -212, -4164, 850, 233, -13694, 442, 1073, 3854, +-12926, -2001, 3468, -765, 829, 2174, 1531, -6036, +-10848, -11009, 803, 1713, 2884, 1992, 75, -2989, + 268, 346, 1998, 4798, 8976, -4632, 1863, -4127, + -612, 4790, 10946, -1296, 8009, -1351, 356, -1711, + 313, 2301, 1318, 8050, 700, 1218, 2270, -2156, + 67, 1537, 1941, 3442, 13321, 691, 2344, 2594, + 1551, 3853, 7279, -10441, 1006, -11862, 5532, -611, + -582, 2257, -2873, 3993, -5133, -2264, -2478, 1576, + 1834, -4931, 10264, -1429, -10404, 393, -3715, -1470, + -2003, 384, 4869, -6780, -1297, 1572, 1043, 6980, + -4382, -3005, 3698, 4176, -1348, -4972, 1574, 9815, + -5995, -979, 3609, 3702, -8503, 668, 3354, 2552, + 9183, -1175, 1224, -2859, 11176, 6088, -1355, 84, + 1271, -380, 5336, 299, -690, -365, -8047, -3679, + -3204, 1334, -13451, -1392, 2200, -3646, -1046, -4292, + 741, -1701, 1722, 2061, -1358, 7266, -6356, 963, + 2190, -1349, -1882, -14128, -4662, 3552, 565, -1109, + 5413, 1239, -2618, 794, -2064, 11805, 9004, -2134, + 2804, 946, 80, -2387, -1205, 11, 1642, -1825, + -2324, -5018, 4208, 5285, 661, 12430, 1907, 784, + 10864, 340, 18, -138, 2885, -2247, 17, 334, + -3172, 2977, 970, 536, -1540, -516, -488, -512, + -1334, -1930, -2418, 1078, 24837, 12, 2060, -252, + -2536, -2206, -3179, -6785, -8842, 8736, 1393, 119, + 1652, 10126, 856, 855, -742, -289, -2208, 3831, + 6909, -6556, 2472, -245, -1729, 1460, -3014, 59, + -58, 132, 3903, -3762, -1419, 13273, 2708, -7752, + 84, 3525, -1305, -334, -13421, 5931, -4845, -2697, + 666, 558, -1102, 632, -2946, 4153, -4018, 4516, + 4875, 4460, -1567, 2233, 386, -754, 1256, 2145, + -1692, -13046, 1581, -518, 4397, 1215, -723, 3413, + -640, -5088, 1711, -714, 2536, 2433, -691, 10758, + -8764, 5541, -2071, -1662, 12955, 12998, 1252, -94, + 802, 2573, -2557, -66, -832, 106, -728, 1050, + -811, -2684, 629, -16524, 1531, -1617, 1348, 204, + 1722, 368, 554, -1752, 114, 1349, 1952, -1007, + 2626, 2035, 8148, -2539, -4296, -4460, -8542, -3089, + -1543, -857, -2617, -1765, 6642, 2167, -1531, -6881, + 86, -414, -5896, -5152, 17445, 1129, -5006, 2936, + -3432, -2226, 1176, 972, 1170, 530, 3390, 260, + -2909, -3550, -5255, 1771, -382, -1690, 17070, 2688, + 566, 2430, -1768, 3373, 1460, -3464, -629, 3119, + 430, -3554, 8357, 7075, 293, 2955, -61, -6919, + -4939, 3678, -6852, 652, 2206, 5918, -2768, -3022, + 5721, -770, -1102, -1057, -2760, 3086, 5611, -160, + 2714, -1042, 2569, -14248, 3846, 8212, 5392, 144, +-11896, 618, 1212, 3283, -3777, -715, -3870, 2528, + -2900, 1645, -1786, -1852, 2776, -1348, -586, 234, + -4, -1666, 46, 2095, -1987, -18728, -2980, 2501, + 4042, 79, -1849, -2013, 8047, -1898, -108, 340, + -4760, 2134, 9000, 347, 10365, 4779, 6660, 1694, + -3253, -2282, -1488, 10406, -8054, -3414, -2934, -1611, + 3172, -2195, 4973, 1249, 2888, -4054, -5738, -2995, + -2282, 1977, -353, -516, 5322, 3225, -4907, 1303, + -4656, 9947, -236, 9382, 2332, 2076, 1470, 3173, + 4712, 2645, 559, 4904, 1511, -1715, -4856, 5750, + -1276, -306, -5980, 14393, 1443, 85, 156, 7718, + 793, 4199, 2122, 1098, 128, -1996, -1397, -20, + -534, -13296, -1518, -2970, -1001, -6474, -6146, 8337, + 5476, 3058, -526, -1295, 1623, -8791, 1257, 2006, + -5725, 3035, -2917, 1280, -8479, 5934, 9870, -13131, + 14, 1088, -9, 1969, 366, -3214, 192, 2764, + 1499, 346, -2031, -2900, -2529, 1072, 11717, 5206, + -44, -2514, -8900, 2892, 2132, 3635, 3735, 2726, + 1398, 6035, -2830, -4568, 424, -8696, 1368, -3860, + 1823, -2620, 4546, -2210, 1660, -1672, -10524, -484, + 950, 11, -4494, -6220, -5653, -13332, 2868, 460, + -4120, -4030, -3277, 522, -3403, 1126, -170, -1892, + -4366, 1304, 3477, -1507, 1111, -594, 1670, -8416, + -1690, 2492, -7109, 2531, 4131, -8123, -4884, 16505, + -240, -63, 32099, 974, -1360, -2395, -2005, -1156, + -877, -416, -922, 1857, 766, 71, 1380, -259, + -272, -1924, 2498, -3290, -16045, -2064, 2966, 2936, + -1265, 2121, 488, 3781, 1484, -1193, 4776, -1001, + -669, 1569, -379, -604, -5, -1943, 757, 359, + -560, 118, 17941, 2323, 215, 7621, -3582, -8130, + -698, 9893, -2752, -417, -1262, -1504, 3319, 1186, + -2192, 3014, 781, -3602, -6190, -7725, 3169, 2038, + 1175, 612, 2477, -4136, -12152, 4538, 567, -116, + -3222, -470, -118, -9257, -635, 3078, -11596, 93, + -4178, 4150, 5985, 4414, -2110, 542, -1125, -1242, + -234, 807, -1385, -2448, 824, 109, -1826, 3032, + 269, 14188, 3468, 908, -12, 2290, 5758, 1685, + 680, 5963, -2763, -173, -34, 3135, 1230, 2226, + 2471, -9546, 2266, -1583, 729, 3506, -10664, -652, + 2212, -620, 2762, -751, -6337, -4339, 4131, -1234, + 5423, -2279, -2884, -929, -12582, 416, 2046, -3854, + 11130, -2738, -670, -202, 6216, -7266, 9726, 1308, + -1761, 4696, -1061, -144, 482, -1586, 4377, -5016, + -3894, 2296, 4340, -555, -3003, -2117, -962, 100, + 4548, -1870, -13885, 1351, -3226, -8114, 377, -391, + -1344, -2148, 4756, -3518, -14429, -670, -238, 400, + 1234, 4389, 1181, 1046, 425, -32, 840, -29846, + 1580, -992, 1844, 1961, -1305, 1055, 418, 52, + -641, 2430, -1773, -5323, 3341, -5367, 14027, 3051, + 3864, 404, 4186, -1875, -5822, -4321, 112, 395, + -177, 1080, -3008, 520, 8, 226, 1430, -1635, + 8, -2632, -3249, -3595, 622, 564, 8404, 14463, + 160, -7828, -4113, -16547, 848, 6320, 2311, 4074, + -2050, 668, 1463, -2322, 1790, 864, 317, -594 +}, + +.cb2224m0 = { +-17338, 5737, -912, 5906, -5315, 920, 2743, -2232, + 1943, -753, 1696, -1818, -2272, -564, -1306, -527, + -156, 9952, 36, 2524, 2053, 1841, -1670, 10622, + 2532, -5616, -324, -1132, -1148, 1920, 10232, -75, + -630, -10796, 1618, 1104, -2557, -603, 2115, 966, + -3763, -3183, -851, 4502, -1565, 10062, 313, -709, + 10707, 867, 3820, -2747, 3470, -1942, -486, 4092, + -6289, -2363, 556, 3190, 5046, -1869, 2886, 10572, + -948, -4191, 1544, -1727, 721, -3153, -712, 934, + 1610, 1070, 1248, 10645, 2340, -11102, -2744, -353, + -65, -4973, -1782, -1037, 1210, 1192, 1138, 1106, + 9422, 652, -9595, -1663, 460, 9107, -2827, 775, + 1131, 4732, 93, 476, 387, 32767, -161, 266, + -406, 604, 675, 83, -589, -639, 220, -830, + 2200, -142, -2000, -128, 902, 823, 287, 717, + 1857, -1626, 208, 2784, -72, -19310, 6190, -2063, + -9101, 3419, 1721, -2092, 332, -6533, -7594, 1138, + 807, -2582, -668, 410, -497, 1526, 96, 944, + 3319, 1294, -335, 1964, -380, -618, 3069, 101, + 18964, -2298, -10304, -1190, -998, -1384, -11466, -256, + -4475, 4027, -3532, 1828, -1311, -3417, -3925, -221, + 27688, 2277, -1227, 1043, -399, -3327, 515, 1665, + -616, 2724, -546, 4608, -576, -103, -9064, -1281, + -563, -3588, 2174, -824, 3379, -2360, 354, 844, + -7044, -2295, -2613, -11152, 1006, -1064, -17007, 1180, + 387, -8448, 836, -578, 2621, -356, -1476, 2362, + 822, 4547, 118, -11628, 352, 367, -958, -12423, + -65, -1591, -2304, -2880, 1684, 1708, -1693, -781, + -71, 10012, -534, -3672, 417, -2048, -1955, 10491, + -1257, 861, -414, -4058, 3042, 1529, -5823, 6877, + -3918, 993, 221, 2576, -7780, 170, -648, -139, + -3410, 7974, -756, 2657, -596, 12527, -199, 13752, + 2198, -938, -2265, 1736, 257, 1517, -676, -1165, + -2874, -2433, 123, -829, 2605, -10270, -3158, 3624, + 2072, 6960, 1490, 4634, 455, -8175, 1139, -4545, + -1491, 3727, -8738, -1951, 593, 14, 2897, 2490, + -2273, -1436, -10992, 3005, -4392, -3434, -4561, -1014, + -9506, -1609, -1248, -1593, -190, -10472, 3264, -2274, + 5097, -633, 473, 427, 725, 1577, 11032, 318, +-12228, 78, -1116, 441, 1930, 4041, -648, -4324, + -224, 2738, 8826, -40, 327, 1761, 2371, 171, + 4039, -3411, -2495, 1150, -12181, -1704, 35, 528, + 417, 626, 1866, -472, 466, 905, -854, -875, + 1194, 24371, 488, 26, 695, 1777, 798, -169, + -16, -1252, 395, 871, 1170, -635, -1637, 2094, + -5427, -16393, -384, 3872, 33, -687, -1777, -4160, + 3020, -1906, 3868, 699, -400, 6755, -3253, 12699, + 1474, 7312, 991, -646, 26770, 2524, 2144, -500, + 1096, -1869, 1036, -1707, 521, -2091, 1445, 2335, + 107, 238, -227, -120, -32768, 591, -257, 867, + -1231, 650, -465, 356, 431, 762, -516, -594, + 512, 242, 2298, 1012, -1538, -11748, 3551, -5608, + -2174, -2428, 10557, 625, 1002, 27865, -589, -1527, + -1552, 156, 1905, 1041, -4190, 2300, 1603, -980, + -1764, 484, 1555, -2664, 381, 11676, -8848, -3060, + 675, -646, 736, -1279, -1261, -1988, 543, -1880, + 1917, -2165, 2846, 11863, 2076, 10381, -307, 4354, + 73, -2788, -2464, 964, -218, 1552, 1846, 1470, + 577, -594, 725, 30798, 43, 13, -1474, 260, + 1218, 1433, -114, 1020, -648, -678, -1879, -65, + 791, 366, 8547, 931, 1091, 1018, 16312, -1116, + -777, -1098, 404, 180, -899, -2865, -10089, -751, + 40, -2358, -2980, 3574, 7905, -190, 9207, -18, +-18766, -270, -5300, -2023, 2422, -1189, 1267, -1085, + -704, 6823, 2164, 2, 125, -2319, 411, 591, + -488, -566, -3394, 304, -12375, -268, 11098, -150, + -2392, -1255, 3172, 162, 1295, 5897, 7944, 6019, + 3329, -2014, 2957, -4933, 4805, 2780, -5453, 2680, + 3220, 2784, -549, -19908, -1222, 550, -3540, 1822, + 4082, 2399, -6844, 2145, 938, -597, 122, -20, +-14986, -1620, 1575, 561, 408, -6305, 760, 1634, + 2652, -8301, -2988, 1864, 2524, 3228, 7466, -2620, + 410, 1364, 1740, 2204, 1999, 1704, -2601, -351, + -104, 10688, -7166, 134, -346, 11852, -13322, -3171, + -1230, 1109, -2336, -962, -563, 1030, 2832, -969, + -1997, 3233, -414, -8246, -2074, 2737, 3557, 1625, + 1036, 845, 1848, 1710, -10388, -4586, 6915, 2734, + -8693, -667, 1568, 1758, 2396, -3262, -2497, -1472, +-11848, -689, 3379, 1692, 1449, 2844, 8524, -15598, + 337, 590, 3303, -1594, -2548, 4529, 433, -1921, + 920, 1061, -1693, 191, 44, 957, -2397, -1126, + 41, 2164, -1587, 568, -17290, 4687, -1028, -403, + 1169, -1282, -1602, 242, -1234, 1870, 1067, 2444, + 1752, -2552, 8775, 1384, 5683, -4770, -12436, -680, +-13344, -196, -276, -299, 734, 12378, 2364, 327, + -1494, 560, -90, 3394, 496, 2357, 629, -17, + 1040, -706, 589, 294, -1135, 25012, 444, 1206, + -298, 1424, 1524, -2188, -64, -1101, -1998, 374, + 1377, -1382, -11349, 1456, -171, -2369, 6966, -2808, + -8987, 3390, -811, 671, 3032, -3396, -9815, 2246, + 4418, -678, 1851, -1592, -11038, -1194, -3612, 2589, + -250, -495, 1203, 1348, -805, 1853, -345, -555, + -8755, -9695, -3768, -1506, -8172, -322, -7163, -6319, + 2052, 116, -4459, -2328, 4857, -2569, 1419, 959, + 1138, 7034, 4836, 3449, 6826, 13411, -893, 981, + -2060, -3710, 3177, -761, -1128, 4386, -127, 6698, + 3426, -2922, -61, 408, 1426, -1238, 15468, 94, + 373, 3597, -2432, -1989, -859, -8976, 2938, -777, + 409, -206, -7758, 3384, 295, -466, 29, 7925, + 2048, 930, 2296, -10030, 330, 7864, -1004, -385, + 2130, 388, 3587, -4480, 1560, -12768, -2606, 8178, + 771, -3519, -1590, -592, 2192, -1126, -77, -3947, + 1868, -1304, 11107, 781, 6240, 4134, -3314, 407, + -6125, 5168, -503, 2155, -990, 143, 219, -9950, + -1186, -1446, 1930, -8963, -4084, -6141, -976, 153, +-13665, 564, 13631, 138, -269, 379, 1333, -1710, + -940, -511, 1214, -2190, 1347, -1397, -1321, 94, + -1802, 6627, 1306, -12347, 2780, -1091, -4362, 5047, + -446, -3472, 6064, 1075, 478, 769, 58, 802, + 562, -1581, 28580, 194, 1338, 573, -555, 617, + -409, -1249, -8, 1133, 952, -120, 2502, 5313, + 969, -1664, 1769, -12199, 5551, -402, 4862, 3270 +}, + +.cb2224m1 = { + 32767, -54, 1385, -206, 19, 522, -1176, -667, + -260, -1388, -1751, -2234, 228, -343, -893, -898, + -1004, 2517, -232, 20996, 507, -1857, 2574, 840, + -615, -1922, 660, 844, 52, 1272, 609, -692, + 21805, 938, 678, -399, -22, -1839, -996, 1560, + 218, 3973, -6547, -1151, -3914, -789, 938, -11509, + -2282, -606, -327, 3088, 797, -1540, -7598, 1378, + -100, 2108, -1907, -11671, 1538, 11136, 310, -2096, + -3037, 3181, 1731, 2043, 3424, -1098, 2046, 545, + -1778, 605, 932, 832, -2356, -1498, 1129, 11542, + 119, -10994, -3720, 4316, 346, -9141, 3921, -918, + -5476, 372, -318, 9254, -681, 4896, 1587, 1620, + 1850, 4057, -1507, -362, -1074, -328, -1502, -3092, + 2735, -378, -11572, -1292, -2575, -3397, -7566, -8977, + 1670, 8659, -655, 884, 1815, -9348, 570, 394, + 1670, 1942, -195, 386, 553, 8885, -9206, -624, + -2312, 15852, 782, 562, -1497, 720, 1804, 1415, + -3809, 3783, -1918, -3496, -637, 581, 1161, 961, + -960, -930, -1673, 904, 11510, -2286, -9964, 2964, + -5752, 2229, 786, -1479, -18882, 1517, 128, 3282, + 157, -2178, -564, -6029, 766, -4599, 3620, -4380, +-20114, -677, 2134, -93, 1486, 648, -4790, 1862, + -1476, -56, -3443, -2622, -2806, -1185, 122, 1801, + -1547, 12241, -2785, 2386, 56, -4075, -10964, -832, + -4744, -1350, 2849, -255, -1375, 163, 1306, 37, + 2304, -1396, -11234, 9712, 1732, -2262, 3632, -431, + -579, -4045, 806, -12168, -1309, 840, -1474, 918, + -1240, -1601, 48, -4137, 6934, 3968, 7370, 4088, + 8648, 2351, 1466, 615, -12314, -2347, 4382, 862, + -4288, -3138, 1886, -4357, 375, 1949, 73, 287, + 135, -60, -1498, -2427, 1263, 3322, -582, 17508, + -1202, 1558, 3351, 484, -439, -571, -370, 11952, + 11656, -1407, -1410, -2976, -459, 397, 1980, -1374, + 1237, 5044, -2074, 405, -10650, -174, -12556, -1962, + 4569, -1293, -200, 3106, 343, 748, 1918, 1084, + -670, 3, -1070, -397, 3965, 9966, -609, 9691, + -900, 137, 2305, -5944, -944, -1500, 638, -703, + -582, 10098, -523, 776, 1266, 4860, 6213, 1181, + -5634, 518, 9116, -4740, 10683, -547, -1295, -91, + 104, -3115, -1724, -17, 1953, -745, 694, -474, + 12248, -596, -674, 765, 674, 4494, 1205, 5883, + -1638, -3996, -664, 8694, -5620, 3968, -717, -10425, + -285, -12605, 368, -3904, 12363, -1288, 1242, -1497, + -3117, 2396, -220, 1700, -2788, 250, 107, -150, + 345, 681, -44, -2466, -389, 2098, 312, 54, + 2734, -22225, -1232, -1778, 1063, -1586, -6658, 344, + -2889, -4348, -3685, -2100, 12, -1755, -6401, -149, + 8150, -10689, -748, 1443, -32768, 1698, 1461, 216, + 1373, -2814, 1014, 1135, -227, -1309, -616, 1566, + 395, -724, 852, 1579, -9647, -1214, 728, 329, + 9244, 179, 7204, -836, -3954, 168, -5722, 152, + -2886, 472, -651, 5114, 8734, -71, 11406, 1098, + -1452, 1190, 598, -880, 14611, 12540, -1523, 1340, + 1015, 1510, -208, 206, 1314, -1532, -246, -3210, + -1637, -197, 197, -32768, 1448, -191, -1720, -217, + 1021, 973, -2099, 56, 606, 39, -1569, -1205, + -2375, -2156, 4798, 2504, -11914, 933, -6015, 2657, + -2911, -5173, -1964, 1576, 5268, 1190, 675, 856, + -1718, -4332, 166, 1556, 19005, 2040, 1198, -2170, + 1824, -3409, 121, 830, -252, -525, 289, -1701, + 292, 854, -1150, -1108, 171, 511, 22114, 662, + -1263, -540, -2306, -2332, 869, -5191, 186, 536, + 410, -7576, 590, 13625, 3519, 3858, -2787, -376, + -6506, 891, 5025, -2054, 8316, -2115, 7668, -5808, + -2464, -2422, 1541, -3851, 1578, 420, -617, -6507, + -858, 160, 3876, -2830, -5970, -3295, 9829, 1099, + 1617, 3502, -3124, -4116, 138, 287, 914, -548, + 1056, -1546, 1218, -227, 11632, -574, -996, -9894, + 808, -5868, -1457, 8374, -2086, -280, 1038, 528, + 1862, 284, 3926, -144, 7168, 1224, 11628, -221, + 1018, 1683, 922, 561, 6910, 1895, 3044, 12613, + -74, -1424, 1654, 8872, 2255, -990, -2039, 269, + 9558, 10122, 958, 466, -1948, -1242, 1042, 886, + -1143, -3444, -8720, 1918, -300, 19074, -1629, 991, + 908, -896, 1207, 3602, -4802, -2912, 4100, 2936, + -1344, 459, -6904, -714, 524, 171, -1430, 1454, + -2725, 1130, -757, 2861, -11174, -2768, 5466, 3662, + 110, -1999, 12376, -2173, -2508, -2838, -2025, -4378, + 134, -9856, 1738, 1027, 1428, 38, -1560, 12824, + 13932, 549, 586, 720, 923, -1040, -2827, -3272, + 1902, -2113, 2624, 3296, -34, 12291, 1449, -12138, + -796, 186, 2777, -1007, 3276, -587, -1917, -130, + 2120, -564, -364, 1005, -615, 1504, -2412, 9219, +-11412, -2490, 1262, -2720, 1608, -3276, 1294, 1882, + -188, 7090, 6029, -4207, -2739, 72, -10035, -1672, + 1509, -124, -1649, 420, -3623, -1069, -11225, -754, + -388, 790, -3209, -330, -2632, -11920, 3178, -1788, + 2585, 4146, 1944, -2757, -10616, 220, -14136, 2158, + -274, 2010, -362, 1107, -348, -1990, 96, -985, + 1599, 1566, 1393, 304, -1380, -924, -285, 620, + -30, -902, 26210, 1485, 1042, -1160, 352, -177, + 1245, 1879, -18, 727, -421, 223, -1298, 1066, + 962, 1306, 3866, 870, -18780, -3873, 107, -1408, + -1261, 808, -818, 1738, 1439, -2156, -1499, -2108, + -4626, 4039, -964, 16682, -1169, 266, 9373, 1238, + -2728, 2381, 12159, 2155, -472, -2293, -513, 3808, + -690, -2190, -1139, -6, 1379, -22803, 1380, -612, + 308, 1394, -902, -1454, -2620, -1080, -2864, -3301, + 108, 218, 8718, -617, -1098, 1436, -2005, -3966, + -2658, 6152, -874, -4636, 8705, -3382, -12072, 418, + -1837, -12582, 270, -788, -1174, 2156, 461, -297, + 478, -632, -356, 5796, -12024, 416, 2602, 3544, + -1240, -970, 4874, 7221, 704, 8940, 2316, 1174, + 2537, 5380, -5, -1818, 3020, -4120, 7042, -9618, + -1622, 3576, 2455, -298, 451, -5298, 7371, -1570, +-12956, 9758, -216, 889, 5395, -2779, -4036, 1736, + -1871, -2036, -1119, 1847, 912, 2292, 850, 220, + 1300, 2228, 399, -2885, -2696, 2399, 3179, 6266, + 1629, 13091, -232, -5322, 1397, -724, 1666, -2012, + 3643, 1400, -2724, -18007, -506, -103, 1318, 2473, + 965, -587, 1135, -904, -510, -10767, 1937, -585, + -73, -1662, 3021, 340, -12475, -1618, -1, -1914 +}, + +.cb2232l0 = { + -9947, -673, 522, -36, 396, -433, 949, -442, +-12495, -2186, 4280, -997, -1715, -7385, -379, 3498, + -572, -9897, 6686, -4736, 577, 1866, 659, -123, + -1682, 420, -866, 4458, 5821, 3155, 7929, -5562, + -1798, 3086, 8556, -65, -8943, 2354, -4187, -3798, + 627, -1859, -9760, -1811, -1724, -45, -1838, 1638, + 499, 148, -335, 20916, -264, -556, -269, -1014, + -1531, 711, -519, 462, -5117, 3944, -950, 8277, + 878, -4803, -5003, -4402, -4722, 2988, -144, -6887, + 10661, -909, 700, -2287, 12126, -101, -761, 1836, + 827, -609, 538, 442, -4504, 1812, 3818, 7359, + 96, -555, 1598, 10040, -554, 924, 3426, -1786, + 2620, -2132, 867, -519, -2299, -672, -508, 201, + -2457, 10872, -5003, 5422, -8890, -104, 2579, 940, + 401, 871, 11167, 1216, 1054, -2876, -1523, -3950, + -1229, -3410, -428, 3648, -9389, -3025, -1752, 7583, + 3953, 1938, 3899, 1435, 8170, 1019, -2320, 1299, + -1152, 226, 394, 11328, -1471, 604, -184, 567, + -3704, -5723, -5938, 423, 9362, 4546, -3318, -3395, + 5084, -4341, -1781, -2619, 1078, -365, 151, -413, +-21591, -968, -202, -183, 849, -481, 407, -11, + -2708, 2472, 2689, -9232, -9482, -1776, 645, -1510, + -1410, -6115, -114, -2550, 1922, 1668, 288, -1302, + 948, 1967, 52, 2393, -1975, 374, 17358, -1332, + 5303, 3195, -2674, 4784, -1418, -1359, -57, -2126, + 4618, 8890, 6455, 1181, 76, 374, 9585, 8762, + 672, -642, 666, -6485, 1751, 3255, -934, 6196, + 892, 171, -102, -44, -326, 1330, -320, -480, + -842, -22376, -561, -141, 635, -6528, 5711, 2400, + 838, 2846, -3212, -5341, -5479, 4961, 2110, -7480, + -4215, 7964, -1308, 1219, 1541, -4418, 6293, -4522, + -4887, -5760, 2790, 1441, 6135, -1133, -1627, 1235, + 914, 572, -1043, -1473, -519, -4618, -1228, -12212, + 1101, -10794, -4292, -4355, 6431, -588, -992, 612, + -1771, 6751, 4871, 581, 620, -352, 277, 727, + 2226, 8552, -43, 2295, 9409, 1122, 7618, 1885, + 1192, -1432, -1103, 8666, -2078, -403, -1787, 1572, + -2200, -7705, -6743, -1277, -1228, 955, 7613, -1536, + 8530, 5703, 5446, 4251, -853, 4910, 1578, 2832, + 1274, -2610, 243, 2820, 951, 9240, 1617, 605, + -6755, -2728, -5658, 3866, -157, 1215, -8470, -2038, + -189, 10411, 7444, -376, 407, -1128, 770, -410, + 503, 1707, 786, -529, 82, -27, 21512, -282, + 81, -1129, -686, -555, 2674, -99, 1284, 2216, + 1238, 404, -3398, 1010, 3966, -1134, -2682, 14222, + -1581, 9779, -1114, 848, 1905, 2129, -3937, -4742, + 1229, 8051, -4344, 3914, 4273, -659, 159, -1188, + -1844, 912, -1256, -478, -16158, -2869, 959, -2096, + -2166, 2360, 7861, -2718, -6358, 7653, 6639, -3239, + -1690, -1242, 3439, 1254, -954, 604, 17512, -288, + 2412, 211, -298, 2656, -5217, -1770, 892, 1979, + -1482, 3498, -40, 10424, -1038, -1862, 9905, 298, + 77, 2179, -4444, 2580, -2069, -6473, 61, 84, + 1035, -645, -662, -824, -743, -104, -1962, -124, + 4976, -5378, -1254, -7055, -3474, -10695, -1254, 2547, + -694, 3194, -82, -2634, 230, 358, -12, 1594, + -90, 598, -76, -21136, -1278, 846, -84, 259, + -2536, -4442, 2337, -1606, -3264, -3126, -591, -1295, + -2440, -2592, 10888, 5821, -862, -5070, 10402, -10633, + 159, -2660, 894, -2112, -1774, 3732, -1020, 422, + 9487, 1608, -992, 2046, 275, -10676, 2606, -999, + 477, -1868, -1690, 4764, -6419, -7550, 8159, 529, + 2308, -394, -2394, 2826, 6680, 496, 3628, -646, + 3186, -657, -2260, -1416, -9202, 496, 6624, 2441, + 1554, -2195, -8458, -3459, 466, 6706, 1056, -8777, + 5436, -4000, -3130, 4794, -6127, 2008, 1602, 195, + 558, -1362, -880, -2662, 9726, -9793, 2989, -3182, + -2378, -1338, 1086, -4682, 372, -399, 11129, -601, + -666, 5206, -1106, 362, 3155, 328, -9862, 719, + 1602, 998, -2342, 857, 1510, 476, 7256, 4652, + -5750, -4991, 4611, 8718, -4434, -4119, -351, -1606, + -1033, -3717, 3585, 9381, -1594, 5052, -7414, -205, + 2356, -5949, -8738, 1526, -1838, 4760, -5444, 623, + 112, -2863, 5710, 4920, 9497, 3759, 10748, -201, + 716, 747, -2559, -4077, -449, -741, -136, -1303, + -572, 1886, -986, -10529, -51, 1360, 2418, 116, + -1490, 1928, -9977, 4720, 227, -11212, 3730, -2996, + 1300, 9935, 356, -4618, -384, 972, 3174, 3732, + -803, 2666, 790, 2067, 2343, -1209, -10147, 21, + 9066, -4564, 2508, -176, 264, 9834, 3360, 7278, + 9386, -1274, 522, -50, 4150, -884, 592, -688, + 309, 20750, 672, -1326, -346, 366, 2058, -607, + 633, 620, -677, 330, 69, 432, 319, 436, + -300, 21845, -318, -676, 320, -386, 889, -724, + -1394, -2664, -431, 2046, -136, 5520, 6700, 1192, + 5779, 9386, -3541, -5638, -16125, -259, 545, -267, + 1972, -2366, -43, 615, 251, 1003, -980, 2262, +-10519, 12166, 2007, -884, -1560, -1250, -491, -438, + 820, 1212, 3512, 354, -1066, -46, 98, 315, + 8532, 944, -1297, 8011, 1029, -383, -1606, -8381, + -1650, 2852, -958, 1757, -4270, 2160, -9283, 2918, + -3718, -224, 6154, -5671, 3764, -554, 5214, -2526, + -31, 547, 6, 1633, -4562, 1424, 1177, -866, + 1648, 653, 6056, -1845, -1271, -350, 596, -2286, + 9893, -6594, 1099, 630, -537, 230, 972, -134, + -491, 79, 306, -74, 253, 208, -1804, 73 +}, + +.cb2232l1 = { +-11397, 378, 12845, -1813, 342, 329, 1165, 550, + 556, -115, 755, 117, 2511, 260, -1189, -1406, + -1528, 1866, 3300, -9678, 1025, 10413, 199, 2878, + -3572, 8701, -1895, -1189, -576, -3384, -162, -10866, + 3253, -1267, 91, 2277, -86, -3394, 6576, -2475, + -1136, -4295, -1610, -8064, 297, -8908, -4433, -2954, + -82, -11426, -4610, 2063, 1522, -7972, -495, 1799, + 2922, -5179, -865, 4739, 11072, 3927, -483, -11111, + -2375, -1432, 1210, -1342, 2418, 1688, 852, -64, + 133, -4582, -7136, 10558, -3417, -3162, 2033, 3149, + -3050, 2532, 568, -2444, 4082, -2859, -10350, -4983, + 6633, 230, 5954, -1140, -657, -998, 1156, 736, + -8894, 64, 939, -260, -1704, -526, -1330, -869, + -2427, 12377, 1296, -120, -10560, 1794, -9090, 1487, + 7162, 519, -382, -3234, -66, 1294, 2363, 1482, + 498, -4053, -752, -154, -587, -293, 16533, 65, + -1211, 1666, 291, 2820, 2222, 2, 865, 344, + -1206, -1214, -2162, 8842, 11063, -2093, 1896, -857, + -144, 321, -9548, 4464, 5038, -282, 1160, -194, + 823, 3479, -8234, 5834, -320, 7114, -184, -2663, +-11670, 472, -2013, -1282, 4390, 4453, -2126, -2483, + -900, -6262, -2237, -539, -1134, 164, 426, -8969, + -1746, -1960, 8172, -2127, -19948, 657, -712, 344, + -443, 458, -564, 56, 756, -157, 274, -1324, + -3372, 2981, 635, -9454, -4916, 2884, 2316, 8200, + -1452, 2135, 1785, -1054, 82, 5007, -4164, 642, + 9241, 5091, 1002, 2467, -8409, -854, -861, -2317, + 405, -1810, -793, -7907, 496, -1005, 3373, -1016, + 9527, -542, 1672, -9105, 280, 11170, 273, 908, + 89, -233, 10850, 870, 436, 1630, 3328, -499, + 5091, 1224, 9135, -480, -1134, 2428, -2904, 5077, + 2014, 2859, 4277, 7763, 8719, -11474, 1619, 1167, + -3188, -1063, -433, -4291, 2646, 1024, 2008, 317, + 746, 327, 6824, 1174, 8978, 5254, -8948, -136, + -2602, -1442, -698, -950, 1800, 296, -1016, 1653, + 3771, -9326, 4536, 7033, 4729, 6630, 1042, 167, + 11485, 12338, -147, 2834, 611, 1844, -313, 486, + -916, -887, -1423, 642, 242, 75, -1875, -645, + -1239, -2118, 1458, -272, -1703, 949, 778, 21826, + 214, -1320, 310, 2680, -1542, -2202, 1072, -132, + -2067, -3593, -8293, -10331, 9030, 402, -2702, 2984, +-12068, 3170, -1098, -1175, -1188, 2998, 1159, -1712, + -904, 236, 42, 823, 548, -546, -1954, 15989, + -2212, 1886, 2300, 2293, 2606, 2905, 2365, -1214, + 1592, 1362, -2210, 1674, -1892, 15049, -1012, -2824, + -792, -11447, 11144, 4853, -357, -1230, 748, 1212, + -294, -424, -2720, 78, -2149, 966, 7794, 1645, + 138, -709, 464, 3614, -10308, 310, -4726, -3694, + 1088, -576, 690, 68, -145, -3282, -9280, -9537, + -1274, 3202, 588, 1790, 1437, 3880, -1803, -1154, + 15082, -2388, -1746, -885, 2267, 1813, 1688, -1039, + 9775, 350, 3218, 10550, 1048, -3731, -3748, 3517, + -910, -663, -413, -1045, -1236, -248, -132, -1196, + 12, 15815, 653, 1429, -371, 4094, -3050, 567, + -5524, -11128, -4261, 1929, -1719, 8236, 686, 1309, + -1057, -715, -2586, 1327, -38, -6180, 3499, -2080, + 8980, -1890, 62, -1004, 3308, 5809, -5778, -3865, + -610, 180, -519, 3129, 9000, 1607, 8484, -4056, + 4741, -4491, -355, -1324, 1203, -1864, -811, -15995, + -121, 1325, -817, -2170, -5753, 731, -1875, -2286, + -9193, -307, 247, 2469, -1738, -12290, 31, 1028, + 670, -66, -1856, 570, -3542, -3401, 144, -320, + -524, 184, -928, -1606, 10978, -3114, -8861, 1467, + 1156, 872, 8276, 5655, -695, 2788, 3733, 2155, + -2044, -10260, 1683, 1859, -263, 17966, -19, 1621, + 50, -261, -4143, 1245, -22, -1564, 809, 2462, + -8005, 1247, -1471, -763, -1686, -698, 2868, 796, + 4036, -3672, 11209, 1102, -9369, -1008, 1273, -906, + -4458, 1642, -3254, 3563, -94, -6267, -604, 8687, + 2388, 2214, 1759, -7788, 4296, -7467, 3547, 3248, + 845, -7784, -2195, -42, 5327, -1002, -3915, -4581, + -1215, -919, -3444, 5142, -1874, -3020, -2627, 1129, + -4456, 1840, -11472, -914, -6366, 3495, -2775, 484, + -5859, 980, -1967, 1350, 929, 6856, -3952, -3365, + 1514, 7423, -675, -2260, 6027, -3072, -6388, -3716, + -2398, 5564, 1447, -86, 1180, -1239, -1372, -435, + -1314, -1978, 942, -2018, 1027, 704, 20417, -94, + -1239, 252, -171, -1100, 1684, 1401, 623, -354, + -2674, -5042, -734, -6631, 7587, 4901, -1596, 6806, + 4230, -859, -867, 1266, -3869, -3972, 1548, -4889, + 2811, 2263, 2468, 354, -6197, -1278, 1947, 5675, + 10612, -1730, 2056, -70, 3034, -583, 879, -3719, + -8623, -1241, 822, 5832, 163, -1075, -784, 398, + 1170, -717, -374, 856, -21602, 89, -513, 260, + 854, 1152, 762, -601, 523, -107, 1033, 1877, + -1456, 226, -20758, 365, -8943, 1305, 193, 948, + 295, 2696, -3165, -1982, -2439, 1067, -12266, -1018, + 3400, -178, 1995, 11745, 1833, 9785, 1171, 582, + -1844, 157, -1242, -4080, 864, -1771, -4257, 721, + -4010, 7990, 142, 730, 1976, -6623, 4637, -7394, + -1143, -835, 3341, 1732, -7266, -448, 5379, 290, + 1855, 6977, 6637, -6561, -1370, -1767, -2769, -1189, + 3872, -4895, -4679, 3906, -1664, 1514, 7908, -7960, + -4147, -1235, -1706, 3314, 144, 1668, -9505, 2268, + 4147, 2515, -1451, 6475, 1675, 106, 981, 201, + 309, 60, -133, -472, 561, -380, 1130, 91 +}, + +.cb2232s0 = { +-26218, 1606, -390, -696, 266, -947, 561, -1526, + -8, 1080, -187, 5671, 2249, -30, -4129, -768, +-10908, 3826, -10422, -144, -1259, -1372, -3553, 1287, + -5151, 6442, -5101, 1386, 791, -1593, 12942, -764, + 424, -6212, 9733, 702, -9721, 524, -4818, -1232, + 6, -484, -818, 955, 6425, 3594, 5156, -286, + 1514, 4466, -1756, 11321, -679, -1481, -477, -8015, + -3059, 4476, 679, -1143, 2877, 2581, 3230, 239, + 12018, -1597, 13431, 11852, 260, 3306, -714, 1299, + -4375, -778, 170, -565, -3510, -6632, 3354, 5901, + -1070, -5912, -3430, -4970, -4712, 2648, -9113, 1561, + 1002, -5659, -3177, 638, 2289, -1050, 12310, -10364, + 2830, -961, -194, -6442, 2206, 3454, -2087, 4327, + 1080, 10257, 8107, 4904, -3141, -2339, 7568, -363, + 3765, 7960, 7067, 1496, -3842, 1805, 2415, 913, + -1641, -5411, -7583, 4597, -1324, 2882, 11310, -2570, + -2877, 3544, 4642, -2249, 7110, -307, -3413, -2871, + -8974, -6358, -5703, 4046, 83, 1887, -3476, -4346, + -2995, -346, -46, 22143, -576, 2597, 696, 1520, + 140, 2937, -3356, -988, 4090, -1246, -3347, 1387, + 2264, 1282, 7040, -806, -12810, -1105, 32767, -4266, + 108, -1998, -680, -1279, -467, -110, 462, 768, + 1678, 1408, -1888, -1115, 9430, 5852, -3578, 5367, + -1096, -4310, -9588, 4350, 6048, 2516, 3214, 4468, + -276, 15175, -848, -2875, -314, -6002, -11743, 448, + 9238, -3026, -3934, 2840, -2070, 1850, 444, 511, + -542, -7382, 6002, -14447, -1498, 176, 812, -2632, + -2291, -3312, 3953, 370, -2154, 1678, -1186, -6382, + 1544, 3534, -3767, -7459, 7265, -3272, 10669, -1677, + -7046, -1679, -132, 2108, -1948, -2938, -5393, -6222, +-11293, 2066, 981, -731, 1869, -2211, 3558, -21513, + -678, -493, -2087, 245, 635, -2011, -3316, 13445, + 2089, -10186, 1114, -1241, 2121, -2305, 3316, -1282, + 2733, 318, 3534, 4844, -1439, 8932, -7649, -556, + -7519, -3442, 5068, -3546, 8586, -8425, 7146, -683, + 665, 3052, -2581, 248, -8320, 2270, 7045, -800, + 5890, 2187, -251, -2552, -3867, 3665, -1643, -11757, + -5542, 1806, 3669, -508, -3436, 600, 10412, -5426, + 1680, -4545, 11536, -1859, -5446, -4594, -4300, -1173, + 282, 2100, -2556, 9486, -7325, -7252, -3155, -775, +-13674, 4272, 3066, 9352, 1647, 1136, 794, -520, + -654, 1539, -2244, 3155, -12039, 731, 3379, -1904, + 6866, 9669, -2384, 2099, -2426, 1633, -3358, -5662, + 2164, 10679, -5330, 7066, 5826, -187, -4840, -1174, + -3694, 976, -2548, 2292, -3517, -1007, -4041, 684, +-14986, -4789, -4135, -4376, -10678, -1482, -10466, 3575, + -1960, 3185, 1198, -196, -892, -5424, 4802, 13608, + -7772, 3952, 4404, -52, 1097, 3182, -2699, 900, + -1258, -8055, -3102, 784, -2574, 1556, 1060, -5417, + 537, 11991, -650, -487, -10250, 6766, -3716, 1062, + 2525, 1039, -3002, 5742, -502, -4583, -144, -144, + -5896, -978, 1786, -1420, 1944, -130, -5202, -1578, + 7821, -11675, 9980, 5065, 5942, -362, 16344, -801, + 1932, 1242, -10, 791, -170, -2468, -479, 3297, + 4328, 11473, -1549, -12316, 209, 1739, 1875, 1305, + -4310, -13049, -4913, 9208, -966, 2570, -138, 890, + 1373, -1324, -965, 8563, -7560, 490, -1392, 5695, + -5656, 5431, 3974, -1131, -1246, -1334, -3859, -3150, +-12976, -6929, 665, 9393, 490, 2212, 18, 542, + 229, -3925, 1836, 4223, 5268, 1200, 471, 20, + -9914, -5774, 8362, 5929, -7087, 2005, 15624, 1626, + 5419, -1492, -1536, -417, 1957, 2585, -404, -1125, + 2296, 596, 836, -356, 745, -2810, 2879, -2354, +-21682, -108, 726, -862, 593, -42, 266, -1356, + -2119, 19613, 814, 2462, -2940, 222, 3595, 5634, + -807, 1219, 2446, 5666, -1839, 7092, -10581, -5136, + -2408, 5726, -1116, -2348, -6318, 8991, 6750, -5321, + -7344, -2194, -5544, 1705, 12500, 9069, -1966, -4914, + 2225, 3537, -1485, -5141, 434, -1620, -5383, -710, + -5443, 3930, 7082, 667, -3289, -3202, -2097, 1970, +-11647, -2927, -2098, -1345, 3449, -2075, 262, -756, + 1829, -271, -1292, 1079, -5746, -344, 3660, -4456, + 3593, -7652, -1367, -828, -2290, 1063, 4234, -17596, + -911, -6068, 1040, -2956, 2704, 1763, 974, 3132, + 697, 1267, 240, -5520, -12368, 10830, -633, -5939, + 2307, 1868, -2216, -1261, 597, -6302, -5145, 3550, + 7519, -6963, 3752, 876, -1912, 30, -9192, 1075, + -4632, 9108, 1139, 911, 9290, 1268, -1006, -1718, + -6668, 3294, -1510, 6527, 456, -1400, 11424, -4168, + -3940, 4738, -4863, 2990, 3202, -441, -4744, 4623, + -4351, 3997, -11016, -737, 136, 7978, -3801, 4170, + 3602, -2217, 849, -2552, -22232, 323, 193, -4, + -1030, 590, 1625, 3208, -10595, 2624, -741, 13121, + -1044, 1601, 5175, 2199, -3833, 1804, -2314, 793, +-11486, -655, -3320, -2975, 4065, -3124, -706, -7264, + -1038, -3082, -5503, -7147, 8367, 1205, -1092, -1694, + -1078, 11584, 8, -1237, -2077, 9732, 4963, 2780, + 674, 581, 8226, -1231, -9252, 644, -3284, -744 +}, + +.cb2232s1 = { + 32767, -45, 422, -1139, -1052, -2085, -695, -612, + 1451, -288, 58, -878, 53, 2912, -1891, -7148, + 1893, 3028, 165, 963, 2260, -7904, 5857, -18824, + -2617, -1030, -872, 1500, 1118, -745, 143, -436, + 1239, -3840, 1785, -2506, 20237, -1026, -1556, -1371, + -660, -1185, 939, 1315, -3658, -5428, 587, -4105, + 1596, 12612, 5781, 1172, -3490, -1182, -333, 6258, + -2594, 2144, -4830, -190, 1972, 2687, 1327, -987, +-15046, 4659, -71, 6890, 1588, -4787, 4318, -3704, + 496, -5601, 1954, -1250, -3389, -5156, 9238, 2298, + -4945, 183, -2036, 114, 12250, -2330, 71, -3395, + -1402, 3668, 531, 10915, 1162, 7738, 9089, -1250, + 1500, 6357, 1155, -5094, -2641, 1657, 470, 2022, + 535, -306, -18031, -903, 2913, -5486, 1769, -1419, + 9082, 2149, 3516, 6960, 833, 1123, 1266, 1672, + -690, 9634, -2986, -4675, 1006, -2205, -2919, -3205, + -2759, 107, -931, -9694, 2340, -862, -2782, -3636, + -9414, 9564, 1057, 8664, 1326, 3928, 1452, -4692, + -3437, 8610, -10466, -6638, -2879, 3408, 861, -3057, + -823, 164, 3153, -3698, -15693, -886, 1456, 3278, + -6160, -57, 1110, 22, -2985, 7299, -1082, -7921, +-12212, 480, -7645, -211, 1586, 3874, 3242, -883, + 6730, -1597, -506, 3744, 7552, -7607, -65, -1442, + 266, 10012, 1594, -2628, 6988, -1049, -516, -691, + 672, 4913, 1788, 14973, 342, 962, 7212, 1124, + 500, 1135, -311, 3886, 12548, 5432, 6219, 3341, + -122, 5636, 6871, -10831, 4010, -10084, 1456, 5216, + -1013, 1102, 4164, -1490, -5186, -242, -4498, 3322, + 3584, -2176, 5704, 515, -11556, 1446, 4303, -3928, + -4227, -7268, 6069, -11330, 822, -2054, -3035, -2516, + -1816, -3796, 8408, 8849, -3030, -8201, 1149, 7388, + 1036, 2586, 5618, -2274, -5037, -1497, 384, 1454, + 8154, 1672, -2409, 3347, 13258, -979, 513, 7826, + 2662, 1818, 5537, -1104, 2645, -10632, -8767, -5667, + -1029, 806, -9040, -4684, 792, -5008, -5807, -3924, + 964, 313, -2521, 1106, -5728, 13534, -8078, 4216, + -1388, -2588, 986, -14536, -1410, 3461, 1360, -1348, + -104, 1493, -2858, -2860, 2045, 18330, 4814, -3628, + -705, -3228, -660, -2664, 2616, 4548, 3753, 1574, + -1319, -1110, 556, 3304, -2803, 13052, 4592, 2922, + 13667, -2322, -3056, -2717, 174, -4222, -4296, -7695, + 1366, 1786, 1041, -110, -1997, 4102, -1855, -900, + 203, 1311, 3412, 4107, 22609, -4112, 427, -2488, + 257, -1267, -1277, -6430, -7193, 10667, 4495, -4317, + 6846, 13213, 7335, -972, -3137, 335, -609, 3131, + 2406, -3762, 2151, -5188, -7675, 2068, -2027, 3722, + -773, -3276, 1539, -7886, 1005, 13693, 4601, -8386, + -508, 5662, -4889, 93, -10603, 4051, -2, 1094, + -4897, -2274, -2377, 2228, -5507, -464, -3455, -227, + 9433, 8093, -2245, 3701, -1047, -6827, 2037, 1926, + -3610, -15420, -581, -6127, -2075, 2501, -2216, 5385, + -2297, -2660, 1563, 3244, 1418, -2012, 2964, 12235, + -8595, 2728, -3541, -6511, 11038, 11326, -183, -1102, + 1038, 1224, 20, 1441, -349, 1240, -7737, -930, + 1411, 6945, 4130, -13544, -2625, 3550, 3149, -730, + 7658, 3098, 673, -2259, 2556, 1543, 1478, -951, + -8128, 4951, 11919, 4588, -8448, 784, -11498, -1908, + 2578, 2936, -7496, -5834, 1987, 3407, -4133, -4924, + -1348, -1300, 916, 899, 20257, 2027, 1450, 4388, + -3748, 3846, 2187, -1158, 4720, -3613, 5312, 4055, + 448, -6383, -8794, -2232, 1920, 834, 27087, -754, + 90, 1410, -985, -1381, -61, 650, 1080, 7035, + -2772, -1233, 13410, 4494, -472, -2896, -5083, -2217, + -5778, 437, -6853, 4996, 3442, 6092, -6497, -3871, + 4024, -898, -73, -3067, -2793, 5640, 6076, -2454, + 3598, -277, 1672, -6858, 2419, 9753, 6292, 8835, + -9909, -4724, -618, 7266, -416, 1965, -4968, 2421, + 1155, 3815, -116, -3725, 7872, -4901, 2383, 1612, + -2186, -2302, 2791, -2226, 1144, -13379, -6602, -806, + 7099, -2098, 4194, -2128, 8663, -4275, 452, -135, + -6053, 1280, 12815, 3278, 8452, 4479, -1648, 1453, + 1407, -966, -1016, 3173, -7333, -4552, -13176, -1744, + 577, -1572, 611, 1202, -146, -5773, 3012, -3016, + -1581, 3162, 3818, -1970, 6195, 1946, -9656, 2861, + -7875, 3133, -7840, 10951, -1684, -306, -227, 9776, + -82, 1736, 1180, 3457, -2874, 5365, -7428, 7604, + 2623, -2998, -2270, 10410, 1252, -2725, -4433, 1758, + -5225, 6522, 6698, 712, 4694, -2392, 240, 423, + -3030, -12708, -3136, -5176, 480, -1624, -12900, 7537, + 4371, 1186, -1828, -757, -1850, -974, -3755, 1415, + -6302, 2642, -3823, -1570, -8090, 8251, 1945, -9213, + 1147, 4128, -4301, 806, -1745, 704, -2496, 1375, + -802, 9, -808, -252, -5453, 3857, 10353, -536, + 1875, -2896, -10792, 3358, 1063, -890, 7200, 3660, + 406, 2840, -6973, -4469, 4638, -8091, 2772, -8035, + 1728, -5315, 7234, -2718, 3707, -1226, -11858, -2397, + 772, 3285, -4089, -1400, 1113, -16680, 1885, -435, + -959, 242, -817, 259, -2010, -1857, -557, -914 +}, + +.cb2232m0 = { +-13394, 14382, -488, -1088, -817, 100, 305, 2267, + 2527, -1584, 995, -5781, -3585, -1826, 803, -4108, + -3137, 12111, -211, 838, 4879, -1964, -1728, 13830, + 2084, -11535, 664, -2499, -3421, -703, 4528, 968, + 1008, -12010, 984, 2658, 422, 1412, 10772, 2216, + -4291, 1329, -2324, 2392, -2029, 12322, 1053, 169, + 12635, -902, -62, -670, -3007, -3322, -2948, 1817, +-10688, -1264, 1949, 2734, 1072, -1429, 2085, 10312, + -1685, -4433, -1287, -9620, -1132, 20, 614, 2470, + 2821, 5934, 3526, 11292, 50, -12970, -11948, 1114, + 1980, -945, -713, -5357, 3766, -447, 969, 2247, + 11854, 2148, -12393, 1518, 610, 4527, 1164, 1347, + -1422, 649, 653, 855, -24, 30152, 20, -564, + -2825, -11, -1408, -80, 239, 305, -3163, -854, + 568, -18, -4212, -403, 288, -3009, 229, -1152, + 16390, -877, -458, 316, -128, -12165, 1088, -828, +-10886, -269, 747, -1026, 1716, -10920, -9204, -3123, + 958, -6128, -260, -851, -1524, -2386, -6472, 228, + 2667, 3158, -140, 1719, 2330, -2730, 3080, 44, + 15743, -2167, -11637, -607, 476, 408, -12505, -1862, + -1892, -440, -3785, -2348, 1229, -338, -438, -797, + 29933, -715, 366, -197, 576, -188, 484, 240, + -4844, 1168, -1054, 863, 875, -295, -16091, -1972, + 3976, 3833, 3056, -770, 1011, -3098, 165, 3973, + -9367, -18, -299, -11254, 1005, 8644, -14788, -2268, + 2644, -8410, 578, 2169, -766, 2764, 2378, 3282, + -2710, 7612, -542, -12062, -2437, -414, -506, -10332, + 2732, 839, -2593, 923, 1159, -1057, -7333, -86, + 2832, 11328, -1616, -302, 4399, -547, 6107, 9983, + -6901, -85, -544, -4916, 366, 4878, -8662, 7313, + -3056, -1027, 2381, 8906, -7270, 509, -1124, -2512, + -1636, 5830, -5868, 2369, -3236, 12557, -2713, 12793, + -2957, 1688, -852, 4723, -122, -2336, -4698, -1306, + -7399, -2090, -1953, -1505, 3335, -10906, -2598, 1322, + 2556, 7210, -1553, 1262, 1878, -10719, 1746, -2736, + 1448, 8734, -9602, 828, 1752, -1632, 8037, 2728, + 562, -1879, -10572, -544, -2254, -1997, -6384, -87, + -5878, -473, 498, -2960, -5698, -11500, 1815, 2050, + 7388, 5230, 2782, 5602, 514, -306, 13022, 523, +-10776, -846, 716, 270, 3350, -6021, 1420, -6175, + -1978, 3967, 11612, 3320, -4100, -2468, 4595, -5338, + 65, 3478, 19, 3501, -15896, -1335, -1861, -1944, + 3935, 3630, 4627, -5892, -458, 383, -211, -594, + -165, 24865, -656, 2300, -404, 257, 214, -643, + 2298, -180, 35, 4974, 834, -998, -1738, 5449, + -9222, -10858, 4188, 9147, -5639, -1691, 990, -1945, + 3421, -3527, 9005, -2038, -2369, 5098, 967, 15840, + 196, -3204, -1079, -776, 11806, -1352, -2053, 2011, + 309, 642, 1541, -1466, -4465, 6679, 5756, 7474, + -58, -1864, 5908, -1576, -30374, -904, -571, -1136, + 425, -22, 666, 1150, -734, 82, 1254, -226, + -437, -890, 1464, -3368, 987, -11885, 1127, -7224, + 1872, -8198, 8775, -2695, 1457, 15102, -899, -1384, + -1975, 1891, 3128, 1465, -1649, -1363, 1483, 303, + -534, -7, -1710, -1377, 769, 12698, -8987, -802, + 4636, 572, 2004, -3513, 442, -9863, 3215, -4550, + 2138, -4346, 5682, 11053, 7220, 9842, 797, -1399, + -2679, -5857, -2143, 3241, 2330, 248, -630, 1044, + 639, -3432, 125, 22083, 1976, -1003, 813, 552, + -571, 4358, -6200, 3635, 5439, -636, 233, -4856, + -3519, -460, 6956, -4215, 1537, 7895, 13910, -7637, + 1392, 1572, 648, 3690, -1988, -2463, -3302, 677, + -924, -535, -6025, 4126, 7178, -4145, 4960, -1860, +-10926, -1470, -9506, -226, -258, 32, -479, 2222, + 94, 11358, 3984, -2732, 2111, -590, -2444, -344, + -425, 598, -1382, -1213, -17632, 1566, 1387, -3521, + -57, -1829, 4788, 574, -206, 7962, 9157, 6459, + -1594, -1355, 4874, 1066, 2006, 1793, -7569, 2369, + 1108, 1305, -3046, -14052, -1736, -4045, -4328, 7497, + 3304, 1518, -5666, -529, 4256, 4667, 932, -1495, +-10414, -414, -2110, -3150, -1250, -8799, -419, 5162, + 8497, -8720, -746, -3015, 6403, 3855, 7350, 165, + -59, -958, 5780, 6044, 1736, 3016, 31, 1012, + 3422, 7598, -6837, -2092, 2262, 6171, -10362, -2108, + -1352, 1798, -4872, -6369, 2507, 2640, 6074, 1835, + 2948, 388, 398, -9295, -5384, -2088, 2096, 742, + 3286, 441, 7135, -2112, -9958, -5612, 2479, 5427, +-10114, -674, 308, -1037, 770, 514, 1868, -252, +-11901, -984, 670, 2506, 5396, -1047, 9113, -10865, + 4872, 1720, 2226, 947, -2336, 2649, 173, -1464, + -2874, 4463, -1270, 3429, 6242, -5380, -7772, -4550, + -8451, 2045, -2855, 5336, -15066, -418, -4886, -648, + 3736, 945, -956, -4825, -116, 130, 1889, 9642, + 3790, -4371, 7180, -1556, 6562, -2207, -7910, 506, +-21594, 662, -338, -943, -1022, 6453, 301, -464, + -457, 840, 3313, 10946, -294, 8156, 138, -1425, + 2397, -792, 6468, 4615, -511, 15938, 494, 274, + -5976, -660, 3894, -2140, 1424, 2003, 4101, 2823 +}, + +.cb2232m1 = { + 20456, -1952, -1581, 869, 628, 76, 1404, 4060, + 508, -3177, -946, -2992, 2422, 1139, -1931, -240, + 1011, 365, -1106, 20973, -1438, 372, 137, -1058, + 1171, -1252, 2794, 1434, 1814, 482, 3948, -2704, + 20422, -241, 441, -1121, 499, 1036, -918, 9708, + -3166, -488, -10379, -3201, -5254, -1871, 5665, -12622, + -7591, 127, 1469, -2267, 1813, -4197, 2065, -602, + -395, -652, 333, -19114, -1092, 4310, 1590, 1688, + -1453, 177, 4402, 1168, 5972, -1295, -3258, 1542, + -4832, 3377, -5545, -3622, -4944, 2064, -2846, 8118, + -845, -6778, -3640, 5729, -907, -11007, -5, 2634, +-11118, 2108, 144, 13299, 251, 336, 563, -75, + 3004, 169, -3892, 1477, 1066, -1571, -1113, -1088, + 517, 465, -21841, -1541, -1094, 1841, -9213, -17478, + 1662, 8, 1192, 1174, 1014, -5659, -695, 316, + -5161, 1803, -1056, -2369, -2919, 2941, -9712, 1975, + 426, 11214, 2288, 6186, -7348, -3062, 3341, 3252, + -4102, -346, -876, -7088, -3330, 4507, 310, -1632, + 299, -2636, -2740, -752, 10159, -7201, -9568, 3134, + -4002, -41, 2479, -1816, -14099, 3575, 1161, 6427, + -2466, 390, -1883, -6265, -1266, -263, 1474, -592, +-21234, 94, 4187, 1, 3227, -3273, 1950, 406, + 543, 1661, -2648, -9252, -2048, -5987, -722, 4932, + -4410, 12504, -1572, 2244, 5610, 307, -9710, -3642, + -6436, 4368, 2956, -2269, -6196, 4069, -766, -3695, + 3416, -5786, -9668, 11677, 1208, -965, 1516, 1132, + 1018, -6168, 1970, -10357, 1379, -725, -8789, 3730, + -65, -4758, -1818, -1050, 9641, 4519, 2886, 2667, + 6348, 2436, -438, 1978, -9374, -1286, 3893, -2073, +-11199, -2081, 3345, -3444, -9480, 2410, 1986, -1869, + 3252, 5949, -2119, -401, -214, 3416, -1067, 18510, + -2986, 3510, 508, -357, -837, -1205, 2884, 11587, + 11565, -555, -2664, -873, 3642, -2068, 1734, -4408, + 330, -181, -1358, 1407, -9739, 809, -10203, -2066, + 3440, -2063, 3238, 3734, 1671, 750, 6890, 4068, + 1238, 493, -1330, 76, 8918, 10855, 85, 12236, + 3570, -1074, 3008, -9424, -3186, 1271, -380, -157, + -4974, 10575, -1378, -219, 1354, -1589, 10936, 2268, + -3787, -1040, 7567, 924, 10490, -806, -1318, -1576, + -209, 93, -3745, -3820, 439, -9828, -6265, -864, + 31342, 35, 1332, 443, -590, 846, 104, 868, + -863, 1526, -1088, 11494, -7055, 3564, 109, -3072, + -2234, -4530, 1866, -3425, 9940, 3158, -1821, -680, + -1124, 2884, 1191, -61, -9698, 7596, -558, -9019, + -1181, 208, -1342, -68, -312, 294, -1468, 1410, + 39, -21081, 724, -2137, 935, -8, -10297, 3509, + -6510, -6558, -6906, -1905, 1915, 5920, -8983, 3416, + 7300, -1372, -1422, 1822, -10433, -2530, 1669, 554, + -3008, -3351, -922, 8279, -5184, 5520, 4785, 683, + -506, -4558, 1938, 8442, -12639, -54, -2907, -820, + 10004, 1780, 485, 1401, -3786, 786, -5937, 2632, + -1540, 972, -3342, 2294, 8076, -1006, 11731, -1825, + 3036, 1085, 1160, -9680, 11111, 7838, -2504, -2112, + 2376, 2534, 3624, 555, 3610, -520, -831, -15, + -498, 167, 711, -22685, -999, -1466, -1643, -394, + 5404, -4247, -2307, 4052, -1156, -1240, -490, -1598, + -4365, -8382, 10493, 464, -16592, 3723, -7709, -821, + -4218, -922, 398, 5635, 2184, 5090, -7144, 2420, + 792, -324, -1278, 3172, 13101, 1608, -3996, -2219, + 2995, -6924, 816, -2482, -406, 3458, 503, -8154, + 3460, 2542, -3703, 8524, -61, -430, 23212, 1203, + 2335, 5556, -476, 923, -565, 593, -1611, 1814, + -1614, -7067, -1957, 10166, -4306, -421, -4026, 1854, + -9881, 667, 7720, -2906, 7003, -1823, 6344, -8614, + -2965, -2720, -62, -802, 1945, 4574, -4604, -8341, + 518, -3543, 95, -4262, -5220, -133, 10270, 1999, + 3234, 8900, -4866, -3708, -4465, 4542, 2545, 1770, + 6995, 3559, 1133, -1152, 14680, 1002, 634, -12913, + 1686, -1645, -1796, -50, 112, -1108, 1070, 686, + 1068, 1555, 896, 3498, 10458, -32, 12017, -737, + 650, -432, 404, 170, 10873, 1864, -1718, 11061, + -1556, -3766, 225, 6999, 1730, -6919, -1895, -2919, + 8250, 10050, -4631, -1488, -4801, -1504, -2736, -110, + -3630, -2752, -11162, 1128, -2580, 11692, -678, 1338, + 2175, -6030, 616, 1651, -7034, -3057, 2420, 1998, + 4383, -1721, -10762, -428, 2902, -906, -4298, 2141, + -1242, 5464, -607, 5389, -8946, -3890, 10884, 1544, + 628, -1969, 13902, -1570, -1080, -689, -4676, -3642, + 753, -11351, -110, -744, 4286, 1163, 3105, 9752, + 11143, 4296, -1698, 1012, 2284, -989, -958, -9481, + 738, 24, 426, 1638, 3898, 8885, 2938, -8826, + 2982, -1679, 8466, -651, 5144, 2736, 751, -84, + 7710, 3077, 2885, 146, -1102, -2569, -2039, 11059, + -9950, -1048, -1031, -33, -5118, -1096, -1986, 2306, + 2400, 9320, 6188, 500, 2090, 61, -11357, 118, + 1505, 1032, -1920, -164, -9744, -4670, -11029, -102, + -960, -1023, -2570, 4102, -3989, -11478, 772, -1515, + -1102, -2194, 1722, -1195, -8144, 746, -9534, 3250 +}, + +.cb4440l0 = { +-14497, -1982, 631, -984, -2115, -3252, 2755, 2017, + -2110, -8864, -792, -1291, -2761, -2365, 698, 1047, + 972, -14703, 10590, -3945, 663, 972, 1204, -2801, + 1295, -1296, 50, 1448, 888, -1879, 122, 78, + -183, -588, 16202, -388, -2240, 1136, 1266, -6445, + 2619, -1664, -6329, -2700, 1557, -497, 598, -110, + 1298, -334, 191, 29897, 387, 419, 76, 152, + 533, 78, 112, 101, 158, 136, -236, 88, + 43, 107, 84, 21, -6385, -1711, 1757, 1411, + 9152, -72, 1428, -1098, 10328, -506, -360, 285, + -36, -2816, 819, 88, 176, -481, -172, 2067, + 3268, 5479, 8605, 11272, -1880, 361, 1582, -4973, + -1379, 3835, 74, -3, 493, -431, 1390, 101, + -550, 59, 476, -469, -583, 568, 732, -1015, + -1104, -698, 23922, 1130, -1268, 280, 204, -59, + -9789, -317, 935, 2944, -10402, -2564, -4648, 1506, + 3834, -1002, 2805, -158, -409, 814, -150, -97, + -3573, -1550, 1356, 5350, -365, -2622, -3454, 310, + 1194, 911, -10928, 937, 7980, -5286, -554, 1999, + -1263, -562, 10, -321, 744, 44, 64, -274, +-30136, 340, -1051, 756, -30, -6, -269, -273, + 12, 95, 1565, -13194, -11810, -485, -1574, 414, + -240, -452, 564, 740, -476, 959, 1079, -1568, + -422, 37, -154, 10117, -68, 1412, 11862, -3420, + 4169, 5178, 527, -1027, -1030, -1985, 448, -716, + 1696, 1942, -254, 308, 1100, -790, 8102, 6630, + 3653, -1018, -587, -6990, -19, 1671, 1425, 8089, + 3708, -1182, 774, 659, 113, 437, 50, 835, + -532, -11209, 1682, -7490, -2592, 1234, -4689, -7301, + -143, 3361, 1121, 177, -473, 513, 136, 965, + -4020, 4639, -1212, 1271, 2905, -6865, 10499, -3800, + -3354, -5029, -3606, -950, 4490, 526, 1006, 2, + 1760, 5819, -55, -1098, -1843, 348, -2062, -9196, + 3712, -11466, -3218, -858, 2720, 589, 320, 861, + 59, 5357, 564, -380, 538, -142, 490, 212, + 1716, 670, 1904, -181, 2979, 943, 16916, 1271, + 988, -802, -1490, 9154, 643, 1725, 1347, -2827, + -4096, 485, -7091, -3180, -4747, -1604, 1576, -5724, + 6104, -139, 1726, 11715, 360, 7519, 2513, 5192, + -2208, -1993, 829, -387, -5724, 4418, 116, -2955, + -226, 249, 377, 2149, -2929, 5021, -3064, 800, + -1459, 11384, 8556, 1740, 368, -2839, -2049, 1438, + -1357, 4084, 1896, -528, 1621, -1760, 13741, 302, + -1018, -9774, -3521, 1302, 1374, 1139, 918, -1724, + -764, 858, 804, -1772, 372, -322, -526, 11924, +-11944, 4012, 1749, 1737, -1545, 68, 889, 280, + 690, -2200, 1068, -484, -171, 455, -44, -3178, + 2243, -590, 749, -792, -19876, 198, 236, 2695, + -3413, 652, 284, -820, -1134, -199, -112, -5650, + -418, 1047, 1090, 2260, -3297, -2164, 13524, 1720, + -326, 910, -1706, 3912, -1175, 1687, -2152, 50, + 35, 1718, 721, 9316, -2256, -4330, 6961, 4432, + -8043, 45, 1370, 3472, 2892, -3224, 1368, 1355, + -562, -694, 746, 198, 1188, 2819, 3131, -2371, + 6438, 847, 2111, -10187, -3451, -9826, -3502, 655, + 649, 1460, 270, 118, 45, 192, 188, -1139, + -258, 663, -84, -27519, -765, -905, 357, -4, + 89, -372, -24, 178, 1127, 209, 1177, -2762, + -587, 1488, 8989, 3217, -2550, 215, 9540, -7196, + 1259, -3716, 2767, -261, -216, 872, -3008, -2076, + 8682, 709, 3629, 87, -3114, -10624, 246, -1670, + -1738, 1229, 7624, -1120, 784, 305, 233, -185, + 280, -1466, -268, 198, 499, 308, -2187, -1149, + -388, -38, -338, -1084, -19424, 40, 1958, -2240, + -86, 264, -9876, -1287, 4086, 3742, 2502, -10078, + 4574, -1493, 1078, 3218, 2410, -364, 1049, 2638, + 35, -1295, 200, -2847, 10818, -12064, 2375, 348, + -353, 2788, -821, -3196, -511, 146, 2015, 235, + -1094, 2622, 2688, -79, 5176, -884, -11814, 794, + 2696, -6704, 3452, 1295, 3872, 2924, 4498, -166, + -598, -1213, 891, 5478, -266, -777, -5, -776, + 1003, -1837, -156, 17910, 453, -297, -1545, 857, + -288, -308, -6373, 2045, -1846, 3007, -2236, -1904, + 815, -2889, 4200, 8320, 9872, -614, -834, 3856, + 414, -234, 1559, -7451, 3641, -1230, 837, -127, + 2652, 411, -532, -12548, -1692, 1034, -2418, -968, + 558, -1564, -1952, 307, -1064, -6776, 1588, -2636, + 949, 8272, -12, -3468, 3481, 6588, 2580, 7393, + 272, 1528, 1818, -2206, -349, -396, -11704, 1487, + 9753, -4665, -24, 2084, -780, 5036, -647, 3668, + 561, 1099, -1094, 534, 1270, -99, 1006, -476, + -528, 12481, 1589, 1593, -1682, 7022, 2664, 8702, + -563, 1082, -206, 87, -1978, -144, 228, 1232, + 889, 14340, 65, -1061, 10510, -95, 649, 53, + -962, -383, 2479, 1322, -1798, 2840, -492, -419, + 90, -680, 79, 1026, -20912, 1593, -742, 1086, + 516, 699, 2393, -64, -2010, 46, -859, 111, + -440, 14281, 272, 797, -10141, -3734, 3126, -3050, + 1300, 73, -1754, -1278, 1890, -2710, 704, 1160, + 1, 269, -24, -622, 124, 138, -522, -510, + 95, -402, -27306, -470, -214, -159, 396, -201, + -372, 122, 136, -1005, 744, 1949, -810, -2648, + -726, -384, 955, 1232, 1354, -345, -19485, 1056, + -193, 1257, -263, 398, -752, 602, 98, 793, + 17, 20186, -189, -2615, -174, 166, 436, 411, + -1046, 374, -471, -253, 233, 8352, 1342, -1279, + 9305, 2190, -3239, -5262, -3454, 1844, 684, 303, + -4434, -6041, -3495, -2482, 389, 353, 159, -14, +-29179, -511, -158, 92, -401, -36, -297, 447, + -605, 269, 85, 212, 8, -118, -130, 207, + 13150, -8712, 2504, 1355, -3268, 1396, -4748, -2200, + -1560, 228, -162, 1179, 3024, 742, -860, 69, + 10, 30006, -538, -489, -125, -214, 364, -682, + -283, 532, -134, 227, -448, -20, -266, 70, + 2, 9310, 14858, 856, -493, -3357, 36, -248, + 214, 281, -73, 3268, 745, -245, -1007, 146, + 392, 36, 8042, 2953, -6603, -7697, 4425, -2498, + 571, -2194, 3388, -794, -561, -2763, 1912, -3030, + 225, 214, -27, 834, -10661, 437, -506, -535, + 8397, 1332, -2406, -8868, -2972, 1385, 296, 865, + 2318, 890, 244, -121, 226, 375, 896, -10381, + -2266, -3404, 983, 1255, 259, 11427, 455, -3041, + 307, -2446, 476, 723, 18, -10224, 510, 552, + -654, -876, -465, 628, -12572, 786, -393, -4162, + 938, -1327, -1695, -608, -1352, -131, -880, 830, + 1016, 21875, -408, -1560, -500, -1682, 453, -930, + 1316, -136, 434, -683, 412, 202, 233, 382, + -2002, -9267, -1034, 8710, 434, -8121, 3035, -3121, + 1792, 2712, -1537, -1082, 854, 1337, -1084, 91, + -4485, 2545, -4412, -1930, -12234, -4802, 4641, 437, + -928, 2163, -3154, 521, -665, -1200, 2654, 931, + -388, -118, -1144, 133, 5089, -1194, -1528, -967, + -795, 188, 1918, 897, -7046, -7617, 7118, 5755, + -2724, -7894, -472, -360, -591, 990, -3032, 7742, + 726, 5490, 9383, 479, -3032, -1904, 7158, 4706, + 2442, -1576, -58, -156, -3977, -2696, 4195, -166, + 3342, -1566, 3767, -4159, -5750, 5505, -7663, 4516, + -4073, -2612, 5136, -290, -666, 1282, 776, -566, + -602, -310, 1003, -648, 2928, -3159, 427, -1168, + -2702, -16990, -205, -343, -1196, -1980, 1653, -512, + -1820, -418, -3368, 3522, -1966, 4964, -5728, -5185, + -210, -1721, 10131, -7060, 3351, 334, -96, -3193, + -1713, -614, -2633, 147, -1552, -2363, -3724, -1731, + -7350, 5453, -2732, -2867, 12458, 416, 0, 4414, + 833, 590, 1617, 405, 73, 868, 232, 195, + 15, -196, -782, 749, -955, -84, 1176, -553 +}, + +.cb4440l1 = { +-12227, -3413, 12848, -1336, 20, 894, 254, -1001, + -1381, -406, -1157, -458, 300, -395, 825, -34, + 74, 382, -1018, -10266, 1338, 11091, 544, 797, + -4304, 1389, -747, 1924, -257, 2615, -37, -4375, + 782, 158, -378, 19, 652, -539, 1012, -4211, + 1263, -925, 96, -9226, 5921, -8209, -71, -1838, + -2201, -7441, -60, 393, -5626, -264, -1002, 85, + 1989, -1616, -216, -914, 9907, 8044, -578, -7830, + -1705, -3624, 2430, 59, 5813, 870, -317, -2545, + -4020, -1330, 1215, 9352, 5425, 324, -4803, -681, + -506, -4710, -6574, -4184, 65, 729, -1310, -1387, + 1385, 2364, 1672, 2493, -438, -1367, -907, 38, +-20220, -1644, 512, -413, 348, -112, -532, 785, + 1332, 7140, -1916, -1766, -11570, 1811, -9167, -76, + -1531, -175, -1739, -771, 2014, 519, 15, 576, + 8736, -979, -28, 1830, 329, -302, 12206, -1501, + 5195, -305, 1456, -581, 1488, 142, 235, -157, + 192, 1540, -922, 11056, 11823, -2964, -1488, 1712, + -2018, -880, -3282, -190, -198, 2436, -248, 222, + 22, 863, 1504, 2078, -2047, 216, -1270, -732, +-18252, 1186, 3178, -730, 432, 934, 1617, 873, + -491, -70, -768, 679, 1398, 537, -364, 172, + -541, -94, -24, -129, -26725, 201, -554, -357, + -71, 60, 96, -1665, 1425, 1244, 332, -1068, + 326, 834, -620, -1473, 1585, 1432, 928, 18782, + -1388, 2897, 448, 40, 1323, 1433, 787, 215, + 3297, 2586, -856, 451, -17700, 735, -43, 405, + -1252, 744, 1012, 677, 312, 206, -279, -432, + 6677, -87, -72, -10400, -106, 11224, 1152, -422, + 2024, 704, 2462, -1197, 232, -119, 4, -879, + 1600, -708, 3496, 279, -143, -1096, -555, 4594, + 1486, 161, 942, 2018, 2474, -16010, -380, -193, +-11415, 457, -276, -11220, -1604, -38, 813, -4044, + 1888, -4265, 1647, -882, 981, -734, -110, 140, + -3050, 1248, -549, -1167, -967, 3586, 688, -1380, + 424, -17959, 2022, 2274, -44, -1406, -432, 1335, + -659, 9555, -3581, 11045, 1870, 806, 599, -2065, + 156, -4420, 16, 2349, -609, -3058, -738, -60, + -548, -119, -49, 26, 1528, -1842, 6306, 14078, + -692, 5480, 321, 1996, 1376, -3086, 490, -54, + 1151, 932, 445, -9887, 15808, 3085, 866, -2020, + -1785, 2126, -920, 414, -290, 138, 244, 994, + -702, 1410, 330, 202, 675, -389, -241, 31306, + 380, 300, -53, 804, -109, 413, -44, 6, + 14, 486, -293, -112, 26, 11632, -836, -3948, + -518, -1364, 11360, 3558, -588, -2084, 490, 381, + -955, 2207, -2953, 1115, -265, 2, 65, 464, + -180, -111, -174, -152, -30508, 121, -207, -835, + 1126, -185, 91, -96, 222, -99, -93, -10138, + -430, -184, -372, -194, 953, -100, 382, -1422, + 13931, -1835, -1657, 821, 408, 808, -601, -463, + 7142, 5596, 3171, 2174, 2740, -11350, 1019, 1449, + -386, 1642, 3703, 4271, 1664, 2232, -674, 983, + 551, 8543, 154, -383, -2419, 1117, -520, -10966, + -4406, -3742, -79, -909, 1813, 5043, 412, 1099, + 1434, 173, 788, -92, -1004, 1288, -87, 931, + 10241, -855, 6, -405, 2580, 11455, 1150, -1916, + 3614, -262, 292, 897, 9673, -381, 1711, -2713, + -1111, 282, -2180, -2282, -2266, -724, -849, -11787, + 888, 3120, -1459, 495, -10812, -792, -274, -984, +-12223, -737, -2394, -299, -578, -2758, 1521, 774, + 1938, 857, -1935, 217, 654, 1452, -3695, 6734, + 804, 134, 946, -2156, 9495, -600, -1962, -5252, + -246, 1269, 8492, 1261, -2205, -106, -1314, 828, + 1013, -12059, 663, 436, -2648, 9863, -630, -2961, + 3004, 1015, -3153, -1475, -25, 399, -846, 430, + -1237, -156, -187, 1115, -502, -363, 386, -2820, + 942, -926, 727, 1130, -20388, -274, 1140, 198, + 199, 2548, 442, 157, -1546, 3693, 892, 460, + 6552, 4858, -2560, -8673, 1930, -8913, 3427, 686, + 61, -8830, -358, 1338, -74, 1180, 2871, -3822, + 104, 2414, -1742, 11425, -4522, 393, -3016, 972, + 34, 117, -16113, -6900, -6964, 1726, -843, -242, + -2141, 803, -1093, 442, 1776, 2429, -1000, 489, + 393, 635, 389, 1126, 12285, -1648, -11396, -2885, + -56, 3840, -174, 3177, -1708, 1189, 1914, 1514, + -189, -88, 276, -240, -120, -2929, 9823, 678, + 568, 26, 10080, -2575, -806, -64, 6406, -82, + -1171, 2169, -1804, -667, -37, 54, 4208, 10829, + 11920, -468, 1916, -809, -370, 144, 3616, -263, + -4352, -124, 300, -246, -440, -115, 447, -407, + 20869, -340, 54, -764, -807, -699, -283, 727, + -922, 1098, 577, -6, -809, -50, -115, -75, + 280, 156, 182, 225, -30432, -212, -417, -245, + 177, 94, 4, -627, 167, 47, 152, 148, + 1325, -2436, -10063, -696, -9966, 1032, -1024, -3702, + 3933, 400, 333, 692, -3858, 2599, -1215, -389, + 393, -666, 2135, 10280, -2443, 1972, 410, -392, + 590, 12322, -523, 1141, 52, -1468, 819, -213, + 162, 116, -614, -10630, -204, -1247, 535, 199, + -6058, 2538, 1644, -11539, -1562, 1462, -1493, -218, + -296, -605, 321, 607, -366, -257, -837, 4536, +-11683, 1266, -3805, 4496, 2854, 8, -8848, 124, + 656, -1041, 411, 144, 916, 445, -91, -260, + -149, -882, -433, -121, 345, 68, 349, 821, + 652, 251, -23053, 1015, 712, -73, 7038, -1520, + 5810, -12604, 2841, 425, 265, 1546, 938, 1851, + -1180, 2751, -498, 1289, -774, 327, 4047, -8132, + -2622, 5449, 3221, -2990, 10107, 1880, 173, -4006, + 399, -332, 642, 297, -4513, -1230, -330, -788, +-21881, 903, -1308, 547, -522, 1885, -1730, -63, + 973, 897, 670, -657, -232, 498, 92, -8, +-11010, 1072, -368, -1864, 11505, 3497, 730, 2158, + -1629, -1351, -1583, 2247, -1506, 2144, -902, 639, + 175, -6006, -986, -4246, -1510, 1785, -9792, -495, + 1995, -9189, -1414, -2550, 1578, 2390, -2989, 1673, + -1980, 21, -4054, 8552, 1155, -301, 1204, 3776, + 262, -1828, -1837, -1014, -9, 2711, 1467, 463, +-11605, 1743, -956, -1213, -3892, 1534, -10298, 22, + -902, -658, -1759, 2507, 1552, -12298, -1050, 623, + -3221, 1522, -36, -446, -5925, 2144, -2844, 15080, + -1984, 3631, 1931, 1894, 1193, -1694, -3172, -813, + -1336, 534, -365, 833, -293, 21759, -1266, -1216, + 996, -2, -393, -858, 759, 969, -230, -151, + 977, -874, 119, -896, 262, -118, 89, 95, + 94, -437, -30375, -462, 360, -588, -334, 86, + -1027, -208, 536, -196, 367, -467, 119, -32, + -2544, 6204, 8830, -264, -7847, 848, 2267, 3877, + -6378, -2249, 1420, -1868, -3443, 3747, -590, 58, + -274, -6065, -8472, 5906, 3109, 5834, 3905, 2086, + 1300, 3828, -518, -528, -3672, 1794, 4353, 408, + 566, -2577, -1137, 2749, -2662, -528, -7479, 5550, + 2932, -336, 3681, -2034, 212, -8733, 1017, 2258, + 8225, 387, 227, 877, 2752, -1375, 2636, 8131, + 3850, -6870, -1158, -3736, -8478, 228, -5809, 97, + -2555, -2956, -928, 678, 112, 1434, -1250, 1240, + -412, -4267, -3811, 4322, -3430, 7705, 5456, -6876, + -3452, 7329, 3142, 220, 662, 1531, -5492, -1388, + 6842, -3631, 362, 5029, 8052, -2367, -5346, 5724, + -358, 2469, 2196, -1426, -272, 534, -192, -531, + -705, -70, -259, 93, 335, -94, -145, -17, + 920, 1186, -818, -599, 343, -19859, 2968, 161, + 128, -4282, 598, 152, 1210, -1317, -1545, -229, + 181, -6488, 5699, 7270, 6271, 8809, 27, -4770, + -804, -168, -247, -680, -129, -470, -152, 915, + 176, -904, 622, 280, 2986, 1034, -1046, -482 +}, + +.cb4440s0 = { +-12085, 8192, -1802, 4587, 5947, -3183, -2629, 1837, + 2434, 252, -612, -4697, -576, 150, -704, -640, + 174, -126, -10309, 350, -3187, 4714, -2829, 12618, + -2172, 3502, 465, -159, -601, 1306, 1174, -448, + -292, -136, 242, 31, -9005, -6203, -10027, 25, + -209, -20, -1292, -1252, 4304, 3681, 4462, -4401, + 4412, 1240, -576, 3618, 595, -237, 2544, -6032, + -1511, 1523, -3668, -3472, 5552, -4901, -272, 5963, + 2740, -878, 13010, 191, -2017, 768, 455, -45, + -6873, -3664, 2639, -961, 3068, -4242, 1327, 2362, + -1909, -1114, 100, -5940, 220, 865, -12952, -76, + -1279, -591, 1092, -3502, 88, -2118, 13053, -10141, + -3024, -533, -1923, -4097, 135, 1672, -1661, 1646, + -370, -361, 644, -197, -6796, -10948, 11692, -974, + 488, 349, 3936, -1506, -149, 513, 1401, -1776, + -391, -210, 57, -56, -344, 1018, 7989, -4957, + 167, 987, -60, 62, 1622, 1207, -69, 338, +-16133, -46, 1018, -1460, -821, -646, 1316, 126, + -4631, -842, -1505, 15833, -6404, -4514, 2946, 2923, + 1198, -3141, -3109, -1613, 1853, -906, -436, -1110, + -282, -214, -3424, -3141, -3988, 284, 22262, 1269, + 1787, -1116, -1429, 1017, 371, -187, -825, 534, + 350, 1088, 26, 176, 8914, 6662, 935, 2074, + -7986, -4780, 2194, 1796, 697, -4040, 2486, 1700, + 9150, -37, -1560, 2449, -162, 128, -7469, -2690, + -281, -4698, 424, 535, 1416, 243, -575, -1160, + 326, -2417, 808, -15816, 994, -302, 26, 894, + -7376, 395, -586, 823, -1341, 972, 100, 241, + 743, 470, 267, -550, 474, 182, 18252, 178, + -182, -7, 3496, 2132, 863, -151, 741, -2158, + -763, -652, -503, -434, -736, 770, -156, -19071, + 443, -354, -243, 66, 4258, 6714, 3577, 17338, + 556, -3570, 1269, -1406, 1668, -349, -90, 781, + 82, 558, 936, -788, -1072, -21, -6472, -3022, + -475, -6997, -2816, -3774, 1683, -13950, 3482, -1872, + 2624, 1064, -318, 1300, -1214, 179, -11, -124, + 4560, -2827, -6314, -5736, 1159, 1309, -5462, -11652, + 4192, 151, -543, -3484, -2288, -119, 745, 1373, + -121, -629, 5204, 7650, -2062, -3370, -2894, -338, + -1361, 1080, -3674, 12852, -6119, -1578, -736, -241, + -1564, -109, -441, 335, 416, 1678, 4802, -3239, + 6182, 154, -3656, -1337, -17027, 1707, -381, -1704, + -377, 1022, -592, 983, -321, 37, -1846, -4500, + 2575, 14162, -560, 9385, 4179, -1340, -3466, 3235, + 1727, 1545, -23, 636, 280, -39, 871, 173, + -8915, -2427, 2146, -3698, -12153, -3773, -3873, 5042, + 112, 788, -1139, 245, 546, 278, -8, -1005, + 443, -76, -1256, 8255, 3841, 6116, 4226, 3705, + -1278, -6470, 5220, 5892, -3468, 2736, 5427, -3336, + -264, 1906, 294, -60, -7078, 7699, -9792, -7108, + -2030, 1055, -6962, 702, -2074, -232, 127, -430, + 658, -272, 757, 138, 159, -340, -4606, 1021, + 146, -7690, 6001, 5660, 3363, -367, 13222, -441, + 13, -874, 668, 2293, 875, 1238, 110, 778, + 1434, -976, 2151, -8169, 1421, 2622, 206, -795, + -816, -14443, -1583, 3356, 2971, -964, -321, -841, + -404, 111, -5595, 4248, -3819, 214, -2520, -712, + -1505, 849, 947, -876, 188, 3221, 863, 105, +-17336, 1818, 14, 17, -6349, 379, 4746, -12405, + -560, -3448, 3664, 8251, 845, 383, 1348, -739, + -780, 1695, 4828, -123, -647, 823, 9940, -183, + -1804, -7112, -161, 578, -619, 11534, 3214, 1586, + 4784, -2540, 1188, -304, -485, -648, -824, -595, + -8817, 4138, 927, -3259, -198, 4022, 2213, -1627, + 645, 14602, -1058, 1481, -1670, -113, 564, -710, + -451, -360, -1261, 2504, 247, 5566, -7262, 1344, + -5106, -1608, 1946, -4240, -7393, 10440, 3306, 1940, + -999, 155, 832, 55, 10218, 11475, -3252, -8295, + 1347, 2405, 3421, -2619, 2262, -2829, 754, -307, + 548, -2040, -1130, 317, 170, 292, 248, 2601, +-18930, -1942, 1417, 1678, 3310, -2578, -1969, 1550, + 3010, 70, 8, 3064, -848, 504, -172, 180, + 1787, -1133, 2427, 1002, -664, -40, 192, -23400, + -1004, 513, -818, -382, 360, 360, 268, 98, + -202, -192, -668, -12924, -11702, 7325, 797, 1937, + 674, -2458, -541, -1497, -1673, -955, -356, -486, + 182, 299, -46, 65, -4232, 1418, 6532, 2356, + -4894, 4870, 3369, -4585, 8743, 1497, -1451, 862, + -8612, -1718, 1716, -2389, 371, 592, 7397, -3188, + -649, 126, -1300, 1374, -1292, 645, -1494, 2736, + -1468, -1808, -17223, -352, 111, -222, -236, 171, + -198, -7994, -3822, 5324, -16856, -517, 119, 314, + -360, -515, 435, 520, -638, 1635, 420, 1191, + 830, 710, 6897, 2925, 3091, 510, 3268, -1702, +-16186, 718, -3127, -463, 763, -1035, 725, -122, + 646, 172, -164, -277, 5853, -7074, -10, -1770, + -2544, 5978, -874, -494, -232, 14465, 1815, -1902, + 987, -1533, 1216, 741, 620, 161, 4414, 4184, + -32, -2944, -4619, -462, 15701, -1026, -140, -2396, + -1747, -538, -1024, 219, 854, -351, 860, -226, + -4390, 732, -2003, -2430, -540, 592, 1622, 1180, + 385, -2052, 4050, 17401, -650, -243, 1709, 1261, + 95, -307, -5110, -666, -7094, -533, -1293, -17357, + 2929, 2389, -119, -413, 317, -962, 709, -1552, + 26, 175, 700, -570, 20120, 1107, 232, 169, + -889, -533, -1276, 22, 959, 866, -954, -792, + 873, -172, 1757, 195, 148, 423, 4490, 8782, + 631, 682, 1832, -3728, -1742, -11130, -1201, 1776, + 9268, -586, -1358, -646, 626, -866, 5, 263, + 3950, -760, -2914, -12751, -12669, 1513, -4, 631, + 1835, 312, -167, 1546, -532, 619, 1176, 1436, + -116, 312, 7054, 3120, 4075, -1320, 715, -206, + -1572, 1350, 17688, -1182, -1568, 680, 6, 207, + 1010, 600, -766, 554, -1483, 644, -8810, 624, + 148, -4015, -1536, -1863, 92, 730, -14806, 386, + -5174, -1420, -331, -254, -104, 275, -7268, 2563, + 11983, -65, 8043, -1623, -2589, -2610, 1328, 3154, + 1935, 3672, -1761, 4984, 661, 209, -1038, 122, + -1019, -28948, 55, 358, -539, 488, 55, 618, + 20, -314, 446, -1016, 618, -93, -94, -331, + -36, 194, -1706, 6628, 396, -146, -765, 10500, + 2619, -82, -10894, -3908, -888, -192, 620, 163, + 78, 774, -293, -104, -4826, -14066, -1883, -3258, + -4577, -1484, 5412, -4274, -4951, 3316, -907, 1948, + -1187, -404, 3654, 400, -70, 459, -3224, -3194, + 2338, 4390, -5, -3167, 3273, 116, -1026, -1668, + 3767, 272, -16662, 137, -1634, -1007, 220, -310, + 982, 8220, -16, -1251, -2644, -3344, 2236, -1573, + 8174, 612, 1142, -10799, 393, -707, 4804, 397, + 1232, -292, 5762, -15608, 2921, -6440, 3544, -2395, + -504, 1890, 172, -1010, 178, 380, -1163, 404, + -1230, 1034, -596, 105, -2038, 1991, 5613, -312, + -4156, -10205, 3092, -4704, -6101, -1620, -1037, -1130, + 1590, 8321, -797, 247, 954, -103, 3838, 2330, + 10064, 3197, -8508, 1300, -1012, -6607, -3861, 5651, + 31, -475, 1582, -1370, 1107, 2164, 743, -567, + 4842, -2930, 3191, -190, -2230, -47, 254, 2147, + 591, -512, 1312, 1159, 811, 1444, -1312, -257, + 16016, 789, -2562, 3983, -373, -9255, 302, -3655, + 5750, -3856, -6941, 3934, -2314, 5556, -4099, -265, + -479, -4843, -130, 20, -4859, 3083, 6482, -3738, + -3936, 590, -6368, -1784, 75, -3903, -6834, -4452, + -871, 764, -1118, 8731, 38, -148, -3368, -6330, + -370, 2234, 907, -2809, -1458, -2306, -402, 2679, + -1222, 1138, 192, -1317, 1012, 15514, 624, 279, + -4032, 2565, 6162, -938, 5760, 1685, 4350, 2939, + -825, -331, 1840, -556, 427, -4642, -23, 8346, + 7577, -467, 3848, 454, -3962, 373, -116, 2314, + 4868, -208, -1367, -1803, 2681, 806, -4279, 3348, + -528, 14027, -238, -457, -2764, 832, -4680, 4354, + 1219, -801, 2414, -5204, -3768, -6524, 5163, -10909, + 1656, 321, 3260, -1773, 214, -135, -4563, 5206, + -4794, 1486, 406, -1026, 281, 1799, -218, 320, + -908, 872, 1056, 2955, -208, -799, 15492, 334 +}, + +.cb4440s1 = { + 27498, -414, -266, 646, 229, 94, -15, 302, + -489, -401, 125, 752, -476, -200, -976, 195, + 4, -402, 2220, 1012, 1731, 2530, -652, -21380, + -679, -867, -195, -114, 1326, 2531, -348, -185, + -114, 178, -694, -298, 8752, 1735, 2640, -2374, + 6191, 1516, 5771, 6705, -253, -8502, 986, 2134, + -1854, 3490, -678, -48, 133, 844, -1635, 1630, + 6056, -756, -1109, 1563, -1445, -139, 580, -1448, +-18675, 846, -390, -259, 1548, -324, 281, 142, + 1792, 1211, 1328, -4308, -1032, -5412, 4742, -201, + -47, -297, -8403, 9715, 7268, -3756, 1573, 677, + -88, -145, 4877, 12946, 3264, 1809, 7230, -2583, + 1627, -1786, -7113, -1480, -2111, -508, 415, 1664, + -483, -538, -249, 80, 7005, -2562, -887, 3801, + 6411, 2222, 36, 875, -5089, 10897, 4014, 4948, + -1580, 1425, -1814, -391, -96, 322, -6484, 1896, + -7790, -950, -4235, -8362, 3118, 4843, 3754, 1070, + -1648, 7692, -1675, 3405, 918, 2270, 573, 193, + 6024, 8912, -4905, -1810, 985, 1877, 2158, -2150, + -386, 3908, 2030, 419, -12599, -570, -150, 1580, + 36, -152, 2, -538, -1565, 6809, -715, -6266, +-12725, -6718, 810, -603, 1547, 1001, 2250, 810, + 1773, -672, 327, 246, 6414, -7511, 916, -327, + 830, 11862, 4373, 1003, 6370, -1730, -2127, 613, + 1627, 626, 763, -864, 207, -233, 3738, -8644, + -1634, -2050, 3906, -451, 12986, -4828, -2973, -4714, + 545, 822, 735, -3539, -256, 65, -93, -94, + 2923, 7075, -3763, 6172, -9544, -2675, -3833, 930, + 418, -4496, 3790, 386, -7797, 234, -609, -259, + 454, 330, 1546, -7634, -1966, 515, -2496, 374, + 2633, -3014, 4126, 9920, -7103, 1441, -150, 7695, + 670, -48, -41, -512, -6849, -1785, 3755, 1860, + 2418, -2346, -1194, -1574, 15510, 444, -1515, 585, + 742, -199, -1115, -122, -11, 140, -7763, 1438, + -317, -444, -17149, -24, 2685, -856, -3166, 1109, + 308, 233, 30, 63, 530, 645, 84, 133, + 6139, -1183, -10673, -12790, -112, -1544, 4623, 576, + -804, 1023, -1646, 1192, 269, 2681, 44, -909, + -14, -414, 48, -4002, 4768, 3440, 3252, 1441, + 101, 372, 3166, -1398, 325, 16184, -711, 486, + 1328, 114, -450, -31, 1152, 2154, -69, -252, + 32, 922, 219, -2055, 421, -1377, 1006, -614, + 234, -40, -84, 204, 27171, 182, 1034, 1536, + 834, -8038, 1243, -3074, -7829, 11165, -1854, -1173, + -871, 4105, 3588, -3191, 188, -2102, 124, -166, + 8070, -11066, 6632, 2739, -7787, 184, -5872, 1360, + -1089, 1273, 84, -1683, -1584, 975, -206, 1160, + 180, 12, -6121, 5436, -14726, 5949, -6756, 834, + 1750, -3142, -878, 7, -220, -1933, -141, 160, + 26, 756, -800, 6, -8104, -6989, 3353, -3518, + 4510, -12430, 736, -2685, -1042, 32, 1184, -519, + -312, -1073, -402, 71, -422, -35, 1791, 12735, + -2281, 2623, -1502, -3878, 6727, 10541, -1110, 2308, + 870, 1124, 874, -1406, 123, 254, 405, 328, + 3828, -7541, 3096, -14145, -672, -1725, -423, -1918, + 4164, -411, 3094, -568, 3575, -2895, -378, -3065, + -232, 449, 8110, 2264, -1383, -557, -10683, -7628, + 4155, 754, -134, 6759, 1051, -2054, -900, -948, + 579, -1277, 151, 462, 11562, -310, -8260, 10238, + -1309, -3052, 345, -689, -1133, -588, 548, 980, + -1332, 881, 368, 776, -704, 422, 12433, 1314, + -1487, -4753, 2679, 3092, -939, 136, -586, 3504, + -1034, -6318, 3506, 420, 2326, 1034, -252, -398, + -6232, 4488, -6166, -1754, 908, 4884, -5188, -2985, + 10793, -116, 4674, 3980, -9, 805, 1568, -1620, + -88, -146, 3027, -16154, 2899, 7839, 5912, -427, + 270, -1467, -387, -351, 615, -322, -2, -1061, + -654, 56, -438, 132, 2388, 460, 2172, 1874, + -3028, 3302, 2035, -704, -1222, -19835, -472, -1858, + -1686, -286, 5, -748, 491, -350, -4344, 103, + 1473, 2440, 13575, -1350, 1456, 10377, 1962, 3036, + -1238, 1580, 607, 1352, 997, 1212, -489, 251, + 4075, -3457, 6186, 786, 300, -2532, -373, -2522, + 3108, -294, 4938, -2980, 1509, 12450, -695, -1128, + -96, 354, -3678, 8494, 2480, 2264, 5162, 11907, + 4721, 1111, 752, 2999, 3924, -1429, 321, 276, + 309, -603, 601, -62, 3337, -3570, 3273, 6618, + -2001, 950, 532, 972, 1619, 956, 65, -609, + -281, -14769, -438, 580, 230, -228, -10108, 12289, + 8904, 872, -3296, 1535, -384, 477, -913, -777, + 546, 445, -1004, -435, -716, -138, 572, 435, + 4626, -864, -5716, -2810, 1291, -4796, -241, 2527, + -2342, -1360, 4161, 1886, -128, -1521, 13726, 1818, + -554, -157, -9665, 2607, -1013, 579, 1122, 1571, + -2684, 11364, -6464, -184, -1542, -5670, -1091, -670, + 1273, -1051, -7, -278, -2551, -548, -10673, -1434, + -343, 317, -3108, -1615, -2239, -14132, 490, -454, + 2467, 1990, 470, -1072, 440, 290, 3006, -4420, + -2083, 3050, 2779, -2349, -590, -4941, 7464, -9000, + -2686, -2045, -8712, -3281, -2476, 648, -148, 408, + -1367, -1113, 27347, -1113, 739, 39, 1443, -208, + -686, 986, 735, -702, 76, 665, -194, -165, + 366, -606, -4908, -3932, -15941, -2810, 4572, 816, + -2092, 4213, -2492, 4006, 926, 210, -1110, -1635, + -270, -226, -362, -187, 1790, 3016, 2216, 3890, + 2018, -1325, 19784, -771, 356, 2118, -98, -688, + 1016, 978, 559, -39, 160, -310, 6622, -1754, +-11104, 204, -2212, 2370, -11610, 1119, 3216, 3102, + 524, 278, -829, 524, 28, 838, 374, -76, + -4593, -2933, 10697, -6510, -4970, -2025, -9383, -3428, + -4112, 2665, 1459, -1411, 421, 481, 842, -341, + 147, -158, 4108, 45, 4935, -21, -7905, 2058, + 1158, 15260, -567, -752, -992, -1094, -1059, 2370, + 820, 655, -261, 280, -3969, 6342, 8521, 3114, + 369, -12269, 1684, 4, 4686, 1985, -3668, -3040, + 677, -254, 57, -161, -989, -379, 7075, -580, + 2846, -3177, -2285, 958, -7096, -154, -515, -3345, + 13487, 3548, -1804, 290, -430, 726, 399, 54, + -2814, 10235, 1958, -3356, -1330, 536, 3218, -14194, + 200, -796, -862, -1480, 1811, -346, 604, -391, + -231, 513, -10495, -6029, -6492, -8746, -357, -221, + -1890, -2669, 8, -1756, -5812, -1048, 2258, 223, + -474, 1154, -226, 348, -1590, 2915, 158, -24059, + 875, -846, 1150, -1000, -844, -116, -246, -219, + -482, -367, 120, 517, -489, 442, 8148, 5040, + 3770, -1006, -51, -3175, -10278, -4468, 1188, 1497, + -6515, -5, -1628, -2387, -1297, -717, 1630, 232, + -3608, -6688, 2444, -792, -246, 411, 1464, 3661, + 3244, -1121, -1602, -15398, -443, 882, 1412, 926, + 16, -73, 2693, 7168, -9399, 528, 7916, -9270, + -1669, -2756, 1304, 3074, -1510, -2089, 1491, -1556, + -422, -414, 132, -192, 5988, 4500, 7572, -10978, + -4875, 3685, 1888, -660, -1750, -515, -2728, -3133, + -2742, 666, -2861, 626, 256, 243, 4587, -3567, + -288, 2314, 4765, -11036, 7322, 7581, 2651, 3264, + -394, -246, -891, -1464, -1717, 123, -517, -486, + -1019, 7215, 554, 722, -4253, 2393, 3053, 2881, + 1538, -2104, 573, 321, 673, 3902, -2855, 944, +-12816, 370, 3496, 952, -1435, 6379, 766, 2273, + -729, 80, -2432, -1150, 2408, -895, 15497, -1231, + -282, -3306, -435, -167, -3528, -5683, -6413, 2501, + -4825, 124, 3128, -425, -2800, -986, -2283, -495, + -3392, -1560, -2093, -11613, -37, 157, -438, -794, + 1988, -45, 1508, 20, 98, -458, -245, 1130, + 110, -525, -771, 1120, 710, -21758, 174, -210, + -4839, -2468, -648, -4388, -11, 2990, -181, -4790, + -4232, 3634, 6427, 2772, 166, -2996, -12005, 1630, + -249, 179, 856, -1250, -4216, 1993, 5164, 4757, + -5071, 4331, -3029, -1276, -11184, -2864, 1238, 6332, + -2431, 1276, -338, -476, -5659, -2410, 2510, 1853, + -4853, -3175, -1896, 10728, 3724, 960, 9963, 305, + -938, -646, -2760, 1436, 113, -74, -3098, -4090, + 2950, 2701, 992, 206, -1393, -2179, -10862, -2396, + -1008, 2639, -1547, -416, 9264, 1824, -360, 401 +}, + +.cb4440m0 = { +-25793, -238, 1193, -2635, -238, 1315, -2277, 1588, + -896, 512, -864, 611, -398, 1277, -212, -358, + 202, 13250, 16, -860, 1618, -1024, 310, 11560, + -746, -3876, 780, -4087, -475, 857, 1017, -1439, + -890, 155, 8556, 362, -1158, 2116, -291, -66, + -1272, 510, -1394, 2259, -4761, 808, -740, -937, + 13993, 191, 273, -7670, 6776, 846, -1907, 955, +-13206, -1956, 1697, 1670, -329, -244, 2395, 6119, + -802, -1007, 649, -974, 170, -2136, -10780, 1020, + 1270, 1954, 1118, 13348, 983, -1394, -594, -514, + -586, 1026, -1821, 548, -298, 3342, 837, -1395, + 13977, 1021, -7792, -2930, 1466, 5494, -843, 2432, + 1378, -68, 174, 407, 76, -877, 691, -9445, + 522, -3448, 2549, -412, -2358, 875, -5044, -952, +-10113, 6574, -6347, -2760, -662, 29, -227, 4884, + 1304, 411, -3320, 2434, 785, -14822, 4412, 2272, + -6407, 2172, -613, -1665, 296, 742, 624, 135, + 5316, -3191, -855, -2061, 485, -3188, 2998, 1382, + 2516, -2438, -3506, -238, 737, -629, 1001, 773, + 17540, 1478, -724, -764, -1231, -1254, -1582, -692, + -351, -1551, -171, 183, 38, -668, 756, -770, + 24344, -905, -7182, 502, -3766, -1690, 1588, 1522, + 1844, 1276, 1458, -777, 1731, 4856, -14860, -1097, + 36, -1310, 846, -1500, 521, -3669, -252, 4480, + -2602, -845, 597, -4512, 1062, -292, -18518, 1972, + -334, -80, -1256, -366, 3640, -436, -12, -1670, + -435, 1496, 1429, -11092, 1012, -936, -1224, -12240, + -3048, 210, 1905, -1197, -357, -9759, -2632, -332, + -3417, 15078, 1496, 2206, 1800, 205, 1384, 3546, + -1853, 755, 1016, 726, 58, -150, -13053, 10375, + -2589, -330, 1616, 3081, 2763, -2617, -1204, 324, + -53, 2968, 1485, 214, 124, -334, -237, 16784, + 2612, 1023, -4298, -2156, 4336, -4307, 4952, 1036, + 81, -762, 3416, 714, -187, -4100, -757, 1124, + 10224, 7059, 424, -316, 1281, -12262, 912, -1999, + 2, -731, -184, 879, -934, -202, -391, -1046, + -338, -101, -17511, -1712, -5580, -2327, -2478, 1770, + -5825, 1499, 578, -130, 1424, -1818, 110, 542, + 22, 988, -4227, 2836, -1447, 1170, 12335, 2179, +-11216, -2500, 64, -912, -954, 654, -802, -455, + -597, 234, -296, 811, 1083, 1848, 4148, 637, + -6608, -2362, -3382, -664, -13088, 2839, 3090, 3294, + -4554, 2518, -55, 837, 1392, 5905, 1287, -1484, + 965, 16533, -3507, -1903, -1562, 2408, 5037, -4816, + 1409, 361, -1890, 170, -610, -1755, -524, -867, + -6238, -20117, -745, -956, -176, 2998, 130, -668, + -843, -267, -364, -573, 495, 127, -66, 32767, + 271, -408, 654, -123, 1831, 151, 996, 82, + 628, -251, 144, 198, -88, 357, 37, 612, + 184, 238, -584, -52, -30025, -415, 404, -566, + 100, 659, -336, 877, 211, -730, -377, 184, + -5256, -1484, -1191, -2108, 24, -7821, 209, -2856, + -1844, 697, 5798, -1191, 427, 11858, 1000, -261, + 184, -686, 1182, -3142, -3138, 139, 144, 117, + 3658, -3566, -1562, 672, 2036, 15051, -5069, -551, + 529, 1696, -214, -2678, -5966, -3707, 2847, -2554, + -1760, -1196, 2088, 6372, 1778, 12935, 2189, 1992, + 1761, 578, -542, -753, -1182, 4321, 1871, 309, + 704, -1259, 884, 19136, -2665, 1096, 3048, -167, + 872, -344, -1092, 464, 3255, -86, 1608, -1062, + -1569, -1699, 4504, -274, 568, 1428, 20571, 1452, + -894, -791, 459, -882, -1048, -2944, -11095, -783, + -832, -2450, 650, 2784, 3156, 529, 457, 483, +-12553, 655, 686, -757, 929, 212, 1242, -201, + -1627, 4826, -1895, 997, -3225, 84, 80, 287, + -2136, 405, -188, -890, -18272, -511, -118, -3642, + -1018, 420, 12650, -474, -540, 6978, 6977, 4418, + 1162, -1332, -1112, -1765, 2640, 562, -1164, 1256, + 595, 567, -483, -31511, -960, -816, 756, 1505, + 12, -518, 234, 184, 679, 328, -600, -137, + 267, -440, 2540, 593, 1023, -11756, 626, -2034, + 5756, -9882, 3175, -1190, 1628, 3920, 3219, 1394, + 834, -140, 4036, 4722, -455, 3105, -1355, -3106, + 1000, 7806, -2227, 687, -1580, 3180, -12302, -1394, + -425, 488, -187, -36, 219, 158, 12006, 1683, + 2151, -2, -1110, -12250, -59, 672, 1844, 2084, + -2101, 1652, -783, 634, -13257, -339, 3932, 2260, +-12452, 152, 316, -688, 79, -912, -2081, 1384, + 188, 1942, -706, 204, 700, 1776, 13901, -13666, + -324, 472, 1055, -646, 82, -769, -877, -443, + -227, -900, 636, -870, 470, -112, -598, -4402, + -2726, 1775, -216, -43, -18675, -863, -4604, 3433, + 674, -155, 208, 1546, 294, -157, -616, 11070, + 1229, -528, 2124, 699, 3624, 54, -516, 194, +-13556, 1902, -506, -1317, 1916, 471, -342, 836, + 18, 906, 614, -8, -951, 1052, -97, 2212, + -924, 310, 6, -733, 122, 23731, 468, 345, + 1545, 1434, 611, 403, -3136, -2214, -54, 1023, + -1390, -5243, -3744, -258, 6871, -1778, 673, -2362, +-13007, -776, -974, -1077, 8386, -3978, -4325, 1236, + 4011, 1161, -263, 1224, -12957, -100, 2801, 1458, + -3081, 578, 17, 1037, -742, 5972, -632, 2904, +-12721, -6733, -478, 182, -1973, -820, -6911, -4904, + -942, -348, -353, -350, 7864, 34, 568, 1985, + 956, 3310, 118, -2067, 12600, 9063, 1609, -1261, + 296, -1248, -1656, -65, 1832, 1525, 1503, 5149, + 4370, -1638, -3868, 320, 1527, -424, 17676, 1780, + 1172, -1132, 1128, 1294, -322, -101, 462, -6668, + -3024, 7573, -11088, 1581, 13, -1398, 550, 4376, + 1623, 1727, 857, -5310, 2528, -529, -401, 539, + 6508, 4246, 4105, -5363, 96, -13407, -694, 5061, + 3445, -3283, -348, -1470, 1114, 602, -404, -129, + 642, 1547, 23110, -2255, 1969, 333, 1297, 116, + -1691, 364, -528, 758, -1239, -1826, -249, -395, + 684, -856, -638, -10000, -2773, -6151, -1244, -3138, + -9688, -1994, 7124, 1368, -1870, -312, 1863, -1006, + 963, 789, 743, -4158, -760, 1384, -7525, -959, + -262, 5752, 4005, -12037, -210, 886, -1961, 4895, + -251, -158, 212, 677, 518, 342, -226, -360, + 466, 17, 28392, -20, 246, -686, -258, 640, + -378, -120, -443, 1078, -2612, 2084, -1706, 4334, + -4675, -4634, 2336, -9998, 9975, -1285, 2778, 3292, + -1717, 138, 2114, -1120, -180, -1146, 11988, 829, + -2530, -8827, 6833, -1191, -1653, 2691, -4067, 1166, + 1971, 303, -544, -1459, -261, 1065, 3410, 2050, + 3163, -515, 5456, -4261, 5483, 1531, -2098, 2020, + 3773, 588, 915, 158, -11876, 282, -1180, 265, + 11036, -66, -1741, -1894, -4234, 3048, 218, -1030, + 2240, -12666, -2290, -1673, -1911, 1480, 287, -81, + 1182, 216, -10734, 2201, -58, -619, 8585, -574, + -4576, 1852, -468, -6759, -7667, 167, 995, -1114, + -1276, -2053, 2178, -8133, -1270, -7822, -10582, 5380, + 3037, 1071, 827, 4972, 1024, -129, -180, -3002, + -846, -736, 9587, 1890, 10287, -1954, 1042, 1558, + -950, 2406, -1852, 2275, 6694, -703, -910, 3854, + 812, 521, -1075, -761, 5357, -3911, 3892, 7944, + 4580, 5031, 1088, 7116, -1746, -5223, 2607, 3227, + 2296, 5603, 211, -731, 6450, -3312, -12378, -326, + 4245, 4168, -799, -3563, -505, 725, -5297, 2196, + 2221, -16, -3472, 315, 626, -6131, 71, 920, + -4383, -1340, -2675, -664, 7412, -1240, -1361, 997, + -3817, -2377, -11717, 1661, 22, 540, -5261, -950, + 7472, 3148, 7647, -4400, 4558, -4412, -869, -1528, + -2618, 8311, 2110, 534, -460, -223, -162, -828, + 274, 1844, 1861, -1583, 6899, 5222, -1772, -2880, + -6400, 4703, 2606, -3990, -1224, -4160, 9032, -299 +}, + +.cb4440m1 = { + 32767, 383, 857, -1579, -423, 1164, -1606, 1218, + -410, 777, -292, 122, 282, -74, -1394, 259, + -734, 102, -82, 32616, 427, -545, -146, -141, + 340, 506, -808, 171, -778, 900, -204, -277, + -228, -426, 566, -481, -1138, -907, 112, 2722, + 871, 115, -7202, 1953, -826, -1812, -396, -14722, + -840, 155, 1114, 5624, 1112, -147, -6383, 926, + 1505, 360, 937, -13391, 969, 7062, 2218, -3531, + 471, 458, 191, -465, 8664, -1168, 546, 2109, + -944, -74, 1644, -81, -760, -1920, 2659, 13330, + 1511, -1148, 1346, 796, -20, -15616, 1246, -1190, +-10882, -774, -70, 3643, -896, 1830, -192, 1018, + 1085, -95, -309, 659, 91, 727, -4486, 486, + -2078, 1235, -14415, -4053, -1619, -2589, -582, -4650, + 4076, -762, -1111, 277, 1448, -742, -314, -979, + 1889, 2679, -1972, 2480, 302, 2869, -9183, -445, + -1817, 12894, 106, 187, -1406, -615, -1174, 746, + -371, 382, 350, -1811, -527, 36, 500, -835, + -106, 1134, -2207, 1021, 348, 908, -21780, 448, + 688, -60, -1790, 1901, -22990, 1467, 596, -912, + -3190, 1484, 269, -409, -474, -1670, 1328, 152, + -402, 359, -734, -13208, 62, -4197, -6242, 5195, + -2841, 5030, 2794, 1264, -1130, 3821, 961, 729, + 1075, 49, -148, 7267, 2596, -5093, -8284, -6875, + -3059, 3909, -4635, 1402, -6334, -342, -3083, -861, + 490, 1257, -630, 128, 2240, 832, 1060, -1802, + -1652, 128, 7816, -14391, -6722, -3328, -2586, 3044, + 1088, 1577, 852, -142, -176, 1371, 1236, 976, + 12165, -1596, -199, -504, -11020, -582, 972, -1468, + -2402, -666, -3327, -2148, 1078, -194, 9675, -2102, + -1236, -70, -942, 291, 1364, 1403, -3362, 12963, + -375, -1728, 1615, -2354, 633, -506, -194, 13037, + 14172, 534, -1026, -425, 2488, -180, -678, -436, + 272, 1507, -334, 840, -1000, -1068, 1029, -306, + 24, -4435, -5994, -1307, 4251, 3968, 2527, -981, + -2626, -4400, -242, -1823, -679, 12831, -22, 51, + -381, 2422, -2376, -8156, -1477, -6974, 1102, -373, + 467, 11314, -554, -432, 824, 7277, 393, -178, + 179, -653, 11848, -1593, 14143, -731, -1036, -2322, + 261, -1992, -1152, -1430, -1354, -51, -285, -1637, + 144, -59, -2182, 5731, 538, -880, 397, 3010, + 707, -1822, -1006, 4686, -5096, 4246, -3096, -3997, + -254, -11025, 394, -345, 18780, -686, -517, -3422, + 104, -2173, 2439, -5400, -10, 1084, 1821, -602, + 1431, 405, 2143, 499, 405, 351, -62, -47, + 1954, -29915, 440, 1054, 559, -1210, 442, 928, + -1, 59, 279, -112, -110, -440, -396, 805, + 311, 858, -431, -1070, -30192, 135, 1246, -345, + 790, 498, 319, -302, -469, -10, 512, -829, + -526, -2052, 2456, 134, -19375, -1210, -1292, 640, + 3232, 2580, 973, -2412, 271, -282, 632, -523, + -847, -138, -990, 2501, 536, -166, 2100, -357, + 122, 466, -4, 2034, 20083, 1578, 444, -344, + -689, 5733, -456, -503, -592, -1350, -1038, 932, + -1916, 1098, -990, -22687, 1544, -442, -396, -570, + -683, -616, -1431, 118, 4113, -312, 2300, 2093, + -2344, -2955, 6343, 4306, -10078, 6286, -5794, -806, + 664, -217, 548, 5072, 4626, -1643, -11619, 779, + 1956, -2960, 614, 2087, 9104, -2418, 775, -4447, + 768, 1599, -1084, 999, 1652, 1090, 630, -1197, + -3495, -912, -9817, 648, 3278, 1828, 13605, 2757, + -831, -1191, -1846, -1441, -278, -8530, -455, -495, + 323, -911, 2500, 14100, 3635, 1016, -936, 5265, + -3092, 2125, -121, -64, -656, -337, 9438, -7600, + 1403, -11917, 2180, 2612, 1664, 1091, -318, -3300, + -427, 282, 1979, 894, -703, 514, 160, 1697, + 6508, 828, 187, -34, -1094, -2861, 240, -5013, + 6004, -4796, -991, 158, 11437, -1730, 354, 1195, + 3790, -10432, -3584, 13872, 336, 2043, 221, 604, + 2930, 1080, -1417, 1878, -878, -459, -419, 364, + -1037, 7764, 3100, 48, 11057, 1936, 2229, 9150, + -472, 1178, -129, 2876, -249, -258, -1181, -329, + -581, -1140, -1967, 347, -539, -394, 775, -1151, + -31, 1052, -1900, -213, -1552, 22484, 164, -113, + 135, -1294, 550, 7738, -7223, -739, 1362, 5518, + 193, -2170, -11861, -1357, 351, 2215, 165, 16, + -606, 727, -158, -772, -13420, -1248, 12422, -812, + 1768, -442, 1269, -1076, 899, 124, -249, -1110, + 653, -3064, -1632, 839, -230, 512, 642, 13230, + 13285, -552, -1113, -595, 864, 537, -1012, -539, + -615, -491, 1014, 800, -10, 534, -1227, -25011, + 1239, -26, 3834, 104, 762, 1259, 2112, -300, + -920, -812, 612, -1061, -378, -246, -7, 11042, +-18492, -1411, -77, 407, -556, 218, 1751, 1069, + -294, 1789, 904, 285, -76, 300, -160, -128, + -3398, -2001, 1689, 4946, -2750, 1427, -12632, -1873, + -1802, -1115, -2777, -4436, 2937, -6408, -467, 487, + 1043, 3914, -81, 1540, -11718, 1368, -12656, -583, + 1009, -416, 249, 1874, 1157, 994, -858, -154, + 294, 333, -26, 73, -1576, -20, -560, -1068, + 1325, -588, 26161, 1580, -411, -587, -1083, -79, + 762, 292, -622, 788, 284, 2014, 78, 554, + -516, 1340, 835, 300, -24827, 558, -705, -22, + 139, -159, -246, -585, 4318, 234, 1308, -198, + -3370, 5724, 2381, 13843, 4, 569, 8002, 1188, + -63, -1698, 4624, -405, -218, 4238, -888, -1180, + 3750, -4848, -9497, 293, -1087, -13274, -33, -2870, + 457, -618, 338, -34, 286, 345, -5321, 904, + -5656, -2082, 12644, -7423, 532, 958, -1997, -1483, + -2982, 3115, -1851, -2025, 1853, -918, -903, 1554, + 540, -16549, 1441, 2939, -1272, 3106, 2374, 3906, + -697, 1144, 750, -379, -6502, 980, 386, 36, + 1109, 1195, 6272, 4264, 1501, 5369, -1560, 3535, + 1084, 739, -1031, -4400, 8452, -430, -1787, -7669, + -231, -115, 4324, -1820, -2098, -786, 7478, -2709, +-14255, 5771, 115, -1700, -111, -1482, -1369, -112, + 122, -472, 233, 2427, 1816, 180, -481, 928, + 82, 84, -700, -448, -946, 1968, 1644, 168, + -167, 16164, 155, -10316, 941, -584, 488, 96, + 5205, 491, -1844, -13055, 1266, -352, -836, 558, + 1546, -1720, 313, 2033, 597, -14351, 4426, 3281, + -559, 2614, 3248, -2265, -10312, -1614, -288, 480, + 1419, -546, -485, 835, 960, 462, 923, 6518, + 834, -711, -12639, 8811, -207, 1806, 337, -1240, + -4796, 2383, 277, 1141, 969, 59, 197, 1365, + -614, -9144, 4824, -436, 4191, -2588, 4509, 391, + -5055, -3231, 6978, -6388, 51, 105, -863, 1050, + 13103, 12769, -420, -1562, -123, 2702, 292, 1061, + 123, 405, 1917, -275, 493, -95, -195, 130, + -2613, 9010, 196, -1382, 5903, 7281, 1585, 2557, + -876, 3166, 6910, 590, -3060, -559, 4722, 393, + 613, -392, -3022, 9892, 1808, 923, 8123, 9873, + -1665, 2349, 2894, 591, 2000, -3734, -917, 220, + 408, 296, -656, 2608, -1700, 400, -10734, 5434, + 6504, -1399, 2175, -1203, -6358, -1221, -5062, 45, + 970, -500, -1322, 1176, 5882, -11687, 6324, -2183, + 2327, 922, -5628, -3507, 2406, 874, 1399, 4518, + -343, 857, -224, 802, -725, -8561, 4432, 1974, + 1825, -2168, -451, -3408, 6587, 7589, 3361, -4711, + -1474, 3151, 1950, 1022, 1466, 9192, 4666, -822, + 1024, 2342, -2220, 1169, 10460, 2993, -988, -4407, + -6727, 902, 1659, 80, 106, 400, 34, 1746, + -6982, 10484, 6333, -845, -3333, 1764, 217, -4730, + -3306, -3664, -2830, 2254, -927, -55, 587, 1812, + 281, 4375, -3614, -1349, 1802, -6184, -2648, -4189, + -9381, -3243, -4147, 384, 2241, 5524, -478, -1534 +}, + +.cb4448l0 = { +-15402, -5156, -1798, -144, -4711, -4700, 2819, -389, + 148, -2600, 1706, -1906, -578, 495, 24, 829, + -383, -12581, 11667, -1039, 1395, 2670, -288, 23, + 628, -248, -512, 79, -326, -5428, -2830, -2476, + -1253, -915, 12042, -674, -110, 2950, 3885, -5799, + 983, 616, -652, -60, -372, 22, -141, -167, + 98, 125, -100, 27211, 133, -127, -271, -272, + -176, 1268, 173, -422, 2431, -3998, -2797, 2328, + 182, 6526, 3318, -6282, -10580, 3966, 8504, 527, + 9507, 6203, 990, -989, 6030, -136, 647, -1100, + -324, -2618, -2499, 500, -132, -842, 1237, 3599, + 2285, 2906, 10766, 11284, -2794, 242, 184, -1934, + 55, -839, -1181, 406, 855, 902, 10490, -327, + -1561, 5742, 428, 2218, 1523, 5229, 9130, -760, + 108, -140, 22229, 1132, 411, 720, 414, -356, + -745, -1276, -899, -562, 369, 5, -7770, 4101, + 3626, 126, -13, -4356, 728, -3197, 1930, -1470, + -6936, -410, 6720, 1897, -530, -4267, -2181, -876, + -472, -2540, -10234, 4008, 10217, -2561, -2021, 716, + -1378, -325, 427, -245, 314, -48, -118, -150, +-30295, -368, 256, 369, -656, -78, -246, -140, + -1250, -635, 1332, -13604, -10383, -1375, 353, 2417, + 2140, -349, 1460, -51, -309, 523, 509, 2352, + 1208, -377, -2023, 9708, 397, 1216, 10610, -4416, + 5520, 3902, -2119, -480, -420, 1170, 36, -3304, + 1550, -266, 1682, -808, 2420, 2700, 16239, 3910, + 572, -375, 85, -9775, -120, 2214, 2779, 11510, + 2628, -416, -1740, -1305, 1226, 78, 78, 635, + 422, -13892, 1302, -4117, -1218, 2681, -8436, -1723, + 2290, 2815, 1172, -181, -675, -475, -763, 2394, + -3639, 7903, -659, 2323, 4837, -6758, 9460, -1480, + -2403, -2783, 1496, 806, -458, -246, 12, -254, + 121, 1477, -633, -513, 791, 208, -390, -177, + -1292, -20471, -4401, -2678, 9026, 128, -265, 822, + 260, 11202, 3132, -1879, -3891, 1884, -842, -107, + 7516, 1208, -1552, -995, 1203, 2150, 11044, 1285, + 2282, 80, 1348, 5342, 2089, 924, 1472, -1454, + -8259, -226, -10259, -2335, -2442, 224, 3257, -1528, + 6685, 1630, 1969, 48, 4802, 6051, 987, 8662, + -2368, -4984, -1974, -4049, -5320, 5003, 299, -400, + 727, 208, -187, 2838, -4547, 9682, -2238, 1065, + -3206, 10091, 4915, 2945, -1635, -198, 1074, -698, + -716, -96, 1390, -2644, 1006, -4154, 10587, 1132, + 2912, -7399, -8350, 785, 156, -290, -142, -374, + -2161, 1066, 1358, -1798, 3050, -19, 452, 10470, +-10948, 4190, -984, -2089, -728, 1503, 4273, 812, + 4950, -3750, 844, -1231, -1582, -2517, 2385, -10537, + 5807, -4621, 332, -357, -12484, 1676, 160, 10762, + -1225, -1374, 14, -1389, -2900, -467, -1260, 459, + -861, 102, 1715, 4295, -7324, -7400, 10435, 287, + 1866, 765, 1730, 3430, -744, -2, -1773, -96, + 2001, 2165, 118, 9296, -4640, -4612, 7134, 5128, + -7967, 404, -433, -433, 2222, -8050, 2023, 2766, + -260, -2440, 1607, 2442, 7763, -486, 3766, 2355, + 7515, 230, 1248, -8873, -8224, -9135, -1402, -1812, + 1223, 152, -2316, -739, -405, -784, -598, 625, + 503, -175, -573, -31693, 502, -478, -554, -934, + 387, -80, -484, -701, -34, -51, -494, -1461, + 1005, 2920, 11532, 2667, -1674, -832, 8680, -5767, + 786, -1558, -2062, 1009, -392, 2099, -7277, -2587, + 6302, 3070, 4496, -1713, -4042, -8109, 1642, -1894, + 3450, 840, 3632, 160, 578, 149, 767, 754, + 208, -870, -672, 252, -30, -213, -482, 50, + -578, -2, -148, 246, -31918, -568, 130, 472, + 761, -27, -51, 454, 144, 124, 5844, -8354, + 9562, -3755, -262, 3286, 1120, 983, -628, -734, + -1732, -1424, 353, -403, 15877, -13552, -335, 337, + 519, 140, 297, 150, 725, -780, 876, -116, + -91, -128, 275, 2499, 9313, -768, -10469, 1148, + 2172, -6417, 3292, -2187, -1108, 3055, 1105, 625, + 794, 68, 337, 1384, -106, -516, 574, 868, + 849, -997, 81, 25796, 28, 206, -3556, -351, + 1058, 1126, -7826, 5310, -4102, 5352, -6835, -4032, + 1487, 230, 5617, 937, 10484, -71, 2653, 1203, + -1, 667, -1489, -10136, 7782, -763, 792, 1434, + -170, 367, 96, -21992, -252, 756, 145, -1476, + 1408, 1523, -819, -576, -476, -1068, -241, -39, + 1547, 9553, -622, -1799, 1861, 6115, -864, 10690, + -586, 470, 200, 1162, 586, 44, -11650, 3453, + 8734, -2754, -178, 236, -2650, 2654, 2699, 1180, + 5325, -458, -40, -218, -6, 126, 6794, 506, + 860, 11863, 652, 1665, -4213, 4863, 1424, 5712, + -663, -688, -10, -1421, -676, -1325, -378, -311, + -490, 19501, 1242, 268, 4581, 1587, -1153, 848, + -1378, -1159, 505, 63, 704, 1942, 2204, -2106, + 44, 479, -1098, 333, -21595, -617, -6444, 3547, + 1282, -1784, 4664, -1330, 2607, 1241, -3579, 247, + -875, 11359, -3013, -136, -12813, -14400, 1857, -998, + 1342, 1187, -338, 1263, 575, 1226, -995, 596, + 446, 293, 767, -356, 70, 786, 466, 202, + 149, 849, -28991, 652, 124, -209, -124, -406, + -5463, -1413, -1300, -5339, -1761, 4770, 2680, -10542, + 3486, 5601, 2932, 1581, 489, 521, -16583, 1, + -1529, 5942, 1234, 4714, -1647, 1150, 2802, 642, + 586, 3836, 240, 307, -490, 67, 771, 816, + -906, 1554, 1090, -2353, -629, 11291, 2941, -2982, + 9473, 1434, -4351, -8017, -5173, 8071, 1931, 1281, + -4055, -3224, -1918, -271, -204, 670, 3491, 107, +-31624, 227, 75, -91, 108, 171, -53, -201, + 373, 63, 118, 126, -104, 127, -88, 1810, + 11688, -10240, 550, 3692, -4978, -1619, 40, 911, + -1080, 580, -767, 333, 192, 403, 308, -904, + 142, 31169, 503, -1101, -146, -144, 35, 181, + -355, 54, 590, 499, 95, -1767, 444, -49, + 2160, 7176, 12032, 6478, -741, -5576, -644, -101, + -1251, -1268, 2365, 10029, 537, -1476, 307, 2108, + -2478, -944, 10725, 349, -4242, -135, 7577, -4492, + 1492, -2512, 7736, -5118, -6756, -2436, -1890, -2390, + 1620, 914, 1658, 47, -11692, -134, -1740, -196, + 9521, -136, -1376, -8682, -1136, 1096, 903, -1148, + -334, -228, -4, -675, -199, 1914, 2827, -11098, + -2129, -2559, -978, 175, 1832, 10075, -2358, -1888 +}, + +.cb4448l1 = { +-11514, -2858, 12392, -305, -206, 929, 473, -3120, + -2766, -1068, -1237, 420, -718, -21, -336, -45, + -478, -1517, 1830, -12644, 259, 11978, 257, 1494, + -1759, 247, -733, 112, -2242, 290, 234, -10260, + 1781, -1806, -4104, 1747, 38, -692, 4971, -9113, + -1925, -1580, -615, -9608, 3779, -11158, 469, -4736, + 299, -2815, 2108, 1910, -2356, 66, 523, -440, + 2298, -4219, -2512, -1110, 11192, 5932, -2629, -7985, + -992, 775, -1134, 3287, 900, -681, -39, -1206, + -1708, -6800, -361, 11024, 8496, -198, -3855, 1486, + -2547, 1773, 50, -276, -286, 785, -7884, 438, + 4590, 2794, 5333, 5476, 2108, 660, 3610, 2308, + -8538, 224, -132, 134, 731, 988, -1368, 3894, + 4318, 9911, -104, 320, -9506, 1721, -5690, 1712, + -8747, -1876, -5122, -1304, -162, 752, 3646, 1621, + 11089, 1117, -1971, 1058, 3070, 180, 23112, 175, + 483, -1028, -538, 497, 1053, 61, 788, -455, + 22, -55, -32, -326, 15956, -2045, 788, 9784, + -1170, -819, -3677, 647, -484, 578, -160, 286, + -421, 289, 8140, 3838, -578, -1866, -2074, 667, +-11951, 1684, 3439, 1280, 158, -1784, 1276, 638, + 562, 2045, -220, 852, -594, -2109, -2665, 2748, + 38, 91, 1377, -624, -18586, -498, -882, 36, + 536, -99, 62, -5275, 3051, 231, -6343, -1751, + 1206, -1646, -1347, -13590, 1431, -271, -442, 21934, + -143, -1824, -378, -463, 816, 379, 336, -291, + -652, 275, -758, 257, -14866, -1304, 7260, -3373, + 1249, -1992, 2734, -2565, -3064, -416, 2424, 279, + 10518, 206, -681, -14338, 666, 1843, -648, 526, + 1982, 366, 684, 1019, 192, 8, -482, -4785, + 2134, -1722, 10674, -1613, 33, 1148, -1566, 10226, + 3397, 667, -1100, -738, 2420, -14282, 451, 90, +-10346, 2673, 1175, -3639, 266, -566, 0, 1672, + 1082, 298, 359, -497, 1784, -570, -2538, 2522, + -3825, 6265, 99, -7927, 3160, 11079, 131, -2080, + 92, -29951, 268, -293, 240, 254, -182, -145, + 303, 12, 86, 596, 246, 136, 1020, -1521, + -1134, -10125, -5691, 6028, -3703, -4295, -3718, -5719, + -564, 660, -321, -1073, 83, -3068, 6167, 12788, + -762, 8057, -1215, 2379, 2142, -3625, -503, -1418, + -304, -649, -501, -12558, 12787, 3737, 1465, -3692, + -1321, 1106, -1136, -651, -50, 1608, 59, -583, + 82, 331, 443, 782, 93, 285, 310, 29149, + -698, -52, -909, -238, -222, -114, 4, 650, + -200, 235, 2541, 598, 378, 11000, 3101, -8228, + 1690, -4313, 6996, -11, -2620, -1458, -1428, 579, + -304, 20, -372, 897, 602, 432, -138, 690, + 593, -1485, 136, 191, -32147, 260, 199, 412, + -168, -41, -384, -362, -14, 242, 366, -318, + -304, 1544, 458, -7790, 3332, -5117, -1937, 868, + 12622, 906, 1941, 4763, 1698, 351, -234, -973, + 9166, 6726, 2686, 248, 3597, -9812, -400, 4155, + 2852, -415, 2218, 876, 1423, 3852, 2965, -410, + 1820, 8268, -1296, 686, 114, 3087, 3007, -9402, + -5751, -3459, -6674, 418, 4137, 4778, 56, -1399, + -1698, -2590, 8343, -2130, 2535, 6148, -134, -2393, + 11551, -338, 735, 630, -658, 13358, 949, -1136, + -217, -985, 182, -1014, 1459, 221, 7713, -1386, + -1427, 1326, 555, 66, 2694, -1535, -268, -13596, + 658, 305, 858, 548, -12748, -582, -1055, -659, +-12155, 940, -2164, -2518, -126, -132, -842, 641, + -483, -446, -5184, -186, -511, 1169, -6092, 6161, + 3082, -664, -2037, 847, 11032, -1306, -1673, -1219, + -36, 1862, 10053, 780, -282, -837, -263, 509, + -588, -12646, -769, -2164, -2219, 524, -3433, -6437, + 3890, -623, -7509, 241, 4042, 264, -1394, 3646, + -6925, -5184, 1218, -1476, -2240, 1882, 182, -3450, + -497, -148, 160, -1579, -19545, -80, 886, 913, + 708, 728, 393, -603, -778, 3414, -778, -1495, + 1205, 2342, 232, -3634, -76, -16792, -684, 1322, + 192, -13248, -658, 7650, 4731, -169, 5148, -1413, + 3026, 2480, -2190, 1004, -2082, 237, 171, -717, + -766, -525, -11802, -3776, -9914, 1374, -3250, 415, + -2787, -175, -1081, 792, 980, 11464, 834, 714, + -993, 150, 77, 2306, 11249, -3058, -3418, -1758, + -239, -119, -1408, 6083, -4276, 1827, 1660, 2287, + -2997, -576, 400, 2062, -3174, -6215, 10026, -1082, + 41, 249, 10026, -6199, -301, 280, 10120, 2249, + 527, -564, 1002, 622, 3341, 408, 2870, 12902, + 13307, 689, 336, -819, -43, 832, -1242, 657, + -106, 42, 1123, 149, -2072, 78, -303, 329, + 21745, -2172, -1204, 448, 1437, -560, -376, 311, + -73, 153, -785, -368, 54, -445, -92, 120, + -59, -377, 402, 567, -25820, 1284, 1288, 200, + -865, -1286, -41, -1862, 402, 179, -2338, -3876, + 4992, -1824, -10092, -3407, -8516, -3556, 130, -5695, + 5846, 2333, 2995, 2110, -6946, 5049, -2377, 1655, + -859, -4737, 1648, 7031, -7344, 4992, 1760, -711, + 3134, 14363, -907, 171, -1971, -3062, -1079, 600, + 603, -224, -440, -11328, -291, -663, 1878, -715, + -2724, 284, -456, -10970, -3225, -2240, 252, -977, + -360, 729, -572, 3981, 1615, -52, -5372, 6095, + -9888, 6873, -3830, 4916, 1834, -1581, -11268, -2316, + -398, 1361, 6151, 2736, -1968, 4624, -180, -260, + -1221, -5633, -1300, -1081, -1433, -509, 366, -388, + 1660, 340, -18997, 694, -1184, -813, 1324, 1261, + 735, -186, 5258, -583, -221, 1707, 149, 1022, + -835, 1089, 2939, 2025, 421, 411, 3609, -13797, + 464, 9214, 2462, -6257, 6032, 1911, 1282, -9673, + 974, -703, -128, 950, 369, 1160, -674, -312, +-13858, 1078, -7606, 8, 2786, 367, -6441, -824, + -195, 714, 484, 108, 475, 289, -1012, -1591, +-10880, -324, -647, -2199, 10378, 5781, 995, -416, + 871, -1240, -380, 70, -1893, 7632, 1727, -908, + -672, -10901, -962, -7322, 794, 1748, -5568, 1215, + 5845, -9575, -2413, -2159, 3077, 1359, -416, 6277, + -85, 1352, -3498, 6130, 1125, -236, 1950, 8481, + 716, -560, -1311, -228, 250, -440, -5320, -1941, + -9710, 4637, 1420, -102, -8222, 616, -2254, -528, + 196, -1315, -749, -97, -285, -15880, 1105, 630, + 368, -809, 29, -1688, -2314, 745, -1627, 19840, + -2380, 4108, 1670, 2763, 275, 530, 492, -589 +}, + +.cb4448s0 = { +-10720, 9997, -1313, 8849, 5152, -226, -2908, 303, + -842, -870, 165, -1372, -105, -154, 170, 2424, + -2476, -2126, -8329, 349, -4509, 5128, -92, 9086, + -7263, 416, -124, 341, -88, 239, 5172, 553, + 1526, 1728, 1955, -1489, -6595, -11237, -10224, -394, + -927, -932, 674, 743, 317, 4628, 8453, -3768, + 2545, 3506, -2406, 9108, 5643, 4660, 4116, -2452, + -1391, -154, -74, 180, 5270, -7922, 46, 11046, + 6076, 735, 7922, -196, -1080, 1445, -687, -2403, + -784, 742, -269, -498, 6010, -4045, 1053, 891, + -1538, 613, -84, -4254, -957, 4682, -14004, 2050, + -647, -718, 557, -2720, 2437, -7675, 11874, -9284, + -734, 775, -2231, 105, 366, 1360, -98, -126, + 508, 2647, 729, 762, -8806, -10413, 9008, -2093, + 1107, 201, 1421, 1181, -259, 1420, 828, 327, + -1956, -573, -874, 354, 2662, -1437, 10864, -9240, + -7648, 1670, 1598, 173, 438, -373, -566, 246, +-11999, 1817, -611, 1, -1652, 1876, 1354, 1270, + -789, 300, -321, 11577, -516, 329, 5723, 4732, + 1717, -6224, -5356, -6292, -370, -3644, -922, -50, + -14, -581, -1554, -1675, -20, -965, 28479, 658, + -498, -488, 504, -601, 437, -585, -245, -196, + 186, 281, -174, 159, 7469, 5890, -5112, 4918, + -9023, -360, 40, -2975, 4784, -437, 1609, 1032, + 2759, -297, 106, 5176, -4315, 568, -9536, -1297, + -6783, -10965, 1285, 264, 330, -508, -522, 624, + 662, 539, 7248, -13780, 40, 2140, -2188, 1925, + -8972, 1147, -1340, 870, 779, -4, -101, -374, + 781, 5733, -5712, -5777, 2080, 875, 13450, -1551, + -3229, -1818, -114, 1265, 501, 636, -576, -623, + -1269, 3006, 1023, 862, 1359, 1950, 588, -22648, + 218, -438, 1547, -408, -844, -263, -106, 14754, + -689, -9466, -978, -21, 1412, 43, 2012, 352, + 908, 277, -960, -747, -230, -1557, -7132, -5707, + 79, -2474, 2177, -5349, 2510, -12720, 2833, -2152, + -1693, 458, 197, -643, 735, -2728, -893, 2758, + 5196, -3566, -4294, -4914, -1222, 188, -8884, -6234, + 2391, -1518, 663, 572, -1465, 1147, 8486, 2037, + 2516, 941, 6092, 11602, -2559, -1702, -1848, -924, + -210, -108, -1052, 8360, -7567, -4588, -169, 3464, + -9206, 1842, -4329, -2499, -341, 592, 918, -102, + 340, 214, 1037, -324, -16289, 10308, -47, -29, + 1340, -603, -2763, -548, 392, 1489, -149, -769, + -67, 13270, -2233, 8257, 1582, 1034, -4270, 916, + 4486, 1191, -102, 159, 109, -536, -664, -987, + -8041, -1759, 4264, -5600, -13815, -1158, 1712, 2516, + -634, 504, 515, 732, -46, -685, -481, 1685, + -1782, 262, -3600, 14721, 6334, 7941, 101, 914, + -2141, -2, 182, 829, -215, -122, 6325, -3752, + -2812, 1618, 3512, -1591, -4276, 6994, -10349, -5675, + -1501, -1766, -1949, 436, 82, -5596, 2592, -1086, + -2804, 2540, 458, -550, -1834, -2401, -7563, 2340, + 1678, -7666, 4538, 27, 6337, 3642, 17068, 5310, + 1115, 1579, -142, -397, -670, 2010, 863, -504, + 845, 848, 770, -8821, 1963, 2782, 162, 1130, + 2597, -13699, -3996, 800, 2499, -1045, -1512, -186, + -59, -119, -5048, 6800, -8766, 784, -7091, -1002, + 335, 1993, -1045, 601, 1804, 166, 1343, 110, + -224, 2247, -344, -5, -4292, 5846, 8591, -11846, + -1303, -1027, 1759, -168, -194, -1281, 489, 378, + -5069, -3321, 11238, -375, -806, 3962, 9660, -2960, + -664, -1067, -627, 271, 1205, 1160, 261, 3725, + 7877, -679, 22, 598, -1086, -420, 2168, -46, +-15552, 420, 1220, 1332, -58, -156, 7777, -4657, + 352, 15316, -4760, -2140, -2577, -1321, 2037, -371, + -1254, -912, -1177, -1367, -103, 4572, -9482, -1599, + 294, 403, -272, -2331, -4365, 13467, 4585, -2554, + -1743, 545, 162, -369, 6074, 11273, -8856, -8175, + 2543, -7, 314, -2033, 2704, -1755, -1431, -791, + -276, 1085, 236, 6553, 1872, 387, 1056, -31, +-20610, -609, 608, 1007, 1604, -1501, -68, -527, + 204, 252, 2533, -721, 1468, 444, -72, 61, + -209, 512, -216, 42, 385, -490, -104, -29030, + -166, -4883, -2754, 788, -430, -867, 565, -1155, + 562, 1076, 1757, -2990, -14971, 8392, 902, 550, + 102, -6579, -6939, -319, 172, -863, 979, 2178, + 630, 160, 952, 946, -3955, 1515, 352, 2557, + -5339, 6166, 4588, -2040, 4031, -535, -2504, 2782, +-12136, 1338, -2758, 458, -671, 155, 6998, -2598, + -931, -396, -922, 2060, 447, -42, -649, -532, + -552, -1945, -16548, 815, -408, 3469, -4118, 875, + -1017, -11150, -511, 3846, -11349, -1928, -781, 2765, + -681, -713, 655, -218, -8032, -465, 295, 1591, + -383, -1889, 1627, 108, 1149, 2513, 388, -5702, +-15693, 24, 470, -4322, 3721, 1584, 1808, 350, + -1765, -620, -2953, 4354, 8512, -12533, -86, -2490, + -192, -507, 2024, 3942, -801, 13444, 738, -2086, + 162, 2013, 837, 56, -384, 3164, 5052, 1158, + -403, -6913, -4290, -2068, 16622, -2738, 856, -2884, + -2432, -410, -1179, -456, 504, -1359, 436, 352, + -6351, 327, -2196, -1502, 302, 338, -839, 235, + -520, 1283, 2710, 18814, 2256, -2, 400, 1300, + -1185, 1024, -3744, -3542, -4350, -763, 1902, -14737, + 5437, 48, -1589, -280, -67, 232, 2276, 1413, + 3284, -308, 1013, 610, 22787, -685, 724, 12, + -359, -1651, -1060, 569, 248, 3836, 605, -413, + 3380, -1360, -1120, -2933, -2368, -977, 10135, 12356, + 3739, -1571, -418, 580, -2662, -11460, -6128, 2867, + 11468, 825, -3201, -501, -138, -755, -554, 168, + 757, -564, 428, -12118, -15179, -1978, 432, -597, + 1528, 3038, -568, 1349, -3377, 914, 498, 928, + -91, -5, 9192, 3000, 2542, -1411, 626, 2705, + -763, 3247, 13736, 3034, 2170, -67, -852, -378, + 1264, -2771, -2415, -4236, 126, -1984, -13336, -1088, + -416, -1979, -520, 2506, -1505, 294, -2398, 218, + -8740, -3873, 2069, -1374, 86, -998, -3851, 1070, + 13357, 955, 3085, -536, 166, 926, 299, 6532, + 1324, -502, -1658, 1829, -1263, 445, -1902, 1452, + -2747, -16422, 1875, 1773, 452, 288, 5992, 1626, + 3659, -917, 2255, -1508, 356, 547, 158, 9, + -117, -1665, -595, 14392, -1013, 49, -4060, 12064, + 3666, -2903, -9145, -396, -4341, -953, 2758, -178, + -204, -462, 98, 222, -3622, -12200, -4484, -94, + -8642, -5694, 4034, -720, -1695, 751, -1668, -266, + -343, 296, -112, -900, -3750, -360, 1002, -7402, + 7758, 7370, 3332, -7517, -769, -1272, 412, -1451, + -89, -227, -11332, -472, -1108, -394, -339, -1981, + -3494, 12110, -564, -5958, -690, -1066, -130, 762, + -50, -1456, -1521, -8428, 994, -867, 2650, -2335, + 354, -2253, 4612, -12364, -2626, 1853, 577, -103 +}, + +.cb4448s1 = { + 25901, -239, 648, 167, -284, 198, -340, -1112, + -55, -242, -214, 528, 112, -259, -284, -250, + 23, 475, 780, -558, 111, 148, -2411, -19826, + -1158, 2799, -964, 44, -1204, 1187, -4036, 1872, + 3541, 768, 159, 1979, 3382, -113, 804, -1021, + 3708, -2577, 9697, 11527, -326, -7058, 4306, 1260, + 3782, 3370, 1595, 705, 2268, 2182, 1509, 1131, + 9877, -7260, -258, 49, 1686, -1472, -2556, -1973, +-22425, 338, 486, 963, 1069, -34, -1027, -90, + -881, -473, 554, -6326, -873, -9744, 10157, -1079, + 584, -1047, -1954, 6204, 2416, -899, 1452, 938, + -439, -664, 4231, 9370, 7800, 170, 9448, -4756, + 1967, 686, -1186, 636, -1719, -1244, -540, -728, + 306, -1778, -7980, -3418, 8318, -1828, 1556, 3487, + 10195, 3741, -510, 2077, -1496, 1241, 384, 477, + -1051, 7922, -4077, -2513, 849, -693, -9170, 4264, + -7940, -1703, 460, -2986, 586, 13, 377, 781, + -7047, 6852, -1350, 7537, -493, -1919, 379, 3108, + 4293, 8467, -3875, 63, 44, 493, 1496, -1577, + -5676, 3318, 6628, 5177, -11082, 1146, 3251, -1159, + -461, 442, 1250, 212, 176, 3586, 137, -9153, +-13772, -8211, 393, 1170, 1717, -671, 298, -233, + 883, -1533, 401, 254, 7700, -4827, 794, 377, + -376, 12240, 7298, 2445, 1168, -562, 1528, 563, + 421, -606, 0, 5792, -1069, 824, 3728, -2729, + 1005, -730, 4318, 644, 17336, -1588, 2100, -365, + 509, -415, 3684, -9128, -1096, -4278, 1549, -1247, + 5519, 11075, -2216, 6004, -3683, 409, -730, -414, + -263, -6623, 8194, 489, -9085, 334, -1104, -814, + 1412, 1522, -1657, -7029, -4142, -1274, -520, -40, + 650, -1886, 9701, 11456, -7567, 1176, 3268, 3016, + 1109, -117, -858, -155, -1249, -230, -216, 3945, + 9142, -2297, 134, -2563, 15131, 857, -1597, -618, + 150, -590, -166, -357, 388, -69, -8767, 2914, + 1087, 4673, -14373, 600, 382, -1893, 844, -242, + 544, -106, 568, -1141, 371, 2663, -1860, -725, + 8066, -1353, -8743, -10433, -1796, 427, -73, 178, + 96, 980, -478, 978, 1767, 6034, 633, 966, + 677, -65, -884, 417, 461, 62, -868, 93, + -100, 519, 16304, 2646, -1260, 12271, -140, 142, + 11138, -892, -2114, -629, 172, 744, -2056, -960, + 61, -980, 2082, -439, -3126, -2564, 1174, -78, + 254, -178, 1599, -436, 19023, 5335, -1686, -782, + 520, -8727, 256, -3588, -5694, 12323, -2091, 1511, + -656, 3872, 2370, -770, 282, 455, -573, -39, + 7845, -12566, 12690, -156, -442, -227, 575, -274, + -1717, 120, -40, 1866, 635, 161, 270, 1039, + 3256, -673, -3343, 4292, -14247, 7142, -4821, -591, + -418, 376, 21, 572, 551, 70, -5536, 79, + 2540, -505, -283, -350, -1279, -1630, 2234, -604, + 5246, -17580, -3022, -1052, -307, 6626, 2794, 1702, + 1875, -1876, 1011, -320, 1268, -282, 1072, 14370, + -8206, 1218, 630, 173, 7486, 15176, -6146, 4903, + -636, -1341, 1360, -1541, -1012, -778, 84, 426, + -124, -746, -252, -11085, 1783, -2833, 809, -744, + 2194, 3328, 7029, -5097, 4934, -3025, -641, 303, + -328, 258, 8674, 53, -3395, 975, -9944, -8550, + 3376, -714, 1078, 1186, 598, 808, -166, -752, + 484, -5088, 1484, -1278, 11394, -1876, -8236, 5159, + -1830, -1520, 2761, 592, -204, -1360, 454, 230, + -5038, -1582, -5617, 1346, -2045, 2306, 17764, 494, + 572, -1930, 339, 550, 784, 151, -753, 4708, + -3058, -8267, 3281, -1054, 870, -1201, -2005, -920, +-10115, 5395, -6423, -798, 367, -221, -5296, -2808, + 8313, -5077, 1655, -200, 114, 46, 350, -2374, + 868, -327, 377, -9570, 1231, 9258, 8752, 3074, + -4411, -308, 2315, 6824, -3303, -896, -1186, 579, + -2561, 2280, 586, -798, 4747, -3487, 1306, -1241, + -487, -90, -52, 3231, -555, -17702, -2681, 1649, + -17, -278, -647, -4225, 2740, -1248, -3826, 1356, + 3572, -1010, 16160, -422, 304, 3970, 1124, -317, + -554, 673, -1191, 3180, -4429, 1581, 1543, -2097, + 4208, -9363, 10146, 1896, 2904, -4112, -1428, -207, + 459, -35, 5395, -8960, 3141, 11004, 308, 3687, + 1540, -2156, -592, 1640, 1003, -280, 797, 204, + 6910, -824, 4724, 4729, 5553, -3165, 483, -12, + 33, -588, -379, 402, 3543, -9646, 74, 9603, + -465, 2872, -2367, -885, 2894, -133, 2758, -721, + 3473, -13322, 1506, -1344, 512, 1066, -8300, 11391, + 11976, -1201, 13, -612, 165, -1823, 154, -123, + 1234, -423, -367, -58, 384, 2687, 2536, 826, + 6223, 1750, -8589, 1126, 9772, -6646, 2043, 1826, + -1037, -2018, 692, -818, -3431, -467, 11006, 3407, + 880, -2047, -10303, 6168, 1428, -307, -18, 661, + -252, 754, 1207, -2797, -3057, -6235, 99, -931, + 1618, 692, 2790, -294, -1200, -5768, -11691, -5305, + -100, 390, -783, -11660, -4675, -13570, 2764, 1414, + -786, 385, 163, 718, 794, 1118, 827, -634, + -75, 6224, 3965, -2092, -1120, -6395, 5474, -12986, + -3985, 635, -544, -1877, -191, 0, 121, 379, + -3059, 132, 26320, -721, 1262, -706, 421, -85, + -38, 665, 590, -208, -196, 168, 10, 1271, + -218, -365, -5843, -5897, -12346, -3026, 5916, -115, + -2671, -1022, -203, 962, 995, -850, 527, -516, + -1641, 452, 68, 1204, 740, 385, 38, 752, + 150, -3088, 20608, -54, -39, 6109, 3224, -92, + -315, 4407, -306, 1317, -395, -1617, 9104, -3493, +-10724, -3059, 283, 81, -9791, -3210, 7307, 4459, + -639, -61, 1152, -184, 2290, 398, -2902, -2776, + -1624, 1153, 242, -8865, -3617, 309, -11933, -3847, + -5750, 3235, -153, -315, 382, 209, -923, 2072, + 458, 164, 3631, 3121, 3220, -828, -8644, 2215, + 3873, 12445, 533, -631, -53, -136, -728, -240, + 420, 2870, -4981, 906, -3272, 4735, 3613, 2412, + -3951, -10587, 7389, 564, 3266, -1348, 524, 1570, + 6611, 3354, -1042, 1862, 1860, -1187, 5761, -1722, + 8231, -7428, -5662, 1239, -2887, -218, 810, -1063, + 15078, 686, -2374, -293, -2031, -245, 4441, 5045, + 1100, 6722, 1787, -587, -380, 132, 5124, -12478, + 95, -1230, 1464, -1871, 929, 1430, 2666, -3768, + 2784, -3697, -8238, -247, 603, -8406, 1330, 1033, + -743, -2546, 2739, 856, -12698, -4970, 2290, -1104, + 34, -1048, -80, 634, -695, -84, 2374, -24793, + -1064, -1080, -254, -812, 252, -1582, -401, 765, + 847, 340, 479, -3163, 150, -187, 8432, 2607, + 2075, 1384, 423, -7361, -10262, -2254, 54, 1065, + 40, 857, 2014, -5076, 198, 657, 482, -422, + -2185, -850, -318, 164, -684, 2698, -1008, 17493, + -64, -6788, -5966, -14352, -2349, 2492, 266, 1077, + 1935, -99, 4270, 2319, -2391, 779, 187, -70 +}, + +.cb4448m0 = { +-20455, 663, -3140, 2540, -2110, -406, 1078, 1968, + -741, -2458, 490, -496, 338, 581, 1079, -616, + 154, 10097, 231, -228, 477, 20, 1372, 11492, + -1112, -3148, 547, 248, -676, 8197, 5902, -1299, + 519, -2808, 11529, -76, 1239, -1032, -542, 353, + -1071, 278, 274, 2781, -7741, 3260, 2711, 175, + 12340, 1110, -2348, -5303, 1440, 581, -70, 262, + -9902, -2375, 530, 1433, 1624, -1475, -947, 13450, + 1318, -1696, 207, 198, 1162, -944, -9329, -1046, + 195, -106, 682, 14624, -854, -2410, 1054, 242, + -348, 581, 463, 716, 760, 2714, 1356, -1359, + 13089, 2565, -10523, 1934, 637, 1218, 1160, 830, + 905, 272, 408, -581, -1426, 613, 2586, -8186, + 3748, -6663, 4372, -114, -4644, 2998, -9440, 685, + -8741, 3363, -5623, -4229, -7058, -1201, -822, 1806, + 8671, -856, -612, 1165, -426, 317, 6867, -80, + -7084, 1143, -1862, 2742, 669, 550, 22, 173, + 4301, -10406, 1042, -346, -1334, -2897, 647, 744, + 14, -1338, -1648, -1235, 3550, -455, 2125, 1188, + 17136, 1188, -6782, -849, 298, -1054, -9254, 409, + -1736, 1410, -7254, -1889, 457, -740, 22, 262, + 32242, 1657, -2308, 2688, -607, 609, 4, 150, + -264, 192, -140, 246, -393, -76, -15050, 390, + 969, 457, 1436, -649, 460, -12150, 1359, 1014, + -2103, -576, 55, -590, 113, -1410, -23431, 182, + -2386, -1568, 904, -218, -281, -188, -178, 63, + 211, 549, 687, -12069, -88, -654, -1070, -13155, + -124, -697, 438, 3174, 1700, 270, 234, -289, + -625, 15749, -2340, 8466, 397, -4460, -1030, 3206, + 1081, -1317, -1030, -72, 487, -1477, -8782, 6984, + -1221, 2395, 3198, 2995, 5862, -1195, -6075, -1020, + -934, 868, -470, -1024, 1202, -998, -1306, 22118, + 344, 540, -3137, -547, 2440, -28, 222, 372, + -424, -199, 1068, -917, -105, -4278, 52, -299, + 6933, 11715, -520, -2853, 58, -8575, 416, -1272, + 1128, -32, -1140, -1873, -495, 235, 2079, -314, + -1328, -2615, -20194, 848, -1553, 387, -6091, 906, +-10180, 8634, -506, 4078, 318, -2657, 1612, -126, + -1424, -4, -1745, -343, 302, 2439, 12190, 941, +-12534, -4756, -176, -90, -1295, 1041, 1875, -450, + 89, 212, 2098, 1708, 1876, 4065, 1682, 1972, + -4916, -951, -10683, 1443, -10978, 772, -1013, -235, + 59, 213, -230, 142, -576, 506, 101, 44, + -137, 26238, -47, -322, -289, 281, 2614, -4538, + 634, 1116, 1191, 2985, -759, -5527, 550, 2107, + -6018, -11013, -425, -221, 901, 217, 546, 213, + 2026, 695, 1074, -2132, -173, -1664, -783, 25065, + -326, 86, -632, 1398, 4708, -2911, 2376, 135, + -1471, -904, -2338, 987, 3216, -4564, 314, 15692, + -214, 1238, 230, -181, -30537, -294, 155, -607, + 218, -309, -180, -246, -102, -988, -644, 111, +-10517, -1604, -1180, -2748, 1191, -12959, -2, -1004, + 28, -196, 1974, -790, 809, 8802, -1204, 332, + 180, -3857, 1025, -5998, -9578, 94, -1069, -2398, + 185, 643, -1479, 322, 2544, 12584, -8308, -3856, + 1286, 1600, -2539, -2752, -2520, -367, -942, 417, + -309, -2162, 2044, 10886, 1764, 11028, 3810, 2955, + -1028, -1017, -1752, -487, -605, 48, 2312, -368, + -1758, -252, 371, 19882, -1994, 1675, 5494, -660, + -1669, 256, -54, -941, 4318, -306, 2143, 273, + -3367, -3088, 6509, -1884, -5400, -576, 11394, 875, + 455, 271, -218, 1401, -44, -5336, -12170, 4664, + -589, -3562, -1934, 5842, 1357, 3232, 1449, -402, +-11228, -96, -1509, 2073, -1751, 776, -439, 775, + -3302, 13521, -325, -118, -172, 411, -396, 6154, + -2455, -52, -4616, 783, -12488, -2085, 5817, -1278, + 635, -1713, 2888, -830, 649, 7482, 10134, 9147, + 3784, 1046, -1934, -2580, 102, -679, -124, 68, + 657, 417, -175, -32768, -80, 375, -941, 224, + 271, -232, 1519, -99, -680, 67, 66, -618, + 252, 1907, 5121, 2456, -2117, -9388, -1441, 636, + 7868, -8340, 1939, 1340, 1511, 711, 6530, -1748, + -183, 90, 2561, 5860, -364, 5117, -4101, -4028, + -944, 10526, -1028, 1047, 707, 12116, -12596, -4006, + 922, -1047, 348, -971, -272, -2388, 435, 246, + -1055, 148, -1852, -12418, -2531, 3524, 4103, -344, + 1667, 2818, -4576, -273, -8337, 183, 497, -144, + -9845, -292, -503, -1212, 4316, -1434, -11058, -3043, + -5817, -981, 813, 0, -718, -467, 10285, -19005, + -82, 776, 1192, 1030, 1560, 1080, -144, 729, + 606, -225, -389, -187, 552, -930, -444, -5959, + -1960, -1315, 2650, -1282, -18790, 1772, 263, 1410, + 812, -458, -476, 744, 2595, -426, -19, 9119, + 4529, -1502, 4673, 3675, 7430, 1084, -6966, -518, +-13552, 1054, 2474, -9499, 1041, 5114, 442, 2927, + 511, -1492, 217, -726, 398, -522, 35, 119, + -332, 106, 816, 437, -1223, 27612, 521, -29, + -462, 367, -966, 476, -2559, -3485, -160, 1487, + -272, -586, -6014, -232, 3679, -1864, 1244, 575, +-14591, -483, -1428, 20, 7874, -2948, -5965, 2383, + 3270, 490, 2750, -547, -9658, -1473, 943, 285, + -2388, -772, -1582, 3181, 3419, 2628, -197, 3376, +-13282, -7684, 3383, 70, -1174, -70, -6703, -7305, + -553, 3588, -826, -12, 7350, -3604, 345, 1098, + 3856, 918, 2038, -39, 11514, 15798, 1327, 1158, + 436, -918, 71, 953, 975, 1147, 174, 411, + 1467, 83, -4536, -1511, 5350, -3314, 13999, 18, + 4107, 1901, 834, 2614, 2356, -369, 943, -341, + -460, 4380, -10014, 3308, -3541, -3225, -621, 8449, + -1383, 4481, -1399, -3646, -936, 923, 221, 346, + 7828, 2406, 3021, -4993, 3012, -10903, -1925, 8153, + 382, -1453, 1238, 601, 1195, -2245, -2792, -4118, + 473, 4898, 12961, -6094, 5905, 1368, -2754, -303, + 768, -31, -1275, 1400, 596, -1326, 619, -1744, + 1145, -3977, 639, -10785, -1693, -11192, -541, -434, +-11384, -1017, 14361, 1398, 521, -3239, 1851, -491, + 237, -1024, 1002, -3002, -303, -33, -6532, 601, + -3726, 7832, 6090, -10107, 957, -1149, 689, 1327, + -51, 1945, 990, -106, 595, 234, 518, 1060, + 77, 837, 28880, -91, -395, -275, -265, -279, + -217, -300, 240, -1055, -406, 4314, -2139, 6349, + -2227, -5996, 963, -10386, 4629, -560, 1080, 134 +}, + +.cb4448m1 = { + 31577, -1322, 1533, -2224, 253, -1485, -92, 294, + 183, -580, 420, 172, -794, -206, -342, -338, + 53, -85, -920, 29517, 1073, -972, -1839, 1004, + 290, 46, 460, -71, -988, 1731, -362, -2070, + 3848, -2, -3842, 734, -1221, -8012, 1104, 6782, + 9673, 1082, -8561, -860, -2135, -1557, -1613, -13999, + 1664, 2268, -1570, -732, 1010, -402, -1139, -428, + 400, 1123, -2108, -11776, -345, 10608, 1245, -3142, + -3244, -1132, 1700, -308, 1573, 543, 678, 5160, + -3062, 433, 2703, -852, -4903, -1880, 1706, 13995, + 2465, -4844, -904, -148, 350, -11168, 1406, 312, +-11900, 397, 769, 5558, -1354, 187, -30, 231, + -1020, 202, 884, -198, -3151, -830, -8490, -670, + -2767, 1517, -12957, -3861, -2794, -1854, -180, 135, + 7140, 4103, -4427, 450, 494, -1033, -1110, -2857, + 11056, -711, -800, 3628, -180, -852, -10300, -2120, + -450, 14464, -511, 303, -1464, -542, -89, -204, + 500, -400, -318, 569, 216, 428, 350, 1973, + -137, -885, -1794, -974, 3977, 3382, -18624, -420, + -1947, 165, -449, 1395, -17313, -286, 2054, -447, + -2740, -1881, -550, -2166, 1360, -6021, -94, 148, + 676, -1619, -1737, -11977, -169, -1664, -7709, 6202, + -5954, 1681, 715, -263, 56, 369, 589, 564, + 1989, 1617, -1648, 9205, 1343, -11508, -7379, -3791, + -3136, 1049, -844, 24, -6714, -1736, -5734, -2907, + 5016, 2167, -5722, -1210, 6232, 428, 2467, -3334, + -1477, -711, 6728, -10274, -4930, -6224, -349, -710, + 1598, -713, -1708, -497, -254, 567, -884, 131, + 11520, -908, -1425, -1862, -13449, -1590, -669, 657, + 505, 236, -4, 21, 846, 100, 8248, -1847, + -131, -186, 181, -806, 3293, -1072, -1208, 14492, + 1555, 1527, 544, -120, -258, 6, -2401, 12455, + 10880, 1091, -2350, -939, -1252, -564, 150, -114, + 1419, 737, -1732, -440, -2303, -226, 536, -2492, + -1085, -10117, -11013, 3786, 5275, -10, 2479, 143, + -1647, -7945, 884, -1618, 2056, 12890, -424, 5986, + -1471, -666, -570, -1466, -499, 64, 566, -1738, + -639, 11380, -612, 1879, 1550, 12469, -299, -1501, + 2634, 1036, 3020, -13, 14974, -2066, -5786, -2667, + 5487, -6768, 468, -385, 778, -805, -536, -304, + 718, 386, 285, 7546, 643, 1462, 913, 4707, + 941, -3338, -194, 6669, -4493, 8869, -837, 400, + -877, -11113, 326, -2318, 13683, -1304, -1966, -933, + 312, 128, 470, -296, -322, 340, -1126, 1811, + 1999, 2885, 3201, 331, -2494, 3999, 660, -80, + -2063, -16771, -1337, 426, 4884, -6026, -40, 2093, + 342, -176, 83, 134, 796, -425, -8934, 2100, + 8550, 160, -221, -252, -32714, 1306, 1332, -609, + -109, 547, 848, 518, -40, 303, -246, -451, + -2177, -716, -750, 1, -21232, 1287, -1303, 2051, + 1659, 1501, -369, -1415, 274, 308, 260, 371, + -1409, -662, -7347, 7161, 3656, -1104, 8862, -5671, + 1370, 1122, 16, 1132, 17593, 6778, -993, 613, + -665, 3004, 3288, -1625, -1823, -1003, 740, -1002, + -888, -677, -1065, -25294, 997, -160, -180, -811, + 188, -333, -2483, -696, 1309, 120, 456, -116, + -2020, -896, 7216, 6328, -9170, 8407, -2986, -1684, + 680, 1752, -684, 613, 337, -629, -11750, -493, + -324, -907, -391, 1053, 14125, 142, 420, -1917, + -378, -1428, -90, -497, 1116, -464, 2170, 805, + -1572, -904, -9020, -534, 6450, -490, 10750, 279, + 765, 961, -3985, -2702, 2423, -4981, -1222, 1654, + -1089, -2157, 1940, 14331, -895, 1726, 1555, 122, + -3552, 1274, -598, -910, 3056, -1704, 6430, -10626, + 1014, -8773, 1009, 1936, -360, -468, -1029, -8841, + -625, 2212, 2234, 2720, 1190, -64, -2078, 4688, + 8690, 5150, -450, 744, -796, -5661, -332, -7938, + 2670, -4054, 1377, -1594, 11554, -4702, -3631, 745, + 742, -90, -1311, 12528, -4664, 834, -853, 1542, + 8560, 2209, 4091, 2876, 2117, -678, 1684, 785, + 304, 7980, 2126, -302, 8239, -2105, 1584, 11894, + -1055, -1391, 596, 2343, 86, 388, -1348, -1007, + 1428, 413, -9231, -10312, -7346, -1108, 1385, -1255, + -3954, 738, -1258, 410, 226, 15115, -1059, -4117, + -50, -504, -1726, 1425, -9974, -346, 688, 464, + 244, -586, -8880, 845, -659, 932, -1309, 290, + -29, -417, -2184, 1011, -9622, 1443, 9009, 1945, + 2698, -708, 10572, 2410, 1200, 4492, -2569, 1444, + 2735, -8604, 2274, -4057, 478, -199, 1285, 12695, + 12321, -2933, -1708, 1198, 675, -492, -560, -52, + -1261, 85, -480, -96, 696, -764, -1402, -31368, + -580, -675, -1678, -58, 600, -522, -292, 647, + -36, 154, -1148, 437, 1561, 588, 603, 7629, +-16973, 29, -828, -589, -919, -1372, -470, -445, + 428, 528, 5828, -353, -32, -1781, -702, -690, + -7196, -3253, 1942, 4600, -12102, -674, -10480, -2336, + 711, -2174, -7474, -1436, -451, -7133, 856, -2652, + 1892, 3464, -546, 676, -13296, -516, -13618, -997, + 938, 1686, 1006, 1358, -1371, 922, 534, -170, + 126, 255, -835, 50, 945, -1066, -1676, 3, + 1038, -437, 26030, 418, 27, -1092, -493, -428, + -606, -1097, -628, 298, 295, -806, 183, 146, + 1352, -84, -722, 833, -25667, 3176, 1001, -322, + -2339, 15, -475, -1257, 2116, 876, 637, -529, + -1108, 302, -2452, 19734, 58, 851, 9845, 1142, + 2168, 706, 11070, 1556, 544, 3002, 2238, -3974, + 2738, -48, -8324, -2186, -355, -14933, 2192, -2481, + 2700, 473, -486, 761, -208, 76, -78, 102, + -4896, 1378, 12377, -8269, 28, 1092, -5071, -1500, + -1190, -804, 1085, -766, 493, 22, -1041, 9136, + -1234, -12247, 967, 2672, -883, 4582, 4871, 1891, + -532, 329, 226, 446, -6710, 312, -914, 1416, + -1852, 3052, 6512, 8971, 5544, 6519, -579, 1021, + -241, 911, 782, -3456, 10158, -1865, 3941, -12300, + 8, 472, 882, -1580, -1799, -1025, -631, -127, +-15316, 8047, -200, -1860, 582, -4363, -1274, 1085, + -48, 2383, 638, 480, 369, -838, -1341, 414, + -114, 2757, 1222, -2194, -3394, 6469, 2418, 738, + -1656, 15594, -1090, 202, 727, -769, 484, 2462, + 4875, 1656, -3835, -16877, 5276, 239, 982, -1872, + -130, 901, 1352, -155, 4939, -8317, 9000, 2503, + 485, 1184, -548, -1356, -7482, -188, -1587, 496 +}, + +.fcb08l = { + -2539, -3275, -2699, -3345, -2843, 5501, 426, 7127, + -149, 3111, -2991, -2297, -2345, 2702, -969, -946, + 2837, 1114, 1800, 1271, 12249, -2282, -2309, 1566, + -2889, -3020, -2083, 3586, 8919, 2651, 4111, -1842, + -1588, -1428, 3251, -102, 156, -320, 722, 1711, + 20565, -3068, -2211, -3164, -3410, -3396, -2882, -2002, + 1730, 4077, -2696, -1694, -2839, 2948, -2739, -2380, + -2252, -1311, -269, 1900, -2796, -444, -2996, -2525, + 5194, 1459, 5042, -1089, 914, 4116, 7644, -3137, + -3156, 4028, -3435, -3240, -2585, 5542, 5119, 9885, + -2995, -3153, -3449, -3101, -3551, -3469, -2196, -1271, + 3869, 5413, -2800, -1990, 3371, -2286, -1022, 3190, + -550, 1723, 968, 1916, -2749, -1530, -2211, -2987, + -3357, -3262, -1042, 10277, 107, 2662, 9819, -2753, + 4269, -3277, 3125, -3131, -2974, -3251, 6466, 9484, + -2034, -2707, -2424, -3170, -2619, -2278, -143, -1641, + 11856, 5975, -1282, -2629, -2396, -2364, -2012, -1085, + -2576, -2422, -2206, 13731, -2261, 2751, -1768, 2482, + -1065, -347, -137, 31, 619, 385, -2257, -2215, + -1698, -2686, 4468, -2563, -1071, -1359, 7757, 3732, + -2856, 9018, -2046, -1494, -2234, -2209, -67, 1340, + 2433, 2965, -2722, -2151, -2966, -2780, -2732, -1509, + -2085, -1532, 6934, -1248, -1936, -2203, -787, -1781, + -895, -1990, 4693, -1818, -1569, 1954, -2283, -2403, + 10514, -3105, -1074, -2838, -1, 1192, 1113, 3309, + -2249, -2451, -1660, 2535, -1439, 3582, -1093, -594, + 1956, 758, 5349, -2524, -2320, -1903, -2055, 5075, + -941, -721, -536, 2197, -2309, -3027, -1460, -2911, + 11344, -2474, -1601, -1749, 3260, 2547, 3819, -1247, + -1449, 2835, -1118, -652, -516, -379, 531, 440, + -569, -2606, -2545, -2447, -1685, 8678, -1868, -2003, + -992, 5888, 8591, -1848, -2010, -2196, -2049, -658, + 3473, 214, 905, 317, -2050, -1083, -2593, 8754, + -2234, -2449, -1688, 2194, 2244, 2502, -1659, -2748, + 4584, -3011, 3702, -2307, -1887, -1960, -1068, 2889, + -3022, -2989, -2295, -2794, 3071, -1588, -43, 2627, + 1278, 2031, -2145, -2551, -2333, -3205, -3237, -2760, + 9082, -454, 4339, 1776, -2738, 4785, -2176, -1896, + 2148, 1350, 768, 249, 1001, 1499, 797, -2182, + -1443, -229, -32, 827, 401, 270, 581, 380, + -2370, -2376, -2679, -3099, -1742, -1149, 4666, -693, + 1109, 7547, -2496, -3063, -2818, -2621, -2016, 5722, + 4932, 1217, 2161, 2449, -2207, -2954, 3769, -2824, + -1809, -2946, -1693, -377, 1565, 4100, -2947, 3063, + -3062, -2919, -3093, -2520, -1712, 2383, 1305, 1867, + 10145, -2912, -3307, 7519, -3502, -1063, -2782, 8595, + -750, -1503, -3141, -2486, 2923, -2574, -1826, -1244, + 3537, 2494, 2583, 1560, -2722, 3284, 2245, -1258, + -658, -394, 483, 719, 1121, 1073, -2949, -1013, + -3048, 597, -3103, -2510, -1970, 7207, 8635, 1917, + -1772, -483, -2318, -1860, -2500, 2981, -1651, 550, + 696, 615, -2121, -2055, -1619, -2126, 3108, 3417, + -485, -47, 848, 1608, -2636, -1707, 3142, 3798, + 479, -1112, 597, -323, 1555, 1531, -2930, 2106, + -2398, -2314, -1835, 0, 2920, 896, 2356, 1259, + -2911, -3184, 593, -3570, -3389, -3263, 7340, 7640, + 6874, 6549, -1912, -1334, -1749, -568, -1718, -405, + -1375, 3456, -1024, -1903, 9384, -2721, -2485, -2377, + -3026, -899, -3133, -3032, -2452, 7715, 2492, -2450, + -1721, -2138, -1497, -55, 760, 2382, 1183, 1105, + -2782, 389, -1528, -927, 664, -531, 1405, 363, + 582, -292, -1678, -2718, -2763, -3140, -2799, -2178, + -2715, -2592, -972, -1226, 3278, -1173, 2916, -1548, + -446, -1241, -209, 379, 689, 538, 3110, 2857, + -1735, -1244, -589, -413, 65, 471, 522, 323, + -2043, -212, 1309, -471, -564, -16, 378, -320, + -437, 228, -2194, -2637, -2513, -2670, -1863, -954, + -2082, -2398, -2270, 5563, -2959, -2444, -2794, -1736, + -1631, -1324, 1482, -481, 2317, 1470, -2871, -2007, + 702, -1980, -491, -146, -695, -145, 2817, 1268, + -3395, -3456, -3069, -3433, -2874, -205, 806, 3038, + 3806, 2623, -2954, -1861, -712, 1017, -326, 44, + -93, 910, 775, 346, -2625, -2570, -2974, -2344, + -2712, -1930, -2213, 3521, -1341, 4327, -141, 835, + -1119, -1336, -1092, -1891, -860, -727, 315, 2562, + 4119, -2638, -2584, -1951, -2710, -2499, -1561, -952, + 2821, 2505, -2388, -1855, -2926, 1742, -2563, -2655, + -1802, 3082, 3063, 2456, -3304, -2670, -2147, -1504, + -309, 1421, 1661, 1546, 560, 615, -2590, -1593, + -1523, 2025, 3167, -841, -356, -648, 309, 1165 +}, + +.fcb08m = { + -2962, -2140, -2166, -1454, -1638, -1100, -835, 686, + 978, 550, -1630, -1021, -1424, -1867, -1118, -474, + 66, 6104, 904, 603, -829, -475, -1368, -1199, + 7255, -890, -465, 114, 118, 224, -2453, -1279, + 8192, -1289, -452, -47, 180, 324, 627, 209, + -2770, 11214, -857, -1720, -895, -531, -291, -264, + 232, -402, -2699, -2561, -2433, -2093, -1315, 86, + 2666, 1663, 1351, 2349, -2788, 4576, 3680, -1365, + -995, -513, 46, 44, 522, 142, -2739, -1654, + -1950, 4573, -659, -536, 285, 72, 875, 627, + 3142, 105, -941, 1245, -489, -495, -229, 44, + -236, -1083, -2336, -1193, -1620, -1859, -1339, -655, + 205, 1032, 5581, 1195, -2635, -1740, 2656, 1976, + -52, 784, -96, -165, 419, -486, 8850, -624, + -792, -1531, -765, -674, -730, -829, -150, -27, + 2255, -1177, 2727, -1430, 737, -902, -780, -729, + 169, 278, 3729, 3763, -32, -1581, -563, -573, + 77, -372, -64, -477, -2500, 526, -1682, 1464, + -830, -124, -548, 561, 202, 1115, -1682, -1552, + -2014, -2127, -1374, -749, -720, 64, 2097, 6944, + -2771, 4929, -1680, -2212, -1430, -801, 114, 891, + 1176, 855, 3571, -2187, -1566, -1694, 84, -46, + 932, 786, 765, 856, -1038, -498, -117, -1582, + -1379, -1162, 6293, -367, 594, 132, -2487, 2119, + -2153, -1749, 833, 1089, 507, 133, 337, 423, + -2777, 2507, 277, -1455, -1019, 1811, 639, -595, + 136, -1050, -2941, 4474, -176, 1095, 1113, -479, + 182, -295, -229, -605, -2035, -1649, -1171, 51, + 0, 125, 2844, -310, -82, -640, -2251, -2138, + -2270, -1567, 2260, 92, 368, 95, 1433, 1346, + 820, -2339, -1822, -895, -69, 158, 190, 911, + 1008, 764, 684, -1756, -1013, -1625, -1610, 6062, + -499, -1036, -139, 1129, 488, 524, -665, -870, + -347, -76, 123, 91, -12, 14, -2867, -2019, + 2858, -1903, -1165, 309, 287, 1250, 767, 776, + -2784, -2446, -1157, 460, 2589, 437, -285, 711, + -299, 402, -2683, -2271, -1714, -1535, -547, 4118, + 510, 1158, 700, 631, -2084, -1236, 509, -1009, + -510, -193, -1075, -793, 727, 2150, -2722, 968, + 1077, -1579, -1410, -894, 401, 1043, 427, 182 +}, + +.fcb08s = { + -2368, -2340, -1735, -1897, -1493, 984, 3062, 2826, + 1049, 164, 1181, -1990, -1833, -1720, -1360, 24, + 1485, 1923, 460, 511, 69, 78, -353, -3, + 3761, -480, -1538, -1063, 540, -64, -1546, -988, + 1514, -1167, -1354, -563, 1435, 880, 1123, 182, + -2243, -2109, -2378, -2201, -1491, -836, -124, 605, + 6159, 3636, -2770, -2959, -2956, -3019, -2154, -648, + 1805, 4698, 2929, 2078, -975, -360, -895, -623, + -593, -879, -345, 4333, 492, -56, -2102, -781, + -476, 1268, 606, -670, 1686, -105, 370, 461, + -221, -868, -1381, 297, 128, -578, -809, -938, + 3896, 490, 4032, 2675, -684, -1108, -1235, -915, + -874, -919, -802, -1040, -1324, -16, 2156, 1943, + -652, -666, -47, -1499, 168, -210, 4213, -1895, + -1734, -1767, -1412, -867, -71, 329, 855, 1294, + -1849, 4393, -1312, -1597, -564, 434, -454, 269, + 892, -31, -1170, 67, 370, -1144, -320, 3706, + -811, -190, -123, -166, -659, -1033, -789, -902, + -347, -280, -108, -313, 452, 3701, -1505, -2610, + -2758, -2550, -2034, -1361, -676, 713, 2263, 8286, + -2241, -2508, -2540, -1721, 182, 1947, 306, 1773, + 1220, 2909, -60, 73, -235, -1631, -1302, -692, + 4171, -830, 49, -188, -471, -2208, -2265, -1518, + -196, 2995, 2571, -579, -68, 805, -1294, 1274, + 4294, -1356, -702, -532, -465, -123, -400, -719, + 336, 3093, 1634, -906, -71, -502, -938, -982, + -742, -1187, -1757, 2890, -1591, 1303, 216, -311, + -404, -29, 501, -543, -1466, 1587, 309, -578, + -173, 34, 1116, 1286, -1184, -1174, -175, -732, + -619, 3508, -80, 191, -1059, -174, -429, -470, + 10000, -933, -1511, -1601, -1571, -1445, -1065, -1407, + -1053, -932, 1183, 7875, -460, -1609, -1618, -1398, + -1154, -1227, -1012, -1450, 20, 28, -235, -110, + 203, 105, 252, -154, -51, -58, 2940, -490, + 17, -51, 131, -106, -526, -566, -822, -1177, + -1335, 2749, 608, -1575, -1322, -1351, 111, 641, + 1441, -9, 733, -207, -273, -665, -630, -588, + -78, 254, 304, 762, -2661, -2677, -1238, -82, + 2569, 3001, 932, -1032, 211, -324, 40, 1395, + -836, -1119, -635, -1425, -1514, -1135, 1509, 2963 +}, + +.fcb11l = { + -3004, -2927, -2672, -2356, -735, 179, 950, 1734, + 1101, 1641, -1610, -1161, -1606, -179, -1634, 3383, + -610, 240, 73, 1128, 818, -1052, -1641, 724, + -1938, -1741, -1211, 3967, 1988, 1445, 3010, 2203, + -1685, -1698, -1838, -759, -144, 515, 999, 1215, + 3239, -1912, -2048, -1739, -1488, -148, 1590, 1370, + 1066, 1270, -2721, -1637, 99, -1964, 224, -946, + -1437, -954, 755, 1420, -2800, -2211, -2304, -2048, + 4853, -714, -383, 2159, 1823, 2328, -1619, -1584, + -1839, 5462, -1703, -802, -227, 485, 1017, 1695, + -2459, 2399, -1820, 2254, -1373, -767, 53, 705, + 1074, 1293, -1582, -2486, -2208, -2341, -2264, -2132, + -1578, -1043, 322, 7685, -2198, -1768, -2106, 16, + -2207, -1495, -1106, -961, -482, 1642, 6785, -1540, + -1540, -1449, -1177, -854, -307, 853, 1279, 1449, + 3253, -1427, 2314, -1473, -985, -1025, -321, 923, + 1140, 1166, -2704, 2664, -2444, -2717, 481, 3083, + -1449, 1225, 3168, 2389, -2124, -1981, -1342, -1939, + -1904, 4736, -885, -826, 3866, 2046, -290, -567, + -1986, -1880, 1966, -465, 1638, 683, 1005, 1099, + -2842, -2537, -2559, -2427, -1243, 4039, 1371, 3897, + 2529, 2400, -2586, -1328, 785, -1697, 1733, 2382, + -442, 190, 901, 1281, -2669, 2198, -1502, -1404, + 2593, -694, -186, 466, 1065, 1199, -1905, -1389, + 6171, -1817, -513, -989, -356, 246, 1619, 1883, + 36, -2178, -1602, 608, -1523, 23, 1265, 578, + 953, 1038, -483, -2278, -2138, -1740, 584, 244, + -54, -192, 915, 1097, -213, -1569, 1861, -1401, + 3686, -1625, -1234, -614, 860, 1311, -1397, 2315, + 1896, -1608, -1326, -1487, -99, 2241, 697, 1156, + 1711, -2099, -1507, -135, 1422, -695, -57, 1390, + 823, 937, -122, 479, 47, -2144, -1514, 955, + -1317, -726, 480, 1153, -2959, -2558, -2573, -1355, + -1879, -1446, 6435, 677, 3124, 3134, 1850, 1834, + -1396, -1417, 1290, -896, -561, 1428, 1007, 1105, + -2101, -2044, 1779, -1913, -1868, 1410, 916, 1232, + 1112, 1335, -2663, -104, -513, -96, -470, 480, + 1516, -150, 298, 714, -2558, 3076, 468, -745, + -945, -443, -849, -989, 341, 1102, 433, 588, + -1772, 462, -527, 670, -128, -108, 583, 701, + -2281, -2149, -2398, -2749, -2557, -1691, -1095, 1336, + 9088, 3844, -1799, -1861, -1908, -2242, -2184, 2313, + 3779, -809, 519, 2229, -1914, -1673, 1764, -634, + -1955, -1721, 405, -499, 243, 1632, -2377, 7289, + -1659, -1752, -1341, -948, -323, 841, 1703, 1774, + -2029, 2384, -1877, -1918, -1729, 1483, 483, 1916, + 576, 1258, -2310, -1796, 2208, -1579, 57, -1735, + -1161, 5177, 1674, 2468, -1907, -1499, 1868, 2275, + -620, -356, -228, 489, 1064, 849, -683, -1204, + -1761, -2211, -606, -764, -1056, 3888, 253, 1518, + -2555, -2075, 119, -1567, 971, -1178, 2683, 1476, + 978, 1419, -2947, -2418, -2164, 1178, 1582, 1470, + 896, 645, 1671, 1462, -2234, -1363, -1184, 1408, + 1042, -1091, -208, -49, 527, 917, 1266, -1444, + -2174, -2447, -2300, -1732, 3076, 5631, 248, 2195, + -2477, -1724, -2434, -2477, -2524, -1828, 2331, 845, + 1423, 1767, -2393, -1946, -857, -462, 344, 17, + -896, 2391, 892, 882, -828, -280, -752, -1136, + -1563, -1040, 1222, -1173, 1763, 1179, -1448, 1946, + -1815, -1588, -1638, -1282, 3302, 132, 509, 1408, + -2760, -2338, -1935, 1353, -1531, -1074, 1156, 3086, + 1374, 1667, 2302, -1623, -1897, -1991, -494, 2603, + -754, 524, 1265, 1304, 3062, -1359, -1365, 1987, + -1334, -916, -146, -40, 635, 1033, 1724, -1057, + 49, -1159, -774, 106, 1053, -153, 134, 691, + -119, -1226, 332, -363, -197, -69, -133, 573, + 190, 216, -2236, -294, 1288, -2110, -1537, -1005, + -1175, 56, 4227, 1623, -2440, -1894, -1623, -2377, + 2287, -1220, -1506, 177, 5689, 2849, -2857, -2166, + -2546, 2174, -2414, -2343, 559, -1020, 4650, 3514, + -2875, 1309, -2557, -2534, -2235, -1901, 1559, 4412, + 2301, 2204, -2969, -2018, -2399, -2834, -2431, 1316, + -1474, 1269, 2533, 3485, -2892, -2387, -2716, -2317, + -2031, -1992, -1311, 8071, 3933, 3807, -2139, 1909, + -2200, -2344, -2060, -1638, -1154, -210, 2781, 2139, + 1119, -1828, -2069, -2306, -1975, -1165, -444, 789, + 2409, 1551, -2929, -103, -1920, -2010, -904, 694, + -188, 4, 1051, 1190, -2649, -2454, -2205, -1651, + -1856, -1552, -1165, 352, 3351, 1266, -1719, 57, + -1828, -420, -938, -1251, -461, 1294, 1158, 893 +}, + +.fcb11m = { + -2704, -2459, -2349, -1535, 2807, 365, 1064, 892, + 830, 1222, -2190, -1542, -2285, 6443, -1607, -1362, + -605, 637, 883, 877, -2378, 2292, 3106, -1057, + 1776, -1094, -859, 249, 199, 256, -1537, 2098, + -1126, 2243, -1186, -193, -211, 211, 502, 308, + 3369, 3197, -1271, -1370, -355, -423, -537, 468, + -237, -99, -1439, -1748, -2185, -1972, -1357, -814, + -470, 815, 1306, 6390, 1983, -1169, -1749, -29, + -1368, 5929, -1539, -900, 576, 701, 1708, -1608, + -1148, 3522, -822, -120, -461, -158, -43, 39, + -2543, 8872, -1347, -1580, 222, -488, -162, 295, + 382, 291, 11143, -1223, -1270, -1399, -392, -563, + -500, -604, -544, -135, -1787, -1313, -1490, -1395, + -1100, -1278, -818, 6172, 768, 1597, -623, -681, + -1128, -1575, 7257, -665, -1021, -439, 932, 703, + -1496, -2168, -1945, -1454, -808, -1261, -354, 875, + 6706, 1956, -1773, -1503, -1536, -1162, -1386, -1885, + -1607, -318, -72, -7, -1932, -1349, 6150, -1852, + -345, -18, -81, 223, 339, 425, 362, -1623, + -1432, -1973, -1042, -1373, 7830, 38, -116, 1000, + 421, -2375, -1808, -1832, -1046, 2077, 955, 1576, + 581, 824, -2021, -1582, -1402, -1420, 69, 3549, + -513, 192, 262, 483, -2503, 4173, -11, -1532, + -893, 282, 187, 320, 176, 259, -2308, 2342, + -2385, -2147, -784, -375, 413, 833, 889, 1297, + 1415, -1085, -1009, -1501, -1246, -1298, 1553, 1384, + 332, 662, 2226, -2399, -1752, -857, 1899, 131, + 501, 209, 217, 346, 4294, -1811, -1694, -1080, + -752, -263, -228, 249, 628, 971, 2508, -1031, + 2871, -1054, 42, -202, -738, -170, -239, -290, + -2751, -2379, -2379, -1999, -1448, -380, 1594, 1279, + 1399, 1633, -2376, -1839, 1367, 1685, 356, -126, + -50, 143, 31, 33, 314, 160, -663, -687, + 25, 388, -267, -188, -188, -129, -2614, 1063, + -1835, -285, 2549, 205, -30, 370, 319, 297, + -87, -2208, -1164, -839, 894, -266, -410, 375, + 1263, 924, -2606, -2325, -1854, 1792, 407, 328, + -110, 575, 1090, 971, -2517, -1583, 1355, -1892, + -490, -203, 846, 724, 597, 779, -1650, -1281, + -1294, 549, -146, -548, 2947, -28, 265, 339 +}, + +.fcb11s = { + -1536, -2360, -2378, -2138, -1380, -346, 1575, 2779, + 3247, 1689, -340, -1788, -1839, 103, 31, 853, + -653, 3159, 365, 154, 404, -835, -716, -35, + 4309, -155, -1214, -1180, -750, -522, -753, 350, + -1660, -1603, -1159, -582, -489, 1067, 2615, 1747, + -1755, -2351, -2314, -1453, 922, 3458, 867, 439, + 493, 1212, -1584, -1655, 1300, 1783, 1641, 1442, + 816, -1283, -1456, -1417, 4998, 1923, -200, -1086, + -1060, -1016, -1074, -1217, -1285, -1245, 633, 390, + -1443, -1099, -507, 3041, 343, -163, -745, -667, + 2333, -2144, -2460, -2247, -2063, -1736, -742, 418, + 3124, 3504, 227, -735, 799, -1326, -20, -543, + 1900, 237, -671, -545, -1727, 121, -1750, 3700, + -485, -553, -77, -212, 942, 62, 1647, -688, + -1506, -1429, -619, -839, 172, 3209, -500, -371, + -1680, -1408, -1122, -563, 3627, -115, 510, 534, + -65, 199, 800, 5040, 631, -744, -612, -1023, + -1099, -1319, -1520, -1460, -1120, -274, -1220, 349, + 1848, -620, -1411, -616, 1771, 1024, -1223, -2195, + -2345, -2144, -1517, -1055, -385, 557, 1482, 6797, + -2274, 818, -460, -707, -274, 646, 654, 731, + 268, 347, 4583, -1289, -1452, -1193, -1072, -681, + -178, -131, -108, 547, -1521, -781, -1298, 239, + -486, -445, 3453, -226, 90, 653, -1237, 624, + 4692, -482, -798, -799, -766, -645, -890, -915, + 3748, -909, -1012, 85, 963, 375, -100, -1010, + -1269, -1508, 2106, -1194, 2632, 595, -826, -221, + -411, -1104, -1365, -1050, -2112, -863, 1943, -727, + -1079, -733, 78, 1990, 363, 953, 1325, 459, + -891, 3364, -410, -362, -547, -994, -1371, -1258, + 12270, -43, -1668, -1868, -2004, -2133, -1863, -1949, + -1805, -1288, -1640, 3783, -1414, -578, -505, -464, + -158, 252, 71, 76, 22, -20, -72, -13, + -19, -95, -14, 2, 23, -5, 1289, 630, + 291, -707, -794, -857, -715, -122, 551, 219, + -2358, -1905, -1397, 277, 572, 343, 789, 526, + 1629, 991, -980, 222, 740, 1199, 19, 1200, + -864, -467, -656, -138, 820, -2005, -924, 154, + 195, 393, 267, -183, 1024, 100, 1243, -872, + -705, -781, -422, -377, -910, -637, 89, 2849 +}, + +.fcb16l = { + -2676, -2246, -3119, -2904, -2707, -1946, 7718, 2292, + 2451, 4206, -1214, -362, 1116, -860, 30, -993, + -888, -1046, -3732, -2268, -2541, 6060, -2220, -1597, + -1650, -1320, 88, 1229, 2118, 2348, 1430, -1865, + -2190, -2122, -1844, -2069, -1746, 15, -1746, 1321, + -2671, -2993, -3247, -2811, -2141, -1360, 1886, 270, + -381, 5676, -2070, -444, -674, -1082, -1144, -346, + -823, 4630, -224, 1940, -2441, -2072, -2194, -295, + 2175, 1209, -734, 168, 923, 1359, -2667, 389, + -2585, -2279, -2195, -1141, -1016, -218, 109, 1926, + 5184, -2226, -1888, -1273, -1044, 25, 461, 886, + 1125, 1249, -2215, -2381, 3109, -1963, 3015, -2027, + -790, 1192, 1646, 2188, -2906, -2598, 484, -2372, + -1372, -1082, 1718, 664, 1391, 2396, -2518, 1937, + -2362, -2510, -1504, 2947, 446, 684, 1947, 2059, + -3263, -3001, -3240, -3034, -2598, 3367, 4407, 2327, + 2450, 2994, -2379, -1875, -1862, 6387, -1956, -1417, + -525, 1098, 1836, 2932, 1408, -1130, -1417, 1693, + -262, -645, -515, 443, 735, 619, -2834, -2246, + -2646, -2521, -811, 6608, -421, 1572, 2015, 3234, + -2086, -1435, 89, 1648, 838, -986, -1159, -1208, + -32, 1354, -2135, -2159, 7796, -2424, -949, -2040, + -1179, 228, 1187, 3008, -2963, -2500, -2074, -2025, + -1439, 1692, -378, -596, -62, 2419, -3522, -3132, + -2899, -3290, -2929, 2844, 49, 4307, 2754, 3897, + -2960, 1305, -1858, -831, -1379, -773, 3257, 979, + 975, 1513, -2849, -1610, 2483, 456, -1395, -634, + 847, 1320, 1116, 1175, 2497, -1554, 2176, -1697, + -997, -799, -120, 339, 996, 1379, 11359, -1557, + -2219, -2237, -1792, -2084, -1009, 781, 3341, 939, + 1954, -1860, -2347, -2117, -2000, -1394, 3825, 106, + 2595, 2162, -2938, -2488, -2112, 772, -1059, 1822, + 159, 1017, 2452, 1506, 1313, -2615, -2479, -2941, + -2220, -2510, -726, 4703, 1778, 3375, -3133, -2664, + -2821, -2771, 1559, -1000, -434, 1874, 4130, 2987, + -2998, -2692, -2326, 1580, -2231, -1347, 4166, 2021, + 1177, 2531, -2880, -2337, -2589, 1505, -2843, -2468, + -339, -1059, 3212, 4264, -3112, -2885, -2889, 975, + -2522, -2278, 721, 5057, 3989, 3373, -3098, -2947, + -1128, -2251, 1935, 2981, 3007, 975, 1983, 2048, + -2861, -2302, -2431, -1460, -1492, -1524, -944, 1556, + 1778, 1549, -2658, -2259, 2768, -2460, -1447, 2957, + 759, 324, 2533, 2477, -2935, -1687, -2554, -2647, + -1431, 118, -365, 10280, 1526, 3447, -2570, 2268, + -2351, -2115, 2588, -9, -834, 1115, 1878, 2365, + 79, 1132, -1619, -1406, -1568, -1766, -224, 825, + 2113, 1382, -548, -2669, -1797, -2691, -2139, -2495, + -210, 1276, 13623, 2315, 1965, -1713, -1610, -2187, + 2534, -1495, -1301, 622, 563, 2154, 2743, 3230, + -1784, -1774, -792, -493, -131, 156, 944, 1211, + -1886, 357, -1018, 225, -285, 1025, -134, 218, + 290, 153, 5869, -2407, -2856, -3051, -2540, -3238, + -2260, -370, -451, 6314, -500, -2554, -2110, -879, + -323, -537, 570, 1228, 1556, 1342, -2486, 3366, + 1838, -937, -959, -683, 63, 937, 652, 1212, + -2164, -1448, 166, -799, -550, -1317, 481, 299, + 5494, 1360, -3147, -2574, -989, 1550, 1952, -1502, + -96, 3517, 1304, 2311, -2931, -2146, -2174, -2052, + 579, 680, 896, 2697, 703, 1365, 4130, -2367, + -2627, -3125, -934, -3093, -2155, -955, 6025, 5024, + -3121, -3064, -2883, -2458, 1723, -842, 3032, 4391, + 2327, 2837, -2536, -2208, -1610, -2189, 6509, -1424, + -1116, 1427, 2830, 3370, 1084, -1562, -1655, -1628, + -491, 2260, -321, 421, 774, 1237, -3267, 977, + -3170, -3144, -2698, -1324, 1424, 3034, 3323, 3347, + -3021, -3061, 2027, -2345, 852, -2832, -1714, 5926, + 4517, 3839, -1490, -2416, -1726, -1268, -1458, -2137, + -1715, -580, 1403, 13408, -3005, -2706, -3063, -2745, + -2777, -2136, 2786, 202, 5141, 3407, -3104, -3001, + -3176, -3388, -3507, -2863, -2097, 2325, 2618, 6146, + -1997, -3152, -1036, -2694, -2587, -2986, -2750, -2219, + -1607, 5944, -2893, -2633, -2229, -2811, -2482, -2115, + -2219, -1180, 5246, 3252, -3111, -2052, -2693, -2934, + -1805, 2583, 353, 1262, 8588, 3900, -2468, -2726, + -1861, -2352, -2237, -2750, -2345, -1936, 9793, 8392, + -3490, -3124, -3596, -3630, -3154, -2390, 743, 6652, + 6366, 6143, -2852, -3547, -3124, -2718, -1094, -494, + 49, -1053, -3005, 32767, -1721, -1229, -1715, -1590, + 1587, -1233, 3384, -252, 312, 1120, -3287, -2926, + -3048, -2828, -2502, -1185, 2028, 3778, 487, 2083 +}, + +.fcb16m = { + 616, -1065, -1622, -1949, -1283, -863, 6819, 517, + 1135, 1282, 2631, -1447, -1477, -1004, 286, 1358, + -135, -340, 147, -130, 5435, -1609, -1916, -1758, + -1066, -1126, 478, 995, 1098, 1437, -1737, -1339, + -1864, -2009, -1038, -1004, -573, 810, 5974, 2840, + 349, -1559, -1496, -1151, -307, -82, 681, 827, + 550, 776, 1930, 166, -1100, -1489, -1185, -1182, + -1210, -326, 858, 1688, -2561, 3514, -736, 1555, + -59, -906, -123, 87, 102, 274, 1902, -459, + 3008, -984, -707, -334, -571, -317, -190, -371, + -2862, 607, 1346, -1517, -1220, -617, 2494, 697, + 190, 64, 3264, 3926, -1249, -1542, -933, -302, + -246, -248, 69, -283, -1766, -750, -1898, -1259, + 6841, -1546, -785, -64, 1208, 1294, -1522, -1742, + -1873, -1898, -1455, 7128, -752, 1718, 1398, 1123, + -2742, 4733, -1552, -2483, -2210, -495, 355, 864, + 830, 759, -2721, -2115, -1891, -1696, -1137, -1559, + -1265, -658, -591, 850, -699, 1262, -551, -1055, + 877, 96, -388, -192, -479, -1091, -2763, -1379, + 3290, 2331, -874, -307, -386, 615, 366, 133, + -2671, 5181, 4339, -894, -871, -634, -165, 409, + 91, -291, -2649, -411, 8039, -1947, -1156, 57, + 351, 1014, 472, -198, -1816, -590, 2887, -1702, + -1113, 3414, -556, 117, 483, -377, -1707, -1146, + -1155, 2518, 2014, -382, 3, -6, 206, -98, + 10770, 274, -1415, -1670, -1020, -1036, -786, -782, + -463, -552, -2500, 10460, -1624, -1787, -707, -1327, + -59, 375, 91, 22, -2776, -2343, -2104, 825, + -759, -823, 482, 1149, 1265, 570, -1676, -1826, + -1848, 6125, -1391, -820, -449, 844, 586, 535, + -2873, -2475, -2607, -2611, -1830, -487, 1643, 1680, + 2088, 2570, -2357, -993, 3189, -1473, 3506, -1203, + -793, 662, 464, 98, -2507, 1617, -1793, -1935, + -1307, -169, 9, 885, 728, 1178, -2010, -1346, + -1375, -187, -548, 2753, -464, -105, 799, 511, + -2170, -2428, -2177, -1497, 2072, 828, 441, 1020, + 873, 1000, -1297, -1531, -1863, -1967, -1516, -1088, + -758, -230, 1561, 6655, -2173, -1787, -1548, -1763, + -1366, -24, -645, 6836, 1480, 1923, -2728, -1859, + 1798, -2010, -1585, -677, -371, 1405, 1254, 1278 +}, + +.fcb16s = { + -2250, -2771, -2879, -2775, -2240, -1363, -272, 1233, + 6172, 5074, -2882, -2419, -2054, -2420, -1252, 347, + 1325, 1799, 1723, 4361, 774, 2066, 1874, 280, + -707, -605, -581, -662, -1104, -2038, 7111, -137, + -883, -1079, -1001, -54, -847, -1013, -1045, -832, + 4696, 3781, -624, -1485, -1360, -1359, -1307, -1219, + -866, -945, 5419, -1512, -2307, -2134, -2056, -1724, + -1653, -630, 157, 3399, -727, -860, -1381, -380, + -716, -1335, 3819, 78, -2, 277, -3185, -3118, + -2715, -3110, -1500, 1626, 3352, 3075, 1956, -539, + 16640, -1204, -2281, -2307, -2272, -2349, -2009, -2184, + -2777, -2375, -1015, 6208, -402, -1331, -1182, -763, + -730, -81, -591, -1184, -1927, 543, 4464, -1095, + -131, -542, -129, 486, -366, -1097, -1594, -554, + -15, -337, 3152, -723, 71, -40, 385, -309, + -769, 290, -853, -1058, -1196, -1557, -595, 3695, + 1129, 438, 1729, -1309, -971, -871, 90, 1418, + 1261, -23, -1382, -223, -1551, -713, -1044, 4495, + -160, -867, -1242, 1188, 159, 120, -1657, -951, + 1536, -159, -1310, 1101, -404, 155, 1717, -24, + -1607, 2347, 2056, -1943, -1313, -1297, -81, 34, + 1441, 354, -2110, -1873, -516, 1102, 2174, 2131, + 0, -946, -729, 61, 107, -14, -108, -50, + 42, -164, -177, -92, -29, 162, 1349, -2380, + -2099, -1692, -980, -49, -94, 331, 1317, 3819, + -482, -782, -775, -909, -640, -1099, -615, -225, + 1556, 2973, -630, 70, -186, -1599, -1076, 4440, + -890, 78, -76, -517, -855, -1886, -1521, -1206, + -1152, -900, 753, 1338, 1758, 2431, -2433, -1569, + -1294, -583, 552, 2040, -154, 250, 513, 2333, + -820, -1987, -2291, -2238, -1880, -1651, -1120, -262, + 2013, 9756, -2803, -2574, -2634, -2789, 356, -1838, + 325, 4584, 3584, 2486, -1524, 1874, -337, -1800, + -1659, 406, 2450, 1252, -245, -1030, 1985, -397, + -1565, -51, 148, 2039, -1212, -729, -700, -11, + 904, 649, 531, -2287, -1640, 766, -725, 171, + -1596, 1387, 3189, -672, -459, -794, -422, -714, + -195, -231, 185, 99, -952, -2248, -2170, -1190, + -457, 1458, 34, 1179, 2427, 1683, -1658, 3749, + -1816, -2000, 2823, -1243, -1415, 713, 875, 75 +}, + +.fcb22l_1 = { + 2198, -2215, -2251, -1966, -1540, -467, 403, 1647, + -2867, -2589, -34, -2314, -602, 2371, 2614, 2218, + -2494, 3659, 2708, -1076, -914, 233, 1149, 1425, + 319, -979, 1023, -682, 110, 239, 427, 703, + -2979, -2513, -2649, -2265, 7420, 526, 2174, 2932, + -2868, -2056, -2232, 1651, -1325, -856, -218, 2091, + 458, 1508, -1208, -845, 244, -441, 558, 752, + -700, -1370, -395, 980, -321, -232, -241, 293, + 10391, -1792, -1948, -1518, -1049, 43, 1524, 2033, + -2434, 303, 1730, -1205, -1432, -1183, -694, 1185, + -2531, -2656, -2751, -1756, -1321, -1100, 287, 8605, + -2868, -2554, 721, -2065, -1671, -771, 675, 2223, + -2690, -2501, -2313, 1829, 3189, 45, 1825, 2024, + -3153, -2824, -2729, -2308, 1686, -370, 482, 2606, + -2972, -2324, 2492, -1762, -1662, 28, 4976, 3214, + -2769, -316, -1146, -1954, 86, -60, -370, 1144, + 5519, -1785, -1538, -1044, -580, -89, 704, 1151, + -2586, -1094, 7473, -1220, -1076, -50, 1029, 1850, + 3546, 3279, -1806, -1191, -528, 682, 1160, 1341, + -2852, 1541, -2358, -1841, -2317, -1351, 993, 2417, + -2675, 2482, -2061, -2089, 3681, 626, 1619, 1818, + -2916, 2821, -2482, -2166, -1084, 1137, 5537, 2864, + -2499, -1782, 2156, 2558, -1117, 127, 1147, 1556, + -2572, 3865, -2008, -1805, -679, 119, 35, 1319, + -2704, -1872, -1756, 6843, -911, 322, 1641, 2461, + -2652, -1957, 1972, -1582, 3082, 84, 1086, 1487, + -2983, -2325, -2780, -2532, -1858, -279, 10092, 4519, + -2364, 2718, -1907, 2678, -1005, 246, 1499, 1679, + -2570, 8779, -2004, -1627, -844, 89, 1712, 2145, + 3316, -1763, -1642, 2819, -599, 9, 906, 1401, + -2289, -2224, 2462, -1580, -843, 2501, -24, 1310, + 3091, -1745, 2398, -1264, -731, 113, 831, 1328, + -2803, -2380, -2808, -2379, -2290, -1376, -234, 2242, + 3537, -2137, -2050, -1260, 2881, 177, 1158, 1424, + -3303, -3123, -3130, -2861, -2075, 2528, -43, 3890, + -3106, -2672, -2554, 1833, -826, 55, 4910, 3324, + 3993, -2176, -2446, -1848, -786, 3346, 1590, 2034, + -2725, -265, 303, 1076, -1985, 3661, 1556, 1983, + -3182, -2712, -2988, -2841, -1332, 4816, 6422, 4184, + -2230, -1248, -2176, -1806, -1617, -878, 3764, 1309, + -2280, 509, -211, 426, 773, 99, 513, 628, + 167, 196, -2256, -1802, -1157, 724, 1405, 1383, + 2384, -409, -672, -453, -205, -89, -12, 240, + 114, -2220, -807, -1302, -1612, -405, 1134, 1381, + 699, -1816, -2151, -1883, 2975, 928, 1527, 1565, + 775, -2141, -1981, -1532, -591, 3338, 683, 1763, + 466, -2028, -2086, 1448, -622, 589, 1294, 1150, + 145, -2382, -1093, -367, 986, 323, 404, 931, + -371, -2868, -2737, -2103, 129, 771, 1498, 1974, + -1481, -1060, -2398, -1125, 285, 2777, 2975, 1431, + -2720, 1748, -2375, -1847, -912, 3829, 808, 2034, + -2492, -2447, -1248, -991, 1449, 1304, 867, 1171, + -2999, -2556, -2763, -2298, 3359, 4277, 1991, 2850, + -2692, -2640, -2593, 1813, -458, 3068, 1012, 2049, + -3258, -2820, -2845, -2395, 2787, -45, 5457, 3568, + -2491, -2114, -1884, 6, -332, -232, 1680, 1139, + 2032, -2383, -2183, -1725, -914, 192, 4175, 2059, + -2922, -2972, -2920, -2210, -1143, 1850, 2468, 1871, + -3138, -99, -2651, -2510, -129, 631, 1677, 1925, + -3302, -3124, -3214, -3143, -2616, -761, 3978, 4234, + -1698, -824, -1975, -742, 2449, -610, 21, 998, + -3047, -2697, -2747, -1919, -1545, 7534, 1243, 3548, + -1863, -1257, 339, -1027, 122, -613, 1989, 953, + -2232, -1759, -1751, -969, -1591, 1917, -325, 889 +}, + +.fcb22m_1 = { + 13531, -1278, -2217, -1956, -1360, -892, -650, -866, + -255, 192, -1139, -1242, -2101, -1682, -1601, 2950, + 2340, 121, 662, 446, -2636, 1711, 615, -1864, + -1297, -1098, -296, 1070, 1284, 891, 7332, -2292, + -2334, -1889, -1170, 1884, -570, 52, 1146, 944, + -2083, -2192, -2420, -2165, -1542, -1474, -278, 4147, + 1506, 1666, 1014, -1657, -2225, -2261, 8568, -1445, + -523, -115, 999, 602, -2762, -2261, 271, -1797, + -1633, -790, 391, 907, 1302, 1076, -1907, -2219, + -2443, -1963, -1495, -1294, 4722, 935, 1691, 1370, + -2355, -1585, -2510, -2297, 2690, -1491, -647, 360, + 1460, 1479, -2041, 368, 10454, -1277, -716, -172, + -538, -287, 169, -232, 960, -1087, -2459, -2196, + -1189, -1967, -1586, -783, 5275, 2811, -1523, -1733, + -2373, -1946, -1586, -1280, -442, -205, 2330, 6319, + -2483, -2115, -2645, -2016, -1464, 89, 529, 1338, + 5291, 3186, 5770, -2311, -2696, -2420, -619, -2322, + 8434, -129, 1661, 1232, -1377, -1277, -1193, 406, + -1332, -1246, -999, -497, 1024, 1500, -2791, -1417, + -2173, 2419, -1492, -734, 2795, 559, 750, 519, + -2714, -509, 4622, 3679, -294, 73, -805, 602, + -99, 94, -2658, -1984, 6907, -1780, -1244, 272, + 874, 140, 1326, 693, -2679, -2274, -2551, 13351, + -2619, 4570, -1739, 2309, 1280, 1235, -1011, -2084, + -1968, -1404, 2568, 3147, -336, 270, 499, 506, + -1567, -2240, -2685, -1951, -2254, 2783, -1411, 8878, + 2321, 1691, -2567, -2450, -2572, -2286, -2038, -1803, + -1316, -315, 464, 1223, -1988, -927, -2035, 2165, + 3663, -919, -328, 229, -2, 217, -2773, -2160, + -2637, -2183, 5081, -1434, 1526, 2830, 1698, 1153, + -2810, -1132, 5408, -1992, 4267, -1357, 809, 563, + 9, -64, -2949, 7061, 4604, -1424, -1839, -610, + -251, 370, 901, 147, -2264, 3135, 3241, -1102, + -397, -1292, 39, 17, 380, 383, -1483, -1458, + 820, 2135, -646, -479, 173, 23, -274, -442, + -978, -1216, -1928, 7260, -1249, -956, -24, 250, + 438, 128, 4080, 152, 2677, -587, -667, -672, + -662, -492, -722, -688, -1907, -787, 3101, -1404, + -1234, -508, 3817, 424, 657, -86, -2179, -599, + 2141, -1446, -1847, 4341, -801, -26, -57, 216, + -1625, -802, 1752, -1301, 2617, -1545, -513, -401, + 234, 658, 1299, -1279, 874, -1408, -1135, -40, + -423, 394, 660, 684, 3341, -937, -1842, -1177, + 1945, -621, 19, -93, 141, -59, -2626, 3368, + -1588, -1959, -1506, 3729, -347, 218, 497, 585, + -2495, -2452, -2118, 578, -225, 378, 40, 1080, + 908, 761, -2070, -1607, 2534, -1535, 1493, 2664, + 215, 634, 317, -233, 4188, -1446, -2129, -1812, + -1428, -1579, -1038, 97, 989, 2038, 3671, -2707, + -2608, -2198, -1119, 1601, 1042, 1325, 1230, 1149, + -2566, -1054, 3659, -2173, -1772, -713, -1080, -101, + 987, 805, -1555, -749, -1510, 3443, -1402, 4172, + -696, 437, 276, 219, -2735, -2453, -2082, 3898, + -867, -582, -726, 1134, 1227, 1121, 2333, -963, + -1474, 2386, -959, -327, -138, 4, 268, 479, + -2889, -2896, -2701, -1975, -593, 1212, 1511, 1087, + 1482, 1612, -1703, 4874, 46, -1364, -1342, -544, + -879, -455, -488, -396, -2616, 849, -2424, -1976, + -1491, -739, 325, 1284, 1831, 1223, -48, -1457, + -2123, -1318, 1617, -1064, 2484, -467, 533, 707, + 351, 422, -525, -657, 202, -476, 133, -679, + -945, -832, 1906, -2981, -2605, -1911, -2541, 11553, + -1585, 1555, 2196, 1616, -2669, -2345, -2423, -1848, + -1756, 4918, -711, 1186, 1873, 1399, -672, -1401, + -1524, -1138, -674, 1285, 195, 884, -377, -1067, + -2125, 377, -1747, -1604, 837, -334, -115, -59, + 160, 483, -2220, 12861, -1633, -1616, -926, -1203, + -113, -90, 378, 148, 5740, 88, -2246, -1598, + -1546, -1694, 2790, -72, 590, 28, -2608, 4312, + -1068, 3091, -632, -651, 366, 63, 744, 375, + 1746, 2753, -2075, -1621, -1033, -471, 972, 199, + 575, 655, -2148, 2407, -2180, -1764, -1030, -1089, + 4083, -80, 417, 384, 1196, -2284, -2549, -1771, + -773, 213, 1188, 788, 1343, 1358, -2584, 7723, + -2171, -2301, -1497, -438, 1001, 110, 671, 939, + 6435, 5777, -1765, -1287, -1181, -1014, 87, -919, + -422, -444, -1930, 4906, -1660, -1558, 3617, -1177, + 261, 9, 261, -47, -2539, 2749, -2476, -2298, + -1047, -1319, -341, -604, 2111, 2779, -2935, 5011, + -1860, -2363, -1686, -1033, 800, 1774, 1700, 1478 +}, + +.fcb22s_1 = { + 11523, -796, -1488, -1897, -1888, -1691, -1767, -1794, + -1622, -1210, -2284, -2777, -2382, -1371, -238, 2997, + 3182, 588, 1129, 704, 248, 1703, -264, -1306, + -1147, -560, -1513, -956, 1667, 1340, 5220, -2276, + -2215, -2049, -1479, -1294, -774, 66, 1270, 2075, + -1435, -1981, -2322, -1896, -1321, -462, 138, 5022, + 2549, 1683, -100, -1744, -1528, -423, 6093, -61, + -288, -623, -650, -828, -1521, 134, 1240, -1399, + -1450, 612, -969, 2585, 945, -312, -1138, -2488, + -2513, -1988, -1607, -773, 3384, 1192, 2651, 2580, + -984, -2015, -1465, -1576, 2273, -1221, 91, 2615, + 840, 1299, -1069, -2151, -1899, -735, 440, 888, + -241, 502, 953, 3613, 1806, -1855, -2303, -1758, + -1318, -1484, -10, 597, 3723, 1992, -488, -2063, + -2284, -2172, -1905, -1547, -937, -18, 3276, 7184, + -1942, -2302, -2399, -1972, -1378, -635, 302, 1081, + 5454, 3358, -447, -807, 205, -1805, -1546, -446, + 6364, -916, 151, -377, -582, -856, -204, -731, + -884, -674, -257, -67, 1564, 2486, 1003, -1508, + -1692, 1515, -889, -622, 2366, 9, -17, -245, + 3733, -1057, -284, 3197, -31, -440, -1115, -1609, + -1834, -1930, 230, 262, 7344, -39, -1746, -562, + -1554, -1838, -1648, -1310, 2157, 80, -102, 238, + -823, -622, -720, -115, -274, 16, -1562, -1785, + -1535, -334, 2604, 3388, -410, -103, -348, -142, + 1676, -441, -2267, -1988, -1421, -680, 1302, 2682, + 383, -10, 1487, -1086, -251, -1134, 141, -84, + -1003, -898, 95, 2304, 802, -1549, -1562, 2650, + 2180, 64, -512, -832, -705, -429, 1826, -2283, + -1976, -1277, 2699, 504, 249, -9, 178, -33, + -1357, -1138, 3005, 293, 229, 1633, -197, -540, + -1245, -1617, -1269, 6639, 2437, -647, -1501, -1097, + -1051, -1150, -1183, -1461, 71, 1529, 2847, 1149, + -705, -1345, -1605, -629, -617, -60, -2081, -1435, + 938, 844, -1055, -841, 1179, 392, 1112, 946, + -1252, -1728, -266, 7063, -1335, -920, -1048, 206, + 48, -619, 4764, 274, 2394, -799, -798, -1003, + -1278, -1800, -1626, -1415, -498, 1439, 1643, -1978, + -1258, -1136, 1285, -9, 596, 141, -2211, 908, + 802, -470, -1125, 3216, -234, -412, 3, -980, + 15, -1047, 1530, 660, 1986, -480, -499, -550, + -733, -531, 1326, -1607, 787, -1136, -1002, -65, + 358, 743, 253, -294, 3498, -1033, -1270, -790, + 537, 1788, 309, -72, -1241, -1999, 609, 2981, + -1025, -1642, -958, 3845, -1221, -962, -965, -1612, + -1993, -33, -1136, 1086, -46, 1178, -229, 139, + 644, 718, -1696, 2411, 1019, -1056, 52, 224, + -487, -395, -40, 125, 3001, -1955, -1950, -784, + -1111, 897, -514, 159, 785, 1095, 2944, -2554, + -2407, -1975, -632, 1030, 1712, 366, 463, 125, + -2354, -796, 5663, -1055, -1151, -870, 348, -676, + 1447, 215, -1005, -1531, -910, 2249, -438, 2889, + 107, -404, -271, -534, -1022, -2117, -1738, 2261, + -257, -788, 32, 1747, 1196, 910, 33, 1, + -23, 28, -25, 19, 13, -29, -23, -48, + -907, -2113, -1978, -1426, -535, 1589, 1908, 2724, + 1646, -897, 758, 2326, 674, -1449, 111, 220, + 475, -162, -1465, -2036, -528, 1308, -2087, -2031, + -1308, 183, 35, 1097, 1008, 1864, -2116, -2303, + -1928, -261, 2342, -292, 1480, 268, 1582, 1079, + -1183, -1154, -777, 309, 1218, 683, 1314, 1677, + -758, -1745, 1422, -1331, -1638, -1100, -303, 5003, + -57, -379, -511, -756, -727, -2315, -1860, -1775, + -676, 3854, -67, -52, 2018, 1532, -160, -197, + -75, -1934, -1134, 2025, 1810, -491, 83, 646, + 390, -297, -441, -342, -479, -486, -296, -30, + 443, 1151, 3508, 6119, -493, -1427, -1393, -1273, + -1280, -1687, -1683, -1511, 5109, -1008, -1137, -638, + -649, -342, -590, -478, -577, -349, -579, 2548, + -463, 2107, -568, -678, -788, -454, -608, -452, + 1934, 1485, -1746, -1007, -1174, -573, 239, -119, + 679, -76, -1687, 1956, -898, -477, 456, -156, + 1460, 13, 92, -987, 554, -2772, -2578, -1694, + -235, 753, 1527, 1106, 1539, 1342, -1305, 6560, + -1526, -1765, -793, -600, 248, -542, -63, -421, + 4828, 1288, -1580, -1826, -1163, -1014, -221, -818, + -109, -61, 1265, 1939, -1265, -414, 1912, -190, + -1157, -675, -756, -935, 2529, 136, -1709, -1727, + -1819, -1504, -1232, -959, 1128, 4142, -1945, 2958, + -900, -1432, -1720, -1380, 381, 1473, 1235, 1062 +}, + +.fcb22l_2 = { + 2441, -2086, -2129, -2146, -1839, -1035, 295, 2465, + -2785, -2597, -81, -2162, -991, 3060, 3056, 2985, + -2415, 4009, 3058, -1165, -1281, -322, 629, 2232, + 481, -2255, 1165, -1455, -621, -29, 923, 1371, + -2822, -2421, -2596, -1908, 6338, 279, 1845, 3532, + -2955, -2571, -2554, 744, -1785, -909, 775, 3156, + 738, 1760, -458, -590, -73, 22, -91, 326, + -1098, -1511, -1000, 1741, -1024, -562, -399, 736, + 9669, -2109, -1872, -1539, -1208, -265, 994, 2364, + -2121, -98, 1523, -1427, -1450, -1157, -294, 1375, + -3007, -2669, -2847, -1777, -1196, -1257, 1065, 9128, + -2948, -2509, 470, -2521, -1947, -728, 503, 3810, + -2538, -2469, -2217, 1957, 2580, -229, 1212, 2263, + -3174, -2660, -2792, -2692, 1226, -512, 555, 3960, + -2979, -2426, 1978, -2182, -1868, -455, 4681, 4580, + -2514, -1642, -1029, -1712, 416, -838, -362, 1208, + 5211, -2128, -1867, -1337, -549, -70, 828, 1508, + -2272, -1611, 7307, -1612, -1244, -461, 749, 2510, + 3669, 3236, -1845, -1333, -866, 268, 850, 1686, + -2805, 1079, -2258, -2075, -2017, -1115, 214, 2735, + -2719, 2676, -2154, -1976, 2884, 393, 1247, 2382, + -3043, 2188, -2703, -2353, -1861, -208, 4419, 4511, + -2187, -1630, 2246, 2331, -1105, -198, 818, 1721, + -2180, 3571, -1841, -1738, -1020, 14, 407, 1028, + -2536, -2171, -2115, 6630, -968, -306, 1438, 3574, + -2411, -1857, 1911, -1546, 2709, 57, 910, 1727, + -3159, -2565, -2675, -2746, -2017, -534, 8461, 6103, + -2299, 2912, -1851, 2660, -1479, -97, 1148, 2204, + -2510, 8781, -2194, -1790, -1114, -110, 1140, 2885, + 3261, -1921, -1633, 2766, -788, -403, 610, 1651, + -2515, -2021, 2415, -1606, -1149, 2479, 297, 1693, + 3823, -1538, 2514, -1261, -904, -236, 550, 1581, + -2903, -2440, -2922, -2749, -2480, -1849, -423, 3613, + 3420, -1876, -1929, -1537, 2955, 58, 1014, 1950, + -3295, -3009, -3161, -2926, -2353, 2355, 351, 5502, + -3140, -2745, -2781, 1247, -1037, 538, 4939, 4382, + 3584, -2284, -2321, -1844, -743, 3156, 1546, 2358, + -562, -101, -497, -1196, -1023, 1972, 1255, 1374, + -3146, -2824, -3057, -2757, -1736, 3746, 5609, 5118, + -2155, -1665, -1701, -1780, -1975, -1127, 3185, 2036, + -2540, 324, -481, 311, 624, 719, 543, 1030, + 550, 513, -2430, -1817, -1129, 62, 1526, 1809, + 2172, -1314, -1035, -586, -292, 233, 209, 543, + -252, -2372, -1961, -1629, -1306, -408, 451, 1339, + 792, -2619, -2316, -1624, 1941, 678, 977, 1710, + 428, -2499, -2369, -2101, -1448, 2988, 874, 2497, + 451, -2263, -2204, 1403, -631, 694, 1424, 1658, + -243, -2104, -378, 355, 1446, 373, 377, 973, + -756, -2802, -2508, -2081, 177, 352, 2428, 2359, + -1533, -2710, -2544, -1102, 419, 3132, 1222, 1942, + -2756, 1844, -2429, -1854, -1283, 3960, 1633, 2917, + -2858, -2784, -2106, -1025, 1588, 905, 1092, 1657, + -3028, -2715, -2782, -2218, 2852, 4006, 2534, 3726, + -2783, -2355, -2146, 2113, -1201, 3361, 1178, 2670, + -3199, -2796, -2682, -2489, 1905, -471, 5097, 4436, + -2197, -1078, -2327, 420, -637, 10, 1647, 1362, + 1815, -2519, -2363, -2174, -1454, -31, 4125, 3446, + -3054, -2953, -2738, -2328, -1636, 1086, 2238, 2132, + -3089, -432, -2674, -2515, -168, 745, 2236, 2305, + -3214, -2953, -3159, -3086, -2748, -1200, 3346, 5127, + -1150, -501, -2109, -1662, 2301, -401, 651, 1320, + -3072, -2608, -2833, -2249, -1387, 7704, 1811, 4960, + -2474, -2589, 83, -499, -785, 194, 1312, 1442, + -2716, -1663, -2088, -1812, -1396, 1862, -369, 1397 +}, + +.fcb22m_2 = { + 8809, -2291, -2452, -1982, -1356, -423, 419, 588, + 897, 1086, 79, -2155, -1957, 367, 1080, 233, + 718, 441, 515, 642, 730, 2454, 774, -2299, + -1526, -784, -359, 96, 385, 482, 4905, -2501, + -2431, -2047, -1139, 131, 743, 999, 1243, 1294, + -2154, -433, -2461, -2201, -1552, -163, -200, 4009, + 1731, 1652, -2381, 5295, -1457, -895, 3480, -1230, + -94, 471, 554, 669, -2458, -1271, 278, -2238, + -1852, -813, 888, 1032, 801, 1008, -258, -538, + -1744, -2087, -1651, -1239, 2222, -4, 783, 882, + 478, 782, -1335, -1453, 1728, -627, -387, -205, + 221, 193, -2282, -518, 7464, -1808, -1134, -199, + 340, 321, 410, 617, 2278, -436, -2082, -1958, + -1493, -885, 628, 794, 855, 989, 232, -1115, + -2617, -2152, -1290, -1299, -458, 222, 3936, 3349, + -2240, -2787, -2689, -2255, -1241, 816, 2307, 1566, + 1685, 1723, 2960, -2134, -2532, -1798, -1128, -1073, + 5380, 1013, 1525, 1415, -1976, 456, -538, -1433, + -1347, 22, -496, 284, 387, 465, -2214, -1863, + -2261, 1049, -1487, -1222, 1610, 621, 1000, 1116, + -2393, -731, 4075, 2375, -1178, -908, -383, 327, + 543, 572, -2071, -2039, 3310, -1903, -1502, -72, + 123, 693, 721, 918, -1866, -1251, -1065, 5630, + -1574, -541, 1, 1014, 813, 887, -2145, -2421, + -2176, -1756, 1856, 408, -1, 759, 1109, 1276, + 3053, -2705, -2467, -2068, -1160, 1405, 459, 1167, + 1219, 1318, -2198, -2037, -2005, -2204, -2039, -1473, + -1529, 264, 1333, 1822, -2121, -1434, -472, 1901, + 2448, -589, -424, 248, 376, 602, -1571, -1032, + -1243, -1619, 5682, -1162, 362, 570, 865, 852, + -1875, -805, 4258, -1569, 2992, -1175, 51, 164, + 314, 648, -2083, 5574, 2553, -1866, -1156, -642, + -198, 330, 446, 602, -2365, 1601, 2873, -2043, + -1510, -1142, -20, 588, 535, 676, -2207, -1637, + 626, 745, -1548, -590, 745, 540, 505, 618, + 749, -1389, 857, 1387, -398, -606, -75, -86, + 11, 78, 3322, -1347, 1978, -1431, -745, -280, + -42, 135, 350, 376, -508, -1349, 2961, -1184, + -647, -1257, 3009, -374, 523, 616, -1848, -41, + 2652, -1609, -1603, 3284, -24, 502, 122, 448, + -2337, -1029, 734, -1533, 1523, -1312, -754, 335, + 510, 774, 769, -117, 139, -1254, -1468, -965, + -375, 2, 227, 518, 3187, -1524, -776, -1253, + 2977, -530, 319, -61, 244, 413, -2290, 3085, + -1763, -1480, -1374, 3272, -87, 323, 421, 652, + -2317, -2182, -1604, -1, -801, 1320, -156, 907, + 799, 918, -1494, -2205, 1137, 69, 1249, 3437, + 925, 29, 419, 448, 3574, -1564, -1713, 2374, + -941, -252, 123, 263, 366, 539, 1059, -1856, + -1753, 766, -1704, 106, 262, 596, 684, 820, + -2503, -1878, 1835, -594, -1024, -2105, -1567, 488, + 794, 883, -1626, -613, -1410, 2846, -1413, 3557, + -348, 460, 332, 577, -907, 700, -1680, 1130, + -1637, -793, -160, -38, 473, 630, 1487, 1872, + -1526, 1379, -806, 121, -383, 149, 259, 413, + 759, -2817, -2758, -2290, -1348, 460, 1782, 1536, + 1513, 1503, -2265, 3193, 117, -1704, -1367, -487, + 125, 365, 594, 651, -2287, 1272, -2537, -2038, + -1515, -578, 2994, 582, 941, 1058, -1556, -1583, + -720, -1584, 956, -1032, 1861, 146, 402, 429, + -2184, 1667, 1241, 289, 52, -232, -265, 210, + 248, 331, 1133, -1813, -1869, -1429, -1484, 5620, + -400, 1316, 1146, 1150, -1975, -818, -1921, -2054, + -1768, 2953, -544, 426, 856, 1107, 493, -2019, + 176, -1915, -1040, 717, -91, 728, 647, 776, + -2360, 739, -2136, 30, 636, -447, -116, 498, + 531, 775, -2250, 8607, -2075, -1928, -1072, -450, + 38, 439, 558, 778, 4484, 1056, -1830, -1716, + -988, -412, 260, 56, 425, 579, -2243, 4094, + -1267, 2172, -990, -562, 97, 304, 533, 609, + 790, 780, -2029, -1947, -1327, 1224, 255, 344, + 516, 660, -591, 1702, -118, -1402, 396, -1387, + 2268, -247, 177, 355, 1393, -2318, -1975, -1563, + 863, -939, -365, 411, 800, 1019, -2370, 4656, + -2301, -2111, -1679, -698, 458, 788, 1004, 1138, + 2285, 4924, -1940, -1955, -1159, -436, 237, 5, + 300, 364, -2492, 2165, -2021, -2072, 1504, -612, + -93, 249, 676, 799, -2411, 1952, -1752, -2418, + -2285, -1323, -621, 837, 1043, 1266, 76, 3160, + -2176, -2176, -1717, -1105, 1045, 410, 728, 940 +}, + +.fcb22s_2 = { + 6946, -1850, -1986, -1590, -1276, -1063, -1026, -1017, + -805, -346, 9, -2911, -2843, -1899, -198, 2193, + 3325, 1315, 37, -528, -371, 599, -751, -2157, + -1912, -855, 988, 1222, 1085, 953, 3212, -2793, + -2564, -1707, -657, 683, 1109, 683, 647, 446, + -1906, -2315, -2569, -2428, -1698, -600, 1100, 3790, + 3368, 2172, 2017, -895, -1354, -734, 2552, -403, + -68, -402, -752, -932, -1205, -1937, 572, -1434, + -500, -579, 291, 1723, 1312, 1695, -238, -1715, + -2029, -1525, -816, -363, 2816, 167, 2196, 1793, + 897, -1081, -262, -1338, 1052, -1231, -94, 1296, + 503, 184, 588, -2057, -911, -1933, -1769, 167, + 1013, 1774, 1414, 1289, 2406, -1906, -2055, -1952, + -1726, -1618, -451, 575, 3021, 2569, -776, -1649, + -2111, -1930, -1499, -1349, -595, 329, 3090, 5458, + -1954, -1309, -1554, -1159, -1132, 329, 714, 760, + 2529, 2417, 1046, -1025, -1114, -1325, -154, -1501, + 4160, -696, 230, 398, -2010, 385, -1344, 36, + -1269, -987, 1009, 1453, 1163, 1591, 916, -1534, + -508, 221, -1596, -1130, 1394, 539, 676, 676, + 1263, 2029, 284, 1592, 161, -124, -572, -1362, + -1946, -2148, -1488, -222, 4967, -1202, -939, -375, + -80, -593, -445, -418, -781, -1560, 31, 4757, + -1417, -954, -402, 193, -316, -278, -926, -895, + -1024, -436, 2673, 1991, 254, 28, -861, -1291, + 1475, -2708, -2689, -2118, -703, 290, 1841, 2048, + 1213, 594, 132, -2598, -2427, -988, -1111, -158, + 478, 2118, 2571, 830, -1430, -678, -773, 1340, + 2473, -798, -751, 215, 274, -65, 335, -1947, + -1796, -1436, 3862, -611, 105, -31, 775, 669, + 1439, -1266, 1670, -739, -1259, -572, -17, -107, + 176, 130, 3899, 3478, -548, -1429, -1176, -1104, + -1147, -1503, -1277, -1068, -258, 2645, 1753, -333, + -827, -1306, -827, -502, -306, -119, -1602, -1644, + 1922, 1127, -628, -1073, 348, 195, 616, 685, + 1750, -898, -1852, 1813, -700, 254, 598, -234, + -433, -1035, 2502, 94, 467, -1672, -905, 776, + 679, -11, -1071, -1845, -1083, -320, 690, 110, + -708, -1077, 2514, 70, -412, -300, -371, -717, + 1700, -1625, -1346, 1954, 14, -64, -121, 181, + -673, -909, 2274, -1389, 2058, -1503, 306, -187, + -209, -69, 1523, -632, -695, -1283, -988, -569, + -798, -521, 398, 2834, 1953, -2215, -1626, 106, + 6, -498, -57, 173, 731, 1002, -1706, 1701, + -328, -1745, -1398, 2176, -19, 311, 492, 667, + -1073, -1803, -1684, 703, -1316, 1803, 659, 913, + 906, 1033, -1982, -102, 945, -1620, 718, 555, + 613, 38, 394, 421, 2738, -1159, -2248, -1852, + -1568, 33, 363, 1490, 935, 561, 1464, -2466, + -1209, -1204, -692, 2009, 129, 354, 372, 380, + -2053, 1122, 2272, -824, -1355, -926, -122, 567, + 526, 923, -1320, 59, -226, 1674, -1512, 1498, + -631, 221, 26, -247, -40, -1615, -1597, 2111, + 34, -813, 200, 219, 758, 1000, 306, 394, + -430, -117, -409, -81, -207, 16, 36, 176, + -1737, -2898, -3005, -2214, -568, 2140, 4132, 2592, + 504, -521, -1509, 3610, 1070, -1890, -1319, -11, + 174, -148, -212, -347, -464, -1068, -2568, -2532, + -1973, -519, 2104, 3713, 1882, -145, -1319, -2375, + -1862, -843, 2061, -266, 1465, 866, 912, 1183, + -1784, 2072, 205, -375, 1112, -374, -534, -430, + -162, -204, 375, 82, -823, -1148, -752, 4681, + -339, -247, -790, -1088, -494, -2302, -2310, -1603, + 46, 3367, -50, 393, 1383, 1457, -1377, -2005, + 643, 326, 312, 1189, -225, 563, 261, -70, + -667, -1191, -2255, -470, 1000, 142, -525, 2285, + 756, 2061, -953, 5888, -1339, -1534, -1252, -16, + -116, -305, -375, -596, 3611, -889, -511, 43, + -809, -659, -737, -510, -258, -108, -1515, 2806, + -1555, 1025, -932, -601, 146, 164, 207, 71, + 1606, 93, -2420, -2311, -1641, -244, 1785, 804, + 1040, 427, -1510, 38, -2490, -1987, 44, 699, + 1407, 988, 1061, 411, 1162, -1382, -2669, -1635, + -905, 1503, 674, 1357, 869, 244, 411, 2612, + -1792, -2147, -1693, 1434, 281, 38, 228, 424, + 2291, 1354, -2128, -1377, -1014, -609, 131, -151, + 418, 602, 111, 2200, -1547, -1153, 1435, -1282, + 6, -111, -1, 92, 238, 613, -2271, -1181, + -1455, -919, -182, 1066, 1932, 1679, -1715, 2825, + -1764, -1759, -741, -829, 501, 746, 1056, 1416 +}, + +.fcb44l = { + 4868, -1851, -2031, -2019, -1751, -552, 756, 929, + 1389, 1590, -2090, -1202, -1317, 516, -1798, -1020, + -694, 4322, 1388, 1904, -2605, -1239, 1005, -757, + -1248, -358, 699, -201, 409, 1093, -2901, -2254, + -2605, -2595, -2104, -1681, 6854, 2692, 3155, 3446, + -2535, -1421, -1745, 898, -2046, -1457, -1044, -269, + 1748, 1873, -2268, -1098, 407, -1865, -2103, 1510, + -1217, -399, 1718, 2017, 3638, -1685, -1547, -1480, + 1637, -744, 580, 586, 1313, 1409, 617, -2020, + -1919, -2179, 932, -937, 559, 1795, 1528, 1596, + -2867, -2553, -2507, -2653, -2365, -1985, -170, 8679, + 4271, 4273, 2263, -1835, -1934, -1719, -1778, 2357, + 125, 1319, 1543, 1765, 3689, -1215, 2369, -1533, + -1611, -771, -123, 1005, 1297, 1465, -2491, 2631, + -1636, -1655, 1244, -1178, 386, 961, 1300, 1553, + -2357, -2404, -2305, -2177, -1714, -383, -98, 258, + 3902, 2475, -2923, -2580, -2685, -2803, -2678, -2428, + -1247, 450, 8174, 5035, -2302, -1629, -1495, 1832, + 1616, -577, 639, 872, 1122, 1437, 785, -1947, + -1976, 823, -1909, -1005, 430, 1244, 1713, 1664, + -2537, 8025, -1705, -2005, -2030, -1155, 64, 1106, + 1975, 2277, -2410, -2639, -2292, -1858, 162, 744, + 555, 1559, 1719, 1806, -2282, -1982, -1914, 1415, + -1785, 2197, 254, 763, 1338, 1741, -2509, -1991, + -2328, -1853, -2299, 5145, -34, 1495, 2913, 3018, + -2009, -1736, 2411, -1595, 1877, -1316, 693, 1042, + 1565, 1744, -2657, -2161, -2222, -2135, 4454, -1784, + 1331, 3208, 2852, 2955, 3738, -1338, -1425, 2090, + -1601, -279, -2, 712, 1220, 1436, -2385, -1265, + 7093, -1561, -1742, -1003, 283, 1009, 1843, 2055, + -2251, -2175, 2310, -1321, -1976, 1874, 164, 2781, + 2721, 2487, 2519, -1101, -1539, -1575, -1487, -724, + -25, 355, 643, 1011, -2296, -1799, -1895, -1700, + 2743, -924, -254, 32, 1504, 1910, -2811, 898, + -2363, -2518, -2408, -1737, -936, 221, 2588, 2527, + -2535, -2360, -2477, -1861, -1882, 1833, 3587, 1307, + 2141, 2274, -433, -1994, -1692, -1318, -1398, -350, + 1518, 1923, 835, 1262, -2246, 3383, 2458, -1464, + -1874, -983, -157, 531, 1490, 1729, 9543, -1713, + -2011, -2015, -1870, -969, -34, 1160, 1724, 1919, + -2530, 140, -1923, -1730, -1720, -605, 629, 1577, + 974, 1373, -2268, -1582, -933, 1124, -1624, -514, + 4156, -118, 1515, 1907, -2267, -574, -1311, -954, + -47, -1259, 15, 364, 854, 1009, -2221, 629, + 994, -1646, -1324, -1509, 2359, 3453, 1393, 1912, + 3586, -2286, -2537, -2560, -2415, -1748, -368, 3093, + 2881, 2611, -2556, 2792, -1558, 1117, -1681, -65, + -36, 516, 1233, 1514, 531, -1814, 998, -1795, + -1693, -871, 725, 868, 1504, 1465, 907, 300, + -2060, -2366, -2392, -1881, -596, 1754, 2169, 2104, + -2755, 2709, -2298, -2627, -2423, -1875, -733, 3886, + 2648, 2821, 623, -541, -163, -319, 85, 84, + 15, 716, 511, 572, 3948, 2773, -1504, -1746, + -1832, -934, -78, 988, 1277, 1518, -2678, 2216, + -2162, -2331, -2076, -968, 3445, 1070, 2077, 2206, + -2892, -2425, -2674, -2905, -2844, -2584, -1381, 3269, + 2696, 3281, -2090, -369, -1515, -1367, -200, 2089, + 739, 700, 866, 1169, -2276, -1057, 2851, 2589, + -1686, -515, -65, 579, 1278, 1593, -2837, -2458, + -2565, -2783, -2843, -2468, -1704, -1531, 1475, 4153, + -2209, -1857, -1873, -2177, 758, -1531, 3207, 1163, + 1506, 1851, -2383, -1683, -1839, 5772, -1815, -465, + 361, 1086, 1912, 2140, -2629, -1688, 1608, -2190, + -2419, -2064, -1253, 1397, 2099, 2306, 513, 1664, + -1683, -1629, -1682, -109, 269, 695, 1072, 1317, + 208, -1602, -1918, -1038, -813, 312, 24, 26, + 761, 990, -2288, -2225, -1948, -1932, -1832, -949, + -450, 920, 805, 1468, -2897, -2633, -2557, 464, + -2174, -1157, 1170, 2230, 2550, 2522, -2643, -1928, + -2255, -2578, 82, -2206, -63, 2663, 2007, 2292, + 226, -2541, -2687, -2753, -2229, -1556, 785, 3837, + 2331, 2492, -2496, -1740, -2465, -2295, -2151, 1142, + 363, 3967, 1943, 2432, -2619, -2400, 520, -2274, + -1900, -1486, 2135, 1407, 2300, 2288, -2811, -3066, + -3128, -3098, -2529, -1475, 2172, 3413, 3613, 3571, + 564, -2347, -2257, -2377, -1944, -1771, -582, 509, + 1683, 1975, -285, -2136, -2529, -2464, -2117, 278, + 1094, 1042, 2192, 1976, 1781, -1874, -2042, -2103, + -1744, -1044, 3373, 1252, 1861, 1873, -2688, -1849, + -2462, -2494, -2105, -1903, 2221, 250, 1653, 2233 +}, + +.fcb44m = { + 13151, -1763, -2583, -2518, -2181, -1036, -537, -112, + 214, 590, -608, -2270, -2228, -1301, -1018, 3687, + -471, -282, 909, 1665, -2426, 1713, -808, -1240, + -1366, -976, -140, 1730, 683, 191, 7253, -2076, + -2733, -2698, -2253, -1116, 376, 687, 1314, 1532, + -820, -1471, -2092, -2047, -1796, -1347, -732, 6348, + 2529, 1441, -1460, -1845, -1046, -1643, 8086, -928, + 90, 660, 428, -188, 604, -2022, 556, -1680, + -1641, -902, 834, 941, 1480, 1906, -2439, -2573, + -3091, -2853, -2419, -1606, 2312, 2624, 2659, 2659, + -1286, -2273, -2400, -1826, 2443, -1391, 685, 1822, + 1810, 1625, -1993, -731, 9737, -1476, -1183, -1244, + 34, -85, 0, 201, 4171, -2430, -2869, -2866, + -2488, -1154, -1253, 282, 2715, 3643, -2130, -2522, + -3259, -3051, -2977, -2204, -1264, 1103, 7113, 7948, + -1271, -1694, -2011, -1294, -1607, 247, -303, 715, + 4276, 1908, -2337, -2111, -2232, -2123, -1648, -1302, + 7686, 1213, 982, 984, -2594, -2127, -1981, -2104, + -2405, -1966, -936, -95, 326, 672, -2263, -893, + -1367, 1288, -1321, -1351, 2503, 747, 390, -247, + -2220, -860, 3641, 3766, -1724, -1487, -531, 239, + 134, -82, -2563, -1537, 3883, -1911, -2109, -1713, + 1056, 726, 977, 1091, -1874, -1366, -1628, 11069, + -1653, -696, 118, -78, 337, 29, 2449, -1438, + -601, -1533, -816, 1262, 540, 79, -460, -1403, + 3204, -1918, -1892, -1911, -1468, -976, -42, 2785, + 1088, 564, -236, -2267, -2324, -2130, -1880, -427, + -258, -543, 903, 5142, -1791, -1611, -1073, 2911, + 2993, -1295, -400, 229, 192, -85, 4461, -1711, + -1431, -1640, 3525, -1398, -101, -219, 327, 415, + -669, -1520, 6595, -1291, 5123, 155, -480, -518, + -552, -890, -2609, 7074, 3220, -1054, -1852, -1165, + -25, 89, -361, -140, -1610, 2214, 2903, -1737, + -1704, -1178, -708, -171, 177, 674, -1075, -890, + 82, 463, -1432, -1048, -703, -759, -247, 344, + 2448, -656, -1135, 4366, -583, -705, 40, -314, + -676, -1271, 4389, -952, 3249, -1606, -1524, -1172, + -490, 97, 128, -91, -66, -1293, 1696, -1114, + -1455, -519, 2620, 479, -257, -1512, -2037, -1281, + 1752, -1285, -1812, 2789, -52, 676, 409, 296, + -1977, -1043, 270, -1615, 2131, -1051, -161, -498, + 767, 1673, 1044, 27, -1107, -1730, -1856, -1264, + -275, -167, 893, 443, 3850, 97, -1244, -1691, + -1566, -1088, -1062, -837, -159, 1830, -1424, 2494, + -1878, -1532, -1991, 2919, 62, 399, 524, 381, + -1340, -2415, -2028, 218, -1342, 410, 815, 533, + 948, 1998, -1213, -1847, 3691, -2123, 1822, -1548, + 537, 987, 356, 123, 3876, -2476, -2021, -2195, + -1562, -737, 2250, 709, 797, 1102, 2065, -2258, + -2394, -1816, -1536, 1059, 4653, 1457, 456, -27, + -2226, -736, 765, -1879, -2188, -1793, -928, 892, + 1793, 2257, -1182, -1646, -1789, 6105, -1936, 4316, + -307, -143, 223, 236, -2213, -1862, -1823, 3326, + -1810, -1384, -453, 1007, 1331, 1405, 4135, -2298, + -1657, 1981, -1702, -853, -318, 298, 760, 1025, + -2537, -2782, -2985, -2687, -2839, 4493, -448, 4249, + 3048, 2678, 1045, 3227, -690, -1390, -976, -652, + 587, 194, -749, -1358, -730, 250, -2404, -2548, + -2157, -1027, 32, 2091, 1059, 1360, 262, -2135, + -2061, -1777, -1614, -246, 2004, 2605, 1516, -948, + -1060, -1076, -1643, -748, 144, 1595, 1730, 531, + -1086, -2182, -483, -2191, -2411, -1983, -2345, 10051, + -841, 1456, 924, 207, 4652, -1831, -2026, -1710, + -2235, 4036, -755, -70, 533, 887, -1899, -2326, + -2129, -2115, -1606, 1443, 2557, 941, 618, 527, + 949, -1547, -2067, -1785, 455, -60, 79, 202, + 912, 954, -2527, 14551, -1893, -2315, -2609, -1844, + 497, 287, -197, 626, 6839, -804, -1299, -1259, + -1109, -97, 976, 144, -343, -1375, -2334, 3740, + -1049, 2980, -1739, -474, 223, 137, 155, -171, + 2962, 1814, -2378, -2643, -2249, -1109, 858, 643, + 1630, 1399, -2098, 974, -1718, -2193, -2146, -1488, + 3353, -147, 1187, 1266, 1559, -2532, -2941, -2759, + -2101, -1098, 1562, 1049, 2045, 2159, -2298, 7439, + -2129, -2361, -2318, -1552, -422, 482, 985, 1111, + 6050, 5657, -1698, -2267, -2127, -1135, -140, -286, + -352, -124, -1230, 3492, -1370, -1221, 2958, -1239, + -472, -722, -169, -89, -2310, 2988, -2367, -2421, + -2589, -2034, -662, 421, 1863, 2736, -2612, 5429, + -2104, -2257, -2440, -1817, 4819, 883, 622, 636 +}, + +.fcb44s = { + 11239, -328, -2011, -1713, -1662, -1290, -1225, -1520, + -1541, -912, 400, -1103, -2698, -162, 263, -964, + 668, 405, 732, 2493, -2491, 1000, -2910, -793, + -1351, -515, 1051, 2002, 1757, 2150, -2010, -2021, + -2254, -1896, -1953, 664, 7067, 2632, 531, -1367, + -2228, 2113, -2019, 2309, -1458, -426, 1242, 338, + 205, -222, -1317, -1806, -2477, -2427, -2477, -1852, + -1472, -911, 2261, 10280, -2369, 382, 3180, -1210, + -1601, -748, -732, 504, 1440, 1142, -13, 610, + -2457, -739, -1318, -1013, -52, -470, 627, 4734, + 1248, 2947, -631, 1560, 2096, -833, -1173, -1475, + -2060, -2189, 967, -1451, -1544, -758, -538, -31, + 1395, 3550, -3, -1999, -1975, -1734, -2680, -2512, + -2037, -1306, -252, 1288, 6012, 4834, -1087, 3259, + 3115, -1369, -1136, -948, -264, -582, -677, -643, + -2500, 1284, -317, -1872, -1150, -1150, 310, 832, + 1597, 2842, 6295, 3806, -671, -1536, -1460, -1256, + -1223, -1504, -1672, -1471, 1358, 1004, -1893, 1114, + -1643, -103, -513, 189, 303, 140, -1618, -648, + -720, 7274, 573, -180, -731, -1226, -1564, -1742, + 151, 2103, -1562, -974, 94, 546, 3536, -205, + -1657, -2534, -2187, 2840, -1248, 451, 2615, 171, + 479, -305, -1299, -1708, -2144, -1593, -1289, 2766, + 2287, -400, 188, -51, 141, 105, -2128, 4976, + -1690, -1216, -1175, 297, 1454, 449, -478, -970, + -1914, -1459, 3036, 2668, -950, -634, -507, -374, + 4, 34, -1664, 2901, 847, 2817, -1154, -1651, + -1262, -1160, -624, 629, 1578, 765, -2002, -2121, + -1527, 1938, -272, 113, 287, 955, -1473, 60, + 8047, 137, -534, -841, -1077, -1504, -1788, -1758, + -1871, 119, 931, 1775, -704, 2792, 354, -501, + -1370, -2038, -1031, -1631, -1914, -879, 377, 7589, + 173, -196, -491, -1658, 3790, -773, -1731, 3028, + 49, -1013, -563, -1232, -953, -730, -2568, -1926, + -679, -267, -324, -962, 51, 461, 2728, 3631, + 3533, -1690, -2846, -2370, -1945, -917, -551, 276, + 2634, 3558, -2592, -1750, -2422, -1586, -1204, -1001, + 4603, 1802, 2673, 1685, 2710, -853, -2321, -1919, + -1603, -868, 3706, 290, 570, 338, -2245, -1704, + -1915, 545, -787, 1635, 1725, 526, 666, 1604, + 642, -1154, 3231, -1232, -1772, -623, 217, 27, + 3, 641, -2411, 1924, -967, -1583, -1499, 2316, + 1354, -115, 333, 559, -1721, 2475, -1942, -2114, + -1196, -571, 1769, 2350, 1315, -607, 4510, -1414, + -2228, -1312, 1439, 469, -248, -399, -270, -721, + -1517, -1247, -771, -36, 6488, 942, -279, -572, + -1041, -1908, -2388, -2281, -2595, -2275, -1529, 51, + 471, 4435, 3002, 2738, 4049, 1562, -2706, -1672, + -1649, -1204, -518, -280, 774, 1344, 6, -1950, + -1521, -1768, -972, 1420, 3011, -191, 644, 1478, + 3220, -313, 3030, -153, -841, -739, -378, -1013, + -1410, -1815, -2104, -1033, -2097, -1992, -943, 2391, + 424, 369, 1601, 3331, 1494, -2060, -2027, 1579, + -1407, 1120, -280, -197, 761, 1048, -710, 4094, + -1533, -1984, -1620, -1132, -515, -485, 971, 2644, + 3979, -661, -1891, -1120, -897, 2484, 1623, 21, + -1534, -2438, 3201, -1510, 858, -1459, -711, -1332, + -833, -240, 763, 1096, -1435, -29, 3174, -1773, + -19, 708, 1680, 403, -910, -2224, -2670, -619, + 1320, -751, -1323, -1022, 2875, 1080, 985, 1, + 191, 7823, -475, -604, -1126, -967, -1139, -1600, + -1767, -1161, -1342, -1960, -2112, -1793, -1596, 3103, + 535, 2001, 3235, 151, -2266, -807, -1977, -1661, + -1255, 2328, 2632, 3189, 621, -1130, -2183, -1127, + 2391, -884, 2173, -690, -354, -516, 352, 954, + 1847, -74, -1260, -1839, 2557, -1221, 228, -630, + -162, 386, 1462, -1889, -2596, -2216, -1869, -518, + 1281, 2329, 2653, 1117, -1535, -1038, -1752, -1862, + -1635, -1067, 994, 5212, 2719, -264, -2021, 1824, + -2110, -619, 1538, -397, -332, -153, 860, 1281, + 6568, -1790, -2459, -1707, -1708, -799, 294, 89, + 475, 992, -1668, -1819, -2010, -1623, 2079, 3255, + -388, 591, 1477, 581, -1544, 476, -1825, -959, + -1296, -1037, -453, 1146, 4693, 839, 2027, 3021, + -1731, -1746, -1964, -1115, 1197, 102, 164, -162, + -2301, -1281, -2022, 3983, -1122, -281, 85, 352, + 1042, 1599, 6463, -93, -2010, -1988, -2282, -2189, + -1915, -1721, 17, 4694, 424, -998, -111, -1995, + -1246, -1176, 78, -116, 1951, 3059, -1974, -1783, + -2243, -1238, 3935, -928, -15, 1265, 1536, 1907 +}, + +.shape08 = { + 5279, 1101, 12974, 5624, 2029, 3853, 5918, 1516, + -2905, -224, -92, -819, 803, 1091, 3091, -3355, + 152, -1214, -7317, -738, -8973, 546, 12035, -937, + 2216, 2113, 1214, -6577, 2006, -1661, -673, -5880, + 496, 454, 3400, 676, -322, 11388, 634, -1169, + 12556, -5804, -7724, 588, -6801, 1080, 354, -1681, + -942, 1926, -487, -580, 156, 79, 15253, 667, + 1155, 655, -719, 1999, -785, 214, 2822, 1020, + -1967, 73, -387, -137, -15225, -1552, -357, 2830, + 2140, 3070, -2552, 2410, 1230, 4131, 999, 248, + 531, -909, 3948, 12858, -8056, 2205, -2837, -171, + -1633, -129, -93, 1852, -1920, 157, 9647, -84, + -150, -1365, -1522, -13197, 6168, -3195, 5890, -1724, + -6407, -1340, -7435, -621, -5732, -2895, 145, 3974, + 728, 9840, -494, 7357, -394, -13614, -256, -1930, + 468, -266, 8001, -153, -365, 7652, 135, 1400, + -3869, 1091, -4935, -2884, 1259, 6819, 1025, -6667, + 1079, -9794, 6827, -4166, 1108, 1149, 18861, 593, + -177, -1067, -644, -2164, 4727, 85, -101, -10805, + -247, 8918, 2261, 5475, 756, 3018, -6535, 1941, + 359, -4229, 1206, 958, -878, 554, -18780, 2289, + 4906, -7412, -7685, 7932, 965, 2460, 4423, -563, + -3668, -3482, 3307, -1737, 971, -7480, 10742, 1978, + 2365, 20, -3625, 466, 2056, -6602, 9396, 3145, + 3162, 1857, -630, -6905, 1660, -3024, -2159, 1109, + 1282, 2767, 210, -2203, 3099, -7889, 1805, -13115, + 988, -6235, 1566, -1399, -9612, 1821, -519, -57, + 3428, -14024, 1141, -2542, -9396, -17, 440, -8591, + 2271, -7811, 1891, -935, -4330, -1303, 362, 426, + 319, 1176, 3176, 2202, -14308, -619, -2942, -2271, + -531, -652, 345, 17681, 1453, -1561, 341, -2077, + 933, 433, 1529, 463, -1095, 4912, -840, 16266, + 973, 1732, -718, 6702, -3659, 4037, -704, -2707, + 1423, 1291, 2300, 149, -933, -1338, 2019, 6173, + 481, 14937, -364, 3896, -443, 992, -896, 378, + -226, -1505, 268, -428, -2622, -289, -2069, 10472, + -3880, -5330, 385, 3053, -4642, 1525, -1557, 716, + 2504, 848, -450, -2018, -458, -705, -7120, -543, + -2138, 2548, -351, 737, 12906, -1012, 63, 15357, + 332, -837, -225, -1299, 2843, 1334, -669, 2083, + -707, 1171, 8219, 2190, 10567, 1370, -1376, -2919, + 2108, 10098, -388, 4442, 164, 490, 7580, 26, + -1848, -2919, 640, 4758, -108, 8194, -1325, -2314, + 447, 5178, -1095, 9902, -693, -3624, -223, 690, + 10495, 776, -919, -1621, 2046, 469, 1454, 3681, + -1090, -1776, 1457, 212, 2054, -994, 698, -496, + 22347, -623, 254, 960, -4073, 531, -2572, -14393, + -1022, 258, -3667, 994, 15242, 5078, -3618, 1925, + -1229, -1754, 1715, 4358, 1286, -2360, -4590, 1824, + 7864, 1423, -2146, -2763, -10635, 474, -829, 1159, + -157, -54, -158, -29, 202, -383, 285, -2, + 862, -364, 415, -123, -145, -9733, 1167, 10199, + -1408, -2992, 2131, -412, 4743, 2992, 3555, -617, + 9606, -2831, 2357, 5300, 625, -678, -500, -128, + -56, -6327, -1122, -2567, 1904, -1804, 709, 3194, + -148, -1371, -6534, -1748, -1490, 14159, 1466, 1395, + 1101, -2725, 503, 68, -1486, 0, 211, -1218, + -3, 20920, 1709, -208, -839, 4574, -6084, -6557, + -103, -984, -375, 8409, 1715, -2170, -5003, -3296, + 13482, 1211, -4159, 3496, 1040, 6925, 213, -1398, + 441, -1231, -814, 842, 1574, 1145, 1359, 437, + -1777, 20566, 259, -4573, -1412, -158, 10144, 1269, + 1405, -12631, -1104, -615, -15892, 355, -3795, -1158, + 3241, 252, 232, -179, -617, -2038, 285, -1014, + -1248, 1835, -1558, 1266, -10207, 629, -312, 11376, + 154, -288, 5915, -353, 60, 2695, -853, -103, + 15659, 2403, -1184, 3, 9236, -10953, 4434, 829, + 2563, -164, -848, -646, 7247, 895, 1726, -752, + -979, 1053, -971, 318, 2180, 927, 804, -262, + 446, 3261, -4926, -4523, 1247, 2039, 12770, -1191, + -1310, -5574, 4763, 657, -4139, 10821, -805, -1109, + -3189, -1721, 167, -10022, -1877, 2123, 328, -7048, + -2130, 2431, 1522, 3209, -8448, 1810, -5412, 9815, + -3677, 6575, -6237, -929, -434, -2375, -13586, 3497, + -1140, 1227, -6354, -507, 329, -1690, 1079, -880, + -3743, -4021, -4645, -6053, 958, 4594, -1122, -11628, + 1537, -3418, -1242, 133, -9335, 1611, -432, 10733, + -885, -468, -13466, 690, 214, 8968, 3441, 5451, + -219, 5492, -377, 409, 3812, 2450, 508, 6542, + 3824, -3705, -514, -8262, 1537, 7969, 946, -2869, + 8762, 417, 5094, 2104, 6694, -342, 1259, -4779, + -1445, -1519, 333, 4385, 652, -386, -580, -1892, + -873, 1862, 2704, 13837, -5415, -1975, 5881, 7150, + 8272, -6412, 704, 1854, 257, -3746, -9789, -9634, + -924, 1393, -3237, 259, -56, 4390, 4902, 1172, + 5114, -2616, -4409, -1180, 4691, 7400, -625, 8873, + 6846, -1224, -213, -5296, -3504, -147, 17828, -1347, + 3251, 1702, 1440, -2364, -491, -227, 1765, -446, + -9746, -2019, 11287, -195, -9559, -312, 888, 5789, + -1753, -11069, 2537, -265, -1762, -779, -8501, -308, + -89, 1973, 3640, 17344, 1326, -689, -398, -3820, + 2167, 229, -636, 2142, -6587, -751, 13243, 465, + -5946, -202, -968, -1060, -240, -10626, 3405, 1302, + -1263, 972, 11351, 100, 2266, -930, -2108, 5350, + -3186, 11130, 2073, -5616, 650, 2000, 1048, 5628, + -531, 674, 8453, 1030, 1152, 12095, 352, 409, + -1029, -1236, -190, -5724, -589, 3550, 1958, -14081, + -339, 1672, -1659, 4518, -75, -638, 5501, 277, + -578, -2185, 157, 2066, 8634, -2403, 1617, -12487, + -1881, 8273, 179, -2152, -1294, -512, -415, 456, + -141, -125, -405, 132, 49, -1978, -19085, -451, + -1480, 324, -5397, 235, -1217, 346, -1258, 3540, + 10075, 10291, 5060, -2057, 6156, -992, 9344, -3718, + 4296, 895, -8464, 341, 1426, 648, 1494, 2895, + -3760, 10139, 15531, -984, -1550, -1319, -1542, -119, + -517, -185, -3368, -9279, -3455, -4257, 1092, -10120, + 5072, 3099, 986, -2562, -12068, 1932, 6489, 950, + -2417, 1362, -567, 591, -715, -515, 3506, -726, + 6319, 214, -364, 3611, 1895, -2005, -273, 1513, + 2379, 475, -4855, -527, -11493, 27, 4343, -2394, + -639, -744, -2601, 10917, 1910, 2449, 1238, -2175, + 5322, -4054, -40, 4274, 684, 8152, 966, 10882, + -13, 4253, -287, -3192, 548, 2020, 189, -6894, + 797, 2160, 579, 4084, 1767, -4011, -640, 7697, + 791, 945, 1230, 6491, 1508, -3762, -433, 11340, + -129, -1131, -5121, 3148, 1544, -7648, 1866, 9660, + 2365, -2110, 782, -82, 3666, -701, 303, 298, + -1934, -125, -1427, -17589, -1188, 175, -7046, -488, + 1121, -6594, 489, -1551, 14349, 1499, -544, 17132, + 198, 2516, 2479, -978, -214, -3399, -1223, 2094, + 130, -1020, 1049, -710, 12801, -498, 297, -1365, + -187, -3169, -123, 9019, 958, 221, 14234, -590, + 961, 3092, 8, 255, -4586, 1789, 2522, -12577, + -91, -822, -805, -714, 5298, 1299, 3306, -1288, + 13176, 235, 1754, -67, 1912, -604, 3240, -2048, + -200, 772, -173, -996, 1368, 2380, 294, 763, + 19665, -196, 528, 182, -2394, 923, 749, -13578, + 855, 589, -9553, 0, 5737, 10399, 9147, -1655, + -3735, 1246, -2429, -1147, -2199, -2953, 614, -1404, + -449, -8524, -2271, 5001, -9517, 2940, -204, 3625, + -258, 32, 1521, -299, -1786, -2836, 1523, 2427, + -835, 3139, -197, 3351, -279, -14766, -1267, 5169, + -1039, -10967, 58, 641, -767, -1193, -591, -716, + -834, 8109, -915, -711, -10427, -1680, -638, 2643, + -850, -258, 10452, 362, -5394, -349, -14727, -655, + 1040, 1722, -10265, 551, -283, 9888, 408, -400, + 5980, 1878, 781, -923, -667, -789, -348, 624, + -260, 14515, -804, 1721, -2, 5356, 1802, 1218, + 498, 1871, -988, 16295, 4163, -2342, -4290, 3121, + 3269, 112, -3492, 1124, -1496, 1863, -1426, -1090, + 1598, -197, 1160, -1660, -1094, 477, -4104, -396, + 1605, 26134, 746, -12876, 2320, -1690, 8626, 39, + 1341, -1254, -1890, 2555, -13996, -1218, 3827, 1216, + -909, -180, 1720, -87, -143, 989, 340, -1426, + -4029, 3141, -9424, 466, -8227, 422, -7379, 2038, + 401, 98, 3602, -1223, -946, 2469, 1159, 727, + -268, 467, 203, -11079, 3850, -3469, -1965, -1857, + -1415, -2477, 3173, 7352, 9483, -5541, 6212, 1886, + -3868, 2728, 577, -5057, 321, 972, -77, 47, + 227, -38, -1037, -222, -347, -341, 1179, -948, + 592, -7485, 2218, -5955, 2698, 11798, 197, 6260, + 1711, 998, 8, -6223, -1184, 1145, -1781, 1376, + 1394, 388, -689, 2279, 6511, 2542, -4903, 3917, + -790, 535, -1903, -4448, 4216, -22, -6715, 5204, + 4807, 3193, -1064, 5403, 4503, -2434, -4296, 1383, + -1514, -4103, 747, 3928, 2987, 9513, 2492, -8691, + -993, -2667, -40, -170, -3116, 611, 2367, 16297, + -1256, -1404, -3462, 466, -524, 5464, 491, 706, + -7491, 2027, 373, -4086, 1620, -7789, 704, 5002, + 1706, 8325, -851, -9883, -3072, 4475, 2696, -8549 +}, + +.shape11 = { + 44, -10592, -832, -413, 612, 530, 379, 753, + 1442, -3006, -858, -1077, -12018, -196, -771, -1142, + -628, -2938, -439, -3323, 20, 12513, -2462, -1270, + -57, -8417, -690, 790, 276, 2349, -341, -1644, + 230, -2176, -202, -14725, 170, 1725, 3030, 683, + -231, 641, -242, -3252, 110, -1440, 2886, -1467, + -1155, 14395, 297, 52, 240, 3938, 9880, -7555, + -1214, 3351, 129, -1269, -168, 669, 13765, -1289, + -465, 10017, -632, -328, -276, -33, 31, 18883, + -148, -131, 525, 1669, 2288, -203, 868, -660, + 248, -409, -91, 295, -9174, -1484, 929, 2824, + 1097, -3205, -113, 2712, -1544, 527, 1419, -963, + -388, 691, -16791, -84, 72, -3802, -357, 1633, +-15182, 62, -6024, -742, -5396, 4470, -198, 1, + 1428, -1691, 18715, 1402, -2539, -375, -8455, -901, + -147, -3274, 9359, -277, -8941, 714, 2834, 2924, + -6326, 907, -123, 10487, -484, -4772, 877, 9840, + -505, -7562, 301, 671, 116, -371, 3740, 359, + 385, -5145, -908, 156, 9639, 3782, -9688, -4214, + -945, -7685, 334, 2185, -1342, 388, -1741, 278, + -231, -912, 905, -1039, 598, 2049, 662, -198, + 22378, 166, 116, -1699, 335, -8380, 1279, 1536, + 14955, 1254, 190, -2519, -608, 364, -561, 5748, + -1178, -923, 3183, -59, 13880, -2530, 241, -564, + -319, -7510, -9, -124, -20346, 305, -25, -400, + 222, -16943, -488, 802, -1685, 3323, -6198, 1000, + -903, -846, -387, 462, 847, 526, 10024, 2020, + 2090, -9563, 1416, 169, -12182, -428, 10388, 869, + 1068, 2201, -1041, -3180, 152, -646, 4, 4017, + -1069, 307, 5283, 3021, -13662, -493, 9, 542, + 152, -2617, -3870, -514, 13497, 1180, -603, 1255, + 2396, 7418, 8902, -11165, -2626, -5719, 1764, 858, + 1105, 1476, -1764, 1969, 977, -1738, -928, -13940, + 1444, -4157, 836, -12243, -369, -256, -15681, 5320, + -5170, -509, 353, -1581, -1455, 965, 716, 209, + -883, -317, -1961, 9128, -8197, 2173, -2434, -1126, + 4066, 1025, -16663, -7013, -147, 1617, -745, -3205, + 1496, 1822, -1199, -2999, 117, 619, -20002, -232, + 142, 3207, 561, -292, -1635, 1035, 37, 2712, + -243, -8269, 305, -2601, 495, 14516, 831, 260, + -54, 4217, 675, -1632, 4962, 793, 1066, 133, + -344, -12428, 95, 6164, -1298, -1860, 3622, -467, + -867, -1178, 11053, 118, -36, -6997, -763, 16019, + 16, 2459, 306, -820, -1135, 847, -709, 928, + -164, -293, -5736, 543, -11548, 5389, -2012, 300, + -228, -1043, 5107, -558, 1187, -140, -13034, -1571, + 740, -4967, -432, -6289, -1778, 3449, -337, -12607, + 344, -3790, -1598, -274, -346, -1494, -108, 325, + -1215, 819, 404, -568, -286, -21364, 15495, -2297, + 606, 117, 10, -193, -972, -292, -573, -1155, + -1289, -1025, 472, 1154, 843, 187, 586, 20569, + -5, -236, -1181, -1092, 700, 891, -603, -601, + 21648, -449, -193, -1103, -298, 2084, -251, 449, + -1414, 17168, -391, 104, -5465, 401, 8839, 781, + 1741, 201, -369, 466, 12358, -636, -945, 3928, + -605, -17445, 5020, -1289, 977, -6202, 1783, -507, + -76, 267, -31, -2731, -1560, -1225, 1348, 11176, + 1669, 754, 1671, -4038, 151, -371, 7283, 243, + 1387, 126, 1007, 1292, -15, 696, 282, -2623, + 1065, -1026, 191, -632, -132, -12957, -32, -1697, + -422, -240, 1352, 10252, 1067, 8296, -1244, -9, + -301, -3014, -249, -372, 10731, 535, 2147, -8959, + 346, -408, -8329, -1905, -48, -8176, 2782, 412, + 1425, -946, -748, 1095, -1370, 9086, -99, -143, + 68, -544, 264, 494, -377, 13, -618, 237, + 193, 3549, 317, -168, -7148, 2351, -244, -13240, + -3355, -2322, -533, 9554, 6906, 124, -694, -901, + -2762, 207, -915, -2520, -143, 8544, -678, -2788, + 12926, 791, 1296, 4861, -1470, 889, 3675, 806, + 290, -11146, 422, 9217, -31, 1608, 140, 3939, + -6903, -276, -704, 2353, -344, -1038, -230, -177, + 670, -617, -129, -857, -8231, 638, -411, -252, +-15709, -1218, 210, 288, 542, 533, -9087, -10493, + -624, 1175, 611, -230, 746, 1455, -590, 830, + 1756, -15800, 823, -1077, 788, 1071, 468, -1654, + 660, 983, -9697, -1300, 662, 2053, -281, 12949, + 389, -915, 197, -1742, -4587, 1746, 707, 1625, + 9021, 2204, 759, 1303, -428, -220, 41, -5499, +-16080, -193, 443, 443, -78, 889, -561, 5629, + -1073, 7019, 222, 1661, 1190, 1108, 94, 5624, + -3796, 407, -706, -122, 744, 363, 1648, -10896, + 595, 953, 85, -267, 195, 851, 17173, -636, + 243, 907, 2029, -700, 351, 1495, -157, -575, +-11664, 1252, 8341, -616, 3708, 5693, -6, -1753, + 1072, 863, -823, -4278, -12043, 750, 597, 3145, + 38, -8140, 3136, 290, 7, 11084, -876, 1842, + 175, 3458, 460, 1615, 11698, -827, 16, -12482, + 428, 411, 2625, -1352, 142, 529, 229, -48, + -965, -145, -592, 655, 499, 22095, 22141, 37, + -1875, 701, 45, 724, 1111, 1631, 262, -252, + -9092, 5325, 408, -637, -612, 647, 1268, 834, + -510, 603, 199, 816, -9904, 9533, -1580, 2669, + 1824, -2092, -701, -271, 7489, 46, -3295, -844, + -304, -226, -260, -692, -5, -527, 37, -49, + -1542, -69, -1087, 20519, 367, 1, 3487, 2535, + -5110, 642, 1223, -2130, -2894, 1752, -1618, 9732, + -1633, 6904, 137, 654, -358, 355, -21, -277, + -68, -188, 132, 530, 372, -315, -11498, 221, + 815, 2480, -1398, -123, 353, 3114, -12025, -1212, + -1111, 916, 6452, -1880, 1867, 307, -66, 1857, + 138, -980, -3088, -174, -41, -393, -656, 847, + 15824, -379, 358, 672, -389, 920, -21145, -393, + 350, -574, 1005, -2083, 26, 79, -203, -7967, + -3302, -5805, 772, -302, 2104, -1240, 13710, 6816, + 2282, -3709, -1512, -81, -2216, -3005, 444, -795, + 751, 2163, 20751, 780, 542, -480, 624, -425, + 769, 2474, -5903, 399, 10564, -112, 69, -1409, + 1885, 2339, 67, -620, 196, -2432, 6046, -1673, + 6512, 809, 7904, -516, 4278, 223, 359, 16512, + 1224, -480, -505, -735, -502, -593, -4565, 1914, + 122, -531, 1442, 464, 69, 292, 410, -581, +-19848, 1059, 132, 1392, 5917, 705, -7706, 2496, + -1487, -791, 11939, 185, -265, -2412, 630, -8028, + 1434, 10315, -1541, -3756, -2403, -1918, 1050, 8057, + 234, 13546, -92, -2172, -671, 11631, 103, 116, + -171, -4604, -267, -602, 15, 454, 6859, -2151, + -8707, -1664, 61, 2518, -969, 903, 1209, -1435, + 13531, 590, 236, -821, 598, 1186, -7690, 134, + -1005, -18177, -148, 519, 900, 951, 406, -3584, + 47, 9439, 1418, -797, -3353, -703, -1798, -1244, + 291, -2784, 14612, 2029, -161, 1040, -4130, 3064, + 1721, -2898, 269, 3367, 1379, 14359, -690, -655, + 2010, -4935, -681, -2606, 11651, 748, 101, 13593, + 629, 28, -540, -854, 1405, 558, -8785, -1016, +-13043, 121, -556, 4959, 1694, -720, -138, -3897, + 182, 1938, 844, 919, -683, 12042, -1101, -155, + -1375, -1509, 11, 220, 821, 21721, -367, -634, + -1468, -174, 1002, -1203, 318, 11672, -2114, 2472, + -1701, 5932, -661, 1094, 2500, -5609, 254, 437, + -911, -1611, -8005, 217, -1139, 1321, -10713, -2183, + 1163, -890, -622, 12820, 1021, -13578, 1040, 3216, + 592, 686, 737, -2881, -1693, 3995, -455, 4666, + -4124, -9316, 2061, 10645, 271, 264, -6829, 641, + 2061, -6683, -512, -747, -9131, 2445, 343, -9944, + -2888, 607, -10855, 871, 418, 504, 936, 1079, + 273, 400, -17752, -391, -1543, -6193, 1482, 737, + 2096, -982, 167, 972, 336, 1063, -1272, -1602, + -1907, 9, -191, -15207, -119, 4047, 1479, -1405, + 526, -18462, -627, -1996, -1022, -1544, 312, 7972, + -227, 797, -5204, -2160, 391, -423, 257, 3836, + 442, -1931, 22, 143, -203, 362, -73, 15679, + -289, -1445, 577, 858, 11408, -1970, -1022, 1550, + 882, -3699, -2697, 3978, 600, 86, 3858, 8683, + -7681, -4856, 4051, -1321, -587, 46, -499, -354, + -655, -15717, 67, 490, -2670, 474, -1374, 5601, + 60, -17615, -808, 87, 367, 579, 1057, 1020, + -394, 1181, -189, -10846, 763, 2635, 282, -3279, + -866, -15257, -449, 112, -15577, 227, 269, 13964, + -1273, 1513, -1487, 195, 319, 2527, -286, -5883, + -5360, -959, 2791, -3335, -945, -1985, -903, -11418, + 8525, 669, 6106, 153, -1169, -1198, -553, 7037, + 528, -4237, 717, -214, 1824, 10108, 961, 9077, + 1899, 10407, -207, -29, 355, -6794, 111, -13627, + 1361, -3577, 291, 4534, 2209, -1579, 109, 523, + 456, 10990, 31, -448, 385, 1481, 2, 15266, + 798, 5759, 860, -16424, -1315, 1631, -456, -977, + -180, -2593, 1191, 5959, -32, 8112, -506, -7766, + -1871, -15310, 662, 196, -20401, 925, 446, -2035, + -620, -686, -249, -2517, 423, 703, 633, 828, + -182, -37, -406, -149, 821, -22255, 652, 522 +}, + +.shape16 = { + -786, 193, -15441, 200, 1050, -16545, -41, 329, + -869, -170, -858, 2725, 217, 447, 2107, -23, + -387, -10280, -383, -320, 387, 16012, -79, -967, + 3528, -2123, -537, -636, -1761, 949, 100, -17, + -446, 261, 22527, 331, 26, -87, -206, -2292, + -1178, -164, 598, 147, 889, -14487, -2823, -1280, + -1892, 33, -1763, 993, 4807, -953, 2181, -588, + 59, -296, 218, 291, -104, 495, -1092, 2232, +-14904, -983, -2919, 795, -17207, -2045, 2988, 597, +-10312, -718, -2196, -5822, 847, 1304, -757, -4714, + -148, 831, -734, 806, 4348, -308, 244, 566, + 2706, 604, -748, -864, -568, -219, -128, -688, + -218, 110, -29289, 482, 76, -1447, -142, -417, + -253, 8124, -19775, 990, 4546, -1012, -8082, 133, + -1612, -2243, -3788, 1568, -2892, 852, -1642, -3479, + -23, 1300, -564, -1037, 249, -14533, -43, 321, + -680, 10, -417, 23426, 397, -108, 1843, 180, + 11976, -9613, 353, 3768, 130, -1035, 4340, 218, + 596, -224, -779, -1680, 1326, 152, -971, -9725, + -355, 5328, -459, 16242, -438, 926, 6210, 1912, + 769, 2621, -148, -1008, 517, 341, -3594, -965, + 11383, -874, -16949, 1167, -3371, -1655, 586, -132, + 3990, -770, 211, 246, 514, -166, -734, 30408, + -258, -521, -20, 339, 499, -2572, 2110, 272, + 1357, 123, 2841, -320, -31, -444, -501, 215, + -42, 595, 108, 484, -223, 937, 475, -72, + -319, 75, -205, -978, -9155, 145, 2020, -3, + 2438, 4046, -1281, -875, 1532, -598, 12288, 369, + -2046, 343, -778, 1769, -2589, -641, 17437, 1793, + -592, -1954, -1607, 6184, 3440, -512, -2710, -1330, + -127, 8765, 83, -243, -315, 709, 256, 1176, + -1198, -463, 970, -302, -568, -997, -1022, 159, + 11008, 27, 13074, 1523, -3239, 2330, -4808, 6115, + -9933, 1449, 2153, -3111, 1780, -731, 121, -881, +-14289, -265, 566, -611, -253, -2965, 250, -105, + -66, 2570, -1922, 2712, 1907, -2025, -454, 173, + 1463, -29, -31955, -113, -1751, -3353, 254, 1001, + 6781, -29, -639, -1289, 288, 498, -21505, 48, + 109, -2151, -223, 1360, -3430, 658, -4185, -1706, + 1244, 1899, 124, 12, -35, 289, 382, 433, + 261, -131, 54, -646, -280, 86, 180, 153, + -169, -20242, -95, 734, -524, 77, 102, 8468, + -421, 29, -3, 51, 1526, -600, -264, 355, + 1949, -985, -291, -86, 10212, -789, -393, -182, + -51, 946, -16716, -954, 1179, -2745, -509, -4774, + -587, -608, 7657, -509, -388, 987, 109, -218, +-17579, -524, -467, -1643, -444, 1430, 2541, -124, + 1785, 27, 7905, -73, -3135, -1241, -254, -2114, + 1175, 780, -50, 4055, 535, 438, 32, -113, + -260, 81, 1102, -59, 29188, -48, 212, -29, + -344, 559, 856, -483, 608, -40, -1498, 112, + 10374, 1198, -434, 4053, 1286, 236, 1823, 16046, + 592, 1583, 78, -5243, 1311, 456, -1342, -546, + -353, 13289, -333, -529, -20859, 183, -167, -1368, + -338, -690, 4248, -205, -666, -634, -1653, 1174, + 234, -18622, 891, 284, -2632, -1516, 289, 11242, + 727, 133, 284, -323, -1370, 908, -13169, -412, + 1155, 410, 610, -3072, -8220, -637, 242, -647, + -2072, 16041, 2292, -8009, 351, -3137, -3075, -1051, + 4569, 125, 23, 1281, 2487, 520, -209, -688, + 205, -1248, 246, -601, 533, -12209, -2298, 826, + -2762, 45, 15123, 721, 1128, 798, -676, 349, + -153, 263, 89, -854, -24, -350, -227, 157, + 587, -240, -185, 663, -32328, -148, -204, -2396, + -597, -344, 8104, -280, -375, 264, 648, 741, + -290, -321, 263, -569, -381, 167, 1757, -29636, + 30, 393, 398, 590, -242, 81, 1601, 3683, + 787, -336, 675, -1080, -713, 261, 18420, 1760, + 609, -4610, -551, 2790, 19807, 1347, -125, -9412, + -261, 548, 1056, 179, -917, -181, 12637, -267, + 621, -11908, 1366, 76, 5875, -742, 394, 155, + -370, 2481, 46, -15392, -344, -9750, -1353, -2242, + -1685, -1286, 2320, -2176, -1729, 705, -1582, 1590, + 1603, 21129, -3555, 2192, -883, 3438, 233, 1965, + -537, 399, -4818, -4085, 559, -292, 1290, -2700, + 10, -301, -1865, 226, 52, -1346, 306, 316, +-12281, -525, 285, 9631, -2, -849, 1620, 128, + 176, -1021, -473, 7929, -133, 2459, -33, -1517, +-22047, -2300, 98, -3513, 334, 4617, -193, -1309, + -1279, 738, -443, 95, 406, 660, -705, -54, + -39, 26396, -766, 249, -2423, 7759, -689, -3909, +-17404, 65, 1849, 945, 15907, 1386, -433, -831, + -6349, -3919, 1870, 8096, 311, 15043, 1709, -315, + 1288, 7522, -215, -5072, 1246, -1486, 3762, 4526, + 1517, -1936, -543, -263, 771, -10215, -425, -5098, + 59, -266, -1012, -380, -2131, 630, 405, 665, + -4550, 1403, 8, -46, -879, 398, -532, -185, + -286, 921, -65, 378, 669, 174, -15280, 91, + -776, 8480, 2463, 184, 2065, -666, -561, 4122, + 594, 732, 4007, -852, -71, 194, -126, 1765, + -1570, 968, -257, -288, 950, 27482, -333, 370, + -1429, 285, 558, 11245, -135, 565, 1296, -261, + -62, 600, 1455, 1457, 820, 357, -1203, 169, + 16611, -893, 359, 231, 418, -547, -95, 3866, + -511, -6344, -205, 923, -239, -16205, -1619, 217, + -3362, -6342, -1551, 649, -492, 264, -55, 170, + 16992, -91, 306, 43, -2770, 582, -1740, 77, + -882, 268, -515, -45, -6093, 24, -5596, 9034, + 284, 3211, 846, 1158, -1118, -604, -514, 1402, + -493, -938, -3892, 242, 643, 1421, -434, -406, + -102, -88, -11733, 161, 518, 978, 1508, 248, + -1036, 1407, -396, 293, 1154, -1435, 495, 8243, + 20, -845, -5373, 659, 2366, 29148, 145, 603, + 4088, -251, -2841, -2526, 20682, -1357, -2454, 660, + -125, 347, 11772, -113, -357, -2181, -1234, 1908, + -432, 16555, -248, 822, 15516, -158, -653, 1573, + 93, -2730, -1111, 958, -1550, -1153, 17, 610, + 781, -372, -1640, 144, -135, -1171, 22140, -427, + -26, 690, -800, -1497, -300, 5438, 390, 11304, + 9253, 1098, 5564, -9, 3856, 965, 2016, -12797, + 1687, 915, 3687, 539, 2496, 702, -1324, -71, +-12955, 7456, 4626, -848, -1815, 831, 2151, 7921, + -3000, 123, 1189, -1489, 222, 4973, 1936, 54, +-10527, -1238, -1157, 628, 14112, -2164, 1478, -985, + -4102, 635, 225, -311, -609, -1015, 301, 507, + -85, 443, 186, -552, -711, -16988, -1327, 220, + 565, -1673, -543, 18633, 331, 127, -342, 22, + -77, -360, -439, -501, -1848, -1147, -483, 1133, + -351, 41, 908, 502, -658, 474, -430, -11348, + -1, -531, 451, 709, 227, -978, 348, -265, + 269, -376, 2511, -188, -111, -387, 809, 1009, + 1570, -755, -11463, 667, -895, 446, 276, 145, + -513, -117, -462, -340, 1457, -963, 191, -788, + -150, -979, -507, -27540, 122, 368, -73, 10051, + -465, 642, 507, -6828, 241, -5025, 1598, -1174, + 2373, -2272, -1910, -108, 15, 166, 2, 10518, + 933, -12716, 510, 778, -424, 414, 4899, 759, + 862, -438, -886, 457, 304, 23639, 136, -203, + 478, -565, 244, -541, 2419, -773, 1107, -217, + 1579, -1037, 476, -97, 995, 17973, 161, 16466, + -178, -718, -1606, 947, 1991, 2266, 1249, 2708, + -611, 1424, -142, -53, 36, 509, 26159, -144, + 357, -37, -234, 587, 311, -509, -1639, -332, + -1618, -382, 302, -8657, -68, -30, 545, -12834, + 158, 158, 135, 621, -354, -871, 451, 1220, + -31, 2, -13414, 60, 3, -380, 541, -44, + 552, -366, 155, -462, 61, -232, -15426, 317, + 688, 1121, 2933, 7151, -168, -9167, -2521, 745, + 2792, -10448, 569, -3823, 630, -4626, -95, -416, + 828, 259, 72, 171, 635, -250, -128, -426, + -153, 260, -771, 314, 235, 26, 32281, -343, + 751, -1443, 324, -684, 1900, -1334, 2022, 30, + 1073, -2406, 2080, -485, -320, 15328, -860, -529, +-16444, -219, 1736, -149, -160, -828, 1089, 413, + 241, 3720, -90, 146, 1109, 243, -321, -256, + -68, 88, -50, 571, 1179, -25030, 104, 929, + 35, 529, 117, -13724, 734, -1344, 456, 5586, + 1566, -12573, -840, -1617, -2494, 1791, 1901, 3066, + -2159, -414, -3856, -9894, -1608, -657, 15355, -773, + -9217, -658, -972, 4730, -2986, -3478, -757, -1416, + -3702, 18089, 629, 7061, 124, 5843, 158, 19017, + -2204, -6976, 1629, -5657, 1101, -1859, -1425, -548, + -1132, -5043, 1074, -592, -196, 1902, 22705, -1228, + 214, -685, -2036, -2368, -315, -914, 533, 218, + 1091, -627, 2031, 13922, 104, -450, 4494, -498, + -361, 24734, 623, 1029, 2437, -1123, -5092, -6551, + 438, 16562, 375, -13102, -193, -2004, 3556, 179, + 1832, 2086, 798, -534, -195, -7105, 796, 3969, +-12269, 1570, 4273, -2692, 1240, -2901, -2045, -2453, + 372, 613, -548, -245, 687, 258, -8964, -1500, + -1519, -993, 17571, -357, 916, -1202, 1752, 2081, + -536, -3185, -1062, 19335, 721, -9958, 1052, -872, + 248, -3133, 456, 1641, 149, -11, 2955, 310, + -3178, -18823, 497, -971, -6587, -1380, 351, 106, + -43, 607, -4754, 213, 1030, 5377, -804, -2557, + 850, 1081, -706, 1325, -14922, -794, -14060, -1953, + 891, -3296, 329, -510, -1126, 1113, 1753, -411, + 1769, 429, -185, -1020, 194, -106, 11470, -591, + -272, 422, 337, 524, -150, 822, 51, -120, + 7193, 802, 640, -140, -42, 28125, -1020, 285, + -465, 3195, 69, 482, -953, 262, -7672, -373, + 5158, 5625, -3003, 550, 5371, 5619, -2200, 5392, + -804, 135, 1300, -3610, -23, -433, 13503, 224, + 911, -14421, -502, -2151, -1667, -1933, 2888, -277, + 547, -989, 3115, -32, -680, -164, 804, 412, + 62, -154, -190, 156, -10938, -360, -88, 843, + 328, -773, -267, -12668, 856, 1496, -243, -586, + 736, -2175, -677, -3069, 7480, -1764, -4024, -2569, + 1805, 194, -6814, -1135, -237, 2682, -156, -890, + 1285, 368, 1802, -683, -163, 1191, -13063, -496, + -335, 17482, 746, 818, 48, 21419, -598, -1753, + -1169, -2135, 40, -9114, 592, -3912, 1980, -264, + -304, 8138, -185, 286, -3024, 48, -1630, 909, + 661, -662, 18085, 240, -201, 69, 192, 305, +-22167, 692, -1135, -996, 398, -74, 18553, -958, + 1223, -5578, 508, -352, 1234, -450, 497, 780, + 79, 51, -221, 255, -26, 13352, -170, 231, + 590, 169, -733, -812, -65, -219, -20939, 200, + 35, -177, -454, 632, -267, -407, -120, 623, + -176, -664, 715, -23, 318, 148, 1125, 16, + 709, -21687, -230, -413, 1398, -1235, -283, 1615, + 175, -299, 349, 400, -112, 21762, -665, 364, + 1089, 1303, -54, 523, -381, -1312, 48, -886, + -1260, 408, 415, -8349, 7115, 180, -774, 3508, + -971, -255, -195, 81, -2674, -977, -355, -1500, + 178, -2081, -4432, -1014, 340, 5818, 138, -106, + 16917, 1203, 349, 3271, 961, 363, 6008, -6043, + 3736, -730, -4201, -514, -6131, -68, -14935, -1781, + -3898, -40, -18944, -461, -1694, -1269, -755, -81, + 2369, 484, 531, 14114, 85, 32, -10142, -142, + 600, -2374, 375, 675, -2663, 155, -947, 6427, + 11476, 1253, 5049, 1063, 2003, -1608, 2463, -2168, + -1128, 1079, 383, -996, 368, 1208, -3554, -959, + 4596, -1209, -4154, 1270, 9365, -2775, -1751, 998, +-20023, -347, 1505, 218, -142, 342, -128, -523, + -159, 75, -467, 257, -133, -142, 712, -621, + 428, -29584, 13, 402, -455, 119, -483, 1121, + -461, 960, 807, -46, 297, 14856, 221, -356, + 221, 15037, -4744, -2555, 447, -1418, 1464, 1391, + -1404, -5812, 512, -2321, 9882, 242, -2298, -137, + -849, -3182, 9394, 1412, 1052, 1369, -904, -494, + -231, 1113, 1087, -13317, 768, -1178, -3011, 24, + 229, 164, -10170, 328, 308, -591, 213, -543, + -82, -790, -875, 794, -558, -7651, -573, 1266, + -2084, 2275, -187, 97, 384, -11830, -185, -472, + 1365, 11636, -1405, 360, -487, -440, -1820, -349, + -293, 285, 25, -139, -415, -540, -108, 1136, + -673, 230, 19202, -545, -542, 919, 1221, -518, + 196, -21900, 795, 115, -16, 459, 3339, -347, + -346, -186, -695, -267, -714, 185, 266, -1218, + 120, -249, 233, -110, -30412, 285, 219, 2256, + 536, -442, 673, -1487, -477, -60, -1806, 183, + -7195, -577, 2230, -7594, -3230, 65, 22963, 111, + 390, 7134, -3716, -5123, -475, -32, -98, -466, + -118, -43, 74, -1071, -902, 1714, 4004, 26, + 97, 1680, 423, 252, 9667, 550, 354, -222, + 19, -224, -807, 365, 593, 363, -851, -28, + 553, 238, -481, 769, 279, 18367, -462, 286, + 4825, -141, 500, 20383, 1618, -31, -514, -2484, + -327, -8506, -705, -872, 530, -9997, -36, -431, + 2824, 3185, 1712, -318, 9513, -10065, 614, -503, + 389, 12830, -113, -15, -1007, -523, -1293, -2102, + -543, -1157, -583, 1228, 262, -674, -1847, -242, + 299, -12025, 547, -591, -9173, 275, 412, 2493, + 997, 1229, 1982, 27554, 245, 106, -1320, -153, + -423, -955, -449, 392, 824, 796, -1181, 1640, + -884, -70, 8789, 10021, -1806, 1019, 90, 1494, + 2071, -911, -1159, 212, 2207, -994, -2500, -497, + 92, -11544, -398, -774, 1474, 32, -671, -171, + -1250, -249, 1161, -654, -205, -36, 1733, 763 +}, + +.shape22_1 = { + 987, -6, -621, -220, -2438, -387, -535, -23, + -934, -68, -4985, 575, 483, 7243, -1075, 917, + 1739, -1832, -580, 1564, 131, -180, -1271, 3672, + 161, 1040, 1737, 2719, 1101, -185, -1410, 221, + -422, -8675, -753, -401, -5388, 13, 762, 1378, + 1113, 1768, -177, 3397, 2162, 267, 2261, -156, + 1708, -848, -79, -1819, -3159, -5548, -745, 7208, + -1039, 7555, -134, 2661, -2112, 2270, -1991, 441, + -6248, 246, 166, 2092, -1402, -242, -13600, -539, + 391, 2395, 11001, -981, 10906, -403, 823, 1647, + -294, 93, 504, -5448, 1213, -1849, -3077, 790, + -841, 12812, -11266, -1882, -805, -274, 1968, -49, + 1189, -80, -281, -40, 409, 2423, 581, -1362, + 207, -869, -589, 3294, -318, -4592, -476, 1014, + -135, -17999, -194, 807, -2946, -222, 44, -514, + -4407, -1201, 1155, -235, 98, 4432, -342, 2386, + 1402, -956, 3357, 1959, 4790, -139, -3494, -4280, + -589, -8422, 363, -746, 640, -360, -1007, -1100, + -7989, -12630, 1006, -1608, -864, -226, -915, -2032, + 1274, 596, 1864, 1067, 1597, 460, -2003, -5560, + -8020, 2354, 379, -3151, 44, 7024, -698, -2901, + 4976, 927, 1223, -93, 172, 189, 6639, -6082, + -726, -524, -3068, -3802, 16, -1039, -105, 2333, + -350, -306, -379, -832, 1282, 56, 3529, 562, + -603, 5954, 294, -1265, 8045, -3990, -169, -123, + -3267, 572, -879, 1562, -1185, 799, -9589, 407, + -590, 65, -2848, 433, -5547, -19, 7180, -7904, + -392, 323, -448, -4481, -3773, -5286, 1957, 226, + -2040, 3292, 2987, -1704, 2835, -149, 1435, 823, + 1775, -2769, 146, 234, -131, -15, 268, 37, + 139, 22, -196, 91, -3503, -5421, 24, -280, + 58, 370, 655, 1412, 113, 306, 16404, -234, + 315, -957, 72, -1129, 1993, -18719, -1415, 1349, + 2340, 541, 313, -1360, 31, 1441, -78, -9905, + -393, 367, -712, -2009, 372, -297, -123, 303, + -458, -323, 46, 8701, -1301, -8768, -43, 1818, + 212, -543, -5077, -8037, -2536, 702, 792, -381, + -272, 1941, 6320, -1871, -13938, -262, -2063, 108, + -861, 485, -440, 768, 5665, -302, 305, -13784, + 2889, -127, -94, 145, 1308, 7911, -8376, -643, + -596, 1357, -943, 1329, -84, -62, 1651, 391, + -2295, -5456, -357, -4611, 1361, 3961, -295, 642, + -698, 8614, 1613, -526, -120, -205, 17, -20171, + 1252, -261, 535, -1244, 92, -315, 878, 380, + 157, 3217, -493, -773, 513, -510, 11304, -899, + -27, 398, -6386, 659, -1001, -2737, -13295, 1219, + -1014, -193, 445, -2393, 344, -25, -599, -2848, + 884, 94, -11, -564, -36, 9939, -3530, 462, + -942, 10089, 824, 2994, -293, 71, 10167, -457, + 711, -964, -2128, 2530, 160, -2558, 2451, 1654, + -3828, 1560, 879, -1023, -8354, 851, -77, -112, + 19572, 2010, -1077, -1329, -1282, 1277, 252, -5622, + 4617, 58, -2315, -459, -1249, 92, 708, -737, + -3323, 182, 1557, -657, 546, -447, 19117, 1645, + -336, -26, -2041, 5926, 4746, -1866, 3922, 2798, + 5320, 7, 470, 842, 229, -567, 742, -3306, + 659, -871, -226, -2593, -1003, -1373, 595, -768, + 20658, 944, 1228, 279, -1531, -618, 361, -4019, + -343, -351, 7143, 293, 92, -2713, -269, -30, + -332, 4093, 216, 239, -563, 1943, -944, -2268, + 70, -209, 440, 1493, -446, 491, -362, 25, + -331, 433, -1585, 173, 1126, -3614, -234, -2649, + 1181, -641, -160, 3727, -841, -2134, -1396, -5758, + -14, 364, -4651, 1151, 194, -5234, 5878, -1348, + -1388, -233, 3810, -860, 9479, -24, -6616, 1387, + -455, 447, -224, -2997, 12, 3502, -73, 470, + -9170, 1677, -740, -592, -1638, 675, -93, -17842, + 1750, -847, 993, -2393, -49, -2029, 1940, 588, + 475, -3467, 55, 5087, 2989, 380, 915, -2782, + 2418, 11303, 1098, 1009, 1372, -5780, -303, 1451, + 972, -7433, -571, 1661, 64, 10265, 1541, -50, + -964, -738, -253, -3105, -695, -546, -775, -18971, + -3094, -2379, 738, 1625, 623, 1073, 782, 723, + -3417, -578, -189, 4108, 1115, -1222, -9102, -4736, + 347, 946, 322, -3699, 193, -15139, 367, 969, + -788, -694, -620, -26, -16, 4, -478, 20792, + -1175, -231, 2566, -1270, 162, 181, -1451, -5370, + -2429, -8910, -3794, -5807, -1655, 248, 4432, 1393, + -2451, -2706, -744, 687, 842, -1281, 2960, -2348, + 153, -1671, -1433, -1250, -1096, 2501, -5393, 4266, + -1098, 880, -1215, 817, -443, 10053, 705, -689, + -2679, -1205, -3302, -809, -918, -1005, 124, -329, + 108, -52, -5305, -419, 128, -8137, 1427, 387, + -235, -2582, 190, -173, -1031, 2672, -985, 3309, + -5927, 7327, -8463, -2, 6035, 743, 552, -14, + -580, -68, -11886, 476, 61, 1172, -529, -988, + 871, -776, -332, 20870, 384, 7795, -10830, 723, + 1690, -519, 962, 663, 1300, -465, 47, -3578, + 56, -8131, 2041, -8524, -1303, 6349, 1903, -6726, + 1156, -224, 1286, -2355, -3415, 985, -502, -2474, + 49, -2789, -3616, -1707, 3363, -140, 1702, -1919, +-11518, -404, 62, -6933, -1187, 10830, 132, 284, + -639, 1349, 2367, -311, -626, 745, 5660, -152, + -121, -5236, -481, 5889, -1263, -8443, -33, 936, + 423, -117, 111, -1055, -103, -321, 1286, -611, + 777, 827, 422, -162, -6767, -241, 289, -441, + -1344, 2706, -1260, -4649, -847, -16107, -263, -1826, + -521, -760, 942, 309, -2692, -4835, -853, -806, + -276, -322, 5647, 1219, -433, -346, -1171, -1028, + 191, -406, 444, 33, 272, 3502, 475, -2178, + 1915, -290, -1037, 833, -695, -121, 415, 556, + 1025, -2268, 334, 2847, -1768, -389, -14034, -3878, + 836, 4605, -1985, -359, 1478, -149, 823, -926, + -828, 135, 469, -645, -328, -94, -178, 2820, + 781, -2361, -5778, 1312, 3918, -1, -3654, -942, + -2495, 615, 210, -17006, -396, -445, 382, 563, + -1738, 95, -9107, 4869, 348, 527, 5688, -145, + -1195, -2367, -749, -187, 6697, 27, 347, 12571, + -64, -427, 3765, 824, -1216, -1126, 5997, 586, + 110, -294, -240, 1646, -186, 1360, 413, -6459, + -1535, -3208, -520, -621, 8613, 1098, -19, -199, +-11446, -657, -353, 906, 678, -19375, -126, 1688, + 644, 1231, -2151, -742, 320, -68, -12426, -2750, + 1483, -1603, -2639, 3028, 2662, -140, 5405, -917, + -407, 207, 9392, -569, 931, -124, -82, 6370, + 477, -12264, 1093, 3427, -732, -50, 232, -67, + 609, 1615, -463, 583, 1808, 1499, -509, -24431, + 231, -72, -192, -333, -7554, -342, -9036, -304, + 136, -15450, 1333, -1147, -1488, -1440, 75, 63, + 747, 297, -251, 30, -301, -1810, -86, 544, +-10446, 1300, 10468, 218, -2471, 1982, 423, 3046, + -1112, -657, -104, 10671, -46, -10953, -6205, -1275, + 1972, 937, -75, -330, -529, -2581, 1510, -1881, + -1372, -1725, 14541, -560, -884, 946, -307, -5031, + 7798, -190, 720, 1525, 29, 868, 1238, 372, + -462, 2467, -2661, 2721, -1514, 723, -2782, -494, + 240, -7147, 587, 751, 1613, 11054, 1074, 275, + 972, -970, 27, -75, 24, -9, 163, 88, + 21, 87, -78, -743, -128, -2336, -235, -743, + -3918, -333, 1088, -195, -166, 782, -119, -3263, + 604, 2155, -258, -1282, -129, 43, -5124, -472, + 685, -14243, -1294, -99, -1922, -284, -422, -1112, + -3194, -1977, 1448, -419, -7172, 20, -70, 2102, + 0, 278, 1882, -10005, 1612, 6020, 71, -141, + 1027, -43, -864, -448, -21257, -336, -2090, 5207, + 674, 722, 1030, 1367, 1963, 6057, 984, -1087, + -3690, 47, -61, 104, -81, 895, 22, 728, + -191, 3219, 5228, -27, -802, 1438, -9026, -1352, + -581, 912, -664, -23, -522, -912, 178, -603, + 571, 574, 406, 564, 175, -405, -2965, -1072, + 1749, -957, -402, 9431, 1649, -409, 291, 5765, + 808, 6754, 727, -37, -254, 1530, 213, 3253, + 357, 371, 45, -1276, -12432, 2799, -1924, -176, + -1107, -183, 198, 3662, 20, -1166, 2507, -3484 +}, + +.shape22_2 = { + 1688, -307, -590, 971, -3616, -1632, -218, 1861, + -1479, -367, -6584, 487, -951, 10808, -232, 444, + 89, -1216, -1577, 1283, 249, -3, -3646, 2205, + -1116, 2630, 2110, 3193, 270, -189, 78, -826, + 1010, -10520, -370, 1234, -5604, -262, 1277, 1440, + 2225, 2466, 305, 2469, -740, 120, 3184, 2125, + 1185, -3230, 1597, -1670, -8283, -9857, -129, 8932, + -1355, 8755, 707, -256, -135, 423, 1543, 1782, + -4875, 403, 373, 1570, -183, 782, -9617, -2539, + 1090, 523, 6929, -1226, 10329, -278, -999, -260, + -1810, 666, -463, -6100, 2040, 256, 532, -1475, + 383, 13137, -10953, -2226, -1243, 1584, -2348, -809, + 3602, -816, 194, 480, 84, 2297, 344, -5181, + -6243, -2616, 2093, 7112, -2373, -1346, 291, -372, + -863, -16911, -1878, 378, -826, 579, 737, -468, + -2288, 264, 634, 108, -254, 4717, -1286, 2885, + 986, -4944, -98, 2007, 991, -2252, -2887, -6141, + -605, -10474, 896, 6, 235, -407, -70, 478, + -8392, -10870, 575, -672, 103, 320, -179, -229, + 445, -380, 1124, 3271, -1327, -275, -239, -10381, + -9102, 1361, 96, -1255, -277, 9316, -415, -2258, + 8992, -117, 1625, -704, -980, 752, 9133, -8792, + -423, -272, -865, -2285, 443, -2014, -2592, 3180, + 1198, 2570, 3360, -7090, 3311, 697, 2229, 46, + -472, 6984, -140, -780, 10391, -1078, 48, -564, + -5073, 1576, -826, -483, 952, 1099, -11536, -652, + 375, 440, -7319, 2646, -2089, 2804, 3795, -6704, + 251, 811, -1224, -1976, -4943, -6671, 780, -2856, + -7907, 2447, 3755, -135, 1127, 328, 553, 3450, + 351, -5054, -5, 1077, 109, -254, -391, -511, + 404, -61, 510, 395, -6044, -7454, 364, -575, + 65, -410, -1921, -248, 128, 311, 17131, -2135, + -563, -884, 2356, -3951, -1176, -16695, -1534, 1977, + 626, 2478, 1554, -1070, 38, -551, 370, -11053, + -331, 1062, -1385, -1681, 1028, 3350, 239, -76, + -156, 49, 397, 7060, -2834, -6527, 22, 1920, + -951, 356, -7674, -8903, -120, 317, -303, 160, + 530, 4611, 1083, 514, -12207, -283, 1413, -848, + -645, -432, 0, -192, 4780, -3485, -1192, -10574, + 1274, -3057, 475, -188, 183, 7865, -11214, -268, + 491, 1422, -28, 149, 515, -1651, 670, -450, + -958, -4288, 567, -182, 668, 4069, -213, -1176, + 148, 8854, -151, 474, 599, 1297, 237, -19186, + 2993, -482, -591, -1322, 25, -628, -828, -203, + -1500, 5519, -84, 723, -1137, 1217, 13045, -707, + -372, -200, -4142, -790, 188, -6760, -8288, 766, + 366, 444, -517, -2679, -1470, -61, 161, -3734, + 3053, 2012, 439, 627, 524, 5538, 549, -473, + -2244, 8399, -6395, 5811, 851, 58, 11376, -6, + -337, -689, -1510, -690, -388, -3587, 2665, 3371, + -1850, -953, -513, 581, -10296, 548, 1092, 565, + 18045, 215, -1486, -1270, 450, -880, 407, -6547, + 8393, 206, -515, -1565, -219, -1872, 1479, 382, + -569, -5002, -1247, -45, -740, -1791, 17177, -1210, + 761, 132, -1627, 4970, 5563, 722, 5614, 430, + 5659, 139, 1193, 1513, 1144, -1319, 561, -5145, + 1010, 199, 656, -3958, 3544, -1758, 810, -1578, + 15976, -139, -1035, -416, -543, -418, 2824, -6541, + 94, -673, 11741, 426, -15, -5280, 780, 1795, + -4616, 8192, -297, -206, 883, 2369, -395, -4266, + -3120, -199, 985, 1240, 352, 232, -170, 176, + 413, -495, -1399, 754, 618, -6103, -179, -2546, + 965, -1362, -806, 838, -3912, -1346, -3135, -937, + 219, 307, -3509, 1210, 2381, -7923, 6358, -885, + 2902, 284, 2560, 1789, 6878, 6, -4418, -2206, + -1091, 1840, -118, -2659, 1008, 2192, 1651, 1363, + -7772, 1252, -1200, 133, -757, 501, -98, -17197, + 98, -543, 1743, 621, -809, -1950, -793, 1168, + -743, -7124, 166, 7875, -4466, 356, -1430, -467, + 8589, 9931, 520, -866, 1945, -599, -434, 113, + 589, -3456, 597, 6076, 1114, 9660, 1532, 2073, + -138, -721, -1030, -1309, 625, -4040, 1211, -18836, + -3963, -4468, 197, 600, -1004, -816, -560, -476, + -2160, -2, 26, 8162, 1057, -178, -11739, -1882, + 1000, -227, 109, -1852, -1163, -17143, 140, -718, + -1150, 33, 1397, -45, -205, 153, -1494, 20509, + -51, -904, -599, 1915, 884, 504, -1819, -4487, + 1252, -1259, -2200, -5601, -448, -686, 5778, 873, + -4282, -533, 295, -450, 1422, 2393, 3267, -3911, + 249, -3605, -3190, -1096, -2422, 274, -1918, 4070, + -206, -432, 1919, -645, -275, 12954, 311, 1479, + -2664, -852, -4809, 1102, -375, 20, 1659, -1179, + 1199, 44, -5590, -1112, -566, -11369, -125, -871, + 158, 1208, 265, -519, -405, 2439, -1129, 1827, + -9461, 8548, -1606, 380, 4924, 662, 1314, -391, + -2024, 827, -13381, -198, -142, 1600, 3329, 125, + -672, -220, 557, 18642, 60, 7296, -10472, -712, + 1188, 808, 64, 479, 555, 264, 394, -611, + -810, -7943, -235, -6889, -1575, 1320, -381, -7414, + 1740, -744, 369, -626, -6899, -2144, -593, 668, + -351, -3756, -5143, -1814, 806, -475, 588, -507, + -9088, -629, 154, -6945, -1105, 10658, -435, 384, + -757, 1183, 3806, -747, -378, 535, 10224, 626, + -866, -1931, -1484, 5818, -750, -9628, -250, 589, + -653, -198, 104, -934, 1207, 46, 960, -1032, + 4236, 4471, -2896, 1551, -7714, -1921, 746, -671, + 5114, 5482, -522, -3344, -1905, -9220, -663, -1355, + -611, 65, 1368, 628, -1276, -6780, -2623, -661, + -117, -437, 5507, 3205, 928, 537, -9487, 80, + -102, -538, -277, 863, -1421, 6054, 1227, 696, + 3582, -508, -1757, 145, -1705, -1201, 4157, -3314, + 2291, -834, 821, 552, -724, 513, -9730, -8944, + 1913, 501, -216, 716, 2766, -823, 2535, 314, + 1774, -3372, 235, 244, -1216, -710, 689, 6736, + -52, 218, -8382, -444, 920, 569, -4890, -2050, + -612, 1708, -481, -15500, -2878, -691, 538, -125, + -81, -862, -10094, 12050, -1392, -326, 133, 61, + -50, 715, -6662, -673, 10745, -596, 44, 3906, + 247, -745, 4950, -210, 497, -1875, 8197, 2141, + 1454, -23, -1480, 2184, -804, 5515, -1311, -8893, + -2880, -3606, -282, -116, 8084, 618, -403, 1106, +-14405, 1159, 229, 742, -184, -19445, -329, -747, + -1240, 1487, -1670, -839, -77, -882, -10986, -2851, + -24, -747, -3615, 1939, 1389, 132, 5367, 1355, + 408, -1272, 11388, 153, 2708, -1503, 169, 7357, + 51, -13586, -404, -304, 626, 163, -1814, -515, + 445, 589, -1194, 770, 555, 246, -165, -21192, + 184, -265, -1116, -485, -8107, -1992, -10805, -880, + -1455, -15154, 2312, -1712, -11, -1899, -400, -2, + 314, -318, -280, -658, -1066, -2584, 1027, 801, +-11960, 1519, 8873, 465, -3229, 1801, -348, 749, + 7, 1079, -2051, 11521, -831, -13425, -6315, -1135, + 1088, 1056, -46, -1006, 374, -5065, 1163, -402, + -50, -1459, 9586, 514, -1439, -638, -155, -5289, + 8043, -612, 739, 1084, -60, 891, 786, -6, + -1078, 2097, -5333, 3497, 23, -913, 1303, 957, + -35, -6418, -146, -971, 2738, 9695, -1722, -2002, + 905, -1749, -917, 122, 379, -325, -455, 230, + 825, -137, -335, -96, -160, 390, 731, -2621, + -5889, -3949, 5138, 839, -1190, -66, 961, -4600, + 2345, 1607, -2448, -6653, -592, -106, -7619, -794, + -1186, -12587, -11, -2224, -225, -2903, 534, 1355, + -7002, 314, 494, 1950, -8545, -2531, -2438, -77, + 886, -1851, 944, -10156, 3003, 1846, 1919, 2019, + 471, 451, -436, -1012, -20121, 275, 98, 1776, + 578, 96, -16, 1156, 3689, 7, -207, 920, + 105, -58, -175, 163, 697, -407, -61, 1261, + 1297, 5061, 5326, -1126, 516, 1208, -11108, 441, + 7, -899, -19, -368, 438, -1911, 602, 716, + 313, 853, 1448, -817, -1453, 1384, -4371, 1043, + 1884, 1619, 2196, 10075, -1548, -1201, -796, 5228, + 2657, 8244, -605, 422, -693, 3171, 657, 5438, + -171, 633, 1579, -1718, -12265, 1083, -976, -293, + -3802, -306, -668, 7818, -1340, -402, 2231, -4472 +}, + +.shape44 = { + -40, -282, 1366, -1173, -3484, 355, -1078, 3800, + 4386, -35, -4192, 523, 1291, 678, 156, 2272, + -1043, 1075, -1849, -314, -522, 392, 2098, -79, + 473, -275, 2, 6398, 451, 94, 173, -431, + 1115, -10788, 35, 1823, -3380, -97, -98, -350, + -23, -1264, -308, 8948, -695, -79, 3520, 308, + 340, -362, -547, 1207, -1182, -10392, -148, 3580, + 481, -425, 862, 4894, 736, -152, -626, 23, + -5853, 39, -143, 418, -103, -1457, -12826, -122, + 283, -225, 10561, -153, 8872, -806, -51, 93, + 420, -209, 345, -7661, -732, -48, 479, -225, + 276, 13385, -12578, -1440, -265, -274, 1105, -3376, + -691, -579, -972, 300, 349, 362, 722, -472, + 185, 814, 14, 4746, 761, -336, 1691, 888, + -1669, -18717, 827, -2605, 921, 155, 68, 112, + -3032, -287, 414, -86, -62, -213, -106, 807, + -619, 598, -178, 3104, -481, -1553, 1250, -8363, + -686, -9608, 116, -47, 321, -89, 939, -35, + -7995, -10159, -526, 145, 363, 2170, 1077, -1223, + -738, 120, -408, -390, -80, -404, -1607, -10187, + -6432, 961, 94, -1459, 489, 6641, 372, 1007, + 5958, -834, 222, 51, 282, -1005, 4473, -8841, + -73, -477, -557, 121, -165, -1195, 438, 139, + -190, -4205, -4278, -4617, -7592, 40, -422, -459, + 594, 7331, 164, 297, 2631, -9075, -78, 372, + -6213, -1053, 182, -71, -386, -604, -11720, 552, + -617, 413, 1292, 4, -485, 1162, 6051, -5168, + -181, 1024, -630, -275, -4067, -8627, 1386, 970, + -423, 2973, 2360, 363, -274, 410, 48, 768, + 2958, -427, 86, 64, -128, -273, -182, -292, + 868, 463, 73, -116, -6509, -5295, -37, 691, + 344, -120, 168, 419, 494, -1175, 18896, -135, + -376, -218, -453, -916, -1040, -22179, -846, -1005, + 264, 159, 597, -952, -825, 393, -328, -14694, + 371, -263, 740, 38, -1001, 1289, -668, 187, + -155, 143, 683, 7133, -563, -8383, -291, 176, + 75, 613, -6965, -11480, 324, -490, 586, 416, + 762, 5777, 64, -47, -4124, -1196, -113, 701, + -211, 2335, 130, 684, 7278, -158, -213, 297, + 10845, -1439, -465, 17, -792, 6499, -10187, -444, + -1416, 482, 636, 1472, 752, 157, -334, -3230, + -19, -6747, 660, -3082, 4057, 6801, -19, 635, + 19, 9807, 526, 126, 444, -190, -418, -26754, + -202, 243, 597, 10, 345, 814, -330, 160, + 344, 3986, 470, 459, 2387, -549, 11889, -1837, + -30, 2608, 615, 2301, -771, -1589, -6935, 1321, + 4287, 295, -558, -1503, -611, 2104, 411, -218, + 1145, -426, 58, -102, 13, 7499, 476, -4032, + -2237, -2658, -1943, 5268, 1039, 389, 7091, -22, + 156, -186, 2432, -878, 305, -1726, 3209, 361, + -1030, 505, 618, -262, -1877, 268, 757, 24, + 24306, 102, 973, 142, -953, -1199, 116, -255, + 5370, -347, -365, 937, -6939, -1189, -760, 531, + -1759, -705, -557, -620, 1151, 250, 21629, -1532, + -128, 1421, -211, 592, 5126, 197, -716, 1113, + 5844, -266, -12, -813, 85, 994, -2106, -3915, + 1402, 533, 521, -883, 87, -386, -2, -4350, + 19790, -180, -363, 60, 101, -1717, 119, -381, + 100, -565, 3264, 3052, 200, -7319, 26, 347, + -482, 10609, -766, 526, -623, 3495, 339, -4406, + -59, -213, 686, -603, 133, 99, 48, 1716, + -1214, 1397, -2396, -384, -901, -3750, -660, -4314, + 313, 192, 292, 259, -644, 176, 2099, 7961, + -29, 642, -2970, 1792, -61, -4348, 578, 1867, + -1868, 32, 5262, 137, 6109, 443, -176, 351, + 400, 1874, -175, -4065, 697, 292, -744, 121, + -5134, 6996, -198, 628, 1073, -599, -116, -17900, + 647, -1049, -663, 1427, -94, 721, 311, 337, + 1376, -2784, 3947, 1342, 1577, -406, -260, -10228, + 109, 2358, 2437, 346, 1261, -308, -2094, 1682, + 144, -675, 183, 428, -950, 1249, -1546, 33, + -254, 681, -1264, -964, -310, 838, 100, -21952, + -1484, -1564, 339, 298, 67, -338, 89, 709, + 53, 258, -359, 2803, 1553, -312, -7993, -1627, + 1189, 476, -123, 336, -767, -18522, 589, 942, + -645, -381, -1913, -582, 55, -876, -509, 25143, + 690, -787, -1136, 114, 162, 342, -231, -8742, + 99, -646, -474, -1384, -110, -98, 8634, -14, + -9676, -312, 358, 496, -676, -97, 1904, -2124, + -66, -1868, 502, -513, -3244, 2079, -1476, 5440, + -40, -381, 500, -238, -471, 12160, 248, -1005, + -2886, 173, -3369, -355, -256, -117, -474, -1282, + -355, 130, -4833, 31, -232, -12931, -826, 322, + 839, 1537, 73, 226, -1888, -483, -2848, -190, + 1271, 3597, -4514, -38, 6093, 347, -68, -415, + -105, -1664, -11461, -110, -399, 389, -511, 935, + -424, -1708, -1026, 23239, 298, 7363, -9206, -566, + 259, -412, -1213, 335, 614, 928, 972, -1919, + -407, 509, 303, -13762, -524, 10360, 1318, -2758, + 2350, -106, -119, -68, -6155, -255, -448, -34, + -64, -4382, 47, 635, -339, 406, -447, -445, +-10592, 233, 160, -5515, -1333, 6755, -952, 172, + -1260, -294, 3480, -352, -231, 415, 482, -498, + -191, -2034, 7934, 7997, -688, -9503, 376, -228, + -500, 222, -1021, -407, 261, 179, 622, 1217, + -443, -763, -508, -719, -4509, 91, 449, -283, + 91, -39, 961, -10148, 1596, -9161, -327, 221, + -470, 676, 12, 1416, 984, -10988, -5500, -189, + -727, 226, 4691, 688, 759, 930, -6444, -114, + -539, -526, -21, -1218, 650, 6088, 419, 6185, + -1200, 84, -1232, -34, -107, 60, 2248, 450, + 1187, 1264, -181, 857, 2235, -2859, -13483, -192, + -586, -207, -5569, 503, 3376, 1243, -700, 2119, + -2186, -296, 896, 299, 177, 184, 1375, 2498, + 161, 579, -3683, 443, -21, -186, -3474, 238, + 274, 277, -325, -8325, -223, 125, 191, 333, + -345, -1391, -7372, 11389, -1055, 4066, -1098, 87, + -203, 443, 363, -959, 15395, 4016, -254, 1611, + -168, -1070, 2709, -768, 506, -1245, 5821, 2499, + 1564, 27, 85, 1989, -1092, 150, -972, 660, + -33, 687, 545, -1564, 720, -196, -52, -1751, +-25380, -1246, -615, 391, -512, -23289, 460, 360, + -85, -723, -250, -163, -48, -921, -3988, 425, + -1268, -1695, 3233, -1093, -1166, 198, 7602, 21, + 354, 733, 12213, -347, 532, -427, 22, 2218, + -578, -3382, -474, -625, 78, -4546, 863, -53, + -357, -1529, 1014, 710, 1356, -430, -1633, -24823, + 95, 26, 590, -591, -7833, -1355, -9771, -502, + -907, -15433, 957, 463, 35, -496, 294, 2129, + 1274, -160, -83, 531, -767, 285, 232, 5983, + -6122, 1620, 4112, -239, -1733, -46, -1321, 467, + 613, -3747, -2284, 13991, 373, -17357, -219, -80, + -210, 1462, 37, -1692, 548, -5845, 420, 54, + -350, -285, 1981, 262, -874, 2844, -435, -6305, + 6449, 72, 631, -94, 96, -442, 1137, 89, + 364, 3392, -3512, -387, 1055, 318, -1111, -6971, + 344, -9105, -96, -9362, 190, -225, 370, 161, + -73, -1830, 174, 48, -518, -3486, 137, -235, + 810, 23, 80, -642, -35, -316, -269, -373, + -2413, -933, 2525, 267, -508, -200, 422, -3470, + -1273, 640, -1956, 139, 394, -1043, -11008, -158, + -1089, -2023, 202, -979, -744, -159, -392, -37, + -1679, 2183, 1365, -2883, -4752, -2255, 109, 1660, + -613, -511, 1284, -7331, 947, 7009, -2072, -321, + -936, -551, -875, 160, -27027, 654, 265, 164, + 376, 726, -149, 2813, -94, 5728, 702, -1118, + -2555, 217, -186, -107, 146, -83, -62, -196, + 708, 146, 3729, -416, 212, -163, -7861, 347, + 83, -1079, -994, 271, -1054, -1647, 139, -20, + 354, 1298, -3420, 1130, 161, 475, -3913, 468, + 23, 285, -1699, 8234, -947, 222, 260, 4276, + -341, 6387, 21, 490, -1908, -1654, -60, 2471, + 733, -135, 109, -1136, -14756, 4922, 1165, 149, + -3976, -66, -594, 6181, -110, 292, 1129, -591 +}, + +.lsp08 = { + 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789, + 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387, + 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548, + 0.1536, 0.3279, 0.5143, 0.6859, 0.9763, 1.2744, 1.5605, 1.8566, + 2.1007, 2.3450, 2.6075, 2.8850, 0.2075, 0.4533, 0.7709, 1.0377, + 1.2953, 1.5132, 1.7826, 2.0351, 2.2590, 2.4996, 2.6795, 2.8748, + 0.1393, 0.2453, 0.3754, 0.5453, 0.8148, 1.1289, 1.4389, 1.7592, + 2.0353, 2.3215, 2.5934, 2.8588, 0.1250, 0.3627, 0.7613, 1.1380, + 1.4163, 1.5565, 1.6920, 1.8130, 1.8678, 2.0427, 2.4318, 2.8544, + 0.2256, 0.4223, 0.6452, 0.8599, 1.0673, 1.3118, 1.5486, 1.8366, + 2.0759, 2.3026, 2.5284, 2.8030, 0.2304, 0.4404, 0.6891, 0.8964, + 1.1510, 1.4202, 1.6483, 1.8580, 2.1181, 2.3686, 2.6078, 2.9128, + 0.2230, 0.3816, 0.5520, 0.6062, 0.7909, 1.0988, 1.4330, 1.7846, + 2.0713, 2.3457, 2.6048, 2.8708, 0.2447, 0.5800, 0.8249, 0.9905, + 1.1721, 1.3990, 1.6694, 1.9064, 2.1307, 2.4255, 2.6815, 2.9117, + 0.1974, 0.3812, 0.5802, 0.7759, 0.9280, 1.1547, 1.4170, 1.6369, + 1.8890, 2.2587, 2.5626, 2.8239, 0.1209, 0.2510, 0.4841, 0.8048, + 1.1197, 1.3563, 1.6073, 1.8926, 2.1350, 2.3669, 2.6291, 2.8985, + 0.2352, 0.4347, 0.6582, 0.8178, 0.9548, 1.1654, 1.4942, 1.8812, + 2.1703, 2.3779, 2.6412, 2.8871, 0.2091, 0.4084, 0.6730, 0.9151, + 1.1259, 1.3262, 1.5937, 1.8129, 2.0237, 2.3317, 2.5778, 2.8620, + 0.1167, 0.2406, 0.4520, 0.7298, 0.9848, 1.2448, 1.5137, 1.7874, + 2.0280, 2.3020, 2.5914, 2.8794, 0.3003, 0.4966, 0.6520, 0.8505, + 1.1600, 1.3981, 1.5805, 1.8346, 2.0757, 2.3102, 2.5760, 2.8499, + 0.2451, 0.4163, 0.5960, 0.7805, 0.9507, 1.2438, 1.5587, 1.8581, + 2.0735, 2.3198, 2.5704, 2.8220, 0.3112, 0.5517, 0.7032, 0.8528, + 1.1489, 1.4257, 1.6848, 1.9388, 2.1577, 2.4265, 2.6678, 2.9051, + 0.2249, 0.3897, 0.5559, 0.7473, 1.0158, 1.3581, 1.6914, 1.9930, + 2.1843, 2.3534, 2.5512, 2.8065, 0.2600, 0.4574, 0.7349, 0.9691, + 1.1696, 1.3848, 1.6335, 1.9021, 2.1174, 2.3481, 2.5902, 2.8390, + 0.2246, 0.3372, 0.4560, 0.5249, 0.7056, 1.0273, 1.3810, 1.7132, + 1.9819, 2.2574, 2.5410, 2.8491, 0.1419, 0.4834, 0.8835, 1.1453, + 1.2839, 1.4224, 1.5593, 1.7877, 2.1285, 2.4070, 2.6043, 2.8511, + 0.1886, 0.3677, 0.5617, 0.8099, 1.1277, 1.3841, 1.5804, 1.8136, + 2.0307, 2.2805, 2.5399, 2.8322, 0.2351, 0.4151, 0.6675, 0.8713, + 1.0464, 1.3292, 1.6586, 1.9281, 2.1355, 2.3495, 2.6222, 2.8782, + 0.2700, 0.4489, 0.6206, 0.7121, 0.7737, 0.9848, 1.3658, 1.7433, + 2.0139, 2.2243, 2.4806, 2.8175, 0.2479, 0.4425, 0.6490, 0.8745, + 1.1161, 1.3849, 1.6773, 1.9566, 2.1491, 2.3624, 2.5685, 2.8114, + 0.2035, 0.3701, 0.5567, 0.7953, 1.0082, 1.2758, 1.5373, 1.7822, + 2.0175, 2.2601, 2.4759, 2.7771, 0.1856, 0.3461, 0.5998, 0.9041, + 1.2383, 1.4612, 1.6667, 1.9305, 2.1617, 2.4107, 2.6477, 2.8656, + 0.2107, 0.3715, 0.5289, 0.6651, 0.8420, 1.1168, 1.4401, 1.7230, + 1.9901, 2.2687, 2.5452, 2.8655, 0.1218, 0.2999, 0.6348, 0.9482, + 1.2745, 1.5876, 1.9129, 2.2348, 2.4020, 2.4922, 2.6351, 2.8357, + 0.1617, 0.3483, 0.5869, 0.8163, 1.0366, 1.2344, 1.4609, 1.7029, + 1.9476, 2.2337, 2.5258, 2.8442, 0.2505, 0.4894, 0.7510, 0.9152, + 1.0845, 1.3657, 1.6528, 1.8346, 2.0160, 2.2811, 2.5338, 2.8136, + 0.0947, 0.1158, 0.0578, -0.0337, -0.0066, 0.0104, -0.0447, -0.0505, +-0.0778, -0.0293, 0.0251, -0.0143, 0.0349, -0.0227, -0.0909, 0.0523, + 0.0325, -0.0410, -0.1045, -0.0899, -0.0009, 0.0075, -0.0575, -0.0855, +-0.0129, 0.0575, 0.0597, 0.0391, 0.0371, -0.0184, -0.0083, 0.0287, + 0.0143, 0.0167, 0.0120, -0.0168, 0.0452, 0.0223, -0.0352, 0.0119, +-0.0496, -0.0965, -0.0661, -0.0072, 0.1099, 0.0843, -0.0087, -0.0478, +-0.0128, -0.0120, -0.0004, 0.0731, 0.1047, 0.0630, 0.0196, -0.0103, +-0.0399, -0.0986, -0.0912, -0.0390, -0.0247, -0.0694, -0.0749, -0.0066, + 0.0223, 0.0634, 0.0343, -0.0134, 0.0727, 0.0241, 0.0066, 0.0437, + 0.0610, 0.0364, 0.0248, -0.0358, -0.0686, -0.0104, 0.0426, 0.0088, +-0.0137, -0.0165, 0.0671, 0.0815, -0.0863, -0.0644, -0.0088, 0.0023, + 0.0482, 0.1174, 0.1270, 0.0594, 0.0165, 0.0949, 0.1098, 0.0137, + 0.4951, 0.4999, 0.4958, 0.4907, 0.4984, 0.4965, 0.4958, 0.4996, + 0.4987, 0.4958, 0.4986, 0.4977, 0.2841, 0.2186, 0.1474, 0.1687, + 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531 +}, + +.lsp11 = { + 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057, + 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977, + 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351, + 1.5233, 1.7262, 1.9466, 2.1739, 2.3495, 2.5162, 2.7164, 2.9202, + 0.2010, 0.3330, 0.4488, 0.6465, 0.8046, 0.9889, 1.1479, 1.2964, + 1.4770, 1.6606, 1.8789, 2.1155, 2.3287, 2.5199, 2.7101, 2.9119, + 0.1168, 0.2197, 0.3279, 0.4691, 0.6268, 0.8251, 1.0533, 1.2714, + 1.4712, 1.6762, 1.8831, 2.1114, 2.3230, 2.5297, 2.7365, 2.9270, + 0.1405, 0.3109, 0.4986, 0.6891, 0.8634, 1.0583, 1.2594, 1.4349, + 1.6232, 1.8116, 1.9905, 2.1935, 2.3799, 2.5656, 2.7661, 2.9486, + 0.1703, 0.3057, 0.4403, 0.5225, 0.5969, 0.8110, 1.0729, 1.3215, + 1.5407, 1.7381, 1.9477, 2.1680, 2.3586, 2.5612, 2.7630, 2.9410, + 0.1128, 0.2628, 0.4523, 0.6495, 0.8176, 0.9816, 1.1746, 1.3710, + 1.5568, 1.7518, 1.9497, 2.1452, 2.3346, 2.5389, 2.7362, 2.9264, + 0.1809, 0.3287, 0.5205, 0.7264, 0.9298, 1.1217, 1.2970, 1.4894, + 1.6874, 1.8493, 2.0576, 2.2382, 2.4097, 2.6041, 2.7796, 2.9389, + 0.2502, 0.4709, 0.6892, 0.8346, 0.9209, 1.0455, 1.2399, 1.4616, + 1.6463, 1.8380, 2.0475, 2.2397, 2.4665, 2.6550, 2.7701, 2.8895, + 0.1040, 0.2340, 0.3964, 0.5740, 0.7764, 0.9941, 1.2000, 1.4014, + 1.6024, 1.7974, 1.9939, 2.1959, 2.3783, 2.5663, 2.7613, 2.9484, + 0.1912, 0.3393, 0.4743, 0.6313, 0.8014, 0.9879, 1.1855, 1.3922, + 1.5678, 1.7289, 1.9271, 2.1165, 2.3089, 2.5414, 2.7448, 2.9269, + 0.0965, 0.2025, 0.3398, 0.4990, 0.6934, 0.9386, 1.1730, 1.3766, + 1.5783, 1.7783, 1.9790, 2.1831, 2.3670, 2.5578, 2.7641, 2.9516, + 0.2126, 0.3652, 0.5545, 0.7170, 0.8674, 1.0640, 1.2558, 1.4061, + 1.5904, 1.8095, 1.9760, 2.1505, 2.3549, 2.5575, 2.7023, 2.8877, + 0.1827, 0.3426, 0.4894, 0.6488, 0.7960, 0.9535, 1.1217, 1.2798, + 1.4566, 1.6453, 1.8044, 2.0042, 2.2379, 2.4611, 2.6697, 2.8966, + 0.2034, 0.3822, 0.5231, 0.6960, 0.9200, 1.0394, 1.1616, 1.3772, + 1.5493, 1.7330, 1.9646, 2.1233, 2.3334, 2.5361, 2.7087, 2.9470, + 0.1050, 0.2060, 0.3705, 0.5998, 0.8337, 1.0577, 1.2559, 1.4327, + 1.6334, 1.8165, 1.9853, 2.2058, 2.4063, 2.5818, 2.7625, 2.9458, + 0.1419, 0.4053, 0.6660, 0.8911, 1.0405, 1.1547, 1.2506, 1.3926, + 1.5669, 1.7527, 1.9694, 2.2054, 2.3889, 2.5743, 2.7586, 2.9174, + 0.1514, 0.2825, 0.4309, 0.5772, 0.7470, 0.9703, 1.1462, 1.3316, + 1.5321, 1.7259, 1.9282, 2.1266, 2.3106, 2.5064, 2.7067, 2.9094, + 0.1693, 0.3156, 0.4878, 0.6635, 0.8206, 0.9569, 1.1154, 1.3064, + 1.5109, 1.7184, 1.9179, 2.1036, 2.2763, 2.4820, 2.6949, 2.9105, + 0.1432, 0.2718, 0.4241, 0.5564, 0.6939, 0.9011, 1.1582, 1.3948, + 1.6181, 1.8024, 1.9814, 2.1740, 2.3459, 2.5456, 2.7491, 2.9307, + 0.2294, 0.3857, 0.5590, 0.7434, 0.9189, 1.0941, 1.2740, 1.4456, + 1.6178, 1.7994, 1.9689, 2.1644, 2.3525, 2.5385, 2.7468, 2.9405, + 0.1667, 0.3109, 0.4612, 0.6032, 0.7375, 0.8866, 1.0840, 1.3053, + 1.4982, 1.7044, 1.9146, 2.1117, 2.2942, 2.4983, 2.7084, 2.9132, + 0.1810, 0.3205, 0.4696, 0.6231, 0.7641, 0.9959, 1.2427, 1.4361, + 1.5889, 1.7544, 1.9083, 2.0733, 2.2457, 2.4461, 2.6793, 2.9098, + 0.1164, 0.3753, 0.6068, 0.7503, 1.0100, 1.2131, 1.3793, 1.5302, + 1.6300, 1.7950, 1.9057, 2.1031, 2.3830, 2.5745, 2.6949, 2.8779, + 0.1571, 0.4378, 0.6735, 0.8312, 0.8944, 0.9818, 1.1622, 1.4094, + 1.6423, 1.8066, 1.9258, 2.1838, 2.4363, 2.6279, 2.7358, 2.8790, + 0.1398, 0.2686, 0.4248, 0.6156, 0.7870, 1.0035, 1.2012, 1.3689, + 1.5363, 1.7398, 1.9604, 2.1619, 2.3345, 2.5097, 2.7271, 2.9368, + 0.1913, 0.3338, 0.4987, 0.6446, 0.7852, 1.0163, 1.1886, 1.3610, + 1.5379, 1.7230, 1.8880, 2.0862, 2.2960, 2.4928, 2.7122, 2.9151, + 0.0908, 0.1752, 0.2899, 0.5365, 0.7761, 1.0100, 1.2124, 1.4060, + 1.6019, 1.8010, 1.9774, 2.1905, 2.3733, 2.5623, 2.7660, 2.9565, + 0.1773, 0.3179, 0.4925, 0.6864, 0.8452, 0.9897, 1.1860, 1.3722, + 1.5515, 1.7658, 1.9802, 2.1819, 2.3620, 2.5442, 2.7250, 2.9220, + 0.1286, 0.2341, 0.3689, 0.5364, 0.7176, 0.9350, 1.1083, 1.2943, + 1.4974, 1.7059, 1.9047, 2.1145, 2.3242, 2.5361, 2.7453, 2.9329, + 0.2273, 0.3834, 0.5565, 0.7192, 0.8431, 0.9962, 1.1763, 1.3571, + 1.5774, 1.7419, 1.9202, 2.1131, 2.2919, 2.4898, 2.6895, 2.9180, + 0.1775, 0.3058, 0.4274, 0.6023, 0.8151, 1.0734, 1.3211, 1.5178, + 1.6706, 1.8154, 1.9686, 2.1537, 2.3461, 2.5276, 2.7181, 2.9121, + 0.1653, 0.4304, 0.6361, 0.7824, 0.9183, 1.0452, 1.2071, 1.4077, + 1.6206, 1.8299, 2.0089, 2.1948, 2.3900, 2.5982, 2.7844, 2.9487, + 0.1492, 0.2609, 0.3820, 0.5485, 0.7243, 0.9319, 1.1538, 1.3579, + 1.5266, 1.7002, 1.8873, 2.1016, 2.3175, 2.5221, 2.7241, 2.9243, + 0.2074, 0.3781, 0.5209, 0.6869, 0.8577, 0.9875, 1.1849, 1.3568, + 1.4907, 1.7335, 1.8902, 2.1224, 2.3099, 2.4918, 2.7023, 2.8765, + 0.1359, 0.2254, 0.3286, 0.4432, 0.6586, 0.8964, 1.1125, 1.3523, + 1.5626, 1.7579, 1.9846, 2.1905, 2.3548, 2.5542, 2.7663, 2.9346, + 0.1430, 0.2966, 0.4685, 0.6493, 0.8315, 1.0304, 1.2220, 1.4082, + 1.5995, 1.7888, 1.9774, 2.1737, 2.3607, 2.5577, 2.7558, 2.9405, + 0.1477, 0.2694, 0.4056, 0.5626, 0.7051, 0.8647, 1.0491, 1.2488, + 1.4814, 1.7072, 1.9150, 2.1147, 2.3038, 2.5144, 2.7184, 2.9202, + 0.1690, 0.3033, 0.4580, 0.6686, 0.8536, 1.0293, 1.2124, 1.3998, + 1.5718, 1.7607, 1.9580, 2.1245, 2.2971, 2.4762, 2.6896, 2.9177, + 0.1092, 0.2779, 0.4853, 0.6880, 0.9011, 1.0953, 1.2752, 1.4618, + 1.6623, 1.8484, 2.0264, 2.2152, 2.4017, 2.5835, 2.7671, 2.9436, + 0.1497, 0.3637, 0.6014, 0.8032, 0.9963, 1.1835, 1.3741, 1.5698, + 1.7382, 1.9094, 2.0710, 2.2392, 2.4082, 2.5926, 2.7762, 2.9536, + 0.1434, 0.2492, 0.3966, 0.5934, 0.8033, 1.0657, 1.2796, 1.4276, + 1.5745, 1.7833, 1.9288, 2.1247, 2.3543, 2.5412, 2.7049, 2.8872, + 0.1612, 0.2926, 0.4574, 0.6387, 0.8265, 1.0180, 1.1808, 1.3526, + 1.5564, 1.7536, 1.9187, 2.1192, 2.3149, 2.5006, 2.7101, 2.9217, + 0.0828, 0.1863, 0.3235, 0.5050, 0.7250, 0.9867, 1.2093, 1.3941, + 1.5980, 1.7932, 1.9809, 2.1894, 2.3918, 2.5773, 2.7540, 2.9329, + 0.2001, 0.3655, 0.5290, 0.6761, 0.8027, 0.9972, 1.2090, 1.4255, + 1.6085, 1.7825, 1.9804, 2.1681, 2.3457, 2.5325, 2.7319, 2.9196, + 0.1505, 0.2767, 0.4254, 0.6054, 0.7821, 0.9567, 1.1294, 1.3080, + 1.4984, 1.6954, 1.8666, 2.0736, 2.2875, 2.4969, 2.7072, 2.9163, + 0.1589, 0.4151, 0.5749, 0.6651, 0.8061, 1.0470, 1.2616, 1.3690, + 1.4985, 1.7808, 1.9825, 2.1068, 2.2751, 2.5448, 2.7133, 2.8689, + 0.0916, 0.1846, 0.3788, 0.6329, 0.8774, 1.0687, 1.2653, 1.4561, + 1.6573, 1.8449, 2.0402, 2.2254, 2.3968, 2.5861, 2.7792, 2.9508, + 0.2282, 0.4159, 0.5834, 0.6899, 0.8108, 1.0321, 1.2795, 1.5262, + 1.6936, 1.8469, 2.0922, 2.2607, 2.3795, 2.5301, 2.7386, 2.9530, + 0.1651, 0.3004, 0.4555, 0.6179, 0.7891, 0.9584, 1.1372, 1.3707, + 1.5951, 1.7880, 1.9434, 2.1465, 2.3311, 2.5081, 2.6977, 2.8970, + 0.1279, 0.3828, 0.6330, 0.8323, 0.9652, 1.1175, 1.2319, 1.3511, + 1.5115, 1.6392, 1.7835, 1.9558, 2.2008, 2.4635, 2.6910, 2.9058, + 0.1193, 0.2185, 0.3521, 0.5311, 0.7378, 0.9239, 1.1105, 1.3217, + 1.5362, 1.7504, 1.9536, 2.1627, 2.3560, 2.5506, 2.7548, 2.9453, + 0.1806, 0.3432, 0.4981, 0.6948, 0.8928, 1.0527, 1.2467, 1.4140, + 1.6326, 1.7950, 1.9935, 2.1969, 2.3512, 2.5682, 2.7445, 2.9277, + 0.1846, 0.3112, 0.4568, 0.5891, 0.7317, 0.8493, 1.0204, 1.2022, + 1.3688, 1.6020, 1.8428, 2.0710, 2.2725, 2.4879, 2.7057, 2.9160, + 0.0880, 0.2514, 0.5332, 0.7272, 0.8906, 1.1354, 1.3199, 1.4941, + 1.6010, 1.7151, 1.8712, 2.0643, 2.2755, 2.5375, 2.7054, 2.8891, + 0.1382, 0.2833, 0.4658, 0.6897, 0.9071, 1.0716, 1.2469, 1.4143, + 1.5910, 1.7947, 1.9805, 2.1581, 2.3338, 2.5215, 2.7292, 2.9211, + 0.1061, 0.3494, 0.6327, 0.8570, 0.9748, 1.0560, 1.1529, 1.3250, + 1.6032, 1.8340, 1.9711, 2.1157, 2.3011, 2.5464, 2.8078, 2.9803, + 0.1603, 0.2839, 0.4307, 0.5980, 0.7980, 1.0399, 1.1971, 1.3524, + 1.5715, 1.7838, 1.9468, 2.1498, 2.3627, 2.5514, 2.7327, 2.9148, + 0.1691, 0.3117, 0.4796, 0.6895, 0.8732, 1.0164, 1.1916, 1.3707, + 1.5384, 1.7202, 1.8857, 2.0672, 2.2487, 2.4593, 2.6789, 2.8940, + 0.0965, 0.1702, 0.3191, 0.5721, 0.8100, 1.0241, 1.2272, 1.4196, + 1.6093, 1.8057, 1.9884, 2.2037, 2.3925, 2.5805, 2.7578, 2.9366, + 0.1950, 0.3519, 0.5272, 0.6973, 0.8732, 1.0656, 1.2112, 1.3959, + 1.6116, 1.7821, 1.9445, 2.1592, 2.3348, 2.5142, 2.7440, 2.9297, + 0.1388, 0.2557, 0.4120, 0.5727, 0.7354, 0.9196, 1.0985, 1.2805, + 1.4643, 1.6535, 1.8340, 2.0546, 2.2758, 2.4778, 2.6921, 2.9122, + 0.1823, 0.3336, 0.4957, 0.6771, 0.8563, 1.0137, 1.2299, 1.3849, + 1.5718, 1.7667, 1.9193, 2.1326, 2.3135, 2.5268, 2.7133, 2.8998, + 0.0790, 0.1901, 0.4083, 0.6456, 0.8463, 1.0285, 1.2297, 1.4181, + 1.6159, 1.8056, 1.9971, 2.1912, 2.3816, 2.5746, 2.7692, 2.9497, + 0.0049, 0.0116, 0.0045, 0.0039, -0.0010, -0.0122, -0.0205, -0.0034, +-0.0140, -0.0041, 0.0191, -0.0322, 0.0002, -0.0124, -0.0269, 0.0059, + 0.0586, 0.0339, -0.0389, -0.0319, -0.0079, -0.0205, -0.0363, -0.0211, + 0.0241, 0.0595, 0.0469, 0.0283, 0.0176, -0.0183, -0.0173, -0.0004, + 0.0024, 0.0145, 0.0534, 0.0197, -0.0065, -0.0067, 0.0133, 0.0358, +-0.0104, -0.0386, -0.0109, -0.0078, 0.0275, 0.0565, 0.0251, -0.0027, +-0.0053, 0.0171, 0.0088, 0.0495, 0.0141, 0.0039, -0.0445, -0.0426, +-0.0184, -0.0280, -0.0223, 0.0039, -0.0171, -0.0606, -0.0786, -0.0430, + 0.0544, 0.0595, 0.0320, -0.0012, 0.0108, 0.0185, 0.0066, 0.0408, + 0.0552, -0.0073, -0.0247, -0.0480, -0.0288, 0.0186, 0.0212, -0.0013, + 0.0403, 0.0598, 0.0690, 0.0516, -0.0298, -0.0177, 0.0278, 0.0168, +-0.0106, 0.0251, 0.0386, 0.0331, -0.0052, 0.0133, 0.0291, -0.0158, +-0.0329, -0.0367, 0.0287, 0.0462, -0.0176, 0.0049, 0.0242, -0.0034, + 0.0135, 0.0086, -0.0149, 0.0241, 0.0504, 0.0246, -0.0273, -0.0369, +-0.0108, -0.0449, -0.0625, -0.0414, -0.0292, -0.0571, -0.0440, -0.0088, + 0.0098, 0.0009, -0.0004, 0.0007, -0.0314, -0.0208, -0.0138, -0.0277, +-0.0044, 0.0522, 0.0315, -0.0270, -0.0277, -0.0256, -0.0103, -0.0201, +-0.0287, -0.0279, -0.0182, 0.0472, 0.0613, 0.0450, 0.0413, 0.0333, + 0.0444, 0.0223, 0.0061, 0.0316, 0.0321, 0.0501, 0.0460, 0.0250, + 0.0227, 0.0235, 0.0099, 0.0185, -0.0347, -0.0684, -0.0189, 0.0242, +-0.0190, -0.0273, -0.0012, -0.0253, 0.0293, -0.0231, -0.0219, -0.0010, + 0.0153, 0.0128, -0.0166, -0.0435, -0.0417, -0.0121, -0.0351, -0.0390, + 0.0077, -0.0278, -0.0355, 0.0092, -0.0063, 0.0005, 0.0216, 0.0461, + 0.0538, 0.0451, 0.0298, -0.0130, 0.0058, 0.0206, 0.0471, 0.0499, + 0.0280, 0.0086, -0.0007, -0.0317, 0.0259, 0.0176, 0.0043, 0.0212, + 0.0138, 0.0106, 0.0220, -0.0025, 0.0050, 0.0122, -0.0051, -0.0086, +-0.0472, -0.0005, 0.0193, 0.0032, 0.0246, 0.0222, 0.0090, -0.0320, +-0.0713, -0.0526, -0.0151, -0.0440, -0.0648, -0.0466, -0.0092, 0.0115, +-0.0129, 0.0053, -0.0344, -0.0385, 0.0392, 0.0599, 0.0414, 0.0165, +-0.0098, -0.0320, -0.0261, -0.0055, -0.0139, -0.0110, 0.0084, 0.0172, +-0.0492, -0.0537, -0.0320, -0.0036, 0.0265, 0.0385, 0.0064, -0.0280, +-0.0230, 0.0134, 0.0241, 0.0106, 0.0387, 0.0105, 0.0068, 0.0260, + 0.4940, 0.4911, 0.4849, 0.4820, 0.4837, 0.4839, 0.4824, 0.4799, + 0.4812, 0.4782, 0.4788, 0.4711, 0.4706, 0.4671, 0.4601, 0.4578, + 0.2954, 0.2121, 0.1859, 0.1958, 0.1474, 0.1086, 0.1351, 0.1362, + 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857 +}, + +.lsp16 = { + 0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943, + 1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950, + 0.1311, 0.3183, 0.4659, 0.5601, 0.6658, 0.7828, 1.0065, 1.2717, + 1.5185, 1.7339, 1.9530, 2.2189, 2.3739, 2.4991, 2.6984, 2.9256, + 0.1627, 0.4519, 0.6323, 0.7012, 0.7848, 0.9801, 1.1810, 1.3222, + 1.5413, 1.8129, 1.9338, 2.0809, 2.3180, 2.5189, 2.7066, 2.9514, + 0.1475, 0.2447, 0.4240, 0.5669, 0.7872, 0.9838, 1.1823, 1.3814, + 1.5358, 1.6820, 1.8794, 2.1419, 2.4132, 2.6112, 2.7911, 2.9511, + 0.1224, 0.2876, 0.5013, 0.6985, 0.8902, 1.0901, 1.2835, 1.4768, + 1.6596, 1.8538, 2.0467, 2.2304, 2.4124, 2.5942, 2.7729, 2.9531, + 0.1741, 0.3034, 0.4677, 0.5879, 0.7258, 0.9648, 1.1417, 1.3220, + 1.5081, 1.7151, 1.9212, 2.1286, 2.3208, 2.4938, 2.6765, 2.8891, + 0.1657, 0.3174, 0.4907, 0.6559, 0.8295, 1.0254, 1.2071, 1.3880, + 1.5737, 1.7845, 1.9027, 2.1139, 2.3323, 2.5157, 2.7323, 2.9015, + 0.1592, 0.2758, 0.4417, 0.6315, 0.8257, 0.9873, 1.1277, 1.2830, + 1.4337, 1.6315, 1.8899, 2.1356, 2.3572, 2.5632, 2.7468, 2.9420, + 0.1524, 0.4325, 0.5931, 0.7036, 0.7696, 0.8923, 1.1739, 1.4773, + 1.6609, 1.7911, 1.9666, 2.1972, 2.3754, 2.5045, 2.6613, 2.8882, + 0.2130, 0.3013, 0.3721, 0.4257, 0.5079, 0.7015, 0.9815, 1.2554, + 1.4648, 1.6966, 1.9138, 2.1075, 2.3318, 2.5292, 2.7453, 2.9347, + 0.1142, 0.3748, 0.6205, 0.7642, 0.8121, 0.9022, 0.9843, 1.1558, + 1.4467, 1.7422, 1.9574, 2.1302, 2.3812, 2.5898, 2.7720, 2.9583, + 0.1255, 0.2339, 0.3570, 0.5323, 0.7458, 1.0003, 1.1729, 1.3567, + 1.5217, 1.6977, 1.8924, 2.0942, 2.3145, 2.5408, 2.7553, 2.9337, + 0.1316, 0.2289, 0.4327, 0.6663, 0.8509, 0.9994, 1.1697, 1.3804, + 1.5609, 1.6903, 1.8572, 2.1019, 2.3687, 2.5789, 2.7715, 2.9472, + 0.1502, 0.2546, 0.3883, 0.5333, 0.6976, 0.9163, 1.1071, 1.3364, + 1.5420, 1.7525, 1.8948, 2.0839, 2.2819, 2.4651, 2.6875, 2.8987, + 0.1593, 0.3014, 0.4573, 0.6354, 0.8157, 0.9805, 1.1783, 1.3747, + 1.5678, 1.7326, 1.9286, 2.1340, 2.3253, 2.5280, 2.7180, 2.9298, + 0.1811, 0.3167, 0.4655, 0.6507, 0.8198, 1.0075, 1.1892, 1.3743, + 1.5227, 1.7090, 1.8849, 2.0743, 2.2750, 2.4830, 2.6896, 2.8953, + 0.1846, 0.3577, 0.5315, 0.7290, 0.9176, 1.1016, 1.2654, 1.4525, + 1.6315, 1.8268, 2.0238, 2.1934, 2.3868, 2.5753, 2.7682, 2.9469, + 0.0876, 0.1439, 0.2048, 0.3654, 0.6281, 0.8853, 1.0907, 1.2992, + 1.5227, 1.7373, 1.9395, 2.1419, 2.3488, 2.5486, 2.7466, 2.9348, + 0.1391, 0.4170, 0.6561, 0.7953, 0.8734, 0.9986, 1.1870, 1.4520, + 1.6042, 1.7910, 2.0135, 2.1870, 2.3358, 2.5066, 2.7409, 2.9955, + 0.0804, 0.1355, 0.2599, 0.4998, 0.7408, 0.9474, 1.1276, 1.3428, + 1.5556, 1.7712, 1.9699, 2.1535, 2.3605, 2.5548, 2.7489, 2.9325, + 0.1304, 0.3087, 0.4979, 0.6584, 0.8414, 1.0329, 1.2244, 1.4189, + 1.6118, 1.8200, 1.9985, 2.1893, 2.3915, 2.5794, 2.7647, 2.9344, + 0.1895, 0.2849, 0.3705, 0.4126, 0.6265, 0.9207, 1.1774, 1.3762, + 1.5757, 1.7728, 1.9568, 2.1662, 2.3615, 2.5575, 2.7561, 2.9416, + 0.1800, 0.3078, 0.4805, 0.6796, 0.8503, 1.0046, 1.1703, 1.3269, + 1.4862, 1.6502, 1.8454, 2.0873, 2.3175, 2.5356, 2.7516, 2.9469, + 0.1950, 0.3233, 0.4568, 0.5940, 0.7589, 0.9978, 1.1701, 1.3383, + 1.5017, 1.6565, 1.8243, 2.0605, 2.2938, 2.5147, 2.7419, 2.9396, + 0.2531, 0.4391, 0.5790, 0.7170, 0.8998, 1.1430, 1.3577, 1.5326, + 1.6328, 1.7627, 1.9726, 2.1762, 2.3563, 2.5478, 2.7385, 2.9067, + 0.1805, 0.2788, 0.3591, 0.3881, 0.5441, 0.8055, 1.0766, 1.3165, + 1.5316, 1.7508, 1.9477, 2.1374, 2.3438, 2.5484, 2.7501, 2.9410, + 0.2044, 0.3671, 0.5396, 0.7042, 0.8582, 0.9831, 1.1261, 1.3194, + 1.4769, 1.6979, 1.8717, 2.0463, 2.2620, 2.4739, 2.7054, 2.9208, + 0.1048, 0.2175, 0.4206, 0.5923, 0.7483, 0.9400, 1.1356, 1.3799, + 1.5958, 1.7320, 1.8984, 2.1296, 2.3594, 2.5492, 2.7387, 2.9305, + 0.0842, 0.1729, 0.3951, 0.6447, 0.8688, 1.0605, 1.2472, 1.4330, + 1.6232, 1.8144, 2.0216, 2.1915, 2.3878, 2.5763, 2.7685, 2.9464, + 0.1461, 0.2593, 0.4105, 0.5677, 0.7328, 0.8919, 1.0484, 1.2302, + 1.4386, 1.6635, 1.8873, 2.1024, 2.3116, 2.5268, 2.7273, 2.9269, + 0.1503, 0.3108, 0.4756, 0.6731, 0.8600, 1.0233, 1.2115, 1.3971, + 1.5915, 1.7892, 1.9517, 2.1603, 2.3487, 2.5460, 2.7308, 2.8998, + 0.2163, 0.3669, 0.5125, 0.6709, 0.8143, 0.9930, 1.2095, 1.4205, + 1.6176, 1.7112, 1.8398, 2.0896, 2.3513, 2.5290, 2.6667, 2.8960, + 0.2133, 0.4382, 0.6287, 0.8702, 1.1088, 1.3749, 1.6062, 1.7446, + 1.8333, 1.9122, 1.9614, 2.0669, 2.1789, 2.3449, 2.6038, 2.8849, + 0.1598, 0.2719, 0.3877, 0.4815, 0.5926, 0.7795, 1.0449, 1.3045, + 1.5210, 1.7391, 1.9462, 2.1397, 2.3553, 2.5458, 2.7540, 2.9392, + 0.2918, 0.5607, 0.6801, 0.7404, 0.8285, 0.9431, 1.1579, 1.4080, + 1.6332, 1.8472, 1.9738, 2.0771, 2.2890, 2.5178, 2.7445, 2.9830, + 0.1664, 0.2842, 0.3965, 0.5463, 0.8162, 1.0346, 1.1849, 1.3446, + 1.5122, 1.7563, 1.9960, 2.2002, 2.3796, 2.5689, 2.7712, 2.9550, + 0.0911, 0.2397, 0.5052, 0.7868, 1.0299, 1.1311, 1.2244, 1.3333, + 1.4395, 1.6790, 1.9369, 2.1717, 2.3689, 2.5538, 2.7340, 2.9326, + 0.1647, 0.2931, 0.3836, 0.4978, 0.6255, 0.9243, 1.1339, 1.3001, + 1.5269, 1.8010, 1.9715, 2.1419, 2.3784, 2.5503, 2.6719, 2.8745, + 0.2440, 0.3802, 0.4756, 0.6613, 0.8627, 1.0292, 1.2291, 1.4060, + 1.5198, 1.7354, 1.9044, 2.1010, 2.3147, 2.4996, 2.7171, 2.9041, + 0.1590, 0.2876, 0.4572, 0.5996, 0.7713, 0.9490, 1.1205, 1.2815, + 1.4516, 1.6385, 1.8179, 2.0457, 2.2759, 2.4785, 2.6861, 2.9080, + 0.2297, 0.4309, 0.5712, 0.6717, 0.8138, 1.0463, 1.2492, 1.4560, + 1.6796, 1.8458, 1.9642, 2.1452, 2.3636, 2.5395, 2.7456, 2.9495, + 0.2975, 0.4678, 0.4996, 0.5809, 0.6279, 0.6884, 0.8606, 1.1386, + 1.4412, 1.6876, 1.8760, 2.0932, 2.3178, 2.5166, 2.7345, 2.9280, + 0.1278, 0.3737, 0.6004, 0.7069, 0.8147, 1.0180, 1.2581, 1.3812, + 1.4855, 1.7268, 1.9970, 2.1258, 2.2936, 2.5702, 2.7563, 2.8983, + 0.1314, 0.2508, 0.3999, 0.5680, 0.7424, 0.9367, 1.1286, 1.3175, + 1.5336, 1.7404, 1.9317, 2.1404, 2.3514, 2.5562, 2.7510, 2.9402, + 0.1043, 0.2367, 0.4293, 0.6376, 0.8160, 0.9836, 1.1779, 1.3850, + 1.5835, 1.7875, 1.9765, 2.1593, 2.3654, 2.5577, 2.7465, 2.9398, + 0.1529, 0.2515, 0.3454, 0.4374, 0.7011, 0.9015, 1.0744, 1.3532, + 1.5699, 1.7545, 2.0021, 2.1259, 2.2278, 2.4546, 2.7264, 2.9425, + 0.1429, 0.2808, 0.4395, 0.6334, 0.8069, 0.9705, 1.1520, 1.3250, + 1.5109, 1.7285, 1.9356, 2.1469, 2.3479, 2.5554, 2.7512, 2.9348, + 0.1625, 0.3022, 0.4756, 0.6315, 0.8032, 0.9924, 1.1596, 1.3204, + 1.4994, 1.6929, 1.8955, 2.1090, 2.3025, 2.5018, 2.6908, 2.8980, + 0.1692, 0.3427, 0.5228, 0.7756, 0.9688, 1.0950, 1.3056, 1.4360, + 1.5675, 1.8049, 1.9376, 2.1151, 2.3407, 2.5012, 2.7192, 2.9258, + 0.0474, 0.1251, 0.1939, 0.3841, 0.6501, 0.9231, 1.1153, 1.3240, + 1.5478, 1.7599, 1.9651, 2.1510, 2.3645, 2.5552, 2.7542, 2.9393, + 0.2196, 0.4656, 0.7492, 0.9922, 1.1678, 1.2489, 1.3112, 1.3657, + 1.4223, 1.5302, 1.7212, 1.9996, 2.2523, 2.4844, 2.7036, 2.9145, + 0.1128, 0.2368, 0.3704, 0.5476, 0.7723, 0.9968, 1.1930, 1.3992, + 1.6013, 1.7957, 1.9888, 2.1857, 2.3825, 2.5705, 2.7616, 2.9434, + 0.1341, 0.2768, 0.4510, 0.6359, 0.8332, 1.0335, 1.2004, 1.3952, + 1.5762, 1.7681, 1.9815, 2.1735, 2.3657, 2.5552, 2.7514, 2.9498, + 0.1247, 0.2559, 0.3516, 0.4726, 0.6861, 0.9483, 1.1852, 1.3858, + 1.5851, 1.7815, 1.9778, 2.1737, 2.3729, 2.5664, 2.7620, 2.9429, + 0.1988, 0.3320, 0.4777, 0.6737, 0.8425, 1.0265, 1.1694, 1.3655, + 1.5463, 1.7135, 1.9385, 2.1650, 2.3529, 2.5367, 2.7545, 2.9585, + 0.1376, 0.2620, 0.4273, 0.6169, 0.7755, 0.9441, 1.1169, 1.3157, + 1.5179, 1.7020, 1.8931, 2.1059, 2.3112, 2.5136, 2.7169, 2.9198, + 0.2112, 0.4385, 0.6091, 0.7618, 0.9553, 1.1543, 1.3445, 1.5396, + 1.7153, 1.9192, 2.1263, 2.3593, 2.5958, 2.8171, 2.9394, 3.0409, + 0.1347, 0.2099, 0.2646, 0.3453, 0.5266, 0.7869, 1.0513, 1.2795, + 1.4880, 1.7181, 1.9294, 2.1332, 2.3362, 2.5442, 2.7433, 2.9362, + 0.3141, 0.5935, 0.7517, 0.8313, 0.8568, 0.9570, 1.0250, 1.1275, + 1.3422, 1.6303, 1.8577, 2.0705, 2.2957, 2.5095, 2.7244, 2.9262, + 0.0962, 0.2116, 0.3961, 0.5641, 0.7122, 0.8883, 1.1023, 1.3481, + 1.5623, 1.7554, 1.9618, 2.1675, 2.3706, 2.5556, 2.7430, 2.9337, + 0.0898, 0.1510, 0.3060, 0.5820, 0.8221, 1.0388, 1.2261, 1.4289, + 1.6054, 1.8103, 1.9941, 2.1844, 2.3742, 2.5711, 2.7632, 2.9474, + 0.1326, 0.2316, 0.3761, 0.5177, 0.6782, 0.8761, 1.0952, 1.3175, + 1.5078, 1.7034, 1.9051, 2.1245, 2.3424, 2.5484, 2.7444, 2.9389, + 0.1740, 0.3293, 0.5174, 0.6824, 0.8394, 1.0372, 1.2046, 1.3723, + 1.5656, 1.7444, 1.9442, 2.1386, 2.3139, 2.4960, 2.7071, 2.9297, + 0.2304, 0.3775, 0.4865, 0.6182, 0.7842, 0.9208, 1.1151, 1.2843, + 1.4641, 1.6988, 1.9209, 2.1260, 2.3099, 2.5229, 2.7414, 2.9276, + 0.0094, 0.0261, -0.0037, 0.0041, -0.0092, -0.0044, -0.0232, -0.0073, +-0.0047, -0.0021, 0.0250, -0.0580, -0.0140, -0.0342, -0.0586, 0.0020, + 0.0449, 0.0155, -0.0523, -0.0279, 0.0299, -0.0183, -0.0736, -0.0639, +-0.0017, 0.0336, 0.0209, 0.0046, 0.0077, -0.0148, -0.0114, -0.0120, + 0.0115, -0.0050, 0.0445, 0.0048, 0.0188, -0.0137, -0.0080, 0.0239, +-0.0184, -0.0524, -0.0195, -0.0126, 0.0284, 0.0632, 0.0141, -0.0093, +-0.0096, 0.0196, 0.0230, 0.0379, 0.0308, 0.0237, -0.0224, -0.0600, +-0.0755, -0.1074, -0.0988, -0.0606, -0.1038, -0.1552, -0.1480, -0.0672, + 0.0504, 0.0676, 0.0336, -0.0042, 0.0729, 0.1013, 0.0868, 0.0846, + 0.0954, 0.0515, -0.0066, -0.0851, -0.0485, 0.0294, 0.0395, 0.0087, + 0.0078, 0.0446, 0.0881, 0.0672, -0.0384, -0.0025, 0.0415, 0.0353, + 0.0080, 0.0052, 0.0190, 0.0182, 0.0069, 0.0168, 0.0374, 0.0037, +-0.0292, -0.0429, 0.0302, 0.0681, -0.0233, -0.0238, -0.0003, -0.0043, + 0.0054, -0.0029, -0.0149, 0.0642, 0.0622, 0.0341, -0.0232, -0.0461, +-0.0082, -0.0469, -0.0618, -0.0326, -0.0452, -0.0649, -0.0597, -0.0398, +-0.0318, -0.0116, 0.0011, 0.0009, -0.0384, -0.0384, -0.0156, -0.0260, +-0.0007, 0.0473, 0.0111, -0.0358, -0.0484, -0.0204, -0.0029, -0.0090, +-0.0285, -0.0495, -0.0376, 0.0917, 0.1192, 0.1026, 0.0745, 0.0397, + 0.0463, 0.0253, 0.0025, 0.0465, 0.0100, 0.0488, 0.0416, 0.0223, + 0.0263, 0.0072, -0.0053, 0.0595, 0.0060, -0.0518, -0.0316, -0.0043, +-0.0133, -0.0233, -0.0075, -0.0251, 0.0277, -0.0067, -0.0136, -0.0004, + 0.0235, 0.0112, -0.0182, -0.0324, -0.0210, -0.0035, -0.0395, -0.0384, + 0.0005, -0.0150, -0.0356, 0.0127, -0.0033, -0.0034, 0.0205, 0.0747, + 0.1138, 0.1015, 0.0995, -0.0161, -0.0045, 0.0129, 0.0472, 0.0575, + 0.0222, 0.0091, 0.0037, -0.0471, 0.0371, 0.0132, 0.0208, 0.0247, + 0.0117, 0.0164, 0.0225, 0.0124, -0.0023, 0.0088, -0.0046, 0.0047, +-0.0393, 0.0018, 0.0148, 0.0020, 0.0044, 0.0165, 0.0229, -0.0208, +-0.0477, -0.0310, -0.0164, -0.0390, -0.0764, -0.0525, -0.0094, 0.0075, +-0.0102, -0.0045, -0.0504, -0.0709, 0.0822, 0.0710, 0.0426, 0.0014, +-0.0371, -0.0400, -0.0157, -0.0155, -0.0173, -0.0138, -0.0015, 0.0134, +-0.0418, -0.0682, -0.0256, 0.0050, 0.0360, 0.0354, 0.0074, -0.0396, +-0.0235, 0.0284, 0.0494, 0.0153, 0.0448, 0.0025, -0.0061, 0.0252, + 0.1000, 0.2260, 0.2158, 0.2116, 0.2198, 0.2055, 0.2110, 0.1873, + 0.1907, 0.2071, 0.2164, 0.2009, 0.2059, 0.2124, 0.2141, 0.2093, + 0.0875, 0.0981, 0.1177, 0.1071, 0.1033, 0.1248, 0.1048, 0.1238, + 0.1166, 0.1008, 0.1062, 0.0992, 0.0994, 0.1067, 0.0999, 0.1187, + 0.0750, 0.0794, 0.0828, 0.0854, 0.0859, 0.0801, 0.0891, 0.0933, + 0.0969, 0.0920, 0.0915, 0.0862, 0.0868, 0.0891, 0.0842, 0.0824, + 0.0625, 0.0930, 0.0815, 0.0853, 0.0898, 0.0828, 0.0822, 0.0910, + 0.0873, 0.0906, 0.0856, 0.0840, 0.0774, 0.0785, 0.0684, 0.0711, + 0.3319, 0.4219, 0.4588, 0.4090, 0.4092, 0.4014, 0.3548, 0.3353, + 0.3708, 0.3352, 0.3720, 0.3538, 0.4084, 0.4289, 0.4060, 0.4210, + 0.0588, 0.0209, -0.0082, -0.0115, -0.0343, -0.0621, -0.0541, -0.0346, +-0.0346, -0.0366, -0.0220, -0.0265, -0.0102, 0.0374, 0.0306, 0.0404, + 0.0306, 0.0090, -0.0054, 0.0333, 0.0047, 0.0238, 0.0141, 0.0165, + 0.0306, 0.0420, 0.0159, 0.0124, 0.0414, 0.0158, -0.0237, 0.0141, + 0.0765, 0.0057, -0.0260, -0.0426, -0.0395, -0.0126, -0.0579, -0.0417 +}, + +.lsp22_1 = { + 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433, + 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536, + 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261, + 1.5563, 1.6790, 1.8339, 2.1195, 2.3226, 2.4609, 2.6440, 2.8947, + 0.2024, 0.3362, 0.4834, 0.6784, 0.9088, 1.0850, 1.2188, 1.4054, + 1.6102, 1.7767, 1.9679, 2.1436, 2.3445, 2.5467, 2.7429, 2.9320, + 0.1181, 0.2279, 0.4413, 0.6114, 0.7710, 0.9427, 1.1142, 1.2707, + 1.4892, 1.7416, 1.9526, 2.1466, 2.3629, 2.5445, 2.7293, 2.9205, + 0.1155, 0.2720, 0.4886, 0.6812, 0.8594, 1.0422, 1.2315, 1.4116, + 1.6137, 1.8020, 1.9758, 2.1743, 2.3602, 2.5568, 2.7472, 2.9374, + 0.1110, 0.3312, 0.4735, 0.5612, 0.7129, 0.8146, 1.0233, 1.3155, + 1.5765, 1.7746, 1.9574, 2.1416, 2.3220, 2.5384, 2.7334, 2.9318, + 0.1656, 0.3350, 0.4215, 0.5609, 0.6759, 0.8503, 1.1405, 1.4094, + 1.6057, 1.6860, 1.7639, 2.0031, 2.2680, 2.5076, 2.7263, 2.9368, + 0.1466, 0.3638, 0.4587, 0.5674, 0.7381, 0.8669, 0.9619, 1.1658, + 1.4667, 1.7440, 1.9335, 2.1018, 2.3022, 2.5281, 2.7359, 2.9261, + 0.1061, 0.2566, 0.4739, 0.6751, 0.8711, 1.0704, 1.2720, 1.4655, + 1.6605, 1.8494, 2.0290, 2.2197, 2.4008, 2.5912, 2.7772, 2.9513, + 0.1116, 0.2364, 0.3971, 0.6316, 0.8583, 1.0335, 1.1686, 1.3302, + 1.5612, 1.7877, 1.9829, 2.2052, 2.3596, 2.5460, 2.7341, 2.9290, + 0.2661, 0.4186, 0.5126, 0.6477, 0.8818, 1.1045, 1.2852, 1.4128, + 1.5851, 1.7593, 1.9399, 2.1757, 2.3684, 2.5136, 2.6927, 2.9064, + 0.1495, 0.2749, 0.4391, 0.6304, 0.8239, 1.0181, 1.1995, 1.3759, + 1.5669, 1.7722, 1.9671, 2.1635, 2.3586, 2.5528, 2.7445, 2.9311, + 0.0912, 0.1759, 0.3066, 0.5660, 0.8005, 0.9568, 1.1832, 1.4504, + 1.6259, 1.7948, 2.0113, 2.2002, 2.3654, 2.5583, 2.7929, 2.9735, + 0.1353, 0.2747, 0.4078, 0.5977, 0.7658, 0.9124, 1.1081, 1.3630, + 1.5875, 1.7847, 1.9323, 2.1181, 2.3321, 2.5046, 2.7183, 2.9225, + 0.1938, 0.4063, 0.4982, 0.6002, 0.7702, 0.9071, 1.1631, 1.3885, + 1.6043, 1.8118, 1.9306, 2.0893, 2.2724, 2.4609, 2.6283, 2.8802, + 0.1857, 0.3351, 0.4381, 0.6101, 0.7561, 0.8555, 1.0384, 1.3171, + 1.5667, 1.6904, 1.7552, 1.9689, 2.2597, 2.5260, 2.7272, 2.9337, + 0.1037, 0.2159, 0.4188, 0.6174, 0.8035, 1.0285, 1.2256, 1.4230, + 1.6400, 1.8322, 2.0144, 2.1988, 2.3810, 2.5682, 2.7613, 2.9438, + 0.1625, 0.2776, 0.4225, 0.6001, 0.7879, 0.9087, 1.0801, 1.2759, + 1.4899, 1.7448, 1.9911, 2.1770, 2.3723, 2.5777, 2.7971, 2.9444, + 0.2111, 0.3640, 0.5839, 0.7290, 0.8051, 1.0023, 1.2315, 1.4143, + 1.5878, 1.7755, 1.9804, 2.1498, 2.3312, 2.5350, 2.7613, 2.9472, + 0.1423, 0.2646, 0.4136, 0.6350, 0.8070, 0.9514, 1.1168, 1.3213, + 1.5776, 1.7721, 1.9404, 2.1545, 2.3385, 2.5137, 2.7396, 2.9553, + 0.1132, 0.2386, 0.4103, 0.5931, 0.7808, 0.9881, 1.1840, 1.3860, + 1.6021, 1.7990, 1.9922, 2.1885, 2.3852, 2.5717, 2.7640, 2.9510, + 0.1267, 0.2602, 0.3913, 0.5944, 0.7598, 0.9198, 1.0781, 1.2715, + 1.5299, 1.7573, 1.9308, 2.1346, 2.3267, 2.5419, 2.7466, 2.9320, + 0.2023, 0.3417, 0.4392, 0.6141, 0.7439, 0.8593, 1.1096, 1.3543, + 1.5185, 1.6553, 1.7862, 2.0341, 2.2718, 2.4834, 2.7103, 2.9466, + 0.1113, 0.2470, 0.3677, 0.5686, 0.7700, 0.9356, 1.0806, 1.2452, + 1.4830, 1.7344, 1.9268, 2.1404, 2.3371, 2.5169, 2.7329, 2.9012, + 0.1664, 0.3554, 0.5573, 0.7471, 0.9245, 1.0998, 1.2787, 1.4655, + 1.6654, 1.8346, 2.0179, 2.2159, 2.4096, 2.5946, 2.7790, 2.9530, + 0.1313, 0.2625, 0.4731, 0.6444, 0.8110, 0.9878, 1.1493, 1.3212, + 1.5719, 1.8138, 1.9861, 2.1943, 2.3714, 2.5578, 2.7346, 2.9296, + 0.1186, 0.3035, 0.5049, 0.6860, 0.8670, 0.9975, 1.1364, 1.3471, + 1.5695, 1.7412, 1.9346, 2.1506, 2.3413, 2.5531, 2.7794, 2.9627, + 0.1108, 0.2697, 0.4787, 0.6344, 0.7909, 0.9586, 1.1440, 1.3511, + 1.5686, 1.7601, 1.9246, 2.1241, 2.3293, 2.5390, 2.7315, 2.9333, + 0.0985, 0.2302, 0.3544, 0.5759, 0.7620, 0.9651, 1.1497, 1.3080, + 1.5500, 1.7845, 1.9518, 2.1734, 2.3565, 2.5665, 2.7605, 2.9102, + 0.1208, 0.2727, 0.4381, 0.5736, 0.7382, 0.8390, 1.0102, 1.2648, + 1.5100, 1.7440, 1.9619, 2.1430, 2.3307, 2.5159, 2.7264, 2.9211, + 0.1582, 0.2777, 0.4475, 0.6551, 0.8591, 1.0084, 1.1414, 1.3291, + 1.5902, 1.7826, 1.9543, 2.1659, 2.3233, 2.5044, 2.6935, 2.9199, + 0.1360, 0.2873, 0.4585, 0.6295, 0.7592, 0.9089, 1.0492, 1.2733, + 1.5391, 1.7768, 1.9372, 2.1329, 2.3168, 2.5015, 2.6857, 2.8837, + 0.0886, 0.1829, 0.3696, 0.6126, 0.8334, 1.0135, 1.2303, 1.4674, + 1.6743, 1.8564, 2.0530, 2.2370, 2.3960, 2.5787, 2.7756, 2.9377, + 0.2005, 0.3537, 0.4700, 0.6249, 0.7385, 0.9097, 1.1759, 1.3811, + 1.5314, 1.6705, 1.8546, 2.1229, 2.3292, 2.5251, 2.7951, 2.9646, + 0.1999, 0.3112, 0.4722, 0.7146, 0.8908, 1.0028, 1.1831, 1.3903, + 1.6125, 1.7514, 1.9083, 2.1248, 2.3271, 2.5339, 2.6945, 2.8918, + 0.1243, 0.2606, 0.4382, 0.5850, 0.7705, 0.9727, 1.1214, 1.3059, + 1.5218, 1.7406, 1.9137, 2.1353, 2.3354, 2.5299, 2.7287, 2.9068, + 0.1039, 0.2426, 0.4265, 0.6284, 0.8152, 0.9941, 1.2004, 1.4038, + 1.5912, 1.7763, 1.9650, 2.1598, 2.3474, 2.5488, 2.7419, 2.9322, + 0.1364, 0.2420, 0.3886, 0.5864, 0.7663, 0.8844, 1.0860, 1.3242, + 1.5518, 1.7893, 2.0004, 2.1562, 2.3619, 2.5516, 2.7687, 2.9181, + 0.1483, 0.2851, 0.4479, 0.6312, 0.7924, 0.9821, 1.1705, 1.3386, + 1.5375, 1.7226, 1.9053, 2.0991, 2.2898, 2.4953, 2.7000, 2.9146, + 0.2332, 0.4561, 0.5407, 0.6212, 0.7524, 0.8215, 0.9522, 1.1685, + 1.5216, 1.7132, 1.8291, 2.0647, 2.2811, 2.4857, 2.7071, 2.9281, + 0.1348, 0.3126, 0.5179, 0.7192, 0.9227, 1.1363, 1.3223, 1.4756, + 1.6509, 1.8191, 1.9991, 2.1976, 2.3877, 2.5768, 2.7590, 2.9386, + 0.1093, 0.2211, 0.4763, 0.6703, 0.8282, 0.9536, 1.1202, 1.3796, + 1.6043, 1.8031, 1.9832, 2.1604, 2.3578, 2.5856, 2.7650, 2.9291, + 0.1865, 0.3027, 0.4580, 0.6719, 0.8400, 1.0082, 1.1901, 1.3782, + 1.5448, 1.6885, 1.9477, 2.1381, 2.2797, 2.5113, 2.7465, 2.9414, + 0.1575, 0.3124, 0.4649, 0.6262, 0.8095, 0.9858, 1.1676, 1.3602, + 1.5646, 1.7582, 1.9550, 2.1671, 2.3628, 2.5734, 2.7670, 2.9519, + 0.1174, 0.2777, 0.4663, 0.6333, 0.8169, 1.0096, 1.1885, 1.3847, + 1.5803, 1.7571, 1.9380, 2.1398, 2.3414, 2.5407, 2.7360, 2.9375, + 0.1073, 0.2264, 0.4083, 0.5973, 0.7474, 0.9514, 1.1349, 1.3337, + 1.5433, 1.7348, 1.9380, 2.1436, 2.3441, 2.5438, 2.7457, 2.9383, + 0.1472, 0.2880, 0.4793, 0.6268, 0.8015, 1.0063, 1.1715, 1.3644, + 1.5525, 1.7410, 1.9258, 2.1227, 2.3214, 2.5149, 2.7148, 2.9196, + 0.1414, 0.2565, 0.4349, 0.6111, 0.7695, 0.9496, 1.1212, 1.3265, + 1.5218, 1.7209, 1.9015, 2.0887, 2.3158, 2.5077, 2.7233, 2.9421, + 0.1252, 0.2667, 0.4454, 0.6431, 0.8371, 1.0124, 1.2110, 1.4160, + 1.6240, 1.8242, 2.0047, 2.1974, 2.3902, 2.5778, 2.7637, 2.9481, + 0.1321, 0.2565, 0.3846, 0.5847, 0.7578, 0.9259, 1.0637, 1.2239, + 1.4690, 1.7346, 1.9750, 2.1882, 2.3712, 2.5509, 2.7280, 2.8885, + 0.1437, 0.2930, 0.4428, 0.6156, 0.8045, 0.9638, 1.1450, 1.3138, + 1.5144, 1.7355, 1.9469, 2.1534, 2.3414, 2.5452, 2.7353, 2.9334, + 0.1692, 0.2770, 0.3831, 0.6100, 0.7825, 0.9302, 1.0690, 1.2481, + 1.4615, 1.6799, 1.9165, 2.1739, 2.3435, 2.5349, 2.7520, 2.9163, + 0.1235, 0.2489, 0.4354, 0.6343, 0.8236, 1.0066, 1.1908, 1.3474, + 1.5656, 1.8275, 2.0620, 2.2548, 2.4135, 2.5913, 2.7639, 2.9334, + 0.1090, 0.1961, 0.3854, 0.5701, 0.7024, 0.8843, 1.1393, 1.3785, + 1.5940, 1.7797, 1.9442, 2.1740, 2.3853, 2.5773, 2.7727, 2.9406, + 0.1560, 0.3477, 0.5011, 0.6287, 0.7612, 0.9896, 1.1510, 1.3420, + 1.5435, 1.6816, 1.8731, 2.0651, 2.2613, 2.4999, 2.7027, 2.8971, + 0.1459, 0.2416, 0.3833, 0.5450, 0.7916, 0.9223, 1.0662, 1.1953, + 1.4029, 1.6616, 1.9320, 2.1459, 2.3386, 2.5081, 2.6799, 2.9195, + 0.1546, 0.3854, 0.6184, 0.8460, 1.0599, 1.2428, 1.3906, 1.5550, + 1.7388, 1.8945, 2.0757, 2.2386, 2.4014, 2.5705, 2.7574, 2.9400, + 0.1080, 0.2307, 0.4112, 0.6067, 0.7725, 0.9467, 1.1285, 1.3205, + 1.5348, 1.7609, 1.9937, 2.1878, 2.3583, 2.5515, 2.7199, 2.9049, + 0.1482, 0.3178, 0.4983, 0.6342, 0.7783, 0.9880, 1.2019, 1.3404, + 1.5223, 1.7296, 1.9211, 2.0943, 2.2928, 2.5008, 2.7136, 2.9224, + 0.1145, 0.2910, 0.4891, 0.6492, 0.8126, 0.9530, 1.1180, 1.3155, + 1.5054, 1.6893, 1.8899, 2.1188, 2.3389, 2.5512, 2.7313, 2.9224, + 0.0939, 0.1689, 0.3250, 0.5792, 0.7698, 0.9245, 1.1574, 1.3865, + 1.5959, 1.7977, 1.9821, 2.1528, 2.3326, 2.5540, 2.7553, 2.9179, + 0.1243, 0.2474, 0.3923, 0.6199, 0.7908, 0.9379, 1.1497, 1.3734, + 1.5582, 1.7420, 1.9539, 2.1385, 2.3240, 2.5277, 2.7311, 2.9178, + 0.1961, 0.3748, 0.5176, 0.6387, 0.8169, 1.0477, 1.2124, 1.3869, + 1.5604, 1.7225, 1.8770, 2.0837, 2.2960, 2.5103, 2.6945, 2.8862, + 0.1295, 0.2403, 0.4149, 0.6189, 0.7913, 0.9130, 1.0832, 1.2787, + 1.4860, 1.7112, 1.9502, 2.1348, 2.2776, 2.4982, 2.7431, 2.9522, + 0.0160, 0.0362, 0.0097, 0.0057, -0.0014, -0.0073, -0.0046, -0.0064, +-0.0121, 0.0019, 0.0149, -0.0440, -0.0479, -0.0382, -0.0480, -0.0182, + 0.0170, 0.0114, -0.0298, -0.0175, -0.0033, -0.0354, -0.0510, -0.0025, + 0.0307, 0.0351, 0.0338, 0.0420, 0.0138, -0.0175, -0.0102, 0.0053, + 0.0084, -0.0003, 0.0412, -0.0027, 0.0145, -0.0039, 0.0083, 0.0400, + 0.0001, -0.0262, 0.0055, -0.0082, 0.0348, 0.0433, 0.0137, -0.0024, +-0.0055, 0.0262, 0.0521, 0.0349, 0.0185, 0.0076, -0.0319, -0.0561, +-0.0460, -0.0253, -0.0097, 0.0163, 0.0184, -0.0037, -0.0480, -0.0371, + 0.0628, 0.0665, 0.0296, -0.0057, 0.0253, 0.0227, 0.0350, 0.0692, + 0.0545, 0.0218, 0.0094, -0.0449, -0.0372, 0.0005, 0.0258, 0.0118, + 0.0285, 0.0760, 0.0822, 0.0527, -0.0299, -0.0049, 0.0170, 0.0195, + 0.0136, 0.0286, 0.0289, 0.0139, 0.0054, 0.0152, 0.0244, 0.0028, +-0.0056, -0.0260, 0.0307, 0.0572, -0.0087, 0.0088, 0.0062, 0.0000, + 0.0125, 0.0000, -0.0292, 0.0820, 0.0872, 0.0646, 0.0346, 0.0076, +-0.0022, -0.0253, -0.0567, -0.0188, -0.0336, -0.0673, -0.0549, -0.0166, +-0.0259, -0.0140, 0.0040, -0.0029, -0.0430, -0.0531, -0.0253, -0.0019, +-0.0071, 0.0393, 0.0072, -0.0327, -0.0236, -0.0235, -0.0177, -0.0186, +-0.0280, -0.0201, -0.0077, 0.0383, 0.0418, 0.0321, 0.0294, 0.0169, + 0.0468, 0.0301, 0.0133, 0.0363, 0.0516, 0.0937, 0.1240, 0.1404, + 0.1325, 0.1178, 0.0999, 0.0251, -0.0037, -0.0495, -0.0703, -0.0219, +-0.0261, -0.0304, -0.0204, -0.0372, 0.0355, 0.0131, -0.0093, -0.0099, +-0.0069, -0.0034, -0.0065, -0.0208, -0.0231, -0.0117, -0.0211, -0.0243, + 0.0046, -0.0107, -0.0070, 0.0123, 0.0230, 0.0152, 0.0164, 0.0412, + 0.0619, 0.0858, 0.0862, -0.0056, 0.0125, 0.0182, 0.0347, 0.0388, + 0.0456, 0.0407, -0.0249, -0.0460, 0.0206, 0.0299, 0.0253, 0.0207, + 0.0177, 0.0238, 0.0253, 0.0030, 0.0042, 0.0020, -0.0081, -0.0136, +-0.0290, -0.0042, 0.0122, 0.0051, 0.0107, 0.0228, 0.0211, -0.0068, +-0.0436, -0.0299, -0.0078, -0.0779, -0.1157, -0.0679, 0.0172, 0.0150, +-0.0051, 0.0081, -0.0512, -0.0616, 0.0576, 0.0799, 0.0803, 0.0336, + 0.0001, -0.0298, -0.0747, -0.0115, -0.0101, -0.0170, -0.0050, 0.0174, +-0.0290, -0.0601, -0.0150, 0.0121, 0.0165, 0.0230, 0.0028, -0.0317, +-0.0165, 0.0356, 0.0451, 0.0120, 0.0321, 0.0084, -0.0058, 0.0122, + 0.1935, 0.1802, 0.2195, 0.2410, 0.2201, 0.1915, 0.1840, 0.1935, + 0.2213, 0.2079, 0.1858, 0.1974, 0.2239, 0.2173, 0.1840, 0.2120, + 0.4912, 0.4777, 0.4607, 0.4395, 0.4426, 0.4388, 0.4416, 0.4345, + 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446 +}, + +.lsp22_2 = { + 0.0712, 0.1830, 0.4167, 0.6669, 0.8738, 1.0696, 1.2555, 1.4426, + 1.6427, 1.8138, 1.9966, 2.1925, 2.3872, 2.5748, 2.7713, 2.9597, + 0.1894, 0.3942, 0.5418, 0.6747, 0.7517, 0.8763, 1.1189, 1.3072, + 1.5011, 1.6790, 1.8342, 2.0781, 2.2929, 2.4566, 2.6613, 2.9204, + 0.1767, 0.3403, 0.5173, 0.7055, 0.8899, 1.0696, 1.2302, 1.4111, + 1.5989, 1.7751, 1.9618, 2.1544, 2.3454, 2.5356, 2.7362, 2.9315, + 0.1240, 0.2361, 0.4423, 0.6326, 0.7729, 0.9387, 1.1142, 1.2847, + 1.4746, 1.7126, 1.9482, 2.1642, 2.3536, 2.5506, 2.7593, 2.9197, + 0.1213, 0.2782, 0.5011, 0.6910, 0.8564, 1.0462, 1.2315, 1.4232, + 1.6178, 1.8028, 1.9813, 2.1766, 2.3670, 2.5591, 2.7475, 2.9403, + 0.1382, 0.2995, 0.4693, 0.5874, 0.6929, 0.8102, 1.0094, 1.2960, + 1.5511, 1.7607, 1.9699, 2.1680, 2.3367, 2.5459, 2.7370, 2.9105, + 0.1428, 0.2690, 0.3713, 0.4757, 0.6664, 0.9019, 1.1276, 1.3674, + 1.5471, 1.6695, 1.8261, 2.0572, 2.2753, 2.4963, 2.7187, 2.9114, + 0.1669, 0.3085, 0.4489, 0.5724, 0.6934, 0.8465, 0.9680, 1.1641, + 1.4320, 1.6841, 1.8977, 2.1061, 2.3118, 2.5152, 2.7329, 2.9274, + 0.1128, 0.2709, 0.4803, 0.6878, 0.8673, 1.0693, 1.2749, 1.4657, + 1.6650, 1.8434, 2.0339, 2.2300, 2.4003, 2.5951, 2.7762, 2.9465, + 0.1201, 0.2345, 0.4021, 0.6379, 0.8651, 1.0256, 1.1630, 1.3250, + 1.5395, 1.7808, 2.0011, 2.1997, 2.3618, 2.5505, 2.7561, 2.9351, + 0.2575, 0.4163, 0.5081, 0.6484, 0.8570, 1.0832, 1.2732, 1.3933, + 1.5497, 1.7725, 1.9945, 2.2098, 2.3514, 2.5216, 2.7146, 2.8969, + 0.1367, 0.2656, 0.4470, 0.6398, 0.8146, 1.0125, 1.2142, 1.3960, + 1.5558, 1.7338, 1.9465, 2.1769, 2.4031, 2.5746, 2.7335, 2.9046, + 0.0868, 0.1723, 0.2785, 0.5071, 0.7732, 1.0024, 1.1924, 1.4220, + 1.6149, 1.8064, 1.9951, 2.1935, 2.3777, 2.5748, 2.7661, 2.9488, + 0.1428, 0.2592, 0.3875, 0.5810, 0.7513, 0.9334, 1.1096, 1.3565, + 1.5869, 1.7788, 1.9036, 2.0893, 2.3332, 2.5289, 2.7204, 2.9053, + 0.2313, 0.4066, 0.4960, 0.5853, 0.7799, 0.9201, 1.1365, 1.3499, + 1.5119, 1.7641, 1.9095, 2.0911, 2.2653, 2.4587, 2.7010, 2.8900, + 0.1927, 0.3424, 0.4682, 0.6035, 0.7330, 0.8492, 1.0477, 1.3083, + 1.5602, 1.6945, 1.7806, 2.0066, 2.2566, 2.4864, 2.7021, 2.9180, + 0.0962, 0.1933, 0.3968, 0.6077, 0.8083, 1.0224, 1.2307, 1.4344, + 1.6350, 1.8173, 2.0024, 2.1894, 2.3812, 2.5648, 2.7535, 2.9483, + 0.1469, 0.2679, 0.4272, 0.6080, 0.7949, 0.9247, 1.0741, 1.2722, + 1.5144, 1.7679, 2.0030, 2.1944, 2.3890, 2.5928, 2.8116, 2.9555, + 0.1618, 0.3917, 0.6111, 0.7511, 0.8325, 1.0010, 1.2397, 1.4147, + 1.5764, 1.7359, 1.9300, 2.1325, 2.3096, 2.5480, 2.7725, 2.9697, + 0.1561, 0.2634, 0.4062, 0.6139, 0.8059, 0.9618, 1.0948, 1.3179, + 1.5846, 1.7622, 1.9399, 2.1476, 2.3330, 2.5232, 2.7412, 2.9554, + 0.1076, 0.2320, 0.3977, 0.5798, 0.7707, 0.9975, 1.1884, 1.3793, + 1.6059, 1.8038, 1.9928, 2.1942, 2.3881, 2.5742, 2.7717, 2.9547, + 0.1360, 0.2493, 0.3827, 0.5644, 0.7384, 0.9087, 1.0865, 1.2902, + 1.5185, 1.7246, 1.9170, 2.1175, 2.3324, 2.5442, 2.7441, 2.9437, + 0.1684, 0.2990, 0.4406, 0.5834, 0.7305, 0.9028, 1.0801, 1.2756, + 1.4646, 1.6514, 1.8346, 2.0493, 2.2594, 2.4765, 2.6985, 2.9089, + 0.1145, 0.2295, 0.3421, 0.5032, 0.7007, 0.9057, 1.0830, 1.2733, + 1.4885, 1.6897, 1.8933, 2.1128, 2.3188, 2.5271, 2.7284, 2.9266, + 0.1705, 0.3815, 0.6120, 0.7964, 0.9342, 1.0926, 1.2741, 1.4645, + 1.6552, 1.8040, 1.9778, 2.1931, 2.3836, 2.5827, 2.7905, 2.9494, + 0.1284, 0.2622, 0.4714, 0.6559, 0.8004, 1.0005, 1.1416, 1.3163, + 1.5773, 1.8144, 1.9947, 2.2001, 2.3836, 2.5710, 2.7447, 2.9262, + 0.1164, 0.2882, 0.5349, 0.7310, 0.8483, 0.9729, 1.1331, 1.3350, + 1.5307, 1.7306, 1.9409, 2.1275, 2.3229, 2.5358, 2.7455, 2.9447, + 0.1159, 0.2646, 0.4677, 0.6375, 0.7771, 0.9557, 1.1398, 1.3514, + 1.5717, 1.7512, 1.9337, 2.1323, 2.3272, 2.5409, 2.7377, 2.9212, + 0.1080, 0.2143, 0.3475, 0.5307, 0.7358, 0.9681, 1.1489, 1.3289, + 1.5553, 1.7664, 1.9696, 2.1780, 2.3676, 2.5568, 2.7493, 2.9347, + 0.1331, 0.2430, 0.3879, 0.5092, 0.6324, 0.8119, 1.0327, 1.2657, + 1.4999, 1.7107, 1.9178, 2.1272, 2.3296, 2.5340, 2.7372, 2.9353, + 0.1557, 0.2873, 0.4558, 0.6548, 0.8472, 1.0106, 1.1480, 1.3281, + 1.5856, 1.7740, 1.9564, 2.1651, 2.3295, 2.5207, 2.7005, 2.9151, + 0.1397, 0.2761, 0.4533, 0.6374, 0.7510, 0.8767, 1.0408, 1.2909, + 1.5368, 1.7560, 1.9424, 2.1332, 2.3210, 2.5116, 2.6924, 2.8886, + 0.0945, 0.1653, 0.3601, 0.6129, 0.8378, 1.0333, 1.2417, 1.4539, + 1.6507, 1.8304, 2.0286, 2.2157, 2.3975, 2.5865, 2.7721, 2.9426, + 0.1892, 0.3863, 0.4896, 0.5909, 0.7294, 0.9483, 1.1575, 1.3542, + 1.4796, 1.6535, 1.9070, 2.1435, 2.3281, 2.4967, 2.7039, 2.9222, + 0.1614, 0.3129, 0.5086, 0.7048, 0.8730, 1.0239, 1.1905, 1.3799, + 1.5697, 1.7503, 1.9103, 2.1115, 2.3235, 2.5234, 2.6973, 2.8957, + 0.1199, 0.2590, 0.4273, 0.5935, 0.7542, 0.9625, 1.1225, 1.2998, + 1.5361, 1.7102, 1.9097, 2.1269, 2.3157, 2.5304, 2.7212, 2.9175, + 0.1087, 0.2373, 0.4261, 0.6277, 0.8092, 0.9884, 1.1954, 1.4077, + 1.6048, 1.7799, 1.9693, 2.1662, 2.3426, 2.5501, 2.7459, 2.9257, + 0.1262, 0.2216, 0.3857, 0.5799, 0.7148, 0.8610, 1.0752, 1.3306, + 1.5549, 1.7605, 1.9727, 2.1580, 2.3612, 2.5602, 2.7554, 2.9372, + 0.1445, 0.2832, 0.4469, 0.6283, 0.7991, 0.9796, 1.1504, 1.3323, + 1.5313, 1.7140, 1.8968, 2.0990, 2.2826, 2.4903, 2.7003, 2.9031, + 0.1647, 0.4068, 0.5428, 0.6539, 0.7682, 0.8479, 0.9372, 1.1691, + 1.4776, 1.7314, 1.9071, 2.0918, 2.2774, 2.5029, 2.7152, 2.9221, + 0.1274, 0.3052, 0.5238, 0.7280, 0.9229, 1.1211, 1.3071, 1.4784, + 1.6564, 1.8235, 2.0028, 2.1999, 2.3763, 2.5608, 2.7510, 2.9356, + 0.1076, 0.2195, 0.4815, 0.6873, 0.8241, 0.9443, 1.1066, 1.3687, + 1.6087, 1.8105, 1.9857, 2.1486, 2.3505, 2.5854, 2.7785, 2.9376, + 0.1755, 0.3089, 0.4695, 0.6648, 0.8315, 1.0202, 1.1774, 1.3554, + 1.5393, 1.7141, 1.9247, 2.1284, 2.2983, 2.4975, 2.7296, 2.9401, + 0.1636, 0.3166, 0.4594, 0.6199, 0.8161, 0.9879, 1.1738, 1.3642, + 1.5680, 1.7633, 1.9598, 2.1695, 2.3692, 2.5846, 2.7809, 2.9563, + 0.1219, 0.2662, 0.4620, 0.6491, 0.8353, 1.0150, 1.2065, 1.3944, + 1.5785, 1.7631, 1.9389, 2.1434, 2.3400, 2.5316, 2.7359, 2.9513, + 0.1072, 0.2258, 0.3968, 0.5642, 0.7222, 0.9367, 1.1458, 1.3347, + 1.5424, 1.7373, 1.9303, 2.1432, 2.3451, 2.5415, 2.7444, 2.9394, + 0.1393, 0.2950, 0.4724, 0.6407, 0.8034, 1.0031, 1.1712, 1.3552, + 1.5519, 1.7411, 1.9198, 2.1160, 2.3238, 2.5119, 2.7134, 2.9205, + 0.1358, 0.2613, 0.4239, 0.5991, 0.7643, 0.9379, 1.1213, 1.3115, + 1.5067, 1.7031, 1.8768, 2.0836, 2.3092, 2.5134, 2.7237, 2.9286, + 0.1267, 0.2695, 0.4524, 0.6591, 0.8396, 1.0173, 1.2183, 1.4205, + 1.6306, 1.8162, 2.0106, 2.2082, 2.3773, 2.5787, 2.7551, 2.9387, + 0.1314, 0.2529, 0.3837, 0.5494, 0.7446, 0.9097, 1.0489, 1.2385, + 1.4691, 1.7170, 1.9600, 2.1770, 2.3594, 2.5356, 2.7215, 2.9088, + 0.1538, 0.2931, 0.4449, 0.6041, 0.7959, 0.9666, 1.1355, 1.3214, + 1.5150, 1.7230, 1.9433, 2.1408, 2.3459, 2.5476, 2.7273, 2.9330, + 0.1771, 0.2834, 0.4136, 0.5856, 0.7516, 0.9363, 1.0596, 1.2462, + 1.4737, 1.6627, 1.8810, 2.1150, 2.3202, 2.5274, 2.7403, 2.9490, + 0.1248, 0.2494, 0.4397, 0.6352, 0.8226, 1.0015, 1.1799, 1.3458, + 1.5654, 1.8228, 2.0646, 2.2550, 2.4161, 2.5964, 2.7675, 2.9383, + 0.0933, 0.1993, 0.3105, 0.4371, 0.6417, 0.8935, 1.1244, 1.3508, + 1.5649, 1.7595, 1.9581, 2.1648, 2.3639, 2.5569, 2.7573, 2.9468, + 0.1794, 0.3229, 0.4758, 0.6238, 0.7821, 0.9640, 1.1205, 1.3116, + 1.5054, 1.6803, 1.8658, 2.0651, 2.2793, 2.4856, 2.6867, 2.9105, + 0.1252, 0.2397, 0.3844, 0.5398, 0.7044, 0.8799, 1.0526, 1.2270, + 1.4269, 1.6412, 1.8532, 2.0784, 2.2957, 2.5051, 2.7139, 2.9210, + 0.1391, 0.3494, 0.5738, 0.8024, 1.0098, 1.2094, 1.3830, 1.5509, + 1.7222, 1.8782, 2.0604, 2.2479, 2.4154, 2.5968, 2.7767, 2.9450, + 0.1122, 0.2180, 0.4175, 0.6074, 0.7559, 0.9465, 1.1513, 1.3340, + 1.5215, 1.7491, 1.9911, 2.1894, 2.3433, 2.5377, 2.7380, 2.9183, + 0.1595, 0.3029, 0.4842, 0.6324, 0.7874, 0.9814, 1.1992, 1.3554, + 1.5017, 1.7274, 1.9168, 2.0853, 2.2964, 2.5300, 2.7187, 2.9041, + 0.1350, 0.2747, 0.4791, 0.6638, 0.8050, 0.9644, 1.1238, 1.2987, + 1.4844, 1.6754, 1.8778, 2.0987, 2.3279, 2.5424, 2.7410, 2.9356, + 0.0914, 0.1727, 0.3143, 0.5124, 0.7123, 0.9323, 1.1706, 1.3821, + 1.5864, 1.7828, 1.9701, 2.1560, 2.3445, 2.5486, 2.7433, 2.9372, + 0.1222, 0.2359, 0.3931, 0.5912, 0.7776, 0.9505, 1.1623, 1.3723, + 1.5484, 1.7316, 1.9321, 2.1283, 2.3148, 2.5269, 2.7299, 2.9213, + 0.2089, 0.3872, 0.5090, 0.6413, 0.7967, 1.0226, 1.1897, 1.3908, + 1.5954, 1.7202, 1.8614, 2.1030, 2.2973, 2.5079, 2.7491, 2.8944, + 0.1288, 0.2423, 0.4108, 0.6062, 0.7688, 0.9188, 1.0876, 1.2866, + 1.4897, 1.6910, 1.9219, 2.1076, 2.2805, 2.5023, 2.7155, 2.9203, + 0.0192, 0.0462, 0.0128, 0.0054, -0.0156, -0.0118, -0.0135, 0.0030, +-0.0120, 0.0031, 0.0240, -0.0451, -0.0439, -0.0432, -0.0527, -0.0207, + 0.0253, 0.0084, -0.0305, -0.0144, 0.0046, -0.0378, -0.0467, -0.0102, + 0.0280, 0.0540, 0.0151, 0.0437, 0.0141, -0.0257, -0.0058, 0.0073, + 0.0107, 0.0054, 0.0371, -0.0105, 0.0165, -0.0143, 0.0148, 0.0382, +-0.0054, -0.0284, 0.0001, -0.0218, 0.0258, 0.0517, 0.0157, -0.0032, +-0.0190, 0.0343, 0.0576, 0.0346, 0.0392, -0.0158, -0.0323, -0.0578, +-0.0617, -0.0242, -0.0144, 0.0188, 0.0249, 0.0021, -0.0422, -0.0420, + 0.0750, 0.0762, 0.0325, -0.0066, 0.0332, 0.0376, 0.0388, 0.0630, + 0.0525, 0.0196, 0.0051, -0.0484, -0.0322, 0.0059, 0.0132, 0.0079, + 0.0237, 0.0774, 0.0697, 0.0184, -0.0321, -0.0327, 0.0274, 0.0284, + 0.0057, 0.0289, 0.0478, 0.0142, -0.0053, 0.0114, 0.0292, -0.0032, +-0.0111, -0.0389, 0.0282, 0.0613, 0.0200, -0.0006, 0.0111, 0.0048, + 0.0273, 0.0017, -0.0369, 0.0655, 0.0758, 0.0555, 0.0238, -0.0024, +-0.0100, -0.0419, -0.0696, -0.0158, -0.0479, -0.0744, -0.0356, -0.0245, +-0.0400, -0.0112, 0.0134, 0.0001, -0.0422, -0.0514, -0.0081, 0.0083, +-0.0151, 0.0323, -0.0001, -0.0444, -0.0406, -0.0214, -0.0050, -0.0235, +-0.0205, -0.0264, -0.0324, 0.0334, 0.0392, 0.0265, 0.0289, 0.0180, + 0.0493, 0.0227, 0.0194, 0.0365, 0.0544, 0.0674, 0.0559, 0.0732, + 0.0911, 0.0942, 0.0735, 0.0174, -0.0113, -0.0553, -0.0665, -0.0227, +-0.0259, -0.0266, -0.0239, -0.0379, 0.0329, 0.0173, -0.0210, -0.0114, +-0.0063, 0.0060, -0.0089, -0.0198, -0.0282, -0.0080, -0.0179, -0.0290, + 0.0046, -0.0126, -0.0066, 0.0350, 0.0532, 0.0235, 0.0198, 0.0212, + 0.0449, 0.0681, 0.0677, -0.0049, 0.0086, 0.0120, 0.0356, 0.0454, + 0.0592, 0.0449, -0.0271, -0.0510, -0.0110, 0.0234, 0.0203, 0.0243, + 0.0242, 0.0133, 0.0098, 0.0040, 0.0024, -0.0005, -0.0075, -0.0126, +-0.0393, -0.0052, 0.0165, 0.0016, -0.0193, 0.0239, 0.0336, 0.0029, +-0.0586, -0.0539, -0.0094, -0.0664, -0.0898, -0.0540, -0.0066, 0.0134, +-0.0074, 0.0067, -0.0521, -0.0431, 0.0104, 0.0690, 0.0663, 0.0197, +-0.0017, -0.0518, -0.0597, -0.0171, -0.0054, -0.0140, -0.0080, 0.0172, +-0.0362, -0.0713, -0.0310, 0.0096, 0.0243, 0.0381, -0.0062, -0.0392, +-0.0281, 0.0386, 0.0461, 0.0069, 0.0384, 0.0080, -0.0141, 0.0171, + 0.3368, 0.3128, 0.3304, 0.3392, 0.3185, 0.3037, 0.2789, 0.2692, + 0.2779, 0.2796, 0.2891, 0.2643, 0.2647, 0.2593, 0.2927, 0.3283, + 0.4978, 0.4988, 0.4969, 0.4997, 0.4957, 0.4985, 0.4970, 0.4978, + 0.4938, 0.4951, 0.4994, 0.4971, 0.4981, 0.4983, 0.4967, 0.4789 +}, + +.lsp44 = { + 0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915, + 1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765, + 2.5187, 2.6530, 2.7895, 2.9354, 0.0944, 0.1974, 0.3046, 0.4714, + 0.6116, 0.7829, 0.9027, 1.0375, 1.1869, 1.3488, 1.5036, 1.6781, + 1.8276, 1.9983, 2.1449, 2.3089, 2.4534, 2.6113, 2.7553, 2.9062, + 0.1168, 0.2843, 0.4907, 0.6706, 0.8100, 0.9417, 1.0753, 1.2014, + 1.3151, 1.4496, 1.5832, 1.7379, 1.8642, 2.0230, 2.1681, 2.3250, + 2.4676, 2.6242, 2.7602, 2.9066, 0.1353, 0.2335, 0.3370, 0.4380, + 0.5819, 0.7353, 0.8671, 1.0160, 1.1435, 1.2977, 1.4860, 1.6739, + 1.8412, 2.0028, 2.1537, 2.3124, 2.4741, 2.6272, 2.7862, 2.9536, + 0.1003, 0.2226, 0.3584, 0.4971, 0.6291, 0.7710, 0.9157, 1.0669, + 1.2143, 1.3624, 1.5104, 1.6681, 1.8164, 1.9823, 2.1394, 2.3082, + 2.4677, 2.6306, 2.7909, 2.9382, 0.1056, 0.2027, 0.2956, 0.4005, + 0.5215, 0.6708, 0.8545, 1.0557, 1.2344, 1.4023, 1.5676, 1.7278, + 1.8808, 2.0381, 2.1846, 2.3376, 2.4887, 2.6377, 2.7878, 2.9504, + 0.1015, 0.2462, 0.4122, 0.5783, 0.7233, 0.8833, 1.0377, 1.1903, + 1.3341, 1.4727, 1.6138, 1.7582, 1.8912, 2.0370, 2.1701, 2.3125, + 2.4500, 2.6006, 2.7507, 2.9166, 0.1787, 0.2418, 0.3265, 0.5379, + 0.6584, 0.7681, 0.9545, 1.1050, 1.2125, 1.3528, 1.4763, 1.6705, + 1.8136, 1.9594, 2.0936, 2.2724, 2.4394, 2.5919, 2.7037, 2.8747, + 0.0859, 0.1600, 0.2980, 0.4933, 0.6696, 0.8285, 0.9958, 1.1545, + 1.3107, 1.4591, 1.6127, 1.7652, 1.9143, 2.0680, 2.2171, 2.3643, + 2.5141, 2.6611, 2.8143, 2.9691, 0.0910, 0.2110, 0.3364, 0.4718, + 0.5856, 0.7298, 0.8910, 1.0514, 1.1988, 1.3572, 1.5178, 1.6861, + 1.8399, 2.0099, 2.1639, 2.3225, 2.4774, 2.6321, 2.7863, 2.9412, + 0.1904, 0.2874, 0.3681, 0.4981, 0.6248, 0.7880, 0.9121, 1.0750, + 1.2185, 1.3809, 1.5296, 1.7007, 1.8592, 2.0470, 2.1913, 2.3250, + 2.4519, 2.5984, 2.7408, 2.9023, 0.0917, 0.2067, 0.3246, 0.4961, + 0.6310, 0.8024, 0.9438, 1.1008, 1.2362, 1.3892, 1.5407, 1.7033, + 1.8427, 2.0061, 2.1498, 2.3117, 2.4550, 2.6053, 2.7462, 2.9029, + 0.0989, 0.2193, 0.3756, 0.5410, 0.6929, 0.8368, 0.9801, 1.1250, + 1.2677, 1.4184, 1.5677, 1.7292, 1.8770, 2.0311, 2.1803, 2.3306, + 2.4836, 2.6339, 2.7943, 2.9549, 0.0861, 0.1943, 0.3057, 0.4867, + 0.6194, 0.7592, 0.9184, 1.1052, 1.2486, 1.4064, 1.5609, 1.7273, + 1.8703, 2.0291, 2.1686, 2.3225, 2.4628, 2.6115, 2.7471, 2.9005, + 0.0932, 0.2110, 0.3737, 0.5479, 0.7120, 0.8570, 0.9975, 1.1364, + 1.2772, 1.4220, 1.5612, 1.7089, 1.8410, 1.9827, 2.1263, 2.2859, + 2.4459, 2.6172, 2.7788, 2.9395, 0.1193, 0.2341, 0.3523, 0.5029, + 0.6437, 0.7803, 0.9367, 1.1007, 1.2392, 1.3869, 1.5425, 1.7168, + 1.8709, 2.0248, 2.1584, 2.2949, 2.4308, 2.5823, 2.7235, 2.9034, + 0.0834, 0.1988, 0.3557, 0.5261, 0.6767, 0.8427, 1.0029, 1.1683, + 1.3138, 1.4527, 1.6046, 1.7583, 1.9011, 2.0517, 2.1928, 2.3397, + 2.4839, 2.6291, 2.7771, 2.9329, 0.0938, 0.1967, 0.3213, 0.4675, + 0.6068, 0.7664, 0.9418, 1.1120, 1.2535, 1.3932, 1.5243, 1.6801, + 1.8346, 1.9931, 2.1376, 2.3035, 2.4636, 2.6244, 2.7829, 2.9371, + 0.1017, 0.2552, 0.4327, 0.6017, 0.7467, 0.8797, 1.0097, 1.1442, + 1.2628, 1.4049, 1.5541, 1.7090, 1.8461, 1.9982, 2.1486, 2.3029, + 2.4513, 2.6075, 2.7594, 2.9209, 0.1031, 0.2295, 0.3747, 0.5122, + 0.6596, 0.7935, 0.9345, 1.1050, 1.2384, 1.3543, 1.4739, 1.6136, + 1.7447, 1.8914, 2.0434, 2.1916, 2.3557, 2.5396, 2.7419, 2.9401, + 0.1007, 0.2374, 0.3715, 0.5173, 0.6465, 0.8069, 0.9553, 1.1145, + 1.2594, 1.4143, 1.5617, 1.7166, 1.8457, 2.0012, 2.1462, 2.2864, + 2.4258, 2.5910, 2.7372, 2.9018, 0.0808, 0.1726, 0.2849, 0.4592, + 0.6118, 0.7853, 0.9588, 1.1256, 1.2751, 1.4392, 1.5898, 1.7514, + 1.8977, 2.0554, 2.1937, 2.3430, 2.4831, 2.6249, 2.7601, 2.9155, + 0.1669, 0.2574, 0.3694, 0.5569, 0.6773, 0.8061, 1.0160, 1.1667, + 1.2791, 1.4041, 1.5452, 1.7207, 1.8524, 2.0038, 2.1414, 2.3338, + 2.4747, 2.6157, 2.7303, 2.8848, 0.1598, 0.2521, 0.3416, 0.5149, + 0.6703, 0.7941, 0.9408, 1.1164, 1.2017, 1.3293, 1.4908, 1.6783, + 1.8438, 1.9927, 2.1149, 2.2698, 2.4420, 2.6193, 2.7583, 2.9103, + 0.0902, 0.1978, 0.3265, 0.4578, 0.5878, 0.7439, 0.9110, 1.0906, + 1.2556, 1.4125, 1.5688, 1.7295, 1.8829, 2.0472, 2.2058, 2.3537, + 2.5075, 2.6548, 2.8058, 2.9538, 0.0818, 0.1695, 0.2794, 0.4470, + 0.6069, 0.7641, 0.9313, 1.0946, 1.2411, 1.4072, 1.5640, 1.7186, + 1.8651, 2.0254, 2.1726, 2.3286, 2.4784, 2.6287, 2.7750, 2.9339, + 0.1980, 0.3134, 0.4099, 0.4975, 0.6491, 0.8376, 0.9441, 1.0298, + 1.1795, 1.3866, 1.5784, 1.7209, 1.8137, 1.9271, 2.0863, 2.2930, + 2.4696, 2.6184, 2.7587, 2.9251, 0.1338, 0.2341, 0.3566, 0.4797, + 0.6129, 0.7580, 0.9093, 1.0491, 1.1911, 1.3313, 1.4841, 1.6503, + 1.8035, 1.9685, 2.1128, 2.2694, 2.4093, 2.5728, 2.7206, 2.8994, + 0.0937, 0.2034, 0.3447, 0.5032, 0.6370, 0.7993, 0.9674, 1.1323, + 1.2830, 1.4199, 1.5492, 1.7010, 1.8513, 2.0087, 2.1550, 2.3115, + 2.4643, 2.6237, 2.7812, 2.9392, 0.1085, 0.2152, 0.3126, 0.4569, + 0.5718, 0.7213, 0.8837, 1.0604, 1.2053, 1.3755, 1.5397, 1.7001, + 1.8409, 2.0039, 2.1498, 2.3080, 2.4535, 2.6063, 2.7505, 2.9110, + 0.0562, 0.2066, 0.4034, 0.5490, 0.6682, 0.7924, 0.9495, 1.0800, + 1.1869, 1.3156, 1.4834, 1.6619, 1.8404, 2.0199, 2.1509, 2.2755, + 2.4072, 2.5580, 2.6993, 2.8913, 0.0939, 0.2303, 0.3742, 0.5260, + 0.6662, 0.8294, 0.9769, 1.1315, 1.2792, 1.4153, 1.5436, 1.6701, + 1.8215, 1.9920, 2.1310, 2.3005, 2.4534, 2.5786, 2.7204, 2.9068, + 0.1005, 0.2442, 0.3898, 0.5398, 0.6958, 0.8474, 1.0008, 1.1556, + 1.3020, 1.4456, 1.5954, 1.7470, 1.8922, 2.0500, 2.2019, 2.3492, + 2.4963, 2.6412, 2.7890, 2.9423, 0.1022, 0.2031, 0.3213, 0.4402, + 0.5637, 0.7117, 0.8673, 1.0242, 1.1727, 1.3206, 1.4846, 1.6465, + 1.8015, 1.9655, 2.1233, 2.2873, 2.4464, 2.6074, 2.7685, 2.9409, + 0.1985, 0.3497, 0.4622, 0.5982, 0.7489, 0.8752, 0.9925, 1.1679, + 1.3288, 1.4606, 1.5820, 1.7492, 1.8922, 2.0511, 2.1780, 2.3373, + 2.4760, 2.6233, 2.7466, 2.8978, 0.1284, 0.2433, 0.3630, 0.4852, + 0.6117, 0.7460, 0.8904, 1.0360, 1.1738, 1.3142, 1.4696, 1.6185, + 1.7719, 1.9318, 2.0961, 2.2697, 2.4408, 2.6046, 2.7681, 2.9451, + 0.1042, 0.2286, 0.3598, 0.5064, 0.6438, 0.7899, 0.9350, 1.0891, + 1.2323, 1.3807, 1.5225, 1.6747, 1.8153, 1.9669, 2.1145, 2.2832, + 2.4430, 2.6085, 2.7748, 2.9346, 0.0780, 0.1724, 0.2440, 0.3489, + 0.5280, 0.7426, 0.9272, 1.0914, 1.2562, 1.4188, 1.5804, 1.7376, + 1.8909, 2.0473, 2.1946, 2.3457, 2.4950, 2.6424, 2.7926, 2.9549, + 0.1103, 0.2608, 0.4087, 0.5538, 0.6923, 0.8418, 0.9940, 1.1507, + 1.2919, 1.4406, 1.5802, 1.7262, 1.8638, 2.0085, 2.1572, 2.2975, + 2.4329, 2.5866, 2.7380, 2.9107, 0.1297, 0.2532, 0.4003, 0.5329, + 0.6733, 0.7950, 0.9557, 1.0859, 1.2235, 1.3538, 1.5037, 1.6389, + 1.7964, 1.9285, 2.0898, 2.2541, 2.4231, 2.5711, 2.6875, 2.8947, + 0.0871, 0.1968, 0.3425, 0.4949, 0.6424, 0.7959, 0.9534, 1.1132, + 1.2656, 1.4229, 1.5785, 1.7271, 1.8729, 2.0355, 2.1998, 2.3562, + 2.5151, 2.6663, 2.8145, 2.9534, 0.1038, 0.2204, 0.3248, 0.4566, + 0.5947, 0.7443, 0.8811, 1.0379, 1.2031, 1.3772, 1.5430, 1.7092, + 1.8625, 2.0322, 2.1904, 2.3417, 2.4960, 2.6458, 2.7979, 2.9485, + 0.1329, 0.2763, 0.3943, 0.5147, 0.6512, 0.8071, 0.9410, 1.0879, + 1.2298, 1.3850, 1.5282, 1.6674, 1.8137, 1.9993, 2.1344, 2.2749, + 2.4257, 2.5863, 2.7410, 2.9184, 0.1052, 0.2142, 0.3584, 0.5033, + 0.6387, 0.7804, 0.9320, 1.0780, 1.2172, 1.3764, 1.5421, 1.6887, + 1.8246, 1.9833, 2.1245, 2.2797, 2.4237, 2.5779, 2.7257, 2.9097, + 0.1092, 0.2676, 0.4071, 0.5355, 0.6661, 0.8142, 0.9621, 1.1173, + 1.2628, 1.4185, 1.5696, 1.7220, 1.8595, 2.0178, 2.1720, 2.3221, + 2.4718, 2.6259, 2.7775, 2.9334, 0.0929, 0.2017, 0.3073, 0.4570, + 0.5775, 0.7635, 0.9299, 1.0832, 1.2334, 1.3935, 1.5420, 1.7112, + 1.8601, 2.0309, 2.1735, 2.3230, 2.4543, 2.6034, 2.7418, 2.8988, + 0.0775, 0.2005, 0.3490, 0.5200, 0.6747, 0.8383, 0.9885, 1.1738, + 1.3141, 1.4236, 1.5892, 1.7402, 1.8474, 2.0210, 2.1593, 2.2730, + 2.4235, 2.5604, 2.7128, 2.9005, 0.1104, 0.2292, 0.3353, 0.4732, + 0.6152, 0.7675, 0.9164, 1.0907, 1.2594, 1.4064, 1.5218, 1.6426, + 1.8018, 1.9937, 2.1362, 2.2961, 2.4523, 2.6083, 2.7613, 2.9202, + 0.0826, 0.2000, 0.3384, 0.5144, 0.6694, 0.8377, 0.9870, 1.1461, + 1.2950, 1.4495, 1.5872, 1.7387, 1.8793, 2.0329, 2.1723, 2.3114, + 2.4415, 2.5908, 2.7354, 2.9028, 0.1063, 0.2268, 0.3442, 0.4735, + 0.6116, 0.7507, 0.9028, 1.0768, 1.2426, 1.4052, 1.5566, 1.7015, + 1.8243, 1.9742, 2.1276, 2.2824, 2.4262, 2.5953, 2.7627, 2.9290, + 0.1150, 0.2814, 0.4543, 0.6095, 0.7373, 0.8592, 0.9908, 1.1108, + 1.2339, 1.3590, 1.4864, 1.6168, 1.7392, 1.8752, 2.0212, 2.1688, + 2.3128, 2.4869, 2.7019, 2.9239, 0.0948, 0.2074, 0.3433, 0.4943, + 0.6346, 0.7645, 0.8809, 1.0610, 1.2307, 1.3487, 1.4655, 1.6186, + 1.7534, 1.8859, 2.0486, 2.2200, 2.3835, 2.5581, 2.7565, 2.9502, + 0.1062, 0.2239, 0.3683, 0.5197, 0.6704, 0.8184, 0.9642, 1.1127, + 1.2556, 1.3976, 1.5405, 1.6940, 1.8375, 1.9888, 2.1377, 2.2980, + 2.4555, 2.6184, 2.7849, 2.9452, 0.0888, 0.2005, 0.2847, 0.4322, + 0.5763, 0.7577, 0.9262, 1.1095, 1.2719, 1.4331, 1.5843, 1.7452, + 1.8845, 2.0385, 2.1805, 2.3345, 2.4750, 2.6217, 2.7555, 2.9013, + 0.1713, 0.2617, 0.3868, 0.5859, 0.7073, 0.8535, 1.0593, 1.1778, + 1.3109, 1.4508, 1.5910, 1.7463, 1.8911, 2.0651, 2.2035, 2.3355, + 2.4947, 2.6440, 2.7424, 2.8943, 0.1346, 0.2549, 0.4089, 0.5488, + 0.6949, 0.8394, 0.9810, 1.1145, 1.2528, 1.4044, 1.5423, 1.6872, + 1.8274, 1.9726, 2.1403, 2.2809, 2.4128, 2.5564, 2.6887, 2.8895, + 0.0776, 0.1621, 0.2553, 0.4191, 0.5988, 0.7921, 0.9651, 1.1350, + 1.2930, 1.4475, 1.6011, 1.7585, 1.9068, 2.0638, 2.2102, 2.3594, + 2.5096, 2.6581, 2.8099, 2.9654, 0.0864, 0.1778, 0.2854, 0.4235, + 0.5568, 0.7220, 0.8963, 1.0609, 1.2217, 1.3830, 1.5422, 1.7018, + 1.8551, 2.0206, 2.1783, 2.3328, 2.4869, 2.6366, 2.7923, 2.9539, + 0.1144, 0.2576, 0.4186, 0.5594, 0.6875, 0.8221, 0.9598, 1.0944, + 1.2273, 1.3713, 1.5152, 1.6628, 1.8070, 1.9525, 2.0965, 2.2535, + 2.4132, 2.5725, 2.7250, 2.9150, 0.1079, 0.2221, 0.3334, 0.4845, + 0.6083, 0.7516, 0.9018, 1.0594, 1.2060, 1.3673, 1.5212, 1.6880, + 1.8208, 1.9831, 2.1269, 2.2909, 2.4366, 2.6027, 2.7339, 2.8924, + 0.0994, 0.2233, 0.3634, 0.5145, 0.6568, 0.8131, 0.9746, 1.1296, + 1.2666, 1.4116, 1.5748, 1.7264, 1.8649, 2.0217, 2.1716, 2.3293, + 2.4900, 2.6455, 2.7818, 2.9362, 0.1120, 0.2079, 0.3128, 0.4124, + 0.5291, 0.6816, 0.8478, 1.0150, 1.1772, 1.3456, 1.5208, 1.6882, + 1.8458, 2.0078, 2.1627, 2.3198, 2.4733, 2.6251, 2.7796, 2.9489, + 0.0853, 0.2030, 0.3669, 0.5326, 0.6678, 0.8086, 0.9526, 1.1142, + 1.2551, 1.4158, 1.5694, 1.7073, 1.8431, 1.9686, 2.1153, 2.2376, + 2.3686, 2.5591, 2.7320, 2.9104, 0.0905, 0.2166, 0.3539, 0.5201, + 0.6700, 0.8346, 0.9883, 1.1457, 1.2714, 1.3845, 1.5172, 1.6688, + 1.8008, 1.9535, 2.1019, 2.2708, 2.4135, 2.5974, 2.7486, 2.9033, + 0.0084, 0.0374, 0.0164, -0.0153, 0.0288, 0.0107, -0.0255, -0.0242, + 0.0000, -0.0055, -0.0081, -0.0075, -0.0022, -0.0052, -0.0069, -0.0017, + 0.0003, 0.0091, 0.0028, -0.0027, 0.0085, 0.0043, -0.0235, -0.0411, + 0.0202, 0.0359, 0.0376, 0.0321, 0.0306, -0.0358, -0.0276, -0.0090, + 0.0032, 0.0048, 0.0309, 0.0332, 0.0284, 0.0237, 0.0051, -0.0101, +-0.0233, -0.0428, -0.0585, -0.0387, 0.0039, 0.0081, 0.0029, -0.0017, +-0.0006, -0.0068, 0.0044, 0.0182, 0.0376, 0.0387, -0.0334, -0.0269, +-0.0182, -0.0069, -0.0026, 0.0035, -0.0049, -0.0212, -0.0408, -0.0245, + 0.0186, 0.0189, 0.0153, 0.0120, 0.0157, 0.0055, -0.0046, 0.0179, + 0.0284, -0.0032, -0.0261, -0.0205, -0.0039, 0.0174, 0.0299, 0.0207, + 0.0012, -0.0056, 0.0010, 0.0141, -0.0119, 0.0190, 0.0315, 0.0033, +-0.0128, 0.0300, 0.0328, 0.0308, 0.0353, 0.0266, 0.0066, -0.0328, +-0.0273, 0.0054, 0.0145, 0.0175, 0.0015, -0.0171, 0.0062, -0.0164, + 0.0045, -0.0071, 0.0025, 0.0278, 0.0283, 0.0117, -0.0026, -0.0285, +-0.0408, -0.0366, -0.0059, -0.0208, -0.0354, -0.0334, -0.0263, -0.0064, + 0.0072, -0.0006, -0.0235, -0.0037, -0.0307, -0.0294, -0.0163, -0.0197, +-0.0235, 0.0192, 0.0013, -0.0219, -0.0123, -0.0004, -0.0081, -0.0096, +-0.0123, -0.0101, 0.0021, 0.0151, 0.0106, 0.0151, 0.0292, 0.0033, + 0.0283, 0.0124, 0.0058, -0.0017, -0.0038, 0.0152, 0.0141, 0.0132, + 0.0178, 0.0157, 0.0073, 0.0176, 0.0141, 0.0097, -0.0092, -0.0163, +-0.0230, -0.0134, -0.0099, -0.0147, 0.0040, -0.0183, -0.0175, -0.0080, +-0.0083, -0.0290, -0.0417, -0.0398, -0.0269, -0.0199, -0.0143, -0.0053, +-0.0099, -0.0054, -0.0199, -0.0219, -0.0170, 0.0107, 0.0194, 0.0035, + 0.0437, 0.0406, 0.0215, 0.0120, 0.0053, -0.0028, 0.0238, 0.0337, + 0.0217, 0.0011, 0.0227, 0.0244, 0.0327, 0.0378, 0.0437, 0.0356, +-0.0033, 0.0113, 0.0407, 0.0334, -0.0125, -0.0003, -0.0141, -0.0273, +-0.0137, -0.0079, -0.0145, -0.0071, 0.0114, 0.0181, 0.0150, 0.0085, +-0.0077, -0.0038, -0.0219, -0.0263, -0.0187, -0.0233, 0.0133, 0.0265, +-0.0156, -0.0091, -0.0110, -0.0016, 0.0143, 0.0177, 0.0240, 0.0082, +-0.0143, -0.0257, -0.0014, 0.0002, 0.0082, 0.0180, 0.0325, 0.0340, +-0.0153, -0.0389, -0.0240, 0.0082, 0.0140, 0.0046, -0.0138, -0.0378, +-0.0366, 0.0297, 0.0252, 0.0078, 0.0063, 0.0006, 0.0044, 0.0074, + 0.0094, 0.0113, 0.0105, 0.0137, 0.0438, 0.0262, -0.0078, -0.0185, +-0.0215, -0.0407, -0.0435, -0.0208, -0.0004, -0.0144, -0.0205, -0.0248, +-0.0159, -0.0069, -0.0153, 0.0132, 0.0355, 0.0298, 0.0120, 0.0072, + 0.0236, 0.0526, 0.0479, 0.0233, -0.0133, -0.0283, -0.0468, -0.0549, +-0.0370, 0.0032, 0.0056, 0.0023, 0.0050, 0.0024, 0.0279, 0.0116, +-0.0045, -0.0012, 0.0107, 0.0190, 0.0253, 0.0191, 0.0043, 0.0193, +-0.0348, -0.0246, 0.0123, 0.0210, 0.0135, -0.0096, -0.0109, -0.0076, +-0.0156, -0.0290, 0.0160, 0.0194, 0.0219, 0.0259, 0.0250, 0.0195, + 0.4948, 0.4961, 0.4940, 0.4878, 0.4849, 0.4727, 0.4571, 0.4551, + 0.4534, 0.4468, 0.4412, 0.4354, 0.4298, 0.4272, 0.4498, 0.4506, + 0.4560, 0.4592, 0.4758, 0.4941, 0.2476, 0.1771, 0.1974, 0.1881, + 0.1667, 0.1826, 0.2067, 0.2031, 0.1734, 0.1534, 0.1415, 0.1761, + 0.1897, 0.1772, 0.1651, 0.1247, 0.1041, 0.1231, 0.1809, 0.2234 + }, +}; + +static const uint8_t tab7[][35] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0 }, + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 }, + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0 }, + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 }, + { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 }, + { 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, + 1, 0, 1 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 } +}; + +static const uint8_t tab8[][5] = { + { 0, 0, 0, 1, 1 }, + { 0, 1, 0, 0, 1 }, + { 1, 1, 0, 0, 0 }, + { 1, 0, 0, 1, 0 }, + { 0, 0, 0, 1, 1 }, + { 0, 1, 0, 0, 1 }, + { 1, 1, 0, 0, 0 }, + { 1, 0, 0, 1, 0 }, + { 0, 0, 0, 1, 1 }, + { 0, 1, 0, 0, 1 }, + { 1, 1, 0, 0, 0 }, + { 0, 0, 0, 0, 0 }, + { 0, 1, 0, 1, 0 } +}; + +static const uint8_t tab9[][45] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +static const uint8_t tab10[][25] = { + { 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, + 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 }, + { 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0 }, + { 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, + 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0 }, + { 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 }, + { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, + { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0 }, + { 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 } +}; + +static const uint8_t tab11[][55] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, + { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, } +}; + +static const uint8_t tab12[][15] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, + { 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, + { 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 }, +}; + +static const struct { + int size; + const uint8_t *tab; +} tabs[] = { + { 0, NULL }, + { 5, &tab8[0][0] }, { 5, &tab8[0][0] }, { 15, &tab12[0][0] }, + { 5, &tab8[0][0] }, { 25, &tab10[0][0] }, { 15, &tab12[0][0] }, + { 35, &tab7[0][0] }, { 5, &tab8[0][0] }, { 45, &tab9[0][0] }, + { 25, &tab10[0][0] }, { 55, &tab11[0][0] }, { 15, &tab12[0][0] } +}; + +#endif /* AVCODEC_TWINVQ_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ulti_cb.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ulti_cb.h new file mode 100644 index 00000000..7061d839 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/ulti_cb.h @@ -0,0 +1,4124 @@ +/* + * IBM Ultimotion Video Decoder + * copyright (C) 2004 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ULTI_CB_H +#define AVCODEC_ULTI_CB_H + +static const unsigned char ulti_codebook[16384]={ + 0x00, 0x01, 0x01, 0x02, + 0x00, 0x01, 0x02, 0x03, + 0x00, 0x02, 0x03, 0x04, + 0x00, 0x01, 0x03, 0x04, + 0x00, 0x01, 0x02, 0x04, + 0x00, 0x02, 0x03, 0x05, + 0x00, 0x02, 0x04, 0x05, + 0x00, 0x01, 0x04, 0x05, + 0x00, 0x01, 0x03, 0x05, + 0x00, 0x02, 0x04, 0x06, + 0x00, 0x03, 0x05, 0x06, + 0x00, 0x01, 0x05, 0x06, + 0x00, 0x01, 0x03, 0x06, + 0x00, 0x06, 0x06, 0x06, + 0x00, 0x00, 0x06, 0x06, + 0x00, 0x00, 0x00, 0x06, + 0x00, 0x03, 0x04, 0x07, + 0x00, 0x03, 0x06, 0x07, + 0x00, 0x01, 0x06, 0x07, + 0x00, 0x01, 0x04, 0x07, + 0x00, 0x03, 0x05, 0x08, + 0x00, 0x04, 0x06, 0x08, + 0x00, 0x02, 0x06, 0x08, + 0x00, 0x02, 0x04, 0x08, + 0x00, 0x08, 0x08, 0x08, + 0x00, 0x00, 0x08, 0x08, + 0x00, 0x00, 0x00, 0x08, + 0x00, 0x04, 0x07, 0x0B, + 0x00, 0x05, 0x09, 0x0B, + 0x00, 0x02, 0x09, 0x0B, + 0x00, 0x02, 0x06, 0x0B, + 0x00, 0x0B, 0x0B, 0x0B, + 0x00, 0x00, 0x0B, 0x0B, + 0x00, 0x00, 0x00, 0x0B, + 0x00, 0x05, 0x09, 0x0E, + 0x00, 0x07, 0x0B, 0x0E, + 0x00, 0x03, 0x0B, 0x0E, + 0x00, 0x03, 0x07, 0x0E, + 0x00, 0x0E, 0x0E, 0x0E, + 0x00, 0x00, 0x0E, 0x0E, + 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x06, 0x0B, 0x11, + 0x00, 0x08, 0x0D, 0x11, + 0x00, 0x04, 0x0D, 0x11, + 0x00, 0x04, 0x09, 0x11, + 0x00, 0x11, 0x11, 0x11, + 0x00, 0x00, 0x11, 0x11, + 0x00, 0x00, 0x00, 0x11, + 0x00, 0x07, 0x0D, 0x14, + 0x00, 0x0A, 0x0F, 0x14, + 0x00, 0x05, 0x0F, 0x14, + 0x00, 0x05, 0x0A, 0x14, + 0x00, 0x14, 0x14, 0x14, + 0x00, 0x00, 0x14, 0x14, + 0x00, 0x00, 0x00, 0x14, + 0x00, 0x0B, 0x12, 0x17, + 0x00, 0x05, 0x12, 0x17, + 0x00, 0x05, 0x0C, 0x17, + 0x00, 0x17, 0x17, 0x17, + 0x00, 0x00, 0x17, 0x17, + 0x00, 0x00, 0x00, 0x17, + 0x00, 0x0D, 0x14, 0x1A, + 0x00, 0x06, 0x14, 0x1A, + 0x00, 0x06, 0x0D, 0x1A, + 0x00, 0x1A, 0x1A, 0x1A, + 0x00, 0x00, 0x1A, 0x1A, + 0x00, 0x00, 0x00, 0x1A, + 0x00, 0x0E, 0x16, 0x1D, + 0x00, 0x07, 0x16, 0x1D, + 0x00, 0x07, 0x0F, 0x1D, + 0x00, 0x1D, 0x1D, 0x1D, + 0x00, 0x00, 0x1D, 0x1D, + 0x00, 0x00, 0x00, 0x1D, + 0x00, 0x10, 0x18, 0x20, + 0x00, 0x08, 0x18, 0x20, + 0x00, 0x08, 0x10, 0x20, + 0x00, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x20, 0x20, + 0x00, 0x00, 0x00, 0x20, + 0x00, 0x23, 0x23, 0x23, + 0x00, 0x00, 0x23, 0x23, + 0x00, 0x00, 0x00, 0x23, + 0x00, 0x12, 0x1B, 0x24, + 0x00, 0x09, 0x1B, 0x24, + 0x00, 0x09, 0x12, 0x24, + 0x00, 0x28, 0x28, 0x28, + 0x00, 0x00, 0x28, 0x28, + 0x00, 0x00, 0x00, 0x28, + 0x00, 0x2E, 0x2E, 0x2E, + 0x00, 0x00, 0x2E, 0x2E, + 0x00, 0x00, 0x00, 0x2E, + 0x01, 0x02, 0x02, 0x03, + 0x01, 0x02, 0x03, 0x04, + 0x01, 0x03, 0x04, 0x05, + 0x01, 0x02, 0x04, 0x05, + 0x01, 0x02, 0x03, 0x05, + 0x01, 0x03, 0x04, 0x06, + 0x01, 0x03, 0x05, 0x06, + 0x01, 0x02, 0x05, 0x06, + 0x01, 0x02, 0x04, 0x06, + 0x01, 0x03, 0x05, 0x07, + 0x01, 0x04, 0x06, 0x07, + 0x01, 0x02, 0x06, 0x07, + 0x01, 0x02, 0x04, 0x07, + 0x01, 0x07, 0x07, 0x07, + 0x01, 0x01, 0x07, 0x07, + 0x01, 0x01, 0x01, 0x07, + 0x01, 0x04, 0x05, 0x08, + 0x01, 0x04, 0x07, 0x08, + 0x01, 0x02, 0x07, 0x08, + 0x01, 0x02, 0x05, 0x08, + 0x01, 0x04, 0x06, 0x09, + 0x01, 0x05, 0x07, 0x09, + 0x01, 0x03, 0x07, 0x09, + 0x01, 0x03, 0x05, 0x09, + 0x01, 0x09, 0x09, 0x09, + 0x01, 0x01, 0x09, 0x09, + 0x01, 0x01, 0x01, 0x09, + 0x01, 0x05, 0x08, 0x0C, + 0x01, 0x06, 0x0A, 0x0C, + 0x01, 0x03, 0x0A, 0x0C, + 0x01, 0x03, 0x07, 0x0C, + 0x01, 0x0C, 0x0C, 0x0C, + 0x01, 0x01, 0x0C, 0x0C, + 0x01, 0x01, 0x01, 0x0C, + 0x01, 0x06, 0x0A, 0x0F, + 0x01, 0x08, 0x0C, 0x0F, + 0x01, 0x04, 0x0C, 0x0F, + 0x01, 0x04, 0x08, 0x0F, + 0x01, 0x0F, 0x0F, 0x0F, + 0x01, 0x01, 0x0F, 0x0F, + 0x01, 0x01, 0x01, 0x0F, + 0x01, 0x07, 0x0C, 0x12, + 0x01, 0x09, 0x0E, 0x12, + 0x01, 0x05, 0x0E, 0x12, + 0x01, 0x05, 0x0A, 0x12, + 0x01, 0x12, 0x12, 0x12, + 0x01, 0x01, 0x12, 0x12, + 0x01, 0x01, 0x01, 0x12, + 0x01, 0x08, 0x0E, 0x15, + 0x01, 0x0B, 0x10, 0x15, + 0x01, 0x06, 0x10, 0x15, + 0x01, 0x06, 0x0B, 0x15, + 0x01, 0x15, 0x15, 0x15, + 0x01, 0x01, 0x15, 0x15, + 0x01, 0x01, 0x01, 0x15, + 0x01, 0x0C, 0x13, 0x18, + 0x01, 0x06, 0x13, 0x18, + 0x01, 0x06, 0x0D, 0x18, + 0x01, 0x18, 0x18, 0x18, + 0x01, 0x01, 0x18, 0x18, + 0x01, 0x01, 0x01, 0x18, + 0x01, 0x0E, 0x15, 0x1B, + 0x01, 0x07, 0x15, 0x1B, + 0x01, 0x07, 0x0E, 0x1B, + 0x01, 0x1B, 0x1B, 0x1B, + 0x01, 0x01, 0x1B, 0x1B, + 0x01, 0x01, 0x01, 0x1B, + 0x01, 0x0F, 0x17, 0x1E, + 0x01, 0x08, 0x17, 0x1E, + 0x01, 0x08, 0x10, 0x1E, + 0x01, 0x1E, 0x1E, 0x1E, + 0x01, 0x01, 0x1E, 0x1E, + 0x01, 0x01, 0x01, 0x1E, + 0x01, 0x11, 0x19, 0x21, + 0x01, 0x09, 0x19, 0x21, + 0x01, 0x09, 0x11, 0x21, + 0x01, 0x21, 0x21, 0x21, + 0x01, 0x01, 0x21, 0x21, + 0x01, 0x01, 0x01, 0x21, + 0x01, 0x24, 0x24, 0x24, + 0x01, 0x01, 0x24, 0x24, + 0x01, 0x01, 0x01, 0x24, + 0x01, 0x13, 0x1C, 0x25, + 0x01, 0x0A, 0x1C, 0x25, + 0x01, 0x0A, 0x13, 0x25, + 0x01, 0x29, 0x29, 0x29, + 0x01, 0x01, 0x29, 0x29, + 0x01, 0x01, 0x01, 0x29, + 0x01, 0x2F, 0x2F, 0x2F, + 0x01, 0x01, 0x2F, 0x2F, + 0x01, 0x01, 0x01, 0x2F, + 0x02, 0x03, 0x03, 0x04, + 0x02, 0x03, 0x04, 0x05, + 0x02, 0x04, 0x05, 0x06, + 0x02, 0x03, 0x05, 0x06, + 0x02, 0x03, 0x04, 0x06, + 0x02, 0x04, 0x05, 0x07, + 0x02, 0x04, 0x06, 0x07, + 0x02, 0x03, 0x06, 0x07, + 0x02, 0x03, 0x05, 0x07, + 0x02, 0x04, 0x06, 0x08, + 0x02, 0x05, 0x07, 0x08, + 0x02, 0x03, 0x07, 0x08, + 0x02, 0x03, 0x05, 0x08, + 0x02, 0x08, 0x08, 0x08, + 0x02, 0x02, 0x08, 0x08, + 0x02, 0x02, 0x02, 0x08, + 0x02, 0x05, 0x06, 0x09, + 0x02, 0x05, 0x08, 0x09, + 0x02, 0x03, 0x08, 0x09, + 0x02, 0x03, 0x06, 0x09, + 0x02, 0x05, 0x07, 0x0A, + 0x02, 0x06, 0x08, 0x0A, + 0x02, 0x04, 0x08, 0x0A, + 0x02, 0x04, 0x06, 0x0A, + 0x02, 0x0A, 0x0A, 0x0A, + 0x02, 0x02, 0x0A, 0x0A, + 0x02, 0x02, 0x02, 0x0A, + 0x02, 0x06, 0x09, 0x0D, + 0x02, 0x07, 0x0B, 0x0D, + 0x02, 0x04, 0x0B, 0x0D, + 0x02, 0x04, 0x08, 0x0D, + 0x02, 0x0D, 0x0D, 0x0D, + 0x02, 0x02, 0x0D, 0x0D, + 0x02, 0x02, 0x02, 0x0D, + 0x02, 0x07, 0x0B, 0x10, + 0x02, 0x09, 0x0D, 0x10, + 0x02, 0x05, 0x0D, 0x10, + 0x02, 0x05, 0x09, 0x10, + 0x02, 0x10, 0x10, 0x10, + 0x02, 0x02, 0x10, 0x10, + 0x02, 0x02, 0x02, 0x10, + 0x02, 0x08, 0x0D, 0x13, + 0x02, 0x0A, 0x0F, 0x13, + 0x02, 0x06, 0x0F, 0x13, + 0x02, 0x06, 0x0B, 0x13, + 0x02, 0x13, 0x13, 0x13, + 0x02, 0x02, 0x13, 0x13, + 0x02, 0x02, 0x02, 0x13, + 0x02, 0x09, 0x0F, 0x16, + 0x02, 0x0C, 0x11, 0x16, + 0x02, 0x07, 0x11, 0x16, + 0x02, 0x07, 0x0C, 0x16, + 0x02, 0x16, 0x16, 0x16, + 0x02, 0x02, 0x16, 0x16, + 0x02, 0x02, 0x02, 0x16, + 0x02, 0x0D, 0x14, 0x19, + 0x02, 0x07, 0x14, 0x19, + 0x02, 0x07, 0x0E, 0x19, + 0x02, 0x19, 0x19, 0x19, + 0x02, 0x02, 0x19, 0x19, + 0x02, 0x02, 0x02, 0x19, + 0x02, 0x0F, 0x16, 0x1C, + 0x02, 0x08, 0x16, 0x1C, + 0x02, 0x08, 0x0F, 0x1C, + 0x02, 0x1C, 0x1C, 0x1C, + 0x02, 0x02, 0x1C, 0x1C, + 0x02, 0x02, 0x02, 0x1C, + 0x02, 0x10, 0x18, 0x1F, + 0x02, 0x09, 0x18, 0x1F, + 0x02, 0x09, 0x11, 0x1F, + 0x02, 0x1F, 0x1F, 0x1F, + 0x02, 0x02, 0x1F, 0x1F, + 0x02, 0x02, 0x02, 0x1F, + 0x02, 0x12, 0x1A, 0x22, + 0x02, 0x0A, 0x1A, 0x22, + 0x02, 0x0A, 0x12, 0x22, + 0x02, 0x22, 0x22, 0x22, + 0x02, 0x02, 0x22, 0x22, + 0x02, 0x02, 0x02, 0x22, + 0x02, 0x25, 0x25, 0x25, + 0x02, 0x02, 0x25, 0x25, + 0x02, 0x02, 0x02, 0x25, + 0x02, 0x14, 0x1D, 0x26, + 0x02, 0x0B, 0x1D, 0x26, + 0x02, 0x0B, 0x14, 0x26, + 0x02, 0x2A, 0x2A, 0x2A, + 0x02, 0x02, 0x2A, 0x2A, + 0x02, 0x02, 0x02, 0x2A, + 0x02, 0x30, 0x30, 0x30, + 0x02, 0x02, 0x30, 0x30, + 0x02, 0x02, 0x02, 0x30, + 0x03, 0x04, 0x04, 0x05, + 0x03, 0x04, 0x05, 0x06, + 0x03, 0x05, 0x06, 0x07, + 0x03, 0x04, 0x06, 0x07, + 0x03, 0x04, 0x05, 0x07, + 0x03, 0x05, 0x06, 0x08, + 0x03, 0x05, 0x07, 0x08, + 0x03, 0x04, 0x07, 0x08, + 0x03, 0x04, 0x06, 0x08, + 0x03, 0x05, 0x07, 0x09, + 0x03, 0x06, 0x08, 0x09, + 0x03, 0x04, 0x08, 0x09, + 0x03, 0x04, 0x06, 0x09, + 0x03, 0x09, 0x09, 0x09, + 0x03, 0x03, 0x09, 0x09, + 0x03, 0x03, 0x03, 0x09, + 0x03, 0x06, 0x07, 0x0A, + 0x03, 0x06, 0x09, 0x0A, + 0x03, 0x04, 0x09, 0x0A, + 0x03, 0x04, 0x07, 0x0A, + 0x03, 0x06, 0x08, 0x0B, + 0x03, 0x07, 0x09, 0x0B, + 0x03, 0x05, 0x09, 0x0B, + 0x03, 0x05, 0x07, 0x0B, + 0x03, 0x0B, 0x0B, 0x0B, + 0x03, 0x03, 0x0B, 0x0B, + 0x03, 0x03, 0x03, 0x0B, + 0x03, 0x07, 0x0A, 0x0E, + 0x03, 0x08, 0x0C, 0x0E, + 0x03, 0x05, 0x0C, 0x0E, + 0x03, 0x05, 0x09, 0x0E, + 0x03, 0x0E, 0x0E, 0x0E, + 0x03, 0x03, 0x0E, 0x0E, + 0x03, 0x03, 0x03, 0x0E, + 0x03, 0x08, 0x0C, 0x11, + 0x03, 0x0A, 0x0E, 0x11, + 0x03, 0x06, 0x0E, 0x11, + 0x03, 0x06, 0x0A, 0x11, + 0x03, 0x11, 0x11, 0x11, + 0x03, 0x03, 0x11, 0x11, + 0x03, 0x03, 0x03, 0x11, + 0x03, 0x09, 0x0E, 0x14, + 0x03, 0x0B, 0x10, 0x14, + 0x03, 0x07, 0x10, 0x14, + 0x03, 0x07, 0x0C, 0x14, + 0x03, 0x14, 0x14, 0x14, + 0x03, 0x03, 0x14, 0x14, + 0x03, 0x03, 0x03, 0x14, + 0x03, 0x0A, 0x10, 0x17, + 0x03, 0x0D, 0x12, 0x17, + 0x03, 0x08, 0x12, 0x17, + 0x03, 0x08, 0x0D, 0x17, + 0x03, 0x17, 0x17, 0x17, + 0x03, 0x03, 0x17, 0x17, + 0x03, 0x03, 0x03, 0x17, + 0x03, 0x0E, 0x15, 0x1A, + 0x03, 0x08, 0x15, 0x1A, + 0x03, 0x08, 0x0F, 0x1A, + 0x03, 0x1A, 0x1A, 0x1A, + 0x03, 0x03, 0x1A, 0x1A, + 0x03, 0x03, 0x03, 0x1A, + 0x03, 0x10, 0x17, 0x1D, + 0x03, 0x09, 0x17, 0x1D, + 0x03, 0x09, 0x10, 0x1D, + 0x03, 0x1D, 0x1D, 0x1D, + 0x03, 0x03, 0x1D, 0x1D, + 0x03, 0x03, 0x03, 0x1D, + 0x03, 0x11, 0x19, 0x20, + 0x03, 0x0A, 0x19, 0x20, + 0x03, 0x0A, 0x12, 0x20, + 0x03, 0x20, 0x20, 0x20, + 0x03, 0x03, 0x20, 0x20, + 0x03, 0x03, 0x03, 0x20, + 0x03, 0x13, 0x1B, 0x23, + 0x03, 0x0B, 0x1B, 0x23, + 0x03, 0x0B, 0x13, 0x23, + 0x03, 0x23, 0x23, 0x23, + 0x03, 0x03, 0x23, 0x23, + 0x03, 0x03, 0x03, 0x23, + 0x03, 0x26, 0x26, 0x26, + 0x03, 0x03, 0x26, 0x26, + 0x03, 0x03, 0x03, 0x26, + 0x03, 0x15, 0x1E, 0x27, + 0x03, 0x0C, 0x1E, 0x27, + 0x03, 0x0C, 0x15, 0x27, + 0x03, 0x2B, 0x2B, 0x2B, + 0x03, 0x03, 0x2B, 0x2B, + 0x03, 0x03, 0x03, 0x2B, + 0x03, 0x31, 0x31, 0x31, + 0x03, 0x03, 0x31, 0x31, + 0x03, 0x03, 0x03, 0x31, + 0x04, 0x05, 0x05, 0x06, + 0x04, 0x05, 0x06, 0x07, + 0x04, 0x06, 0x07, 0x08, + 0x04, 0x05, 0x07, 0x08, + 0x04, 0x05, 0x06, 0x08, + 0x04, 0x06, 0x07, 0x09, + 0x04, 0x06, 0x08, 0x09, + 0x04, 0x05, 0x08, 0x09, + 0x04, 0x05, 0x07, 0x09, + 0x04, 0x06, 0x08, 0x0A, + 0x04, 0x07, 0x09, 0x0A, + 0x04, 0x05, 0x09, 0x0A, + 0x04, 0x05, 0x07, 0x0A, + 0x04, 0x0A, 0x0A, 0x0A, + 0x04, 0x04, 0x0A, 0x0A, + 0x04, 0x04, 0x04, 0x0A, + 0x04, 0x07, 0x08, 0x0B, + 0x04, 0x07, 0x0A, 0x0B, + 0x04, 0x05, 0x0A, 0x0B, + 0x04, 0x05, 0x08, 0x0B, + 0x04, 0x07, 0x09, 0x0C, + 0x04, 0x08, 0x0A, 0x0C, + 0x04, 0x06, 0x0A, 0x0C, + 0x04, 0x06, 0x08, 0x0C, + 0x04, 0x0C, 0x0C, 0x0C, + 0x04, 0x04, 0x0C, 0x0C, + 0x04, 0x04, 0x04, 0x0C, + 0x04, 0x08, 0x0B, 0x0F, + 0x04, 0x09, 0x0D, 0x0F, + 0x04, 0x06, 0x0D, 0x0F, + 0x04, 0x06, 0x0A, 0x0F, + 0x04, 0x0F, 0x0F, 0x0F, + 0x04, 0x04, 0x0F, 0x0F, + 0x04, 0x04, 0x04, 0x0F, + 0x04, 0x09, 0x0D, 0x12, + 0x04, 0x0B, 0x0F, 0x12, + 0x04, 0x07, 0x0F, 0x12, + 0x04, 0x07, 0x0B, 0x12, + 0x04, 0x12, 0x12, 0x12, + 0x04, 0x04, 0x12, 0x12, + 0x04, 0x04, 0x04, 0x12, + 0x04, 0x0A, 0x0F, 0x15, + 0x04, 0x0C, 0x11, 0x15, + 0x04, 0x08, 0x11, 0x15, + 0x04, 0x08, 0x0D, 0x15, + 0x04, 0x15, 0x15, 0x15, + 0x04, 0x04, 0x15, 0x15, + 0x04, 0x04, 0x04, 0x15, + 0x04, 0x0B, 0x11, 0x18, + 0x04, 0x0E, 0x13, 0x18, + 0x04, 0x09, 0x13, 0x18, + 0x04, 0x09, 0x0E, 0x18, + 0x04, 0x18, 0x18, 0x18, + 0x04, 0x04, 0x18, 0x18, + 0x04, 0x04, 0x04, 0x18, + 0x04, 0x0F, 0x16, 0x1B, + 0x04, 0x09, 0x16, 0x1B, + 0x04, 0x09, 0x10, 0x1B, + 0x04, 0x1B, 0x1B, 0x1B, + 0x04, 0x04, 0x1B, 0x1B, + 0x04, 0x04, 0x04, 0x1B, + 0x04, 0x11, 0x18, 0x1E, + 0x04, 0x0A, 0x18, 0x1E, + 0x04, 0x0A, 0x11, 0x1E, + 0x04, 0x1E, 0x1E, 0x1E, + 0x04, 0x04, 0x1E, 0x1E, + 0x04, 0x04, 0x04, 0x1E, + 0x04, 0x12, 0x1A, 0x21, + 0x04, 0x0B, 0x1A, 0x21, + 0x04, 0x0B, 0x13, 0x21, + 0x04, 0x21, 0x21, 0x21, + 0x04, 0x04, 0x21, 0x21, + 0x04, 0x04, 0x04, 0x21, + 0x04, 0x14, 0x1C, 0x24, + 0x04, 0x0C, 0x1C, 0x24, + 0x04, 0x0C, 0x14, 0x24, + 0x04, 0x24, 0x24, 0x24, + 0x04, 0x04, 0x24, 0x24, + 0x04, 0x04, 0x04, 0x24, + 0x04, 0x27, 0x27, 0x27, + 0x04, 0x04, 0x27, 0x27, + 0x04, 0x04, 0x04, 0x27, + 0x04, 0x16, 0x1F, 0x28, + 0x04, 0x0D, 0x1F, 0x28, + 0x04, 0x0D, 0x16, 0x28, + 0x04, 0x2C, 0x2C, 0x2C, + 0x04, 0x04, 0x2C, 0x2C, + 0x04, 0x04, 0x04, 0x2C, + 0x04, 0x32, 0x32, 0x32, + 0x04, 0x04, 0x32, 0x32, + 0x04, 0x04, 0x04, 0x32, + 0x05, 0x06, 0x06, 0x07, + 0x05, 0x06, 0x07, 0x08, + 0x05, 0x07, 0x08, 0x09, + 0x05, 0x06, 0x08, 0x09, + 0x05, 0x06, 0x07, 0x09, + 0x05, 0x07, 0x08, 0x0A, + 0x05, 0x07, 0x09, 0x0A, + 0x05, 0x06, 0x09, 0x0A, + 0x05, 0x06, 0x08, 0x0A, + 0x05, 0x07, 0x09, 0x0B, + 0x05, 0x08, 0x0A, 0x0B, + 0x05, 0x06, 0x0A, 0x0B, + 0x05, 0x06, 0x08, 0x0B, + 0x05, 0x0B, 0x0B, 0x0B, + 0x05, 0x05, 0x0B, 0x0B, + 0x05, 0x05, 0x05, 0x0B, + 0x05, 0x08, 0x09, 0x0C, + 0x05, 0x08, 0x0B, 0x0C, + 0x05, 0x06, 0x0B, 0x0C, + 0x05, 0x06, 0x09, 0x0C, + 0x05, 0x08, 0x0A, 0x0D, + 0x05, 0x09, 0x0B, 0x0D, + 0x05, 0x07, 0x0B, 0x0D, + 0x05, 0x07, 0x09, 0x0D, + 0x05, 0x0D, 0x0D, 0x0D, + 0x05, 0x05, 0x0D, 0x0D, + 0x05, 0x05, 0x05, 0x0D, + 0x05, 0x09, 0x0C, 0x10, + 0x05, 0x0A, 0x0E, 0x10, + 0x05, 0x07, 0x0E, 0x10, + 0x05, 0x07, 0x0B, 0x10, + 0x05, 0x10, 0x10, 0x10, + 0x05, 0x05, 0x10, 0x10, + 0x05, 0x05, 0x05, 0x10, + 0x05, 0x0A, 0x0E, 0x13, + 0x05, 0x0C, 0x10, 0x13, + 0x05, 0x08, 0x10, 0x13, + 0x05, 0x08, 0x0C, 0x13, + 0x05, 0x13, 0x13, 0x13, + 0x05, 0x05, 0x13, 0x13, + 0x05, 0x05, 0x05, 0x13, + 0x05, 0x0B, 0x10, 0x16, + 0x05, 0x0D, 0x12, 0x16, + 0x05, 0x09, 0x12, 0x16, + 0x05, 0x09, 0x0E, 0x16, + 0x05, 0x16, 0x16, 0x16, + 0x05, 0x05, 0x16, 0x16, + 0x05, 0x05, 0x05, 0x16, + 0x05, 0x0C, 0x12, 0x19, + 0x05, 0x0F, 0x14, 0x19, + 0x05, 0x0A, 0x14, 0x19, + 0x05, 0x0A, 0x0F, 0x19, + 0x05, 0x19, 0x19, 0x19, + 0x05, 0x05, 0x19, 0x19, + 0x05, 0x05, 0x05, 0x19, + 0x05, 0x10, 0x17, 0x1C, + 0x05, 0x0A, 0x17, 0x1C, + 0x05, 0x0A, 0x11, 0x1C, + 0x05, 0x1C, 0x1C, 0x1C, + 0x05, 0x05, 0x1C, 0x1C, + 0x05, 0x05, 0x05, 0x1C, + 0x05, 0x12, 0x19, 0x1F, + 0x05, 0x0B, 0x19, 0x1F, + 0x05, 0x0B, 0x12, 0x1F, + 0x05, 0x1F, 0x1F, 0x1F, + 0x05, 0x05, 0x1F, 0x1F, + 0x05, 0x05, 0x05, 0x1F, + 0x05, 0x13, 0x1B, 0x22, + 0x05, 0x0C, 0x1B, 0x22, + 0x05, 0x0C, 0x14, 0x22, + 0x05, 0x22, 0x22, 0x22, + 0x05, 0x05, 0x22, 0x22, + 0x05, 0x05, 0x05, 0x22, + 0x05, 0x15, 0x1D, 0x25, + 0x05, 0x0D, 0x1D, 0x25, + 0x05, 0x0D, 0x15, 0x25, + 0x05, 0x25, 0x25, 0x25, + 0x05, 0x05, 0x25, 0x25, + 0x05, 0x05, 0x05, 0x25, + 0x05, 0x28, 0x28, 0x28, + 0x05, 0x05, 0x28, 0x28, + 0x05, 0x05, 0x05, 0x28, + 0x05, 0x17, 0x20, 0x29, + 0x05, 0x0E, 0x20, 0x29, + 0x05, 0x0E, 0x17, 0x29, + 0x05, 0x2D, 0x2D, 0x2D, + 0x05, 0x05, 0x2D, 0x2D, + 0x05, 0x05, 0x05, 0x2D, + 0x05, 0x33, 0x33, 0x33, + 0x05, 0x05, 0x33, 0x33, + 0x05, 0x05, 0x05, 0x33, + 0x06, 0x07, 0x07, 0x08, + 0x06, 0x07, 0x08, 0x09, + 0x06, 0x08, 0x09, 0x0A, + 0x06, 0x07, 0x09, 0x0A, + 0x06, 0x07, 0x08, 0x0A, + 0x06, 0x08, 0x09, 0x0B, + 0x06, 0x08, 0x0A, 0x0B, + 0x06, 0x07, 0x0A, 0x0B, + 0x06, 0x07, 0x09, 0x0B, + 0x06, 0x08, 0x0A, 0x0C, + 0x06, 0x09, 0x0B, 0x0C, + 0x06, 0x07, 0x0B, 0x0C, + 0x06, 0x07, 0x09, 0x0C, + 0x06, 0x0C, 0x0C, 0x0C, + 0x06, 0x06, 0x0C, 0x0C, + 0x06, 0x06, 0x06, 0x0C, + 0x06, 0x09, 0x0A, 0x0D, + 0x06, 0x09, 0x0C, 0x0D, + 0x06, 0x07, 0x0C, 0x0D, + 0x06, 0x07, 0x0A, 0x0D, + 0x06, 0x09, 0x0B, 0x0E, + 0x06, 0x0A, 0x0C, 0x0E, + 0x06, 0x08, 0x0C, 0x0E, + 0x06, 0x08, 0x0A, 0x0E, + 0x06, 0x0E, 0x0E, 0x0E, + 0x06, 0x06, 0x0E, 0x0E, + 0x06, 0x06, 0x06, 0x0E, + 0x06, 0x0A, 0x0D, 0x11, + 0x06, 0x0B, 0x0F, 0x11, + 0x06, 0x08, 0x0F, 0x11, + 0x06, 0x08, 0x0C, 0x11, + 0x06, 0x11, 0x11, 0x11, + 0x06, 0x06, 0x11, 0x11, + 0x06, 0x06, 0x06, 0x11, + 0x06, 0x0B, 0x0F, 0x14, + 0x06, 0x0D, 0x11, 0x14, + 0x06, 0x09, 0x11, 0x14, + 0x06, 0x09, 0x0D, 0x14, + 0x06, 0x14, 0x14, 0x14, + 0x06, 0x06, 0x14, 0x14, + 0x06, 0x06, 0x06, 0x14, + 0x06, 0x0C, 0x11, 0x17, + 0x06, 0x0E, 0x13, 0x17, + 0x06, 0x0A, 0x13, 0x17, + 0x06, 0x0A, 0x0F, 0x17, + 0x06, 0x17, 0x17, 0x17, + 0x06, 0x06, 0x17, 0x17, + 0x06, 0x06, 0x06, 0x17, + 0x06, 0x0D, 0x13, 0x1A, + 0x06, 0x10, 0x15, 0x1A, + 0x06, 0x0B, 0x15, 0x1A, + 0x06, 0x0B, 0x10, 0x1A, + 0x06, 0x1A, 0x1A, 0x1A, + 0x06, 0x06, 0x1A, 0x1A, + 0x06, 0x06, 0x06, 0x1A, + 0x06, 0x11, 0x18, 0x1D, + 0x06, 0x0B, 0x18, 0x1D, + 0x06, 0x0B, 0x12, 0x1D, + 0x06, 0x1D, 0x1D, 0x1D, + 0x06, 0x06, 0x1D, 0x1D, + 0x06, 0x06, 0x06, 0x1D, + 0x06, 0x13, 0x1A, 0x20, + 0x06, 0x0C, 0x1A, 0x20, + 0x06, 0x0C, 0x13, 0x20, + 0x06, 0x20, 0x20, 0x20, + 0x06, 0x06, 0x20, 0x20, + 0x06, 0x06, 0x06, 0x20, + 0x06, 0x14, 0x1C, 0x23, + 0x06, 0x0D, 0x1C, 0x23, + 0x06, 0x0D, 0x15, 0x23, + 0x06, 0x23, 0x23, 0x23, + 0x06, 0x06, 0x23, 0x23, + 0x06, 0x06, 0x06, 0x23, + 0x06, 0x16, 0x1E, 0x26, + 0x06, 0x0E, 0x1E, 0x26, + 0x06, 0x0E, 0x16, 0x26, + 0x06, 0x26, 0x26, 0x26, + 0x06, 0x06, 0x26, 0x26, + 0x06, 0x06, 0x06, 0x26, + 0x06, 0x29, 0x29, 0x29, + 0x06, 0x06, 0x29, 0x29, + 0x06, 0x06, 0x06, 0x29, + 0x06, 0x18, 0x21, 0x2A, + 0x06, 0x0F, 0x21, 0x2A, + 0x06, 0x0F, 0x18, 0x2A, + 0x06, 0x2E, 0x2E, 0x2E, + 0x06, 0x06, 0x2E, 0x2E, + 0x06, 0x06, 0x06, 0x2E, + 0x06, 0x34, 0x34, 0x34, + 0x06, 0x06, 0x34, 0x34, + 0x06, 0x06, 0x06, 0x34, + 0x07, 0x08, 0x08, 0x09, + 0x07, 0x08, 0x09, 0x0A, + 0x07, 0x09, 0x0A, 0x0B, + 0x07, 0x08, 0x0A, 0x0B, + 0x07, 0x08, 0x09, 0x0B, + 0x07, 0x09, 0x0A, 0x0C, + 0x07, 0x09, 0x0B, 0x0C, + 0x07, 0x08, 0x0B, 0x0C, + 0x07, 0x08, 0x0A, 0x0C, + 0x07, 0x09, 0x0B, 0x0D, + 0x07, 0x0A, 0x0C, 0x0D, + 0x07, 0x08, 0x0C, 0x0D, + 0x07, 0x08, 0x0A, 0x0D, + 0x07, 0x0D, 0x0D, 0x0D, + 0x07, 0x07, 0x0D, 0x0D, + 0x07, 0x07, 0x07, 0x0D, + 0x07, 0x0A, 0x0B, 0x0E, + 0x07, 0x0A, 0x0D, 0x0E, + 0x07, 0x08, 0x0D, 0x0E, + 0x07, 0x08, 0x0B, 0x0E, + 0x07, 0x0A, 0x0C, 0x0F, + 0x07, 0x0B, 0x0D, 0x0F, + 0x07, 0x09, 0x0D, 0x0F, + 0x07, 0x09, 0x0B, 0x0F, + 0x07, 0x0F, 0x0F, 0x0F, + 0x07, 0x07, 0x0F, 0x0F, + 0x07, 0x07, 0x07, 0x0F, + 0x07, 0x0B, 0x0E, 0x12, + 0x07, 0x0C, 0x10, 0x12, + 0x07, 0x09, 0x10, 0x12, + 0x07, 0x09, 0x0D, 0x12, + 0x07, 0x12, 0x12, 0x12, + 0x07, 0x07, 0x12, 0x12, + 0x07, 0x07, 0x07, 0x12, + 0x07, 0x0C, 0x10, 0x15, + 0x07, 0x0E, 0x12, 0x15, + 0x07, 0x0A, 0x12, 0x15, + 0x07, 0x0A, 0x0E, 0x15, + 0x07, 0x15, 0x15, 0x15, + 0x07, 0x07, 0x15, 0x15, + 0x07, 0x07, 0x07, 0x15, + 0x07, 0x0D, 0x12, 0x18, + 0x07, 0x0F, 0x14, 0x18, + 0x07, 0x0B, 0x14, 0x18, + 0x07, 0x0B, 0x10, 0x18, + 0x07, 0x18, 0x18, 0x18, + 0x07, 0x07, 0x18, 0x18, + 0x07, 0x07, 0x07, 0x18, + 0x07, 0x0E, 0x14, 0x1B, + 0x07, 0x11, 0x16, 0x1B, + 0x07, 0x0C, 0x16, 0x1B, + 0x07, 0x0C, 0x11, 0x1B, + 0x07, 0x1B, 0x1B, 0x1B, + 0x07, 0x07, 0x1B, 0x1B, + 0x07, 0x07, 0x07, 0x1B, + 0x07, 0x12, 0x19, 0x1E, + 0x07, 0x0C, 0x19, 0x1E, + 0x07, 0x0C, 0x13, 0x1E, + 0x07, 0x1E, 0x1E, 0x1E, + 0x07, 0x07, 0x1E, 0x1E, + 0x07, 0x07, 0x07, 0x1E, + 0x07, 0x14, 0x1B, 0x21, + 0x07, 0x0D, 0x1B, 0x21, + 0x07, 0x0D, 0x14, 0x21, + 0x07, 0x21, 0x21, 0x21, + 0x07, 0x07, 0x21, 0x21, + 0x07, 0x07, 0x07, 0x21, + 0x07, 0x15, 0x1D, 0x24, + 0x07, 0x0E, 0x1D, 0x24, + 0x07, 0x0E, 0x16, 0x24, + 0x07, 0x24, 0x24, 0x24, + 0x07, 0x07, 0x24, 0x24, + 0x07, 0x07, 0x07, 0x24, + 0x07, 0x17, 0x1F, 0x27, + 0x07, 0x0F, 0x1F, 0x27, + 0x07, 0x0F, 0x17, 0x27, + 0x07, 0x27, 0x27, 0x27, + 0x07, 0x07, 0x27, 0x27, + 0x07, 0x07, 0x07, 0x27, + 0x07, 0x2A, 0x2A, 0x2A, + 0x07, 0x07, 0x2A, 0x2A, + 0x07, 0x07, 0x07, 0x2A, + 0x07, 0x19, 0x22, 0x2B, + 0x07, 0x10, 0x22, 0x2B, + 0x07, 0x10, 0x19, 0x2B, + 0x07, 0x2F, 0x2F, 0x2F, + 0x07, 0x07, 0x2F, 0x2F, + 0x07, 0x07, 0x07, 0x2F, + 0x07, 0x35, 0x35, 0x35, + 0x07, 0x07, 0x35, 0x35, + 0x07, 0x07, 0x07, 0x35, + 0x08, 0x09, 0x09, 0x0A, + 0x08, 0x09, 0x0A, 0x0B, + 0x08, 0x0A, 0x0B, 0x0C, + 0x08, 0x09, 0x0B, 0x0C, + 0x08, 0x09, 0x0A, 0x0C, + 0x08, 0x0A, 0x0B, 0x0D, + 0x08, 0x0A, 0x0C, 0x0D, + 0x08, 0x09, 0x0C, 0x0D, + 0x08, 0x09, 0x0B, 0x0D, + 0x08, 0x0A, 0x0C, 0x0E, + 0x08, 0x0B, 0x0D, 0x0E, + 0x08, 0x09, 0x0D, 0x0E, + 0x08, 0x09, 0x0B, 0x0E, + 0x08, 0x0E, 0x0E, 0x0E, + 0x08, 0x08, 0x0E, 0x0E, + 0x08, 0x08, 0x08, 0x0E, + 0x08, 0x0B, 0x0C, 0x0F, + 0x08, 0x0B, 0x0E, 0x0F, + 0x08, 0x09, 0x0E, 0x0F, + 0x08, 0x09, 0x0C, 0x0F, + 0x08, 0x0B, 0x0D, 0x10, + 0x08, 0x0C, 0x0E, 0x10, + 0x08, 0x0A, 0x0E, 0x10, + 0x08, 0x0A, 0x0C, 0x10, + 0x08, 0x10, 0x10, 0x10, + 0x08, 0x08, 0x10, 0x10, + 0x08, 0x08, 0x08, 0x10, + 0x08, 0x0C, 0x0F, 0x13, + 0x08, 0x0D, 0x11, 0x13, + 0x08, 0x0A, 0x11, 0x13, + 0x08, 0x0A, 0x0E, 0x13, + 0x08, 0x13, 0x13, 0x13, + 0x08, 0x08, 0x13, 0x13, + 0x08, 0x08, 0x08, 0x13, + 0x08, 0x0D, 0x11, 0x16, + 0x08, 0x0F, 0x13, 0x16, + 0x08, 0x0B, 0x13, 0x16, + 0x08, 0x0B, 0x0F, 0x16, + 0x08, 0x16, 0x16, 0x16, + 0x08, 0x08, 0x16, 0x16, + 0x08, 0x08, 0x08, 0x16, + 0x08, 0x0E, 0x13, 0x19, + 0x08, 0x10, 0x15, 0x19, + 0x08, 0x0C, 0x15, 0x19, + 0x08, 0x0C, 0x11, 0x19, + 0x08, 0x19, 0x19, 0x19, + 0x08, 0x08, 0x19, 0x19, + 0x08, 0x08, 0x08, 0x19, + 0x08, 0x0F, 0x15, 0x1C, + 0x08, 0x12, 0x17, 0x1C, + 0x08, 0x0D, 0x17, 0x1C, + 0x08, 0x0D, 0x12, 0x1C, + 0x08, 0x1C, 0x1C, 0x1C, + 0x08, 0x08, 0x1C, 0x1C, + 0x08, 0x08, 0x08, 0x1C, + 0x08, 0x13, 0x1A, 0x1F, + 0x08, 0x0D, 0x1A, 0x1F, + 0x08, 0x0D, 0x14, 0x1F, + 0x08, 0x1F, 0x1F, 0x1F, + 0x08, 0x08, 0x1F, 0x1F, + 0x08, 0x08, 0x08, 0x1F, + 0x08, 0x15, 0x1C, 0x22, + 0x08, 0x0E, 0x1C, 0x22, + 0x08, 0x0E, 0x15, 0x22, + 0x08, 0x22, 0x22, 0x22, + 0x08, 0x08, 0x22, 0x22, + 0x08, 0x08, 0x08, 0x22, + 0x08, 0x16, 0x1E, 0x25, + 0x08, 0x0F, 0x1E, 0x25, + 0x08, 0x0F, 0x17, 0x25, + 0x08, 0x25, 0x25, 0x25, + 0x08, 0x08, 0x25, 0x25, + 0x08, 0x08, 0x08, 0x25, + 0x08, 0x18, 0x20, 0x28, + 0x08, 0x10, 0x20, 0x28, + 0x08, 0x10, 0x18, 0x28, + 0x08, 0x28, 0x28, 0x28, + 0x08, 0x08, 0x28, 0x28, + 0x08, 0x08, 0x08, 0x28, + 0x08, 0x2B, 0x2B, 0x2B, + 0x08, 0x08, 0x2B, 0x2B, + 0x08, 0x08, 0x08, 0x2B, + 0x08, 0x1A, 0x23, 0x2C, + 0x08, 0x11, 0x23, 0x2C, + 0x08, 0x11, 0x1A, 0x2C, + 0x08, 0x30, 0x30, 0x30, + 0x08, 0x08, 0x30, 0x30, + 0x08, 0x08, 0x08, 0x30, + 0x08, 0x36, 0x36, 0x36, + 0x08, 0x08, 0x36, 0x36, + 0x08, 0x08, 0x08, 0x36, + 0x09, 0x0A, 0x0A, 0x0B, + 0x09, 0x0A, 0x0B, 0x0C, + 0x09, 0x0B, 0x0C, 0x0D, + 0x09, 0x0A, 0x0C, 0x0D, + 0x09, 0x0A, 0x0B, 0x0D, + 0x09, 0x0B, 0x0C, 0x0E, + 0x09, 0x0B, 0x0D, 0x0E, + 0x09, 0x0A, 0x0D, 0x0E, + 0x09, 0x0A, 0x0C, 0x0E, + 0x09, 0x0B, 0x0D, 0x0F, + 0x09, 0x0C, 0x0E, 0x0F, + 0x09, 0x0A, 0x0E, 0x0F, + 0x09, 0x0A, 0x0C, 0x0F, + 0x09, 0x0F, 0x0F, 0x0F, + 0x09, 0x09, 0x0F, 0x0F, + 0x09, 0x09, 0x09, 0x0F, + 0x09, 0x0C, 0x0D, 0x10, + 0x09, 0x0C, 0x0F, 0x10, + 0x09, 0x0A, 0x0F, 0x10, + 0x09, 0x0A, 0x0D, 0x10, + 0x09, 0x0C, 0x0E, 0x11, + 0x09, 0x0D, 0x0F, 0x11, + 0x09, 0x0B, 0x0F, 0x11, + 0x09, 0x0B, 0x0D, 0x11, + 0x09, 0x11, 0x11, 0x11, + 0x09, 0x09, 0x11, 0x11, + 0x09, 0x09, 0x09, 0x11, + 0x09, 0x0D, 0x10, 0x14, + 0x09, 0x0E, 0x12, 0x14, + 0x09, 0x0B, 0x12, 0x14, + 0x09, 0x0B, 0x0F, 0x14, + 0x09, 0x14, 0x14, 0x14, + 0x09, 0x09, 0x14, 0x14, + 0x09, 0x09, 0x09, 0x14, + 0x09, 0x0E, 0x12, 0x17, + 0x09, 0x10, 0x14, 0x17, + 0x09, 0x0C, 0x14, 0x17, + 0x09, 0x0C, 0x10, 0x17, + 0x09, 0x17, 0x17, 0x17, + 0x09, 0x09, 0x17, 0x17, + 0x09, 0x09, 0x09, 0x17, + 0x09, 0x0F, 0x14, 0x1A, + 0x09, 0x11, 0x16, 0x1A, + 0x09, 0x0D, 0x16, 0x1A, + 0x09, 0x0D, 0x12, 0x1A, + 0x09, 0x1A, 0x1A, 0x1A, + 0x09, 0x09, 0x1A, 0x1A, + 0x09, 0x09, 0x09, 0x1A, + 0x09, 0x10, 0x16, 0x1D, + 0x09, 0x13, 0x18, 0x1D, + 0x09, 0x0E, 0x18, 0x1D, + 0x09, 0x0E, 0x13, 0x1D, + 0x09, 0x1D, 0x1D, 0x1D, + 0x09, 0x09, 0x1D, 0x1D, + 0x09, 0x09, 0x09, 0x1D, + 0x09, 0x14, 0x1B, 0x20, + 0x09, 0x0E, 0x1B, 0x20, + 0x09, 0x0E, 0x15, 0x20, + 0x09, 0x20, 0x20, 0x20, + 0x09, 0x09, 0x20, 0x20, + 0x09, 0x09, 0x09, 0x20, + 0x09, 0x16, 0x1D, 0x23, + 0x09, 0x0F, 0x1D, 0x23, + 0x09, 0x0F, 0x16, 0x23, + 0x09, 0x23, 0x23, 0x23, + 0x09, 0x09, 0x23, 0x23, + 0x09, 0x09, 0x09, 0x23, + 0x09, 0x17, 0x1F, 0x26, + 0x09, 0x10, 0x1F, 0x26, + 0x09, 0x10, 0x18, 0x26, + 0x09, 0x26, 0x26, 0x26, + 0x09, 0x09, 0x26, 0x26, + 0x09, 0x09, 0x09, 0x26, + 0x09, 0x19, 0x21, 0x29, + 0x09, 0x11, 0x21, 0x29, + 0x09, 0x11, 0x19, 0x29, + 0x09, 0x29, 0x29, 0x29, + 0x09, 0x09, 0x29, 0x29, + 0x09, 0x09, 0x09, 0x29, + 0x09, 0x2C, 0x2C, 0x2C, + 0x09, 0x09, 0x2C, 0x2C, + 0x09, 0x09, 0x09, 0x2C, + 0x09, 0x1B, 0x24, 0x2D, + 0x09, 0x12, 0x24, 0x2D, + 0x09, 0x12, 0x1B, 0x2D, + 0x09, 0x31, 0x31, 0x31, + 0x09, 0x09, 0x31, 0x31, + 0x09, 0x09, 0x09, 0x31, + 0x09, 0x37, 0x37, 0x37, + 0x09, 0x09, 0x37, 0x37, + 0x09, 0x09, 0x09, 0x37, + 0x0A, 0x0B, 0x0B, 0x0C, + 0x0A, 0x0B, 0x0C, 0x0D, + 0x0A, 0x0C, 0x0D, 0x0E, + 0x0A, 0x0B, 0x0D, 0x0E, + 0x0A, 0x0B, 0x0C, 0x0E, + 0x0A, 0x0C, 0x0D, 0x0F, + 0x0A, 0x0C, 0x0E, 0x0F, + 0x0A, 0x0B, 0x0E, 0x0F, + 0x0A, 0x0B, 0x0D, 0x0F, + 0x0A, 0x0C, 0x0E, 0x10, + 0x0A, 0x0D, 0x0F, 0x10, + 0x0A, 0x0B, 0x0F, 0x10, + 0x0A, 0x0B, 0x0D, 0x10, + 0x0A, 0x10, 0x10, 0x10, + 0x0A, 0x0A, 0x10, 0x10, + 0x0A, 0x0A, 0x0A, 0x10, + 0x0A, 0x0D, 0x0E, 0x11, + 0x0A, 0x0D, 0x10, 0x11, + 0x0A, 0x0B, 0x10, 0x11, + 0x0A, 0x0B, 0x0E, 0x11, + 0x0A, 0x0D, 0x0F, 0x12, + 0x0A, 0x0E, 0x10, 0x12, + 0x0A, 0x0C, 0x10, 0x12, + 0x0A, 0x0C, 0x0E, 0x12, + 0x0A, 0x12, 0x12, 0x12, + 0x0A, 0x0A, 0x12, 0x12, + 0x0A, 0x0A, 0x0A, 0x12, + 0x0A, 0x0E, 0x11, 0x15, + 0x0A, 0x0F, 0x13, 0x15, + 0x0A, 0x0C, 0x13, 0x15, + 0x0A, 0x0C, 0x10, 0x15, + 0x0A, 0x15, 0x15, 0x15, + 0x0A, 0x0A, 0x15, 0x15, + 0x0A, 0x0A, 0x0A, 0x15, + 0x0A, 0x0F, 0x13, 0x18, + 0x0A, 0x11, 0x15, 0x18, + 0x0A, 0x0D, 0x15, 0x18, + 0x0A, 0x0D, 0x11, 0x18, + 0x0A, 0x18, 0x18, 0x18, + 0x0A, 0x0A, 0x18, 0x18, + 0x0A, 0x0A, 0x0A, 0x18, + 0x0A, 0x10, 0x15, 0x1B, + 0x0A, 0x12, 0x17, 0x1B, + 0x0A, 0x0E, 0x17, 0x1B, + 0x0A, 0x0E, 0x13, 0x1B, + 0x0A, 0x1B, 0x1B, 0x1B, + 0x0A, 0x0A, 0x1B, 0x1B, + 0x0A, 0x0A, 0x0A, 0x1B, + 0x0A, 0x11, 0x17, 0x1E, + 0x0A, 0x14, 0x19, 0x1E, + 0x0A, 0x0F, 0x19, 0x1E, + 0x0A, 0x0F, 0x14, 0x1E, + 0x0A, 0x1E, 0x1E, 0x1E, + 0x0A, 0x0A, 0x1E, 0x1E, + 0x0A, 0x0A, 0x0A, 0x1E, + 0x0A, 0x15, 0x1C, 0x21, + 0x0A, 0x0F, 0x1C, 0x21, + 0x0A, 0x0F, 0x16, 0x21, + 0x0A, 0x21, 0x21, 0x21, + 0x0A, 0x0A, 0x21, 0x21, + 0x0A, 0x0A, 0x0A, 0x21, + 0x0A, 0x17, 0x1E, 0x24, + 0x0A, 0x10, 0x1E, 0x24, + 0x0A, 0x10, 0x17, 0x24, + 0x0A, 0x24, 0x24, 0x24, + 0x0A, 0x0A, 0x24, 0x24, + 0x0A, 0x0A, 0x0A, 0x24, + 0x0A, 0x18, 0x20, 0x27, + 0x0A, 0x11, 0x20, 0x27, + 0x0A, 0x11, 0x19, 0x27, + 0x0A, 0x27, 0x27, 0x27, + 0x0A, 0x0A, 0x27, 0x27, + 0x0A, 0x0A, 0x0A, 0x27, + 0x0A, 0x1A, 0x22, 0x2A, + 0x0A, 0x12, 0x22, 0x2A, + 0x0A, 0x12, 0x1A, 0x2A, + 0x0A, 0x2A, 0x2A, 0x2A, + 0x0A, 0x0A, 0x2A, 0x2A, + 0x0A, 0x0A, 0x0A, 0x2A, + 0x0A, 0x2D, 0x2D, 0x2D, + 0x0A, 0x0A, 0x2D, 0x2D, + 0x0A, 0x0A, 0x0A, 0x2D, + 0x0A, 0x1C, 0x25, 0x2E, + 0x0A, 0x13, 0x25, 0x2E, + 0x0A, 0x13, 0x1C, 0x2E, + 0x0A, 0x32, 0x32, 0x32, + 0x0A, 0x0A, 0x32, 0x32, + 0x0A, 0x0A, 0x0A, 0x32, + 0x0A, 0x38, 0x38, 0x38, + 0x0A, 0x0A, 0x38, 0x38, + 0x0A, 0x0A, 0x0A, 0x38, + 0x0B, 0x0C, 0x0C, 0x0D, + 0x0B, 0x0C, 0x0D, 0x0E, + 0x0B, 0x0D, 0x0E, 0x0F, + 0x0B, 0x0C, 0x0E, 0x0F, + 0x0B, 0x0C, 0x0D, 0x0F, + 0x0B, 0x0D, 0x0E, 0x10, + 0x0B, 0x0D, 0x0F, 0x10, + 0x0B, 0x0C, 0x0F, 0x10, + 0x0B, 0x0C, 0x0E, 0x10, + 0x0B, 0x0D, 0x0F, 0x11, + 0x0B, 0x0E, 0x10, 0x11, + 0x0B, 0x0C, 0x10, 0x11, + 0x0B, 0x0C, 0x0E, 0x11, + 0x0B, 0x11, 0x11, 0x11, + 0x0B, 0x0B, 0x11, 0x11, + 0x0B, 0x0B, 0x0B, 0x11, + 0x0B, 0x0E, 0x0F, 0x12, + 0x0B, 0x0E, 0x11, 0x12, + 0x0B, 0x0C, 0x11, 0x12, + 0x0B, 0x0C, 0x0F, 0x12, + 0x0B, 0x0E, 0x10, 0x13, + 0x0B, 0x0F, 0x11, 0x13, + 0x0B, 0x0D, 0x11, 0x13, + 0x0B, 0x0D, 0x0F, 0x13, + 0x0B, 0x13, 0x13, 0x13, + 0x0B, 0x0B, 0x13, 0x13, + 0x0B, 0x0B, 0x0B, 0x13, + 0x0B, 0x0F, 0x12, 0x16, + 0x0B, 0x10, 0x14, 0x16, + 0x0B, 0x0D, 0x14, 0x16, + 0x0B, 0x0D, 0x11, 0x16, + 0x0B, 0x16, 0x16, 0x16, + 0x0B, 0x0B, 0x16, 0x16, + 0x0B, 0x0B, 0x0B, 0x16, + 0x0B, 0x10, 0x14, 0x19, + 0x0B, 0x12, 0x16, 0x19, + 0x0B, 0x0E, 0x16, 0x19, + 0x0B, 0x0E, 0x12, 0x19, + 0x0B, 0x19, 0x19, 0x19, + 0x0B, 0x0B, 0x19, 0x19, + 0x0B, 0x0B, 0x0B, 0x19, + 0x0B, 0x11, 0x16, 0x1C, + 0x0B, 0x13, 0x18, 0x1C, + 0x0B, 0x0F, 0x18, 0x1C, + 0x0B, 0x0F, 0x14, 0x1C, + 0x0B, 0x1C, 0x1C, 0x1C, + 0x0B, 0x0B, 0x1C, 0x1C, + 0x0B, 0x0B, 0x0B, 0x1C, + 0x0B, 0x12, 0x18, 0x1F, + 0x0B, 0x15, 0x1A, 0x1F, + 0x0B, 0x10, 0x1A, 0x1F, + 0x0B, 0x10, 0x15, 0x1F, + 0x0B, 0x1F, 0x1F, 0x1F, + 0x0B, 0x0B, 0x1F, 0x1F, + 0x0B, 0x0B, 0x0B, 0x1F, + 0x0B, 0x16, 0x1D, 0x22, + 0x0B, 0x10, 0x1D, 0x22, + 0x0B, 0x10, 0x17, 0x22, + 0x0B, 0x22, 0x22, 0x22, + 0x0B, 0x0B, 0x22, 0x22, + 0x0B, 0x0B, 0x0B, 0x22, + 0x0B, 0x18, 0x1F, 0x25, + 0x0B, 0x11, 0x1F, 0x25, + 0x0B, 0x11, 0x18, 0x25, + 0x0B, 0x25, 0x25, 0x25, + 0x0B, 0x0B, 0x25, 0x25, + 0x0B, 0x0B, 0x0B, 0x25, + 0x0B, 0x19, 0x21, 0x28, + 0x0B, 0x12, 0x21, 0x28, + 0x0B, 0x12, 0x1A, 0x28, + 0x0B, 0x28, 0x28, 0x28, + 0x0B, 0x0B, 0x28, 0x28, + 0x0B, 0x0B, 0x0B, 0x28, + 0x0B, 0x1B, 0x23, 0x2B, + 0x0B, 0x13, 0x23, 0x2B, + 0x0B, 0x13, 0x1B, 0x2B, + 0x0B, 0x2B, 0x2B, 0x2B, + 0x0B, 0x0B, 0x2B, 0x2B, + 0x0B, 0x0B, 0x0B, 0x2B, + 0x0B, 0x2E, 0x2E, 0x2E, + 0x0B, 0x0B, 0x2E, 0x2E, + 0x0B, 0x0B, 0x0B, 0x2E, + 0x0B, 0x1D, 0x26, 0x2F, + 0x0B, 0x14, 0x26, 0x2F, + 0x0B, 0x14, 0x1D, 0x2F, + 0x0B, 0x33, 0x33, 0x33, + 0x0B, 0x0B, 0x33, 0x33, + 0x0B, 0x0B, 0x0B, 0x33, + 0x0B, 0x39, 0x39, 0x39, + 0x0B, 0x0B, 0x39, 0x39, + 0x0B, 0x0B, 0x0B, 0x39, + 0x0C, 0x0D, 0x0D, 0x0E, + 0x0C, 0x0D, 0x0E, 0x0F, + 0x0C, 0x0E, 0x0F, 0x10, + 0x0C, 0x0D, 0x0F, 0x10, + 0x0C, 0x0D, 0x0E, 0x10, + 0x0C, 0x0E, 0x0F, 0x11, + 0x0C, 0x0E, 0x10, 0x11, + 0x0C, 0x0D, 0x10, 0x11, + 0x0C, 0x0D, 0x0F, 0x11, + 0x0C, 0x0E, 0x10, 0x12, + 0x0C, 0x0F, 0x11, 0x12, + 0x0C, 0x0D, 0x11, 0x12, + 0x0C, 0x0D, 0x0F, 0x12, + 0x0C, 0x12, 0x12, 0x12, + 0x0C, 0x0C, 0x12, 0x12, + 0x0C, 0x0C, 0x0C, 0x12, + 0x0C, 0x0F, 0x10, 0x13, + 0x0C, 0x0F, 0x12, 0x13, + 0x0C, 0x0D, 0x12, 0x13, + 0x0C, 0x0D, 0x10, 0x13, + 0x0C, 0x0F, 0x11, 0x14, + 0x0C, 0x10, 0x12, 0x14, + 0x0C, 0x0E, 0x12, 0x14, + 0x0C, 0x0E, 0x10, 0x14, + 0x0C, 0x14, 0x14, 0x14, + 0x0C, 0x0C, 0x14, 0x14, + 0x0C, 0x0C, 0x0C, 0x14, + 0x0C, 0x10, 0x13, 0x17, + 0x0C, 0x11, 0x15, 0x17, + 0x0C, 0x0E, 0x15, 0x17, + 0x0C, 0x0E, 0x12, 0x17, + 0x0C, 0x17, 0x17, 0x17, + 0x0C, 0x0C, 0x17, 0x17, + 0x0C, 0x0C, 0x0C, 0x17, + 0x0C, 0x11, 0x15, 0x1A, + 0x0C, 0x13, 0x17, 0x1A, + 0x0C, 0x0F, 0x17, 0x1A, + 0x0C, 0x0F, 0x13, 0x1A, + 0x0C, 0x1A, 0x1A, 0x1A, + 0x0C, 0x0C, 0x1A, 0x1A, + 0x0C, 0x0C, 0x0C, 0x1A, + 0x0C, 0x12, 0x17, 0x1D, + 0x0C, 0x14, 0x19, 0x1D, + 0x0C, 0x10, 0x19, 0x1D, + 0x0C, 0x10, 0x15, 0x1D, + 0x0C, 0x1D, 0x1D, 0x1D, + 0x0C, 0x0C, 0x1D, 0x1D, + 0x0C, 0x0C, 0x0C, 0x1D, + 0x0C, 0x13, 0x19, 0x20, + 0x0C, 0x16, 0x1B, 0x20, + 0x0C, 0x11, 0x1B, 0x20, + 0x0C, 0x11, 0x16, 0x20, + 0x0C, 0x20, 0x20, 0x20, + 0x0C, 0x0C, 0x20, 0x20, + 0x0C, 0x0C, 0x0C, 0x20, + 0x0C, 0x17, 0x1E, 0x23, + 0x0C, 0x11, 0x1E, 0x23, + 0x0C, 0x11, 0x18, 0x23, + 0x0C, 0x23, 0x23, 0x23, + 0x0C, 0x0C, 0x23, 0x23, + 0x0C, 0x0C, 0x0C, 0x23, + 0x0C, 0x19, 0x20, 0x26, + 0x0C, 0x12, 0x20, 0x26, + 0x0C, 0x12, 0x19, 0x26, + 0x0C, 0x26, 0x26, 0x26, + 0x0C, 0x0C, 0x26, 0x26, + 0x0C, 0x0C, 0x0C, 0x26, + 0x0C, 0x1A, 0x22, 0x29, + 0x0C, 0x13, 0x22, 0x29, + 0x0C, 0x13, 0x1B, 0x29, + 0x0C, 0x29, 0x29, 0x29, + 0x0C, 0x0C, 0x29, 0x29, + 0x0C, 0x0C, 0x0C, 0x29, + 0x0C, 0x1C, 0x24, 0x2C, + 0x0C, 0x14, 0x24, 0x2C, + 0x0C, 0x14, 0x1C, 0x2C, + 0x0C, 0x2C, 0x2C, 0x2C, + 0x0C, 0x0C, 0x2C, 0x2C, + 0x0C, 0x0C, 0x0C, 0x2C, + 0x0C, 0x2F, 0x2F, 0x2F, + 0x0C, 0x0C, 0x2F, 0x2F, + 0x0C, 0x0C, 0x0C, 0x2F, + 0x0C, 0x1E, 0x27, 0x30, + 0x0C, 0x15, 0x27, 0x30, + 0x0C, 0x15, 0x1E, 0x30, + 0x0C, 0x34, 0x34, 0x34, + 0x0C, 0x0C, 0x34, 0x34, + 0x0C, 0x0C, 0x0C, 0x34, + 0x0C, 0x3A, 0x3A, 0x3A, + 0x0C, 0x0C, 0x3A, 0x3A, + 0x0C, 0x0C, 0x0C, 0x3A, + 0x0D, 0x0E, 0x0E, 0x0F, + 0x0D, 0x0E, 0x0F, 0x10, + 0x0D, 0x0F, 0x10, 0x11, + 0x0D, 0x0E, 0x10, 0x11, + 0x0D, 0x0E, 0x0F, 0x11, + 0x0D, 0x0F, 0x10, 0x12, + 0x0D, 0x0F, 0x11, 0x12, + 0x0D, 0x0E, 0x11, 0x12, + 0x0D, 0x0E, 0x10, 0x12, + 0x0D, 0x0F, 0x11, 0x13, + 0x0D, 0x10, 0x12, 0x13, + 0x0D, 0x0E, 0x12, 0x13, + 0x0D, 0x0E, 0x10, 0x13, + 0x0D, 0x13, 0x13, 0x13, + 0x0D, 0x0D, 0x13, 0x13, + 0x0D, 0x0D, 0x0D, 0x13, + 0x0D, 0x10, 0x11, 0x14, + 0x0D, 0x10, 0x13, 0x14, + 0x0D, 0x0E, 0x13, 0x14, + 0x0D, 0x0E, 0x11, 0x14, + 0x0D, 0x10, 0x12, 0x15, + 0x0D, 0x11, 0x13, 0x15, + 0x0D, 0x0F, 0x13, 0x15, + 0x0D, 0x0F, 0x11, 0x15, + 0x0D, 0x15, 0x15, 0x15, + 0x0D, 0x0D, 0x15, 0x15, + 0x0D, 0x0D, 0x0D, 0x15, + 0x0D, 0x11, 0x14, 0x18, + 0x0D, 0x12, 0x16, 0x18, + 0x0D, 0x0F, 0x16, 0x18, + 0x0D, 0x0F, 0x13, 0x18, + 0x0D, 0x18, 0x18, 0x18, + 0x0D, 0x0D, 0x18, 0x18, + 0x0D, 0x0D, 0x0D, 0x18, + 0x0D, 0x12, 0x16, 0x1B, + 0x0D, 0x14, 0x18, 0x1B, + 0x0D, 0x10, 0x18, 0x1B, + 0x0D, 0x10, 0x14, 0x1B, + 0x0D, 0x1B, 0x1B, 0x1B, + 0x0D, 0x0D, 0x1B, 0x1B, + 0x0D, 0x0D, 0x0D, 0x1B, + 0x0D, 0x13, 0x18, 0x1E, + 0x0D, 0x15, 0x1A, 0x1E, + 0x0D, 0x11, 0x1A, 0x1E, + 0x0D, 0x11, 0x16, 0x1E, + 0x0D, 0x1E, 0x1E, 0x1E, + 0x0D, 0x0D, 0x1E, 0x1E, + 0x0D, 0x0D, 0x0D, 0x1E, + 0x0D, 0x14, 0x1A, 0x21, + 0x0D, 0x17, 0x1C, 0x21, + 0x0D, 0x12, 0x1C, 0x21, + 0x0D, 0x12, 0x17, 0x21, + 0x0D, 0x21, 0x21, 0x21, + 0x0D, 0x0D, 0x21, 0x21, + 0x0D, 0x0D, 0x0D, 0x21, + 0x0D, 0x18, 0x1F, 0x24, + 0x0D, 0x12, 0x1F, 0x24, + 0x0D, 0x12, 0x19, 0x24, + 0x0D, 0x24, 0x24, 0x24, + 0x0D, 0x0D, 0x24, 0x24, + 0x0D, 0x0D, 0x0D, 0x24, + 0x0D, 0x1A, 0x21, 0x27, + 0x0D, 0x13, 0x21, 0x27, + 0x0D, 0x13, 0x1A, 0x27, + 0x0D, 0x27, 0x27, 0x27, + 0x0D, 0x0D, 0x27, 0x27, + 0x0D, 0x0D, 0x0D, 0x27, + 0x0D, 0x1B, 0x23, 0x2A, + 0x0D, 0x14, 0x23, 0x2A, + 0x0D, 0x14, 0x1C, 0x2A, + 0x0D, 0x2A, 0x2A, 0x2A, + 0x0D, 0x0D, 0x2A, 0x2A, + 0x0D, 0x0D, 0x0D, 0x2A, + 0x0D, 0x1D, 0x25, 0x2D, + 0x0D, 0x15, 0x25, 0x2D, + 0x0D, 0x15, 0x1D, 0x2D, + 0x0D, 0x2D, 0x2D, 0x2D, + 0x0D, 0x0D, 0x2D, 0x2D, + 0x0D, 0x0D, 0x0D, 0x2D, + 0x0D, 0x30, 0x30, 0x30, + 0x0D, 0x0D, 0x30, 0x30, + 0x0D, 0x0D, 0x0D, 0x30, + 0x0D, 0x1F, 0x28, 0x31, + 0x0D, 0x16, 0x28, 0x31, + 0x0D, 0x16, 0x1F, 0x31, + 0x0D, 0x35, 0x35, 0x35, + 0x0D, 0x0D, 0x35, 0x35, + 0x0D, 0x0D, 0x0D, 0x35, + 0x0D, 0x3B, 0x3B, 0x3B, + 0x0D, 0x0D, 0x3B, 0x3B, + 0x0D, 0x0D, 0x0D, 0x3B, + 0x0E, 0x0F, 0x0F, 0x10, + 0x0E, 0x0F, 0x10, 0x11, + 0x0E, 0x10, 0x11, 0x12, + 0x0E, 0x0F, 0x11, 0x12, + 0x0E, 0x0F, 0x10, 0x12, + 0x0E, 0x10, 0x11, 0x13, + 0x0E, 0x10, 0x12, 0x13, + 0x0E, 0x0F, 0x12, 0x13, + 0x0E, 0x0F, 0x11, 0x13, + 0x0E, 0x10, 0x12, 0x14, + 0x0E, 0x11, 0x13, 0x14, + 0x0E, 0x0F, 0x13, 0x14, + 0x0E, 0x0F, 0x11, 0x14, + 0x0E, 0x14, 0x14, 0x14, + 0x0E, 0x0E, 0x14, 0x14, + 0x0E, 0x0E, 0x0E, 0x14, + 0x0E, 0x11, 0x12, 0x15, + 0x0E, 0x11, 0x14, 0x15, + 0x0E, 0x0F, 0x14, 0x15, + 0x0E, 0x0F, 0x12, 0x15, + 0x0E, 0x11, 0x13, 0x16, + 0x0E, 0x12, 0x14, 0x16, + 0x0E, 0x10, 0x14, 0x16, + 0x0E, 0x10, 0x12, 0x16, + 0x0E, 0x16, 0x16, 0x16, + 0x0E, 0x0E, 0x16, 0x16, + 0x0E, 0x0E, 0x0E, 0x16, + 0x0E, 0x12, 0x15, 0x19, + 0x0E, 0x13, 0x17, 0x19, + 0x0E, 0x10, 0x17, 0x19, + 0x0E, 0x10, 0x14, 0x19, + 0x0E, 0x19, 0x19, 0x19, + 0x0E, 0x0E, 0x19, 0x19, + 0x0E, 0x0E, 0x0E, 0x19, + 0x0E, 0x13, 0x17, 0x1C, + 0x0E, 0x15, 0x19, 0x1C, + 0x0E, 0x11, 0x19, 0x1C, + 0x0E, 0x11, 0x15, 0x1C, + 0x0E, 0x1C, 0x1C, 0x1C, + 0x0E, 0x0E, 0x1C, 0x1C, + 0x0E, 0x0E, 0x0E, 0x1C, + 0x0E, 0x14, 0x19, 0x1F, + 0x0E, 0x16, 0x1B, 0x1F, + 0x0E, 0x12, 0x1B, 0x1F, + 0x0E, 0x12, 0x17, 0x1F, + 0x0E, 0x1F, 0x1F, 0x1F, + 0x0E, 0x0E, 0x1F, 0x1F, + 0x0E, 0x0E, 0x0E, 0x1F, + 0x0E, 0x15, 0x1B, 0x22, + 0x0E, 0x18, 0x1D, 0x22, + 0x0E, 0x13, 0x1D, 0x22, + 0x0E, 0x13, 0x18, 0x22, + 0x0E, 0x22, 0x22, 0x22, + 0x0E, 0x0E, 0x22, 0x22, + 0x0E, 0x0E, 0x0E, 0x22, + 0x0E, 0x19, 0x20, 0x25, + 0x0E, 0x13, 0x20, 0x25, + 0x0E, 0x13, 0x1A, 0x25, + 0x0E, 0x25, 0x25, 0x25, + 0x0E, 0x0E, 0x25, 0x25, + 0x0E, 0x0E, 0x0E, 0x25, + 0x0E, 0x1B, 0x22, 0x28, + 0x0E, 0x14, 0x22, 0x28, + 0x0E, 0x14, 0x1B, 0x28, + 0x0E, 0x28, 0x28, 0x28, + 0x0E, 0x0E, 0x28, 0x28, + 0x0E, 0x0E, 0x0E, 0x28, + 0x0E, 0x1C, 0x24, 0x2B, + 0x0E, 0x15, 0x24, 0x2B, + 0x0E, 0x15, 0x1D, 0x2B, + 0x0E, 0x2B, 0x2B, 0x2B, + 0x0E, 0x0E, 0x2B, 0x2B, + 0x0E, 0x0E, 0x0E, 0x2B, + 0x0E, 0x1E, 0x26, 0x2E, + 0x0E, 0x16, 0x26, 0x2E, + 0x0E, 0x16, 0x1E, 0x2E, + 0x0E, 0x2E, 0x2E, 0x2E, + 0x0E, 0x0E, 0x2E, 0x2E, + 0x0E, 0x0E, 0x0E, 0x2E, + 0x0E, 0x31, 0x31, 0x31, + 0x0E, 0x0E, 0x31, 0x31, + 0x0E, 0x0E, 0x0E, 0x31, + 0x0E, 0x20, 0x29, 0x32, + 0x0E, 0x17, 0x29, 0x32, + 0x0E, 0x17, 0x20, 0x32, + 0x0E, 0x36, 0x36, 0x36, + 0x0E, 0x0E, 0x36, 0x36, + 0x0E, 0x0E, 0x0E, 0x36, + 0x0E, 0x3C, 0x3C, 0x3C, + 0x0E, 0x0E, 0x3C, 0x3C, + 0x0E, 0x0E, 0x0E, 0x3C, + 0x0F, 0x10, 0x10, 0x11, + 0x0F, 0x10, 0x11, 0x12, + 0x0F, 0x11, 0x12, 0x13, + 0x0F, 0x10, 0x12, 0x13, + 0x0F, 0x10, 0x11, 0x13, + 0x0F, 0x11, 0x12, 0x14, + 0x0F, 0x11, 0x13, 0x14, + 0x0F, 0x10, 0x13, 0x14, + 0x0F, 0x10, 0x12, 0x14, + 0x0F, 0x11, 0x13, 0x15, + 0x0F, 0x12, 0x14, 0x15, + 0x0F, 0x10, 0x14, 0x15, + 0x0F, 0x10, 0x12, 0x15, + 0x0F, 0x15, 0x15, 0x15, + 0x0F, 0x0F, 0x15, 0x15, + 0x0F, 0x0F, 0x0F, 0x15, + 0x0F, 0x12, 0x13, 0x16, + 0x0F, 0x12, 0x15, 0x16, + 0x0F, 0x10, 0x15, 0x16, + 0x0F, 0x10, 0x13, 0x16, + 0x0F, 0x12, 0x14, 0x17, + 0x0F, 0x13, 0x15, 0x17, + 0x0F, 0x11, 0x15, 0x17, + 0x0F, 0x11, 0x13, 0x17, + 0x0F, 0x17, 0x17, 0x17, + 0x0F, 0x0F, 0x17, 0x17, + 0x0F, 0x0F, 0x0F, 0x17, + 0x0F, 0x13, 0x16, 0x1A, + 0x0F, 0x14, 0x18, 0x1A, + 0x0F, 0x11, 0x18, 0x1A, + 0x0F, 0x11, 0x15, 0x1A, + 0x0F, 0x1A, 0x1A, 0x1A, + 0x0F, 0x0F, 0x1A, 0x1A, + 0x0F, 0x0F, 0x0F, 0x1A, + 0x0F, 0x14, 0x18, 0x1D, + 0x0F, 0x16, 0x1A, 0x1D, + 0x0F, 0x12, 0x1A, 0x1D, + 0x0F, 0x12, 0x16, 0x1D, + 0x0F, 0x1D, 0x1D, 0x1D, + 0x0F, 0x0F, 0x1D, 0x1D, + 0x0F, 0x0F, 0x0F, 0x1D, + 0x0F, 0x15, 0x1A, 0x20, + 0x0F, 0x17, 0x1C, 0x20, + 0x0F, 0x13, 0x1C, 0x20, + 0x0F, 0x13, 0x18, 0x20, + 0x0F, 0x20, 0x20, 0x20, + 0x0F, 0x0F, 0x20, 0x20, + 0x0F, 0x0F, 0x0F, 0x20, + 0x0F, 0x16, 0x1C, 0x23, + 0x0F, 0x19, 0x1E, 0x23, + 0x0F, 0x14, 0x1E, 0x23, + 0x0F, 0x14, 0x19, 0x23, + 0x0F, 0x23, 0x23, 0x23, + 0x0F, 0x0F, 0x23, 0x23, + 0x0F, 0x0F, 0x0F, 0x23, + 0x0F, 0x1A, 0x21, 0x26, + 0x0F, 0x14, 0x21, 0x26, + 0x0F, 0x14, 0x1B, 0x26, + 0x0F, 0x26, 0x26, 0x26, + 0x0F, 0x0F, 0x26, 0x26, + 0x0F, 0x0F, 0x0F, 0x26, + 0x0F, 0x1C, 0x23, 0x29, + 0x0F, 0x15, 0x23, 0x29, + 0x0F, 0x15, 0x1C, 0x29, + 0x0F, 0x29, 0x29, 0x29, + 0x0F, 0x0F, 0x29, 0x29, + 0x0F, 0x0F, 0x0F, 0x29, + 0x0F, 0x1D, 0x25, 0x2C, + 0x0F, 0x16, 0x25, 0x2C, + 0x0F, 0x16, 0x1E, 0x2C, + 0x0F, 0x2C, 0x2C, 0x2C, + 0x0F, 0x0F, 0x2C, 0x2C, + 0x0F, 0x0F, 0x0F, 0x2C, + 0x0F, 0x1F, 0x27, 0x2F, + 0x0F, 0x17, 0x27, 0x2F, + 0x0F, 0x17, 0x1F, 0x2F, + 0x0F, 0x2F, 0x2F, 0x2F, + 0x0F, 0x0F, 0x2F, 0x2F, + 0x0F, 0x0F, 0x0F, 0x2F, + 0x0F, 0x32, 0x32, 0x32, + 0x0F, 0x0F, 0x32, 0x32, + 0x0F, 0x0F, 0x0F, 0x32, + 0x0F, 0x21, 0x2A, 0x33, + 0x0F, 0x18, 0x2A, 0x33, + 0x0F, 0x18, 0x21, 0x33, + 0x0F, 0x37, 0x37, 0x37, + 0x0F, 0x0F, 0x37, 0x37, + 0x0F, 0x0F, 0x0F, 0x37, + 0x0F, 0x3D, 0x3D, 0x3D, + 0x0F, 0x0F, 0x3D, 0x3D, + 0x0F, 0x0F, 0x0F, 0x3D, + 0x10, 0x11, 0x11, 0x12, + 0x10, 0x11, 0x12, 0x13, + 0x10, 0x12, 0x13, 0x14, + 0x10, 0x11, 0x13, 0x14, + 0x10, 0x11, 0x12, 0x14, + 0x10, 0x12, 0x13, 0x15, + 0x10, 0x12, 0x14, 0x15, + 0x10, 0x11, 0x14, 0x15, + 0x10, 0x11, 0x13, 0x15, + 0x10, 0x12, 0x14, 0x16, + 0x10, 0x13, 0x15, 0x16, + 0x10, 0x11, 0x15, 0x16, + 0x10, 0x11, 0x13, 0x16, + 0x10, 0x16, 0x16, 0x16, + 0x10, 0x10, 0x16, 0x16, + 0x10, 0x10, 0x10, 0x16, + 0x10, 0x13, 0x14, 0x17, + 0x10, 0x13, 0x16, 0x17, + 0x10, 0x11, 0x16, 0x17, + 0x10, 0x11, 0x14, 0x17, + 0x10, 0x13, 0x15, 0x18, + 0x10, 0x14, 0x16, 0x18, + 0x10, 0x12, 0x16, 0x18, + 0x10, 0x12, 0x14, 0x18, + 0x10, 0x18, 0x18, 0x18, + 0x10, 0x10, 0x18, 0x18, + 0x10, 0x10, 0x10, 0x18, + 0x10, 0x14, 0x17, 0x1B, + 0x10, 0x15, 0x19, 0x1B, + 0x10, 0x12, 0x19, 0x1B, + 0x10, 0x12, 0x16, 0x1B, + 0x10, 0x1B, 0x1B, 0x1B, + 0x10, 0x10, 0x1B, 0x1B, + 0x10, 0x10, 0x10, 0x1B, + 0x10, 0x15, 0x19, 0x1E, + 0x10, 0x17, 0x1B, 0x1E, + 0x10, 0x13, 0x1B, 0x1E, + 0x10, 0x13, 0x17, 0x1E, + 0x10, 0x1E, 0x1E, 0x1E, + 0x10, 0x10, 0x1E, 0x1E, + 0x10, 0x10, 0x10, 0x1E, + 0x10, 0x16, 0x1B, 0x21, + 0x10, 0x18, 0x1D, 0x21, + 0x10, 0x14, 0x1D, 0x21, + 0x10, 0x14, 0x19, 0x21, + 0x10, 0x21, 0x21, 0x21, + 0x10, 0x10, 0x21, 0x21, + 0x10, 0x10, 0x10, 0x21, + 0x10, 0x17, 0x1D, 0x24, + 0x10, 0x1A, 0x1F, 0x24, + 0x10, 0x15, 0x1F, 0x24, + 0x10, 0x15, 0x1A, 0x24, + 0x10, 0x24, 0x24, 0x24, + 0x10, 0x10, 0x24, 0x24, + 0x10, 0x10, 0x10, 0x24, + 0x10, 0x1B, 0x22, 0x27, + 0x10, 0x15, 0x22, 0x27, + 0x10, 0x15, 0x1C, 0x27, + 0x10, 0x27, 0x27, 0x27, + 0x10, 0x10, 0x27, 0x27, + 0x10, 0x10, 0x10, 0x27, + 0x10, 0x1D, 0x24, 0x2A, + 0x10, 0x16, 0x24, 0x2A, + 0x10, 0x16, 0x1D, 0x2A, + 0x10, 0x2A, 0x2A, 0x2A, + 0x10, 0x10, 0x2A, 0x2A, + 0x10, 0x10, 0x10, 0x2A, + 0x10, 0x1E, 0x26, 0x2D, + 0x10, 0x17, 0x26, 0x2D, + 0x10, 0x17, 0x1F, 0x2D, + 0x10, 0x2D, 0x2D, 0x2D, + 0x10, 0x10, 0x2D, 0x2D, + 0x10, 0x10, 0x10, 0x2D, + 0x10, 0x20, 0x28, 0x30, + 0x10, 0x18, 0x28, 0x30, + 0x10, 0x18, 0x20, 0x30, + 0x10, 0x30, 0x30, 0x30, + 0x10, 0x10, 0x30, 0x30, + 0x10, 0x10, 0x10, 0x30, + 0x10, 0x33, 0x33, 0x33, + 0x10, 0x10, 0x33, 0x33, + 0x10, 0x10, 0x10, 0x33, + 0x10, 0x22, 0x2B, 0x34, + 0x10, 0x19, 0x2B, 0x34, + 0x10, 0x19, 0x22, 0x34, + 0x10, 0x38, 0x38, 0x38, + 0x10, 0x10, 0x38, 0x38, + 0x10, 0x10, 0x10, 0x38, + 0x10, 0x3E, 0x3E, 0x3E, + 0x10, 0x10, 0x3E, 0x3E, + 0x10, 0x10, 0x10, 0x3E, + 0x11, 0x12, 0x12, 0x13, + 0x11, 0x12, 0x13, 0x14, + 0x11, 0x13, 0x14, 0x15, + 0x11, 0x12, 0x14, 0x15, + 0x11, 0x12, 0x13, 0x15, + 0x11, 0x13, 0x14, 0x16, + 0x11, 0x13, 0x15, 0x16, + 0x11, 0x12, 0x15, 0x16, + 0x11, 0x12, 0x14, 0x16, + 0x11, 0x13, 0x15, 0x17, + 0x11, 0x14, 0x16, 0x17, + 0x11, 0x12, 0x16, 0x17, + 0x11, 0x12, 0x14, 0x17, + 0x11, 0x17, 0x17, 0x17, + 0x11, 0x11, 0x17, 0x17, + 0x11, 0x11, 0x11, 0x17, + 0x11, 0x14, 0x15, 0x18, + 0x11, 0x14, 0x17, 0x18, + 0x11, 0x12, 0x17, 0x18, + 0x11, 0x12, 0x15, 0x18, + 0x11, 0x14, 0x16, 0x19, + 0x11, 0x15, 0x17, 0x19, + 0x11, 0x13, 0x17, 0x19, + 0x11, 0x13, 0x15, 0x19, + 0x11, 0x19, 0x19, 0x19, + 0x11, 0x11, 0x19, 0x19, + 0x11, 0x11, 0x11, 0x19, + 0x11, 0x15, 0x18, 0x1C, + 0x11, 0x16, 0x1A, 0x1C, + 0x11, 0x13, 0x1A, 0x1C, + 0x11, 0x13, 0x17, 0x1C, + 0x11, 0x1C, 0x1C, 0x1C, + 0x11, 0x11, 0x1C, 0x1C, + 0x11, 0x11, 0x11, 0x1C, + 0x11, 0x16, 0x1A, 0x1F, + 0x11, 0x18, 0x1C, 0x1F, + 0x11, 0x14, 0x1C, 0x1F, + 0x11, 0x14, 0x18, 0x1F, + 0x11, 0x1F, 0x1F, 0x1F, + 0x11, 0x11, 0x1F, 0x1F, + 0x11, 0x11, 0x11, 0x1F, + 0x11, 0x17, 0x1C, 0x22, + 0x11, 0x19, 0x1E, 0x22, + 0x11, 0x15, 0x1E, 0x22, + 0x11, 0x15, 0x1A, 0x22, + 0x11, 0x22, 0x22, 0x22, + 0x11, 0x11, 0x22, 0x22, + 0x11, 0x11, 0x11, 0x22, + 0x11, 0x18, 0x1E, 0x25, + 0x11, 0x1B, 0x20, 0x25, + 0x11, 0x16, 0x20, 0x25, + 0x11, 0x16, 0x1B, 0x25, + 0x11, 0x25, 0x25, 0x25, + 0x11, 0x11, 0x25, 0x25, + 0x11, 0x11, 0x11, 0x25, + 0x11, 0x1C, 0x23, 0x28, + 0x11, 0x16, 0x23, 0x28, + 0x11, 0x16, 0x1D, 0x28, + 0x11, 0x28, 0x28, 0x28, + 0x11, 0x11, 0x28, 0x28, + 0x11, 0x11, 0x11, 0x28, + 0x11, 0x1E, 0x25, 0x2B, + 0x11, 0x17, 0x25, 0x2B, + 0x11, 0x17, 0x1E, 0x2B, + 0x11, 0x2B, 0x2B, 0x2B, + 0x11, 0x11, 0x2B, 0x2B, + 0x11, 0x11, 0x11, 0x2B, + 0x11, 0x1F, 0x27, 0x2E, + 0x11, 0x18, 0x27, 0x2E, + 0x11, 0x18, 0x20, 0x2E, + 0x11, 0x2E, 0x2E, 0x2E, + 0x11, 0x11, 0x2E, 0x2E, + 0x11, 0x11, 0x11, 0x2E, + 0x11, 0x21, 0x29, 0x31, + 0x11, 0x19, 0x29, 0x31, + 0x11, 0x19, 0x21, 0x31, + 0x11, 0x31, 0x31, 0x31, + 0x11, 0x11, 0x31, 0x31, + 0x11, 0x11, 0x11, 0x31, + 0x11, 0x34, 0x34, 0x34, + 0x11, 0x11, 0x34, 0x34, + 0x11, 0x11, 0x11, 0x34, + 0x11, 0x23, 0x2C, 0x35, + 0x11, 0x1A, 0x2C, 0x35, + 0x11, 0x1A, 0x23, 0x35, + 0x11, 0x39, 0x39, 0x39, + 0x11, 0x11, 0x39, 0x39, + 0x11, 0x11, 0x11, 0x39, + 0x11, 0x3F, 0x3F, 0x3F, + 0x11, 0x11, 0x3F, 0x3F, + 0x11, 0x11, 0x11, 0x3F, + 0x12, 0x13, 0x13, 0x14, + 0x12, 0x13, 0x14, 0x15, + 0x12, 0x14, 0x15, 0x16, + 0x12, 0x13, 0x15, 0x16, + 0x12, 0x13, 0x14, 0x16, + 0x12, 0x14, 0x15, 0x17, + 0x12, 0x14, 0x16, 0x17, + 0x12, 0x13, 0x16, 0x17, + 0x12, 0x13, 0x15, 0x17, + 0x12, 0x14, 0x16, 0x18, + 0x12, 0x15, 0x17, 0x18, + 0x12, 0x13, 0x17, 0x18, + 0x12, 0x13, 0x15, 0x18, + 0x12, 0x18, 0x18, 0x18, + 0x12, 0x12, 0x18, 0x18, + 0x12, 0x12, 0x12, 0x18, + 0x12, 0x15, 0x16, 0x19, + 0x12, 0x15, 0x18, 0x19, + 0x12, 0x13, 0x18, 0x19, + 0x12, 0x13, 0x16, 0x19, + 0x12, 0x15, 0x17, 0x1A, + 0x12, 0x16, 0x18, 0x1A, + 0x12, 0x14, 0x18, 0x1A, + 0x12, 0x14, 0x16, 0x1A, + 0x12, 0x1A, 0x1A, 0x1A, + 0x12, 0x12, 0x1A, 0x1A, + 0x12, 0x12, 0x12, 0x1A, + 0x12, 0x16, 0x19, 0x1D, + 0x12, 0x17, 0x1B, 0x1D, + 0x12, 0x14, 0x1B, 0x1D, + 0x12, 0x14, 0x18, 0x1D, + 0x12, 0x1D, 0x1D, 0x1D, + 0x12, 0x12, 0x1D, 0x1D, + 0x12, 0x12, 0x12, 0x1D, + 0x12, 0x17, 0x1B, 0x20, + 0x12, 0x19, 0x1D, 0x20, + 0x12, 0x15, 0x1D, 0x20, + 0x12, 0x15, 0x19, 0x20, + 0x12, 0x20, 0x20, 0x20, + 0x12, 0x12, 0x20, 0x20, + 0x12, 0x12, 0x12, 0x20, + 0x12, 0x18, 0x1D, 0x23, + 0x12, 0x1A, 0x1F, 0x23, + 0x12, 0x16, 0x1F, 0x23, + 0x12, 0x16, 0x1B, 0x23, + 0x12, 0x23, 0x23, 0x23, + 0x12, 0x12, 0x23, 0x23, + 0x12, 0x12, 0x12, 0x23, + 0x12, 0x19, 0x1F, 0x26, + 0x12, 0x1C, 0x21, 0x26, + 0x12, 0x17, 0x21, 0x26, + 0x12, 0x17, 0x1C, 0x26, + 0x12, 0x26, 0x26, 0x26, + 0x12, 0x12, 0x26, 0x26, + 0x12, 0x12, 0x12, 0x26, + 0x12, 0x1D, 0x24, 0x29, + 0x12, 0x17, 0x24, 0x29, + 0x12, 0x17, 0x1E, 0x29, + 0x12, 0x29, 0x29, 0x29, + 0x12, 0x12, 0x29, 0x29, + 0x12, 0x12, 0x12, 0x29, + 0x12, 0x1F, 0x26, 0x2C, + 0x12, 0x18, 0x26, 0x2C, + 0x12, 0x18, 0x1F, 0x2C, + 0x12, 0x2C, 0x2C, 0x2C, + 0x12, 0x12, 0x2C, 0x2C, + 0x12, 0x12, 0x12, 0x2C, + 0x12, 0x20, 0x28, 0x2F, + 0x12, 0x19, 0x28, 0x2F, + 0x12, 0x19, 0x21, 0x2F, + 0x12, 0x2F, 0x2F, 0x2F, + 0x12, 0x12, 0x2F, 0x2F, + 0x12, 0x12, 0x12, 0x2F, + 0x12, 0x22, 0x2A, 0x32, + 0x12, 0x1A, 0x2A, 0x32, + 0x12, 0x1A, 0x22, 0x32, + 0x12, 0x32, 0x32, 0x32, + 0x12, 0x12, 0x32, 0x32, + 0x12, 0x12, 0x12, 0x32, + 0x12, 0x35, 0x35, 0x35, + 0x12, 0x12, 0x35, 0x35, + 0x12, 0x12, 0x12, 0x35, + 0x12, 0x24, 0x2D, 0x36, + 0x12, 0x1B, 0x2D, 0x36, + 0x12, 0x1B, 0x24, 0x36, + 0x12, 0x3A, 0x3A, 0x3A, + 0x12, 0x12, 0x3A, 0x3A, + 0x12, 0x12, 0x12, 0x3A, + 0x13, 0x14, 0x14, 0x15, + 0x13, 0x14, 0x15, 0x16, + 0x13, 0x15, 0x16, 0x17, + 0x13, 0x14, 0x16, 0x17, + 0x13, 0x14, 0x15, 0x17, + 0x13, 0x15, 0x16, 0x18, + 0x13, 0x15, 0x17, 0x18, + 0x13, 0x14, 0x17, 0x18, + 0x13, 0x14, 0x16, 0x18, + 0x13, 0x15, 0x17, 0x19, + 0x13, 0x16, 0x18, 0x19, + 0x13, 0x14, 0x18, 0x19, + 0x13, 0x14, 0x16, 0x19, + 0x13, 0x19, 0x19, 0x19, + 0x13, 0x13, 0x19, 0x19, + 0x13, 0x13, 0x13, 0x19, + 0x13, 0x16, 0x17, 0x1A, + 0x13, 0x16, 0x19, 0x1A, + 0x13, 0x14, 0x19, 0x1A, + 0x13, 0x14, 0x17, 0x1A, + 0x13, 0x16, 0x18, 0x1B, + 0x13, 0x17, 0x19, 0x1B, + 0x13, 0x15, 0x19, 0x1B, + 0x13, 0x15, 0x17, 0x1B, + 0x13, 0x1B, 0x1B, 0x1B, + 0x13, 0x13, 0x1B, 0x1B, + 0x13, 0x13, 0x13, 0x1B, + 0x13, 0x17, 0x1A, 0x1E, + 0x13, 0x18, 0x1C, 0x1E, + 0x13, 0x15, 0x1C, 0x1E, + 0x13, 0x15, 0x19, 0x1E, + 0x13, 0x1E, 0x1E, 0x1E, + 0x13, 0x13, 0x1E, 0x1E, + 0x13, 0x13, 0x13, 0x1E, + 0x13, 0x18, 0x1C, 0x21, + 0x13, 0x1A, 0x1E, 0x21, + 0x13, 0x16, 0x1E, 0x21, + 0x13, 0x16, 0x1A, 0x21, + 0x13, 0x21, 0x21, 0x21, + 0x13, 0x13, 0x21, 0x21, + 0x13, 0x13, 0x13, 0x21, + 0x13, 0x19, 0x1E, 0x24, + 0x13, 0x1B, 0x20, 0x24, + 0x13, 0x17, 0x20, 0x24, + 0x13, 0x17, 0x1C, 0x24, + 0x13, 0x24, 0x24, 0x24, + 0x13, 0x13, 0x24, 0x24, + 0x13, 0x13, 0x13, 0x24, + 0x13, 0x1A, 0x20, 0x27, + 0x13, 0x1D, 0x22, 0x27, + 0x13, 0x18, 0x22, 0x27, + 0x13, 0x18, 0x1D, 0x27, + 0x13, 0x27, 0x27, 0x27, + 0x13, 0x13, 0x27, 0x27, + 0x13, 0x13, 0x13, 0x27, + 0x13, 0x1E, 0x25, 0x2A, + 0x13, 0x18, 0x25, 0x2A, + 0x13, 0x18, 0x1F, 0x2A, + 0x13, 0x2A, 0x2A, 0x2A, + 0x13, 0x13, 0x2A, 0x2A, + 0x13, 0x13, 0x13, 0x2A, + 0x13, 0x20, 0x27, 0x2D, + 0x13, 0x19, 0x27, 0x2D, + 0x13, 0x19, 0x20, 0x2D, + 0x13, 0x2D, 0x2D, 0x2D, + 0x13, 0x13, 0x2D, 0x2D, + 0x13, 0x13, 0x13, 0x2D, + 0x13, 0x21, 0x29, 0x30, + 0x13, 0x1A, 0x29, 0x30, + 0x13, 0x1A, 0x22, 0x30, + 0x13, 0x30, 0x30, 0x30, + 0x13, 0x13, 0x30, 0x30, + 0x13, 0x13, 0x13, 0x30, + 0x13, 0x23, 0x2B, 0x33, + 0x13, 0x1B, 0x2B, 0x33, + 0x13, 0x1B, 0x23, 0x33, + 0x13, 0x33, 0x33, 0x33, + 0x13, 0x13, 0x33, 0x33, + 0x13, 0x13, 0x13, 0x33, + 0x13, 0x36, 0x36, 0x36, + 0x13, 0x13, 0x36, 0x36, + 0x13, 0x13, 0x13, 0x36, + 0x13, 0x25, 0x2E, 0x37, + 0x13, 0x1C, 0x2E, 0x37, + 0x13, 0x1C, 0x25, 0x37, + 0x13, 0x3B, 0x3B, 0x3B, + 0x13, 0x13, 0x3B, 0x3B, + 0x13, 0x13, 0x13, 0x3B, + 0x14, 0x15, 0x15, 0x16, + 0x14, 0x15, 0x16, 0x17, + 0x14, 0x16, 0x17, 0x18, + 0x14, 0x15, 0x17, 0x18, + 0x14, 0x15, 0x16, 0x18, + 0x14, 0x16, 0x17, 0x19, + 0x14, 0x16, 0x18, 0x19, + 0x14, 0x15, 0x18, 0x19, + 0x14, 0x15, 0x17, 0x19, + 0x14, 0x16, 0x18, 0x1A, + 0x14, 0x17, 0x19, 0x1A, + 0x14, 0x15, 0x19, 0x1A, + 0x14, 0x15, 0x17, 0x1A, + 0x14, 0x1A, 0x1A, 0x1A, + 0x14, 0x14, 0x1A, 0x1A, + 0x14, 0x14, 0x14, 0x1A, + 0x14, 0x17, 0x18, 0x1B, + 0x14, 0x17, 0x1A, 0x1B, + 0x14, 0x15, 0x1A, 0x1B, + 0x14, 0x15, 0x18, 0x1B, + 0x14, 0x17, 0x19, 0x1C, + 0x14, 0x18, 0x1A, 0x1C, + 0x14, 0x16, 0x1A, 0x1C, + 0x14, 0x16, 0x18, 0x1C, + 0x14, 0x1C, 0x1C, 0x1C, + 0x14, 0x14, 0x1C, 0x1C, + 0x14, 0x14, 0x14, 0x1C, + 0x14, 0x18, 0x1B, 0x1F, + 0x14, 0x19, 0x1D, 0x1F, + 0x14, 0x16, 0x1D, 0x1F, + 0x14, 0x16, 0x1A, 0x1F, + 0x14, 0x1F, 0x1F, 0x1F, + 0x14, 0x14, 0x1F, 0x1F, + 0x14, 0x14, 0x14, 0x1F, + 0x14, 0x19, 0x1D, 0x22, + 0x14, 0x1B, 0x1F, 0x22, + 0x14, 0x17, 0x1F, 0x22, + 0x14, 0x17, 0x1B, 0x22, + 0x14, 0x22, 0x22, 0x22, + 0x14, 0x14, 0x22, 0x22, + 0x14, 0x14, 0x14, 0x22, + 0x14, 0x1A, 0x1F, 0x25, + 0x14, 0x1C, 0x21, 0x25, + 0x14, 0x18, 0x21, 0x25, + 0x14, 0x18, 0x1D, 0x25, + 0x14, 0x25, 0x25, 0x25, + 0x14, 0x14, 0x25, 0x25, + 0x14, 0x14, 0x14, 0x25, + 0x14, 0x1B, 0x21, 0x28, + 0x14, 0x1E, 0x23, 0x28, + 0x14, 0x19, 0x23, 0x28, + 0x14, 0x19, 0x1E, 0x28, + 0x14, 0x28, 0x28, 0x28, + 0x14, 0x14, 0x28, 0x28, + 0x14, 0x14, 0x14, 0x28, + 0x14, 0x1F, 0x26, 0x2B, + 0x14, 0x19, 0x26, 0x2B, + 0x14, 0x19, 0x20, 0x2B, + 0x14, 0x2B, 0x2B, 0x2B, + 0x14, 0x14, 0x2B, 0x2B, + 0x14, 0x14, 0x14, 0x2B, + 0x14, 0x21, 0x28, 0x2E, + 0x14, 0x1A, 0x28, 0x2E, + 0x14, 0x1A, 0x21, 0x2E, + 0x14, 0x2E, 0x2E, 0x2E, + 0x14, 0x14, 0x2E, 0x2E, + 0x14, 0x14, 0x14, 0x2E, + 0x14, 0x22, 0x2A, 0x31, + 0x14, 0x1B, 0x2A, 0x31, + 0x14, 0x1B, 0x23, 0x31, + 0x14, 0x31, 0x31, 0x31, + 0x14, 0x14, 0x31, 0x31, + 0x14, 0x14, 0x14, 0x31, + 0x14, 0x24, 0x2C, 0x34, + 0x14, 0x1C, 0x2C, 0x34, + 0x14, 0x1C, 0x24, 0x34, + 0x14, 0x34, 0x34, 0x34, + 0x14, 0x14, 0x34, 0x34, + 0x14, 0x14, 0x14, 0x34, + 0x14, 0x37, 0x37, 0x37, + 0x14, 0x14, 0x37, 0x37, + 0x14, 0x14, 0x14, 0x37, + 0x14, 0x26, 0x2F, 0x38, + 0x14, 0x1D, 0x2F, 0x38, + 0x14, 0x1D, 0x26, 0x38, + 0x14, 0x3C, 0x3C, 0x3C, + 0x14, 0x14, 0x3C, 0x3C, + 0x14, 0x14, 0x14, 0x3C, + 0x15, 0x16, 0x16, 0x17, + 0x15, 0x16, 0x17, 0x18, + 0x15, 0x17, 0x18, 0x19, + 0x15, 0x16, 0x18, 0x19, + 0x15, 0x16, 0x17, 0x19, + 0x15, 0x17, 0x18, 0x1A, + 0x15, 0x17, 0x19, 0x1A, + 0x15, 0x16, 0x19, 0x1A, + 0x15, 0x16, 0x18, 0x1A, + 0x15, 0x17, 0x19, 0x1B, + 0x15, 0x18, 0x1A, 0x1B, + 0x15, 0x16, 0x1A, 0x1B, + 0x15, 0x16, 0x18, 0x1B, + 0x15, 0x1B, 0x1B, 0x1B, + 0x15, 0x15, 0x1B, 0x1B, + 0x15, 0x15, 0x15, 0x1B, + 0x15, 0x18, 0x19, 0x1C, + 0x15, 0x18, 0x1B, 0x1C, + 0x15, 0x16, 0x1B, 0x1C, + 0x15, 0x16, 0x19, 0x1C, + 0x15, 0x18, 0x1A, 0x1D, + 0x15, 0x19, 0x1B, 0x1D, + 0x15, 0x17, 0x1B, 0x1D, + 0x15, 0x17, 0x19, 0x1D, + 0x15, 0x1D, 0x1D, 0x1D, + 0x15, 0x15, 0x1D, 0x1D, + 0x15, 0x15, 0x15, 0x1D, + 0x15, 0x19, 0x1C, 0x20, + 0x15, 0x1A, 0x1E, 0x20, + 0x15, 0x17, 0x1E, 0x20, + 0x15, 0x17, 0x1B, 0x20, + 0x15, 0x20, 0x20, 0x20, + 0x15, 0x15, 0x20, 0x20, + 0x15, 0x15, 0x15, 0x20, + 0x15, 0x1A, 0x1E, 0x23, + 0x15, 0x1C, 0x20, 0x23, + 0x15, 0x18, 0x20, 0x23, + 0x15, 0x18, 0x1C, 0x23, + 0x15, 0x23, 0x23, 0x23, + 0x15, 0x15, 0x23, 0x23, + 0x15, 0x15, 0x15, 0x23, + 0x15, 0x1B, 0x20, 0x26, + 0x15, 0x1D, 0x22, 0x26, + 0x15, 0x19, 0x22, 0x26, + 0x15, 0x19, 0x1E, 0x26, + 0x15, 0x26, 0x26, 0x26, + 0x15, 0x15, 0x26, 0x26, + 0x15, 0x15, 0x15, 0x26, + 0x15, 0x1C, 0x22, 0x29, + 0x15, 0x1F, 0x24, 0x29, + 0x15, 0x1A, 0x24, 0x29, + 0x15, 0x1A, 0x1F, 0x29, + 0x15, 0x29, 0x29, 0x29, + 0x15, 0x15, 0x29, 0x29, + 0x15, 0x15, 0x15, 0x29, + 0x15, 0x20, 0x27, 0x2C, + 0x15, 0x1A, 0x27, 0x2C, + 0x15, 0x1A, 0x21, 0x2C, + 0x15, 0x2C, 0x2C, 0x2C, + 0x15, 0x15, 0x2C, 0x2C, + 0x15, 0x15, 0x15, 0x2C, + 0x15, 0x22, 0x29, 0x2F, + 0x15, 0x1B, 0x29, 0x2F, + 0x15, 0x1B, 0x22, 0x2F, + 0x15, 0x2F, 0x2F, 0x2F, + 0x15, 0x15, 0x2F, 0x2F, + 0x15, 0x15, 0x15, 0x2F, + 0x15, 0x23, 0x2B, 0x32, + 0x15, 0x1C, 0x2B, 0x32, + 0x15, 0x1C, 0x24, 0x32, + 0x15, 0x32, 0x32, 0x32, + 0x15, 0x15, 0x32, 0x32, + 0x15, 0x15, 0x15, 0x32, + 0x15, 0x25, 0x2D, 0x35, + 0x15, 0x1D, 0x2D, 0x35, + 0x15, 0x1D, 0x25, 0x35, + 0x15, 0x35, 0x35, 0x35, + 0x15, 0x15, 0x35, 0x35, + 0x15, 0x15, 0x15, 0x35, + 0x15, 0x38, 0x38, 0x38, + 0x15, 0x15, 0x38, 0x38, + 0x15, 0x15, 0x15, 0x38, + 0x15, 0x27, 0x30, 0x39, + 0x15, 0x1E, 0x30, 0x39, + 0x15, 0x1E, 0x27, 0x39, + 0x15, 0x3D, 0x3D, 0x3D, + 0x15, 0x15, 0x3D, 0x3D, + 0x15, 0x15, 0x15, 0x3D, + 0x16, 0x17, 0x17, 0x18, + 0x16, 0x17, 0x18, 0x19, + 0x16, 0x18, 0x19, 0x1A, + 0x16, 0x17, 0x19, 0x1A, + 0x16, 0x17, 0x18, 0x1A, + 0x16, 0x18, 0x19, 0x1B, + 0x16, 0x18, 0x1A, 0x1B, + 0x16, 0x17, 0x1A, 0x1B, + 0x16, 0x17, 0x19, 0x1B, + 0x16, 0x18, 0x1A, 0x1C, + 0x16, 0x19, 0x1B, 0x1C, + 0x16, 0x17, 0x1B, 0x1C, + 0x16, 0x17, 0x19, 0x1C, + 0x16, 0x1C, 0x1C, 0x1C, + 0x16, 0x16, 0x1C, 0x1C, + 0x16, 0x16, 0x16, 0x1C, + 0x16, 0x19, 0x1A, 0x1D, + 0x16, 0x19, 0x1C, 0x1D, + 0x16, 0x17, 0x1C, 0x1D, + 0x16, 0x17, 0x1A, 0x1D, + 0x16, 0x19, 0x1B, 0x1E, + 0x16, 0x1A, 0x1C, 0x1E, + 0x16, 0x18, 0x1C, 0x1E, + 0x16, 0x18, 0x1A, 0x1E, + 0x16, 0x1E, 0x1E, 0x1E, + 0x16, 0x16, 0x1E, 0x1E, + 0x16, 0x16, 0x16, 0x1E, + 0x16, 0x1A, 0x1D, 0x21, + 0x16, 0x1B, 0x1F, 0x21, + 0x16, 0x18, 0x1F, 0x21, + 0x16, 0x18, 0x1C, 0x21, + 0x16, 0x21, 0x21, 0x21, + 0x16, 0x16, 0x21, 0x21, + 0x16, 0x16, 0x16, 0x21, + 0x16, 0x1B, 0x1F, 0x24, + 0x16, 0x1D, 0x21, 0x24, + 0x16, 0x19, 0x21, 0x24, + 0x16, 0x19, 0x1D, 0x24, + 0x16, 0x24, 0x24, 0x24, + 0x16, 0x16, 0x24, 0x24, + 0x16, 0x16, 0x16, 0x24, + 0x16, 0x1C, 0x21, 0x27, + 0x16, 0x1E, 0x23, 0x27, + 0x16, 0x1A, 0x23, 0x27, + 0x16, 0x1A, 0x1F, 0x27, + 0x16, 0x27, 0x27, 0x27, + 0x16, 0x16, 0x27, 0x27, + 0x16, 0x16, 0x16, 0x27, + 0x16, 0x1D, 0x23, 0x2A, + 0x16, 0x20, 0x25, 0x2A, + 0x16, 0x1B, 0x25, 0x2A, + 0x16, 0x1B, 0x20, 0x2A, + 0x16, 0x2A, 0x2A, 0x2A, + 0x16, 0x16, 0x2A, 0x2A, + 0x16, 0x16, 0x16, 0x2A, + 0x16, 0x21, 0x28, 0x2D, + 0x16, 0x1B, 0x28, 0x2D, + 0x16, 0x1B, 0x22, 0x2D, + 0x16, 0x2D, 0x2D, 0x2D, + 0x16, 0x16, 0x2D, 0x2D, + 0x16, 0x16, 0x16, 0x2D, + 0x16, 0x23, 0x2A, 0x30, + 0x16, 0x1C, 0x2A, 0x30, + 0x16, 0x1C, 0x23, 0x30, + 0x16, 0x30, 0x30, 0x30, + 0x16, 0x16, 0x30, 0x30, + 0x16, 0x16, 0x16, 0x30, + 0x16, 0x24, 0x2C, 0x33, + 0x16, 0x1D, 0x2C, 0x33, + 0x16, 0x1D, 0x25, 0x33, + 0x16, 0x33, 0x33, 0x33, + 0x16, 0x16, 0x33, 0x33, + 0x16, 0x16, 0x16, 0x33, + 0x16, 0x26, 0x2E, 0x36, + 0x16, 0x1E, 0x2E, 0x36, + 0x16, 0x1E, 0x26, 0x36, + 0x16, 0x36, 0x36, 0x36, + 0x16, 0x16, 0x36, 0x36, + 0x16, 0x16, 0x16, 0x36, + 0x16, 0x39, 0x39, 0x39, + 0x16, 0x16, 0x39, 0x39, + 0x16, 0x16, 0x16, 0x39, + 0x16, 0x28, 0x31, 0x3A, + 0x16, 0x1F, 0x31, 0x3A, + 0x16, 0x1F, 0x28, 0x3A, + 0x16, 0x3E, 0x3E, 0x3E, + 0x16, 0x16, 0x3E, 0x3E, + 0x16, 0x16, 0x16, 0x3E, + 0x17, 0x18, 0x18, 0x19, + 0x17, 0x18, 0x19, 0x1A, + 0x17, 0x19, 0x1A, 0x1B, + 0x17, 0x18, 0x1A, 0x1B, + 0x17, 0x18, 0x19, 0x1B, + 0x17, 0x19, 0x1A, 0x1C, + 0x17, 0x19, 0x1B, 0x1C, + 0x17, 0x18, 0x1B, 0x1C, + 0x17, 0x18, 0x1A, 0x1C, + 0x17, 0x19, 0x1B, 0x1D, + 0x17, 0x1A, 0x1C, 0x1D, + 0x17, 0x18, 0x1C, 0x1D, + 0x17, 0x18, 0x1A, 0x1D, + 0x17, 0x1D, 0x1D, 0x1D, + 0x17, 0x17, 0x1D, 0x1D, + 0x17, 0x17, 0x17, 0x1D, + 0x17, 0x1A, 0x1B, 0x1E, + 0x17, 0x1A, 0x1D, 0x1E, + 0x17, 0x18, 0x1D, 0x1E, + 0x17, 0x18, 0x1B, 0x1E, + 0x17, 0x1A, 0x1C, 0x1F, + 0x17, 0x1B, 0x1D, 0x1F, + 0x17, 0x19, 0x1D, 0x1F, + 0x17, 0x19, 0x1B, 0x1F, + 0x17, 0x1F, 0x1F, 0x1F, + 0x17, 0x17, 0x1F, 0x1F, + 0x17, 0x17, 0x17, 0x1F, + 0x17, 0x1B, 0x1E, 0x22, + 0x17, 0x1C, 0x20, 0x22, + 0x17, 0x19, 0x20, 0x22, + 0x17, 0x19, 0x1D, 0x22, + 0x17, 0x22, 0x22, 0x22, + 0x17, 0x17, 0x22, 0x22, + 0x17, 0x17, 0x17, 0x22, + 0x17, 0x1C, 0x20, 0x25, + 0x17, 0x1E, 0x22, 0x25, + 0x17, 0x1A, 0x22, 0x25, + 0x17, 0x1A, 0x1E, 0x25, + 0x17, 0x25, 0x25, 0x25, + 0x17, 0x17, 0x25, 0x25, + 0x17, 0x17, 0x17, 0x25, + 0x17, 0x1D, 0x22, 0x28, + 0x17, 0x1F, 0x24, 0x28, + 0x17, 0x1B, 0x24, 0x28, + 0x17, 0x1B, 0x20, 0x28, + 0x17, 0x28, 0x28, 0x28, + 0x17, 0x17, 0x28, 0x28, + 0x17, 0x17, 0x17, 0x28, + 0x17, 0x1E, 0x24, 0x2B, + 0x17, 0x21, 0x26, 0x2B, + 0x17, 0x1C, 0x26, 0x2B, + 0x17, 0x1C, 0x21, 0x2B, + 0x17, 0x2B, 0x2B, 0x2B, + 0x17, 0x17, 0x2B, 0x2B, + 0x17, 0x17, 0x17, 0x2B, + 0x17, 0x22, 0x29, 0x2E, + 0x17, 0x1C, 0x29, 0x2E, + 0x17, 0x1C, 0x23, 0x2E, + 0x17, 0x2E, 0x2E, 0x2E, + 0x17, 0x17, 0x2E, 0x2E, + 0x17, 0x17, 0x17, 0x2E, + 0x17, 0x24, 0x2B, 0x31, + 0x17, 0x1D, 0x2B, 0x31, + 0x17, 0x1D, 0x24, 0x31, + 0x17, 0x31, 0x31, 0x31, + 0x17, 0x17, 0x31, 0x31, + 0x17, 0x17, 0x17, 0x31, + 0x17, 0x25, 0x2D, 0x34, + 0x17, 0x1E, 0x2D, 0x34, + 0x17, 0x1E, 0x26, 0x34, + 0x17, 0x34, 0x34, 0x34, + 0x17, 0x17, 0x34, 0x34, + 0x17, 0x17, 0x17, 0x34, + 0x17, 0x27, 0x2F, 0x37, + 0x17, 0x1F, 0x2F, 0x37, + 0x17, 0x1F, 0x27, 0x37, + 0x17, 0x37, 0x37, 0x37, + 0x17, 0x17, 0x37, 0x37, + 0x17, 0x17, 0x17, 0x37, + 0x17, 0x3A, 0x3A, 0x3A, + 0x17, 0x17, 0x3A, 0x3A, + 0x17, 0x17, 0x17, 0x3A, + 0x17, 0x29, 0x32, 0x3B, + 0x17, 0x20, 0x32, 0x3B, + 0x17, 0x20, 0x29, 0x3B, + 0x17, 0x3F, 0x3F, 0x3F, + 0x17, 0x17, 0x3F, 0x3F, + 0x17, 0x17, 0x17, 0x3F, + 0x18, 0x19, 0x19, 0x1A, + 0x18, 0x19, 0x1A, 0x1B, + 0x18, 0x1A, 0x1B, 0x1C, + 0x18, 0x19, 0x1B, 0x1C, + 0x18, 0x19, 0x1A, 0x1C, + 0x18, 0x1A, 0x1B, 0x1D, + 0x18, 0x1A, 0x1C, 0x1D, + 0x18, 0x19, 0x1C, 0x1D, + 0x18, 0x19, 0x1B, 0x1D, + 0x18, 0x1A, 0x1C, 0x1E, + 0x18, 0x1B, 0x1D, 0x1E, + 0x18, 0x19, 0x1D, 0x1E, + 0x18, 0x19, 0x1B, 0x1E, + 0x18, 0x1E, 0x1E, 0x1E, + 0x18, 0x18, 0x1E, 0x1E, + 0x18, 0x18, 0x18, 0x1E, + 0x18, 0x1B, 0x1C, 0x1F, + 0x18, 0x1B, 0x1E, 0x1F, + 0x18, 0x19, 0x1E, 0x1F, + 0x18, 0x19, 0x1C, 0x1F, + 0x18, 0x1B, 0x1D, 0x20, + 0x18, 0x1C, 0x1E, 0x20, + 0x18, 0x1A, 0x1E, 0x20, + 0x18, 0x1A, 0x1C, 0x20, + 0x18, 0x20, 0x20, 0x20, + 0x18, 0x18, 0x20, 0x20, + 0x18, 0x18, 0x18, 0x20, + 0x18, 0x1C, 0x1F, 0x23, + 0x18, 0x1D, 0x21, 0x23, + 0x18, 0x1A, 0x21, 0x23, + 0x18, 0x1A, 0x1E, 0x23, + 0x18, 0x23, 0x23, 0x23, + 0x18, 0x18, 0x23, 0x23, + 0x18, 0x18, 0x18, 0x23, + 0x18, 0x1D, 0x21, 0x26, + 0x18, 0x1F, 0x23, 0x26, + 0x18, 0x1B, 0x23, 0x26, + 0x18, 0x1B, 0x1F, 0x26, + 0x18, 0x26, 0x26, 0x26, + 0x18, 0x18, 0x26, 0x26, + 0x18, 0x18, 0x18, 0x26, + 0x18, 0x1E, 0x23, 0x29, + 0x18, 0x20, 0x25, 0x29, + 0x18, 0x1C, 0x25, 0x29, + 0x18, 0x1C, 0x21, 0x29, + 0x18, 0x29, 0x29, 0x29, + 0x18, 0x18, 0x29, 0x29, + 0x18, 0x18, 0x18, 0x29, + 0x18, 0x1F, 0x25, 0x2C, + 0x18, 0x22, 0x27, 0x2C, + 0x18, 0x1D, 0x27, 0x2C, + 0x18, 0x1D, 0x22, 0x2C, + 0x18, 0x2C, 0x2C, 0x2C, + 0x18, 0x18, 0x2C, 0x2C, + 0x18, 0x18, 0x18, 0x2C, + 0x18, 0x23, 0x2A, 0x2F, + 0x18, 0x1D, 0x2A, 0x2F, + 0x18, 0x1D, 0x24, 0x2F, + 0x18, 0x2F, 0x2F, 0x2F, + 0x18, 0x18, 0x2F, 0x2F, + 0x18, 0x18, 0x18, 0x2F, + 0x18, 0x25, 0x2C, 0x32, + 0x18, 0x1E, 0x2C, 0x32, + 0x18, 0x1E, 0x25, 0x32, + 0x18, 0x32, 0x32, 0x32, + 0x18, 0x18, 0x32, 0x32, + 0x18, 0x18, 0x18, 0x32, + 0x18, 0x26, 0x2E, 0x35, + 0x18, 0x1F, 0x2E, 0x35, + 0x18, 0x1F, 0x27, 0x35, + 0x18, 0x35, 0x35, 0x35, + 0x18, 0x18, 0x35, 0x35, + 0x18, 0x18, 0x18, 0x35, + 0x18, 0x28, 0x30, 0x38, + 0x18, 0x20, 0x30, 0x38, + 0x18, 0x20, 0x28, 0x38, + 0x18, 0x38, 0x38, 0x38, + 0x18, 0x18, 0x38, 0x38, + 0x18, 0x18, 0x18, 0x38, + 0x18, 0x3B, 0x3B, 0x3B, + 0x18, 0x18, 0x3B, 0x3B, + 0x18, 0x18, 0x18, 0x3B, + 0x18, 0x2A, 0x33, 0x3C, + 0x18, 0x21, 0x33, 0x3C, + 0x18, 0x21, 0x2A, 0x3C, + 0x19, 0x1A, 0x1A, 0x1B, + 0x19, 0x1A, 0x1B, 0x1C, + 0x19, 0x1B, 0x1C, 0x1D, + 0x19, 0x1A, 0x1C, 0x1D, + 0x19, 0x1A, 0x1B, 0x1D, + 0x19, 0x1B, 0x1C, 0x1E, + 0x19, 0x1B, 0x1D, 0x1E, + 0x19, 0x1A, 0x1D, 0x1E, + 0x19, 0x1A, 0x1C, 0x1E, + 0x19, 0x1B, 0x1D, 0x1F, + 0x19, 0x1C, 0x1E, 0x1F, + 0x19, 0x1A, 0x1E, 0x1F, + 0x19, 0x1A, 0x1C, 0x1F, + 0x19, 0x1F, 0x1F, 0x1F, + 0x19, 0x19, 0x1F, 0x1F, + 0x19, 0x19, 0x19, 0x1F, + 0x19, 0x1C, 0x1D, 0x20, + 0x19, 0x1C, 0x1F, 0x20, + 0x19, 0x1A, 0x1F, 0x20, + 0x19, 0x1A, 0x1D, 0x20, + 0x19, 0x1C, 0x1E, 0x21, + 0x19, 0x1D, 0x1F, 0x21, + 0x19, 0x1B, 0x1F, 0x21, + 0x19, 0x1B, 0x1D, 0x21, + 0x19, 0x21, 0x21, 0x21, + 0x19, 0x19, 0x21, 0x21, + 0x19, 0x19, 0x19, 0x21, + 0x19, 0x1D, 0x20, 0x24, + 0x19, 0x1E, 0x22, 0x24, + 0x19, 0x1B, 0x22, 0x24, + 0x19, 0x1B, 0x1F, 0x24, + 0x19, 0x24, 0x24, 0x24, + 0x19, 0x19, 0x24, 0x24, + 0x19, 0x19, 0x19, 0x24, + 0x19, 0x1E, 0x22, 0x27, + 0x19, 0x20, 0x24, 0x27, + 0x19, 0x1C, 0x24, 0x27, + 0x19, 0x1C, 0x20, 0x27, + 0x19, 0x27, 0x27, 0x27, + 0x19, 0x19, 0x27, 0x27, + 0x19, 0x19, 0x19, 0x27, + 0x19, 0x1F, 0x24, 0x2A, + 0x19, 0x21, 0x26, 0x2A, + 0x19, 0x1D, 0x26, 0x2A, + 0x19, 0x1D, 0x22, 0x2A, + 0x19, 0x2A, 0x2A, 0x2A, + 0x19, 0x19, 0x2A, 0x2A, + 0x19, 0x19, 0x19, 0x2A, + 0x19, 0x20, 0x26, 0x2D, + 0x19, 0x23, 0x28, 0x2D, + 0x19, 0x1E, 0x28, 0x2D, + 0x19, 0x1E, 0x23, 0x2D, + 0x19, 0x2D, 0x2D, 0x2D, + 0x19, 0x19, 0x2D, 0x2D, + 0x19, 0x19, 0x19, 0x2D, + 0x19, 0x24, 0x2B, 0x30, + 0x19, 0x1E, 0x2B, 0x30, + 0x19, 0x1E, 0x25, 0x30, + 0x19, 0x30, 0x30, 0x30, + 0x19, 0x19, 0x30, 0x30, + 0x19, 0x19, 0x19, 0x30, + 0x19, 0x26, 0x2D, 0x33, + 0x19, 0x1F, 0x2D, 0x33, + 0x19, 0x1F, 0x26, 0x33, + 0x19, 0x33, 0x33, 0x33, + 0x19, 0x19, 0x33, 0x33, + 0x19, 0x19, 0x19, 0x33, + 0x19, 0x27, 0x2F, 0x36, + 0x19, 0x20, 0x2F, 0x36, + 0x19, 0x20, 0x28, 0x36, + 0x19, 0x36, 0x36, 0x36, + 0x19, 0x19, 0x36, 0x36, + 0x19, 0x19, 0x19, 0x36, + 0x19, 0x29, 0x31, 0x39, + 0x19, 0x21, 0x31, 0x39, + 0x19, 0x21, 0x29, 0x39, + 0x19, 0x39, 0x39, 0x39, + 0x19, 0x19, 0x39, 0x39, + 0x19, 0x19, 0x19, 0x39, + 0x19, 0x3C, 0x3C, 0x3C, + 0x19, 0x19, 0x3C, 0x3C, + 0x19, 0x19, 0x19, 0x3C, + 0x19, 0x2B, 0x34, 0x3D, + 0x19, 0x22, 0x34, 0x3D, + 0x19, 0x22, 0x2B, 0x3D, + 0x1A, 0x1B, 0x1B, 0x1C, + 0x1A, 0x1B, 0x1C, 0x1D, + 0x1A, 0x1C, 0x1D, 0x1E, + 0x1A, 0x1B, 0x1D, 0x1E, + 0x1A, 0x1B, 0x1C, 0x1E, + 0x1A, 0x1C, 0x1D, 0x1F, + 0x1A, 0x1C, 0x1E, 0x1F, + 0x1A, 0x1B, 0x1E, 0x1F, + 0x1A, 0x1B, 0x1D, 0x1F, + 0x1A, 0x1C, 0x1E, 0x20, + 0x1A, 0x1D, 0x1F, 0x20, + 0x1A, 0x1B, 0x1F, 0x20, + 0x1A, 0x1B, 0x1D, 0x20, + 0x1A, 0x20, 0x20, 0x20, + 0x1A, 0x1A, 0x20, 0x20, + 0x1A, 0x1A, 0x1A, 0x20, + 0x1A, 0x1D, 0x1E, 0x21, + 0x1A, 0x1D, 0x20, 0x21, + 0x1A, 0x1B, 0x20, 0x21, + 0x1A, 0x1B, 0x1E, 0x21, + 0x1A, 0x1D, 0x1F, 0x22, + 0x1A, 0x1E, 0x20, 0x22, + 0x1A, 0x1C, 0x20, 0x22, + 0x1A, 0x1C, 0x1E, 0x22, + 0x1A, 0x22, 0x22, 0x22, + 0x1A, 0x1A, 0x22, 0x22, + 0x1A, 0x1A, 0x1A, 0x22, + 0x1A, 0x1E, 0x21, 0x25, + 0x1A, 0x1F, 0x23, 0x25, + 0x1A, 0x1C, 0x23, 0x25, + 0x1A, 0x1C, 0x20, 0x25, + 0x1A, 0x25, 0x25, 0x25, + 0x1A, 0x1A, 0x25, 0x25, + 0x1A, 0x1A, 0x1A, 0x25, + 0x1A, 0x1F, 0x23, 0x28, + 0x1A, 0x21, 0x25, 0x28, + 0x1A, 0x1D, 0x25, 0x28, + 0x1A, 0x1D, 0x21, 0x28, + 0x1A, 0x28, 0x28, 0x28, + 0x1A, 0x1A, 0x28, 0x28, + 0x1A, 0x1A, 0x1A, 0x28, + 0x1A, 0x20, 0x25, 0x2B, + 0x1A, 0x22, 0x27, 0x2B, + 0x1A, 0x1E, 0x27, 0x2B, + 0x1A, 0x1E, 0x23, 0x2B, + 0x1A, 0x2B, 0x2B, 0x2B, + 0x1A, 0x1A, 0x2B, 0x2B, + 0x1A, 0x1A, 0x1A, 0x2B, + 0x1A, 0x21, 0x27, 0x2E, + 0x1A, 0x24, 0x29, 0x2E, + 0x1A, 0x1F, 0x29, 0x2E, + 0x1A, 0x1F, 0x24, 0x2E, + 0x1A, 0x2E, 0x2E, 0x2E, + 0x1A, 0x1A, 0x2E, 0x2E, + 0x1A, 0x1A, 0x1A, 0x2E, + 0x1A, 0x25, 0x2C, 0x31, + 0x1A, 0x1F, 0x2C, 0x31, + 0x1A, 0x1F, 0x26, 0x31, + 0x1A, 0x31, 0x31, 0x31, + 0x1A, 0x1A, 0x31, 0x31, + 0x1A, 0x1A, 0x1A, 0x31, + 0x1A, 0x27, 0x2E, 0x34, + 0x1A, 0x20, 0x2E, 0x34, + 0x1A, 0x20, 0x27, 0x34, + 0x1A, 0x34, 0x34, 0x34, + 0x1A, 0x1A, 0x34, 0x34, + 0x1A, 0x1A, 0x1A, 0x34, + 0x1A, 0x28, 0x30, 0x37, + 0x1A, 0x21, 0x30, 0x37, + 0x1A, 0x21, 0x29, 0x37, + 0x1A, 0x37, 0x37, 0x37, + 0x1A, 0x1A, 0x37, 0x37, + 0x1A, 0x1A, 0x1A, 0x37, + 0x1A, 0x2A, 0x32, 0x3A, + 0x1A, 0x22, 0x32, 0x3A, + 0x1A, 0x22, 0x2A, 0x3A, + 0x1A, 0x3A, 0x3A, 0x3A, + 0x1A, 0x1A, 0x3A, 0x3A, + 0x1A, 0x1A, 0x1A, 0x3A, + 0x1A, 0x3D, 0x3D, 0x3D, + 0x1A, 0x1A, 0x3D, 0x3D, + 0x1A, 0x1A, 0x1A, 0x3D, + 0x1A, 0x2C, 0x35, 0x3E, + 0x1A, 0x23, 0x35, 0x3E, + 0x1A, 0x23, 0x2C, 0x3E, + 0x1B, 0x1C, 0x1C, 0x1D, + 0x1B, 0x1C, 0x1D, 0x1E, + 0x1B, 0x1D, 0x1E, 0x1F, + 0x1B, 0x1C, 0x1E, 0x1F, + 0x1B, 0x1C, 0x1D, 0x1F, + 0x1B, 0x1D, 0x1E, 0x20, + 0x1B, 0x1D, 0x1F, 0x20, + 0x1B, 0x1C, 0x1F, 0x20, + 0x1B, 0x1C, 0x1E, 0x20, + 0x1B, 0x1D, 0x1F, 0x21, + 0x1B, 0x1E, 0x20, 0x21, + 0x1B, 0x1C, 0x20, 0x21, + 0x1B, 0x1C, 0x1E, 0x21, + 0x1B, 0x21, 0x21, 0x21, + 0x1B, 0x1B, 0x21, 0x21, + 0x1B, 0x1B, 0x1B, 0x21, + 0x1B, 0x1E, 0x1F, 0x22, + 0x1B, 0x1E, 0x21, 0x22, + 0x1B, 0x1C, 0x21, 0x22, + 0x1B, 0x1C, 0x1F, 0x22, + 0x1B, 0x1E, 0x20, 0x23, + 0x1B, 0x1F, 0x21, 0x23, + 0x1B, 0x1D, 0x21, 0x23, + 0x1B, 0x1D, 0x1F, 0x23, + 0x1B, 0x23, 0x23, 0x23, + 0x1B, 0x1B, 0x23, 0x23, + 0x1B, 0x1B, 0x1B, 0x23, + 0x1B, 0x1F, 0x22, 0x26, + 0x1B, 0x20, 0x24, 0x26, + 0x1B, 0x1D, 0x24, 0x26, + 0x1B, 0x1D, 0x21, 0x26, + 0x1B, 0x26, 0x26, 0x26, + 0x1B, 0x1B, 0x26, 0x26, + 0x1B, 0x1B, 0x1B, 0x26, + 0x1B, 0x20, 0x24, 0x29, + 0x1B, 0x22, 0x26, 0x29, + 0x1B, 0x1E, 0x26, 0x29, + 0x1B, 0x1E, 0x22, 0x29, + 0x1B, 0x29, 0x29, 0x29, + 0x1B, 0x1B, 0x29, 0x29, + 0x1B, 0x1B, 0x1B, 0x29, + 0x1B, 0x21, 0x26, 0x2C, + 0x1B, 0x23, 0x28, 0x2C, + 0x1B, 0x1F, 0x28, 0x2C, + 0x1B, 0x1F, 0x24, 0x2C, + 0x1B, 0x2C, 0x2C, 0x2C, + 0x1B, 0x1B, 0x2C, 0x2C, + 0x1B, 0x1B, 0x1B, 0x2C, + 0x1B, 0x22, 0x28, 0x2F, + 0x1B, 0x25, 0x2A, 0x2F, + 0x1B, 0x20, 0x2A, 0x2F, + 0x1B, 0x20, 0x25, 0x2F, + 0x1B, 0x2F, 0x2F, 0x2F, + 0x1B, 0x1B, 0x2F, 0x2F, + 0x1B, 0x1B, 0x1B, 0x2F, + 0x1B, 0x26, 0x2D, 0x32, + 0x1B, 0x20, 0x2D, 0x32, + 0x1B, 0x20, 0x27, 0x32, + 0x1B, 0x32, 0x32, 0x32, + 0x1B, 0x1B, 0x32, 0x32, + 0x1B, 0x1B, 0x1B, 0x32, + 0x1B, 0x28, 0x2F, 0x35, + 0x1B, 0x21, 0x2F, 0x35, + 0x1B, 0x21, 0x28, 0x35, + 0x1B, 0x35, 0x35, 0x35, + 0x1B, 0x1B, 0x35, 0x35, + 0x1B, 0x1B, 0x1B, 0x35, + 0x1B, 0x29, 0x31, 0x38, + 0x1B, 0x22, 0x31, 0x38, + 0x1B, 0x22, 0x2A, 0x38, + 0x1B, 0x38, 0x38, 0x38, + 0x1B, 0x1B, 0x38, 0x38, + 0x1B, 0x1B, 0x1B, 0x38, + 0x1B, 0x2B, 0x33, 0x3B, + 0x1B, 0x23, 0x33, 0x3B, + 0x1B, 0x23, 0x2B, 0x3B, + 0x1B, 0x3B, 0x3B, 0x3B, + 0x1B, 0x1B, 0x3B, 0x3B, + 0x1B, 0x1B, 0x1B, 0x3B, + 0x1B, 0x3E, 0x3E, 0x3E, + 0x1B, 0x1B, 0x3E, 0x3E, + 0x1B, 0x1B, 0x1B, 0x3E, + 0x1B, 0x2D, 0x36, 0x3F, + 0x1B, 0x24, 0x36, 0x3F, + 0x1B, 0x24, 0x2D, 0x3F, + 0x1C, 0x1D, 0x1D, 0x1E, + 0x1C, 0x1D, 0x1E, 0x1F, + 0x1C, 0x1E, 0x1F, 0x20, + 0x1C, 0x1D, 0x1F, 0x20, + 0x1C, 0x1D, 0x1E, 0x20, + 0x1C, 0x1E, 0x1F, 0x21, + 0x1C, 0x1E, 0x20, 0x21, + 0x1C, 0x1D, 0x20, 0x21, + 0x1C, 0x1D, 0x1F, 0x21, + 0x1C, 0x1E, 0x20, 0x22, + 0x1C, 0x1F, 0x21, 0x22, + 0x1C, 0x1D, 0x21, 0x22, + 0x1C, 0x1D, 0x1F, 0x22, + 0x1C, 0x22, 0x22, 0x22, + 0x1C, 0x1C, 0x22, 0x22, + 0x1C, 0x1C, 0x1C, 0x22, + 0x1C, 0x1F, 0x20, 0x23, + 0x1C, 0x1F, 0x22, 0x23, + 0x1C, 0x1D, 0x22, 0x23, + 0x1C, 0x1D, 0x20, 0x23, + 0x1C, 0x1F, 0x21, 0x24, + 0x1C, 0x20, 0x22, 0x24, + 0x1C, 0x1E, 0x22, 0x24, + 0x1C, 0x1E, 0x20, 0x24, + 0x1C, 0x24, 0x24, 0x24, + 0x1C, 0x1C, 0x24, 0x24, + 0x1C, 0x1C, 0x1C, 0x24, + 0x1C, 0x20, 0x23, 0x27, + 0x1C, 0x21, 0x25, 0x27, + 0x1C, 0x1E, 0x25, 0x27, + 0x1C, 0x1E, 0x22, 0x27, + 0x1C, 0x27, 0x27, 0x27, + 0x1C, 0x1C, 0x27, 0x27, + 0x1C, 0x1C, 0x1C, 0x27, + 0x1C, 0x21, 0x25, 0x2A, + 0x1C, 0x23, 0x27, 0x2A, + 0x1C, 0x1F, 0x27, 0x2A, + 0x1C, 0x1F, 0x23, 0x2A, + 0x1C, 0x2A, 0x2A, 0x2A, + 0x1C, 0x1C, 0x2A, 0x2A, + 0x1C, 0x1C, 0x1C, 0x2A, + 0x1C, 0x22, 0x27, 0x2D, + 0x1C, 0x24, 0x29, 0x2D, + 0x1C, 0x20, 0x29, 0x2D, + 0x1C, 0x20, 0x25, 0x2D, + 0x1C, 0x2D, 0x2D, 0x2D, + 0x1C, 0x1C, 0x2D, 0x2D, + 0x1C, 0x1C, 0x1C, 0x2D, + 0x1C, 0x23, 0x29, 0x30, + 0x1C, 0x26, 0x2B, 0x30, + 0x1C, 0x21, 0x2B, 0x30, + 0x1C, 0x21, 0x26, 0x30, + 0x1C, 0x30, 0x30, 0x30, + 0x1C, 0x1C, 0x30, 0x30, + 0x1C, 0x1C, 0x1C, 0x30, + 0x1C, 0x27, 0x2E, 0x33, + 0x1C, 0x21, 0x2E, 0x33, + 0x1C, 0x21, 0x28, 0x33, + 0x1C, 0x33, 0x33, 0x33, + 0x1C, 0x1C, 0x33, 0x33, + 0x1C, 0x1C, 0x1C, 0x33, + 0x1C, 0x29, 0x30, 0x36, + 0x1C, 0x22, 0x30, 0x36, + 0x1C, 0x22, 0x29, 0x36, + 0x1C, 0x36, 0x36, 0x36, + 0x1C, 0x1C, 0x36, 0x36, + 0x1C, 0x1C, 0x1C, 0x36, + 0x1C, 0x2A, 0x32, 0x39, + 0x1C, 0x23, 0x32, 0x39, + 0x1C, 0x23, 0x2B, 0x39, + 0x1C, 0x39, 0x39, 0x39, + 0x1C, 0x1C, 0x39, 0x39, + 0x1C, 0x1C, 0x1C, 0x39, + 0x1C, 0x2C, 0x34, 0x3C, + 0x1C, 0x24, 0x34, 0x3C, + 0x1C, 0x24, 0x2C, 0x3C, + 0x1C, 0x3C, 0x3C, 0x3C, + 0x1C, 0x1C, 0x3C, 0x3C, + 0x1C, 0x1C, 0x1C, 0x3C, + 0x1C, 0x3F, 0x3F, 0x3F, + 0x1C, 0x1C, 0x3F, 0x3F, + 0x1C, 0x1C, 0x1C, 0x3F, + 0x1D, 0x1E, 0x1E, 0x1F, + 0x1D, 0x1E, 0x1F, 0x20, + 0x1D, 0x1F, 0x20, 0x21, + 0x1D, 0x1E, 0x20, 0x21, + 0x1D, 0x1E, 0x1F, 0x21, + 0x1D, 0x1F, 0x20, 0x22, + 0x1D, 0x1F, 0x21, 0x22, + 0x1D, 0x1E, 0x21, 0x22, + 0x1D, 0x1E, 0x20, 0x22, + 0x1D, 0x1F, 0x21, 0x23, + 0x1D, 0x20, 0x22, 0x23, + 0x1D, 0x1E, 0x22, 0x23, + 0x1D, 0x1E, 0x20, 0x23, + 0x1D, 0x23, 0x23, 0x23, + 0x1D, 0x1D, 0x23, 0x23, + 0x1D, 0x1D, 0x1D, 0x23, + 0x1D, 0x20, 0x21, 0x24, + 0x1D, 0x20, 0x23, 0x24, + 0x1D, 0x1E, 0x23, 0x24, + 0x1D, 0x1E, 0x21, 0x24, + 0x1D, 0x20, 0x22, 0x25, + 0x1D, 0x21, 0x23, 0x25, + 0x1D, 0x1F, 0x23, 0x25, + 0x1D, 0x1F, 0x21, 0x25, + 0x1D, 0x25, 0x25, 0x25, + 0x1D, 0x1D, 0x25, 0x25, + 0x1D, 0x1D, 0x1D, 0x25, + 0x1D, 0x21, 0x24, 0x28, + 0x1D, 0x22, 0x26, 0x28, + 0x1D, 0x1F, 0x26, 0x28, + 0x1D, 0x1F, 0x23, 0x28, + 0x1D, 0x28, 0x28, 0x28, + 0x1D, 0x1D, 0x28, 0x28, + 0x1D, 0x1D, 0x1D, 0x28, + 0x1D, 0x22, 0x26, 0x2B, + 0x1D, 0x24, 0x28, 0x2B, + 0x1D, 0x20, 0x28, 0x2B, + 0x1D, 0x20, 0x24, 0x2B, + 0x1D, 0x2B, 0x2B, 0x2B, + 0x1D, 0x1D, 0x2B, 0x2B, + 0x1D, 0x1D, 0x1D, 0x2B, + 0x1D, 0x23, 0x28, 0x2E, + 0x1D, 0x25, 0x2A, 0x2E, + 0x1D, 0x21, 0x2A, 0x2E, + 0x1D, 0x21, 0x26, 0x2E, + 0x1D, 0x2E, 0x2E, 0x2E, + 0x1D, 0x1D, 0x2E, 0x2E, + 0x1D, 0x1D, 0x1D, 0x2E, + 0x1D, 0x24, 0x2A, 0x31, + 0x1D, 0x27, 0x2C, 0x31, + 0x1D, 0x22, 0x2C, 0x31, + 0x1D, 0x22, 0x27, 0x31, + 0x1D, 0x31, 0x31, 0x31, + 0x1D, 0x1D, 0x31, 0x31, + 0x1D, 0x1D, 0x1D, 0x31, + 0x1D, 0x28, 0x2F, 0x34, + 0x1D, 0x22, 0x2F, 0x34, + 0x1D, 0x22, 0x29, 0x34, + 0x1D, 0x34, 0x34, 0x34, + 0x1D, 0x1D, 0x34, 0x34, + 0x1D, 0x1D, 0x1D, 0x34, + 0x1D, 0x2A, 0x31, 0x37, + 0x1D, 0x23, 0x31, 0x37, + 0x1D, 0x23, 0x2A, 0x37, + 0x1D, 0x37, 0x37, 0x37, + 0x1D, 0x1D, 0x37, 0x37, + 0x1D, 0x1D, 0x1D, 0x37, + 0x1D, 0x2B, 0x33, 0x3A, + 0x1D, 0x24, 0x33, 0x3A, + 0x1D, 0x24, 0x2C, 0x3A, + 0x1D, 0x3A, 0x3A, 0x3A, + 0x1D, 0x1D, 0x3A, 0x3A, + 0x1D, 0x1D, 0x1D, 0x3A, + 0x1D, 0x2D, 0x35, 0x3D, + 0x1D, 0x25, 0x35, 0x3D, + 0x1D, 0x25, 0x2D, 0x3D, + 0x1D, 0x3D, 0x3D, 0x3D, + 0x1D, 0x1D, 0x3D, 0x3D, + 0x1D, 0x1D, 0x1D, 0x3D, + 0x1E, 0x1F, 0x1F, 0x20, + 0x1E, 0x1F, 0x20, 0x21, + 0x1E, 0x20, 0x21, 0x22, + 0x1E, 0x1F, 0x21, 0x22, + 0x1E, 0x1F, 0x20, 0x22, + 0x1E, 0x20, 0x21, 0x23, + 0x1E, 0x20, 0x22, 0x23, + 0x1E, 0x1F, 0x22, 0x23, + 0x1E, 0x1F, 0x21, 0x23, + 0x1E, 0x20, 0x22, 0x24, + 0x1E, 0x21, 0x23, 0x24, + 0x1E, 0x1F, 0x23, 0x24, + 0x1E, 0x1F, 0x21, 0x24, + 0x1E, 0x24, 0x24, 0x24, + 0x1E, 0x1E, 0x24, 0x24, + 0x1E, 0x1E, 0x1E, 0x24, + 0x1E, 0x21, 0x22, 0x25, + 0x1E, 0x21, 0x24, 0x25, + 0x1E, 0x1F, 0x24, 0x25, + 0x1E, 0x1F, 0x22, 0x25, + 0x1E, 0x21, 0x23, 0x26, + 0x1E, 0x22, 0x24, 0x26, + 0x1E, 0x20, 0x24, 0x26, + 0x1E, 0x20, 0x22, 0x26, + 0x1E, 0x26, 0x26, 0x26, + 0x1E, 0x1E, 0x26, 0x26, + 0x1E, 0x1E, 0x1E, 0x26, + 0x1E, 0x22, 0x25, 0x29, + 0x1E, 0x23, 0x27, 0x29, + 0x1E, 0x20, 0x27, 0x29, + 0x1E, 0x20, 0x24, 0x29, + 0x1E, 0x29, 0x29, 0x29, + 0x1E, 0x1E, 0x29, 0x29, + 0x1E, 0x1E, 0x1E, 0x29, + 0x1E, 0x23, 0x27, 0x2C, + 0x1E, 0x25, 0x29, 0x2C, + 0x1E, 0x21, 0x29, 0x2C, + 0x1E, 0x21, 0x25, 0x2C, + 0x1E, 0x2C, 0x2C, 0x2C, + 0x1E, 0x1E, 0x2C, 0x2C, + 0x1E, 0x1E, 0x1E, 0x2C, + 0x1E, 0x24, 0x29, 0x2F, + 0x1E, 0x26, 0x2B, 0x2F, + 0x1E, 0x22, 0x2B, 0x2F, + 0x1E, 0x22, 0x27, 0x2F, + 0x1E, 0x2F, 0x2F, 0x2F, + 0x1E, 0x1E, 0x2F, 0x2F, + 0x1E, 0x1E, 0x1E, 0x2F, + 0x1E, 0x25, 0x2B, 0x32, + 0x1E, 0x28, 0x2D, 0x32, + 0x1E, 0x23, 0x2D, 0x32, + 0x1E, 0x23, 0x28, 0x32, + 0x1E, 0x32, 0x32, 0x32, + 0x1E, 0x1E, 0x32, 0x32, + 0x1E, 0x1E, 0x1E, 0x32, + 0x1E, 0x29, 0x30, 0x35, + 0x1E, 0x23, 0x30, 0x35, + 0x1E, 0x23, 0x2A, 0x35, + 0x1E, 0x35, 0x35, 0x35, + 0x1E, 0x1E, 0x35, 0x35, + 0x1E, 0x1E, 0x1E, 0x35, + 0x1E, 0x2B, 0x32, 0x38, + 0x1E, 0x24, 0x32, 0x38, + 0x1E, 0x24, 0x2B, 0x38, + 0x1E, 0x38, 0x38, 0x38, + 0x1E, 0x1E, 0x38, 0x38, + 0x1E, 0x1E, 0x1E, 0x38, + 0x1E, 0x2C, 0x34, 0x3B, + 0x1E, 0x25, 0x34, 0x3B, + 0x1E, 0x25, 0x2D, 0x3B, + 0x1E, 0x3B, 0x3B, 0x3B, + 0x1E, 0x1E, 0x3B, 0x3B, + 0x1E, 0x1E, 0x1E, 0x3B, + 0x1E, 0x2E, 0x36, 0x3E, + 0x1E, 0x26, 0x36, 0x3E, + 0x1E, 0x26, 0x2E, 0x3E, + 0x1E, 0x3E, 0x3E, 0x3E, + 0x1E, 0x1E, 0x3E, 0x3E, + 0x1E, 0x1E, 0x1E, 0x3E, + 0x1F, 0x20, 0x20, 0x21, + 0x1F, 0x20, 0x21, 0x22, + 0x1F, 0x21, 0x22, 0x23, + 0x1F, 0x20, 0x22, 0x23, + 0x1F, 0x20, 0x21, 0x23, + 0x1F, 0x21, 0x22, 0x24, + 0x1F, 0x21, 0x23, 0x24, + 0x1F, 0x20, 0x23, 0x24, + 0x1F, 0x20, 0x22, 0x24, + 0x1F, 0x21, 0x23, 0x25, + 0x1F, 0x22, 0x24, 0x25, + 0x1F, 0x20, 0x24, 0x25, + 0x1F, 0x20, 0x22, 0x25, + 0x1F, 0x25, 0x25, 0x25, + 0x1F, 0x1F, 0x25, 0x25, + 0x1F, 0x1F, 0x1F, 0x25, + 0x1F, 0x22, 0x23, 0x26, + 0x1F, 0x22, 0x25, 0x26, + 0x1F, 0x20, 0x25, 0x26, + 0x1F, 0x20, 0x23, 0x26, + 0x1F, 0x22, 0x24, 0x27, + 0x1F, 0x23, 0x25, 0x27, + 0x1F, 0x21, 0x25, 0x27, + 0x1F, 0x21, 0x23, 0x27, + 0x1F, 0x27, 0x27, 0x27, + 0x1F, 0x1F, 0x27, 0x27, + 0x1F, 0x1F, 0x1F, 0x27, + 0x1F, 0x23, 0x26, 0x2A, + 0x1F, 0x24, 0x28, 0x2A, + 0x1F, 0x21, 0x28, 0x2A, + 0x1F, 0x21, 0x25, 0x2A, + 0x1F, 0x2A, 0x2A, 0x2A, + 0x1F, 0x1F, 0x2A, 0x2A, + 0x1F, 0x1F, 0x1F, 0x2A, + 0x1F, 0x24, 0x28, 0x2D, + 0x1F, 0x26, 0x2A, 0x2D, + 0x1F, 0x22, 0x2A, 0x2D, + 0x1F, 0x22, 0x26, 0x2D, + 0x1F, 0x2D, 0x2D, 0x2D, + 0x1F, 0x1F, 0x2D, 0x2D, + 0x1F, 0x1F, 0x1F, 0x2D, + 0x1F, 0x25, 0x2A, 0x30, + 0x1F, 0x27, 0x2C, 0x30, + 0x1F, 0x23, 0x2C, 0x30, + 0x1F, 0x23, 0x28, 0x30, + 0x1F, 0x30, 0x30, 0x30, + 0x1F, 0x1F, 0x30, 0x30, + 0x1F, 0x1F, 0x1F, 0x30, + 0x1F, 0x26, 0x2C, 0x33, + 0x1F, 0x29, 0x2E, 0x33, + 0x1F, 0x24, 0x2E, 0x33, + 0x1F, 0x24, 0x29, 0x33, + 0x1F, 0x33, 0x33, 0x33, + 0x1F, 0x1F, 0x33, 0x33, + 0x1F, 0x1F, 0x1F, 0x33, + 0x1F, 0x2A, 0x31, 0x36, + 0x1F, 0x24, 0x31, 0x36, + 0x1F, 0x24, 0x2B, 0x36, + 0x1F, 0x36, 0x36, 0x36, + 0x1F, 0x1F, 0x36, 0x36, + 0x1F, 0x1F, 0x1F, 0x36, + 0x1F, 0x2C, 0x33, 0x39, + 0x1F, 0x25, 0x33, 0x39, + 0x1F, 0x25, 0x2C, 0x39, + 0x1F, 0x39, 0x39, 0x39, + 0x1F, 0x1F, 0x39, 0x39, + 0x1F, 0x1F, 0x1F, 0x39, + 0x1F, 0x2D, 0x35, 0x3C, + 0x1F, 0x26, 0x35, 0x3C, + 0x1F, 0x26, 0x2E, 0x3C, + 0x1F, 0x3C, 0x3C, 0x3C, + 0x1F, 0x1F, 0x3C, 0x3C, + 0x1F, 0x1F, 0x1F, 0x3C, + 0x1F, 0x2F, 0x37, 0x3F, + 0x1F, 0x27, 0x37, 0x3F, + 0x1F, 0x27, 0x2F, 0x3F, + 0x1F, 0x3F, 0x3F, 0x3F, + 0x1F, 0x1F, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x3F, + 0x20, 0x21, 0x21, 0x22, + 0x20, 0x21, 0x22, 0x23, + 0x20, 0x22, 0x23, 0x24, + 0x20, 0x21, 0x23, 0x24, + 0x20, 0x21, 0x22, 0x24, + 0x20, 0x22, 0x23, 0x25, + 0x20, 0x22, 0x24, 0x25, + 0x20, 0x21, 0x24, 0x25, + 0x20, 0x21, 0x23, 0x25, + 0x20, 0x22, 0x24, 0x26, + 0x20, 0x23, 0x25, 0x26, + 0x20, 0x21, 0x25, 0x26, + 0x20, 0x21, 0x23, 0x26, + 0x20, 0x26, 0x26, 0x26, + 0x20, 0x20, 0x26, 0x26, + 0x20, 0x20, 0x20, 0x26, + 0x20, 0x23, 0x24, 0x27, + 0x20, 0x23, 0x26, 0x27, + 0x20, 0x21, 0x26, 0x27, + 0x20, 0x21, 0x24, 0x27, + 0x20, 0x23, 0x25, 0x28, + 0x20, 0x24, 0x26, 0x28, + 0x20, 0x22, 0x26, 0x28, + 0x20, 0x22, 0x24, 0x28, + 0x20, 0x28, 0x28, 0x28, + 0x20, 0x20, 0x28, 0x28, + 0x20, 0x20, 0x20, 0x28, + 0x20, 0x24, 0x27, 0x2B, + 0x20, 0x25, 0x29, 0x2B, + 0x20, 0x22, 0x29, 0x2B, + 0x20, 0x22, 0x26, 0x2B, + 0x20, 0x2B, 0x2B, 0x2B, + 0x20, 0x20, 0x2B, 0x2B, + 0x20, 0x20, 0x20, 0x2B, + 0x20, 0x25, 0x29, 0x2E, + 0x20, 0x27, 0x2B, 0x2E, + 0x20, 0x23, 0x2B, 0x2E, + 0x20, 0x23, 0x27, 0x2E, + 0x20, 0x2E, 0x2E, 0x2E, + 0x20, 0x20, 0x2E, 0x2E, + 0x20, 0x20, 0x20, 0x2E, + 0x20, 0x26, 0x2B, 0x31, + 0x20, 0x28, 0x2D, 0x31, + 0x20, 0x24, 0x2D, 0x31, + 0x20, 0x24, 0x29, 0x31, + 0x20, 0x31, 0x31, 0x31, + 0x20, 0x20, 0x31, 0x31, + 0x20, 0x20, 0x20, 0x31, + 0x20, 0x27, 0x2D, 0x34, + 0x20, 0x2A, 0x2F, 0x34, + 0x20, 0x25, 0x2F, 0x34, + 0x20, 0x25, 0x2A, 0x34, + 0x20, 0x34, 0x34, 0x34, + 0x20, 0x20, 0x34, 0x34, + 0x20, 0x20, 0x20, 0x34, + 0x20, 0x2B, 0x32, 0x37, + 0x20, 0x25, 0x32, 0x37, + 0x20, 0x25, 0x2C, 0x37, + 0x20, 0x37, 0x37, 0x37, + 0x20, 0x20, 0x37, 0x37, + 0x20, 0x20, 0x20, 0x37, + 0x20, 0x2D, 0x34, 0x3A, + 0x20, 0x26, 0x34, 0x3A, + 0x20, 0x26, 0x2D, 0x3A, + 0x20, 0x3A, 0x3A, 0x3A, + 0x20, 0x20, 0x3A, 0x3A, + 0x20, 0x20, 0x20, 0x3A, + 0x20, 0x2E, 0x36, 0x3D, + 0x20, 0x27, 0x36, 0x3D, + 0x20, 0x27, 0x2F, 0x3D, + 0x20, 0x3D, 0x3D, 0x3D, + 0x20, 0x20, 0x3D, 0x3D, + 0x20, 0x20, 0x20, 0x3D, + 0x21, 0x22, 0x22, 0x23, + 0x21, 0x22, 0x23, 0x24, + 0x21, 0x23, 0x24, 0x25, + 0x21, 0x22, 0x24, 0x25, + 0x21, 0x22, 0x23, 0x25, + 0x21, 0x23, 0x24, 0x26, + 0x21, 0x23, 0x25, 0x26, + 0x21, 0x22, 0x25, 0x26, + 0x21, 0x22, 0x24, 0x26, + 0x21, 0x23, 0x25, 0x27, + 0x21, 0x24, 0x26, 0x27, + 0x21, 0x22, 0x26, 0x27, + 0x21, 0x22, 0x24, 0x27, + 0x21, 0x27, 0x27, 0x27, + 0x21, 0x21, 0x27, 0x27, + 0x21, 0x21, 0x21, 0x27, + 0x21, 0x24, 0x25, 0x28, + 0x21, 0x24, 0x27, 0x28, + 0x21, 0x22, 0x27, 0x28, + 0x21, 0x22, 0x25, 0x28, + 0x21, 0x24, 0x26, 0x29, + 0x21, 0x25, 0x27, 0x29, + 0x21, 0x23, 0x27, 0x29, + 0x21, 0x23, 0x25, 0x29, + 0x21, 0x29, 0x29, 0x29, + 0x21, 0x21, 0x29, 0x29, + 0x21, 0x21, 0x21, 0x29, + 0x21, 0x25, 0x28, 0x2C, + 0x21, 0x26, 0x2A, 0x2C, + 0x21, 0x23, 0x2A, 0x2C, + 0x21, 0x23, 0x27, 0x2C, + 0x21, 0x2C, 0x2C, 0x2C, + 0x21, 0x21, 0x2C, 0x2C, + 0x21, 0x21, 0x21, 0x2C, + 0x21, 0x26, 0x2A, 0x2F, + 0x21, 0x28, 0x2C, 0x2F, + 0x21, 0x24, 0x2C, 0x2F, + 0x21, 0x24, 0x28, 0x2F, + 0x21, 0x2F, 0x2F, 0x2F, + 0x21, 0x21, 0x2F, 0x2F, + 0x21, 0x21, 0x21, 0x2F, + 0x21, 0x27, 0x2C, 0x32, + 0x21, 0x29, 0x2E, 0x32, + 0x21, 0x25, 0x2E, 0x32, + 0x21, 0x25, 0x2A, 0x32, + 0x21, 0x32, 0x32, 0x32, + 0x21, 0x21, 0x32, 0x32, + 0x21, 0x21, 0x21, 0x32, + 0x21, 0x28, 0x2E, 0x35, + 0x21, 0x2B, 0x30, 0x35, + 0x21, 0x26, 0x30, 0x35, + 0x21, 0x26, 0x2B, 0x35, + 0x21, 0x35, 0x35, 0x35, + 0x21, 0x21, 0x35, 0x35, + 0x21, 0x21, 0x21, 0x35, + 0x21, 0x2C, 0x33, 0x38, + 0x21, 0x26, 0x33, 0x38, + 0x21, 0x26, 0x2D, 0x38, + 0x21, 0x38, 0x38, 0x38, + 0x21, 0x21, 0x38, 0x38, + 0x21, 0x21, 0x21, 0x38, + 0x21, 0x2E, 0x35, 0x3B, + 0x21, 0x27, 0x35, 0x3B, + 0x21, 0x27, 0x2E, 0x3B, + 0x21, 0x3B, 0x3B, 0x3B, + 0x21, 0x21, 0x3B, 0x3B, + 0x21, 0x21, 0x21, 0x3B, + 0x21, 0x2F, 0x37, 0x3E, + 0x21, 0x28, 0x37, 0x3E, + 0x21, 0x28, 0x30, 0x3E, + 0x21, 0x3E, 0x3E, 0x3E, + 0x21, 0x21, 0x3E, 0x3E, + 0x21, 0x21, 0x21, 0x3E, + 0x22, 0x23, 0x23, 0x24, + 0x22, 0x23, 0x24, 0x25, + 0x22, 0x24, 0x25, 0x26, + 0x22, 0x23, 0x25, 0x26, + 0x22, 0x23, 0x24, 0x26, + 0x22, 0x24, 0x25, 0x27, + 0x22, 0x24, 0x26, 0x27, + 0x22, 0x23, 0x26, 0x27, + 0x22, 0x23, 0x25, 0x27, + 0x22, 0x24, 0x26, 0x28, + 0x22, 0x25, 0x27, 0x28, + 0x22, 0x23, 0x27, 0x28, + 0x22, 0x23, 0x25, 0x28, + 0x22, 0x28, 0x28, 0x28, + 0x22, 0x22, 0x28, 0x28, + 0x22, 0x22, 0x22, 0x28, + 0x22, 0x25, 0x26, 0x29, + 0x22, 0x25, 0x28, 0x29, + 0x22, 0x23, 0x28, 0x29, + 0x22, 0x23, 0x26, 0x29, + 0x22, 0x25, 0x27, 0x2A, + 0x22, 0x26, 0x28, 0x2A, + 0x22, 0x24, 0x28, 0x2A, + 0x22, 0x24, 0x26, 0x2A, + 0x22, 0x2A, 0x2A, 0x2A, + 0x22, 0x22, 0x2A, 0x2A, + 0x22, 0x22, 0x22, 0x2A, + 0x22, 0x26, 0x29, 0x2D, + 0x22, 0x27, 0x2B, 0x2D, + 0x22, 0x24, 0x2B, 0x2D, + 0x22, 0x24, 0x28, 0x2D, + 0x22, 0x2D, 0x2D, 0x2D, + 0x22, 0x22, 0x2D, 0x2D, + 0x22, 0x22, 0x22, 0x2D, + 0x22, 0x27, 0x2B, 0x30, + 0x22, 0x29, 0x2D, 0x30, + 0x22, 0x25, 0x2D, 0x30, + 0x22, 0x25, 0x29, 0x30, + 0x22, 0x30, 0x30, 0x30, + 0x22, 0x22, 0x30, 0x30, + 0x22, 0x22, 0x22, 0x30, + 0x22, 0x28, 0x2D, 0x33, + 0x22, 0x2A, 0x2F, 0x33, + 0x22, 0x26, 0x2F, 0x33, + 0x22, 0x26, 0x2B, 0x33, + 0x22, 0x33, 0x33, 0x33, + 0x22, 0x22, 0x33, 0x33, + 0x22, 0x22, 0x22, 0x33, + 0x22, 0x29, 0x2F, 0x36, + 0x22, 0x2C, 0x31, 0x36, + 0x22, 0x27, 0x31, 0x36, + 0x22, 0x27, 0x2C, 0x36, + 0x22, 0x36, 0x36, 0x36, + 0x22, 0x22, 0x36, 0x36, + 0x22, 0x22, 0x22, 0x36, + 0x22, 0x2D, 0x34, 0x39, + 0x22, 0x27, 0x34, 0x39, + 0x22, 0x27, 0x2E, 0x39, + 0x22, 0x39, 0x39, 0x39, + 0x22, 0x22, 0x39, 0x39, + 0x22, 0x22, 0x22, 0x39, + 0x22, 0x2F, 0x36, 0x3C, + 0x22, 0x28, 0x36, 0x3C, + 0x22, 0x28, 0x2F, 0x3C, + 0x22, 0x3C, 0x3C, 0x3C, + 0x22, 0x22, 0x3C, 0x3C, + 0x22, 0x22, 0x22, 0x3C, + 0x22, 0x30, 0x38, 0x3F, + 0x22, 0x29, 0x38, 0x3F, + 0x22, 0x29, 0x31, 0x3F, + 0x22, 0x3F, 0x3F, 0x3F, + 0x22, 0x22, 0x3F, 0x3F, + 0x22, 0x22, 0x22, 0x3F, + 0x23, 0x24, 0x24, 0x25, + 0x23, 0x24, 0x25, 0x26, + 0x23, 0x25, 0x26, 0x27, + 0x23, 0x24, 0x26, 0x27, + 0x23, 0x24, 0x25, 0x27, + 0x23, 0x25, 0x26, 0x28, + 0x23, 0x25, 0x27, 0x28, + 0x23, 0x24, 0x27, 0x28, + 0x23, 0x24, 0x26, 0x28, + 0x23, 0x25, 0x27, 0x29, + 0x23, 0x26, 0x28, 0x29, + 0x23, 0x24, 0x28, 0x29, + 0x23, 0x24, 0x26, 0x29, + 0x23, 0x29, 0x29, 0x29, + 0x23, 0x23, 0x29, 0x29, + 0x23, 0x23, 0x23, 0x29, + 0x23, 0x26, 0x27, 0x2A, + 0x23, 0x26, 0x29, 0x2A, + 0x23, 0x24, 0x29, 0x2A, + 0x23, 0x24, 0x27, 0x2A, + 0x23, 0x26, 0x28, 0x2B, + 0x23, 0x27, 0x29, 0x2B, + 0x23, 0x25, 0x29, 0x2B, + 0x23, 0x25, 0x27, 0x2B, + 0x23, 0x2B, 0x2B, 0x2B, + 0x23, 0x23, 0x2B, 0x2B, + 0x23, 0x23, 0x23, 0x2B, + 0x23, 0x27, 0x2A, 0x2E, + 0x23, 0x28, 0x2C, 0x2E, + 0x23, 0x25, 0x2C, 0x2E, + 0x23, 0x25, 0x29, 0x2E, + 0x23, 0x2E, 0x2E, 0x2E, + 0x23, 0x23, 0x2E, 0x2E, + 0x23, 0x23, 0x23, 0x2E, + 0x23, 0x28, 0x2C, 0x31, + 0x23, 0x2A, 0x2E, 0x31, + 0x23, 0x26, 0x2E, 0x31, + 0x23, 0x26, 0x2A, 0x31, + 0x23, 0x31, 0x31, 0x31, + 0x23, 0x23, 0x31, 0x31, + 0x23, 0x23, 0x23, 0x31, + 0x23, 0x29, 0x2E, 0x34, + 0x23, 0x2B, 0x30, 0x34, + 0x23, 0x27, 0x30, 0x34, + 0x23, 0x27, 0x2C, 0x34, + 0x23, 0x34, 0x34, 0x34, + 0x23, 0x23, 0x34, 0x34, + 0x23, 0x23, 0x23, 0x34, + 0x23, 0x2A, 0x30, 0x37, + 0x23, 0x2D, 0x32, 0x37, + 0x23, 0x28, 0x32, 0x37, + 0x23, 0x28, 0x2D, 0x37, + 0x23, 0x37, 0x37, 0x37, + 0x23, 0x23, 0x37, 0x37, + 0x23, 0x23, 0x23, 0x37, + 0x23, 0x2E, 0x35, 0x3A, + 0x23, 0x28, 0x35, 0x3A, + 0x23, 0x28, 0x2F, 0x3A, + 0x23, 0x3A, 0x3A, 0x3A, + 0x23, 0x23, 0x3A, 0x3A, + 0x23, 0x23, 0x23, 0x3A, + 0x23, 0x30, 0x37, 0x3D, + 0x23, 0x29, 0x37, 0x3D, + 0x23, 0x29, 0x30, 0x3D, + 0x23, 0x3D, 0x3D, 0x3D, + 0x23, 0x23, 0x3D, 0x3D, + 0x23, 0x23, 0x23, 0x3D, + 0x24, 0x25, 0x25, 0x26, + 0x24, 0x25, 0x26, 0x27, + 0x24, 0x26, 0x27, 0x28, + 0x24, 0x25, 0x27, 0x28, + 0x24, 0x25, 0x26, 0x28, + 0x24, 0x26, 0x27, 0x29, + 0x24, 0x26, 0x28, 0x29, + 0x24, 0x25, 0x28, 0x29, + 0x24, 0x25, 0x27, 0x29, + 0x24, 0x26, 0x28, 0x2A, + 0x24, 0x27, 0x29, 0x2A, + 0x24, 0x25, 0x29, 0x2A, + 0x24, 0x25, 0x27, 0x2A, + 0x24, 0x2A, 0x2A, 0x2A, + 0x24, 0x24, 0x2A, 0x2A, + 0x24, 0x24, 0x24, 0x2A, + 0x24, 0x27, 0x28, 0x2B, + 0x24, 0x27, 0x2A, 0x2B, + 0x24, 0x25, 0x2A, 0x2B, + 0x24, 0x25, 0x28, 0x2B, + 0x24, 0x27, 0x29, 0x2C, + 0x24, 0x28, 0x2A, 0x2C, + 0x24, 0x26, 0x2A, 0x2C, + 0x24, 0x26, 0x28, 0x2C, + 0x24, 0x2C, 0x2C, 0x2C, + 0x24, 0x24, 0x2C, 0x2C, + 0x24, 0x24, 0x24, 0x2C, + 0x24, 0x28, 0x2B, 0x2F, + 0x24, 0x29, 0x2D, 0x2F, + 0x24, 0x26, 0x2D, 0x2F, + 0x24, 0x26, 0x2A, 0x2F, + 0x24, 0x2F, 0x2F, 0x2F, + 0x24, 0x24, 0x2F, 0x2F, + 0x24, 0x24, 0x24, 0x2F, + 0x24, 0x29, 0x2D, 0x32, + 0x24, 0x2B, 0x2F, 0x32, + 0x24, 0x27, 0x2F, 0x32, + 0x24, 0x27, 0x2B, 0x32, + 0x24, 0x32, 0x32, 0x32, + 0x24, 0x24, 0x32, 0x32, + 0x24, 0x24, 0x24, 0x32, + 0x24, 0x2A, 0x2F, 0x35, + 0x24, 0x2C, 0x31, 0x35, + 0x24, 0x28, 0x31, 0x35, + 0x24, 0x28, 0x2D, 0x35, + 0x24, 0x35, 0x35, 0x35, + 0x24, 0x24, 0x35, 0x35, + 0x24, 0x24, 0x24, 0x35, + 0x24, 0x2B, 0x31, 0x38, + 0x24, 0x2E, 0x33, 0x38, + 0x24, 0x29, 0x33, 0x38, + 0x24, 0x29, 0x2E, 0x38, + 0x24, 0x38, 0x38, 0x38, + 0x24, 0x24, 0x38, 0x38, + 0x24, 0x24, 0x24, 0x38, + 0x24, 0x2F, 0x36, 0x3B, + 0x24, 0x29, 0x36, 0x3B, + 0x24, 0x29, 0x30, 0x3B, + 0x24, 0x3B, 0x3B, 0x3B, + 0x24, 0x24, 0x3B, 0x3B, + 0x24, 0x24, 0x24, 0x3B, + 0x24, 0x31, 0x38, 0x3E, + 0x24, 0x2A, 0x38, 0x3E, + 0x24, 0x2A, 0x31, 0x3E, + 0x24, 0x3E, 0x3E, 0x3E, + 0x24, 0x24, 0x3E, 0x3E, + 0x24, 0x24, 0x24, 0x3E, + 0x25, 0x26, 0x26, 0x27, + 0x25, 0x26, 0x27, 0x28, + 0x25, 0x27, 0x28, 0x29, + 0x25, 0x26, 0x28, 0x29, + 0x25, 0x26, 0x27, 0x29, + 0x25, 0x27, 0x28, 0x2A, + 0x25, 0x27, 0x29, 0x2A, + 0x25, 0x26, 0x29, 0x2A, + 0x25, 0x26, 0x28, 0x2A, + 0x25, 0x27, 0x29, 0x2B, + 0x25, 0x28, 0x2A, 0x2B, + 0x25, 0x26, 0x2A, 0x2B, + 0x25, 0x26, 0x28, 0x2B, + 0x25, 0x2B, 0x2B, 0x2B, + 0x25, 0x25, 0x2B, 0x2B, + 0x25, 0x25, 0x25, 0x2B, + 0x25, 0x28, 0x29, 0x2C, + 0x25, 0x28, 0x2B, 0x2C, + 0x25, 0x26, 0x2B, 0x2C, + 0x25, 0x26, 0x29, 0x2C, + 0x25, 0x28, 0x2A, 0x2D, + 0x25, 0x29, 0x2B, 0x2D, + 0x25, 0x27, 0x2B, 0x2D, + 0x25, 0x27, 0x29, 0x2D, + 0x25, 0x2D, 0x2D, 0x2D, + 0x25, 0x25, 0x2D, 0x2D, + 0x25, 0x25, 0x25, 0x2D, + 0x25, 0x29, 0x2C, 0x30, + 0x25, 0x2A, 0x2E, 0x30, + 0x25, 0x27, 0x2E, 0x30, + 0x25, 0x27, 0x2B, 0x30, + 0x25, 0x30, 0x30, 0x30, + 0x25, 0x25, 0x30, 0x30, + 0x25, 0x25, 0x25, 0x30, + 0x25, 0x2A, 0x2E, 0x33, + 0x25, 0x2C, 0x30, 0x33, + 0x25, 0x28, 0x30, 0x33, + 0x25, 0x28, 0x2C, 0x33, + 0x25, 0x33, 0x33, 0x33, + 0x25, 0x25, 0x33, 0x33, + 0x25, 0x25, 0x25, 0x33, + 0x25, 0x2B, 0x30, 0x36, + 0x25, 0x2D, 0x32, 0x36, + 0x25, 0x29, 0x32, 0x36, + 0x25, 0x29, 0x2E, 0x36, + 0x25, 0x36, 0x36, 0x36, + 0x25, 0x25, 0x36, 0x36, + 0x25, 0x25, 0x25, 0x36, + 0x25, 0x2C, 0x32, 0x39, + 0x25, 0x2F, 0x34, 0x39, + 0x25, 0x2A, 0x34, 0x39, + 0x25, 0x2A, 0x2F, 0x39, + 0x25, 0x39, 0x39, 0x39, + 0x25, 0x25, 0x39, 0x39, + 0x25, 0x25, 0x25, 0x39, + 0x25, 0x30, 0x37, 0x3C, + 0x25, 0x2A, 0x37, 0x3C, + 0x25, 0x2A, 0x31, 0x3C, + 0x25, 0x3C, 0x3C, 0x3C, + 0x25, 0x25, 0x3C, 0x3C, + 0x25, 0x25, 0x25, 0x3C, + 0x25, 0x32, 0x39, 0x3F, + 0x25, 0x2B, 0x39, 0x3F, + 0x25, 0x2B, 0x32, 0x3F, + 0x25, 0x3F, 0x3F, 0x3F, + 0x25, 0x25, 0x3F, 0x3F, + 0x25, 0x25, 0x25, 0x3F, + 0x26, 0x27, 0x27, 0x28, + 0x26, 0x27, 0x28, 0x29, + 0x26, 0x28, 0x29, 0x2A, + 0x26, 0x27, 0x29, 0x2A, + 0x26, 0x27, 0x28, 0x2A, + 0x26, 0x28, 0x29, 0x2B, + 0x26, 0x28, 0x2A, 0x2B, + 0x26, 0x27, 0x2A, 0x2B, + 0x26, 0x27, 0x29, 0x2B, + 0x26, 0x28, 0x2A, 0x2C, + 0x26, 0x29, 0x2B, 0x2C, + 0x26, 0x27, 0x2B, 0x2C, + 0x26, 0x27, 0x29, 0x2C, + 0x26, 0x2C, 0x2C, 0x2C, + 0x26, 0x26, 0x2C, 0x2C, + 0x26, 0x26, 0x26, 0x2C, + 0x26, 0x29, 0x2A, 0x2D, + 0x26, 0x29, 0x2C, 0x2D, + 0x26, 0x27, 0x2C, 0x2D, + 0x26, 0x27, 0x2A, 0x2D, + 0x26, 0x29, 0x2B, 0x2E, + 0x26, 0x2A, 0x2C, 0x2E, + 0x26, 0x28, 0x2C, 0x2E, + 0x26, 0x28, 0x2A, 0x2E, + 0x26, 0x2E, 0x2E, 0x2E, + 0x26, 0x26, 0x2E, 0x2E, + 0x26, 0x26, 0x26, 0x2E, + 0x26, 0x2A, 0x2D, 0x31, + 0x26, 0x2B, 0x2F, 0x31, + 0x26, 0x28, 0x2F, 0x31, + 0x26, 0x28, 0x2C, 0x31, + 0x26, 0x31, 0x31, 0x31, + 0x26, 0x26, 0x31, 0x31, + 0x26, 0x26, 0x26, 0x31, + 0x26, 0x2B, 0x2F, 0x34, + 0x26, 0x2D, 0x31, 0x34, + 0x26, 0x29, 0x31, 0x34, + 0x26, 0x29, 0x2D, 0x34, + 0x26, 0x34, 0x34, 0x34, + 0x26, 0x26, 0x34, 0x34, + 0x26, 0x26, 0x26, 0x34, + 0x26, 0x2C, 0x31, 0x37, + 0x26, 0x2E, 0x33, 0x37, + 0x26, 0x2A, 0x33, 0x37, + 0x26, 0x2A, 0x2F, 0x37, + 0x26, 0x37, 0x37, 0x37, + 0x26, 0x26, 0x37, 0x37, + 0x26, 0x26, 0x26, 0x37, + 0x26, 0x2D, 0x33, 0x3A, + 0x26, 0x30, 0x35, 0x3A, + 0x26, 0x2B, 0x35, 0x3A, + 0x26, 0x2B, 0x30, 0x3A, + 0x26, 0x3A, 0x3A, 0x3A, + 0x26, 0x26, 0x3A, 0x3A, + 0x26, 0x26, 0x26, 0x3A, + 0x26, 0x31, 0x38, 0x3D, + 0x26, 0x2B, 0x38, 0x3D, + 0x26, 0x2B, 0x32, 0x3D, + 0x26, 0x3D, 0x3D, 0x3D, + 0x26, 0x26, 0x3D, 0x3D, + 0x26, 0x26, 0x26, 0x3D, + 0x27, 0x28, 0x28, 0x29, + 0x27, 0x28, 0x29, 0x2A, + 0x27, 0x29, 0x2A, 0x2B, + 0x27, 0x28, 0x2A, 0x2B, + 0x27, 0x28, 0x29, 0x2B, + 0x27, 0x29, 0x2A, 0x2C, + 0x27, 0x29, 0x2B, 0x2C, + 0x27, 0x28, 0x2B, 0x2C, + 0x27, 0x28, 0x2A, 0x2C, + 0x27, 0x29, 0x2B, 0x2D, + 0x27, 0x2A, 0x2C, 0x2D, + 0x27, 0x28, 0x2C, 0x2D, + 0x27, 0x28, 0x2A, 0x2D, + 0x27, 0x2D, 0x2D, 0x2D, + 0x27, 0x27, 0x2D, 0x2D, + 0x27, 0x27, 0x27, 0x2D, + 0x27, 0x2A, 0x2B, 0x2E, + 0x27, 0x2A, 0x2D, 0x2E, + 0x27, 0x28, 0x2D, 0x2E, + 0x27, 0x28, 0x2B, 0x2E, + 0x27, 0x2A, 0x2C, 0x2F, + 0x27, 0x2B, 0x2D, 0x2F, + 0x27, 0x29, 0x2D, 0x2F, + 0x27, 0x29, 0x2B, 0x2F, + 0x27, 0x2F, 0x2F, 0x2F, + 0x27, 0x27, 0x2F, 0x2F, + 0x27, 0x27, 0x27, 0x2F, + 0x27, 0x2B, 0x2E, 0x32, + 0x27, 0x2C, 0x30, 0x32, + 0x27, 0x29, 0x30, 0x32, + 0x27, 0x29, 0x2D, 0x32, + 0x27, 0x32, 0x32, 0x32, + 0x27, 0x27, 0x32, 0x32, + 0x27, 0x27, 0x27, 0x32, + 0x27, 0x2C, 0x30, 0x35, + 0x27, 0x2E, 0x32, 0x35, + 0x27, 0x2A, 0x32, 0x35, + 0x27, 0x2A, 0x2E, 0x35, + 0x27, 0x35, 0x35, 0x35, + 0x27, 0x27, 0x35, 0x35, + 0x27, 0x27, 0x27, 0x35, + 0x27, 0x2D, 0x32, 0x38, + 0x27, 0x2F, 0x34, 0x38, + 0x27, 0x2B, 0x34, 0x38, + 0x27, 0x2B, 0x30, 0x38, + 0x27, 0x38, 0x38, 0x38, + 0x27, 0x27, 0x38, 0x38, + 0x27, 0x27, 0x27, 0x38, + 0x27, 0x2E, 0x34, 0x3B, + 0x27, 0x31, 0x36, 0x3B, + 0x27, 0x2C, 0x36, 0x3B, + 0x27, 0x2C, 0x31, 0x3B, + 0x27, 0x3B, 0x3B, 0x3B, + 0x27, 0x27, 0x3B, 0x3B, + 0x27, 0x27, 0x27, 0x3B, + 0x27, 0x32, 0x39, 0x3E, + 0x27, 0x2C, 0x39, 0x3E, + 0x27, 0x2C, 0x33, 0x3E, + 0x27, 0x3E, 0x3E, 0x3E, + 0x27, 0x27, 0x3E, 0x3E, + 0x27, 0x27, 0x27, 0x3E, + 0x28, 0x29, 0x29, 0x2A, + 0x28, 0x29, 0x2A, 0x2B, + 0x28, 0x2A, 0x2B, 0x2C, + 0x28, 0x29, 0x2B, 0x2C, + 0x28, 0x29, 0x2A, 0x2C, + 0x28, 0x2A, 0x2B, 0x2D, + 0x28, 0x2A, 0x2C, 0x2D, + 0x28, 0x29, 0x2C, 0x2D, + 0x28, 0x29, 0x2B, 0x2D, + 0x28, 0x2A, 0x2C, 0x2E, + 0x28, 0x2B, 0x2D, 0x2E, + 0x28, 0x29, 0x2D, 0x2E, + 0x28, 0x29, 0x2B, 0x2E, + 0x28, 0x2E, 0x2E, 0x2E, + 0x28, 0x28, 0x2E, 0x2E, + 0x28, 0x28, 0x28, 0x2E, + 0x28, 0x2B, 0x2C, 0x2F, + 0x28, 0x2B, 0x2E, 0x2F, + 0x28, 0x29, 0x2E, 0x2F, + 0x28, 0x29, 0x2C, 0x2F, + 0x28, 0x2B, 0x2D, 0x30, + 0x28, 0x2C, 0x2E, 0x30, + 0x28, 0x2A, 0x2E, 0x30, + 0x28, 0x2A, 0x2C, 0x30, + 0x28, 0x30, 0x30, 0x30, + 0x28, 0x28, 0x30, 0x30, + 0x28, 0x28, 0x28, 0x30, + 0x28, 0x2C, 0x2F, 0x33, + 0x28, 0x2D, 0x31, 0x33, + 0x28, 0x2A, 0x31, 0x33, + 0x28, 0x2A, 0x2E, 0x33, + 0x28, 0x33, 0x33, 0x33, + 0x28, 0x28, 0x33, 0x33, + 0x28, 0x28, 0x28, 0x33, + 0x28, 0x2D, 0x31, 0x36, + 0x28, 0x2F, 0x33, 0x36, + 0x28, 0x2B, 0x33, 0x36, + 0x28, 0x2B, 0x2F, 0x36, + 0x28, 0x36, 0x36, 0x36, + 0x28, 0x28, 0x36, 0x36, + 0x28, 0x28, 0x28, 0x36, + 0x28, 0x2E, 0x33, 0x39, + 0x28, 0x30, 0x35, 0x39, + 0x28, 0x2C, 0x35, 0x39, + 0x28, 0x2C, 0x31, 0x39, + 0x28, 0x39, 0x39, 0x39, + 0x28, 0x28, 0x39, 0x39, + 0x28, 0x28, 0x28, 0x39, + 0x28, 0x2F, 0x35, 0x3C, + 0x28, 0x32, 0x37, 0x3C, + 0x28, 0x2D, 0x37, 0x3C, + 0x28, 0x2D, 0x32, 0x3C, + 0x28, 0x3C, 0x3C, 0x3C, + 0x28, 0x28, 0x3C, 0x3C, + 0x28, 0x28, 0x28, 0x3C, + 0x28, 0x33, 0x3A, 0x3F, + 0x28, 0x2D, 0x3A, 0x3F, + 0x28, 0x2D, 0x34, 0x3F, + 0x28, 0x3F, 0x3F, 0x3F, + 0x28, 0x28, 0x3F, 0x3F, + 0x28, 0x28, 0x28, 0x3F, + 0x29, 0x2A, 0x2A, 0x2B, + 0x29, 0x2A, 0x2B, 0x2C, + 0x29, 0x2B, 0x2C, 0x2D, + 0x29, 0x2A, 0x2C, 0x2D, + 0x29, 0x2A, 0x2B, 0x2D, + 0x29, 0x2B, 0x2C, 0x2E, + 0x29, 0x2B, 0x2D, 0x2E, + 0x29, 0x2A, 0x2D, 0x2E, + 0x29, 0x2A, 0x2C, 0x2E, + 0x29, 0x2B, 0x2D, 0x2F, + 0x29, 0x2C, 0x2E, 0x2F, + 0x29, 0x2A, 0x2E, 0x2F, + 0x29, 0x2A, 0x2C, 0x2F, + 0x29, 0x2F, 0x2F, 0x2F, + 0x29, 0x29, 0x2F, 0x2F, + 0x29, 0x29, 0x29, 0x2F, + 0x29, 0x2C, 0x2D, 0x30, + 0x29, 0x2C, 0x2F, 0x30, + 0x29, 0x2A, 0x2F, 0x30, + 0x29, 0x2A, 0x2D, 0x30, + 0x29, 0x2C, 0x2E, 0x31, + 0x29, 0x2D, 0x2F, 0x31, + 0x29, 0x2B, 0x2F, 0x31, + 0x29, 0x2B, 0x2D, 0x31, + 0x29, 0x31, 0x31, 0x31, + 0x29, 0x29, 0x31, 0x31, + 0x29, 0x29, 0x29, 0x31, + 0x29, 0x2D, 0x30, 0x34, + 0x29, 0x2E, 0x32, 0x34, + 0x29, 0x2B, 0x32, 0x34, + 0x29, 0x2B, 0x2F, 0x34, + 0x29, 0x34, 0x34, 0x34, + 0x29, 0x29, 0x34, 0x34, + 0x29, 0x29, 0x29, 0x34, + 0x29, 0x2E, 0x32, 0x37, + 0x29, 0x30, 0x34, 0x37, + 0x29, 0x2C, 0x34, 0x37, + 0x29, 0x2C, 0x30, 0x37, + 0x29, 0x37, 0x37, 0x37, + 0x29, 0x29, 0x37, 0x37, + 0x29, 0x29, 0x29, 0x37, + 0x29, 0x2F, 0x34, 0x3A, + 0x29, 0x31, 0x36, 0x3A, + 0x29, 0x2D, 0x36, 0x3A, + 0x29, 0x2D, 0x32, 0x3A, + 0x29, 0x3A, 0x3A, 0x3A, + 0x29, 0x29, 0x3A, 0x3A, + 0x29, 0x29, 0x29, 0x3A, + 0x29, 0x30, 0x36, 0x3D, + 0x29, 0x33, 0x38, 0x3D, + 0x29, 0x2E, 0x38, 0x3D, + 0x29, 0x2E, 0x33, 0x3D, + 0x29, 0x3D, 0x3D, 0x3D, + 0x29, 0x29, 0x3D, 0x3D, + 0x29, 0x29, 0x29, 0x3D, + 0x2A, 0x2B, 0x2B, 0x2C, + 0x2A, 0x2B, 0x2C, 0x2D, + 0x2A, 0x2C, 0x2D, 0x2E, + 0x2A, 0x2B, 0x2D, 0x2E, + 0x2A, 0x2B, 0x2C, 0x2E, + 0x2A, 0x2C, 0x2D, 0x2F, + 0x2A, 0x2C, 0x2E, 0x2F, + 0x2A, 0x2B, 0x2E, 0x2F, + 0x2A, 0x2B, 0x2D, 0x2F, + 0x2A, 0x2C, 0x2E, 0x30, + 0x2A, 0x2D, 0x2F, 0x30, + 0x2A, 0x2B, 0x2F, 0x30, + 0x2A, 0x2B, 0x2D, 0x30, + 0x2A, 0x30, 0x30, 0x30, + 0x2A, 0x2A, 0x30, 0x30, + 0x2A, 0x2A, 0x2A, 0x30, + 0x2A, 0x2D, 0x2E, 0x31, + 0x2A, 0x2D, 0x30, 0x31, + 0x2A, 0x2B, 0x30, 0x31, + 0x2A, 0x2B, 0x2E, 0x31, + 0x2A, 0x2D, 0x2F, 0x32, + 0x2A, 0x2E, 0x30, 0x32, + 0x2A, 0x2C, 0x30, 0x32, + 0x2A, 0x2C, 0x2E, 0x32, + 0x2A, 0x32, 0x32, 0x32, + 0x2A, 0x2A, 0x32, 0x32, + 0x2A, 0x2A, 0x2A, 0x32, + 0x2A, 0x2E, 0x31, 0x35, + 0x2A, 0x2F, 0x33, 0x35, + 0x2A, 0x2C, 0x33, 0x35, + 0x2A, 0x2C, 0x30, 0x35, + 0x2A, 0x35, 0x35, 0x35, + 0x2A, 0x2A, 0x35, 0x35, + 0x2A, 0x2A, 0x2A, 0x35, + 0x2A, 0x2F, 0x33, 0x38, + 0x2A, 0x31, 0x35, 0x38, + 0x2A, 0x2D, 0x35, 0x38, + 0x2A, 0x2D, 0x31, 0x38, + 0x2A, 0x38, 0x38, 0x38, + 0x2A, 0x2A, 0x38, 0x38, + 0x2A, 0x2A, 0x2A, 0x38, + 0x2A, 0x30, 0x35, 0x3B, + 0x2A, 0x32, 0x37, 0x3B, + 0x2A, 0x2E, 0x37, 0x3B, + 0x2A, 0x2E, 0x33, 0x3B, + 0x2A, 0x3B, 0x3B, 0x3B, + 0x2A, 0x2A, 0x3B, 0x3B, + 0x2A, 0x2A, 0x2A, 0x3B, + 0x2A, 0x31, 0x37, 0x3E, + 0x2A, 0x34, 0x39, 0x3E, + 0x2A, 0x2F, 0x39, 0x3E, + 0x2A, 0x2F, 0x34, 0x3E, + 0x2A, 0x3E, 0x3E, 0x3E, + 0x2A, 0x2A, 0x3E, 0x3E, + 0x2A, 0x2A, 0x2A, 0x3E, + 0x2B, 0x2C, 0x2C, 0x2D, + 0x2B, 0x2C, 0x2D, 0x2E, + 0x2B, 0x2D, 0x2E, 0x2F, + 0x2B, 0x2C, 0x2E, 0x2F, + 0x2B, 0x2C, 0x2D, 0x2F, + 0x2B, 0x2D, 0x2E, 0x30, + 0x2B, 0x2D, 0x2F, 0x30, + 0x2B, 0x2C, 0x2F, 0x30, + 0x2B, 0x2C, 0x2E, 0x30, + 0x2B, 0x2D, 0x2F, 0x31, + 0x2B, 0x2E, 0x30, 0x31, + 0x2B, 0x2C, 0x30, 0x31, + 0x2B, 0x2C, 0x2E, 0x31, + 0x2B, 0x31, 0x31, 0x31, + 0x2B, 0x2B, 0x31, 0x31, + 0x2B, 0x2B, 0x2B, 0x31, + 0x2B, 0x2E, 0x2F, 0x32, + 0x2B, 0x2E, 0x31, 0x32, + 0x2B, 0x2C, 0x31, 0x32, + 0x2B, 0x2C, 0x2F, 0x32, + 0x2B, 0x2E, 0x30, 0x33, + 0x2B, 0x2F, 0x31, 0x33, + 0x2B, 0x2D, 0x31, 0x33, + 0x2B, 0x2D, 0x2F, 0x33, + 0x2B, 0x33, 0x33, 0x33, + 0x2B, 0x2B, 0x33, 0x33, + 0x2B, 0x2B, 0x2B, 0x33, + 0x2B, 0x2F, 0x32, 0x36, + 0x2B, 0x30, 0x34, 0x36, + 0x2B, 0x2D, 0x34, 0x36, + 0x2B, 0x2D, 0x31, 0x36, + 0x2B, 0x36, 0x36, 0x36, + 0x2B, 0x2B, 0x36, 0x36, + 0x2B, 0x2B, 0x2B, 0x36, + 0x2B, 0x30, 0x34, 0x39, + 0x2B, 0x32, 0x36, 0x39, + 0x2B, 0x2E, 0x36, 0x39, + 0x2B, 0x2E, 0x32, 0x39, + 0x2B, 0x39, 0x39, 0x39, + 0x2B, 0x2B, 0x39, 0x39, + 0x2B, 0x2B, 0x2B, 0x39, + 0x2B, 0x31, 0x36, 0x3C, + 0x2B, 0x33, 0x38, 0x3C, + 0x2B, 0x2F, 0x38, 0x3C, + 0x2B, 0x2F, 0x34, 0x3C, + 0x2B, 0x3C, 0x3C, 0x3C, + 0x2B, 0x2B, 0x3C, 0x3C, + 0x2B, 0x2B, 0x2B, 0x3C, + 0x2B, 0x32, 0x38, 0x3F, + 0x2B, 0x35, 0x3A, 0x3F, + 0x2B, 0x30, 0x3A, 0x3F, + 0x2B, 0x30, 0x35, 0x3F, + 0x2B, 0x3F, 0x3F, 0x3F, + 0x2B, 0x2B, 0x3F, 0x3F, + 0x2B, 0x2B, 0x2B, 0x3F, + 0x2C, 0x2D, 0x2D, 0x2E, + 0x2C, 0x2D, 0x2E, 0x2F, + 0x2C, 0x2E, 0x2F, 0x30, + 0x2C, 0x2D, 0x2F, 0x30, + 0x2C, 0x2D, 0x2E, 0x30, + 0x2C, 0x2E, 0x2F, 0x31, + 0x2C, 0x2E, 0x30, 0x31, + 0x2C, 0x2D, 0x30, 0x31, + 0x2C, 0x2D, 0x2F, 0x31, + 0x2C, 0x2E, 0x30, 0x32, + 0x2C, 0x2F, 0x31, 0x32, + 0x2C, 0x2D, 0x31, 0x32, + 0x2C, 0x2D, 0x2F, 0x32, + 0x2C, 0x32, 0x32, 0x32, + 0x2C, 0x2C, 0x32, 0x32, + 0x2C, 0x2C, 0x2C, 0x32, + 0x2C, 0x2F, 0x30, 0x33, + 0x2C, 0x2F, 0x32, 0x33, + 0x2C, 0x2D, 0x32, 0x33, + 0x2C, 0x2D, 0x30, 0x33, + 0x2C, 0x2F, 0x31, 0x34, + 0x2C, 0x30, 0x32, 0x34, + 0x2C, 0x2E, 0x32, 0x34, + 0x2C, 0x2E, 0x30, 0x34, + 0x2C, 0x34, 0x34, 0x34, + 0x2C, 0x2C, 0x34, 0x34, + 0x2C, 0x2C, 0x2C, 0x34, + 0x2C, 0x30, 0x33, 0x37, + 0x2C, 0x31, 0x35, 0x37, + 0x2C, 0x2E, 0x35, 0x37, + 0x2C, 0x2E, 0x32, 0x37, + 0x2C, 0x37, 0x37, 0x37, + 0x2C, 0x2C, 0x37, 0x37, + 0x2C, 0x2C, 0x2C, 0x37, + 0x2C, 0x31, 0x35, 0x3A, + 0x2C, 0x33, 0x37, 0x3A, + 0x2C, 0x2F, 0x37, 0x3A, + 0x2C, 0x2F, 0x33, 0x3A, + 0x2C, 0x3A, 0x3A, 0x3A, + 0x2C, 0x2C, 0x3A, 0x3A, + 0x2C, 0x2C, 0x2C, 0x3A, + 0x2C, 0x32, 0x37, 0x3D, + 0x2C, 0x34, 0x39, 0x3D, + 0x2C, 0x30, 0x39, 0x3D, + 0x2C, 0x30, 0x35, 0x3D, + 0x2C, 0x3D, 0x3D, 0x3D, + 0x2C, 0x2C, 0x3D, 0x3D, + 0x2C, 0x2C, 0x2C, 0x3D, + 0x2D, 0x2E, 0x2E, 0x2F, + 0x2D, 0x2E, 0x2F, 0x30, + 0x2D, 0x2F, 0x30, 0x31, + 0x2D, 0x2E, 0x30, 0x31, + 0x2D, 0x2E, 0x2F, 0x31, + 0x2D, 0x2F, 0x30, 0x32, + 0x2D, 0x2F, 0x31, 0x32, + 0x2D, 0x2E, 0x31, 0x32, + 0x2D, 0x2E, 0x30, 0x32, + 0x2D, 0x2F, 0x31, 0x33, + 0x2D, 0x30, 0x32, 0x33, + 0x2D, 0x2E, 0x32, 0x33, + 0x2D, 0x2E, 0x30, 0x33, + 0x2D, 0x33, 0x33, 0x33, + 0x2D, 0x2D, 0x33, 0x33, + 0x2D, 0x2D, 0x2D, 0x33, + 0x2D, 0x30, 0x31, 0x34, + 0x2D, 0x30, 0x33, 0x34, + 0x2D, 0x2E, 0x33, 0x34, + 0x2D, 0x2E, 0x31, 0x34, + 0x2D, 0x30, 0x32, 0x35, + 0x2D, 0x31, 0x33, 0x35, + 0x2D, 0x2F, 0x33, 0x35, + 0x2D, 0x2F, 0x31, 0x35, + 0x2D, 0x35, 0x35, 0x35, + 0x2D, 0x2D, 0x35, 0x35, + 0x2D, 0x2D, 0x2D, 0x35, + 0x2D, 0x31, 0x34, 0x38, + 0x2D, 0x32, 0x36, 0x38, + 0x2D, 0x2F, 0x36, 0x38, + 0x2D, 0x2F, 0x33, 0x38, + 0x2D, 0x38, 0x38, 0x38, + 0x2D, 0x2D, 0x38, 0x38, + 0x2D, 0x2D, 0x2D, 0x38, + 0x2D, 0x32, 0x36, 0x3B, + 0x2D, 0x34, 0x38, 0x3B, + 0x2D, 0x30, 0x38, 0x3B, + 0x2D, 0x30, 0x34, 0x3B, + 0x2D, 0x3B, 0x3B, 0x3B, + 0x2D, 0x2D, 0x3B, 0x3B, + 0x2D, 0x2D, 0x2D, 0x3B, + 0x2D, 0x33, 0x38, 0x3E, + 0x2D, 0x35, 0x3A, 0x3E, + 0x2D, 0x31, 0x3A, 0x3E, + 0x2D, 0x31, 0x36, 0x3E, + 0x2D, 0x3E, 0x3E, 0x3E, + 0x2D, 0x2D, 0x3E, 0x3E, + 0x2D, 0x2D, 0x2D, 0x3E, + 0x2E, 0x2F, 0x2F, 0x30, + 0x2E, 0x2F, 0x30, 0x31, + 0x2E, 0x30, 0x31, 0x32, + 0x2E, 0x2F, 0x31, 0x32, + 0x2E, 0x2F, 0x30, 0x32, + 0x2E, 0x30, 0x31, 0x33, + 0x2E, 0x30, 0x32, 0x33, + 0x2E, 0x2F, 0x32, 0x33, + 0x2E, 0x2F, 0x31, 0x33, + 0x2E, 0x30, 0x32, 0x34, + 0x2E, 0x31, 0x33, 0x34, + 0x2E, 0x2F, 0x33, 0x34, + 0x2E, 0x2F, 0x31, 0x34, + 0x2E, 0x34, 0x34, 0x34, + 0x2E, 0x2E, 0x34, 0x34, + 0x2E, 0x2E, 0x2E, 0x34, + 0x2E, 0x31, 0x32, 0x35, + 0x2E, 0x31, 0x34, 0x35, + 0x2E, 0x2F, 0x34, 0x35, + 0x2E, 0x2F, 0x32, 0x35, + 0x2E, 0x31, 0x33, 0x36, + 0x2E, 0x32, 0x34, 0x36, + 0x2E, 0x30, 0x34, 0x36, + 0x2E, 0x30, 0x32, 0x36, + 0x2E, 0x36, 0x36, 0x36, + 0x2E, 0x2E, 0x36, 0x36, + 0x2E, 0x2E, 0x2E, 0x36, + 0x2E, 0x32, 0x35, 0x39, + 0x2E, 0x33, 0x37, 0x39, + 0x2E, 0x30, 0x37, 0x39, + 0x2E, 0x30, 0x34, 0x39, + 0x2E, 0x39, 0x39, 0x39, + 0x2E, 0x2E, 0x39, 0x39, + 0x2E, 0x2E, 0x2E, 0x39, + 0x2E, 0x33, 0x37, 0x3C, + 0x2E, 0x35, 0x39, 0x3C, + 0x2E, 0x31, 0x39, 0x3C, + 0x2E, 0x31, 0x35, 0x3C, + 0x2E, 0x3C, 0x3C, 0x3C, + 0x2E, 0x2E, 0x3C, 0x3C, + 0x2E, 0x2E, 0x2E, 0x3C, + 0x2E, 0x34, 0x39, 0x3F, + 0x2E, 0x36, 0x3B, 0x3F, + 0x2E, 0x32, 0x3B, 0x3F, + 0x2E, 0x32, 0x37, 0x3F, + 0x2E, 0x3F, 0x3F, 0x3F, + 0x2E, 0x2E, 0x3F, 0x3F, + 0x2E, 0x2E, 0x2E, 0x3F, + 0x2F, 0x30, 0x30, 0x31, + 0x2F, 0x30, 0x31, 0x32, + 0x2F, 0x31, 0x32, 0x33, + 0x2F, 0x30, 0x32, 0x33, + 0x2F, 0x30, 0x31, 0x33, + 0x2F, 0x31, 0x32, 0x34, + 0x2F, 0x31, 0x33, 0x34, + 0x2F, 0x30, 0x33, 0x34, + 0x2F, 0x30, 0x32, 0x34, + 0x2F, 0x31, 0x33, 0x35, + 0x2F, 0x32, 0x34, 0x35, + 0x2F, 0x30, 0x34, 0x35, + 0x2F, 0x30, 0x32, 0x35, + 0x2F, 0x35, 0x35, 0x35, + 0x2F, 0x2F, 0x35, 0x35, + 0x2F, 0x2F, 0x2F, 0x35, + 0x2F, 0x32, 0x33, 0x36, + 0x2F, 0x32, 0x35, 0x36, + 0x2F, 0x30, 0x35, 0x36, + 0x2F, 0x30, 0x33, 0x36, + 0x2F, 0x32, 0x34, 0x37, + 0x2F, 0x33, 0x35, 0x37, + 0x2F, 0x31, 0x35, 0x37, + 0x2F, 0x31, 0x33, 0x37, + 0x2F, 0x37, 0x37, 0x37, + 0x2F, 0x2F, 0x37, 0x37, + 0x2F, 0x2F, 0x2F, 0x37, + 0x2F, 0x33, 0x36, 0x3A, + 0x2F, 0x34, 0x38, 0x3A, + 0x2F, 0x31, 0x38, 0x3A, + 0x2F, 0x31, 0x35, 0x3A, + 0x2F, 0x3A, 0x3A, 0x3A, + 0x2F, 0x2F, 0x3A, 0x3A, + 0x2F, 0x2F, 0x2F, 0x3A, + 0x2F, 0x34, 0x38, 0x3D, + 0x2F, 0x36, 0x3A, 0x3D, + 0x2F, 0x32, 0x3A, 0x3D, + 0x2F, 0x32, 0x36, 0x3D, + 0x2F, 0x3D, 0x3D, 0x3D, + 0x2F, 0x2F, 0x3D, 0x3D, + 0x2F, 0x2F, 0x2F, 0x3D, + 0x30, 0x31, 0x31, 0x32, + 0x30, 0x31, 0x32, 0x33, + 0x30, 0x32, 0x33, 0x34, + 0x30, 0x31, 0x33, 0x34, + 0x30, 0x31, 0x32, 0x34, + 0x30, 0x32, 0x33, 0x35, + 0x30, 0x32, 0x34, 0x35, + 0x30, 0x31, 0x34, 0x35, + 0x30, 0x31, 0x33, 0x35, + 0x30, 0x32, 0x34, 0x36, + 0x30, 0x33, 0x35, 0x36, + 0x30, 0x31, 0x35, 0x36, + 0x30, 0x31, 0x33, 0x36, + 0x30, 0x36, 0x36, 0x36, + 0x30, 0x30, 0x36, 0x36, + 0x30, 0x30, 0x30, 0x36, + 0x30, 0x33, 0x34, 0x37, + 0x30, 0x33, 0x36, 0x37, + 0x30, 0x31, 0x36, 0x37, + 0x30, 0x31, 0x34, 0x37, + 0x30, 0x33, 0x35, 0x38, + 0x30, 0x34, 0x36, 0x38, + 0x30, 0x32, 0x36, 0x38, + 0x30, 0x32, 0x34, 0x38, + 0x30, 0x38, 0x38, 0x38, + 0x30, 0x30, 0x38, 0x38, + 0x30, 0x30, 0x30, 0x38, + 0x30, 0x34, 0x37, 0x3B, + 0x30, 0x35, 0x39, 0x3B, + 0x30, 0x32, 0x39, 0x3B, + 0x30, 0x32, 0x36, 0x3B, + 0x30, 0x3B, 0x3B, 0x3B, + 0x30, 0x30, 0x3B, 0x3B, + 0x30, 0x30, 0x30, 0x3B, + 0x30, 0x35, 0x39, 0x3E, + 0x30, 0x37, 0x3B, 0x3E, + 0x30, 0x33, 0x3B, 0x3E, + 0x30, 0x33, 0x37, 0x3E, + 0x30, 0x3E, 0x3E, 0x3E, + 0x30, 0x30, 0x3E, 0x3E, + 0x30, 0x30, 0x30, 0x3E, + 0x31, 0x32, 0x32, 0x33, + 0x31, 0x32, 0x33, 0x34, + 0x31, 0x33, 0x34, 0x35, + 0x31, 0x32, 0x34, 0x35, + 0x31, 0x32, 0x33, 0x35, + 0x31, 0x33, 0x34, 0x36, + 0x31, 0x33, 0x35, 0x36, + 0x31, 0x32, 0x35, 0x36, + 0x31, 0x32, 0x34, 0x36, + 0x31, 0x33, 0x35, 0x37, + 0x31, 0x34, 0x36, 0x37, + 0x31, 0x32, 0x36, 0x37, + 0x31, 0x32, 0x34, 0x37, + 0x31, 0x37, 0x37, 0x37, + 0x31, 0x31, 0x37, 0x37, + 0x31, 0x31, 0x31, 0x37, + 0x31, 0x34, 0x35, 0x38, + 0x31, 0x34, 0x37, 0x38, + 0x31, 0x32, 0x37, 0x38, + 0x31, 0x32, 0x35, 0x38, + 0x31, 0x34, 0x36, 0x39, + 0x31, 0x35, 0x37, 0x39, + 0x31, 0x33, 0x37, 0x39, + 0x31, 0x33, 0x35, 0x39, + 0x31, 0x39, 0x39, 0x39, + 0x31, 0x31, 0x39, 0x39, + 0x31, 0x31, 0x31, 0x39, + 0x31, 0x35, 0x38, 0x3C, + 0x31, 0x36, 0x3A, 0x3C, + 0x31, 0x33, 0x3A, 0x3C, + 0x31, 0x33, 0x37, 0x3C, + 0x31, 0x3C, 0x3C, 0x3C, + 0x31, 0x31, 0x3C, 0x3C, + 0x31, 0x31, 0x31, 0x3C, + 0x31, 0x36, 0x3A, 0x3F, + 0x31, 0x38, 0x3C, 0x3F, + 0x31, 0x34, 0x3C, 0x3F, + 0x31, 0x34, 0x38, 0x3F, + 0x31, 0x3F, 0x3F, 0x3F, + 0x31, 0x31, 0x3F, 0x3F, + 0x31, 0x31, 0x31, 0x3F, + 0x32, 0x33, 0x33, 0x34, + 0x32, 0x33, 0x34, 0x35, + 0x32, 0x34, 0x35, 0x36, + 0x32, 0x33, 0x35, 0x36, + 0x32, 0x33, 0x34, 0x36, + 0x32, 0x34, 0x35, 0x37, + 0x32, 0x34, 0x36, 0x37, + 0x32, 0x33, 0x36, 0x37, + 0x32, 0x33, 0x35, 0x37, + 0x32, 0x34, 0x36, 0x38, + 0x32, 0x35, 0x37, 0x38, + 0x32, 0x33, 0x37, 0x38, + 0x32, 0x33, 0x35, 0x38, + 0x32, 0x38, 0x38, 0x38, + 0x32, 0x32, 0x38, 0x38, + 0x32, 0x32, 0x32, 0x38, + 0x32, 0x35, 0x36, 0x39, + 0x32, 0x35, 0x38, 0x39, + 0x32, 0x33, 0x38, 0x39, + 0x32, 0x33, 0x36, 0x39, + 0x32, 0x35, 0x37, 0x3A, + 0x32, 0x36, 0x38, 0x3A, + 0x32, 0x34, 0x38, 0x3A, + 0x32, 0x34, 0x36, 0x3A, + 0x32, 0x3A, 0x3A, 0x3A, + 0x32, 0x32, 0x3A, 0x3A, + 0x32, 0x32, 0x32, 0x3A, + 0x32, 0x36, 0x39, 0x3D, + 0x32, 0x37, 0x3B, 0x3D, + 0x32, 0x34, 0x3B, 0x3D, + 0x32, 0x34, 0x38, 0x3D, + 0x32, 0x3D, 0x3D, 0x3D, + 0x32, 0x32, 0x3D, 0x3D, + 0x32, 0x32, 0x32, 0x3D, + 0x33, 0x34, 0x34, 0x35, + 0x33, 0x34, 0x35, 0x36, + 0x33, 0x35, 0x36, 0x37, + 0x33, 0x34, 0x36, 0x37, + 0x33, 0x34, 0x35, 0x37, + 0x33, 0x35, 0x36, 0x38, + 0x33, 0x35, 0x37, 0x38, + 0x33, 0x34, 0x37, 0x38, + 0x33, 0x34, 0x36, 0x38, + 0x33, 0x35, 0x37, 0x39, + 0x33, 0x36, 0x38, 0x39, + 0x33, 0x34, 0x38, 0x39, + 0x33, 0x34, 0x36, 0x39, + 0x33, 0x39, 0x39, 0x39, + 0x33, 0x33, 0x39, 0x39, + 0x33, 0x33, 0x33, 0x39, + 0x33, 0x36, 0x37, 0x3A, + 0x33, 0x36, 0x39, 0x3A, + 0x33, 0x34, 0x39, 0x3A, + 0x33, 0x34, 0x37, 0x3A, + 0x33, 0x36, 0x38, 0x3B, + 0x33, 0x37, 0x39, 0x3B, + 0x33, 0x35, 0x39, 0x3B, + 0x33, 0x35, 0x37, 0x3B, + 0x33, 0x3B, 0x3B, 0x3B, + 0x33, 0x33, 0x3B, 0x3B, + 0x33, 0x33, 0x33, 0x3B, + 0x33, 0x37, 0x3A, 0x3E, + 0x33, 0x38, 0x3C, 0x3E, + 0x33, 0x35, 0x3C, 0x3E, + 0x33, 0x35, 0x39, 0x3E, + 0x33, 0x3E, 0x3E, 0x3E, + 0x33, 0x33, 0x3E, 0x3E, + 0x33, 0x33, 0x33, 0x3E, + 0x34, 0x35, 0x35, 0x36, + 0x34, 0x35, 0x36, 0x37, + 0x34, 0x36, 0x37, 0x38, + 0x34, 0x35, 0x37, 0x38, + 0x34, 0x35, 0x36, 0x38, + 0x34, 0x36, 0x37, 0x39, + 0x34, 0x36, 0x38, 0x39, + 0x34, 0x35, 0x38, 0x39, + 0x34, 0x35, 0x37, 0x39, + 0x34, 0x36, 0x38, 0x3A, + 0x34, 0x37, 0x39, 0x3A, + 0x34, 0x35, 0x39, 0x3A, + 0x34, 0x35, 0x37, 0x3A, + 0x34, 0x3A, 0x3A, 0x3A, + 0x34, 0x34, 0x3A, 0x3A, + 0x34, 0x34, 0x34, 0x3A, + 0x34, 0x37, 0x38, 0x3B, + 0x34, 0x37, 0x3A, 0x3B, + 0x34, 0x35, 0x3A, 0x3B, + 0x34, 0x35, 0x38, 0x3B, + 0x34, 0x37, 0x39, 0x3C, + 0x34, 0x38, 0x3A, 0x3C, + 0x34, 0x36, 0x3A, 0x3C, + 0x34, 0x36, 0x38, 0x3C, + 0x34, 0x3C, 0x3C, 0x3C, + 0x34, 0x34, 0x3C, 0x3C, + 0x34, 0x34, 0x34, 0x3C, + 0x34, 0x38, 0x3B, 0x3F, + 0x34, 0x39, 0x3D, 0x3F, + 0x34, 0x36, 0x3D, 0x3F, + 0x34, 0x36, 0x3A, 0x3F, + 0x34, 0x3F, 0x3F, 0x3F, + 0x34, 0x34, 0x3F, 0x3F, + 0x34, 0x34, 0x34, 0x3F, + 0x35, 0x36, 0x36, 0x37, + 0x35, 0x36, 0x37, 0x38, + 0x35, 0x37, 0x38, 0x39, + 0x35, 0x36, 0x38, 0x39, + 0x35, 0x36, 0x37, 0x39, + 0x35, 0x37, 0x38, 0x3A, + 0x35, 0x37, 0x39, 0x3A, + 0x35, 0x36, 0x39, 0x3A, + 0x35, 0x36, 0x38, 0x3A, + 0x35, 0x37, 0x39, 0x3B, + 0x35, 0x38, 0x3A, 0x3B, + 0x35, 0x36, 0x3A, 0x3B, + 0x35, 0x36, 0x38, 0x3B, + 0x35, 0x3B, 0x3B, 0x3B, + 0x35, 0x35, 0x3B, 0x3B, + 0x35, 0x35, 0x35, 0x3B, + 0x35, 0x38, 0x39, 0x3C, + 0x35, 0x38, 0x3B, 0x3C, + 0x35, 0x36, 0x3B, 0x3C, + 0x35, 0x36, 0x39, 0x3C, + 0x35, 0x38, 0x3A, 0x3D, + 0x35, 0x39, 0x3B, 0x3D, + 0x35, 0x37, 0x3B, 0x3D, + 0x35, 0x37, 0x39, 0x3D, + 0x35, 0x3D, 0x3D, 0x3D, + 0x35, 0x35, 0x3D, 0x3D, + 0x35, 0x35, 0x35, 0x3D, + 0x36, 0x37, 0x37, 0x38, + 0x36, 0x37, 0x38, 0x39, + 0x36, 0x38, 0x39, 0x3A, + 0x36, 0x37, 0x39, 0x3A, + 0x36, 0x37, 0x38, 0x3A, + 0x36, 0x38, 0x39, 0x3B, + 0x36, 0x38, 0x3A, 0x3B, + 0x36, 0x37, 0x3A, 0x3B, + 0x36, 0x37, 0x39, 0x3B, + 0x36, 0x38, 0x3A, 0x3C, + 0x36, 0x39, 0x3B, 0x3C, + 0x36, 0x37, 0x3B, 0x3C, + 0x36, 0x37, 0x39, 0x3C, + 0x36, 0x3C, 0x3C, 0x3C, + 0x36, 0x36, 0x3C, 0x3C, + 0x36, 0x36, 0x36, 0x3C, + 0x36, 0x39, 0x3A, 0x3D, + 0x36, 0x39, 0x3C, 0x3D, + 0x36, 0x37, 0x3C, 0x3D, + 0x36, 0x37, 0x3A, 0x3D, + 0x36, 0x39, 0x3B, 0x3E, + 0x36, 0x3A, 0x3C, 0x3E, + 0x36, 0x38, 0x3C, 0x3E, + 0x36, 0x38, 0x3A, 0x3E, + 0x36, 0x3E, 0x3E, 0x3E, + 0x36, 0x36, 0x3E, 0x3E, + 0x36, 0x36, 0x36, 0x3E, + 0x37, 0x38, 0x38, 0x39, + 0x37, 0x38, 0x39, 0x3A, + 0x37, 0x39, 0x3A, 0x3B, + 0x37, 0x38, 0x3A, 0x3B, + 0x37, 0x38, 0x39, 0x3B, + 0x37, 0x39, 0x3A, 0x3C, + 0x37, 0x39, 0x3B, 0x3C, + 0x37, 0x38, 0x3B, 0x3C, + 0x37, 0x38, 0x3A, 0x3C, + 0x37, 0x39, 0x3B, 0x3D, + 0x37, 0x3A, 0x3C, 0x3D, + 0x37, 0x38, 0x3C, 0x3D, + 0x37, 0x38, 0x3A, 0x3D, + 0x37, 0x3D, 0x3D, 0x3D, + 0x37, 0x37, 0x3D, 0x3D, + 0x37, 0x37, 0x37, 0x3D, + 0x37, 0x3A, 0x3B, 0x3E, + 0x37, 0x3A, 0x3D, 0x3E, + 0x37, 0x38, 0x3D, 0x3E, + 0x37, 0x38, 0x3B, 0x3E, + 0x37, 0x3A, 0x3C, 0x3F, + 0x37, 0x3B, 0x3D, 0x3F, + 0x37, 0x39, 0x3D, 0x3F, + 0x37, 0x39, 0x3B, 0x3F, + 0x37, 0x3F, 0x3F, 0x3F, + 0x37, 0x37, 0x3F, 0x3F, + 0x37, 0x37, 0x37, 0x3F, + 0x38, 0x39, 0x39, 0x3A, + 0x38, 0x39, 0x3A, 0x3B, + 0x38, 0x3A, 0x3B, 0x3C, + 0x38, 0x39, 0x3B, 0x3C, + 0x38, 0x39, 0x3A, 0x3C, + 0x38, 0x3A, 0x3B, 0x3D, + 0x38, 0x3A, 0x3C, 0x3D, + 0x38, 0x39, 0x3C, 0x3D, + 0x38, 0x39, 0x3B, 0x3D, + 0x38, 0x3A, 0x3C, 0x3E, + 0x38, 0x3B, 0x3D, 0x3E, + 0x38, 0x39, 0x3D, 0x3E, + 0x38, 0x39, 0x3B, 0x3E, + 0x38, 0x3E, 0x3E, 0x3E, + 0x38, 0x38, 0x3E, 0x3E, + 0x38, 0x38, 0x38, 0x3E, + 0x38, 0x3B, 0x3C, 0x3F, + 0x38, 0x3B, 0x3E, 0x3F, + 0x38, 0x39, 0x3E, 0x3F, + 0x38, 0x39, 0x3C, 0x3F, + 0x39, 0x3A, 0x3A, 0x3B, + 0x39, 0x3A, 0x3B, 0x3C, + 0x39, 0x3B, 0x3C, 0x3D, + 0x39, 0x3A, 0x3C, 0x3D, + 0x39, 0x3A, 0x3B, 0x3D, + 0x39, 0x3B, 0x3C, 0x3E, + 0x39, 0x3B, 0x3D, 0x3E, + 0x39, 0x3A, 0x3D, 0x3E, + 0x39, 0x3A, 0x3C, 0x3E, + 0x39, 0x3B, 0x3D, 0x3F, + 0x39, 0x3C, 0x3E, 0x3F, + 0x39, 0x3A, 0x3E, 0x3F, + 0x39, 0x3A, 0x3C, 0x3F, + 0x39, 0x3F, 0x3F, 0x3F, + 0x39, 0x39, 0x3F, 0x3F, + 0x39, 0x39, 0x39, 0x3F, + 0x3A, 0x3B, 0x3B, 0x3C, + 0x3A, 0x3B, 0x3C, 0x3D, + 0x3A, 0x3C, 0x3D, 0x3E, + 0x3A, 0x3B, 0x3D, 0x3E, + 0x3A, 0x3B, 0x3C, 0x3E, + 0x3A, 0x3C, 0x3D, 0x3F, + 0x3A, 0x3C, 0x3E, 0x3F, + 0x3A, 0x3B, 0x3E, 0x3F, + 0x3A, 0x3B, 0x3D, 0x3F, + 0x3B, 0x3C, 0x3C, 0x3D, + 0x3B, 0x3C, 0x3D, 0x3E, + 0x3B, 0x3D, 0x3E, 0x3F, + 0x3B, 0x3C, 0x3E, 0x3F, + 0x3B, 0x3C, 0x3D, 0x3F, + 0x3C, 0x3D, 0x3D, 0x3E, + 0x3C, 0x3D, 0x3E, 0x3F, + 0x3D, 0x3E, 0x3E, 0x3F +}; + +#endif /* AVCODEC_ULTI_CB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/unary.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/unary.h new file mode 100644 index 00000000..d57f9f70 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/unary.h @@ -0,0 +1,69 @@ +/* + * copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_UNARY_H +#define AVCODEC_UNARY_H + +#include "get_bits.h" + +/** + * Get unary code of limited length + * @param gb GetBitContext + * @param[in] stop The bitstop value (unary code of 1's or 0's) + * @param[in] len Maximum length + * @return unary 0 based code index. This is also the length in bits of the + * code excluding the stop bit. + * (in case len=1) + * 1 0 + * 0 1 + * (in case len=2) + * 1 0 + * 01 1 + * 00 2 + * (in case len=3) + * 1 0 + * 01 1 + * 001 2 + * 000 3 + */ +static inline int get_unary(GetBitContext *gb, int stop, int len) +{ + int i; + + for(i = 0; i < len && get_bits1(gb) != stop; i++); + return i; +} + +/** + * Get unary code terminated by a 0 with a maximum length of 33 + * @param gb GetBitContext + * @return Unary length/index + */ +static inline int get_unary_0_33(GetBitContext *gb) +{ + return get_unary(gb, 0, 33); +} + +static inline int get_unary_0_9(GetBitContext *gb) +{ + return get_unary(gb, 0, 9); +} + +#endif /* AVCODEC_UNARY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideo.h new file mode 100644 index 00000000..cf0bb28c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideo.h @@ -0,0 +1,104 @@ +/* + * Common Ut Video header + * Copyright (c) 2011 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_UTVIDEO_H +#define AVCODEC_UTVIDEO_H + +/** + * @file + * Common Ut Video header + */ + +#include "libavutil/common.h" +#include "avcodec.h" +#include "bswapdsp.h" +#include "utvideodsp.h" +#include "lossless_videodsp.h" +#include "lossless_videoencdsp.h" + +enum { + PRED_NONE = 0, + PRED_LEFT, + PRED_GRADIENT, + PRED_MEDIAN, +}; + +enum { + COMP_NONE = 0, + COMP_HUFF, +}; + +/* + * "Original format" markers. + * Based on values gotten from the official VFW encoder. + * They are not used during decoding, but they do have + * an informative role on seeing what was input + * to the encoder. + */ +enum { + UTVIDEO_RGB = MKTAG(0x00, 0x00, 0x01, 0x18), + UTVIDEO_RGBA = MKTAG(0x00, 0x00, 0x02, 0x18), + UTVIDEO_420 = MKTAG('Y', 'V', '1', '2'), + UTVIDEO_422 = MKTAG('Y', 'U', 'Y', '2'), + UTVIDEO_444 = MKTAG('Y', 'V', '2', '4'), +}; + +/* Mapping of libavcodec prediction modes to Ut Video's */ +extern const int ff_ut_pred_order[5]; + +typedef struct UtvideoContext { + const AVClass *class; + AVCodecContext *avctx; + UTVideoDSPContext utdsp; + BswapDSPContext bdsp; + LLVidDSPContext llviddsp; + LLVidEncDSPContext llvidencdsp; + + uint32_t frame_info_size, flags, frame_info, offset; + int planes; + int slices; + int compression; + int interlaced; + int frame_pred; + int pro; + int pack; + + ptrdiff_t slice_stride; + uint8_t *slice_bits, *slice_buffer[4]; + int slice_bits_size; + + const uint8_t *packed_stream[4][256]; + size_t packed_stream_size[4][256]; + const uint8_t *control_stream[4][256]; + size_t control_stream_size[4][256]; +} UtvideoContext; + +typedef struct HuffEntry { + uint16_t sym; + uint8_t len; + uint32_t code; +} HuffEntry; + +/* Compare huffman tree nodes */ +int ff_ut_huff_cmp_len(const void *a, const void *b); +int ff_ut10_huff_cmp_len(const void *a, const void *b); + +#endif /* AVCODEC_UTVIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideodsp.h new file mode 100644 index 00000000..a3d2550d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/utvideodsp.h @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_UTVIDEODSP_H +#define AVCODEC_UTVIDEODSP_H + +#include +#include +#include "libavutil/pixfmt.h" +#include "config.h" + +typedef struct UTVideoDSPContext { + void (*restore_rgb_planes)(uint8_t *src_r, uint8_t *src_g, uint8_t *src_b, + ptrdiff_t linesize_r, ptrdiff_t linesize_g, + ptrdiff_t linesize_b, int width, int height); + void (*restore_rgb_planes10)(uint16_t *src_r, uint16_t *src_g, uint16_t *src_b, + ptrdiff_t linesize_r, ptrdiff_t linesize_g, + ptrdiff_t linesize_b, int width, int height); +} UTVideoDSPContext; + +void ff_utvideodsp_init(UTVideoDSPContext *c); +void ff_utvideodsp_init_x86(UTVideoDSPContext *c); + +#endif /* AVCODEC_UTVIDEODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210dec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210dec.h new file mode 100644 index 00000000..662e2663 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210dec.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V210DEC_H +#define AVCODEC_V210DEC_H + +#include "libavutil/log.h" +#include "libavutil/opt.h" + + +typedef struct { + AVClass *av_class; + int custom_stride; + int aligned_input; + int thread_count; + int stride_warning_shown; + void (*unpack_frame)(const uint32_t *src, uint16_t *y, uint16_t *u, uint16_t *v, int width); +} V210DecContext; + +void ff_v210dec_init(V210DecContext *s); +void ff_v210_x86_init(V210DecContext *s); + +#endif /* AVCODEC_V210DEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210enc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210enc.h new file mode 100644 index 00000000..51305c1a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v210enc.h @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V210ENC_H +#define AVCODEC_V210ENC_H + +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/pixfmt.h" + +typedef struct V210EncContext { + void (*pack_line_8)(const uint8_t *y, const uint8_t *u, + const uint8_t *v, uint8_t *dst, ptrdiff_t width); + void (*pack_line_10)(const uint16_t *y, const uint16_t *u, + const uint16_t *v, uint8_t *dst, ptrdiff_t width); + int sample_factor_8; + int sample_factor_10; +} V210EncContext; + +void ff_v210enc_init(V210EncContext *s); + +void ff_v210enc_init_x86(V210EncContext *s); + +#endif /* AVCODEC_V210ENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_buffers.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_buffers.h new file mode 100644 index 00000000..8dbc7fc1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_buffers.h @@ -0,0 +1,131 @@ +/* + * V4L2 buffer helper functions. + * + * Copyright (C) 2017 Alexis Ballier + * Copyright (C) 2017 Jorge Ramirez + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V4L2_BUFFERS_H +#define AVCODEC_V4L2_BUFFERS_H + +#include +#include + +#include "avcodec.h" + +enum V4L2Buffer_status { + V4L2BUF_AVAILABLE, + V4L2BUF_IN_DRIVER, + V4L2BUF_RET_USER, +}; + +/** + * V4L2Buffer (wrapper for v4l2_buffer management) + */ +typedef struct V4L2Buffer { + /* each buffer needs to have a reference to its context */ + struct V4L2Context *context; + + /* This object is refcounted per-plane, so we need to keep track + * of how many context-refs we are holding. */ + AVBufferRef *context_ref; + atomic_uint context_refcount; + + /* keep track of the mmap address and mmap length */ + struct V4L2Plane_info { + int bytesperline; + void * mm_addr; + size_t length; + } plane_info[VIDEO_MAX_PLANES]; + + int num_planes; + + /* the v4l2_buffer buf.m.planes pointer uses the planes[] mem */ + struct v4l2_buffer buf; + struct v4l2_plane planes[VIDEO_MAX_PLANES]; + + int flags; + enum V4L2Buffer_status status; + +} V4L2Buffer; + +/** + * Extracts the data from a V4L2Buffer to an AVFrame + * + * @param[in] frame The AVFRame to push the information to + * @param[in] buf The V4L2Buffer to get the information from + * + * @returns 0 in case of success, AVERROR(EINVAL) if the number of planes is incorrect, + * AVERROR(ENOMEM) if the AVBufferRef can't be created. + */ +int ff_v4l2_buffer_buf_to_avframe(AVFrame *frame, V4L2Buffer *buf); + +/** + * Extracts the data from a V4L2Buffer to an AVPacket + * + * @param[in] pkt The AVPacket to push the information to + * @param[in] buf The V4L2Buffer to get the information from + * + * @returns 0 in case of success, AVERROR(EINVAL) if the number of planes is incorrect, + * AVERROR(ENOMEM) if the AVBufferRef can't be created. + * + */ +int ff_v4l2_buffer_buf_to_avpkt(AVPacket *pkt, V4L2Buffer *buf); + +/** + * Extracts the data from an AVPacket to a V4L2Buffer + * + * @param[in] frame AVPacket to get the data from + * @param[in] avbuf V4L2Bfuffer to push the information to + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +int ff_v4l2_buffer_avpkt_to_buf(const AVPacket *pkt, V4L2Buffer *out); + +/** + * Extracts the data from an AVFrame to a V4L2Buffer + * + * @param[in] frame AVFrame to get the data from + * @param[in] avbuf V4L2Bfuffer to push the information to + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +int ff_v4l2_buffer_avframe_to_buf(const AVFrame *frame, V4L2Buffer *out); + +/** + * Initializes a V4L2Buffer + * + * @param[in] avbuf V4L2Bfuffer to initialize + * @param[in] index v4l2 buffer id + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index); + +/** + * Enqueues a V4L2Buffer + * + * @param[in] avbuf V4L2Bfuffer to push to the driver + * + * @returns 0 in case of success, a negative AVERROR code otherwise + */ +int ff_v4l2_buffer_enqueue(V4L2Buffer* avbuf); + + +#endif // AVCODEC_V4L2_BUFFERS_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_context.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_context.h new file mode 100644 index 00000000..22a95324 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_context.h @@ -0,0 +1,186 @@ +/* + * V4L2 context helper functions. + * + * Copyright (C) 2017 Alexis Ballier + * Copyright (C) 2017 Jorge Ramirez + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V4L2_CONTEXT_H +#define AVCODEC_V4L2_CONTEXT_H + +#include +#include + +#include "libavcodec/avcodec.h" +#include "libavutil/pixfmt.h" +#include "libavutil/frame.h" +#include "libavutil/buffer.h" +#include "v4l2_buffers.h" + +typedef struct V4L2Context { + /** + * context name. + */ + const char* name; + + /** + * Type of this buffer context. + * See V4L2_BUF_TYPE_VIDEO_* in videodev2.h + * Readonly after init. + */ + enum v4l2_buf_type type; + + /** + * AVPixelFormat corresponding to this buffer context. + * AV_PIX_FMT_NONE means this is an encoded stream. + */ + enum AVPixelFormat av_pix_fmt; + + /** + * AVCodecID corresponding to this buffer context. + * AV_CODEC_ID_RAWVIDEO means this is a raw stream and av_pix_fmt must be set to a valid value. + */ + enum AVCodecID av_codec_id; + + /** + * Format returned by the driver after initializing the buffer context. + * Readonly after init. + */ + struct v4l2_format format; + + /** + * Width and height of the frames it produces (in case of a capture context, e.g. when decoding) + * or accepts (in case of an output context, e.g. when encoding). + */ + int width, height; + AVRational sample_aspect_ratio; + + /** + * Indexed array of V4L2Buffers + */ + V4L2Buffer *buffers; + + /** + * Readonly after init. + */ + int num_buffers; + + /** + * Whether the stream has been started (VIDIOC_STREAMON has been sent). + */ + int streamon; + + /** + * Either no more buffers available or an unrecoverable error was notified + * by the V4L2 kernel driver: once set the context has to be exited. + */ + int done; + +} V4L2Context; + +/** + * Initializes a V4L2Context. + * + * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. + * @return 0 in case of success, a negative value representing the error otherwise. + */ +int ff_v4l2_context_init(V4L2Context* ctx); + +/** + * Sets the V4L2Context format in the v4l2 driver. + * + * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. + * @return 0 in case of success, a negative value representing the error otherwise. + */ +int ff_v4l2_context_set_format(V4L2Context* ctx); + +/** + * Queries the driver for a valid v4l2 format and copies it to the context. + * + * @param[in] ctx A pointer to a V4L2Context. See V4L2Context description for required variables. + * @param[in] probe Probe only and ignore changes to the format. + * @return 0 in case of success, a negative value representing the error otherwise. + */ +int ff_v4l2_context_get_format(V4L2Context* ctx, int probe); + +/** + * Releases a V4L2Context. + * + * @param[in] ctx A pointer to a V4L2Context. + * The caller is reponsible for freeing it. + * It must not be used after calling this function. + */ +void ff_v4l2_context_release(V4L2Context* ctx); + +/** + * Sets the status of a V4L2Context. + * + * @param[in] ctx A pointer to a V4L2Context. + * @param[in] cmd The status to set (VIDIOC_STREAMON or VIDIOC_STREAMOFF). + * Warning: If VIDIOC_STREAMOFF is sent to a buffer context that still has some frames buffered, + * those frames will be dropped. + * @return 0 in case of success, a negative value representing the error otherwise. + */ +int ff_v4l2_context_set_status(V4L2Context* ctx, uint32_t cmd); + +/** + * Dequeues a buffer from a V4L2Context to an AVPacket. + * + * The pkt must be non NULL. + * @param[in] ctx The V4L2Context to dequeue from. + * @param[inout] pkt The AVPacket to dequeue to. + * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. + */ +int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt); + +/** + * Dequeues a buffer from a V4L2Context to an AVFrame. + * + * The frame must be non NULL. + * @param[in] ctx The V4L2Context to dequeue from. + * @param[inout] f The AVFrame to dequeue to. + * @param[in] timeout The timeout for dequeue (-1 to block, 0 to return immediately, or milliseconds) + * @return 0 in case of success, AVERROR(EAGAIN) if no buffer was ready, another negative error in case of error. + */ +int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout); + +/** + * Enqueues a buffer to a V4L2Context from an AVPacket + * + * The packet must be non NULL. + * When the size of the pkt is null, the buffer is not queued but a V4L2_DEC_CMD_STOP command is sent instead to the driver. + * + * @param[in] ctx The V4L2Context to enqueue to. + * @param[in] pkt A pointer to an AVPacket. + * @return 0 in case of success, a negative error otherwise. + */ +int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt); + +/** + * Enqueues a buffer to a V4L2Context from an AVFrame + * + * The frame must be non NULL. + * + * @param[in] ctx The V4L2Context to enqueue to. + * @param[in] f A pointer to an AVFrame to enqueue. + * @return 0 in case of success, a negative error otherwise. + */ +int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f); + +#endif // AVCODEC_V4L2_CONTEXT_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_fmt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_fmt.h new file mode 100644 index 00000000..01360029 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_fmt.h @@ -0,0 +1,34 @@ +/* + * V4L2 format helper functions + * + * Copyright (C) 2017 Alexis Ballier + * Copyright (C) 2017 Jorge Ramirez + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V4L2_FMT_H +#define AVCODEC_V4L2_FMT_H + +#include "libavcodec/avcodec.h" +#include "libavutil/pixfmt.h" + +enum AVPixelFormat ff_v4l2_format_v4l2_to_avfmt(uint32_t v4l2_fmt, enum AVCodecID avcodec); +uint32_t ff_v4l2_format_avcodec_to_v4l2(enum AVCodecID avcodec); +uint32_t ff_v4l2_format_avfmt_to_v4l2(enum AVPixelFormat avfmt); + +#endif /* AVCODEC_V4L2_FMT_H*/ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_m2m.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_m2m.h new file mode 100644 index 00000000..456281f4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/v4l2_m2m.h @@ -0,0 +1,129 @@ +/* + * V4L2 mem2mem helper functions + * + * Copyright (C) 2017 Alexis Ballier + * Copyright (C) 2017 Jorge Ramirez + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_V4L2_M2M_H +#define AVCODEC_V4L2_M2M_H + +#include +#include +#include +#include + +#include "libavcodec/avcodec.h" +#include "v4l2_context.h" + +#define container_of(ptr, type, member) ({ \ + const __typeof__(((type *)0)->member ) *__mptr = (ptr); \ + (type *)((char *)__mptr - offsetof(type,member) );}) + +#define V4L_M2M_DEFAULT_OPTS \ + { "num_output_buffers", "Number of buffers in the output context",\ + OFFSET(num_output_buffers), AV_OPT_TYPE_INT, { .i64 = 16 }, 6, INT_MAX, FLAGS } + +typedef struct V4L2m2mContext { + char devname[PATH_MAX]; + int fd; + + /* the codec context queues */ + V4L2Context capture; + V4L2Context output; + + /* dynamic stream reconfig */ + AVCodecContext *avctx; + sem_t refsync; + atomic_uint refcount; + int reinit; + + /* null frame/packet received */ + int draining; + AVPacket buf_pkt; + + /* Reference to self; only valid while codec is active. */ + AVBufferRef *self_ref; + + /* reference back to V4L2m2mPriv */ + void *priv; +} V4L2m2mContext; + +typedef struct V4L2m2mPriv { + AVClass *class; + + V4L2m2mContext *context; + AVBufferRef *context_ref; + + int num_output_buffers; + int num_capture_buffers; +} V4L2m2mPriv; + +/** + * Allocate a new context and references for a V4L2 M2M instance. + * + * @param[in] ctx The V4L2m2mPriv instantiated by the encoder/decoder. + * @param[out] ctx The V4L2m2mContext. + * + * @returns 0 in success, a negative error code otherwise. + */ +int ff_v4l2_m2m_create_context(V4L2m2mPriv *priv, V4L2m2mContext **s); + + +/** + * Probes the video nodes looking for the required codec capabilities. + * + * @param[in] ctx The V4L2m2mPriv instantiated by the encoder/decoder. + * + * @returns 0 if a driver is found, a negative number otherwise. + */ +int ff_v4l2_m2m_codec_init(V4L2m2mPriv *priv); + +/** + * Releases all the codec resources if all AVBufferRefs have been returned to the + * ctx. Otherwise keep the driver open. + * + * @param[in] The V4L2m2mPriv instantiated by the encoder/decoder. + * + * @returns 0 + * + */ +int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv); + +/** + * Reinitializes the V4L2m2mContext when the driver cannot continue processing + * with the capture parameters. + * + * @param[in] ctx The V4L2m2mContext instantiated by the encoder/decoder. + * + * @returns 0 in case of success, negative number otherwise + */ +int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *ctx); + +/** + * Reinitializes the V4L2m2mContext when the driver cannot continue processing + * with the any of the current V4L2Contexts (ie, changes in output and capture). + * + * @param[in] ctx The V4L2m2mContext instantiated by the encoder/decoder. + * + * @returns 0 in case of success, negative number otherwise + */ +int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *ctx); + +#endif /* AVCODEC_V4L2_M2M_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi.h new file mode 100644 index 00000000..2cf7da58 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi.h @@ -0,0 +1,86 @@ +/* + * Video Acceleration API (shared data between FFmpeg and the video player) + * HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1 + * + * Copyright (C) 2008-2009 Splitted-Desktop Systems + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VAAPI_H +#define AVCODEC_VAAPI_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_vaapi + * Public libavcodec VA API header. + */ + +#include +#include "libavutil/attributes.h" +#include "version.h" + +#if FF_API_STRUCT_VAAPI_CONTEXT + +/** + * @defgroup lavc_codec_hwaccel_vaapi VA API Decoding + * @ingroup lavc_codec_hwaccel + * @{ + */ + +/** + * This structure is used to share data between the FFmpeg library and + * the client video application. + * This shall be zero-allocated and available as + * AVCodecContext.hwaccel_context. All user members can be set once + * during initialization or through each AVCodecContext.get_buffer() + * function call. In any case, they must be valid prior to calling + * decoding functions. + * + * Deprecated: use AVCodecContext.hw_frames_ctx instead. + */ +struct attribute_deprecated vaapi_context { + /** + * Window system dependent data + * + * - encoding: unused + * - decoding: Set by user + */ + void *display; + + /** + * Configuration ID + * + * - encoding: unused + * - decoding: Set by user + */ + uint32_t config_id; + + /** + * Context ID (video decode pipeline) + * + * - encoding: unused + * - decoding: Set by user + */ + uint32_t context_id; +}; + +/* @} */ + +#endif /* FF_API_STRUCT_VAAPI_CONTEXT */ + +#endif /* AVCODEC_VAAPI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_decode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_decode.h new file mode 100644 index 00000000..6b415dd1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_decode.h @@ -0,0 +1,104 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VAAPI_DECODE_H +#define AVCODEC_VAAPI_DECODE_H + +#include + +#include "libavutil/frame.h" +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_vaapi.h" + +#include "avcodec.h" + +#include "version.h" +#if FF_API_STRUCT_VAAPI_CONTEXT +#include "vaapi.h" +#endif + +static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic) +{ + return (uintptr_t)pic->data[3]; +} + +enum { + MAX_PARAM_BUFFERS = 16, +}; + +typedef struct VAAPIDecodePicture { + VASurfaceID output_surface; + + int nb_param_buffers; + VABufferID param_buffers[MAX_PARAM_BUFFERS]; + + int nb_slices; + VABufferID *slice_buffers; + int slices_allocated; +} VAAPIDecodePicture; + +typedef struct VAAPIDecodeContext { + VAConfigID va_config; + VAContextID va_context; + +#if FF_API_STRUCT_VAAPI_CONTEXT +FF_DISABLE_DEPRECATION_WARNINGS + int have_old_context; + struct vaapi_context *old_context; + AVBufferRef *device_ref; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + + AVHWDeviceContext *device; + AVVAAPIDeviceContext *hwctx; + + AVHWFramesContext *frames; + AVVAAPIFramesContext *hwfc; + + enum AVPixelFormat surface_format; + int surface_count; + + VASurfaceAttrib pixel_format_attribute; +} VAAPIDecodeContext; + + +int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, + VAAPIDecodePicture *pic, + int type, + const void *data, + size_t size); + +int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, + VAAPIDecodePicture *pic, + const void *params_data, + size_t params_size, + const void *slice_data, + size_t slice_size); + +int ff_vaapi_decode_issue(AVCodecContext *avctx, + VAAPIDecodePicture *pic); +int ff_vaapi_decode_cancel(AVCodecContext *avctx, + VAAPIDecodePicture *pic); + +int ff_vaapi_decode_init(AVCodecContext *avctx); +int ff_vaapi_decode_uninit(AVCodecContext *avctx); + +int ff_vaapi_common_frame_params(AVCodecContext *avctx, + AVBufferRef *hw_frames_ctx); + +#endif /* AVCODEC_VAAPI_DECODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_encode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_encode.h new file mode 100644 index 00000000..1329f642 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_encode.h @@ -0,0 +1,462 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VAAPI_ENCODE_H +#define AVCODEC_VAAPI_ENCODE_H + +#include + +#include + +#if VA_CHECK_VERSION(1, 0, 0) +#include +#endif + +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_vaapi.h" + +#include "avcodec.h" +#include "hwconfig.h" + +struct VAAPIEncodeType; +struct VAAPIEncodePicture; + +enum { + MAX_CONFIG_ATTRIBUTES = 4, + MAX_GLOBAL_PARAMS = 4, + MAX_DPB_SIZE = 16, + MAX_PICTURE_REFERENCES = 2, + MAX_REORDER_DELAY = 16, + MAX_PARAM_BUFFER_SIZE = 1024, +}; + +extern const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[]; + +enum { + PICTURE_TYPE_IDR = 0, + PICTURE_TYPE_I = 1, + PICTURE_TYPE_P = 2, + PICTURE_TYPE_B = 3, +}; + +typedef struct VAAPIEncodeSlice { + int index; + int row_start; + int row_size; + int block_start; + int block_size; + void *priv_data; + void *codec_slice_params; +} VAAPIEncodeSlice; + +typedef struct VAAPIEncodePicture { + struct VAAPIEncodePicture *next; + + int64_t display_order; + int64_t encode_order; + int64_t pts; + int force_idr; + +#if VA_CHECK_VERSION(1, 0, 0) + // ROI regions. + VAEncROI *roi; +#else + void *roi; +#endif + + int type; + int b_depth; + int encode_issued; + int encode_complete; + + AVFrame *input_image; + VASurfaceID input_surface; + + AVFrame *recon_image; + VASurfaceID recon_surface; + + int nb_param_buffers; + VABufferID *param_buffers; + + AVBufferRef *output_buffer_ref; + VABufferID output_buffer; + + void *priv_data; + void *codec_picture_params; + + // Whether this picture is a reference picture. + int is_reference; + + // The contents of the DPB after this picture has been decoded. + // This will contain the picture itself if it is a reference picture, + // but not if it isn't. + int nb_dpb_pics; + struct VAAPIEncodePicture *dpb[MAX_DPB_SIZE]; + // The reference pictures used in decoding this picture. If they are + // used by later pictures they will also appear in the DPB. + int nb_refs; + struct VAAPIEncodePicture *refs[MAX_PICTURE_REFERENCES]; + // The previous reference picture in encode order. Must be in at least + // one of the reference list and DPB list. + struct VAAPIEncodePicture *prev; + // Reference count for other pictures referring to this one through + // the above pointers, directly from incomplete pictures and indirectly + // through completed pictures. + int ref_count[2]; + int ref_removed[2]; + + int nb_slices; + VAAPIEncodeSlice *slices; +} VAAPIEncodePicture; + +typedef struct VAAPIEncodeProfile { + // lavc profile value (FF_PROFILE_*). + int av_profile; + // Supported bit depth. + int depth; + // Number of components. + int nb_components; + // Chroma subsampling in width dimension. + int log2_chroma_w; + // Chroma subsampling in height dimension. + int log2_chroma_h; + // VAAPI profile value. + VAProfile va_profile; +} VAAPIEncodeProfile; + +enum { + RC_MODE_AUTO, + RC_MODE_CQP, + RC_MODE_CBR, + RC_MODE_VBR, + RC_MODE_ICQ, + RC_MODE_QVBR, + RC_MODE_AVBR, + RC_MODE_MAX = RC_MODE_AVBR, +}; + +typedef struct VAAPIEncodeRCMode { + // Mode from above enum (RC_MODE_*). + int mode; + // Name. + const char *name; + // Supported in the compile-time VAAPI version. + int supported; + // VA mode value (VA_RC_*). + uint32_t va_mode; + // Uses bitrate parameters. + int bitrate; + // Supports maxrate distinct from bitrate. + int maxrate; + // Uses quality value. + int quality; + // Supports HRD/VBV parameters. + int hrd; +} VAAPIEncodeRCMode; + +typedef struct VAAPIEncodeContext { + const AVClass *class; + + // Codec-specific hooks. + const struct VAAPIEncodeType *codec; + + // Global options. + + // Use low power encoding mode. + int low_power; + + // Number of I frames between IDR frames. + int idr_interval; + + // Desired B frame reference depth. + int desired_b_depth; + + // Explicitly set RC mode (otherwise attempt to pick from + // available modes). + int explicit_rc_mode; + + // Explicitly-set QP, for use with the "qp" options. + // (Forces CQP mode when set, overriding everything else.) + int explicit_qp; + + // Desired packed headers. + unsigned int desired_packed_headers; + + // The required size of surfaces. This is probably the input + // size (AVCodecContext.width|height) aligned up to whatever + // block size is required by the codec. + int surface_width; + int surface_height; + + // The block size for slice calculations. + int slice_block_width; + int slice_block_height; + + // Everything above this point must be set before calling + // ff_vaapi_encode_init(). + + // Chosen encoding profile details. + const VAAPIEncodeProfile *profile; + + // Chosen rate control mode details. + const VAAPIEncodeRCMode *rc_mode; + // RC quality level - meaning depends on codec and RC mode. + // In CQP mode this sets the fixed quantiser value. + int rc_quality; + + // Encoding profile (VAProfile*). + VAProfile va_profile; + // Encoding entrypoint (VAEntryoint*). + VAEntrypoint va_entrypoint; + // Rate control mode. + unsigned int va_rc_mode; + // Bitrate for codec-specific encoder parameters. + unsigned int va_bit_rate; + // Packed headers which will actually be sent. + unsigned int va_packed_headers; + + // Configuration attributes to use when creating va_config. + VAConfigAttrib config_attributes[MAX_CONFIG_ATTRIBUTES]; + int nb_config_attributes; + + VAConfigID va_config; + VAContextID va_context; + + AVBufferRef *device_ref; + AVHWDeviceContext *device; + AVVAAPIDeviceContext *hwctx; + + // The hardware frame context containing the input frames. + AVBufferRef *input_frames_ref; + AVHWFramesContext *input_frames; + + // The hardware frame context containing the reconstructed frames. + AVBufferRef *recon_frames_ref; + AVHWFramesContext *recon_frames; + + // Pool of (reusable) bitstream output buffers. + AVBufferPool *output_buffer_pool; + + // Global parameters which will be applied at the start of the + // sequence (includes rate control parameters below). + int global_params_type[MAX_GLOBAL_PARAMS]; + const void *global_params [MAX_GLOBAL_PARAMS]; + size_t global_params_size[MAX_GLOBAL_PARAMS]; + int nb_global_params; + + // Rate control parameters. + VAEncMiscParameterRateControl rc_params; + VAEncMiscParameterHRD hrd_params; + VAEncMiscParameterFrameRate fr_params; +#if VA_CHECK_VERSION(0, 36, 0) + VAEncMiscParameterBufferQualityLevel quality_params; +#endif + + // Per-sequence parameter structure (VAEncSequenceParameterBuffer*). + void *codec_sequence_params; + + // Per-sequence parameters found in the per-picture parameter + // structure (VAEncPictureParameterBuffer*). + void *codec_picture_params; + + // Current encoding window, in display (input) order. + VAAPIEncodePicture *pic_start, *pic_end; + // The next picture to use as the previous reference picture in + // encoding order. + VAAPIEncodePicture *next_prev; + + // Next input order index (display order). + int64_t input_order; + // Number of frames that output is behind input. + int64_t output_delay; + // Next encode order index. + int64_t encode_order; + // Number of frames decode output will need to be delayed. + int64_t decode_delay; + // Next output order index (in encode order). + int64_t output_order; + + // Timestamp handling. + int64_t first_pts; + int64_t dts_pts_diff; + int64_t ts_ring[MAX_REORDER_DELAY * 3]; + + // Slice structure. + int slice_block_rows; + int slice_block_cols; + int nb_slices; + int slice_size; + + // Frame type decision. + int gop_size; + int closed_gop; + int gop_per_idr; + int p_per_i; + int max_b_depth; + int b_per_p; + int force_idr; + int idr_counter; + int gop_counter; + int end_of_stream; + + // Whether the driver supports ROI at all. + int roi_allowed; + // Maximum number of regions supported by the driver. + int roi_max_regions; + // Quantisation range for offset calculations. Set by codec-specific + // code, as it may change based on parameters. + int roi_quant_range; + + // The encoder does not support cropping information, so warn about + // it the first time we encounter any nonzero crop fields. + int crop_warned; + // If the driver does not support ROI then warn the first time we + // encounter a frame with ROI side data. + int roi_warned; +} VAAPIEncodeContext; + +enum { + // Codec supports controlling the subdivision of pictures into slices. + FLAG_SLICE_CONTROL = 1 << 0, + // Codec only supports constant quality (no rate control). + FLAG_CONSTANT_QUALITY_ONLY = 1 << 1, + // Codec is intra-only. + FLAG_INTRA_ONLY = 1 << 2, + // Codec supports B-pictures. + FLAG_B_PICTURES = 1 << 3, + // Codec supports referencing B-pictures. + FLAG_B_PICTURE_REFERENCES = 1 << 4, + // Codec supports non-IDR key pictures (that is, key pictures do + // not necessarily empty the DPB). + FLAG_NON_IDR_KEY_PICTURES = 1 << 5, +}; + +typedef struct VAAPIEncodeType { + // List of supported profiles and corresponding VAAPI profiles. + // (Must end with FF_PROFILE_UNKNOWN.) + const VAAPIEncodeProfile *profiles; + + // Codec feature flags. + int flags; + + // Default quality for this codec - used as quantiser or RC quality + // factor depending on RC mode. + int default_quality; + + // Perform any extra codec-specific configuration after the + // codec context is initialised (set up the private data and + // add any necessary global parameters). + int (*configure)(AVCodecContext *avctx); + + // The size of any private data structure associated with each + // picture (can be zero if not required). + size_t picture_priv_data_size; + + // The size of the parameter structures: + // sizeof(VAEnc{type}ParameterBuffer{codec}). + size_t sequence_params_size; + size_t picture_params_size; + size_t slice_params_size; + + // Fill the parameter structures. + int (*init_sequence_params)(AVCodecContext *avctx); + int (*init_picture_params)(AVCodecContext *avctx, + VAAPIEncodePicture *pic); + int (*init_slice_params)(AVCodecContext *avctx, + VAAPIEncodePicture *pic, + VAAPIEncodeSlice *slice); + + // The type used by the packed header: this should look like + // VAEncPackedHeader{something}. + int sequence_header_type; + int picture_header_type; + int slice_header_type; + + // Write the packed header data to the provided buffer. + // The sequence header is also used to fill the codec extradata + // when the encoder is starting. + int (*write_sequence_header)(AVCodecContext *avctx, + char *data, size_t *data_len); + int (*write_picture_header)(AVCodecContext *avctx, + VAAPIEncodePicture *pic, + char *data, size_t *data_len); + int (*write_slice_header)(AVCodecContext *avctx, + VAAPIEncodePicture *pic, + VAAPIEncodeSlice *slice, + char *data, size_t *data_len); + + // Fill an extra parameter structure, which will then be + // passed to vaRenderPicture(). Will be called repeatedly + // with increasing index argument until AVERROR_EOF is + // returned. + int (*write_extra_buffer)(AVCodecContext *avctx, + VAAPIEncodePicture *pic, + int index, int *type, + char *data, size_t *data_len); + + // Write an extra packed header. Will be called repeatedly + // with increasing index argument until AVERROR_EOF is + // returned. + int (*write_extra_header)(AVCodecContext *avctx, + VAAPIEncodePicture *pic, + int index, int *type, + char *data, size_t *data_len); +} VAAPIEncodeType; + + +int ff_vaapi_encode_send_frame(AVCodecContext *avctx, const AVFrame *frame); +int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt); + +int ff_vaapi_encode_init(AVCodecContext *avctx); +int ff_vaapi_encode_close(AVCodecContext *avctx); + + +#define VAAPI_ENCODE_COMMON_OPTIONS \ + { "low_power", \ + "Use low-power encoding mode (only available on some platforms; " \ + "may not support all encoding features)", \ + OFFSET(common.low_power), AV_OPT_TYPE_BOOL, \ + { .i64 = 0 }, 0, 1, FLAGS }, \ + { "idr_interval", \ + "Distance (in I-frames) between IDR frames", \ + OFFSET(common.idr_interval), AV_OPT_TYPE_INT, \ + { .i64 = 0 }, 0, INT_MAX, FLAGS }, \ + { "b_depth", \ + "Maximum B-frame reference depth", \ + OFFSET(common.desired_b_depth), AV_OPT_TYPE_INT, \ + { .i64 = 1 }, 1, INT_MAX, FLAGS } + +#define VAAPI_ENCODE_RC_MODE(name, desc) \ + { #name, desc, 0, AV_OPT_TYPE_CONST, { .i64 = RC_MODE_ ## name }, \ + 0, 0, FLAGS, "rc_mode" } +#define VAAPI_ENCODE_RC_OPTIONS \ + { "rc_mode",\ + "Set rate control mode", \ + OFFSET(common.explicit_rc_mode), AV_OPT_TYPE_INT, \ + { .i64 = RC_MODE_AUTO }, RC_MODE_AUTO, RC_MODE_MAX, FLAGS, "rc_mode" }, \ + { "auto", "Choose mode automatically based on other parameters", \ + 0, AV_OPT_TYPE_CONST, { .i64 = RC_MODE_AUTO }, 0, 0, FLAGS, "rc_mode" }, \ + VAAPI_ENCODE_RC_MODE(CQP, "Constant-quality"), \ + VAAPI_ENCODE_RC_MODE(CBR, "Constant-bitrate"), \ + VAAPI_ENCODE_RC_MODE(VBR, "Variable-bitrate"), \ + VAAPI_ENCODE_RC_MODE(ICQ, "Intelligent constant-quality"), \ + VAAPI_ENCODE_RC_MODE(QVBR, "Quality-defined variable-bitrate"), \ + VAAPI_ENCODE_RC_MODE(AVBR, "Average variable-bitrate") + + +#endif /* AVCODEC_VAAPI_ENCODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_hevc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_hevc.h new file mode 100644 index 00000000..b3b0e6fc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vaapi_hevc.h @@ -0,0 +1,27 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VAAPI_HEVC_H +#define AVCODEC_VAAPI_HEVC_H + +#include +#include "avcodec.h" + +VAProfile ff_vaapi_parse_hevc_rext_profile(AVCodecContext *avctx); + +#endif /* AVCODEC_VAAPI_HEVC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1.h new file mode 100644 index 00000000..4559a06c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1.h @@ -0,0 +1,437 @@ +/* + * VC-1 and WMV3 decoder + * Copyright (c) 2006-2007 Konstantin Shishkov + * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VC1_H +#define AVCODEC_VC1_H + +#include "avcodec.h" +#include "h264chroma.h" +#include "mpegvideo.h" +#include "intrax8.h" +#include "vc1_common.h" +#include "vc1dsp.h" + +#define AC_VLC_BITS 9 + +/** Sequence quantizer mode */ +//@{ +enum QuantMode { + QUANT_FRAME_IMPLICIT, ///< Implicitly specified at frame level + QUANT_FRAME_EXPLICIT, ///< Explicitly specified at frame level + QUANT_NON_UNIFORM, ///< Non-uniform quant used for all frames + QUANT_UNIFORM ///< Uniform quant used for all frames +}; +//@} + +/** Where quant can be changed */ +//@{ +enum DQProfile { + DQPROFILE_FOUR_EDGES, + DQPROFILE_DOUBLE_EDGES, + DQPROFILE_SINGLE_EDGE, + DQPROFILE_ALL_MBS +}; +//@} + +/** @name Where quant can be changed + */ +//@{ +enum DQSingleEdge { + DQSINGLE_BEDGE_LEFT, + DQSINGLE_BEDGE_TOP, + DQSINGLE_BEDGE_RIGHT, + DQSINGLE_BEDGE_BOTTOM +}; +//@} + +/** Which pair of edges is quantized with ALTPQUANT */ +//@{ +enum DQDoubleEdge { + DQDOUBLE_BEDGE_TOPLEFT, + DQDOUBLE_BEDGE_TOPRIGHT, + DQDOUBLE_BEDGE_BOTTOMRIGHT, + DQDOUBLE_BEDGE_BOTTOMLEFT +}; +//@} + +/** MV modes for P-frames */ +//@{ +enum MVModes { + MV_PMODE_1MV_HPEL_BILIN, + MV_PMODE_1MV, + MV_PMODE_1MV_HPEL, + MV_PMODE_MIXED_MV, + MV_PMODE_INTENSITY_COMP +}; +//@} + +/** MBMODE for interlaced frame P-picture */ +//@{ +enum MBModesIntfr { + MV_PMODE_INTFR_1MV, + MV_PMODE_INTFR_2MV_FIELD, + MV_PMODE_INTFR_2MV, + MV_PMODE_INTFR_4MV_FIELD, + MV_PMODE_INTFR_4MV, + MV_PMODE_INTFR_INTRA, +}; +//@} + +/** @name MV types for B-frames */ +//@{ +enum BMVTypes { + BMV_TYPE_BACKWARD, + BMV_TYPE_FORWARD, + BMV_TYPE_INTERPOLATED, + BMV_TYPE_DIRECT +}; +//@} + +/** @name Block types for P/B-frames */ +//@{ +enum TransformTypes { + TT_8X8, + TT_8X4_BOTTOM, + TT_8X4_TOP, + TT_8X4, // both halves + TT_4X8_RIGHT, + TT_4X8_LEFT, + TT_4X8, // both halves + TT_4X4 +}; +//@} + +enum CodingSet { + CS_HIGH_MOT_INTRA = 0, + CS_HIGH_MOT_INTER, + CS_LOW_MOT_INTRA, + CS_LOW_MOT_INTER, + CS_MID_RATE_INTRA, + CS_MID_RATE_INTER, + CS_HIGH_RATE_INTRA, + CS_HIGH_RATE_INTER +}; + +/** @name Overlap conditions for Advanced Profile */ +//@{ +enum COTypes { + CONDOVER_NONE = 0, + CONDOVER_ALL, + CONDOVER_SELECT +}; +//@} + +/** + * FCM Frame Coding Mode + * @note some content might be marked interlaced + * but have fcm set to 0 as well (e.g. HD-DVD) + */ +enum FrameCodingMode { + PROGRESSIVE = 0, ///< in the bitstream is reported as 00b + ILACE_FRAME, ///< in the bitstream is reported as 10b + ILACE_FIELD ///< in the bitstream is reported as 11b +}; + +/** + * Imode types + * @{ + */ +enum Imode { + IMODE_RAW, + IMODE_NORM2, + IMODE_DIFF2, + IMODE_NORM6, + IMODE_DIFF6, + IMODE_ROWSKIP, + IMODE_COLSKIP +}; +/** @} */ //imode defines + +/** The VC1 Context + * @todo Change size wherever another size is more efficient + * Many members are only used for Advanced Profile + */ +typedef struct VC1Context{ + MpegEncContext s; + IntraX8Context x8; + H264ChromaContext h264chroma; + VC1DSPContext vc1dsp; + + /** Simple/Main Profile sequence header */ + //@{ + int res_sprite; ///< reserved, sprite mode + int res_y411; ///< reserved, old interlaced mode + int res_x8; ///< reserved + int multires; ///< frame-level RESPIC syntax element present + int res_fasttx; ///< reserved, always 1 + int res_transtab; ///< reserved, always 0 + int rangered; ///< RANGEREDFRM (range reduction) syntax element present + ///< at frame level + int res_rtm_flag; ///< reserved, set to 1 + int reserved; ///< reserved + //@} + + /** Advanced Profile */ + //@{ + int level; ///< 3 bits, for Advanced/Simple Profile, provided by TS layer + int chromaformat; ///< 2 bits, 2=4:2:0, only defined + int postprocflag; ///< Per-frame processing suggestion flag present + int broadcast; ///< TFF/RFF present + int interlace; ///< Progressive/interlaced (RPTFTM syntax element) + int tfcntrflag; ///< TFCNTR present + int panscanflag; ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present + int refdist_flag; ///< REFDIST syntax element present in II, IP, PI or PP field picture headers + int extended_dmv; ///< Additional extended dmv range at P/B-frame-level + int color_prim; ///< 8 bits, chroma coordinates of the color primaries + int transfer_char; ///< 8 bits, Opto-electronic transfer characteristics + int matrix_coef; ///< 8 bits, Color primaries->YCbCr transform matrix + int hrd_param_flag; ///< Presence of Hypothetical Reference + ///< Decoder parameters + int psf; ///< Progressive Segmented Frame + //@} + + /** Sequence header data for all Profiles + * TODO: choose between ints, uint8_ts and monobit flags + */ + //@{ + int profile; ///< 2 bits, Profile + int frmrtq_postproc; ///< 3 bits, + int bitrtq_postproc; ///< 5 bits, quantized framerate-based postprocessing strength + int max_coded_width, max_coded_height; + int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple) + int extended_mv; ///< Ext MV in P/B (not in Simple) + int dquant; ///< How qscale varies with MBs, 2 bits (not in Simple) + int vstransform; ///< variable-size [48]x[48] transform type + info + int overlap; ///< overlapped transforms in use + int quantizer_mode; ///< 2 bits, quantizer mode used for sequence, see QUANT_* + int finterpflag; ///< INTERPFRM present + //@} + + /** Frame decoding info for all profiles */ + //@{ + uint8_t mv_mode; ///< MV coding mode + uint8_t mv_mode2; ///< Secondary MV coding mode (B-frames) + int k_x; ///< Number of bits for MVs (depends on MV range) + int k_y; ///< Number of bits for MVs (depends on MV range) + int range_x, range_y; ///< MV range + uint8_t pq, altpq; ///< Current/alternate frame quantizer scale + uint8_t zz_8x8[4][64]; ///< Zigzag table for TT_8x8, permuted for IDCT + int left_blk_sh, top_blk_sh; ///< Either 3 or 0, positions of l/t in blk[] + const uint8_t* zz_8x4; ///< Zigzag scan table for TT_8x4 coding mode + const uint8_t* zz_4x8; ///< Zigzag scan table for TT_4x8 coding mode + /** pquant parameters */ + //@{ + uint8_t dquantfrm; + uint8_t dqprofile; + uint8_t dqsbedge; + uint8_t dqbilevel; + //@} + /** AC coding set indexes + * @see 8.1.1.10, p(1)10 + */ + //@{ + int c_ac_table_index; ///< Chroma index from ACFRM element + int y_ac_table_index; ///< Luma index from AC2FRM element + //@} + int ttfrm; ///< Transform type info present at frame level + uint8_t ttmbf; ///< Transform type flag + int *ttblk_base, *ttblk; ///< Transform type at the block level + int codingset; ///< index of current table set from 11.8 to use for luma block decoding + int codingset2; ///< index of current table set from 11.8 to use for chroma block decoding + int pqindex; ///< raw pqindex used in coding set selection + int a_avail, c_avail; + uint8_t *mb_type_base, *mb_type[3]; + + + /** Luma compensation parameters */ + //@{ + uint8_t lumscale; + uint8_t lumshift; + //@} + int16_t bfraction; ///< Relative position % anchors=> how to scale MVs + uint8_t halfpq; ///< Uniform quant over image and qp+.5 + uint8_t respic; ///< Frame-level flag for resized images + int buffer_fullness; ///< HRD info + /** Ranges: + * -# 0 -> [-64n 63.f] x [-32, 31.f] + * -# 1 -> [-128, 127.f] x [-64, 63.f] + * -# 2 -> [-512, 511.f] x [-128, 127.f] + * -# 3 -> [-1024, 1023.f] x [-256, 255.f] + */ + uint8_t mvrange; ///< Extended MV range flag + uint8_t pquantizer; ///< Uniform (over sequence) quantizer in use + VLC *cbpcy_vlc; ///< CBPCY VLC table + int tt_index; ///< Index for Transform Type tables (to decode TTMB) + uint8_t* mv_type_mb_plane; ///< bitplane for mv_type == (4MV) + uint8_t* direct_mb_plane; ///< bitplane for "direct" MBs + uint8_t* forward_mb_plane; ///< bitplane for "forward" MBs + int mv_type_is_raw; ///< mv type mb plane is not coded + int dmb_is_raw; ///< direct mb plane is raw + int fmb_is_raw; ///< forward mb plane is raw + int skip_is_raw; ///< skip mb plane is not coded + uint8_t last_luty[2][256], last_lutuv[2][256]; ///< lookup tables used for intensity compensation + uint8_t aux_luty[2][256], aux_lutuv[2][256]; ///< lookup tables used for intensity compensation + uint8_t next_luty[2][256], next_lutuv[2][256]; ///< lookup tables used for intensity compensation + uint8_t (*curr_luty)[256] ,(*curr_lutuv)[256]; + int last_use_ic, *curr_use_ic, next_use_ic, aux_use_ic; + int rnd; ///< rounding control + int cbptab; + + /** Frame decoding info for S/M profiles only */ + //@{ + uint8_t rangeredfrm; ///< out_sample = CLIP((in_sample-128)*2+128) + uint8_t interpfrm; + //@} + + /** Frame decoding info for Advanced profile */ + //@{ + enum FrameCodingMode fcm; + uint8_t numpanscanwin; + uint8_t tfcntr; + uint8_t rptfrm, tff, rff; + uint16_t topleftx; + uint16_t toplefty; + uint16_t bottomrightx; + uint16_t bottomrighty; + uint8_t uvsamp; + uint8_t postproc; + int hrd_num_leaky_buckets; + uint8_t bit_rate_exponent; + uint8_t buffer_size_exponent; + uint8_t* acpred_plane; ///< AC prediction flags bitplane + int acpred_is_raw; + uint8_t* over_flags_plane; ///< Overflags bitplane + int overflg_is_raw; + uint8_t condover; + uint16_t *hrd_rate, *hrd_buffer; + uint8_t *hrd_fullness; + uint8_t range_mapy_flag; + uint8_t range_mapuv_flag; + uint8_t range_mapy; + uint8_t range_mapuv; + //@} + + /** Frame decoding info for interlaced picture */ + uint8_t dmvrange; ///< Extended differential MV range flag + int fourmvswitch; + int intcomp; + uint8_t lumscale2; ///< for interlaced field P picture + uint8_t lumshift2; + VLC* mbmode_vlc; + VLC* imv_vlc; + VLC* twomvbp_vlc; + VLC* fourmvbp_vlc; + uint8_t twomvbp; + uint8_t fourmvbp; + uint8_t* fieldtx_plane; + int fieldtx_is_raw; + uint8_t zzi_8x8[64]; + uint8_t *blk_mv_type_base, *blk_mv_type; ///< 0: frame MV, 1: field MV (interlaced frame) + uint8_t *mv_f_base, *mv_f[2]; ///< 0: MV obtained from same field, 1: opposite field + uint8_t *mv_f_next_base, *mv_f_next[2]; + int field_mode; ///< 1 for interlaced field pictures + int fptype; + int second_field; + int refdist; ///< distance of the current picture from reference + int numref; ///< number of past field pictures used as reference + // 0 corresponds to 1 and 1 corresponds to 2 references + int reffield; ///< if numref = 0 (1 reference) then reffield decides which + // field to use among the two fields from previous frame + int intcompfield; ///< which of the two fields to be intensity compensated + // 0: both fields, 1: bottom field, 2: top field + int cur_field_type; ///< 0: top, 1: bottom + int ref_field_type[2]; ///< forward and backward reference field type (top or bottom) + int blocks_off, mb_off; + int qs_last; ///< if qpel has been used in the previous (tr.) picture + int bmvtype; + int frfd, brfd; ///< reference frame distance (forward or backward) + int first_pic_header_flag; + int pic_header_flag; + int mbmodetab; + int icbptab; + int imvtab; + int twomvbptab; + int fourmvbptab; + + /** Frame decoding info for sprite modes */ + //@{ + int new_sprite; + int two_sprites; + AVFrame *sprite_output_frame; + int output_width, output_height, sprite_width, sprite_height; + uint8_t* sr_rows[2][2]; ///< Sprite resizer line cache + //@} + + int p_frame_skipped; + int bi_type; + int x8_type; + + int16_t (*block)[6][64]; + int n_allocated_blks, cur_blk_idx, left_blk_idx, topleft_blk_idx, top_blk_idx; + uint32_t *cbp_base, *cbp; + uint8_t *is_intra_base, *is_intra; + int16_t (*luma_mv_base)[2], (*luma_mv)[2]; + uint8_t bfraction_lut_index; ///< Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[]) + uint8_t broken_link; ///< Broken link flag (BROKEN_LINK syntax element) + uint8_t closed_entry; ///< Closed entry point flag (CLOSED_ENTRY syntax element) + + int end_mb_x; ///< Horizontal macroblock limit (used only by mss2) + + int parse_only; ///< Context is used within parser + int resync_marker; ///< could this stream contain resync markers +} VC1Context; + +/** + * Decode Simple/Main Profiles sequence header + * @see Figure 7-8, p16-17 + * @param avctx Codec context + * @param gb GetBit context initialized from Codec context extra_data + * @return Status + */ +int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); + +int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContext *gb); + +int ff_vc1_parse_frame_header (VC1Context *v, GetBitContext *gb); +int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext *gb); +int ff_vc1_init_common(VC1Context *v); + +int ff_vc1_decode_init_alloc_tables(VC1Context *v); +void ff_vc1_init_transposed_scantables(VC1Context *v); +int ff_vc1_decode_end(AVCodecContext *avctx); +void ff_vc1_decode_blocks(VC1Context *v); + +void ff_vc1_i_overlap_filter(VC1Context *v); +void ff_vc1_p_overlap_filter(VC1Context *v); +void ff_vc1_i_loop_filter(VC1Context *v); +void ff_vc1_p_loop_filter(VC1Context *v); +void ff_vc1_p_intfr_loop_filter(VC1Context *v); +void ff_vc1_b_intfi_loop_filter(VC1Context *v); + +void ff_vc1_mc_1mv(VC1Context *v, int dir); +void ff_vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg); +void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir); +void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg); + +void ff_vc1_interp_mc(VC1Context *v); + +#endif /* AVCODEC_VC1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_common.h new file mode 100644 index 00000000..b46c33f7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_common.h @@ -0,0 +1,90 @@ +/* + * VC-1 and WMV3 decoder + * Copyright (c) 2006-2007 Konstantin Shishkov + * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VC1_COMMON_H +#define AVCODEC_VC1_COMMON_H + +#include + +#include "libavutil/attributes.h" +#include "internal.h" + +/** Markers used in VC-1 AP frame data */ +//@{ +enum VC1Code { + VC1_CODE_RES0 = 0x00000100, + VC1_CODE_ENDOFSEQ = 0x0000010A, + VC1_CODE_SLICE, + VC1_CODE_FIELD, + VC1_CODE_FRAME, + VC1_CODE_ENTRYPOINT, + VC1_CODE_SEQHDR, +}; +//@} + +#define IS_MARKER(x) (((x) & ~0xFF) == VC1_CODE_RES0) + +/** Available Profiles */ +//@{ +enum Profile { + PROFILE_SIMPLE, + PROFILE_MAIN, + PROFILE_COMPLEX, ///< TODO: WMV9 specific + PROFILE_ADVANCED +}; +//@} + +/** Find VC-1 marker in buffer + * @return position where next marker starts or end of buffer if no marker found + */ +static av_always_inline const uint8_t* find_next_marker(const uint8_t *src, const uint8_t *end) +{ + if (end - src >= 4) { + uint32_t mrk = 0xFFFFFFFF; + src = avpriv_find_start_code(src, end, &mrk); + if (IS_MARKER(mrk)) + return src - 4; + } + return end; +} + +static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, uint8_t *dst) +{ + int dsize = 0, i; + + if (size < 4) { + for (dsize = 0; dsize < size; dsize++) + *dst++ = *src++; + return size; + } + for (i = 0; i < size; i++, src++) { + if (src[0] == 3 && i >= 2 && !src[-1] && !src[-2] && i < size-1 && src[1] < 4) { + dst[dsize++] = src[1]; + src++; + i++; + } else + dst[dsize++] = *src; + } + return dsize; +} + +#endif /* AVCODEC_VC1_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_pred.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_pred.h new file mode 100644 index 00000000..4d47f866 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1_pred.h @@ -0,0 +1,59 @@ +/* + * VC-1 and WMV3 decoder + * Copyright (c) 2006-2007 Konstantin Shishkov + * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VC1_PRED_H +#define AVCODEC_VC1_PRED_H + +#include "vc1.h" +#include "vc1data.h" + +void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, + int mv1, int r_x, int r_y, uint8_t* is_intra, + int pred_flag, int dir); +void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, + int mvn, int r_x, int r_y, uint8_t* is_intra, + int dir); +void ff_vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], + int direct, int mvtype); +void ff_vc1_pred_b_mv_intfi(VC1Context *v, int n, int *dmv_x, int *dmv_y, + int mv1, int *pred_flag); + +static av_always_inline int scale_mv(int value, int bfrac, int inv, int qs) +{ + int n = bfrac; + +#if B_FRACTION_DEN==256 + if (inv) + n -= 256; + if (!qs) + return 2 * ((value * n + 255) >> 9); + return (value * n + 128) >> 8; +#else + if (inv) + n -= B_FRACTION_DEN; + if (!qs) + return 2 * ((value * n + B_FRACTION_DEN - 1) / (2 * B_FRACTION_DEN)); + return (value * n + B_FRACTION_DEN/2) / B_FRACTION_DEN; +#endif +} + +#endif /* AVCODEC_VC1_PRED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1acdata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1acdata.h new file mode 100644 index 00000000..a70b44ae --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1acdata.h @@ -0,0 +1,367 @@ +/* + * VC-1 and WMV3 decoder + * copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VC1ACDATA_H +#define AVCODEC_VC1ACDATA_H + +#include + +#include "vc1data.h" + +/* which indexes point to last=1 entries in tables */ +static const int vc1_last_decode_table[AC_MODES] = { + 119, 99, 85, 81, 67, 58, 126, 109 +}; + +static const uint8_t vc1_index_decode_table[AC_MODES][185][2] = { +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 0, 17}, { 0, 18}, { 0, 19}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, +{ 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, +{ 1, 14}, { 1, 15}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 2, 6}, +{ 2, 7}, { 2, 8}, { 2, 9}, { 2, 10}, { 2, 11}, { 2, 12}, { 3, 1}, { 3, 2}, +{ 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, { 3, 7}, { 3, 8}, { 3, 9}, { 3, 10}, +{ 3, 11}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 4, 6}, { 5, 1}, +{ 5, 2}, { 5, 3}, { 5, 4}, { 5, 5}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, +{ 7, 1}, { 7, 2}, { 7, 3}, { 7, 4}, { 8, 1}, { 8, 2}, { 8, 3}, { 8, 4}, +{ 9, 1}, { 9, 2}, { 9, 3}, { 9, 4}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, +{ 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, { 12, 3}, { 13, 1}, { 13, 2}, { 13, 3}, +{ 14, 1}, { 14, 2}, { 14, 3}, { 15, 1}, { 15, 2}, { 15, 3}, { 16, 1}, { 16, 2}, +{ 17, 1}, { 17, 2}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, +{ 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 0, 1}, +{ 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 1, 1}, { 1, 2}, { 1, 3}, +{ 1, 4}, { 1, 5}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, +{ 3, 3}, { 3, 4}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 6, 1}, +{ 6, 2}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, +{ 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, +{ 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, +{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, +{ 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1}, +{ 37, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 1, 1}, +{ 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, +{ 1, 10}, { 1, 11}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 2, 6}, +{ 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, +{ 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 5, 1}, { 5, 2}, +{ 5, 3}, { 5, 4}, { 5, 5}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, +{ 7, 2}, { 7, 3}, { 7, 4}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, +{ 9, 3}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, { 11, 2}, { 11, 3}, { 12, 1}, +{ 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, +{ 16, 2}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, +{ 24, 1}, { 25, 1}, { 26, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, +{ 0, 6}, { 0, 7}, { 0, 8}, { 0, 9}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, +{ 1, 5}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, { 3, 3}, +{ 3, 4}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, +{ 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, +{ 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, +{ 14, 1}, { 14, 2}, { 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, +{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, +{ 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, +{ 1, 9}, { 1, 10}, { 1, 11}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, +{ 2, 6}, { 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 3, 5}, +{ 3, 6}, { 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, { 5, 1}, +{ 5, 2}, { 5, 3}, { 5, 4}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, +{ 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, +{ 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, { 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, +{ 12, 3}, { 13, 1}, { 13, 2}, { 13, 3}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, +{ 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 0, 1}, { 0, 2}, { 0, 3}, +{ 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 2, 1}, { 2, 2}, { 2, 3}, +{ 3, 1}, { 3, 2}, { 3, 3}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, +{ 6, 2}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, +{ 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, +{ 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, +{ 23, 1}, { 24, 1}, { 25, 1}, { 26, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 1, 1}, { 1, 2}, +{ 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 2, 1}, +{ 2, 2}, { 2, 3}, { 2, 4}, { 2, 5}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, +{ 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, +{ 6, 1}, { 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, +{ 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, { 10, 1}, { 10, 2}, { 10, 3}, { 11, 1}, +{ 11, 2}, { 11, 3}, { 12, 1}, { 12, 2}, { 12, 3}, { 13, 1}, { 13, 2}, { 14, 1}, +{ 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, +{ 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, +{ 29, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 1, 1}, { 1, 2}, +{ 1, 3}, { 1, 4}, { 2, 1}, { 2, 2}, { 2, 3}, { 3, 1}, { 3, 2}, { 3, 3}, +{ 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, { 7, 1}, { 7, 2}, +{ 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, +{ 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, +{ 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, +{ 24, 1}, { 25, 1}, { 26, 1}, { 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 31, 1}, +{ 32, 1}, { 33, 1}, { 34, 1}, { 35, 1}, { 36, 1}, { 37, 1}, { 38, 1}, { 39, 1}, +{ 40, 1}, { 41, 1}, { 42, 1}, { 43, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, +{ 0, 25}, { 0, 26}, { 0, 27}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, +{ 1, 6}, { 1, 7}, { 1, 8}, { 1, 9}, { 1, 10}, { 2, 1}, { 2, 2}, { 2, 3}, +{ 2, 4}, { 2, 5}, { 3, 1}, { 3, 2}, { 3, 3}, { 3, 4}, { 4, 1}, { 4, 2}, +{ 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, { 6, 2}, { 6, 3}, { 7, 1}, +{ 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 11, 1}, +{ 12, 1}, { 13, 1}, { 14, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, +{ 0, 6}, { 0, 7}, { 0, 8}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, +{ 3, 1}, { 3, 2}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, +{ 7, 1}, { 8, 1}, { 9, 1}, { 10, 1}, { 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, +{ 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, { 19, 1}, { 20, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, +{ 1, 5}, { 1, 6}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, { 3, 1}, { 3, 2}, +{ 3, 3}, { 4, 1}, { 4, 2}, { 4, 3}, { 5, 1}, { 5, 2}, { 5, 3}, { 6, 1}, +{ 6, 2}, { 6, 3}, { 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, +{ 10, 1}, { 10, 2}, { 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, { 15, 1}, { 16, 1}, +{ 17, 1}, { 18, 1}, { 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, +{ 25, 1}, { 26, 1}, { 0, 1}, { 0, 2}, { 0, 3}, { 1, 1}, { 1, 2}, { 2, 1}, +{ 3, 1}, { 4, 1}, { 5, 1}, { 6, 1}, { 7, 1}, { 8, 1}, { 9, 1}, { 10, 1}, +{ 11, 1}, { 12, 1}, { 13, 1}, { 14, 1}, { 15, 1}, { 16, 1}, { 17, 1}, { 18, 1}, +{ 19, 1}, { 20, 1}, { 21, 1}, { 22, 1}, { 23, 1}, { 24, 1}, { 25, 1}, { 26, 1}, +{ 27, 1}, { 28, 1}, { 29, 1}, { 30, 1}, { 31, 1}, { 32, 1}, { 33, 1}, { 34, 1}, +{ 35, 1}, { 36, 1}, { 37, 1}, { 38, 1}, { 39, 1}, { 40, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, +{ 0, 25}, { 0, 26}, { 0, 27}, { 0, 28}, { 0, 29}, { 0, 30}, { 0, 31}, { 0, 32}, +{ 0, 33}, { 0, 34}, { 0, 35}, { 0, 36}, { 0, 37}, { 0, 38}, { 0, 39}, { 0, 40}, +{ 0, 41}, { 0, 42}, { 0, 43}, { 0, 44}, { 0, 45}, { 0, 46}, { 0, 47}, { 0, 48}, +{ 0, 49}, { 0, 50}, { 0, 51}, { 0, 52}, { 0, 53}, { 0, 54}, { 0, 55}, { 0, 56}, +{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, +{ 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, { 1, 14}, { 1, 15}, { 1, 16}, +{ 1, 17}, { 1, 18}, { 1, 19}, { 1, 20}, { 2, 1}, { 2, 2}, { 2, 3}, { 2, 4}, +{ 2, 5}, { 2, 6}, { 2, 7}, { 2, 8}, { 2, 9}, { 2, 10}, { 3, 1}, { 3, 2}, +{ 3, 3}, { 3, 4}, { 3, 5}, { 3, 6}, { 3, 7}, { 4, 1}, { 4, 2}, { 4, 3}, +{ 4, 4}, { 4, 5}, { 4, 6}, { 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, { 5, 5}, +{ 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, { 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, +{ 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, { 9, 3}, { 10, 1}, { 10, 2}, { 11, 1}, +{ 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 0, 1}, { 0, 2}, +{ 0, 3}, { 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 3}, +{ 3, 1}, { 3, 2}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, +{ 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, +{ 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, +{ 15, 1}, { 16, 1} +}, +{ +{ 0, 1}, { 0, 2}, { 0, 3}, { 0, 4}, { 0, 5}, { 0, 6}, { 0, 7}, { 0, 8}, +{ 0, 9}, { 0, 10}, { 0, 11}, { 0, 12}, { 0, 13}, { 0, 14}, { 0, 15}, { 0, 16}, +{ 0, 17}, { 0, 18}, { 0, 19}, { 0, 20}, { 0, 21}, { 0, 22}, { 0, 23}, { 0, 24}, +{ 0, 25}, { 0, 26}, { 0, 27}, { 0, 28}, { 0, 29}, { 0, 30}, { 0, 31}, { 0, 32}, +{ 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 5}, { 1, 6}, { 1, 7}, { 1, 8}, +{ 1, 9}, { 1, 10}, { 1, 11}, { 1, 12}, { 1, 13}, { 2, 1}, { 2, 2}, { 2, 3}, +{ 2, 4}, { 2, 5}, { 2, 6}, { 2, 7}, { 2, 8}, { 3, 1}, { 3, 2}, { 3, 3}, +{ 3, 4}, { 3, 5}, { 3, 6}, { 4, 1}, { 4, 2}, { 4, 3}, { 4, 4}, { 4, 5}, +{ 5, 1}, { 5, 2}, { 5, 3}, { 5, 4}, { 6, 1}, { 6, 2}, { 6, 3}, { 6, 4}, +{ 7, 1}, { 7, 2}, { 7, 3}, { 8, 1}, { 8, 2}, { 8, 3}, { 9, 1}, { 9, 2}, +{ 9, 3}, { 10, 1}, { 10, 2}, { 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, +{ 13, 2}, { 14, 1}, { 14, 2}, { 15, 1}, { 15, 2}, { 16, 1}, { 16, 2}, { 17, 1}, +{ 17, 2}, { 18, 1}, { 18, 2}, { 19, 1}, { 19, 2}, { 20, 1}, { 20, 2}, { 21, 1}, +{ 21, 2}, { 22, 1}, { 22, 2}, { 23, 1}, { 24, 1}, { 0, 1}, { 0, 2}, { 0, 3}, +{ 0, 4}, { 1, 1}, { 1, 2}, { 1, 3}, { 2, 1}, { 2, 2}, { 2, 3}, { 3, 1}, +{ 3, 2}, { 3, 3}, { 4, 1}, { 4, 2}, { 5, 1}, { 5, 2}, { 6, 1}, { 6, 2}, +{ 7, 1}, { 7, 2}, { 8, 1}, { 8, 2}, { 9, 1}, { 9, 2}, { 10, 1}, { 10, 2}, +{ 11, 1}, { 11, 2}, { 12, 1}, { 12, 2}, { 13, 1}, { 13, 2}, { 14, 1}, { 14, 2}, +{ 15, 1}, { 15, 2}, { 16, 1}, { 16, 2}, { 17, 1}, { 17, 2}, { 18, 1}, { 18, 2}, +{ 19, 1}, { 19, 2}, { 20, 1}, { 20, 2}, { 21, 1}, { 21, 2}, { 22, 1}, { 22, 2}, +{ 23, 1}, { 23, 2}, { 24, 1}, { 24, 2}, { 25, 1}, { 25, 2}, { 26, 1}, { 26, 2}, +{ 27, 1}, { 27, 2}, { 28, 1}, { 28, 2}, { 29, 1}, { 30, 1} +} +}; + +static const uint8_t vc1_delta_level_table[AC_MODES][31] = { +{ + 19, 15, 12, 11, 6, 5, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}, +{ + 23, 11, 8, 7, 5, 5, 4, 4, 3, 3, + 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 +}, +{ + 16, 11, 8, 7, 5, 4, 4, 3, 3, 3, + 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, + 1 +}, +{ + 14, 9, 5, 4, 4, 4, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}, +{ + 27, 10, 5, 4, 3, 3, 3, 3, 2, 2, + 1, 1, 1, 1, 1 +}, +{ + 12, 6, 4, 3, 3, 3, 3, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 +}, +{ + 56, 20, 10, 7, 6, 5, 4, 3, 3, 3, + 2, 2, 2, 2, 1 +}, +{ + 32, 13, 8, 6, 5, 4, 4, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 1, 1 +} +}; + +static const uint8_t vc1_last_delta_level_table[AC_MODES][44] = { +{ + 6, 5, 4, 4, 3, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1 +}, +{ + 9, 5, 4, 4, 3, 3, 3, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 +}, +{ + 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 +}, +{ + 5, 4, 3, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1 +}, +{ + 8, 3, 2, 2, 2, 2, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}, +{ + 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1 +}, +{ + 4, 3, 3, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 1, 1 +}, +{ + 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 1 +} +}; + +static const uint8_t vc1_delta_run_table[AC_MODES][57] = { +{ + -1, 30, 17, 15, 9, 5, 4, 3, 3, 3, + 3, 3, 2, 1, 1, 1, 0, 0, 0, + 0 +}, +{ + -1, 26, 16, 11, 7, 5, 3, 3, 2, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 +}, +{ + -1, 20, 15, 13, 6, 4, 3, 3, 2, 1, + 1, 1, 0, 0, 0, 0, 0 +}, +{ + -1, 29, 15, 12, 5, 2, 1, 1, 1, 1, + 0, 0, 0, 0, 0 +}, +{ + -1, 14, 9, 7, 3, 2, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}, +{ + -1, 26, 10, 6, 2, 1, 1, 0, 0, 0, + 0, 0, 0 +}, +{ + -1, 14, 13, 9, 6, 5, 4, 3, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 +}, +{ + -1, 24, 22, 9, 6, 4, 3, 2, 2, 1, + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0 +} +}; + +static const uint8_t vc1_last_delta_run_table[AC_MODES][10] = { +{ + -1, 37, 15, 4, 3, 1, 0 +}, +{ + -1, 36, 14, 6, 3, 1, 0, 0, 0, + 0 +}, +{ + -1, 26, 13, 3, 1 +}, +{ + -1, 43, 15, 3, 1, 0 +}, +{ + -1, 20, 6, 1, 0, 0, 0, 0, 0 +}, +{ + -1, 40, 1, 0 +}, +{ + -1, 16, 14, 2, 0 +}, +{ + -1, 30, 28, 3, 0 +} +}; + +#endif /* AVCODEC_VC1ACDATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1data.h new file mode 100644 index 00000000..90dd8baf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1data.h @@ -0,0 +1,208 @@ +/* + * VC-1 and WMV3 decoder + * copyright (c) 2006 Konstantin Shishkov + * (c) 2005 anonymous, Alex Beregszaszi, Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VC-1 tables. + */ + +#ifndef AVCODEC_VC1DATA_H +#define AVCODEC_VC1DATA_H + +#include + +#include "libavutil/rational.h" + +#include "vlc.h" + +/** Table for conversion between TTBLK and TTMB */ +extern const int ff_vc1_ttblk_to_tt[3][8]; + +extern const int ff_vc1_ttfrm_to_tt[4]; + +/** MV P mode - the 5th element is only used for mode 1 */ +extern const uint8_t ff_vc1_mv_pmode_table[2][5]; +extern const uint8_t ff_vc1_mv_pmode_table2[2][4]; + +extern const int ff_vc1_fps_nr[7], ff_vc1_fps_dr[2]; +extern const uint8_t ff_vc1_pquant_table[3][32]; + +/* MBMODE table for interlaced frame P-picture */ +extern const uint8_t ff_vc1_mbmode_intfrp[2][15][4]; + +/** @name VC-1 VLC tables and defines + * @todo TODO move this into the context + */ +//@{ +#define VC1_BFRACTION_VLC_BITS 7 +extern VLC ff_vc1_bfraction_vlc; +#define VC1_IMODE_VLC_BITS 4 +extern VLC ff_vc1_imode_vlc; +#define VC1_NORM2_VLC_BITS 3 +extern VLC ff_vc1_norm2_vlc; +#define VC1_NORM6_VLC_BITS 9 +extern VLC ff_vc1_norm6_vlc; +/* Could be optimized, one table only needs 8 bits */ +#define VC1_TTMB_VLC_BITS 9 //12 +extern VLC ff_vc1_ttmb_vlc[3]; +#define VC1_MV_DIFF_VLC_BITS 9 //15 +extern VLC ff_vc1_mv_diff_vlc[4]; +#define VC1_CBPCY_P_VLC_BITS 9 //14 +extern VLC ff_vc1_cbpcy_p_vlc[4]; +#define VC1_ICBPCY_VLC_BITS 9 +extern VLC ff_vc1_icbpcy_vlc[8]; +#define VC1_4MV_BLOCK_PATTERN_VLC_BITS 6 +extern VLC ff_vc1_4mv_block_pattern_vlc[4]; +#define VC1_2MV_BLOCK_PATTERN_VLC_BITS 3 +extern VLC ff_vc1_2mv_block_pattern_vlc[4]; +#define VC1_TTBLK_VLC_BITS 5 +extern VLC ff_vc1_ttblk_vlc[3]; +#define VC1_SUBBLKPAT_VLC_BITS 6 +extern VLC ff_vc1_subblkpat_vlc[3]; +#define VC1_INTFR_4MV_MBMODE_VLC_BITS 9 +extern VLC ff_vc1_intfr_4mv_mbmode_vlc[4]; +#define VC1_INTFR_NON4MV_MBMODE_VLC_BITS 6 +extern VLC ff_vc1_intfr_non4mv_mbmode_vlc[4]; +#define VC1_IF_MMV_MBMODE_VLC_BITS 5 +extern VLC ff_vc1_if_mmv_mbmode_vlc[8]; +#define VC1_IF_1MV_MBMODE_VLC_BITS 5 +extern VLC ff_vc1_if_1mv_mbmode_vlc[8]; +#define VC1_1REF_MVDATA_VLC_BITS 9 +extern VLC ff_vc1_1ref_mvdata_vlc[4]; +#define VC1_2REF_MVDATA_VLC_BITS 9 +extern VLC ff_vc1_2ref_mvdata_vlc[8]; + +extern VLC ff_vc1_ac_coeff_table[8]; + +#define VC1_IF_MBMODE_VLC_BITS 5 +//@} + +#define B_FRACTION_DEN 256 + +/* pre-computed scales for all bfractions and base=256 */ +extern const int16_t ff_vc1_bfraction_lut[23]; +extern const uint8_t ff_vc1_bfraction_bits[23]; +extern const uint8_t ff_vc1_bfraction_codes[23]; + +//Same as H.264 +extern const AVRational ff_vc1_pixel_aspect[16]; + +/* BitPlane IMODE - such a small table... */ +extern const uint8_t ff_vc1_imode_codes[7]; +extern const uint8_t ff_vc1_imode_bits[7]; + +/* Normal-2 imode */ +extern const uint8_t ff_vc1_norm2_codes[4]; +extern const uint8_t ff_vc1_norm2_bits[4]; +extern const uint16_t ff_vc1_norm6_codes[64]; +extern const uint8_t ff_vc1_norm6_bits[64]; +/* Normal-6 imode */ +extern const uint8_t ff_vc1_norm6_spec[64][5]; + +/* 4MV Block pattern VLC tables */ +extern const uint8_t ff_vc1_4mv_block_pattern_codes[4][16]; +extern const uint8_t ff_vc1_4mv_block_pattern_bits[4][16]; + +/* 2MV Block pattern VLC tables */ +extern const uint8_t ff_vc1_2mv_block_pattern_codes[4][4]; +extern const uint8_t ff_vc1_2mv_block_pattern_bits[4][4]; + +extern const uint8_t ff_wmv3_dc_scale_table[32]; + +/* P-Picture CBPCY VLC tables */ +extern const uint16_t ff_vc1_cbpcy_p_codes[4][64]; +extern const uint8_t ff_vc1_cbpcy_p_bits[4][64]; + +/* Interlaced CBPCY VLC tables (Table 124 - Table 131) */ +extern const uint16_t ff_vc1_icbpcy_p_codes[8][63]; +extern const uint8_t ff_vc1_icbpcy_p_bits[8][63]; + +/* MacroBlock Transform Type: 7.1.3.11, p89 + * 8x8:B + * 8x4:B:btm 8x4:B:top 8x4:B:both, + * 4x8:B:right 4x8:B:left 4x8:B:both + * 4x4:B 8x8:MB + * 8x4:MB:btm 8x4:MB:top 8x4,MB,both + * 4x8,MB,right 4x8,MB,left + * 4x4,MB */ +extern const uint16_t ff_vc1_ttmb_codes[3][16]; + +extern const uint8_t ff_vc1_ttmb_bits[3][16]; + +/* TTBLK (Transform Type per Block) tables */ +extern const uint8_t ff_vc1_ttblk_codes[3][8]; +extern const uint8_t ff_vc1_ttblk_bits[3][8]; + +/* SUBBLKPAT tables, p93-94, reordered */ +extern const uint8_t ff_vc1_subblkpat_codes[3][15]; +extern const uint8_t ff_vc1_subblkpat_bits[3][15]; + +/* MV differential tables, p265 */ +extern const uint16_t ff_vc1_mv_diff_codes[4][73]; +extern const uint8_t ff_vc1_mv_diff_bits[4][73]; + +/* Interlaced frame picture MBMODE VLC tables (p. 246, p. 360) */ +extern const uint16_t ff_vc1_intfr_4mv_mbmode_codes[4][15]; +extern const uint8_t ff_vc1_intfr_4mv_mbmode_bits[4][15]; +extern const uint8_t ff_vc1_intfr_non4mv_mbmode_codes[4][9]; +extern const uint8_t ff_vc1_intfr_non4mv_mbmode_bits[4][9]; + +/* Interlaced field picture MBMODE VLC tables (p. 356 - 11.4.1, 11.4.2) */ +extern const uint8_t ff_vc1_if_mmv_mbmode_codes[8][8]; +extern const uint8_t ff_vc1_if_mmv_mbmode_bits[8][8]; +extern const uint8_t ff_vc1_if_1mv_mbmode_codes[8][6]; +extern const uint8_t ff_vc1_if_1mv_mbmode_bits[8][6]; + +/* Interlaced frame/field picture MVDATA VLC tables */ +/* 1-reference tables */ +extern const uint32_t ff_vc1_1ref_mvdata_codes[4][72]; +extern const uint8_t ff_vc1_1ref_mvdata_bits[4][72]; +/* 2-reference tables */ +extern const uint32_t ff_vc1_2ref_mvdata_codes[8][126]; +extern const uint8_t ff_vc1_2ref_mvdata_bits[8][126]; + +/* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ + +/* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */ +extern const uint8_t ff_vc1_simple_progressive_4x4_zz [16]; +extern const uint8_t ff_vc1_adv_progressive_8x4_zz [32]; +extern const uint8_t ff_vc1_adv_progressive_4x8_zz [32]; +extern const uint8_t ff_vc1_adv_interlaced_8x8_zz [64]; +extern const uint8_t ff_vc1_adv_interlaced_8x4_zz [32]; +extern const uint8_t ff_vc1_adv_interlaced_4x8_zz [32]; +extern const uint8_t ff_vc1_adv_interlaced_4x4_zz [16]; +extern const uint8_t ff_vc1_intra_horz_8x8_zz [64]; +extern const uint8_t ff_vc1_intra_vert_8x8_zz [64]; + +/* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */ +extern const int32_t ff_vc1_dqscale[63]; + +/* P Interlaced field picture MV predictor scaling values (Table 114) */ +extern const uint16_t ff_vc1_field_mvpred_scales[2][7][4]; +/* B Interlaced field picture backward MV predictor scaling values for first field (Table 115) */ +extern const uint16_t ff_vc1_b_field_mvpred_scales[7][4]; + +#define AC_MODES 8 + +extern const int ff_vc1_ac_sizes[AC_MODES]; + +#endif /* AVCODEC_VC1DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1dsp.h new file mode 100644 index 00000000..75db62b1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc1dsp.h @@ -0,0 +1,92 @@ +/* + * VC-1 and WMV3 decoder - DSP functions + * Copyright (c) 2006 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VC-1 and WMV3 decoder + */ + +#ifndef AVCODEC_VC1DSP_H +#define AVCODEC_VC1DSP_H + +#include "hpeldsp.h" +#include "h264chroma.h" + +typedef void (*vc1op_pixels_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, ptrdiff_t line_size, int h); + +typedef struct VC1DSPContext { + /* vc1 functions */ + void (*vc1_inv_trans_8x8)(int16_t *b); + void (*vc1_inv_trans_8x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_4x8)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_4x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_8x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_8x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_4x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_inv_trans_4x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*vc1_v_overlap)(uint8_t *src, int stride); + void (*vc1_h_overlap)(uint8_t *src, int stride); + void (*vc1_v_s_overlap)(int16_t *top, int16_t *bottom); + void (*vc1_h_s_overlap)(int16_t *left, int16_t *right, int left_stride, int right_stride, int flags); + void (*vc1_v_loop_filter4)(uint8_t *src, int stride, int pq); + void (*vc1_h_loop_filter4)(uint8_t *src, int stride, int pq); + void (*vc1_v_loop_filter8)(uint8_t *src, int stride, int pq); + void (*vc1_h_loop_filter8)(uint8_t *src, int stride, int pq); + void (*vc1_v_loop_filter16)(uint8_t *src, int stride, int pq); + void (*vc1_h_loop_filter16)(uint8_t *src, int stride, int pq); + + /* put 8x8 block with bicubic interpolation and quarterpel precision + * last argument is actually round value instead of height + */ + vc1op_pixels_func put_vc1_mspel_pixels_tab[2][16]; + vc1op_pixels_func avg_vc1_mspel_pixels_tab[2][16]; + + /* This is really one func used in VC-1 decoding */ + h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]; + h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]; + + /* Windows Media Image functions */ + void (*sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count); + void (*sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width); + void (*sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width); + void (*sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, int alpha, int width); + void (*sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, + const uint8_t *src2a, const uint8_t *src2b, int offset2, + int alpha, int width); + + /** + * Search buf from the start for up to size bytes. Return the index + * of a zero byte, or >= size if not found. Ideally, use lookahead + * to filter out any zero bytes that are known to not be followed by + * one or more further zero bytes and a one byte. + */ + int (*startcode_find_candidate)(const uint8_t *buf, int size); +} VC1DSPContext; + +void ff_vc1dsp_init(VC1DSPContext* c); +void ff_vc1dsp_init_aarch64(VC1DSPContext* dsp); +void ff_vc1dsp_init_arm(VC1DSPContext* dsp); +void ff_vc1dsp_init_ppc(VC1DSPContext *c); +void ff_vc1dsp_init_x86(VC1DSPContext* dsp); +void ff_vc1dsp_init_mips(VC1DSPContext* dsp); + +#endif /* AVCODEC_VC1DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc2enc_dwt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc2enc_dwt.h new file mode 100644 index 00000000..a6932bcd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vc2enc_dwt.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2016 Open Broadcast Systems Ltd. + * Author 2016 Rostislav Pehlivanov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VC2ENC_DWT_H +#define AVCODEC_VC2ENC_DWT_H + +#include +#include + +typedef int32_t dwtcoef; + +enum VC2TransformType { + VC2_TRANSFORM_9_7 = 0, /* Deslauriers-Dubuc (9,7) */ + VC2_TRANSFORM_5_3 = 1, /* LeGall (5,3) */ + VC2_TRANSFORM_13_7 = 2, /* Deslauriers-Dubuc (13,7) */ + VC2_TRANSFORM_HAAR = 3, /* Haar without shift */ + VC2_TRANSFORM_HAAR_S = 4, /* Haar with 1 shift/lvl */ + VC2_TRANSFORM_FIDEL = 5, /* Fidelity filter */ + VC2_TRANSFORM_9_7_I = 6, /* Daubechies (9,7) */ + + VC2_TRANSFORMS_NB +}; + +typedef struct VC2TransformContext { + dwtcoef *buffer; + int padding; + void (*vc2_subband_dwt[VC2_TRANSFORMS_NB])(struct VC2TransformContext *t, + dwtcoef *data, ptrdiff_t stride, + int width, int height); +} VC2TransformContext; + +int ff_vc2enc_init_transforms(VC2TransformContext *t, int p_stride, int p_height, + int slice_w, int slice_h); +void ff_vc2enc_free_transforms(VC2TransformContext *t); + +#endif /* AVCODEC_VC2ENC_DWT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau.h new file mode 100644 index 00000000..4d999433 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau.h @@ -0,0 +1,176 @@ +/* + * The Video Decode and Presentation API for UNIX (VDPAU) is used for + * hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1. + * + * Copyright (C) 2008 NVIDIA + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VDPAU_H +#define AVCODEC_VDPAU_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_vdpau + * Public libavcodec VDPAU header. + */ + + +/** + * @defgroup lavc_codec_hwaccel_vdpau VDPAU Decoder and Renderer + * @ingroup lavc_codec_hwaccel + * + * VDPAU hardware acceleration has two modules + * - VDPAU decoding + * - VDPAU presentation + * + * The VDPAU decoding module parses all headers using FFmpeg + * parsing mechanisms and uses VDPAU for the actual decoding. + * + * As per the current implementation, the actual decoding + * and rendering (API calls) are done as part of the VDPAU + * presentation (vo_vdpau.c) module. + * + * @{ + */ + +#include + +#include "libavutil/avconfig.h" +#include "libavutil/attributes.h" + +#include "avcodec.h" +#include "version.h" + +struct AVCodecContext; +struct AVFrame; + +typedef int (*AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *, + const VdpPictureInfo *, uint32_t, + const VdpBitstreamBuffer *); + +/** + * This structure is used to share data between the libavcodec library and + * the client video application. + * The user shall allocate the structure via the av_alloc_vdpau_hwaccel + * function and make it available as + * AVCodecContext.hwaccel_context. Members can be set by the user once + * during initialization or through each AVCodecContext.get_buffer() + * function call. In any case, they must be valid prior to calling + * decoding functions. + * + * The size of this structure is not a part of the public ABI and must not + * be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an + * AVVDPAUContext. + */ +typedef struct AVVDPAUContext { + /** + * VDPAU decoder handle + * + * Set by user. + */ + VdpDecoder decoder; + + /** + * VDPAU decoder render callback + * + * Set by the user. + */ + VdpDecoderRender *render; + + AVVDPAU_Render2 render2; +} AVVDPAUContext; + +/** + * @brief allocation function for AVVDPAUContext + * + * Allows extending the struct without breaking API/ABI + */ +AVVDPAUContext *av_alloc_vdpaucontext(void); + +AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *); +void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2); + +/** + * Associate a VDPAU device with a codec context for hardware acceleration. + * This function is meant to be called from the get_format() codec callback, + * or earlier. It can also be called after avcodec_flush_buffers() to change + * the underlying VDPAU device mid-stream (e.g. to recover from non-transparent + * display preemption). + * + * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes + * successfully. + * + * @param avctx decoding context whose get_format() callback is invoked + * @param device VDPAU device handle to use for hardware acceleration + * @param get_proc_address VDPAU device driver + * @param flags zero of more OR'd AV_HWACCEL_FLAG_* flags + * + * @return 0 on success, an AVERROR code on failure. + */ +int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, + VdpGetProcAddress *get_proc_address, unsigned flags); + +/** + * Gets the parameters to create an adequate VDPAU video surface for the codec + * context using VDPAU hardware decoding acceleration. + * + * @note Behavior is undefined if the context was not successfully bound to a + * VDPAU device using av_vdpau_bind_context(). + * + * @param avctx the codec context being used for decoding the stream + * @param type storage space for the VDPAU video surface chroma type + * (or NULL to ignore) + * @param width storage space for the VDPAU video surface pixel width + * (or NULL to ignore) + * @param height storage space for the VDPAU video surface pixel height + * (or NULL to ignore) + * + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type, + uint32_t *width, uint32_t *height); + +/** + * Allocate an AVVDPAUContext. + * + * @return Newly-allocated AVVDPAUContext or NULL on failure. + */ +AVVDPAUContext *av_vdpau_alloc_context(void); + +#if FF_API_VDPAU_PROFILE +/** + * Get a decoder profile that should be used for initializing a VDPAU decoder. + * Should be called from the AVCodecContext.get_format() callback. + * + * @deprecated Use av_vdpau_bind_context() instead. + * + * @param avctx the codec context being used for decoding the stream + * @param profile a pointer into which the result will be written on success. + * The contents of profile are undefined if this function returns + * an error. + * + * @return 0 on success (non-negative), a negative AVERROR on failure. + */ +attribute_deprecated +int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile); +#endif + +/* @}*/ + +#endif /* AVCODEC_VDPAU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau_internal.h new file mode 100644 index 00000000..b6ea078c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vdpau_internal.h @@ -0,0 +1,131 @@ +/* + * Video Decode and Presentation API for UNIX (VDPAU) is used for + * HW decode acceleration for MPEG-1/2, H.264 and VC-1. + * + * Copyright (C) 2008 NVIDIA + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VDPAU_INTERNAL_H +#define AVCODEC_VDPAU_INTERNAL_H + +#include +#include + +#include "libavutil/frame.h" +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_vdpau.h" + +#include "avcodec.h" +#include "vdpau.h" + +/** Extract VdpVideoSurface from an AVFrame */ +static inline uintptr_t ff_vdpau_get_surface_id(AVFrame *pic) +{ + return (uintptr_t)pic->data[3]; +} + +union VDPAUPictureInfo { + VdpPictureInfoH264 h264; + VdpPictureInfoMPEG1Or2 mpeg; + VdpPictureInfoVC1 vc1; + VdpPictureInfoMPEG4Part2 mpeg4; +#ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE + VdpPictureInfoH264Predictive h264_predictive; +#endif +#ifdef VDP_DECODER_PROFILE_HEVC_MAIN + VdpPictureInfoHEVC hevc; +#endif +#ifdef VDP_YCBCR_FORMAT_Y_U_V_444 + VdpPictureInfoHEVC444 hevc_444; +#endif +#ifdef VDP_DECODER_PROFILE_VP9_PROFILE_0 + VdpPictureInfoVP9 vp9; +#endif +}; + +typedef struct VDPAUHWContext { + AVVDPAUContext context; + VdpDevice device; + VdpGetProcAddress *get_proc_address; + char reset; + unsigned char flags; +} VDPAUHWContext; + +typedef struct VDPAUContext { + /** + * VDPAU device handle + */ + VdpDevice device; + + /** + * VDPAU decoder handle + */ + VdpDecoder decoder; + + /** + * VDPAU device driver + */ + VdpGetProcAddress *get_proc_address; + + /** + * VDPAU decoder render callback + */ + VdpDecoderRender *render; + + uint32_t width; + uint32_t height; +} VDPAUContext; + +struct vdpau_picture_context { + /** + * VDPAU picture information. + */ + union VDPAUPictureInfo info; + + /** + * Allocated size of the bitstream_buffers table. + */ + int bitstream_buffers_allocated; + + /** + * Useful bitstream buffers in the bitstream buffers table. + */ + int bitstream_buffers_used; + + /** + * Table of bitstream buffers. + */ + VdpBitstreamBuffer *bitstream_buffers; +}; + +int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, + int level); +int ff_vdpau_common_uninit(AVCodecContext *avctx); + +int ff_vdpau_common_start_frame(struct vdpau_picture_context *pic, + const uint8_t *buffer, uint32_t size); +int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, + struct vdpau_picture_context *pic); +int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx); +int ff_vdpau_add_buffer(struct vdpau_picture_context *pic, const uint8_t *buf, + uint32_t buf_size); +int ff_vdpau_common_frame_params(AVCodecContext *avctx, + AVBufferRef *hw_frames_ctx); + +#endif /* AVCODEC_VDPAU_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/version.h new file mode 100644 index 00000000..85fbe24d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/version.h @@ -0,0 +1,149 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VERSION_H +#define AVCODEC_VERSION_H + +/** + * @file + * @ingroup libavc + * Libavcodec version macros. + */ + +#include "libavutil/version.h" + +#define LIBAVCODEC_VERSION_MAJOR 58 +#define LIBAVCODEC_VERSION_MINOR 91 +#define LIBAVCODEC_VERSION_MICRO 100 + +#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ + LIBAVCODEC_VERSION_MINOR, \ + LIBAVCODEC_VERSION_MICRO) +#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \ + LIBAVCODEC_VERSION_MINOR, \ + LIBAVCODEC_VERSION_MICRO) +#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT + +#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + * + * @note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + */ + +#ifndef FF_API_LOWRES +#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_DEBUG_MV +#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58) +#endif +#ifndef FF_API_AVCTX_TIMEBASE +#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_CODED_FRAME +#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_SIDEDATA_ONLY_PKT +#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_VDPAU_PROFILE +#define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_CONVERGENCE_DURATION +#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_AVPICTURE +#define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_AVPACKET_OLD_API +#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_RTP_CALLBACK +#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_VBV_DELAY +#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_CODER_TYPE +#define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_STAT_BITS +#define FF_API_STAT_BITS (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_PRIVATE_OPT +#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_ASS_TIMING +#define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_BSF +#define FF_API_OLD_BSF (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_COPY_CONTEXT +#define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_GET_CONTEXT_DEFAULTS +#define FF_API_GET_CONTEXT_DEFAULTS (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_NVENC_OLD_NAME +#define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_STRUCT_VAAPI_CONTEXT +#define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_MERGE_SD_API +#define FF_API_MERGE_SD_API (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_TAG_STRING +#define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_GETCHROMA +#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_CODEC_GET_SET +#define FF_API_CODEC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_USER_VISIBLE_AVHWACCEL +#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_LOCKMGR +#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_NEXT +#define FF_API_NEXT (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_UNSANITIZED_BITRATES +#define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OPENH264_SLICE_MODE +#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OPENH264_CABAC +#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_UNUSED_CODEC_CAPS +#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 59) +#endif + + +#endif /* AVCODEC_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videodsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videodsp.h new file mode 100644 index 00000000..c0545f22 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videodsp.h @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2012 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Core video DSP helper functions + */ + +#ifndef AVCODEC_VIDEODSP_H +#define AVCODEC_VIDEODSP_H + +#include +#include + +#define EMULATED_EDGE(depth) \ +void ff_emulated_edge_mc_ ## depth(uint8_t *dst, const uint8_t *src, \ + ptrdiff_t dst_stride, ptrdiff_t src_stride, \ + int block_w, int block_h,\ + int src_x, int src_y, int w, int h); + +EMULATED_EDGE(8) +EMULATED_EDGE(16) + +typedef struct VideoDSPContext { + /** + * Copy a rectangular area of samples to a temporary buffer and replicate + * the border samples. + * + * @param dst destination buffer + * @param dst_stride number of bytes between 2 vertically adjacent samples + * in destination buffer + * @param src source buffer + * @param dst_linesize number of bytes between 2 vertically adjacent + * samples in the destination buffer + * @param src_linesize number of bytes between 2 vertically adjacent + * samples in both the source buffer + * @param block_w width of block + * @param block_h height of block + * @param src_x x coordinate of the top left sample of the block in the + * source buffer + * @param src_y y coordinate of the top left sample of the block in the + * source buffer + * @param w width of the source buffer + * @param h height of the source buffer + */ + void (*emulated_edge_mc)(uint8_t *dst, const uint8_t *src, + ptrdiff_t dst_linesize, + ptrdiff_t src_linesize, + int block_w, int block_h, + int src_x, int src_y, int w, int h); + + /** + * Prefetch memory into cache (if supported by hardware). + * + * @param buf pointer to buffer to prefetch memory from + * @param stride distance between two lines of buf (in bytes) + * @param h number of lines to prefetch + */ + void (*prefetch)(uint8_t *buf, ptrdiff_t stride, int h); +} VideoDSPContext; + +void ff_videodsp_init(VideoDSPContext *ctx, int bpc); + +/* for internal use only (i.e. called by ff_videodsp_init() */ +void ff_videodsp_init_aarch64(VideoDSPContext *ctx, int bpc); +void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc); +void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc); +void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc); +void ff_videodsp_init_mips(VideoDSPContext *ctx, int bpc); + +#endif /* AVCODEC_VIDEODSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videotoolbox.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videotoolbox.h new file mode 100644 index 00000000..af2db0d5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/videotoolbox.h @@ -0,0 +1,127 @@ +/* + * Videotoolbox hardware acceleration + * + * copyright (c) 2012 Sebastien Zwickert + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VIDEOTOOLBOX_H +#define AVCODEC_VIDEOTOOLBOX_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_videotoolbox + * Public libavcodec Videotoolbox header. + */ + +#include + +#define Picture QuickdrawPicture +#include +#undef Picture + +#include "libavcodec/avcodec.h" + +/** + * This struct holds all the information that needs to be passed + * between the caller and libavcodec for initializing Videotoolbox decoding. + * Its size is not a part of the public ABI, it must be allocated with + * av_videotoolbox_alloc_context() and freed with av_free(). + */ +typedef struct AVVideotoolboxContext { + /** + * Videotoolbox decompression session object. + * Created and freed the caller. + */ + VTDecompressionSessionRef session; + + /** + * The output callback that must be passed to the session. + * Set by av_videottoolbox_default_init() + */ + VTDecompressionOutputCallback output_callback; + + /** + * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames. + * set by the caller. If this is set to 0, then no specific format is + * requested from the decoder, and its native format is output. + */ + OSType cv_pix_fmt_type; + + /** + * CoreMedia Format Description that Videotoolbox will use to create the decompression session. + * Set by the caller. + */ + CMVideoFormatDescriptionRef cm_fmt_desc; + + /** + * CoreMedia codec type that Videotoolbox will use to create the decompression session. + * Set by the caller. + */ + int cm_codec_type; +} AVVideotoolboxContext; + +/** + * Allocate and initialize a Videotoolbox context. + * + * This function should be called from the get_format() callback when the caller + * selects the AV_PIX_FMT_VIDETOOLBOX format. The caller must then create + * the decoder object (using the output callback provided by libavcodec) that + * will be used for Videotoolbox-accelerated decoding. + * + * When decoding with Videotoolbox is finished, the caller must destroy the decoder + * object and free the Videotoolbox context using av_free(). + * + * @return the newly allocated context or NULL on failure + */ +AVVideotoolboxContext *av_videotoolbox_alloc_context(void); + +/** + * This is a convenience function that creates and sets up the Videotoolbox context using + * an internal implementation. + * + * @param avctx the corresponding codec context + * + * @return >= 0 on success, a negative AVERROR code on failure + */ +int av_videotoolbox_default_init(AVCodecContext *avctx); + +/** + * This is a convenience function that creates and sets up the Videotoolbox context using + * an internal implementation. + * + * @param avctx the corresponding codec context + * @param vtctx the Videotoolbox context to use + * + * @return >= 0 on success, a negative AVERROR code on failure + */ +int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx); + +/** + * This function must be called to free the Videotoolbox context initialized with + * av_videotoolbox_default_init(). + * + * @param avctx the corresponding codec context + */ +void av_videotoolbox_default_free(AVCodecContext *avctx); + +/** + * @} + */ + +#endif /* AVCODEC_VIDEOTOOLBOX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vlc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vlc.h new file mode 100644 index 00000000..42ccddf3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vlc.h @@ -0,0 +1,81 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VLC_H +#define AVCODEC_VLC_H + +#include + +#define VLC_TYPE int16_t + +typedef struct VLC { + int bits; + VLC_TYPE (*table)[2]; ///< code, bits + int table_size, table_allocated; +} VLC; + +typedef struct RL_VLC_ELEM { + int16_t level; + int8_t len; + uint8_t run; +} RL_VLC_ELEM; + +#define init_vlc(vlc, nb_bits, nb_codes, \ + bits, bits_wrap, bits_size, \ + codes, codes_wrap, codes_size, \ + flags) \ + ff_init_vlc_sparse(vlc, nb_bits, nb_codes, \ + bits, bits_wrap, bits_size, \ + codes, codes_wrap, codes_size, \ + NULL, 0, 0, flags) + +int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, + const void *bits, int bits_wrap, int bits_size, + const void *codes, int codes_wrap, int codes_size, + const void *symbols, int symbols_wrap, int symbols_size, + int flags); +void ff_free_vlc(VLC *vlc); + +#define INIT_VLC_LE 2 +#define INIT_VLC_USE_NEW_STATIC 4 + +#define INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ + do { \ + static VLC_TYPE table[static_size][2]; \ + (vlc)->table = table; \ + (vlc)->table_allocated = static_size; \ + ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ + INIT_VLC_USE_NEW_STATIC); \ + } while (0) + +#define INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ + do { \ + static VLC_TYPE table[static_size][2]; \ + (vlc)->table = table; \ + (vlc)->table_allocated = static_size; \ + ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ + INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE); \ + } while (0) + +#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ + INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) + +#define INIT_LE_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ + INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) + +#endif /* AVCODEC_VLC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis.h new file mode 100644 index 00000000..98dd14f9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis.h @@ -0,0 +1,50 @@ +/* + * copyright (c) 2006 Oded Shimon + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VORBIS_H +#define AVCODEC_VORBIS_H + +#include "avcodec.h" + +extern const float ff_vorbis_floor1_inverse_db_table[256]; +extern const float * const ff_vorbis_vwin[8]; +extern const uint8_t ff_vorbis_channel_layout_offsets[8][8]; +extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8]; +extern const uint64_t ff_vorbis_channel_layouts[9]; + +typedef struct vorbis_floor1_entry { + uint16_t x; + uint16_t sort; + uint16_t low; + uint16_t high; +} vorbis_floor1_entry; + +int ff_vorbis_ready_floor1_list(AVCodecContext *avctx, + vorbis_floor1_entry *list, int values); +unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n); // x^(1/n) +int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num); +void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values, + uint16_t *y_list, int *flag, + int multiplier, float * out, int samples); +void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize); + +#define ilog(i) av_log2(2*(i)) + +#endif /* AVCODEC_VORBIS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_enc_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_enc_data.h new file mode 100644 index 00000000..a51aaec9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_enc_data.h @@ -0,0 +1,504 @@ +/* + * copyright (c) 2006 Oded Shimon + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VORBIS_ENC_DATA_H +#define AVCODEC_VORBIS_ENC_DATA_H + +#include + +static const uint8_t codebook0[] = { + 2, 10, 8, 14, 7, 12, 11, 14, 1, 5, 3, 7, 4, 9, 7, 13, +}; + +static const uint8_t codebook1[] = { + 1, 4, 2, 6, 3, 7, 5, 7, +}; + +static const uint8_t codebook2[] = { + 1, 5, 7, 21, 5, 8, 9, 21, 10, 9, 12, 20, 20, 16, 20, + 20, 4, 8, 9, 20, 6, 8, 9, 20, 11, 11, 13, 20, 20, 15, + 17, 20, 9, 11, 14, 20, 8, 10, 15, 20, 11, 13, 15, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 13, 20, 20, 20, 18, 18, 20, 20, + 20, 20, 20, 20, 3, 6, 8, 20, 6, 7, 9, 20, 10, 9, 12, + 20, 20, 20, 20, 20, 5, 7, 9, 20, 6, 6, 9, 20, 10, 9, + 12, 20, 20, 20, 20, 20, 8, 10, 13, 20, 8, 9, 12, 20, 11, + 10, 12, 20, 20, 20, 20, 20, 18, 20, 20, 20, 15, 17, 18, 20, + 18, 17, 18, 20, 20, 20, 20, 20, 7, 10, 12, 20, 8, 9, 11, + 20, 14, 13, 14, 20, 20, 20, 20, 20, 6, 9, 12, 20, 7, 8, + 11, 20, 12, 11, 13, 20, 20, 20, 20, 20, 9, 11, 15, 20, 8, + 10, 14, 20, 12, 11, 14, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 11, 16, 18, + 20, 15, 15, 17, 20, 20, 17, 20, 20, 20, 20, 20, 20, 9, 14, + 16, 20, 12, 12, 15, 20, 17, 15, 18, 20, 20, 20, 20, 20, 16, + 19, 18, 20, 15, 16, 20, 20, 17, 17, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, +}; + +static const uint8_t codebook3[] = { + 2, 3, 7, 13, 4, 4, 7, 15, 8, 6, 9, 17, 21, 16, 15, + 21, 2, 5, 7, 11, 5, 5, 7, 14, 9, 7, 10, 16, 17, 15, + 16, 21, 4, 7, 10, 17, 7, 7, 9, 15, 11, 9, 11, 16, 21, + 18, 15, 21, 18, 21, 21, 21, 15, 17, 17, 19, 21, 19, 18, 20, + 21, 21, 21, 20, +}; + +static const uint8_t codebook4[] = { + 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, + 5, 6, 5, 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 5, + 7, 5, 8, 6, 8, 6, 8, 6, 9, 6, 9, 6, 10, 6, 10, + 6, 11, 6, 11, 7, 11, 7, 12, 7, 12, 7, 12, 7, 12, 7, + 12, 7, 12, 7, 12, 7, 12, 8, 13, 8, 12, 8, 12, 8, 13, + 8, 13, 9, 13, 9, 13, 9, 13, 9, 12, 10, 12, 10, 13, 10, + 14, 11, 14, 12, 14, 13, 14, 13, 14, 14, 15, 16, 15, 15, 15, + 14, 15, 17, 21, 22, 22, 21, 22, 22, 22, 22, 22, 22, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, +}; + +static const uint8_t codebook5[] = { + 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 6, 5, 6, 5, 6, + 5, 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 6, 9, 6, + 9, 6, +}; + +static const uint8_t codebook6[] = { + 8, 5, 8, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, + 4, 9, 4, 9, 4, 9, 4, 8, 4, 8, 4, 9, 5, 9, 5, + 9, 5, 9, 5, 9, 6, 10, 6, 10, 7, 10, 8, 11, 9, 11, + 11, 12, 13, 12, 14, 13, 15, 13, 15, 14, 16, 14, 17, 15, 17, + 15, 15, 16, 16, 15, 16, 16, 16, 15, 18, 16, 15, 17, 17, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, +}; + +static const uint8_t codebook7[] = { + 1, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, + 5, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 9, 8, 10, 9, + 10, 9, +}; + +static const uint8_t codebook8[] = { + 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6, + 5, 7, 5, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 9, 8, + 9, 9, 9, 9, 10, 10, 10, 11, 9, 12, 9, 12, 9, 15, 10, + 14, 9, 13, 10, 13, 10, 12, 10, 12, 10, 13, 10, 12, 11, 13, + 11, 14, 12, 13, 13, 14, 14, 13, 14, 15, 14, 16, 13, 13, 14, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 15, 15, +}; + +static const uint8_t codebook9[] = { + 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, 4, 5, + 5, 5, +}; + +static const uint8_t codebook10[] = { + 3, 3, 4, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 5, + 7, 5, 8, 6, 8, 6, 9, 7, 10, 7, 10, 8, 10, 8, 11, + 9, 11, +}; + +static const uint8_t codebook11[] = { + 3, 7, 3, 8, 3, 10, 3, 8, 3, 9, 3, 8, 4, 9, 4, + 9, 5, 9, 6, 10, 6, 9, 7, 11, 7, 12, 9, 13, 10, 13, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, +}; + +static const uint8_t codebook12[] = { + 4, 5, 4, 5, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, + 5, 4, +}; + +static const uint8_t codebook13[] = { + 4, 2, 4, 2, 5, 3, 5, 4, 6, 6, 6, 7, 7, 8, 7, + 8, 7, 8, 7, 9, 8, 9, 8, 9, 8, 10, 8, 11, 9, 12, + 9, 12, +}; + +static const uint8_t codebook14[] = { + 2, 5, 2, 6, 3, 6, 4, 7, 4, 7, 5, 9, 5, 11, 6, + 11, 6, 11, 7, 11, 6, 11, 6, 11, 9, 11, 8, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, + 10, 10, 10, +}; + +static const uint8_t codebook15[] = { + 5, 6, 11, 11, 11, 11, 10, 10, 12, 11, 5, 2, 11, 5, 6, + 6, 7, 9, 11, 13, 13, 10, 7, 11, 6, 7, 8, 9, 10, 12, + 11, 5, 11, 6, 8, 7, 9, 11, 14, 15, 11, 6, 6, 8, 4, + 5, 7, 8, 10, 13, 10, 5, 7, 7, 5, 5, 6, 8, 10, 11, + 10, 7, 7, 8, 6, 5, 5, 7, 9, 9, 11, 8, 8, 11, 8, + 7, 6, 6, 7, 9, 12, 11, 10, 13, 9, 9, 7, 7, 7, 9, + 11, 13, 12, 15, 12, 11, 9, 8, 8, 8, +}; + +static const uint8_t codebook16[] = { + 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, + 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, + 7, 8, 8, 0, 0, 0, 0, 0, 0, 6, 7, 8, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 7, 7, + 0, 0, 0, 0, 0, 0, 6, 8, 7, 0, 0, 0, 0, 0, 0, + 7, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, + 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, 7, 8, 8, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 9, 0, 0, 0, + 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0, 0, 0, 0, 0, + 7, 9, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 5, 7, 7, 0, 0, 0, 0, 0, 0, 7, 8, 8, + 0, 0, 0, 0, 0, 0, 7, 8, 8, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 8, 8, 0, 0, 0, + 0, 0, 0, 8, 9, 9, 0, 0, 0, 0, 0, 0, 7, 8, 9, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 8, 8, 0, 0, 0, 0, 0, 0, 8, 9, 9, 0, 0, 0, + 0, 0, 0, 8, 9, 8, +}; + +static const uint8_t codebook17[] = { + 2, 5, 5, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 0, 0, + 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, + 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0, 7, 7, 0, 0, + 0, 7, 7, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, + 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, + 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 9, 9, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, + 0, 7, 7, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, + 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0, + 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 10, 10, 0, 0, + 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0, 10, 10, 0, 0, + 0, 0, 0, 0, 0, 8, 10, 10, 0, 0, 0, 9, 9, 0, 0, + 0, 9, 9, 0, 0, 0, 10, 10, +}; + +static const uint8_t codebook18[] = { + 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 6, 6, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 7, 9, 9, +}; + +static const uint8_t codebook19[] = { + 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0, + 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5, + 6, 6, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, + 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, + 0, 0, 0, 0, 0, 0, 9, 9, +}; + +static const uint8_t codebook20[] = { + 1, 3, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 7, + 8, 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7, + 8, 8, 8, 8, 10, 10, 0, 0, 0, 8, 8, 8, 8, 10, 10, + 0, 0, 0, 9, 9, 9, 9, 10, 10, 0, 0, 0, 9, 9, 9, + 9, 10, 10, 0, 0, 0, 10, 10, 10, 10, 11, 11, 0, 0, 0, + 0, 0, 10, 10, 11, 11, +}; + +static const uint8_t codebook21[] = { + 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, + 11, 10, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, + 10, 10, 11, 11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9, + 10, 10, 10, 10, 11, 11, 0, 6, 6, 7, 7, 8, 8, 9, 9, + 9, 9, 10, 10, 11, 11, 11, 11, 0, 0, 0, 7, 7, 8, 8, + 9, 9, 9, 9, 10, 10, 11, 11, 11, 12, 0, 0, 0, 8, 8, + 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0, 0, 0, + 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0, + 0, 0, 9, 9, 9, 9, 10, 10, 10, 10, 11, 10, 11, 11, 12, + 12, 0, 0, 0, 0, 0, 9, 9, 10, 10, 10, 10, 11, 11, 11, + 11, 12, 12, 0, 0, 0, 0, 0, 9, 8, 9, 9, 10, 10, 11, + 11, 12, 12, 12, 12, 0, 0, 0, 0, 0, 8, 8, 9, 9, 10, + 10, 11, 11, 12, 11, 12, 12, 0, 0, 0, 0, 0, 9, 10, 10, + 10, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 0, + 0, 10, 10, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, + 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 0, 0, + 0, 0, 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, + 0, 0, 0, 0, 0, 0, 0, 11, 11, 12, 12, 12, 12, 13, 13, + 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, + 13, 13, 13, 13, +}; + +static const uint8_t codebook22[] = { + 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7, 10, 9, 9, + 11, 9, 9, 4, 7, 7, 10, 9, 9, 11, 9, 9, 7, 10, 10, + 11, 11, 10, 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10, + 6, 9, 9, 11, 10, 10, 11, 10, 10, 7, 11, 11, 11, 11, 11, + 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10, 6, 9, 9, + 11, 10, 10, 11, 10, 10, +}; + +static const uint8_t codebook23[] = { + 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 10, 5, 5, 6, + 6, 7, 7, 8, 8, 8, 8, 10, 5, 5, 6, 6, 7, 7, 8, + 8, 8, 8, 10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 10, + 10, 10, 7, 7, 8, 7, 8, 8, 8, 8, 10, 10, 10, 8, 8, + 8, 8, 8, 8, 8, 8, 10, 10, 10, 7, 8, 8, 8, 8, 8, + 8, 8, 10, 10, 10, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, + 10, 10, 10, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 9, + 9, 8, 8, 9, 8, 10, 10, 10, 10, 10, 8, 8, 8, 8, 8, + 8, +}; + +static const uint8_t codebook24[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 6, 5, + 5, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 7, 5, 5, 7, + 7, 8, 8, 8, 8, 9, 9, 11, 10, 0, 8, 8, 8, 8, 9, + 9, 9, 9, 10, 10, 11, 11, 0, 8, 8, 8, 8, 9, 9, 9, + 9, 10, 10, 11, 11, 0, 12, 12, 9, 9, 10, 10, 10, 10, 11, + 11, 11, 12, 0, 13, 13, 9, 9, 10, 10, 10, 10, 11, 11, 12, + 12, 0, 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0, + 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0, 0, 0, + 14, 14, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 14, 14, + 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 12, 12, + 12, 12, 13, 13, 14, 13, 0, 0, 0, 0, 0, 13, 13, 12, 12, + 13, 12, 14, 13, +}; + +static const uint8_t codebook25[] = { + 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5, + 6, 5, 5, 5, 5, 6, 6, 6, 5, 5, +}; + +static const uint8_t codebook26[] = { + 1, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 9, + 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 9, 7, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, +}; + +static const uint8_t codebook27[] = { + 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 9, 10, 10, 10, 10, + 6, 5, 5, 7, 7, 8, 8, 10, 8, 11, 10, 12, 12, 13, 13, + 6, 5, 5, 7, 7, 8, 8, 10, 9, 11, 11, 12, 12, 13, 12, + 18, 8, 8, 8, 8, 9, 9, 10, 9, 11, 10, 12, 12, 13, 13, + 18, 8, 8, 8, 8, 9, 9, 10, 10, 11, 11, 13, 12, 14, 13, + 18, 11, 11, 9, 9, 10, 10, 11, 11, 11, 12, 13, 12, 13, 14, + 18, 11, 11, 9, 8, 11, 10, 11, 11, 11, 11, 12, 12, 14, 13, + 18, 18, 18, 10, 11, 10, 11, 12, 12, 12, 12, 13, 12, 14, 13, + 18, 18, 18, 10, 11, 11, 9, 12, 11, 12, 12, 12, 13, 13, 13, + 18, 18, 17, 14, 14, 11, 11, 12, 12, 13, 12, 14, 12, 14, 13, + 18, 18, 18, 14, 14, 11, 10, 12, 9, 12, 13, 13, 13, 13, 13, + 18, 18, 17, 16, 18, 13, 13, 12, 12, 13, 11, 14, 12, 14, 14, + 17, 18, 18, 17, 18, 13, 12, 13, 10, 12, 11, 14, 14, 14, 14, + 17, 18, 18, 18, 18, 15, 16, 12, 12, 13, 10, 14, 12, 14, 15, + 18, 18, 18, 16, 17, 16, 14, 12, 11, 13, 10, 13, 13, 14, 15, +}; + +static const uint8_t codebook28[] = { + 2, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 10, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 10, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 10, 7, 7, 7, 7, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 7, 7, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 8, 8, + 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 9, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9, 9, 10, + 10, 9, 9, 10, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 10, 9, 11, 11, 11, 11, 11, 9, 9, 9, + 9, 10, 10, 9, 9, 9, 9, 10, 9, 11, 11, 11, 11, 11, 11, + 11, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, + 11, 11, 11, 10, 9, 10, 10, 9, 10, 9, 9, 10, 9, 11, 10, + 10, 11, 11, 11, 11, 9, 10, 9, 9, 9, 9, 10, 10, 10, 10, + 11, 11, 11, 11, 11, 11, 10, 10, 10, 9, 9, 10, 9, 10, 9, + 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 9, 9, 9, 9, + 9, 10, 10, 10, +}; + +static const struct { + int dim; + int len; + int real_len; + const uint8_t *clens; + int lookup; + float min; + float delta; + const uint8_t *quant; +} cvectors[] = { + { 2, 16, 16, codebook0, 0 }, + { 2, 8, 8, codebook1, 0 }, + { 2, 256, 256, codebook2, 0 }, + { 2, 64, 64, codebook3, 0 }, + { 2, 128, 128, codebook4, 0 }, + { 2, 32, 32, codebook5, 0 }, + { 2, 96, 96, codebook6, 0 }, + { 2, 32, 32, codebook7, 0 }, + { 2, 96, 96, codebook8, 0 }, + { 2, 17, 17, codebook9, 0 }, + { 2, 32, 32, codebook10, 0 }, + { 2, 78, 78, codebook11, 0 }, + { 2, 17, 17, codebook12, 0 }, + { 2, 32, 32, codebook13, 0 }, + { 2, 78, 78, codebook14, 0 }, + { 2, 100, 100, codebook15, 0 }, + { 8, 1641, 6561, codebook16, 1, -1.0, 1.0, (const uint8_t[]){ 1, 0, 2, } }, + { 4, 443, 625, codebook17, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } }, + { 4, 105, 625, codebook18, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } }, + { 2, 68, 81, codebook19, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } }, + { 2, 81, 81, codebook20, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } }, + { 2, 289, 289, codebook21, 1, -8.0, 1.0, (const uint8_t[]){ 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, 0, 16, } }, + { 4, 81, 81, codebook22, 1, -11.0, 11.0, (const uint8_t[]){ 1, 0, 2, } }, + { 2, 121, 121, codebook23, 1, -5.0, 1.0, (const uint8_t[]){ 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, } }, + { 2, 169, 169, codebook24, 1, -30.0, 5.0, (const uint8_t[]){ 6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0, 12, } }, + { 2, 25, 25, codebook25, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } }, + { 2, 169, 169, codebook26, 1, -1530.0, 255.0, (const uint8_t[]){ 6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0, 12, } }, + { 2, 225, 225, codebook27, 1, -119.0, 17.0, (const uint8_t[]){ 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12, 1, 13, 0, 14, } }, + { 2, 289, 289, codebook28, 1, -8.0, 1.0, (const uint8_t[]){ 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, 0, 16, } }, +}; + +static const struct { + int dim; + int subclass; + int masterbook; + const int nbooks[4]; +} floor_classes[] = { + { 3, 0, 0, { 4 } }, + { 4, 1, 0, { 5, 6 } }, + { 3, 1, 1, { 7, 8 } }, + { 4, 2, 2, { -1, 9, 10, 11 } }, + { 3, 2, 3, { -1, 12, 13, 14 } }, +}; + +#endif /* AVCODEC_VORBIS_ENC_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser.h new file mode 100644 index 00000000..789932ac --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser.h @@ -0,0 +1,74 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * A public API for Vorbis parsing + * + * Determines the duration for each packet. + */ + +#ifndef AVCODEC_VORBIS_PARSER_H +#define AVCODEC_VORBIS_PARSER_H + +#include + +typedef struct AVVorbisParseContext AVVorbisParseContext; + +/** + * Allocate and initialize the Vorbis parser using headers in the extradata. + */ +AVVorbisParseContext *av_vorbis_parse_init(const uint8_t *extradata, + int extradata_size); + +/** + * Free the parser and everything associated with it. + */ +void av_vorbis_parse_free(AVVorbisParseContext **s); + +#define VORBIS_FLAG_HEADER 0x00000001 +#define VORBIS_FLAG_COMMENT 0x00000002 +#define VORBIS_FLAG_SETUP 0x00000004 + +/** + * Get the duration for a Vorbis packet. + * + * If @p flags is @c NULL, + * special frames are considered invalid. + * + * @param s Vorbis parser context + * @param buf buffer containing a Vorbis frame + * @param buf_size size of the buffer + * @param flags flags for special frames + */ +int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf, + int buf_size, int *flags); + +/** + * Get the duration for a Vorbis packet. + * + * @param s Vorbis parser context + * @param buf buffer containing a Vorbis frame + * @param buf_size size of the buffer + */ +int av_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf, + int buf_size); + +void av_vorbis_parse_reset(AVVorbisParseContext *s); + +#endif /* AVCODEC_VORBIS_PARSER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser_internal.h new file mode 100644 index 00000000..691a8423 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbis_parser_internal.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Vorbis audio parser + * + * Determines the duration for each packet. + */ + +#ifndef AVCODEC_VORBIS_PARSER_INTERNAL_H +#define AVCODEC_VORBIS_PARSER_INTERNAL_H + +#include "avcodec.h" +#include "vorbis_parser.h" + +struct AVVorbisParseContext { + const AVClass *class; + int extradata_parsed; ///< we have attempted to parse extradata + int valid_extradata; ///< extradata is valid, so we can calculate duration + int blocksize[2]; ///< short and long window sizes + int previous_blocksize; ///< previous window size + int mode_blocksize[64]; ///< window size mapping for each mode + int mode_count; ///< number of modes + int mode_mask; ///< bitmask used to get the mode in each packet + int prev_mask; ///< bitmask used to get the previous mode flag in each packet +}; + +#endif /* AVCODEC_VORBIS_PARSER_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbisdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbisdsp.h new file mode 100644 index 00000000..7abec4e4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vorbisdsp.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VORBISDSP_H +#define AVCODEC_VORBISDSP_H + +#include + +typedef struct VorbisDSPContext { + /* assume len is a multiple of 4, and arrays are 16-byte aligned */ + void (*vorbis_inverse_coupling)(float *mag, float *ang, + intptr_t blocksize); +} VorbisDSPContext; + +void ff_vorbisdsp_init(VorbisDSPContext *dsp); + +/* for internal use only */ +void ff_vorbisdsp_init_aarch64(VorbisDSPContext *dsp); +void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp); +void ff_vorbisdsp_init_arm(VorbisDSPContext *dsp); +void ff_vorbisdsp_init_ppc(VorbisDSPContext *dsp); + +#endif /* AVCODEC_VORBISDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3data.h new file mode 100644 index 00000000..3f24d5f7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3data.h @@ -0,0 +1,3180 @@ +/* + * Copyright (C) 2003 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP3DATA_H +#define AVCODEC_VP3DATA_H + +#include +#include + +/* these coefficients dequantize intraframe Y plane coefficients + * (note: same as JPEG) */ +static const uint8_t vp31_intra_y_dequant[64] = { + 16, 11, 10, 16, 24, 40, 51, 61, + 12, 12, 14, 19, 26, 58, 60, 55, + 14, 13, 16, 24, 40, 57, 69, 56, + 14, 17, 22, 29, 51, 87, 80, 62, + 18, 22, 37, 58, 68, 109, 103, 77, + 24, 35, 55, 64, 81, 104, 113, 92, + 49, 64, 78, 87, 103, 121, 120, 101, + 72, 92, 95, 98, 112, 100, 103, 99 +}; + +/* these coefficients dequantize intraframe C plane coefficients + * (note: same as JPEG) */ +static const uint8_t vp31_intra_c_dequant[64] = { + 17, 18, 24, 47, 99, 99, 99, 99, + 18, 21, 26, 66, 99, 99, 99, 99, + 24, 26, 56, 99, 99, 99, 99, 99, + 47, 66, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99 +}; + +/* these coefficients dequantize interframe coefficients (all planes) */ +static const uint8_t vp31_inter_dequant[64] = { + 16, 16, 16, 20, 24, 28, 32, 40, + 16, 16, 20, 24, 28, 32, 40, 48, + 16, 20, 24, 28, 32, 40, 48, 64, + 20, 24, 28, 32, 40, 48, 64, 64, + 24, 28, 32, 40, 48, 64, 64, 64, + 28, 32, 40, 48, 64, 64, 64, 96, + 32, 40, 48, 64, 64, 64, 96, 128, + 40, 48, 64, 64, 64, 96, 128, 128 +}; + +static const uint8_t vp31_dc_scale_factor[64] = { + 220, 200, 190, 180, 170, 170, 160, 160, + 150, 150, 140, 140, 130, 130, 120, 120, + 110, 110, 100, 100, 90, 90, 90, 80, + 80, 80, 70, 70, 70, 60, 60, 60, + 60, 50, 50, 50, 50, 40, 40, 40, + 40, 40, 30, 30, 30, 30, 30, 30, + 30, 20, 20, 20, 20, 20, 20, 20, + 20, 10, 10, 10, 10, 10, 10, 10 +}; + +static const uint16_t vp31_ac_scale_factor[64] = { + 500, 450, 400, 370, 340, 310, 285, 265, + 245, 225, 210, 195, 185, 180, 170, 160, + 150, 145, 135, 130, 125, 115, 110, 107, + 100, 96, 93, 89, 85, 82, 75, 74, + 70, 68, 64, 60, 57, 56, 52, 50, + 49, 45, 44, 43, 40, 38, 37, 35, + 33, 32, 30, 29, 28, 25, 24, 22, + 21, 19, 18, 17, 15, 13, 12, 10 +}; + +static const uint8_t vp31_filter_limit_values[64] = { + 30, 25, 20, 20, 15, 15, 14, 14, + 13, 13, 12, 12, 11, 11, 10, 10, + 9, 9, 8, 8, 7, 7, 7, 7, + 6, 6, 6, 6, 5, 5, 5, 5, + 4, 4, 4, 4, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +static const uint16_t superblock_run_length_vlc_table[34][2] = { + { 0, 1 }, + + { 4, 3 }, { 5, 3 }, + + { 0xC, 4 }, { 0xD, 4 }, + + { 0x38, 6 }, { 0x39, 6 }, { 0x3A, 6 }, { 0x3B, 6 }, + + { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 }, + { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 }, + + { 0x3E0, 10 }, { 0x3E1, 10 }, { 0x3E2, 10 }, { 0x3E3, 10 }, + { 0x3E4, 10 }, { 0x3E5, 10 }, { 0x3E6, 10 }, { 0x3E7, 10 }, + { 0x3E8, 10 }, { 0x3E9, 10 }, { 0x3EA, 10 }, { 0x3EB, 10 }, + { 0x3EC, 10 }, { 0x3ED, 10 }, { 0x3EE, 10 }, { 0x3EF, 10 }, + + { 0x3F, 6 } /* this last VLC is a special case for reading 12 more + * bits from stream and adding the value 34 */ +}; + +static const uint16_t fragment_run_length_vlc_table[30][2] = { + /* 1 -> 2 */ + { 0x0, 2 }, { 0x1, 2 }, + + /* 3 -> 4 */ + { 0x4, 3 }, { 0x5, 3 }, + + /* 5 -> 6 */ + { 0xC, 4 }, { 0xD, 4 }, + + /* 7 -> 10 */ + { 0x38, 6 }, { 0x39, 6 }, + { 0x3A, 6 }, { 0x3B, 6 }, + + /* 11 -> 14 */ + { 0x78, 7 }, { 0x79, 7 }, + { 0x7A, 7 }, { 0x7B, 7 }, + + /* 15 -> 30 */ + { 0x1F0, 9 }, { 0x1F1, 9 }, { 0x1F2, 9 }, { 0x1F3, 9 }, + { 0x1F4, 9 }, { 0x1F5, 9 }, { 0x1F6, 9 }, { 0x1F7, 9 }, + { 0x1F8, 9 }, { 0x1F9, 9 }, { 0x1FA, 9 }, { 0x1FB, 9 }, + { 0x1FC, 9 }, { 0x1FD, 9 }, { 0x1FE, 9 }, { 0x1FF, 9 } +}; + +static const uint8_t mode_code_vlc_table[8][2] = { + { 0, 1 }, { 2, 2 }, + { 6, 3 }, { 14, 4 }, + { 30, 5 }, { 62, 6 }, + { 126, 7 }, { 127, 7 } +}; + +static const uint8_t motion_vector_vlc_table[63][2] = { + { 0, 3 }, + { 1, 3 }, + { 2, 3 }, + + { 6, 4 }, { 7, 4 }, + + { 8, 4 }, { 9, 4 }, + + { 40, 6 }, { 41, 6 }, { 42, 6 }, { 43, 6 }, + { 44, 6 }, { 45, 6 }, { 46, 6 }, { 47, 6 }, + + { 96, 7 }, { 97, 7 }, { 98, 7 }, { 99, 7 }, + { 100, 7 }, { 101, 7 }, { 102, 7 }, { 103, 7 }, + { 104, 7 }, { 105, 7 }, { 106, 7 }, { 107, 7 }, + { 108, 7 }, { 109, 7 }, { 110, 7 }, { 111, 7 }, + + { 0xE0, 8 }, { 0xE1, 8 }, { 0xE2, 8 }, { 0xE3, 8 }, + { 0xE4, 8 }, { 0xE5, 8 }, { 0xE6, 8 }, { 0xE7, 8 }, + { 0xE8, 8 }, { 0xE9, 8 }, { 0xEA, 8 }, { 0xEB, 8 }, + { 0xEC, 8 }, { 0xED, 8 }, { 0xEE, 8 }, { 0xEF, 8 }, + + { 0xF0, 8 }, { 0xF1, 8 }, { 0xF2, 8 }, { 0xF3, 8 }, + { 0xF4, 8 }, { 0xF5, 8 }, { 0xF6, 8 }, { 0xF7, 8 }, + { 0xF8, 8 }, { 0xF9, 8 }, { 0xFA, 8 }, { 0xFB, 8 }, + { 0xFC, 8 }, { 0xFD, 8 }, { 0xFE, 8 }, { 0xFF, 8 } +}; + +static const int8_t motion_vector_table[63] = { + 0, 1, -1, + 2, -2, + 3, -3, + 4, -4, 5, -5, 6, -6, 7, -7, + 8, -8, 9, -9, 10, -10, 11, -11, 12, -12, 13, -13, 14, -14, 15, -15, + 16, -16, 17, -17, 18, -18, 19, -19, 20, -20, 21, -21, 22, -22, 23, -23, + 24, -24, 25, -25, 26, -26, 27, -27, 28, -28, 29, -29, 30, -30, 31, -31 +}; + +static const int8_t fixed_motion_vector_table[64] = { + 0, 0, 1, -1, 2, -2, 3, -3, + 4, -4, 5, -5, 6, -6, 7, -7, + 8, -8, 9, -9, 10, -10, 11, -11, + 12, -12, 13, -13, 14, -14, 15, -15, + 16, -16, 17, -17, 18, -18, 19, -19, + 20, -20, 21, -21, 22, -22, 23, -23, + 24, -24, 25, -25, 26, -26, 27, -27, + 28, -28, 29, -29, 30, -30, 31, -31 +}; + +/* only tokens 0..6 indicate eob runs */ +static const struct { + uint8_t base, bits; +} eob_run_table[7] = { + {1, 0}, {2, 0}, {3, 0}, {4, 2}, {8, 3}, {16, 4}, {0, 12} +}; + +static const uint8_t zero_run_base[32] = { + 0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */ + 0, 0, /* 7..8 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */ + 1, 2, 3, 4, 5, /* 23..27 */ + 6, 10, 1, 2 /* 28..31 */ +}; +static const uint8_t zero_run_get_bits[32] = { + 0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */ + 3, 6, /* 7..8 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 9..22 */ + 0, 0, 0, 0, 0, /* 23..27 */ + 2, 3, 0, 1 /* 28..31 */ +}; + +static const uint8_t coeff_get_bits[32] = { + 0, 0, 0, 0, 0, 0, 0, /* 0..6 are never used */ + 0, 0, 0, 0, 0, 0, /* 7..12 use constant coeffs */ + 1, 1, 1, 1, /* 13..16 are constants but still need sign bit */ + 2, 3, 4, 5, 6,10, /* 17..22, for reading large coeffs */ + 1, 1, 1, 1, 1, 1, 1, /* 23..29 are constants but still need sign bit */ + 2, 2 /* 30..31 */ +}; + +static const int16_t coeff_table_token_7_8[1] = { 0 }; +static const int16_t coeff_table_token_9[1] = { 1 }; +static const int16_t coeff_table_token_10[1] = { -1 }; +static const int16_t coeff_table_token_11[1] = { 2 }; +static const int16_t coeff_table_token_12[1] = { -2 }; + +static const int16_t coeff_table_token_13[2] = { 3, -3 }; +static const int16_t coeff_table_token_14[2] = { 4, -4 }; +static const int16_t coeff_table_token_15[2] = { 5, -5 }; +static const int16_t coeff_table_token_16[2] = { 6, -6 }; + +static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 }; +static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 }; +static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 }; + +static const int16_t coeff_table_token_17[4] = { + 7, 8, -7, -8 +}; + +static const int16_t coeff_table_token_18[8] = { + 9, 10, 11, 12, -9, -10, -11, -12 +}; + +static const int16_t coeff_table_token_19[16] = { + 13, 14, 15, 16, 17, 18, 19, 20, -13, -14, -15, -16, -17, -18, -19, -20 +}; + +static const int16_t coeff_table_token_20[32] = { + 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, + -21, -22, -23, -24, -25, -26, -27, -28, + -29, -30, -31, -32, -33, -34, -35, -36 +}; + +static const int16_t coeff_table_token_21[64] = { + 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, + -37, -38, -39, -40, -41, -42, -43, -44, + -45, -46, -47, -48, -49, -50, -51, -52, + -53, -54, -55, -56, -57, -58, -59, -60, + -61, -62, -63, -64, -65, -66, -67, -68 +}; + +static const int16_t coeff_table_token_22[1024] = { + 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, + 253, 254, 255, 256, 257, 258, 259, 260, + 261, 262, 263, 264, 265, 266, 267, 268, + 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, + 293, 294, 295, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, + 373, 374, 375, 376, 377, 378, 379, 380, + 381, 382, 383, 384, 385, 386, 387, 388, + 389, 390, 391, 392, 393, 394, 395, 396, + 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, + 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 431, 432, 433, 434, 435, 436, + 437, 438, 439, 440, 441, 442, 443, 444, + 445, 446, 447, 448, 449, 450, 451, 452, + 453, 454, 455, 456, 457, 458, 459, 460, + 461, 462, 463, 464, 465, 466, 467, 468, + 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, + 493, 494, 495, 496, 497, 498, 499, 500, + 501, 502, 503, 504, 505, 506, 507, 508, + 509, 510, 511, 512, 513, 514, 515, 516, + 517, 518, 519, 520, 521, 522, 523, 524, + 525, 526, 527, 528, 529, 530, 531, 532, + 533, 534, 535, 536, 537, 538, 539, 540, + 541, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 552, 553, 554, 555, 556, + 557, 558, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 570, 571, 572, + 573, 574, 575, 576, 577, 578, 579, 580, + -69, -70, -71, -72, -73, -74, -75, -76, + -77, -78, -79, -80, -81, -82, -83, -84, + -85, -86, -87, -88, -89, -90, -91, -92, + -93, -94, -95, -96, -97, -98, -99, -100, + -101, -102, -103, -104, -105, -106, -107, -108, + -109, -110, -111, -112, -113, -114, -115, -116, + -117, -118, -119, -120, -121, -122, -123, -124, + -125, -126, -127, -128, -129, -130, -131, -132, + -133, -134, -135, -136, -137, -138, -139, -140, + -141, -142, -143, -144, -145, -146, -147, -148, + -149, -150, -151, -152, -153, -154, -155, -156, + -157, -158, -159, -160, -161, -162, -163, -164, + -165, -166, -167, -168, -169, -170, -171, -172, + -173, -174, -175, -176, -177, -178, -179, -180, + -181, -182, -183, -184, -185, -186, -187, -188, + -189, -190, -191, -192, -193, -194, -195, -196, + -197, -198, -199, -200, -201, -202, -203, -204, + -205, -206, -207, -208, -209, -210, -211, -212, + -213, -214, -215, -216, -217, -218, -219, -220, + -221, -222, -223, -224, -225, -226, -227, -228, + -229, -230, -231, -232, -233, -234, -235, -236, + -237, -238, -239, -240, -241, -242, -243, -244, + -245, -246, -247, -248, -249, -250, -251, -252, + -253, -254, -255, -256, -257, -258, -259, -260, + -261, -262, -263, -264, -265, -266, -267, -268, + -269, -270, -271, -272, -273, -274, -275, -276, + -277, -278, -279, -280, -281, -282, -283, -284, + -285, -286, -287, -288, -289, -290, -291, -292, + -293, -294, -295, -296, -297, -298, -299, -300, + -301, -302, -303, -304, -305, -306, -307, -308, + -309, -310, -311, -312, -313, -314, -315, -316, + -317, -318, -319, -320, -321, -322, -323, -324, + -325, -326, -327, -328, -329, -330, -331, -332, + -333, -334, -335, -336, -337, -338, -339, -340, + -341, -342, -343, -344, -345, -346, -347, -348, + -349, -350, -351, -352, -353, -354, -355, -356, + -357, -358, -359, -360, -361, -362, -363, -364, + -365, -366, -367, -368, -369, -370, -371, -372, + -373, -374, -375, -376, -377, -378, -379, -380, + -381, -382, -383, -384, -385, -386, -387, -388, + -389, -390, -391, -392, -393, -394, -395, -396, + -397, -398, -399, -400, -401, -402, -403, -404, + -405, -406, -407, -408, -409, -410, -411, -412, + -413, -414, -415, -416, -417, -418, -419, -420, + -421, -422, -423, -424, -425, -426, -427, -428, + -429, -430, -431, -432, -433, -434, -435, -436, + -437, -438, -439, -440, -441, -442, -443, -444, + -445, -446, -447, -448, -449, -450, -451, -452, + -453, -454, -455, -456, -457, -458, -459, -460, + -461, -462, -463, -464, -465, -466, -467, -468, + -469, -470, -471, -472, -473, -474, -475, -476, + -477, -478, -479, -480, -481, -482, -483, -484, + -485, -486, -487, -488, -489, -490, -491, -492, + -493, -494, -495, -496, -497, -498, -499, -500, + -501, -502, -503, -504, -505, -506, -507, -508, + -509, -510, -511, -512, -513, -514, -515, -516, + -517, -518, -519, -520, -521, -522, -523, -524, + -525, -526, -527, -528, -529, -530, -531, -532, + -533, -534, -535, -536, -537, -538, -539, -540, + -541, -542, -543, -544, -545, -546, -547, -548, + -549, -550, -551, -552, -553, -554, -555, -556, + -557, -558, -559, -560, -561, -562, -563, -564, + -565, -566, -567, -568, -569, -570, -571, -572, + -573, -574, -575, -576, -577, -578, -579, -580 +}; + +static const int16_t *const coeff_tables[32] = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + coeff_table_token_7_8, + + coeff_table_token_7_8, + coeff_table_token_9, + coeff_table_token_10, + coeff_table_token_11, + coeff_table_token_12, + coeff_table_token_13, + coeff_table_token_14, + coeff_table_token_15, + + coeff_table_token_16, + coeff_table_token_17, + coeff_table_token_18, + coeff_table_token_19, + coeff_table_token_20, + coeff_table_token_21, + coeff_table_token_22, + coeff_table_token_23_24_25_26_27_28_29, + + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_23_24_25_26_27_28_29, + coeff_table_token_30, + coeff_table_token_31 +}; + +static const uint16_t dc_bias[16][32][2] = { + { /* DC bias table 0 */ + { 0x2D, 6 }, + { 0x26, 7 }, + { 0x166, 9 }, + { 0x4E, 8 }, + { 0x2CE, 10 }, + { 0x59E, 11 }, + { 0x27D, 11 }, + { 0x8, 5 }, + { 0x4F9, 12 }, + { 0xF, 4 }, + { 0xE, 4 }, + { 0x1B, 5 }, + { 0x6, 4 }, + { 0x8, 4 }, + { 0x5, 4 }, + { 0x1A, 5 }, + { 0x15, 5 }, + { 0x7, 4 }, + { 0xC, 4 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0x9, 4 }, + { 0x17, 5 }, + { 0x29, 6 }, + { 0x28, 6 }, + { 0xB2, 8 }, + { 0x4F8, 12 }, + { 0x59F, 11 }, + { 0x9E, 9 }, + { 0x13F, 10 }, + { 0x12, 6 }, + { 0x58, 7 } + }, + { /* DC bias table 1 */ + { 0x10, 5 }, + { 0x47, 7 }, + { 0x1FF, 9 }, + { 0x8C, 8 }, + { 0x3FC, 10 }, + { 0x46A, 11 }, + { 0x469, 11 }, + { 0x22, 6 }, + { 0x11A1, 13 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0x4, 4 }, + { 0x5, 4 }, + { 0x9, 4 }, + { 0x6, 4 }, + { 0x1E, 5 }, + { 0x16, 5 }, + { 0x7, 4 }, + { 0xC, 4 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xA, 4 }, + { 0x17, 5 }, + { 0x7D, 7 }, + { 0x7E, 7 }, + { 0x11B, 9 }, + { 0x8D1, 12 }, + { 0x3FD, 10 }, + { 0x46B, 11 }, + { 0x11A0, 13 }, + { 0x7C, 7 }, + { 0xFE, 8 } + }, + { /* DC bias table 2 */ + { 0x16, 5 }, + { 0x20, 6 }, + { 0x86, 8 }, + { 0x87, 8 }, + { 0x367, 10 }, + { 0x6CC, 11 }, + { 0x6CB, 11 }, + { 0x6E, 7 }, + { 0x366D, 14 }, + { 0xF, 4 }, + { 0xE, 4 }, + { 0x4, 4 }, + { 0x5, 4 }, + { 0xA, 4 }, + { 0x6, 4 }, + { 0x1A, 5 }, + { 0x11, 5 }, + { 0x7, 4 }, + { 0xC, 4 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0x9, 4 }, + { 0x17, 5 }, + { 0x6F, 7 }, + { 0x6D, 7 }, + { 0x364, 10 }, + { 0xD9A, 12 }, + { 0x6CA, 11 }, + { 0x1B37, 13 }, + { 0x366C, 14 }, + { 0x42, 7 }, + { 0xD8, 8 } + }, + { /* DC bias table 3 */ + { 0x0, 4 }, + { 0x2D, 6 }, + { 0xF7, 8 }, + { 0x58, 7 }, + { 0x167, 9 }, + { 0x2CB, 10 }, + { 0x2CA, 10 }, + { 0xE, 6 }, + { 0x1661, 13 }, + { 0x3, 3 }, + { 0x2, 3 }, + { 0x8, 4 }, + { 0x9, 4 }, + { 0xD, 4 }, + { 0x2, 4 }, + { 0x1F, 5 }, + { 0x17, 5 }, + { 0x1, 4 }, + { 0xC, 4 }, + { 0xE, 4 }, + { 0xA, 4 }, + { 0x6, 5 }, + { 0x78, 7 }, + { 0xF, 6 }, + { 0x7A, 7 }, + { 0x164, 9 }, + { 0x599, 11 }, + { 0x2CD, 10 }, + { 0xB31, 12 }, + { 0x1660, 13 }, + { 0x79, 7 }, + { 0xF6, 8 } + }, + { /* DC bias table 4 */ + { 0x3, 4 }, + { 0x3C, 6 }, + { 0xF, 7 }, + { 0x7A, 7 }, + { 0x1D, 8 }, + { 0x20, 9 }, + { 0x72, 10 }, + { 0x6, 6 }, + { 0x399, 13 }, + { 0x4, 3 }, + { 0x5, 3 }, + { 0x5, 4 }, + { 0x6, 4 }, + { 0xE, 4 }, + { 0x4, 4 }, + { 0x0, 4 }, + { 0x19, 5 }, + { 0x2, 4 }, + { 0xD, 4 }, + { 0x7, 4 }, + { 0x1F, 5 }, + { 0x30, 6 }, + { 0x11, 8 }, + { 0x31, 6 }, + { 0x5, 6 }, + { 0x21, 9 }, + { 0xE7, 11 }, + { 0x38, 9 }, + { 0x1CD, 12 }, + { 0x398, 13 }, + { 0x7B, 7 }, + { 0x9, 7 } + }, + { /* DC bias table 5 */ + { 0x9, 4 }, + { 0x2, 5 }, + { 0x74, 7 }, + { 0x7, 6 }, + { 0xEC, 8 }, + { 0xD1, 9 }, + { 0x1A6, 10 }, + { 0x6, 6 }, + { 0xD21, 13 }, + { 0x5, 3 }, + { 0x6, 3 }, + { 0x8, 4 }, + { 0x7, 4 }, + { 0xF, 4 }, + { 0x4, 4 }, + { 0x0, 4 }, + { 0x1C, 5 }, + { 0x2, 4 }, + { 0x5, 4 }, + { 0x3, 4 }, + { 0xC, 5 }, + { 0x35, 7 }, + { 0x1A7, 10 }, + { 0x1B, 6 }, + { 0x77, 7 }, + { 0x1A5, 10 }, + { 0x349, 11 }, + { 0xD0, 9 }, + { 0x691, 12 }, + { 0xD20, 13 }, + { 0x75, 7 }, + { 0xED, 8 } + }, + { /* DC bias table 6 */ + { 0xA, 4 }, + { 0xC, 5 }, + { 0x12, 6 }, + { 0x1B, 6 }, + { 0xB7, 8 }, + { 0x16C, 9 }, + { 0x99, 9 }, + { 0x5A, 7 }, + { 0x16D8, 13 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x0, 3 }, + { 0x5, 4 }, + { 0x17, 5 }, + { 0xE, 5 }, + { 0x2, 4 }, + { 0x3, 4 }, + { 0xF, 5 }, + { 0x1A, 6 }, + { 0x4D, 8 }, + { 0x2DB3, 14 }, + { 0x2C, 6 }, + { 0x11, 6 }, + { 0x2DA, 10 }, + { 0x5B7, 11 }, + { 0x98, 9 }, + { 0xB6D, 12 }, + { 0x2DB2, 14 }, + { 0x10, 6 }, + { 0x27, 7 } + }, + { /* DC bias table 7 */ + { 0xD, 4 }, + { 0xF, 5 }, + { 0x1D, 6 }, + { 0x8, 5 }, + { 0x51, 7 }, + { 0x56, 8 }, + { 0xAF, 9 }, + { 0x2A, 7 }, + { 0x148A, 13 }, + { 0x7, 3 }, + { 0x0, 2 }, + { 0x8, 4 }, + { 0x9, 4 }, + { 0xC, 4 }, + { 0x6, 4 }, + { 0x17, 5 }, + { 0xB, 5 }, + { 0x16, 5 }, + { 0x15, 5 }, + { 0x9, 5 }, + { 0x50, 7 }, + { 0xAE, 9 }, + { 0x2917, 14 }, + { 0x1C, 6 }, + { 0x14, 6 }, + { 0x290, 10 }, + { 0x523, 11 }, + { 0x149, 9 }, + { 0xA44, 12 }, + { 0x2916, 14 }, + { 0x53, 7 }, + { 0xA5, 8 } + }, + { /* DC bias table 8 */ + { 0x1, 4 }, + { 0x1D, 6 }, + { 0xF5, 8 }, + { 0xF4, 8 }, + { 0x24D, 10 }, + { 0x499, 11 }, + { 0x498, 11 }, + { 0x1, 5 }, + { 0x21, 6 }, + { 0x6, 3 }, + { 0x5, 3 }, + { 0x6, 4 }, + { 0x5, 4 }, + { 0x2, 4 }, + { 0x7, 5 }, + { 0x25, 6 }, + { 0x7B, 7 }, + { 0x1C, 6 }, + { 0x20, 6 }, + { 0xD, 6 }, + { 0x48, 7 }, + { 0x92, 8 }, + { 0x127, 9 }, + { 0xE, 4 }, + { 0x4, 4 }, + { 0x11, 5 }, + { 0xC, 6 }, + { 0x3C, 6 }, + { 0xF, 5 }, + { 0x0, 5 }, + { 0x1F, 5 }, + { 0x13, 5 } + }, + { /* DC bias table 9 */ + { 0x5, 4 }, + { 0x3C, 6 }, + { 0x40, 7 }, + { 0xD, 7 }, + { 0x31, 9 }, + { 0x61, 10 }, + { 0x60, 10 }, + { 0x2, 5 }, + { 0xF5, 8 }, + { 0x6, 3 }, + { 0x5, 3 }, + { 0x7, 4 }, + { 0x6, 4 }, + { 0x2, 4 }, + { 0x9, 5 }, + { 0x25, 6 }, + { 0x7, 6 }, + { 0x21, 6 }, + { 0x24, 6 }, + { 0x10, 6 }, + { 0x41, 7 }, + { 0xF4, 8 }, + { 0x19, 8 }, + { 0xE, 4 }, + { 0x3, 4 }, + { 0x11, 5 }, + { 0x11, 6 }, + { 0x3F, 6 }, + { 0x3E, 6 }, + { 0x7B, 7 }, + { 0x0, 4 }, + { 0x13, 5 } + }, + { /* DC bias table 10 */ + { 0xA, 4 }, + { 0x7, 5 }, + { 0x1, 6 }, + { 0x9, 6 }, + { 0x131, 9 }, + { 0x261, 10 }, + { 0x260, 10 }, + { 0x15, 6 }, + { 0x1, 7 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x8, 4 }, + { 0x7, 4 }, + { 0x6, 4 }, + { 0x12, 5 }, + { 0x2F, 6 }, + { 0x14, 6 }, + { 0x27, 6 }, + { 0x2D, 6 }, + { 0x16, 6 }, + { 0x4D, 7 }, + { 0x99, 8 }, + { 0x0, 7 }, + { 0x4, 4 }, + { 0x1, 4 }, + { 0x5, 5 }, + { 0x17, 6 }, + { 0x2E, 6 }, + { 0x2C, 6 }, + { 0x8, 6 }, + { 0x6, 5 }, + { 0x1, 5 } + }, + { /* DC bias table 11 */ + { 0x0, 3 }, + { 0xE, 5 }, + { 0x17, 6 }, + { 0x2A, 6 }, + { 0x10, 7 }, + { 0xF9, 10 }, + { 0xF8, 10 }, + { 0x1E, 7 }, + { 0x3F, 8 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x6, 4 }, + { 0xF, 5 }, + { 0x5, 5 }, + { 0x16, 6 }, + { 0x29, 6 }, + { 0x2B, 6 }, + { 0x15, 6 }, + { 0x50, 7 }, + { 0x11, 7 }, + { 0x7D, 9 }, + { 0x4, 4 }, + { 0x17, 5 }, + { 0x6, 5 }, + { 0x14, 6 }, + { 0x2C, 6 }, + { 0x2D, 6 }, + { 0xE, 6 }, + { 0x9, 6 }, + { 0x51, 7 } + }, + { /* DC bias table 12 */ + { 0x2, 3 }, + { 0x18, 5 }, + { 0x2F, 6 }, + { 0xD, 5 }, + { 0x53, 7 }, + { 0x295, 10 }, + { 0x294, 10 }, + { 0xA4, 8 }, + { 0x7C, 8 }, + { 0x0, 2 }, + { 0x7, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x1B, 5 }, + { 0xC, 5 }, + { 0x28, 6 }, + { 0x6A, 7 }, + { 0x1E, 6 }, + { 0x1D, 6 }, + { 0x69, 7 }, + { 0xD7, 8 }, + { 0x7D, 8 }, + { 0x14B, 9 }, + { 0x19, 5 }, + { 0x16, 5 }, + { 0x2E, 6 }, + { 0x1C, 6 }, + { 0x2B, 6 }, + { 0x2A, 6 }, + { 0x68, 7 }, + { 0x3F, 7 }, + { 0xD6, 8 } + }, + { /* DC bias table 13 */ + { 0x2, 3 }, + { 0x1B, 5 }, + { 0xC, 5 }, + { 0x18, 5 }, + { 0x29, 6 }, + { 0x7F, 8 }, + { 0x2F0, 10 }, + { 0x198, 9 }, + { 0x179, 9 }, + { 0x0, 2 }, + { 0x7, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x1A, 5 }, + { 0xD, 5 }, + { 0x2A, 6 }, + { 0x64, 7 }, + { 0x1E, 6 }, + { 0x67, 7 }, + { 0x5F, 7 }, + { 0xCD, 8 }, + { 0x7E, 8 }, + { 0x2F1, 10 }, + { 0x16, 5 }, + { 0xE, 5 }, + { 0x2E, 6 }, + { 0x65, 7 }, + { 0x2B, 6 }, + { 0x28, 6 }, + { 0x3E, 7 }, + { 0xBD, 8 }, + { 0x199, 9 } + }, + { /* DC bias table 14 */ + { 0x2, 3 }, + { 0x7, 4 }, + { 0x16, 5 }, + { 0x6, 4 }, + { 0x36, 6 }, + { 0x5C, 7 }, + { 0x15D, 9 }, + { 0x15C, 9 }, + { 0x2BF, 10 }, + { 0x0, 2 }, + { 0x7, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x18, 5 }, + { 0x34, 6 }, + { 0x2A, 6 }, + { 0x5E, 7 }, + { 0x6A, 7 }, + { 0x64, 7 }, + { 0x5D, 7 }, + { 0xCB, 8 }, + { 0xAD, 8 }, + { 0x2BE, 10 }, + { 0x14, 5 }, + { 0x33, 6 }, + { 0x6E, 7 }, + { 0x5F, 7 }, + { 0x6F, 7 }, + { 0x6B, 7 }, + { 0xCA, 8 }, + { 0xAC, 8 }, + { 0x15E, 9 } + }, + { /* DC bias table 15 */ + { 0xF, 4 }, + { 0x1D, 5 }, + { 0x18, 5 }, + { 0xB, 4 }, + { 0x19, 5 }, + { 0x29, 6 }, + { 0xD6, 8 }, + { 0x551, 11 }, + { 0xAA1, 12 }, + { 0x1, 2 }, + { 0x0, 2 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x1B, 5 }, + { 0x38, 6 }, + { 0x28, 6 }, + { 0x57, 7 }, + { 0x6A, 7 }, + { 0x68, 7 }, + { 0x56, 7 }, + { 0xE5, 8 }, + { 0x155, 9 }, + { 0xAA0, 12 }, + { 0x73, 7 }, + { 0x69, 7 }, + { 0xD7, 8 }, + { 0xAB, 8 }, + { 0xE4, 8 }, + { 0xA9, 8 }, + { 0x151, 9 }, + { 0x150, 9 }, + { 0x2A9, 10 } + } +}; + +static const uint16_t ac_bias_0[16][32][2] = { + { /* AC bias group 1, table 0 */ + { 0x8, 5 }, + { 0x25, 7 }, + { 0x17A, 9 }, + { 0x2F7, 10 }, + { 0xBDB, 12 }, + { 0x17B4, 13 }, + { 0x2F6B, 14 }, + { 0x1D, 5 }, + { 0x2F6A, 14 }, + { 0x8, 4 }, + { 0x7, 4 }, + { 0x1, 4 }, + { 0x2, 4 }, + { 0xA, 4 }, + { 0x6, 4 }, + { 0x0, 4 }, + { 0x1C, 5 }, + { 0x9, 4 }, + { 0xD, 4 }, + { 0xF, 4 }, + { 0xC, 4 }, + { 0x3, 4 }, + { 0xA, 5 }, + { 0x16, 5 }, + { 0x13, 6 }, + { 0x5D, 7 }, + { 0x24, 7 }, + { 0xBC, 8 }, + { 0x5C, 7 }, + { 0x5EC, 11 }, + { 0xB, 5 }, + { 0x5F, 7 } + }, + { /* AC bias group 1, table 1 */ + { 0xF, 5 }, + { 0x10, 6 }, + { 0x4B, 8 }, + { 0xC6, 8 }, + { 0x31D, 10 }, + { 0xC71, 12 }, + { 0xC70, 12 }, + { 0x1, 4 }, + { 0xC73, 12 }, + { 0x8, 4 }, + { 0x9, 4 }, + { 0x2, 4 }, + { 0x3, 4 }, + { 0xB, 4 }, + { 0x6, 4 }, + { 0x0, 4 }, + { 0x1C, 5 }, + { 0x5, 4 }, + { 0xD, 4 }, + { 0xF, 4 }, + { 0xA, 4 }, + { 0x19, 5 }, + { 0x13, 6 }, + { 0x1D, 5 }, + { 0x30, 6 }, + { 0x62, 7 }, + { 0x24, 7 }, + { 0x4A, 8 }, + { 0x18F, 9 }, + { 0xC72, 12 }, + { 0xE, 5 }, + { 0x11, 6 } + }, + { /* AC bias group 1, table 2 */ + { 0x1B, 5 }, + { 0x3, 6 }, + { 0x8D, 8 }, + { 0x40, 7 }, + { 0x239, 10 }, + { 0x471, 11 }, + { 0x8E0, 12 }, + { 0x3, 4 }, + { 0x11C3, 13 }, + { 0xA, 4 }, + { 0x9, 4 }, + { 0x4, 4 }, + { 0x5, 4 }, + { 0xE, 4 }, + { 0x7, 4 }, + { 0x1, 4 }, + { 0x1E, 5 }, + { 0x6, 4 }, + { 0xC, 4 }, + { 0xB, 4 }, + { 0x2, 4 }, + { 0x0, 5 }, + { 0x41, 7 }, + { 0x1F, 5 }, + { 0x22, 6 }, + { 0x2, 6 }, + { 0x8F, 8 }, + { 0x8C, 8 }, + { 0x11D, 9 }, + { 0x11C2, 13 }, + { 0x1A, 5 }, + { 0x21, 6 } + }, + { /* AC bias group 1, table 3 */ + { 0x1F, 5 }, + { 0x3, 6 }, + { 0x3, 7 }, + { 0x43, 7 }, + { 0xB, 9 }, + { 0x15, 10 }, + { 0x51, 12 }, + { 0x3, 4 }, + { 0x50, 12 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x4, 4 }, + { 0x6, 4 }, + { 0xE, 4 }, + { 0xA, 4 }, + { 0x1, 4 }, + { 0x1E, 5 }, + { 0x5, 4 }, + { 0x9, 4 }, + { 0x7, 4 }, + { 0x11, 5 }, + { 0x2, 6 }, + { 0x4, 8 }, + { 0x2, 4 }, + { 0x2D, 6 }, + { 0x20, 6 }, + { 0x42, 7 }, + { 0x1, 7 }, + { 0x0, 7 }, + { 0x29, 11 }, + { 0x17, 5 }, + { 0x2C, 6 } + }, + { /* AC bias group 1, table 4 */ + { 0x3, 4 }, + { 0x1F, 6 }, + { 0x3A, 7 }, + { 0x5D, 7 }, + { 0x173, 9 }, + { 0x2E4, 10 }, + { 0x172D, 13 }, + { 0x4, 4 }, + { 0x172C, 13 }, + { 0xF, 4 }, + { 0xE, 4 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0xC, 4 }, + { 0xA, 4 }, + { 0x1, 4 }, + { 0x16, 5 }, + { 0x2, 4 }, + { 0x5, 4 }, + { 0x1A, 5 }, + { 0x2F, 6 }, + { 0x38, 7 }, + { 0x5CA, 11 }, + { 0x6, 4 }, + { 0x37, 6 }, + { 0x1E, 6 }, + { 0x3B, 7 }, + { 0x39, 7 }, + { 0xB8, 8 }, + { 0xB97, 12 }, + { 0x0, 4 }, + { 0x36, 6 } + }, + { /* AC bias group 1, table 5 */ + { 0x6, 4 }, + { 0x37, 6 }, + { 0x5D, 7 }, + { 0xC, 6 }, + { 0xB9, 8 }, + { 0x2E3, 10 }, + { 0x5C4, 11 }, + { 0x4, 4 }, + { 0x1715, 13 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0x8, 4 }, + { 0x7, 4 }, + { 0xC, 4 }, + { 0x9, 4 }, + { 0x1D, 5 }, + { 0x16, 5 }, + { 0x1C, 5 }, + { 0x1A, 5 }, + { 0xB, 5 }, + { 0x5E, 7 }, + { 0x170, 9 }, + { 0x1714, 13 }, + { 0xA, 4 }, + { 0xA, 5 }, + { 0x36, 6 }, + { 0x5F, 7 }, + { 0x1B, 7 }, + { 0x1A, 7 }, + { 0xB8B, 12 }, + { 0x2, 4 }, + { 0x7, 5 } + }, + { /* AC bias group 1, table 6 */ + { 0xC, 4 }, + { 0xB, 5 }, + { 0x79, 7 }, + { 0x22, 6 }, + { 0xF0, 8 }, + { 0x119, 9 }, + { 0x230, 10 }, + { 0x1D, 5 }, + { 0x8C4, 12 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xA, 4 }, + { 0x9, 4 }, + { 0xB, 4 }, + { 0x7, 4 }, + { 0x1C, 5 }, + { 0x3D, 6 }, + { 0xD, 5 }, + { 0x8, 5 }, + { 0x15, 6 }, + { 0x8D, 8 }, + { 0x118B, 13 }, + { 0x118A, 13 }, + { 0xD, 4 }, + { 0x10, 5 }, + { 0x9, 5 }, + { 0x14, 6 }, + { 0x47, 7 }, + { 0xF1, 8 }, + { 0x463, 11 }, + { 0x1F, 5 }, + { 0xC, 5 } + }, + { /* AC bias group 1, table 7 */ + { 0x0, 3 }, + { 0x1A, 5 }, + { 0x33, 6 }, + { 0xC, 5 }, + { 0x46, 7 }, + { 0x1E3, 9 }, + { 0x3C5, 10 }, + { 0x17, 5 }, + { 0x1E21, 13 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x9, 4 }, + { 0xA, 4 }, + { 0x7, 4 }, + { 0x1B, 5 }, + { 0x3D, 6 }, + { 0x1B, 6 }, + { 0x22, 6 }, + { 0x79, 7 }, + { 0xF0, 8 }, + { 0x1E20, 13 }, + { 0x1E23, 13 }, + { 0x1E22, 13 }, + { 0xE, 4 }, + { 0x16, 5 }, + { 0x18, 5 }, + { 0x32, 6 }, + { 0x1A, 6 }, + { 0x47, 7 }, + { 0x789, 11 }, + { 0x1F, 5 }, + { 0x10, 5 } + }, + { /* AC bias group 1, table 8 */ + { 0x1D, 5 }, + { 0x61, 7 }, + { 0x4E, 8 }, + { 0x9E, 9 }, + { 0x27C, 11 }, + { 0x9F5, 13 }, + { 0x9F4, 13 }, + { 0x3, 4 }, + { 0x60, 7 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0xB, 4 }, + { 0xA, 4 }, + { 0x9, 4 }, + { 0x5, 4 }, + { 0xD, 5 }, + { 0x31, 6 }, + { 0x8, 5 }, + { 0x38, 6 }, + { 0x12, 6 }, + { 0x26, 7 }, + { 0x13F, 10 }, + { 0x4FB, 12 }, + { 0xD, 4 }, + { 0x2, 4 }, + { 0xC, 5 }, + { 0x39, 6 }, + { 0x1C, 6 }, + { 0xF, 5 }, + { 0x1D, 6 }, + { 0x8, 4 }, + { 0x19, 5 } + }, + { /* AC bias group 1, table 9 */ + { 0x7, 4 }, + { 0x19, 6 }, + { 0xAB, 8 }, + { 0xAA, 8 }, + { 0x119, 10 }, + { 0x461, 12 }, + { 0x460, 12 }, + { 0x1B, 5 }, + { 0x47, 8 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xC, 4 }, + { 0xB, 4 }, + { 0x9, 4 }, + { 0x5, 4 }, + { 0xD, 5 }, + { 0x35, 6 }, + { 0x3D, 6 }, + { 0x3C, 6 }, + { 0x18, 6 }, + { 0x22, 7 }, + { 0x8D, 9 }, + { 0x231, 11 }, + { 0xE, 4 }, + { 0x1F, 5 }, + { 0x9, 5 }, + { 0x2B, 6 }, + { 0x10, 6 }, + { 0x34, 6 }, + { 0x54, 7 }, + { 0x8, 4 }, + { 0x14, 5 } + }, + { /* AC bias group 1, table 10 */ + { 0xC, 4 }, + { 0x5, 5 }, + { 0x8, 6 }, + { 0x5B, 7 }, + { 0x4D, 9 }, + { 0x131, 11 }, + { 0x261, 12 }, + { 0x1A, 5 }, + { 0x12, 7 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0xA, 4 }, + { 0x9, 4 }, + { 0x6, 4 }, + { 0x1B, 5 }, + { 0x6, 5 }, + { 0x1C, 6 }, + { 0x2C, 6 }, + { 0x15, 6 }, + { 0x5A, 7 }, + { 0x27, 8 }, + { 0x99, 10 }, + { 0x260, 12 }, + { 0xE, 4 }, + { 0x4, 4 }, + { 0xF, 5 }, + { 0x7, 5 }, + { 0x1D, 6 }, + { 0xB, 5 }, + { 0x14, 6 }, + { 0x8, 4 }, + { 0x17, 5 } + }, + { /* AC bias group 1, table 11 */ + { 0xF, 4 }, + { 0x13, 5 }, + { 0x75, 7 }, + { 0x24, 6 }, + { 0x95, 8 }, + { 0x251, 10 }, + { 0x4A0, 11 }, + { 0x10, 5 }, + { 0xC8, 8 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x1, 4 }, + { 0x0, 4 }, + { 0x1A, 5 }, + { 0x11, 5 }, + { 0x2C, 6 }, + { 0x65, 7 }, + { 0x74, 7 }, + { 0x4B, 7 }, + { 0xC9, 8 }, + { 0x129, 9 }, + { 0x943, 12 }, + { 0x942, 12 }, + { 0x3, 3 }, + { 0xA, 4 }, + { 0x1C, 5 }, + { 0x18, 5 }, + { 0x33, 6 }, + { 0x17, 5 }, + { 0x2D, 6 }, + { 0x1B, 5 }, + { 0x3B, 6 } + }, + { /* AC bias group 1, table 12 */ + { 0x3, 3 }, + { 0x1A, 5 }, + { 0x2D, 6 }, + { 0x38, 6 }, + { 0x28, 7 }, + { 0x395, 10 }, + { 0xE51, 12 }, + { 0x37, 6 }, + { 0xE4, 8 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0x1F, 5 }, + { 0x1E, 5 }, + { 0x17, 5 }, + { 0x3A, 6 }, + { 0x73, 7 }, + { 0x2A, 7 }, + { 0x2B, 7 }, + { 0x29, 7 }, + { 0x1CB, 9 }, + { 0x729, 11 }, + { 0x1CA1, 13 }, + { 0x1CA0, 13 }, + { 0x4, 3 }, + { 0xA, 4 }, + { 0x4, 4 }, + { 0x18, 5 }, + { 0x36, 6 }, + { 0xB, 5 }, + { 0x2C, 6 }, + { 0x19, 5 }, + { 0x3B, 6 } + }, + { /* AC bias group 1, table 13 */ + { 0x4, 3 }, + { 0x4, 4 }, + { 0x3F, 6 }, + { 0x17, 5 }, + { 0x75, 7 }, + { 0x1F5, 9 }, + { 0x7D1, 11 }, + { 0x17, 6 }, + { 0x1F6, 9 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0x1B, 5 }, + { 0x1A, 5 }, + { 0xA, 5 }, + { 0x32, 6 }, + { 0x74, 7 }, + { 0xF8, 8 }, + { 0xF9, 8 }, + { 0x1F7, 9 }, + { 0x3E9, 10 }, + { 0xFA0, 12 }, + { 0x1F43, 13 }, + { 0x1F42, 13 }, + { 0x3, 3 }, + { 0xA, 4 }, + { 0x1E, 5 }, + { 0x1C, 5 }, + { 0x3B, 6 }, + { 0x18, 5 }, + { 0x16, 6 }, + { 0x16, 5 }, + { 0x33, 6 } + }, + { /* AC bias group 1, table 14 */ + { 0x4, 3 }, + { 0x7, 4 }, + { 0x18, 5 }, + { 0x1E, 5 }, + { 0x36, 6 }, + { 0x31, 7 }, + { 0x177, 9 }, + { 0x77, 7 }, + { 0x176, 9 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0x1A, 5 }, + { 0x19, 5 }, + { 0x3A, 6 }, + { 0x19, 6 }, + { 0x5C, 7 }, + { 0xBA, 8 }, + { 0x61, 8 }, + { 0xC1, 9 }, + { 0x180, 10 }, + { 0x302, 11 }, + { 0x607, 12 }, + { 0x606, 12 }, + { 0x2, 3 }, + { 0xA, 4 }, + { 0x1F, 5 }, + { 0x1C, 5 }, + { 0x37, 6 }, + { 0x16, 5 }, + { 0x76, 7 }, + { 0xD, 5 }, + { 0x2F, 6 } + }, + { /* AC bias group 1, table 15 */ + { 0x0, 3 }, + { 0xA, 4 }, + { 0x1A, 5 }, + { 0xC, 4 }, + { 0x1D, 5 }, + { 0x39, 6 }, + { 0x78, 7 }, + { 0x5E, 7 }, + { 0x393, 11 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x16, 5 }, + { 0xF, 5 }, + { 0x2E, 6 }, + { 0x5F, 7 }, + { 0x73, 8 }, + { 0xE5, 9 }, + { 0x1C8, 10 }, + { 0xE4A, 13 }, + { 0x1C97, 14 }, + { 0x1C96, 14 }, + { 0xE49, 13 }, + { 0xE48, 13 }, + { 0x4, 3 }, + { 0x6, 4 }, + { 0x1F, 5 }, + { 0x1B, 5 }, + { 0x1D, 6 }, + { 0x38, 6 }, + { 0x38, 7 }, + { 0x3D, 6 }, + { 0x79, 7 } + } +}; + +static const uint16_t ac_bias_1[16][32][2] = { + { /* AC bias group 2, table 0 */ + { 0xB, 5 }, + { 0x2B, 7 }, + { 0x54, 8 }, + { 0x1B7, 9 }, + { 0x6D9, 11 }, + { 0xDB1, 12 }, + { 0xDB0, 12 }, + { 0x2, 4 }, + { 0xAB, 9 }, + { 0x9, 4 }, + { 0xA, 4 }, + { 0x7, 4 }, + { 0x8, 4 }, + { 0xF, 4 }, + { 0xC, 4 }, + { 0x3, 4 }, + { 0x1D, 5 }, + { 0x4, 4 }, + { 0xB, 4 }, + { 0x6, 4 }, + { 0x1A, 5 }, + { 0x3, 6 }, + { 0xAA, 9 }, + { 0x1, 4 }, + { 0x0, 5 }, + { 0x14, 6 }, + { 0x6C, 7 }, + { 0xDA, 8 }, + { 0x2, 6 }, + { 0x36D, 10 }, + { 0x1C, 5 }, + { 0x37, 6 } + }, + { /* AC bias group 2, table 1 */ + { 0x1D, 5 }, + { 0x4, 6 }, + { 0xB6, 8 }, + { 0x6A, 8 }, + { 0x5B9, 11 }, + { 0x16E1, 13 }, + { 0x16E0, 13 }, + { 0x7, 4 }, + { 0x16F, 9 }, + { 0xC, 4 }, + { 0xD, 4 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0xF, 4 }, + { 0xA, 4 }, + { 0x3, 4 }, + { 0x17, 5 }, + { 0x2, 4 }, + { 0x4, 4 }, + { 0x1C, 5 }, + { 0x2C, 6 }, + { 0x6B, 8 }, + { 0xB71, 12 }, + { 0x5, 4 }, + { 0x3, 5 }, + { 0x1B, 6 }, + { 0x5A, 7 }, + { 0x34, 7 }, + { 0x5, 6 }, + { 0x2DD, 10 }, + { 0x0, 4 }, + { 0xC, 5 } + }, + { /* AC bias group 2, table 2 */ + { 0x3, 4 }, + { 0x7F, 7 }, + { 0xA1, 8 }, + { 0xA0, 8 }, + { 0x20C, 10 }, + { 0x834, 12 }, + { 0x106B, 13 }, + { 0x7, 4 }, + { 0x82, 8 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0x0, 3 }, + { 0x9, 4 }, + { 0x2, 4 }, + { 0x11, 5 }, + { 0x1E, 5 }, + { 0x15, 5 }, + { 0x3E, 6 }, + { 0x40, 7 }, + { 0x41B, 11 }, + { 0x106A, 13 }, + { 0x6, 4 }, + { 0xA, 5 }, + { 0x29, 6 }, + { 0x7E, 7 }, + { 0x51, 7 }, + { 0x21, 6 }, + { 0x107, 9 }, + { 0x4, 4 }, + { 0xB, 5 } + }, + { /* AC bias group 2, table 3 */ + { 0x7, 4 }, + { 0x1B, 6 }, + { 0xF6, 8 }, + { 0xE9, 8 }, + { 0x3A1, 10 }, + { 0x740, 11 }, + { 0xE82, 12 }, + { 0x1F, 5 }, + { 0x1EF, 9 }, + { 0x1, 3 }, + { 0x2, 3 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0xD, 4 }, + { 0x8, 4 }, + { 0x1C, 5 }, + { 0x3, 5 }, + { 0x12, 5 }, + { 0x2, 5 }, + { 0x75, 7 }, + { 0x1D1, 9 }, + { 0x1D07, 13 }, + { 0x1D06, 13 }, + { 0xA, 4 }, + { 0x13, 5 }, + { 0x3B, 6 }, + { 0x1A, 6 }, + { 0x7A, 7 }, + { 0x3C, 6 }, + { 0x1EE, 9 }, + { 0x0, 4 }, + { 0xC, 5 } + }, + { /* AC bias group 2, table 4 */ + { 0xD, 4 }, + { 0x3D, 6 }, + { 0x42, 7 }, + { 0x37, 7 }, + { 0xD9, 9 }, + { 0x362, 11 }, + { 0x6C6, 12 }, + { 0x1F, 5 }, + { 0x86, 8 }, + { 0x1, 3 }, + { 0x2, 3 }, + { 0xC, 4 }, + { 0xB, 4 }, + { 0xA, 4 }, + { 0x1, 4 }, + { 0xF, 5 }, + { 0x25, 6 }, + { 0x3C, 6 }, + { 0x1A, 6 }, + { 0x87, 8 }, + { 0x1B0, 10 }, + { 0xD8F, 13 }, + { 0xD8E, 13 }, + { 0xE, 4 }, + { 0x13, 5 }, + { 0xC, 5 }, + { 0x24, 6 }, + { 0x20, 6 }, + { 0x11, 5 }, + { 0x6D, 8 }, + { 0x0, 4 }, + { 0xE, 5 } + }, + { /* AC bias group 2, table 5 */ + { 0x0, 3 }, + { 0x12, 5 }, + { 0x76, 7 }, + { 0x77, 7 }, + { 0x14D, 9 }, + { 0x533, 11 }, + { 0x14C9, 13 }, + { 0x13, 5 }, + { 0xA5, 8 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0x8, 4 }, + { 0x1A, 5 }, + { 0x2B, 6 }, + { 0x75, 7 }, + { 0x74, 7 }, + { 0xA7, 8 }, + { 0x298, 10 }, + { 0x14C8, 13 }, + { 0x14CB, 13 }, + { 0x14CA, 13 }, + { 0xF, 4 }, + { 0x1C, 5 }, + { 0x7, 5 }, + { 0x2A, 6 }, + { 0x28, 6 }, + { 0x1B, 5 }, + { 0xA4, 8 }, + { 0x2, 4 }, + { 0x6, 5 } + }, + { /* AC bias group 2, table 6 */ + { 0x2, 3 }, + { 0x1A, 5 }, + { 0x2B, 6 }, + { 0x3A, 6 }, + { 0xED, 8 }, + { 0x283, 10 }, + { 0xA0A, 12 }, + { 0x4, 5 }, + { 0xA1, 8 }, + { 0x4, 3 }, + { 0x3, 3 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0x1F, 5 }, + { 0x6, 5 }, + { 0x77, 7 }, + { 0xA3, 8 }, + { 0xA2, 8 }, + { 0x140, 9 }, + { 0x1417, 13 }, + { 0x1416, 13 }, + { 0xA09, 12 }, + { 0xA08, 12 }, + { 0x0, 3 }, + { 0x1E, 5 }, + { 0x7, 5 }, + { 0x2A, 6 }, + { 0x29, 6 }, + { 0x1C, 5 }, + { 0xEC, 8 }, + { 0x1B, 5 }, + { 0x5, 5 } + }, + { /* AC bias group 2, table 7 */ + { 0x2, 3 }, + { 0x2, 4 }, + { 0x18, 5 }, + { 0x1D, 5 }, + { 0x35, 6 }, + { 0xE4, 8 }, + { 0x1CF, 11 }, + { 0x1D, 7 }, + { 0x72, 9 }, + { 0x4, 3 }, + { 0x5, 3 }, + { 0x6, 4 }, + { 0x7, 4 }, + { 0x6, 5 }, + { 0x73, 7 }, + { 0x38, 8 }, + { 0x1CE, 11 }, + { 0x39B, 12 }, + { 0x398, 12 }, + { 0x733, 13 }, + { 0x732, 13 }, + { 0x735, 13 }, + { 0x734, 13 }, + { 0x0, 3 }, + { 0x1F, 5 }, + { 0x1B, 5 }, + { 0x34, 6 }, + { 0xF, 6 }, + { 0x1E, 5 }, + { 0xE5, 8 }, + { 0x19, 5 }, + { 0x38, 6 } + }, + { /* AC bias group 2, table 8 */ + { 0x16, 5 }, + { 0x50, 7 }, + { 0x172, 9 }, + { 0x2E7, 10 }, + { 0x1732, 13 }, + { 0x2E67, 14 }, + { 0x2E66, 14 }, + { 0x6, 4 }, + { 0x51, 7 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x9, 4 }, + { 0x1C, 5 }, + { 0x9, 5 }, + { 0x1C, 6 }, + { 0x1D, 6 }, + { 0x5D, 7 }, + { 0xB8, 8 }, + { 0x5CD, 11 }, + { 0x1731, 13 }, + { 0x1730, 13 }, + { 0xF, 4 }, + { 0x5, 4 }, + { 0xF, 5 }, + { 0x8, 5 }, + { 0x29, 6 }, + { 0x1D, 5 }, + { 0x2F, 6 }, + { 0x8, 4 }, + { 0x15, 5 } + }, + { /* AC bias group 2, table 9 */ + { 0x9, 4 }, + { 0x21, 6 }, + { 0x40, 7 }, + { 0xAD, 8 }, + { 0x2B0, 10 }, + { 0x1589, 13 }, + { 0x1588, 13 }, + { 0x1C, 5 }, + { 0x5F, 7 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x6, 4 }, + { 0x11, 5 }, + { 0x2A, 6 }, + { 0x57, 7 }, + { 0x5E, 7 }, + { 0x41, 7 }, + { 0x159, 9 }, + { 0x563, 11 }, + { 0x158B, 13 }, + { 0x158A, 13 }, + { 0x1, 3 }, + { 0x5, 4 }, + { 0x14, 5 }, + { 0x3B, 6 }, + { 0x2E, 6 }, + { 0x4, 4 }, + { 0x3A, 6 }, + { 0x7, 4 }, + { 0x16, 5 } + }, + { /* AC bias group 2, table 10 */ + { 0xE, 4 }, + { 0x7, 5 }, + { 0x46, 7 }, + { 0x45, 7 }, + { 0x64, 9 }, + { 0x32A, 12 }, + { 0x657, 13 }, + { 0x18, 5 }, + { 0xD, 6 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0xA, 4 }, + { 0xB, 4 }, + { 0x1A, 5 }, + { 0x36, 6 }, + { 0x47, 7 }, + { 0x44, 7 }, + { 0x18, 7 }, + { 0x33, 8 }, + { 0xCB, 10 }, + { 0x656, 13 }, + { 0x329, 12 }, + { 0x328, 12 }, + { 0x2, 3 }, + { 0x6, 4 }, + { 0x19, 5 }, + { 0xE, 5 }, + { 0x37, 6 }, + { 0x9, 4 }, + { 0xF, 5 }, + { 0x2, 4 }, + { 0x10, 5 } + }, + { /* AC bias group 2, table 11 */ + { 0x3, 3 }, + { 0x18, 5 }, + { 0x23, 6 }, + { 0x77, 7 }, + { 0x194, 9 }, + { 0x1956, 13 }, + { 0x32AF, 14 }, + { 0x3A, 6 }, + { 0x76, 7 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x1F, 5 }, + { 0x1E, 5 }, + { 0x14, 5 }, + { 0x22, 6 }, + { 0x64, 7 }, + { 0x197, 9 }, + { 0x196, 9 }, + { 0x32B, 10 }, + { 0x654, 11 }, + { 0x32AE, 14 }, + { 0x1955, 13 }, + { 0x1954, 13 }, + { 0x0, 3 }, + { 0x9, 4 }, + { 0x1C, 5 }, + { 0x15, 5 }, + { 0x10, 5 }, + { 0xD, 4 }, + { 0x17, 5 }, + { 0x16, 5 }, + { 0x33, 6 } + }, + { /* AC bias group 2, table 12 */ + { 0x5, 3 }, + { 0x6, 4 }, + { 0x3E, 6 }, + { 0x10, 5 }, + { 0x48, 7 }, + { 0x93F, 12 }, + { 0x24FA, 14 }, + { 0x32, 6 }, + { 0x67, 7 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x1B, 5 }, + { 0x1E, 5 }, + { 0x34, 6 }, + { 0x66, 7 }, + { 0x92, 8 }, + { 0x126, 9 }, + { 0x24E, 10 }, + { 0x49E, 11 }, + { 0x49F7, 15 }, + { 0x49F6, 15 }, + { 0x24F9, 14 }, + { 0x24F8, 14 }, + { 0x0, 3 }, + { 0x7, 4 }, + { 0x18, 5 }, + { 0x11, 5 }, + { 0x3F, 6 }, + { 0xE, 4 }, + { 0x13, 5 }, + { 0x35, 6 }, + { 0x25, 6 } + }, + { /* AC bias group 2, table 13 */ + { 0x5, 3 }, + { 0x8, 4 }, + { 0x12, 5 }, + { 0x1C, 5 }, + { 0x1C, 6 }, + { 0xEA, 9 }, + { 0x1D75, 14 }, + { 0x1E, 6 }, + { 0x66, 7 }, + { 0x1, 3 }, + { 0x2, 3 }, + { 0x1B, 5 }, + { 0x1A, 5 }, + { 0x1F, 6 }, + { 0x3B, 7 }, + { 0x74, 8 }, + { 0x1D6, 10 }, + { 0x3AF, 11 }, + { 0x1D74, 14 }, + { 0x1D77, 14 }, + { 0x1D76, 14 }, + { 0xEB9, 13 }, + { 0xEB8, 13 }, + { 0xF, 4 }, + { 0x6, 4 }, + { 0x13, 5 }, + { 0x3B, 6 }, + { 0x3A, 6 }, + { 0x0, 3 }, + { 0x18, 5 }, + { 0x32, 6 }, + { 0x67, 7 } + }, + { /* AC bias group 2, table 14 */ + { 0x4, 3 }, + { 0xA, 4 }, + { 0x1B, 5 }, + { 0xC, 4 }, + { 0xD, 5 }, + { 0xE6, 8 }, + { 0x684, 11 }, + { 0x72, 7 }, + { 0xE7, 8 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x17, 5 }, + { 0x16, 5 }, + { 0x18, 6 }, + { 0xD1, 8 }, + { 0x1A0, 9 }, + { 0x686, 11 }, + { 0xD0F, 12 }, + { 0xD0A, 12 }, + { 0x1A17, 13 }, + { 0x1A16, 13 }, + { 0x1A1D, 13 }, + { 0x1A1C, 13 }, + { 0xF, 4 }, + { 0x1D, 5 }, + { 0xE, 5 }, + { 0x35, 6 }, + { 0x38, 6 }, + { 0x0, 3 }, + { 0xF, 5 }, + { 0x19, 6 }, + { 0x69, 7 } + }, + { /* AC bias group 2, table 15 */ + { 0x3, 3 }, + { 0xC, 4 }, + { 0x1B, 5 }, + { 0x0, 3 }, + { 0x3, 4 }, + { 0x2E, 6 }, + { 0x51, 9 }, + { 0xBC, 8 }, + { 0x53, 9 }, + { 0x4, 3 }, + { 0x2, 3 }, + { 0x16, 5 }, + { 0x15, 5 }, + { 0x15, 7 }, + { 0x50, 9 }, + { 0xA4, 10 }, + { 0x294, 12 }, + { 0x52B, 13 }, + { 0x52A, 13 }, + { 0x52D, 13 }, + { 0x52C, 13 }, + { 0x52F, 13 }, + { 0x52E, 13 }, + { 0xE, 4 }, + { 0x1A, 5 }, + { 0x4, 5 }, + { 0x28, 6 }, + { 0x29, 6 }, + { 0xF, 4 }, + { 0xB, 6 }, + { 0x5F, 7 }, + { 0xBD, 8 } + } +}; + +static const uint16_t ac_bias_2[16][32][2] = { + { /* AC bias group 3, table 0 */ + { 0x3, 4 }, + { 0x9, 6 }, + { 0xD0, 8 }, + { 0x1A3, 9 }, + { 0x344, 10 }, + { 0xD14, 12 }, + { 0x1A2B, 13 }, + { 0x4, 4 }, + { 0x15, 7 }, + { 0x0, 3 }, + { 0xF, 4 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0xE, 4 }, + { 0x9, 4 }, + { 0x1B, 5 }, + { 0xA, 5 }, + { 0x14, 5 }, + { 0xD, 5 }, + { 0x2A, 6 }, + { 0x14, 7 }, + { 0x68B, 11 }, + { 0x1A2A, 13 }, + { 0x8, 4 }, + { 0xB, 5 }, + { 0x2B, 6 }, + { 0xB, 6 }, + { 0x69, 7 }, + { 0x35, 6 }, + { 0x8, 6 }, + { 0x7, 4 }, + { 0xC, 5 } + }, + { /* AC bias group 3, table 1 */ + { 0xA, 4 }, + { 0x3C, 6 }, + { 0x32, 7 }, + { 0x30, 7 }, + { 0xC5, 9 }, + { 0x621, 12 }, + { 0x620, 12 }, + { 0x1F, 5 }, + { 0x33, 7 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x4, 4 }, + { 0xD, 5 }, + { 0x26, 6 }, + { 0x27, 6 }, + { 0x14, 6 }, + { 0x63, 8 }, + { 0x189, 10 }, + { 0x623, 12 }, + { 0x622, 12 }, + { 0xB, 4 }, + { 0x12, 5 }, + { 0x3D, 6 }, + { 0x22, 6 }, + { 0x15, 6 }, + { 0xB, 5 }, + { 0x23, 6 }, + { 0x7, 4 }, + { 0x10, 5 } + }, + { /* AC bias group 3, table 2 */ + { 0xF, 4 }, + { 0xC, 5 }, + { 0x43, 7 }, + { 0x10, 6 }, + { 0x44, 8 }, + { 0x114, 10 }, + { 0x455, 12 }, + { 0x18, 5 }, + { 0x23, 7 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0x9, 4 }, + { 0x19, 5 }, + { 0x9, 5 }, + { 0x17, 6 }, + { 0x16, 6 }, + { 0x42, 7 }, + { 0x8B, 9 }, + { 0x454, 12 }, + { 0x457, 12 }, + { 0x456, 12 }, + { 0xB, 4 }, + { 0x15, 5 }, + { 0xA, 5 }, + { 0x29, 6 }, + { 0x20, 6 }, + { 0xD, 5 }, + { 0x28, 6 }, + { 0x7, 4 }, + { 0x11, 5 } + }, + { /* AC bias group 3, table 3 */ + { 0x1, 3 }, + { 0x1A, 5 }, + { 0x29, 6 }, + { 0x2A, 6 }, + { 0xA0, 8 }, + { 0x285, 10 }, + { 0x1425, 13 }, + { 0x2, 5 }, + { 0x0, 7 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0xC, 4 }, + { 0xB, 4 }, + { 0x8, 4 }, + { 0x12, 5 }, + { 0x1, 6 }, + { 0x51, 7 }, + { 0x1, 7 }, + { 0x143, 9 }, + { 0x508, 11 }, + { 0x1424, 13 }, + { 0x1427, 13 }, + { 0x1426, 13 }, + { 0xF, 4 }, + { 0x1C, 5 }, + { 0x3, 5 }, + { 0x37, 6 }, + { 0x2B, 6 }, + { 0x13, 5 }, + { 0x36, 6 }, + { 0x1D, 5 }, + { 0x1, 5 } + }, + { /* AC bias group 3, table 4 */ + { 0x4, 3 }, + { 0x1F, 5 }, + { 0x3D, 6 }, + { 0x6, 5 }, + { 0x16, 7 }, + { 0x53, 9 }, + { 0x14A, 11 }, + { 0x34, 6 }, + { 0x2A, 8 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0xB, 4 }, + { 0xC, 4 }, + { 0x1C, 5 }, + { 0x37, 6 }, + { 0x17, 7 }, + { 0x2B, 8 }, + { 0x28, 8 }, + { 0xA4, 10 }, + { 0x52D, 13 }, + { 0x52C, 13 }, + { 0x52F, 13 }, + { 0x52E, 13 }, + { 0x0, 3 }, + { 0x1D, 5 }, + { 0x7, 5 }, + { 0x4, 5 }, + { 0x35, 6 }, + { 0x14, 5 }, + { 0x36, 6 }, + { 0x15, 5 }, + { 0x3C, 6 } + }, + { /* AC bias group 3, table 5 */ + { 0x4, 3 }, + { 0xA, 4 }, + { 0x7, 5 }, + { 0x1D, 5 }, + { 0x9, 6 }, + { 0x1F3, 9 }, + { 0x7C7, 11 }, + { 0x8, 6 }, + { 0x1F0, 9 }, + { 0x3, 3 }, + { 0x2, 3 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x17, 5 }, + { 0x7D, 7 }, + { 0x1F2, 9 }, + { 0x7C6, 11 }, + { 0x7C5, 11 }, + { 0x1F12, 13 }, + { 0x3E27, 14 }, + { 0x3E26, 14 }, + { 0x1F11, 13 }, + { 0x1F10, 13 }, + { 0x0, 3 }, + { 0x1E, 5 }, + { 0x6, 5 }, + { 0x39, 6 }, + { 0x38, 6 }, + { 0x3F, 6 }, + { 0x2C, 6 }, + { 0x5, 5 }, + { 0x2D, 6 } + }, + { /* AC bias group 3, table 6 */ + { 0x2, 3 }, + { 0x7, 4 }, + { 0x18, 5 }, + { 0x3, 4 }, + { 0x5, 5 }, + { 0x35, 7 }, + { 0x4F, 9 }, + { 0x12, 7 }, + { 0x4E5, 13 }, + { 0x5, 3 }, + { 0x4, 3 }, + { 0xD, 4 }, + { 0xE, 4 }, + { 0x33, 6 }, + { 0x26, 8 }, + { 0x9D, 10 }, + { 0x4E4, 13 }, + { 0x4E7, 13 }, + { 0x4E6, 13 }, + { 0x4E1, 13 }, + { 0x4E0, 13 }, + { 0x4E3, 13 }, + { 0x4E2, 13 }, + { 0x0, 3 }, + { 0x1F, 5 }, + { 0xC, 5 }, + { 0x3D, 6 }, + { 0x3C, 6 }, + { 0x32, 6 }, + { 0x34, 7 }, + { 0x1B, 6 }, + { 0x8, 6 } + }, + { /* AC bias group 3, table 7 */ + { 0x0, 3 }, + { 0x4, 4 }, + { 0x1C, 5 }, + { 0xF, 4 }, + { 0x2, 4 }, + { 0x7, 5 }, + { 0x75, 7 }, + { 0xE8, 8 }, + { 0x1D2A, 13 }, + { 0x5, 3 }, + { 0x4, 3 }, + { 0xD, 4 }, + { 0xC, 4 }, + { 0x77, 7 }, + { 0xE96, 12 }, + { 0x3A57, 14 }, + { 0x3A56, 14 }, + { 0x3A5D, 14 }, + { 0x3A5C, 14 }, + { 0x3A5F, 14 }, + { 0x3A5E, 14 }, + { 0x1D29, 13 }, + { 0x1D28, 13 }, + { 0x3, 3 }, + { 0x6, 5 }, + { 0xA, 5 }, + { 0x2C, 7 }, + { 0x17, 6 }, + { 0x76, 7 }, + { 0x1D3, 9 }, + { 0x3A4, 10 }, + { 0x2D, 7 } + }, + { /* AC bias group 3, table 8 */ + { 0xA, 4 }, + { 0x24, 6 }, + { 0xBF, 8 }, + { 0x85, 8 }, + { 0x211, 10 }, + { 0x842, 12 }, + { 0x1087, 13 }, + { 0x18, 5 }, + { 0x20, 6 }, + { 0x1, 3 }, + { 0x2, 3 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0x7, 4 }, + { 0x13, 5 }, + { 0x25, 6 }, + { 0x5E, 7 }, + { 0x43, 7 }, + { 0xBE, 8 }, + { 0x109, 9 }, + { 0x1086, 13 }, + { 0x841, 12 }, + { 0x840, 12 }, + { 0xF, 4 }, + { 0x1, 4 }, + { 0x11, 5 }, + { 0x0, 5 }, + { 0x2E, 6 }, + { 0x19, 5 }, + { 0x1, 5 }, + { 0x6, 4 }, + { 0x16, 5 } + }, + { /* AC bias group 3, table 9 */ + { 0x2, 3 }, + { 0xF, 5 }, + { 0x6F, 7 }, + { 0x61, 7 }, + { 0x374, 10 }, + { 0x1BA8, 13 }, + { 0x3753, 14 }, + { 0x12, 5 }, + { 0x36, 6 }, + { 0x0, 3 }, + { 0x1, 3 }, + { 0xA, 4 }, + { 0xB, 4 }, + { 0x1A, 5 }, + { 0x31, 6 }, + { 0x60, 7 }, + { 0xDC, 8 }, + { 0x1BB, 9 }, + { 0x6EB, 11 }, + { 0x1BAB, 13 }, + { 0x3752, 14 }, + { 0x3755, 14 }, + { 0x3754, 14 }, + { 0xE, 4 }, + { 0x6, 4 }, + { 0x13, 5 }, + { 0xE, 5 }, + { 0x3E, 6 }, + { 0x8, 4 }, + { 0x1E, 5 }, + { 0x19, 5 }, + { 0x3F, 6 } + }, + { /* AC bias group 3, table 10 */ + { 0x3, 3 }, + { 0x1C, 5 }, + { 0x25, 6 }, + { 0x24, 6 }, + { 0x1DA, 9 }, + { 0x1DBD, 13 }, + { 0x3B7C, 14 }, + { 0x3C, 6 }, + { 0x3D, 6 }, + { 0x0, 3 }, + { 0x1, 3 }, + { 0xB, 4 }, + { 0xA, 4 }, + { 0xB, 5 }, + { 0x77, 7 }, + { 0xEC, 8 }, + { 0x3B6, 10 }, + { 0x76E, 11 }, + { 0x1DBF, 13 }, + { 0x76FB, 15 }, + { 0x76FA, 15 }, + { 0x3B79, 14 }, + { 0x3B78, 14 }, + { 0xD, 4 }, + { 0x1F, 5 }, + { 0x13, 5 }, + { 0xA, 5 }, + { 0x8, 5 }, + { 0xC, 4 }, + { 0x8, 4 }, + { 0x9, 5 }, + { 0x3A, 6 } + }, + { /* AC bias group 3, table 11 */ + { 0x5, 3 }, + { 0x3, 4 }, + { 0x4, 5 }, + { 0x10, 5 }, + { 0x8F, 8 }, + { 0x475, 11 }, + { 0x11D1, 13 }, + { 0x79, 7 }, + { 0x27, 6 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0x1, 4 }, + { 0x0, 4 }, + { 0x26, 6 }, + { 0x46, 7 }, + { 0x11C, 9 }, + { 0x477, 11 }, + { 0x8ED, 12 }, + { 0x11D0, 13 }, + { 0x11D3, 13 }, + { 0x11D2, 13 }, + { 0x11D9, 13 }, + { 0x11D8, 13 }, + { 0xD, 4 }, + { 0x1F, 5 }, + { 0x12, 5 }, + { 0x5, 5 }, + { 0x3D, 6 }, + { 0xC, 4 }, + { 0xE, 4 }, + { 0x22, 6 }, + { 0x78, 7 } + }, + { /* AC bias group 3, table 12 */ + { 0x5, 3 }, + { 0xC, 4 }, + { 0x1B, 5 }, + { 0x0, 4 }, + { 0x6, 6 }, + { 0x3E2, 10 }, + { 0x3E3D, 14 }, + { 0xF, 7 }, + { 0x34, 6 }, + { 0x3, 3 }, + { 0x2, 3 }, + { 0x1E, 5 }, + { 0x1D, 5 }, + { 0x7D, 7 }, + { 0x1F0, 9 }, + { 0x7C6, 11 }, + { 0x3E3C, 14 }, + { 0x3E3F, 14 }, + { 0x3E3E, 14 }, + { 0x3E39, 14 }, + { 0x3E38, 14 }, + { 0x3E3B, 14 }, + { 0x3E3A, 14 }, + { 0x8, 4 }, + { 0x1C, 5 }, + { 0x2, 5 }, + { 0x3F, 6 }, + { 0x35, 6 }, + { 0x9, 4 }, + { 0x1, 3 }, + { 0xE, 7 }, + { 0xF9, 8 } + }, + { /* AC bias group 3, table 13 */ + { 0x4, 3 }, + { 0xB, 4 }, + { 0x1, 4 }, + { 0xA, 4 }, + { 0x1E, 6 }, + { 0xE0, 9 }, + { 0xE1E, 13 }, + { 0x71, 8 }, + { 0x39, 7 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0xD, 5 }, + { 0xC, 5 }, + { 0x20, 7 }, + { 0x1C2, 10 }, + { 0x1C3F, 14 }, + { 0x1C3E, 14 }, + { 0xE19, 13 }, + { 0xE18, 13 }, + { 0xE1B, 13 }, + { 0xE1A, 13 }, + { 0xE1D, 13 }, + { 0xE1C, 13 }, + { 0x0, 4 }, + { 0x9, 5 }, + { 0x1D, 6 }, + { 0x1F, 6 }, + { 0x11, 6 }, + { 0x5, 4 }, + { 0x1, 3 }, + { 0x43, 8 }, + { 0x42, 8 } + }, + { /* AC bias group 3, table 14 */ + { 0x4, 3 }, + { 0xD, 4 }, + { 0x7, 4 }, + { 0x2, 3 }, + { 0x14, 5 }, + { 0x16C, 9 }, + { 0x16D1, 13 }, + { 0x2DF, 10 }, + { 0x16E, 9 }, + { 0x0, 2 }, + { 0x7, 3 }, + { 0x2C, 6 }, + { 0x2B, 6 }, + { 0x2DE, 10 }, + { 0x16D0, 13 }, + { 0x16D3, 13 }, + { 0x16D2, 13 }, + { 0x2DB5, 14 }, + { 0x2DB4, 14 }, + { 0x2DB7, 14 }, + { 0x2DB6, 14 }, + { 0x16D9, 13 }, + { 0x16D8, 13 }, + { 0xC, 5 }, + { 0x2A, 6 }, + { 0x5A, 7 }, + { 0x1B, 6 }, + { 0x1A, 6 }, + { 0x17, 5 }, + { 0xC, 4 }, + { 0x5B7, 11 }, + { 0x5B5, 11 } + }, + { /* AC bias group 3, table 15 */ + { 0x2, 2 }, + { 0xF, 4 }, + { 0x1C, 5 }, + { 0xC, 4 }, + { 0x3B, 6 }, + { 0x1AC, 9 }, + { 0x1AD8, 13 }, + { 0x35B3, 14 }, + { 0x35B2, 14 }, + { 0x1, 2 }, + { 0x0, 2 }, + { 0x69, 7 }, + { 0x68, 7 }, + { 0x35BD, 14 }, + { 0x35BC, 14 }, + { 0x35BF, 14 }, + { 0x35BE, 14 }, + { 0x35B9, 14 }, + { 0x35B8, 14 }, + { 0x35BB, 14 }, + { 0x35BA, 14 }, + { 0x35B5, 14 }, + { 0x35B4, 14 }, + { 0x1A9, 9 }, + { 0x1A8, 9 }, + { 0x35A, 10 }, + { 0xD7, 8 }, + { 0xD5, 8 }, + { 0x3A, 6 }, + { 0x1B, 5 }, + { 0x35B7, 14 }, + { 0x35B6, 14 } + } +}; + +static const uint16_t ac_bias_3[16][32][2] = { + { /* AC bias group 4, table 0 */ + { 0x0, 3 }, + { 0x10, 5 }, + { 0x72, 7 }, + { 0x71, 7 }, + { 0x154, 9 }, + { 0xAAB, 12 }, + { 0xAA8, 12 }, + { 0x14, 5 }, + { 0x70, 7 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0xC, 4 }, + { 0xB, 4 }, + { 0x3, 4 }, + { 0x11, 5 }, + { 0x73, 7 }, + { 0x54, 7 }, + { 0xAB, 8 }, + { 0x2AB, 10 }, + { 0x1553, 13 }, + { 0x1552, 13 }, + { 0x1555, 13 }, + { 0x1554, 13 }, + { 0xD, 4 }, + { 0x1E, 5 }, + { 0x12, 5 }, + { 0x3E, 6 }, + { 0x2B, 6 }, + { 0x2, 4 }, + { 0x3F, 6 }, + { 0x1D, 5 }, + { 0x13, 5 } + }, + { /* AC bias group 4, table 1 */ + { 0x3, 3 }, + { 0x1F, 5 }, + { 0x29, 6 }, + { 0x3D, 6 }, + { 0xC, 7 }, + { 0x69, 10 }, + { 0x345, 13 }, + { 0x2, 5 }, + { 0x28, 6 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0xE, 4 }, + { 0xC, 4 }, + { 0x15, 5 }, + { 0x7, 6 }, + { 0x1B, 8 }, + { 0x6B, 10 }, + { 0x6A, 10 }, + { 0x344, 13 }, + { 0x347, 13 }, + { 0x346, 13 }, + { 0x1A1, 12 }, + { 0x1A0, 12 }, + { 0xB, 4 }, + { 0x1A, 5 }, + { 0x12, 5 }, + { 0x0, 5 }, + { 0x3C, 6 }, + { 0x8, 4 }, + { 0x1B, 5 }, + { 0x13, 5 }, + { 0x1, 5 } + }, + { /* AC bias group 4, table 2 */ + { 0x4, 3 }, + { 0x4, 4 }, + { 0x3F, 6 }, + { 0x14, 5 }, + { 0x56, 7 }, + { 0x15C, 9 }, + { 0x15D5, 13 }, + { 0x3C, 6 }, + { 0x2A, 6 }, + { 0x0, 3 }, + { 0x1, 3 }, + { 0xE, 4 }, + { 0xD, 4 }, + { 0xC, 5 }, + { 0xAF, 8 }, + { 0x2BB, 10 }, + { 0x15D4, 13 }, + { 0x15D7, 13 }, + { 0x15D6, 13 }, + { 0x15D1, 13 }, + { 0x15D0, 13 }, + { 0x15D3, 13 }, + { 0x15D2, 13 }, + { 0xB, 4 }, + { 0x19, 5 }, + { 0xD, 5 }, + { 0x3E, 6 }, + { 0x31, 6 }, + { 0x7, 4 }, + { 0x5, 4 }, + { 0x3D, 6 }, + { 0x30, 6 } + }, + { /* AC bias group 4, table 3 */ + { 0x5, 3 }, + { 0x8, 4 }, + { 0x1A, 5 }, + { 0x0, 4 }, + { 0x36, 6 }, + { 0x11, 8 }, + { 0x106, 12 }, + { 0xA, 7 }, + { 0x6E, 7 }, + { 0x2, 3 }, + { 0x3, 3 }, + { 0x3, 4 }, + { 0x2, 4 }, + { 0x6F, 7 }, + { 0x21, 9 }, + { 0x20F, 13 }, + { 0x20E, 13 }, + { 0x101, 12 }, + { 0x100, 12 }, + { 0x103, 12 }, + { 0x102, 12 }, + { 0x105, 12 }, + { 0x104, 12 }, + { 0xC, 4 }, + { 0x1E, 5 }, + { 0x3, 5 }, + { 0x3E, 6 }, + { 0x3F, 6 }, + { 0x9, 4 }, + { 0xE, 4 }, + { 0xB, 7 }, + { 0x9, 7 } + }, + { /* AC bias group 4, table 4 */ + { 0x2, 3 }, + { 0xE, 4 }, + { 0x1E, 5 }, + { 0xC, 4 }, + { 0x1F, 5 }, + { 0x6E, 7 }, + { 0xAD, 10 }, + { 0xAF, 10 }, + { 0x14, 7 }, + { 0x4, 3 }, + { 0x3, 3 }, + { 0x1A, 5 }, + { 0x17, 5 }, + { 0x2A, 8 }, + { 0x576, 13 }, + { 0xAEF, 14 }, + { 0xAEE, 14 }, + { 0x571, 13 }, + { 0x570, 13 }, + { 0x573, 13 }, + { 0x572, 13 }, + { 0x575, 13 }, + { 0x574, 13 }, + { 0x3, 4 }, + { 0x16, 5 }, + { 0x4, 5 }, + { 0x36, 6 }, + { 0xB, 6 }, + { 0xA, 4 }, + { 0x0, 3 }, + { 0x6F, 7 }, + { 0xAC, 10 } + }, + { /* AC bias group 4, table 5 */ + { 0x4, 3 }, + { 0x5, 4 }, + { 0x3, 3 }, + { 0x1, 3 }, + { 0x4, 4 }, + { 0x2F, 6 }, + { 0x526, 11 }, + { 0x1495, 13 }, + { 0xA6, 8 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x2D, 6 }, + { 0x2C, 6 }, + { 0x1494, 13 }, + { 0x1497, 13 }, + { 0x1496, 13 }, + { 0x1491, 13 }, + { 0x1490, 13 }, + { 0x1493, 13 }, + { 0x1492, 13 }, + { 0x293D, 14 }, + { 0x293C, 14 }, + { 0x293F, 14 }, + { 0x0, 3 }, + { 0x28, 6 }, + { 0xA5, 8 }, + { 0x148, 9 }, + { 0xA7, 8 }, + { 0x2E, 6 }, + { 0x15, 5 }, + { 0xA4E, 12 }, + { 0x293E, 14 } + }, + { /* AC bias group 4, table 6 */ + { 0x4, 3 }, + { 0x5, 4 }, + { 0x3, 3 }, + { 0x1, 3 }, + { 0x4, 4 }, + { 0x2F, 6 }, + { 0x526, 11 }, + { 0x1495, 13 }, + { 0xA6, 8 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x2D, 6 }, + { 0x2C, 6 }, + { 0x1494, 13 }, + { 0x1497, 13 }, + { 0x1496, 13 }, + { 0x1491, 13 }, + { 0x1490, 13 }, + { 0x1493, 13 }, + { 0x1492, 13 }, + { 0x293D, 14 }, + { 0x293C, 14 }, + { 0x293F, 14 }, + { 0x0, 3 }, + { 0x28, 6 }, + { 0xA5, 8 }, + { 0x148, 9 }, + { 0xA7, 8 }, + { 0x2E, 6 }, + { 0x15, 5 }, + { 0xA4E, 12 }, + { 0x293E, 14 } + }, + { /* AC bias group 4, table 7 */ + { 0x4, 3 }, + { 0x5, 4 }, + { 0x3, 3 }, + { 0x1, 3 }, + { 0x4, 4 }, + { 0x2F, 6 }, + { 0x526, 11 }, + { 0x1495, 13 }, + { 0xA6, 8 }, + { 0x7, 3 }, + { 0x6, 3 }, + { 0x2D, 6 }, + { 0x2C, 6 }, + { 0x1494, 13 }, + { 0x1497, 13 }, + { 0x1496, 13 }, + { 0x1491, 13 }, + { 0x1490, 13 }, + { 0x1493, 13 }, + { 0x1492, 13 }, + { 0x293D, 14 }, + { 0x293C, 14 }, + { 0x293F, 14 }, + { 0x0, 3 }, + { 0x28, 6 }, + { 0xA5, 8 }, + { 0x148, 9 }, + { 0xA7, 8 }, + { 0x2E, 6 }, + { 0x15, 5 }, + { 0xA4E, 12 }, + { 0x293E, 14 } + }, + { /* AC bias group 4, table 8 */ + { 0x3, 3 }, + { 0x11, 5 }, + { 0x20, 6 }, + { 0x74, 7 }, + { 0x10D, 9 }, + { 0x863, 12 }, + { 0x860, 12 }, + { 0xA, 5 }, + { 0x75, 7 }, + { 0x1, 3 }, + { 0x0, 3 }, + { 0xB, 4 }, + { 0xA, 4 }, + { 0x18, 5 }, + { 0x38, 6 }, + { 0x42, 7 }, + { 0x10F, 9 }, + { 0x10E, 9 }, + { 0x219, 10 }, + { 0x10C3, 13 }, + { 0x10C2, 13 }, + { 0x10C5, 13 }, + { 0x10C4, 13 }, + { 0xF, 4 }, + { 0x4, 4 }, + { 0x19, 5 }, + { 0xB, 5 }, + { 0x39, 6 }, + { 0x9, 4 }, + { 0x1B, 5 }, + { 0x1A, 5 }, + { 0x3B, 6 } + }, + { /* AC bias group 4, table 9 */ + { 0x5, 3 }, + { 0x1, 4 }, + { 0x3E, 6 }, + { 0x1, 5 }, + { 0xE2, 8 }, + { 0x1C6F, 13 }, + { 0x38D9, 14 }, + { 0x39, 6 }, + { 0x1F, 6 }, + { 0x2, 3 }, + { 0x1, 3 }, + { 0x9, 4 }, + { 0x8, 4 }, + { 0x0, 5 }, + { 0x70, 7 }, + { 0x1C7, 9 }, + { 0x38C, 10 }, + { 0x71A, 11 }, + { 0x38D8, 14 }, + { 0x38DB, 14 }, + { 0x38DA, 14 }, + { 0x38DD, 14 }, + { 0x38DC, 14 }, + { 0xD, 4 }, + { 0x1D, 5 }, + { 0xE, 5 }, + { 0x3F, 6 }, + { 0x3C, 6 }, + { 0xC, 4 }, + { 0x6, 4 }, + { 0x3D, 6 }, + { 0x1E, 6 } + }, + { /* AC bias group 4, table 10 */ + { 0x6, 3 }, + { 0xB, 4 }, + { 0x11, 5 }, + { 0x1E, 5 }, + { 0x74, 7 }, + { 0x3AA, 10 }, + { 0x1D5C, 13 }, + { 0x1, 6 }, + { 0x21, 6 }, + { 0x1, 3 }, + { 0x2, 3 }, + { 0x7, 4 }, + { 0x6, 4 }, + { 0x3E, 6 }, + { 0xEB, 8 }, + { 0x1D4, 9 }, + { 0xEAF, 12 }, + { 0x3ABB, 14 }, + { 0x3ABA, 14 }, + { 0x1D59, 13 }, + { 0x1D58, 13 }, + { 0x1D5B, 13 }, + { 0x1D5A, 13 }, + { 0xA, 4 }, + { 0x1C, 5 }, + { 0x1, 5 }, + { 0x3F, 6 }, + { 0x3B, 6 }, + { 0x1, 4 }, + { 0x9, 4 }, + { 0x20, 6 }, + { 0x0, 6 } + }, + { /* AC bias group 4, table 11 */ + { 0x4, 3 }, + { 0xA, 4 }, + { 0x17, 5 }, + { 0x4, 4 }, + { 0x16, 6 }, + { 0x16A, 9 }, + { 0x16B1, 13 }, + { 0x17, 7 }, + { 0x5B, 7 }, + { 0x6, 3 }, + { 0x7, 3 }, + { 0x1, 4 }, + { 0x0, 4 }, + { 0xA, 6 }, + { 0x2D7, 10 }, + { 0xB5A, 12 }, + { 0x16B0, 13 }, + { 0x16B3, 13 }, + { 0x16B2, 13 }, + { 0x2D6D, 14 }, + { 0x2D6C, 14 }, + { 0x2D6F, 14 }, + { 0x2D6E, 14 }, + { 0x6, 4 }, + { 0xA, 5 }, + { 0x4, 5 }, + { 0x2C, 6 }, + { 0x17, 6 }, + { 0x3, 4 }, + { 0x7, 4 }, + { 0x16, 7 }, + { 0xB4, 8 } + }, + { /* AC bias group 4, table 12 */ + { 0x5, 3 }, + { 0xD, 4 }, + { 0x5, 4 }, + { 0x9, 4 }, + { 0x33, 6 }, + { 0x193, 9 }, + { 0x192C, 13 }, + { 0x61, 8 }, + { 0x31, 7 }, + { 0x0, 2 }, + { 0x7, 3 }, + { 0x10, 5 }, + { 0x11, 5 }, + { 0xC8, 8 }, + { 0x192F, 13 }, + { 0x325B, 14 }, + { 0x325A, 14 }, + { 0x1929, 13 }, + { 0x1928, 13 }, + { 0x192B, 13 }, + { 0x192A, 13 }, + { 0x325D, 14 }, + { 0x325C, 14 }, + { 0x18, 5 }, + { 0x1A, 6 }, + { 0x1B, 6 }, + { 0x65, 7 }, + { 0x19, 6 }, + { 0x4, 4 }, + { 0x7, 4 }, + { 0x60, 8 }, + { 0x324, 10 } + }, + { /* AC bias group 4, table 13 */ + { 0x6, 3 }, + { 0x0, 3 }, + { 0x2, 4 }, + { 0xF, 4 }, + { 0x39, 6 }, + { 0x1D9, 9 }, + { 0x1D82, 13 }, + { 0x761, 11 }, + { 0x3BE, 10 }, + { 0x1, 2 }, + { 0x2, 2 }, + { 0xF, 6 }, + { 0xE, 6 }, + { 0x762, 11 }, + { 0x3B07, 14 }, + { 0x3B06, 14 }, + { 0x3B1D, 14 }, + { 0x3B1C, 14 }, + { 0x3B1F, 14 }, + { 0x3B1E, 14 }, + { 0x3B19, 14 }, + { 0x3B18, 14 }, + { 0x3B1B, 14 }, + { 0x38, 6 }, + { 0x1DE, 9 }, + { 0xED, 8 }, + { 0x3BF, 10 }, + { 0xEE, 8 }, + { 0x3A, 6 }, + { 0x6, 5 }, + { 0xEC0, 12 }, + { 0x3B1A, 14 } + }, + { /* AC bias group 4, table 14 */ + { 0x0, 2 }, + { 0x2, 3 }, + { 0xF, 5 }, + { 0x6, 4 }, + { 0x1C, 6 }, + { 0x1D0, 10 }, + { 0xE8C, 13 }, + { 0x1D1B, 14 }, + { 0x1D1A, 14 }, + { 0x3, 2 }, + { 0x2, 2 }, + { 0xEA, 9 }, + { 0xE9, 9 }, + { 0xE89, 13 }, + { 0xE88, 13 }, + { 0xE8B, 13 }, + { 0xE8A, 13 }, + { 0x1D65, 14 }, + { 0x1D64, 14 }, + { 0x1D67, 14 }, + { 0x1D66, 14 }, + { 0x1D61, 14 }, + { 0x1D60, 14 }, + { 0x3AD, 11 }, + { 0x1D63, 14 }, + { 0x1D62, 14 }, + { 0x1D1D, 14 }, + { 0x1D1C, 14 }, + { 0x3B, 7 }, + { 0x1D7, 10 }, + { 0x1D1F, 14 }, + { 0x1D1E, 14 } + }, + { /* AC bias group 4, table 15 */ + { 0x2, 2 }, + { 0xF, 4 }, + { 0x1C, 5 }, + { 0xC, 4 }, + { 0x3B, 6 }, + { 0x1AC, 9 }, + { 0x1AD8, 13 }, + { 0x35B3, 14 }, + { 0x35B2, 14 }, + { 0x1, 2 }, + { 0x0, 2 }, + { 0x69, 7 }, + { 0x68, 7 }, + { 0x35BD, 14 }, + { 0x35BC, 14 }, + { 0x35BF, 14 }, + { 0x35BE, 14 }, + { 0x35B9, 14 }, + { 0x35B8, 14 }, + { 0x35BB, 14 }, + { 0x35BA, 14 }, + { 0x35B5, 14 }, + { 0x35B4, 14 }, + { 0x1A9, 9 }, + { 0x1A8, 9 }, + { 0x35A, 10 }, + { 0xD7, 8 }, + { 0xD5, 8 }, + { 0x3A, 6 }, + { 0x1B, 5 }, + { 0x35B7, 14 }, + { 0x35B6, 14 } + } +}; + +#endif /* AVCODEC_VP3DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3dsp.h new file mode 100644 index 00000000..3b849ec0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp3dsp.h @@ -0,0 +1,64 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP3DSP_H +#define AVCODEC_VP3DSP_H + +#include +#include + +typedef struct VP3DSPContext { + /** + * Copy 8xH pixels from source to destination buffer using a bilinear + * filter with no rounding (i.e. *dst = (*a + *b) >> 1). + * + * @param dst destination buffer, aligned by 8 + * @param a first source buffer, no alignment + * @param b second source buffer, no alignment + * @param stride distance between two lines in source/dest buffers + * @param h height + */ + void (*put_no_rnd_pixels_l2)(uint8_t *dst, + const uint8_t *a, + const uint8_t *b, + ptrdiff_t stride, int h); + + void (*idct_put)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*idct_add)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*idct_dc_add)(uint8_t *dest, ptrdiff_t stride, int16_t *block); + void (*v_loop_filter)(uint8_t *src, ptrdiff_t stride, int *bounding_values); + void (*h_loop_filter)(uint8_t *src, ptrdiff_t stride, int *bounding_values); + void (*v_loop_filter_unaligned)(uint8_t *src, ptrdiff_t stride, int *bounding_values); + void (*h_loop_filter_unaligned)(uint8_t *src, ptrdiff_t stride, int *bounding_values); +} VP3DSPContext; + +void ff_vp3dsp_v_loop_filter_12(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values); +void ff_vp3dsp_h_loop_filter_12(uint8_t *first_pixel, ptrdiff_t stride, int *bounding_values); + +void ff_vp3dsp_idct10_put(uint8_t *dest, ptrdiff_t stride, int16_t *block); +void ff_vp3dsp_idct10_add(uint8_t *dest, ptrdiff_t stride, int16_t *block); + +void ff_vp3dsp_init(VP3DSPContext *c, int flags); +void ff_vp3dsp_init_arm(VP3DSPContext *c, int flags); +void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags); +void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags); +void ff_vp3dsp_init_mips(VP3DSPContext *c, int flags); + +void ff_vp3dsp_set_bounding_values(int * bound_values_array, int filter_limit); + +#endif /* AVCODEC_VP3DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp4data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp4data.h new file mode 100644 index 00000000..69a009ef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp4data.h @@ -0,0 +1,1186 @@ +/* + * Copyright (C) 2019 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP4 video decoder + */ + +#ifndef AVCODEC_VP4DATA_H +#define AVCODEC_VP4DATA_H + +#include + +static const uint8_t vp4_generic_dequant[64] = { + 16, 17, 18, 20, 22, 24, 26, 28, + 17, 18, 20, 22, 24, 26, 28, 32, + 18, 20, 22, 24, 26, 28, 32, 36, + 20, 22, 24, 26, 28, 32, 36, 40, + 22, 24, 26, 28, 32, 36, 40, 44, + 24, 26, 28, 32, 36, 40, 44, 48, + 26, 28, 32, 36, 40, 44, 48, 52, + 28, 32, 36, 40, 44, 48, 52, 56 +}; + +static const uint8_t vp4_y_dc_scale_factor[64] = { + 180, 180, 180, 180, 180, 180, 175, 170, + 165, 160, 157, 155, 152, 150, 147, 145, + 142, 140, 137, 135, 132, 130, 127, 125, + 122, 120, 117, 115, 112, 110, 107, 105, + 102, 100, 97, 95, 92, 90, 87, 85, + 82, 80, 77, 75, 72, 70, 67, 65, + 62, 60, 57, 55, 52, 50, 47, 45, + 42, 40, 37, 35, 32, 30, 27, 25 +}; + +static const uint8_t vp4_uv_dc_scale_factor[64] = { + 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 147, 145, + 142, 140, 137, 135, 132, 130, 127, 125, + 122, 120, 117, 115, 112, 110, 107, 105, + 102, 100, 97, 95, 92, 90, 87, 85, + 82, 80, 77, 75, 72, 70, 67, 65, + 62, 60, 57, 55, 52, 50, 47, 45, + 42, 40, 37, 35, 32, 30, 27, 25 +}; + +static const uint16_t vp4_ac_scale_factor[64] = { + 500, 475, 450, 430, 410, 390, 370, 350, + 330, 315, 300, 285, 270, 260, 250, 240, + 230, 220, 210, 200, 190, 185, 180, 170, + 160, 150, 143, 135, 128, 120, 113, 106, + 100, 94, 90, 85, 80, 75, 70, 66, + 62, 57, 52, 49, 45, 41, 38, 35, + 33, 30, 27, 24, 22, 20, 18, 16, + 14, 12, 10, 9, 7, 6, 4, 1 +}; + +static const uint8_t vp4_filter_limit_values[64] = { + 30, 25, 20, 20, 15, 15, 14, 14, + 13, 13, 12, 12, 11, 11, 10, 10, + 9, 9, 8, 8, 7, 7, 7, 7, + 6, 6, 6, 6, 5, 5, 5, 5, + 4, 4, 4, 4, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1 +}; + +static const uint8_t vp4_block_pattern_table_selector[14] = { + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1 +}; + +static const uint8_t vp4_block_pattern_vlc[2][14][2] = { + { + { 0x0, 3 }, { 0xf, 4 }, { 0x9, 4 }, { 0x2, 3 }, + { 0xd, 4 }, { 0xe, 5 }, { 0xb, 4 }, { 0x1, 3 }, + { 0xf, 5 }, { 0x8, 4 }, { 0x6, 4 }, { 0xe, 4 }, + { 0xc, 4 }, { 0xa, 4 } + }, + { + { 0x7, 4 }, { 0xa, 4 }, { 0x9, 4 }, { 0xc, 4 }, + { 0x8, 4 }, { 0xd, 5 }, { 0x0, 3 }, { 0xe, 4 }, + { 0xc, 5 }, { 0xd, 4 }, { 0x1, 3 }, { 0xb, 4 }, + { 0xf, 4 }, { 0x2, 3 } + } +}; + +static const uint8_t vp4_mv_table_selector[32] = { + 0, 1, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, +}; + +static const uint16_t vp4_mv_vlc[2][7][63][2] = { + { /* x-axis tables */ + { + { 0x6A, 7 }, { 0x11A, 9 }, { 0x18E, 9 }, { 0x237, 10 }, + { 0x4A, 8 }, { 0x236, 10 }, { 0x7A, 8 }, { 0xD6, 9 }, + { 0x7E, 8 }, { 0x1FD, 10 }, { 0x8C, 8 }, { 0xD7, 9 }, + { 0x87, 8 }, { 0x183, 9 }, { 0x3C, 7 }, { 0x61, 7 }, + { 0x47, 7 }, { 0x69, 8 }, { 0x40, 7 }, { 0x48, 8 }, + { 0x49, 7 }, { 0x86, 8 }, { 0x13, 6 }, { 0xD2, 8 }, + { 0x1C, 6 }, { 0x42, 7 }, { 0x25, 6 }, { 0x1B, 6 }, + { 0x13, 5 }, { 0x5, 4 }, { 0x0, 2 }, { 0x7, 3 }, + { 0x5, 3 }, { 0x1B, 5 }, { 0x19, 5 }, { 0x19, 6 }, + { 0x8, 5 }, { 0x45, 7 }, { 0x1D, 6 }, { 0xC6, 8 }, + { 0x68, 7 }, { 0x90, 8 }, { 0x41, 7 }, { 0x4B, 8 }, + { 0x31, 7 }, { 0x18F, 9 }, { 0x62, 7 }, { 0x3E, 7 }, + { 0x44, 7 }, { 0x68, 8 }, { 0x30, 7 }, { 0x182, 9 }, + { 0xC0, 8 }, { 0x1A7, 9 }, { 0x91, 8 }, { 0x92, 9 }, + { 0x7B, 8 }, { 0xFF, 9 }, { 0x1A6, 9 }, { 0x1FC, 10 }, + { 0x6A, 8 }, { 0x93, 9 }, { 0x6B, 7 } + }, + { + { 0x39, 7 }, { 0x259, 10 }, { 0x1B, 8 }, { 0x1D1, 10 }, + { 0x137, 9 }, { 0x1D0, 10 }, { 0x1A, 8 }, { 0x1B5, 10 }, + { 0x1D, 8 }, { 0x4BC, 11 }, { 0x6C, 8 }, { 0x38, 9 }, + { 0x71, 8 }, { 0x2D, 9 }, { 0x7D, 8 }, { 0x75, 8 }, + { 0x19, 7 }, { 0xE9, 9 }, { 0x37, 7 }, { 0x15, 8 }, + { 0x1E, 7 }, { 0xDB, 9 }, { 0x4C, 7 }, { 0x70, 8 }, + { 0xD, 6 }, { 0xC, 7 }, { 0x27, 6 }, { 0x4, 6 }, + { 0x2, 4 }, { 0x0, 4 }, { 0x5, 3 }, { 0x7, 3 }, + { 0x6, 3 }, { 0x2, 3 }, { 0x8, 4 }, { 0x24, 6 }, + { 0xC, 5 }, { 0x3B, 7 }, { 0x1E, 6 }, { 0x9A, 8 }, + { 0xE, 6 }, { 0x69, 8 }, { 0x4A, 7 }, { 0x12D, 9 }, + { 0x35, 7 }, { 0xF9, 9 }, { 0x18, 7 }, { 0x7F, 8 }, + { 0xF, 7 }, { 0xF8, 9 }, { 0x7E, 8 }, { 0x25F, 10 }, + { 0x68, 8 }, { 0x2C, 9 }, { 0x14, 8 }, { 0x258, 10 }, + { 0x136, 9 }, { 0x4BD, 11 }, { 0x12E, 9 }, { 0x1B4, 10 }, + { 0x17, 8 }, { 0x39, 9 }, { 0x1F, 7 } + }, + { + { 0x29, 7 }, { 0x3CB, 10 }, { 0x1F5, 9 }, { 0x263, 10 }, + { 0x1F4, 9 }, { 0x3DA, 10 }, { 0x50, 8 }, { 0x260, 10 }, + { 0x1EC, 9 }, { 0x3D3, 10 }, { 0x109, 9 }, { 0x3D2, 10 }, + { 0x51, 8 }, { 0x792, 11 }, { 0xF3, 8 }, { 0x9A, 8 }, + { 0xF7, 8 }, { 0x132, 9 }, { 0xC1, 8 }, { 0x1E8, 9 }, + { 0x2A, 7 }, { 0x85, 8 }, { 0x61, 7 }, { 0x1F7, 9 }, + { 0x78, 7 }, { 0xC7, 8 }, { 0x23, 6 }, { 0x7C, 7 }, + { 0x12, 5 }, { 0xB, 5 }, { 0xE, 4 }, { 0xD, 4 }, + { 0x0, 2 }, { 0x5, 3 }, { 0x3, 3 }, { 0x4, 4 }, + { 0x19, 5 }, { 0x20, 6 }, { 0x3F, 6 }, { 0x43, 7 }, + { 0x62, 7 }, { 0x9F, 8 }, { 0x4E, 7 }, { 0x181, 9 }, + { 0x2B, 7 }, { 0x137, 9 }, { 0xF5, 8 }, { 0x89, 8 }, + { 0xC6, 8 }, { 0x262, 10 }, { 0x88, 8 }, { 0x3C8, 10 }, + { 0x1F6, 9 }, { 0x3CA, 10 }, { 0x9E, 8 }, { 0x261, 10 }, + { 0x136, 9 }, { 0x108, 9 }, { 0x133, 9 }, { 0x793, 11 }, + { 0x180, 9 }, { 0x3DB, 10 }, { 0x45, 7 } + }, + { + { 0x1, 6 }, { 0x1C7, 9 }, { 0x67, 8 }, { 0xB5, 9 }, + { 0x66, 8 }, { 0x139, 9 }, { 0x99, 8 }, { 0xB4, 9 }, + { 0xC3, 8 }, { 0x130, 9 }, { 0x0, 7 }, { 0x131, 9 }, + { 0x9E, 8 }, { 0xB7, 9 }, { 0x2C, 7 }, { 0x1, 7 }, + { 0x28, 7 }, { 0x138, 9 }, { 0x4B, 7 }, { 0x31, 8 }, + { 0x60, 7 }, { 0x91, 8 }, { 0x3, 6 }, { 0x9D, 8 }, + { 0x17, 6 }, { 0x4D, 7 }, { 0x31, 6 }, { 0x70, 7 }, + { 0x7, 5 }, { 0x3A, 6 }, { 0x7, 4 }, { 0x2, 4 }, + { 0xB, 4 }, { 0x1, 4 }, { 0xF, 4 }, { 0x8, 4 }, + { 0xD, 4 }, { 0x4, 4 }, { 0xA, 4 }, { 0xD, 5 }, + { 0x19, 5 }, { 0x2, 6 }, { 0x3B, 6 }, { 0x4A, 7 }, + { 0x15, 6 }, { 0xC2, 8 }, { 0x18, 6 }, { 0x32, 7 }, + { 0x72, 7 }, { 0x1C6, 9 }, { 0x29, 7 }, { 0x1C5, 9 }, + { 0x49, 7 }, { 0x121, 9 }, { 0x1B, 7 }, { 0x30, 8 }, + { 0x1A, 7 }, { 0x1C4, 9 }, { 0x9F, 8 }, { 0xB6, 9 }, + { 0x19, 7 }, { 0x120, 9 }, { 0x73, 7 } + }, + { + { 0x23, 6 }, { 0x1C8, 9 }, { 0x43, 8 }, { 0x110, 9 }, + { 0xC, 7 }, { 0x153, 9 }, { 0x22, 7 }, { 0x111, 9 }, + { 0xF, 7 }, { 0x42, 8 }, { 0x23, 7 }, { 0x1C9, 9 }, + { 0x2A, 7 }, { 0x1B, 8 }, { 0x73, 7 }, { 0x45, 7 }, + { 0x6E, 7 }, { 0x89, 8 }, { 0x6C, 7 }, { 0x1A, 8 }, + { 0x6F, 7 }, { 0xB6, 8 }, { 0xB, 6 }, { 0xE5, 8 }, + { 0x25, 6 }, { 0x20, 7 }, { 0x29, 6 }, { 0x4D, 7 }, + { 0x2, 5 }, { 0x14, 6 }, { 0x1A, 5 }, { 0x17, 5 }, + { 0x1E, 5 }, { 0x27, 6 }, { 0x18, 5 }, { 0x28, 6 }, + { 0x1F, 5 }, { 0x0, 5 }, { 0x6, 4 }, { 0x10, 5 }, + { 0x7, 4 }, { 0xB, 5 }, { 0x3, 4 }, { 0x4, 5 }, + { 0x1D, 5 }, { 0x2C, 6 }, { 0x19, 5 }, { 0x2B, 6 }, + { 0x9, 5 }, { 0x55, 7 }, { 0x38, 6 }, { 0xE, 7 }, + { 0x24, 6 }, { 0xA8, 8 }, { 0xA, 6 }, { 0x99, 8 }, + { 0x5A, 7 }, { 0x98, 8 }, { 0x6D, 7 }, { 0x152, 9 }, + { 0x2B, 7 }, { 0xB7, 8 }, { 0x1, 5 } + }, + { + { 0x3D, 6 }, { 0xB1, 8 }, { 0xDD, 8 }, { 0x1F6, 9 }, + { 0xC5, 8 }, { 0x188, 9 }, { 0x37, 7 }, { 0x3F, 8 }, + { 0x1E, 7 }, { 0x189, 9 }, { 0xF, 7 }, { 0x3E, 8 }, + { 0x6A, 7 }, { 0x1F7, 9 }, { 0x61, 7 }, { 0x79, 7 }, + { 0x18, 6 }, { 0xB0, 8 }, { 0xE, 6 }, { 0xB3, 8 }, + { 0xC, 6 }, { 0xDF, 8 }, { 0x6, 6 }, { 0xDC, 8 }, + { 0x19, 6 }, { 0xDE, 8 }, { 0x27, 6 }, { 0xE, 7 }, + { 0x1A, 6 }, { 0x63, 7 }, { 0xF, 5 }, { 0xE, 5 }, + { 0x14, 5 }, { 0x7C, 7 }, { 0x36, 6 }, { 0x6B, 7 }, + { 0x3F, 6 }, { 0x60, 7 }, { 0x8, 5 }, { 0x74, 7 }, + { 0x9, 5 }, { 0x78, 7 }, { 0x12, 5 }, { 0xD, 6 }, + { 0x15, 5 }, { 0x2D, 6 }, { 0x2, 4 }, { 0x1C, 5 }, + { 0x5, 4 }, { 0x3B, 6 }, { 0x0, 4 }, { 0x34, 6 }, + { 0x19, 5 }, { 0x26, 6 }, { 0x10, 5 }, { 0x75, 7 }, + { 0x2, 5 }, { 0x36, 7 }, { 0x23, 6 }, { 0xB2, 8 }, + { 0x22, 6 }, { 0xFA, 8 }, { 0x17, 5 } + }, + { + { 0x15, 5 }, { 0xDD, 8 }, { 0x3E, 7 }, { 0x16E, 9 }, + { 0x4C, 7 }, { 0x12, 8 }, { 0x5D, 7 }, { 0xB6, 8 }, + { 0x6F, 7 }, { 0x1F1, 9 }, { 0x69, 7 }, { 0x1F0, 9 }, + { 0x1D, 7 }, { 0x16F, 9 }, { 0x2, 6 }, { 0x6B, 7 }, + { 0xC, 6 }, { 0xDC, 8 }, { 0x68, 7 }, { 0x9B, 8 }, + { 0x7D, 7 }, { 0x9A, 8 }, { 0xD, 6 }, { 0x13, 8 }, + { 0x8, 6 }, { 0xF9, 8 }, { 0x2C, 6 }, { 0x12, 7 }, + { 0x33, 6 }, { 0x4F, 7 }, { 0xD, 5 }, { 0x5, 5 }, + { 0x12, 5 }, { 0x3F, 7 }, { 0x32, 6 }, { 0x13, 7 }, + { 0x3B, 6 }, { 0x5, 6 }, { 0x2F, 6 }, { 0x5A, 7 }, + { 0x3F, 6 }, { 0x1C, 7 }, { 0x3A, 6 }, { 0x8, 7 }, + { 0x36, 6 }, { 0x5C, 7 }, { 0x10, 5 }, { 0x0, 5 }, + { 0xC, 5 }, { 0x4E, 7 }, { 0x3, 5 }, { 0x6A, 7 }, + { 0xE, 5 }, { 0x3, 6 }, { 0x14, 5 }, { 0x1E, 6 }, + { 0x1C, 5 }, { 0xF, 6 }, { 0x18, 5 }, { 0x23, 6 }, + { 0x1E, 5 }, { 0x22, 6 }, { 0x2, 3 } + } + }, + { /* y-axis tables */ + { + { 0x52, 7 }, { 0x14C, 9 }, { 0x1FA, 9 }, { 0x124, 9 }, + { 0x82, 8 }, { 0x29E, 10 }, { 0x8E, 8 }, { 0x24B, 10 }, + { 0x9C, 8 }, { 0x3F7, 10 }, { 0x86, 8 }, { 0x114, 9 }, + { 0x83, 8 }, { 0x3A5, 10 }, { 0xFA, 8 }, { 0x4F, 7 }, + { 0xFB, 8 }, { 0x13B, 9 }, { 0xFC, 8 }, { 0x172, 9 }, + { 0x44, 7 }, { 0x173, 9 }, { 0x51, 7 }, { 0x87, 8 }, + { 0x5F, 7 }, { 0xBA, 8 }, { 0x26, 6 }, { 0x5E, 7 }, + { 0x16, 5 }, { 0x15, 5 }, { 0x6, 3 }, { 0x1, 2 }, + { 0x0, 2 }, { 0x1C, 5 }, { 0x1E, 5 }, { 0x75, 7 }, + { 0x3B, 6 }, { 0xFF, 8 }, { 0x25, 6 }, { 0xBB, 8 }, + { 0x7C, 7 }, { 0x8B, 8 }, { 0x48, 7 }, { 0x171, 9 }, + { 0x42, 7 }, { 0x14E, 9 }, { 0x46, 7 }, { 0xFE, 8 }, + { 0x40, 7 }, { 0x13A, 9 }, { 0x93, 8 }, { 0x115, 9 }, + { 0x8F, 8 }, { 0x3F6, 10 }, { 0x170, 9 }, { 0x29F, 10 }, + { 0x1D1, 9 }, { 0x24A, 10 }, { 0x1D3, 9 }, { 0x3A4, 10 }, + { 0x1D0, 9 }, { 0x14D, 9 }, { 0x50, 7 } + }, + { + { 0xDE, 8 }, { 0x223, 10 }, { 0x136, 9 }, { 0x7C5, 11 }, + { 0x12F, 9 }, { 0x4A1, 11 }, { 0x3D7, 10 }, { 0x7AC, 11 }, + { 0x133, 9 }, { 0x7C4, 11 }, { 0x1B8, 9 }, { 0x222, 10 }, + { 0x96, 8 }, { 0x251, 10 }, { 0x95, 8 }, { 0x1F0, 9 }, + { 0xDA, 8 }, { 0x110, 9 }, { 0x9A, 8 }, { 0x360, 10 }, + { 0xDD, 8 }, { 0x12E, 9 }, { 0x48, 7 }, { 0x92, 8 }, + { 0x78, 7 }, { 0x98, 8 }, { 0x27, 6 }, { 0x45, 7 }, + { 0x1A, 5 }, { 0x10, 5 }, { 0x5, 3 }, { 0x0, 2 }, + { 0x1, 2 }, { 0xE, 4 }, { 0xC, 4 }, { 0x23, 6 }, + { 0x3F, 6 }, { 0xF4, 8 }, { 0x7D, 7 }, { 0x89, 8 }, + { 0x7B, 7 }, { 0x1BE, 9 }, { 0xF9, 8 }, { 0x3E3, 10 }, + { 0xF3, 8 }, { 0x127, 9 }, { 0xDB, 8 }, { 0x1EA, 9 }, + { 0xD9, 8 }, { 0x6E7, 11 }, { 0x1BF, 9 }, { 0x4A0, 11 }, + { 0x1B1, 9 }, { 0x6E6, 11 }, { 0x137, 9 }, { 0x7AD, 11 }, + { 0x126, 9 }, { 0x6C2, 11 }, { 0x132, 9 }, { 0x6C3, 11 }, + { 0x129, 9 }, { 0x372, 10 }, { 0xF2, 8 } + }, + { + { 0x16, 7 }, { 0x9C, 9 }, { 0x13C, 9 }, { 0x9E, 10 }, + { 0x12B, 9 }, { 0xBA, 10 }, { 0x181, 9 }, { 0x317, 10 }, + { 0x84, 8 }, { 0x4E, 9 }, { 0x26, 8 }, { 0x316, 10 }, + { 0x180, 9 }, { 0x5C, 9 }, { 0xC1, 8 }, { 0x2F, 8 }, + { 0x10, 7 }, { 0x45, 9 }, { 0x12, 7 }, { 0x189, 9 }, + { 0x24, 7 }, { 0x13D, 9 }, { 0x66, 7 }, { 0x23, 8 }, + { 0x67, 7 }, { 0xC6, 8 }, { 0x24, 6 }, { 0x4B, 7 }, + { 0x11, 5 }, { 0x32, 6 }, { 0xD, 4 }, { 0x0, 3 }, + { 0x7, 3 }, { 0x5, 3 }, { 0x3, 3 }, { 0x3, 4 }, + { 0x5, 4 }, { 0x20, 6 }, { 0x8, 5 }, { 0x25, 7 }, + { 0x26, 6 }, { 0x4F, 8 }, { 0x61, 7 }, { 0x2B, 8 }, + { 0x4E, 7 }, { 0x18A, 9 }, { 0x43, 7 }, { 0x9F, 8 }, + { 0x14, 7 }, { 0x254, 10 }, { 0x94, 8 }, { 0x310, 10 }, + { 0x85, 8 }, { 0x311, 10 }, { 0x2A, 8 }, { 0xBB, 10 }, + { 0x18F, 9 }, { 0x255, 10 }, { 0x9D, 9 }, { 0x9F, 10 }, + { 0x18E, 9 }, { 0x44, 9 }, { 0x26, 7 } + }, + { + { 0x61, 7 }, { 0x12A, 9 }, { 0xD, 8 }, { 0x3BD, 10 }, + { 0x89, 8 }, { 0x109, 9 }, { 0x18E, 9 }, { 0x210, 10 }, + { 0x1D3, 9 }, { 0x211, 10 }, { 0x88, 8 }, { 0x19, 9 }, + { 0x85, 8 }, { 0x18, 9 }, { 0xE8, 8 }, { 0xCE, 8 }, + { 0x40, 7 }, { 0x119, 9 }, { 0x45, 7 }, { 0x1D2, 9 }, + { 0x4B, 7 }, { 0x1DD, 9 }, { 0x62, 7 }, { 0x94, 8 }, + { 0x75, 7 }, { 0xC, 7 }, { 0x27, 6 }, { 0xD, 7 }, + { 0x2, 5 }, { 0x26, 6 }, { 0x6, 4 }, { 0x1E, 5 }, + { 0xD, 4 }, { 0x1F, 5 }, { 0x1, 3 }, { 0xA, 4 }, + { 0x2, 3 }, { 0x7, 4 }, { 0xB, 4 }, { 0x0, 5 }, + { 0x1C, 5 }, { 0x76, 7 }, { 0x32, 6 }, { 0x7, 7 }, + { 0x24, 6 }, { 0xC0, 8 }, { 0x7, 6 }, { 0x41, 7 }, + { 0x2, 6 }, { 0x18F, 9 }, { 0x47, 7 }, { 0x1DC, 9 }, + { 0x43, 7 }, { 0x12B, 9 }, { 0xCF, 8 }, { 0x118, 9 }, + { 0xC6, 8 }, { 0x3BC, 10 }, { 0x8D, 8 }, { 0x3BF, 10 }, + { 0xC1, 8 }, { 0x3BE, 10 }, { 0x66, 7 } + }, + { + { 0x7, 6 }, { 0x14D, 9 }, { 0xA0, 8 }, { 0x9E, 9 }, + { 0xCF, 8 }, { 0x39C, 10 }, { 0xA1, 8 }, { 0x39D, 10 }, + { 0xAB, 8 }, { 0x1C5, 9 }, { 0x26, 7 }, { 0x14C, 9 }, + { 0x25, 7 }, { 0x19C, 9 }, { 0x3F, 7 }, { 0xE1, 8 }, + { 0x66, 7 }, { 0x1CF, 9 }, { 0x3E, 7 }, { 0x1C4, 9 }, + { 0x72, 7 }, { 0x4E, 8 }, { 0x6, 6 }, { 0xAA, 8 }, + { 0x1C, 6 }, { 0xE6, 8 }, { 0x32, 6 }, { 0x51, 7 }, + { 0x3B, 6 }, { 0x5, 6 }, { 0x1F, 5 }, { 0x18, 5 }, + { 0x2, 4 }, { 0x3A, 6 }, { 0x0, 4 }, { 0x36, 6 }, + { 0x5, 4 }, { 0x8, 5 }, { 0x8, 4 }, { 0x16, 5 }, + { 0x9, 4 }, { 0xD, 5 }, { 0x3, 4 }, { 0x2F, 6 }, + { 0x1E, 5 }, { 0x2E, 6 }, { 0x1A, 5 }, { 0x2B, 6 }, + { 0xC, 5 }, { 0x24, 7 }, { 0x1E, 6 }, { 0xE0, 8 }, + { 0x4, 6 }, { 0xA7, 8 }, { 0x54, 7 }, { 0x1C7, 9 }, + { 0x52, 7 }, { 0x19D, 9 }, { 0x3A, 7 }, { 0x9F, 9 }, + { 0x3B, 7 }, { 0x1C6, 9 }, { 0x37, 6 } + }, + { + { 0x2A, 6 }, { 0x39, 8 }, { 0x25, 7 }, { 0x115, 9 }, + { 0x24, 7 }, { 0x1FA, 9 }, { 0x2F, 7 }, { 0x114, 9 }, + { 0x75, 7 }, { 0x38, 8 }, { 0xFC, 8 }, { 0x36, 8 }, + { 0x1E, 7 }, { 0x1FB, 9 }, { 0x7F, 7 }, { 0x68, 7 }, + { 0x16, 6 }, { 0x37, 8 }, { 0x1F, 7 }, { 0x5C, 8 }, + { 0x13, 6 }, { 0x8B, 8 }, { 0x1, 6 }, { 0xFB, 8 }, + { 0x21, 6 }, { 0x44, 7 }, { 0x2B, 6 }, { 0x6B, 7 }, + { 0x3B, 6 }, { 0xC, 6 }, { 0x1C, 5 }, { 0x19, 5 }, + { 0x1, 4 }, { 0x20, 6 }, { 0x16, 5 }, { 0x7C, 7 }, + { 0xC, 5 }, { 0x74, 7 }, { 0xA, 5 }, { 0x1C, 6 }, + { 0x12, 5 }, { 0x69, 7 }, { 0xF, 5 }, { 0x6A, 7 }, + { 0x14, 5 }, { 0x11, 6 }, { 0x1E, 5 }, { 0x17, 5 }, + { 0x2, 4 }, { 0x31, 6 }, { 0x1B, 5 }, { 0x30, 6 }, + { 0xD, 5 }, { 0x0, 6 }, { 0x1, 5 }, { 0x1D, 7 }, + { 0x23, 6 }, { 0x1A, 7 }, { 0x1D, 6 }, { 0x5D, 8 }, + { 0x10, 6 }, { 0xFA, 8 }, { 0x13, 5 } + }, + { + { 0x12, 5 }, { 0x26, 7 }, { 0x41, 7 }, { 0x22, 8 }, + { 0x1A, 7 }, { 0xA9, 8 }, { 0x4C, 7 }, { 0x1B2, 9 }, + { 0x5C, 7 }, { 0xA8, 8 }, { 0x58, 7 }, { 0x1B3, 9 }, + { 0x40, 7 }, { 0x79, 8 }, { 0xC, 6 }, { 0x55, 7 }, + { 0x1F, 6 }, { 0xD8, 8 }, { 0x76, 7 }, { 0x23, 8 }, + { 0x5F, 7 }, { 0x78, 8 }, { 0xB, 6 }, { 0x1B, 7 }, + { 0x2D, 6 }, { 0x10, 7 }, { 0x37, 6 }, { 0x6D, 7 }, + { 0x32, 6 }, { 0xA, 6 }, { 0x1A, 5 }, { 0x1E, 5 }, + { 0x1F, 5 }, { 0x2B, 6 }, { 0xD, 5 }, { 0x77, 7 }, + { 0x31, 6 }, { 0x5D, 7 }, { 0x38, 6 }, { 0x27, 7 }, + { 0xC, 5 }, { 0xE9, 8 }, { 0x33, 6 }, { 0x5E, 7 }, + { 0x30, 6 }, { 0x4D, 7 }, { 0xA, 5 }, { 0x21, 6 }, + { 0x7, 5 }, { 0x3D, 7 }, { 0x39, 6 }, { 0xE8, 8 }, + { 0xB, 5 }, { 0x59, 7 }, { 0x14, 5 }, { 0x27, 6 }, + { 0x11, 5 }, { 0x75, 7 }, { 0xE, 5 }, { 0x9, 6 }, + { 0x8, 5 }, { 0x12, 6 }, { 0x0, 3 } + } + } +}; + +static const uint16_t vp4_dc_bias[16][32][2] = { + { /* DC bias table 0 */ + { 0xC, 5 }, { 0x70, 7 }, { 0x1CA, 9 }, { 0x1CB, 9 }, + { 0x391, 10 }, { 0x1C9B, 13 }, { 0x3935, 14 }, { 0x71, 7 }, + { 0x3934, 14 }, { 0xB, 4 }, { 0xF, 4 }, { 0x19, 5 }, + { 0x2, 4 }, { 0x9, 4 }, { 0x3, 4 }, { 0x1D, 5 }, + { 0x18, 5 }, { 0x7, 4 }, { 0xD, 4 }, { 0x2, 3 }, + { 0x0, 3 }, { 0xA, 4 }, { 0x8, 4 }, { 0x1A, 6 }, + { 0x73, 7 }, { 0x6F, 8 }, { 0xE4C, 12 }, { 0x727, 11 }, + { 0x392, 10 }, { 0x390, 10 }, { 0x36, 7 }, { 0x6E, 8 } + }, + { /* DC bias table 1 */ + { 0x11, 5 }, { 0x7A, 7 }, { 0x83, 8 }, { 0x40, 7 }, + { 0x105, 9 }, { 0x413, 11 }, { 0x410, 11 }, { 0x7B, 7 }, + { 0x822, 12 }, { 0xE, 4 }, { 0x2, 3 }, { 0x2, 4 }, + { 0x6, 4 }, { 0xA, 4 }, { 0x7, 4 }, { 0x1F, 5 }, + { 0x17, 5 }, { 0x9, 4 }, { 0xD, 4 }, { 0x0, 3 }, + { 0xC, 4 }, { 0x3, 4 }, { 0x3C, 6 }, { 0x2C, 6 }, + { 0x21, 6 }, { 0x169, 9 }, { 0x412, 11 }, { 0x2D0, 10 }, + { 0x2D1, 10 }, { 0x823, 12 }, { 0x5B, 7 }, { 0xB5, 8 } + }, + { /* DC bias table 2 */ + { 0x17, 5 }, { 0x10, 6 }, { 0xB6, 8 }, { 0x22, 7 }, + { 0x16A, 9 }, { 0x2D0, 10 }, { 0xB48, 12 }, { 0x77, 7 }, + { 0x1692, 13 }, { 0x0, 3 }, { 0x3, 3 }, { 0x3, 4 }, + { 0x9, 4 }, { 0xC, 4 }, { 0x5, 4 }, { 0x2, 4 }, + { 0x1C, 5 }, { 0x8, 4 }, { 0xD, 4 }, { 0xF, 4 }, + { 0xA, 4 }, { 0x9, 5 }, { 0x23, 7 }, { 0x3A, 6 }, + { 0x2C, 6 }, { 0x16B, 9 }, { 0x5A5, 11 }, { 0x2D3, 10 }, + { 0x2D1, 10 }, { 0x1693, 13 }, { 0x76, 7 }, { 0xB7, 8 } + }, + { /* DC bias table 3 */ + { 0x1E, 5 }, { 0x13, 6 }, { 0xFB, 8 }, { 0x7C, 7 }, + { 0x46, 8 }, { 0x7D6, 11 }, { 0xFA9, 12 }, { 0x12, 6 }, + { 0x1F50, 13 }, { 0x1, 3 }, { 0x4, 3 }, { 0x5, 4 }, + { 0xA, 4 }, { 0xE, 4 }, { 0x7, 4 }, { 0x0, 4 }, + { 0x17, 5 }, { 0x6, 4 }, { 0xD, 4 }, { 0xC, 4 }, + { 0x1, 4 }, { 0x2C, 6 }, { 0x8F, 9 }, { 0x3F, 6 }, + { 0x2D, 6 }, { 0x1F4, 9 }, { 0x7D5, 11 }, { 0x8E, 9 }, + { 0x7D7, 11 }, { 0x1F51, 13 }, { 0x10, 6 }, { 0x22, 7 } + }, + { /* DC bias table 4 */ + { 0x1, 4 }, { 0x2B, 6 }, { 0x12, 7 }, { 0x55, 7 }, + { 0x27, 8 }, { 0x3B0, 10 }, { 0x762, 11 }, { 0x77, 7 }, + { 0x261, 12 }, { 0x2, 3 }, { 0x6, 3 }, { 0x7, 4 }, + { 0xB, 4 }, { 0xF, 4 }, { 0x8, 4 }, { 0x0, 4 }, + { 0x1C, 5 }, { 0x3, 4 }, { 0x9, 4 }, { 0x6, 4 }, + { 0x14, 5 }, { 0x54, 7 }, { 0x131, 11 }, { 0x5, 5 }, + { 0x3A, 6 }, { 0x1D9, 9 }, { 0x99, 10 }, { 0x4D, 9 }, + { 0x763, 11 }, { 0x260, 12 }, { 0x8, 6 }, { 0xED, 8 } + }, + { /* DC bias table 5 */ + { 0x4, 4 }, { 0x33, 6 }, { 0x60, 7 }, { 0x65, 7 }, + { 0xC2, 8 }, { 0x30D, 10 }, { 0x619, 11 }, { 0x64, 7 }, + { 0x1862, 13 }, { 0x4, 3 }, { 0x7, 3 }, { 0xA, 4 }, + { 0xB, 4 }, { 0xD, 4 }, { 0x6, 4 }, { 0x0, 4 }, + { 0xF, 5 }, { 0x3, 4 }, { 0x5, 4 }, { 0x2, 4 }, + { 0x2, 5 }, { 0x77, 8 }, { 0xC30, 12 }, { 0x3, 5 }, + { 0x31, 6 }, { 0x187, 9 }, { 0x1D9, 10 }, { 0xED, 9 }, + { 0x1D8, 10 }, { 0x1863, 13 }, { 0x1C, 6 }, { 0x3A, 7 } + }, + { /* DC bias table 6 */ + { 0x8, 4 }, { 0xA, 5 }, { 0x6A, 7 }, { 0x16, 6 }, + { 0x1E, 7 }, { 0x34E, 10 }, { 0x69F, 11 }, { 0x68, 7 }, + { 0xD28, 12 }, { 0x5, 3 }, { 0x7, 3 }, { 0x7, 4 }, + { 0xC, 4 }, { 0x0, 3 }, { 0x6, 4 }, { 0x1B, 5 }, + { 0x12, 5 }, { 0x2, 4 }, { 0x4, 4 }, { 0x13, 5 }, + { 0xE, 6 }, { 0x34B, 10 }, { 0x1A53, 13 }, { 0x6, 5 }, + { 0x17, 6 }, { 0x1A6, 9 }, { 0x69E, 11 }, { 0x1A4, 9 }, + { 0x695, 11 }, { 0x1A52, 13 }, { 0x6B, 7 }, { 0x1F, 7 } + }, + { /* DC bias table 7 */ + { 0xE, 4 }, { 0xF, 5 }, { 0x17, 6 }, { 0x25, 6 }, + { 0x9F, 8 }, { 0x138, 9 }, { 0x24B, 10 }, { 0x93, 8 }, + { 0x92A, 12 }, { 0x5, 3 }, { 0x0, 2 }, { 0x8, 4 }, + { 0xD, 4 }, { 0xF, 4 }, { 0x6, 4 }, { 0x4, 4 }, + { 0xE, 5 }, { 0x19, 5 }, { 0x18, 5 }, { 0xA, 5 }, + { 0x9E, 8 }, { 0x494, 11 }, { 0x1256, 13 }, { 0x26, 6 }, + { 0x16, 6 }, { 0x124, 9 }, { 0x4E5, 11 }, { 0x273, 10 }, + { 0x4E4, 11 }, { 0x1257, 13 }, { 0x48, 7 }, { 0x9D, 8 } + }, + { /* DC bias table 8 */ + { 0x4, 4 }, { 0x2C, 6 }, { 0x50, 7 }, { 0x1E, 7 }, + { 0x71, 9 }, { 0xE1, 10 }, { 0xE0, 10 }, { 0x1D, 7 }, + { 0x6, 6 }, { 0x7, 3 }, { 0x6, 3 }, { 0x7, 4 }, + { 0x5, 4 }, { 0x6, 4 }, { 0x15, 5 }, { 0x0, 5 }, + { 0x29, 6 }, { 0x2, 5 }, { 0x6, 5 }, { 0x1, 5 }, + { 0x23, 6 }, { 0x1F, 7 }, { 0x39, 8 }, { 0x9, 4 }, + { 0x2, 4 }, { 0x10, 5 }, { 0x7, 6 }, { 0x2D, 6 }, + { 0x2F, 6 }, { 0x2E, 6 }, { 0x22, 6 }, { 0x51, 7 } + }, + { /* DC bias table 9 */ + { 0x8, 4 }, { 0x2F, 6 }, { 0x51, 7 }, { 0x50, 7 }, + { 0x2ED, 10 }, { 0x5D9, 11 }, { 0x5D8, 11 }, { 0xBA, 8 }, + { 0x5C, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x9, 4 }, + { 0x6, 4 }, { 0x7, 4 }, { 0x16, 5 }, { 0x5, 5 }, + { 0x2B, 6 }, { 0x6, 5 }, { 0xA, 5 }, { 0x1, 5 }, + { 0xF, 6 }, { 0x1D, 7 }, { 0x177, 9 }, { 0x4, 4 }, + { 0x1, 4 }, { 0x4, 5 }, { 0x1, 6 }, { 0x2A, 6 }, + { 0xB, 5 }, { 0x29, 6 }, { 0x0, 6 }, { 0x1C, 7 } + }, + { /* DC bias table 10 */ + { 0xA, 4 }, { 0x3C, 6 }, { 0x74, 7 }, { 0x4E, 7 }, + { 0x26D, 10 }, { 0x4D9, 11 }, { 0x4D8, 11 }, { 0x9A, 8 }, + { 0x4C, 7 }, { 0x0, 2 }, { 0x6, 3 }, { 0x8, 4 }, + { 0x7, 4 }, { 0x6, 4 }, { 0x16, 5 }, { 0x8, 5 }, + { 0x2E, 6 }, { 0xA, 5 }, { 0xB, 5 }, { 0x3D, 6 }, + { 0x24, 6 }, { 0xEB, 8 }, { 0x137, 9 }, { 0x1F, 5 }, + { 0x1C, 5 }, { 0x3B, 6 }, { 0x12, 6 }, { 0x25, 6 }, + { 0x2F, 6 }, { 0x13, 6 }, { 0x4F, 7 }, { 0xEA, 8 } + }, + { /* DC bias table 11 */ + { 0xA, 4 }, { 0xA, 5 }, { 0x3, 6 }, { 0x16, 6 }, + { 0x9, 8 }, { 0x21, 10 }, { 0x20, 10 }, { 0xB3, 8 }, + { 0x58, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x7, 4 }, + { 0x6, 4 }, { 0x4, 4 }, { 0x13, 5 }, { 0x2, 5 }, + { 0x25, 6 }, { 0x0, 5 }, { 0x3, 5 }, { 0x2D, 6 }, + { 0x5D, 7 }, { 0xB2, 8 }, { 0x11, 9 }, { 0x8, 4 }, + { 0x2, 4 }, { 0x6, 5 }, { 0x17, 6 }, { 0x2F, 6 }, + { 0x7, 5 }, { 0x24, 6 }, { 0x5C, 7 }, { 0x5, 7 } + }, + { /* DC bias table 12 */ + { 0xB, 4 }, { 0x13, 5 }, { 0x1F, 6 }, { 0x31, 6 }, + { 0x21, 7 }, { 0x295, 10 }, { 0x528, 11 }, { 0xA4, 8 }, + { 0x3C, 7 }, { 0x0, 2 }, { 0x7, 3 }, { 0x6, 4 }, + { 0x5, 4 }, { 0x1B, 5 }, { 0x12, 5 }, { 0x32, 6 }, + { 0x1D, 6 }, { 0x2B, 6 }, { 0x30, 6 }, { 0x1C, 6 }, + { 0x3D, 7 }, { 0x14B, 9 }, { 0x529, 11 }, { 0x8, 4 }, + { 0x1A, 5 }, { 0x33, 6 }, { 0x11, 6 }, { 0x2A, 6 }, + { 0x9, 5 }, { 0x28, 6 }, { 0x53, 7 }, { 0x20, 7 } + }, + { /* DC bias table 13 */ + { 0xE, 4 }, { 0x15, 5 }, { 0x29, 6 }, { 0x3F, 6 }, + { 0x4D, 7 }, { 0x2F1, 10 }, { 0x5E0, 11 }, { 0x92, 8 }, + { 0x48, 7 }, { 0x0, 2 }, { 0x6, 3 }, { 0x6, 4 }, + { 0x5, 4 }, { 0x4, 4 }, { 0xF, 5 }, { 0x2E, 6 }, + { 0x1D, 6 }, { 0x28, 6 }, { 0x27, 6 }, { 0x5F, 7 }, + { 0xBD, 8 }, { 0x179, 9 }, { 0x5E1, 11 }, { 0x8, 4 }, + { 0x1E, 5 }, { 0x2D, 6 }, { 0x1C, 6 }, { 0x2C, 6 }, + { 0x3E, 6 }, { 0x25, 6 }, { 0x4C, 7 }, { 0x93, 8 } + }, + { /* DC bias table 14 */ + { 0xC, 4 }, { 0x17, 5 }, { 0x35, 6 }, { 0x13, 5 }, + { 0x21, 6 }, { 0xAD, 8 }, { 0x6F1, 11 }, { 0x1BD, 9 }, + { 0xD9, 8 }, { 0x0, 2 }, { 0x7, 3 }, { 0x7, 4 }, + { 0x6, 4 }, { 0x4, 4 }, { 0x11, 5 }, { 0x2A, 6 }, + { 0x6E, 7 }, { 0x25, 6 }, { 0x24, 6 }, { 0x57, 7 }, + { 0xD8, 8 }, { 0x379, 10 }, { 0x6F0, 11 }, { 0x5, 4 }, + { 0x16, 5 }, { 0x29, 6 }, { 0x6D, 7 }, { 0x28, 6 }, + { 0x34, 6 }, { 0x20, 6 }, { 0xDF, 8 }, { 0xAC, 8 } + }, + { /* DC bias table 15 */ + { 0x0, 3 }, { 0x1A, 5 }, { 0x6, 5 }, { 0x19, 5 }, + { 0x30, 6 }, { 0x5A, 7 }, { 0x18A, 9 }, { 0x2DD, 10 }, + { 0x18B, 9 }, { 0x1, 2 }, { 0x7, 3 }, { 0xA, 4 }, + { 0x9, 4 }, { 0x2, 4 }, { 0x10, 5 }, { 0x2E, 6 }, + { 0x6E, 7 }, { 0x2C, 6 }, { 0xE, 6 }, { 0x5E, 7 }, + { 0xC4, 8 }, { 0x5B9, 11 }, { 0x5B8, 11 }, { 0x11, 5 }, + { 0x36, 6 }, { 0x5F, 7 }, { 0x1E, 7 }, { 0x63, 7 }, + { 0x6F, 7 }, { 0x1F, 7 }, { 0xB6, 8 }, { 0x16F, 9 } + } +}; + +static const uint16_t vp4_ac_bias_0[16][32][2] = { + { /* AC bias group 1, table 0 */ + { 0x6, 5 }, { 0x1E, 7 }, { 0x1CC, 9 }, { 0x1CE, 9 }, + { 0x734, 11 }, { 0x1CD5, 13 }, { 0x1CD4, 13 }, { 0x18, 5 }, + { 0xE6B, 12 }, { 0x0, 3 }, { 0xF, 4 }, { 0x6, 4 }, + { 0x7, 4 }, { 0xD, 4 }, { 0x8, 4 }, { 0x2, 4 }, + { 0x19, 5 }, { 0x5, 4 }, { 0xB, 4 }, { 0xA, 4 }, + { 0x1D, 5 }, { 0x27, 6 }, { 0x1CF, 9 }, { 0x4, 4 }, + { 0x38, 6 }, { 0xE, 6 }, { 0x4C, 7 }, { 0x1F, 7 }, + { 0x4D, 7 }, { 0x39B, 10 }, { 0x12, 5 }, { 0x72, 7 } + }, + { /* AC bias group 1, table 1 */ + { 0x9, 5 }, { 0x4B, 7 }, { 0x90, 8 }, { 0x91, 8 }, + { 0x745, 11 }, { 0x1D11, 13 }, { 0x1D10, 13 }, { 0x19, 5 }, + { 0xE89, 12 }, { 0x0, 3 }, { 0xF, 4 }, { 0x8, 4 }, + { 0x7, 4 }, { 0xD, 4 }, { 0xB, 4 }, { 0x2, 4 }, + { 0x1C, 5 }, { 0x3, 4 }, { 0xA, 4 }, { 0x5, 4 }, + { 0x18, 5 }, { 0x10, 6 }, { 0x1D0, 9 }, { 0x6, 4 }, + { 0x3B, 6 }, { 0x11, 6 }, { 0x4A, 7 }, { 0x49, 7 }, + { 0xE9, 8 }, { 0x3A3, 10 }, { 0x13, 5 }, { 0x75, 7 } + }, + { /* AC bias group 1, table 2 */ + { 0x19, 5 }, { 0x74, 7 }, { 0x1D, 8 }, { 0xEA, 8 }, + { 0x73, 10 }, { 0x1CA, 12 }, { 0x396, 13 }, { 0x1C, 5 }, + { 0xE4, 11 }, { 0x2, 3 }, { 0x1, 3 }, { 0x7, 4 }, + { 0x8, 4 }, { 0xD, 4 }, { 0x9, 4 }, { 0x1F, 5 }, + { 0x18, 5 }, { 0x0, 4 }, { 0x6, 4 }, { 0x1E, 5 }, + { 0x3B, 6 }, { 0xEB, 8 }, { 0x397, 13 }, { 0xA, 4 }, + { 0x2, 5 }, { 0x2C, 6 }, { 0x5B, 7 }, { 0x5A, 7 }, + { 0xF, 7 }, { 0x38, 9 }, { 0x17, 5 }, { 0x6, 6 } + }, + { /* AC bias group 1, table 3 */ + { 0x1E, 5 }, { 0x6F, 7 }, { 0xAE, 8 }, { 0xAF, 8 }, + { 0x187, 10 }, { 0x61B, 12 }, { 0xC35, 13 }, { 0x1A, 5 }, + { 0x30C, 11 }, { 0x2, 3 }, { 0x1, 3 }, { 0x7, 4 }, + { 0x8, 4 }, { 0xE, 4 }, { 0x9, 4 }, { 0x1F, 5 }, + { 0x14, 5 }, { 0x0, 4 }, { 0x1, 4 }, { 0x19, 5 }, + { 0x2A, 6 }, { 0x60, 8 }, { 0xC34, 13 }, { 0xB, 4 }, + { 0xD, 5 }, { 0x36, 6 }, { 0x6E, 7 }, { 0x56, 7 }, + { 0x31, 7 }, { 0xC2, 9 }, { 0x18, 5 }, { 0x19, 6 } + }, + { /* AC bias group 1, table 4 */ + { 0x1, 4 }, { 0x2C, 6 }, { 0x5, 7 }, { 0x15, 7 }, + { 0x8, 8 }, { 0x97, 12 }, { 0x12D, 13 }, { 0x17, 5 }, + { 0x4A, 11 }, { 0x3, 3 }, { 0x2, 3 }, { 0x9, 4 }, + { 0xA, 4 }, { 0xE, 4 }, { 0x8, 4 }, { 0x1F, 5 }, + { 0x7, 5 }, { 0x1E, 5 }, { 0x1B, 5 }, { 0x4, 5 }, + { 0x5A, 7 }, { 0x24, 10 }, { 0x12C, 13 }, { 0xC, 4 }, + { 0x6, 5 }, { 0x0, 5 }, { 0x3, 6 }, { 0x5B, 7 }, + { 0x14, 7 }, { 0x13, 9 }, { 0x1A, 5 }, { 0xB, 6 } + }, + { /* AC bias group 1, table 5 */ + { 0x4, 4 }, { 0x0, 5 }, { 0x17, 7 }, { 0x63, 7 }, + { 0x18B, 9 }, { 0x310, 10 }, { 0xC44, 12 }, { 0x19, 5 }, + { 0x623, 11 }, { 0x4, 3 }, { 0x3, 3 }, { 0xA, 4 }, + { 0xB, 4 }, { 0xD, 4 }, { 0x3, 4 }, { 0x1C, 5 }, + { 0x3, 5 }, { 0xA, 5 }, { 0x4, 5 }, { 0x3, 6 }, + { 0x18A, 9 }, { 0x188B, 13 }, { 0x188A, 13 }, { 0xF, 4 }, + { 0xB, 5 }, { 0x2, 5 }, { 0xA, 6 }, { 0x2, 6 }, + { 0x16, 7 }, { 0x189, 9 }, { 0x1D, 5 }, { 0x30, 6 } + }, + { /* AC bias group 1, table 6 */ + { 0xD, 4 }, { 0x3, 5 }, { 0x77, 7 }, { 0xD, 6 }, + { 0x82, 8 }, { 0x20D, 10 }, { 0x830, 12 }, { 0x19, 5 }, + { 0x419, 11 }, { 0x3, 3 }, { 0x2, 3 }, { 0xA, 4 }, + { 0x9, 4 }, { 0xB, 4 }, { 0x2, 4 }, { 0x11, 5 }, + { 0x39, 6 }, { 0x2, 5 }, { 0x21, 6 }, { 0x40, 7 }, + { 0x1063, 13 }, { 0x20C5, 14 }, { 0x20C4, 14 }, { 0xF, 4 }, + { 0x18, 5 }, { 0x7, 5 }, { 0x38, 6 }, { 0xC, 6 }, + { 0x76, 7 }, { 0x107, 9 }, { 0x0, 4 }, { 0x3A, 6 } + }, + { /* AC bias group 1, table 7 */ + { 0xF, 4 }, { 0x1C, 5 }, { 0x36, 6 }, { 0x8, 5 }, + { 0x61, 7 }, { 0x91, 8 }, { 0x243, 10 }, { 0x9, 5 }, + { 0x120, 9 }, { 0x5, 3 }, { 0x3, 3 }, { 0x8, 4 }, + { 0x5, 4 }, { 0x1, 4 }, { 0x13, 5 }, { 0x31, 6 }, + { 0x76, 7 }, { 0x60, 7 }, { 0x93, 8 }, { 0x909, 12 }, + { 0x908, 12 }, { 0x90B, 12 }, { 0x90A, 12 }, { 0x1, 3 }, + { 0x1A, 5 }, { 0x19, 5 }, { 0x3A, 6 }, { 0x25, 6 }, + { 0x77, 7 }, { 0x92, 8 }, { 0x0, 4 }, { 0x37, 6 } + }, + { /* AC bias group 1, table 8 */ + { 0x1F, 5 }, { 0x79, 7 }, { 0xF1, 8 }, { 0xF0, 8 }, + { 0x11B, 10 }, { 0x469, 12 }, { 0x468, 12 }, { 0x3B, 6 }, + { 0x22, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x7, 4 }, + { 0x5, 4 }, { 0x6, 4 }, { 0x1C, 5 }, { 0x1, 5 }, + { 0x35, 6 }, { 0x3D, 6 }, { 0x3A, 6 }, { 0x10, 6 }, + { 0x47, 8 }, { 0x8C, 9 }, { 0x235, 11 }, { 0x1, 3 }, + { 0x1, 4 }, { 0x19, 5 }, { 0x0, 5 }, { 0x30, 6 }, + { 0x9, 5 }, { 0x31, 6 }, { 0x1B, 5 }, { 0x34, 6 } + }, + { /* AC bias group 1, table 9 */ + { 0x3, 4 }, { 0x1B, 6 }, { 0xF3, 8 }, { 0xFD, 8 }, + { 0x3C9, 10 }, { 0xF20, 12 }, { 0x1E42, 13 }, { 0x3D, 6 }, + { 0xFC, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, + { 0x0, 4 }, { 0x1, 4 }, { 0x17, 5 }, { 0x3E, 6 }, + { 0x1A, 6 }, { 0x39, 6 }, { 0x2B, 6 }, { 0x78, 7 }, + { 0x1E5, 9 }, { 0x791, 11 }, { 0x1E43, 13 }, { 0x2, 3 }, + { 0x7, 4 }, { 0x1D, 5 }, { 0xC, 5 }, { 0x38, 6 }, + { 0x14, 5 }, { 0x7F, 7 }, { 0x16, 5 }, { 0x2A, 6 } + }, + { /* AC bias group 1, table 10 */ + { 0x7, 4 }, { 0x39, 6 }, { 0x51, 7 }, { 0x78, 7 }, + { 0x3CB, 10 }, { 0xF29, 12 }, { 0x1E51, 13 }, { 0x3D, 6 }, + { 0xF3, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, + { 0x0, 4 }, { 0x1, 4 }, { 0x17, 5 }, { 0x3E, 6 }, + { 0x7F, 7 }, { 0x2B, 6 }, { 0x7E, 7 }, { 0x50, 7 }, + { 0x1E4, 9 }, { 0x795, 11 }, { 0x1E50, 13 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x1D, 5 }, { 0x6, 5 }, { 0x38, 6 }, + { 0x7, 5 }, { 0x29, 6 }, { 0x16, 5 }, { 0x2A, 6 } + }, + { /* AC bias group 1, table 11 */ + { 0x8, 4 }, { 0x3B, 6 }, { 0x1D, 7 }, { 0x72, 7 }, + { 0x1CC, 9 }, { 0x734, 11 }, { 0x1CD5, 13 }, { 0x3A, 6 }, + { 0x1C, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x0, 4 }, { 0x12, 5 }, { 0x3E, 6 }, + { 0x7F, 7 }, { 0x1E, 6 }, { 0x7E, 7 }, { 0xE7, 8 }, + { 0x39B, 10 }, { 0xE6B, 12 }, { 0x1CD4, 13 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x1E, 5 }, { 0xE, 5 }, { 0x38, 6 }, + { 0x6, 5 }, { 0xF, 6 }, { 0x13, 5 }, { 0x1F, 6 } + }, + { /* AC bias group 1, table 12 */ + { 0xD, 4 }, { 0x3F, 6 }, { 0x73, 7 }, { 0xC, 6 }, + { 0xE4, 8 }, { 0x72B, 11 }, { 0xE54, 12 }, { 0x3A, 6 }, + { 0x1A, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x0, 4 }, { 0x7, 5 }, { 0x38, 6 }, + { 0x76, 7 }, { 0x77, 7 }, { 0x1B, 7 }, { 0x1CB, 9 }, + { 0x394, 10 }, { 0x1CAB, 13 }, { 0x1CAA, 13 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x1E, 5 }, { 0xE, 5 }, { 0x3E, 6 }, + { 0x19, 5 }, { 0x1F, 6 }, { 0x18, 5 }, { 0x1E, 6 } + }, + { /* AC bias group 1, table 13 */ + { 0xE, 4 }, { 0x7, 5 }, { 0xC, 6 }, { 0x1C, 6 }, + { 0xBD, 8 }, { 0x2F3, 10 }, { 0xBC9, 12 }, { 0x1F, 6 }, + { 0xBF, 8 }, { 0x6, 3 }, { 0x4, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x1E, 5 }, { 0x1, 5 }, { 0xD, 6 }, + { 0x3A, 7 }, { 0x3B, 7 }, { 0xBE, 8 }, { 0x178, 9 }, + { 0x5E5, 11 }, { 0x1791, 13 }, { 0x1790, 13 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x1F, 5 }, { 0x16, 5 }, { 0x0, 5 }, + { 0x15, 5 }, { 0x2E, 6 }, { 0x14, 5 }, { 0x1E, 6 } + }, + { /* AC bias group 1, table 14 */ + { 0x0, 3 }, { 0x1B, 5 }, { 0x31, 6 }, { 0x3A, 6 }, + { 0x60, 7 }, { 0x6F, 9 }, { 0x1B9, 11 }, { 0xE, 6 }, + { 0x1A, 7 }, { 0x5, 3 }, { 0x3, 3 }, { 0x2, 4 }, + { 0x1F, 5 }, { 0x1A, 5 }, { 0x39, 6 }, { 0xC, 6 }, + { 0xC3, 8 }, { 0xC2, 8 }, { 0x36, 8 }, { 0xDD, 10 }, + { 0x370, 12 }, { 0x6E3, 13 }, { 0x6E2, 13 }, { 0x2, 3 }, + { 0x8, 4 }, { 0x1E, 5 }, { 0x19, 5 }, { 0x3B, 6 }, + { 0x12, 5 }, { 0xF, 6 }, { 0x13, 5 }, { 0x38, 6 } + }, + { /* AC bias group 1, table 15 */ + { 0x2, 3 }, { 0x0, 4 }, { 0x3, 5 }, { 0x1C, 5 }, + { 0x32, 6 }, { 0x1C, 7 }, { 0x199, 9 }, { 0x4, 6 }, + { 0xCD, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0x1B, 5 }, + { 0x1A, 5 }, { 0x3D, 6 }, { 0x67, 7 }, { 0x3B, 8 }, + { 0x198, 9 }, { 0x75, 9 }, { 0xE9, 10 }, { 0x3A1, 12 }, + { 0x3A0, 12 }, { 0x3A3, 12 }, { 0x3A2, 12 }, { 0x5, 3 }, + { 0x2, 4 }, { 0x1F, 5 }, { 0x1D, 5 }, { 0x3C, 6 }, + { 0x18, 5 }, { 0xF, 6 }, { 0x6, 5 }, { 0x5, 6 } + } +}; + +static const uint16_t vp4_ac_bias_1[16][32][2] = { + { /* AC bias group 2, table 0 */ + { 0x4, 5 }, { 0xF5, 8 }, { 0x182, 9 }, { 0x60F, 11 }, + { 0x1839, 13 }, { 0x1838, 13 }, { 0x183B, 13 }, { 0x13, 5 }, + { 0xC0, 8 }, { 0x3, 3 }, { 0x2, 3 }, { 0xB, 4 }, + { 0xA, 4 }, { 0xE, 4 }, { 0x8, 4 }, { 0x1, 4 }, + { 0x12, 5 }, { 0x1F, 5 }, { 0x0, 4 }, { 0x6, 5 }, + { 0x7B, 7 }, { 0x306, 10 }, { 0x183A, 13 }, { 0xD, 4 }, + { 0x7, 5 }, { 0x31, 6 }, { 0xA, 6 }, { 0x61, 7 }, + { 0x3C, 6 }, { 0xF4, 8 }, { 0x19, 5 }, { 0xB, 6 } + }, + { /* AC bias group 2, table 1 */ + { 0xA, 5 }, { 0x1A, 7 }, { 0x1D8, 9 }, { 0x3B3, 10 }, + { 0xECA, 12 }, { 0x1D96, 13 }, { 0x3B2F, 14 }, { 0x14, 5 }, + { 0x36, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0xC, 4 }, + { 0xB, 4 }, { 0x0, 3 }, { 0x4, 4 }, { 0x1C, 5 }, + { 0x5, 5 }, { 0x15, 5 }, { 0x7, 5 }, { 0x17, 6 }, + { 0x37, 8 }, { 0x764, 11 }, { 0x3B2E, 14 }, { 0xF, 4 }, + { 0x1A, 5 }, { 0x3A, 6 }, { 0xC, 6 }, { 0x77, 7 }, + { 0x4, 5 }, { 0xED, 8 }, { 0x1B, 5 }, { 0x16, 6 } + }, + { /* AC bias group 2, table 2 */ + { 0x1A, 5 }, { 0x2D, 7 }, { 0x58, 8 }, { 0x1F4, 9 }, + { 0x7D4, 11 }, { 0x1F55, 13 }, { 0x1F54, 13 }, { 0x14, 5 }, + { 0x59, 8 }, { 0x4, 3 }, { 0x3, 3 }, { 0xB, 4 }, + { 0xC, 4 }, { 0xE, 4 }, { 0x4, 4 }, { 0x15, 5 }, + { 0x5, 5 }, { 0x7, 5 }, { 0x4, 5 }, { 0x7C, 7 }, + { 0x3EB, 10 }, { 0x1F57, 13 }, { 0x1F56, 13 }, { 0x0, 3 }, + { 0x1B, 5 }, { 0x3F, 6 }, { 0xD, 6 }, { 0xC, 6 }, + { 0xA, 5 }, { 0xFB, 8 }, { 0x1E, 5 }, { 0x17, 6 } + }, + { /* AC bias group 2, table 3 */ + { 0x0, 4 }, { 0x75, 7 }, { 0x4A, 8 }, { 0x97, 9 }, + { 0x25B, 11 }, { 0x969, 13 }, { 0x968, 13 }, { 0xB, 5 }, + { 0xE8, 8 }, { 0x5, 3 }, { 0x4, 3 }, { 0x7, 4 }, + { 0xC, 4 }, { 0xD, 4 }, { 0x1, 4 }, { 0xA, 5 }, + { 0x39, 6 }, { 0x3B, 6 }, { 0x18, 6 }, { 0xE9, 8 }, + { 0x12C, 10 }, { 0x96B, 13 }, { 0x96A, 13 }, { 0x1, 3 }, + { 0x1F, 5 }, { 0x8, 5 }, { 0x19, 6 }, { 0x13, 6 }, + { 0xD, 5 }, { 0x24, 7 }, { 0x1E, 5 }, { 0x38, 6 } + }, + { /* AC bias group 2, table 4 */ + { 0x4, 4 }, { 0x14, 6 }, { 0x6E, 8 }, { 0x57, 8 }, + { 0x159, 10 }, { 0x562, 12 }, { 0xAC7, 13 }, { 0xB, 5 }, + { 0x6F, 8 }, { 0x6, 3 }, { 0x5, 3 }, { 0x8, 4 }, + { 0x9, 4 }, { 0x7, 4 }, { 0x1E, 5 }, { 0x2, 5 }, + { 0x7, 6 }, { 0x6, 6 }, { 0x2A, 7 }, { 0xAD, 9 }, + { 0xAC6, 13 }, { 0x561, 12 }, { 0x560, 12 }, { 0x1, 3 }, + { 0x1F, 5 }, { 0xC, 5 }, { 0x39, 6 }, { 0x1A, 6 }, + { 0x0, 4 }, { 0x36, 7 }, { 0x1D, 5 }, { 0x38, 6 } + }, + { /* AC bias group 2, table 5 */ + { 0x7, 4 }, { 0x1B, 6 }, { 0xE, 7 }, { 0xD, 7 }, + { 0x3E1, 10 }, { 0x1F06, 13 }, { 0x3E0F, 14 }, { 0x2, 5 }, + { 0xF9, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x8, 4 }, + { 0x9, 4 }, { 0x4, 4 }, { 0xC, 5 }, { 0x1A, 6 }, + { 0xF, 7 }, { 0xC, 7 }, { 0x1F1, 9 }, { 0x7C0, 11 }, + { 0x3E0E, 14 }, { 0x1F05, 13 }, { 0x1F04, 13 }, { 0x1, 3 }, + { 0x0, 4 }, { 0x1C, 5 }, { 0x3F, 6 }, { 0x3D, 6 }, + { 0x5, 4 }, { 0x7D, 7 }, { 0x1D, 5 }, { 0x3C, 6 } + }, + { /* AC bias group 2, table 6 */ + { 0xF, 4 }, { 0xA, 5 }, { 0x71, 7 }, { 0x6, 6 }, + { 0x1C2, 9 }, { 0x702, 11 }, { 0x1C0E, 13 }, { 0x2, 5 }, + { 0xE, 7 }, { 0x5, 3 }, { 0x4, 3 }, { 0x6, 4 }, + { 0x7, 4 }, { 0x1D, 5 }, { 0x17, 6 }, { 0xF, 7 }, + { 0x1C3, 9 }, { 0x1C1, 9 }, { 0x380, 10 }, { 0x381F, 14 }, + { 0x381E, 14 }, { 0x1C0D, 13 }, { 0x1C0C, 13 }, { 0x1, 3 }, + { 0x4, 4 }, { 0x18, 5 }, { 0x1, 5 }, { 0x0, 5 }, + { 0xD, 4 }, { 0x16, 6 }, { 0x19, 5 }, { 0x39, 6 } + }, + { /* AC bias group 2, table 7 */ + { 0x2, 3 }, { 0x1E, 5 }, { 0x3B, 6 }, { 0xD, 5 }, + { 0x61, 7 }, { 0x1FA, 9 }, { 0x1FB5, 13 }, { 0x31, 6 }, + { 0xFC, 8 }, { 0x4, 3 }, { 0x5, 3 }, { 0x1, 4 }, + { 0x7, 4 }, { 0x3A, 6 }, { 0x60, 7 }, { 0x3F7, 10 }, + { 0x7EC, 11 }, { 0x1FB7, 13 }, { 0x3F6C, 14 }, { 0x7EDB, 15 }, + { 0x7EDA, 15 }, { 0x3F69, 14 }, { 0x3F68, 14 }, { 0x1, 3 }, + { 0x0, 4 }, { 0x19, 5 }, { 0x3E, 6 }, { 0x39, 6 }, + { 0xD, 4 }, { 0x38, 6 }, { 0xC, 5 }, { 0x7F, 7 } + }, + { /* AC bias group 2, table 8 */ + { 0x1E, 5 }, { 0x70, 7 }, { 0x127, 9 }, { 0x126, 9 }, + { 0x492, 11 }, { 0x124D, 13 }, { 0x124C, 13 }, { 0x1, 5 }, + { 0x7F, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x5, 4 }, + { 0x4, 4 }, { 0x1, 4 }, { 0x7, 5 }, { 0x25, 6 }, + { 0x71, 7 }, { 0x7E, 7 }, { 0x48, 7 }, { 0x125, 9 }, + { 0x248, 10 }, { 0x124F, 13 }, { 0x124E, 13 }, { 0x3, 3 }, + { 0x8, 4 }, { 0x1D, 5 }, { 0x6, 5 }, { 0x3E, 6 }, + { 0x2, 4 }, { 0x0, 5 }, { 0x13, 5 }, { 0x39, 6 } + }, + { /* AC bias group 2, table 9 */ + { 0x1, 4 }, { 0x1, 6 }, { 0xE7, 8 }, { 0x91, 8 }, + { 0x240, 10 }, { 0x120D, 13 }, { 0x120C, 13 }, { 0x3C, 6 }, + { 0x0, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x5, 4 }, + { 0x4, 4 }, { 0x1F, 5 }, { 0x4, 5 }, { 0x25, 6 }, + { 0x72, 7 }, { 0x49, 7 }, { 0xE6, 8 }, { 0x121, 9 }, + { 0x482, 11 }, { 0x120F, 13 }, { 0x120E, 13 }, { 0x3, 3 }, + { 0x8, 4 }, { 0x1D, 5 }, { 0x5, 5 }, { 0x3D, 6 }, + { 0x3, 4 }, { 0x1, 5 }, { 0x13, 5 }, { 0x38, 6 } + }, + { /* AC bias group 2, table 10 */ + { 0x4, 4 }, { 0xF, 6 }, { 0xF4, 8 }, { 0x5B, 8 }, + { 0x2D3, 11 }, { 0xB4A, 13 }, { 0x1697, 14 }, { 0x3C, 6 }, + { 0xE, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x1D, 5 }, { 0x0, 5 }, { 0x7B, 7 }, + { 0x2C, 7 }, { 0xF5, 8 }, { 0xB5, 9 }, { 0x168, 10 }, + { 0x1696, 14 }, { 0xB49, 13 }, { 0xB48, 13 }, { 0x3, 3 }, + { 0x9, 4 }, { 0x1F, 5 }, { 0xA, 5 }, { 0x1, 5 }, + { 0x8, 4 }, { 0x6, 5 }, { 0x1C, 5 }, { 0x17, 6 } + }, + { /* AC bias group 2, table 11 */ + { 0x8, 4 }, { 0x39, 6 }, { 0x1A, 7 }, { 0x3, 7 }, + { 0xDB, 10 }, { 0x6D6, 13 }, { 0xDAF, 14 }, { 0x3C, 6 }, + { 0xC, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x1D, 5 }, { 0x3D, 6 }, { 0x0, 6 }, + { 0x2, 7 }, { 0x37, 8 }, { 0x6C, 9 }, { 0x1B4, 11 }, + { 0xDAE, 14 }, { 0x6D5, 13 }, { 0x6D4, 13 }, { 0x2, 3 }, + { 0x7, 4 }, { 0x1F, 5 }, { 0x7, 5 }, { 0x1, 5 }, + { 0x9, 4 }, { 0xD, 5 }, { 0xC, 5 }, { 0x38, 6 } + }, + { /* AC bias group 2, table 12 */ + { 0xF, 4 }, { 0x4, 5 }, { 0x2F, 7 }, { 0x2E, 7 }, + { 0x54, 9 }, { 0x555, 13 }, { 0x554, 13 }, { 0x16, 6 }, + { 0xE, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x1, 4 }, + { 0x0, 4 }, { 0x9, 5 }, { 0xB, 6 }, { 0x14, 7 }, + { 0x57, 9 }, { 0x56, 9 }, { 0xAB, 10 }, { 0x557, 13 }, + { 0x556, 13 }, { 0x2A9, 12 }, { 0x2A8, 12 }, { 0x3, 3 }, + { 0x8, 4 }, { 0x13, 5 }, { 0xA, 5 }, { 0x8, 5 }, + { 0xE, 4 }, { 0x12, 5 }, { 0x6, 5 }, { 0xF, 6 } + }, + { /* AC bias group 2, table 13 */ + { 0x1, 3 }, { 0xE, 5 }, { 0x6, 6 }, { 0x4, 6 }, + { 0xDA, 9 }, { 0xDBE, 13 }, { 0x1B7E, 14 }, { 0x7, 6 }, + { 0x1A, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x1C, 5 }, + { 0x1B, 5 }, { 0x3A, 6 }, { 0x37, 7 }, { 0x6C, 8 }, + { 0x1B6, 10 }, { 0x36E, 11 }, { 0xDBD, 13 }, { 0x36FF, 15 }, + { 0x36FE, 15 }, { 0x1B79, 14 }, { 0x1B78, 14 }, { 0x2, 3 }, + { 0xC, 4 }, { 0x0, 4 }, { 0xF, 5 }, { 0xC, 5 }, + { 0xF, 4 }, { 0x1A, 5 }, { 0x3B, 6 }, { 0x5, 6 } + }, + { /* AC bias group 2, table 14 */ + { 0x5, 3 }, { 0x1E, 5 }, { 0x3A, 6 }, { 0x3E, 6 }, + { 0xFC, 8 }, { 0xFD7, 12 }, { 0x3F55, 14 }, { 0x77, 7 }, + { 0x30, 6 }, { 0x3, 3 }, { 0x4, 3 }, { 0x1A, 5 }, + { 0x19, 5 }, { 0x7F, 7 }, { 0x1FB, 9 }, { 0x3F4, 10 }, + { 0xFD6, 12 }, { 0x1FA9, 13 }, { 0x3F54, 14 }, { 0x3F57, 14 }, + { 0x3F56, 14 }, { 0x3F51, 14 }, { 0x3F50, 14 }, { 0x1, 3 }, + { 0x4, 4 }, { 0x1C, 5 }, { 0xB, 5 }, { 0xA, 5 }, + { 0x0, 3 }, { 0x1B, 5 }, { 0x31, 6 }, { 0x76, 7 } + }, + { /* AC bias group 2, table 15 */ + { 0x5, 3 }, { 0xC, 4 }, { 0x1B, 5 }, { 0x8, 4 }, + { 0x38, 6 }, { 0x15, 8 }, { 0xA3, 11 }, { 0xE6, 8 }, + { 0x4, 6 }, { 0x1, 3 }, { 0x2, 3 }, { 0x12, 5 }, + { 0x3, 5 }, { 0xB, 7 }, { 0x29, 9 }, { 0xA0, 11 }, + { 0x142, 12 }, { 0x287, 13 }, { 0x286, 13 }, { 0x289, 13 }, + { 0x288, 13 }, { 0x28B, 13 }, { 0x28A, 13 }, { 0xF, 4 }, + { 0x1D, 5 }, { 0x13, 5 }, { 0x1, 5 }, { 0x0, 5 }, + { 0x3, 3 }, { 0x1A, 5 }, { 0x72, 7 }, { 0xE7, 8 } + } +}; + +static const uint16_t vp4_ac_bias_2[16][32][2] = { + { /* AC bias group 3, table 0 */ + { 0x9, 5 }, { 0x15, 7 }, { 0x28, 8 }, { 0x52, 9 }, + { 0x29A, 12 }, { 0x537, 13 }, { 0x536, 13 }, { 0xA, 5 }, + { 0x54, 7 }, { 0x4, 3 }, { 0x3, 3 }, { 0xC, 4 }, + { 0xB, 4 }, { 0xD, 4 }, { 0x3, 4 }, { 0x14, 5 }, + { 0x3A, 6 }, { 0x4, 5 }, { 0x38, 6 }, { 0x55, 7 }, + { 0xA7, 10 }, { 0x299, 12 }, { 0x298, 12 }, { 0x0, 3 }, + { 0x1E, 5 }, { 0x8, 5 }, { 0x2B, 6 }, { 0xB, 6 }, + { 0xB, 5 }, { 0x3B, 6 }, { 0x1F, 5 }, { 0x39, 6 } + }, + { /* AC bias group 3, table 1 */ + { 0x1D, 5 }, { 0x2F, 7 }, { 0x2, 8 }, { 0x7, 9 }, + { 0x19, 11 }, { 0x35, 12 }, { 0x34, 12 }, { 0x9, 5 }, + { 0x2E, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x9, 4 }, + { 0x8, 4 }, { 0x7, 4 }, { 0x1F, 5 }, { 0x8, 5 }, + { 0x18, 6 }, { 0x19, 6 }, { 0x1, 6 }, { 0x0, 7 }, + { 0x18, 11 }, { 0x37, 12 }, { 0x36, 12 }, { 0x1, 3 }, + { 0x1, 4 }, { 0xA, 5 }, { 0x39, 6 }, { 0x16, 6 }, + { 0xD, 5 }, { 0x1, 5 }, { 0x1E, 5 }, { 0x38, 6 } + }, + { /* AC bias group 3, table 2 */ + { 0x1, 4 }, { 0x71, 7 }, { 0xE0, 8 }, { 0x1C3, 9 }, + { 0x708, 11 }, { 0x1C26, 13 }, { 0x384F, 14 }, { 0x1, 5 }, + { 0x31, 7 }, { 0x6, 3 }, { 0x5, 3 }, { 0x9, 4 }, + { 0x8, 4 }, { 0x5, 4 }, { 0xF, 5 }, { 0x39, 6 }, + { 0x77, 7 }, { 0x76, 7 }, { 0x30, 7 }, { 0x385, 10 }, + { 0x384E, 14 }, { 0x1C25, 13 }, { 0x1C24, 13 }, { 0x1, 3 }, + { 0x4, 4 }, { 0xD, 5 }, { 0x0, 5 }, { 0x19, 6 }, + { 0x1F, 5 }, { 0xE, 5 }, { 0x1E, 5 }, { 0x3A, 6 } + }, + { /* AC bias group 3, table 3 */ + { 0x6, 4 }, { 0xC, 6 }, { 0xD6, 8 }, { 0x7B, 8 }, + { 0x1E8, 10 }, { 0x7A4, 12 }, { 0xF4B, 13 }, { 0x36, 6 }, + { 0x6A, 7 }, { 0x7, 3 }, { 0x5, 3 }, { 0x8, 4 }, + { 0x9, 4 }, { 0x1, 4 }, { 0x7, 5 }, { 0xD, 6 }, + { 0x3C, 7 }, { 0xD7, 8 }, { 0xF5, 9 }, { 0x7A7, 12 }, + { 0xF4A, 13 }, { 0xF4D, 13 }, { 0xF4C, 13 }, { 0x2, 3 }, + { 0x2, 4 }, { 0xE, 5 }, { 0x37, 6 }, { 0x34, 6 }, + { 0x0, 4 }, { 0x19, 5 }, { 0x18, 5 }, { 0x1F, 6 } + }, + { /* AC bias group 3, table 4 */ + { 0xA, 4 }, { 0x27, 6 }, { 0xBF, 8 }, { 0xBE, 8 }, + { 0x224, 10 }, { 0x225D, 14 }, { 0x225C, 14 }, { 0x26, 6 }, + { 0x5E, 7 }, { 0x7, 3 }, { 0x6, 3 }, { 0x6, 4 }, + { 0x7, 4 }, { 0x16, 5 }, { 0x2E, 6 }, { 0x45, 7 }, + { 0x88, 8 }, { 0x113, 9 }, { 0x44A, 11 }, { 0x225F, 14 }, + { 0x225E, 14 }, { 0x112D, 13 }, { 0x112C, 13 }, { 0x2, 3 }, + { 0x2, 4 }, { 0x12, 5 }, { 0x3, 5 }, { 0x2, 5 }, + { 0x3, 4 }, { 0x0, 4 }, { 0x10, 5 }, { 0x23, 6 } + }, + { /* AC bias group 3, table 5 */ + { 0xF, 4 }, { 0x6, 5 }, { 0x75, 7 }, { 0x74, 7 }, + { 0xA, 9 }, { 0xBF, 13 }, { 0xB9, 13 }, { 0x22, 6 }, + { 0x3, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1, 4 }, + { 0x2, 4 }, { 0x7, 5 }, { 0x0, 6 }, { 0x4, 8 }, + { 0x16, 10 }, { 0x5E, 12 }, { 0xB8, 13 }, { 0xBB, 13 }, + { 0xBA, 13 }, { 0x17D, 14 }, { 0x17C, 14 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x1C, 5 }, { 0x10, 5 }, { 0x3B, 6 }, + { 0x9, 4 }, { 0x7, 4 }, { 0x1, 5 }, { 0x23, 6 } + }, + { /* AC bias group 3, table 6 */ + { 0x1, 3 }, { 0x1C, 5 }, { 0x36, 6 }, { 0x3B, 6 }, + { 0xEA, 8 }, { 0x75B, 11 }, { 0x1D65, 13 }, { 0x19, 6 }, + { 0x74, 7 }, { 0x4, 3 }, { 0x5, 3 }, { 0x0, 4 }, + { 0x1, 4 }, { 0x37, 6 }, { 0x1D7, 9 }, { 0x75A, 11 }, + { 0x1D64, 13 }, { 0x1D67, 13 }, { 0x1D66, 13 }, { 0x1D61, 13 }, + { 0x1D60, 13 }, { 0x1D63, 13 }, { 0x1D62, 13 }, { 0x2, 3 }, + { 0x1F, 5 }, { 0x1A, 5 }, { 0xD, 5 }, { 0x3D, 6 }, + { 0xC, 4 }, { 0x7, 4 }, { 0x3C, 6 }, { 0x18, 6 } + }, + { /* AC bias group 3, table 7 */ + { 0x2, 3 }, { 0x1, 4 }, { 0x14, 5 }, { 0x0, 4 }, + { 0x2F, 6 }, { 0xBB, 8 }, { 0x2E4, 10 }, { 0x7D, 7 }, + { 0xBA, 8 }, { 0x3, 3 }, { 0x4, 3 }, { 0x16, 5 }, + { 0x1A, 5 }, { 0xB8, 8 }, { 0x172E, 13 }, { 0x2E5F, 14 }, + { 0x2E5E, 14 }, { 0x1729, 13 }, { 0x1728, 13 }, { 0x172B, 13 }, + { 0x172A, 13 }, { 0x172D, 13 }, { 0x172C, 13 }, { 0x1, 3 }, + { 0x1E, 5 }, { 0x15, 5 }, { 0x1B, 5 }, { 0x3F, 6 }, + { 0xC, 4 }, { 0xE, 4 }, { 0x7C, 7 }, { 0x173, 9 } + }, + { /* AC bias group 3, table 8 */ + { 0x3, 4 }, { 0x7B, 7 }, { 0x58, 8 }, { 0x1EA, 9 }, + { 0x1EB1, 13 }, { 0x1EB0, 13 }, { 0x1EB3, 13 }, { 0x13, 6 }, + { 0x12, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x13, 5 }, { 0x3C, 6 }, { 0x2D, 7 }, + { 0xF4, 8 }, { 0x59, 8 }, { 0x3D7, 10 }, { 0xF5B, 12 }, + { 0x1EB2, 13 }, { 0x1EB5, 13 }, { 0x1EB4, 13 }, { 0x3, 3 }, + { 0xE, 4 }, { 0x1F, 5 }, { 0x12, 5 }, { 0x8, 5 }, + { 0x8, 4 }, { 0x0, 4 }, { 0xA, 5 }, { 0x17, 6 } + }, + { /* AC bias group 3, table 9 */ + { 0x8, 4 }, { 0x3C, 6 }, { 0xF5, 8 }, { 0xF4, 8 }, + { 0x1EF7, 13 }, { 0x3DE9, 14 }, { 0x3DE8, 14 }, { 0x1C, 6 }, + { 0xD, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1, 4 }, + { 0x0, 4 }, { 0x7, 5 }, { 0xC, 6 }, { 0xF6, 8 }, + { 0x1EE, 9 }, { 0x3DF, 10 }, { 0x7BC, 11 }, { 0x3DEB, 14 }, + { 0x3DEA, 14 }, { 0x3DED, 14 }, { 0x3DEC, 14 }, { 0x2, 3 }, + { 0x9, 4 }, { 0x1F, 5 }, { 0xF, 5 }, { 0x5, 5 }, + { 0xE, 4 }, { 0x6, 4 }, { 0x4, 5 }, { 0x1D, 6 } + }, + { /* AC bias group 3, table 10 */ + { 0x9, 4 }, { 0x39, 6 }, { 0x19, 7 }, { 0x18, 7 }, + { 0x706, 11 }, { 0x383D, 14 }, { 0x383C, 14 }, { 0xD, 6 }, + { 0xF, 6 }, { 0x5, 3 }, { 0x6, 3 }, { 0x0, 4 }, + { 0x1D, 5 }, { 0x3, 5 }, { 0x71, 7 }, { 0xE1, 8 }, + { 0x1C0, 9 }, { 0x382, 10 }, { 0x1C1D, 13 }, { 0x383F, 14 }, + { 0x383E, 14 }, { 0x3839, 14 }, { 0x3838, 14 }, { 0x2, 3 }, + { 0x8, 4 }, { 0x2, 4 }, { 0xD, 5 }, { 0xC, 5 }, + { 0xF, 4 }, { 0x7, 4 }, { 0x2, 5 }, { 0xE, 6 } + }, + { /* AC bias group 3, table 11 */ + { 0x0, 3 }, { 0x6, 5 }, { 0x35, 7 }, { 0x34, 7 }, + { 0x777, 11 }, { 0x1DD4, 13 }, { 0x3BAB, 14 }, { 0xE, 6 }, + { 0xF, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x1C, 5 }, + { 0x19, 5 }, { 0x3A, 6 }, { 0xEF, 8 }, { 0x1DC, 9 }, + { 0x776, 11 }, { 0x774, 11 }, { 0x3BAA, 14 }, { 0x3BAD, 14 }, + { 0x3BAC, 14 }, { 0x3BAF, 14 }, { 0x3BAE, 14 }, { 0x2, 3 }, + { 0x7, 4 }, { 0x2, 4 }, { 0x18, 5 }, { 0xC, 5 }, + { 0xF, 4 }, { 0xD, 4 }, { 0x1B, 6 }, { 0x76, 7 } + }, + { /* AC bias group 3, table 12 */ + { 0x2, 3 }, { 0x11, 5 }, { 0x6, 6 }, { 0x4F, 7 }, + { 0x130, 9 }, { 0x1319, 13 }, { 0x1318, 13 }, { 0x4E, 7 }, + { 0x7, 6 }, { 0x6, 3 }, { 0x5, 3 }, { 0x10, 5 }, + { 0xD, 5 }, { 0x5, 6 }, { 0x99, 8 }, { 0x262, 10 }, + { 0x98E, 12 }, { 0x131B, 13 }, { 0x131A, 13 }, { 0x263D, 14 }, + { 0x263C, 14 }, { 0x263F, 14 }, { 0x263E, 14 }, { 0x1, 3 }, + { 0x7, 4 }, { 0x0, 4 }, { 0x12, 5 }, { 0xC, 5 }, + { 0xE, 4 }, { 0xF, 4 }, { 0x4, 6 }, { 0x4D, 7 } + }, + { /* AC bias group 3, table 13 */ + { 0x3, 3 }, { 0x0, 4 }, { 0x2, 5 }, { 0x37, 6 }, + { 0x1B7, 9 }, { 0xDB5, 12 }, { 0x36DD, 14 }, { 0x6C, 7 }, + { 0x16, 6 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 5 }, + { 0xA, 5 }, { 0x2E, 7 }, { 0x36C, 10 }, { 0xDB4, 12 }, + { 0x36DC, 14 }, { 0x36DF, 14 }, { 0x36DE, 14 }, { 0x36D9, 14 }, + { 0x36D8, 14 }, { 0x36DB, 14 }, { 0x36DA, 14 }, { 0xE, 4 }, + { 0x4, 4 }, { 0x1A, 5 }, { 0x19, 5 }, { 0x18, 5 }, + { 0xF, 4 }, { 0x1, 3 }, { 0x2F, 7 }, { 0xDA, 8 } + }, + { /* AC bias group 3, table 14 */ + { 0x6, 3 }, { 0x6, 4 }, { 0xF, 5 }, { 0x0, 4 }, + { 0x75, 7 }, { 0x3B8, 10 }, { 0x1DCA, 13 }, { 0x74, 7 }, + { 0x76, 7 }, { 0x4, 3 }, { 0x5, 3 }, { 0x3, 5 }, + { 0x2, 5 }, { 0x1DE, 9 }, { 0xEE6, 12 }, { 0x3B97, 14 }, + { 0x3B96, 14 }, { 0x3B9D, 14 }, { 0x3B9C, 14 }, { 0x3B9F, 14 }, + { 0x3B9E, 14 }, { 0x1DC9, 13 }, { 0x1DC8, 13 }, { 0x5, 4 }, + { 0x1C, 5 }, { 0x9, 5 }, { 0xE, 5 }, { 0x8, 5 }, + { 0xF, 4 }, { 0x1, 3 }, { 0x1DF, 9 }, { 0x1DD, 9 } + }, + { /* AC bias group 3, table 15 */ + { 0x4, 3 }, { 0xB, 4 }, { 0x1D, 5 }, { 0xC, 4 }, + { 0x14, 5 }, { 0xE0, 8 }, { 0x3875, 14 }, { 0x386, 10 }, + { 0x1C2, 9 }, { 0x0, 2 }, { 0x1, 2 }, { 0x71, 7 }, + { 0x72, 7 }, { 0x1C3F, 13 }, { 0x3874, 14 }, { 0x3877, 14 }, + { 0x3876, 14 }, { 0x3871, 14 }, { 0x3870, 14 }, { 0x3873, 14 }, + { 0x3872, 14 }, { 0x3879, 14 }, { 0x3878, 14 }, { 0x3C, 6 }, + { 0x73, 7 }, { 0x2A, 6 }, { 0x3D, 6 }, { 0x2B, 6 }, + { 0x1F, 5 }, { 0xD, 4 }, { 0x1C3E, 13 }, { 0x1C3D, 13 } + } +}; + +static const uint16_t vp4_ac_bias_3[16][32][2] = { + { /* AC bias group 4, table 0 */ + { 0x7, 4 }, { 0xF, 6 }, { 0xBB, 8 }, { 0xBA, 8 }, + { 0x5CF, 11 }, { 0x173A, 13 }, { 0x2E77, 14 }, { 0x29, 6 }, + { 0x172, 9 }, { 0x7, 3 }, { 0x6, 3 }, { 0x9, 4 }, + { 0x8, 4 }, { 0x1, 4 }, { 0x5, 5 }, { 0xD, 6 }, + { 0x1D, 7 }, { 0x1C, 7 }, { 0xB8, 8 }, { 0x2E6, 10 }, + { 0x2E76, 14 }, { 0x1739, 13 }, { 0x1738, 13 }, { 0x2, 3 }, + { 0x6, 4 }, { 0x16, 5 }, { 0x4, 5 }, { 0x28, 6 }, + { 0x15, 5 }, { 0xC, 6 }, { 0x0, 4 }, { 0x2F, 6 } + }, + { /* AC bias group 4, table 1 */ + { 0xB, 4 }, { 0x2, 5 }, { 0x54, 7 }, { 0x2F, 7 }, + { 0x2AC, 10 }, { 0x156B, 13 }, { 0x1568, 13 }, { 0x16, 6 }, + { 0x154, 9 }, { 0x7, 3 }, { 0x6, 3 }, { 0x4, 4 }, + { 0x3, 4 }, { 0x13, 5 }, { 0x28, 6 }, { 0x2E, 7 }, + { 0x157, 9 }, { 0x155, 9 }, { 0x55B, 11 }, { 0x2AD3, 14 }, + { 0x2AD2, 14 }, { 0x2AD5, 14 }, { 0x2AD4, 14 }, { 0x3, 3 }, + { 0x8, 4 }, { 0x0, 4 }, { 0xA, 5 }, { 0x3, 5 }, + { 0x2, 4 }, { 0x2B, 6 }, { 0x12, 5 }, { 0x29, 6 } + }, + { /* AC bias group 4, table 2 */ + { 0xF, 4 }, { 0x7, 5 }, { 0x1, 6 }, { 0x0, 6 }, + { 0x1C4, 9 }, { 0x703, 11 }, { 0xE02, 12 }, { 0x11, 6 }, + { 0xE1, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x2, 4 }, + { 0x1, 4 }, { 0x9, 5 }, { 0x10, 6 }, { 0xE3, 8 }, + { 0x1C5, 9 }, { 0x1C1, 9 }, { 0x702, 11 }, { 0x1C07, 13 }, + { 0x1C06, 13 }, { 0xE01, 12 }, { 0xE00, 12 }, { 0x4, 3 }, + { 0x7, 4 }, { 0x1D, 5 }, { 0xD, 5 }, { 0x1, 5 }, + { 0x5, 4 }, { 0x6, 5 }, { 0xC, 5 }, { 0x39, 6 } + }, + { /* AC bias group 4, table 3 */ + { 0x1, 3 }, { 0x1C, 5 }, { 0x11, 6 }, { 0x13, 6 }, + { 0x42, 8 }, { 0x207, 11 }, { 0x815, 13 }, { 0x75, 7 }, + { 0x41, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x0, 4 }, + { 0x1F, 5 }, { 0x3B, 6 }, { 0x74, 7 }, { 0x43, 8 }, + { 0x80, 9 }, { 0x206, 11 }, { 0x814, 13 }, { 0x817, 13 }, + { 0x816, 13 }, { 0x409, 12 }, { 0x408, 12 }, { 0x3, 3 }, + { 0x9, 4 }, { 0x1E, 5 }, { 0x11, 5 }, { 0x3, 5 }, + { 0x5, 4 }, { 0x10, 5 }, { 0x2, 5 }, { 0x12, 6 } + }, + { /* AC bias group 4, table 4 */ + { 0x1, 3 }, { 0x1F, 5 }, { 0x27, 6 }, { 0x1, 5 }, + { 0x4B, 8 }, { 0x123, 10 }, { 0x915, 13 }, { 0x0, 6 }, + { 0x49, 8 }, { 0x5, 3 }, { 0x6, 3 }, { 0x1D, 5 }, + { 0x1C, 5 }, { 0x13, 6 }, { 0x4A, 8 }, { 0x90, 9 }, + { 0x914, 13 }, { 0x917, 13 }, { 0x916, 13 }, { 0x911, 13 }, + { 0x910, 13 }, { 0x913, 13 }, { 0x912, 13 }, { 0x3, 3 }, + { 0x5, 4 }, { 0x1, 4 }, { 0x12, 5 }, { 0x8, 5 }, + { 0x8, 4 }, { 0x1E, 5 }, { 0x26, 6 }, { 0x1, 6 } + }, + { /* AC bias group 4, table 5 */ + { 0x3, 3 }, { 0x1, 4 }, { 0x3F, 6 }, { 0xB, 5 }, + { 0x4E, 7 }, { 0x132, 9 }, { 0x99A, 12 }, { 0x4F, 7 }, + { 0x98, 8 }, { 0x6, 3 }, { 0x5, 3 }, { 0x1D, 5 }, + { 0x1C, 5 }, { 0x7C, 7 }, { 0x267, 10 }, { 0x1331, 13 }, + { 0x1330, 13 }, { 0x1333, 13 }, { 0x1332, 13 }, { 0x266D, 14 }, + { 0x266C, 14 }, { 0x266F, 14 }, { 0x266E, 14 }, { 0x1, 3 }, + { 0x4, 4 }, { 0x1E, 5 }, { 0x12, 5 }, { 0xA, 5 }, + { 0x8, 4 }, { 0x0, 4 }, { 0x7D, 7 }, { 0x4D, 7 } + }, + { /* AC bias group 4, table 6 */ + { 0x2, 3 }, { 0x7, 4 }, { 0x15, 5 }, { 0x3, 4 }, + { 0x4, 5 }, { 0xA7, 8 }, { 0x536, 11 }, { 0x28, 6 }, + { 0x29A, 10 }, { 0x6, 3 }, { 0x4, 3 }, { 0x1C, 5 }, + { 0x17, 5 }, { 0xA4, 8 }, { 0x29BE, 14 }, { 0x537F, 15 }, + { 0x537E, 15 }, { 0x29B9, 14 }, { 0x29B8, 14 }, { 0x29BB, 14 }, + { 0x29BA, 14 }, { 0x29BD, 14 }, { 0x29BC, 14 }, { 0xF, 4 }, + { 0x0, 4 }, { 0x5, 5 }, { 0x16, 5 }, { 0x1D, 5 }, + { 0x6, 4 }, { 0x1, 4 }, { 0xA5, 8 }, { 0x14C, 9 } + }, + { /* AC bias group 4, table 7 */ + { 0x4, 3 }, { 0x7, 4 }, { 0x1A, 5 }, { 0xC, 4 }, + { 0x6, 4 }, { 0x29, 6 }, { 0x1BD, 9 }, { 0x1BE3, 13 }, + { 0x1BE0, 13 }, { 0x0, 2 }, { 0x7, 3 }, { 0x6E, 7 }, + { 0x1BC, 9 }, { 0x37C3, 14 }, { 0x37C2, 14 }, { 0x37CD, 14 }, + { 0x37CC, 14 }, { 0x37CF, 14 }, { 0x37CE, 14 }, { 0x37C9, 14 }, + { 0x37C8, 14 }, { 0x37CB, 14 }, { 0x37CA, 14 }, { 0x15, 5 }, + { 0x1BF, 9 }, { 0x37D, 10 }, { 0x36, 6 }, { 0x2, 3 }, + { 0xB, 4 }, { 0x28, 6 }, { 0x37C5, 14 }, { 0x37C4, 14 } + }, + { /* AC bias group 4, table 8 */ + { 0x1, 3 }, { 0x9, 5 }, { 0x3, 6 }, { 0x2, 6 }, + { 0x11F, 10 }, { 0x8E9, 13 }, { 0x8E8, 13 }, { 0x2D, 7 }, + { 0x22, 7 }, { 0x6, 3 }, { 0x7, 3 }, { 0x10, 5 }, + { 0x11, 5 }, { 0x17, 6 }, { 0x2C, 7 }, { 0x46, 8 }, + { 0x11E, 10 }, { 0x11C, 10 }, { 0x477, 12 }, { 0x8EB, 13 }, + { 0x8EA, 13 }, { 0x8ED, 13 }, { 0x8EC, 13 }, { 0x3, 3 }, + { 0xB, 4 }, { 0x1, 4 }, { 0x14, 5 }, { 0xA, 5 }, + { 0x9, 4 }, { 0x15, 5 }, { 0x0, 5 }, { 0x10, 6 } + }, + { /* AC bias group 4, table 9 */ + { 0x1, 3 }, { 0x1D, 5 }, { 0x22, 6 }, { 0x13, 6 }, + { 0x11E, 9 }, { 0x8FC, 12 }, { 0x23F5, 14 }, { 0x23, 7 }, + { 0x22, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x10, 5 }, + { 0xB, 5 }, { 0x10, 6 }, { 0x8E, 8 }, { 0x23E, 10 }, + { 0x8FF, 12 }, { 0x11FD, 13 }, { 0x23F4, 14 }, { 0x23F7, 14 }, + { 0x23F6, 14 }, { 0x23F9, 14 }, { 0x23F8, 14 }, { 0x3, 3 }, + { 0x9, 4 }, { 0x0, 4 }, { 0x1C, 5 }, { 0xA, 5 }, + { 0xF, 4 }, { 0x1, 4 }, { 0x12, 6 }, { 0x46, 7 } + }, + { /* AC bias group 4, table 10 */ + { 0x3, 3 }, { 0x1F, 5 }, { 0x3C, 6 }, { 0x3D, 6 }, + { 0x86, 8 }, { 0x877, 12 }, { 0x10E8, 13 }, { 0x41, 7 }, + { 0x40, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x7, 5 }, + { 0x6, 5 }, { 0x4, 6 }, { 0x10F, 9 }, { 0x21C, 10 }, + { 0x875, 12 }, { 0x21D3, 14 }, { 0x21D2, 14 }, { 0x21D9, 14 }, + { 0x21D8, 14 }, { 0x21DB, 14 }, { 0x21DA, 14 }, { 0x2, 3 }, + { 0x9, 4 }, { 0x0, 4 }, { 0x11, 5 }, { 0x3, 5 }, + { 0xE, 4 }, { 0x2, 4 }, { 0x5, 6 }, { 0x42, 7 } + }, + { /* AC bias group 4, table 11 */ + { 0x4, 3 }, { 0x1, 4 }, { 0x3D, 6 }, { 0x9, 5 }, + { 0xF3, 8 }, { 0x793, 11 }, { 0x1E45, 13 }, { 0x0, 7 }, + { 0x2, 7 }, { 0x5, 3 }, { 0x6, 3 }, { 0x8, 5 }, + { 0x1, 5 }, { 0x3, 7 }, { 0x1E5, 9 }, { 0x792, 11 }, + { 0x1E44, 13 }, { 0x1E47, 13 }, { 0x1E46, 13 }, { 0x1E41, 13 }, + { 0x1E40, 13 }, { 0x1E43, 13 }, { 0x1E42, 13 }, { 0x1, 3 }, + { 0x6, 4 }, { 0x1F, 5 }, { 0xF, 5 }, { 0xE, 5 }, + { 0xE, 4 }, { 0x5, 4 }, { 0x78, 7 }, { 0x1, 7 } + }, + { /* AC bias group 4, table 12 */ + { 0x4, 3 }, { 0x5, 4 }, { 0xE, 5 }, { 0x17, 5 }, + { 0x3E, 7 }, { 0xF0, 9 }, { 0xF1E, 13 }, { 0x7A, 8 }, + { 0x7F, 8 }, { 0x6, 3 }, { 0x7, 3 }, { 0x5, 5 }, + { 0x4, 5 }, { 0x7B, 8 }, { 0x1E2, 10 }, { 0x1E3F, 14 }, + { 0x1E3E, 14 }, { 0xF19, 13 }, { 0xF18, 13 }, { 0xF1B, 13 }, + { 0xF1A, 13 }, { 0xF1D, 13 }, { 0xF1C, 13 }, { 0x0, 3 }, + { 0x3, 4 }, { 0x16, 5 }, { 0x9, 5 }, { 0x8, 5 }, + { 0xA, 4 }, { 0x6, 4 }, { 0x7E, 8 }, { 0x79, 8 } + }, + { /* AC bias group 4, table 13 */ + { 0x5, 3 }, { 0xC, 4 }, { 0x1A, 5 }, { 0x4, 4 }, + { 0x1A, 6 }, { 0xDE, 9 }, { 0xDF4, 13 }, { 0xDD, 9 }, + { 0x6D, 8 }, { 0x0, 2 }, { 0x7, 3 }, { 0x25, 6 }, + { 0x24, 6 }, { 0xDC, 9 }, { 0xDF7, 13 }, { 0x1BEB, 14 }, + { 0x1BEA, 14 }, { 0xDF1, 13 }, { 0xDF0, 13 }, { 0xDF3, 13 }, + { 0xDF2, 13 }, { 0x1BED, 14 }, { 0x1BEC, 14 }, { 0x8, 4 }, + { 0x13, 5 }, { 0xC, 5 }, { 0x37, 6 }, { 0x36, 6 }, + { 0x5, 4 }, { 0x7, 4 }, { 0x6C, 8 }, { 0x1BF, 10 } + }, + { /* AC bias group 4, table 14 */ + { 0x5, 3 }, { 0xD, 4 }, { 0x1F, 5 }, { 0xC, 4 }, + { 0x3B, 6 }, { 0x40, 7 }, { 0x41A, 11 }, { 0x104, 9 }, + { 0x107, 9 }, { 0x1, 2 }, { 0x0, 2 }, { 0x24, 6 }, + { 0x21, 6 }, { 0x20B, 10 }, { 0x106E, 13 }, { 0x20DF, 14 }, + { 0x20DE, 14 }, { 0x1055, 13 }, { 0x1054, 13 }, { 0x1057, 13 }, + { 0x1056, 13 }, { 0x106D, 13 }, { 0x106C, 13 }, { 0x11, 5 }, + { 0x3A, 6 }, { 0x25, 6 }, { 0x38, 6 }, { 0x39, 6 }, + { 0x13, 5 }, { 0x1E, 5 }, { 0x20C, 10 }, { 0x414, 11 } + }, + { /* AC bias group 4, table 15 */ + { 0x0, 2 }, { 0x7, 4 }, { 0xD, 5 }, { 0x5, 4 }, + { 0x9, 5 }, { 0x22, 7 }, { 0xCD1, 13 }, { 0xCD0, 13 }, + { 0xCD3, 13 }, { 0x3, 2 }, { 0x2, 2 }, { 0x8D, 9 }, + { 0xCC, 9 }, { 0x66B, 12 }, { 0xCD2, 13 }, { 0x19B5, 14 }, + { 0x19B4, 14 }, { 0x19B7, 14 }, { 0x19B6, 14 }, { 0x19B1, 14 }, + { 0x19B0, 14 }, { 0x19B3, 14 }, { 0x19B2, 14 }, { 0x47, 8 }, + { 0x8C, 9 }, { 0x337, 11 }, { 0x67, 8 }, { 0x18, 6 }, + { 0x10, 6 }, { 0x32, 7 }, { 0xCD5, 13 }, { 0xCD4, 13 } + } +}; + +#endif /* AVCODEC_VP4DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56.h new file mode 100644 index 00000000..65cf4687 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56.h @@ -0,0 +1,418 @@ +/* + * Copyright (C) 2006 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP5 and VP6 compatible video decoder (common features) + */ + +#ifndef AVCODEC_VP56_H +#define AVCODEC_VP56_H + +#include "avcodec.h" +#include "get_bits.h" +#include "hpeldsp.h" +#include "bytestream.h" +#include "h264chroma.h" +#include "videodsp.h" +#include "vp3dsp.h" +#include "vp56dsp.h" + +typedef struct vp56_context VP56Context; + +typedef enum { + VP56_FRAME_NONE =-1, + VP56_FRAME_CURRENT = 0, + VP56_FRAME_PREVIOUS = 1, + VP56_FRAME_GOLDEN = 2, + VP56_FRAME_GOLDEN2 = 3, +} VP56Frame; + +typedef enum { + VP56_MB_INTER_NOVEC_PF = 0, /**< Inter MB, no vector, from previous frame */ + VP56_MB_INTRA = 1, /**< Intra MB */ + VP56_MB_INTER_DELTA_PF = 2, /**< Inter MB, above/left vector + delta, from previous frame */ + VP56_MB_INTER_V1_PF = 3, /**< Inter MB, first vector, from previous frame */ + VP56_MB_INTER_V2_PF = 4, /**< Inter MB, second vector, from previous frame */ + VP56_MB_INTER_NOVEC_GF = 5, /**< Inter MB, no vector, from golden frame */ + VP56_MB_INTER_DELTA_GF = 6, /**< Inter MB, above/left vector + delta, from golden frame */ + VP56_MB_INTER_4V = 7, /**< Inter MB, 4 vectors, from previous frame */ + VP56_MB_INTER_V1_GF = 8, /**< Inter MB, first vector, from golden frame */ + VP56_MB_INTER_V2_GF = 9, /**< Inter MB, second vector, from golden frame */ +} VP56mb; + +typedef struct VP56Tree { + int8_t val; + int8_t prob_idx; +} VP56Tree; + +typedef struct VP56mv { + DECLARE_ALIGNED(4, int16_t, x); + int16_t y; +} VP56mv; + +#define VP56_SIZE_CHANGE 1 + +typedef void (*VP56ParseVectorAdjustment)(VP56Context *s, + VP56mv *vect); +typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src, + int offset1, int offset2, ptrdiff_t stride, + VP56mv mv, int mask, int select, int luma); +typedef int (*VP56ParseCoeff)(VP56Context *s); +typedef void (*VP56DefaultModelsInit)(VP56Context *s); +typedef void (*VP56ParseVectorModels)(VP56Context *s); +typedef int (*VP56ParseCoeffModels)(VP56Context *s); +typedef int (*VP56ParseHeader)(VP56Context *s, const uint8_t *buf, + int buf_size); + +typedef struct VP56RangeCoder { + int high; + int bits; /* stored negated (i.e. negative "bits" is a positive number of + bits left) in order to eliminate a negate in cache refilling */ + const uint8_t *buffer; + const uint8_t *end; + unsigned int code_word; + int end_reached; +} VP56RangeCoder; + +typedef struct VP56RefDc { + uint8_t not_null_dc; + VP56Frame ref_frame; + int16_t dc_coeff; +} VP56RefDc; + +typedef struct VP56Macroblock { + uint8_t type; + VP56mv mv; +} VP56Macroblock; + +typedef struct VP56Model { + uint8_t coeff_reorder[64]; /* used in vp6 only */ + uint8_t coeff_index_to_pos[64]; /* used in vp6 only */ + uint8_t coeff_index_to_idct_selector[64]; /* used in vp6 only */ + uint8_t vector_sig[2]; /* delta sign */ + uint8_t vector_dct[2]; /* delta coding types */ + uint8_t vector_pdi[2][2]; /* predefined delta init */ + uint8_t vector_pdv[2][7]; /* predefined delta values */ + uint8_t vector_fdv[2][8]; /* 8 bit delta value definition */ + uint8_t coeff_dccv[2][11]; /* DC coeff value */ + uint8_t coeff_ract[2][3][6][11]; /* Run/AC coding type and AC coeff value */ + uint8_t coeff_acct[2][3][3][6][5];/* vp5 only AC coding type for coding group < 3 */ + uint8_t coeff_dcct[2][36][5]; /* DC coeff coding type */ + uint8_t coeff_runv[2][14]; /* run value (vp6 only) */ + uint8_t mb_type[3][10][10]; /* model for decoding MB type */ + uint8_t mb_types_stats[3][10][2];/* contextual, next MB type stats */ +} VP56Model; + +struct vp56_context { + AVCodecContext *avctx; + H264ChromaContext h264chroma; + HpelDSPContext hdsp; + VideoDSPContext vdsp; + VP3DSPContext vp3dsp; + VP56DSPContext vp56dsp; + uint8_t idct_scantable[64]; + AVFrame *frames[4]; + uint8_t *edge_emu_buffer_alloc; + uint8_t *edge_emu_buffer; + VP56RangeCoder c; + VP56RangeCoder cc; + VP56RangeCoder *ccp; + int sub_version; + + /* frame info */ + int golden_frame; + int plane_width[4]; + int plane_height[4]; + int mb_width; /* number of horizontal MB */ + int mb_height; /* number of vertical MB */ + int block_offset[6]; + + int quantizer; + uint16_t dequant_dc; + uint16_t dequant_ac; + + /* DC predictors management */ + VP56RefDc *above_blocks; + VP56RefDc left_block[4]; + int above_block_idx[6]; + int16_t prev_dc[3][3]; /* [plan][ref_frame] */ + + /* blocks / macroblock */ + VP56mb mb_type; + VP56Macroblock *macroblocks; + DECLARE_ALIGNED(16, int16_t, block_coeff)[6][64]; + int idct_selector[6]; + + /* motion vectors */ + VP56mv mv[6]; /* vectors for each block in MB */ + VP56mv vector_candidate[2]; + int vector_candidate_pos; + + /* filtering hints */ + int filter_header; /* used in vp6 only */ + int deblock_filtering; + int filter_selection; + int filter_mode; + int max_vector_length; + int sample_variance_threshold; + DECLARE_ALIGNED(8, int, bounding_values_array)[256]; + + uint8_t coeff_ctx[4][64]; /* used in vp5 only */ + uint8_t coeff_ctx_last[4]; /* used in vp5 only */ + + int has_alpha; + + /* upside-down flipping hints */ + int flip; /* are we flipping ? */ + int frbi; /* first row block index in MB */ + int srbi; /* second row block index in MB */ + ptrdiff_t stride[4]; /* stride for each plan */ + + const uint8_t *vp56_coord_div; + VP56ParseVectorAdjustment parse_vector_adjustment; + VP56Filter filter; + VP56ParseCoeff parse_coeff; + VP56DefaultModelsInit default_models_init; + VP56ParseVectorModels parse_vector_models; + VP56ParseCoeffModels parse_coeff_models; + VP56ParseHeader parse_header; + + /* for "slice" parallelism between YUV and A */ + VP56Context *alpha_context; + + VP56Model *modelp; + VP56Model model; + + /* huffman decoding */ + int use_huffman; + GetBitContext gb; + VLC dccv_vlc[2]; + VLC runv_vlc[2]; + VLC ract_vlc[2][3][6]; + unsigned int nb_null[2][2]; /* number of consecutive NULL DC/AC */ + + int have_undamaged_frame; + int discard_frame; +}; + + +int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha); +int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s, + int flip, int has_alpha); +int ff_vp56_free(AVCodecContext *avctx); +int ff_vp56_free_context(VP56Context *s); +void ff_vp56_init_dequant(VP56Context *s, int quantizer); +int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, + AVPacket *avpkt); + + +/** + * vp56 specific range coder implementation + */ + +extern const uint8_t ff_vp56_norm_shift[256]; +int ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size); + +/** + * vp5689 returns 1 if the end of the stream has been reached, 0 otherwise. + */ +static av_always_inline int vpX_rac_is_end(VP56RangeCoder *c) +{ + if (c->end <= c->buffer && c->bits >= 0) + c->end_reached ++; + return c->end_reached > 10; +} + +static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c) +{ + int shift = ff_vp56_norm_shift[c->high]; + int bits = c->bits; + unsigned int code_word = c->code_word; + + c->high <<= shift; + code_word <<= shift; + bits += shift; + if(bits >= 0 && c->buffer < c->end) { + code_word |= bytestream_get_be16(&c->buffer) << bits; + bits -= 16; + } + c->bits = bits; + return code_word; +} + +#if ARCH_ARM +#include "arm/vp56_arith.h" +#elif ARCH_X86 +#include "x86/vp56_arith.h" +#endif + +#ifndef vp56_rac_get_prob +#define vp56_rac_get_prob vp56_rac_get_prob +static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) +{ + unsigned int code_word = vp56_rac_renorm(c); + unsigned int low = 1 + (((c->high - 1) * prob) >> 8); + unsigned int low_shift = low << 16; + int bit = code_word >= low_shift; + + c->high = bit ? c->high - low : low; + c->code_word = bit ? code_word - low_shift : code_word; + + return bit; +} +#endif + +#ifndef vp56_rac_get_prob_branchy +// branchy variant, to be used where there's a branch based on the bit decoded +static av_always_inline int vp56_rac_get_prob_branchy(VP56RangeCoder *c, int prob) +{ + unsigned long code_word = vp56_rac_renorm(c); + unsigned low = 1 + (((c->high - 1) * prob) >> 8); + unsigned low_shift = low << 16; + + if (code_word >= low_shift) { + c->high -= low; + c->code_word = code_word - low_shift; + return 1; + } + + c->high = low; + c->code_word = code_word; + return 0; +} +#endif + +static av_always_inline int vp56_rac_get(VP56RangeCoder *c) +{ + unsigned int code_word = vp56_rac_renorm(c); + /* equiprobable */ + int low = (c->high + 1) >> 1; + unsigned int low_shift = low << 16; + int bit = code_word >= low_shift; + if (bit) { + c->high -= low; + code_word -= low_shift; + } else { + c->high = low; + } + + c->code_word = code_word; + return bit; +} + +// rounding is different than vp56_rac_get, is vp56_rac_get wrong? +static av_always_inline int vp8_rac_get(VP56RangeCoder *c) +{ + return vp56_rac_get_prob(c, 128); +} + +static int vp56_rac_gets(VP56RangeCoder *c, int bits) +{ + int value = 0; + + while (bits--) { + value = (value << 1) | vp56_rac_get(c); + } + + return value; +} + +static int vp8_rac_get_uint(VP56RangeCoder *c, int bits) +{ + int value = 0; + + while (bits--) { + value = (value << 1) | vp8_rac_get(c); + } + + return value; +} + +// fixme: add 1 bit to all the calls to this? +static av_unused int vp8_rac_get_sint(VP56RangeCoder *c, int bits) +{ + int v; + + if (!vp8_rac_get(c)) + return 0; + + v = vp8_rac_get_uint(c, bits); + + if (vp8_rac_get(c)) + v = -v; + + return v; +} + +// P(7) +static av_unused int vp56_rac_gets_nn(VP56RangeCoder *c, int bits) +{ + int v = vp56_rac_gets(c, 7) << 1; + return v + !v; +} + +static av_unused int vp8_rac_get_nn(VP56RangeCoder *c) +{ + int v = vp8_rac_get_uint(c, 7) << 1; + return v + !v; +} + +static av_always_inline +int vp56_rac_get_tree(VP56RangeCoder *c, + const VP56Tree *tree, + const uint8_t *probs) +{ + while (tree->val > 0) { + if (vp56_rac_get_prob_branchy(c, probs[tree->prob_idx])) + tree += tree->val; + else + tree++; + } + return -tree->val; +} + +// how probabilities are associated with decisions is different I think +// well, the new scheme fits in the old but this way has one fewer branches per decision +static av_always_inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t (*tree)[2], + const uint8_t *probs) +{ + int i = 0; + + do { + i = tree[i][vp56_rac_get_prob(c, probs[i])]; + } while (i > 0); + + return -i; +} + +// DCTextra +static av_always_inline int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob) +{ + int v = 0; + + do { + v = (v<<1) + vp56_rac_get_prob(c, *prob++); + } while (*prob); + + return v; +} + +#endif /* AVCODEC_VP56_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56data.h new file mode 100644 index 00000000..3be268c3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56data.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2006 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP5 and VP6 compatible video decoder (common data) + */ + +#ifndef AVCODEC_VP56DATA_H +#define AVCODEC_VP56DATA_H + +#include "libavutil/common.h" +#include "vp56.h" + +extern const uint8_t ff_vp56_b2p[]; +extern const uint8_t ff_vp56_b6to4[]; +extern const uint8_t ff_vp56_coeff_parse_table[6][11]; +extern const uint8_t ff_vp56_def_mb_types_stats[3][10][2]; +extern const VP56Tree ff_vp56_pva_tree[]; +extern const VP56Tree ff_vp56_pc_tree[]; +extern const uint8_t ff_vp56_coeff_bias[]; +extern const uint8_t ff_vp56_coeff_bit_length[]; + +extern const VP56Frame ff_vp56_reference_frame[]; +extern const uint8_t ff_vp56_ac_dequant[64]; +extern const uint8_t ff_vp56_dc_dequant[64]; +extern const uint8_t ff_vp56_pre_def_mb_type_stats[16][3][10][2]; +extern const uint8_t ff_vp56_filter_threshold[]; +extern const uint8_t ff_vp56_mb_type_model_model[]; +extern const VP56Tree ff_vp56_pmbtm_tree[]; +extern const VP56Tree ff_vp56_pmbt_tree[]; +extern const int8_t ff_vp56_candidate_predictor_pos[12][2]; + +#endif /* AVCODEC_VP56DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56dsp.h new file mode 100644 index 00000000..e35e232e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp56dsp.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP56DSP_H +#define AVCODEC_VP56DSP_H + +#include +#include + +typedef struct VP56DSPContext { + void (*edge_filter_hor)(uint8_t *yuv, ptrdiff_t stride, int t); + void (*edge_filter_ver)(uint8_t *yuv, ptrdiff_t stride, int t); + + void (*vp6_filter_diag4)(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + const int16_t *h_weights,const int16_t *v_weights); +} VP56DSPContext; + +void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + const int16_t *h_weights, const int16_t *v_weights); + +void ff_vp5dsp_init(VP56DSPContext *s); +void ff_vp6dsp_init(VP56DSPContext *s); + +void ff_vp6dsp_init_arm(VP56DSPContext *s); +void ff_vp6dsp_init_x86(VP56DSPContext *s); + +#endif /* AVCODEC_VP56DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp5data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp5data.h new file mode 100644 index 00000000..e16ff2da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp5data.h @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2006 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP5 compatible video decoder + */ + +#ifndef AVCODEC_VP5DATA_H +#define AVCODEC_VP5DATA_H + +#include + +static const uint8_t vp5_coeff_groups[] = { + -1, 0, 1, 1, 2, 1, 1, 2, + 2, 1, 1, 2, 2, 2, 1, 2, + 2, 2, 2, 2, 1, 1, 2, 2, + 3, 3, 4, 3, 4, 4, 4, 3, + 3, 3, 3, 3, 4, 3, 3, 3, + 4, 4, 4, 4, 4, 3, 3, 4, + 4, 4, 3, 4, 4, 4, 4, 4, + 4, 4, 5, 5, 5, 5, 5, 5, +}; + +static const uint8_t vp5_vmc_pct[2][11] = { + { 243, 220, 251, 253, 237, 232, 241, 245, 247, 251, 253 }, + { 235, 211, 246, 249, 234, 231, 248, 249, 252, 252, 254 }, +}; + +static const uint8_t vp5_dccv_pct[2][11] = { + { 146, 197, 181, 207, 232, 243, 238, 251, 244, 250, 249 }, + { 179, 219, 214, 240, 250, 254, 244, 254, 254, 254, 254 }, +}; + +static const uint8_t vp5_ract_pct[3][2][6][11] = { + { { { 227, 246, 230, 247, 244, 254, 254, 254, 254, 254, 254 }, + { 202, 254, 209, 231, 231, 249, 249, 253, 254, 254, 254 }, + { 206, 254, 225, 242, 241, 251, 253, 254, 254, 254, 254 }, + { 235, 254, 241, 253, 252, 254, 254, 254, 254, 254, 254 }, + { 234, 254, 248, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } }, + { { 240, 254, 248, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 238, 254, 240, 253, 254, 254, 254, 254, 254, 254, 254 }, + { 244, 254, 251, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } }, + { { { 206, 203, 227, 239, 247, 254, 253, 254, 254, 254, 254 }, + { 207, 199, 220, 236, 243, 252, 252, 254, 254, 254, 254 }, + { 212, 219, 230, 243, 244, 253, 252, 254, 254, 254, 254 }, + { 236, 237, 247, 252, 253, 254, 254, 254, 254, 254, 254 }, + { 240, 240, 248, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } }, + { { 230, 233, 249, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 238, 238, 250, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 248, 251, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } }, + { { { 225, 239, 227, 231, 244, 253, 243, 254, 254, 253, 254 }, + { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 254 }, + { 235, 249, 238, 240, 251, 254, 249, 254, 253, 253, 254 }, + { 249, 253, 251, 250, 254, 254, 254, 254, 254, 254, 254 }, + { 251, 250, 249, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } }, + { { 243, 244, 250, 250, 254, 254, 254, 254, 254, 254, 254 }, + { 249, 248, 250, 253, 254, 254, 254, 254, 254, 254, 254 }, + { 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 }, + { 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 } } }, +}; + +static const int16_t vp5_dccv_lc[5][36][2] = { + { {154, 61}, {141, 54}, { 90, 45}, { 54, 34}, { 54, 13}, {128, 109}, + {136, 54}, {148, 45}, { 92, 41}, { 54, 33}, { 51, 15}, { 87, 113}, + { 87, 44}, { 97, 40}, { 67, 36}, { 46, 29}, { 41, 15}, { 64, 80}, + { 59, 33}, { 61, 31}, { 51, 28}, { 44, 22}, { 33, 12}, { 49, 63}, + { 69, 12}, { 59, 16}, { 46, 14}, { 31, 13}, { 26, 6}, { 92, 26}, + {128, 108}, { 77, 119}, { 54, 84}, { 26, 71}, { 87, 19}, { 95, 155} }, + { {154, 4}, {182, 0}, {159, -8}, {128, -5}, {143, -5}, {187, 55}, + {182, 0}, {228, -3}, {187, -7}, {174, -9}, {189, -11}, {169, 79}, + {161, -9}, {192, -8}, {187, -9}, {169, -10}, {136, -9}, {184, 40}, + {164, -11}, {179, -10}, {174, -10}, {161, -10}, {115, -7}, {197, 20}, + {195, -11}, {195, -11}, {146, -10}, {110, -6}, { 95, -4}, {195, 39}, + {182, 55}, {172, 77}, {177, 37}, {169, 29}, {172, 52}, { 92, 162} }, + { {174, 80}, {164, 80}, { 95, 80}, { 46, 66}, { 56, 24}, { 36, 193}, + {164, 80}, {166, 77}, {105, 76}, { 49, 68}, { 46, 31}, { 49, 186}, + { 97, 78}, {110, 74}, { 72, 72}, { 44, 60}, { 33, 30}, { 69, 131}, + { 61, 61}, { 69, 63}, { 51, 57}, { 31, 48}, { 26, 27}, { 64, 89}, + { 67, 23}, { 51, 32}, { 36, 33}, { 26, 28}, { 20, 12}, { 44, 68}, + { 26, 197}, { 41, 189}, { 61, 129}, { 28, 103}, { 49, 52}, {-12, 245} }, + { {102, 141}, { 79, 166}, { 72, 162}, { 97, 125}, {179, 4}, {307, 0}, + { 72, 168}, { 69, 175}, { 84, 160}, {105, 127}, {148, 34}, {310, 0}, + { 84, 151}, { 82, 161}, { 87, 153}, { 87, 135}, {115, 51}, {317, 0}, + { 97, 125}, {102, 131}, {105, 125}, { 87, 122}, { 84, 64}, { 54, 184}, + {166, 18}, {146, 43}, {125, 51}, { 90, 64}, { 95, 7}, { 38, 154}, + {294, 0}, { 13, 225}, { 10, 225}, { 67, 168}, { 0, 167}, {161, 94} }, + { {172, 76}, {172, 75}, {136, 80}, { 64, 98}, { 74, 67}, {315, 0}, + {169, 76}, {207, 56}, {164, 66}, { 97, 80}, { 67, 72}, {328, 0}, + {136, 80}, {187, 53}, {154, 62}, { 72, 85}, { -2, 105}, {305, 0}, + { 74, 91}, {128, 64}, {113, 64}, { 61, 77}, { 41, 75}, {259, 0}, + { 46, 84}, { 51, 81}, { 28, 89}, { 31, 78}, { 23, 77}, {202, 0}, + {323, 0}, {323, 0}, {300, 0}, {236, 0}, {195, 0}, {328, 0} }, +}; + +static const int16_t vp5_ract_lc[3][3][5][6][2] = { + { { { {276, 0}, {238, 0}, {195, 0}, {156, 0}, {113, 0}, {274, 0} }, + { { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1} }, + { {192, 59}, {182, 50}, {141, 48}, {110, 40}, { 92, 19}, {125,128} }, + { {169, 87}, {169, 83}, {184, 62}, {220, 16}, {184, 0}, {264, 0} }, + { {212, 40}, {212, 36}, {169, 49}, {174, 27}, { 8,120}, {182, 71} } }, + { { {259, 10}, {197, 19}, {143, 22}, {123, 16}, {110, 8}, {133, 88} }, + { { 0, 1}, {256, 0}, { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1} }, + { {207, 46}, {187, 50}, { 97, 83}, { 23,100}, { 41, 56}, { 56,188} }, + { {166, 90}, {146,108}, {161, 88}, {136, 95}, {174, 0}, {266, 0} }, + { {264, 7}, {243, 18}, {184, 43}, {-14,154}, { 20,112}, { 20,199} } }, + { { {230, 26}, {197, 22}, {159, 20}, {146, 12}, {136, 4}, { 54,162} }, + { { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1}, { 0, 1} }, + { {192, 59}, {156, 72}, { 84,101}, { 49,101}, { 79, 47}, { 79,167} }, + { {138,115}, {136,116}, {166, 80}, {238, 0}, {195, 0}, {261, 0} }, + { {225, 33}, {205, 42}, {159, 61}, { 79, 96}, { 92, 66}, { 28,195} } }, + }, { + { { {200, 37}, {197, 18}, {159, 13}, {143, 7}, {102, 5}, {123,126} }, + { {197, 3}, {220, -9}, {210,-12}, {187, -6}, {151, -2}, {174, 80} }, + { {200, 53}, {187, 47}, {159, 40}, {118, 38}, {100, 18}, {141,111} }, + { {179, 78}, {166, 86}, {197, 50}, {207, 27}, {187, 0}, {115,139} }, + { {218, 34}, {220, 29}, {174, 46}, {128, 61}, { 54, 89}, {187, 65} } }, + { { {238, 14}, {197, 18}, {125, 26}, { 90, 25}, { 82, 13}, {161, 86} }, + { {189, 1}, {205, -2}, {156, -4}, {143, -4}, {146, -4}, {172, 72} }, + { {230, 31}, {192, 45}, {102, 76}, { 38, 85}, { 56, 41}, { 64,173} }, + { {166, 91}, {141,111}, {128,116}, {118,109}, {177, 0}, { 23,222} }, + { {253, 14}, {236, 21}, {174, 49}, { 33,118}, { 44, 93}, { 23,187} } }, + { { {218, 28}, {179, 28}, {118, 35}, { 95, 30}, { 72, 24}, {128,108} }, + { {187, 1}, {174, -1}, {125, -1}, {110, -1}, {108, -1}, {202, 52} }, + { {197, 53}, {146, 75}, { 46,118}, { 33,103}, { 64, 50}, {118,126} }, + { {138,114}, {128,122}, {161, 86}, {243, -6}, {195, 0}, { 38,210} }, + { {215, 39}, {179, 58}, { 97,101}, { 95, 85}, { 87, 70}, { 69,152} } }, + }, { + { { {236, 24}, {205, 18}, {172, 12}, {154, 6}, {125, 1}, {169, 75} }, + { {187, 4}, {230, -2}, {228, -4}, {236, -4}, {241, -2}, {192, 66} }, + { {200, 46}, {187, 42}, {159, 34}, {136, 25}, {105, 10}, {179, 62} }, + { {207, 55}, {192, 63}, {192, 54}, {195, 36}, {177, 1}, {143, 98} }, + { {225, 27}, {207, 34}, {200, 30}, {131, 57}, { 97, 60}, {197, 45} } }, + { { {271, 8}, {218, 13}, {133, 19}, { 90, 19}, { 72, 7}, {182, 51} }, + { {179, 1}, {225, -1}, {154, -2}, {110, -1}, { 92, 0}, {195, 41} }, + { {241, 26}, {189, 40}, { 82, 64}, { 33, 60}, { 67, 17}, {120, 94} }, + { {192, 68}, {151, 94}, {146, 90}, {143, 72}, {161, 0}, {113,128} }, + { {256, 12}, {218, 29}, {166, 48}, { 44, 99}, { 31, 87}, {148, 78} } }, + { { {238, 20}, {184, 22}, {113, 27}, { 90, 22}, { 74, 9}, {192, 37} }, + { {184, 0}, {215, -1}, {141, -1}, { 97, 0}, { 49, 0}, {264, 13} }, + { {182, 51}, {138, 61}, { 95, 63}, { 54, 59}, { 64, 25}, {200, 45} }, + { {179, 75}, {156, 87}, {174, 65}, {177, 44}, {174, 0}, {164, 85} }, + { {195, 45}, {148, 65}, {105, 79}, { 95, 72}, { 87, 60}, {169, 63} } }, + } +}; + +static const uint8_t vp5_coord_div[] = { 2, 2, 2, 2, 4, 4 }; + +#endif /* AVCODEC_VP5DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp6data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp6data.h new file mode 100644 index 00000000..539e19a6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp6data.h @@ -0,0 +1,312 @@ +/* + * Copyright (C) 2006 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP6 compatible video decoder + */ + +#ifndef AVCODEC_VP6DATA_H +#define AVCODEC_VP6DATA_H + +#include + +#include "vp56.h" + +static const uint8_t vp6_def_fdv_vector_model[2][8] = { + { 247, 210, 135, 68, 138, 220, 239, 246 }, + { 244, 184, 201, 44, 173, 221, 239, 253 }, +}; + +static const uint8_t vp6_def_pdv_vector_model[2][7] = { + { 225, 146, 172, 147, 214, 39, 156 }, + { 204, 170, 119, 235, 140, 230, 228 }, +}; + +static const uint8_t vp6_def_coeff_reorder[] = { + 0, 0, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 3, 3, 4, 4, 4, + 5, 5, 5, 5, 6, 6, 7, 7, + 7, 7, 7, 8, 8, 9, 9, 9, + 9, 9, 9, 10, 10, 11, 11, 11, + 11, 11, 11, 12, 12, 12, 12, 12, + 12, 13, 13, 13, 13, 13, 14, 14, + 14, 14, 15, 15, 15, 15, 15, 15, +}; + +static const uint8_t vp6_def_runv_coeff_model[2][14] = { + { 198, 197, 196, 146, 198, 204, 169, 142, 130, 136, 149, 149, 191, 249 }, + { 135, 201, 181, 154, 98, 117, 132, 126, 146, 169, 184, 240, 246, 254 }, +}; + +static const uint8_t vp6_sig_dct_pct[2][2] = { + { 237, 246 }, + { 231, 243 }, +}; + +static const uint8_t vp6_pdv_pct[2][7] = { + { 253, 253, 254, 254, 254, 254, 254 }, + { 245, 253, 254, 254, 254, 254, 254 }, +}; + +static const uint8_t vp6_fdv_pct[2][8] = { + { 254, 254, 254, 254, 254, 250, 250, 252 }, + { 254, 254, 254, 254, 254, 251, 251, 254 }, +}; + +static const uint8_t vp6_dccv_pct[2][11] = { + { 146, 255, 181, 207, 232, 243, 238, 251, 244, 250, 249 }, + { 179, 255, 214, 240, 250, 255, 244, 255, 255, 255, 255 }, +}; + +static const uint8_t vp6_coeff_reorder_pct[] = { + 255, 132, 132, 159, 153, 151, 161, 170, + 164, 162, 136, 110, 103, 114, 129, 118, + 124, 125, 132, 136, 114, 110, 142, 135, + 134, 123, 143, 126, 153, 183, 166, 161, + 171, 180, 179, 164, 203, 218, 225, 217, + 215, 206, 203, 217, 229, 241, 248, 243, + 253, 255, 253, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, +}; + +static const uint8_t vp6_runv_pct[2][14] = { + { 219, 246, 238, 249, 232, 239, 249, 255, 248, 253, 239, 244, 241, 248 }, + { 198, 232, 251, 253, 219, 241, 253, 255, 248, 249, 244, 238, 251, 255 }, +}; + +static const uint8_t vp6_ract_pct[3][2][6][11] = { + { { { 227, 246, 230, 247, 244, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 209, 231, 231, 249, 249, 253, 255, 255, 255 }, + { 255, 255, 225, 242, 241, 251, 253, 255, 255, 255, 255 }, + { 255, 255, 241, 253, 252, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, + { { 240, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 240, 253, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, + { { { 206, 203, 227, 239, 247, 255, 253, 255, 255, 255, 255 }, + { 207, 199, 220, 236, 243, 252, 252, 255, 255, 255, 255 }, + { 212, 219, 230, 243, 244, 253, 252, 255, 255, 255, 255 }, + { 236, 237, 247, 252, 253, 255, 255, 255, 255, 255, 255 }, + { 240, 240, 248, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, + { { 230, 233, 249, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 238, 238, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 248, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }, + { { { 225, 239, 227, 231, 244, 253, 243, 255, 255, 253, 255 }, + { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 255 }, + { 235, 249, 238, 240, 251, 255, 249, 255, 253, 253, 255 }, + { 249, 253, 251, 250, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 250, 249, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } }, + { { 243, 244, 250, 250, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 248, 250, 253, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } } +}; + +static const int vp6_dccv_lc[3][5][2] = { + { { 122, 133 }, { 0, 1 }, { 78, 171 }, { 139, 117 }, { 168, 79 } }, + { { 133, 51 }, { 0, 1 }, { 169, 71 }, { 214, 44 }, { 210, 38 } }, + { { 142, -16 }, { 0, 1 }, { 221, -30 }, { 246, -3 }, { 203, 17 } }, +}; + +static const uint8_t vp6_coeff_groups[] = { + 0, 0, 1, 1, 1, 2, 2, 2, + 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, +}; + +static const int16_t vp6_block_copy_filter[17][8][4] = { + { { 0, 128, 0, 0 }, /* 0 */ + { -3, 122, 9, 0 }, + { -4, 109, 24, -1 }, + { -5, 91, 45, -3 }, + { -4, 68, 68, -4 }, + { -3, 45, 91, -5 }, + { -1, 24, 109, -4 }, + { 0, 9, 122, -3 } }, + { { 0, 128, 0, 0 }, /* 1 */ + { -4, 124, 9, -1 }, + { -5, 110, 25, -2 }, + { -6, 91, 46, -3 }, + { -5, 69, 69, -5 }, + { -3, 46, 91, -6 }, + { -2, 25, 110, -5 }, + { -1, 9, 124, -4 } }, + { { 0, 128, 0, 0 }, /* 2 */ + { -4, 123, 10, -1 }, + { -6, 110, 26, -2 }, + { -7, 92, 47, -4 }, + { -6, 70, 70, -6 }, + { -4, 47, 92, -7 }, + { -2, 26, 110, -6 }, + { -1, 10, 123, -4 } }, + { { 0, 128, 0, 0 }, /* 3 */ + { -5, 124, 10, -1 }, + { -7, 110, 27, -2 }, + { -7, 91, 48, -4 }, + { -6, 70, 70, -6 }, + { -4, 48, 92, -8 }, + { -2, 27, 110, -7 }, + { -1, 10, 124, -5 } }, + { { 0, 128, 0, 0 }, /* 4 */ + { -6, 124, 11, -1 }, + { -8, 111, 28, -3 }, + { -8, 92, 49, -5 }, + { -7, 71, 71, -7 }, + { -5, 49, 92, -8 }, + { -3, 28, 111, -8 }, + { -1, 11, 124, -6 } }, + { { 0, 128, 0, 0 }, /* 5 */ + { -6, 123, 12, -1 }, + { -9, 111, 29, -3 }, + { -9, 93, 50, -6 }, + { -8, 72, 72, -8 }, + { -6, 50, 93, -9 }, + { -3, 29, 111, -9 }, + { -1, 12, 123, -6 } }, + { { 0, 128, 0, 0 }, /* 6 */ + { -7, 124, 12, -1 }, + { -10, 111, 30, -3 }, + { -10, 93, 51, -6 }, + { -9, 73, 73, -9 }, + { -6, 51, 93, -10 }, + { -3, 30, 111, -10 }, + { -1, 12, 124, -7 } }, + { { 0, 128, 0, 0 }, /* 7 */ + { -7, 123, 13, -1 }, + { -11, 112, 31, -4 }, + { -11, 94, 52, -7 }, + { -10, 74, 74, -10 }, + { -7, 52, 94, -11 }, + { -4, 31, 112, -11 }, + { -1, 13, 123, -7 } }, + { { 0, 128, 0, 0 }, /* 8 */ + { -8, 124, 13, -1 }, + { -12, 112, 32, -4 }, + { -12, 94, 53, -7 }, + { -10, 74, 74, -10 }, + { -7, 53, 94, -12 }, + { -4, 32, 112, -12 }, + { -1, 13, 124, -8 } }, + { { 0, 128, 0, 0 }, /* 9 */ + { -9, 124, 14, -1 }, + { -13, 112, 33, -4 }, + { -13, 95, 54, -8 }, + { -11, 75, 75, -11 }, + { -8, 54, 95, -13 }, + { -4, 33, 112, -13 }, + { -1, 14, 124, -9 } }, + { { 0, 128, 0, 0 }, /* 10 */ + { -9, 123, 15, -1 }, + { -14, 113, 34, -5 }, + { -14, 95, 55, -8 }, + { -12, 76, 76, -12 }, + { -8, 55, 95, -14 }, + { -5, 34, 112, -13 }, + { -1, 15, 123, -9 } }, + { { 0, 128, 0, 0 }, /* 11 */ + { -10, 124, 15, -1 }, + { -14, 113, 34, -5 }, + { -15, 96, 56, -9 }, + { -13, 77, 77, -13 }, + { -9, 56, 96, -15 }, + { -5, 34, 113, -14 }, + { -1, 15, 124, -10 } }, + { { 0, 128, 0, 0 }, /* 12 */ + { -10, 123, 16, -1 }, + { -15, 113, 35, -5 }, + { -16, 98, 56, -10 }, + { -14, 78, 78, -14 }, + { -10, 56, 98, -16 }, + { -5, 35, 113, -15 }, + { -1, 16, 123, -10 } }, + { { 0, 128, 0, 0 }, /* 13 */ + { -11, 124, 17, -2 }, + { -16, 113, 36, -5 }, + { -17, 98, 57, -10 }, + { -14, 78, 78, -14 }, + { -10, 57, 98, -17 }, + { -5, 36, 113, -16 }, + { -2, 17, 124, -11 } }, + { { 0, 128, 0, 0 }, /* 14 */ + { -12, 125, 17, -2 }, + { -17, 114, 37, -6 }, + { -18, 99, 58, -11 }, + { -15, 79, 79, -15 }, + { -11, 58, 99, -18 }, + { -6, 37, 114, -17 }, + { -2, 17, 125, -12 } }, + { { 0, 128, 0, 0 }, /* 15 */ + { -12, 124, 18, -2 }, + { -18, 114, 38, -6 }, + { -19, 99, 59, -11 }, + { -16, 80, 80, -16 }, + { -11, 59, 99, -19 }, + { -6, 38, 114, -18 }, + { -2, 18, 124, -12 } }, + { { 0, 128, 0, 0 }, /* 16 */ + { -4, 118, 16, -2 }, + { -7, 106, 34, -5 }, + { -8, 90, 53, -7 }, + { -8, 72, 72, -8 }, + { -7, 53, 90, -8 }, + { -5, 34, 106, -7 }, + { -2, 16, 118, -4 } }, +}; + +static const VP56Tree vp6_pcr_tree[] = { + { 8, 0}, + { 4, 1}, + { 2, 2}, {-1}, {-2}, + { 2, 3}, {-3}, {-4}, + { 8, 4}, + { 4, 5}, + { 2, 6}, {-5}, {-6}, + { 2, 7}, {-7}, {-8}, + {-0}, +}; + +static const uint8_t vp6_coord_div[] = { 4, 4, 4, 4, 8, 8 }; + +static const uint8_t vp6_huff_coeff_map[] = { + 13, 14, 11, 0, 1, 15, 16, 18, 2, 17, 3, 4, 19, 20, 5, 6, 21, 22, 7, 8, 9, 10 +}; + +static const uint8_t vp6_huff_run_map[] = { + 10, 13, 11, 12, 0, 1, 2, 3, 14, 8, 15, 16, 4, 5, 6, 7 +}; + +#endif /* AVCODEC_VP6DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8.h new file mode 100644 index 00000000..70d21e3c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8.h @@ -0,0 +1,351 @@ +/* + * VP8 compatible video decoder + * + * Copyright (C) 2010 David Conrad + * Copyright (C) 2010 Ronald S. Bultje + * Copyright (C) 2010 Fiona Glaser + * Copyright (C) 2012 Daniel Kang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP8_H +#define AVCODEC_VP8_H + +#include + +#include "libavutil/buffer.h" +#include "libavutil/thread.h" + +#include "h264pred.h" +#include "thread.h" +#include "vp56.h" +#include "vp8dsp.h" + +#define VP8_MAX_QUANT 127 + +enum dct_token { + DCT_0, + DCT_1, + DCT_2, + DCT_3, + DCT_4, + DCT_CAT1, + DCT_CAT2, + DCT_CAT3, + DCT_CAT4, + DCT_CAT5, + DCT_CAT6, + DCT_EOB, + + NUM_DCT_TOKENS +}; + +// used to signal 4x4 intra pred in luma MBs +#define MODE_I4x4 4 + +enum inter_mvmode { + VP8_MVMODE_ZERO = MODE_I4x4 + 1, + VP8_MVMODE_MV, + VP8_MVMODE_SPLIT +}; + +enum inter_splitmvmode { + VP8_SPLITMVMODE_16x8 = 0, ///< 2 16x8 blocks (vertical) + VP8_SPLITMVMODE_8x16, ///< 2 8x16 blocks (horizontal) + VP8_SPLITMVMODE_8x8, ///< 2x2 blocks of 8x8px each + VP8_SPLITMVMODE_4x4, ///< 4x4 blocks of 4x4px each + VP8_SPLITMVMODE_NONE, ///< (only used in prediction) no split MVs +}; + +typedef struct VP8FilterStrength { + uint8_t filter_level; + uint8_t inner_limit; + uint8_t inner_filter; +} VP8FilterStrength; + +typedef struct VP8Macroblock { + uint8_t skip; + // TODO: make it possible to check for at least (i4x4 or split_mv) + // in one op. are others needed? + uint8_t mode; + uint8_t ref_frame; + uint8_t partitioning; + uint8_t chroma_pred_mode; + uint8_t segment; + uint8_t intra4x4_pred_mode_mb[16]; + DECLARE_ALIGNED(4, uint8_t, intra4x4_pred_mode_top)[4]; + VP56mv mv; + VP56mv bmv[16]; +} VP8Macroblock; + +typedef struct VP8intmv { + int x; + int y; +} VP8intmv; + +typedef struct VP8mvbounds { + VP8intmv mv_min; + VP8intmv mv_max; +} VP8mvbounds; + +typedef struct VP8ThreadData { + DECLARE_ALIGNED(16, int16_t, block)[6][4][16]; + DECLARE_ALIGNED(16, int16_t, block_dc)[16]; + /** + * This is the index plus one of the last non-zero coeff + * for each of the blocks in the current macroblock. + * So, 0 -> no coeffs + * 1 -> dc-only (special transform) + * 2+-> full transform + */ + DECLARE_ALIGNED(16, uint8_t, non_zero_count_cache)[6][4]; + /** + * For coeff decode, we need to know whether the above block had non-zero + * coefficients. This means for each macroblock, we need data for 4 luma + * blocks, 2 u blocks, 2 v blocks, and the luma dc block, for a total of 9 + * per macroblock. We keep the last row in top_nnz. + */ + DECLARE_ALIGNED(8, uint8_t, left_nnz)[9]; + int thread_nr; +#if HAVE_THREADS + pthread_mutex_t lock; + pthread_cond_t cond; +#endif + atomic_int thread_mb_pos; // (mb_y << 16) | (mb_x & 0xFFFF) + atomic_int wait_mb_pos; // What the current thread is waiting on. + +#define EDGE_EMU_LINESIZE 32 + DECLARE_ALIGNED(16, uint8_t, edge_emu_buffer)[21 * EDGE_EMU_LINESIZE]; + VP8FilterStrength *filter_strength; + VP8mvbounds mv_bounds; +} VP8ThreadData; + +typedef struct VP8Frame { + ThreadFrame tf; + AVBufferRef *seg_map; + + AVBufferRef *hwaccel_priv_buf; + void *hwaccel_picture_private; +} VP8Frame; + +#define MAX_THREADS 8 +typedef struct VP8Context { + VP8ThreadData *thread_data; + AVCodecContext *avctx; + enum AVPixelFormat pix_fmt; + int actually_webp; + + VP8Frame *framep[4]; + VP8Frame *next_framep[4]; + VP8Frame *curframe; + VP8Frame *prev_frame; + + uint16_t mb_width; /* number of horizontal MB */ + uint16_t mb_height; /* number of vertical MB */ + ptrdiff_t linesize; + ptrdiff_t uvlinesize; + + uint8_t keyframe; + uint8_t deblock_filter; + uint8_t mbskip_enabled; + uint8_t profile; + VP8mvbounds mv_bounds; + + int8_t sign_bias[4]; ///< one state [0, 1] per ref frame type + int ref_count[3]; + + /** + * Base parameters for segmentation, i.e. per-macroblock parameters. + * These must be kept unchanged even if segmentation is not used for + * a frame, since the values persist between interframes. + */ + struct { + uint8_t enabled; + uint8_t absolute_vals; + uint8_t update_map; + uint8_t update_feature_data; + int8_t base_quant[4]; + int8_t filter_level[4]; ///< base loop filter level + } segmentation; + + struct { + uint8_t simple; + uint8_t level; + uint8_t sharpness; + } filter; + + VP8Macroblock *macroblocks; + + uint8_t *intra4x4_pred_mode_top; + uint8_t intra4x4_pred_mode_left[4]; + + /** + * Macroblocks can have one of 4 different quants in a frame when + * segmentation is enabled. + * If segmentation is disabled, only the first segment's values are used. + */ + struct { + // [0] - DC qmul [1] - AC qmul + int16_t luma_qmul[2]; + int16_t luma_dc_qmul[2]; ///< luma dc-only block quant + int16_t chroma_qmul[2]; + } qmat[4]; + + // Raw quantisation values, which may be needed by hwaccel decode. + struct { + int yac_qi; + int ydc_delta; + int y2dc_delta; + int y2ac_delta; + int uvdc_delta; + int uvac_delta; + } quant; + + struct { + uint8_t enabled; ///< whether each mb can have a different strength based on mode/ref + uint8_t update; + + /** + * filter strength adjustment for the following macroblock modes: + * [0-3] - i16x16 (always zero) + * [4] - i4x4 + * [5] - zero mv + * [6] - inter modes except for zero or split mv + * [7] - split mv + * i16x16 modes never have any adjustment + */ + int8_t mode[VP8_MVMODE_SPLIT + 1]; + + /** + * filter strength adjustment for macroblocks that reference: + * [0] - intra / VP56_FRAME_CURRENT + * [1] - VP56_FRAME_PREVIOUS + * [2] - VP56_FRAME_GOLDEN + * [3] - altref / VP56_FRAME_GOLDEN2 + */ + int8_t ref[4]; + } lf_delta; + + uint8_t (*top_border)[16 + 8 + 8]; + uint8_t (*top_nnz)[9]; + + VP56RangeCoder c; ///< header context, includes mb modes and motion vectors + + /* This contains the entropy coder state at the end of the header + * block, in the form specified by the standard. For use by + * hwaccels, so that a hardware decoder has the information to + * start decoding at the macroblock layer. + */ + struct { + const uint8_t *input; + uint32_t range; + uint32_t value; + int bit_count; + } coder_state_at_header_end; + + int header_partition_size; + + /** + * These are all of the updatable probabilities for binary decisions. + * They are only implicitly reset on keyframes, making it quite likely + * for an interframe to desync if a prior frame's header was corrupt + * or missing outright! + */ + struct { + uint8_t segmentid[3]; + uint8_t mbskip; + uint8_t intra; + uint8_t last; + uint8_t golden; + uint8_t pred16x16[4]; + uint8_t pred8x8c[3]; + uint8_t token[4][16][3][NUM_DCT_TOKENS - 1]; + uint8_t mvc[2][19]; + uint8_t scan[16]; + } prob[2]; + + VP8Macroblock *macroblocks_base; + int invisible; + int update_last; ///< update VP56_FRAME_PREVIOUS with the current one + int update_golden; ///< VP56_FRAME_NONE if not updated, or which frame to copy if so + int update_altref; + + /** + * If this flag is not set, all the probability updates + * are discarded after this frame is decoded. + */ + int update_probabilities; + + /** + * All coefficients are contained in separate arith coding contexts. + * There can be 1, 2, 4, or 8 of these after the header context. + */ + int num_coeff_partitions; + VP56RangeCoder coeff_partition[8]; + int coeff_partition_size[8]; + VideoDSPContext vdsp; + VP8DSPContext vp8dsp; + H264PredContext hpc; + vp8_mc_func put_pixels_tab[3][3][3]; + VP8Frame frames[5]; + + uint8_t colorspace; ///< 0 is the only value allowed (meaning bt601) + uint8_t fullrange; ///< whether we can skip clamping in dsp functions + + int num_jobs; + /** + * This describes the macroblock memory layout. + * 0 -> Only width+height*2+1 macroblocks allocated (frame/single thread). + * 1 -> Macroblocks for entire frame allocated (sliced thread). + */ + int mb_layout; + + int (*decode_mb_row_no_filter)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr); + void (*filter_mb_row)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr); + + int vp7; + + /** + * Fade bit present in bitstream (VP7) + */ + int fade_present; + + /** + * Interframe DC prediction (VP7) + * [0] VP56_FRAME_PREVIOUS + * [1] VP56_FRAME_GOLDEN + */ + uint16_t inter_dc_pred[2][2]; + + /** + * Macroblock features (VP7) + */ + uint8_t feature_enabled[4]; + uint8_t feature_present_prob[4]; + uint8_t feature_index_prob[4][3]; + uint8_t feature_value[4][4]; +} VP8Context; + +int ff_vp8_decode_init(AVCodecContext *avctx); + +int ff_vp8_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, + AVPacket *avpkt); + +int ff_vp8_decode_free(AVCodecContext *avctx); + +#endif /* AVCODEC_VP8_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8data.h new file mode 100644 index 00000000..5e6dea76 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8data.h @@ -0,0 +1,830 @@ +/* + * Copyright (C) 2010 David Conrad + * Copyright (C) 2010 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP8 compatible video decoder + */ + +#ifndef AVCODEC_VP8DATA_H +#define AVCODEC_VP8DATA_H + +#include "vp8.h" +#include "h264pred.h" + +static const uint8_t vp7_pred4x4_mode[] = { + [DC_PRED8x8] = DC_PRED, + [VERT_PRED8x8] = TM_VP8_PRED, + [HOR_PRED8x8] = TM_VP8_PRED, + [PLANE_PRED8x8] = TM_VP8_PRED, +}; + +static const uint8_t vp8_pred4x4_mode[] = { + [DC_PRED8x8] = DC_PRED, + [VERT_PRED8x8] = VERT_PRED, + [HOR_PRED8x8] = HOR_PRED, + [PLANE_PRED8x8] = TM_VP8_PRED, +}; + +static const int8_t vp8_pred16x16_tree_intra[4][2] = { + { -MODE_I4x4, 1 }, // '0' + { 2, 3 }, + { -DC_PRED8x8, -VERT_PRED8x8 }, // '100', '101' + { -HOR_PRED8x8, -PLANE_PRED8x8 }, // '110', '111' +}; + +static const int8_t vp8_pred16x16_tree_inter[4][2] = { + { -DC_PRED8x8, 1 }, // '0' + { 2, 3 }, + { -VERT_PRED8x8, -HOR_PRED8x8 }, // '100', '101' + { -PLANE_PRED8x8, -MODE_I4x4 }, // '110', '111' +}; + +typedef struct VP7MVPred { + int8_t yoffset; + int8_t xoffset; + uint8_t subblock; + uint8_t score; +} VP7MVPred; + +#define VP7_MV_PRED_COUNT 12 +static const VP7MVPred vp7_mv_pred[VP7_MV_PRED_COUNT] = { + { -1, 0, 12, 8 }, + { 0, -1, 3, 8 }, + { -1, -1, 15, 2 }, + { -1, 1, 12, 2 }, + { -2, 0, 12, 2 }, + { 0, -2, 3, 2 }, + { -1, -2, 15, 1 }, + { -2, -1, 15, 1 }, + { -2, 1, 12, 1 }, + { -1, 2, 12, 1 }, + { -2, -2, 15, 1 }, + { -2, 2, 12, 1 }, +}; + +static const int vp7_mode_contexts[31][4] = { + { 3, 3, 1, 246 }, + { 7, 89, 66, 239 }, + { 10, 90, 78, 238 }, + { 14, 118, 95, 241 }, + { 14, 123, 106, 238 }, + { 20, 140, 109, 240 }, + { 13, 155, 103, 238 }, + { 21, 158, 99, 240 }, + { 27, 82, 108, 232 }, + { 19, 99, 123, 217 }, + { 45, 139, 148, 236 }, + { 50, 117, 144, 235 }, + { 57, 128, 164, 238 }, + { 69, 139, 171, 239 }, + { 74, 154, 179, 238 }, + { 112, 165, 186, 242 }, + { 98, 143, 185, 245 }, + { 105, 153, 190, 250 }, + { 124, 167, 192, 245 }, + { 131, 186, 203, 246 }, + { 59, 184, 222, 224 }, + { 148, 215, 214, 213 }, + { 137, 211, 210, 219 }, + { 190, 227, 128, 228 }, + { 183, 228, 128, 228 }, + { 194, 234, 128, 228 }, + { 202, 236, 128, 228 }, + { 205, 240, 128, 228 }, + { 205, 244, 128, 228 }, + { 225, 246, 128, 228 }, + { 233, 251, 128, 228 }, +}; + +static const int vp8_mode_contexts[6][4] = { + { 7, 1, 1, 143 }, + { 14, 18, 14, 107 }, + { 135, 64, 57, 68 }, + { 60, 56, 128, 65 }, + { 159, 134, 128, 34 }, + { 234, 188, 128, 28 }, +}; + +static const uint8_t vp8_mbsplits[5][16] = { + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }, + { 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 }, + { 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3 }, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +}; + +static const uint8_t vp8_mbfirstidx[4][16] = { + { 0, 8 }, + { 0, 2 }, + { 0, 2, 8, 10 }, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } +}; + +static const uint8_t vp8_mbsplit_count[4] = { + 2, 2, 4, 16 +}; +static const uint8_t vp8_mbsplit_prob[3] = { + 110, 111, 150 +}; + +static const uint8_t vp7_submv_prob[3] = { + 180, 162, 25 +}; + +static const uint8_t vp8_submv_prob[5][3] = { + { 147, 136, 18 }, + { 106, 145, 1 }, + { 179, 121, 1 }, + { 223, 1, 34 }, + { 208, 1, 1 } +}; + +static const uint8_t vp8_pred16x16_prob_intra[4] = { + 145, 156, 163, 128 +}; +static const uint8_t vp8_pred16x16_prob_inter[4] = { + 112, 86, 140, 37 +}; + +static const int8_t vp8_pred4x4_tree[9][2] = { + { -DC_PRED, 1 }, // '0' + { -TM_VP8_PRED, 2 }, // '10' + { -VERT_PRED, 3 }, // '110' + { 4, 6 }, + { -HOR_PRED, 5 }, // '11100' + { -DIAG_DOWN_RIGHT_PRED, -VERT_RIGHT_PRED }, // '111010', '111011' + { -DIAG_DOWN_LEFT_PRED, 7 }, // '11110' + { -VERT_LEFT_PRED, 8 }, // '111110' + { -HOR_DOWN_PRED, -HOR_UP_PRED }, // '1111110', '1111111' +}; + +static const int8_t vp8_pred8x8c_tree[3][2] = { + { -DC_PRED8x8, 1 }, // '0' + { -VERT_PRED8x8, 2 }, // '10 + { -HOR_PRED8x8, -PLANE_PRED8x8 }, // '110', '111' +}; + +static const uint8_t vp8_pred8x8c_prob_intra[3] = { + 142, 114, 183 +}; +static const uint8_t vp8_pred8x8c_prob_inter[3] = { + 162, 101, 204 +}; +static const uint8_t vp8_pred4x4_prob_inter[9] = { + 120, 90, 79, 133, 87, 85, 80, 111, 151 +}; + +static const uint8_t vp8_pred4x4_prob_intra[10][10][9] = { + { + { 39, 53, 200, 87, 26, 21, 43, 232, 171 }, + { 56, 34, 51, 104, 114, 102, 29, 93, 77 }, + { 88, 88, 147, 150, 42, 46, 45, 196, 205 }, + { 107, 54, 32, 26, 51, 1, 81, 43, 31 }, + { 39, 28, 85, 171, 58, 165, 90, 98, 64 }, + { 34, 22, 116, 206, 23, 34, 43, 166, 73 }, + { 34, 19, 21, 102, 132, 188, 16, 76, 124 }, + { 68, 25, 106, 22, 64, 171, 36, 225, 114 }, + { 62, 18, 78, 95, 85, 57, 50, 48, 51 }, + { 43, 97, 183, 117, 85, 38, 35, 179, 61 }, + }, + { + { 112, 113, 77, 85, 179, 255, 38, 120, 114 }, + { 40, 42, 1, 196, 245, 209, 10, 25, 109 }, + { 193, 101, 35, 159, 215, 111, 89, 46, 111 }, + { 100, 80, 8, 43, 154, 1, 51, 26, 71 }, + { 88, 43, 29, 140, 166, 213, 37, 43, 154 }, + { 61, 63, 30, 155, 67, 45, 68, 1, 209 }, + { 41, 40, 5, 102, 211, 183, 4, 1, 221 }, + { 142, 78, 78, 16, 255, 128, 34, 197, 171 }, + { 51, 50, 17, 168, 209, 192, 23, 25, 82 }, + { 60, 148, 31, 172, 219, 228, 21, 18, 111 }, + }, + { + { 175, 69, 143, 80, 85, 82, 72, 155, 103 }, + { 56, 58, 10, 171, 218, 189, 17, 13, 152 }, + { 231, 120, 48, 89, 115, 113, 120, 152, 112 }, + { 144, 71, 10, 38, 171, 213, 144, 34, 26 }, + { 114, 26, 17, 163, 44, 195, 21, 10, 173 }, + { 121, 24, 80, 195, 26, 62, 44, 64, 85 }, + { 63, 20, 8, 114, 114, 208, 12, 9, 226 }, + { 170, 46, 55, 19, 136, 160, 33, 206, 71 }, + { 81, 40, 11, 96, 182, 84, 29, 16, 36 }, + { 152, 179, 64, 126, 170, 118, 46, 70, 95 }, + }, + { + { 75, 79, 123, 47, 51, 128, 81, 171, 1 }, + { 57, 17, 5, 71, 102, 57, 53, 41, 49 }, + { 125, 98, 42, 88, 104, 85, 117, 175, 82 }, + { 115, 21, 2, 10, 102, 255, 166, 23, 6 }, + { 38, 33, 13, 121, 57, 73, 26, 1, 85 }, + { 41, 10, 67, 138, 77, 110, 90, 47, 114 }, + { 57, 18, 10, 102, 102, 213, 34, 20, 43 }, + { 101, 29, 16, 10, 85, 128, 101, 196, 26 }, + { 117, 20, 15, 36, 163, 128, 68, 1, 26 }, + { 95, 84, 53, 89, 128, 100, 113, 101, 45 }, + }, + { + { 63, 59, 90, 180, 59, 166, 93, 73, 154 }, + { 40, 40, 21, 116, 143, 209, 34, 39, 175 }, + { 138, 31, 36, 171, 27, 166, 38, 44, 229 }, + { 57, 46, 22, 24, 128, 1, 54, 17, 37 }, + { 47, 15, 16, 183, 34, 223, 49, 45, 183 }, + { 46, 17, 33, 183, 6, 98, 15, 32, 183 }, + { 40, 3, 9, 115, 51, 192, 18, 6, 223 }, + { 65, 32, 73, 115, 28, 128, 23, 128, 205 }, + { 87, 37, 9, 115, 59, 77, 64, 21, 47 }, + { 67, 87, 58, 169, 82, 115, 26, 59, 179 }, + }, + { + { 54, 57, 112, 184, 5, 41, 38, 166, 213 }, + { 30, 34, 26, 133, 152, 116, 10, 32, 134 }, + { 104, 55, 44, 218, 9, 54, 53, 130, 226 }, + { 75, 32, 12, 51, 192, 255, 160, 43, 51 }, + { 39, 19, 53, 221, 26, 114, 32, 73, 255 }, + { 31, 9, 65, 234, 2, 15, 1, 118, 73 }, + { 56, 21, 23, 111, 59, 205, 45, 37, 192 }, + { 88, 31, 35, 67, 102, 85, 55, 186, 85 }, + { 55, 38, 70, 124, 73, 102, 1, 34, 98 }, + { 64, 90, 70, 205, 40, 41, 23, 26, 57 }, + }, + { + { 86, 40, 64, 135, 148, 224, 45, 183, 128 }, + { 22, 26, 17, 131, 240, 154, 14, 1, 209 }, + { 164, 50, 31, 137, 154, 133, 25, 35, 218 }, + { 83, 12, 13, 54, 192, 255, 68, 47, 28 }, + { 45, 16, 21, 91, 64, 222, 7, 1, 197 }, + { 56, 21, 39, 155, 60, 138, 23, 102, 213 }, + { 18, 11, 7, 63, 144, 171, 4, 4, 246 }, + { 85, 26, 85, 85, 128, 128, 32, 146, 171 }, + { 35, 27, 10, 146, 174, 171, 12, 26, 128 }, + { 51, 103, 44, 131, 131, 123, 31, 6, 158 }, + }, + { + { 68, 45, 128, 34, 1, 47, 11, 245, 171 }, + { 62, 17, 19, 70, 146, 85, 55, 62, 70 }, + { 102, 61, 71, 37, 34, 53, 31, 243, 192 }, + { 75, 15, 9, 9, 64, 255, 184, 119, 16 }, + { 37, 43, 37, 154, 100, 163, 85, 160, 1 }, + { 63, 9, 92, 136, 28, 64, 32, 201, 85 }, + { 56, 8, 17, 132, 137, 255, 55, 116, 128 }, + { 86, 6, 28, 5, 64, 255, 25, 248, 1 }, + { 58, 15, 20, 82, 135, 57, 26, 121, 40 }, + { 69, 60, 71, 38, 73, 119, 28, 222, 37 }, + }, + { + { 101, 75, 128, 139, 118, 146, 116, 128, 85 }, + { 56, 41, 15, 176, 236, 85, 37, 9, 62 }, + { 190, 80, 35, 99, 180, 80, 126, 54, 45 }, + { 146, 36, 19, 30, 171, 255, 97, 27, 20 }, + { 71, 30, 17, 119, 118, 255, 17, 18, 138 }, + { 101, 38, 60, 138, 55, 70, 43, 26, 142 }, + { 32, 41, 20, 117, 151, 142, 20, 21, 163 }, + { 138, 45, 61, 62, 219, 1, 81, 188, 64 }, + { 112, 19, 12, 61, 195, 128, 48, 4, 24 }, + { 85, 126, 47, 87, 176, 51, 41, 20, 32 }, + }, + { + { 66, 102, 167, 99, 74, 62, 40, 234, 128 }, + { 41, 53, 9, 178, 241, 141, 26, 8, 107 }, + { 134, 183, 89, 137, 98, 101, 106, 165, 148 }, + { 104, 79, 12, 27, 217, 255, 87, 17, 7 }, + { 74, 43, 26, 146, 73, 166, 49, 23, 157 }, + { 65, 38, 105, 160, 51, 52, 31, 115, 128 }, + { 47, 41, 14, 110, 182, 183, 21, 17, 194 }, + { 87, 68, 71, 44, 114, 51, 15, 186, 23 }, + { 66, 45, 25, 102, 197, 189, 23, 18, 22 }, + { 72, 187, 100, 130, 157, 111, 32, 75, 80 }, + }, +}; + +static const int8_t vp8_segmentid_tree[][2] = { + { 1, 2 }, + { -0, -1 }, // '00', '01' + { -2, -3 }, // '10', '11' +}; + +static const uint8_t vp8_coeff_band[16] = { + 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7 +}; + +/* Inverse of vp8_coeff_band: mappings of bands to coefficient indexes. + * Each list is -1-terminated. */ +static const int8_t vp8_coeff_band_indexes[8][10] = { + { 0, -1 }, + { 1, -1 }, + { 2, -1 }, + { 3, -1 }, + { 5, -1 }, + { 6, -1 }, + { 4, 7, 8, 9, 10, 11, 12, 13, 14, -1 }, + { 15, -1 } +}; + +static const uint8_t vp8_dct_cat1_prob[] = { + 159, 0 +}; +static const uint8_t vp8_dct_cat2_prob[] = { + 165, 145, 0 +}; +static const uint8_t vp8_dct_cat3_prob[] = { + 173, 148, 140, 0 +}; +static const uint8_t vp8_dct_cat4_prob[] = { + 176, 155, 140, 135, 0 +}; +static const uint8_t vp8_dct_cat5_prob[] = { + 180, 157, 141, 134, 130, 0 +}; +static const uint8_t vp8_dct_cat6_prob[] = { + 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 +}; + +// only used for cat3 and above; cat 1 and 2 are referenced directly +const uint8_t *const ff_vp8_dct_cat_prob[] = { + vp8_dct_cat3_prob, + vp8_dct_cat4_prob, + vp8_dct_cat5_prob, + vp8_dct_cat6_prob, +}; + +static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = { + { + { + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + { + { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, + { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, + { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 }, + }, + { + { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, + { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, + { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, + }, + { + { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, + { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, + { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, + }, + { + { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, + { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, + { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 }, + }, + { + { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, + { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, + { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 }, + }, + { + { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, + { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, + { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 }, + }, + { + { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + }, + { + { + { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, + { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, + { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 }, + }, + { + { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, + { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, + { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 }, + }, + { + { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, + { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, + { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 }, + }, + { + { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, + { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, + { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 }, + }, + { + { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, + { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, + { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 }, + }, + { + { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, + { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, + { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 }, + }, + { + { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, + { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, + { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 }, + }, + { + { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, + { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, + { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }, + }, + }, + { + { + { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, + { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, + { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }, + }, + { + { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, + { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, + { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 }, + }, + { + { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, + { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, + { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 }, + }, + { + { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, + { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, + { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, + }, + { + { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, + { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, + { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + { + { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + { + { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, + { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, + { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + { + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + }, + { + { + { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, + { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, + { 61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128 }, + }, + { + { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, + { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, + { 39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128 }, + }, + { + { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, + { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, + { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }, + }, + { + { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, + { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, + { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 }, + }, + { + { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, + { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, + { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }, + }, + { + { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, + { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, + { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }, + }, + { + { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, + { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, + { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }, + }, + { + { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, + }, +}; + +static const uint8_t vp8_token_update_probs[4][8][3][NUM_DCT_TOKENS - 1] = { + { + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, + { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 }, + }, + { + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, + { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, +}; + +static const uint8_t vp8_dc_qlookup[VP8_MAX_QUANT + 1] = { + 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17, + 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 91, 93, 95, 96, 98, 100, 101, 102, 104, 106, 108, 110, 112, 114, 116, 118, + 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 143, 145, 148, 151, 154, 157, +}; + +static const uint16_t vp8_ac_qlookup[VP8_MAX_QUANT + 1] = { + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, + 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, + 110, 112, 114, 116, 119, 122, 125, 128, 131, 134, 137, 140, 143, 146, 149, 152, + 155, 158, 161, 164, 167, 170, 173, 177, 181, 185, 189, 193, 197, 201, 205, 209, + 213, 217, 221, 225, 229, 234, 239, 245, 249, 254, 259, 264, 269, 274, 279, 284, +}; + +static const uint8_t vp8_mv_update_prob[2][19] = { + { 237, + 246, + 253, 253, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 250, 250, 252, /* VP8 only: */ 254, 254 }, + { 231, + 243, + 245, 253, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 251, 251, 254, /* VP8 only: */ 254, 254 } +}; + +static const uint8_t vp7_mv_default_prob[2][17] = { + { 162, + 128, + 225, 146, 172, 147, 214, 39, 156, + 247, 210, 135, 68, 138, 220, 239, 246 }, + { 164, + 128, + 204, 170, 119, 235, 140, 230, 228, + 244, 184, 201, 44, 173, 221, 239, 253 } +}; + +static const uint8_t vp8_mv_default_prob[2][19] = { + { 162, + 128, + 225, 146, 172, 147, 214, 39, 156, + 128, 129, 132, 75, 145, 178, 206, 239, 254, 254 }, + { 164, + 128, + 204, 170, 119, 235, 140, 230, 228, + 128, 130, 130, 74, 148, 180, 203, 236, 254, 254 } +}; + +static const uint8_t vp7_feature_value_size[2][4] = { + { 7, 6, 0, 8 }, + { 7, 6, 0, 5 }, +}; + +static const int8_t vp7_feature_index_tree[4][2] = +{ + { 1, 2 }, + { -0, -1 }, // '00', '01' + { -2, -3 }, // '10', '11' +}; + +static const uint16_t vp7_ydc_qlookup[] = { + 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, + 41, 42, 43, 43, 44, 45, 45, 46, 47, 48, 48, 49, 50, 51, 52, + 53, 53, 54, 56, 57, 58, 59, 60, 62, 63, 65, 66, 68, 70, 72, + 74, 76, 79, 81, 84, 87, 90, 93, 96, 100, 104, 108, 112, 116, 121, + 126, 131, 136, 142, 148, 154, 160, 167, 174, 182, 189, 198, 206, 215, 224, + 234, 244, 254, 265, 277, 288, 301, 313, 327, 340, 355, 370, 385, 401, 417, + 434, 452, 470, 489, 509, 529, 550, 572, +}; + +static const uint16_t vp7_yac_qlookup[] = { + 4, 4, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 15, + 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, + 37, 38, 40, 41, 42, 44, 45, 46, 48, 49, 50, 51, 53, 54, + 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, + 72, 73, 75, 76, 78, 80, 82, 84, 86, 88, 91, 93, 96, 99, + 102, 105, 109, 112, 116, 121, 125, 130, 135, 140, 146, 152, 158, 165, + 172, 180, 188, 196, 205, 214, 224, 234, 245, 256, 268, 281, 294, 308, + 322, 337, 353, 369, 386, 404, 423, 443, 463, 484, 506, 529, 553, 578, + 604, 631, 659, 688, 718, 749, 781, 814, 849, 885, 922, 960, 1000, 1041, + 1083, 1127, +}; + +static const uint16_t vp7_y2dc_qlookup[] = { + 7, 9, 11, 13, 15, 17, 19, 21, 23, 26, 28, 30, 33, 35, + 37, 39, 42, 44, 46, 48, 51, 53, 55, 57, 59, 61, 63, 65, + 67, 69, 70, 72, 74, 75, 77, 78, 80, 81, 83, 84, 85, 87, + 88, 89, 90, 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, 104, + 105, 106, 108, 109, 111, 113, 114, 116, 118, 120, 123, 125, 128, 131, + 134, 137, 140, 144, 148, 152, 156, 161, 166, 171, 176, 182, 188, 195, + 202, 209, 217, 225, 234, 243, 253, 263, 274, 285, 297, 309, 322, 336, + 350, 365, 381, 397, 414, 432, 450, 470, 490, 511, 533, 556, 579, 604, + 630, 656, 684, 713, 742, 773, 805, 838, 873, 908, 945, 983, 1022, 1063, + 1105, 1148, +}; + +static const uint16_t vp7_y2ac_qlookup[] = { + 7, 9, 11, 13, 16, 18, 21, 24, 26, 29, 32, 35, + 38, 41, 43, 46, 49, 52, 55, 58, 61, 64, 66, 69, + 72, 74, 77, 79, 82, 84, 86, 88, 91, 93, 95, 97, + 98, 100, 102, 104, 105, 107, 109, 110, 112, 113, 115, 116, + 117, 119, 120, 122, 123, 125, 127, 128, 130, 132, 134, 136, + 138, 141, 143, 146, 149, 152, 155, 158, 162, 166, 171, 175, + 180, 185, 191, 197, 204, 210, 218, 226, 234, 243, 252, 262, + 273, 284, 295, 308, 321, 335, 350, 365, 381, 398, 416, 435, + 455, 476, 497, 520, 544, 569, 595, 622, 650, 680, 711, 743, + 776, 811, 848, 885, 925, 965, 1008, 1052, 1097, 1144, 1193, 1244, + 1297, 1351, 1407, 1466, 1526, 1588, 1652, 1719, +}; + +#endif /* AVCODEC_VP8DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8dsp.h new file mode 100644 index 00000000..cfe1524b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp8dsp.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2010 David Conrad + * Copyright (C) 2010 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * VP8 compatible video decoder + */ + +#ifndef AVCODEC_VP8DSP_H +#define AVCODEC_VP8DSP_H + +#include +#include + +typedef void (*vp8_mc_func)(uint8_t *dst /* align 8 */, ptrdiff_t dstStride, + uint8_t *src /* align 1 */, ptrdiff_t srcStride, + int h, int x, int y); + +typedef struct VP8DSPContext { + void (*vp8_luma_dc_wht)(int16_t block[4][4][16], int16_t dc[16]); + void (*vp8_luma_dc_wht_dc)(int16_t block[4][4][16], int16_t dc[16]); + void (*vp8_idct_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride); + void (*vp8_idct_dc_add)(uint8_t *dst, int16_t block[16], ptrdiff_t stride); + void (*vp8_idct_dc_add4y)(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); + void (*vp8_idct_dc_add4uv)(uint8_t *dst, int16_t block[4][16], + ptrdiff_t stride); + + // loop filter applied to edges between macroblocks + void (*vp8_v_loop_filter16y)(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_h_loop_filter16y)(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_v_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_h_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + + // loop filter applied to inner macroblock edges + void (*vp8_v_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_h_loop_filter16y_inner)(uint8_t *dst, ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_v_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, + ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + void (*vp8_h_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, + ptrdiff_t stride, + int flim_E, int flim_I, int hev_thresh); + + void (*vp8_v_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim); + void (*vp8_h_loop_filter_simple)(uint8_t *dst, ptrdiff_t stride, int flim); + + /** + * first dimension: 4-log2(width) + * second dimension: 0 if no vertical interpolation is needed; + * 1 4-tap vertical interpolation filter (my & 1) + * 2 6-tap vertical interpolation filter (!(my & 1)) + * third dimension: same as second dimension, for horizontal interpolation + * so something like put_vp8_epel_pixels_tab[4-log2(width)][2*!!my-(my&1)][2*!!mx-(mx&1)](..., mx, my) + */ + vp8_mc_func put_vp8_epel_pixels_tab[3][3][3]; + vp8_mc_func put_vp8_bilinear_pixels_tab[3][3][3]; +} VP8DSPContext; + +void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); +void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); +void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, + int h, int x, int y); + +void ff_vp7dsp_init(VP8DSPContext *c); + +void ff_vp78dsp_init(VP8DSPContext *c); +void ff_vp78dsp_init_aarch64(VP8DSPContext *c); +void ff_vp78dsp_init_arm(VP8DSPContext *c); +void ff_vp78dsp_init_ppc(VP8DSPContext *c); +void ff_vp78dsp_init_x86(VP8DSPContext *c); + +void ff_vp8dsp_init(VP8DSPContext *c); +void ff_vp8dsp_init_aarch64(VP8DSPContext *c); +void ff_vp8dsp_init_arm(VP8DSPContext *c); +void ff_vp8dsp_init_x86(VP8DSPContext *c); +void ff_vp8dsp_init_mips(VP8DSPContext *c); + +#define IS_VP7 1 +#define IS_VP8 0 + +#endif /* AVCODEC_VP8DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9.h new file mode 100644 index 00000000..c8d07ad9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9.h @@ -0,0 +1,73 @@ +/* + * VP9 compatible video decoder + * + * Copyright (C) 2013 Ronald S. Bultje + * Copyright (C) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP9_H +#define AVCODEC_VP9_H + +enum TxfmMode { + TX_4X4, + TX_8X8, + TX_16X16, + TX_32X32, + N_TXFM_SIZES, + TX_SWITCHABLE = N_TXFM_SIZES, + N_TXFM_MODES +}; + +enum TxfmType { + DCT_DCT, + DCT_ADST, + ADST_DCT, + ADST_ADST, + N_TXFM_TYPES +}; + +enum IntraPredMode { + VERT_PRED, + HOR_PRED, + DC_PRED, + DIAG_DOWN_LEFT_PRED, + DIAG_DOWN_RIGHT_PRED, + VERT_RIGHT_PRED, + HOR_DOWN_PRED, + VERT_LEFT_PRED, + HOR_UP_PRED, + TM_VP8_PRED, + LEFT_DC_PRED, + TOP_DC_PRED, + DC_128_PRED, + DC_127_PRED, + DC_129_PRED, + N_INTRA_PRED_MODES +}; + +enum FilterMode { + FILTER_8TAP_SMOOTH, + FILTER_8TAP_REGULAR, + FILTER_8TAP_SHARP, + FILTER_BILINEAR, + N_FILTERS, + FILTER_SWITCHABLE = N_FILTERS, +}; + +#endif /* AVCODEC_VP9_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9data.h new file mode 100644 index 00000000..086dbdec --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9data.h @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2013 Ronald S. Bultje + * Copyright (C) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP9DATA_H +#define AVCODEC_VP9DATA_H + +#include + +#include "vp9dec.h" + +extern const uint8_t ff_vp9_bwh_tab[2][N_BS_SIZES][2]; +extern const int8_t ff_vp9_partition_tree[3][2]; +extern const uint8_t ff_vp9_default_kf_partition_probs[4][4][3]; +extern const int8_t ff_vp9_segmentation_tree[7][2]; +extern const int8_t ff_vp9_intramode_tree[9][2]; +extern const uint8_t ff_vp9_default_kf_ymode_probs[10][10][9]; +extern const uint8_t ff_vp9_default_kf_uvmode_probs[10][9]; +extern const int8_t ff_vp9_inter_mode_tree[3][2]; +extern const int8_t ff_vp9_filter_tree[2][2]; +extern const enum FilterMode ff_vp9_filter_lut[3]; +extern const int16_t ff_vp9_dc_qlookup[3][256]; +extern const int16_t ff_vp9_ac_qlookup[3][256]; +extern const enum TxfmType ff_vp9_intra_txfm_type[14]; +extern const int16_t ff_vp9_default_scan_4x4[16]; +extern const int16_t ff_vp9_col_scan_4x4[16]; +extern const int16_t ff_vp9_row_scan_4x4[16]; +extern const int16_t ff_vp9_default_scan_8x8[64]; +extern const int16_t ff_vp9_col_scan_8x8[64]; +extern const int16_t ff_vp9_row_scan_8x8[64]; +extern const int16_t ff_vp9_default_scan_16x16[256]; +extern const int16_t ff_vp9_col_scan_16x16[256]; +extern const int16_t ff_vp9_row_scan_16x16[256]; +extern const int16_t ff_vp9_default_scan_32x32[1024]; +extern const int16_t * const ff_vp9_scans[5][4]; +extern const int16_t ff_vp9_default_scan_4x4_nb[16][2]; +extern const int16_t ff_vp9_col_scan_4x4_nb[16][2]; +extern const int16_t ff_vp9_row_scan_4x4_nb[16][2]; +extern const int16_t ff_vp9_default_scan_8x8_nb[64][2]; +extern const int16_t ff_vp9_col_scan_8x8_nb[64][2]; +extern const int16_t ff_vp9_row_scan_8x8_nb[64][2]; +extern const int16_t ff_vp9_default_scan_16x16_nb[256][2]; +extern const int16_t ff_vp9_col_scan_16x16_nb[256][2]; +extern const int16_t ff_vp9_row_scan_16x16_nb[256][2]; +extern const int16_t ff_vp9_default_scan_32x32_nb[1024][2]; +extern const int16_t (* const ff_vp9_scans_nb[5][4])[2]; +extern const uint8_t ff_vp9_model_pareto8[256][8]; +extern const ProbContext ff_vp9_default_probs; +extern const uint8_t ff_vp9_default_coef_probs[4][2][2][6][6][3]; +extern const int8_t ff_vp9_mv_joint_tree[3][2]; +extern const int8_t ff_vp9_mv_class_tree[10][2]; +extern const int8_t ff_vp9_mv_fp_tree[3][2]; + +#endif /* AVCODEC_VP9DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dec.h new file mode 100644 index 00000000..cc2440b8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dec.h @@ -0,0 +1,256 @@ +/* + * VP9 compatible video decoder + * + * Copyright (C) 2013 Ronald S. Bultje + * Copyright (C) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP9DEC_H +#define AVCODEC_VP9DEC_H + +#include +#include +#include + +#include "libavutil/buffer.h" +#include "libavutil/thread.h" +#include "libavutil/internal.h" + +#include "vp9.h" +#include "vp9dsp.h" +#include "vp9shared.h" + +#define REF_INVALID_SCALE 0xFFFF + +enum MVJoint { + MV_JOINT_ZERO, + MV_JOINT_H, + MV_JOINT_V, + MV_JOINT_HV, +}; + +typedef struct ProbContext { + uint8_t y_mode[4][9]; + uint8_t uv_mode[10][9]; + uint8_t filter[4][2]; + uint8_t mv_mode[7][3]; + uint8_t intra[4]; + uint8_t comp[5]; + uint8_t single_ref[5][2]; + uint8_t comp_ref[5]; + uint8_t tx32p[2][3]; + uint8_t tx16p[2][2]; + uint8_t tx8p[2]; + uint8_t skip[3]; + uint8_t mv_joint[3]; + struct { + uint8_t sign; + uint8_t classes[10]; + uint8_t class0; + uint8_t bits[10]; + uint8_t class0_fp[2][3]; + uint8_t fp[3]; + uint8_t class0_hp; + uint8_t hp; + } mv_comp[2]; + uint8_t partition[4][4][3]; +} ProbContext; + +typedef struct VP9Filter { + uint8_t level[8 * 8]; + uint8_t /* bit=col */ mask[2 /* 0=y, 1=uv */][2 /* 0=col, 1=row */] + [8 /* rows */][4 /* 0=16, 1=8, 2=4, 3=inner4 */]; +} VP9Filter; + +typedef struct VP9Block { + uint8_t seg_id, intra, comp, ref[2], mode[4], uvmode, skip; + enum FilterMode filter; + VP56mv mv[4 /* b_idx */][2 /* ref */]; + enum BlockSize bs; + enum TxfmMode tx, uvtx; + enum BlockLevel bl; + enum BlockPartition bp; +} VP9Block; + +typedef struct VP9TileData VP9TileData; + +typedef struct VP9Context { + VP9SharedContext s; + VP9TileData *td; + + VP9DSPContext dsp; + VideoDSPContext vdsp; + GetBitContext gb; + VP56RangeCoder c; + int pass, active_tile_cols; + +#if HAVE_THREADS + pthread_mutex_t progress_mutex; + pthread_cond_t progress_cond; + atomic_int *entries; +#endif + + uint8_t ss_h, ss_v; + uint8_t last_bpp, bpp_index, bytesperpixel; + uint8_t last_keyframe; + // sb_cols/rows, rows/cols and last_fmt are used for allocating all internal + // arrays, and are thus per-thread. w/h and gf_fmt are synced between threads + // and are therefore per-stream. pix_fmt represents the value in the header + // of the currently processed frame. + int w, h; + enum AVPixelFormat pix_fmt, last_fmt, gf_fmt; + unsigned sb_cols, sb_rows, rows, cols; + ThreadFrame next_refs[8]; + + struct { + uint8_t lim_lut[64]; + uint8_t mblim_lut[64]; + } filter_lut; + struct { + ProbContext p; + uint8_t coef[4][2][2][6][6][3]; + } prob_ctx[4]; + struct { + ProbContext p; + uint8_t coef[4][2][2][6][6][11]; + } prob; + + // contextual (above) cache + uint8_t *above_partition_ctx; + uint8_t *above_mode_ctx; + // FIXME maybe merge some of the below in a flags field? + uint8_t *above_y_nnz_ctx; + uint8_t *above_uv_nnz_ctx[2]; + uint8_t *above_skip_ctx; // 1bit + uint8_t *above_txfm_ctx; // 2bit + uint8_t *above_segpred_ctx; // 1bit + uint8_t *above_intra_ctx; // 1bit + uint8_t *above_comp_ctx; // 1bit + uint8_t *above_ref_ctx; // 2bit + uint8_t *above_filter_ctx; + VP56mv (*above_mv_ctx)[2]; + + // whole-frame cache + uint8_t *intra_pred_data[3]; + VP9Filter *lflvl; + + // block reconstruction intermediates + int block_alloc_using_2pass; + uint16_t mvscale[3][2]; + uint8_t mvstep[3][2]; + + // frame specific buffer pools + AVBufferPool *frame_extradata_pool; + int frame_extradata_pool_size; +} VP9Context; + +struct VP9TileData { + //VP9Context should be const, but because of the threading API(generates + //a lot of warnings) it's not. + VP9Context *s; + VP56RangeCoder *c_b; + VP56RangeCoder *c; + int row, row7, col, col7; + uint8_t *dst[3]; + ptrdiff_t y_stride, uv_stride; + VP9Block *b_base, *b; + unsigned tile_col_start; + + struct { + unsigned y_mode[4][10]; + unsigned uv_mode[10][10]; + unsigned filter[4][3]; + unsigned mv_mode[7][4]; + unsigned intra[4][2]; + unsigned comp[5][2]; + unsigned single_ref[5][2][2]; + unsigned comp_ref[5][2]; + unsigned tx32p[2][4]; + unsigned tx16p[2][3]; + unsigned tx8p[2][2]; + unsigned skip[3][2]; + unsigned mv_joint[4]; + struct { + unsigned sign[2]; + unsigned classes[11]; + unsigned class0[2]; + unsigned bits[10][2]; + unsigned class0_fp[2][4]; + unsigned fp[4]; + unsigned class0_hp[2]; + unsigned hp[2]; + } mv_comp[2]; + unsigned partition[4][4][4]; + unsigned coef[4][2][2][6][6][3]; + unsigned eob[4][2][2][6][6][2]; + } counts; + + // whole-frame cache + DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[135 * 144 * 2]; + + // contextual (left) cache + DECLARE_ALIGNED(16, uint8_t, left_y_nnz_ctx)[16]; + DECLARE_ALIGNED(16, uint8_t, left_mode_ctx)[16]; + DECLARE_ALIGNED(16, VP56mv, left_mv_ctx)[16][2]; + DECLARE_ALIGNED(16, uint8_t, left_uv_nnz_ctx)[2][16]; + DECLARE_ALIGNED(8, uint8_t, left_partition_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_skip_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_txfm_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_segpred_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_intra_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_comp_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_ref_ctx)[8]; + DECLARE_ALIGNED(8, uint8_t, left_filter_ctx)[8]; + // block reconstruction intermediates + DECLARE_ALIGNED(32, uint8_t, tmp_y)[64 * 64 * 2]; + DECLARE_ALIGNED(32, uint8_t, tmp_uv)[2][64 * 64 * 2]; + struct { int x, y; } min_mv, max_mv; + int16_t *block_base, *block, *uvblock_base[2], *uvblock[2]; + uint8_t *eob_base, *uveob_base[2], *eob, *uveob[2]; + + // error message + int error_info; + struct { + unsigned int row:13; + unsigned int col:13; + unsigned int block_size_idx_x:2; + unsigned int block_size_idx_y:2; + } *block_structure; + unsigned int nb_block_structure; +}; + +void ff_vp9_fill_mv(VP9TileData *td, VP56mv *mv, int mode, int sb); + +void ff_vp9_adapt_probs(VP9Context *s); + +void ff_vp9_decode_block(VP9TileData *td, int row, int col, + VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, + enum BlockLevel bl, enum BlockPartition bp); + +void ff_vp9_loopfilter_sb(AVCodecContext *avctx, VP9Filter *lflvl, + int row, int col, ptrdiff_t yoff, ptrdiff_t uvoff); + +void ff_vp9_intra_recon_8bpp(VP9TileData *td, + ptrdiff_t y_off, ptrdiff_t uv_off); +void ff_vp9_intra_recon_16bpp(VP9TileData *td, + ptrdiff_t y_off, ptrdiff_t uv_off); +void ff_vp9_inter_recon_8bpp(VP9TileData *td); +void ff_vp9_inter_recon_16bpp(VP9TileData *td); + +#endif /* AVCODEC_VP9DEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dsp.h new file mode 100644 index 00000000..e2256316 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9dsp.h @@ -0,0 +1,136 @@ +/* + * VP9 compatible video decoder + * + * Copyright (C) 2013 Ronald S. Bultje + * Copyright (C) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP9DSP_H +#define AVCODEC_VP9DSP_H + +#include +#include + +#include "libavcodec/vp9.h" + +typedef void (*vp9_mc_func)(uint8_t *dst, ptrdiff_t dst_stride, + const uint8_t *ref, ptrdiff_t ref_stride, + int h, int mx, int my); +typedef void (*vp9_scaled_mc_func)(uint8_t *dst, ptrdiff_t dst_stride, + const uint8_t *ref, ptrdiff_t ref_stride, + int h, int mx, int my, int dx, int dy); + +typedef struct VP9DSPContext { + /* + * dimension 1: 0=4x4, 1=8x8, 2=16x16, 3=32x32 + * dimension 2: intra prediction modes + * + * dst/left/top is aligned by transform-size (i.e. 4, 8, 16 or 32 pixels) + * stride is aligned by 16 pixels + * top[-1] is top/left; top[4,7] is top-right for 4x4 + */ + // FIXME(rbultje) maybe replace left/top pointers with HAVE_TOP/ + // HAVE_LEFT/HAVE_TOPRIGHT flags instead, and then handle it in-place? + // also needs to fit in with what H.264/VP8/etc do + void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst, + ptrdiff_t stride, + const uint8_t *left, + const uint8_t *top); + + /* + * dimension 1: 0=4x4, 1=8x8, 2=16x16, 3=32x32, 4=lossless (3-4=dct only) + * dimension 2: 0=dct/dct, 1=dct/adst, 2=adst/dct, 3=adst/adst + * + * dst is aligned by transform-size (i.e. 4, 8, 16 or 32 pixels) + * stride is aligned by 16 pixels + * block is 16-byte aligned + * eob indicates the position (+1) of the last non-zero coefficient, + * in scan-order. This can be used to write faster versions, e.g. a + * dc-only 4x4/8x8/16x16/32x32, or a 4x4-only (eob<10) 8x8/16x16/32x32, + * etc. + */ + // FIXME also write idct_add_block() versions for whole (inter) pred + // blocks, so we can do 2 4x4s at once + void (*itxfm_add[N_TXFM_SIZES + 1][N_TXFM_TYPES])(uint8_t *dst, + ptrdiff_t stride, + int16_t *block, int eob); + + /* + * dimension 1: width of filter (0=4, 1=8, 2=16) + * dimension 2: 0=col-edge filter (h), 1=row-edge filter (v) + * + * dst/stride are aligned by 8 + */ + void (*loop_filter_8[3][2])(uint8_t *dst, ptrdiff_t stride, + int mb_lim, int lim, int hev_thr); + + /* + * dimension 1: 0=col-edge filter (h), 1=row-edge filter (v) + * + * The width of filter is assumed to be 16; dst/stride are aligned by 16 + */ + void (*loop_filter_16[2])(uint8_t *dst, ptrdiff_t stride, + int mb_lim, int lim, int hev_thr); + + /* + * dimension 1/2: width of filter (0=4, 1=8) for each filter half + * dimension 3: 0=col-edge filter (h), 1=row-edge filter (v) + * + * dst/stride are aligned by operation size + * this basically calls loop_filter[d1][d3][0](), followed by + * loop_filter[d2][d3][0]() on the next 8 pixels + * mb_lim/lim/hev_thr contain two values in the lowest two bytes of the + * integer. + */ + // FIXME perhaps a mix4 that operates on 32px (for AVX2) + void (*loop_filter_mix2[2][2][2])(uint8_t *dst, ptrdiff_t stride, + int mb_lim, int lim, int hev_thr); + + /* + * dimension 1: hsize (0: 64, 1: 32, 2: 16, 3: 8, 4: 4) + * dimension 2: filter type (0: smooth, 1: regular, 2: sharp, 3: bilin) + * dimension 3: averaging type (0: put, 1: avg) + * dimension 4: x subpel interpolation (0: none, 1: 8tap/bilin) + * dimension 5: y subpel interpolation (0: none, 1: 8tap/bilin) + * + * dst/stride are aligned by hsize + */ + vp9_mc_func mc[5][N_FILTERS][2][2][2]; + + /* + * for scalable MC, first 3 dimensions identical to above, the other two + * don't exist since it changes per stepsize. + */ + vp9_scaled_mc_func smc[5][N_FILTERS][2]; +} VP9DSPContext; + +extern const int16_t ff_vp9_subpel_filters[3][16][8]; + +void ff_vp9dsp_init(VP9DSPContext *dsp, int bpp, int bitexact); + +void ff_vp9dsp_init_8(VP9DSPContext *dsp); +void ff_vp9dsp_init_10(VP9DSPContext *dsp); +void ff_vp9dsp_init_12(VP9DSPContext *dsp); + +void ff_vp9dsp_init_aarch64(VP9DSPContext *dsp, int bpp); +void ff_vp9dsp_init_arm(VP9DSPContext *dsp, int bpp); +void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact); +void ff_vp9dsp_init_mips(VP9DSPContext *dsp, int bpp); + +#endif /* AVCODEC_VP9DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9shared.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9shared.h new file mode 100644 index 00000000..54726df7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vp9shared.h @@ -0,0 +1,169 @@ +/* + * VP9 compatible video decoder + * + * Copyright (C) 2013 Ronald S. Bultje + * Copyright (C) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VP9SHARED_H +#define AVCODEC_VP9SHARED_H + +#include +#include + +#include "vp9.h" +#include "thread.h" +#include "vp56.h" + +enum BlockPartition { + PARTITION_NONE, // [ ] <-. + PARTITION_H, // [-] | + PARTITION_V, // [|] | + PARTITION_SPLIT, // [+] --' +}; + +enum InterPredMode { + NEARESTMV = 10, + NEARMV = 11, + ZEROMV = 12, + NEWMV = 13, +}; + +enum CompPredMode { + PRED_SINGLEREF, + PRED_COMPREF, + PRED_SWITCHABLE, +}; + +typedef struct VP9mvrefPair { + VP56mv mv[2]; + int8_t ref[2]; +} VP9mvrefPair; + +typedef struct VP9Frame { + ThreadFrame tf; + AVBufferRef *extradata; + uint8_t *segmentation_map; + VP9mvrefPair *mv; + int uses_2pass; + + AVBufferRef *hwaccel_priv_buf; + void *hwaccel_picture_private; +} VP9Frame; + +enum BlockLevel { + BL_64X64, + BL_32X32, + BL_16X16, + BL_8X8, +}; + +enum BlockSize { + BS_64x64, + BS_64x32, + BS_32x64, + BS_32x32, + BS_32x16, + BS_16x32, + BS_16x16, + BS_16x8, + BS_8x16, + BS_8x8, + BS_8x4, + BS_4x8, + BS_4x4, + N_BS_SIZES, +}; + +typedef struct VP9BitstreamHeader { + // bitstream header + uint8_t profile; + uint8_t bpp; + uint8_t keyframe; + uint8_t invisible; + uint8_t errorres; + uint8_t intraonly; + uint8_t resetctx; + uint8_t refreshrefmask; + uint8_t highprecisionmvs; + enum FilterMode filtermode; + uint8_t allowcompinter; + uint8_t refreshctx; + uint8_t parallelmode; + uint8_t framectxid; + uint8_t use_last_frame_mvs; + uint8_t refidx[3]; + uint8_t signbias[3]; + uint8_t fixcompref; + uint8_t varcompref[2]; + struct { + uint8_t level; + int8_t sharpness; + } filter; + struct { + uint8_t enabled; + uint8_t updated; + int8_t mode[2]; + int8_t ref[4]; + } lf_delta; + uint8_t yac_qi; + int8_t ydc_qdelta, uvdc_qdelta, uvac_qdelta; + uint8_t lossless; +#define MAX_SEGMENT 8 + struct { + uint8_t enabled; + uint8_t temporal; + uint8_t absolute_vals; + uint8_t update_map; + uint8_t prob[7]; + uint8_t pred_prob[3]; + struct { + uint8_t q_enabled; + uint8_t lf_enabled; + uint8_t ref_enabled; + uint8_t skip_enabled; + uint8_t ref_val; + int16_t q_val; + int8_t lf_val; + int16_t qmul[2][2]; + uint8_t lflvl[4][2]; + } feat[MAX_SEGMENT]; + } segmentation; + enum TxfmMode txfmmode; + enum CompPredMode comppredmode; + struct { + unsigned log2_tile_cols, log2_tile_rows; + unsigned tile_cols, tile_rows; + } tiling; + + int uncompressed_header_size; + int compressed_header_size; +} VP9BitstreamHeader; + +typedef struct VP9SharedContext { + VP9BitstreamHeader h; + + ThreadFrame refs[8]; +#define CUR_FRAME 0 +#define REF_FRAME_MVPAIR 1 +#define REF_FRAME_SEGMAP 2 + VP9Frame frames[3]; +} VP9SharedContext; + +#endif /* AVCODEC_VP9SHARED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vt_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vt_internal.h new file mode 100644 index 00000000..fb64735b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/vt_internal.h @@ -0,0 +1,58 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_VT_INTERNAL_H +#define AVCODEC_VT_INTERNAL_H + +typedef struct VTContext { + // The current bitstream buffer. + uint8_t *bitstream; + + // The current size of the bitstream. + int bitstream_size; + + // The reference size used for fast reallocation. + int allocated_size; + + // The core video buffer + CVImageBufferRef frame; + + // Current dummy frames context (depends on exact CVImageBufferRef params). + struct AVBufferRef *cached_hw_frames_ctx; + + // Non-NULL if the new hwaccel API is used. This is only a separate struct + // to ease compatibility with the old API. + struct AVVideotoolboxContext *vt_ctx; + + // Current H264 parameters (used to trigger decoder restart on SPS changes). + uint8_t sps[3]; + bool reconfig_needed; +} VTContext; + +int ff_videotoolbox_alloc_frame(AVCodecContext *avctx, AVFrame *frame); +int ff_videotoolbox_uninit(AVCodecContext *avctx); +int ff_videotoolbox_h264_start_frame(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size); +int ff_videotoolbox_h264_decode_slice(AVCodecContext *avctx, + const uint8_t *buffer, + uint32_t size); +CFDataRef ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx); +CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx); + +#endif /* AVCODEC_VT_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpack.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpack.h new file mode 100644 index 00000000..43aaac81 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpack.h @@ -0,0 +1,198 @@ +/* + * WavPack decoder/encoder common code + * Copyright (c) 2006,2011 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WAVPACK_H +#define AVCODEC_WAVPACK_H + +#include "libavutil/common.h" + +#define MAX_TERMS 16 +#define MAX_TERM 8 + +#define WV_HEADER_SIZE 32 + +#define WV_MONO 0x00000004 +#define WV_JOINT_STEREO 0x00000010 +#define WV_CROSS_DECORR 0x00000020 +#define WV_FLOAT_DATA 0x00000080 +#define WV_INT32_DATA 0x00000100 +#define WV_FALSE_STEREO 0x40000000 +#define WV_DSD_DATA 0x80000000 + +#define WV_HYBRID_MODE 0x00000008 +#define WV_HYBRID_SHAPE 0x00000008 +#define WV_HYBRID_BITRATE 0x00000200 +#define WV_HYBRID_BALANCE 0x00000400 +#define WV_INITIAL_BLOCK 0x00000800 +#define WV_FINAL_BLOCK 0x00001000 + +#define WV_MONO_DATA (WV_MONO | WV_FALSE_STEREO) + +#define WV_SINGLE_BLOCK (WV_INITIAL_BLOCK | WV_FINAL_BLOCK) + +#define WV_FLT_SHIFT_ONES 0x01 +#define WV_FLT_SHIFT_SAME 0x02 +#define WV_FLT_SHIFT_SENT 0x04 +#define WV_FLT_ZERO_SENT 0x08 +#define WV_FLT_ZERO_SIGN 0x10 + +#define WV_MAX_SAMPLES 150000 + +enum WP_ID_Flags { + WP_IDF_MASK = 0x3F, + WP_IDF_IGNORE = 0x20, + WP_IDF_ODD = 0x40, + WP_IDF_LONG = 0x80 +}; + +enum WP_ID { + WP_ID_DUMMY = 0, + WP_ID_ENCINFO, + WP_ID_DECTERMS, + WP_ID_DECWEIGHTS, + WP_ID_DECSAMPLES, + WP_ID_ENTROPY, + WP_ID_HYBRID, + WP_ID_SHAPING, + WP_ID_FLOATINFO, + WP_ID_INT32INFO, + WP_ID_DATA, + WP_ID_CORR, + WP_ID_EXTRABITS, + WP_ID_CHANINFO, + WP_ID_DSD_DATA, + WP_ID_SAMPLE_RATE = 0x27, +}; + +typedef struct Decorr { + int delta; + int value; + int weightA; + int weightB; + int samplesA[MAX_TERM]; + int samplesB[MAX_TERM]; + int sumA; + int sumB; +} Decorr; + +typedef struct WvChannel { + int median[3]; + int slow_level, error_limit; + unsigned bitrate_acc, bitrate_delta; +} WvChannel; + +// macros for manipulating median values +#define GET_MED(n) ((c->median[n] >> 4) + 1) +#define DEC_MED(n) c->median[n] -= ((int)(c->median[n] + (128U >> (n)) - 2) / (128 >> (n))) * 2U +#define INC_MED(n) c->median[n] += ((int)(c->median[n] + (128U >> (n)) ) / (128 >> (n))) * 5U + +// macros for applying weight +#define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \ + if ((samples) && (in)) { \ + if (((samples) ^ (in)) < 0) { \ + (weight) -= (delta); \ + if ((weight) < -1024) \ + (weight) = -1024; \ + } else { \ + (weight) += (delta); \ + if ((weight) > 1024) \ + (weight) = 1024; \ + } \ + } + +static const int wv_rates[16] = { + 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000, + 32000, 44100, 48000, 64000, 88200, 96000, 192000, 0 +}; + +// exponent table copied from WavPack source +static const uint8_t wp_exp2_table[256] = { + 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16, + 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23, + 0x24, 0x24, 0x25, 0x26, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3a, 0x3b, 0x3c, 0x3d, + 0x3e, 0x3f, 0x40, 0x41, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b, + 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, + 0x5b, 0x5c, 0x5d, 0x5e, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a, + 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, + 0x9c, 0x9d, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, + 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, + 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, + 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9, + 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff +}; + +static const uint8_t wp_log2_table [] = { + 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15, + 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, + 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e, + 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51, + 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, + 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75, + 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, + 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, + 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, + 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2, + 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0, + 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce, + 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb, + 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7, + 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4, + 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff +}; + +static av_always_inline int wp_exp2(int16_t val) +{ + int res, neg = 0; + + if (val < 0) { + val = -val; + neg = 1; + } + + res = wp_exp2_table[val & 0xFF] | 0x100; + val >>= 8; + if (val > 31U) + return INT_MIN; + res = (val > 9) ? (res << (val - 9)) : (res >> (9 - val)); + return neg ? -res : res; +} + +static av_always_inline int wp_log2(uint32_t val) +{ + int bits; + + if (!val) + return 0; + if (val == 1) + return 256; + val += val >> 9; + bits = av_log2(val) + 1; + if (bits < 9) + return (bits << 8) + wp_log2_table[(val << (9 - bits)) & 0xFF]; + else + return (bits << 8) + wp_log2_table[(val >> (bits - 9)) & 0xFF]; +} + +#endif /* AVCODEC_WAVPACK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpackenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpackenc.h new file mode 100644 index 00000000..11914337 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wavpackenc.h @@ -0,0 +1,653 @@ +/* + * WavPack lossless audio encoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WAVPACKENC_H +#define AVCODEC_WAVPACKENC_H + +#include "wavpack.h" + +typedef struct WavPackDecorrSpec { + int8_t joint_stereo, delta, terms[MAX_TERMS+1]; +} WavPackDecorrSpec; + +static const WavPackDecorrSpec fast_specs[] = { + { 1, 2, { 18,17 } }, { 1, 1, { 17,17 } }, { 0, 2, { 18,17 } }, + { 0, 1, { 17,17 } }, { 1, 3, { 1,18 } }, { 1, 1, { 17, 1 } }, + { 0, 1, { 1,17 } }, { 0, 1, { -2,17 } }, { 0, 2, { -1,17 } }, + { 1, 1, { 17, 2 } }, { 0, 3, { 18,18 } }, { 0, 1, { 17, 1 } }, + { 1, 6, { 1, 2 } }, { 1, 1, { 17, 3 } }, { 0, 1, { -2, 3 } }, + { 0, 1, { 2,17 } }, { 0, 1, { 18,-2 } }, { 0, 1, { -1,17 } }, + { 0, 1, { 18,17 } }, { 0, 1, { 17, 2 } }, { 1, 2, { 18,-2 } }, + { 1, 1, { 1,17 } }, { 0, 3, { 18, 2 } }, { 0, 1, { 17,-2 } }, + { 0, 1, { 18,-2 } }, { 1, 2, { 17,-3 } }, { 0, 1, { 18, 3 } }, + { 0, 1, { 18,18 } }, { 1, 1, { 1, 3 } }, { 1, 1, { 18, 3 } }, + { 1, 1, { 1, 3 } }, { 0, 2, { 18,17 } }, { 1, 1, { 1,17 } }, + { 1, 1, { 17, 3 } }, { 0, 3, { 18,17 } }, { 0, 1, { 18,18 } }, + { 1, 1, { 1, 3 } }, { 1, 1, { 1,18 } }, { 0, 1, { 18,-2 } }, + { 0, 2, { 18,17 } }, { 0, 1, { -1,18 } }, { 1, 1, { 17, 3 } }, + { 0, 1, { 17, 2 } }, { 0, 1, { 17, 3 } }, { 1, 1, { 18, 2 } }, + { 1, 1, { 17,-2 } }, { 0, 1, { 1,-2 } }, { 0, 2, { 18,17 } }, + { 0, 1, { 17,-2 } }, { 1, 1, { 17,-2 } }, { 0, 1, { 18, 3 } }, + { 0, 1, { 2,17 } }, { 1, 2, { 18,-3 } }, { 1, 2, { 1,18 } }, + { 1, 2, { 18, 2 } }, { 0, 1, { 17,-1 } }, { 0, 1, { 17,-2 } }, + { 1, 1, { 17,-2 } }, { 1, 1, { 1, 3 } }, { 0, 1, { 1,17 } }, + { 1, 2, { 18,-2 } }, { 1, 2, { 17,-3 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 1, 1, { 17, 2 } }, { 1, 2, { 18,18 } }, + { 0, 1, { 17, 2 } }, { 0, 1, { 18,17 } }, { 1, 1, { 1,17 } }, + { 1, 1, { 17, 2 } }, { 0, 2, { 18,18 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 17,-3 } }, { 1, 6, { 1, 2 } }, { 0, 3, { 17,17 } }, + { 0, 1, { 1,18 } }, { 0, 1, { 1,-2 } }, { 1, 1, { 17, 2 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 1, 1, { 18, 3 } }, + { 1, 2, { 17,-3 } }, { 0, 1, { 17, 2 } }, { 0, 1, { 17, 3 } }, + { 0, 1, { 18,-2 } }, { 1, 1, { 18,18 } }, { 1, 6, { 1, 2 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 1, { -1,17 } }, + { 1, 1, { 18, 3 } }, { 0, 1, { 17,18 } }, { 1, 1, { 17, 3 } }, + { 0, 1, { 18, 3 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 18, 2 } }, { 0, 1, { -2, 3 } }, { 0, 4, { 18,-1 } }, + { 0, 2, { 18,18 } }, { 0, 1, { -2, 3 } }, { 1, 1, { 17,-2 } }, + { 0, 1, { 17, 3 } }, { 0, 2, { 18,17 } }, { 0, 2, { -1,18 } }, + { 1, 1, { 2,17 } }, { 0, 2, { 17,-2 } }, { 0, 1, { 17, 2 } }, + { 1, 2, { 18,-3 } }, { 0, 1, { 17,-2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 1, 1, { 17,-2 } }, { 1, 2, { 17,-3 } }, + { 1, 1, { 1, 3 } }, { 1, 1, { 2,17 } }, { 1, 2, { 18, 2 } }, + { 1, 1, { 2,17 } }, { 1, 1, { 18, 2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 1, { 17,-2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 17,-1 } }, { 0, 2, { 18,-2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 1, 1, { 1, 3 } }, + { 0, 2, { -2,17 } }, { 0, 2, { 18,-2 } }, { 0, 2, { 17,-2 } }, + { 1, 1, { 2,17 } }, { 1, 1, { 1, 3 } }, { 0, 1, { 2,17 } }, + { 0, 2, { 18,17 } }, { 0, 3, { -1,17 } }, { 1, 1, { 2,17 } }, + { 0, 2, { 18,18 } }, { 0, 1, { 17, 2 } }, { 1, 4, { 18,-3 } }, + { 1, 1, { 18, 1 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 18,-1 } }, { 0, 1, { -1,18 } }, { 1, 6, { 1, 2 } }, + { 1, 1, { 17, 2 } }, { 1, 4, { 18, 3 } }, { 0, 1, { 1,17 } }, + { 0, 1, { 18, 2 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 17, 2 } }, { 0, 2, { 18,-2 } }, { 0, 1, { 1,18 } }, + { 1, 2, { 18,-3 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 1, 2, { 18,18 } }, { 1, 3, { 17,17 } }, + { 0, 1, { -2,17 } }, { 0, 1, { 17,18 } }, { 0, 1, { -1, 3 } }, + { 1, 1, { 2,17 } }, { 0, 2, { 18,-1 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 1, 1, { 17,-2 } }, { 1, 2, { 17, 2 } }, + { 1, 1, { 18, 3 } }, { 0, 1, { 18, 2 } }, { 1, 2, { 17,-3 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 1, { -2,17 } }, + { 0, 1, { 17,-1 } }, { 0, 1, { 18,-1 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 17,-3 } }, { 1, 1, { 1,18 } }, { 1, 3, { 18, 2 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 3, { 18,18 } }, { 0, 1, { 1,-2 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 2, { 17,-3 } }, { 1, 1, { 18,18 } }, { 0, 2, { 18, 2 } }, + { 0, 1, { 17,18 } }, { 1, 2, { 18, 2 } }, { 1, 1, { 17,-2 } }, + { 0, 2, { 17,-1 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 1, { 1,-2 } }, { 0, 1, { 18, 1 } }, + { 1, 2, { 18,-2 } }, { 0, 1, { 17, 2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 1, 1, { 17, 3 } }, { 0, 1, { 17,-1 } }, + { 0, 1, { 18, 2 } }, { 1, 1, { 17, 3 } }, { 1, 1, { 17,-2 } }, + { 0, 1, { 18,18 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 1, { 17,18 } }, { 0, 1, { -2, 3 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 1, 2, { 18,-3 } }, + { 0, 2, { 18,17 } }, { 0, 3, { 18, 2 } }, { 0, 1, { 1,18 } }, + { 0, 2, { 18,17 } }, { 0, 1, { 17,-1 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 1, { -2, 3 } }, + { 0, 3, { 17,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 1, { 17, 2 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 1, 1, { 17, 2 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18, 2 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, { 0, 2, { 18,17 } }, + { 0, 2, { 18,17 } }, +}; + +static const WavPackDecorrSpec default_specs[] = { + { 1, 2, { 18,18, 2,17, 3 } }, { 0, 2, { 18,17,-1, 3, 2 } }, + { 1, 1, { 17,18,18,-2, 2 } }, { 0, 2, { 18,17, 3,-2,17 } }, + { 1, 2, { 18,17, 2,17, 3 } }, { 0, 1, { 18,18,-1, 2,17 } }, + { 0, 1, { 17,17,-2, 2, 3 } }, { 0, 1, { 18,-2,18, 2,17 } }, + { 1, 2, { 18,18,-1, 2, 3 } }, { 0, 2, { 18,17, 3, 2, 5 } }, + { 1, 1, { 18,17,18, 2, 5 } }, { 0, 1, { 17,17,-2, 2, 3 } }, + { 0, 1, { 18,-2,18, 2, 5 } }, { 0, 1, { 17,-2,17, 2,-3 } }, + { 1, 1, { 17,-2,17, 1, 2 } }, { 0, 1, { 17,17,-2, 2, 3 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 1, 4, { 18,18, 2, 3,-2 } }, + { 0, 1, { 1,-1,-1, 2,17 } }, { 0, 2, { 18,17, 3, 2, 5 } }, + { 0, 1, { 18,18,18, 2,17 } }, { 0, 1, { 18,17,-1, 2,18 } }, + { 1, 1, { 17, 3, 2, 1, 7 } }, { 0, 2, { 18,-2,18, 2, 3 } }, + { 1, 3, { 18,-3,18, 2, 3 } }, { 0, 3, { 18,17, 2, 3,17 } }, + { 1, 1, { 17,17, 2, 1, 4 } }, { 0, 1, { 17,18,-2, 2,17 } }, + { 1, 1, { 18,18, 3, 5, 2 } }, { 0, 1, { 17,17, 2,18, 4 } }, + { 0, 1, { 18,17, 1, 4, 6 } }, { 1, 1, { 3,17,18, 2,17 } }, + { 1, 1, { 17, 3, 2, 1, 7 } }, { 0, 1, { 18,17,-1, 2, 3 } }, + { 1, 1, { 17,17, 2, 1, 4 } }, { 1, 2, { 18,17,-1,17, 3 } }, + { 1, 2, { 18,17, 2, 3,-1 } }, { 0, 2, { 18,18,-2, 2,17 } }, + { 0, 1, { 17,17, 2,18, 4 } }, { 0, 5, { -2,18,18,18, 2 } }, + { 1, 1, { 18,18,-1, 6, 3 } }, { 0, 1, { 17,17,-2, 2, 3 } }, + { 1, 1, { 18,17,18, 2,17 } }, { 0, 1, { 18,17, 4, 3, 1 } }, + { 0, 1, { -2,18, 2, 2,18 } }, { 1, 2, { 18,18,-2, 2,-1 } }, + { 1, 1, { 17,17, 2, 1, 4 } }, { 0, 1, { 17,18,-2, 2,17 } }, + { 1, 1, { 17, 3, 2, 1, 7 } }, { 1, 3, { 18,-3,18, 2, 3 } }, + { 1, 2, { 18,18,-2, 2,-1 } }, { 1, 1, { 18,18, 3, 5, 2 } }, + { 0, 2, { 18,18,-1, 2,17 } }, { 0, 1, { 18,-1,17,18, 2 } }, + { 0, 1, { 17,-1, 2, 3, 6 } }, { 0, 1, { 18,-2,18, 2, 5 } }, + { 1, 2, { 18,18,-2, 2,-1 } }, { 0, 3, { 18,18, 2, 3,17 } }, + { 0, 1, { 17,17, 2,18, 4 } }, { 1, 1, { 17,-2,17, 1, 2 } }, + { 0, 1, { -1, 3, 5, 4, 7 } }, { 0, 3, { 18,18, 3, 2, 5 } }, + { 0, 1, { 17,17, 2,18, 4 } }, { 0, 1, { 18,17,-2,18, 3 } }, + { 0, 2, { 18,18,-2, 2,17 } }, { 0, 3, { 18,17,-2, 2, 3 } }, + { 1, 1, { 18,18,-2, 2,17 } }, { 0, 1, { 18,17, 4, 3, 1 } }, + { 1, 2, { 3,18,17, 2,17 } }, { 1, 2, { 18,18, 2,-2,18 } }, + { 1, 2, { 18,18,-1,18, 2 } }, { 0, 2, { 18,18,-2, 2,17 } }, + { 1, 3, { 18,18, 2, 3,-2 } }, { 0, 3, { 18,18, 3, 2, 5 } }, + { 0, 1, { 18,-2,18, 2, 5 } }, { 1, 1, { 17, 3, 2, 1, 7 } }, + { 1, 3, { 18,18,-2, 2,18 } }, { 1, 1, { 17,18,18,-2, 2 } }, + { 0, 1, { 18,-2,18, 2, 5 } }, { 0, 2, { 18,-2,18, 2, 3 } }, + { 0, 1, { -1, 3, 4, 5, 7 } }, { 1, 1, { 17,17, 2,-1, 7 } }, + { 0, 1, { 18,-1,-1, 2,-2 } }, { 0, 2, { 18,17, 2, 3,17 } }, + { 0, 1, { 18,17, 2,18, 2 } }, { 0, 2, { 18,17,-1, 2,17 } }, + { 0, 1, { 1,18, 3, 2, 5 } }, { 0, 2, { 18,-2, 4,18, 2 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 0, 1, { 18,17,18, 2, 5 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 0, 4, { 18,18,-2, 2,18 } }, + { 1, 1, { 18,18, 3, 2, 5 } }, { 1, 1, { 17,17, 2, 1, 4 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 1, { 18,18, 2, 1, 3 } }, { 1, 1, { 17,17, 2, 1, 4 } }, + { 1, 2, { 17,17, 2,18, 3 } }, { 0, 1, { 18,17, 1, 4, 6 } }, + { 1, 2, { 18,18,-2, 2,-1 } }, { 0, 1, { 18,-2,18, 2, 5 } }, + { 1, 1, { 17, 2,18, 2,17 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 1, { 18,18, 3, 6,-1 } }, { 0, 1, { 18,17, 2,18, 3 } }, + { 0, 1, { 18,17,-2, 2,17 } }, { 1, 1, { 3,17,18, 2,17 } }, + { 1, 3, { 18,-3,18, 2, 3 } }, { 1, 3, { 18,18,-3,18, 2 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 0, 1, { 17,-2,17, 2,-3 } }, + { 1, 1, { 18,18, 3, 5, 2 } }, { 1, 2, { 18,18,-2, 2,-1 } }, + { 0, 1, { 18,-1,-1, 2,-2 } }, { 1, 1, { 18, 3, 1, 5, 4 } }, + { 0, 3, { 18,17,-1, 2,17 } }, { 1, 3, { 18,17, 2,18,-2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 1, 2, { 18,18,-2, 2,-1 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 0, 4, { 3,18,18, 2,17 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 1, 1, { 18,17,-1,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 1, { 18,18,18, 3, 2 } }, { 0, 1, { 17,-1, 2, 3, 6 } }, + { 0, 1, { 17,-1, 2, 3, 6 } }, { 0, 2, { 18,17,-2, 3, 2 } }, + { 1, 3, { 18,17, 2,-2,18 } }, { 0, 2, { 18,18, 2,17, 3 } }, + { 0, 1, { 18,18, 2,18,-2 } }, { 0, 2, { 18,-2, 4,18, 2 } }, + { 0, 1, { -2,18, 2, 2,18 } }, { 0, 2, { 18,17, 3, 6, 2 } }, + { 0, 1, { 18,17,18, 2, 5 } }, { 0, 3, { 18,18,-2, 3, 2 } }, + { 1, 1, { 18,18, 2,18, 5 } }, { 0, 1, { 17,-1, 2, 3, 6 } }, + { 1, 4, { 18,18, 2, 3,-2 } }, { 0, 2, { 18,17,18, 2,-2 } }, + { 0, 1, { 1,18, 3, 2, 5 } }, { 1, 4, { 18,-2,18, 2, 3 } }, + { 1, 2, { 18, 2,18, 3,-2 } }, { 0, 2, { 18,18,18, 2, 4 } }, + { 0, 2, { 3,17,18, 2,17 } }, { 1, 1, { 18,-1,18, 2,17 } }, + { 1, 2, { 17,17, 2,18, 3 } }, { 0, 2, { 18,17,-2, 3, 2 } }, + { 0, 1, { 1,-1,-1, 2,17 } }, { 0, 3, { 3,18,18, 2,17 } }, + { 0, 1, { 18,-1,17,18, 2 } }, { 0, 1, { 18,17, 2,18, 3 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 1, { 18,17, 2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 2, { 17,17, 2,18, 3 } }, { 0, 1, { 18,17,-2, 2, 3 } }, + { 0, 1, { 18,-2,18, 2, 5 } }, { 1, 4, { 18,-2,18, 2, 3 } }, + { 1, 3, { 18,17, 2, 3, 6 } }, { 0, 2, { 18,18, 2,17, 3 } }, + { 0, 2, { 18,17, 2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 1, { 18,18, 3, 5, 2 } }, { 0, 2, { 18,18,-2, 2, 3 } }, + { 1, 2, { 18,17, 2,17, 3 } }, { 0, 1, { 18,17, 2, 3,18 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 1, 4, { 18,18, 2, 3,-2 } }, + { 0, 1, { 17,-2,17, 2,-3 } }, { 0, 1, { 17,17, 2,18, 4 } }, + { 1, 1, { 18,18,18, 2, 4 } }, { 1, 2, { 18, 2,18, 3,-2 } }, + { 1, 1, { 18,18,-2, 2,17 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18, 2,17, 3 } }, { 0, 2, { 18,18,18, 2, 4 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,17,-2, 3, 2 } }, + { 0, 1, { 1,-1,-1, 2,17 } }, { 1, 4, { 18,18, 2, 3,-2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 1, { 18,-2,18, 3, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 1, { 18,18,-2, 2,17 } }, { 0, 3, { 18,17, 2, 3,17 } }, + { 1, 2, { 18,18, 2,-2,18 } }, { 0, 1, { -1, 3, 5, 4, 7 } }, + { 1, 1, { 18, 3, 1, 5, 4 } }, { 1, 1, { 18,18,-2,18, 3 } }, + { 0, 2, { 18,17,18, 2,-2 } }, { 0, 2, { 18,18, 2,17, 3 } }, + { 1, 2, { 18, 2,18, 3,-2 } }, { 1, 4, { 18,18, 2, 3,-2 } }, + { 1, 3, { 18,17, 2, 3, 6 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 2, { 18,17,-2,-1,17 } }, { 0, 1, { 17,-1, 2, 3, 6 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2, 2, 3 } }, + { 1, 1, { 18,18,18, 2, 5 } }, { 0, 1, { 17,17,-2, 2, 3 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,17, 3, 6, 2 } }, + { 0, 2, { 18,17,18, 2, 3 } }, { 0, 3, { 18,17,-3,18, 2 } }, + { 0, 1, { 18,18,18, 2, 3 } }, { 0, 1, { 18,-2,-3, 2, 6 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 1, 1, { 18,17,18, 2, 5 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 1, { 18,17,18, 2, 5 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 1, { 18,18,18, 2, 3 } }, { 1, 1, { 17,-2,17, 1, 2 } }, + { 1, 1, { 17,17, 2,-1, 7 } }, { 0, 1, { 18,17, 4, 3, 1 } }, + { 1, 3, { 18,-3,18, 2, 3 } }, { 0, 1, { 1,18, 3, 2, 5 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 1, { 18,18, 3, 6, 2 } }, { 0, 1, { 17,17, 2,18, 4 } }, + { 0, 1, { 17,17, 2,18, 4 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 1, 2, { 18,-2,18, 3, 2 } }, { 1, 1, { 17,-2,17, 1, 2 } }, + { 1, 1, { 18,18, 3, 2, 5 } }, { 0, 1, { 18,18,-1, 2, 3 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 1, { 18,17,18, 2, 5 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 1, { 3,18,18, 2,17 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, + { 0, 2, { 18,18,-2,18, 2 } }, { 0, 2, { 18,18,-2,18, 2 } }, +}; + +static const WavPackDecorrSpec high_specs[] = { + { 1, 2, { 18,18,18,-2, 2, 3, 5,-1,17, 4 } }, { 0, 1, { 18,17,-2, 2,18, 3, 7, 2, 5, 4 } }, + { 1, 2, { 1,18, 3, 6,-2,18, 2, 3, 4, 5 } }, { 0, 2, { 18,18,-2, 2,18, 3, 6, 2,17, 4 } }, + { 1, 2, { 18,18, 2,18, 3, 2,-1, 4,18, 5 } }, { 1, 1, { 7, 6, 5, 3, 4, 2, 5, 4, 3, 7 } }, + { 1, 1, { 17, 3,18, 7, 2, 6, 1, 4, 3, 5 } }, { 1, 1, { -2,18,18,18, 3,-2, 6, 5, 2, 1 } }, + { 1, 2, { 18,18,-1,18, 2, 3, 6,-2,17, 5 } }, { 0, 1, { 17,17,18, 3, 6, 4, 5, 2,18,-2 } }, + { 1, 2, { 1,18,-2, 3, 5, 2, 4,-1, 6, 1 } }, { 0, 2, { 18,18, 3, 6,18, 2, 4, 8, 5, 3 } }, + { 0, 1, { -2, 1,18, 2,-2, 7,18, 2,-1, 5 } }, { 1, 1, { 4, 3, 8, 1, 5, 2, 5, 6, 2, 8 } }, + { 1, 1, { 17,18, 2, 6, 3, 4,-1, 1, 8, 6 } }, { 0, 1, { 18,18, 3, 6, 3,-2, 2, 5,-1, 1 } }, + { 0, 1, { 18,18,17,-1, 2,-2,18, 3, 4, 5 } }, { 1, 2, { 18,17, 2,-2,18, 3, 5, 7, 2, 4 } }, + { 1, 2, { 18,18, 3, 6,-2,18, 2, 5, 8, 3 } }, { 0, 1, { 18,17, 2,18,18, 2, 6, 5,17, 7 } }, + { 1, 2, { 18,17, 2,18, 3, 2, 6,18,-1, 4 } }, { 1, 1, { 5, 3, 6, 5, 3, 4, 1, 2, 4, 7 } }, + { 1, 1, { 5, 3, 6, 5, 3, 4, 1, 2, 4, 7 } }, { 0, 1, { -2,18,18,18,-2, 3, 2, 4, 6, 5 } }, + { 1, 2, { 18,17,-3, 3,-1,18, 2, 3, 6, 5 } }, { 0, 1, { 17,18, 7, 3,-2, 7, 1, 2, 4, 5 } }, + { 1, 1, { 2,18,18,-2, 2, 4,-1,18, 3, 6 } }, { 0, 3, { 1,18, 4, 3, 5, 2, 4,18, 2, 3 } }, + { 0, 1, { -2,18, 2,18, 3, 7,18, 2, 6,-2 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18,18, 5, 4, 6, 4, 5, 1, 4, 3 } }, { 1, 1, { 18, 3, 6, 5, 7, 8, 2, 3, 1,-1 } }, + { 1, 1, { 18,18,18, 2,-2, 3, 5,18, 2, 8 } }, { 0, 2, { 18,17,-2, 2, 3,18,-3, 5, 2, 7 } }, + { 1, 1, { 1, 1,-1, 8,17, 3,-2, 2, 6,17 } }, { 0, 2, { 18,18,17, 2,-2, 3, 2, 4,18, 5 } }, + { 1, 1, { 17,18, 2,-1, 5, 7,18, 3, 4, 6 } }, { 1, 1, { 5, 4, 5,17, 3, 6, 3, 4, 7, 2 } }, + { 0, 1, { 17, 3, 1, 7, 4, 2, 5,-2,18, 6 } }, { 0, 1, { 17,18, 2,18, 4, 3, 5, 7,-3, 6 } }, + { 1, 2, { 17,17,-3,-2, 2, 8,18,-1, 3, 5 } }, { 0, 1, { 17,17,18, 2, 3, 6,-2, 8, 1, 7 } }, + { 1, 1, { 1, 2, 6,-2,18, 2, 5,-3, 7,-2 } }, { 0, 1, { 18,18, 3,18, 6, 8,-2, 2, 3, 5 } }, + { 0, 1, { 18,17, 2,18,-2, 3, 7, 6, 2, 4 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18,18, 2,-1, 3, 6, 1, 3, 4, 8 } }, { 0, 1, { 18,18, 3, 6, 5, 3,-2, 2,18,-1 } }, + { 0, 1, { 18,17,-3,18, 2, 4,-2, 3, 6,17 } }, { 1, 3, { 1, 2,17, 3,18, 7,-1, 5, 2, 4 } }, + { 1, 1, { 18, 3,18, 6, 8,18,-2, 5, 7, 2 } }, { 0, 1, { 17, 2,18, 6, 3, 2, 5, 4, 8, 1 } }, + { 0, 1, { 18,17,-1, 2, 3,18,18, 2, 3,17 } }, { 1, 1, { 18, 7, 6, 5, 5, 3, 1, 4, 2, 4 } }, + { 1, 1, { 6,17, 3, 8, 1, 5, 7,-1, 2, 1 } }, { 1, 1, { 18,-2,18, 3,-2, 2, 7, 4, 6,18 } }, + { 1, 3, { 18,-3,18, 2, 3,18,-1, 7, 2, 5 } }, { 0, 2, { 18,-2, 7, 1, 3, 2, 4, 6,-3, 7 } }, + { 1, 1, { 18,-2, 2,-3,18,-2,17,-1, 4, 2 } }, { 0, 3, { 17,17, 2, 5, 3, 7,18, 6, 4, 2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18,17, 4, 6, 6, 4, 5, 3, 4, 1 } }, { 0, 1, { 18, 5, 3, 6, 2, 3, 8, 1, 3, 7 } }, + { 1, 2, { 18,17,-2, 2,18, 3, 5, 7,-1, 2 } }, { 0, 1, { 1,18,18, 3, 6,-1, 4, 8, 5, 2 } }, + { 1, 1, { 1, 5, 3, 4, 1, 1, 3, 5, 7, 3 } }, { 0, 1, { 3,18,18, 2,18,18,-1, 2, 3,18 } }, + { 1, 2, { 18,18,-1,18, 2, 3, 4, 6,18, 5 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18, 3, 1, 4, 5, 2, 7, 1, 3, 6 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 18,18,-1,18, 2, 3, 5,-2, 6, 8 } }, { 1, 1, { 17,18, 4, 8, 3, 2, 5, 2, 7, 6 } }, + { 1, 4, { 1, 2, 5,18,-2, 2, 3, 7,-1, 4 } }, { 0, 2, { 18,17,-1, 3, 6,18, 2, 3, 7, 5 } }, + { 0, 1, { -2,18, 2,-3, 6,18, 4, 3,-2, 5 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 17,17, 6, 2, 4, 8, 3, 5,-1,17 } }, { 1, 1, { 18, 3,18, 6, 8,18,-2, 5, 7, 2 } }, + { 1, 2, { 17,17,-3, 2,18,-2, 8, 3, 6,-1 } }, { 1, 1, { 18,-2,17,18, 2, 3,-2, 6, 5, 4 } }, + { 1, 2, { 18,17,-1, 3,18, 2, 5, 3, 6,-3 } }, { 0, 1, { 18,17, 2,18, 7,18, 2, 4, 3,17 } }, + { 1, 3, { 18,18, 5, 6, 4, 3, 4,18, 6, 5 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 7, 6, 5, 3, 4, 2, 5, 4, 3, 7 } }, { 0, 1, { -2,18,18,18, 3, 6, 4, 2, 5, 2 } }, + { 0, 3, { 18,17,-3,18, 3, 2, 5,-1,17, 3 } }, { 1, 1, { 17,18, 7, 3, 1, 7, 4, 2, 6, 5 } }, + { 1, 1, { 18, 2,-2,-1,18, 5, 3,-2, 1, 2 } }, { 0, 3, { 18,18,-1, 3, 2, 7, 5,18, 4, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 17,18, 2,-2, 4, 8,18, 3, 6, 5 } }, { 0, 2, { 18,17, 3, 5,-2, 7, 2,18, 3,-1 } }, + { 1, 1, { 18, 2,-2,-1,18, 5, 3,-2, 1, 2 } }, { 0, 2, { 3,17,18,18, 2, 5, 7, 6,18, 3 } }, + { 1, 1, { 17,18,18, 4, 3, 2,18, 7, 8,-1 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 17, 1, 2, 3, 5, 6, 1, 4, 8,17 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 18,17,-1,18,-3, 2, 8, 3, 6,17 } }, { 1, 1, { 17,17, 1, 2, 4, 5,-1, 2, 1, 6 } }, + { 1, 1, { 1, 2, 6,-2,18, 2,-3, 3,-2, 5 } }, { 0, 1, { 18, 3,18, 6,18, 5, 2, 4,-1, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18,18,-1, 2,18, 3, 6, 4,-2, 7 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { -1,18,18,18, 2,-2, 4, 7, 2, 3 } }, { 0, 3, { 3,17,-2, 5, 2, 7,18, 6, 4, 5 } }, + { 0, 1, { 17, 6,18, 3, 8, 4, 5, 3, 8,18 } }, { 0, 2, { 18, 2, 6, 2,18, 3, 2, 4, 5, 8 } }, + { 0, 1, { 3,18,18, 2,18,-1, 2,18, 2,17 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 3, 6,17,-2, 5, 1, 2, 7, 4, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 3, { 3,18,17, 5, 6, 2, 7,-2, 8,18 } }, { 1, 1, { 18,-1, 3, 1, 7, 2,-1, 4, 6,17 } }, + { 1, 1, { 18, 2,-2,-1,18, 5, 3,-2, 1, 2 } }, { 0, 2, { 18, 1, 2,18, 3, 6, 5, 2, 4, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 17,-2, 2,18,18, 8, 5, 3, 2, 6 } }, { 0, 1, { 18,17, 2,18, 3, 2, 7,-2,18, 4 } }, + { 1, 2, { 1,18, 2, 3,-1, 5, 6, 4, 7,17 } }, { 0, 2, { 18,17, 3, 6,-2, 2, 3, 8, 5,17 } }, + { 0, 2, { 18,18, 3, 2,18,-1, 2, 4, 3,17 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 17,-1,18, 2, 3,-2, 5,18, 2, 7 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 18,-3,18, 2, 3,-2,18, 5, 6,-3 } }, { 0, 2, { 18,17, 3, 5,-2, 7, 2,18, 3,-1 } }, + { 1, 1, { 1,18,-1, 2, 3, 1,-2, 8, 2, 5 } }, { 0, 1, { 18,18, 3, 6,18, 2, 3, 4, 8, 5 } }, + { 0, 1, { -2, 1,18, 2,-2, 5, 7,18, 2,-1 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 17,18,-1, 2, 8, 3, 4, 5, 1, 7 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 18,18,-1, 2,18, 3,-2, 5, 4, 2 } }, { 1, 1, { 18,17, 2,18, 3, 8, 5, 2, 7,17 } }, + { 0, 1, { 18,18, 3,18, 6, 8,-2, 2, 3, 5 } }, { 0, 1, { 18,18, 2,18, 2, 6,18, 2,17, 7 } }, + { 1, 3, { 18,17,18, 2, 8,18, 5,-1, 3, 6 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 18, 7, 6, 5, 5, 3, 1, 4, 2, 4 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 18,17,-1, 3, 6,18, 2, 5, 8, 3 } }, { 0, 1, { 17,18,18, 4, 7, 2, 3,-2,18, 5 } }, + { 1, 2, { 18, 1, 2, 6, 2, 5,18, 2, 4, 8 } }, { 0, 4, { 18, 4, 1, 2, 3, 5, 4, 1, 2, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 2, { 18,17, 2,-1,18, 3,-3, 5, 2, 4 } }, + { 0, 1, { 17,17, 3, 6, 3, 5,-2, 2,18,-1 } }, { 0, 2, { 18,18, 3,-2,18, 2,-3, 5, 3, 6 } }, + { 1, 1, { 17,17, 2, 4, 1, 3, 5, 2, 6,-3 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 17, 1, 3, 2, 7, 1, 6, 3, 4, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 17,-1,18, 2, 1, 5, 3, 8,-1,-2 } }, { 1, 1, { 17,18,-1, 8, 2, 5, 3, 4, 1, 6 } }, + { 1, 2, { 1,18, 3,-1, 5, 1, 2, 4, 7, 6 } }, { 0, 1, { 18,18, 3, 6, 5, 3,-2, 2,18,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 1,18,-1, 3, 8, 5, 6, 1, 2, 3 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 18,18, 2, 3, 6,18,-1, 4, 2, 3 } }, { 1, 1, { 1, 3, 5,18, 2, 6, 7, 2, 3, 1 } }, + { 1, 1, { 1, 3, 8,18, 5, 2, 7, 1, 3,-2 } }, { 0, 2, { 17, 2,18, 3, 6, 2, 4, 5, 8, 3 } }, + { 0, 1, { 18,17, 2,18, 3, 2, 7,-2,18, 4 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 18,-3,18,-1, 3,-2, 5, 7, 1, 2 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 3, { 18,18, 2, 6,18, 5,18, 2, 3,17 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 3, { 1,-1, 1, 3,-2, 2, 5, 7,-3,18 } }, { 1, 2, { 18, 7, 3,-3, 2, 8, 2, 5, 4,17 } }, + { 1, 1, { 1, 4, 5, 1, 3, 4, 6, 7, 8, 3 } }, { 0, 1, { 18,17, 2,18,-1, 2, 3,18, 2, 4 } }, + { 0, 2, { 18,18,-2,18, 2, 3, 4, 7, 5,17 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 17,18, 2, 1, 3, 2, 5, 1, 2, 3 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 18,18,-1, 2, 3, 5, 8, 6, 1,-2 } }, { 0, 1, { 17,18, 8, 3, 4, 6, 5, 2, 8, 7 } }, + { 1, 2, { 1, 3,-2,18, 2, 5, 1, 7,-1,-2 } }, { 0, 3, { 18,17,-1, 3,18, 2, 3, 6, 4,17 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 2, { 18,18, 4,18, 6, 7, 8, 3,18, 2 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 17,-3,17, 2,-2, 8, 3,18, 4,-3 } }, { 1, 1, { 18,17, 3, 5, 6, 2, 8, 1, 3, 7 } }, + { 0, 1, { 18,18, 3, 6, 5, 3,-2, 2,18,-1 } }, { 0, 3, { 18,18, 2, 6,18, 5,18, 2, 3,17 } }, + { 1, 1, { 18,18, 5, 4, 6, 4, 5, 1, 4, 3 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { 3,17,18,-3, 2, 5,18, 6,-1, 7 } }, { 1, 1, { 17,18, 3, 2, 5,-1, 6, 8, 4, 7 } }, + { 1, 1, { 18, 1,-2, 3, 2, 1, 7, 6, 3, 4 } }, { 0, 3, { 1, 2,17, 3,18, 2, 7, 5, 4,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 17,-2, 2,18,18, 8, 5, 3, 2, 6 } }, { 0, 2, { 18, 5,18, 2, 3, 7,-2, 1, 6, 8 } }, + { 0, 1, { 2,-1,18,-1, 2, 4,-3, 5,18, 3 } }, { 0, 1, { 3,17,18, 5, 2,18, 7, 3, 6, 5 } }, + { 1, 4, { 1, 2, 5,18,-2, 2, 3, 7,-1, 4 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 1,18, 2, 1, 3, 4, 1, 5, 2, 7 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { 17,17,18, 2, 4, 5,18,-2, 6, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 2, { 18,18,-1, 3, 5, 6, 8,18, 2, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { 18,18, 4, 6, 8,18, 7, 3, 2, 5 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 2, { -1,18,18,18, 2, 4,-2, 2, 3, 6 } }, { 0, 2, { 18,-2, 7, 1, 3, 2, 4, 6,-3, 7 } }, + { 1, 1, { 17,18, 8, 3, 4, 6,-2, 5, 3, 8 } }, { 0, 2, { 18, 1, 2, 6, 2, 8, 3,18, 5, 4 } }, + { 1, 1, { 3,18,18, 2,18, 2,18, 3, 2,18 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 1, 1, { 3,17,18, 5, 2, 6, 7, 1, 4, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2, 8 } }, +}; + +static const WavPackDecorrSpec very_high_specs[] = { + { 1, 2, { 18,18, 2, 3,-2,18, 2, 4, 7, 5, 3, 6, 8,-1,18, 2 } }, + { 0, 1, { 18,18,-1,18, 2, 3, 4, 6, 5, 7,18,-3, 8, 2,-1, 3 } }, + { 1, 2, { 1,18,-2, 4,18, 2, 3, 6,-1, 7, 5,-2,18, 8, 2, 4 } }, + { 0, 1, { 17,17, 2, 3, 4,18,-1, 5, 6, 7,18, 2, 8,17, 3,-2 } }, + { 1, 1, { 18,18, 2,18, 3, 2,18, 4,-1, 3,18, 2, 6, 8,17, 5 } }, + { 0, 2, { 18,17, 2, 3,-2, 5,18,-3, 2, 4, 7, 3, 6, 8, 5,17 } }, + { 1, 1, { 18,-2, 2,-3,18, 5,-2,18, 2, 3, 6, 2,17, 4, 7,-1 } }, + { 1, 1, { 17, 8,18, 3,-2, 2, 5, 4,18, 6, 3, 8, 7, 2, 5, 4 } }, + { 0, 2, { 18,17,-2, 2,18, 3, 2, 5,-3, 4, 7,18, 3, 8, 6, 2 } }, + { 1, 1, { 3, 6, 5, 5, 1, 3, 7, 4, 2, 6, 4,18, 3, 7, 5, 6 } }, + { 1, 2, { 1,18, 3, 2,-2, 1, 5, 4, 6, 2, 7, 1, 8, 3,-1, 1 } }, + { 0, 1, { 18,18, 2, 3, 6, 3, 5,-2, 2, 4,18, 3,-2,-1, 6, 7 } }, + { 0, 1, { -2,18, 2,18, 7, 2, 6,-2, 3, 4,18,18, 2,-3, 8, 5 } }, + { 0, 2, { 18,18,18, 2, 4, 3,18, 5, 3, 6,-2, 2, 4,18, 8, 7 } }, + { 0, 1, { -2, 1,18, 2,-2,18,-1, 5, 7, 2, 3, 4,18, 2, 6, 2 } }, + { 1, 1, { 17,18, 3, 2, 1, 7,-1, 2, 4, 3, 5, 6,-2,18, 7, 8 } }, + { 1, 1, { 18,18, 2,18, 3, 4, 6,-2,18, 5, 8, 2, 3, 7, 4,-1 } }, + { 0, 1, { 18,18,18,-1, 2, 3, 4, 6, 8,18, 3, 5, 2, 6, 7, 4 } }, + { 1, 1, { 17,-2,18,18, 2, 5, 3, 8, 2,-1, 6, 1, 3, 4, 7, 5 } }, + { 0, 1, { 17,17,18, 2, 3, 6,-2, 8, 1, 7, 5, 2, 3, 1, 4, 8 } }, + { 1, 1, { 17,17, 3, 2, 7, 1, 4, 3, 6, 2, 5,-2, 8, 7,18, 6 } }, + { 0, 1, { 18,17,-2, 2,18, 3,-3, 7, 6, 5, 2, 4,-1, 8, 3,17 } }, + { 1, 1, { 2,18,18,-2, 2, 4,-1, 5,18, 3, 8, 6, 2, 7,17, 4 } }, + { 0, 1, { 17, 3, 6, 8, 5, 4, 3, 8, 1,18, 7, 2, 4, 5, 6, 3 } }, + { 1, 2, { 17,18, 4, 8, 3, 2, 5, 7, 6, 8, 2, 7,-2,18, 3, 4 } }, + { 1, 1, { 6, 5, 5, 3, 4, 7, 3, 2, 4, 6, 3, 7, 1, 5, 2, 4 } }, + { 1, 1, { 1,18,-1, 2, 1, 3, 8,-2, 2, 5, 6, 3, 8, 7,18, 4 } }, + { 0, 1, { 1,17,-1,18, 3, 2, 5, 4, 6, 7, 8, 3, 4, 2, 1,-2 } }, + { 0, 1, { 18, 2,18,18, 2,18, 6,-2,18, 7, 5, 4, 3, 2,18,-2 } }, + { 0, 3, { 1, 4,18, 3, 2, 4, 1, 5, 2, 3, 6,18, 8, 7, 2, 4 } }, + { 0, 1, { 17,-2, 1,-3, 2,18, 3,-2, 4,18, 3, 6, 7,-3, 2, 8 } }, + { 1, 1, { 17,18,18, 4, 2, 3, 7, 6,18, 8, 5,-1, 4, 2, 3,17 } }, + { 1, 2, { 18,-1,17,18, 2, 3,-2,18, 5, 8, 2, 4, 3, 7, 6,-1 } }, + { 1, 1, { 18,18,18,-2, 4, 2, 3,18, 5, 8, 2, 4, 6, 7,-2, 3 } }, + { 1, 2, { 18,18,-2,18,-1, 3, 2, 5,18,-2, 7, 2, 3, 4, 6, 8 } }, + { 0, 1, { 17,18,-1, 2, 4,18, 8, 3, 6, 5, 7,-3, 2, 4, 3,17 } }, + { 1, 1, { 18,18,17, 2,-1,18, 3, 2,18, 6, 5, 4,18, 7, 2,-1 } }, + { 0, 2, { 1,18,-1,18, 3, 2, 4, 6,-3, 7,-1, 5, 1, 2, 3, 8 } }, + { 1, 1, { 1,17,-2, 2,-3, 6, 3, 5, 1, 2, 7, 6, 8,-2, 4, 1 } }, + { 0, 1, { 17,-1, 5, 1, 4, 3, 6, 2,-2,18, 3, 2, 4, 5, 8,-1 } }, + { 0, 2, { 18,18,17, 2, 3,-2, 5,18, 2, 4, 7, 8, 6,17, 3, 5 } }, + { 1, 1, { 1, 5, 1, 3, 4, 3, 7, 5, 1, 3, 6, 1, 2, 4, 3, 8 } }, + { 1, 2, { 1,-1, 3, 2,18, 7,-2, 5, 2, 6, 4, 3,-1,18, 8, 7 } }, + { 0, 2, { 18,17, 3,18, 2, 5, 4, 3, 6, 2, 7, 8,18, 3, 4, 5 } }, + { 1, 1, { 3, 6,17, 8, 7, 5,18,-1, 1, 2, 3, 4, 2, 6, 8, 1 } }, + { 0, 2, { 18,18, 3,-3,18, 2, 6, 5, 3, 7,18, 4,-2, 8, 2, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 1, 7, 2, 3,18,-2, 3, 6, 4, 2, 7, 8, 5, 3,17 } }, + { 1, 1, { 3, 6, 5, 5, 1, 3, 7, 4, 2, 6, 4,18, 3, 7, 5, 6 } }, + { 0, 1, { 18,18,18, 2, 4,-1,18, 8,-1, 2, 3, 4, 6,-2, 1, 7 } }, + { 1, 1, { 18,-2,17,18, 2, 6, 3,-2, 5, 4, 7, 1,-3, 8, 2, 6 } }, + { 0, 1, { 17,18,18, 4, 2, 7, 3, 6,-2,18, 8, 4, 5, 2, 7,17 } }, + { 1, 1, { 18,18, 5, 4, 6, 4, 1, 5, 4, 3, 2, 5, 6, 1, 4, 5 } }, + { 0, 1, { 18,18,-2,18, 2,-3, 3, 8, 5,18, 6, 4, 3,-1, 7, 2 } }, + { 1, 1, { 18, 2,-2,-3,18, 5, 2, 3,-2, 4, 6, 1,-3, 2, 7, 8 } }, + { 0, 1, { 18, 3, 5, 8, 2, 6, 7, 3, 1, 5, 2,-1, 8, 6, 7, 4 } }, + { 1, 1, { 4, 3, 8, 1, 5, 6, 2, 5, 8,-2, 2, 7, 3,18, 5, 4 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 3,18,18, 7, 2, 4,18, 6, 2, 3,-1, 8, 5,18,-3 } }, + { 0, 1, { 3,17,18, 2,18, 6, 7,-3,18, 2, 5, 6, 3, 8, 7,-1 } }, + { 1, 1, { 18,18, 2,18,18, 2,-1, 7, 3,18, 5, 2, 6, 4,-1,18 } }, + { 0, 3, { 18, 3, 4, 1, 5, 2,18, 4, 2, 3,18, 7, 6, 1, 2, 4 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 1,18, 2, 3, 6, 4, 5, 7,18, 3, 8, 2, 4,-2,17 } }, + { 1, 2, { 18,17, 2, 3, 5,18, 6,-2, 7, 3, 2, 4,18, 8,-1, 5 } }, + { 0, 2, { 1,18,-1,18, 3, 2, 4, 6,-3, 7,-1, 5, 1, 2, 3, 8 } }, + { 1, 1, { 1,18,-1, 8, 2, 6, 3,-2, 1, 2, 5, 4,-3, 8, 6, 3 } }, + { 0, 1, { 18,18, 2,18, 2,18, 7, 6,18, 2,-2, 3, 5, 4,18, 8 } }, + { 1, 2, { 18,17, 2, 3,18,-1, 2, 3, 6,18, 5, 4, 3, 7, 2, 8 } }, + { 1, 2, { 18,18, 3,-2, 4,18, 5, 7, 6, 2, 4,-3, 8, 5,18, 3 } }, + { 1, 1, { 17,-2,18,18, 2, 5, 3, 8, 2,-1, 6, 1, 3, 4, 7, 5 } }, + { 1, 1, { 3,17,18, 5, 7, 2, 4, 6, 1, 8,-1, 3, 7, 4, 1, 2 } }, + { 0, 2, { 1,-2, 2,18, 3, 5, 2, 4, 7,-1, 2, 3, 5,18,-2, 4 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 1, 2,-2, 6,18,-3, 2, 7, 3,-2, 5, 6, 1, 8, 2, 4 } }, + { 0, 1, { 18,18,18, 3,-2, 6,18, 2, 4, 3, 5, 8, 7, 6, 2,-2 } }, + { 1, 1, { 1, 5, 1, 3, 4, 3, 7, 5, 1, 3, 6, 1, 2, 4, 3, 8 } }, + { 0, 1, { 3,17,18, 2, 5,18, 6, 7, 5,-2, 2, 4,18, 3, 6, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 2, { 17,-1,18, 2, 4,-1, 8, 3,18, 7,-3, 4, 5, 1, 2,-2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 8, 6, 4, 5, 7,-1 } }, + { 1, 1, { 18,18, 3, 6, 4, 8,-2, 2, 5, 3, 7,18, 6, 8, 4, 2 } }, + { 1, 1, { 17,18,18,-2, 5, 2, 3, 1, 4,-1, 8, 6, 5, 3, 2,18 } }, + { 1, 1, { 17,17, 1, 2, 4, 5, 2, 6,-1, 3, 1, 1,-2, 4, 2, 7 } }, + { 1, 1, { 17, 1, 7, 2, 3,18,-2, 3, 6, 4, 2, 7, 8, 5, 3,17 } }, + { 0, 1, { 18,17,-2,-3, 1, 2, 3, 2, 5, 4, 7,-3, 6,-2, 2, 1 } }, + { 1, 1, { 1, 3, 5,18, 1, 2, 7, 3, 6, 2, 5, 8,-1, 1, 4, 7 } }, + { 1, 1, { 17, 3, 6, 8, 1, 4, 5, 3,-2, 7, 2, 8, 5, 6,18, 3 } }, + { 1, 1, { 17,18, 2, 4, 8,-2, 3, 1, 5, 6, 7, 1, 2, 3, 4, 7 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 3, 1, 8,18, 5, 2, 3,18, 6, 7,-2, 4, 3, 2, 8,18 } }, + { 0, 1, { 18,17, 2,18, 3, 4,-1,18, 7, 6, 2, 8, 4,18,18, 5 } }, + { 0, 1, { 18,18, 2,18,18, 2, 7,-2, 6, 5, 4, 3,18, 3, 2,17 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 8,18, 3, 2, 1, 5, 4, 6,-1, 3,-3, 8,18, 7, 2 } }, + { 1, 2, { 18,17,18, 2, 3, 5,-2,18, 6,-1, 2, 3, 7, 4, 8,17 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 8, 6, 4, 5, 7,-1 } }, + { 1, 2, { 18,18,-2,17, 2,18, 3, 4,18, 8, 7,-1, 2, 4, 5,17 } }, + { 0, 2, { 17,-3,17, 3, 2,-2,18, 8, 4,-3, 2,18, 5, 3,-2, 6 } }, + { 0, 1, { 18,18, 2,18,18, 2, 7,-2, 6, 5, 4, 3,18, 3, 2,17 } }, + { 0, 2, { 1,18,-1, 3, 5, 2,-3,18, 7, 3,-1, 6, 4, 2,17, 5 } }, + { 1, 1, { 17,-2,17, 2,-3, 1, 5,-1, 4, 6, 3, 2, 8, 7,-2, 5 } }, + { 1, 1, { 1,18, 1, 3, 5, 8, 6, 2, 3,-1, 7, 1, 4, 8, 5,-3 } }, + { 0, 2, { 3,18,18, 2,18,-2, 6, 5, 7, 2, 4,18, 3, 6,-3, 5 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 3, 6,17, 8, 7, 5,18,-1, 1, 2, 3, 4, 2, 6, 8, 1 } }, + { 0, 4, { 18, 2,17, 3,18,-2, 2, 6,18, 2, 7, 3, 5, 4, 8,18 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 18,18, 2, 3, 6, 3, 5,-2, 2, 4,18, 3,-2,-1, 6, 7 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 1, 2, 5, 3,-2, 1, 4, 3, 7, 6,-3, 2, 1, 1, 2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 18,18,-2,18,-2, 2, 3, 6,18, 4,-1, 2, 3, 8, 1, 4 } }, + { 1, 1, { 17,-2,17, 2,-3, 1, 5,-1, 4, 6, 3, 2, 8, 7,-2, 5 } }, + { 0, 1, { 17,17,18, 3, 2,18,18, 6, 8, 2,-2, 3, 5, 4,17,18 } }, + { 1, 1, { 1, 5, 1, 3, 4, 3, 7, 5, 1, 3, 6, 1, 2, 4, 3, 8 } }, + { 1, 1, { 1, 3,-3,18,18, 6, 5,18, 2,-1, 3, 8, 7,-3, 4,17 } }, + { 1, 1, { 18, 1, 2, 1, 3, 8, 7, 4, 1, 5, 2,-1,-3,18, 6, 2 } }, + { 0, 1, { 18, 3, 5, 2, 6, 8,18, 5, 7, 2, 3,-1, 6, 7, 8, 5 } }, + { 0, 2, { 18, 3,-2, 7, 8, 2, 5, 4,-3, 8, 3, 2,18, 5, 4, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 3, { 1, 1, 2, 5, 2, 7, 4, 3,-1,18,-2, 8, 2, 1, 6, 7 } }, + { 0, 1, { 3,17,18, 5, 2, 6, 7,18, 4, 5, 3, 6,18, 2, 7, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 1,18, 1, 2, 3, 5, 1, 2, 6, 7, 4, 3, 8, 1,17, 5 } }, + { 1, 2, { 17,-1,18,-2, 2, 3, 5,18, 2, 4, 6, 7, 3,-1, 5, 8 } }, + { 1, 1, { 18,18,-3,18,-2, 2, 3,-2,18, 6, 4, 5, 8, 3,17,-3 } }, + { 1, 1, { 18, 7, 6, 5, 5, 3, 1, 4, 2, 7, 3, 4,-3, 6,18, 8 } }, + { 0, 2, { 18,18, 2, 3, 5,18, 2, 4, 3, 6,18, 7, 8,-1, 5, 2 } }, + { 0, 1, { 18,17,-1, 2,18, 3, 2,18, 4, 3,18, 2, 6, 5, 8,17 } }, + { 0, 2, { 18,17, 2, 3,18, 5,-1, 6, 7, 8, 2, 3, 4, 5,18, 6 } }, + { 1, 2, { 18,-3,18, 2, 3,-2,-3, 5,18, 7, 6, 2, 4, 3, 8,-2 } }, + { 1, 1, { 17,18,18,-2, 2, 3, 5, 4, 8,18,-1, 5, 3, 6,-2, 7 } }, + { 1, 2, { 18,17, 2,-2,18, 3,-1, 4,18, 2, 7, 5, 3, 8, 6, 4 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 1, 5, 1, 3, 4, 3, 7, 5, 1, 3, 6, 1, 2, 4, 3, 8 } }, + { 0, 2, { 18,18, 3, 3,-2, 2, 5,18, 6, 3,-1, 4, 7,-1, 1, 2 } }, + { 0, 1, { -2, 1,18, 2,-2, 5, 7,18, 3, 2, 6, 2,-1, 4,-2,17 } }, + { 0, 2, { 18,18,18, 2, 3,-2,18, 5, 4, 2, 6, 8, 3,-2, 4,18 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17,18,-1, 3, 2, 5, 1, 3, 2, 8, 4, 7, 6, 2,-1, 5 } }, + { 1, 1, { 17,18,18, 4, 2, 3, 7, 6,18, 8, 5,-1, 4, 2, 3,17 } }, + { 0, 1, { 18,18,-2,18, 2, 3, 4, 5, 6,18, 8, 2, 3, 7,-2, 4 } }, + { 0, 1, { 18,-2,18,18,-3,-2, 2, 3, 5, 8, 1, 2, 6, 4, 7,-1 } }, + { 0, 1, { 18,17, 2,18, 3,-2, 2, 7, 6, 4,18, 3, 8, 7, 4, 2 } }, + { 1, 1, { 17,18,18, 4, 2, 3, 7, 6,18, 8, 5,-1, 4, 2, 3,17 } }, + { 1, 1, { 18,17,18, 2, 5, 3,-2,18, 6, 2, 3, 4, 8, 7, 5,-1 } }, + { 0, 1, { 2,-1,18,-1, 2, 4,-3,18, 5, 3, 6,18, 2, 4, 7, 8 } }, + { 1, 1, { 17,18, 8, 3, 6, 4,-1, 5, 2, 7, 3, 8, 6, 5,18, 4 } }, + { 0, 2, { 18, 3,-2, 7, 8, 2, 5, 4,-3, 8, 3, 2,18, 5, 4, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 1,18,-1, 8, 2, 6, 3,-2, 1, 2, 5, 4,-3, 8, 6, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 17,18,18, 4, 2, 7, 3, 6,-2,18, 8, 4, 5, 2, 7,17 } }, + { 1, 2, { 18,-1,18, 3,-2,18, 2, 5, 3, 6, 7, 2,-1,18, 8, 4 } }, + { 1, 2, { 1,18,-2, 4,18, 2, 3, 6,-1, 7, 5,-2,18, 8, 2, 4 } }, + { 1, 2, { 1,18,-3, 2, 3,18,-1, 5, 6, 2, 8, 3, 4, 1,-2, 7 } }, + { 0, 1, { 1,17,-1,18, 3, 2, 5, 4, 6, 7, 8, 3, 4, 2, 1,-2 } }, + { 1, 1, { 18,17,18, 4, 3, 5, 1, 2, 6, 3, 4, 7, 1, 8, 5, 2 } }, + { 0, 1, { 18,-2, 7, 1, 3, 2,-3, 4, 6,-2, 7, 8, 1, 5, 4, 3 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 2, { 18,18,18,-2, 2, 5, 3, 7,18, 2, 4,-3, 5, 6, 3, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 3, { 3,18,-1, 5, 2, 7,18, 6, 5, 2, 4, 3,-1, 7,18, 6 } }, + { 0, 2, { 18,18,18, 4, 3, 2, 6, 4, 8,18, 5, 3, 2, 7,-2, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 2, { 18,18,18, 2, 3,-2,18, 5, 4, 2, 6, 8, 3,-2, 4,18 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 8,18, 3, 2, 1, 5, 4, 6,-1, 3,-3, 8,18, 7, 2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18,18, 2, 4, 6,-2, 2, 8, 3, 4,18, 7,-1, 6 } }, + { 0, 1, { 18, 1,-2, 2, 4, 1, 3,-1, 2, 5, 7, 1, 6, 8,-2,17 } }, + { 0, 1, { 17,17,18, 2, 5, 4,18, 3, 8, 7, 4, 6, 8, 1, 5, 2 } }, + { 1, 2, { 18,18, 5, 4, 6, 3, 4,18, 8, 4,-1, 7, 5, 3, 6, 2 } }, + { 0, 1, { 18,18,-3,18, 3, 6, 2, 5, 7,18, 3, 8,-1, 4, 5, 2 } }, + { 1, 1, { 18, 2,-2,-3,18, 5, 2,-2, 4, 3, 6,18, 8,-1, 2, 7 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17, 1, 7, 2, 3,18,-2, 3, 6, 4, 2, 7, 8, 5, 3,17 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 17,18, 3,18, 2, 5, 4, 7,-3, 6, 3, 2,18, 4, 7, 3 } }, + { 1, 1, { 1, 7, 4, 5, 3, 4, 5, 1, 3, 6, 3, 2, 4, 8,-2, 7 } }, + { 0, 1, { 1,18,-1,-2,18, 3, 2,-1, 6, 7, 4, 5, 3,18, 2,-3 } }, + { 1, 1, { 18,18,-1, 3, 6,18, 5, 4, 8, 2, 3, 6,18, 7, 4,-2 } }, + { 0, 2, { 18,18, 2, 6,18, 2,18, 5, 3,18, 2, 4, 7, 8, 3,18 } }, + { 1, 1, { 3,18,18, 5,18, 6, 2, 4, 7,-2,18, 5, 8, 6, 3, 2 } }, + { 0, 1, { 18,-2, 7, 1, 3, 2,-3, 4, 6,-2, 7, 8, 1, 5, 4, 3 } }, + { 1, 1, { 18,-2,18, 2, 5,18, 3,-2, 4, 7, 2,-1, 8, 6, 5, 1 } }, + { 1, 1, { 17,17, 5,18, 4, 1, 2, 8, 6, 4,-2, 3, 5,-1, 1, 8 } }, + { 0, 2, { 1, 2,17, 3, 7,18, 2,-1, 4, 5,18, 2, 7, 3, 6, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 3, 6,17, 8, 7, 5,18,-1, 1, 2, 3, 4, 2, 6, 8, 1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 2, { 18,18,18, 2,-2, 3, 6, 4, 8,18, 2, 5, 7, 4, 3, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 18, 1, 8, 3, 5, 6, 4,-1, 8, 3, 7,18, 2, 5, 8, 4 } }, + { 1, 1, { 17,18, 5, 2, 4, 3, 1, 6,-2, 1, 3, 2, 4, 5,-1,17 } }, + { 1, 1, { 18,17, 2,18, 3,-3, 7, 2, 6, 4, 3, 5,18, 8, 2,-2 } }, + { 1, 1, { 18,17,18, 4, 3, 5,-1,18, 2, 7, 8, 4, 6, 3,18, 5 } }, + { 0, 1, { 18,17,18,-2, 2,-3, 3, 4, 8, 5, 2,18, 6, 3, 7,-2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 17,18, 8, 3, 4, 6,18, 5,-2, 3, 8, 5, 2, 4, 7, 6 } }, + { 0, 1, { 18,-2, 3, 5, 1, 7, 3, 2, 6,-3, 4, 1, 5, 8, 3,-2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 3,17,18, 5,-1,18, 2, 6, 7,18, 5, 3,-3,-1, 6, 2 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 3, { 18,17,-2, 3,-1,18, 2, 5, 3, 7, 6, 2, 4, 8,18, 5 } }, + { 0, 1, { 18,-1,18, 2,18, 3, 5,18, 2, 8,18, 5, 4,-1, 6, 2 } }, + { 1, 2, { 18,-2,18,18, 2, 3, 4,-3, 2, 5,18, 7, 4, 3, 8, 6 } }, + { 0, 2, { 17,-1,18, 2,-1, 1, 7, 3, 8, 5,-2, 4, 1, 2,-3, 6 } }, + { 0, 1, { 18,17, 2,18, 2,18, 6, 7, 4, 3,18, 5, 2,-2,17, 8 } }, + { 0, 3, { 18,17, 2, 3,-3,-1,18, 2, 4, 5,18, 7, 3, 2,-3, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 2, { 3,18,18,18, 2, 6, 5,18, 7, 2, 4, 6,18, 5, 3, 8 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 18,18, 3, 6, 3,-2, 2,18, 5,-1, 7, 3, 4,-2, 2, 6 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 1, 1, { 18,17,18,18,-2, 2, 3,-3,18, 6, 4, 2,-2, 8, 3, 7 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { 18,18,18, 4, 2, 7, 8,18, 3, 2,-2, 4, 7, 6,17, 5 } }, + { 1, 1, { 18,18,-1,-2, 8, 3,18, 6, 3, 5, 8, 2, 4, 7, 1, 6 } }, + { 1, 1, { 1,-3, 3,18,18, 2,-1, 3, 6, 5,18, 4, 7,-2, 8, 3 } }, + { 1, 1, { 1,18, 4, 2, 5,18, 1, 3,-1, 6, 1, 4, 8, 2, 5, 1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, + { 0, 1, { -1,18,18, 2,18, 3, 5,18, 2,18, 6, 8, 4, 5, 7,-1 } }, +}; + +static const WavPackDecorrSpec * const decorr_filters[] = { + &fast_specs[0], &default_specs[0], &high_specs[0], &very_high_specs[0], +}; + +static const uint16_t decorr_filter_sizes[] = { + FF_ARRAY_ELEMS(fast_specs), + FF_ARRAY_ELEMS(default_specs), + FF_ARRAY_ELEMS(high_specs), + FF_ARRAY_ELEMS(very_high_specs), +}; + +static const uint8_t decorr_filter_nterms[] = { 2, 5, 10, 16 }; + +#endif /* AVCODEC_WAVPACKENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma.h new file mode 100644 index 00000000..c7fcf504 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma.h @@ -0,0 +1,161 @@ +/* + * WMA compatible codec + * Copyright (c) 2002-2007 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMA_H +#define AVCODEC_WMA_H + +#include "libavutil/float_dsp.h" + +#include "avcodec.h" +#include "fft.h" +#include "get_bits.h" +#include "put_bits.h" + +/* size of blocks */ +#define BLOCK_MIN_BITS 7 +#define BLOCK_MAX_BITS 11 +#define BLOCK_MAX_SIZE (1 << BLOCK_MAX_BITS) + +#define BLOCK_NB_SIZES (BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1) + +/* XXX: find exact max size */ +#define HIGH_BAND_MAX_SIZE 16 + +#define NB_LSP_COEFS 10 + +/* XXX: is it a suitable value ? */ +#define MAX_CODED_SUPERFRAME_SIZE 32768 + +#define MAX_CHANNELS 2 + +#define NOISE_TAB_SIZE 8192 + +#define LSP_POW_BITS 7 + +// FIXME should be in wmadec +#define VLCBITS 9 +#define VLCMAX ((22 + VLCBITS - 1) / VLCBITS) + +typedef float WMACoef; ///< type for decoded coefficients, int16_t would be enough for wma 1/2 + +typedef struct CoefVLCTable { + int n; ///< total number of codes + int max_level; + const uint32_t *huffcodes; ///< VLC bit values + const uint8_t *huffbits; ///< VLC bit size + const uint16_t *levels; ///< table to build run/level tables +} CoefVLCTable; + +typedef struct WMACodecContext { + AVCodecContext *avctx; + GetBitContext gb; + PutBitContext pb; + int version; ///< 1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2) + int use_bit_reservoir; + int use_variable_block_len; + int use_exp_vlc; ///< exponent coding: 0 = lsp, 1 = vlc + delta + int use_noise_coding; ///< true if perceptual noise is added + int byte_offset_bits; + VLC exp_vlc; + int exponent_sizes[BLOCK_NB_SIZES]; + uint16_t exponent_bands[BLOCK_NB_SIZES][25]; + int high_band_start[BLOCK_NB_SIZES]; ///< index of first coef in high band + int coefs_start; ///< first coded coef + int coefs_end[BLOCK_NB_SIZES]; ///< max number of coded coefficients + int exponent_high_sizes[BLOCK_NB_SIZES]; + int exponent_high_bands[BLOCK_NB_SIZES][HIGH_BAND_MAX_SIZE]; + VLC hgain_vlc; + + /* coded values in high bands */ + int high_band_coded[MAX_CHANNELS][HIGH_BAND_MAX_SIZE]; + int high_band_values[MAX_CHANNELS][HIGH_BAND_MAX_SIZE]; + + /* there are two possible tables for spectral coefficients */ +// FIXME the following 3 tables should be shared between decoders + VLC coef_vlc[2]; + uint16_t *run_table[2]; + float *level_table[2]; + uint16_t *int_table[2]; + const CoefVLCTable *coef_vlcs[2]; + /* frame info */ + int frame_len; ///< frame length in samples + int frame_len_bits; ///< frame_len = 1 << frame_len_bits + int nb_block_sizes; ///< number of block sizes + /* block info */ + int reset_block_lengths; + int block_len_bits; ///< log2 of current block length + int next_block_len_bits; ///< log2 of next block length + int prev_block_len_bits; ///< log2 of prev block length + int block_len; ///< block length in samples + int block_num; ///< block number in current frame + int block_pos; ///< current position in frame + uint8_t ms_stereo; ///< true if mid/side stereo mode + uint8_t channel_coded[MAX_CHANNELS]; ///< true if channel is coded + int exponents_bsize[MAX_CHANNELS]; ///< log2 ratio frame/exp. length + DECLARE_ALIGNED(32, float, exponents)[MAX_CHANNELS][BLOCK_MAX_SIZE]; + float max_exponent[MAX_CHANNELS]; + WMACoef coefs1[MAX_CHANNELS][BLOCK_MAX_SIZE]; + DECLARE_ALIGNED(32, float, coefs)[MAX_CHANNELS][BLOCK_MAX_SIZE]; + DECLARE_ALIGNED(32, FFTSample, output)[BLOCK_MAX_SIZE * 2]; + FFTContext mdct_ctx[BLOCK_NB_SIZES]; + const float *windows[BLOCK_NB_SIZES]; + /* output buffer for one frame and the last for IMDCT windowing */ + DECLARE_ALIGNED(32, float, frame_out)[MAX_CHANNELS][BLOCK_MAX_SIZE * 2]; + /* last frame info */ + uint8_t last_superframe[MAX_CODED_SUPERFRAME_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; /* padding added */ + int last_bitoffset; + int last_superframe_len; + int exponents_initialized[MAX_CHANNELS]; + float noise_table[NOISE_TAB_SIZE]; + int noise_index; + float noise_mult; /* XXX: suppress that and integrate it in the noise array */ + /* lsp_to_curve tables */ + float lsp_cos_table[BLOCK_MAX_SIZE]; + float lsp_pow_e_table[256]; + float lsp_pow_m_table1[(1 << LSP_POW_BITS)]; + float lsp_pow_m_table2[(1 << LSP_POW_BITS)]; + AVFloatDSPContext *fdsp; + +#ifdef TRACE + int frame_count; +#endif /* TRACE */ +} WMACodecContext; + +extern const uint16_t ff_wma_hgain_huffcodes[37]; +extern const uint8_t ff_wma_hgain_huffbits[37]; +extern const float ff_wma_lsp_codebook[NB_LSP_COEFS][16]; +extern const uint32_t ff_aac_scalefactor_code[121]; +extern const uint8_t ff_aac_scalefactor_bits[121]; + +av_warn_unused_result +int ff_wma_init(AVCodecContext *avctx, int flags2); + +int ff_wma_total_gain_to_bits(int total_gain); +int ff_wma_end(AVCodecContext *avctx); +unsigned int ff_wma_get_large_val(GetBitContext *gb); +int ff_wma_run_level_decode(AVCodecContext *avctx, GetBitContext *gb, + VLC *vlc, const float *level_table, + const uint16_t *run_table, int version, + WMACoef *ptr, int offset, int num_coefs, + int block_len, int frame_len_bits, + int coef_nb_bits); + +#endif /* AVCODEC_WMA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_common.h new file mode 100644 index 00000000..55404afc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_common.h @@ -0,0 +1,27 @@ +/* + * common code shared by all WMA variants + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMA_COMMON_H +#define AVCODEC_WMA_COMMON_H + +int ff_wma_get_frame_len_bits(int sample_rate, int version, + unsigned int decode_flags); + +#endif /* AVCODEC_WMA_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_freqs.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_freqs.h new file mode 100644 index 00000000..6fd93e4e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wma_freqs.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMA_FREQS_H +#define AVCODEC_WMA_FREQS_H + +#include + +extern const uint16_t ff_wma_critical_freqs[25]; + +#endif /* AVCODEC_WMA_FREQS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmadata.h new file mode 100644 index 00000000..641cb181 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmadata.h @@ -0,0 +1,1384 @@ +/* + * WMA compatible decoder + * copyright (c) 2002 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Various WMA tables. + */ + +#ifndef AVCODEC_WMADATA_H +#define AVCODEC_WMADATA_H + +#include + +#include "wma.h" + +/* first value is number of bands */ +static const uint8_t exponent_band_22050[3][25] = { + { 10, 4, 8, 4, 8, 8, 12, 20, 24, 24, 16, }, + { 14, 4, 8, 8, 4, 12, 12, 16, 24, 16, 20, 24, 32, 40, 36, }, + { 23, 4, 4, 4, 8, 4, 4, 8, 8, 8, 8, 8, 12, 12, 16, 16, + 24, 24, 32, 44, 48, 60, 84, 72, }, +}; + +static const uint8_t exponent_band_32000[3][25] = { + { 11, 4, 4, 8, 4, 4, 12, 16, 24, 20, 28, 4, }, + { 15, 4, 8, 4, 4, 8, 8, 16, 20, 12, 20, 20, 28, 40, 56, 8, }, + { 16, 8, 4, 8, 8, 12, 16, 20, 24, 40, 32, 32, 44, 56, 80, 112, 16, }, +}; + +static const uint8_t exponent_band_44100[3][25] = { + { 12, 4, 4, 4, 4, 4, 8, 8, 8, 12, 16, 20, 36, }, + { 15, 4, 8, 4, 8, 8, 4, 8, 8, 12, 12, 12, 24, 28, 40, 76, }, + { 17, 4, 8, 8, 4, 12, 12, 8, 8, 24, 16, 20, 24, 32, 40, 60, 80, 152, }, +}; + +const uint16_t ff_wma_hgain_huffcodes[37] = { + 0x00003, 0x002e7, 0x00001, 0x005cd, 0x0005d, 0x005c9, 0x0005e, 0x00003, + 0x00016, 0x0000b, 0x00001, 0x00006, 0x00001, 0x00006, 0x00004, 0x00005, + 0x00004, 0x00007, 0x00003, 0x00007, 0x00004, 0x0000a, 0x0000a, 0x00002, + 0x00003, 0x00000, 0x00005, 0x00002, 0x0005f, 0x00004, 0x00003, 0x00002, + 0x005c8, 0x000b8, 0x005ca, 0x005cb, 0x005cc, +}; + +const uint8_t ff_wma_hgain_huffbits[37] = { + 10, 12, 10, 13, 9, 13, 9, 8, 7, 5, 5, 4, 4, 3, 3, 3, + 4, 3, 4, 4, 5, 5, 6, 8, 7, 10, 8, 10, 9, 8, 9, 9, + 13, 10, 13, 13, 13, +}; + +const float ff_wma_lsp_codebook[NB_LSP_COEFS][16] = { + { 1.98732877, 1.97944528, 1.97179088, 1.96260549, 1.95038374, 1.93336114, 1.90719232, 1.86191415, }, + { 1.97260000, 1.96083160, 1.94982586, 1.93806164, 1.92516608, 1.91010199, 1.89232331, 1.87149812, + 1.84564818, 1.81358067, 1.77620070, 1.73265264, 1.67907855, 1.60959081, 1.50829650, 1.33120330, }, + { 1.90109110, 1.86482426, 1.83419671, 1.80168452, 1.76650116, 1.72816320, 1.68502700, 1.63738256, + 1.58501580, 1.51795181, 1.43679906, 1.33950585, 1.24176208, 1.12260729, 0.96749668, 0.74048265, }, + { 1.76943864, 1.67822463, 1.59946365, 1.53560582, 1.47470796, 1.41210167, 1.34509536, 1.27339507, + 1.19303814, 1.09765169, 0.98818722, 0.87239446, 0.74369172, 0.59768184, 0.43168630, 0.17977021, }, + { 1.43428349, 1.32038354, 1.21074086, 1.10577988, 1.00561746, 0.90335924, 0.80437489, 0.70709671, + 0.60427395, 0.49814048, 0.38509539, 0.27106800, 0.14407416, 0.00219910, -0.16725141, -0.36936085, }, + { 0.99895687, 0.84188166, 0.70753739, 0.57906595, 0.47055563, 0.36966965, 0.26826648, 0.17163380, + 0.07208392, -0.03062936, -1.40037388, -0.25128968, -0.37213937, -0.51075646, -0.64887512, -0.80308031, }, + { 0.26515280, 0.06313551, -0.08872080, -0.21103548, -0.31069678, -0.39680323, -0.47223474, -0.54167135, + -0.61444740, -0.68943343, -0.76580211, -0.85170082, -0.95289061, -1.06514703, -1.20510707, -1.37617746, }, + { -0.53940301, -0.73770929, -0.88424876, -1.01117930, -1.13389091, -1.26830073, -1.42041987, -1.62033919, + -1.10158808, -1.16512566, -1.23337128, -1.30414401, -1.37663312, -1.46853845, -1.57625798, -1.66893638, }, + { -0.38601997, -0.56009350, -0.66978483, -0.76028471, -0.83846064, -0.90868087, -0.97408881, -1.03694962, }, + { -1.56144989, -1.65944032, -1.72689685, -1.77857740, -1.82203011, -1.86220079, -1.90283983, -1.94820479, }, +}; + +static const uint32_t coef0_huffcodes[666] = { + 0x00258, 0x0003d, 0x00000, 0x00005, 0x00008, 0x00008, 0x0000c, 0x0001b, + 0x0001f, 0x00015, 0x00024, 0x00032, 0x0003a, 0x00026, 0x0002c, 0x0002f, + 0x0004a, 0x0004d, 0x00061, 0x00070, 0x00073, 0x00048, 0x00052, 0x0005a, + 0x0005d, 0x0006e, 0x00099, 0x0009e, 0x000c1, 0x000ce, 0x000e4, 0x000f0, + 0x00093, 0x0009e, 0x000a2, 0x000a1, 0x000b8, 0x000d2, 0x000d3, 0x0012e, + 0x00130, 0x000de, 0x0012d, 0x0019b, 0x001e4, 0x00139, 0x0013a, 0x0013f, + 0x0014f, 0x0016d, 0x001a2, 0x0027c, 0x0027e, 0x00332, 0x0033c, 0x0033f, + 0x0038b, 0x00396, 0x003c5, 0x00270, 0x0027c, 0x0025a, 0x00395, 0x00248, + 0x004bd, 0x004fb, 0x00662, 0x00661, 0x0071b, 0x004e6, 0x004ff, 0x00666, + 0x0071c, 0x0071a, 0x0071f, 0x00794, 0x00536, 0x004e2, 0x0078e, 0x004ee, + 0x00518, 0x00535, 0x004fb, 0x0078d, 0x00530, 0x00680, 0x0068f, 0x005cb, + 0x00965, 0x006a6, 0x00967, 0x0097f, 0x00682, 0x006ae, 0x00cd0, 0x00e28, + 0x00f13, 0x00f1f, 0x009f5, 0x00cd3, 0x00f11, 0x00926, 0x00964, 0x00f32, + 0x00f12, 0x00f30, 0x00966, 0x00d0b, 0x00a68, 0x00b91, 0x009c7, 0x00b73, + 0x012fa, 0x0131d, 0x013f9, 0x01ca0, 0x0199c, 0x01c7a, 0x0198c, 0x01248, + 0x01c74, 0x01c64, 0x0139e, 0x012fd, 0x00a77, 0x012fc, 0x01c7b, 0x012ca, + 0x014cc, 0x014d2, 0x014e3, 0x014dc, 0x012dc, 0x03344, 0x02598, 0x0263c, + 0x0333b, 0x025e6, 0x01a1c, 0x01e3c, 0x014e2, 0x033d4, 0x01a11, 0x03349, + 0x03cce, 0x014e1, 0x01a34, 0x0273e, 0x02627, 0x0273f, 0x038ee, 0x03971, + 0x03c67, 0x03c61, 0x0333d, 0x038c2, 0x0263f, 0x038cd, 0x02638, 0x02e41, + 0x0351f, 0x03348, 0x03c66, 0x03562, 0x02989, 0x027d5, 0x0333c, 0x02e4f, + 0x0343b, 0x02ddf, 0x04bc8, 0x029c0, 0x02e57, 0x04c72, 0x025b7, 0x03547, + 0x03540, 0x029d3, 0x04c45, 0x025bb, 0x06600, 0x04c73, 0x04bce, 0x0357b, + 0x029a6, 0x029d2, 0x0263e, 0x0298a, 0x07183, 0x06602, 0x07958, 0x04b66, + 0x0537d, 0x05375, 0x04fe9, 0x04b67, 0x0799f, 0x04bc9, 0x051fe, 0x06a3b, + 0x05bb6, 0x04fa8, 0x0728f, 0x05376, 0x0492c, 0x0537e, 0x0795a, 0x06a3c, + 0x0e515, 0x07887, 0x0683a, 0x051f9, 0x051fd, 0x0cc6a, 0x06a8a, 0x0cc6d, + 0x05bb3, 0x0683b, 0x051fc, 0x05378, 0x0728e, 0x07886, 0x05bb7, 0x0f2a4, + 0x0795b, 0x0683c, 0x09fc1, 0x0683d, 0x0b752, 0x09678, 0x0a3e8, 0x06ac7, + 0x051f0, 0x0b759, 0x06af3, 0x04b6b, 0x0f2a0, 0x0f2ad, 0x096c3, 0x0e518, + 0x0b75c, 0x0d458, 0x0cc6b, 0x0537c, 0x067aa, 0x04fea, 0x0343a, 0x0cc71, + 0x0967f, 0x09fc4, 0x096c2, 0x0e516, 0x0f2a1, 0x0d45c, 0x0d45d, 0x0d45e, + 0x12fb9, 0x0967e, 0x1982f, 0x09883, 0x096c4, 0x0b753, 0x12fb8, 0x0f2a8, + 0x1ca21, 0x096c5, 0x0e51a, 0x1ca27, 0x12f3c, 0x0d471, 0x0f2aa, 0x0b75b, + 0x12fbb, 0x0f2a9, 0x0f2ac, 0x0d45a, 0x0b74f, 0x096c8, 0x16e91, 0x096ca, + 0x12fbf, 0x0d0a7, 0x13103, 0x0d516, 0x16e99, 0x12cbd, 0x0a3ea, 0x19829, + 0x0b755, 0x29ba7, 0x1ca28, 0x29ba5, 0x16e93, 0x1982c, 0x19828, 0x25994, + 0x0a3eb, 0x1ca29, 0x16e90, 0x1ca25, 0x1982d, 0x1ca26, 0x16e9b, 0x0b756, + 0x0967c, 0x25997, 0x0b75f, 0x198d3, 0x0b757, 0x19a2a, 0x0d45b, 0x0e517, + 0x1ca24, 0x1ca23, 0x1ca22, 0x0b758, 0x16e97, 0x0cd14, 0x13100, 0x00007, + 0x0003b, 0x0006b, 0x00097, 0x00138, 0x00125, 0x00173, 0x00258, 0x00335, + 0x0028e, 0x004c6, 0x00715, 0x00729, 0x004ef, 0x00519, 0x004ed, 0x00532, + 0x0068c, 0x00686, 0x00978, 0x00e5d, 0x00e31, 0x009f4, 0x00b92, 0x012f8, + 0x00d06, 0x00a67, 0x00d44, 0x00a76, 0x00d59, 0x012cd, 0x01c78, 0x01c75, + 0x0199f, 0x0198f, 0x01c67, 0x014c6, 0x01c79, 0x01c76, 0x00b94, 0x00d1b, + 0x01e32, 0x01e31, 0x01ab0, 0x01a05, 0x01aa1, 0x0333a, 0x025e5, 0x02626, + 0x03541, 0x03544, 0x03421, 0x03546, 0x02e55, 0x02e56, 0x0492d, 0x02dde, + 0x0299b, 0x02ddc, 0x0357a, 0x0249c, 0x0668b, 0x1c77f, 0x1ca20, 0x0d45f, + 0x09886, 0x16e9a, 0x0f2a7, 0x0b751, 0x0a3ee, 0x0cf59, 0x0cf57, 0x0b754, + 0x0d0a6, 0x16e98, 0x0b760, 0x06ac6, 0x0a3f0, 0x12fbe, 0x13104, 0x0f2a5, + 0x0a3ef, 0x0d472, 0x12cba, 0x1982e, 0x16e9c, 0x1c77e, 0x198d0, 0x13105, + 0x16e92, 0x0b75d, 0x0d459, 0x0001a, 0x000c0, 0x0016c, 0x003cd, 0x00350, + 0x0067b, 0x0051e, 0x006a9, 0x009f4, 0x00b72, 0x00d09, 0x01249, 0x01e3d, + 0x01ca1, 0x01a1f, 0x01721, 0x01a8a, 0x016e8, 0x03347, 0x01a35, 0x0249d, + 0x0299a, 0x02596, 0x02e4e, 0x0298b, 0x07182, 0x04c46, 0x025ba, 0x02e40, + 0x027d6, 0x04fe8, 0x06607, 0x05310, 0x09884, 0x072e1, 0x06a3d, 0x04b6a, + 0x04c7a, 0x06603, 0x04c7b, 0x03428, 0x06605, 0x09664, 0x09fc0, 0x071de, + 0x06601, 0x05bb2, 0x09885, 0x0a3e2, 0x1c61f, 0x12cbb, 0x0b750, 0x0cf58, + 0x0967d, 0x25995, 0x668ad, 0x0b75a, 0x09fc2, 0x0537f, 0x0b75e, 0x13fae, + 0x12fbc, 0x00031, 0x001c4, 0x004c5, 0x005b8, 0x00cf4, 0x0096f, 0x00d46, + 0x01e57, 0x01a04, 0x02625, 0x03346, 0x028f9, 0x04c47, 0x072e0, 0x04b69, + 0x03420, 0x07957, 0x06639, 0x0799e, 0x07959, 0x07881, 0x04b68, 0x09fc3, + 0x09fd6, 0x0cc70, 0x0a3f1, 0x12cbe, 0x0e30e, 0x0e51b, 0x06af2, 0x12cbc, + 0x1c77d, 0x0f2ab, 0x12fbd, 0x1aa2f, 0x0a3ec, 0x0d473, 0x05377, 0x0a3e9, + 0x1982b, 0x0e300, 0x12f3f, 0x0cf5f, 0x096c0, 0x38c3c, 0x16e94, 0x16e95, + 0x12f3d, 0x29ba4, 0x29ba6, 0x1c77c, 0x6a8ba, 0x3545c, 0x33457, 0x668ac, + 0x6a8bb, 0x16e9d, 0x0e519, 0x25996, 0x12f3e, 0x00036, 0x0033e, 0x006ad, + 0x00d03, 0x012c8, 0x0124a, 0x03c42, 0x03ccd, 0x06606, 0x07880, 0x06852, + 0x06a3a, 0x05bb4, 0x0f2a2, 0x09fc7, 0x12cb9, 0x0cc6c, 0x0a6e8, 0x096c1, + 0x0004a, 0x00355, 0x012f9, 0x014e8, 0x01abe, 0x025b6, 0x0492e, 0x09fc6, + 0x051ff, 0x0cc6f, 0x096cb, 0x0d071, 0x198d1, 0x12cb8, 0x38c3d, 0x13faf, + 0x096c9, 0x0009d, 0x00539, 0x012ce, 0x0341f, 0x029c1, 0x04b33, 0x0a3e3, + 0x0d070, 0x16e96, 0x0b763, 0x000a0, 0x009ce, 0x038cc, 0x0343d, 0x051fa, + 0x09888, 0x12fba, 0x000df, 0x00a75, 0x029a7, 0x09fc5, 0x0e301, 0x0967b, + 0x001e7, 0x012c9, 0x051fb, 0x09889, 0x0f2a6, 0x0016f, 0x01cb9, 0x0cf5a, + 0x12cbf, 0x09679, 0x00272, 0x01a15, 0x0967a, 0x003cb, 0x025f6, 0x0b762, + 0x0028d, 0x03c60, 0x0cf5e, 0x00352, 0x03ccc, 0x0072f, 0x07186, 0x004ec, + 0x05379, 0x0068e, 0x09887, 0x006a7, 0x06af1, 0x00e29, 0x0cf5b, 0x00f31, + 0x0d470, 0x009c6, 0x013fb, 0x13102, 0x019a5, 0x13101, 0x01983, 0x01c65, + 0x0124f, 0x014c7, 0x01726, 0x01abf, 0x03304, 0x02624, 0x03c41, 0x027d7, + 0x02ddd, 0x02e54, 0x0343c, 0x06604, 0x07181, 0x0663a, 0x04fa9, 0x0663b, + 0x05311, 0x0537a, 0x06839, 0x05bb5, 0x0492f, 0x06af0, 0x096c7, 0x0cc6e, + 0x0537b, 0x0cf5c, 0x0cf56, 0x198d2, 0x0cf5d, 0x0a3ed, 0x0f2a3, 0x1982a, + 0x0b761, 0x096c6, +}; + +static const uint8_t coef0_huffbits[666] = { + 11, 6, 2, 3, 4, 5, 5, 5, + 5, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 10, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 11, 12, + 12, 12, 12, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 13, 13, 12, + 12, 12, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, + 13, 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, + 15, 14, 14, 15, 15, 15, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 14, 15, 15, 15, 15, 16, + 16, 16, 15, 16, 15, 15, 16, 16, + 16, 16, 15, 16, 16, 16, 15, 16, + 16, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 15, 15, 16, 16, + 15, 16, 16, 16, 17, 17, 17, 16, + 16, 17, 16, 16, 16, 16, 17, 16, + 17, 17, 16, 16, 15, 15, 15, 16, + 17, 16, 17, 16, 16, 17, 17, 17, + 17, 17, 17, 16, 17, 17, 17, 16, + 17, 17, 16, 17, 17, 17, 16, 17, + 17, 16, 16, 17, 17, 17, 18, 17, + 17, 17, 17, 17, 18, 18, 17, 17, + 17, 19, 17, 19, 18, 17, 17, 18, + 17, 17, 18, 17, 17, 17, 18, 17, + 17, 18, 17, 17, 17, 17, 17, 16, + 17, 17, 17, 17, 18, 16, 17, 4, + 6, 8, 9, 9, 10, 10, 10, 10, + 11, 11, 11, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 13, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, + 15, 15, 15, 15, 15, 15, 16, 15, + 15, 15, 15, 15, 15, 17, 17, 17, + 16, 18, 16, 17, 17, 16, 16, 17, + 17, 18, 17, 16, 17, 17, 17, 16, + 17, 17, 18, 17, 18, 17, 17, 17, + 18, 17, 17, 5, 8, 10, 10, 11, + 11, 12, 12, 12, 13, 13, 14, 13, + 13, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 16, 15, 16, 16, + 15, 15, 15, 15, 15, 16, 16, 15, + 15, 16, 16, 17, 17, 18, 17, 16, + 17, 18, 19, 17, 16, 16, 17, 17, + 17, 6, 9, 11, 12, 12, 13, 13, + 13, 14, 14, 14, 15, 15, 15, 16, + 15, 15, 15, 15, 15, 15, 16, 16, + 16, 16, 17, 18, 16, 16, 16, 18, + 17, 16, 17, 18, 17, 17, 16, 17, + 17, 16, 17, 16, 17, 18, 18, 18, + 17, 19, 19, 17, 20, 19, 18, 19, + 20, 18, 16, 18, 17, 7, 10, 12, + 13, 13, 14, 14, 14, 15, 15, 16, + 16, 16, 16, 16, 18, 16, 17, 17, + 8, 11, 13, 14, 14, 15, 16, 16, + 16, 16, 17, 17, 17, 18, 18, 17, + 17, 8, 12, 14, 15, 15, 15, 17, + 17, 18, 17, 9, 12, 14, 15, 16, + 16, 17, 9, 13, 15, 16, 16, 17, + 9, 13, 16, 16, 16, 10, 13, 16, + 18, 17, 10, 14, 17, 10, 14, 17, + 11, 14, 16, 11, 14, 11, 15, 12, + 16, 12, 16, 12, 16, 12, 16, 12, + 17, 13, 13, 17, 13, 17, 13, 13, + 14, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 15, 15, 15, 15, 16, 15, + 16, 16, 16, 16, 16, 16, 17, 16, + 16, 16, 16, 17, 16, 17, 16, 17, + 17, 17, +}; + +static const uint32_t coef1_huffcodes[555] = { + 0x00115, 0x00002, 0x00001, 0x00000, 0x0000d, 0x00007, 0x00013, 0x0001d, + 0x00008, 0x0000c, 0x00023, 0x0002b, 0x0003f, 0x00017, 0x0001b, 0x00043, + 0x00049, 0x00050, 0x00055, 0x00054, 0x00067, 0x00064, 0x0007b, 0x0002d, + 0x00028, 0x0002a, 0x00085, 0x00089, 0x0002b, 0x00035, 0x00090, 0x00091, + 0x00094, 0x00088, 0x000c1, 0x000c6, 0x000f2, 0x000e3, 0x000c5, 0x000e2, + 0x00036, 0x000f0, 0x000a7, 0x000cd, 0x000fb, 0x00059, 0x00116, 0x00103, + 0x00108, 0x0012b, 0x0012d, 0x00188, 0x0012e, 0x0014c, 0x001c3, 0x00187, + 0x001e7, 0x0006f, 0x00094, 0x00069, 0x001e6, 0x001ca, 0x00147, 0x00195, + 0x000a7, 0x00213, 0x00209, 0x00303, 0x00295, 0x00289, 0x0028c, 0x0028d, + 0x00312, 0x00330, 0x0029b, 0x00308, 0x00328, 0x0029a, 0x0025e, 0x003c5, + 0x00384, 0x0039f, 0x00397, 0x00296, 0x0032e, 0x00332, 0x003c6, 0x003e6, + 0x0012d, 0x000d1, 0x00402, 0x000dd, 0x00161, 0x0012b, 0x00127, 0x0045d, + 0x00601, 0x004ab, 0x0045f, 0x00410, 0x004bf, 0x00528, 0x0045c, 0x00424, + 0x00400, 0x00511, 0x00618, 0x0073d, 0x0063a, 0x00614, 0x0073c, 0x007c0, + 0x007cf, 0x00802, 0x00966, 0x00964, 0x00951, 0x008a0, 0x00346, 0x00803, + 0x00a52, 0x0024a, 0x007c1, 0x0063f, 0x00126, 0x00406, 0x00789, 0x008a2, + 0x00960, 0x00967, 0x00c05, 0x00c70, 0x00c79, 0x00a5d, 0x00c26, 0x00c4d, + 0x00372, 0x008a5, 0x00c08, 0x002c5, 0x00f11, 0x00cc4, 0x00f8e, 0x00e16, + 0x00496, 0x00e77, 0x00f9c, 0x00c25, 0x00f1e, 0x00c27, 0x00f1f, 0x00e17, + 0x00ccd, 0x00355, 0x00c09, 0x00c78, 0x00f90, 0x00521, 0x00357, 0x00356, + 0x0068e, 0x00f9d, 0x00c04, 0x00e58, 0x00a20, 0x00a2c, 0x00c4c, 0x0052f, + 0x00f8d, 0x01178, 0x01053, 0x01097, 0x0180f, 0x0180d, 0x012fb, 0x012aa, + 0x0202a, 0x00a40, 0x018ed, 0x01ceb, 0x01455, 0x018e3, 0x012a1, 0x00354, + 0x00353, 0x00f1c, 0x00c7b, 0x00c37, 0x0101d, 0x012cb, 0x01142, 0x0197d, + 0x01095, 0x01e3b, 0x0186b, 0x00588, 0x01c2a, 0x014b8, 0x01e3a, 0x018ec, + 0x01f46, 0x012fa, 0x00a53, 0x01ce8, 0x00a55, 0x01c29, 0x0117b, 0x01052, + 0x012a0, 0x00589, 0x00950, 0x01c2b, 0x00a50, 0x0208b, 0x0180e, 0x02027, + 0x02556, 0x01e20, 0x006e7, 0x01c28, 0x0197a, 0x00684, 0x020a2, 0x01f22, + 0x03018, 0x039cf, 0x03e25, 0x02557, 0x0294c, 0x028a6, 0x00d11, 0x028a9, + 0x02979, 0x00d46, 0x00a56, 0x039ce, 0x030cc, 0x0329a, 0x0149d, 0x0510f, + 0x0451c, 0x02028, 0x03299, 0x01ced, 0x014b9, 0x00f85, 0x00c7a, 0x01800, + 0x00341, 0x012ca, 0x039c8, 0x0329d, 0x00d0d, 0x03e20, 0x05144, 0x00d45, + 0x030d0, 0x0186d, 0x030d5, 0x00d0f, 0x00d40, 0x04114, 0x020a1, 0x0297f, + 0x03e24, 0x032f1, 0x04047, 0x030d4, 0x028a8, 0x00d0e, 0x0451d, 0x04044, + 0x0297e, 0x04042, 0x030d2, 0x030cf, 0x03e21, 0x03e26, 0x028a5, 0x0451a, + 0x00d48, 0x01a16, 0x00d44, 0x04518, 0x0149b, 0x039ca, 0x01498, 0x0403d, + 0x0451b, 0x0149c, 0x032f3, 0x030cb, 0x08073, 0x03e22, 0x0529a, 0x020aa, + 0x039cc, 0x0738a, 0x06530, 0x07389, 0x06193, 0x08071, 0x04043, 0x030ce, + 0x05147, 0x07388, 0x05145, 0x08072, 0x04521, 0x00d47, 0x0297c, 0x030cd, + 0x030ca, 0x0000b, 0x0000c, 0x00083, 0x000e4, 0x00048, 0x00102, 0x001cc, + 0x001f5, 0x00097, 0x0020b, 0x00124, 0x00453, 0x00627, 0x00639, 0x00605, + 0x00517, 0x001b8, 0x00663, 0x00667, 0x007c3, 0x00823, 0x00961, 0x00963, + 0x00e5a, 0x00e59, 0x00a2b, 0x00cbf, 0x00292, 0x00a2d, 0x007d0, 0x00953, + 0x00cc5, 0x00f84, 0x004ab, 0x014a7, 0x0068a, 0x0117a, 0x0052e, 0x01442, + 0x0052c, 0x00c77, 0x00f8f, 0x004aa, 0x01094, 0x01801, 0x012c4, 0x0297b, + 0x00952, 0x01f19, 0x006a5, 0x01149, 0x012c5, 0x01803, 0x022f2, 0x0329b, + 0x04520, 0x0149e, 0x00d13, 0x01f16, 0x01ce9, 0x0101c, 0x006e6, 0x039c9, + 0x06191, 0x07c8e, 0x06192, 0x0ca63, 0x039cd, 0x06190, 0x06884, 0x06885, + 0x07382, 0x00d49, 0x00d41, 0x0450c, 0x0149a, 0x030d1, 0x08077, 0x03e23, + 0x01a15, 0x0e701, 0x0e702, 0x08079, 0x0822a, 0x0a218, 0x07887, 0x0403f, + 0x0520b, 0x0529b, 0x0e700, 0x04519, 0x00007, 0x000e0, 0x000d0, 0x0039b, + 0x003e5, 0x00163, 0x0063e, 0x007c9, 0x00806, 0x00954, 0x01044, 0x01f44, + 0x0197c, 0x01f45, 0x00a51, 0x01f47, 0x00951, 0x0052d, 0x02291, 0x0092f, + 0x00a54, 0x00d12, 0x0297d, 0x00d0c, 0x01499, 0x0329e, 0x032f0, 0x02025, + 0x039c6, 0x00a57, 0x03e46, 0x00d42, 0x0738b, 0x05146, 0x04046, 0x08078, + 0x0510e, 0x07886, 0x02904, 0x04156, 0x04157, 0x06032, 0x030d3, 0x08bce, + 0x04040, 0x0403e, 0x0a414, 0x10457, 0x08075, 0x06887, 0x07c8f, 0x039c7, + 0x07387, 0x08070, 0x08bcf, 0x1482a, 0x10456, 0x1482b, 0x01a17, 0x06886, + 0x0450d, 0x00013, 0x0006b, 0x00615, 0x0080b, 0x0082b, 0x00952, 0x00e5b, + 0x018e2, 0x0186c, 0x01f18, 0x0329f, 0x00d43, 0x03e29, 0x05140, 0x05141, + 0x0ca62, 0x06033, 0x03c42, 0x03e28, 0x0450f, 0x0a21a, 0x07384, 0x0a219, + 0x0e703, 0x0a21b, 0x01a14, 0x07383, 0x045e6, 0x0007a, 0x0012c, 0x00ccc, + 0x0068f, 0x01802, 0x00a52, 0x00953, 0x04045, 0x01a20, 0x0451f, 0x000a4, + 0x00735, 0x01cec, 0x02029, 0x020a3, 0x0451e, 0x00069, 0x00c24, 0x02024, + 0x032f2, 0x05142, 0x00196, 0x00523, 0x000a6, 0x0197b, 0x0030b, 0x0092e, + 0x003e9, 0x03e27, 0x00160, 0x05143, 0x00652, 0x04041, 0x00734, 0x028a7, + 0x0080f, 0x01483, 0x0097c, 0x00340, 0x0068b, 0x00522, 0x01054, 0x01096, + 0x01f17, 0x0202b, 0x01cea, 0x020a0, 0x02978, 0x02026, 0x0297a, 0x039cb, + 0x03e2b, 0x0149f, 0x0329c, 0x07385, 0x08074, 0x0450e, 0x03e2a, 0x05149, + 0x08076, 0x07386, 0x05148, +}; + +static const uint8_t coef1_huffbits[555] = { + 9, 5, 2, 4, 4, 5, 5, 5, + 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, + 9, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 10, 10, 10, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 11, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 13, 12, 12, 12, 12, 12, 12, 12, + 13, 12, 12, 12, 12, 12, 12, 12, + 12, 13, 12, 12, 12, 13, 13, 13, + 13, 12, 12, 12, 12, 12, 12, 13, + 12, 13, 13, 13, 13, 13, 13, 13, + 14, 14, 13, 13, 13, 13, 13, 13, + 13, 12, 12, 12, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 13, 14, 13, 13, 13, + 13, 13, 14, 13, 14, 14, 13, 14, + 14, 13, 14, 13, 13, 14, 14, 13, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 15, 14, 14, 14, 14, 15, 15, + 15, 14, 14, 13, 13, 12, 12, 13, + 13, 13, 14, 14, 15, 14, 15, 15, + 14, 13, 14, 15, 15, 15, 14, 14, + 14, 14, 15, 14, 14, 15, 15, 15, + 14, 15, 14, 14, 14, 14, 14, 15, + 15, 16, 15, 15, 15, 14, 15, 15, + 15, 15, 14, 14, 16, 14, 15, 14, + 14, 15, 15, 15, 15, 16, 15, 14, + 15, 15, 15, 16, 15, 15, 14, 14, + 14, 4, 7, 8, 8, 9, 9, 9, + 9, 10, 10, 11, 11, 11, 11, 11, + 11, 12, 11, 11, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 11, 12, + 12, 12, 13, 13, 13, 13, 13, 13, + 13, 12, 12, 13, 13, 13, 13, 14, + 14, 13, 14, 13, 13, 13, 14, 14, + 15, 15, 14, 13, 13, 13, 14, 14, + 15, 15, 15, 16, 14, 15, 17, 17, + 15, 15, 15, 15, 15, 14, 16, 14, + 16, 16, 16, 16, 16, 16, 15, 15, + 17, 15, 16, 15, 6, 8, 10, 10, + 10, 11, 11, 11, 12, 12, 13, 13, + 13, 13, 14, 13, 14, 13, 14, 14, + 14, 14, 14, 15, 15, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 16, + 15, 15, 16, 15, 15, 15, 14, 16, + 15, 15, 18, 17, 16, 17, 15, 14, + 15, 16, 16, 19, 17, 19, 16, 17, + 15, 7, 10, 11, 12, 12, 12, 12, + 13, 13, 13, 14, 15, 14, 15, 15, + 16, 15, 14, 14, 15, 16, 15, 16, + 16, 16, 16, 15, 15, 7, 11, 12, + 13, 13, 14, 14, 15, 15, 15, 8, + 11, 13, 14, 14, 15, 9, 12, 14, + 14, 15, 9, 13, 10, 13, 10, 14, + 10, 14, 11, 15, 11, 15, 11, 14, + 12, 15, 12, 13, 13, 13, 13, 13, + 13, 14, 13, 14, 14, 14, 14, 14, + 14, 15, 14, 15, 16, 15, 14, 15, + 16, 15, 15, +}; + +static const uint32_t coef2_huffcodes[1336] = { + 0x003e6, 0x000f6, 0x00000, 0x00002, 0x00006, 0x0000f, 0x0001b, 0x00028, + 0x00039, 0x0003f, 0x0006b, 0x00076, 0x000b7, 0x000e8, 0x000ef, 0x00169, + 0x001a7, 0x001d4, 0x001dc, 0x002c4, 0x00349, 0x00355, 0x00391, 0x003dc, + 0x00581, 0x005b2, 0x00698, 0x0070c, 0x00755, 0x0073a, 0x00774, 0x007cf, + 0x00b0a, 0x00b66, 0x00d2e, 0x00d5e, 0x00e1b, 0x00eac, 0x00e5a, 0x00f7e, + 0x00fa1, 0x0163e, 0x01a37, 0x01a52, 0x01c39, 0x01ab3, 0x01d5f, 0x01cb6, + 0x01f52, 0x01dd9, 0x02c04, 0x02c2e, 0x02c2d, 0x02c23, 0x03467, 0x034a3, + 0x0351b, 0x03501, 0x03a5d, 0x0351c, 0x03875, 0x03dea, 0x0397b, 0x039db, + 0x03df1, 0x039d8, 0x03bb4, 0x0580a, 0x0584d, 0x05842, 0x05b13, 0x058ea, + 0x0697d, 0x06a06, 0x068cc, 0x06ac7, 0x06a96, 0x072f4, 0x07543, 0x072b4, + 0x07d20, 0x0b003, 0x073b5, 0x07be6, 0x0d180, 0x07bd1, 0x07cb8, 0x07d06, + 0x07d25, 0x0d2f2, 0x0d19a, 0x0d334, 0x0e1dc, 0x0d529, 0x0d584, 0x0e1d2, + 0x0e5e3, 0x0eec4, 0x0e564, 0x0fa49, 0x16001, 0x0eedc, 0x0f7fa, 0x1a32c, + 0x16131, 0x16003, 0x0f9c8, 0x1ef80, 0x1d2a0, 0x1aa4b, 0x0f7ce, 0x1abfe, + 0x1aa50, 0x1a458, 0x1a816, 0x1cae4, 0x1d2fe, 0x1d52e, 0x1aa4c, 0x2c245, + 0x1d2a1, 0x1a35d, 0x1ca1b, 0x1d5d8, 0x1f531, 0x1ca1c, 0x1f389, 0x1f4af, + 0x3a5e7, 0x351fb, 0x2c24b, 0x34bce, 0x2c24d, 0x2c249, 0x2c24a, 0x72dfc, + 0x357ef, 0x35002, 0x3a5e6, 0x39431, 0x5843b, 0x34a77, 0x58431, 0x3a5f3, + 0x3a5dd, 0x3e5e5, 0x356bd, 0x3976e, 0x6a3d2, 0x3500d, 0x694c4, 0x580bd, + 0x3e5e8, 0x74b95, 0x34a6e, 0x3977c, 0x39432, 0x5b0d2, 0x6a3d8, 0x580b8, + 0x5b0cb, 0x5b0d7, 0x72dee, 0x72ded, 0x72dec, 0x74b9c, 0x3977f, 0x72dea, + 0x74b9e, 0x7be7d, 0x580bf, 0x5b0d5, 0x7cba8, 0x74b91, 0x3e5dd, 0xb6171, + 0xd46b3, 0xd46b9, 0x7cba1, 0x74b9f, 0x72de1, 0xe59f5, 0x3e5eb, 0x00004, + 0x00015, 0x00038, 0x00075, 0x000e8, 0x001d3, 0x00347, 0x0039c, 0x00690, + 0x0074a, 0x00b60, 0x00e93, 0x00f74, 0x0163d, 0x01a5a, 0x01d24, 0x01cbe, + 0x01f4b, 0x03468, 0x03562, 0x03947, 0x03e82, 0x05804, 0x05b12, 0x05803, + 0x0696d, 0x06a9e, 0x0697c, 0x06978, 0x06afb, 0x074b2, 0x072f5, 0x073c0, + 0x07541, 0x06944, 0x074b7, 0x070d3, 0x07ba9, 0x0b0b1, 0x0d1af, 0x0e1dd, + 0x0e5e2, 0x0e1a3, 0x0eec3, 0x1612f, 0x0e961, 0x0eeda, 0x0e78e, 0x0fa48, + 0x1612c, 0x0e511, 0x0e565, 0x0e953, 0x1aa4a, 0x0e59d, 0x1d52c, 0x1a811, + 0x1cae7, 0x1abfc, 0x1d52d, 0x1cacf, 0x1cf05, 0x2c254, 0x34a72, 0x1f4ac, + 0x3976b, 0x34a71, 0x2c6d9, 0x2d873, 0x34a6a, 0x357e7, 0x3464c, 0x3e5f5, + 0x58433, 0x1f53a, 0x3500a, 0x357ea, 0x34a73, 0x3942f, 0x357e5, 0x39775, + 0x694cd, 0x39772, 0x7cba5, 0x6a3ef, 0x35483, 0x74b98, 0x5b0c1, 0x39770, + 0x3a5d7, 0x39433, 0x39434, 0x694ce, 0x580be, 0x3e5ff, 0x6a3ec, 0xb616f, + 0xd46b1, 0x6a3d1, 0x72de5, 0x74b6e, 0x72de9, 0x3e700, 0xd46b6, 0x6a3e9, + 0x74b69, 0xe5675, 0xd46b8, 0x7cbaa, 0x3a5d1, 0x0000c, 0x0003c, 0x000eb, + 0x001f1, 0x003a4, 0x006a8, 0x007d5, 0x00d43, 0x00e77, 0x016c5, 0x01cb1, + 0x02c5d, 0x03a55, 0x03a56, 0x03e51, 0x03bb5, 0x05b0a, 0x06a9f, 0x074b8, + 0x07d28, 0x0d187, 0x0d40e, 0x0d52e, 0x0d425, 0x0eae3, 0x0e1d3, 0x1612e, + 0x0e59e, 0x0eec2, 0x0e578, 0x0e51a, 0x0e579, 0x0e515, 0x0e960, 0x0d183, + 0x0d220, 0x0d2cb, 0x0e512, 0x16c3e, 0x16002, 0x16c42, 0x1cae9, 0x3461a, + 0x1d2fa, 0x1a308, 0x1a849, 0x1cf07, 0x1f38f, 0x34b65, 0x2c253, 0x1ef9e, + 0x1cbc3, 0x1cbc1, 0x2c255, 0x1f384, 0x58435, 0x2c5cd, 0x3a5f7, 0x2c252, + 0x3959c, 0x2c6d8, 0x3a5d3, 0x6ad78, 0x6a3f2, 0x7cba9, 0xb6176, 0x72deb, + 0x39764, 0x3e5f6, 0x3a5d8, 0x74a8c, 0x6a3e6, 0x694d1, 0x6ad79, 0x1a4592, + 0xe59fb, 0x7cbb3, 0x5b0cd, 0x00017, 0x000b5, 0x002c3, 0x005b7, 0x00b1c, + 0x00e5c, 0x0163f, 0x01ab2, 0x01efa, 0x0348a, 0x0396e, 0x058da, 0x06963, + 0x06a30, 0x072cd, 0x073cf, 0x07ce7, 0x0d2ca, 0x0d2d8, 0x0e764, 0x0e794, + 0x16008, 0x16167, 0x1617e, 0x1aa49, 0x1a30b, 0x1a813, 0x2c6da, 0x1a580, + 0x1cbc2, 0x0f9ca, 0x1617f, 0x1d2fe, 0x0f7fc, 0x16c40, 0x0e513, 0x0eec5, + 0x0f7c3, 0x1d508, 0x1a81e, 0x1d2fd, 0x39430, 0x35486, 0x3e5fd, 0x2c24c, + 0x2c75a, 0x34a74, 0x3a5f4, 0x3464d, 0x694ca, 0x3a5f1, 0x1d509, 0x1d5c0, + 0x34648, 0x3464e, 0x6a3d5, 0x6a3e8, 0x6a3e7, 0x5b0c3, 0x2c248, 0x1f38a, + 0x3a5f2, 0x6a3e5, 0x00029, 0x00168, 0x0058c, 0x00b67, 0x00f9d, 0x01c3d, + 0x01cbf, 0x02c20, 0x0351d, 0x03df6, 0x06af9, 0x072b5, 0x0b1d7, 0x0b0b2, + 0x0d40a, 0x0d52b, 0x0e952, 0x0e797, 0x163c3, 0x1c3a0, 0x1f386, 0x1ca21, + 0x34655, 0x2c247, 0x1f53b, 0x2c250, 0x2c24f, 0x1f385, 0x1ef5d, 0x1cf15, + 0x1caea, 0x1ab0a, 0x1cf19, 0x1f53d, 0x1d5c2, 0x1d2fb, 0x1ef58, 0x34a78, + 0x357ec, 0x1f533, 0x3a5e1, 0x694d2, 0x58482, 0x3a5ee, 0x2c6dc, 0x357eb, + 0x5b0c4, 0x39778, 0x6a3e1, 0x7cbb4, 0x3a5e1, 0x74b68, 0x3a5ef, 0x3a5d2, + 0x39424, 0x72de2, 0xe59f6, 0xe59f7, 0x3e702, 0x3e5ec, 0x1f38b, 0x0003b, + 0x001f0, 0x00777, 0x00fa8, 0x01cb2, 0x02d84, 0x03a57, 0x03dd6, 0x06917, + 0x06a11, 0x07d07, 0x0eae2, 0x0e796, 0x0f9c9, 0x0f7fb, 0x16166, 0x16160, + 0x1ab1b, 0x1abfa, 0x2d87b, 0x1d2f7, 0x39768, 0x1f38c, 0x34653, 0x34651, + 0x6a3d9, 0x35001, 0x3abbd, 0x38742, 0x39426, 0x34a76, 0x3a5ec, 0x34a75, + 0x35000, 0x35488, 0x1cf10, 0x2c6db, 0x357ed, 0x357e8, 0x357e9, 0x3a5f0, + 0x694c2, 0xb6178, 0x72df5, 0x39425, 0x3942b, 0x74b6d, 0x74b6f, 0xb6177, + 0xb6179, 0x74b6a, 0xb6172, 0x58487, 0x3e5ee, 0x3e5ed, 0x72df2, 0x72df4, + 0x7cbae, 0x6a3ca, 0x70e86, 0x34bcf, 0x6a3c8, 0x00059, 0x00384, 0x00d5b, + 0x01c38, 0x03560, 0x0395b, 0x0584e, 0x06964, 0x073cd, 0x0b1e7, 0x0e798, + 0x0e78d, 0x0fa43, 0x1a848, 0x1a32f, 0x1aa4e, 0x3464a, 0x1f4ab, 0x1f38d, + 0x3a5eb, 0x3a5d4, 0x3548a, 0x6a3c7, 0x5b0d0, 0x6a3c5, 0x7cbb0, 0x694cb, + 0x3a5e5, 0x3e5e2, 0x3942c, 0x2d872, 0x1f4ae, 0x3a5d5, 0x694d3, 0x58481, + 0x35009, 0x39774, 0x58432, 0xb616c, 0x5b0db, 0x3548b, 0xb6174, 0x1d5d95, + 0xb004c, 0x7cbb2, 0x3a5e5, 0x74a8f, 0xe59f9, 0x72df6, 0xe59fd, 0x7cbad, + 0xd427d, 0x72cff, 0x3977a, 0x5b0d9, 0xb616d, 0xb616b, 0x1a4593, 0x7cbaf, + 0x5b0da, 0x00071, 0x003eb, 0x01603, 0x02c6c, 0x03961, 0x068c8, 0x06a31, + 0x072bd, 0x0d2c2, 0x0e51b, 0x0e5e6, 0x1abfb, 0x1d2ff, 0x1cae5, 0x1ef5c, + 0x1ef5e, 0x1cf13, 0x34a6d, 0x3976d, 0xb616a, 0x3e5f2, 0x6a3c4, 0xb6169, + 0x3e5dc, 0x580b9, 0x74b99, 0x75764, 0x58434, 0x3a5d9, 0x6945a, 0x69459, + 0x3548c, 0x3a5e9, 0x69457, 0x72df1, 0x6945e, 0x6a35e, 0x3e701, 0xb6168, + 0x5b0dd, 0x3a5de, 0x6a3c2, 0xd4278, 0x6a3cc, 0x72dfd, 0xb6165, 0x16009a, + 0x7cbb1, 0xd427c, 0xb6162, 0xe765e, 0x1cecbe, 0x7cbb6, 0x69454, 0xb6160, + 0xd427a, 0x1d5d96, 0xb1d6d, 0xe59f4, 0x72de8, 0x3a5db, 0x0007a, 0x006ae, + 0x01c3c, 0x03aba, 0x058e9, 0x072cc, 0x0d2dd, 0x0d22d, 0x0eec1, 0x0eedb, + 0x1d2a2, 0x1ef5b, 0x357e2, 0x3abbf, 0x1d2f9, 0x35004, 0x3a5dc, 0x351fc, + 0x3976c, 0x6a3c6, 0x6a3cb, 0x3e5ea, 0xe59f3, 0x6a3ce, 0x69452, 0xe59f0, + 0x74b90, 0xd4279, 0xd427b, 0x7cbb5, 0x5b0c5, 0x3a5e3, 0x3a5e2, 0x000d0, + 0x00775, 0x01efe, 0x03dd5, 0x0728c, 0x07cb9, 0x0e1a2, 0x0ea85, 0x0eed8, + 0x1a30a, 0x1aa4f, 0x3a5df, 0x35008, 0x3a5e0, 0x3e5f4, 0x3e5f7, 0xb1d6c, + 0x5843e, 0x34a70, 0x72df8, 0x74b6b, 0xd427f, 0x72df0, 0x5b0bf, 0x5b0c0, + 0xd46b0, 0x72def, 0xe59f8, 0x162e64, 0xb1d6f, 0x3a5e0, 0x39427, 0x69166, + 0x6a3e2, 0x6a3e3, 0x74a8d, 0xd427e, 0x1d5d97, 0xd46b4, 0x5b0d8, 0x6a3d3, + 0x000e0, 0x00b63, 0x034cc, 0x06a33, 0x073c9, 0x0e1a0, 0x0f7fd, 0x0f9cc, + 0x1617d, 0x1caeb, 0x1f4a9, 0x3abb3, 0x69450, 0x39420, 0x39777, 0x3e5e0, + 0x6a3d4, 0x6a3ed, 0xb6166, 0xe59f1, 0xb1d6e, 0xe5676, 0x6a3ea, 0xe5674, + 0xb6163, 0xd46b7, 0x7cba6, 0xd46ba, 0x1d5d94, 0xb6164, 0x6a3f1, 0x7cba2, + 0x69451, 0x72dfa, 0xd46bb, 0x72df7, 0x74b94, 0x1cecbf, 0xe59fa, 0x16009b, + 0x6a3e4, 0x000e6, 0x00e94, 0x03876, 0x070ef, 0x0d52a, 0x16015, 0x16014, + 0x1abf9, 0x1cf17, 0x34a79, 0x34650, 0x3e705, 0x6a3d0, 0x58430, 0x74b9d, + 0x7be7e, 0x5b0be, 0x39773, 0x6a3de, 0x000fb, 0x00f7b, 0x03dd7, 0x07bd0, + 0x0e59c, 0x0f9cd, 0x1cf18, 0x1d2ff, 0x34a7a, 0x39429, 0x3500c, 0x72de0, + 0x69456, 0x7be7c, 0xd46b5, 0xd46b2, 0x6a3dd, 0x001a2, 0x0163b, 0x06913, + 0x0b016, 0x0fa42, 0x1a32d, 0x1cf06, 0x34a7c, 0x34a7d, 0xb6161, 0x35481, + 0x3e5fa, 0x7cba0, 0x7be7f, 0x7cba3, 0x7cba7, 0x5b0d3, 0x72de6, 0x6a3dc, + 0x001a9, 0x01ab4, 0x06a34, 0x0d46a, 0x16130, 0x1ef5f, 0x1f532, 0x1f536, + 0x3942e, 0x58436, 0x6a3db, 0x6945b, 0x001c9, 0x01ca0, 0x0728b, 0x0eed9, + 0x1f539, 0x1ca1d, 0x39765, 0x39766, 0x58439, 0x6945d, 0x39767, 0x001d3, + 0x01f2c, 0x07bfc, 0x16161, 0x34652, 0x3a5ed, 0x3548d, 0x58438, 0x6a3da, + 0x002c1, 0x02c5e, 0x0d335, 0x1ab1a, 0x2d874, 0x35006, 0x35484, 0x5b0cc, + 0x74b9a, 0x72df3, 0x6a3d6, 0x002da, 0x034b3, 0x0d5ae, 0x1caee, 0x2d871, + 0x357e3, 0x74b97, 0x72df9, 0x580ba, 0x5b0d4, 0x0034d, 0x0354e, 0x0f750, + 0x1cbc0, 0x3a5e7, 0x3a5e4, 0x00385, 0x03a58, 0x16c41, 0x2c5cf, 0x3e5e1, + 0x74b6c, 0xe5677, 0x6a3df, 0x00390, 0x03e50, 0x163c2, 0x2d876, 0x35482, + 0x5b0d6, 0x5843a, 0x0039f, 0x0585e, 0x1a583, 0x3500f, 0x74b93, 0x39771, + 0x003e4, 0x06912, 0x16c43, 0x357e1, 0x0058a, 0x0696f, 0x1f538, 0x5b0c9, + 0x6a3cf, 0x005b6, 0x06af8, 0x1f534, 0x58483, 0x6a3e0, 0x00695, 0x07d02, + 0x1cae8, 0x58485, 0x006a2, 0x0754a, 0x357ee, 0x3977b, 0x00748, 0x074b2, + 0x34a7b, 0x00729, 0x0b1e0, 0x34649, 0x3e5e3, 0x0073d, 0x0d2c4, 0x3e5e6, + 0x007bb, 0x0b099, 0x39762, 0x5b0ce, 0x6945f, 0x007d1, 0x0d5ab, 0x39779, + 0x007d3, 0x0d52f, 0x39763, 0x6945c, 0x00b1a, 0x0d2c5, 0x35489, 0x00d23, + 0x0eaed, 0x3e5f8, 0x00d32, 0x16016, 0x3e5fb, 0x00d41, 0x0e768, 0x3a5ed, + 0x00e1f, 0x16017, 0x58027, 0x00ead, 0x0fa07, 0x69455, 0x00e54, 0x1612b, + 0x00e55, 0x1a581, 0x00f78, 0x1a32b, 0x580bc, 0x6a3ee, 0x00f79, 0x1abfd, + 0x00f95, 0x1ab18, 0x6a3f0, 0x01637, 0x1aa4d, 0x0162d, 0x1f53c, 0x6a3f3, + 0x01a31, 0x1a810, 0x39769, 0x01a50, 0x1caef, 0x01a36, 0x1a32e, 0x01a67, + 0x1f38e, 0x01a85, 0x1ef59, 0x01aa6, 0x1ef83, 0x01d51, 0x2c012, 0x01d53, + 0x2d879, 0x01d5e, 0x35005, 0x01cba, 0x1cf04, 0x69453, 0x01d2d, 0x351ff, + 0x01f2d, 0x2d86f, 0x01f29, 0x35007, 0x02c22, 0x351fa, 0x02c03, 0x3a5ec, + 0x02c5f, 0x3a5eb, 0x02c58, 0x34a6b, 0x03469, 0x356be, 0x02c59, 0x34a6c, + 0x0346a, 0x3a5ea, 0x034bd, 0x034bf, 0x356bf, 0x0386a, 0x03ab9, 0x5843f, + 0x0386b, 0x3a5f5, 0x03a4b, 0x39421, 0x03aa4, 0x3a5e9, 0x03a5a, 0x03960, + 0x3977e, 0x03de9, 0x03958, 0x03df7, 0x039e1, 0x3e5e4, 0x0395f, 0x69458, + 0x03e91, 0x03df2, 0x39428, 0x058f2, 0x03e80, 0x6a3c3, 0x03e93, 0x694c0, + 0x058b8, 0x5b0ca, 0x0584f, 0x694c1, 0x058f1, 0x068d6, 0x06a10, 0x06ac3, + 0x06a32, 0x070d2, 0x06911, 0x074b1, 0x07494, 0x06ad4, 0x06ad6, 0x072b8, + 0x06afa, 0x074b3, 0x07540, 0x073ce, 0x0b005, 0x074b3, 0x07495, 0x074b9, + 0x0d336, 0x07bff, 0x07763, 0x073c8, 0x07d29, 0x0b622, 0x0d221, 0x0d181, + 0x0b1d1, 0x074b8, 0x0b1d0, 0x0d19b, 0x0d2c3, 0x0b172, 0x0d2dc, 0x0b623, + 0x0d5aa, 0x0d426, 0x0d182, 0x0e795, 0x0e1d1, 0x0d337, 0x0e96c, 0x0e5e4, + 0x0e514, 0x0eaee, 0x16000, 0x0e767, 0x0e1a1, 0x0e78f, 0x16004, 0x0f7c2, + 0x0e799, 0x0e5e7, 0x0e566, 0x0e769, 0x0f751, 0x0eede, 0x0fa06, 0x16005, + 0x0fa9f, 0x1a5e6, 0x0e766, 0x1636f, 0x0eedd, 0x0eec0, 0x1a309, 0x1ceca, + 0x163cd, 0x0f9cb, 0x0eedf, 0x1a582, 0x1612d, 0x0e5e5, 0x1abf8, 0x1a30c, + 0x1ca1f, 0x163cc, 0x1a35c, 0x1ca1e, 0x1aa51, 0x163ac, 0x1a84e, 0x1a53f, + 0x1cf16, 0x1d2fc, 0x1a5b3, 0x1ab19, 0x1a81f, 0x1d5c3, 0x16c3f, 0x1d5c1, + 0x1d2fc, 0x1f4aa, 0x1a812, 0x1f535, 0x1cf12, 0x1a817, 0x1617c, 0x1ab0b, + 0x1d2f8, 0x1ef82, 0x2d87a, 0x1d52f, 0x1f530, 0x1aa48, 0x35487, 0x1d2fd, + 0x1f4ad, 0x1cf11, 0x3461b, 0x35485, 0x1ca20, 0x1caed, 0x1cae6, 0x1abff, + 0x3464f, 0x34a6f, 0x1ef81, 0x3464b, 0x39d96, 0x1f383, 0x1f537, 0x1cf14, + 0x2c5ce, 0x3500e, 0x2c251, 0x1caec, 0x1f387, 0x34654, 0x357e4, 0x2d878, + 0x3500b, 0x35480, 0x3a5e8, 0x3548e, 0x34b64, 0x1f4a8, 0x35003, 0x3e5df, + 0x2d870, 0x357e6, 0x3e5f0, 0x1ef5a, 0x3a5ea, 0x1f388, 0x3e703, 0x2c24e, + 0x3a5e2, 0x351fd, 0x2c6dd, 0x3e704, 0x351fe, 0x2d875, 0x5b0c7, 0x3976a, + 0x3a5e6, 0x39423, 0x58480, 0x2c246, 0x3a5e3, 0x2d877, 0x3e5f1, 0x3abbe, + 0x58489, 0x3e5f9, 0x357e0, 0x3abbc, 0x5b0c6, 0x69167, 0x69165, 0x3e5e9, + 0x39422, 0x3976f, 0x3977d, 0x3e5de, 0x6a3c9, 0x58b98, 0x3a5f6, 0x3a5d0, + 0x58486, 0x6a3c1, 0x3e5fc, 0x5b0dc, 0x3548f, 0x3942d, 0x694c9, 0x58484, + 0x3a5e8, 0x74b9b, 0x74b96, 0x694d0, 0x58488, 0x3a5e4, 0x3942a, 0x72ec2, + 0x39776, 0x5b0d1, 0x5b0cf, 0x3a5d6, 0xe59fc, 0x5b0c8, 0x3e5e7, 0x7cbb7, + 0x70e87, 0x7cbab, 0x5b0c2, 0x694c3, 0x74a8e, 0x3e5f3, 0x6a3cd, 0x72dfe, + 0x73b2e, 0x72ec0, 0x694c5, 0x58437, 0x694c8, 0x72dff, 0x39435, 0x5843d, + 0x6a3d7, 0x72ec1, 0xd22c8, 0x694cf, 0xb6173, 0x3e5fe, 0x580bb, 0xe59f2, + 0xb616e, 0xb6175, 0x3a5da, 0x5b0bd, 0x694cc, 0x5843c, 0x694c7, 0x74b92, + 0x72ec3, 0x694c6, 0xb6170, 0x7cbac, 0xb1733, 0x7cba4, 0xb6167, 0x72de7, + 0x72de4, 0x6a3c0, 0x3e5ef, 0x162e65, 0x72de3, 0x72dfb, 0x6a35f, 0x6a3eb, +}; + +static const uint8_t coef2_huffbits[1336] = { + 11, 9, 2, 3, 4, 4, 5, 6, + 6, 7, 7, 8, 8, 8, 9, 9, + 9, 9, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 16, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 18, 17, 17, 17, 17, + 17, 17, 17, 18, 18, 17, 17, 18, + 17, 17, 18, 17, 18, 18, 18, 18, + 19, 18, 18, 18, 18, 18, 18, 20, + 18, 18, 18, 19, 19, 18, 19, 18, + 19, 19, 18, 19, 19, 18, 19, 19, + 19, 19, 18, 19, 19, 19, 19, 19, + 19, 19, 20, 20, 20, 19, 19, 20, + 19, 20, 19, 19, 20, 19, 19, 20, + 20, 20, 20, 19, 20, 21, 19, 3, + 5, 7, 8, 9, 9, 10, 11, 11, + 12, 12, 12, 13, 13, 13, 13, 14, + 14, 14, 14, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 16, 16, + 15, 15, 15, 15, 16, 16, 16, 16, + 17, 16, 17, 17, 16, 17, 17, 17, + 17, 17, 17, 16, 17, 17, 17, 17, + 18, 17, 17, 18, 18, 18, 18, 18, + 19, 18, 18, 18, 18, 18, 18, 19, + 19, 18, 18, 18, 18, 19, 18, 19, + 19, 19, 20, 19, 18, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 20, + 20, 19, 20, 19, 20, 19, 20, 19, + 19, 21, 20, 20, 19, 4, 7, 8, + 10, 11, 11, 12, 12, 13, 13, 14, + 14, 14, 14, 15, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 17, 17, 16, 16, + 16, 16, 17, 17, 17, 17, 18, 18, + 18, 17, 17, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 19, 18, 18, 18, + 19, 18, 19, 19, 19, 20, 20, 20, + 19, 19, 19, 19, 19, 19, 19, 21, + 21, 20, 19, 5, 8, 10, 11, 12, + 13, 13, 13, 14, 14, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 17, 17, + 17, 17, 17, 17, 17, 17, 18, 17, + 18, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 19, 18, 19, 18, + 18, 18, 18, 18, 19, 18, 17, 17, + 18, 18, 19, 19, 19, 19, 18, 18, + 18, 19, 6, 9, 11, 12, 13, 13, + 14, 14, 14, 15, 15, 16, 16, 16, + 16, 16, 16, 17, 17, 17, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 17, 18, 18, 17, 18, 18, 18, + 18, 18, 18, 19, 19, 18, 18, 18, + 19, 19, 19, 20, 19, 19, 18, 19, + 19, 20, 21, 21, 19, 19, 18, 6, + 10, 12, 13, 14, 14, 14, 15, 15, + 15, 16, 16, 17, 17, 17, 17, 17, + 17, 17, 18, 18, 19, 18, 18, 18, + 19, 18, 18, 18, 19, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 19, 20, 20, 19, 19, 19, 19, 20, + 20, 19, 20, 19, 19, 19, 20, 20, + 20, 19, 19, 18, 19, 7, 10, 12, + 13, 14, 15, 15, 15, 16, 16, 17, + 17, 17, 17, 17, 17, 18, 18, 18, + 18, 19, 18, 19, 19, 19, 20, 19, + 18, 19, 19, 18, 18, 19, 19, 19, + 18, 19, 19, 20, 19, 18, 20, 21, + 20, 20, 19, 19, 21, 20, 21, 20, + 20, 20, 19, 19, 20, 20, 21, 20, + 19, 7, 11, 13, 14, 15, 15, 15, + 16, 16, 17, 17, 17, 17, 18, 18, + 18, 18, 18, 19, 20, 19, 19, 20, + 19, 19, 19, 19, 19, 19, 19, 19, + 18, 18, 19, 20, 19, 19, 19, 20, + 19, 19, 19, 20, 19, 20, 20, 21, + 20, 20, 20, 21, 22, 20, 19, 20, + 20, 21, 20, 21, 20, 19, 8, 11, + 13, 14, 15, 16, 16, 16, 17, 17, + 17, 18, 18, 18, 18, 18, 19, 18, + 19, 19, 19, 19, 21, 19, 19, 21, + 19, 20, 20, 20, 19, 18, 18, 8, + 12, 14, 15, 16, 16, 16, 16, 17, + 17, 17, 19, 18, 18, 19, 19, 20, + 19, 18, 20, 19, 20, 20, 19, 19, + 20, 20, 21, 21, 20, 19, 19, 19, + 19, 19, 19, 20, 21, 20, 19, 19, + 8, 12, 14, 15, 16, 16, 17, 17, + 17, 18, 18, 18, 19, 19, 19, 19, + 19, 19, 20, 21, 20, 21, 19, 21, + 20, 20, 20, 20, 21, 20, 19, 20, + 19, 20, 20, 20, 19, 22, 21, 21, + 19, 9, 12, 14, 15, 16, 17, 17, + 17, 18, 18, 18, 19, 19, 19, 19, + 20, 19, 19, 19, 9, 13, 15, 16, + 17, 17, 18, 18, 18, 19, 18, 20, + 19, 20, 20, 20, 19, 9, 13, 15, + 16, 17, 17, 18, 18, 18, 20, 18, + 19, 20, 20, 20, 20, 19, 20, 19, + 9, 13, 15, 16, 17, 18, 18, 18, + 19, 19, 19, 19, 10, 14, 16, 17, + 18, 18, 19, 19, 19, 19, 19, 10, + 14, 16, 17, 18, 18, 18, 19, 19, + 10, 14, 16, 17, 18, 18, 18, 19, + 19, 20, 19, 10, 14, 16, 18, 18, + 18, 19, 20, 19, 19, 10, 14, 17, + 18, 18, 18, 10, 15, 17, 18, 19, + 19, 21, 19, 11, 15, 17, 18, 18, + 19, 19, 11, 15, 17, 18, 19, 19, + 11, 15, 17, 18, 11, 15, 18, 19, + 19, 11, 15, 18, 19, 19, 11, 16, + 18, 19, 11, 15, 18, 19, 11, 16, + 18, 12, 16, 18, 19, 12, 16, 19, + 12, 16, 19, 19, 19, 12, 16, 19, + 12, 16, 19, 19, 12, 16, 18, 12, + 16, 19, 12, 17, 19, 12, 17, 19, + 12, 17, 19, 12, 17, 19, 13, 17, + 13, 17, 13, 17, 19, 19, 13, 17, + 13, 17, 19, 13, 17, 13, 18, 19, + 13, 17, 19, 13, 18, 13, 17, 13, + 18, 13, 18, 13, 18, 13, 18, 13, + 18, 13, 18, 14, 18, 19, 14, 18, + 14, 18, 14, 18, 14, 18, 14, 19, + 14, 19, 14, 18, 14, 18, 14, 18, + 14, 19, 14, 14, 18, 14, 14, 19, + 14, 18, 14, 19, 14, 19, 14, 15, + 19, 15, 15, 15, 15, 19, 15, 19, + 15, 15, 19, 15, 15, 19, 15, 19, + 15, 19, 15, 19, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, + 15, 15, 15, 16, 16, 16, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 17, 16, 16, 16, 17, + 17, 16, 17, 17, 16, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 18, + 17, 17, 17, 17, 17, 17, 17, 17, + 18, 17, 17, 18, 17, 17, 17, 17, + 18, 18, 17, 17, 17, 17, 17, 17, + 17, 18, 17, 18, 18, 17, 17, 17, + 18, 18, 18, 17, 18, 17, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 17, + 18, 18, 18, 18, 19, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 19, + 18, 18, 19, 18, 18, 18, 19, 18, + 19, 18, 18, 19, 18, 18, 19, 19, + 19, 19, 19, 18, 19, 18, 19, 18, + 19, 19, 18, 18, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 18, 19, + 19, 19, 19, 19, 18, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 20, + 19, 19, 19, 19, 21, 19, 19, 20, + 19, 20, 19, 19, 19, 19, 19, 20, + 20, 20, 19, 19, 19, 20, 19, 19, + 19, 20, 20, 19, 20, 19, 19, 21, + 20, 20, 19, 19, 19, 19, 19, 19, + 20, 19, 20, 20, 20, 20, 20, 20, + 20, 19, 19, 21, 20, 20, 19, 19, +}; + +static const uint32_t coef3_huffcodes[1072] = { + 0x001b2, 0x00069, 0x00000, 0x00004, 0x00006, 0x0000e, 0x00014, 0x00019, + 0x00016, 0x0002b, 0x00030, 0x0003d, 0x0003c, 0x0005a, 0x0005f, 0x0006d, + 0x0007e, 0x0005f, 0x0007f, 0x000b6, 0x000bc, 0x000d8, 0x000f2, 0x000fe, + 0x000bc, 0x000fc, 0x00161, 0x0016e, 0x00174, 0x00176, 0x001a2, 0x001e3, + 0x001f3, 0x00174, 0x0017a, 0x001ea, 0x002a8, 0x002c4, 0x002e6, 0x00314, + 0x00346, 0x00367, 0x003e9, 0x002e5, 0x002ee, 0x003d6, 0x00555, 0x00554, + 0x00557, 0x005c3, 0x005d6, 0x006e0, 0x0062f, 0x006e2, 0x00799, 0x00789, + 0x007fa, 0x005ce, 0x007fe, 0x005ec, 0x007cc, 0x007af, 0x00aa7, 0x00b19, + 0x00b94, 0x00b85, 0x00b9f, 0x00c48, 0x00c45, 0x00dd8, 0x00c4c, 0x00c4b, + 0x00d99, 0x00d1f, 0x00dc2, 0x00f95, 0x00fa2, 0x00bb5, 0x00b9f, 0x00f5d, + 0x00bbf, 0x00f47, 0x0154a, 0x00fd5, 0x00f45, 0x00f7f, 0x0160d, 0x01889, + 0x01757, 0x01722, 0x018b3, 0x0172d, 0x01a39, 0x01a18, 0x01bb3, 0x01b30, + 0x01e63, 0x0173c, 0x01b35, 0x01723, 0x01e80, 0x01fee, 0x01761, 0x01ffc, + 0x01f7f, 0x02c7c, 0x01fa1, 0x0177b, 0x01755, 0x0175a, 0x01fa6, 0x02eab, + 0x0310a, 0x02c69, 0x03669, 0x03127, 0x03103, 0x02e43, 0x03662, 0x03165, + 0x03124, 0x0313b, 0x03111, 0x03668, 0x0343b, 0x03c52, 0x03efc, 0x02e6c, + 0x03fda, 0x03ef8, 0x02e7b, 0x03ee2, 0x03cc5, 0x03d72, 0x058c0, 0x03df8, + 0x02ea9, 0x03e7e, 0x0556d, 0x05c82, 0x03d71, 0x03e7b, 0x03c42, 0x058d7, + 0x03f4e, 0x06200, 0x03d70, 0x05cb2, 0x05c96, 0x05cb0, 0x03f45, 0x05cb1, + 0x02e6d, 0x03110, 0x02f68, 0x05c90, 0x07ca6, 0x07c88, 0x06204, 0x062c8, + 0x078a6, 0x07986, 0x079d5, 0x0b1ad, 0x07989, 0x0b079, 0x05cdd, 0x0aad4, + 0x05de8, 0x07dcd, 0x07987, 0x05d67, 0x05d99, 0x0b91d, 0x07cf1, 0x05d9b, + 0x079d7, 0x0b07b, 0x05c85, 0x05d9a, 0x07dcc, 0x07ebf, 0x07dce, 0x07dfb, + 0x07ec0, 0x07d1a, 0x07a07, 0x05c84, 0x0c471, 0x07cf2, 0x0baef, 0x0b9d2, + 0x05deb, 0x07bd6, 0x0b845, 0x05d98, 0x0b91a, 0x0bae8, 0x0c4e0, 0x0dc31, + 0x0f93d, 0x0bbce, 0x0d1d2, 0x0f7a9, 0x0d9b9, 0x0bbcb, 0x0b900, 0x0aad7, + 0x0babd, 0x0c4e1, 0x0f46f, 0x0c588, 0x0c58b, 0x160e6, 0x0bbcf, 0x0bac3, + 0x0f945, 0x0f7a3, 0x0d1c1, 0x0fb8e, 0x0f7a4, 0x0fb8c, 0x0f40c, 0x0c473, + 0x0fd72, 0x0bbcd, 0x0fffa, 0x0f940, 0x0bbc9, 0x0f7a8, 0x1a1ed, 0x0bbc5, + 0x1f26f, 0x163fd, 0x160c7, 0x1a1f5, 0x0f947, 0x163fc, 0x154b3, 0x0fff6, + 0x163f6, 0x160e9, 0x1a1f0, 0x0bab9, 0x0baba, 0x17086, 0x0b903, 0x0fd75, + 0x0f308, 0x176f3, 0x163ff, 0x0fd7d, 0x1bb78, 0x163fb, 0x188db, 0x1a1f7, + 0x154b2, 0x172fd, 0x163f4, 0x1bb73, 0x172ff, 0x0babc, 0x0f97d, 0x1a1f3, + 0x1bb6d, 0x1ffd5, 0x1a1f4, 0x1f272, 0x17380, 0x17382, 0x1ffe7, 0x0bac8, + 0x0bbc4, 0x188d3, 0x160e0, 0x0fd7b, 0x1725f, 0x172f5, 0x1bb79, 0x1fad9, + 0x1f269, 0x188d0, 0x0bac4, 0x0bac5, 0x31185, 0x188d2, 0x188cc, 0x31187, + 0x3e7fe, 0x188d1, 0x1bb6c, 0x1f268, 0x1fad2, 0x1ffd9, 0x1a1ea, 0x1bb68, + 0x1facb, 0x3fdb2, 0x1e81a, 0x188ce, 0x172fb, 0x1a1ef, 0x1face, 0x1bb70, + 0x0bac1, 0x1bb6b, 0x172f8, 0x1bb66, 0x1ffdf, 0x1bb6a, 0x1ffd7, 0x1f266, + 0x176f8, 0x37653, 0x1fa7e, 0x31182, 0x1fac8, 0x2c7e3, 0x370ee, 0x176ec, + 0x176e9, 0x2e4bc, 0x160c5, 0x3765a, 0x3ce9c, 0x17373, 0x176e8, 0x188d4, + 0x176f1, 0x176ef, 0x37659, 0x1bb7c, 0x1ffde, 0x176f2, 0x3118b, 0x2c7d4, + 0x37651, 0x5ce9f, 0x37650, 0x31191, 0x3f4f6, 0x3f4f5, 0x7a06c, 0x1fac1, + 0x5c97b, 0x2c7e0, 0x79d3a, 0x3e7fd, 0x2c7df, 0x3f4f0, 0x7a06d, 0x376c1, + 0x79d3b, 0x00004, 0x00014, 0x00059, 0x000ab, 0x000b8, 0x00177, 0x001f5, + 0x001f2, 0x00315, 0x003fc, 0x005bd, 0x0062d, 0x006e8, 0x007dd, 0x00b04, + 0x007cd, 0x00b1e, 0x00d1e, 0x00f15, 0x00f3b, 0x00f41, 0x01548, 0x018b0, + 0x0173b, 0x01884, 0x01a1c, 0x01bb4, 0x01f25, 0x017b5, 0x0176d, 0x01ef8, + 0x02e73, 0x03107, 0x03125, 0x03105, 0x02e49, 0x03ce8, 0x03ef9, 0x03e5e, + 0x02e72, 0x03471, 0x03fd9, 0x0623f, 0x078a0, 0x06867, 0x05cb3, 0x06272, + 0x068ec, 0x06e9a, 0x079d4, 0x06e98, 0x0b1aa, 0x06e1a, 0x07985, 0x068ee, + 0x06e9b, 0x05c88, 0x0b1ac, 0x07dfa, 0x05d65, 0x07cf0, 0x07cbf, 0x0c475, + 0x160eb, 0x1bb7e, 0x0f7a6, 0x1fedd, 0x160e3, 0x0fffb, 0x0fb8d, 0x0fff9, + 0x0d1c0, 0x0c58c, 0x1a1e9, 0x0bab8, 0x0f5cf, 0x0fff5, 0x376c5, 0x1a1ec, + 0x160ed, 0x1fede, 0x1fac9, 0x1a1eb, 0x1f224, 0x176ee, 0x0fd79, 0x17080, + 0x17387, 0x1bb7a, 0x1ffe9, 0x176f7, 0x17385, 0x17781, 0x2c7d5, 0x17785, + 0x1ffe3, 0x163f5, 0x1fac2, 0x3e7f9, 0x3118d, 0x3fdb1, 0x1ffe2, 0x1f226, + 0x3118a, 0x2c7d9, 0x31190, 0x3118c, 0x3f4f3, 0x1bb7f, 0x1bb72, 0x31184, + 0xb92f4, 0x3e7fb, 0x6e1d9, 0x1faca, 0x62300, 0x3fdb8, 0x3d037, 0x3e7fc, + 0x62301, 0x3f4f2, 0x1f26a, 0x0000e, 0x00063, 0x000f8, 0x001ee, 0x00377, + 0x003f7, 0x006e3, 0x005cc, 0x00b05, 0x00dd2, 0x00fd4, 0x0172e, 0x0172a, + 0x01e23, 0x01f2d, 0x01763, 0x01769, 0x0176c, 0x02e75, 0x03104, 0x02ec1, + 0x03e58, 0x0583f, 0x03f62, 0x03f44, 0x058c5, 0x0623c, 0x05cf4, 0x07bd7, + 0x05d9d, 0x0aad2, 0x05d66, 0x0b1a9, 0x0b078, 0x07cfe, 0x0b918, 0x0c46f, + 0x0b919, 0x0b847, 0x06e1b, 0x0b84b, 0x0aad8, 0x0fd74, 0x172f4, 0x17081, + 0x0f97c, 0x1f273, 0x0f7a0, 0x0fd7c, 0x172f7, 0x0fd7a, 0x1bb77, 0x172fe, + 0x1f270, 0x0fd73, 0x1bb7b, 0x1a1bc, 0x1bb7d, 0x0bbc3, 0x172f6, 0x0baeb, + 0x0fb8f, 0x3f4f4, 0x3fdb4, 0x376c8, 0x3e7fa, 0x1ffd0, 0x62303, 0xb92f5, + 0x1f261, 0x31189, 0x3fdb5, 0x2c7db, 0x376c9, 0x1fad6, 0x1fad1, 0x00015, + 0x000f0, 0x002e0, 0x0058e, 0x005d7, 0x00c4d, 0x00fa1, 0x00bdb, 0x01756, + 0x01f70, 0x02c19, 0x0313c, 0x0370f, 0x03cc0, 0x02ea8, 0x058c6, 0x058c7, + 0x02eb7, 0x058d0, 0x07d18, 0x0aa58, 0x0b848, 0x05d9e, 0x05d6c, 0x0b84c, + 0x0c589, 0x0b901, 0x163f8, 0x0bac9, 0x0b9c5, 0x0f93c, 0x188d8, 0x0bbc7, + 0x160ec, 0x0fd6f, 0x188d9, 0x160ea, 0x0f7a7, 0x0f944, 0x0baab, 0x0dc3a, + 0x188cf, 0x176fb, 0x2c7d8, 0x2c7d7, 0x1bb75, 0x5ce9e, 0x62302, 0x370ed, + 0x176f4, 0x1ffd1, 0x370ef, 0x3f4f8, 0x376c7, 0x1ffe1, 0x376c6, 0x176ff, + 0x6e1d8, 0x176f6, 0x17087, 0x0f5cd, 0x00035, 0x001a0, 0x0058b, 0x00aac, + 0x00b9a, 0x0175f, 0x01e22, 0x01e8c, 0x01fb2, 0x0310b, 0x058d1, 0x0552e, + 0x05c27, 0x0686e, 0x07ca7, 0x0c474, 0x0dc33, 0x07bf2, 0x05de9, 0x07a35, + 0x0baaa, 0x0b9eb, 0x0fb95, 0x0b9b8, 0x17381, 0x1f262, 0x188cd, 0x17088, + 0x172fa, 0x0f7a2, 0x1fad3, 0x0bac0, 0x3765c, 0x1fedf, 0x1f225, 0x1fad4, + 0x2c7da, 0x5ce9d, 0x3e7f8, 0x1e203, 0x188d7, 0x00054, 0x002c0, 0x007a1, + 0x00f78, 0x01b36, 0x01fa3, 0x0313a, 0x03436, 0x0343a, 0x07d1d, 0x07bd8, + 0x05cdf, 0x0b846, 0x0b189, 0x0d9b8, 0x0fff8, 0x0d9be, 0x0c58a, 0x05dea, + 0x0d1d3, 0x160e4, 0x1f26b, 0x188da, 0x1e202, 0x2c7d2, 0x163fe, 0x31193, + 0x17782, 0x376c2, 0x2c7d1, 0x3fdb0, 0x3765d, 0x2c7d0, 0x1fad0, 0x1e201, + 0x188dd, 0x2c7e2, 0x37657, 0x37655, 0x376c4, 0x376c0, 0x176ea, 0x0006f, + 0x003cf, 0x00dd5, 0x01f23, 0x02c61, 0x02ed0, 0x05d54, 0x0552d, 0x07883, + 0x0b1a8, 0x0b91c, 0x0babf, 0x0b902, 0x0f7aa, 0x0f7a5, 0x1a1e8, 0x1ffd6, + 0x0babe, 0x1a1bf, 0x163f3, 0x1ffd8, 0x1fad7, 0x1f275, 0x1ffdc, 0x0007d, + 0x005bc, 0x01549, 0x02a99, 0x03def, 0x06273, 0x079d6, 0x07d1b, 0x0aad3, + 0x0d0fc, 0x2c7dd, 0x188d6, 0x0bac2, 0x2c7e1, 0x1bb76, 0x1a1bd, 0x31186, + 0x0fd78, 0x1a1be, 0x31183, 0x3fdb6, 0x3f4f1, 0x37652, 0x1fad5, 0x3f4f9, + 0x3e7ff, 0x5ce9c, 0x3765b, 0x31188, 0x17372, 0x000bd, 0x0078b, 0x01f21, + 0x03c43, 0x03ded, 0x0aad6, 0x07ec1, 0x0f942, 0x05c86, 0x17089, 0x0babb, + 0x1ffe8, 0x2c7de, 0x1f26e, 0x1fac4, 0x3f4f7, 0x37656, 0x1fa7d, 0x376c3, + 0x3fdb3, 0x3118f, 0x1fac6, 0x000f8, 0x007ed, 0x01efd, 0x03e7a, 0x05c91, + 0x0aad9, 0x0baec, 0x0dc32, 0x0f46e, 0x1e200, 0x176fa, 0x3765e, 0x3fdb7, + 0x2c7d6, 0x3fdb9, 0x37654, 0x37658, 0x3118e, 0x1ffdb, 0x000f6, 0x00c43, + 0x03106, 0x068ef, 0x0b84d, 0x0b188, 0x0bbcc, 0x1f264, 0x1bb69, 0x17386, + 0x1fac0, 0x00171, 0x00f39, 0x03e41, 0x068ed, 0x0d9bc, 0x0f7a1, 0x1bb67, + 0x1ffdd, 0x176f9, 0x001b9, 0x00f7d, 0x03f63, 0x0d0fd, 0x0b9ea, 0x188dc, + 0x1fac3, 0x1a1f2, 0x31192, 0x1ffe4, 0x001f6, 0x01754, 0x06865, 0x0f309, + 0x160e5, 0x176f5, 0x3765f, 0x1facc, 0x001e9, 0x01a1a, 0x06201, 0x0f105, + 0x176f0, 0x002df, 0x01756, 0x05d6d, 0x163fa, 0x176ed, 0x00342, 0x02e40, + 0x0d0ff, 0x17082, 0x003cd, 0x02a98, 0x0fffc, 0x2c7dc, 0x1fa7f, 0x003fe, + 0x03764, 0x0fffd, 0x176fc, 0x1fac5, 0x002f7, 0x02ed1, 0x0fb97, 0x0058a, + 0x02edc, 0x0bbc8, 0x005d4, 0x0623d, 0x160e8, 0x0062e, 0x05830, 0x163f9, + 0x006eb, 0x06205, 0x1f274, 0x007de, 0x062c9, 0x1f265, 0x005c9, 0x05cde, + 0x1ffd3, 0x005d4, 0x07988, 0x007ce, 0x0b849, 0x00b1b, 0x05c89, 0x1fac7, + 0x00b93, 0x05c83, 0x00b9e, 0x0f14f, 0x00c4a, 0x0b9c7, 0x00dd4, 0x0c470, + 0x1f271, 0x00f38, 0x0fb96, 0x176eb, 0x00fa0, 0x163f7, 0x00bb2, 0x0b91b, + 0x00bbe, 0x0f102, 0x00f44, 0x0f946, 0x1facd, 0x00f79, 0x0d9bd, 0x0154d, + 0x0bbc6, 0x00fd2, 0x160e7, 0x0172b, 0x188cb, 0x0175e, 0x0fd76, 0x0175c, + 0x1bb71, 0x0189f, 0x1a1ee, 0x01f24, 0x1a1f6, 0x01ba7, 0x0bbca, 0x01f7d, + 0x0ffff, 0x01f2e, 0x1bb65, 0x01bb5, 0x172f9, 0x01fef, 0x1f26c, 0x01f3e, + 0x0fd77, 0x01762, 0x1bb6e, 0x01ef9, 0x172fc, 0x01fa0, 0x02ab7, 0x02e4a, + 0x1f267, 0x01fb3, 0x1ffda, 0x02e42, 0x03101, 0x17780, 0x0313d, 0x03475, + 0x17784, 0x03126, 0x1facf, 0x03c51, 0x17783, 0x03e40, 0x1ffe5, 0x03663, + 0x1ffe0, 0x03e8f, 0x1f26d, 0x0343c, 0x03cc1, 0x176fd, 0x03e45, 0x02ec0, + 0x03f61, 0x03dee, 0x03fd8, 0x0583e, 0x02e45, 0x03e59, 0x03d02, 0x05ce8, + 0x05568, 0x176fe, 0x02f69, 0x1fad8, 0x058c1, 0x05c83, 0x1ffe6, 0x06271, + 0x06e1c, 0x062c7, 0x068e1, 0x0552f, 0x06864, 0x06866, 0x06e99, 0x05cbc, + 0x07ca5, 0x078a1, 0x05c82, 0x07dcf, 0x0623b, 0x0623e, 0x068e8, 0x07a36, + 0x05d9c, 0x0b077, 0x07cf3, 0x07a34, 0x07ca4, 0x07d19, 0x079d2, 0x07d1c, + 0x07bd9, 0x0b84a, 0x0fb94, 0x0aad5, 0x0dc30, 0x07bf3, 0x0baee, 0x0b07a, + 0x0c472, 0x0b91e, 0x0d9ba, 0x05d9f, 0x0d0fe, 0x0b9c6, 0x05c87, 0x0f14e, + 0x0baed, 0x0b92e, 0x0f103, 0x0b9c4, 0x0fb91, 0x0d9bb, 0x0b1ab, 0x0c58d, + 0x0fffe, 0x0f93b, 0x0f941, 0x0baea, 0x0b91f, 0x0f5cc, 0x0d9bf, 0x0f943, + 0x0f104, 0x1f260, 0x0fb92, 0x0f93f, 0x0f3a6, 0x0bac7, 0x0f7ab, 0x0bac6, + 0x17383, 0x0fd6d, 0x0bae9, 0x0fd6e, 0x1e74f, 0x188ca, 0x1f227, 0x0fb93, + 0x0fb90, 0x0fff7, 0x17085, 0x17083, 0x160e1, 0x17084, 0x0f93e, 0x160e2, + 0x160c6, 0x1a1f1, 0x1bb6f, 0x17384, 0x0fd70, 0x1f263, 0x188d5, 0x173a6, + 0x0f5ce, 0x163f2, 0x0fd71, 0x1ffd2, 0x160c4, 0x1ffd4, 0x2c7d3, 0x1bb74, +}; + +static const uint8_t coef3_huffbits[1072] = { + 9, 7, 2, 3, 4, 4, 5, 5, + 6, 6, 6, 6, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 8, 8, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 12, 11, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, + 13, 14, 13, 14, 14, 13, 14, 13, + 13, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, + 14, 14, 15, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 16, 15, 16, 16, 16, + 16, 15, 15, 16, 16, 16, 16, 16, + 15, 16, 16, 16, 15, 16, 15, 15, + 16, 15, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 17, 16, 17, 16, 17, 17, 16, + 17, 16, 17, 16, 16, 17, 17, 17, + 16, 17, 16, 16, 17, 16, 17, 16, + 17, 17, 16, 16, 17, 17, 17, 17, + 17, 17, 17, 17, 16, 17, 17, 16, + 17, 17, 17, 17, 17, 17, 17, 17, + 16, 18, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 18, + 17, 17, 17, 17, 18, 17, 17, 18, + 19, 17, 17, 17, 18, 17, 17, 17, + 18, 18, 18, 17, 17, 17, 18, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 17, 18, 18, 18, 18, 17, + 18, 18, 18, 17, 17, 18, 18, 18, + 18, 19, 18, 18, 19, 19, 20, 18, + 19, 18, 19, 19, 18, 19, 20, 18, + 19, 4, 6, 7, 8, 9, 9, 9, + 10, 10, 10, 11, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 16, 15, 15, 15, + 15, 16, 16, 15, 16, 16, 15, 16, + 17, 17, 17, 17, 17, 16, 16, 16, + 16, 16, 17, 17, 17, 16, 18, 17, + 17, 17, 18, 17, 17, 18, 17, 17, + 17, 17, 17, 18, 17, 18, 18, 18, + 17, 17, 18, 19, 18, 18, 17, 17, + 18, 18, 18, 18, 19, 17, 17, 18, + 20, 19, 19, 18, 19, 18, 19, 19, + 19, 19, 17, 5, 7, 9, 10, 10, + 11, 11, 12, 12, 12, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 15, + 14, 15, 15, 15, 15, 15, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 15, 16, 16, 17, 17, 17, + 16, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 16, + 16, 19, 18, 18, 19, 17, 19, 20, + 17, 18, 18, 18, 18, 18, 18, 6, + 8, 10, 11, 12, 12, 12, 13, 13, + 13, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, + 16, 17, 17, 17, 16, 16, 17, 17, + 17, 17, 17, 17, 17, 16, 16, 16, + 17, 18, 18, 18, 17, 19, 19, 18, + 18, 17, 18, 19, 18, 17, 18, 18, + 19, 18, 17, 17, 6, 9, 11, 12, + 13, 13, 13, 14, 14, 14, 15, 15, + 15, 15, 15, 16, 16, 16, 16, 16, + 16, 17, 16, 17, 17, 17, 17, 17, + 17, 17, 18, 17, 18, 17, 17, 18, + 18, 19, 19, 17, 17, 7, 10, 12, + 13, 13, 14, 14, 14, 14, 15, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 17, 17, 17, 17, 18, 17, 18, + 18, 18, 18, 18, 18, 18, 18, 17, + 17, 18, 18, 18, 18, 18, 18, 7, + 10, 12, 13, 14, 15, 15, 15, 15, + 16, 16, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 18, 17, 17, 8, + 11, 13, 14, 15, 15, 15, 15, 16, + 16, 18, 17, 17, 18, 17, 17, 18, + 17, 17, 18, 18, 19, 18, 18, 19, + 19, 19, 18, 18, 18, 8, 11, 13, + 14, 15, 16, 16, 16, 16, 17, 17, + 17, 18, 17, 18, 19, 18, 18, 18, + 18, 18, 18, 8, 12, 14, 15, 15, + 16, 16, 16, 17, 17, 18, 18, 18, + 18, 18, 18, 18, 18, 17, 9, 12, + 14, 15, 16, 16, 17, 17, 17, 17, + 18, 9, 12, 14, 15, 16, 17, 17, + 17, 18, 9, 13, 15, 16, 17, 17, + 18, 17, 18, 17, 9, 13, 15, 16, + 17, 18, 18, 18, 10, 13, 15, 16, + 18, 10, 14, 16, 17, 18, 10, 14, + 16, 17, 10, 14, 16, 18, 18, 10, + 14, 16, 18, 18, 11, 15, 16, 11, + 15, 17, 11, 15, 17, 11, 15, 17, + 11, 15, 17, 11, 15, 17, 12, 16, + 17, 12, 15, 12, 16, 12, 16, 18, + 12, 16, 12, 16, 12, 16, 12, 16, + 17, 12, 16, 18, 12, 17, 13, 16, + 13, 16, 13, 16, 18, 13, 16, 13, + 17, 13, 17, 13, 17, 13, 17, 13, + 17, 13, 17, 13, 17, 13, 17, 13, + 16, 13, 17, 13, 17, 13, 17, 14, + 17, 14, 17, 14, 17, 14, 14, 14, + 17, 14, 17, 14, 14, 18, 14, 14, + 18, 14, 18, 14, 18, 14, 17, 14, + 17, 14, 17, 14, 14, 18, 14, 15, + 15, 15, 14, 15, 15, 14, 15, 15, + 15, 18, 15, 18, 15, 15, 17, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 16, 15, 15, 15, 15, 16, + 16, 16, 16, 16, 15, 15, 15, 15, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 17, 16, 16, + 16, 17, 16, 16, 16, 17, 17, 17, + 17, 17, 16, 17, 17, 17, 17, 16, + 16, 16, 17, 17, 17, 17, 16, 17, + 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 18, 17, +}; + +static const uint32_t coef4_huffcodes[476] = { + 0x00f01, 0x0001e, 0x00000, 0x00004, 0x00006, 0x0000d, 0x0000a, 0x00017, + 0x0001d, 0x00017, 0x0002c, 0x00031, 0x00039, 0x0003e, 0x00039, 0x0005a, + 0x00066, 0x00070, 0x0007b, 0x00070, 0x00077, 0x000af, 0x000c9, 0x000f2, + 0x000f4, 0x000b2, 0x000e3, 0x0015b, 0x0015d, 0x00181, 0x0019d, 0x001e3, + 0x001c5, 0x002b5, 0x002db, 0x00338, 0x003c3, 0x003cc, 0x003f0, 0x002cd, + 0x003fa, 0x003a1, 0x005b4, 0x00657, 0x007ab, 0x0074d, 0x0074c, 0x00ac1, + 0x00ac5, 0x0076b, 0x00ca8, 0x00f04, 0x00f00, 0x00fe3, 0x00f3c, 0x00f10, + 0x00f39, 0x00fe6, 0x00e26, 0x00e90, 0x016c5, 0x01827, 0x01954, 0x015c5, + 0x01958, 0x01f8a, 0x01c4a, 0x02b0f, 0x02b41, 0x02b0e, 0x033c6, 0x03050, + 0x01c4f, 0x02d88, 0x0305c, 0x03c18, 0x02b4f, 0x02cc2, 0x03a47, 0x05680, + 0x0569d, 0x06442, 0x06443, 0x06446, 0x0656e, 0x06444, 0x07120, 0x0748a, + 0x0c1ba, 0x07e22, 0x07aa6, 0x07f25, 0x07aa7, 0x07e20, 0x0c11b, 0x0c118, + 0x07aa5, 0x0ad0a, 0x0f389, 0x19ebb, 0x0caad, 0x0fe42, 0x0fe40, 0x16c34, + 0x2b4e5, 0x33d65, 0x16c30, 0x1e7ae, 0x1e25c, 0x18370, 0x1e703, 0x19eba, + 0x16c37, 0x0e234, 0x16c6e, 0x00004, 0x0002a, 0x00061, 0x00075, 0x000cb, + 0x000ff, 0x00190, 0x001eb, 0x001d1, 0x002b9, 0x00307, 0x00339, 0x0033f, + 0x003fb, 0x003b4, 0x0060c, 0x00679, 0x00645, 0x0067d, 0x0078a, 0x007e3, + 0x00749, 0x00ac4, 0x00ad2, 0x00ae3, 0x00c10, 0x00c16, 0x00ad1, 0x00cf4, + 0x00fe2, 0x01586, 0x00e9d, 0x019f1, 0x01664, 0x01e26, 0x01d38, 0x02b4d, + 0x033c5, 0x01fc2, 0x01fc3, 0x01d28, 0x03c1d, 0x0598e, 0x0f094, 0x07aa4, + 0x0ad38, 0x0ac0c, 0x0c11a, 0x079ea, 0x0c881, 0x0fe44, 0x0b635, 0x0ac0d, + 0x0b61e, 0x05987, 0x07121, 0x0f382, 0x0f387, 0x0e237, 0x0fe47, 0x0f383, + 0x0f091, 0x0f385, 0x0e233, 0x182ee, 0x19eb8, 0x1663e, 0x0f093, 0x00014, + 0x00058, 0x00159, 0x00167, 0x00300, 0x003d4, 0x005b5, 0x0079d, 0x0076a, + 0x00b67, 0x00b60, 0x00f05, 0x00cf0, 0x00f17, 0x00e95, 0x01822, 0x01913, + 0x016c2, 0x0182f, 0x01959, 0x01fcb, 0x01e27, 0x01c40, 0x033c7, 0x01e7b, + 0x01c49, 0x02d89, 0x01e23, 0x01660, 0x03f12, 0x02cc6, 0x033e1, 0x05b34, + 0x0609a, 0x06569, 0x07488, 0x07e21, 0x0cf5f, 0x0712c, 0x0389d, 0x067cf, + 0x07f28, 0x1663f, 0x33d67, 0x1663d, 0x1e25d, 0x3c1ab, 0x15c44, 0x16c36, + 0x0001f, 0x000ec, 0x00323, 0x005b2, 0x0079f, 0x00ac2, 0x00f16, 0x00e9e, + 0x01956, 0x01e0f, 0x019ea, 0x01666, 0x02b89, 0x02b02, 0x02d8c, 0x03c1b, + 0x03c19, 0x032b5, 0x03f9c, 0x02ccf, 0x03897, 0x05b35, 0x0ad02, 0x07f29, + 0x06441, 0x03884, 0x07888, 0x0784e, 0x06568, 0x0c1bb, 0x05986, 0x067cc, + 0x0fe49, 0x0fe48, 0x0c1bc, 0x0fe41, 0x18371, 0x1663c, 0x0e231, 0x0711e, + 0x0ad09, 0x0f092, 0x0002d, 0x001db, 0x00781, 0x00c1a, 0x00f55, 0x01580, + 0x01ea8, 0x02d9b, 0x032af, 0x03f16, 0x03c1c, 0x07834, 0x03c45, 0x0389c, + 0x067ce, 0x06445, 0x0c1b9, 0x07889, 0x07f3a, 0x0784f, 0x07f2b, 0x0ad0b, + 0x0f090, 0x0c11d, 0x0e94e, 0x0711f, 0x0e9f1, 0x0f38e, 0x079e9, 0x0ad03, + 0x0f09b, 0x0caae, 0x0fe46, 0x2b4e6, 0x0e9f0, 0x19eb6, 0x67ac1, 0x67ac0, + 0x33d66, 0x0f388, 0x00071, 0x003a0, 0x00ca9, 0x01829, 0x01d39, 0x02b43, + 0x02cc4, 0x06554, 0x0f09a, 0x0b61f, 0x067cd, 0x0711c, 0x0b636, 0x07f2a, + 0x0b634, 0x0c11f, 0x0cf5e, 0x0b61d, 0x0f06b, 0x0caab, 0x0c1be, 0x0e94c, + 0x0f099, 0x182ed, 0x0e94f, 0x0c119, 0x0e232, 0x2b4e4, 0x0f38a, 0x19eb4, + 0x1e25f, 0x0e94d, 0x000b7, 0x00785, 0x016cc, 0x03051, 0x033c4, 0x0656f, + 0x03891, 0x0711d, 0x0caaf, 0x0f097, 0x07489, 0x0f098, 0x0c880, 0x0caaa, + 0x0f386, 0x19eb7, 0x16c6f, 0x0f384, 0x182e8, 0x182e9, 0x0e230, 0x1e700, + 0x33d62, 0x33d63, 0x33d64, 0x16c33, 0x0e216, 0x000fd, 0x00c15, 0x01665, + 0x03c4a, 0x07f3b, 0x07896, 0x0c11c, 0x0e215, 0x16c32, 0x0f38b, 0x0f38d, + 0x182ea, 0x1e701, 0x712df, 0x15c46, 0x00194, 0x00fe0, 0x03f13, 0x0748b, + 0x0f096, 0x0cf80, 0x1e25e, 0xe25bd, 0x33d61, 0x16c31, 0x001f9, 0x01912, + 0x05710, 0x0f3d0, 0x0c1bf, 0x00301, 0x01e24, 0x0ad08, 0x003cd, 0x01c41, + 0x0c1bd, 0x00563, 0x03a52, 0x0f3d1, 0x00570, 0x02cce, 0x0e217, 0x0067b, + 0x0655d, 0x0074b, 0x06447, 0x00c12, 0x074fb, 0x00f08, 0x0b61c, 0x00e22, + 0x0fe43, 0x016c7, 0x01836, 0x019f2, 0x01c43, 0x01d3f, 0x01fcf, 0x02b4c, + 0x0304c, 0x032b6, 0x03a46, 0x05607, 0x03f17, 0x02cc5, 0x0609b, 0x0655c, + 0x07e23, 0x067c1, 0x07f26, 0x07f27, 0x0f095, 0x0e9f3, 0x0cf81, 0x0c11e, + 0x0caac, 0x0f38f, 0x0e9f2, 0x074fa, 0x0e236, 0x0fe45, 0x1c428, 0x0e235, + 0x182ef, 0x19eb5, 0x0f3d6, 0x182ec, 0x16c35, 0x0f38c, 0x2b4e7, 0x15c47, + 0xe25bc, 0x1e702, 0x1c4b6, 0x0e25a, 0x3c1aa, 0x15c45, 0x1c429, 0x19eb9, + 0x1e7af, 0x182eb, 0x1e0d4, 0x3896e, +}; + +static const uint8_t coef4_huffbits[476] = { + 12, 6, 2, 3, 4, 4, 5, 5, + 5, 6, 6, 6, 6, 6, 7, 7, + 7, 7, 7, 8, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 9, 9, 9, + 10, 10, 10, 10, 10, 10, 10, 11, + 10, 11, 11, 11, 11, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 16, 16, + 16, 15, 15, 15, 15, 15, 16, 16, + 15, 16, 16, 17, 16, 16, 16, 17, + 18, 18, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 4, 6, 7, 8, 8, + 8, 9, 9, 10, 10, 10, 10, 10, + 10, 11, 11, 11, 11, 11, 11, 11, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 13, 13, 13, 14, 13, 14, 14, + 14, 13, 13, 14, 14, 16, 16, 15, + 16, 16, 16, 15, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 17, 16, 16, + 16, 16, 17, 17, 17, 18, 16, 5, + 8, 9, 10, 10, 10, 11, 11, 12, + 12, 12, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 14, 13, + 14, 14, 13, 14, 14, 15, 14, 15, + 15, 15, 16, 15, 16, 16, 15, 15, + 15, 18, 18, 18, 17, 18, 17, 17, + 6, 9, 10, 11, 11, 12, 12, 13, + 13, 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 15, 15, 15, 16, 15, + 15, 15, 15, 15, 15, 16, 16, 15, + 16, 16, 16, 16, 17, 18, 17, 16, + 16, 16, 7, 10, 11, 12, 12, 13, + 13, 14, 14, 14, 14, 15, 14, 15, + 15, 15, 16, 15, 15, 15, 15, 16, + 16, 16, 17, 16, 17, 16, 15, 16, + 16, 16, 16, 18, 17, 17, 19, 19, + 18, 16, 7, 11, 12, 13, 14, 14, + 15, 15, 16, 16, 15, 16, 16, 15, + 16, 16, 16, 16, 16, 16, 16, 17, + 16, 17, 17, 16, 17, 18, 16, 17, + 17, 17, 8, 11, 13, 14, 14, 15, + 15, 16, 16, 16, 16, 16, 16, 16, + 16, 17, 17, 16, 17, 17, 17, 17, + 18, 18, 18, 17, 17, 8, 12, 14, + 14, 15, 15, 16, 17, 17, 16, 16, + 17, 17, 20, 17, 9, 12, 14, 16, + 16, 16, 17, 21, 18, 17, 9, 13, + 15, 16, 16, 10, 13, 16, 10, 14, + 16, 11, 15, 16, 11, 15, 17, 11, + 15, 12, 15, 12, 16, 12, 16, 13, + 16, 13, 13, 13, 14, 14, 13, 14, + 14, 14, 15, 15, 14, 15, 15, 15, + 15, 15, 15, 15, 16, 17, 16, 16, + 16, 16, 17, 16, 17, 16, 18, 17, + 17, 17, 16, 17, 17, 16, 18, 17, + 21, 17, 18, 17, 18, 17, 18, 17, + 17, 17, 17, 19, +}; + +static const uint32_t coef5_huffcodes[435] = { + 0x00347, 0x0000b, 0x00001, 0x00001, 0x0000c, 0x00004, 0x00010, 0x00015, + 0x0001f, 0x0000b, 0x00023, 0x00026, 0x00029, 0x00035, 0x00037, 0x00001, + 0x00015, 0x0001a, 0x0001d, 0x0001c, 0x0001e, 0x0004e, 0x00049, 0x00051, + 0x00078, 0x00004, 0x00000, 0x00008, 0x0000d, 0x0007b, 0x00005, 0x00032, + 0x00095, 0x00091, 0x00096, 0x000a1, 0x000d9, 0x00003, 0x00019, 0x00061, + 0x00066, 0x00060, 0x00017, 0x0000e, 0x00063, 0x001a0, 0x001b7, 0x001e6, + 0x001e7, 0x001b6, 0x00018, 0x001e8, 0x00038, 0x00031, 0x00005, 0x0003d, + 0x00027, 0x001ea, 0x0001a, 0x000c5, 0x000f9, 0x000ff, 0x000db, 0x00250, + 0x000fc, 0x0025c, 0x00008, 0x00075, 0x003d7, 0x003d3, 0x001b0, 0x0007c, + 0x003ca, 0x00036, 0x00189, 0x004a6, 0x004a2, 0x004fb, 0x000c0, 0x0007f, + 0x0009a, 0x00311, 0x0006e, 0x0009b, 0x0068c, 0x006c0, 0x00484, 0x00012, + 0x000c3, 0x0094f, 0x00979, 0x009f9, 0x00d09, 0x00da6, 0x00da8, 0x00901, + 0x000c1, 0x00373, 0x00d08, 0x009fa, 0x00d8b, 0x00d85, 0x00d86, 0x000df, + 0x006e2, 0x000ce, 0x00f24, 0x009fe, 0x001f7, 0x007c1, 0x000cf, 0x009fc, + 0x009ff, 0x00d89, 0x00da9, 0x009fd, 0x001f8, 0x01a36, 0x0128c, 0x0129d, + 0x01a37, 0x00196, 0x003ea, 0x00f8b, 0x00d93, 0x01e45, 0x01e58, 0x01e4b, + 0x01e59, 0x013f1, 0x00309, 0x00265, 0x00308, 0x0243a, 0x027e1, 0x00f89, + 0x00324, 0x03cbc, 0x03c86, 0x03695, 0x0243c, 0x0243b, 0x0243e, 0x01e4a, + 0x003a5, 0x03468, 0x03428, 0x03c84, 0x027e0, 0x025e2, 0x01880, 0x00197, + 0x00325, 0x03cb7, 0x0791e, 0x007ec, 0x06c75, 0x004c8, 0x04bc7, 0x004c6, + 0x00983, 0x0481e, 0x01b53, 0x0251b, 0x01b58, 0x00984, 0x04fa8, 0x03cbb, + 0x00f8a, 0x00322, 0x0346a, 0x0243d, 0x00326, 0x03469, 0x0481f, 0x0481d, + 0x00746, 0x09032, 0x01b50, 0x01d13, 0x0d8e4, 0x0481b, 0x06c74, 0x0796b, + 0x07969, 0x00985, 0x0d8e3, 0x00986, 0x00fa2, 0x01301, 0x06c7c, 0x00987, + 0x03cb8, 0x0f4af, 0x00e88, 0x1b1c0, 0x00fce, 0x033eb, 0x03f6a, 0x03f69, + 0x00fcf, 0x0791f, 0x004c9, 0x04871, 0x00fcd, 0x00982, 0x00fcc, 0x00fa3, + 0x01d12, 0x0796c, 0x01b47, 0x00321, 0x0796a, 0x0d8e2, 0x04872, 0x04873, + 0x0000e, 0x00014, 0x0000a, 0x000a0, 0x00012, 0x0007d, 0x001a2, 0x0003b, + 0x0025f, 0x000dd, 0x0027c, 0x00343, 0x00368, 0x0036b, 0x0003e, 0x001fa, + 0x00485, 0x001b3, 0x0007f, 0x001b1, 0x0019e, 0x004ba, 0x007ad, 0x00339, + 0x00066, 0x007a4, 0x00793, 0x006c6, 0x0007e, 0x000f1, 0x00372, 0x009fb, + 0x00d83, 0x00d8a, 0x00947, 0x009f4, 0x001d0, 0x01b09, 0x01b4b, 0x007ec, + 0x003e1, 0x000ca, 0x003ec, 0x02539, 0x04fa9, 0x01b57, 0x03429, 0x03d2a, + 0x00d97, 0x003a7, 0x00dc0, 0x00d96, 0x00dc1, 0x007eb, 0x03cba, 0x00c43, + 0x00c41, 0x01b52, 0x007ef, 0x00323, 0x03cb9, 0x03c83, 0x007d0, 0x007ed, + 0x06c7f, 0x09033, 0x03f6c, 0x36383, 0x1e95d, 0x06c78, 0x00747, 0x01b51, + 0x00022, 0x00016, 0x00039, 0x00252, 0x00079, 0x00486, 0x00338, 0x00369, + 0x00d88, 0x00026, 0x00d87, 0x00f4b, 0x00d82, 0x00027, 0x001e1, 0x01a15, + 0x007c7, 0x012f0, 0x001e0, 0x006d0, 0x01a16, 0x01e44, 0x01e5f, 0x03690, + 0x00d90, 0x00c42, 0x00daf, 0x00d92, 0x00f80, 0x00cfb, 0x0342f, 0x0487f, + 0x01b46, 0x07968, 0x00d95, 0x00d91, 0x01b55, 0x03f68, 0x04bc6, 0x03cbd, + 0x00f81, 0x00320, 0x00069, 0x000fe, 0x006d5, 0x0033f, 0x000de, 0x007c6, + 0x01e40, 0x00d94, 0x00f88, 0x03c8e, 0x03694, 0x00dae, 0x00dad, 0x00267, + 0x003a6, 0x00327, 0x0487e, 0x007ee, 0x00749, 0x004c7, 0x03692, 0x01b56, + 0x00fd1, 0x07a56, 0x06c77, 0x09031, 0x00748, 0x06c7a, 0x0796d, 0x033ea, + 0x06c76, 0x00fd0, 0x36382, 0x1e417, 0x00745, 0x04faf, 0x0d8e1, 0x03f6b, + 0x1e95c, 0x04fad, 0x0009e, 0x004bd, 0x0067c, 0x01b08, 0x003eb, 0x01b45, + 0x03691, 0x0d8e5, 0x07904, 0x00981, 0x007ea, 0x019f4, 0x06c7d, 0x04fab, + 0x04fac, 0x06c7e, 0x01300, 0x06c7b, 0x0006f, 0x003f7, 0x03c85, 0x004c4, + 0x0001e, 0x006e1, 0x03693, 0x01b44, 0x00241, 0x01e46, 0x0019d, 0x00266, + 0x004bb, 0x02538, 0x007ac, 0x01b54, 0x00902, 0x04870, 0x00da7, 0x00900, + 0x00185, 0x06c79, 0x006e3, 0x003e9, 0x01e94, 0x003ed, 0x003f2, 0x0342e, + 0x0346b, 0x0251a, 0x004c5, 0x01881, 0x0481c, 0x01b59, 0x03c87, 0x04fae, + 0x007e9, 0x03f6d, 0x0f20a, 0x09030, 0x04faa, 0x0d8e6, 0x03f6f, 0x0481a, + 0x03f6e, 0x1e416, 0x0d8e7, +}; + +static const uint8_t coef5_huffbits[435] = { + 10, 4, 2, 4, 4, 5, 5, 5, + 5, 6, 6, 6, 6, 6, 6, 7, + 7, 7, 7, 7, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 7, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 10, 9, 10, 10, 10, 10, + 10, 9, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 10, 10, 11, 11, + 10, 11, 11, 11, 11, 11, 12, 12, + 12, 12, 12, 12, 11, 11, 11, 12, + 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 13, + 13, 13, 12, 12, 13, 13, 13, 12, + 12, 12, 12, 12, 13, 13, 13, 13, + 13, 14, 14, 14, 14, 13, 13, 13, + 13, 13, 14, 14, 14, 14, 14, 14, + 15, 14, 14, 14, 14, 14, 14, 13, + 14, 14, 14, 14, 14, 14, 15, 14, + 15, 14, 15, 15, 15, 15, 15, 15, + 16, 15, 15, 14, 15, 16, 15, 14, + 14, 15, 14, 14, 15, 14, 15, 15, + 15, 16, 15, 17, 16, 15, 15, 15, + 15, 16, 16, 16, 16, 17, 15, 16, + 14, 16, 16, 17, 16, 16, 16, 16, + 16, 15, 15, 15, 16, 16, 16, 16, + 17, 15, 15, 15, 15, 16, 15, 15, + 4, 7, 8, 8, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 12, + 12, 11, 11, 11, 12, 12, 12, 12, + 12, 12, 12, 12, 13, 13, 13, 13, + 12, 13, 14, 14, 15, 15, 14, 14, + 14, 14, 14, 14, 14, 15, 14, 14, + 14, 15, 15, 15, 14, 14, 15, 15, + 15, 16, 16, 18, 17, 15, 15, 15, + 6, 9, 10, 10, 11, 11, 12, 12, + 12, 13, 12, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 15, + 15, 15, 14, 14, 15, 16, 15, 14, + 14, 15, 7, 10, 11, 12, 13, 13, + 13, 14, 14, 14, 14, 14, 14, 14, + 14, 15, 15, 15, 15, 15, 14, 15, + 16, 15, 15, 16, 15, 15, 15, 16, + 15, 16, 18, 17, 15, 15, 16, 16, + 17, 15, 8, 11, 13, 13, 14, 15, + 14, 16, 15, 16, 15, 15, 15, 15, + 15, 15, 17, 15, 9, 12, 14, 15, + 10, 13, 14, 15, 10, 13, 11, 14, + 11, 14, 11, 15, 12, 15, 12, 12, + 13, 15, 13, 14, 13, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 14, 15, + 15, 16, 16, 16, 15, 16, 16, 15, + 16, 17, 16, +}; + +static const uint16_t levels0[60] = { + 317, 92, 62, 60, 19, 17, 10, 7, + 6, 5, 5, 3, 3, 3, 2, 2, + 2, 2, 2, 2, 2, 1, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, +}; + +static const uint16_t levels1[40] = { + 311, 91, 61, 28, 10, 6, 5, 2, + 2, 2, 2, 2, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, +}; + +static const uint16_t levels2[340] = { + 181, 110, 78, 63, 61, 62, 60, 61, + 33, 41, 41, 19, 17, 19, 12, 11, + 9, 11, 10, 6, 8, 7, 6, 4, + 5, 5, 4, 4, 3, 4, 3, 5, + 3, 4, 3, 3, 3, 3, 3, 3, + 2, 2, 4, 2, 3, 2, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, + 3, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 1, 2, 1, 2, 2, + 2, 2, 1, 2, 1, 1, 1, 2, + 2, 1, 2, 1, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, +}; + +static const uint16_t levels3[180] = { + 351, 122, 76, 61, 41, 42, 24, 30, + 22, 19, 11, 9, 10, 8, 5, 5, + 4, 5, 5, 3, 3, 3, 3, 3, + 3, 3, 2, 2, 3, 2, 2, 2, + 3, 3, 2, 2, 2, 3, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 1, + 2, 2, 1, 2, 1, 2, 2, 2, + 2, 2, 2, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, + 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, +}; + +static const uint16_t levels4[70] = { + 113, 68, 49, 42, 40, 32, 27, 15, + 10, 5, 3, 3, 3, 3, 2, 2, + 2, 2, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, +}; + +static const uint16_t levels5[40] = { + 214, 72, 42, 40, 18, 4, 4, 2, + 2, 2, 2, 2, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, +}; + +static const CoefVLCTable coef_vlcs[6] = { + { sizeof(coef0_huffbits), sizeof(levels0) / 2, coef0_huffcodes, coef0_huffbits, levels0, }, + { sizeof(coef1_huffbits), sizeof(levels1) / 2, coef1_huffcodes, coef1_huffbits, levels1, }, + { sizeof(coef2_huffbits), sizeof(levels2) / 2, coef2_huffcodes, coef2_huffbits, levels2, }, + { sizeof(coef3_huffbits), sizeof(levels3) / 2, coef3_huffcodes, coef3_huffbits, levels3, }, + { sizeof(coef4_huffbits), sizeof(levels4) / 2, coef4_huffcodes, coef4_huffbits, levels4, }, + { sizeof(coef5_huffbits), sizeof(levels5) / 2, coef5_huffcodes, coef5_huffbits, levels5, }, +}; + +#endif /* AVCODEC_WMADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmaprodata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmaprodata.h new file mode 100644 index 00000000..53824799 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmaprodata.h @@ -0,0 +1,604 @@ +/* + * WMA 9/3/PRO compatible decoder + * Copyright (c) 2007 Baptiste Coudurier, Benjamin Larsson, Ulion + * Copyright (c) 2008 - 2009 Sascha Sommer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief tables for wmapro decoding + */ + +#ifndef AVCODEC_WMAPRODATA_H +#define AVCODEC_WMAPRODATA_H + +#include +#include + +/** + * @brief frequencies to divide the frequency spectrum into scale factor bands + */ +static const uint16_t critical_freq[] = { + 100, 200, 300, 400, 510, 630, 770, + 920, 1080, 1270, 1480, 1720, 2000, 2320, + 2700, 3150, 3700, 4400, 5300, 6400, 7700, + 9500, 12000, 15500, 20675, 28575, 41375, 63875, +}; + + +/** + * @name Huffman tables for DPCM-coded scale factors + * @{ + */ +#define HUFF_SCALE_SIZE 121 +#define HUFF_SCALE_MAXBITS 19 +static const uint16_t scale_huffcodes[HUFF_SCALE_SIZE] = { + 0xE639, 0xE6C2, 0xE6C1, 0xE6C0, 0xE63F, 0xE63E, 0xE63D, 0xE63C, + 0xE63B, 0xE63A, 0xE638, 0xE637, 0xE636, 0xE635, 0xE634, 0xE632, + 0xE633, 0xE620, 0x737B, 0xE610, 0xE611, 0xE612, 0xE613, 0xE614, + 0xE615, 0xE616, 0xE617, 0xE618, 0xE619, 0xE61A, 0xE61B, 0xE61C, + 0xE61D, 0xE61E, 0xE61F, 0xE6C3, 0xE621, 0xE622, 0xE623, 0xE624, + 0xE625, 0xE626, 0xE627, 0xE628, 0xE629, 0xE62A, 0xE62B, 0xE62C, + 0xE62D, 0xE62E, 0xE62F, 0xE630, 0xE631, 0x1CDF, 0x0E60, 0x0399, + 0x00E7, 0x001D, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0006, + 0x0002, 0x0007, 0x0006, 0x000F, 0x0038, 0x0072, 0x039A, 0xE6C4, + 0xE6C5, 0xE6C6, 0xE6C7, 0xE6C8, 0xE6C9, 0xE6CA, 0xE6CB, 0xE6CC, + 0xE6CD, 0xE6CE, 0xE6CF, 0xE6D0, 0xE6D1, 0xE6D2, 0xE6D3, 0xE6D4, + 0xE6D5, 0xE6D6, 0xE6D7, 0xE6D8, 0xE6D9, 0xE6DA, 0xE6DB, 0xE6DC, + 0xE6DD, 0xE6DE, 0xE6DF, 0xE6E0, 0xE6E1, 0xE6E2, 0xE6E3, 0xE6E4, + 0xE6E5, 0xE6E6, 0xE6E7, 0xE6E8, 0xE6E9, 0xE6EA, 0xE6EB, 0xE6EC, + 0xE6ED, 0xE6EE, 0xE6EF, 0xE6F0, 0xE6F1, 0xE6F2, 0xE6F3, 0xE6F4, + 0xE6F5, +}; + +static const uint8_t scale_huffbits[HUFF_SCALE_SIZE] = { + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 18, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 16, 15, 13, + 11, 8, 5, 2, 1, 3, 5, 6, + 6, 7, 7, 7, 9, 10, 13, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, +}; +/** @} */ + + +/** + * @name Huffman, run and level tables for runlevel-coded scale factors + * @{ + */ +#define HUFF_SCALE_RL_SIZE 120 +#define HUFF_SCALE_RL_MAXBITS 21 +static const uint32_t scale_rl_huffcodes[HUFF_SCALE_RL_SIZE] = { + 0x00010C, 0x000001, 0x10FE2A, 0x000003, 0x000003, 0x000001, 0x000013, + 0x000020, 0x000029, 0x000014, 0x000016, 0x000045, 0x000049, 0x00002F, + 0x000042, 0x00008E, 0x00008F, 0x000129, 0x000009, 0x00000D, 0x0004AC, + 0x00002C, 0x000561, 0x0002E6, 0x00087C, 0x0002E2, 0x00095C, 0x000018, + 0x000001, 0x000016, 0x000044, 0x00002A, 0x000007, 0x000159, 0x000143, + 0x000128, 0x00015A, 0x00012D, 0x00002B, 0x0000A0, 0x000142, 0x00012A, + 0x0002EF, 0x0004AF, 0x00087D, 0x004AE9, 0x0043F9, 0x000067, 0x000199, + 0x002B05, 0x001583, 0x0021FE, 0x10FE2C, 0x000004, 0x00002E, 0x00010D, + 0x00000A, 0x000244, 0x000017, 0x000245, 0x000011, 0x00010E, 0x00012C, + 0x00002A, 0x00002F, 0x000121, 0x000046, 0x00087E, 0x0000BA, 0x000032, + 0x0087F0, 0x0056DC, 0x0002EC, 0x0043FA, 0x002B6F, 0x004AE8, 0x0002B7, + 0x10FE2B, 0x000001, 0x000051, 0x000010, 0x0002EE, 0x000B9C, 0x002576, + 0x000198, 0x0056DD, 0x0000CD, 0x000AC0, 0x000170, 0x004AEF, 0x00002D, + 0x0004AD, 0x0021FF, 0x0005CF, 0x002B04, 0x10FE29, 0x10FE28, 0x0002ED, + 0x002E74, 0x021FC4, 0x004AEE, 0x010FE3, 0x087F17, 0x000000, 0x000097, + 0x0002E3, 0x000ADA, 0x002575, 0x00173B, 0x0043FB, 0x002E75, 0x10FE2D, + 0x0015B6, 0x00056C, 0x000057, 0x000123, 0x000120, 0x00021E, 0x000172, + 0x0002B1, +}; + +static const uint8_t scale_rl_huffbits[HUFF_SCALE_RL_SIZE] = { + 9, 2, 21, 2, 4, 5, 5, + 6, 6, 7, 7, 7, 7, 6, + 7, 8, 8, 9, 10, 10, 11, + 12, 11, 12, 12, 12, 12, 11, + 4, 5, 7, 8, 9, 9, 9, + 9, 9, 9, 8, 8, 9, 9, + 12, 11, 12, 15, 15, 13, 15, + 14, 13, 14, 21, 5, 6, 9, + 10, 10, 11, 10, 11, 9, 9, + 6, 8, 9, 7, 12, 10, 12, + 16, 15, 12, 15, 14, 15, 10, + 21, 6, 7, 11, 12, 14, 14, + 15, 15, 14, 12, 11, 15, 12, + 11, 14, 13, 14, 21, 21, 12, + 16, 18, 15, 17, 20, 7, 8, + 12, 12, 14, 15, 15, 16, 21, + 13, 11, 7, 9, 9, 10, 11, + 10, +}; + + +static const uint8_t scale_rl_run[HUFF_SCALE_RL_SIZE] = { + 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 0, 1, 0, 1, 0, 1, +}; + +static const uint8_t scale_rl_level[HUFF_SCALE_RL_SIZE] = { + 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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, + 7, 7, 8, 8, 9, 9, +}; +/** @} */ + + +/** + * @name Huffman, run and level codes for runlevel-coded coefficients + * @{ + */ +#define HUFF_COEF0_SIZE 272 +#define HUFF_COEF0_MAXBITS 21 +static const uint32_t coef0_huffcodes[HUFF_COEF0_SIZE] = { + 0x00004A, 0x00002B, 0x000000, 0x000003, 0x000006, 0x000009, 0x00000F, + 0x000010, 0x000016, 0x000011, 0x000016, 0x000028, 0x00002F, 0x000026, + 0x000029, 0x000045, 0x000055, 0x00005D, 0x000042, 0x00004E, 0x000051, + 0x00005E, 0x00008D, 0x0000A8, 0x0000AD, 0x000080, 0x000096, 0x00009F, + 0x0000AA, 0x0000BE, 0x00011C, 0x000153, 0x000158, 0x000170, 0x000104, + 0x00010D, 0x000105, 0x000103, 0x00012F, 0x000177, 0x000175, 0x000157, + 0x000174, 0x000225, 0x00023B, 0x00020D, 0x00021F, 0x000281, 0x00027B, + 0x000282, 0x0002AC, 0x0002FD, 0x00044F, 0x000478, 0x00044D, 0x0002EC, + 0x00044E, 0x000564, 0x000409, 0x00040B, 0x000501, 0x000545, 0x0004F3, + 0x000541, 0x00043B, 0x0004F1, 0x0004F4, 0x0008FD, 0x000A94, 0x000811, + 0x000B88, 0x000B91, 0x000B93, 0x0008EA, 0x000899, 0x000B8A, 0x000972, + 0x0009E5, 0x000A8F, 0x000A84, 0x000A8E, 0x000A00, 0x000830, 0x0008E8, + 0x000B95, 0x000871, 0x00083A, 0x000814, 0x000873, 0x000BFE, 0x001728, + 0x001595, 0x001712, 0x00102A, 0x001021, 0x001729, 0x00152E, 0x0013C3, + 0x001721, 0x001597, 0x00151B, 0x0010F2, 0x001403, 0x001703, 0x001503, + 0x001708, 0x0013C1, 0x00170E, 0x00170C, 0x0010E1, 0x0011EA, 0x001020, + 0x001500, 0x0017FA, 0x001704, 0x001705, 0x0017F0, 0x0017FB, 0x0021E6, + 0x002B2D, 0x0020C6, 0x002B29, 0x002E4A, 0x0023AC, 0x001519, 0x0023F3, + 0x002B2C, 0x0021C0, 0x0017FE, 0x0023D7, 0x0017F9, 0x0012E7, 0x0013C0, + 0x002261, 0x0023D3, 0x002057, 0x002056, 0x0021D2, 0x0020C7, 0x0023D2, + 0x0020EC, 0x0044C0, 0x002FE2, 0x00475B, 0x002A03, 0x002FE3, 0x0021E2, + 0x0021D0, 0x002A31, 0x002E13, 0x002E05, 0x0047E5, 0x00000E, 0x000024, + 0x000088, 0x0000B9, 0x00010C, 0x000224, 0x0002B3, 0x000283, 0x0002ED, + 0x00047B, 0x00041E, 0x00043D, 0x0004F5, 0x0005FD, 0x000A92, 0x000B96, + 0x000838, 0x000971, 0x000B83, 0x000B80, 0x000BF9, 0x0011D3, 0x0011E8, + 0x0011D7, 0x001527, 0x0011F8, 0x001073, 0x0010F0, 0x0010E4, 0x0017F8, + 0x001062, 0x001402, 0x0017E3, 0x00151A, 0x001077, 0x00152B, 0x00170D, + 0x0021D3, 0x002E41, 0x0013C2, 0x000029, 0x0000A9, 0x00025D, 0x000419, + 0x000544, 0x000B8B, 0x0009E4, 0x0011D2, 0x001526, 0x001724, 0x0012E6, + 0x00150B, 0x0017FF, 0x002E26, 0x002E4B, 0x002B28, 0x0021E3, 0x002A14, + 0x00475A, 0x002E12, 0x000057, 0x00023E, 0x000A90, 0x000BF0, 0x001072, + 0x001502, 0x0023D6, 0x0020ED, 0x002A30, 0x0044C7, 0x00008C, 0x00047F, + 0x00152A, 0x002262, 0x002E04, 0x0000A1, 0x0005F9, 0x000173, 0x000875, + 0x000171, 0x00152D, 0x0002E3, 0x0017E2, 0x0002AD, 0x0021C1, 0x000479, + 0x0021E7, 0x00041F, 0x005C4E, 0x000543, 0x005C4F, 0x000A91, 0x00898D, + 0x000B97, 0x008746, 0x000970, 0x008745, 0x000B85, 0x00A856, 0x00152F, + 0x010E8E, 0x0010E5, 0x00A857, 0x00170F, 0x021D11, 0x002A58, 0x010E8F, + 0x002E40, 0x021D13, 0x002A59, 0x043A25, 0x002A02, 0x043A21, 0x0044C1, + 0x087448, 0x0047E4, 0x043A20, 0x00542A, 0x087449, 0x00898C, +}; + +static const uint8_t coef0_huffbits[HUFF_COEF0_SIZE] = { + 8, 7, 2, 3, 3, 4, 4, + 5, 5, 6, 6, 6, 6, 7, + 7, 7, 7, 7, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, + 11, 11, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 13, + 12, 12, 12, 12, 12, 12, 13, + 13, 13, 13, 13, 13, 13, 12, + 12, 13, 13, 13, 13, 13, 13, + 13, 13, 14, 14, 13, 13, 14, + 13, 13, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 14, + 14, 14, 14, 14, 14, 14, 15, + 14, 15, 14, 14, 14, 14, 14, + 14, 15, 14, 14, 14, 14, 14, + 14, 14, 15, 15, 15, 15, 14, + 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 4, 7, + 8, 9, 10, 10, 10, 11, 11, + 11, 12, 12, 12, 12, 12, 12, + 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 13, 14, + 15, 14, 14, 6, 9, 11, 12, + 12, 12, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 15, 15, + 15, 15, 7, 10, 12, 13, 14, + 14, 14, 15, 15, 15, 8, 11, + 13, 14, 15, 9, 12, 9, 13, + 10, 13, 10, 14, 11, 15, 11, + 15, 12, 15, 12, 15, 12, 16, + 12, 17, 13, 17, 13, 17, 13, + 18, 14, 17, 14, 19, 14, 18, + 14, 19, 14, 20, 15, 20, 15, + 21, 15, 20, 16, 21, 16, +}; + + +#define HUFF_COEF1_SIZE 244 +#define HUFF_COEF1_MAXBITS 22 +static const uint32_t coef1_huffcodes[HUFF_COEF1_SIZE] = { + 0x0001E2, 0x00007F, 0x000000, 0x000002, 0x000008, 0x00000E, 0x000019, + 0x00002F, 0x000037, 0x000060, 0x00006C, 0x000095, 0x0000C6, 0x0000F0, + 0x00012E, 0x000189, 0x0001A5, 0x0001F8, 0x000253, 0x00030A, 0x000344, + 0x00034D, 0x0003F2, 0x0004BD, 0x0005D7, 0x00062A, 0x00068B, 0x000693, + 0x000797, 0x00097D, 0x000BAB, 0x000C52, 0x000C5E, 0x000D21, 0x000D20, + 0x000F1A, 0x000FCE, 0x000FD1, 0x0012F1, 0x001759, 0x0018AC, 0x0018A7, + 0x0018BF, 0x001A2B, 0x001E52, 0x001E50, 0x001E31, 0x001FB8, 0x0025E6, + 0x0025E7, 0x002EB4, 0x002EB7, 0x003169, 0x00315B, 0x00317C, 0x00316C, + 0x0034CA, 0x00348D, 0x003F40, 0x003CA2, 0x003F76, 0x004BC3, 0x004BE5, + 0x003F73, 0x004BF8, 0x004BF9, 0x006131, 0x00628B, 0x006289, 0x0062DA, + 0x00628A, 0x0062D4, 0x006997, 0x0062B4, 0x006918, 0x00794D, 0x007E7B, + 0x007E87, 0x007EEA, 0x00794E, 0x00699D, 0x007967, 0x00699F, 0x0062DB, + 0x007E7A, 0x007EEB, 0x00BAC0, 0x0097C9, 0x00C537, 0x00C5AB, 0x00D233, + 0x00D338, 0x00BAC1, 0x00D23D, 0x012F91, 0x00D339, 0x00FDC8, 0x00D23C, + 0x00FDDC, 0x00FDC9, 0x00FDDD, 0x00D33C, 0x000003, 0x000016, 0x00003E, + 0x0000C3, 0x0001A1, 0x000347, 0x00062E, 0x000BAA, 0x000F2D, 0x001A2A, + 0x001E58, 0x00309B, 0x003CA3, 0x005D6A, 0x00629A, 0x006996, 0x00794F, + 0x007EE5, 0x00BAD7, 0x00C5AA, 0x00C5F4, 0x00FDDF, 0x00FDDE, 0x018A20, + 0x018A6D, 0x01A67B, 0x01A464, 0x025F21, 0x01F9E2, 0x01F9E3, 0x00000A, + 0x00003D, 0x000128, 0x0003C7, 0x000C24, 0x0018A3, 0x002EB1, 0x003CB2, + 0x00691F, 0x007E79, 0x000013, 0x0000BB, 0x00034E, 0x000D14, 0x0025FD, + 0x004BE7, 0x000024, 0x000188, 0x0007EF, 0x000035, 0x000308, 0x0012F2, + 0x00005C, 0x0003F6, 0x0025E0, 0x00006D, 0x000698, 0x000096, 0x000C25, + 0x0000C7, 0x000F1B, 0x0000F3, 0x0012FF, 0x000174, 0x001A66, 0x0001A0, + 0x003099, 0x0001E4, 0x00316B, 0x000252, 0x003F31, 0x00030B, 0x004BE6, + 0x000346, 0x0062FB, 0x00034F, 0x007966, 0x0003F5, 0x007E86, 0x0005D4, + 0x00C511, 0x00062C, 0x00C5F5, 0x000692, 0x00F299, 0x000795, 0x00F298, + 0x0007E9, 0x018A21, 0x00097E, 0x0175AD, 0x000C27, 0x01A67A, 0x000C57, + 0x02EB59, 0x000D22, 0x0314D9, 0x000F19, 0x03F3C2, 0x000FCD, 0x0348CB, + 0x0012F8, 0x04BE41, 0x0018A0, 0x03F3C1, 0x0018A1, 0x04BE40, 0x0018B7, + 0x0629B0, 0x001A64, 0x0D2329, 0x001E30, 0x03F3C3, 0x001F9F, 0x0BAD62, + 0x001F99, 0x0FCF00, 0x00309A, 0x0629B1, 0x002EB6, 0x175AC3, 0x00314C, + 0x069195, 0x003168, 0x0BAD63, 0x00348E, 0x175AC1, 0x003F30, 0x07E781, + 0x003F41, 0x0D2328, 0x003F42, 0x1F9E03, 0x004BC2, 0x175AC2, 0x003F74, + 0x175AC0, 0x005D61, 0x3F3C05, 0x006130, 0x3F3C04, 0x0062B5, +}; + +static const uint8_t coef1_huffbits[HUFF_COEF1_SIZE] = { + 9, 7, 2, 3, 4, 4, 5, + 6, 6, 7, 7, 8, 8, 8, + 9, 9, 9, 9, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, + 11, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 15, 15, + 14, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, + 15, 15, 16, 16, 16, 16, 16, + 16, 16, 16, 17, 16, 16, 16, + 16, 16, 16, 16, 3, 5, 6, + 8, 9, 10, 11, 12, 12, 13, + 13, 14, 14, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 18, 17, 17, 4, + 6, 9, 10, 12, 13, 14, 14, + 15, 15, 5, 8, 10, 12, 14, + 15, 6, 9, 11, 6, 10, 13, + 7, 10, 14, 7, 11, 8, 12, + 8, 12, 8, 13, 9, 13, 9, + 14, 9, 14, 10, 14, 10, 15, + 10, 15, 10, 15, 10, 15, 11, + 16, 11, 16, 11, 16, 11, 16, + 11, 17, 12, 17, 12, 17, 12, + 18, 12, 18, 12, 18, 12, 18, + 13, 19, 13, 18, 13, 19, 13, + 19, 13, 20, 13, 18, 13, 20, + 13, 20, 14, 19, 14, 21, 14, + 19, 14, 20, 14, 21, 14, 19, + 14, 20, 14, 21, 15, 21, 14, + 21, 15, 22, 15, 22, 15, +}; + + +static const uint16_t coef0_run[HUFF_COEF0_SIZE] = { + 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 0, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, +}; + +static const float coef0_level[HUFF_COEF0_SIZE] = { + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, + 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, + 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, + 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, + 25, 26, 26, 27, 27, 28, +}; + + +static const uint16_t coef1_run[HUFF_COEF1_SIZE] = { + 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, + 2, 3, 4, 5, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, + 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, +}; + +static const float coef1_level[HUFF_COEF1_SIZE] = { + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, + 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, + 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, + 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, + 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, + 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, + 46, 47, 47, 48, 48, 49, 49, 50, 51, 52, +}; +/** @} */ + + +/** + * @name Huffman and vector lookup tables for vector-coded coefficients + * @{ + */ +#define HUFF_VEC4_SIZE 127 +#define HUFF_VEC4_MAXBITS 14 +static const uint16_t vec4_huffcodes[HUFF_VEC4_SIZE] = { + 0x0019, 0x0027, 0x00F2, 0x03BA, 0x0930, 0x1267, 0x0031, 0x0030, + 0x0097, 0x0221, 0x058B, 0x0124, 0x00EB, 0x01D4, 0x03D8, 0x0584, + 0x0364, 0x045F, 0x0F66, 0x0931, 0x24CD, 0x002F, 0x0039, 0x00E8, + 0x02C3, 0x078A, 0x0037, 0x0029, 0x0084, 0x01B1, 0x00ED, 0x0086, + 0x00F9, 0x03AB, 0x01EB, 0x08BC, 0x011E, 0x00F3, 0x0220, 0x058A, + 0x00EC, 0x008E, 0x012B, 0x01EA, 0x0119, 0x04B0, 0x04B1, 0x03B8, + 0x0691, 0x0365, 0x01ED, 0x049A, 0x0EA9, 0x0EA8, 0x08BD, 0x24CC, + 0x0026, 0x0035, 0x00DB, 0x02C4, 0x07B2, 0x0038, 0x002B, 0x007F, + 0x01B3, 0x00F4, 0x0091, 0x0116, 0x03BB, 0x0215, 0x0932, 0x002D, + 0x002A, 0x008A, 0x01DE, 0x0028, 0x0020, 0x005C, 0x0090, 0x0068, + 0x01EE, 0x00E9, 0x008D, 0x012A, 0x0087, 0x005D, 0x0118, 0x0349, + 0x01EF, 0x01E3, 0x08B9, 0x00F0, 0x00D3, 0x0214, 0x049B, 0x00DA, + 0x0089, 0x0125, 0x0217, 0x012D, 0x0690, 0x0094, 0x007D, 0x011F, + 0x007E, 0x0059, 0x0127, 0x01A5, 0x0111, 0x00F8, 0x045D, 0x03B9, + 0x0259, 0x0580, 0x02C1, 0x01DF, 0x0585, 0x0216, 0x0163, 0x01B0, + 0x03C4, 0x08B8, 0x078B, 0x0755, 0x0581, 0x0F67, 0x0000, +}; + +static const uint8_t vec4_huffbits[HUFF_VEC4_SIZE] = { + 5, 6, 8, 10, 12, 13, 6, 6, + 8, 10, 11, 9, 8, 9, 10, 11, + 10, 11, 12, 12, 14, 6, 6, 8, + 10, 11, 6, 6, 8, 9, 8, 8, + 8, 10, 9, 12, 9, 8, 10, 11, + 8, 8, 9, 9, 9, 11, 11, 10, + 11, 10, 9, 11, 12, 12, 12, 14, + 6, 6, 8, 10, 11, 6, 6, 7, + 9, 8, 8, 9, 10, 10, 12, 6, + 6, 8, 9, 6, 6, 7, 8, 7, + 9, 8, 8, 9, 8, 7, 9, 10, + 9, 9, 12, 8, 8, 10, 11, 8, + 8, 9, 10, 9, 11, 8, 7, 9, + 7, 7, 9, 9, 9, 8, 11, 10, + 10, 11, 10, 9, 11, 10, 9, 9, + 10, 12, 11, 11, 11, 12, 1, +}; + + +#define HUFF_VEC2_SIZE 137 +#define HUFF_VEC2_MAXBITS 12 +static const uint16_t vec2_huffcodes[HUFF_VEC2_SIZE] = { + 0x055, 0x01C, 0x01A, 0x02B, 0x028, 0x067, 0x08B, 0x039, + 0x170, 0x10D, 0x2A5, 0x047, 0x464, 0x697, 0x523, 0x8CB, + 0x01B, 0x00E, 0x000, 0x010, 0x012, 0x036, 0x048, 0x04C, + 0x0C2, 0x09B, 0x171, 0x03B, 0x224, 0x34A, 0x2D6, 0x019, + 0x00F, 0x002, 0x014, 0x017, 0x006, 0x05D, 0x054, 0x0C7, + 0x0B4, 0x192, 0x10E, 0x233, 0x043, 0x02C, 0x00F, 0x013, + 0x006, 0x02F, 0x02C, 0x068, 0x077, 0x0DF, 0x111, 0x1A4, + 0x16A, 0x2A4, 0x027, 0x011, 0x018, 0x02D, 0x00F, 0x04A, + 0x040, 0x097, 0x01F, 0x11B, 0x022, 0x16D, 0x066, 0x035, + 0x005, 0x02B, 0x049, 0x009, 0x075, 0x0CB, 0x0AA, 0x187, + 0x106, 0x08A, 0x047, 0x060, 0x06E, 0x01D, 0x074, 0x0C4, + 0x01E, 0x118, 0x1A7, 0x038, 0x042, 0x053, 0x076, 0x0A8, + 0x0CA, 0x082, 0x110, 0x18D, 0x12D, 0x0B9, 0x0C8, 0x0DE, + 0x01C, 0x0AB, 0x113, 0x18C, 0x10F, 0x09A, 0x0A5, 0x0B7, + 0x11A, 0x186, 0x1A6, 0x259, 0x153, 0x18A, 0x193, 0x020, + 0x10C, 0x046, 0x03A, 0x107, 0x149, 0x16C, 0x2D7, 0x225, + 0x258, 0x316, 0x696, 0x317, 0x042, 0x522, 0x290, 0x8CA, + 0x001, +}; + +static const uint8_t vec2_huffbits[HUFF_VEC2_SIZE] = { + 7, 6, 6, 6, 7, 7, 8, 9, + 9, 10, 10, 11, 11, 11, 12, 12, + 6, 4, 5, 5, 6, 6, 7, 8, + 8, 9, 9, 10, 10, 10, 11, 6, + 4, 5, 5, 6, 7, 7, 8, 8, + 9, 9, 10, 10, 11, 6, 5, 5, + 6, 6, 7, 7, 8, 8, 9, 9, + 10, 10, 7, 6, 6, 6, 7, 7, + 8, 8, 9, 9, 10, 10, 7, 6, + 7, 7, 7, 8, 8, 8, 9, 9, + 10, 8, 7, 7, 7, 8, 8, 8, + 9, 9, 9, 9, 8, 8, 8, 8, + 8, 9, 9, 9, 9, 8, 8, 8, + 9, 9, 9, 9, 10, 9, 9, 9, + 9, 9, 9, 10, 9, 9, 9, 10, + 10, 11, 10, 10, 10, 10, 11, 10, + 10, 10, 11, 10, 11, 12, 11, 12, + 3, +}; + + +#define HUFF_VEC1_SIZE 101 +#define HUFF_VEC1_MAXBITS 11 +static const uint16_t vec1_huffcodes[HUFF_VEC1_SIZE] = { + 0x01A, 0x003, 0x017, 0x010, 0x00C, 0x009, 0x005, 0x000, + 0x00D, 0x00A, 0x009, 0x00C, 0x00F, 0x002, 0x004, 0x007, + 0x00B, 0x00F, 0x01C, 0x006, 0x010, 0x015, 0x01C, 0x022, + 0x03B, 0x00E, 0x019, 0x023, 0x034, 0x036, 0x03A, 0x047, + 0x008, 0x00A, 0x01E, 0x031, 0x037, 0x050, 0x053, 0x06B, + 0x06F, 0x08C, 0x0E8, 0x0EA, 0x0EB, 0x016, 0x03E, 0x03F, + 0x06C, 0x089, 0x08A, 0x0A3, 0x0A4, 0x0D4, 0x0DD, 0x0EC, + 0x0EE, 0x11A, 0x1D2, 0x024, 0x025, 0x02E, 0x027, 0x0C2, + 0x0C0, 0x0DA, 0x0DB, 0x111, 0x144, 0x116, 0x14A, 0x145, + 0x1B8, 0x1AB, 0x1DA, 0x1DE, 0x1DB, 0x1DF, 0x236, 0x237, + 0x3A6, 0x3A7, 0x04D, 0x04C, 0x05E, 0x05F, 0x183, 0x182, + 0x186, 0x221, 0x187, 0x220, 0x22E, 0x22F, 0x296, 0x354, + 0x297, 0x355, 0x372, 0x373, 0x016, +}; + +static const uint8_t vec1_huffbits[HUFF_VEC1_SIZE] = { + 7, 6, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 5, 5, 5, + 5, 5, 5, 6, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 5, +}; + + +static const uint16_t symbol_to_vec4[HUFF_VEC4_SIZE] = { + 0, 1, 2, 3, 4, 5, 16, 17, 18, 19, + 20, 32, 33, 34, 35, 48, 49, 50, 64, 65, + 80, 256, 257, 258, 259, 260, 272, 273, 274, 275, + 288, 289, 290, 304, 305, 320, 512, 513, 514, 515, + 528, 529, 530, 544, 545, 560, 768, 769, 770, 784, + 785, 800, 1024, 1025, 1040, 1280, 4096, 4097, 4098, 4099, + 4100, 4112, 4113, 4114, 4115, 4128, 4129, 4130, 4144, 4145, + 4160, 4352, 4353, 4354, 4355, 4368, 4369, 4370, 4384, 4385, + 4400, 4608, 4609, 4610, 4624, 4625, 4640, 4864, 4865, 4880, + 5120, 8192, 8193, 8194, 8195, 8208, 8209, 8210, 8224, 8225, + 8240, 8448, 8449, 8450, 8464, 8465, 8480, 8704, 8705, 8720, + 8960, 12288, 12289, 12290, 12304, 12305, 12320, 12544, 12545, 12560, + 12800, 16384, 16385, 16400, 16640, 20480, 0, +}; + + +static const uint8_t symbol_to_vec2[HUFF_VEC2_SIZE] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 112, 113, 114, 115, 116, 117, 118, 119, 120, 128, 129, 130, 131, 132, + 133, 134, 135, 144, 145, 146, 147, 148, 149, 150, 160, 161, 162, 163, 164, + 165, 176, 177, 178, 179, 180, 192, 193, 194, 195, 208, 209, 210, 224, 225, + 240, 0, +}; +/** @} */ + + +/** + * @brief decorrelation matrix for multichannel streams + **/ +static const float default_decorrelation_matrices[] = { + 1.000000, 0.707031, -0.707031, 0.707031, 0.707031, 0.578125, 0.707031, + 0.410156, 0.578125, -0.707031, 0.410156, 0.578125, 0.000000, -0.816406, + 0.500000, 0.652344, 0.500000, 0.269531, 0.500000, 0.269531, -0.500000, + -0.652344, 0.500000, -0.269531, -0.500000, 0.652344, 0.500000, -0.652344, + 0.500000, -0.269531, 0.445312, 0.601562, 0.511719, 0.371094, 0.195312, + 0.445312, 0.371094, -0.195312, -0.601562, -0.511719, 0.445312, 0.000000, + -0.632812, 0.000000, 0.632812, 0.445312, -0.371094, -0.195312, 0.601562, + -0.511719, 0.445312, -0.601562, 0.511719, -0.371094, 0.195312, 0.410156, + 0.558594, 0.500000, 0.410156, 0.289062, 0.148438, 0.410156, 0.410156, + 0.000000, -0.410156, -0.578125, -0.410156, 0.410156, 0.148438, -0.500000, + -0.410156, 0.289062, 0.558594, 0.410156, -0.148438, -0.500000, 0.410156, + 0.289062, -0.558594, 0.410156, -0.410156, 0.000000, 0.410156, -0.578125, + 0.410156, 0.410156, -0.558594, 0.500000, -0.410156, 0.289062, -0.148438, +}; + +/** + * @brief default decorrelation matrix offsets + */ +static const float * const default_decorrelation[] = { + NULL, + &default_decorrelation_matrices[0], + &default_decorrelation_matrices[1], + &default_decorrelation_matrices[5], + &default_decorrelation_matrices[14], + &default_decorrelation_matrices[30], + &default_decorrelation_matrices[55] +}; + +#endif /* AVCODEC_WMAPRODATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmavoice_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmavoice_data.h new file mode 100644 index 00000000..cbf65b04 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmavoice_data.h @@ -0,0 +1,3259 @@ +/* + * Windows Media Voice (WMAVoice) tables. + * Copyright (c) 2009 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @brief Windows Media Voice (WMAVoice) tables + * @author Ronald S. Bultje + */ + +#ifndef AVCODEC_WMAVOICE_DATA_H +#define AVCODEC_WMAVOICE_DATA_H + +#include + +static const uint8_t wmavoice_dq_lsp10i[0xf00] = { + 125, 109, 84, 55, 34, 51, 109, 112, 118, 132, + 122, 102, 78, 80, 132, 119, 132, 132, 125, 131, + 109, 91, 131, 131, 136, 136, 137, 137, 140, 145, + 140, 143, 117, 136, 122, 106, 109, 91, 115, 119, + 133, 117, 103, 80, 55, 117, 123, 102, 93, 80, + 139, 116, 70, 39, 95, 89, 103, 113, 112, 122, + 135, 244, 229, 215, 199, 181, 163, 150, 146, 144, + 143, 173, 171, 154, 155, 154, 151, 148, 145, 143, + 132, 138, 116, 85, 117, 94, 108, 117, 107, 116, + 132, 118, 123, 119, 88, 67, 49, 95, 84, 95, + 121, 103, 74, 70, 179, 164, 141, 126, 107, 112, + 119, 95, 103, 149, 139, 148, 144, 147, 148, 141, + 151, 133, 142, 129, 111, 131, 108, 128, 122, 108, + 121, 96, 115, 138, 116, 93, 105, 115, 115, 123, + 129, 106, 136, 180, 147, 130, 108, 141, 131, 118, + 136, 155, 176, 156, 135, 129, 140, 146, 142, 134, + 141, 130, 109, 80, 52, 38, 18, 47, 118, 134, + 155, 141, 100, 78, 72, 89, 79, 96, 92, 98, + 133, 111, 83, 91, 72, 58, 105, 115, 112, 120, + 145, 127, 135, 113, 113, 105, 105, 85, 69, 61, + 115, 96, 116, 145, 159, 170, 175, 175, 168, 155, + 140, 120, 84, 52, 80, 145, 125, 127, 116, 126, + 128, 108, 101, 198, 227, 200, 178, 159, 147, 148, + 121, 88, 46, 109, 124, 126, 126, 137, 147, 147, + 129, 107, 164, 148, 127, 117, 134, 120, 111, 116, + 120, 103, 98, 73, 66, 61, 70, 115, 116, 125, + 126, 100, 77, 188, 162, 140, 114, 128, 139, 123, + 145, 165, 164, 134, 109, 100, 108, 118, 127, 130, + 156, 182, 190, 173, 167, 165, 162, 157, 152, 147, + 150, 164, 179, 183, 173, 155, 140, 136, 134, 135, + 122, 92, 69, 140, 132, 118, 108, 128, 138, 132, + 123, 127, 148, 137, 150, 149, 139, 127, 124, 130, + 136, 138, 112, 70, 41, 37, 132, 140, 129, 125, + 130, 111, 78, 33, 51, 161, 141, 136, 120, 122, + 126, 110, 87, 106, 85, 68, 48, 81, 112, 113, + 135, 125, 98, 85, 102, 80, 100, 87, 86, 116, + 142, 133, 110, 66, 48, 152, 139, 135, 136, 123, + 128, 116, 89, 102, 128, 99, 83, 61, 105, 124, + 120, 94, 73, 83, 78, 100, 122, 124, 128, 132, + 144, 137, 116, 102, 75, 144, 136, 127, 140, 127, + 154, 144, 118, 99, 90, 90, 89, 75, 68, 83, + 123, 103, 89, 198, 180, 154, 138, 122, 136, 120, + 138, 118, 121, 136, 110, 105, 85, 111, 101, 104, + 121, 126, 139, 115, 99, 101, 107, 110, 123, 126, + 127, 115, 88, 109, 164, 134, 138, 138, 120, 121, + 130, 202, 195, 202, 199, 201, 181, 164, 159, 148, + 120, 116, 194, 199, 186, 171, 154, 142, 137, 133, + 137, 129, 112, 149, 134, 112, 149, 138, 120, 134, + 119, 102, 107, 83, 79, 114, 119, 127, 128, 128, + 144, 148, 165, 155, 161, 150, 135, 122, 116, 115, + 120, 99, 80, 120, 123, 124, 111, 89, 70, 108, + 118, 95, 66, 53, 105, 126, 125, 105, 83, 111, + 129, 197, 191, 197, 206, 213, 216, 208, 196, 169, + 133, 109, 127, 164, 134, 121, 99, 92, 82, 71, + 131, 121, 93, 91, 136, 105, 115, 140, 120, 110, + 150, 164, 139, 108, 87, 81, 93, 92, 104, 116, + 133, 114, 125, 126, 111, 136, 110, 156, 147, 133, + 113, 94, 118, 120, 115, 125, 124, 126, 127, 134, + 116, 131, 161, 158, 166, 157, 150, 150, 144, 141, + 125, 185, 169, 142, 140, 143, 139, 131, 134, 138, + 179, 188, 170, 150, 134, 140, 144, 133, 127, 127, + 150, 177, 204, 184, 192, 194, 190, 193, 177, 158, + 114, 113, 138, 116, 137, 135, 132, 131, 127, 134, + 120, 147, 163, 135, 133, 137, 136, 136, 133, 135, + 137, 120, 95, 73, 46, 48, 111, 97, 97, 123, + 139, 130, 109, 76, 52, 72, 61, 61, 125, 127, + 132, 119, 119, 90, 66, 41, 64, 156, 143, 129, + 131, 106, 58, 25, 99, 115, 122, 136, 129, 132, + 134, 123, 97, 53, 27, 114, 125, 114, 120, 123, + 122, 107, 93, 57, 47, 133, 128, 138, 141, 131, + 145, 132, 122, 110, 79, 57, 30, 73, 153, 144, + 150, 132, 85, 59, 133, 125, 130, 115, 100, 96, + 148, 127, 111, 86, 61, 38, 110, 121, 108, 99, + 157, 143, 105, 77, 116, 118, 115, 131, 122, 122, + 133, 119, 134, 108, 86, 61, 129, 165, 143, 127, + 125, 105, 89, 111, 97, 85, 113, 99, 98, 117, + 149, 131, 101, 106, 88, 95, 79, 119, 123, 120, + 125, 109, 81, 100, 201, 183, 156, 138, 115, 116, + 141, 119, 129, 105, 76, 60, 110, 99, 92, 82, + 150, 156, 129, 95, 69, 115, 115, 113, 134, 125, + 118, 97, 67, 96, 203, 197, 171, 151, 133, 125, + 143, 131, 120, 134, 105, 80, 51, 60, 139, 134, + 129, 160, 223, 219, 219, 212, 197, 173, 157, 146, + 132, 112, 164, 144, 119, 102, 92, 76, 73, 94, + 132, 112, 124, 114, 93, 92, 83, 73, 69, 99, + 129, 103, 188, 163, 142, 132, 127, 101, 82, 59, + 140, 141, 111, 74, 46, 105, 113, 99, 127, 122, + 125, 94, 63, 112, 116, 101, 81, 120, 136, 134, + 133, 190, 224, 193, 179, 158, 146, 143, 140, 136, + 152, 161, 132, 120, 112, 94, 114, 102, 92, 116, + 129, 194, 196, 202, 211, 212, 210, 190, 169, 152, + 166, 166, 145, 111, 91, 132, 133, 128, 136, 130, + 118, 94, 72, 74, 92, 86, 89, 92, 106, 123, + 126, 100, 86, 137, 117, 92, 76, 104, 106, 114, + 133, 109, 204, 192, 166, 148, 138, 128, 111, 81, + 118, 99, 79, 146, 169, 141, 123, 102, 131, 120, + 127, 105, 136, 204, 170, 154, 131, 145, 135, 119, + 117, 95, 64, 83, 141, 136, 118, 96, 99, 126, + 115, 93, 98, 102, 95, 105, 106, 114, 119, 128, + 131, 121, 98, 139, 149, 119, 109, 86, 105, 129, + 134, 119, 104, 169, 185, 155, 141, 122, 107, 127, + 136, 115, 85, 108, 87, 126, 102, 128, 136, 129, + 125, 99, 126, 158, 133, 139, 132, 113, 91, 107, + 141, 122, 128, 161, 130, 127, 105, 120, 118, 106, + 122, 140, 161, 168, 187, 184, 176, 158, 144, 140, + 127, 111, 89, 130, 132, 105, 134, 121, 100, 122, + 129, 110, 128, 115, 129, 116, 132, 118, 114, 119, + 138, 133, 132, 188, 183, 159, 161, 147, 134, 140, + 132, 113, 84, 167, 147, 132, 124, 109, 133, 121, + 132, 128, 116, 121, 98, 101, 145, 129, 128, 129, + 124, 112, 152, 158, 136, 161, 139, 165, 158, 142, + 139, 138, 110, 127, 148, 117, 126, 118, 101, 116, + 155, 168, 154, 128, 120, 152, 150, 141, 140, 135, + 127, 111, 109, 134, 104, 133, 110, 112, 132, 114, + 111, 87, 68, 89, 107, 121, 121, 126, 126, 129, + 120, 148, 169, 163, 173, 178, 185, 188, 178, 163, + 122, 97, 86, 117, 101, 138, 118, 142, 155, 139, + 125, 114, 131, 138, 153, 149, 163, 150, 143, 141, + 157, 161, 138, 152, 134, 121, 122, 109, 110, 124, + 151, 171, 196, 168, 145, 139, 147, 151, 146, 139, + 134, 169, 179, 170, 175, 178, 177, 173, 165, 154, + 120, 151, 118, 107, 125, 129, 133, 133, 136, 139, + 119, 141, 159, 151, 160, 165, 168, 169, 162, 152, + 115, 111, 119, 94, 117, 121, 127, 127, 132, 136, + 134, 153, 147, 142, 142, 147, 159, 159, 154, 147, + 110, 106, 139, 135, 143, 142, 147, 146, 147, 147, + 115, 133, 151, 133, 141, 142, 151, 152, 147, 144, + 115, 132, 144, 131, 125, 126, 128, 130, 131, 136, + 138, 118, 96, 71, 48, 26, 43, 130, 125, 125, + 134, 122, 98, 54, 28, 84, 77, 73, 109, 125, + 133, 112, 67, 48, 141, 129, 126, 113, 112, 118, + 143, 123, 89, 54, 71, 73, 75, 131, 123, 123, + 126, 109, 81, 31, 15, 94, 110, 109, 119, 128, + 132, 122, 97, 92, 73, 50, 27, 22, 104, 133, + 133, 119, 94, 48, 34, 168, 160, 154, 151, 130, + 147, 133, 90, 54, 71, 123, 106, 105, 93, 117, + 143, 132, 107, 69, 45, 78, 178, 169, 150, 139, + 138, 123, 116, 96, 69, 49, 32, 113, 103, 112, + 154, 151, 125, 79, 60, 152, 160, 154, 155, 137, + 142, 151, 124, 88, 66, 59, 94, 87, 95, 119, + 166, 154, 122, 92, 138, 132, 124, 114, 97, 97, + 122, 99, 98, 219, 191, 176, 165, 159, 153, 131, + 130, 119, 91, 51, 24, 41, 144, 156, 147, 139, + 139, 122, 81, 65, 124, 111, 104, 90, 94, 98, + 138, 120, 112, 91, 63, 65, 89, 75, 78, 106, + 126, 107, 91, 85, 69, 95, 90, 84, 108, 120, + 155, 139, 100, 78, 120, 110, 109, 91, 77, 73, + 144, 130, 135, 112, 88, 65, 62, 142, 129, 126, + 170, 154, 150, 131, 121, 116, 100, 92, 83, 86, + 131, 122, 98, 107, 102, 75, 54, 38, 117, 130, + 146, 139, 117, 107, 86, 66, 44, 30, 97, 128, + 129, 116, 100, 59, 108, 127, 119, 139, 129, 129, + 124, 106, 79, 49, 154, 190, 166, 152, 133, 123, + 141, 149, 123, 89, 61, 70, 143, 132, 125, 126, + 136, 113, 177, 166, 141, 123, 109, 108, 105, 93, + 137, 117, 147, 123, 99, 85, 109, 98, 91, 75, + 129, 121, 102, 78, 53, 90, 149, 136, 134, 135, + 144, 136, 126, 90, 114, 152, 137, 152, 138, 128, + 133, 115, 107, 129, 99, 78, 60, 129, 125, 118, + 147, 141, 119, 124, 110, 91, 79, 64, 106, 117, + 134, 111, 164, 143, 123, 113, 116, 95, 76, 56, + 147, 159, 140, 109, 83, 84, 140, 135, 127, 129, + 123, 104, 116, 99, 91, 87, 80, 110, 113, 121, + 124, 106, 174, 174, 152, 141, 132, 134, 126, 124, + 140, 190, 240, 215, 212, 189, 173, 158, 144, 137, + 123, 97, 79, 102, 110, 111, 90, 75, 126, 124, + 134, 121, 104, 145, 127, 100, 77, 65, 120, 118, + 123, 106, 87, 41, 68, 119, 106, 115, 109, 119, + 137, 232, 241, 225, 217, 202, 183, 169, 156, 145, + 161, 146, 127, 110, 97, 107, 88, 114, 108, 106, + 141, 244, 216, 192, 172, 163, 148, 143, 144, 144, + 128, 127, 109, 89, 77, 68, 124, 120, 121, 125, + 125, 94, 48, 71, 116, 113, 104, 120, 142, 137, + 133, 129, 115, 82, 68, 120, 99, 133, 134, 124, + 130, 106, 108, 160, 130, 111, 89, 129, 124, 119, + 134, 120, 149, 143, 116, 95, 87, 142, 132, 122, + 126, 114, 108, 107, 80, 141, 133, 123, 137, 124, + 117, 95, 69, 43, 62, 98, 114, 116, 112, 120, + 122, 99, 87, 164, 145, 123, 99, 95, 118, 105, + 126, 101, 102, 120, 113, 110, 92, 139, 134, 126, + 148, 194, 241, 219, 221, 215, 200, 193, 174, 151, + 127, 104, 122, 136, 113, 106, 110, 95, 78, 106, + 131, 163, 217, 199, 194, 175, 164, 155, 142, 138, + 139, 124, 88, 57, 161, 161, 145, 139, 124, 116, + 127, 110, 91, 98, 126, 104, 113, 98, 94, 94, + 145, 138, 114, 90, 75, 130, 117, 107, 99, 90, + 119, 98, 86, 101, 148, 133, 103, 83, 124, 131, + 143, 168, 169, 133, 110, 117, 139, 149, 147, 137, + 124, 106, 80, 138, 194, 163, 142, 119, 106, 130, + 136, 125, 105, 114, 87, 113, 101, 89, 108, 102, + 114, 90, 53, 46, 105, 116, 126, 122, 118, 122, + 124, 102, 92, 195, 167, 160, 144, 154, 154, 132, + 118, 97, 88, 72, 98, 120, 112, 98, 79, 117, + 114, 107, 185, 191, 191, 188, 175, 165, 153, 143, + 119, 97, 90, 89, 120, 151, 136, 113, 99, 112, + 141, 121, 144, 122, 125, 113, 133, 111, 92, 69, + 120, 98, 78, 109, 151, 145, 157, 157, 151, 143, + 130, 110, 120, 188, 159, 141, 119, 112, 109, 98, + 126, 112, 83, 110, 169, 139, 127, 105, 93, 123, + 141, 145, 117, 106, 91, 78, 123, 107, 101, 125, + 117, 95, 71, 147, 176, 153, 148, 133, 135, 127, + 124, 106, 79, 64, 115, 96, 108, 115, 106, 105, + 127, 115, 90, 98, 105, 81, 144, 135, 117, 125, + 126, 104, 98, 165, 138, 136, 112, 149, 148, 131, + 119, 144, 186, 185, 204, 202, 209, 200, 182, 161, + 123, 153, 190, 189, 199, 194, 191, 176, 157, 147, + 121, 103, 119, 98, 100, 120, 106, 97, 95, 126, + 137, 130, 102, 117, 117, 92, 126, 114, 101, 118, + 131, 219, 190, 167, 153, 151, 144, 140, 142, 143, + 114, 102, 151, 152, 132, 120, 112, 120, 127, 131, + 138, 122, 91, 143, 118, 120, 114, 104, 124, 117, + 148, 142, 117, 126, 97, 125, 108, 116, 142, 125, + 126, 106, 91, 169, 208, 178, 158, 138, 127, 135, + 133, 126, 101, 83, 147, 130, 125, 117, 114, 117, + 120, 103, 94, 149, 136, 129, 139, 118, 133, 133, + 147, 152, 126, 132, 119, 97, 132, 129, 114, 126, + 112, 107, 148, 125, 112, 114, 124, 125, 129, 135, + 139, 121, 157, 151, 131, 140, 118, 147, 136, 121, + 115, 105, 159, 167, 185, 191, 196, 190, 176, 160, + 124, 106, 104, 122, 130, 114, 152, 144, 134, 136, + 136, 152, 159, 153, 131, 114, 116, 126, 129, 129, + 124, 109, 87, 131, 107, 115, 130, 107, 144, 131, + 126, 162, 176, 175, 180, 176, 160, 141, 134, 134, + 136, 127, 108, 161, 162, 133, 141, 124, 112, 128, + 130, 115, 110, 140, 107, 155, 134, 131, 156, 137, + 122, 106, 116, 127, 118, 161, 150, 170, 167, 152, + 139, 177, 203, 176, 155, 139, 130, 128, 129, 132, + 137, 119, 125, 103, 110, 123, 107, 120, 108, 101, + 113, 107, 160, 154, 160, 166, 169, 176, 168, 156, + 115, 90, 65, 115, 115, 104, 120, 112, 109, 124, + 131, 123, 100, 109, 185, 158, 141, 132, 116, 119, + 139, 130, 119, 156, 124, 138, 127, 116, 141, 128, + 133, 118, 115, 180, 149, 151, 135, 130, 147, 129, + 117, 90, 80, 119, 124, 128, 132, 130, 128, 135, + 112, 97, 142, 161, 167, 165, 154, 142, 136, 135, + 118, 141, 193, 172, 157, 152, 148, 145, 146, 141, + 125, 147, 165, 166, 149, 133, 123, 122, 128, 131, + 128, 193, 177, 174, 182, 186, 197, 193, 191, 173, + 124, 144, 162, 133, 113, 113, 123, 128, 129, 130, + 117, 98, 121, 122, 137, 132, 110, 97, 111, 130, + 128, 176, 151, 125, 126, 134, 130, 121, 127, 130, + 122, 151, 142, 111, 106, 121, 126, 126, 130, 134, + 148, 167, 186, 153, 129, 122, 124, 128, 130, 128, + 148, 172, 206, 178, 171, 182, 169, 180, 172, 156, + 133, 164, 174, 160, 155, 163, 163, 172, 169, 158, + 132, 150, 147, 142, 152, 140, 140, 140, 134, 135, + 137, 158, 167, 172, 163, 153, 169, 158, 146, 147, + 150, 161, 162, 172, 153, 133, 140, 144, 136, 135, + 109, 84, 101, 120, 129, 134, 133, 136, 137, 143, + 112, 114, 157, 147, 141, 136, 135, 133, 135, 138, + 121, 154, 161, 150, 149, 154, 151, 144, 146, 144, + 111, 117, 125, 125, 130, 131, 135, 137, 143, 148, + 121, 141, 146, 131, 138, 126, 118, 111, 119, 130, + 120, 135, 145, 121, 140, 134, 138, 137, 131, 134, + 115, 137, 132, 137, 139, 138, 138, 139, 145, 149, + 131, 149, 147, 133, 132, 126, 131, 134, 130, 133, + 110, 98, 84, 141, 107, 169, 169, 123, 125, 126, + 118, 210, 98, 126, 132, 138, 128, 139, 156, 157, + 140, 142, 129, 95, 192, 178, 182, 186, 183, 159, + 135, 134, 144, 124, 100, 228, 203, 161, 122, 104, + 139, 159, 134, 161, 121, 126, 192, 152, 218, 180, + 132, 132, 119, 99, 96, 97, 80, 53, 134, 143, + 102, 114, 133, 114, 127, 83, 77, 126, 85, 107, + 110, 114, 194, 186, 139, 116, 147, 104, 129, 138, + 126, 133, 109, 144, 115, 45, 130, 97, 159, 155, + 157, 162, 189, 185, 168, 163, 151, 151, 142, 135, + 144, 147, 120, 74, 192, 186, 149, 118, 71, 84, + 143, 156, 133, 178, 168, 107, 119, 149, 105, 112, + 182, 184, 158, 118, 118, 148, 128, 177, 171, 152, + 139, 135, 126, 209, 171, 150, 123, 100, 190, 158, + 166, 97, 136, 123, 136, 139, 128, 138, 126, 121, + 132, 131, 128, 95, 60, 168, 127, 140, 208, 161, + 109, 102, 119, 162, 150, 137, 107, 200, 156, 136, + 136, 128, 103, 95, 74, 91, 220, 173, 152, 138, + 139, 129, 140, 136, 122, 82, 180, 115, 53, 90, + 121, 107, 99, 148, 116, 139, 100, 63, 191, 155, + 130, 129, 163, 155, 98, 175, 95, 151, 127, 107, + 124, 124, 116, 88, 71, 164, 148, 96, 57, 89, + 125, 117, 77, 63, 162, 144, 113, 109, 137, 134, + 134, 130, 149, 174, 158, 158, 130, 81, 28, 67, + 142, 139, 129, 100, 194, 134, 68, 175, 131, 103, + 136, 132, 122, 96, 119, 82, 115, 249, 215, 168, + 125, 139, 199, 96, 146, 123, 136, 179, 142, 137, + 181, 166, 106, 86, 122, 106, 123, 131, 106, 119, + 129, 189, 188, 147, 126, 110, 101, 114, 147, 136, + 132, 106, 72, 175, 148, 99, 130, 153, 125, 136, + 123, 119, 147, 170, 157, 126, 209, 188, 158, 152, + 101, 89, 142, 131, 161, 150, 148, 124, 89, 119, + 141, 137, 131, 103, 81, 85, 64, 175, 129, 121, + 137, 144, 142, 145, 119, 205, 148, 80, 165, 138, + 143, 137, 167, 165, 148, 149, 110, 234, 217, 170, + 167, 152, 75, 140, 155, 155, 175, 129, 136, 134, + 136, 152, 161, 131, 140, 121, 91, 79, 255, 209, + 132, 147, 120, 114, 177, 128, 110, 61, 89, 131, + 125, 127, 93, 87, 167, 115, 186, 162, 107, 106, + 134, 162, 151, 100, 79, 67, 151, 116, 130, 142, + 162, 153, 155, 143, 122, 85, 202, 187, 135, 125, + 158, 155, 103, 129, 74, 149, 130, 98, 129, 126, + 148, 152, 153, 133, 118, 94, 80, 70, 47, 90, + 124, 118, 143, 184, 158, 126, 70, 82, 111, 113, + 126, 135, 175, 141, 203, 166, 123, 123, 134, 133, + 113, 111, 128, 76, 128, 177, 151, 178, 134, 125, + 120, 120, 193, 106, 98, 134, 101, 86, 101, 114, + 136, 127, 134, 196, 86, 105, 145, 128, 119, 137, + 138, 126, 230, 161, 141, 128, 129, 136, 88, 83, + 103, 118, 178, 123, 89, 101, 161, 173, 165, 147, + 130, 123, 171, 158, 131, 81, 50, 177, 162, 136, + 125, 115, 82, 173, 195, 168, 130, 112, 112, 121, + 152, 148, 167, 87, 82, 161, 142, 147, 98, 89, + 168, 138, 97, 157, 132, 114, 74, 126, 161, 141, + 135, 123, 68, 137, 124, 118, 112, 92, 65, 96, + 191, 181, 161, 151, 141, 145, 129, 102, 97, 111, + 144, 128, 55, 128, 115, 155, 129, 184, 167, 147, + 131, 141, 125, 33, 127, 111, 127, 131, 125, 130, + 137, 130, 121, 195, 172, 177, 176, 149, 98, 97, + 126, 106, 168, 159, 144, 185, 156, 151, 182, 158, + 123, 93, 110, 116, 98, 99, 125, 136, 139, 148, + 79, 112, 149, 128, 147, 136, 118, 105, 166, 152, + 117, 115, 92, 128, 148, 132, 170, 143, 226, 190, + 122, 192, 165, 121, 143, 144, 174, 124, 113, 124, + 122, 135, 34, 93, 118, 111, 111, 136, 123, 116, + 99, 195, 139, 99, 114, 102, 96, 108, 111, 112, + 113, 129, 172, 137, 105, 139, 154, 86, 113, 108, + 132, 79, 63, 120, 93, 162, 90, 103, 94, 95, + 117, 127, 104, 100, 142, 129, 93, 27, 196, 153, + 113, 91, 101, 90, 84, 68, 138, 38, 118, 148, + 87, 103, 125, 109, 96, 152, 100, 56, 31, 62, + 176, 129, 124, 115, 103, 92, 100, 121, 130, 125, + 128, 71, 82, 71, 152, 85, 107, 116, 138, 133, + 103, 116, 139, 144, 72, 37, 118, 141, 109, 95, + 86, 92, 121, 167, 156, 104, 92, 91, 122, 114, + 89, 61, 172, 128, 95, 103, 84, 101, 88, 84, + 116, 125, 108, 62, 74, 108, 160, 143, 189, 164, + 91, 115, 144, 43, 116, 79, 106, 108, 74, 83, + 87, 90, 61, 71, 76, 76, 95, 130, 89, 94, + 114, 107, 101, 145, 161, 147, 143, 163, 147, 129, + 101, 73, 111, 108, 93, 104, 186, 141, 99, 89, + 112, 126, 111, 113, 152, 41, 159, 115, 131, 124, + 117, 101, 115, 130, 124, 87, 59, 177, 63, 85, + 109, 116, 103, 68, 145, 132, 29, 119, 96, 89, + 117, 90, 181, 103, 101, 111, 97, 96, 199, 171, + 113, 120, 93, 119, 101, 64, 56, 55, 63, 90, + 105, 101, 86, 45, 136, 179, 142, 102, 115, 114, + 113, 108, 121, 84, 23, 125, 76, 102, 119, 107, + 120, 104, 73, 177, 83, 114, 128, 85, 152, 126, + 137, 115, 149, 109, 163, 133, 110, 98, 54, 61, + 95, 111, 135, 103, 88, 164, 115, 187, 122, 98, + 129, 132, 95, 86, 71, 119, 146, 111, 38, 67, + 102, 100, 66, 148, 137, 103, 145, 95, 35, 85, + 44, 136, 102, 111, 108, 115, 136, 105, 120, 110, + 108, 147, 112, 169, 116, 146, 81, 120, 94, 84, + 93, 97, 90, 119, 102, 91, 48, 147, 204, 151, + 148, 160, 144, 131, 144, 175, 158, 133, 212, 163, + 172, 152, 151, 112, 148, 151, 145, 179, 160, 124, + 164, 164, 167, 161, 141, 120, 131, 141, 198, 177, + 169, 156, 146, 156, 124, 185, 164, 195, 181, 193, + 201, 147, 148, 168, 165, 159, 162, 148, 150, 148, + 146, 157, 158, 149, 164, 129, 160, 214, 174, 166, + 154, 176, 146, 141, 155, 140, 140, 169, 106, 155, + 166, 162, 134, 193, 157, 155, 146, 196, 171, 107, + 177, 174, 163, 155, 147, 203, 162, 146, 150, 83, + 157, 170, 180, 178, 159, 157, 151, 117, 115, 183, + 170, 180, 174, 150, 177, 173, 136, 181, 196, 184, + 164, 168, 165, 148, 175, 168, 209, 189, 159, 114, + 157, 158, 141, 168, 170, 139, 175, 128, 151, 39, + 128, 154, 159, 161, 148, 180, 131, 165, 159, 131, + 163, 150, 174, 178, 178, 198, 172, 138, 184, 191, + 143, 164, 161, 163, 210, 171, 155, 168, 150, 116, + 182, 170, 145, 152, 141, 139, 191, 149, 160, 202, + 145, 169, 145, 181, 148, 183, 197, 165, 146, 171, + 161, 153, 157, 170, 164, 149, 183, 167, 246, 235, + 162, 144, 170, 152, 173, 150, 113, 135, 156, 154, + 158, 148, 178, 159, 161, 114, 180, 156, 116, 163, + 164, 161, 122, 164, 164, 183, 135, 135, 144, 182, + 160, 147, 163, 152, 169, 185, 159, 177, 99, 211, + 168, 167, 215, 170, 150, 157, 154, 176, 154, 143, + 163, 117, 178, 160, 163, 165, 164, 166, 174, 136, + 159, 169, 152, 123, 199, 149, 169, 140, 159, 208, + 155, 161, 186, 122, 134, 167, 171, 145, 148, 176, + 148, 137, 114, 160, 166, 153, 162, 156, 164, 172, + 155, 148, 155, 182, 114, 150, 157, 154, 140, 159, + 166, 160, 169, 206, 182, 145, 157, 165, 147, 202, + 131, 154, 193, 162, 162, 149, 167, 157, 191, 188, + 149, 205, 147, 166, 150, 150, 159, 153, 171, 160 +}; + +static const uint8_t wmavoice_dq_lsp16i1[0x640] = { + 142, 121, 141, 112, 99, 119, 92, 122, 183, 155, + 122, 98, 75, 78, 85, 101, 108, 134, 128, 123, + 115, 90, 79, 58, 73, 127, 106, 60, 97, 107, + 141, 163, 130, 123, 136, 156, 201, 189, 204, 206, + 140, 116, 69, 60, 117, 123, 106, 124, 91, 63, + 150, 144, 110, 80, 63, 112, 80, 70, 76, 63, + 114, 86, 147, 165, 137, 125, 120, 140, 115, 101, + 101, 99, 166, 158, 158, 104, 126, 131, 134, 143, + 121, 102, 73, 36, 83, 132, 113, 76, 38, 20, + 132, 111, 78, 73, 51, 131, 108, 131, 105, 80, + 148, 138, 101, 65, 47, 115, 86, 50, 124, 129, + 116, 89, 85, 87, 64, 111, 74, 39, 115, 113, + 112, 83, 75, 122, 127, 114, 91, 106, 125, 130, + 131, 108, 79, 136, 112, 110, 147, 164, 144, 124, + 121, 236, 218, 190, 168, 106, 101, 160, 172, 191, + 113, 138, 102, 91, 109, 100, 71, 85, 112, 119, + 121, 96, 51, 64, 126, 135, 114, 76, 34, 104, + 145, 127, 90, 56, 131, 142, 131, 92, 123, 102, + 128, 105, 63, 24, 95, 115, 87, 49, 156, 174, + 123, 105, 88, 58, 55, 141, 119, 99, 75, 81, + 137, 117, 114, 80, 56, 119, 91, 106, 166, 135, + 114, 84, 38, 93, 116, 129, 103, 97, 87, 97, + 115, 184, 193, 173, 157, 117, 88, 114, 151, 121, + 126, 111, 75, 129, 133, 130, 107, 71, 115, 92, + 128, 108, 120, 100, 97, 111, 80, 119, 122, 91, + 114, 94, 149, 129, 136, 114, 88, 132, 110, 85, + 116, 99, 101, 71, 71, 110, 140, 142, 131, 110, + 122, 98, 83, 127, 100, 106, 130, 123, 114, 103, + 113, 87, 140, 116, 113, 140, 161, 171, 145, 129, + 115, 178, 158, 161, 160, 118, 195, 209, 221, 228, + 99, 83, 140, 134, 140, 127, 186, 168, 187, 187, + 107, 114, 100, 111, 111, 104, 130, 131, 116, 128, + 128, 104, 64, 18, 49, 126, 107, 69, 56, 153, + 154, 142, 110, 113, 89, 120, 93, 73, 190, 172, + 119, 96, 57, 21, 60, 126, 122, 81, 99, 117, + 159, 141, 108, 88, 120, 144, 125, 89, 44, 94, + 147, 131, 93, 81, 61, 133, 113, 85, 47, 62, + 123, 121, 87, 53, 90, 120, 94, 76, 70, 48, + 125, 103, 93, 64, 35, 140, 129, 88, 47, 30, + 127, 104, 58, 51, 103, 124, 100, 102, 76, 47, + 115, 87, 54, 46, 77, 182, 218, 174, 163, 145, + 140, 126, 89, 105, 82, 125, 119, 101, 69, 58, + 125, 107, 172, 145, 128, 138, 113, 109, 92, 90, + 117, 93, 83, 93, 132, 125, 102, 67, 148, 161, + 131, 110, 96, 99, 74, 119, 92, 54, 84, 81, + 110, 152, 120, 106, 131, 108, 74, 68, 99, 107, + 121, 97, 120, 101, 78, 132, 110, 127, 164, 134, + 111, 159, 204, 189, 178, 158, 183, 146, 144, 137, + 123, 106, 136, 108, 135, 117, 91, 163, 135, 113, + 119, 177, 134, 122, 121, 132, 109, 157, 131, 113, + 115, 87, 87, 100, 92, 120, 95, 59, 146, 139, + 129, 101, 135, 122, 101, 119, 100, 112, 88, 99, + 118, 90, 123, 125, 107, 121, 98, 73, 104, 80, + 112, 79, 86, 122, 96, 104, 81, 107, 90, 93, + 112, 150, 140, 109, 115, 113, 86, 73, 76, 112, + 130, 111, 101, 112, 84, 123, 97, 63, 134, 115, + 109, 77, 128, 141, 119, 125, 101, 108, 147, 119, + 134, 149, 150, 127, 115, 136, 244, 220, 210, 189, + 105, 138, 171, 156, 174, 117, 162, 133, 146, 141, + 115, 93, 119, 98, 122, 114, 106, 154, 145, 162, + 107, 131, 189, 165, 152, 101, 107, 129, 114, 139, + 116, 186, 186, 161, 180, 100, 89, 137, 116, 116, + 106, 130, 194, 196, 207, 110, 156, 157, 138, 149, + 102, 93, 159, 138, 120, 109, 132, 105, 122, 135, + 148, 128, 85, 76, 102, 168, 154, 141, 117, 100, + 125, 106, 62, 101, 146, 124, 102, 65, 25, 15, + 120, 94, 46, 21, 94, 149, 128, 115, 85, 92, + 119, 93, 70, 52, 30, 162, 151, 123, 91, 80, + 126, 112, 84, 47, 33, 138, 114, 73, 60, 87, + 126, 211, 174, 158, 143, 129, 106, 65, 31, 133, + 119, 95, 52, 99, 173, 123, 96, 119, 206, 178, + 127, 104, 60, 61, 67, 152, 136, 104, 63, 83, + 133, 130, 92, 64, 45, 120, 96, 53, 30, 130, + 128, 103, 74, 59, 35, 135, 114, 77, 30, 57, + 108, 130, 123, 90, 87, 143, 125, 93, 54, 60, + 133, 118, 79, 87, 95, 115, 89, 111, 88, 65, + 124, 102, 70, 40, 47, 148, 131, 123, 130, 104, + 127, 109, 87, 56, 121, 147, 123, 121, 107, 85, + 178, 237, 200, 193, 170, 139, 118, 100, 75, 110, + 133, 121, 81, 73, 68, 120, 195, 157, 141, 131, + 127, 102, 107, 88, 60, 136, 113, 100, 69, 45, + 128, 105, 93, 77, 67, 131, 116, 149, 184, 156, + 115, 85, 35, 45, 112, 128, 108, 68, 73, 111, + 118, 93, 187, 162, 139, 136, 115, 84, 57, 37, + 131, 133, 125, 98, 85, 138, 115, 92, 86, 61, + 116, 96, 70, 52, 110, 115, 109, 135, 104, 88, + 136, 159, 122, 109, 115, 122, 110, 98, 70, 95, + 112, 81, 68, 85, 90, 124, 101, 87, 56, 89, + 109, 82, 98, 100, 115, 124, 102, 76, 88, 63, + 111, 78, 42, 78, 102, 110, 71, 64, 131, 111, + 125, 104, 107, 87, 123, 129, 131, 99, 85, 68, + 147, 137, 102, 99, 75, 120, 155, 142, 109, 91, + 132, 109, 131, 141, 113, 136, 119, 94, 152, 128, + 127, 102, 79, 159, 134, 111, 78, 98, 109, 80, + 115, 86, 51, 63, 103, 116, 86, 170, 149, 123, + 135, 178, 159, 125, 114, 113, 189, 226, 203, 202, + 140, 117, 116, 94, 70, 128, 103, 94, 174, 149, + 118, 98, 83, 84, 106, 115, 157, 120, 94, 95, + 131, 112, 75, 96, 74, 121, 97, 144, 117, 95, + 120, 90, 140, 138, 110, 119, 93, 55, 92, 114, + 114, 87, 151, 125, 100, 111, 82, 83, 160, 139, + 114, 86, 56, 90, 138, 104, 109, 101, 77, 118, + 140, 142, 143, 148, 126, 121, 102, 129, 107, 111, + 113, 79, 58, 111, 91, 120, 94, 63, 115, 98, + 121, 94, 99, 97, 78, 120, 92, 68, 173, 148, + 122, 114, 109, 87, 82, 132, 229, 192, 176, 155, + 137, 116, 123, 97, 115, 132, 115, 86, 120, 95, + 135, 116, 101, 136, 108, 109, 74, 100, 125, 115, + 112, 158, 144, 124, 134, 114, 83, 73, 147, 120, + 120, 104, 150, 122, 116, 110, 104, 192, 183, 174, + 134, 112, 116, 120, 93, 121, 101, 93, 110, 90, + 121, 93, 147, 152, 122, 115, 153, 171, 161, 142, + 123, 95, 116, 114, 93, 113, 89, 96, 77, 93, + 113, 174, 180, 143, 138, 116, 86, 100, 135, 106, + 103, 121, 149, 115, 103, 121, 95, 82, 149, 121, + 117, 92, 93, 111, 114, 123, 209, 196, 193, 183, + 125, 102, 107, 130, 104, 115, 91, 113, 103, 99, + 114, 86, 68, 108, 110, 111, 159, 162, 125, 113, + 125, 235, 234, 225, 214, 99, 74, 118, 121, 127, + 104, 123, 158, 128, 127, 113, 96, 116, 136, 158, + 100, 80, 138, 155, 166, 118, 143, 115, 125, 114, + 119, 137, 133, 136, 139, 151, 188, 172, 174, 173, + 138, 161, 158, 158, 155, 121, 198, 194, 211, 202, + 100, 90, 112, 110, 122, 100, 91, 122, 128, 135, + 101, 109, 127, 101, 114, 105, 126, 160, 147, 143, + 109, 138, 142, 158, 163, 113, 174, 185, 188, 206, + 112, 154, 166, 176, 183, 101, 108, 140, 140, 143, + 106, 135, 130, 137, 126, 103, 114, 115, 128, 126, + 107, 86, 21, 115, 75, 117, 139, 97, 65, 105, + 64, 191, 101, 106, 139, 107, 98, 218, 132, 104, + 73, 136, 165, 84, 118, 150, 111, 58, 130, 107, + 99, 136, 132, 56, 52, 102, 136, 69, 78, 163, + 85, 173, 148, 138, 85, 69, 106, 128, 133, 155, + 104, 91, 149, 56, 104, 103, 101, 172, 96, 57, + 104, 97, 125, 197, 166, 107, 169, 47, 120, 103, + 150, 89, 99, 139, 162, 101, 69, 137, 158, 126, + 191, 173, 127, 79, 155, 51, 131, 112, 86, 74, + 135, 61, 114, 81, 125, 117, 112, 72, 175, 72, + 127, 123, 142, 132, 78, 116, 158, 111, 121, 143, + 108, 102, 89, 20, 194, 81, 99, 107, 65, 150, + 103, 78, 91, 69, 96, 104, 116, 116, 103, 105, + 107, 117, 110, 130, 28, 88, 103, 62, 72, 85, + 125, 126, 141, 126, 178, 121, 102, 57, 46, 124, + 97, 91, 89, 138, 95, 98, 143, 99, 169, 123, + 140, 119, 113, 82, 140, 118, 112, 91, 92, 241, + 134, 89, 95, 112, 78, 167, 140, 145, 121, 100, + 109, 205, 144, 91, 100, 113, 103, 142, 175, 95, + 117, 121, 35, 121, 127, 159, 129, 85, 64, 75, + 116, 98, 103, 127, 129, 66, 68, 110, 96, 86, + 79, 100, 156, 133, 92, 135, 96, 164, 132, 121, + 93, 163, 134, 91, 208, 104, 77, 126, 116, 58, + 136, 118, 132, 81, 61, 73, 115, 66, 129, 123, + 111, 85, 42, 178, 134, 108, 132, 159, 45, 157, + 105, 164, 100, 94, 60, 96, 57, 154, 105, 102, + 103, 114, 96, 12, 91, 119, 115, 67, 92, 64, + 94, 61, 106, 106, 165, 105, 94, 98, 68, 30, + 146, 130, 107, 173, 140, 102, 90, 163, 106, 184, + 100, 53, 68, 131, 92, 105, 111, 68, 153, 186, + 101, 82, 48, 99, 147, 122, 136, 176, 96, 96, + 104, 132, 167, 149, 136, 138, 144, 97, 120, 92 +}; + +static const uint8_t wmavoice_dq_lsp16i2[0x3c0] = { + 23, 12, 107, 119, 110, 205, 214, 212, 208, 201, + 102, 95, 69, 117, 107, 118, 123, 118, 123, 121, + 82, 58, 83, 95, 84, 139, 145, 153, 161, 169, + 102, 100, 138, 121, 101, 129, 130, 138, 150, 139, + 76, 104, 86, 112, 133, 113, 91, 63, 73, 129, + 199, 193, 182, 181, 172, 119, 101, 83, 94, 76, + 161, 157, 152, 157, 158, 110, 90, 121, 96, 79, + 124, 107, 114, 88, 73, 152, 137, 121, 107, 99, + 57, 50, 100, 81, 74, 115, 96, 72, 49, 69, + 83, 68, 40, 53, 103, 36, 131, 107, 84, 64, + 236, 245, 242, 231, 213, 95, 109, 88, 69, 110, + 228, 221, 204, 182, 170, 129, 110, 97, 118, 104, + 98, 76, 98, 75, 61, 93, 77, 113, 91, 72, + 116, 94, 106, 134, 118, 177, 188, 169, 162, 153, + 163, 149, 131, 131, 132, 177, 163, 173, 168, 158, + 113, 131, 107, 113, 100, 132, 143, 131, 134, 142, + 45, 36, 121, 113, 102, 43, 95, 84, 67, 56, + 76, 82, 68, 48, 33, 55, 58, 59, 43, 65, + 66, 85, 66, 81, 94, 102, 82, 54, 33, 94, + 113, 111, 89, 60, 34, 138, 120, 101, 101, 86, + 88, 73, 55, 114, 115, 92, 74, 93, 77, 123, + 90, 117, 99, 79, 59, 97, 75, 97, 122, 104, + 233, 237, 227, 208, 190, 209, 230, 233, 240, 241, + 195, 197, 188, 167, 147, 204, 185, 168, 162, 157, + 142, 124, 119, 123, 106, 117, 110, 81, 121, 123, + 74, 116, 124, 119, 120, 178, 168, 146, 132, 125, + 102, 104, 105, 110, 114, 104, 82, 78, 100, 86, + 120, 102, 105, 93, 143, 127, 108, 128, 106, 88, + 177, 189, 203, 207, 215, 101, 131, 119, 95, 73, + 149, 139, 135, 147, 153, 160, 167, 165, 174, 177, + 120, 109, 134, 140, 145, 131, 130, 142, 139, 161, + 143, 158, 148, 145, 145, 123, 142, 132, 116, 102, + 40, 23, 79, 82, 84, 26, 83, 141, 130, 122, + 65, 46, 43, 89, 86, 28, 75, 80, 79, 98, + 84, 65, 47, 26, 44, 49, 112, 101, 100, 94, + 88, 76, 75, 48, 82, 104, 100, 75, 45, 15, + 99, 83, 63, 34, 30, 66, 55, 94, 118, 113, + 122, 106, 91, 68, 60, 135, 122, 104, 77, 59, + 82, 102, 84, 62, 46, 92, 74, 55, 82, 71, + 145, 134, 118, 93, 75, 79, 62, 83, 65, 55, + 91, 94, 64, 70, 98, 89, 117, 110, 87, 97, + 210, 223, 225, 223, 213, 83, 103, 86, 101, 85, + 126, 106, 81, 79, 105, 216, 219, 217, 199, 179, + 86, 78, 115, 138, 135, 102, 84, 87, 59, 46, + 219, 206, 184, 167, 158, 201, 188, 165, 145, 135, + 87, 113, 142, 152, 155, 190, 170, 153, 149, 146, + 205, 208, 201, 185, 167, 84, 73, 124, 104, 96, + 76, 88, 99, 74, 80, 110, 125, 122, 99, 112, + 108, 84, 70, 130, 137, 161, 152, 136, 119, 105, + 110, 91, 101, 74, 96, 111, 101, 93, 153, 149, + 133, 124, 102, 97, 120, 101, 93, 75, 81, 64, + 111, 94, 107, 79, 58, 188, 206, 215, 221, 232, + 163, 175, 165, 150, 136, 103, 106, 123, 133, 132, + 168, 184, 191, 183, 170, 110, 117, 90, 98, 93, + 104, 87, 122, 98, 127, 129, 110, 127, 113, 125, + 134, 118, 102, 140, 132, 186, 199, 202, 198, 188, + 149, 147, 175, 185, 186, 117, 93, 99, 112, 93, + 107, 138, 138, 129, 128, 96, 129, 104, 118, 134, + 145, 136, 115, 121, 129, 138, 155, 148, 134, 120, + 170, 151, 150, 145, 138, 168, 173, 185, 194, 200, + 144, 159, 172, 168, 156, 121, 121, 138, 173, 168, + 126, 111, 140, 139, 117, 149, 133, 142, 137, 130, + 143, 139, 158, 158, 146, 119, 128, 121, 132, 145, + 122, 136, 159, 153, 141, 133, 133, 130, 129, 126, + 120, 76, 50, 149, 109, 92, 155, 118, 90, 66, + 132, 117, 87, 156, 117, 119, 102, 44, 83, 91, + 109, 73, 106, 84, 29, 55, 130, 112, 81, 241, + 75, 40, 91, 89, 67, 112, 90, 149, 81, 72, + 128, 90, 71, 28, 160, 73, 157, 123, 143, 108, + 63, 88, 70, 81, 97, 75, 111, 149, 113, 96, + 78, 104, 83, 179, 95, 105, 106, 65, 130, 66, + 51, 118, 92, 53, 68, 105, 75, 176, 151, 115, + 94, 75, 68, 95, 220, 103, 125, 105, 43, 95, + 39, 114, 65, 145, 135, 33, 142, 138, 103, 52, + 82, 85, 117, 110, 67, 102, 74, 42, 62, 118, + 144, 121, 82, 57, 102, 67, 75, 44, 129, 96, + 75, 63, 88, 48, 116, 135, 94, 85, 102, 66, + 122, 77, 105, 122, 152, 120, 56, 90, 83, 100, + 90, 128, 63, 80, 103, 126, 117, 103, 80, 193, + 42, 73, 117, 93, 91, 95, 128, 100, 128, 162, + 70, 120, 126, 73, 123, 99, 99, 91, 75, 135, + 81, 125, 111, 77, 13, 94, 78, 85, 187, 157, + 11, 143, 109, 99, 119, 53, 141, 82, 122, 68, + 132, 89, 136, 119, 88, 75, 49, 174, 119, 70, + 138, 121, 108, 78, 52, 104, 90, 96, 93, 93, + 114, 90, 78, 46, 58, 62, 114, 69, 44, 162, + 103, 58, 98, 141, 83, 137, 95, 119, 73, 111, + 81, 46, 126, 111, 123, 107, 117, 122, 121, 54, + 106, 104, 59, 110, 148, 97, 155, 97, 83, 133, + 97, 71, 57, 91, 58, 52, 79, 127, 152, 109, + 96, 92, 145, 107, 149, 102, 61, 125, 61, 170, + 56, 89, 77, 106, 38, 147, 96, 77, 105, 123, + 85, 83, 117, 63, 69, 126, 133, 93, 107, 92, + 77, 115, 95, 111, 103, 61, 87, 103, 98, 155, + 94, 111, 80, 78, 54, 117, 128, 130, 99, 109, + 106, 99, 113, 133, 115, 89, 65, 74, 112, 127 +}; + +static const uint8_t wmavoice_dq_lsp16i3[0x300] = { + 70, 100, 121, 129, 132, 132, 201, 188, 165, 145, 144, 136, + 112, 127, 116, 125, 130, 129, 124, 135, 135, 146, 129, 128, + 162, 158, 144, 151, 135, 129, 103, 86, 111, 113, 112, 122, + 90, 139, 129, 117, 126, 129, 142, 145, 167, 147, 124, 124, + 230, 209, 189, 175, 156, 141, 64, 80, 86, 108, 121, 129, + 44, 79, 115, 113, 115, 128, 133, 106, 79, 109, 125, 127, + 171, 156, 132, 109, 103, 115, 106, 70, 93, 145, 141, 128, + 148, 125, 122, 107, 110, 117, 146, 145, 128, 110, 98, 111, + 237, 212, 185, 156, 139, 133, 84, 55, 26, 77, 114, 127, + 172, 170, 171, 168, 162, 143, 82, 82, 76, 70, 104, 126, + 17, 95, 109, 111, 120, 132, 81, 74, 57, 126, 141, 131, + 110, 127, 162, 148, 129, 123, 177, 172, 155, 151, 145, 134, + 144, 123, 90, 66, 109, 130, 82, 127, 103, 123, 132, 131, + 127, 97, 97, 142, 140, 128, 159, 134, 136, 123, 113, 117, + 131, 140, 154, 169, 158, 134, 96, 109, 150, 122, 105, 120, + 120, 150, 152, 122, 119, 125, 123, 126, 124, 107, 100, 113, + 248, 233, 216, 189, 160, 142, 58, 24, 13, 77, 111, 127, + 183, 189, 182, 157, 140, 131, 96, 83, 59, 43, 73, 119, + 222, 196, 171, 146, 129, 128, 32, 13, 53, 101, 114, 127, + 119, 101, 70, 70, 110, 127, 77, 86, 161, 148, 130, 118, + 199, 183, 170, 167, 156, 141, 30, 115, 142, 133, 131, 130, + 101, 103, 181, 176, 152, 126, 66, 44, 73, 94, 111, 128, + 150, 122, 100, 101, 104, 118, 61, 110, 87, 76, 93, 125, + 190, 170, 150, 134, 135, 129, 112, 89, 63, 123, 141, 132, + 175, 154, 136, 142, 140, 132, 117, 143, 129, 128, 136, 132, + 168, 142, 112, 113, 128, 128, 155, 169, 159, 144, 139, 131, + 61, 136, 144, 124, 112, 123, 86, 81, 104, 121, 129, 130, + 160, 127, 118, 150, 151, 134, 126, 115, 121, 132, 134, 131, + 137, 148, 144, 139, 140, 134, 106, 102, 105, 90, 87, 113, + 134, 129, 128, 121, 121, 123, 153, 151, 129, 139, 142, 134, + 150, 142, 141, 148, 149, 141, 100, 121, 133, 147, 150, 134, + 163, 158, 147, 132, 141, 132, 142, 127, 141, 136, 136, 132, + 232, 218, 205, 189, 169, 146, 243, 224, 201, 171, 147, 138, + 224, 196, 169, 162, 154, 140, 51, 20, 59, 111, 121, 128, + 203, 197, 193, 177, 162, 145, 75, 40, 47, 122, 130, 129, + 102, 77, 47, 83, 121, 129, 111, 108, 84, 56, 63, 114, + 211, 181, 154, 137, 126, 125, 213, 198, 186, 162, 144, 138, + 41, 45, 90, 110, 118, 130, 83, 63, 130, 164, 153, 128, + 195, 167, 142, 123, 113, 119, 19, 42, 105, 113, 120, 132, + 50, 63, 49, 64, 112, 128, 114, 90, 132, 171, 162, 134, + 129, 128, 107, 83, 74, 110, 50, 116, 109, 120, 128, 132, + 94, 59, 73, 111, 117, 126, 197, 170, 166, 153, 138, 132, + 65, 48, 109, 133, 131, 128, 170, 163, 172, 158, 138, 130, + 66, 126, 147, 160, 151, 132, 42, 129, 117, 95, 91, 120, + 97, 165, 164, 142, 133, 125, 163, 142, 114, 88, 97, 122, + 104, 77, 142, 143, 128, 120, 136, 160, 188, 169, 149, 130, + 113, 83, 85, 102, 114, 125, 164, 169, 142, 120, 122, 124, + 98, 152, 132, 105, 92, 117, 42, 71, 125, 155, 151, 137, + 94, 105, 81, 107, 118, 126, 84, 56, 123, 117, 108, 122, + 174, 179, 166, 137, 118, 121, 130, 103, 147, 152, 134, 124, + 148, 127, 94, 117, 144, 134, 129, 106, 102, 95, 106, 118, + 147, 157, 153, 125, 103, 117, 155, 128, 113, 132, 120, 122, + 181, 151, 136, 126, 122, 122, 110, 111, 109, 108, 120, 124, + 97, 130, 103, 89, 107, 124, 179, 158, 158, 142, 131, 128, + 142, 111, 115, 122, 126, 125, 145, 145, 134, 115, 129, 128, + 130, 139, 112, 99, 121, 125, 79, 104, 119, 102, 105, 123, + 116, 121, 136, 125, 126, 127, 124, 100, 122, 119, 111, 119, + 159, 140, 139, 128, 138, 131, 105, 100, 116, 128, 135, 132, + 159, 142, 156, 147, 140, 134, 130, 150, 129, 126, 114, 120, + 138, 124, 146, 131, 109, 119, 93, 115, 125, 131, 125, 129, + 125, 121, 101, 119, 114, 120, 163, 154, 151, 153, 153, 139, + 166, 153, 150, 133, 119, 121, 159, 151, 128, 130, 122, 123, + 147, 154, 144, 133, 128, 127, 129, 131, 134, 140, 148, 138, + 138, 136, 120, 131, 135, 131, 150, 140, 137, 144, 129, 129 +}; + +static const uint8_t wmavoice_dq_lsp10r[0x1400] = { + 128, 128, 129, 129, 130, 130, 131, 130, 129, 129, + 134, 133, 127, 125, 136, 135, 135, 134, 173, 172, + 133, 139, 136, 165, 133, 176, 137, 159, 135, 152, + 147, 161, 147, 152, 149, 156, 146, 146, 140, 136, + 134, 135, 136, 140, 139, 155, 123, 133, 132, 142, + 132, 148, 143, 177, 124, 143, 123, 136, 126, 134, + 126, 125, 125, 124, 129, 128, 123, 123, 133, 133, + 116, 116, 121, 121, 121, 120, 129, 128, 131, 131, + 132, 133, 132, 129, 138, 124, 138, 124, 132, 100, + 135, 94, 149, 111, 152, 115, 150, 128, 141, 133, + 129, 129, 130, 129, 147, 145, 136, 137, 120, 122, + 120, 122, 127, 129, 104, 108, 113, 115, 124, 124, + 140, 139, 147, 145, 132, 130, 184, 177, 201, 196, + 170, 171, 160, 161, 145, 147, 137, 145, 131, 131, + 130, 130, 130, 130, 130, 130, 132, 134, 131, 132, + 131, 133, 141, 144, 142, 149, 84, 93, 103, 104, + 139, 139, 142, 140, 147, 147, 172, 165, 122, 121, + 98, 100, 101, 106, 112, 117, 122, 124, 124, 124, + 134, 133, 133, 133, 146, 142, 147, 145, 156, 156, + 143, 146, 119, 124, 129, 132, 151, 149, 136, 135, + 147, 148, 181, 180, 199, 188, 190, 173, 166, 161, + 147, 142, 153, 149, 154, 146, 150, 146, 138, 134, + 131, 135, 96, 136, 48, 138, 56, 131, 63, 124, + 85, 128, 103, 132, 117, 134, 120, 132, 125, 129, + 131, 130, 129, 128, 129, 128, 163, 168, 117, 120, + 121, 121, 136, 138, 131, 132, 135, 136, 131, 133, + 133, 133, 133, 134, 117, 118, 105, 109, 142, 151, + 144, 159, 131, 138, 121, 126, 123, 123, 121, 124, + 131, 131, 129, 129, 141, 140, 142, 134, 87, 90, + 109, 109, 130, 127, 139, 143, 133, 131, 127, 126, + 134, 135, 134, 136, 97, 98, 130, 132, 134, 137, + 115, 119, 125, 130, 107, 109, 119, 118, 126, 127, + 134, 135, 127, 132, 172, 203, 160, 196, 152, 179, + 152, 172, 148, 168, 153, 172, 145, 156, 137, 140, + 102, 116, 42, 56, 74, 61, 82, 70, 86, 78, + 101, 97, 104, 100, 115, 108, 116, 108, 123, 118, + 149, 143, 166, 129, 168, 96, 142, 95, 135, 98, + 117, 86, 116, 93, 121, 108, 119, 107, 121, 117, + 135, 135, 127, 138, 72, 132, 99, 136, 112, 147, + 120, 152, 136, 155, 138, 146, 140, 142, 134, 139, + 163, 145, 192, 130, 147, 124, 147, 125, 133, 125, + 127, 124, 128, 123, 129, 122, 130, 122, 130, 125, + 130, 137, 135, 180, 124, 133, 130, 129, 132, 133, + 124, 124, 131, 130, 132, 136, 126, 124, 127, 125, + 132, 132, 133, 133, 144, 140, 143, 142, 137, 135, + 143, 138, 152, 149, 221, 219, 158, 161, 143, 141, + 130, 129, 140, 135, 170, 145, 193, 156, 186, 152, + 167, 139, 151, 131, 142, 127, 134, 120, 131, 125, + 135, 133, 141, 125, 199, 109, 137, 126, 134, 123, + 130, 129, 132, 123, 128, 125, 122, 126, 125, 125, + 130, 128, 91, 89, 138, 135, 139, 134, 133, 129, + 132, 130, 125, 128, 136, 135, 129, 127, 126, 126, + 132, 131, 133, 131, 128, 120, 132, 126, 126, 119, + 134, 130, 131, 123, 104, 95, 140, 141, 136, 137, + 133, 133, 133, 134, 117, 98, 74, 49, 112, 111, + 123, 122, 126, 127, 131, 131, 127, 126, 128, 129, + 130, 131, 124, 127, 101, 107, 108, 109, 115, 115, + 100, 99, 130, 128, 134, 136, 125, 127, 128, 130, + 136, 137, 145, 150, 149, 164, 136, 151, 114, 111, + 124, 125, 143, 150, 162, 174, 158, 169, 136, 137, + 131, 131, 131, 131, 132, 133, 111, 110, 122, 121, + 136, 136, 134, 133, 131, 132, 127, 127, 125, 125, + 128, 129, 129, 130, 125, 127, 140, 140, 148, 149, + 133, 136, 146, 153, 110, 118, 127, 129, 128, 129, + 131, 133, 127, 131, 140, 161, 167, 224, 131, 139, + 136, 143, 135, 139, 138, 143, 149, 155, 141, 143, + 134, 132, 120, 111, 83, 83, 121, 126, 102, 107, + 112, 115, 97, 104, 120, 115, 129, 123, 122, 122, + 134, 135, 122, 131, 102, 124, 114, 119, 93, 103, + 78, 79, 67, 72, 66, 73, 78, 82, 103, 102, + 144, 135, 165, 139, 165, 129, 160, 126, 153, 127, + 161, 134, 160, 142, 160, 143, 148, 140, 138, 135, + 138, 95, 147, 54, 143, 78, 140, 112, 142, 113, + 140, 121, 135, 117, 135, 122, 136, 131, 131, 132, + 147, 159, 140, 156, 127, 81, 142, 128, 146, 127, + 144, 125, 146, 128, 149, 130, 144, 135, 133, 128, + 130, 131, 131, 131, 134, 139, 126, 134, 141, 154, + 168, 205, 153, 176, 148, 163, 147, 158, 141, 143, + 131, 135, 126, 146, 108, 157, 107, 156, 119, 146, + 100, 138, 104, 125, 119, 134, 101, 122, 113, 122, + 95, 133, 52, 140, 83, 136, 110, 133, 114, 131, + 123, 131, 133, 131, 138, 135, 132, 132, 127, 127, + 129, 128, 124, 122, 128, 126, 145, 170, 143, 172, + 141, 163, 143, 176, 138, 164, 139, 155, 135, 145, + 135, 136, 136, 127, 132, 76, 128, 76, 127, 63, + 125, 66, 123, 67, 120, 71, 124, 92, 122, 111, + 133, 133, 135, 136, 139, 140, 147, 147, 150, 144, + 156, 147, 150, 145, 154, 146, 120, 123, 123, 124, + 137, 133, 170, 141, 124, 124, 135, 134, 134, 135, + 132, 132, 129, 129, 130, 130, 136, 136, 130, 132, + 147, 159, 135, 158, 115, 146, 120, 148, 117, 136, + 115, 137, 113, 132, 133, 142, 140, 144, 132, 134, + 134, 135, 134, 137, 137, 147, 162, 178, 136, 147, + 134, 144, 123, 132, 111, 113, 113, 113, 124, 124, + 132, 131, 126, 126, 117, 114, 100, 95, 130, 125, + 157, 145, 164, 156, 163, 158, 145, 145, 133, 134, + 134, 134, 127, 126, 113, 102, 136, 130, 124, 122, + 143, 145, 127, 131, 135, 143, 133, 137, 132, 132, + 92, 94, 122, 125, 128, 129, 131, 130, 134, 135, + 132, 128, 129, 127, 132, 132, 131, 129, 127, 127, + 129, 129, 132, 131, 139, 131, 137, 132, 216, 178, + 146, 134, 147, 137, 151, 142, 148, 139, 144, 138, + 128, 127, 129, 129, 123, 131, 71, 91, 126, 128, + 130, 134, 117, 123, 125, 125, 135, 140, 129, 132, + 132, 132, 133, 134, 124, 130, 127, 133, 133, 138, + 142, 149, 135, 141, 145, 149, 154, 164, 135, 138, + 135, 135, 141, 142, 138, 137, 116, 96, 105, 86, + 127, 118, 128, 120, 124, 117, 125, 117, 125, 121, + 131, 131, 132, 134, 144, 145, 112, 112, 121, 123, + 113, 116, 121, 123, 139, 138, 128, 128, 131, 131, + 134, 132, 132, 132, 125, 128, 127, 130, 125, 131, + 120, 128, 90, 119, 68, 98, 99, 112, 115, 124, + 135, 135, 134, 134, 128, 129, 137, 137, 137, 138, + 110, 114, 129, 130, 144, 145, 123, 125, 129, 129, + 132, 133, 129, 130, 168, 187, 140, 149, 137, 144, + 129, 130, 129, 134, 133, 138, 118, 118, 122, 120, + 131, 130, 129, 128, 133, 133, 125, 125, 124, 123, + 181, 179, 129, 129, 131, 127, 139, 136, 130, 128, + 133, 133, 132, 132, 121, 120, 122, 119, 132, 129, + 129, 125, 107, 96, 136, 137, 150, 146, 135, 134, + 131, 131, 130, 130, 126, 123, 126, 123, 128, 125, + 130, 123, 134, 127, 183, 159, 143, 135, 137, 134, + 129, 129, 128, 128, 134, 133, 139, 138, 133, 132, + 129, 127, 154, 151, 150, 144, 146, 146, 141, 142, + 132, 132, 131, 131, 130, 130, 132, 133, 114, 115, + 132, 132, 122, 122, 132, 131, 115, 117, 120, 120, + 129, 129, 130, 130, 130, 129, 130, 131, 129, 131, + 130, 130, 129, 129, 133, 132, 143, 144, 91, 91, + 137, 136, 118, 107, 60, 45, 56, 49, 57, 52, + 60, 56, 71, 75, 77, 80, 92, 97, 106, 106, + 112, 131, 58, 121, 19, 65, 84, 101, 108, 122, + 121, 127, 112, 117, 106, 112, 117, 124, 126, 127, + 130, 129, 138, 133, 166, 155, 192, 179, 192, 177, + 208, 191, 204, 192, 186, 179, 163, 163, 138, 142, + 134, 134, 144, 142, 243, 236, 148, 146, 141, 137, + 145, 141, 151, 144, 147, 143, 135, 139, 134, 133, + 134, 128, 138, 88, 142, 10, 127, 76, 130, 96, + 129, 102, 128, 108, 123, 111, 127, 119, 127, 124, + 136, 136, 139, 139, 142, 140, 246, 241, 158, 167, + 143, 145, 146, 149, 143, 145, 148, 152, 133, 134, + 139, 135, 135, 136, 99, 137, 95, 133, 75, 138, + 67, 135, 73, 128, 83, 132, 96, 126, 115, 127, + 130, 132, 137, 136, 140, 135, 134, 130, 137, 131, + 159, 151, 215, 197, 181, 170, 160, 149, 150, 143, + 145, 148, 186, 207, 141, 147, 135, 137, 122, 122, + 126, 125, 128, 126, 127, 127, 134, 126, 131, 123, + 133, 133, 126, 122, 128, 122, 99, 93, 59, 60, + 82, 82, 106, 107, 119, 123, 124, 128, 128, 129, + 134, 137, 133, 139, 133, 136, 141, 132, 139, 122, + 142, 97, 130, 81, 128, 89, 129, 101, 125, 112, + 137, 140, 129, 148, 101, 159, 118, 180, 122, 178, + 120, 178, 116, 168, 118, 153, 127, 151, 126, 136, + 132, 134, 125, 126, 118, 105, 156, 124, 180, 132, + 163, 124, 148, 121, 131, 112, 127, 115, 125, 122, + 129, 131, 128, 129, 136, 134, 142, 141, 165, 158, + 203, 182, 141, 136, 132, 130, 135, 135, 130, 130, + 133, 133, 132, 132, 127, 126, 106, 105, 112, 110, + 106, 105, 80, 84, 100, 101, 122, 125, 126, 128, + 101, 109, 46, 59, 114, 112, 119, 119, 126, 121, + 129, 124, 128, 125, 125, 122, 123, 120, 125, 122, + 135, 134, 121, 134, 56, 139, 131, 145, 135, 138, + 136, 139, 126, 130, 122, 132, 126, 129, 124, 129, + 153, 169, 146, 179, 138, 139, 151, 143, 148, 138, + 153, 137, 142, 129, 144, 126, 140, 128, 133, 126, + 136, 134, 154, 149, 173, 157, 152, 144, 149, 141, + 137, 136, 127, 121, 123, 121, 121, 126, 120, 123, + 157, 143, 166, 135, 120, 122, 112, 118, 102, 118, + 111, 124, 134, 131, 141, 138, 135, 134, 126, 129, + 140, 123, 152, 76, 131, 116, 138, 136, 126, 134, + 130, 142, 126, 136, 120, 132, 126, 128, 124, 127, + 131, 138, 80, 147, 126, 138, 130, 140, 129, 134, + 133, 135, 131, 132, 126, 127, 127, 125, 125, 123, + 132, 132, 130, 132, 123, 130, 102, 102, 107, 110, + 116, 127, 132, 152, 142, 160, 143, 151, 142, 146, + 132, 132, 132, 132, 125, 126, 132, 140, 158, 199, + 135, 149, 134, 140, 135, 131, 129, 120, 127, 121, + 129, 130, 122, 123, 125, 124, 138, 138, 138, 135, + 140, 141, 101, 94, 105, 98, 121, 122, 127, 128, + 126, 127, 119, 121, 133, 156, 132, 159, 130, 148, + 137, 164, 127, 138, 130, 137, 135, 140, 126, 126, + 128, 129, 129, 129, 126, 124, 130, 128, 143, 138, + 149, 143, 185, 170, 129, 127, 138, 133, 138, 135, + 132, 134, 137, 144, 139, 183, 131, 145, 127, 128, + 128, 127, 128, 122, 129, 125, 145, 139, 135, 131, + 132, 133, 132, 130, 152, 96, 159, 85, 150, 105, + 154, 115, 143, 120, 138, 126, 134, 124, 130, 126, + 128, 127, 121, 123, 122, 123, 116, 125, 84, 87, + 133, 135, 129, 131, 123, 126, 133, 135, 131, 130, + 136, 134, 129, 119, 79, 63, 116, 116, 136, 133, + 133, 130, 140, 143, 127, 127, 124, 125, 127, 128, + 128, 126, 124, 120, 139, 128, 153, 134, 151, 134, + 174, 145, 159, 136, 165, 144, 171, 149, 143, 135, + 134, 134, 133, 133, 121, 119, 177, 162, 166, 154, + 127, 130, 132, 132, 136, 137, 142, 143, 138, 137, + 167, 151, 162, 142, 128, 136, 142, 148, 128, 143, + 145, 153, 140, 149, 132, 141, 128, 139, 127, 133, + 156, 169, 131, 129, 126, 120, 127, 125, 129, 120, + 131, 126, 126, 123, 124, 121, 122, 121, 123, 123, + 138, 140, 149, 156, 145, 152, 105, 102, 131, 126, + 151, 146, 147, 139, 144, 137, 143, 133, 135, 130, + 132, 130, 131, 129, 126, 130, 126, 129, 110, 135, + 115, 139, 108, 146, 105, 147, 121, 134, 124, 133, + 137, 137, 135, 134, 143, 142, 146, 146, 120, 121, + 139, 137, 133, 129, 149, 145, 139, 133, 130, 127, + 134, 134, 134, 134, 125, 124, 117, 119, 120, 113, + 84, 80, 122, 125, 108, 112, 97, 102, 118, 120, + 124, 123, 115, 116, 110, 111, 98, 97, 127, 124, + 129, 127, 120, 117, 114, 109, 106, 104, 116, 116, + 138, 138, 139, 141, 142, 146, 127, 125, 133, 130, + 134, 128, 134, 127, 116, 91, 105, 84, 114, 106, + 128, 128, 126, 126, 131, 137, 126, 129, 133, 139, + 134, 145, 132, 143, 150, 192, 131, 142, 138, 141, + 132, 130, 132, 130, 149, 138, 196, 152, 137, 125, + 134, 125, 139, 128, 133, 125, 141, 134, 134, 135, + 134, 135, 134, 135, 131, 130, 136, 133, 110, 106, + 142, 144, 153, 162, 131, 129, 134, 132, 131, 130, + 126, 125, 132, 130, 168, 153, 126, 124, 130, 126, + 140, 135, 140, 134, 138, 133, 145, 137, 135, 134, + 130, 130, 132, 131, 133, 132, 129, 129, 125, 128, + 128, 130, 133, 139, 143, 152, 193, 215, 152, 160, + 130, 131, 129, 131, 130, 131, 135, 136, 136, 141, + 83, 81, 121, 120, 136, 130, 150, 145, 147, 145, + 134, 133, 135, 133, 146, 142, 135, 131, 127, 128, + 134, 135, 93, 102, 126, 132, 131, 133, 127, 129, + 124, 125, 120, 122, 103, 106, 128, 129, 139, 138, + 127, 128, 134, 134, 143, 138, 139, 134, 135, 133, + 131, 130, 133, 131, 139, 134, 138, 136, 166, 156, + 119, 116, 121, 122, 126, 124, 116, 117, 123, 124, + 131, 131, 129, 129, 130, 128, 141, 138, 135, 132, + 154, 145, 137, 129, 131, 125, 146, 137, 138, 135, + 131, 131, 131, 132, 129, 130, 134, 138, 111, 116, + 113, 118, 123, 125, 122, 124, 143, 147, 138, 140, + 116, 113, 114, 112, 130, 126, 117, 115, 127, 126, + 139, 137, 141, 139, 131, 132, 143, 144, 139, 140, + 130, 130, 129, 128, 136, 134, 119, 117, 152, 143, + 155, 143, 120, 119, 142, 139, 124, 130, 126, 128, + 112, 110, 112, 109, 136, 132, 125, 118, 121, 115, + 103, 101, 109, 100, 125, 120, 121, 117, 122, 121, + 128, 128, 127, 127, 124, 124, 128, 127, 131, 129, + 142, 138, 147, 141, 115, 108, 113, 109, 122, 119, + 136, 133, 150, 139, 142, 131, 119, 111, 151, 137, + 121, 116, 146, 134, 137, 129, 121, 123, 127, 129, + 130, 130, 130, 130, 136, 137, 126, 126, 136, 136, + 133, 133, 139, 139, 142, 143, 119, 120, 134, 134, + 132, 132, 133, 133, 135, 138, 129, 131, 133, 134, + 135, 138, 126, 130, 117, 118, 131, 132, 135, 135, + 129, 129, 128, 128, 126, 129, 127, 129, 123, 125, + 115, 117, 156, 157, 127, 131, 129, 129, 128, 129, + 129, 130, 131, 131, 126, 127, 135, 134, 136, 135, + 140, 136, 117, 113, 132, 128, 104, 97, 109, 106, + 131, 131, 131, 131, 121, 123, 124, 125, 126, 127, + 127, 127, 135, 135, 128, 128, 130, 130, 141, 140, + 129, 129, 129, 129, 129, 127, 127, 125, 149, 146, + 125, 123, 134, 133, 134, 132, 152, 150, 138, 138, + 128, 128, 126, 125, 132, 133, 141, 143, 136, 136, + 126, 127, 126, 127, 129, 131, 128, 129, 135, 134, + 176, 139, 192, 135, 145, 122, 149, 117, 155, 134, + 169, 133, 157, 139, 142, 136, 151, 152, 142, 147, + 166, 174, 103, 107, 141, 134, 140, 136, 144, 135, + 147, 135, 156, 131, 153, 127, 133, 126, 130, 124, + 127, 130, 123, 124, 114, 105, 195, 193, 156, 157, + 165, 158, 126, 122, 149, 141, 174, 173, 152, 147, + 136, 139, 131, 138, 163, 169, 103, 124, 80, 102, + 153, 186, 121, 151, 134, 161, 156, 190, 141, 151, + 121, 123, 124, 127, 119, 127, 133, 134, 157, 156, + 81, 69, 136, 134, 160, 169, 118, 114, 135, 128, + 114, 116, 97, 97, 117, 122, 152, 161, 115, 121, + 106, 122, 135, 137, 111, 113, 125, 135, 141, 145, + 143, 146, 143, 150, 132, 136, 142, 150, 151, 167, + 101, 107, 155, 173, 112, 124, 105, 100, 128, 126, + 127, 130, 133, 134, 142, 121, 131, 116, 176, 145, + 161, 120, 209, 150, 196, 133, 147, 115, 149, 130, + 144, 145, 144, 145, 120, 119, 163, 160, 117, 118, + 123, 117, 154, 119, 193, 98, 149, 101, 137, 116, + 133, 135, 140, 143, 144, 156, 131, 146, 186, 201, + 140, 139, 123, 125, 158, 169, 157, 166, 142, 143, + 130, 131, 132, 132, 128, 128, 141, 142, 147, 149, + 145, 148, 137, 139, 129, 129, 107, 108, 157, 157, + 120, 121, 119, 119, 140, 132, 137, 131, 118, 113, + 143, 136, 134, 135, 164, 158, 133, 125, 127, 124, + 148, 122, 197, 130, 173, 145, 110, 139, 123, 165, + 83, 158, 90, 167, 93, 142, 136, 169, 134, 152, + 130, 126, 154, 138, 227, 150, 156, 114, 147, 114, + 142, 109, 135, 110, 166, 135, 176, 150, 152, 142, + 132, 132, 136, 136, 130, 135, 143, 152, 136, 144, + 152, 160, 177, 185, 112, 112, 165, 166, 160, 161, + 145, 145, 138, 139, 116, 118, 127, 131, 66, 80, + 132, 142, 119, 127, 101, 108, 120, 130, 126, 130, + 135, 135, 142, 139, 153, 137, 55, 30, 142, 139, + 139, 143, 135, 133, 129, 133, 109, 108, 129, 129, + 136, 135, 134, 131, 129, 132, 132, 134, 135, 149, + 79, 206, 123, 137, 135, 143, 130, 140, 131, 134, + 100, 99, 165, 164, 142, 123, 148, 133, 133, 122, + 142, 133, 138, 125, 119, 111, 129, 123, 137, 130, + 131, 132, 123, 129, 174, 185, 196, 181, 127, 111, + 156, 141, 132, 114, 129, 106, 132, 107, 126, 117, + 134, 140, 131, 136, 119, 146, 92, 246, 128, 132, + 125, 129, 132, 140, 128, 141, 126, 145, 137, 142, + 130, 130, 110, 115, 124, 139, 127, 151, 118, 152, + 98, 146, 36, 108, 126, 158, 112, 146, 112, 130, + 138, 136, 145, 138, 153, 145, 116, 125, 90, 103, + 137, 138, 189, 185, 141, 151, 86, 93, 111, 111, + 133, 171, 125, 209, 140, 132, 130, 134, 129, 101, + 142, 120, 142, 132, 135, 126, 141, 140, 140, 134, + 128, 123, 131, 123, 138, 118, 163, 133, 240, 197, + 176, 151, 126, 123, 81, 94, 109, 118, 124, 133, + 135, 133, 137, 134, 154, 135, 140, 155, 69, 190, + 119, 149, 141, 151, 142, 123, 135, 125, 129, 130, + 127, 125, 132, 127, 107, 80, 123, 103, 145, 131, + 133, 107, 140, 103, 135, 106, 170, 145, 159, 143, + 136, 137, 127, 130, 105, 119, 129, 134, 141, 151, + 116, 127, 119, 140, 75, 119, 152, 162, 149, 152, + 72, 138, 9, 143, 118, 160, 126, 134, 141, 147, + 135, 131, 129, 129, 135, 129, 136, 126, 133, 125, + 137, 135, 146, 141, 145, 139, 141, 140, 133, 130, + 213, 208, 139, 130, 139, 136, 117, 117, 126, 125, + 133, 130, 138, 131, 141, 100, 145, 93, 159, 121, + 144, 132, 117, 160, 102, 187, 99, 162, 117, 144, + 132, 132, 134, 134, 140, 141, 127, 126, 128, 131, + 116, 116, 121, 127, 119, 126, 114, 114, 99, 100, + 141, 144, 148, 159, 179, 224, 95, 131, 100, 125, + 87, 110, 112, 132, 134, 147, 111, 125, 122, 122, + 137, 140, 141, 129, 169, 12, 144, 132, 133, 144, + 141, 146, 137, 147, 136, 122, 133, 130, 131, 128, + 141, 142, 128, 139, 15, 69, 160, 159, 142, 130, + 137, 126, 159, 141, 145, 143, 128, 125, 134, 128, + 131, 130, 127, 127, 114, 104, 119, 98, 83, 68, + 139, 120, 173, 142, 199, 154, 191, 153, 158, 145, + 128, 130, 127, 127, 148, 150, 110, 99, 119, 109, + 120, 113, 163, 154, 110, 90, 138, 129, 149, 144, + 131, 134, 124, 142, 76, 217, 130, 129, 140, 138, + 133, 135, 145, 150, 136, 138, 127, 130, 130, 134, + 144, 119, 178, 70, 143, 130, 115, 136, 139, 138, + 129, 109, 136, 116, 147, 122, 126, 112, 126, 123, + 132, 139, 128, 144, 107, 156, 75, 163, 120, 164, + 151, 136, 151, 99, 160, 112, 159, 126, 143, 126, + 140, 138, 137, 135, 152, 108, 251, 85, 138, 116, + 137, 118, 141, 119, 136, 121, 150, 134, 138, 131, + 137, 137, 143, 144, 150, 153, 148, 154, 152, 151, + 117, 104, 124, 96, 93, 67, 146, 138, 149, 148, + 149, 153, 172, 193, 108, 114, 125, 128, 145, 165, + 149, 160, 121, 130, 115, 120, 110, 112, 121, 118, + 145, 146, 141, 142, 127, 127, 103, 95, 138, 143, + 114, 126, 109, 115, 143, 136, 153, 149, 144, 142, + 140, 138, 150, 144, 128, 116, 142, 136, 135, 122, + 93, 88, 164, 163, 141, 142, 171, 182, 154, 160, + 124, 125, 122, 123, 158, 155, 111, 97, 138, 130, + 157, 134, 101, 65, 129, 118, 121, 114, 124, 119, + 131, 133, 125, 129, 136, 147, 135, 152, 131, 133, + 110, 115, 118, 114, 161, 159, 233, 218, 172, 166, + 140, 107, 125, 0, 140, 103, 140, 115, 125, 113, + 132, 135, 128, 133, 138, 146, 131, 145, 127, 133, + 131, 131, 122, 122, 135, 132, 126, 124, 132, 133, + 164, 167, 121, 127, 117, 120, 167, 162, 145, 143, + 135, 134, 136, 134, 156, 146, 195, 177, 127, 139, + 108, 140, 141, 173, 141, 178, 131, 155, 129, 141, + 134, 134, 119, 114, 184, 184, 127, 126, 147, 151, + 130, 140, 146, 159, 134, 145, 131, 136, 137, 142, + 135, 137, 128, 136, 83, 108, 97, 98, 152, 119, + 207, 144, 142, 121, 144, 129, 131, 127, 130, 132, + 124, 125, 108, 107, 94, 116, 81, 114, 139, 173, + 131, 158, 145, 177, 141, 163, 136, 140, 143, 144, + 135, 141, 132, 136, 134, 142, 142, 136, 173, 50, + 143, 106, 142, 127, 134, 139, 127, 133, 125, 125, + 129, 130, 131, 133, 132, 148, 110, 138, 113, 135, + 138, 175, 108, 151, 55, 119, 51, 100, 93, 116, + 121, 121, 146, 151, 99, 120, 127, 137, 107, 122, + 125, 139, 110, 132, 135, 156, 141, 156, 148, 157, + 137, 137, 141, 140, 139, 137, 130, 128, 138, 136, + 132, 134, 115, 110, 177, 179, 81, 86, 100, 98, + 84, 83, 121, 121, 148, 157, 127, 133, 146, 156, + 127, 136, 143, 151, 135, 139, 138, 142, 136, 136, + 201, 164, 151, 129, 123, 136, 147, 148, 127, 142, + 128, 143, 101, 126, 119, 133, 114, 131, 116, 126, + 132, 133, 140, 140, 126, 125, 156, 153, 142, 129, + 140, 130, 77, 69, 134, 132, 146, 148, 135, 136, + 133, 132, 123, 116, 116, 103, 150, 135, 144, 127, + 130, 117, 136, 122, 122, 106, 48, 38, 81, 78, + 145, 146, 135, 136, 123, 122, 126, 133, 133, 138, + 145, 145, 144, 150, 160, 181, 142, 139, 150, 150, + 136, 136, 139, 139, 133, 133, 139, 135, 134, 129, + 140, 137, 153, 145, 132, 131, 151, 144, 68, 66, + 137, 137, 139, 139, 146, 146, 142, 139, 129, 128, + 131, 129, 133, 132, 135, 134, 135, 134, 201, 200, + 137, 136, 146, 143, 155, 153, 157, 158, 131, 138, + 140, 139, 143, 144, 128, 123, 216, 192, 159, 150, + 137, 138, 136, 142, 145, 148, 126, 162, 140, 170, + 186, 95, 131, 140, 143, 148, 133, 128, 130, 133, + 141, 139, 153, 150, 122, 122, 134, 144, 124, 130, + 159, 166, 133, 139, 151, 150, 138, 139, 131, 134, + 121, 121, 131, 129, 148, 180, 121, 135, 118, 131, + 124, 148, 119, 119, 129, 126, 150, 156, 155, 160, + 40, 154, 115, 157, 133, 129, 140, 133, 143, 133, + 143, 132, 144, 130, 141, 131, 134, 130, 137, 133, + 134, 136, 141, 140, 145, 137, 152, 124, 183, 91, + 118, 154, 123, 158, 136, 134, 140, 142, 138, 142, + 138, 135, 131, 131, 138, 129, 121, 128, 146, 219, + 124, 123, 125, 135, 120, 126, 127, 141, 133, 136, + 127, 124, 120, 107, 152, 125, 149, 108, 158, 144, + 196, 185, 174, 164, 151, 149, 138, 131, 140, 137, + 149, 148, 144, 145, 143, 145, 140, 143, 141, 147, + 112, 125, 113, 113, 149, 155, 143, 149, 146, 151, + 138, 138, 141, 138, 144, 129, 134, 125, 143, 140, + 153, 154, 142, 123, 162, 42, 154, 106, 153, 130, + 153, 153, 137, 137, 144, 144, 142, 140, 165, 151, + 161, 140, 144, 134, 156, 124, 167, 143, 166, 155, + 132, 132, 137, 138, 137, 132, 124, 127, 140, 144, + 134, 140, 162, 180, 127, 131, 152, 169, 145, 156, + 133, 134, 131, 133, 130, 132, 147, 149, 125, 117, + 127, 118, 159, 155, 147, 142, 122, 117, 145, 144, + 138, 137, 130, 133, 113, 149, 168, 224, 166, 201, + 129, 151, 147, 154, 136, 135, 140, 136, 152, 141, + 120, 112, 140, 127, 161, 100, 132, 115, 118, 125, + 115, 133, 115, 157, 144, 146, 114, 135, 127, 139, + 138, 141, 135, 135, 137, 136, 147, 142, 143, 144, + 139, 152, 142, 136, 147, 143, 177, 39, 125, 71, + 147, 143, 66, 88, 132, 158, 123, 126, 116, 135, + 119, 124, 128, 135, 133, 140, 137, 126, 137, 130, + 155, 38, 149, 103, 130, 135, 139, 143, 127, 137, + 135, 141, 138, 148, 131, 148, 136, 147, 132, 139, + 136, 140, 115, 129, 115, 151, 136, 160, 87, 131, + 157, 176, 150, 164, 140, 141, 135, 119, 137, 133, + 141, 140, 140, 139, 134, 134, 142, 144, 131, 132, + 131, 134, 131, 132, 116, 114, 129, 133, 205, 207, + 130, 133, 160, 170, 137, 127, 124, 112, 158, 146, + 155, 137, 134, 136, 137, 142, 177, 184, 149, 152, + 135, 134, 133, 132, 135, 129, 144, 136, 139, 134, + 161, 155, 126, 109, 215, 186, 177, 153, 160, 149, + 139, 139, 136, 140, 140, 142, 186, 71, 129, 144, + 131, 165, 142, 152, 140, 151, 141, 143, 137, 139, + 144, 138, 150, 135, 133, 126, 136, 143, 99, 152, + 139, 131, 190, 118, 122, 147, 134, 155, 136, 143, + 138, 135, 137, 132, 147, 144, 150, 144, 138, 134, + 129, 133, 130, 138, 56, 175, 129, 166, 147, 165, + 140, 138, 144, 137, 141, 133, 150, 139, 129, 135, + 40, 83, 126, 130, 110, 120, 100, 110, 126, 128, + 141, 142, 217, 175, 172, 151, 146, 153, 125, 132, + 128, 137, 141, 141, 145, 145, 140, 133, 132, 131, + 129, 144, 128, 177, 133, 195, 147, 120, 138, 131, + 161, 114, 166, 134, 162, 118, 161, 115, 155, 129, + 137, 136, 141, 129, 141, 132, 55, 168, 121, 126, + 136, 139, 120, 133, 149, 147, 132, 141, 131, 136, + 147, 150, 151, 132, 101, 31, 117, 101, 129, 132, + 122, 138, 128, 137, 140, 170, 131, 143, 131, 134, + 149, 192, 122, 158, 136, 146, 133, 166, 143, 141, + 141, 136, 141, 129, 125, 155, 140, 138, 137, 131, + 111, 112, 131, 132, 120, 127, 149, 148, 151, 141, + 156, 148, 133, 129, 127, 124, 144, 137, 142, 139, + 134, 133, 141, 138, 133, 135, 124, 96, 226, 152, + 116, 108, 128, 105, 155, 130, 153, 138, 144, 139, + 142, 141, 137, 135, 142, 143, 156, 162, 136, 89, + 188, 145, 181, 152, 138, 146, 146, 154, 145, 149, + 152, 133, 158, 133, 42, 153, 117, 144, 149, 139, + 125, 139, 134, 128, 150, 128, 143, 125, 135, 132, + 143, 141, 143, 141, 164, 173, 141, 142, 156, 155, + 154, 154, 169, 170, 77, 80, 112, 105, 135, 134, + 126, 143, 120, 172, 111, 144, 120, 154, 107, 153, + 95, 134, 104, 134, 128, 116, 163, 131, 151, 136, + 135, 133, 142, 143, 152, 204, 149, 112, 156, 128, + 150, 126, 127, 129, 139, 175, 143, 141, 138, 135, + 168, 148, 152, 105, 164, 121, 134, 122, 119, 109, + 122, 148, 136, 143, 153, 132, 158, 148, 149, 150, + 133, 131, 142, 141, 150, 149, 156, 173, 138, 155, + 129, 144, 111, 107, 130, 129, 96, 89, 106, 104, + 135, 135, 144, 146, 131, 153, 134, 154, 146, 166, + 117, 138, 163, 187, 190, 216, 149, 156, 149, 152, + 142, 142, 153, 154, 109, 145, 40, 102, 116, 126, + 137, 139, 149, 157, 108, 124, 139, 146, 142, 147, + 130, 126, 120, 111, 172, 146, 169, 136, 150, 135, + 126, 96, 159, 143, 150, 122, 162, 129, 156, 142, + 135, 142, 144, 138, 222, 109, 137, 145, 144, 142, + 141, 143, 138, 136, 124, 150, 133, 144, 137, 145, + 141, 144, 139, 144, 134, 154, 114, 136, 145, 173, + 151, 215, 110, 115, 127, 134, 145, 150, 145, 144, + 144, 142, 139, 131, 147, 132, 141, 119, 143, 106, + 165, 41, 147, 129, 129, 144, 138, 135, 138, 140, + 128, 150, 89, 163, 154, 115, 141, 127, 132, 145, + 135, 157, 143, 145, 140, 141, 127, 135, 127, 129, + 142, 147, 116, 147, 104, 162, 153, 143, 146, 130, + 144, 110, 133, 123, 130, 137, 118, 198, 126, 152, + 154, 146, 139, 127, 147, 112, 207, 151, 156, 136, + 162, 137, 108, 121, 130, 135, 125, 131, 131, 134, + 134, 134, 141, 144, 107, 143, 137, 144, 124, 136, + 115, 147, 130, 157, 119, 167, 71, 144, 97, 128, + 134, 138, 132, 133, 138, 138, 146, 146, 147, 131, + 141, 138, 185, 65, 145, 123, 139, 130, 142, 128, + 139, 136, 157, 147, 124, 119, 164, 148, 170, 154, + 133, 130, 157, 148, 140, 141, 130, 135, 134, 137, + 136, 137, 143, 144, 144, 144, 178, 186, 71, 73, + 120, 118, 127, 124, 152, 151, 155, 146, 141, 138, + 142, 143, 139, 143, 133, 134, 139, 140, 138, 135, + 146, 141, 78, 198, 129, 139, 141, 141, 134, 141, + 137, 136, 120, 120, 124, 118, 143, 148, 148, 152, + 131, 143, 129, 137, 152, 158, 157, 160, 175, 178, + 137, 139, 131, 133, 146, 152, 121, 147, 142, 143, + 129, 136, 149, 145, 197, 114, 103, 141, 124, 140, + 141, 140, 129, 129, 127, 130, 131, 124, 123, 117, + 150, 139, 120, 109, 119, 120, 163, 163, 117, 121, + 139, 139, 136, 136, 94, 74, 150, 145, 126, 127, + 147, 150, 158, 162, 84, 74, 136, 129, 140, 132, + 136, 135, 146, 145, 124, 116, 129, 120, 130, 129, + 130, 109, 122, 111, 160, 141, 135, 113, 131, 121, + 136, 135, 135, 135, 147, 147, 140, 140, 144, 145, + 139, 142, 131, 137, 145, 145, 143, 153, 48, 49, + 145, 143, 151, 147, 158, 146, 135, 124, 124, 116, + 159, 140, 131, 126, 123, 120, 103, 117, 113, 119, + 148, 146, 128, 124, 123, 126, 123, 120, 158, 141, + 148, 137, 146, 143, 125, 143, 89, 107, 116, 123, + 149, 147, 141, 139, 149, 153, 118, 121, 139, 138, + 105, 119, 168, 147, 139, 141, 143, 138, 133, 130, + 126, 126, 143, 142, 146, 144, 124, 123, 143, 145, + 149, 148, 147, 141, 151, 143, 118, 113, 175, 171 +}; + +static const uint8_t wmavoice_dq_lsp16r1[0x500] = { + 147, 145, 193, 168, 188, 156, 141, 145, 141, 139, + 148, 149, 148, 149, 153, 157, 144, 144, 152, 152, + 141, 145, 153, 143, 243, 134, 151, 133, 166, 135, + 150, 149, 135, 132, 32, 39, 110, 111, 109, 114, + 126, 127, 147, 146, 177, 169, 162, 156, 210, 187, + 141, 147, 95, 150, 127, 155, 108, 133, 139, 148, + 138, 138, 140, 140, 147, 146, 134, 130, 136, 134, + 147, 146, 142, 150, 62, 174, 126, 151, 122, 156, + 154, 156, 179, 184, 115, 107, 105, 99, 127, 124, + 146, 131, 140, 44, 132, 125, 156, 146, 153, 153, + 136, 137, 145, 144, 141, 139, 158, 152, 138, 132, + 145, 145, 147, 145, 146, 141, 144, 140, 110, 97, + 140, 141, 143, 142, 130, 123, 127, 117, 126, 120, + 147, 146, 161, 155, 169, 135, 122, 117, 166, 155, + 144, 144, 142, 142, 125, 122, 137, 128, 194, 172, + 127, 85, 148, 143, 153, 141, 147, 147, 140, 143, + 118, 140, 0, 69, 51, 60, 111, 123, 137, 135, + 146, 146, 164, 165, 207, 214, 145, 143, 149, 147, + 178, 168, 197, 170, 134, 154, 148, 159, 115, 140, + 103, 118, 13, 38, 139, 138, 135, 138, 140, 141, + 144, 144, 140, 140, 150, 150, 156, 157, 164, 171, + 143, 143, 140, 142, 118, 120, 172, 172, 160, 163, + 146, 147, 150, 151, 176, 176, 230, 237, 153, 153, + 168, 156, 173, 149, 164, 148, 162, 146, 178, 158, + 147, 145, 143, 145, 111, 126, 111, 130, 89, 118, + 153, 158, 122, 120, 142, 125, 124, 105, 148, 138, + 145, 144, 156, 151, 193, 154, 146, 147, 119, 135, + 142, 141, 145, 145, 152, 147, 142, 141, 146, 146, + 139, 138, 154, 154, 148, 150, 147, 149, 144, 145, + 134, 134, 141, 140, 135, 134, 145, 147, 160, 163, + 144, 145, 149, 146, 115, 67, 127, 119, 141, 135, + 145, 141, 130, 124, 143, 144, 151, 165, 141, 144, + 154, 152, 160, 136, 115, 82, 64, 71, 64, 65, + 143, 143, 151, 149, 240, 251, 165, 173, 173, 179, + 148, 134, 156, 55, 160, 105, 133, 91, 129, 96, + 149, 149, 145, 144, 160, 154, 171, 159, 140, 142, + 154, 163, 178, 244, 147, 140, 153, 150, 137, 121, + 145, 144, 145, 146, 138, 139, 149, 152, 189, 198, + 148, 148, 156, 158, 168, 182, 165, 182, 172, 201, + 143, 142, 99, 92, 152, 152, 143, 143, 127, 127, + 165, 148, 173, 124, 113, 122, 134, 142, 127, 142, + 124, 126, 137, 137, 131, 132, 144, 142, 141, 138, + 172, 176, 138, 111, 152, 136, 167, 154, 156, 137, + 140, 150, 78, 145, 158, 157, 161, 154, 155, 147, + 153, 164, 156, 191, 129, 109, 153, 146, 153, 141, + 138, 137, 141, 138, 115, 94, 144, 141, 155, 147, + 144, 142, 144, 137, 168, 113, 141, 134, 145, 137, + 146, 144, 150, 148, 140, 155, 103, 178, 137, 149, + 145, 147, 148, 153, 175, 201, 138, 146, 110, 108, + 143, 146, 124, 134, 124, 127, 164, 158, 127, 135, + 145, 146, 150, 150, 145, 147, 95, 80, 150, 151, + 149, 149, 162, 162, 144, 152, 170, 169, 145, 154, + 145, 149, 143, 146, 142, 145, 152, 146, 160, 98, + 141, 141, 153, 153, 140, 137, 131, 131, 145, 146, + 133, 132, 127, 124, 158, 150, 173, 164, 178, 167, + 146, 146, 154, 155, 117, 127, 143, 147, 147, 156, + 142, 143, 144, 145, 146, 152, 170, 199, 151, 165, + 146, 147, 139, 140, 147, 149, 132, 134, 147, 149, + 138, 139, 142, 143, 162, 188, 145, 149, 160, 164, + 150, 150, 139, 139, 143, 142, 146, 146, 137, 138, + 142, 142, 141, 140, 152, 153, 164, 171, 110, 112, + 139, 139, 143, 143, 138, 138, 142, 142, 143, 143, + 137, 140, 142, 142, 145, 141, 149, 141, 182, 135, + 146, 146, 150, 150, 144, 145, 150, 151, 135, 137, + 137, 145, 51, 62, 68, 54, 69, 57, 62, 41, + 137, 139, 139, 144, 135, 150, 225, 232, 208, 197, + 136, 135, 141, 143, 145, 150, 160, 169, 213, 247, + 142, 137, 72, 54, 110, 107, 105, 107, 127, 130, + 145, 143, 169, 155, 219, 174, 195, 164, 183, 157, + 155, 157, 239, 232, 169, 164, 170, 172, 156, 159, + 142, 143, 136, 144, 59, 100, 139, 142, 130, 138, + 147, 146, 150, 161, 128, 235, 143, 155, 146, 167, + 154, 149, 128, 151, 42, 149, 55, 136, 59, 127, + 128, 126, 74, 92, 143, 153, 140, 150, 166, 176, + 146, 152, 150, 145, 140, 100, 140, 105, 124, 59, + 195, 191, 146, 148, 144, 136, 136, 133, 129, 122, + 133, 148, 40, 147, 102, 140, 123, 148, 118, 136, + 143, 143, 150, 148, 184, 153, 160, 147, 166, 149, + 58, 68, 127, 135, 141, 145, 143, 147, 150, 151, + 140, 143, 137, 137, 120, 114, 71, 65, 125, 123, + 153, 148, 215, 159, 136, 135, 150, 146, 150, 150, + 148, 138, 166, 94, 150, 145, 145, 139, 147, 145, + 146, 147, 150, 139, 171, 63, 158, 142, 153, 133, + 147, 148, 143, 143, 76, 72, 155, 159, 164, 176, + 149, 149, 173, 195, 145, 165, 138, 144, 150, 167, + 180, 169, 146, 151, 146, 166, 147, 166, 149, 171, + 157, 156, 168, 166, 147, 149, 121, 122, 116, 124, + 145, 145, 147, 148, 172, 189, 168, 180, 144, 146, + 139, 145, 141, 150, 115, 172, 141, 146, 143, 148, + 145, 145, 142, 143, 145, 147, 138, 143, 58, 73, + 141, 142, 146, 145, 163, 149, 218, 161, 147, 132, + 152, 147, 146, 147, 140, 150, 141, 152, 89, 150, + 78, 134, 135, 137, 139, 142, 140, 137, 137, 130, + 144, 144, 152, 151, 145, 140, 181, 170, 191, 168, + 164, 166, 136, 148, 112, 124, 139, 144, 146, 149, + 142, 151, 113, 182, 137, 150, 143, 156, 138, 147, + 154, 156, 108, 102, 118, 119, 133, 139, 113, 111, + 145, 144, 150, 147, 175, 151, 104, 106, 116, 114, + 143, 144, 151, 157, 151, 191, 135, 113, 138, 123, + 146, 146, 155, 157, 106, 145, 132, 127, 140, 125, + 161, 165, 146, 150, 151, 154, 139, 140, 142, 143, + 144, 148, 145, 149, 147, 138, 168, 104, 146, 136, + 138, 140, 91, 108, 111, 110, 145, 140, 158, 154, + 130, 112, 122, 118, 136, 135, 119, 118, 141, 140, + 147, 146, 146, 145, 138, 138, 182, 188, 132, 132, + 144, 144, 156, 155, 168, 172, 123, 128, 144, 151, + 142, 140, 145, 145, 137, 144, 141, 152, 128, 188, + 149, 149, 160, 161, 160, 160, 166, 163, 130, 107, + 143, 143, 142, 142, 149, 149, 132, 132, 170, 174, + 148, 148, 154, 153, 118, 111, 157, 155, 114, 109, + 140, 139, 138, 137, 205, 187, 137, 133, 147, 144, + 144, 145, 147, 149, 105, 125, 108, 117, 155, 162, + 146, 146, 162, 157, 144, 122, 154, 143, 161, 139, + 141, 142, 130, 131, 144, 144, 142, 141, 144, 142, + 132, 132, 141, 141, 150, 151, 139, 141, 151, 153, + 142, 142, 154, 154, 150, 150, 148, 148, 166, 165, + 143, 142, 144, 144, 132, 132, 142, 144, 130, 128, + 142, 142, 143, 143, 153, 153, 147, 142, 129, 125, + 142, 141, 143, 142, 143, 147, 105, 122, 135, 140, + 141, 140, 140, 140, 151, 151, 156, 155, 146, 146, + 133, 134, 140, 142, 142, 145, 141, 146, 112, 133, + 142, 142, 145, 145, 137, 138, 155, 157, 149, 150, + 144, 144, 139, 138, 130, 128, 132, 131, 147, 147, + 139, 140, 142, 143, 115, 121, 141, 143, 137, 141, + 146, 146, 150, 150, 145, 144, 133, 133, 133, 135, + 143, 144, 144, 144, 166, 167, 139, 142, 139, 140, + 150, 149, 138, 138, 142, 140, 148, 147, 160, 155, + 146, 146, 147, 147, 138, 137, 143, 142, 151, 150 +}; + +static const uint8_t wmavoice_dq_lsp16r2[0x500] = { + 98, 98, 119, 121, 109, 112, 128, 135, 115, 121, + 159, 113, 113, 106, 127, 114, 101, 102, 105, 111, + 161, 162, 137, 138, 161, 159, 152, 150, 150, 148, + 128, 79, 131, 102, 142, 120, 133, 119, 130, 117, + 121, 115, 142, 133, 186, 155, 179, 144, 169, 135, + 107, 103, 106, 106, 122, 122, 111, 112, 112, 115, + 127, 123, 118, 115, 128, 125, 123, 119, 115, 109, + 124, 130, 117, 126, 121, 133, 84, 144, 99, 114, + 122, 125, 123, 131, 124, 135, 176, 200, 158, 176, + 68, 74, 86, 87, 117, 115, 119, 116, 135, 128, + 115, 116, 102, 104, 119, 123, 133, 148, 102, 109, + 71, 121, 106, 117, 107, 127, 106, 122, 100, 110, + 117, 115, 129, 128, 87, 84, 116, 116, 151, 157, + 116, 128, 110, 117, 119, 134, 100, 114, 120, 129, + 142, 141, 146, 151, 94, 91, 114, 114, 118, 118, + 114, 112, 112, 109, 115, 112, 123, 123, 147, 148, + 110, 164, 106, 152, 110, 158, 106, 151, 105, 135, + 85, 51, 71, 27, 71, 34, 74, 45, 85, 53, + 145, 134, 140, 130, 136, 134, 118, 122, 118, 126, + 117, 84, 121, 81, 106, 80, 109, 106, 121, 127, + 95, 94, 112, 110, 90, 94, 109, 107, 114, 109, + 117, 118, 118, 123, 107, 107, 86, 93, 29, 31, + 125, 112, 104, 60, 121, 111, 127, 116, 133, 130, + 118, 117, 148, 145, 122, 126, 124, 127, 90, 91, + 113, 110, 119, 118, 152, 147, 115, 112, 132, 131, + 129, 140, 98, 112, 73, 85, 109, 115, 122, 126, + 123, 122, 122, 122, 126, 125, 137, 140, 203, 210, + 164, 176, 114, 114, 125, 122, 119, 112, 125, 120, + 124, 122, 118, 115, 95, 96, 141, 144, 132, 131, + 127, 130, 132, 134, 116, 114, 122, 123, 137, 134, + 111, 111, 112, 116, 106, 118, 77, 101, 104, 115, + 111, 111, 125, 126, 118, 121, 113, 115, 113, 113, + 171, 170, 202, 199, 221, 206, 199, 184, 177, 167, + 73, 90, 61, 93, 43, 74, 51, 71, 51, 72, + 130, 130, 140, 137, 134, 132, 164, 160, 118, 111, + 123, 136, 133, 154, 130, 158, 106, 110, 110, 114, + 97, 97, 91, 94, 70, 69, 125, 123, 141, 140, + 119, 100, 116, 77, 111, 67, 105, 52, 95, 34, + 100, 122, 90, 124, 68, 120, 43, 117, 50, 112, + 130, 129, 192, 188, 123, 118, 124, 117, 121, 115, + 122, 111, 129, 111, 157, 85, 125, 109, 125, 119, + 143, 152, 119, 128, 114, 116, 129, 136, 148, 157, + 119, 117, 115, 115, 150, 148, 163, 154, 109, 102, + 120, 126, 73, 119, 106, 121, 102, 122, 96, 113, + 84, 83, 117, 115, 122, 117, 154, 143, 159, 142, + 118, 122, 114, 117, 115, 122, 114, 130, 99, 156, + 123, 120, 122, 116, 100, 81, 99, 91, 121, 112, + 139, 131, 164, 142, 132, 119, 145, 133, 157, 141, + 112, 109, 118, 116, 142, 134, 108, 110, 96, 99, + 111, 110, 113, 112, 111, 104, 98, 94, 131, 131, + 115, 114, 121, 118, 120, 115, 173, 148, 123, 117, + 121, 124, 122, 124, 140, 146, 78, 82, 96, 93, + 86, 90, 124, 125, 121, 123, 105, 106, 134, 135, + 107, 109, 132, 141, 100, 95, 113, 114, 102, 105, + 113, 130, 98, 145, 116, 115, 124, 117, 115, 105, + 120, 123, 89, 87, 109, 108, 102, 101, 117, 117, + 113, 122, 132, 138, 77, 116, 86, 99, 118, 126, + 123, 120, 117, 111, 124, 119, 129, 118, 63, 58, + 141, 135, 108, 106, 109, 111, 108, 110, 135, 138, + 117, 114, 134, 127, 139, 129, 138, 130, 126, 122, + 121, 118, 124, 121, 133, 130, 98, 85, 130, 123, + 147, 129, 118, 112, 148, 130, 136, 123, 148, 131, + 113, 112, 123, 118, 123, 115, 147, 95, 117, 110, + 118, 119, 112, 113, 112, 113, 119, 119, 120, 120, + 158, 133, 198, 145, 188, 129, 197, 137, 195, 133, + 132, 140, 140, 139, 158, 156, 223, 217, 233, 233, + 48, 56, 34, 37, 82, 84, 102, 102, 108, 110, + 120, 142, 136, 169, 146, 195, 136, 186, 140, 182, + 196, 186, 158, 155, 142, 134, 132, 125, 120, 119, + 97, 105, 72, 75, 82, 85, 81, 84, 107, 109, + 67, 121, 43, 119, 69, 124, 87, 129, 88, 128, + 53, 57, 93, 98, 91, 94, 93, 98, 104, 104, + 124, 123, 133, 133, 182, 181, 119, 121, 114, 116, + 128, 105, 134, 112, 131, 72, 119, 59, 111, 84, + 132, 142, 145, 180, 124, 132, 131, 143, 122, 134, + 88, 85, 103, 103, 136, 140, 131, 143, 114, 132, + 116, 57, 113, 57, 121, 76, 126, 80, 118, 86, + 127, 112, 127, 97, 131, 100, 149, 91, 163, 86, + 122, 119, 128, 121, 128, 116, 142, 127, 173, 139, + 162, 116, 166, 107, 149, 103, 152, 107, 141, 108, + 114, 113, 118, 116, 56, 43, 90, 90, 105, 105, + 132, 134, 110, 107, 106, 105, 82, 84, 84, 84, + 102, 106, 79, 89, 99, 99, 127, 129, 114, 118, + 139, 157, 116, 123, 116, 123, 87, 89, 110, 113, + 119, 126, 97, 97, 155, 163, 142, 153, 143, 146, + 117, 114, 66, 67, 125, 126, 127, 128, 114, 113, + 111, 114, 127, 133, 123, 132, 143, 162, 133, 148, + 105, 108, 114, 114, 110, 109, 57, 48, 109, 106, + 113, 130, 104, 131, 88, 139, 102, 169, 100, 172, + 129, 114, 150, 97, 114, 112, 117, 119, 109, 116, + 92, 107, 96, 116, 90, 125, 101, 122, 125, 140, + 125, 133, 122, 129, 136, 153, 125, 135, 131, 139, + 84, 71, 129, 123, 135, 120, 114, 103, 112, 101, + 108, 121, 115, 156, 106, 123, 116, 131, 127, 139, + 137, 147, 109, 117, 119, 126, 135, 144, 117, 119, + 120, 127, 76, 105, 111, 116, 120, 125, 141, 138, + 107, 104, 162, 155, 135, 130, 127, 123, 127, 121, + 102, 104, 84, 87, 112, 115, 97, 102, 78, 82, + 119, 118, 120, 123, 91, 105, 114, 119, 119, 126, + 130, 126, 134, 126, 158, 134, 133, 99, 116, 100, + 125, 122, 145, 143, 126, 117, 98, 96, 121, 120, + 152, 148, 131, 126, 130, 129, 126, 119, 87, 87, + 131, 131, 139, 137, 101, 102, 104, 105, 86, 83, + 92, 89, 111, 105, 121, 115, 137, 124, 96, 84, + 100, 96, 122, 119, 107, 108, 93, 96, 79, 82, + 128, 123, 108, 106, 123, 120, 150, 150, 143, 140, + 121, 120, 97, 99, 79, 80, 116, 116, 88, 90, + 128, 131, 101, 97, 140, 140, 117, 116, 116, 118, + 137, 135, 100, 91, 115, 112, 134, 121, 107, 99, + 120, 122, 122, 125, 124, 126, 136, 141, 89, 95, + 103, 119, 103, 116, 122, 139, 125, 137, 152, 170, + 121, 122, 124, 124, 98, 97, 137, 140, 96, 92, + 115, 113, 136, 136, 128, 132, 122, 124, 151, 158, + 100, 107, 121, 131, 131, 158, 119, 130, 113, 114, + 114, 109, 148, 130, 103, 95, 127, 116, 137, 120, + 103, 108, 97, 97, 133, 128, 113, 109, 136, 128, + 125, 124, 118, 118, 122, 121, 101, 99, 157, 152, + 138, 134, 124, 115, 113, 101, 123, 112, 124, 110, + 116, 113, 128, 121, 119, 110, 124, 113, 128, 67, + 114, 118, 114, 123, 109, 121, 102, 123, 56, 116, + 117, 111, 112, 99, 124, 114, 112, 79, 114, 88, + 112, 113, 115, 117, 126, 127, 130, 132, 123, 122, + 111, 104, 111, 102, 112, 102, 129, 118, 129, 115, + 123, 124, 130, 133, 114, 117, 125, 127, 112, 117, + 124, 125, 119, 120, 117, 116, 105, 104, 110, 110, + 125, 124, 118, 116, 124, 123, 124, 121, 133, 132, + 111, 111, 124, 124, 120, 119, 116, 116, 134, 130, + 114, 116, 112, 113, 109, 111, 116, 118, 95, 98 +}; + +static const uint8_t wmavoice_dq_lsp16r3[0x600] = { + 84, 82, 95, 94, 125, 131, 98, 102, 94, 93, 104, 104, + 127, 113, 87, 77, 125, 114, 109, 94, 94, 91, 106, 105, + 168, 125, 163, 120, 128, 100, 119, 99, 108, 97, 108, 106, + 86, 85, 128, 125, 79, 73, 103, 102, 123, 123, 116, 117, + 84, 76, 135, 131, 133, 133, 129, 130, 125, 123, 115, 114, + 94, 97, 79, 81, 115, 115, 94, 93, 128, 127, 126, 125, + 124, 111, 105, 114, 104, 117, 109, 110, 124, 125, 118, 117, + 107, 110, 106, 110, 93, 93, 149, 148, 118, 119, 111, 110, + 147, 157, 143, 156, 134, 136, 118, 121, 106, 107, 105, 105, + 114, 83, 114, 46, 106, 53, 110, 83, 107, 94, 105, 103, + 92, 90, 109, 106, 172, 160, 114, 110, 109, 110, 110, 109, + 90, 98, 98, 109, 102, 98, 97, 92, 100, 100, 101, 102, + 123, 117, 124, 98, 82, 80, 117, 115, 112, 110, 109, 108, + 107, 111, 100, 115, 105, 120, 104, 105, 83, 82, 95, 96, + 109, 120, 72, 71, 97, 104, 69, 74, 99, 102, 118, 117, + 137, 133, 142, 135, 105, 110, 121, 121, 125, 122, 114, 112, + 151, 186, 115, 132, 103, 111, 100, 104, 99, 101, 104, 105, + 18, 38, 56, 65, 76, 83, 85, 91, 101, 103, 108, 110, + 144, 135, 126, 121, 115, 113, 79, 80, 118, 117, 117, 117, + 117, 124, 115, 115, 126, 113, 130, 116, 112, 106, 108, 105, + 77, 76, 76, 80, 109, 109, 125, 129, 130, 133, 116, 118, + 96, 86, 109, 99, 102, 69, 84, 69, 107, 103, 114, 113, + 78, 118, 82, 114, 84, 129, 69, 112, 78, 98, 96, 103, + 89, 137, 96, 111, 105, 97, 93, 93, 101, 105, 105, 105, + 141, 123, 102, 93, 91, 79, 87, 81, 102, 99, 109, 108, + 94, 92, 124, 123, 130, 134, 100, 107, 71, 75, 92, 91, + 94, 104, 107, 83, 106, 101, 113, 114, 122, 122, 114, 114, + 118, 124, 103, 106, 95, 116, 90, 93, 107, 104, 109, 107, + 116, 118, 76, 72, 88, 88, 132, 132, 140, 141, 116, 116, + 90, 81, 111, 95, 139, 97, 123, 96, 112, 100, 110, 108, + 112, 116, 133, 140, 112, 120, 80, 85, 55, 55, 85, 84, + 125, 94, 111, 104, 116, 103, 112, 86, 93, 84, 99, 98, + 180, 179, 197, 197, 169, 163, 149, 146, 130, 124, 116, 115, + 76, 47, 36, 11, 43, 28, 66, 53, 82, 80, 102, 99, + 119, 123, 176, 201, 113, 120, 112, 111, 103, 105, 106, 110, + 145, 114, 112, 89, 120, 93, 123, 104, 131, 123, 113, 111, + 97, 109, 82, 106, 75, 104, 103, 115, 120, 124, 111, 114, + 114, 111, 113, 105, 34, 33, 63, 63, 105, 106, 122, 122, + 51, 41, 96, 92, 125, 125, 118, 118, 118, 119, 113, 113, + 111, 180, 108, 178, 107, 171, 110, 160, 105, 136, 102, 117, + 76, 79, 90, 92, 80, 88, 88, 93, 123, 124, 122, 122, + 131, 128, 123, 122, 151, 158, 108, 107, 129, 128, 119, 119, + 97, 99, 114, 120, 121, 125, 151, 157, 82, 89, 95, 96, + 128, 94, 130, 95, 149, 113, 149, 120, 127, 115, 113, 109, + 167, 171, 83, 80, 84, 79, 106, 106, 112, 110, 107, 108, + 130, 139, 81, 88, 107, 106, 112, 112, 119, 118, 114, 112, + 108, 105, 100, 98, 120, 116, 122, 117, 38, 37, 72, 73, + 118, 125, 110, 120, 114, 126, 135, 142, 139, 142, 118, 119, + 119, 119, 156, 145, 78, 75, 94, 94, 112, 110, 113, 113, + 101, 108, 98, 104, 103, 109, 117, 118, 167, 167, 132, 132, + 116, 108, 118, 111, 149, 136, 85, 74, 95, 92, 113, 112, + 74, 69, 104, 107, 96, 100, 117, 121, 103, 105, 103, 103, + 110, 106, 111, 101, 82, 72, 96, 92, 132, 130, 120, 121, + 116, 113, 138, 139, 104, 103, 131, 131, 68, 69, 92, 92, + 97, 97, 146, 151, 122, 132, 97, 95, 117, 116, 115, 116, + 139, 134, 110, 110, 124, 129, 100, 110, 86, 91, 100, 102, + 116, 136, 88, 90, 137, 139, 103, 114, 114, 117, 111, 110, + 82, 83, 104, 102, 97, 99, 97, 97, 58, 56, 84, 84, + 83, 122, 76, 105, 112, 126, 120, 134, 112, 120, 108, 110, + 114, 128, 73, 90, 72, 76, 98, 100, 95, 96, 101, 102, + 101, 108, 118, 126, 94, 102, 81, 83, 138, 140, 131, 130, + 88, 100, 112, 124, 105, 106, 122, 123, 121, 121, 114, 114, + 76, 108, 73, 83, 93, 95, 110, 111, 98, 99, 103, 103, + 105, 112, 98, 108, 114, 95, 117, 98, 120, 116, 116, 115, + 231, 238, 150, 146, 124, 126, 115, 122, 117, 121, 112, 112, + 74, 73, 72, 74, 60, 61, 62, 61, 85, 85, 101, 101, + 67, 69, 50, 51, 83, 83, 110, 110, 118, 113, 112, 111, + 199, 124, 184, 115, 176, 117, 165, 120, 138, 115, 116, 114, + 52, 116, 36, 107, 49, 99, 72, 106, 91, 107, 104, 105, + 140, 138, 141, 135, 154, 147, 166, 159, 139, 136, 116, 115, + 130, 119, 180, 157, 183, 149, 136, 121, 119, 114, 111, 110, + 104, 129, 113, 154, 111, 148, 108, 132, 105, 117, 106, 111, + 114, 35, 99, 65, 113, 94, 110, 98, 111, 107, 107, 106, + 106, 110, 128, 135, 162, 175, 143, 155, 115, 116, 109, 109, + 168, 155, 112, 109, 125, 125, 126, 122, 126, 124, 111, 112, + 128, 96, 160, 77, 151, 77, 121, 80, 114, 94, 107, 103, + 97, 104, 101, 116, 56, 79, 74, 83, 92, 95, 104, 106, + 63, 68, 76, 77, 110, 107, 96, 90, 85, 83, 97, 96, + 116, 110, 46, 42, 103, 100, 122, 120, 102, 101, 104, 104, + 106, 101, 109, 98, 96, 61, 67, 35, 72, 61, 96, 93, + 88, 80, 81, 76, 113, 110, 144, 143, 88, 89, 93, 94, + 95, 96, 100, 101, 136, 132, 166, 160, 148, 147, 115, 116, + 80, 78, 130, 129, 120, 108, 91, 85, 95, 91, 104, 102, + 151, 147, 106, 109, 110, 110, 64, 69, 68, 67, 96, 96, + 90, 166, 97, 128, 99, 120, 104, 121, 109, 118, 105, 109, + 122, 138, 110, 143, 75, 97, 83, 94, 89, 94, 102, 103, + 136, 142, 103, 110, 83, 89, 99, 101, 138, 138, 120, 122, + 168, 88, 105, 90, 109, 107, 110, 111, 106, 105, 103, 102, + 68, 72, 102, 104, 92, 102, 65, 75, 89, 94, 106, 106, + 83, 74, 93, 85, 73, 66, 106, 102, 100, 92, 99, 97, + 93, 99, 101, 96, 116, 112, 125, 120, 88, 88, 96, 96, + 44, 98, 93, 115, 104, 116, 103, 107, 112, 113, 107, 107, + 93, 83, 105, 99, 93, 84, 127, 125, 141, 143, 117, 118, + 106, 103, 126, 121, 137, 123, 123, 114, 147, 142, 127, 123, + 103, 110, 89, 91, 121, 124, 66, 71, 68, 69, 96, 97, + 114, 105, 68, 65, 69, 67, 96, 94, 131, 130, 123, 121, + 111, 104, 130, 121, 95, 95, 72, 74, 88, 88, 105, 104, + 135, 124, 110, 98, 114, 111, 159, 158, 111, 113, 104, 106, + 103, 108, 94, 107, 55, 57, 115, 118, 121, 122, 111, 111, + 97, 99, 106, 111, 119, 126, 59, 62, 111, 112, 124, 125, + 86, 93, 100, 110, 118, 145, 113, 132, 120, 125, 112, 112, + 101, 115, 78, 149, 81, 114, 111, 121, 108, 112, 107, 108, + 104, 104, 94, 96, 84, 83, 135, 132, 71, 69, 88, 86, + 100, 98, 62, 60, 81, 80, 90, 89, 63, 66, 89, 90, + 123, 116, 108, 99, 90, 86, 91, 92, 65, 65, 88, 88, + 84, 79, 115, 109, 123, 111, 99, 99, 134, 136, 121, 123, + 127, 137, 84, 88, 104, 107, 128, 130, 74, 69, 89, 89, + 118, 112, 143, 132, 141, 131, 113, 113, 99, 102, 104, 105, + 117, 115, 100, 99, 131, 126, 90, 88, 145, 144, 128, 127, + 112, 114, 131, 133, 85, 84, 118, 119, 151, 152, 117, 117, + 110, 105, 162, 140, 116, 107, 140, 134, 124, 122, 113, 113, + 107, 110, 124, 133, 98, 103, 99, 107, 109, 113, 112, 112, + 115, 105, 82, 77, 125, 122, 133, 132, 118, 120, 113, 113, + 101, 88, 84, 80, 97, 99, 91, 91, 94, 94, 101, 100, + 121, 86, 139, 108, 106, 93, 103, 99, 112, 108, 108, 107, + 113, 83, 105, 102, 125, 125, 114, 115, 110, 112, 108, 109, + 93, 112, 113, 121, 125, 131, 101, 101, 107, 109, 111, 111, + 98, 102, 117, 126, 80, 84, 107, 109, 83, 84, 96, 97, + 132, 136, 112, 118, 94, 93, 121, 118, 99, 98, 102, 103, + 122, 127, 128, 133, 118, 104, 102, 88, 100, 94, 104, 102, + 115, 116, 102, 105, 140, 142, 135, 130, 90, 88, 100, 101, + 94, 86, 112, 112, 89, 121, 92, 101, 109, 108, 110, 112, + 99, 93, 129, 114, 109, 99, 131, 119, 102, 97, 103, 103, + 103, 116, 124, 101, 115, 95, 105, 101, 94, 91, 100, 100, + 113, 90, 94, 86, 92, 92, 117, 111, 106, 103, 106, 105, + 115, 99, 110, 91, 107, 104, 81, 90, 108, 113, 112, 113, + 113, 114, 93, 101, 101, 102, 101, 126, 93, 103, 104, 105, + 117, 106, 124, 107, 104, 119, 108, 133, 104, 111, 104, 106 +}; + +static const float wmavoice_lsp10_intercoeff_a[32][2][10] = { + { { 0.5108627081, 0.0480548441, -1.5099149644, 0.6736935377, + 0.7536551058, 0.7651474178, 0.8510628343, 0.6667704582, + 0.7576012611, 0.7091397047 }, + { 0.1351471841, -0.1965375543, -1.6313457787, 0.3218626380, + 0.4132472873, 0.4663473070, 0.5805781186, 0.3962165117, + 0.4818550050, 0.4907165468 } }, + { { 0.8556320667, 0.7774704993, -0.0175759494, -0.1882298589, + 0.1892164350, 0.4850396216, 0.6270319819, 0.6327089071, + 0.6513319910, 0.6075088978 }, + { 0.4374088347, 0.3505934179, -0.0762144327, -0.2830760479, + -0.0626451969, 0.1500318050, 0.2602472305, 0.2781780064, + 0.3167395592, 0.3596626520 } }, + { { 0.1899779737, 0.0650856197, 0.1699010432, 0.9122628570, + 0.9097705483, 0.7433397174, 0.6304935217, 0.5164704025, + 0.4174703658, 0.5215242505 }, + { 0.0704856217, 0.0169009864, 0.0188394487, 0.5587704182, + 0.5194473267, 0.3539164960, 0.2426626086, 0.1721164286, + 0.1371548772, 0.2594856918 } }, + { { 0.8858859241, 0.9100474715, 0.8921859264, 0.9332397878, + 1.0225475132, 1.0555013716, 1.0983552337, 1.1290244758, + 1.0363244414, 0.9277705550 }, + { 0.4810934663, 0.5782935023, 0.6835935414, 0.7650781870, + 0.9018090069, 0.9996321201, 1.0219936669, 1.0474705994, + 0.9109474719, 0.7774704993 } }, + { { 0.4359549880, 0.2275702953, 0.0993548632, 0.1763395071, + 0.1055856347, 0.1018471718, 0.1170087159, 0.1221317947, + 0.1834010482, 0.2988780141 }, + { 0.1573702693, 0.1041317880, 0.0506856143, 0.0781702399, + 0.0058932900, -0.0026913285, -0.0031067133, 0.0070702136, + 0.0116394460, 0.0566394627 } }, + { { 0.8528628349, 0.8028782010, 0.4680088460, 0.9055474699, + 1.3742399514, 1.1093629301, 0.4122780561, 0.4003703594, + 0.6360319853, 0.6415704489 }, + { 0.4252934456, 0.3823703527, 0.1676856577, 0.5241550207, + 1.1995706558, 0.9088013172, 0.1224087179, 0.0730471611, + 0.3071857095, 0.3772472739 } }, + { { 0.5508781075, 0.2829549313, -0.0022067130, 0.1042702496, + 1.0318244398, 1.3258476257, 1.3550630212, 0.9931936562, + 0.7195243239, 0.6807550788 }, + { 0.2679318488, 0.0960317850, -0.1357529163, -0.1291759908, + 0.6451012194, 0.9968628883, 0.9510321021, 0.6608166099, + 0.3799472749, 0.3735780418 } }, + { { 0.9967244267, 1.0255244374, 0.9800398052, 0.7939474285, + 0.8288397491, 0.8390166759, 0.8660166860, 0.9247936308, + 0.9127474725, 0.8684397638 }, + { 0.7921474278, 0.9416859448, 0.8547320664, 0.5348165631, + 0.6231550574, 0.6703012288, 0.6987550855, 0.8147858977, + 0.7406397164, 0.6496012211 } }, + { { 0.1439394951, -0.3193529844, -0.2024914026, -0.1854606271, + 0.0877240896, 0.1617318094, 0.3087087870, 0.3777318895, + 0.3910242021, 0.4797780812 }, + { -0.0157067180, -0.1778452396, -0.1554836929, -0.1759760082, + -0.0607759655, -0.0161221027, 0.0393317640, 0.0758856237, + 0.1163856387, 0.1947548985 } }, + { { 1.1021629274, 0.9958244264, 0.4658626914, 0.3089164793, + 0.3740626574, 0.2962472439, 0.3170857131, 0.2420395315, + 0.2649549246, 0.2936857045 }, + { 0.4700857699, 0.1809087396, 0.0311625302, 0.0106009841, + 0.0311625302, 0.0266625285, 0.0221625268, 0.0156548321, + 0.0551163852, 0.1010164022 } }, + { { 0.2925087810, 0.3418011069, 0.7339243293, 0.7322627902, + 0.7288704813, 0.7924935818, 0.7724166512, 0.7819012702, + 0.8325782120, 0.7954705060 }, + { 0.0559471548, -0.0456144214, -0.0462374985, -0.1005144417, + -0.0511528850, -0.0455451906, -0.0044220984, 0.0451471508, + 0.1232394874, 0.2085318267 } }, + { { 0.2230702937, -0.9052532017, 1.2441552877, 1.0825706124, + 0.9088705480, 0.8797243834, 0.8648397624, 0.8091089725, + 0.7633474171, 0.7468704879 }, + { -0.2030452490, -1.4167303145, 1.3542322516, 0.8369397521, + 0.6148473620, 0.5560704172, 0.5450627208, 0.4978473186, + 0.4200319052, 0.4904396236 } }, + { { 0.6088242829, 0.5965704322, 0.6547242999, 0.8554936051, + -0.2989298999, 0.2404472232, 0.3573780358, 0.7499166429, + 0.7691628039, 0.6824858487 }, + { 0.2582395375, 0.2721549273, 0.3462318778, 0.4820626974, + -0.4780299664, -0.0712990463, 0.0200163722, 0.4246703684, + 0.4660011530, 0.4172626734 } }, + { { 1.1749937236, 1.0773090720, 1.0566782951, 1.0249013603, + 0.9947167337, 0.9626628757, 0.9562244117, 0.9072782397, + 0.7654243410, 0.6448935270 }, + { 1.1595552564, 0.9340013266, 0.3959395885, 0.3693549633, + 0.3915780485, 0.3104395568, 0.3499011099, 0.2236933708, + 0.1638087332, 0.1811856627 } }, + { { 0.9572628736, 0.9389859438, 0.6619243026, 0.6849089265, + 0.7276935577, 0.7839781940, 0.7987243533, 0.7748397291, + 0.7101089358, 0.7277627885 }, + { 0.5809935033, 0.5575934947, 0.3544703424, 0.3636780381, + 0.3736472726, 0.4486242235, 0.4684934616, 0.4481396079, + 0.3456780314, 0.4478626847 } }, + { { 0.1259394884, 1.3096476197, 1.0794552267, 1.0009475052, + 0.9061013162, 0.9216782451, 0.8954397738, 0.9160013199, + 0.8575012982, 0.7479089499 }, + { -0.3689222336, 1.5293861628, 0.7323320210, 0.4102703631, + 0.3825780451, 0.2828164697, 0.2644010782, 0.2455010712, + 0.2482010722, 0.2335241437 } }, + { { 0.5380704105, 0.1600702703, -0.0657605827, -0.2390452623, + -0.3885837793, -0.4150299430, -0.3001760542, -0.1451683044, + 0.1312010288, 0.2798395455 }, + { 0.2074933648, 0.0560163856, -0.0956682861, -0.2893068194, + -0.3889991641, -0.3918376267, -0.3550068438, -0.2649375796, + -0.0554451942, 0.1167317927 } }, + { { 0.6092396677, 0.5101011693, 0.4012011290, 0.5416011810, + 0.5715781152, 0.6476627588, 0.6988243163, 0.7306012511, + 0.7531704903, 0.6534781456 }, + { 0.2060395181, 0.1409625709, 0.1024702489, 0.1834010482, + 0.1946856678, 0.2547779977, 0.3134857118, 0.3283011019, + 0.3837549686, 0.3501780331 } }, + { { 0.4516011477, 0.5351627171, 0.8068243563, 0.7049858570, + 0.7165473998, 0.6005858183, 0.4870473146, 0.2500010729, + 0.3132087886, 0.4462703764 }, + { 0.1053087115, 0.1348702610, 0.4457857609, 0.3499703407, + 0.3537780344, 0.2628780007, 0.1665087342, 0.0200856030, + 0.0329625309, 0.1525241137 } }, + { { 0.7058166265, 0.7305320203, 1.1684860289, 1.4524707496, + 1.3212091625, 1.2613245249, 1.1712552607, 1.1154552400, + 1.0487167537, 0.9153782427 }, + { 0.2286087573, 0.2851703167, 1.2016475797, 1.5154707730, + 1.2726091444, 1.1459167898, 0.9801090360, 0.9296397865, + 0.8490551412, 0.6772243083 } }, + { { 0.6686396897, 0.5728935003, 0.4734780788, 0.6970243156, + 0.5852165818, -0.0762836635, -0.2054683268, -0.1380375326, + 0.1282933354, 0.3467164934 }, + { 0.2925087810, 0.2344933748, 0.1677548885, 0.2747856975, + 0.2097087502, -0.2795452774, -0.3761222363, -0.3183837533, + -0.0834836662, 0.1482318044 } }, + { { 0.6559704542, 0.7737320364, 0.9867551923, 0.9912551939, + 0.9508936405, 0.9114320874, 0.8336859047, 0.7905551195, + 0.7672935724, 0.7532397211 }, + { 0.1843702793, 0.2565087676, 0.7571858764, 0.7545551062, + 0.6793704629, 0.5981627405, 0.5078165531, 0.4282011390, + 0.3948318958, 0.4502165318 } }, + { { 0.4430857599, 0.6102781296, 0.8485012949, 0.8573628366, + 0.9078320861, 0.9979705811, 1.0411013663, 1.0524552166, + 1.0194321275, 0.9023628533 }, + { 0.0070009828, 0.0084548295, 0.1613856554, 0.3484472632, + 0.4385857582, 0.5895088911, 0.6367935240, 0.6736935377, + 0.7026320100, 0.5924165845 } }, + { { 1.0532859862, 1.1059706211, 1.1311013997, 1.1250783205, + 1.0425552130, 0.9993551970, 0.9673013389, 0.9386397898, + 0.8836013079, 0.8336859047 }, + { 0.9791398048, 1.1481321752, 1.1275706291, 1.0082167387, + 0.8809705377, 0.8031551242, 0.7287320197, 0.6496704519, + 0.5211088657, 0.4734088480 } }, + { { -0.0251221061, -0.0443682671, 0.1282241046, 0.3850703537, + 0.4252934456, 0.4547857642, 0.4690473080, 0.4873242378, + 0.6001012027, 0.5882627368 }, + { -0.0562759638, -0.0246374905, 0.0070009828, 0.0971394777, + 0.1232394874, 0.1278779507, 0.1302317977, 0.1462241113, + 0.2073549032, 0.2446010709 } }, + { { 1.1749244928, 1.1155937016, 0.9236167073, 0.6288319826, + 0.6515396833, 0.5391781032, 0.5398011804, 0.4997165501, + 0.4066703618, 0.3998857439 }, + { 0.9403013289, 0.7346166372, 0.1841625869, 0.1319625676, + 0.1395087242, 0.0857856274, 0.0952702463, 0.0860625505, + 0.0829471648, 0.1132010221 } }, + { { 0.9047167003, 0.9840551913, 0.9933321178, 0.9360090196, + 0.9164859354, 0.9213320911, 0.8701705337, 0.8815936148, + 0.8414397538, 0.8188012838 }, + { 0.0961010158, -0.0147374868, 0.0202240646, 0.1002548635, + 0.1407548785, 0.1837472022, 0.1858241260, 0.2064549029, + 0.2228626013, 0.2859318554 } }, + { { 0.4034165144, 0.1918472052, 2.1959402561, 0.4763165414, + 0.6577012241, 0.7036704719, 0.6626858413, 0.7650089562, + 0.7702704966, 0.6543781459 }, + { 0.0940933228, -0.1222529113, 2.3491480052, 0.1385394931, + 0.3052472472, 0.3665857315, 0.3350857198, 0.4722319245, + 0.4313857555, 0.3846549690 } }, + { { 0.8215012848, 0.8613782227, 1.0399936736, 1.4082322717, + 0.4075011313, 0.4091626704, 0.5230473280, 0.6101396680, + 0.7510243356, 0.7237474024 }, + { 0.4810934663, 0.5670088828, 0.9207782447, 1.3007860780, + 0.0453548431, 0.0858548582, 0.1803548932, 0.2790087759, + 0.3974626660, 0.4581780732 } }, + { { 1.5921784937, 1.4987169206, 1.1321398616, 0.8235089779, + 0.6888550818, 0.6621319950, 0.6192089021, 0.6533396840, + 0.7196627855, 0.6549319923 }, + { 1.5911400318, 1.4768399894, 0.9358705580, 0.4674549997, + 0.3522549570, 0.3144549429, 0.2985318601, 0.3559241891, + 0.4061857462, 0.3958703578 } }, + { { 0.7975474298, 0.8712782264, 0.8974474669, 0.3008164763, + 0.5562088788, 0.6655935347, 0.8921166956, 1.0918475389, + 0.9544936419, 0.8554936051 }, + { 0.3769703507, 0.4930703938, 0.6619243026, -0.0382759571, + 0.1766856611, 0.3015780151, 0.5952550471, 0.8903859258, + 0.7395320237, 0.6205935180 } }, + { { 0.2206472158, 2.4467634261, 1.2920629978, 1.0239321291, + 0.9014628530, 0.8552166820, 0.8219859004, 0.9005628526, + 0.7614781857, 0.7763628066 }, + { -0.2722068131, 2.8967635930, 1.3039706945, 0.7695089579, + 0.6132550538, 0.5701242685, 0.5737935007, 0.6533396840, + 0.5422934890, 0.5150857866 } }, +}; + +static const float wmavoice_lsp10_intercoeff_b[32][2][10] = { + { { 0.4881048799, -0.1998192370, -0.3872502148, 0.0109423101, + 0.0406953394, 0.1788437665, 0.1673750877, 0.3409781158, + 0.4061202109, 0.5221177042 }, + { 0.1492218077, -0.1372330189, -0.2683691680, -0.0621950924, + -0.0624572337, -0.0068177581, -0.0076041818, 0.0680235624, + 0.1055752933, 0.1199930608 } }, + { { 0.7934338748, 0.0012430847, 0.4239458144, 0.5521328747, + 0.6497149467, 0.6423749924, 0.7170197070, 0.7169541717, + 0.7778364718, 0.8397018015 }, + { 0.2768190503, -0.0491535664, -0.0325731337, 0.0261465013, + 0.0469867289, 0.0649434030, 0.0781815350, 0.1031504869, + 0.1194687784, 0.2451654971 } }, + { { 0.7212139666, 0.1658677757, 0.0101558864, 0.5636015534, + 1.3175852597, 1.1911676526, 1.1266809106, 0.8230558336, + 0.8604109585, 0.8094900250 }, + { 0.3658815324, 0.0816549063, -0.2092563212, 0.1946377754, + 1.0856558084, 0.9491457641, 0.8461242616, 0.5193652213, + 0.5975488424, 0.5293265879 } }, + { { 0.9507186115, 0.9078585207, 0.8773190677, 0.8677509129, + 0.8024122119, 0.8127667904, 0.8246286809, 0.8779088855, + 0.9454102516, 0.9863698184 }, + { 0.6883807778, 0.6900191605, 0.7059442401, 0.6552854478, + 0.5843107104, 0.5553441048, 0.5887671113, 0.6494528055, + 0.7725936472, 0.7792782485 } }, + { { 0.2399882078, 0.1938513517, 0.4441962242, 0.4475385249, + 0.3055235147, 0.1745184362, 0.1174371839, 0.0679580271, + 0.0782470703, 0.1695377529 }, + { 0.0170370936, 0.0253600776, 0.2072205544, 0.1907711923, + 0.1096384823, 0.0327000320, -0.0134368241, -0.0461389422, + -0.0372916758, -0.0243156850 } }, + { { 0.5457104146, 0.3774812818, 0.5235594809, 0.2994287312, + 0.2394639254, 0.5731041729, 0.9971176088, 1.1646913886, + 0.9028123021, 0.7777709365 }, + { 0.2288472056, 0.1181580722, 0.2074171603, 0.0355180502, + -0.0024924278, 0.2596487999, 0.7474936247, 0.9103488624, + 0.5927647650, 0.4772915542 } }, + { { 0.6541713476, 0.6412608922, 0.7625012100, 0.7826205492, + 0.4839106202, 0.3311478198, 0.4577620327, 0.8572652638, + 0.9442306161, 0.8282986581 }, + { 0.2852075696, 0.2614837885, 0.4221763611, 0.4314823747, + 0.1434547007, 0.0435788929, 0.1397191882, 0.5525916219, + 0.6752081811, 0.5487250388 } }, + { { 0.6742251515, 1.0610800683, 1.0500701368, 0.9570100009, + 0.9325653315, 0.9243078828, 0.9148707986, 0.8317720294, + 0.7696445584, 0.6784849465 }, + { 0.2283884585, 0.9739181101, 0.5336519182, 0.4974764287, + 0.3998288214, 0.3674543798, 0.2719694376, 0.2608939707, + 0.2087934017, 0.1675716937 } }, + { { 0.3736146986, -1.5457833707, 0.9216864705, 0.7959242165, + 0.7358283401, 0.7233110964, 0.7271121442, 0.6852350831, + 0.6891672015, 0.6589554250 }, + { 0.1246460676, -1.7167649865, 0.7037160397, 0.4803061783, + 0.4694928527, 0.4654951990, 0.5208069980, 0.5305717587, + 0.5288023055, 0.5278192759 } }, + { { 1.0116009116, 0.9882703424, 0.8393741250, 0.8889843524, + 0.8934407532, 0.8906227350, 0.9222107530, 0.8973073363, + 0.9257496595, 0.9306648076 }, + { 0.5097970665, -0.0106843412, 0.1419473886, 0.2804890275, + 0.3719763160, 0.3694859743, 0.4640534222, 0.5034401417, + 0.5592106879, 0.6652468145 } }, + { { 0.9718209803, 0.7615181804, 0.2172474563, 0.4920369983, + 0.4310891628, 0.5038333535, 0.4668059051, 0.5339140594, + 0.4453758597, 0.4050061107 }, + { 0.6543679535, 0.1205173433, -0.0050483048, 0.1580035388, + 0.1308719218, 0.1700620353, 0.1740596890, 0.2179683447, + 0.1967349052, 0.1703897119 } }, + { { 0.7663022578, 0.4025157690, 1.3811545074, 1.1642981768, + 1.0709758997, 0.9812580645, 1.0092416406, 0.9089070857, + 0.7776398659, 0.8189926445 }, + { 0.3471384346, 0.0602248609, 1.3968829811, 1.0841484964, + 0.8940305710, 0.7313719392, 0.7345176339, 0.5304406881, + 0.4076275229, 0.4535677731 } }, + { { 0.1300854981, 0.1323136985, 0.7564064264, 0.7335346043, + 0.7924508452, 0.6039057672, 0.6896914840, 0.3694859743, + 0.2825861573, 0.3179096878 }, + { -0.0208423138, -0.0530856848, 0.3449102342, 0.3819376826, + 0.4466865659, 0.2807511687, 0.3842969537, 0.1144880950, + 0.0617321730, 0.0767397583 } }, + { { 0.7559476793, 0.8462553322, 0.6452585459, 1.1308751702, + 1.0606868565, 0.9498666525, 0.7425129414, 0.6221901178, + 0.6574481130, 0.6976212561 }, + { 0.3420922160, 0.4310236275, 0.2800958157, 0.9317133725, + 0.8210897744, 0.6144569516, 0.3227593005, 0.2464762032, + 0.2769501209, 0.3521846533 } }, + { { 0.7609938979, 0.6943444908, 1.1490939856, 0.4350868165, + 0.6101971567, 0.6246149242, 0.7370079756, 0.6522052884, + 0.6966382265, 0.7565374970 }, + { 0.3939306438, 0.3449102342, 0.9874839187, 0.0910919905, + 0.2804234922, 0.2888775468, 0.4060546756, 0.3284608722, + 0.3483836055, 0.4819445610 } }, + { { 0.7828826904, 1.1833034158, 1.9916158915, 0.8667678833, + 0.9218830764, 0.8856420517, 0.9373494089, 0.7415299118, + 0.7450032830, 0.7074515522 }, + { 0.4685098231, 1.1713104546, 1.9853245020, 0.6206828058, + 0.6664264500, 0.6033814847, 0.6089519858, 0.3784643114, + 0.4212588668, 0.3441893458 } }, + { { 0.4671335816, 0.4177199602, 0.0804097354, -0.1836975515, + -0.1802241802, -0.0775958896, -0.0250365734, 0.0884050429, + 0.2136430144, 0.3472039700 }, + { 0.1187478900, 0.1122598946, -0.0381436348, -0.2284581661, + -0.2302276194, -0.1738672554, -0.1350048184, -0.0547896028, + 0.0000634491, 0.0545888245 } }, + { { 0.5545576811, 0.4791920781, 0.8204999566, 0.8462553322, + 0.9212277234, 0.8946203887, 0.9659883380, 0.9137566984, + 0.9225384295, 0.9207034409 }, + { 0.1176993251, -0.0429277122, -0.0330318809, 0.0566859543, + 0.0983008742, 0.1593797803, 0.1732077301, 0.2320584357, + 0.2739354968, 0.3753186166 } }, + { { 0.7157745361, 0.6367389560, -1.2036890686, 0.7107283175, + 0.6885118484, 0.7332724631, 0.7436270416, 0.7113181353, + 0.5935511887, 0.6023984551 }, + { 0.3664058149, 0.3280676603, -1.3082178831, 0.3909815550, + 0.3641776145, 0.3926854730, 0.3898674548, 0.4086760879, + 0.3127979338, 0.3949792087 } }, + { { 1.0267395675, 1.0621941686, 1.0415505469, 0.9971176088, + 0.9764739871, 0.9904330075, 0.9591071308, 0.9338760376, + 0.9026156962, 0.9073997736 }, + { 0.9855833948, 1.0548542142, 0.9787021875, 0.8573307991, + 0.8360973597, 0.8193203211, 0.7386463583, 0.7038471103, + 0.6333966553, 0.6434235573 } }, + { { 0.6235008240, 0.7635497749, 0.8094900250, 0.7227212787, + -0.0610809922, -0.1357912421, -0.2359291911, 0.0800165236, + 0.3972729445, 0.5078965425 }, + { 0.2983146310, 0.4983939230, 0.4145742655, 0.3284608722, + -0.3203386664, -0.3495018780, -0.4734291434, -0.1808139980, + 0.1211071610, 0.2001427412 } }, + { { 0.8925887942, 0.8804647624, 0.6153089106, 0.6760601401, + 0.7887153327, 1.0065546930, 1.0829033256, 1.0347348750, + 0.9800128937, 0.9125770628 }, + { 0.5955827832, 0.6195687056, 0.2924164534, 0.3553958833, + 0.5417127609, 0.8713553548, 0.9977729619, 0.8817754686, + 0.7645328045, 0.6604627371 } }, + { { 1.1581378579, 1.0359145105, 0.7731179297, 0.6839243770, + 0.6839899123, 0.6664264500, 0.6910677254, 0.6579068601, + 0.6779606640, 0.6243527830 }, + { 1.1508634388, 0.8400294781, 0.2358594835, 0.2542749047, + 0.2484422624, 0.2620736063, 0.2676441073, 0.2713796198, + 0.3068997562, 0.3223005533 } }, + { { 0.1376220584, 1.2572927773, 0.8593623936, 0.6218624413, + 0.5128116906, 0.5393534899, 0.4436064065, 0.4334484339, + 0.4494390488, 0.4002220333 }, + { -0.1159995794, 1.2433337569, 0.4805027843, 0.2632532418, + 0.1769432425, 0.1868390739, 0.1555131972, 0.1530228555, + 0.1490252018, 0.1559064090 } }, + { { 0.1817273200, -0.0085216761, 0.0739872754, 0.1808098257, + 0.2770811915, 0.3344901204, 0.4292541742, 0.5404020548, + 0.5780193210, 0.5707449019 }, + { -0.0035409927, -0.0188107193, -0.0057691932, 0.0132360458, + 0.0560961366, 0.0534747243, 0.1002013981, 0.1737320125, + 0.1706518531, 0.1637706459 } }, + { { 0.9648087025, 1.0030813217, 0.9501943290, 0.8381944895, + 0.7545059025, 0.7621735334, 0.7121700943, 0.7328792512, + 0.7534573376, 0.7414643764 }, + { 0.1872322857, -0.0081939995, 0.0663851798, 0.0963348150, + 0.0509188473, 0.0565548837, 0.0471833348, 0.0809340179, + 0.1049199402, 0.1751082540 } }, + { { 0.6792713702, 0.9521603882, 0.5296542645, 0.3657504618, + 0.3905883431, 0.3121425807, 0.2726903260, 0.3156159520, + 0.2859284580, 0.3179096878 }, + { 0.2307477295, 0.3771536052, 0.0743804872, 0.0260154307, + 0.0477731526, 0.0391880274, 0.0228042006, 0.0572757721, + 0.0337485969, 0.0492149293 } }, + { { 0.8649328947, 0.9505875409, 1.0443030298, 1.1704584956, + 1.2709241211, 1.3232212961, 1.2477901578, 1.1513877213, + 1.0346038043, 0.9695272446 }, + { 0.4620873630, 0.5685822368, 0.8975039423, 1.0476453304, + 1.2278674245, 1.2290470600, 1.1962138712, 1.0051129162, + 0.8706344664, 0.7477557659 } }, + { { 0.4188340604, 0.6011532843, 0.4726385474, 0.6389671564, + 0.6753392518, 0.7842589319, 0.6147846282, 0.6708828509, + 0.6406055391, 0.5398777723 }, + { 0.1012499630, 0.2312064767, 0.1773364544, 0.2800302804, + 0.3348177969, 0.4343003929, 0.2822584808, 0.3293128312, + 0.3024433553, 0.2401848137 } }, + { { 0.5049474537, 0.7943513691, 0.9536021650, 0.9407572448, + 0.9823721647, 0.9747045338, 1.0145500004, 0.9629737139, + 0.9526191354, 0.9283710718 }, + { 0.0566204190, 0.0973178446, 0.5812305510, 0.5687133074, + 0.6834000945, 0.6616423726, 0.7611905038, 0.6683925092, + 0.6463071108, 0.6118355393 } }, + { { 0.8969141245, 0.9359731674, 0.8756151497, 0.8419300020, + 0.8353109360, 0.6807131469, 0.3358008265, 0.3386188447, + 0.3524467945, 0.4495045841 }, + { 0.5298508704, 0.4606455863, 0.4934132397, 0.4415748119, + 0.4015327394, 0.2052544951, -0.0329663455, -0.0154684186, + 0.0418094397, 0.1631152928 } }, + { { 0.6345762908, 2.5209445655, 1.0373562872, 0.9166402519, + 0.8865595460, 0.8907538056, 0.8522190452, 0.7290782034, + 0.7385808229, 0.6345107555 }, + { 0.2641707361, 2.5696372986, 0.8539884984, 0.6532538533, + 0.6087553799, 0.5851626694, 0.5276226699, 0.4330552220, + 0.3971418738, 0.3599833548 } }, +}; + +static const float wmavoice_lsp16_intercoeff_a[32][2][16] = { + { { 0.5337238312, 0.4810695648, -0.3766536713, -0.1204767227, + -0.0898437500, -0.0070896149, 0.1134738922, 0.1337728500, + 0.3739156723, 0.3849058151, 0.4220180511, 0.5404901505, + 0.5224876404, 0.5502910614, 0.5313453674, 0.4405946732 }, + { 0.1775283813, 0.1679325104, -0.2702789307, -0.1359367371, + -0.1452455521, -0.0888595581, -0.0256662369, -0.0023736954, + 0.1074047089, 0.1431636810, 0.1357412338, 0.2045526505, + 0.2686481476, 0.3404531479, 0.3209333420, 0.1493968964 } }, + { { 0.7402400970, 0.0838251114, 0.6486282349, 0.6145095825, + 0.7331047058, 0.7183008194, 0.7436847687, 0.7627944946, + 0.7653779984, 0.7795667648, 0.8399305344, 0.8393154144, + 0.8219690323, 0.7474164963, 0.6681070328, 0.6490793228 }, + { 0.2850513458, -0.0544128418, -0.0300130844, 0.0204677582, + 0.0328931808, 0.0589332581, 0.0796422958, 0.1187639236, + 0.1320505142, 0.1539077759, 0.2189874649, 0.2865276337, + 0.2973947525, 0.2614307404, 0.2416648865, 0.2428951263 } }, + { { 0.6129922867, 0.7300701141, 0.2073822021, 0.5005893707, + 0.5713691711, 0.5374965668, 0.6293134689, 0.5639057159, + 0.7402811050, 0.6982889175, 0.4668397903, 0.6698703766, + 0.8758535385, 0.8678569794, 0.8678569794, 0.7810840607 }, + { 0.2986249924, 0.3269615173, 0.0096416473, 0.1800708771, + 0.2474060059, 0.2203407288, 0.3007984161, 0.2674179077, + 0.4424810410, 0.4046306610, 0.2063980103, 0.4230022430, + 0.6222190857, 0.6574449539, 0.6776618958, 0.6604385376 } }, + { { 0.7258052826, 0.5073966980, -0.3947381973, 0.5254812241, + 1.0561246872, 0.9706230164, 0.9727144241, 0.9185838699, + 0.8184833527, 0.9093980789, 0.8645353317, 0.7870302200, + 0.6347675323, 0.5123996735, 0.2846002579, 0.3252801895 }, + { 0.4306297302, 0.2182903290, -0.4902458191, 0.1783485413, + 0.7783365250, 0.7152252197, 0.7404451370, 0.6012639999, + 0.5421304703, 0.6619558334, 0.6316919327, 0.5596818924, + 0.3952398300, 0.3567333221, 0.1505041122, 0.1290159225 } }, + { { 0.3077287674, 0.2543363571, 0.2834520340, 0.5282287598, + 0.5350360870, 0.4943971634, 0.4521999359, 0.3086309433, + 0.2372770309, 0.0819387436, -0.1385612488, -0.0848407745, + -0.0380916595, 0.1192150116, 0.3228197098, 0.3012905121 }, + { 0.0567188263, 0.0196886063, 0.0682420731, 0.2102527618, + 0.2452325821, 0.2060699463, 0.1620273590, 0.0784120560, + 0.0418329239, -0.0508041382, -0.2193880081, -0.1644783020, + -0.1361827850, -0.0307512283, 0.1486587524, 0.2356367111 } }, + { { 0.4387903214, 0.5723943710, 0.6147556305, 0.9973602295, + 1.1645498276, 1.1898927689, 1.0326681137, 0.6939010620, + 0.6064310074, 0.4686441422, 0.4646663666, 0.4895582199, + 0.5654230118, 0.6004848480, 0.6179132462, 0.6439123154 }, + { 0.1324195862, 0.2426080704, 0.3132238388, 0.7359752655, + 0.9749288559, 0.9535636902, 0.8105278015, 0.4118890762, + 0.3013315201, 0.2006158829, 0.2331352234, 0.2535161972, + 0.3375005722, 0.4103307724, 0.4102897644, 0.4529380798 } }, + { { 0.7335557938, 0.9203472137, 0.4852113724, 0.8646993637, + 0.7304391861, 0.7503690720, 0.6289854050, 0.6900463104, + 0.6421079636, 0.5184278488, 0.4444904327, 0.2660236359, + 0.2143125534, 0.2406396866, 0.4836940765, 0.5597229004 }, + { 0.3689947128, 0.4967346191, 0.1176567078, 0.5127687454, + 0.3235168457, 0.3426265717, 0.2417469025, 0.3310623169, + 0.2629890442, 0.2130823135, 0.1329116821, 0.0468769073, + -0.0081968307, 0.0146446228, 0.2440433502, 0.3408632278 } }, + { { 0.9425325394, 0.9597969055, 0.6160678864, 0.7050962448, + 0.8063859940, 0.9063224792, 0.9890356064, 1.0038805008, + 1.0338163376, 0.9453620911, 0.9634056091, 0.8068370819, + 0.6859455109, 0.8909034729, 0.9990415573, 1.0122871399 }, + { 0.6895952225, 0.6451835632, 0.3169965744, 0.4268569946, + 0.5666122437, 0.7722673416, 0.8845882416, 0.9061584473, + 0.9550399780, 0.8118810654, 0.8601064682, 0.6129922867, + 0.5069866180, 0.7065315247, 0.7862920761, 0.7766551971 } }, + { { 0.5641517639, -0.0941905975, 0.0412998199, 0.1810550690, + 0.3459482193, 0.4213209152, 0.4401025772, 0.5397109985, + 0.5607891083, 0.6348905563, 0.6861915588, 0.7280607224, + 0.7267074585, 0.6447324753, 0.5948257446, 0.5475025177 }, + { 0.1906919479, -0.0519113541, -0.0608100891, -0.0018815994, + 0.0383062363, 0.0362558365, 0.0529870987, 0.0692672729, + 0.0953073502, 0.1327886581, 0.1390628815, 0.1904459000, + 0.2362518311, 0.2063980103, 0.2311668396, 0.2291574478 } }, + { { 0.9901428223, 0.9589767456, 0.9012374878, 0.8017930984, + 0.8929538727, 0.8512077332, 0.8790111542, 0.8832759857, + 0.8949632645, 0.9159183502, 0.9293279648, 0.9152622223, + 0.9247350693, 0.8753614426, 0.8730239868, 0.8066730499 }, + { 0.4230432510, -0.0464572906, 0.0182533264, 0.1159753799, + 0.2349395752, 0.2740612030, 0.2987070084, 0.3620643616, + 0.3923282623, 0.4694643021, 0.5202322006, 0.5356512070, + 0.5564012527, 0.5362663269, 0.4791831970, 0.5046901703 } }, + { { 0.9785375595, 0.8820457458, 0.3965110779, 0.4790191650, + 0.3907699585, 0.4195575714, 0.2938270569, 0.4091415405, + 0.3659191132, 0.4030723572, 0.4168510437, 0.5030908585, + 0.5023117065, 0.5511522293, 0.5354051590, 0.5563192368 }, + { 0.6592903137, 0.2933759689, 0.0562677383, 0.1286878586, + 0.0758285522, 0.1192560196, 0.0508956909, 0.1175336838, + 0.0684061050, 0.0988750458, 0.0923957825, 0.1819572449, + 0.1965150833, 0.2257537842, 0.3049812317, 0.2993221283 } }, + { { 0.7120265961, 0.7847747803, 0.6065950394, 0.7235908508, + 0.6740531921, 0.6535081863, 0.3734235764, 0.4788551331, + 0.4410867691, 0.6927528381, 1.0758495331, 1.1148891449, + 1.0708875656, 0.8896322250, 0.6401805878, 0.5057153702 }, + { 0.4210338593, 0.4763126373, 0.3229017258, 0.4079113007, + 0.3922462463, 0.3529195786, 0.1258993149, 0.2168960571, + 0.2207508087, 0.4605655670, 0.8759355545, 0.9526205063, + 0.8843832016, 0.7001342773, 0.4503545761, 0.3484086990 } }, + { { 0.5254402161, 0.5349540710, 0.7036199570, 0.6240234375, + 0.6464548111, 0.7537727356, 0.8311548233, 0.7334327698, + 0.3484907150, 0.1846637726, 0.0894021988, 0.3977823257, + 0.7672233582, 0.9224796295, 0.8818407059, 0.7453250885 }, + { 0.2587652206, 0.2524499893, 0.4135704041, 0.3129367828, + 0.3403711319, 0.4473199844, 0.5330266953, 0.4227561951, + 0.1080198288, -0.0044651031, -0.0727024078, 0.1583776474, + 0.5302381516, 0.7313823700, 0.6735610962, 0.5630855560 } }, + { { 0.7936325073, 0.8551034927, 0.9755849838, 0.8953323364, + 0.9345769882, 0.7202281952, 0.8388233185, 0.7941656113, + 0.7550849915, 0.7894906998, 0.8590402603, 0.7813711166, + 0.8483371735, 0.8652324677, 0.8586711884, 0.9584846497 }, + { 0.4781579971, 0.4731960297, 0.8289403915, 0.6175031662, + 0.7262973785, 0.3638277054, 0.5544328690, 0.4761896133, + 0.4388723373, 0.5021476746, 0.5630445480, 0.4562187195, + 0.5190429688, 0.5937595367, 0.6121721268, 0.6973457336 } }, + { { 1.0724458694, 1.0449705124, 0.8594503403, 0.7604160309, + 0.7837905884, 0.8136444092, 0.7623023987, 0.6098756790, + 0.6432561874, 0.6395244598, 0.6853713989, 0.7401580811, + 0.7399530411, 0.7652549744, 0.7675104141, 0.7393789291 }, + { 0.9382266998, 0.8419809341, 0.3087539673, 0.3620233536, + 0.3547649384, 0.4241094589, 0.2857894897, 0.2123851776, + 0.2355957031, 0.2794332504, 0.3219995499, 0.3898267746, + 0.3937635422, 0.4058198929, 0.4228382111, 0.4181222916 } }, + { { 1.0275421143, 1.0940570831, 1.0164289474, 0.9097671509, + 0.9400720596, 0.8976287842, 0.9175586700, 0.8900833130, + 0.9154262543, 0.9492578506, 1.0011329651, 1.0361537933, + 1.0359487534, 0.9320344925, 0.8974237442, 0.8811845779 }, + { 1.0046186447, 1.0860195160, 0.9442958832, 0.7473344803, + 0.7876043320, 0.7410602570, 0.7422084808, 0.6844692230, + 0.7256412506, 0.8455486298, 0.8969316483, 0.9362173080, + 0.9092340469, 0.8227071762, 0.7481546402, 0.7088689804 } }, + { { 0.2205047607, -0.0129537582, 0.0972347260, 0.1154832840, + 0.0951843262, 0.1532516479, 0.1288108826, 0.1749858856, + 0.1591157913, 0.2134923935, 0.2477340698, 0.2634811401, + 0.3032999039, 0.3272485733, 0.3170785904, 0.3172016144 }, + { 0.0032854080, -0.0446119308, 0.0284643173, 0.0155467987, + -0.0063104630, 0.0226001740, 0.0086984634, 0.0262088776, + 0.0173921585, 0.0360507965, 0.0366659164, 0.0215339661, + 0.0412178040, 0.1047391891, 0.1258172989, 0.0609836578 } }, + { { 0.1495609283, 0.3275766373, 0.8598194122, 0.6847562790, + 0.7550849915, 0.5662431717, 0.6930398941, 0.7526245117, + 0.7300291061, 0.7284708023, 0.6608896255, 0.5224056244, + 0.4273900986, 0.5757160187, 0.4625749588, 0.5123586655 }, + { -0.0352210999, -0.0428895950, 0.3110914230, 0.2699604034, + 0.3307752609, 0.2059469223, 0.2332172394, 0.3204412460, + 0.2846412659, 0.3354911804, 0.2448635101, 0.1514062881, + 0.1062564850, 0.2613077164, 0.2123441696, 0.3000602722 } }, + { { 0.6218910217, 0.6033554077, 0.4551525116, 0.3161764145, + 0.2864866257, 0.6195125580, 0.7577505112, 1.0062179565, + 0.8485012054, 0.6777849197, 0.7455301285, 0.3630485535, + 0.2327661514, 0.5563192368, 0.4448595047, 0.3806819916 }, + { 0.2624969482, 0.2679510117, 0.1839666367, 0.0335903168, + 0.0294075012, 0.2902593613, 0.4959144592, 0.7905979156, + 0.5748548508, 0.3753919601, 0.4855394363, 0.1089630127, + 0.0362968445, 0.3632535934, 0.2681150436, 0.2735691071 } }, + { { 0.7064495087, 0.4431781769, 0.7628355026, 0.7271585464, + 0.7812070847, 0.7806739807, 0.8909854889, 0.8958654404, + 0.9126787186, 0.9038209915, 0.9246120453, 0.9624624252, + 0.9732475281, 0.7420034409, 0.5060844421, 0.5189199448 }, + { 0.3457021713, -0.0149221420, 0.3174476624, 0.3580865860, + 0.4243965149, 0.4275541306, 0.5887155533, 0.6478490829, + 0.6320610046, 0.6627349854, 0.6868886948, 0.7396659851, + 0.7551259995, 0.5275316238, 0.3075237274, 0.3806819916 } }, + { { 0.4376831055, 0.4904603958, 0.6262788773, 0.5901098251, + 0.4176712036, 0.0221490860, -0.1612796783, -0.2236118317, + -0.1087894440, -0.0022506714, 0.1051902771, 0.3307752609, + 0.4167690277, 0.4997692108, 0.4645843506, 0.5228567123 }, + { 0.1228237152, 0.1671123505, 0.2931299210, 0.2549924850, + 0.1435737610, -0.1124801636, -0.2181987762, -0.2723293304, + -0.1573429108, -0.0837745667, -0.0325555801, 0.1024427414, + 0.1938495636, 0.2825498581, 0.2247285843, 0.2879629135 } }, + { { 0.6100807190, 0.7900238037, 0.9581155777, 0.8999662399, + 0.9277286530, 0.9720993042, 0.9966220856, 0.9630365372, + 0.9571723938, 0.8992280960, 0.8370189667, 0.7417984009, + 0.7174396515, 0.6122951508, 0.6746683121, 0.7030458450 }, + { 0.0859165192, 0.0914115906, 0.6077432632, 0.5471334457, + 0.5943746567, 0.6805324554, 0.6680250168, 0.6033554077, + 0.6302976608, 0.4874258041, 0.3647298813, 0.2770137787, + 0.2544183731, 0.2608156204, 0.3331537247, 0.4950942993 } }, + { { 0.4051227570, 1.1022176743, 0.8262338638, 0.6573219299, + 0.5948667526, 0.5426225662, 0.4987850189, 0.4370269775, + 0.4421119690, 0.3837165833, 0.3728494644, 0.3706760406, + 0.4169740677, 0.3559951782, 0.2994041443, 0.3896217346 }, + { 0.0716867447, 0.9253911972, 0.2780799866, 0.2460117340, + 0.1675224304, 0.1527595520, 0.1278266907, 0.1226596832, + 0.1165084839, 0.0982189178, 0.0952253342, 0.1113414764, + 0.1498889923, 0.0940361023, 0.0802984238, 0.1560811996 } }, + { { 0.7024717331, 0.7363853455, 0.9629545212, 0.9635286331, + 1.0819597244, 1.1529855728, 1.2984409332, 1.2693252563, + 1.2848672867, 1.2877378464, 1.2133083344, 1.0696573257, + 1.0864706039, 0.9851808548, 0.8312368393, 0.8047866821 }, + { 0.3001422882, 0.2273120880, 0.6279602051, 0.6936140060, + 0.8097076416, 0.9440498352, 1.1028738022, 1.1766471863, + 1.1199741364, 1.1608181000, 1.0665817261, 0.8872537613, + 0.9082908630, 0.7602519989, 0.6542053223, 0.7317514420 } }, + { { 0.0643463135, -0.6808919907, 0.2889881134, 0.6142225266, + 0.6356697083, 0.6825828552, 0.6259508133, 0.4945611954, + 0.5866651535, 0.6357517242, 0.5208883286, 0.4207878113, + 0.5125637054, 0.3758020401, 0.5424175262, 0.6172571182 }, + { -0.0636806488, -0.7585611343, 0.0850553513, 0.2996912003, + 0.3620643616, 0.4444084167, 0.4597454071, 0.3120756149, + 0.4016780853, 0.5026807785, 0.4111919403, 0.3183498383, + 0.3666572571, 0.1829824448, 0.3269205093, 0.4095926285 } }, + { { 0.9277286530, 0.9651279449, 0.9602069855, 0.9327726364, + 0.9208393097, 0.8868436813, 0.9011554718, 0.8569488525, + 0.9015245438, 0.8969726562, 0.9367094040, 0.9445009232, + 0.8617057800, 0.8215589523, 0.8333692551, 0.7939195633 }, + { 0.1719102859, 0.1142530441, 0.1245460510, 0.1646108627, + 0.1408672333, 0.0949792862, 0.0271930695, 0.0265779495, + -0.0064334869, -0.0109033585, 0.0152187347, 0.0252656937, + 0.0166950226, 0.0736141205, 0.1205682755, 0.1895437241 } }, + { { 0.5964250565, 0.6065130234, 0.7228116989, 0.7348270416, + 0.0718097687, 0.2369899750, 0.2456426620, 0.4961194992, + 0.6410417557, 0.6765956879, 0.6771287918, 0.7285938263, + 0.6706905365, 0.5105543137, 0.5068635941, 0.5430326462 }, + { 0.2782440186, 0.2620048523, 0.4424400330, 0.4124631882, + -0.1158838272, 0.0186223984, 0.0059919357, 0.1853609085, + 0.3568563461, 0.3791646957, 0.4100847244, 0.4654865265, + 0.4614677429, 0.3209743500, 0.3199081421, 0.3836755753 } }, + { { 0.8051557541, 0.8506336212, 0.9544658661, 0.5584516525, + 0.5874032974, 0.5727224350, 0.6177902222, 0.7659521103, + 0.9526205063, 1.0424280167, 1.0705595016, 1.0042905807, + 0.6005258560, 0.3886785507, 0.4739751816, 0.6542463303 }, + { 0.4775428772, 0.5541868210, 0.7128057480, 0.2146816254, + 0.2502765656, 0.2488822937, 0.3009214401, 0.4667987823, + 0.6929988861, 0.8599834442, 0.8784780502, 0.7463912964, + 0.3217535019, 0.1274986267, 0.2767267227, 0.5119485855 } }, + { { 0.5978193283, 0.5092830658, 1.0738401413, 0.7688636780, + 0.8214769363, 0.7682075500, 0.4970626831, 0.2783260345, + 0.2652854919, 0.3625154495, 0.5700569153, 0.5044031143, + 0.4003248215, 0.5162544250, 0.5727634430, 0.5538587570 }, + { 0.2752094269, 0.1747808456, 0.8557186127, 0.4280872345, + 0.5143680573, 0.4139804840, 0.1810960770, 0.0109539032, + 0.0317039490, 0.0842351913, 0.3129367828, 0.2614717484, + 0.1564092636, 0.2352676392, 0.3249931335, 0.3505821228 } }, + { { 0.7093610764, 0.7587757111, 1.8517618179, 1.0092525482, + 0.8078622818, 0.8792982101, 0.8210668564, 0.8600654602, + 0.6913585663, 0.6436662674, 0.6216859818, 0.6123771667, + 0.5940465927, 0.5910940170, 0.6505966187, 0.5801038742 }, + { 0.3370904922, 0.4681930542, 1.9236078262, 0.8053607941, + 0.5321245193, 0.6342344284, 0.5054693222, 0.5788326263, + 0.4400615692, 0.4086904526, 0.3924102783, 0.4220180511, + 0.3835115433, 0.4230432510, 0.5190839767, 0.3990535736 } }, + { { 0.6277141571, 1.1122236252, 1.0259838104, 0.9486427307, + 0.9184608459, 0.9059944153, 0.9080038071, 0.8282022476, + 0.8440313339, 0.7887935638, 0.7468013763, 0.6746683121, + 0.6319379807, 0.6246795654, 0.7263793945, 0.7349090576 }, + { 0.2427721024, 1.0851583481, 0.6180362701, 0.5837125778, + 0.4324750900, 0.4684801102, 0.3745307922, 0.3027257919, + 0.3646888733, 0.2409267426, 0.2158298492, 0.2052907944, + 0.2100887299, 0.2276401520, 0.3409452438, 0.4045896530 } }, + { { 0.8391513824, 0.8713426590, 1.1366233826, 1.1440868378, + 1.1443738937, 1.0877418518, 1.0516138077, 1.0099496841, + 0.9216184616, 0.8990640640, 0.9001302719, 0.8993101120, + 0.8055248260, 0.8150796890, 0.7272815704, 0.7196130753 }, + { 0.4634771347, 0.5807189941, 1.1287908554, 1.1066875458, + 1.0765056610, 0.9287538528, 0.8956193924, 0.8026132584, + 0.6725769043, 0.5856809616, 0.5527515411, 0.5183868408, + 0.4529380798, 0.5074377060, 0.4632720947, 0.5554990768 } }, +}; + +static const float wmavoice_lsp16_intercoeff_b[32][2][16] = { + { { 0.5431776047, -0.1212130189, -0.2471650839, 0.0683670044, + 0.1418520808, 0.2518971562, 0.3708084226, 0.4141484499, + 0.5712364912, 0.5852659345, 0.5670641661, 0.6401320100, + 0.6447737217, 0.6726239920, 0.4994724989, 0.5574678183 }, + { 0.2040718794, -0.1271064281, -0.2266163826, -0.0406349897, + -0.0145058036, 0.0283126831, 0.0851084590, 0.0913147926, + 0.1307432652, 0.1926501393, 0.2310355306, 0.2828245163, + 0.3171940446, 0.4424681067, 0.2960716486, 0.3510941863 } }, + { { 0.8073900938, 0.0403081179, 0.5392660499, 0.6928597689, + 0.6499369740, 0.7328097820, 0.7755761147, 0.7766191959, + 0.8820225596, 0.8423333168, 0.8898978233, 0.8488525748, + 0.8654375672, 0.6728326082, 0.6169234514, 0.6755967736 }, + { 0.3653843999, -0.0846008658, -0.0224332213, 0.1120721102, + 0.1020585299, 0.1741876006, 0.2129902244, 0.2160151601, + 0.3619422317, 0.4185815454, 0.5455245376, 0.5363975763, + 0.5429168344, 0.3505726457, 0.3296067119, 0.3620986938 } }, + { { 0.1843576431, 0.0179861784, 0.3122915626, 0.3600125313, + 0.2466817498, 0.2172668576, 0.1975526214, 0.1177569032, + 0.1196866035, 0.0849519968, 0.0962694287, 0.1591672301, + 0.2300446033, 0.3082756996, 0.4047607183, 0.3925045133 }, + { -0.0275964737, -0.0794897676, 0.1168181300, 0.1591150761, + 0.0915755630, 0.0460972190, 0.0562151074, 0.0084419847, + -0.0095511675, -0.0408957601, -0.0376100540, -0.0166962743, + 0.0656028390, 0.1226072311, 0.2293144464, 0.2142419219 } }, + { { 0.4781936407, -1.2478972673, 0.4884679914, 0.7755239606, + 0.6785174012, 0.6590117812, 0.6177057624, 0.6427918673, + 0.5402048230, 0.5512614846, 0.6424267888, 0.4229103327, + 0.5106334686, 0.5136062503, 0.4490395188, 0.4753251672 }, + { 0.2852236032, -1.3815159798, 0.1904075146, 0.4874770641, + 0.4593138695, 0.4182686210, 0.4174863100, 0.4604612589, + 0.4089330435, 0.3891666532, 0.4700576067, 0.2383370996, + 0.2801646590, 0.3398289084, 0.2766703367, 0.3374298215 } }, + { { 0.5925153494, 0.3858809471, 1.0754098296, 0.5752002001, + 0.5516265631, 0.4853909016, 0.4719351530, 0.5018194318, + 0.3037382960, 0.5154316425, 0.8809794784, 0.7755761147, + 0.5941321254, 0.3974069953, 0.5925675035, 0.6097261906 }, + { 0.3008176684, 0.0706617832, 0.8484353423, 0.2574254870, + 0.2815728188, 0.1930673718, 0.2523665428, 0.2691601515, + 0.1271967888, 0.2653007507, 0.6473292708, 0.5275835395, + 0.3928174376, 0.2405275702, 0.4008491635, 0.4556109309 } }, + { { 0.7339050174, 0.4290645123, 0.6859754324, 0.6349166036, + 0.8034263849, 0.8509387374, 0.8591269255, 1.1049811840, + 1.3928194642, 1.3423343301, 1.0849018693, 0.8943830729, + 0.8579795361, 0.6920774579, 0.5613272190, 0.4303162098 }, + { 0.4534726143, 0.0901674032, 0.3465046287, 0.3470261693, + 0.5217422843, 0.5874564052, 0.6014336944, 0.9161834717, + 1.2823571563, 1.2193550467, 0.8868207335, 0.6514494419, + 0.6249030232, 0.4453887343, 0.3665317893, 0.2242033482 } }, + { { 0.4293252826, 0.3303368688, 0.6181751490, 0.9884168506, + 0.9915460944, 0.7939864993, 0.3019129038, 0.2443348169, + 0.4543070793, 0.5617444515, 0.4895110726, 0.6600027084, + 0.6290231943, 0.5580936670, 0.5459417701, 0.4647378922 }, + { 0.1409133077, -0.0050137639, 0.2551307082, 0.6764833927, + 0.7112701535, 0.4648943543, 0.0301380754, -0.0235806108, + 0.1018499136, 0.2422486544, 0.2406318784, 0.4000146985, + 0.3713299632, 0.3259559274, 0.3820737004, 0.2888743877 } }, + { { 0.7733334899, 0.8321111202, 1.3098945022, 1.0331128836, + 1.0380675197, 0.9479974508, 0.9740223289, 0.9442945123, + 0.8926619887, 0.8719046712, 0.8640815616, 0.8404036164, + 0.8359183669, 0.7675965428, 0.6895219088, 0.7266034484 }, + { 0.3655408621, 0.4643206596, 1.2171645761, 0.8341451287, + 0.8387868404, 0.6713201404, 0.6814901829, 0.6294404268, + 0.5172048807, 0.5205948949, 0.5408828259, 0.5298783183, + 0.5781729817, 0.5000983477, 0.4727174640, 0.4326109886 } }, + { { 0.8902629018, 0.4598354101, 0.6392975450, 0.4483093619, + 0.6220867038, 0.6323089004, 0.7063676715, 0.3717993498, + 0.6718416810, 0.7876758575, 0.2807383537, 0.3118221760, + 0.6703813672, 0.7662405372, 0.7122610807, 0.7851724625 }, + { 0.6301705837, 0.1221378446, 0.3532846570, 0.1412783861, + 0.3471826315, 0.3435318470, 0.4466925859, 0.1390357614, + 0.4092981219, 0.5406742096, 0.0690450072, 0.0829179883, + 0.4625995755, 0.5700891018, 0.5542864203, 0.6545265317 } }, + { { -0.1100520492, 0.3803526163, 0.8075987101, 0.6903563738, + 0.8012359142, 0.7835035324, 0.8195941448, 0.8381088376, + 0.8033220768, 0.7511680126, 0.6393496990, 0.6096218824, + 0.6934856176, 0.6690253615, 0.6401841640, 0.5600233674 }, + { -0.1776958704, -0.0293175578, 0.1520742774, 0.1746048331, + 0.2222214937, 0.3052507639, 0.2977927327, 0.3797789216, + 0.3395681381, 0.2976884246, 0.2516885400, 0.2403711081, + 0.3567789793, 0.3302847147, 0.3368039727, 0.3310148716 } }, + { { 0.5587195158, 0.4676063657, 0.1392965317, -0.0990996957, + -0.0816280842, -0.1146416068, -0.0116894841, 0.0521992445, + 0.1626615524, 0.2923687100, 0.4029874802, 0.4528989196, + 0.4694839120, 0.5058352947, 0.5369191170, 0.5105291605 }, + { 0.2193530202, 0.1211469173, 0.0179861784, -0.2022604346, + -0.1409794092, -0.2121175528, -0.1152674556, -0.0594626069, + -0.0122110248, 0.0274260640, 0.1414870024, 0.2044369578, + 0.2167974710, 0.2615978122, 0.3348221183, 0.3707562685 } }, + { { 0.5948622823, 0.7065241337, 0.9414781928, 0.9340723157, + 0.8835350275, 0.9730835557, 0.8503650427, 0.8902629018, + 0.8746688366, 0.6910865307, 0.6404449344, 0.6976057887, + 0.5916287303, 0.6022160053, 0.7729684114, 0.6096740365 }, + { 0.1262058616, 0.1300652623, 0.6594290137, 0.6535877585, + 0.5639349222, 0.6982316375, 0.4828875065, 0.5577285886, + 0.4591052532, 0.2964367270, 0.2695252299, 0.3324751854, + 0.2860580683, 0.2902825475, 0.4623388052, 0.3369604349 } }, + { { 0.8821268678, 0.8539636731, 0.2898653150, 0.7478301525, + 0.5109463930, 0.8577187657, 0.4884679914, 0.7846509218, + 0.7684310079, 0.7032384276, 0.6691296697, 0.8593355417, + 0.9383489490, 0.9808023572, 0.6804992557, 0.6403927803 }, + { 0.5590324402, 0.4209806323, 0.0259135962, 0.4318808317, + 0.2104346752, 0.5453680754, 0.1783599257, 0.4467447400, + 0.4352708459, 0.4089330435, 0.3994410038, 0.5984609127, + 0.6872792840, 0.7321317792, 0.4408513308, 0.4542027712 } }, + { { 0.6371070743, 0.6311093569, 0.7152860165, 0.6929640770, + 0.2292101383, 0.3234525323, 0.9644259810, 0.9881039262, + 0.8722697496, 0.4370440841, 0.4051779509, 0.4944135547, + 0.5392660499, 0.5969484448, 0.4268740416, 0.4990552664 }, + { 0.4233797193, 0.3647063971, 0.4345406890, 0.4180078506, + -0.0006328225, 0.0586141944, 0.7620160580, 0.8152132034, + 0.6707985997, 0.2095480561, 0.2178405523, 0.2776612639, + 0.3142212629, 0.3808741570, 0.2676998377, 0.2804775834 } }, + { { 0.4509170651, 0.9490405321, 0.8557890654, 0.8271043301, + 0.6915559173, 0.7321839333, 0.6257896423, 0.6274064183, + 0.5238284469, 0.5194996595, 0.4116972089, 0.3382642865, + 0.3755022883, 0.4867990613, 0.5686287880, 0.5106856227 }, + { 0.0989292860, 0.6244857907, 0.4700576067, 0.3905226588, + 0.2630059719, 0.3009741306, 0.2150763869, 0.2067838907, + 0.1533781290, 0.1815934777, 0.1023714542, 0.0373874903, + 0.0897501707, 0.1849313378, 0.2852757573, 0.2625887394 } }, + { { 0.9954054952, 0.9554033279, 0.8237664700, 0.9780903459, + 0.7261862159, 0.7884581685, 0.7933084965, 0.7393290401, + 0.8783196211, 1.0409359932, 1.0217954516, 0.9159227014, + 0.8698185086, 0.7057939768, 0.7662926912, 0.7339571714 }, + { 0.7913266420, 0.6739278436, 0.5061482191, 0.7058982849, + 0.3480692506, 0.4338105321, 0.4428853393, 0.3758152127, + 0.5962182879, 0.7925261855, 0.7968549728, 0.6629754901, + 0.6325175166, 0.4598354101, 0.5310778618, 0.5518873334 } }, + { { 0.4638512731, 0.0604917407, 0.1897295117, 0.3403504491, + 0.4708399177, 0.5241413713, 0.6061275601, 0.6446694136, + 0.7313494682, 0.7208143473, 0.6268848777, 0.6081094146, + 0.4913364649, 0.3529717326, 0.4954566360, 0.5767126679 }, + { 0.1353849769, -0.0274400115, 0.0002537966, 0.0272174478, + 0.0555371046, 0.0652899146, 0.1010676026, 0.1073260903, + 0.1568724513, 0.2207611799, 0.1434167027, 0.2262373567, + 0.1177047491, 0.0162650943, 0.2529402375, 0.4087765813 } }, + { { 0.9700064659, 0.9917025566, 0.9159227014, 0.9309430718, + 0.8991290927, 0.9314124584, 0.9059612751, 0.9473194480, + 0.9604622722, 0.9377752542, 0.9197821021, 0.8869771957, + 0.8506779671, 0.8594920039, 0.8320589662, 0.8739908338 }, + { 0.2892394662, 0.0551198721, 0.0892807841, 0.1158793569, + 0.0905846357, 0.0738953352, 0.0395258069, 0.0240360498, + 0.0477139950, 0.0751470327, 0.1171310544, 0.1555164456, + 0.1384620667, 0.1818542480, 0.2104868293, 0.1288135648 } }, + { { 0.4101847410, 0.3326316476, 0.4666675925, 0.5077128410, + 0.5892296433, 0.4272912741, 0.0603352785, -0.8668596745, + -1.1103670001, -0.0900248885, 0.1626615524, 0.1487885714, + 0.4130010605, 0.5119373202, 0.5820323825, 0.5486016273 }, + { 0.0383262634, 0.1300652623, 0.2295230627, 0.2706204653, + 0.3722165823, 0.1698066592, -0.0934670568, -0.8677462935, + -1.0724509954, -0.2164463401, -0.0056917667, -0.0301520228, + 0.1299088001, 0.2579991817, 0.3482257128, 0.2469425201 } }, + { { 0.6031547785, 0.5515222549, 0.4292209744, 0.5027582049, + 0.8167778254, 1.0925685167, 0.9878953099, 0.7019345760, + 0.2509583831, 0.2475162148, 0.5660732388, 0.5145971775, + 0.4824181199, 0.5970005989, 0.5996604562, 0.5384315848 }, + { 0.3677313328, 0.2650399804, 0.1585935354, 0.2213348746, + 0.5566333532, 0.8425940871, 0.7604514360, 0.4523773789, + 0.0681062341, 0.0737388730, 0.3169854283, 0.2868403792, + 0.2661873698, 0.3635068536, 0.4300554395, 0.3743027449 } }, + { { 0.5017672777, 0.6634970307, 0.6869142056, 0.7066284418, + 0.5669598579, 0.0621085167, 0.0634645224, 0.2321307659, + 0.8322675824, 0.9855483770, 0.8296598792, 0.6140028238, + 0.5462546945, 0.6730412245, 0.6856103539, 0.5975221395 }, + { 0.2680649161, 0.3324230313, 0.3688787222, 0.3886451125, + 0.2774004936, -0.1695076823, -0.1353467703, 0.0159000158, + 0.5895425677, 0.7586781979, 0.5639870763, 0.3687744141, + 0.3401418328, 0.4477356672, 0.4782979488, 0.4034568667 } }, + { { 0.8838479519, 0.9025712609, 0.7326533198, 0.8124490380, + 0.8956347704, 1.1007045507, 1.2731780410, 1.2029786706, + 1.0839109421, 0.9664078355, 0.7356782556, 0.6942157745, + 0.6917645335, 0.6383587718, 0.6503020525, 0.5989302993 }, + { 0.5576764345, 0.4596789479, 0.3790487647, 0.5514179468, + 0.7333834767, 0.9612445831, 1.1976589561, 1.1094664335, + 0.8868207335, 0.6789346337, 0.4643206596, 0.4029353261, + 0.4384522438, 0.3871847987, 0.4326109886, 0.3691916466 } }, + { { 0.8520861268, 0.8413423896, 0.7238392830, 0.9103943706, + 0.7072542906, 0.6479029655, 0.4557673931, 0.1908247471, + -0.0569070578, -0.1013423204, 0.2517406940, 0.4854952097, + 0.5820845366, 0.5886037946, 0.6177579165, 0.6226603985 }, + { 0.6160889864, 0.4592095613, 0.4752208591, 0.6685559750, + 0.4326109886, 0.4077335000, 0.2314006090, 0.0173603296, + -0.2208272815, -0.3014574647, 0.0321199298, 0.2559130192, + 0.3603254557, 0.3466089368, 0.4072119594, 0.4776199460 } }, + { { 0.7083495259, 0.9001721740, 0.6795083284, 1.2743254304, + 1.3672639728, 1.2563322783, 0.8557369113, 0.8287732601, + 0.7942472696, 0.8006622195, 0.7034991980, 0.5479236245, + 0.6391932368, 0.6248508692, 0.5495925546, 0.4719351530 }, + { 0.4000146985, 0.6493632793, 0.4583229423, 1.1484255195, + 1.2521599531, 1.1232351065, 0.6150459051, 0.5347808003, + 0.4726653099, 0.5269576907, 0.4278128147, 0.2745841742, + 0.3868718743, 0.4183729291, 0.3474434018, 0.3150035739 } }, + { { 0.9070043564, 0.7648323774, 0.4281778932, 0.5475063920, + 0.4134704471, 0.4706834555, 0.4549329281, 0.4648422003, + 0.4572798610, 0.4823138118, 0.4666154385, 0.4841913581, + 0.4018922448, 0.4297946692, 0.4646857381, 0.6091003418 }, + { 0.4925360084, 0.2065231204, 0.0948612690, 0.1716842055, + 0.0992422104, 0.1332988143, 0.1255800128, 0.1257364750, + 0.0955392718, 0.1118634939, 0.1372103691, 0.1525958180, + 0.0902717113, 0.1591672301, 0.2335910797, 0.3767018318 } }, + { { 0.3185500503, 0.8677845001, 0.7776622772, 0.8160476685, + 0.8624126315, 0.8057211637, 0.8852561116, 0.8471314907, + 0.9145145416, 0.8945916891, 0.8638729453, 0.8531292081, + 0.7425104380, 0.6215651631, 0.6501455903, 0.6341864467 }, + { -0.0499705672, 0.0687842369, 0.3051464558, 0.3368039727, + 0.4942049384, 0.3823344707, 0.5683158636, 0.5044271350, + 0.6278236508, 0.5777035952, 0.5745221972, 0.5502184033, + 0.4244228005, 0.3163595796, 0.3525545001, 0.3582914472 } }, + { { 0.3200625181, 0.9415303469, 0.6067534089, 0.3568832874, + 0.1600538492, 0.2938811779, 0.2037589550, 0.3017564416, + 0.2572168708, 0.4796018004, 0.6938506961, 0.6847758889, + 0.7232134342, 0.6111343503, 0.5159531832, 0.4856516719 }, + { 0.0680540800, 0.6285016537, 0.2514277697, 0.0790064335, + -0.0687981844, 0.0521992445, -0.0055874586, 0.0537117124, + 0.0188206434, 0.1883213520, 0.4493002892, 0.4300554395, + 0.4750122428, 0.3658016324, 0.3119786382, 0.2818335891 } }, + { { 0.6864969730, 1.0815640092, 0.9838794470, 0.8845259547, + 0.9438772798, 0.8888025880, 0.8178730607, 0.8581881523, + 0.7128347754, 0.7120524645, 0.7345308661, 0.7945601940, + 0.7854853868, 0.8261655569, 0.6941114664, 0.6646444201 }, + { 0.2847542167, 0.9535257816, 0.6691818237, 0.5026538968, + 0.5945493579, 0.4125838280, 0.3886451125, 0.3740941286, + 0.2453778982, 0.2928902507, 0.3219922185, 0.4065861106, + 0.3838469386, 0.4289602041, 0.3910441995, 0.3821780086 } }, + { { 1.1335094571, 1.0390062928, 0.7019867301, 0.6203134656, + 0.6951545477, 0.4863818288, 0.6171320677, 0.6247465611, + 0.5907421112, 0.6711115241, 0.7322882414, 0.7042293549, + 0.5635698438, 0.6174449921, 0.6727283001, 0.6431047916 }, + { 1.0146503448, 0.7762541175, 0.2200310230, 0.2459515929, + 0.2703596950, 0.1376276016, 0.2522100806, 0.2622758150, + 0.2389107943, 0.2956544161, 0.3799875379, 0.3653843999, + 0.2561216354, 0.2842326760, 0.4034568667, 0.3700782657 } }, + { { 0.6342907548, 0.9627570510, 0.5214815140, -0.0226939917, + 0.5616401434, 0.7231091261, 0.7417802811, 0.9092991352, + 0.9739701748, 0.7804785967, 0.6771092415, 0.6352295280, + 0.4660417438, 0.5869870186, 0.6692339778, 0.5986173749 }, + { 0.3988673091, 0.6997441053, 0.2316613793, -0.2566571236, + 0.2685343027, 0.4484136701, 0.4490395188, 0.6886874437, + 0.7703085542, 0.5847443938, 0.4539941549, 0.4098196626, + 0.2579991817, 0.3376384377, 0.4754816294, 0.5095382333 } }, + { { 0.4443456531, 2.0296727419, 0.6569256186, 0.6439914107, + 0.6436263323, 0.5507399440, 0.6095175743, 0.6066491008, + 0.5347808003, 0.2529402375, 0.4443978071, 0.7000570297, + 0.8259569407, 0.5927761197, 0.5078171492, 0.4418422580 }, + { 0.2430831194, 1.9133691788, 0.3723730445, 0.3764410615, + 0.3874977231, 0.3212099075, 0.3832210898, 0.4474227428, + 0.3644977808, 0.0814055204, 0.2752621770, 0.4647378922, + 0.6619845629, 0.4304205179, 0.3143777251, 0.2705683112 } }, + { { 0.9740744829, 1.0730628967, 0.9743352532, 0.9098728299, + 0.9453375936, 0.9661470652, 0.9270836711, 0.9643738270, + 0.9989519715, 0.9627048969, 0.9348546267, 0.9865393043, + 0.9399657249, 0.9752218723, 0.8440544009, 0.8819182515 }, + { 0.9258319736, 1.0357205868, 0.8463491797, 0.8108844161, + 0.8391519189, 0.8566235304, 0.8305986524, 0.8880724311, + 0.9181653261, 0.8670021892, 0.8305986524, 0.8995984793, + 0.8300249577, 0.8711223602, 0.7195626497, 0.8138571978 } }, +}; + +static const double wmavoice_mean_lsf10[2][10] = { + { 0.2235394066, 0.4097484909, 0.7025292732, 1.1077160169, + 1.3939179044, 1.6741291716, 1.9552949226, 2.2199793918, + 2.5103400247, 2.7829212906 }, + { 0.1493683393, 0.3714357373, 0.7702730245, 1.0609411394, + 1.3270362536, 1.5806033119, 1.8398507524, 2.1116740248, + 2.3823505771, 2.6865718527 } +}; + +static const double wmavoice_mean_lsf16[2][16] = { + { 0.0999206754, 0.2345933590, 0.4621011210, 0.6772546160, + 0.8346396060, 1.0067495130, 1.1571691668, 1.3292508688, + 1.4941465650, 1.6600755584, 1.8461284908, 2.0529487333, + 2.2690810112, 2.4949894820, 2.7172752965, 2.9164840903 }, + { 0.0918298402, 0.2475621892, 0.4782937721, 0.6284774045, + 0.7861951264, 0.9303736000, 1.0940441024, 1.2521029300, + 1.4434732098, 1.6551410742, 1.8917962963, 2.0967280403, + 2.2981430375, 2.4826173497, 2.6827972461, 2.8811350800 } +}; + +static const float wmavoice_std_codebook[1000] = { + -0.185013, -0.150405, -0.707267, -0.284100, 0.882898, + -0.788627, 0.061005, 0.374431, 0.053843, -0.909826, + 0.543602, 0.219326, 0.285698, 0.154709, -0.455005, + 0.426276, -0.868852, -0.952324, -0.550001, 0.813814, + -0.352815, 0.242122, 0.820495, -0.189574, -0.449538, + 0.499132, -0.247783, 0.598159, 0.732040, -0.564406, + -0.631788, -0.452973, 0.285189, -0.339055, 0.262927, + 0.168087, -0.127682, -0.676067, -0.457481, 0.926161, + -0.585893, -0.913880, 0.145487, 0.699804, 0.240829, + 0.690482, 0.126081, 0.371977, 0.738158, 0.576080, + 0.185791, -0.614657, -0.181799, 0.006285, 0.195768, + 0.368663, -0.494583, 0.947985, -0.033178, -0.762543, + -0.616421, 0.335034, -0.215516, 0.668769, 0.995979, + -0.952588, -0.163144, -0.131704, -0.628655, 0.379374, + -0.205543, -0.214549, 0.465494, 0.939944, -0.514744, + -0.293676, 0.630426, 0.611336, -0.921699, 0.368584, + 0.187416, 0.264092, 0.753927, -0.994382, -0.729623, + -0.050304, 0.374280, -0.224205, -0.102319, -0.658897, + 0.013252, 0.281260, 0.676137, 0.797736, -0.049971, + 0.672115, 0.845148, 0.786885, -0.459588, -0.783507, + 0.166259, 0.334869, 0.001944, -0.368247, 0.274813, + 0.487200, 0.338077, -0.094761, 0.098536, 0.416378, + -0.726176, -0.714048, -0.319530, -0.972249, -0.708430, + -0.049153, -0.022553, 0.665850, 0.726642, 0.875127, + -0.993047, -0.260106, 0.156387, 0.683090, -0.462370, + -0.893584, 0.355205, -0.617222, 0.893301, 0.895617, + -0.400729, 0.059559, 0.230486, 0.601215, 0.691313, + -0.494701, 0.088415, 0.029390, 0.410539, -0.813049, + -0.554232, 0.684362, -0.527097, 0.126238, 0.712113, + -0.235528, -0.922915, -0.310440, -0.569678, 0.803727, + -0.435313, -0.562725, -0.456380, 0.721075, -0.879635, + 0.081250, 0.827491, 0.475570, 0.464029, 0.720792, + 0.371187, -0.936700, -0.219649, -0.398327, 0.664515, + -0.528336, 0.106972, -0.247070, 0.501053, -0.482490, + -0.060119, 0.946821, -0.798127, 0.412784, 0.073058, + 0.913986, -0.822744, 0.150143, -0.396453, -0.392421, + -0.046130, 0.168234, 0.044854, 0.497490, -0.110691, + 0.165219, -0.421259, -0.283200, -0.359212, -0.957231, + -0.562409, -0.988025, -0.893931, 0.217942, -0.386352, + 0.770585, 0.689606, 0.720620, -0.476485, 0.190659, + -0.761870, 0.463395, 0.137480, -0.559997, -0.123821, + -0.789461, -0.646011, 0.053435, 0.360682, -0.042464, + 0.661014, -0.685448, -0.874230, -0.294133, 0.812042, + 0.015078, 0.871086, -0.609218, 0.731878, -0.488126, + -0.566448, -0.830530, -0.476150, -0.460379, 0.387412, + 0.137497, -0.689794, 0.077018, -0.141883, -0.166280, + -0.732322, 0.096247, -0.702884, 0.405158, 0.536250, + 0.173295, 0.615696, 0.890239, -0.773270, -0.023622, + -0.152226, 0.887744, 0.290930, -0.026456, -0.406389, + 0.102972, 0.988622, -0.535303, 0.493754, 0.720500, + -0.023428, 0.927306, 0.889970, 0.500421, -0.533073, + 0.277382, -0.362081, -0.222867, -0.645599, 0.496035, + 0.610853, -0.377922, -0.407718, 0.907969, -0.972764, + -0.871468, 0.081264, 0.642933, -0.981230, 0.307994, + -0.380689, -0.133456, 0.195738, 0.910241, 0.840088, + 0.789349, 0.013213, 0.828710, -0.745954, -0.493033, + 0.549210, 0.230618, -0.565727, 0.439180, -0.268961, + -0.098800, -0.283438, 0.368958, 0.678333, 0.070963, + -0.135007, 0.289186, 0.693041, 0.457275, 0.197155, + 0.720277, 0.585807, -0.721581, 0.363210, 0.604577, + 0.586413, 0.982521, -0.528878, -0.217849, 0.892762, + -0.688791, -0.428500, -0.094025, -0.860081, -0.174454, + 0.412942, 0.689129, -0.943836, 0.847215, 0.128309, + -0.212797, -0.251585, 0.844871, -0.843839, -0.573252, + -0.084167, 0.021154, 0.715935, -0.391126, -0.521570, + -0.086910, -0.670848, -0.935763, 0.191509, 0.692361, + 0.668814, -0.222078, 0.674882, -0.860064, 0.560073, + 0.567644, -0.548855, -0.868427, -0.526382, -0.408936, + -0.042881, 0.886560, -0.719807, 0.013283, 0.733775, + 0.408502, 0.800487, -0.517810, 0.253372, 0.956648, + -0.091062, -0.830794, -0.022198, -0.375127, -0.221920, + 0.456232, 0.537963, 0.107232, 0.520469, -0.270529, + -0.200406, 0.189284, 0.507393, -0.525524, 0.329220, + 0.067466, -0.957881, 0.780365, 0.199039, -0.484262, + -0.628570, -0.843843, -0.597703, -0.348377, 0.169441, + -0.863928, -0.939875, -0.030073, -0.381738, 0.313497, + -0.073425, 0.527200, 0.482703, 0.904377, -0.847927, + -0.739217, 0.360609, 0.690035, 0.368015, -0.118921, + -0.580493, -0.832391, -0.929638, 0.926900, -0.357915, + 0.399582, -0.005634, -0.315796, 0.179947, -0.806596, + 0.393360, 0.732931, -0.415833, -0.724526, 0.957347, + -0.892887, 0.475366, 0.173583, -0.418554, -0.302536, + 0.627315, 0.782000, 0.497542, 0.139082, 0.570111, + 0.732375, -0.454643, 0.302218, -0.019505, 0.881778, + -0.057606, 0.273041, 0.414170, -0.503501, -0.079602, + -0.083941, 0.007178, -0.171925, 0.506856, 0.520953, + 0.631684, -0.099784, 0.253885, -0.784149, 0.175691, + 0.211231, -0.677036, -0.348943, -0.615186, -0.095591, + 0.348521, -0.987871, -0.313590, -0.153938, 0.151210, + -0.743479, -0.421562, 0.696567, 0.558739, 0.558933, + 0.578346, -0.498867, -0.168026, -0.007485, -0.002368, + 0.752372, 0.908575, -0.995190, -0.419553, 0.415430, + 0.525763, -0.787869, -0.684353, -0.220353, -0.572018, + 0.491337, 0.990879, -0.249054, -0.857606, -0.624307, + 0.655355, 0.490915, -0.612178, -0.658235, -0.663023, + 0.539032, -0.401714, -0.084585, 0.235599, -0.842975, + -0.525653, -0.186055, -0.341841, 0.306321, 0.806460, + 0.655791, 0.058693, 0.715035, 0.660601, 0.639140, + 0.130465, 0.186363, 0.851271, 0.446112, 0.966011, + -0.720746, -0.062551, 0.956890, 0.030200, 0.079843, + -0.667418, -0.314445, -0.429243, -0.279596, 0.027320, + -0.092266, -0.740564, 0.625606, 0.823149, 0.495035, + 0.782632, -0.702504, -0.691020, -0.559209, 0.603818, + -0.884560, -0.903419, -0.337489, 0.830475, 0.757182, + -0.698349, -0.039060, -0.056455, -0.847078, -0.592948, + -0.090444, -0.567824, 0.344501, -0.133554, 0.462375, + -0.575656, 0.199028, -0.852070, -0.004899, 0.919432, + 0.175251, 0.902835, -0.821132, -0.199143, 0.725984, + 0.673903, -0.416511, -0.976519, 0.982883, 0.024279, + 0.627298, -0.901677, 0.120861, -0.710191, 0.928798, + -0.121958, -0.408540, -0.110261, 0.821588, -0.255618, + 0.296790, -0.268856, 0.176557, -0.358709, 0.597589, + -0.361067, 0.065635, -0.203382, -0.213137, -0.939264, + -0.283951, 0.962113, 0.963571, -0.105083, -0.237030, + 0.689556, -0.431180, 0.346459, 0.713037, -0.448297, + -0.629262, 0.340335, -0.349973, 0.491599, 0.630144, + -0.421175, -0.630359, -0.778396, 0.468564, -0.808771, + -0.034014, -0.234646, -0.077627, -0.857457, 0.406645, + -0.480038, -0.218524, -0.527720, 0.316580, 0.568338, + -0.466984, -0.967371, 0.530452, -0.503413, -0.072454, + -0.706578, -0.813857, 0.496366, 0.639881, 0.899179, + -0.951931, -0.989381, 0.239514, -0.301904, 0.502218, + -0.130341, 0.276921, 0.871860, 0.091262, -0.254515, + -0.936911, -0.942752, 0.510839, -0.014539, -0.800209, + -0.082516, 0.505423, -0.018733, 0.389763, -0.177997, + -0.450395, 0.922779, -0.145368, -0.919943, -0.580634, + 0.782178, -0.626521, -0.394491, 0.278545, -0.986640, + -0.495312, 0.326614, -0.976021, 0.744203, -0.975290, + 0.526197, -0.386139, 0.301631, 0.398057, 0.705124, + -0.952884, 0.461146, 0.762372, 0.557954, -0.553393, + 0.962163, -0.524562, 0.952030, -0.056570, 0.865202, + -0.225967, 0.493035, 0.787981, 0.628665, 0.573093, + -0.792653, 0.410844, 0.946571, -0.187144, -0.310612, + 0.959931, 0.317544, -0.983998, 0.983911, 0.061747, + -0.959287, 0.510108, 0.675608, 0.342344, -0.091835, + 0.380731, 0.389460, -0.630689, 0.143103, -0.052586, + -0.184083, 0.105266, 0.422852, -0.232052, -0.951303, + 0.288054, 0.541981, 0.541732, 0.076035, 0.170646, + 0.114825, 0.283382, -0.418510, 0.061396, -0.903763, + 0.270879, 0.021327, 0.413782, 0.286881, 0.005238, + -0.524472, 0.327594, -0.484654, -0.848864, -0.330063, + 0.423511, 0.531868, -0.940603, 0.792822, -0.325029, + 0.006811, -0.391261, 0.780237, -0.570337, 0.376687, + 0.828934, 0.717717, -0.081333, 0.370666, -0.206248, + -0.910686, -0.514510, -0.922867, -0.329196, 0.546886, + -0.826629, 0.941683, -0.431786, 0.587152, 0.228564, + 0.573452, -0.937320, -0.443843, -0.911202, -0.786184, + 0.226094, 0.512309, 0.745684, 0.285491, 0.305131, + -0.579345, -0.707698, 0.913870, -0.799108, -0.278035, + 0.290556, -0.970174, -0.560318, -0.790776, 0.400492, + 0.233434, -0.701462, 0.885982, 0.310567, -0.030658, + 0.432868, 0.483938, -0.088976, -0.998918, 0.071090, + -0.860412, 0.574534, 0.133770, -0.304255, 0.663332, + 0.347586, 0.921839, 0.175641, 0.093270, 0.207330, + -0.519228, 0.513925, 0.499633, -0.605358, 0.714817, + -0.778402, 0.685198, 0.744643, -0.338720, 0.894422, + 0.145135, 0.894714, -0.807041, 0.031117, 0.205281, + 0.162301, -0.536015, -0.310781, -0.926675, -0.534932, + 0.760308, -0.787088, -0.960398, -0.105922, -0.091343, + 0.702934, -0.758336, -0.169504, -0.121425, 0.334935, + -0.962173, 0.359347, -0.151140, 0.537460, 0.753989, + -0.436323, 0.759058, 0.439187, -0.691680, -0.579662, + 0.333608, 0.453454, -0.684948, 0.526567, -0.515429, + 0.520333, -0.311132, -0.051443, -0.790448, -0.237807, + 0.413625, 0.969861, -0.024895, 0.453226, -0.136061, + 0.883762, 0.156160, 0.105603, -0.285741, -0.965264, + -0.559462, -0.247914, 0.394083, 0.289398, -0.710455, + 0.148072, 0.853074, -0.951397, -0.412742, -0.838606, + -0.531059, 0.920866, 0.614848, -0.216007, 0.447434, + -0.900580, -0.695673, -0.863698, 0.047977, -0.486121, + -0.101505, -0.538399, -0.516261, 0.873600, 0.914828, + 0.347678, 0.757362, 0.070988, -0.546718, -0.528380, + 0.105724, -0.106180, 0.223706, -0.500194, -0.816782, + 0.513251, 0.647878, -0.963708, 0.561854, -0.764864, + -0.802314, -0.969205, -0.843997, 0.812534, -0.185212, + 0.603436, 0.911954, 0.119114, 0.739738, -0.040069, + 0.632993, -0.361767, 0.421532, -0.883268, -0.488168, + 0.336360, 0.464411, -0.730806, -0.592652, 0.917693, + -0.259186, 0.513071, -0.188487, 0.964520, -0.987122, + -0.005270, 0.477771, 0.660756, 0.031023, 0.039625, + 0.895892, 0.228709, 0.070419, -0.948105, 0.041243, + 0.885207, 0.655331, -0.046803, 0.004321, 0.395069, + 0.913128, -0.362686, -0.966698, 0.334661, -0.245954, + -0.454865, -0.328980, -0.781543, -0.185671, 0.078368, + -0.863850, 0.555143, -0.408560, -0.052338, 0.519663, + -0.395683, 0.942393, -0.002565, -0.734927, -0.026585, + -0.962941, -0.839035, -0.797876, 0.107479, -0.787140, + 0.243367, -0.007314, 0.868191, -0.803435, 0.997007, + 0.263261, -0.890307, -0.365679, 0.296563, 0.444354, + 0.388367, 0.841698, -0.884626, 0.606824, -0.343973, + 0.193743, 0.742974, -0.788830, 0.785182, -0.309364, + 0.730833, -0.610500, -0.366971, -0.271732, -0.345427, + 0.606444, -0.234673, -0.184462, 0.808568, 0.872806, + 0.028398, 0.051936, -0.134508, -0.103410, 0.248500, + -0.137501, -0.840150, 0.358194, 0.496819, 0.456413, + -0.197453, -0.114814, 0.298111, -0.082078, -0.507990, + 0.954138, -0.888336, -0.765016, -0.834692, 0.896847, + -0.074380, 0.896141, -0.713654, 0.558649, -0.375591, + -0.059081, 0.165093, 0.389736, 0.756458, -0.026339, + 0.262542, -0.215144, -0.974403, -0.871966, 0.681446 +}; + +static const float wmavoice_gain_silence[256] = { + 0.0000188351, 0.0000249147, 0.0000294447, 0.0000365973, + 0.0000423193, 0.0000464916, 0.0000498295, 0.0000525713, + 0.0000550747, 0.0000574589, 0.0000596046, 0.0000615120, + 0.0000634193, 0.0000649691, 0.0000665188, 0.0000679493, + 0.0000692606, 0.0000704527, 0.0000716448, 0.0000728369, + 0.0000737906, 0.0000747442, 0.0000755787, 0.0000762939, + 0.0000770092, 0.0000778437, 0.0000785589, 0.0000792742, + 0.0000799894, 0.0000807047, 0.0000814199, 0.0000822544, + 0.0000829697, 0.0000838041, 0.0000845194, 0.0000854731, + 0.0000865459, 0.0000876188, 0.0000889301, 0.0000904799, + 0.0000923872, 0.0000950098, 0.0000988245, 0.0001032352, + 0.0001088381, 0.0001147985, 0.0001225471, 0.0001319647, + 0.0001431704, 0.0001568794, 0.0001744032, 0.0001952648, + 0.0002206564, 0.0002535582, 0.0002965927, 0.0003464222, + 0.0004109144, 0.0004891157, 0.0005909204, 0.0007261038, + 0.0008867979, 0.0010721684, 0.0012696981, 0.0015079975, + 0.0017461777, 0.0019979477, 0.0022052526, 0.0023679733, + 0.0025173426, 0.0026556253, 0.0027927160, 0.0029264688, + 0.0030447245, 0.0031807423, 0.0033060312, 0.0034313202, + 0.0035454035, 0.0036598444, 0.0037686825, 0.0038731098, + 0.0039769411, 0.0040702820, 0.0041661263, 0.0042562485, + 0.0043400526, 0.0044249296, 0.0045082569, 0.0045900345, + 0.0046693087, 0.0047430992, 0.0048171282, 0.0048881769, + 0.0049589872, 0.0050252676, 0.0050880909, 0.0051497221, + 0.0052082539, 0.0052671432, 0.0053246021, 0.0053800344, + 0.0054348707, 0.0054861307, 0.0055367947, 0.0055862665, + 0.0056355000, 0.0056805611, 0.0057252645, 0.0057705641, + 0.0058110952, 0.0058538914, 0.0058966875, 0.0059366226, + 0.0059723854, 0.0060091019, 0.0060437918, 0.0060794353, + 0.0061159134, 0.0061485767, 0.0061824322, 0.0062153339, + 0.0062497854, 0.0062820911, 0.0063197613, 0.0063550472, + 0.0063927174, 0.0064336061, 0.0064769983, 0.0065194368, + 0.0065603256, 0.0066006184, 0.0066410303, 0.0066826344, + 0.0067234039, 0.0067654848, 0.0068060160, 0.0068466663, + 0.0068866014, 0.0069231987, 0.0069609880, 0.0069983006, + 0.0070366859, 0.0070750713, 0.0071122646, 0.0071535110, + 0.0071973801, 0.0072410107, 0.0072846413, 0.0073343515, + 0.0073832273, 0.0074360371, 0.0074878931, 0.0075426102, + 0.0076007843, 0.0076560974, 0.0077134371, 0.0077683926, + 0.0078265667, 0.0078855753, 0.0079488754, 0.0080170631, + 0.0080827475, 0.0081528425, 0.0082212687, 0.0082877874, + 0.0083510876, 0.0084129572, 0.0084775686, 0.0085455179, + 0.0086110830, 0.0086781979, 0.0087503195, 0.0088242292, + 0.0089002848, 0.0089734793, 0.0090423822, 0.0091133118, + 0.0091816187, 0.0092473030, 0.0093164444, 0.0093911886, + 0.0094678402, 0.0095427036, 0.0096175671, 0.0096931458, + 0.0097666979, 0.0098397732, 0.0099166632, 0.0099946260, + 0.0100749731, 0.0101612806, 0.0102528334, 0.0103493929, + 0.0104434490, 0.0105448961, 0.0106583834, 0.0107737780, + 0.0108981133, 0.0110142231, 0.0111318827, 0.0112472773, + 0.0113576651, 0.0114786625, 0.0116028786, 0.0117331743, + 0.0118676424, 0.0120122433, 0.0121580362, 0.0123010874, + 0.0124633312, 0.0126402378, 0.0128232241, 0.0130140781, + 0.0132108927, 0.0134289265, 0.0136625767, 0.0138912201, + 0.0141364336, 0.0144006014, 0.0146615505, 0.0149335861, + 0.0152134895, 0.0155050755, 0.0158376694, 0.0162067413, + 0.0165973902, 0.0169926882, 0.0174319744, 0.0179271698, + 0.0184448957, 0.0190744400, 0.0197248459, 0.0204203129, + 0.0212460756, 0.0221523046, 0.0231562853, 0.0243031979, + 0.0256397724, 0.0271918774, 0.0289602280, 0.0310072899, + 0.0333702564, 0.0363805294, 0.0401413441, 0.0443998575, + 0.0498176813, 0.0562580824, 0.0640066862, 0.0732775927, + 0.0836604834, 0.0962959528, 0.1122496128, 0.1335854530, + 0.1608980894, 0.1990102530, 0.2616490126, 0.3926030397 +}; + +static const float wmavoice_gain_universal[64] = { + 0.0000000000, 0.0000000000, 0.0000015497, 0.0000015497, + 0.0000095367, 0.0000164509, 0.0000379086, 0.0000494719, + 0.0000799894, 0.0001058578, 0.0001349449, 0.0001627207, + 0.0001972914, 0.0002325773, 0.0002671480, 0.0003106594, + 0.0003589392, 0.0004127026, 0.0004582405, 0.0005071163, + 0.0005759001, 0.0006588697, 0.0007554293, 0.0008602142, + 0.0009772778, 0.0011068583, 0.0012603998, 0.0013889074, + 0.0015437603, 0.0016924143, 0.0018980503, 0.0021264553, + 0.0023632050, 0.0025693178, 0.0028522015, 0.0031896830, + 0.0034654140, 0.0037885904, 0.0041683912, 0.0046081543, + 0.0050576925, 0.0055632591, 0.0061818361, 0.0068151951, + 0.0073953867, 0.0081818104, 0.0091186762, 0.0102789402, + 0.0119919777, 0.0134155750, 0.0154829025, 0.0173798800, + 0.0199711323, 0.0229473114, 0.0268185139, 0.0319474936, + 0.0393068790, 0.0460114479, 0.0523469448, 0.0637906790, + 0.0845471621, 0.1105458736, 0.1499300003, 0.2219169140 +}; + +static const float wmavoice_gain_codebook_acb[128] = { + 0.05, 0.14, 0.16, 0.05, 0.17, 0.25, 0.07, 0.21, + 0.12, 0.22, 0.23, 0.13, 0.24, 0.32, 0.14, 0.29, + 0.31, 0.41, 0.43, 0.32, 0.43, 0.51, 0.34, 0.48, + 0.38, 0.47, 0.49, 0.38, 0.49, 0.57, 0.40, 0.54, + 0.49, 0.59, 0.61, 0.50, 0.61, 0.69, 0.52, 0.66, + 0.56, 0.65, 0.67, 0.56, 0.67, 0.75, 0.58, 0.72, + 0.65, 0.74, 0.76, 0.65, 0.76, 0.84, 0.67, 0.81, + 0.71, 0.80, 0.82, 0.71, 0.82, 0.90, 0.73, 0.87, + 0.81, 0.90, 0.92, 0.81, 0.93, 1.01, 0.83, 0.97, + 0.87, 0.96, 0.98, 0.87, 0.98, 1.06, 0.89, 1.03, + 0.92, 1.02, 1.04, 0.93, 1.04, 1.12, 0.95, 1.09, + 0.93, 1.02, 1.04, 0.93, 1.04, 1.12, 0.95, 1.09, + 0.94, 1.04, 1.05, 0.10, 1.06, 1.14, 0.96, 1.11, + 0.98, 1.08, 1.10, 0.99, 1.10, 1.18, 1.01, 1.15, + 1.06, 1.15, 1.17, 1.06, 1.17, 1.25, 1.08, 1.22, + 1.16, 1.25, 1.27, 1.16, 1.28, 1.36, 1.18, 1.32 +}; + +static const float wmavoice_gain_codebook_fcb[128] = { + -0.8439700703 /* log(0.430) */, -0.6143360001 /* log(0.541) */, + -0.1531511795 /* log(0.858) */, -0.0998203353 /* log(0.905) */, + 0.3213585988 /* log(1.379) */, 0.3777512695 /* log(1.459) */, + 0.7158866675 /* log(2.046) */, 1.2700414043 /* log(3.561) */, + -1.6873994539 /* log(0.185) */, -1.2173958247 /* log(0.296) */, + -0.4893903430 /* log(0.613) */, -0.4155154440 /* log(0.660) */, + 0.1257512053 /* log(1.134) */, 0.1947440768 /* log(1.215) */, + 0.5883420662 /* log(1.801) */, 1.1987592373 /* log(3.316) */, + -1.3586791941 /* log(0.257) */, -0.9996723408 /* log(0.368) */, + -0.3768776513 /* log(0.686) */, -0.3119747650 /* log(0.732) */, + 0.1881379421 /* log(1.207) */, 0.2523139286 /* log(1.287) */, + 0.6280751838 /* log(1.874) */, 1.2202397768 /* log(3.388) */, + -0.7381445465 /* log(0.478) */, -0.5310283311 /* log(0.588) */, + -0.0987159729 /* log(0.906) */, -0.0491902442 /* log(0.952) */, + 0.3555743385 /* log(1.427) */, 0.4101209196 /* log(1.507) */, + 0.7390761124 /* log(2.094) */, 1.2831536022 /* log(3.608) */, + -0.2497442331 /* log(0.779) */, -0.1165338163 /* log(0.890) */, + 0.1881379421 /* log(1.207) */, 0.2255406759 /* log(1.253) */, + 0.5469646704 /* log(1.728) */, 0.5922212620 /* log(1.808) */, + 0.8733832309 /* log(2.395) */, 1.3632815868 /* log(3.909) */, + -1.3903023825 /* log(0.249) */, -1.0216512475 /* log(0.360) */, + -0.3900840061 /* log(0.677) */, -0.3229638866 /* log(0.724) */, + 0.1806534997 /* log(1.198) */, 0.2460785226 /* log(1.279) */, + 0.6232610531 /* log(1.865) */, 1.2178757095 /* log(3.380) */, + -0.6033064766 /* log(0.547) */, -0.4185503477 /* log(0.658) */, + -0.0253178080 /* log(0.975) */, 0.0217614918 /* log(1.022) */, + 0.4027948796 /* log(1.496) */, 0.4555243080 /* log(1.577) */, + 0.7714961470 /* log(2.163) */, 1.3023691262 /* log(3.678) */, + -1.1056369036 /* log(0.331) */, -0.8164453969 /* log(0.442) */, + -0.2757535016 /* log(0.759) */, -0.2156715365 /* log(0.806) */, + 0.2468600779 /* log(1.280) */, 0.3082197237 /* log(1.361) */, + 0.6662897264 /* log(1.947) */, 1.2418464568 /* log(3.462) */, + -0.5395680926 /* log(0.583) */, -0.3652833185 /* log(0.694) */, + 0.0109399400 /* log(1.011) */, 0.0554347069 /* log(1.057) */, + 0.4265740713 /* log(1.532) */, 0.4774756441 /* log(1.612) */, + 0.7880027116 /* log(2.199) */, 1.3118401752 /* log(3.713) */, + -0.9571127264 /* log(0.384) */, -0.7031975164 /* log(0.495) */, + -0.2082549388 /* log(0.812) */, -0.1519863570 /* log(0.859) */, + 0.2874320412 /* log(1.333) */, 0.3464225675 /* log(1.414) */, + 0.6931471806 /* log(2.000) */, 1.2570395253 /* log(3.515) */, + -0.2420715612 /* log(0.785) */, -0.1098148660 /* log(0.896) */, + 0.1930966300 /* log(1.213) */, 0.2311117210 /* log(1.260) */, + 0.5504308784 /* log(1.734) */, 0.5960854677 /* log(1.815) */, + 0.8758853172 /* log(2.401) */, 1.3650707247 /* log(3.916) */, + 0.6564831962 /* log(1.928) */, 0.7124594916 /* log(2.039) */, + 0.8569652658 /* log(2.356) */, 0.8767179568 /* log(2.403) */, + 1.0567480846 /* log(2.877) */, 1.0841752409 /* log(2.957) */, + 1.2652560327 /* log(3.544) */, 1.6211688353 /* log(5.059) */, + -1.5417792640 /* log(0.214) */, -1.1239300967 /* log(0.325) */, + -0.4431669753 /* log(0.642) */, -5.2983173665 /* log(0.005) */, + 0.1510028735 /* log(1.163) */, 0.2183319943 /* log(1.244) */, + 0.6043159669 /* log(1.830) */, 1.2074666936 /* log(3.345) */, + -0.5124936809 /* log(0.599) */, -0.3424903089 /* log(0.710) */, + 0.0266419309 /* log(1.027) */, 0.0713899961 /* log(1.074) */, + 0.4369637752 /* log(1.548) */, 0.4879663296 /* log(1.629) */, + 0.7952524035 /* log(2.215) */, 1.3164082337 /* log(3.730) */, + -0.8867319296 /* log(0.412) */, -0.6481738149 /* log(0.523) */, + -0.1743533871 /* log(0.840) */, -0.1199102967 /* log(0.887) */, + 0.3089542077 /* log(1.362) */, 0.3660310389 /* log(1.442) */, + 0.7075430608 /* log(2.029) */, 1.2649738259 /* log(3.543) */, + -0.0943106795 /* log(0.910) */, 0.0207825392 /* log(1.021) */, + 0.2911759617 /* log(1.338) */, 0.3249778572 /* log(1.384) */, + 0.6200387087 /* log(1.859) */, 0.6621723763 /* log(1.939) */, + 0.9266370239 /* log(2.526) */, 1.3962446920 /* log(4.040) */ +}; + +static const float wmavoice_ipol1_coeffs[17*9] = { + 0, + 0.6308171151, 0.7613050340, 0.8632577061, 0.9280143976, + 0.9499985575, 0.9273047447, 0.8618999123, 0.7594153284, + -0.1791058179, -0.1351341452, -0.0589959878, 0.0472882274, + 0.1784339990, 0.3262237605, 0.4801855979, 0.6285545824, + 0, + -0.1921342459, -0.1786532696, -0.1341681625, -0.0575229186, + 0.0492091286, 0.1806929555, 0.3286687729, 0.4826357064, + 0.0807464118, 0.0506337392, 0.0080115446, -0.0428523305, + -0.0958572026, -0.1436148431, -0.1782128509, -0.1921164688, + 0, + 0.0960653644, 0.0803771760, 0.0500416081, 0.0072485465, + -0.0437018941, -0.0966834794, -0.1442930843, -0.1786170151, + -0.0391932014, -0.0189622506, 0.0070230183, 0.0356589290, + 0.0630142610, 0.0847979258, 0.0969368290, 0.0961942221, + 0, + -0.0515680681, -0.0389267015, -0.0185848991, 0.0074699190, + 0.0361179407, 0.0634181346, 0.0850781347, 0.0970333587, + 0.0178811825, 0.0048708571, -0.0108041526, -0.0271167825, + -0.0416534986, -0.0519338618, -0.0557823736, -0.0517020743, + 0, + 0.0267091128, 0.0177022810, 0.0046363524, -0.0110662053, + -0.0273700613, -0.0418578978, -0.0520511451, -0.0557823028, + -0.0069270437, 0.0008217385, 0.0097293532, 0.0185749526, + 0.0259542684, 0.0304777338, 0.0309953480, 0.0268154419, + 0, + -0.0125539196, -0.0068173436, 0.0009580161, 0.0098749646, + 0.0187084037, 0.0260526291, 0.0305201071, 0.0309665180, + 0.0019149571, -0.0022503408, -0.0068592466, -0.0112465904, + -0.0146595868, -0.0163685936, -0.0157934162, -0.0126258885, + 0, + 0.0050976076, 0.0018546581, -0.0023221741, -0.0069331308, + -0.0113109085, -0.0147021576, -0.0163786146, -0.0157635096, + -0.0001162733, 0.0019313511, 0.0040823850, 0.0060192454, + 0.0073876535, 0.0078486321, 0.0071403184, 0.0051400312, + 0, + -0.0017920607, -0.0000857157, 0.0019657183, 0.0041159806, + 0.0060465694, 0.0074030068, 0.0078470460, 0.0071185785, + -0.0004100171, -0.0015364708, -0.0025490071, -0.0033188616, + -0.0037196307, -0.0036417283, -0.0030119629, -0.0018155784, + 0, + 0.0006907531, -0.0004282868, -0.0015539061, -0.0025635813, + -0.0033285026, -0.0037224069, -0.0036361245, -0.0029972247, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/** + * Hamming-window sinc function (num = 32, x = [ 0, 31 ]): + * (0.54 + 0.46 * cos(2 * M_PI * x / (num - 1))) * + * sin(x * M_PI / 4) / (x * M_PI / 4) + */ +static const float wmavoice_ipol2_coeffs[32] = { + 1, 0.8563459515, 0.5888634918, 0.2648358640, + 0, -0.1360490318, -0.1434589471, -0.0758505310, + 0, 0.0410402636, 0.0412485781, 0.0200064587, + 0, -0.0081391358, -0.0068223253, -0.0029313546, + 0, 0.0025864919, 0.0053062555, 0.0055688801, + 0, -0.0104795941, -0.0187493577, -0.0160592399, + 0, 0.0212381664, 0.0331059131, 0.0251942366, + 0, -0.0273968070, -0.0392575669, -0.0276240534 +}; + +/** + * LUT for 1.071575641632 * pow(1.0331663, n - 127) + */ +static const float wmavoice_energy_table[128] = { + 0.0169982178, 0.0175619858, 0.0181444519, 0.0187462362, + 0.0193679795, 0.0200103437, 0.0206740128, 0.0213596933, + 0.0220681153, 0.0228000330, 0.0235562258, 0.0243374986, + 0.0251446834, 0.0259786395, 0.0268402549, 0.0277304468, + 0.0286501631, 0.0296003830, 0.0305821182, 0.0315964139, + 0.0326443501, 0.0337270424, 0.0348456436, 0.0360013446, + 0.0371953760, 0.0384290090, 0.0397035571, 0.0410203772, + 0.0423808713, 0.0437864880, 0.0452387238, 0.0467391249, + 0.0482892887, 0.0498908657, 0.0515455612, 0.0532551367, + 0.0550214125, 0.0568462692, 0.0587316496, 0.0606795611, + 0.0626920777, 0.0647713419, 0.0669195677, 0.0691390421, + 0.0714321284, 0.0738012678, 0.0762489827, 0.0787778794, + 0.0813906502, 0.0840900769, 0.0868790336, 0.0897604897, + 0.0927375130, 0.0958132732, 0.0989910450, 0.1022742117, + 0.1056662688, 0.1091708280, 0.1127916204, 0.1165325012, + 0.1203974531, 0.1243905911, 0.1285161668, 0.1327785725, + 0.1371823465, 0.1417321773, 0.1464329093, 0.1512895470, + 0.1563072616, 0.1614913951, 0.1668474671, 0.1723811803, + 0.1780984262, 0.1840052921, 0.1901080668, 0.1964132480, + 0.2029275487, 0.2096579046, 0.2166114816, 0.2237956830, + 0.2312181577, 0.2388868085, 0.2468098001, 0.2549955679, + 0.2634528274, 0.2721905830, 0.2812181375, 0.2905451026, + 0.3001814086, 0.3101373153, 0.3204234225, 0.3310506819, + 0.3420304081, 0.3533742912, 0.3650944090, 0.3772032397, + 0.3897136755, 0.4026390362, 0.4159930832, 0.4297900346, + 0.4440445799, 0.4587718956, 0.4739876619, 0.4897080789, + 0.5059498840, 0.5227303696, 0.5400674019, 0.5579794393, + 0.5764855528, 0.5956054456, 0.6153594745, 0.6357686714, + 0.6568547659, 0.6786402082, 0.7011481929, 0.7244026842, + 0.7484284410, 0.7732510432, 0.7988969192, 0.8253933741, + 0.8527686184, 0.8810517982, 0.9102730265, 0.9404634147, + 0.9716551065, 1.0038813113, 1.0371763400, 1.0715756416 +}; + +/** + * LUT for f(x,y) = pow((y + 6.9) / 64, 0.025 * (x + 1)). + */ +static const float wmavoice_denoise_power_table[12][64] = { + { 0.9458379339, 0.9490436287, 0.9518757236, 0.9544130754, + 0.9567118717, 0.9588135761, 0.9607496688, 0.9625446194, + 0.9642178285, 0.9657849396, 0.9672587526, 0.9686498743, + 0.9699671937, 0.9712182343, 0.9724094211, 0.9735462842, + 0.9746336187, 0.9756756090, 0.9766759291, 0.9776378218, + 0.9785641645, 0.9794575217, 0.9803201890, 0.9811542296, + 0.9819615045, 0.9827436985, 0.9835023412, 0.9842388263, + 0.9849544265, 0.9856503078, 0.9863275406, 0.9869871101, + 0.9876299254, 0.9882568267, 0.9888685922, 0.9894659445, + 0.9900495551, 0.9906200497, 0.9911780119, 0.9917239872, + 0.9922584859, 0.9927819864, 0.9932949377, 0.9937977618, + 0.9942908555, 0.9947745929, 0.9952493267, 0.9957153901, + 0.9961730980, 0.9966227482, 0.9970646231, 0.9974989903, + 0.9979261037, 0.9983462046, 0.9987595223, 0.9991662752, + 0.9995666709, 0.9999609077, 1.0003491745, 1.0007316515, + 1.0011085110, 1.0014799178, 1.0018460292, 1.0022069960 }, + { 0.8946093973, 0.9006838092, 0.9060673931, 0.9109043185, + 0.9152976055, 0.9193234737, 0.9230399260, 0.9264921443, + 0.9297160207, 0.9327405496, 0.9355894944, 0.9382825789, + 0.9408363568, 0.9432648587, 0.9455800822, 0.9477923675, + 0.9499106907, 0.9519428941, 0.9538958704, 0.9557757107, + 0.9575878241, 0.9593370368, 0.9610276730, 0.9626636222, + 0.9642483964, 0.9657851769, 0.9672768552, 0.9687260672, + 0.9701352224, 0.9715065293, 0.9728420173, 0.9741435556, + 0.9754128696, 0.9766515555, 0.9778610927, 0.9790428553, + 0.9801981216, 0.9813280829, 0.9824338513, 0.9835164667, + 0.9845769028, 0.9856160726, 0.9866348334, 0.9876339913, + 0.9886143053, 0.9895764906, 0.9905212223, 0.9914491381, + 0.9923608411, 0.9932569022, 0.9941378627, 0.9950042356, + 0.9958565084, 0.9966951442, 0.9975205834, 0.9983332454, + 0.9991335296, 0.9999218170, 1.0006984708, 1.0014638383, + 1.0022182509, 1.0029620257, 1.0036954662, 1.0044188628 }, + { 0.8461555040, 0.8547882305, 0.8624635555, 0.8693789920, + 0.8756760853, 0.8814598273, 0.8868103032, 0.8917900284, + 0.8964487626, 0.9008267754, 0.9049571273, 0.9088673021, + 0.9125804007, 0.9161160306, 0.9194909803, 0.9227197376, + 0.9258148939, 0.9287874629, 0.9316471355, 0.9344024839, + 0.9370611291, 0.9396298766, 0.9421148300, 0.9445214846, + 0.9468548060, 0.9491192967, 0.9513190517, 0.9534578074, + 0.9555389816, 0.9575657096, 0.9595408742, 0.9614671327, + 0.9633469396, 0.9651825670, 0.9669761222, 0.9687295635, + 0.9704447142, 0.9721232742, 0.9737668316, 0.9753768718, + 0.9769547868, 0.9785018824, 0.9800193854, 0.9815084500, + 0.9829701633, 0.9844055505, 0.9858155796, 0.9872011653, + 0.9885631734, 0.9899024236, 0.9912196934, 0.9925157203, + 0.9937912053, 0.9950468143, 0.9962831814, 0.9975009102, + 0.9987005760, 0.9998827277, 1.0010478892, 1.0021965608, + 1.0033292209, 1.0044463270, 1.0055483173, 1.0066356112 }, + { 0.8003259737, 0.8112313241, 0.8209581209, 0.8297466775, + 0.8377697066, 0.8451556492, 0.8520027051, 0.8583876935, + 0.8643718792, 0.8700049328, 0.8753277020, 0.8803741979, + 0.8851730502, 0.8897485937, 0.8941216918, 0.8983103719, + 0.9023303202, 0.9061952736, 0.9099173316, 0.9135072091, + 0.9169744409, 0.9203275502, 0.9235741882, 0.9267212496, + 0.9297749699, 0.9327410079, 0.9356245146, 0.9384301933, + 0.9411623497, 0.9438249364, 0.9464215906, 0.9489556668, + 0.9514302661, 0.9538482608, 0.9562123167, 0.9585249126, + 0.9607883576, 0.9630048062, 0.9651762722, 0.9673046403, + 0.9693916775, 0.9714390425, 0.9734482944, 0.9754209007, + 0.9773582446, 0.9792616307, 0.9811322918, 0.9829713934, + 0.9847800389, 0.9865592739, 0.9883100900, 0.9900334289, + 0.9917301853, 0.9934012104, 0.9950473143, 0.9966692689, + 0.9982678100, 0.9998436400, 1.0013974295, 1.0029298194, + 1.0044414224, 1.0059328250, 1.0074045889, 1.0088572520 }, + { 0.7569786654, 0.7698939195, 0.7814501054, 0.7919210783, + 0.8015042240, 0.8103467104, 0.8185613167, 0.8262364557, + 0.8334427763, 0.8402376615, 0.8466683811, 0.8527743561, + 0.8585888194, 0.8641400582, 0.8694523567, 0.8745467247, + 0.8794414652, 0.8841526254, 0.8886943552, 0.8930791981, + 0.8973183276, 0.9014217415, 0.9053984227, 0.9092564737, + 0.9130032283, 0.9166453478, 0.9201889007, 0.9236394320, + 0.9270020224, 0.9302813390, 0.9334816797, 0.9366070112, + 0.9396610028, 0.9426470554, 0.9455683275, 0.9484277579, + 0.9512280860, 0.9539718690, 0.9566614986, 0.9592992147, + 0.9618871182, 0.9644271823, 0.9669212630, 0.9693711079, + 0.9717783651, 0.9741445900, 0.9764712529, 0.9787597445, + 0.9810113822, 0.9832274148, 0.9854090274, 0.9875573457, + 0.9896734398, 0.9917583281, 0.9938129803, 0.9958383209, + 0.9978352315, 0.9998045539, 1.0017470919, 1.0036636145, + 1.0055548568, 1.0074215229, 1.0092642871, 1.0110837959 }, + { 0.7159791370, 0.7306629191, 0.7438433845, 0.7558198318, + 0.7668086064, 0.7769714272, 0.7864325139, 0.7952894548, + 0.8036203840, 0.8114888792, 0.8189474022, 0.8260397728, + 0.8328029877, 0.8392685815, 0.8454636629, 0.8514117142, + 0.8571332177, 0.8626461513, 0.8679663850, 0.8731080020, + 0.8780835596, 0.8829043049, 0.8875803529, 0.8921208349, + 0.8965340237, 0.9008274393, 0.9050079382, 0.9090817905, + 0.9130547454, 0.9169320882, 0.9207186893, 0.9244190474, + 0.9280373261, 0.9315773876, 0.9350428208, 0.9384369673, + 0.9417629433, 0.9450236603, 0.9482218422, 0.9513600421, + 0.9544406555, 0.9574659338, 0.9604379957, 0.9633588374, + 0.9662303420, 0.9690542879, 0.9718323569, 0.9745661408, + 0.9772571477, 0.9799068082, 0.9825164805, 0.9850874551, + 0.9876209597, 0.9901181627, 0.9925801775, 0.9950080658, + 0.9974028405, 0.9997654692, 1.0020968764, 1.0043979464, + 1.0066695255, 1.0089124239, 1.0111274185, 1.0133152537 }, + { 0.6772002277, 0.6934309881, 0.7080464599, 0.7213643301, + 0.7336148970, 0.7449707526, 0.7555647772, 0.7655015856, + 0.7748651015, 0.7837237382, 0.7921340426, 0.8001433220, + 0.8077915768, 0.8151129499, 0.8221368310, 0.8288887107, + 0.8353908496, 0.8416628090, 0.8477218755, 0.8535834053, + 0.8592611049, 0.8647672624, 0.8701129393, 0.8753081305, + 0.8803618988, 0.8852824894, 0.8900774261, 0.8947535945, + 0.8993173131, 0.9037743949, 0.9081302004, 0.9123896841, + 0.9165574352, 0.9206377129, 0.9246344779, 0.9285514202, + 0.9323919830, 0.9361593853, 0.9398566405, 0.9434865742, + 0.9470518396, 0.9505549317, 0.9539981992, 0.9573838564, + 0.9607139933, 0.9639905847, 0.9672154989, 0.9703905051, + 0.9735172803, 0.9765974162, 0.9796324243, 0.9826237418, + 0.9855727362, 0.9884807098, 0.9913489039, 0.9941785028, + 0.9969706369, 0.9997263861, 1.0024467831, 1.0051328157, + 1.0077854297, 1.0104055314, 1.0129939892, 1.0155516364 }, + { 0.6405216642, 0.6580962612, 0.6739722363, 0.6884795488, + 0.7018580813, 0.7142880714, 0.7259086094, 0.7368294324, + 0.7471387455, 0.7569085832, 0.7661985859, 0.7750587283, + 0.7835313288, 0.7916525600, 0.7994535998, 0.8069615243, + 0.8142000068, 0.8211898738, 0.8279495504, 0.8344954211, + 0.8408421252, 0.8470027997, 0.8529892811, 0.8588122744, + 0.8644814947, 0.8700057878, 0.8753932324, 0.8806512276, + 0.8857865684, 0.8908055105, 0.8957138271, 0.9005168576, + 0.9052195513, 0.9098265046, 0.9143419945, 0.9187700080, + 0.9231142680, 0.9273782568, 0.9315652364, 0.9356782672, + 0.9397202245, 0.9436938133, 0.9476015819, 0.9514459336, + 0.9552291382, 0.9589533414, 0.9626205741, 0.9662327603, + 0.9697917251, 0.9732992008, 0.9767568340, 0.9801661903, + 0.9835287605, 0.9868459649, 0.9901191578, 0.9933496315, + 0.9965386205, 0.9996873045, 1.0027968119, 1.0058682226, + 1.0089025710, 1.0119008485, 1.0148640056, 1.0177929548 }, + { 0.6058296875, 0.6245620637, 0.6415378101, 0.6570938835, + 0.6714759586, 0.6848691001, 0.6974164561, 0.7092312055, + 0.7204044988, 0.7310109103, 0.7411122884, 0.7507605397, + 0.7599996842, 0.7688674015, 0.7773962122, 0.7856143935, + 0.7935466990, 0.8012149303, 0.8086383963, 0.8158342858, + 0.8228179717, 0.8296032631, 0.8362026133, 0.8426272954, + 0.8488875492, 0.8549927056, 0.8609512936, 0.8667711307, + 0.8724594015, 0.8780227256, 0.8834672161, 0.8887985309, + 0.8940219180, 0.8991422543, 0.9041640810, 0.9090916337, + 0.9139288704, 0.9186794948, 0.9233469789, 0.9279345818, + 0.9324453671, 0.9368822185, 0.9412478543, 0.9455448393, + 0.9497755970, 0.9539424198, 0.9580474782, 0.9620928299, + 0.9660804271, 0.9700121244, 0.9738896845, 0.9777147851, + 0.9814890239, 0.9852139236, 0.9888909370, 0.9925214512, + 0.9961067913, 0.9996482244, 1.0031469629, 1.0066041676, + 1.0100209506, 1.0133983785, 1.0167374742, 1.0200392198 }, + { 0.5730166999, 0.5927366473, 0.6106642672, 0.6271389942, + 0.6424090212, 0.6566617910, 0.6700426292, 0.6826666808, + 0.6946268614, 0.7059993279, 0.7168473476, 0.7272241023, + 0.7371747608, 0.7467380401, 0.7559474006, 0.7648319736, + 0.7734172908, 0.7817258650, 0.7897776570, 0.7975904541, + 0.8051801811, 0.8125611560, 0.8197463039, 0.8267473349, + 0.8335748949, 0.8402386937, 0.8467476129, 0.8531098003, + 0.8593327495, 0.8654233698, 0.8713880464, 0.8772326935, + 0.8829628002, 0.8885834710, 0.8940994619, 0.8995152120, + 0.9048348715, 0.9100623268, 0.9152012229, 0.9202549833, + 0.9252268281, 0.9301197899, 0.9349367288, 0.9396803449, + 0.9443531909, 0.9489576823, 0.9534961076, 0.9579706374, + 0.9623833320, 0.9667361492, 0.9710309512, 0.9752695109, + 0.9794535174, 0.9835845813, 0.9876642399, 0.9916939614, + 0.9956751493, 0.9996091459, 1.0034972362, 1.0073406510, + 1.0111405700, 1.0148981248, 1.0186144013, 1.0222904422 }, + { 0.5419809316, 0.5625329386, 0.5812764912, 0.5985496562, + 0.6146003370, 0.6296162401, 0.6437432340, 0.6570971404, + 0.6697716039, 0.6818435182, 0.6933768712, 0.7044255353, + 0.7150353340, 0.7252456009, 0.7350903742, 0.7445993259, + 0.7537984929, 0.7627108595, 0.7713568269, 0.7797545943, + 0.7879204712, 0.7958691361, 0.8036138516, 0.8111666444, + 0.8185384580, 0.8257392814, 0.8327782597, 0.8396637886, + 0.8464035955, 0.8530048108, 0.8594740287, 0.8658173611, + 0.8720404845, 0.8781486812, 0.8841468762, 0.8900396688, + 0.8958313620, 0.9015259874, 0.9071273286, 0.9126389413, + 0.9180641715, 0.9234061727, 0.9286679198, 0.9338522236, + 0.9389617420, 0.9439989920, 0.9489663591, 0.9538661069, + 0.9587003852, 0.9634712378, 0.9681806094, 0.9728303524, + 0.9774222323, 0.9819579336, 0.9864390644, 0.9908671615, + 0.9952436943, 0.9995700689, 1.0038476318, 1.0080776733, + 1.0122614305, 1.0164000906, 1.0204947932, 1.0245466331 }, + { 0.5126261246, 0.5338683013, 0.5533029807, 0.5712636181, + 0.5879954388, 0.6036845987, 0.6184760989, 0.6324853169, + 0.6458057215, 0.6585142011, 0.6706748475, 0.6823417062, + 0.6935608163, 0.7043717519, 0.7148088052, 0.7249019070, + 0.7346773529, 0.7441583823, 0.7533656456, 0.7623175831, + 0.7710307376, 0.7795200117, 0.7877988829, 0.7958795841, + 0.8037732557, 0.8114900754, 0.8190393682, 0.8264297018, + 0.8336689680, 0.8407644543, 0.8477229049, 0.8545505751, + 0.8612532786, 0.8678364291, 0.8743050768, 0.8806639416, + 0.8869174414, 0.8930697184, 0.8991246621, 0.9050859297, + 0.9109569648, 0.9167410144, 0.9224411436, 0.9280602496, + 0.9336010737, 0.9390662129, 0.9444581300, 0.9497791628, + 0.9550315328, 0.9602173528, 0.9653386345, 0.9703972943, + 0.9753951600, 0.9803339761, 0.9852154088, 0.9900410510, + 0.9948124263, 0.9995309934, 1.0041981497, 1.0088152348, + 1.0133835335, 1.0179042791, 1.0223786564, 1.0268078035 }, +}; + +#endif /* AVCODEC_WMAVOICE_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2.h new file mode 100644 index 00000000..0f459ae5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMV2_H +#define AVCODEC_WMV2_H + +#include "avcodec.h" +#include "intrax8.h" +#include "mpegvideo.h" +#include "wmv2dsp.h" + +#define SKIP_TYPE_NONE 0 +#define SKIP_TYPE_MPEG 1 +#define SKIP_TYPE_ROW 2 +#define SKIP_TYPE_COL 3 + + +typedef struct Wmv2Context { + MpegEncContext s; + IntraX8Context x8; + WMV2DSPContext wdsp; + int j_type_bit; + int j_type; + int abt_flag; + int abt_type; + int abt_type_table[6]; + int per_mb_abt; + int per_block_abt; + int mspel_bit; + int cbp_table_index; + int top_left_mv_flag; + int per_mb_rl_bit; + int skip_type; + int hshift; + + ScanTable abt_scantable[2]; + DECLARE_ALIGNED(32, int16_t, abt_block2)[6][64]; +} Wmv2Context; + +void ff_wmv2_common_init(Wmv2Context *w); + +int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); +int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); +void ff_wmv2_encode_mb(MpegEncContext * s, int16_t block[6][64], + int motion_x, int motion_y); +int ff_wmv2_decode_picture_header(MpegEncContext * s); +int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); +void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); + +void ff_mspel_motion(MpegEncContext *s, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + uint8_t **ref_picture, op_pixels_func (*pix_op)[4], + int motion_x, int motion_y, int h); + + +static av_always_inline int wmv2_get_cbp_table_index(MpegEncContext *s, int cbp_index) +{ + static const uint8_t map[3][3] = { + { 0, 2, 1 }, + { 1, 0, 2 }, + { 2, 1, 0 }, + }; + + return map[(s->qscale > 10) + (s->qscale > 20)][cbp_index]; +} + +#endif /* AVCODEC_WMV2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2data.h new file mode 100644 index 00000000..178346a7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2data.h @@ -0,0 +1,27 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMV2DATA_H +#define AVCODEC_WMV2DATA_H + +#include + +extern const uint8_t ff_wmv2_scantableA[64]; +extern const uint8_t ff_wmv2_scantableB[64]; + +#endif /* AVCODEC_WMV2DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2dsp.h new file mode 100644 index 00000000..5e40b30a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/wmv2dsp.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_WMV2DSP_H +#define AVCODEC_WMV2DSP_H + +#include + +#include "qpeldsp.h" + +typedef struct WMV2DSPContext { + void (*idct_add)(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + void (*idct_put)(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + + qpel_mc_func put_mspel_pixels_tab[8]; + + int idct_perm; +} WMV2DSPContext; + +void ff_wmv2dsp_init(WMV2DSPContext *c); +void ff_wmv2dsp_init_mips(WMV2DSPContext *c); + +#endif /* AVCODEC_WMV2DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/cabac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/cabac.h new file mode 100644 index 00000000..cfd3b759 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/cabac.h @@ -0,0 +1,301 @@ +/* + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_CABAC_H +#define AVCODEC_X86_CABAC_H + +#include "libavcodec/cabac.h" +#include "libavutil/attributes.h" +#include "libavutil/macros.h" +#include "libavutil/x86/asm.h" +#include "config.h" + +#if (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\ + || ( !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\ + || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) +# define BROKEN_COMPILER 1 +#else +# define BROKEN_COMPILER 0 +#endif + +#if HAVE_INLINE_ASM + +#ifndef UNCHECKED_BITSTREAM_READER +#define UNCHECKED_BITSTREAM_READER !CONFIG_SAFE_BITSTREAM_READER +#endif + +#if UNCHECKED_BITSTREAM_READER +#define END_CHECK(end) "" +#else +#define END_CHECK(end) \ + "cmp "end" , %%"FF_REG_c" \n\t"\ + "jge 1f \n\t" +#endif + +#ifdef BROKEN_RELOCATIONS +#define TABLES_ARG , "r"(tables) + +#if HAVE_FAST_CMOV +#define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \ + "cmp "low" , "tmp" \n\t"\ + "cmova %%ecx , "range" \n\t"\ + "sbb %%rcx , %%rcx \n\t"\ + "and %%ecx , "tmp" \n\t"\ + "xor %%rcx , "retq" \n\t"\ + "sub "tmp" , "low" \n\t" +#else /* HAVE_FAST_CMOV */ +#define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \ +/* P4 Prescott has crappy cmov,sbb,64-bit shift so avoid them */ \ + "sub "low" , "tmp" \n\t"\ + "sar $31 , "tmp" \n\t"\ + "sub %%ecx , "range" \n\t"\ + "and "tmp" , "range" \n\t"\ + "add %%ecx , "range" \n\t"\ + "shl $17 , %%ecx \n\t"\ + "and "tmp" , %%ecx \n\t"\ + "sub %%ecx , "low" \n\t"\ + "xor "tmp" , "ret" \n\t"\ + "movslq "ret" , "retq" \n\t" +#endif /* HAVE_FAST_CMOV */ + +#define BRANCHLESS_GET_CABAC(ret, retq, statep, low, lowword, range, rangeq, tmp, tmpbyte, byte, end, norm_off, lps_off, mlps_off, tables) \ + "movzbl "statep" , "ret" \n\t"\ + "mov "range" , "tmp" \n\t"\ + "and $0xC0 , "range" \n\t"\ + "lea ("ret", "range", 2), %%ecx \n\t"\ + "movzbl "lps_off"("tables", %%rcx), "range" \n\t"\ + "sub "range" , "tmp" \n\t"\ + "mov "tmp" , %%ecx \n\t"\ + "shl $17 , "tmp" \n\t"\ + BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \ + "movzbl "norm_off"("tables", "rangeq"), %%ecx \n\t"\ + "shl %%cl , "range" \n\t"\ + "movzbl "mlps_off"+128("tables", "retq"), "tmp" \n\t"\ + "shl %%cl , "low" \n\t"\ + "mov "tmpbyte" , "statep" \n\t"\ + "test "lowword" , "lowword" \n\t"\ + "jnz 2f \n\t"\ + "mov "byte" , %%"FF_REG_c" \n\t"\ + END_CHECK(end)\ + "add"FF_OPSIZE" $2 , "byte" \n\t"\ + "1: \n\t"\ + "movzwl (%%"FF_REG_c") , "tmp" \n\t"\ + "lea -1("low") , %%ecx \n\t"\ + "xor "low" , %%ecx \n\t"\ + "shr $15 , %%ecx \n\t"\ + "bswap "tmp" \n\t"\ + "shr $15 , "tmp" \n\t"\ + "movzbl "norm_off"("tables", %%rcx), %%ecx \n\t"\ + "sub $0xFFFF , "tmp" \n\t"\ + "neg %%ecx \n\t"\ + "add $7 , %%ecx \n\t"\ + "shl %%cl , "tmp" \n\t"\ + "add "tmp" , "low" \n\t"\ + "2: \n\t" + +#else /* BROKEN_RELOCATIONS */ +#define TABLES_ARG NAMED_CONSTRAINTS_ARRAY_ADD(ff_h264_cabac_tables) +#define RIP_ARG + +#if HAVE_FAST_CMOV +#define BRANCHLESS_GET_CABAC_UPDATE(ret, low, range, tmp)\ + "mov "tmp" , %%ecx \n\t"\ + "shl $17 , "tmp" \n\t"\ + "cmp "low" , "tmp" \n\t"\ + "cmova %%ecx , "range" \n\t"\ + "sbb %%ecx , %%ecx \n\t"\ + "and %%ecx , "tmp" \n\t"\ + "xor %%ecx , "ret" \n\t"\ + "sub "tmp" , "low" \n\t" +#else /* HAVE_FAST_CMOV */ +#define BRANCHLESS_GET_CABAC_UPDATE(ret, low, range, tmp)\ + "mov "tmp" , %%ecx \n\t"\ + "shl $17 , "tmp" \n\t"\ + "sub "low" , "tmp" \n\t"\ + "sar $31 , "tmp" \n\t" /*lps_mask*/\ + "sub %%ecx , "range" \n\t" /*RangeLPS - range*/\ + "and "tmp" , "range" \n\t" /*(RangeLPS - range)&lps_mask*/\ + "add %%ecx , "range" \n\t" /*new range*/\ + "shl $17 , %%ecx \n\t"\ + "and "tmp" , %%ecx \n\t"\ + "sub %%ecx , "low" \n\t"\ + "xor "tmp" , "ret" \n\t" +#endif /* HAVE_FAST_CMOV */ + +#define BRANCHLESS_GET_CABAC(ret, retq, statep, low, lowword, range, rangeq, tmp, tmpbyte, byte, end, norm_off, lps_off, mlps_off, tables) \ + "movzbl "statep" , "ret" \n\t"\ + "mov "range" , "tmp" \n\t"\ + "and $0xC0 , "range" \n\t"\ + "movzbl "MANGLE(ff_h264_cabac_tables)"+"lps_off"("ret", "range", 2), "range" \n\t"\ + "sub "range" , "tmp" \n\t"\ + BRANCHLESS_GET_CABAC_UPDATE(ret, low, range, tmp) \ + "movzbl "MANGLE(ff_h264_cabac_tables)"+"norm_off"("range"), %%ecx \n\t"\ + "shl %%cl , "range" \n\t"\ + "movzbl "MANGLE(ff_h264_cabac_tables)"+"mlps_off"+128("ret"), "tmp" \n\t"\ + "shl %%cl , "low" \n\t"\ + "mov "tmpbyte" , "statep" \n\t"\ + "test "lowword" , "lowword" \n\t"\ + " jnz 2f \n\t"\ + "mov "byte" , %%"FF_REG_c" \n\t"\ + END_CHECK(end)\ + "add"FF_OPSIZE" $2 , "byte" \n\t"\ + "1: \n\t"\ + "movzwl (%%"FF_REG_c") , "tmp" \n\t"\ + "lea -1("low") , %%ecx \n\t"\ + "xor "low" , %%ecx \n\t"\ + "shr $15 , %%ecx \n\t"\ + "bswap "tmp" \n\t"\ + "shr $15 , "tmp" \n\t"\ + "movzbl "MANGLE(ff_h264_cabac_tables)"+"norm_off"(%%ecx), %%ecx \n\t"\ + "sub $0xFFFF , "tmp" \n\t"\ + "neg %%ecx \n\t"\ + "add $7 , %%ecx \n\t"\ + "shl %%cl , "tmp" \n\t"\ + "add "tmp" , "low" \n\t"\ + "2: \n\t" + +#endif /* BROKEN_RELOCATIONS */ + +#if HAVE_7REGS && !BROKEN_COMPILER +#define get_cabac_inline get_cabac_inline_x86 +static av_always_inline int get_cabac_inline_x86(CABACContext *c, + uint8_t *const state) +{ + int bit, tmp; +#ifdef BROKEN_RELOCATIONS + void *tables; + + __asm__ volatile( + "lea "MANGLE(ff_h264_cabac_tables)", %0 \n\t" + : "=&r"(tables) + : NAMED_CONSTRAINTS_ARRAY(ff_h264_cabac_tables) + ); +#endif + + __asm__ volatile( + BRANCHLESS_GET_CABAC("%0", "%q0", "(%4)", "%1", "%w1", + "%2", "%q2", "%3", "%b3", + "%c6(%5)", "%c7(%5)", + AV_STRINGIFY(H264_NORM_SHIFT_OFFSET), + AV_STRINGIFY(H264_LPS_RANGE_OFFSET), + AV_STRINGIFY(H264_MLPS_STATE_OFFSET), + "%8") + : "=&r"(bit), "=&r"(c->low), "=&r"(c->range), "=&q"(tmp) + : "r"(state), "r"(c), + "i"(offsetof(CABACContext, bytestream)), + "i"(offsetof(CABACContext, bytestream_end)) + TABLES_ARG + ,"1"(c->low), "2"(c->range) + : "%"FF_REG_c, "memory" + ); + return bit & 1; +} +#endif /* HAVE_7REGS && !BROKEN_COMPILER */ + +#if !BROKEN_COMPILER +#define get_cabac_bypass_sign get_cabac_bypass_sign_x86 +static av_always_inline int get_cabac_bypass_sign_x86(CABACContext *c, int val) +{ + x86_reg tmp; + __asm__ volatile( + "movl %c6(%2), %k1 \n\t" + "movl %c3(%2), %%eax \n\t" + "shl $17, %k1 \n\t" + "add %%eax, %%eax \n\t" + "sub %k1, %%eax \n\t" + "cdq \n\t" + "and %%edx, %k1 \n\t" + "add %k1, %%eax \n\t" + "xor %%edx, %%ecx \n\t" + "sub %%edx, %%ecx \n\t" + "test %%ax, %%ax \n\t" + "jnz 1f \n\t" + "mov %c4(%2), %1 \n\t" + "subl $0xFFFF, %%eax \n\t" + "movzwl (%1), %%edx \n\t" + "bswap %%edx \n\t" + "shrl $15, %%edx \n\t" +#if UNCHECKED_BITSTREAM_READER + "add $2, %1 \n\t" + "addl %%edx, %%eax \n\t" + "mov %1, %c4(%2) \n\t" +#else + "addl %%edx, %%eax \n\t" + "cmp %c5(%2), %1 \n\t" + "jge 1f \n\t" + "add"FF_OPSIZE" $2, %c4(%2) \n\t" +#endif + "1: \n\t" + "movl %%eax, %c3(%2) \n\t" + + : "+c"(val), "=&r"(tmp) + : "r"(c), + "i"(offsetof(CABACContext, low)), + "i"(offsetof(CABACContext, bytestream)), + "i"(offsetof(CABACContext, bytestream_end)), + "i"(offsetof(CABACContext, range)) + : "%eax", "%edx", "memory" + ); + return val; +} + +#define get_cabac_bypass get_cabac_bypass_x86 +static av_always_inline int get_cabac_bypass_x86(CABACContext *c) +{ + x86_reg tmp; + int res; + __asm__ volatile( + "movl %c6(%2), %k1 \n\t" + "movl %c3(%2), %%eax \n\t" + "shl $17, %k1 \n\t" + "add %%eax, %%eax \n\t" + "sub %k1, %%eax \n\t" + "cdq \n\t" + "and %%edx, %k1 \n\t" + "add %k1, %%eax \n\t" + "inc %%edx \n\t" + "test %%ax, %%ax \n\t" + "jnz 1f \n\t" + "mov %c4(%2), %1 \n\t" + "subl $0xFFFF, %%eax \n\t" + "movzwl (%1), %%ecx \n\t" + "bswap %%ecx \n\t" + "shrl $15, %%ecx \n\t" + "addl %%ecx, %%eax \n\t" + "cmp %c5(%2), %1 \n\t" + "jge 1f \n\t" + "add"FF_OPSIZE" $2, %c4(%2) \n\t" + "1: \n\t" + "movl %%eax, %c3(%2) \n\t" + + : "=&d"(res), "=&r"(tmp) + : "r"(c), + "i"(offsetof(CABACContext, low)), + "i"(offsetof(CABACContext, bytestream)), + "i"(offsetof(CABACContext, bytestream_end)), + "i"(offsetof(CABACContext, range)) + : "%eax", "%ecx", "memory" + ); + return res; +} +#endif /* !BROKEN_COMPILER */ + +#endif /* HAVE_INLINE_ASM */ +#endif /* AVCODEC_X86_CABAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/constants.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/constants.h new file mode 100644 index 00000000..85da38b7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/constants.h @@ -0,0 +1,72 @@ +/* + * MMX/SSE constants used across x86 dsp optimizations. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_CONSTANTS_H +#define AVCODEC_X86_CONSTANTS_H + +#include + +#include "libavutil/x86/asm.h" + +extern const ymm_reg ff_pw_1; +extern const ymm_reg ff_pw_2; +extern const xmm_reg ff_pw_3; +extern const ymm_reg ff_pw_4; +extern const xmm_reg ff_pw_5; +extern const xmm_reg ff_pw_8; +extern const xmm_reg ff_pw_9; +extern const uint64_t ff_pw_15; +extern const xmm_reg ff_pw_16; +extern const xmm_reg ff_pw_18; +extern const xmm_reg ff_pw_20; +extern const xmm_reg ff_pw_32; +extern const uint64_t ff_pw_42; +extern const uint64_t ff_pw_53; +extern const xmm_reg ff_pw_64; +extern const uint64_t ff_pw_96; +extern const uint64_t ff_pw_128; +extern const ymm_reg ff_pw_255; +extern const ymm_reg ff_pw_256; +extern const ymm_reg ff_pw_512; +extern const ymm_reg ff_pw_1023; +extern const ymm_reg ff_pw_1024; +extern const ymm_reg ff_pw_2048; +extern const ymm_reg ff_pw_4095; +extern const ymm_reg ff_pw_4096; +extern const ymm_reg ff_pw_8192; +extern const ymm_reg ff_pw_m1; + +extern const ymm_reg ff_pb_0; +extern const ymm_reg ff_pb_1; +extern const ymm_reg ff_pb_2; +extern const ymm_reg ff_pb_3; +extern const ymm_reg ff_pb_80; +extern const ymm_reg ff_pb_FE; +extern const uint64_t ff_pb_FC; + +extern const xmm_reg ff_ps_neg; + +extern const ymm_reg ff_pd_1; +extern const ymm_reg ff_pd_16; +extern const ymm_reg ff_pd_32; +extern const ymm_reg ff_pd_8192; +extern const ymm_reg ff_pd_65535; + +#endif /* AVCODEC_X86_CONSTANTS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fdct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fdct.h new file mode 100644 index 00000000..648cdc53 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fdct.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_FDCT_H +#define AVCODEC_X86_FDCT_H + +#include + +void ff_fdct_mmx(int16_t *block); +void ff_fdct_mmxext(int16_t *block); +void ff_fdct_sse2(int16_t *block); + +#endif /* AVCODEC_X86_FDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fft.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fft.h new file mode 100644 index 00000000..398091eb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fft.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_FFT_H +#define AVCODEC_X86_FFT_H + +#include "libavcodec/fft.h" + +void ff_fft_permute_sse(FFTContext *s, FFTComplex *z); +void ff_fft_calc_avx(FFTContext *s, FFTComplex *z); +void ff_fft_calc_sse(FFTContext *s, FFTComplex *z); +void ff_fft_calc_3dnow(FFTContext *s, FFTComplex *z); +void ff_fft_calc_3dnowext(FFTContext *s, FFTComplex *z); + +void ff_imdct_calc_3dnow(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_half_3dnow(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_calc_3dnowext(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_half_3dnowext(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_half_sse(FFTContext *s, FFTSample *output, const FFTSample *input); +void ff_imdct_half_avx(FFTContext *s, FFTSample *output, const FFTSample *input); + +#endif /* AVCODEC_X86_FFT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fpel.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fpel.h new file mode 100644 index 00000000..4e83cf71 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/fpel.h @@ -0,0 +1,49 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_FPEL_H +#define AVCODEC_X86_FPEL_H + +#include +#include + +void ff_avg_pixels4_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels4_mmxext(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels8_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels8_mmxext(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels16_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels16_mmxext(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels4_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_sse2(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + + +#endif /* AVCODEC_X86_FPEL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hevcdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hevcdsp.h new file mode 100644 index 00000000..67be0a90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hevcdsp.h @@ -0,0 +1,259 @@ +/* + * HEVC video decoder + * + * Copyright (C) 2012 - 2013 Guillaume Martres + * Copyright (C) 2013 - 2014 Pierre-Edouard Lepere + * + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_HEVCDSP_H +#define AVCODEC_X86_HEVCDSP_H + +#include +#include + + +#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt) \ +dst[idx1][idx2][idx3] = ff_hevc_put_hevc_ ## name ## _ ## D ## _##opt; \ +dst ## _bi[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _##opt; \ +dst ## _uni[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _##opt; \ +dst ## _uni_w[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _##opt; \ +dst ## _bi_w[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _##opt + + +#define PEL_PROTOTYPE(name, D, opt) \ +void ff_hevc_put_hevc_ ## name ## _ ## D ## _##opt(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); \ +void ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); \ +void ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); \ +void ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); \ +void ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width) + + +/////////////////////////////////////////////////////////////////////////////// +// MC functions +/////////////////////////////////////////////////////////////////////////////// + +#define EPEL_PROTOTYPES(fname, bitd, opt) \ + PEL_PROTOTYPE(fname##4, bitd, opt); \ + PEL_PROTOTYPE(fname##6, bitd, opt); \ + PEL_PROTOTYPE(fname##8, bitd, opt); \ + PEL_PROTOTYPE(fname##12, bitd, opt); \ + PEL_PROTOTYPE(fname##16, bitd, opt); \ + PEL_PROTOTYPE(fname##24, bitd, opt); \ + PEL_PROTOTYPE(fname##32, bitd, opt); \ + PEL_PROTOTYPE(fname##48, bitd, opt); \ + PEL_PROTOTYPE(fname##64, bitd, opt) + +#define QPEL_PROTOTYPES(fname, bitd, opt) \ + PEL_PROTOTYPE(fname##4, bitd, opt); \ + PEL_PROTOTYPE(fname##8, bitd, opt); \ + PEL_PROTOTYPE(fname##12, bitd, opt); \ + PEL_PROTOTYPE(fname##16, bitd, opt); \ + PEL_PROTOTYPE(fname##24, bitd, opt); \ + PEL_PROTOTYPE(fname##32, bitd, opt); \ + PEL_PROTOTYPE(fname##48, bitd, opt); \ + PEL_PROTOTYPE(fname##64, bitd, opt) + +#define WEIGHTING_PROTOTYPE(width, bitd, opt) \ +void ff_hevc_put_hevc_uni_w##width##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, int height, int denom, int _wx, int _ox); \ +void ff_hevc_put_hevc_bi_w##width##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, int16_t *_src2, int height, int denom, int _wx0, int _wx1, int _ox0, int _ox1) + +#define WEIGHTING_PROTOTYPES(bitd, opt) \ + WEIGHTING_PROTOTYPE(2, bitd, opt); \ + WEIGHTING_PROTOTYPE(4, bitd, opt); \ + WEIGHTING_PROTOTYPE(6, bitd, opt); \ + WEIGHTING_PROTOTYPE(8, bitd, opt); \ + WEIGHTING_PROTOTYPE(12, bitd, opt); \ + WEIGHTING_PROTOTYPE(16, bitd, opt); \ + WEIGHTING_PROTOTYPE(24, bitd, opt); \ + WEIGHTING_PROTOTYPE(32, bitd, opt); \ + WEIGHTING_PROTOTYPE(48, bitd, opt); \ + WEIGHTING_PROTOTYPE(64, bitd, opt) + + +/////////////////////////////////////////////////////////////////////////////// +// QPEL_PIXELS EPEL_PIXELS +/////////////////////////////////////////////////////////////////////////////// +EPEL_PROTOTYPES(pel_pixels , 8, sse4); +EPEL_PROTOTYPES(pel_pixels , 10, sse4); +EPEL_PROTOTYPES(pel_pixels , 12, sse4); + +void ff_hevc_put_hevc_pel_pixels16_8_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels24_8_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels32_8_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels48_8_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels64_8_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); + +void ff_hevc_put_hevc_pel_pixels16_10_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels24_10_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels32_10_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels48_10_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_pel_pixels64_10_avx2(int16_t *dst, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); + + + +void ff_hevc_put_hevc_uni_pel_pixels32_8_avx2(uint8_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_uni_pel_pixels48_8_avx2(uint8_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_uni_pel_pixels64_8_avx2(uint8_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); +void ff_hevc_put_hevc_uni_pel_pixels96_8_avx2(uint8_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); //used for 10bit +void ff_hevc_put_hevc_uni_pel_pixels128_8_avx2(uint8_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width);//used for 10bit + + +void ff_hevc_put_hevc_bi_pel_pixels16_8_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels24_8_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels32_8_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels48_8_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels64_8_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); + +void ff_hevc_put_hevc_bi_pel_pixels16_10_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels24_10_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels32_10_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels48_10_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); +void ff_hevc_put_hevc_bi_pel_pixels64_10_avx2(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, int height, intptr_t mx, intptr_t my, int width); + +/////////////////////////////////////////////////////////////////////////////// +// EPEL +/////////////////////////////////////////////////////////////////////////////// +EPEL_PROTOTYPES(epel_h , 8, sse4); +EPEL_PROTOTYPES(epel_h , 10, sse4); +EPEL_PROTOTYPES(epel_h , 12, sse4); + +EPEL_PROTOTYPES(epel_v , 8, sse4); +EPEL_PROTOTYPES(epel_v , 10, sse4); +EPEL_PROTOTYPES(epel_v , 12, sse4); + +EPEL_PROTOTYPES(epel_hv , 8, sse4); +EPEL_PROTOTYPES(epel_hv , 10, sse4); +EPEL_PROTOTYPES(epel_hv , 12, sse4); + +PEL_PROTOTYPE(epel_h16, 8, avx2); +PEL_PROTOTYPE(epel_h24, 8, avx2); +PEL_PROTOTYPE(epel_h32, 8, avx2); +PEL_PROTOTYPE(epel_h48, 8, avx2); +PEL_PROTOTYPE(epel_h64, 8, avx2); + +PEL_PROTOTYPE(epel_h16,10, avx2); +PEL_PROTOTYPE(epel_h24,10, avx2); +PEL_PROTOTYPE(epel_h32,10, avx2); +PEL_PROTOTYPE(epel_h48,10, avx2); +PEL_PROTOTYPE(epel_h64,10, avx2); + +PEL_PROTOTYPE(epel_v16, 8, avx2); +PEL_PROTOTYPE(epel_v24, 8, avx2); +PEL_PROTOTYPE(epel_v32, 8, avx2); +PEL_PROTOTYPE(epel_v48, 8, avx2); +PEL_PROTOTYPE(epel_v64, 8, avx2); + +PEL_PROTOTYPE(epel_v16,10, avx2); +PEL_PROTOTYPE(epel_v24,10, avx2); +PEL_PROTOTYPE(epel_v32,10, avx2); +PEL_PROTOTYPE(epel_v48,10, avx2); +PEL_PROTOTYPE(epel_v64,10, avx2); + +PEL_PROTOTYPE(epel_hv16, 8, avx2); +PEL_PROTOTYPE(epel_hv24, 8, avx2); +PEL_PROTOTYPE(epel_hv32, 8, avx2); +PEL_PROTOTYPE(epel_hv48, 8, avx2); +PEL_PROTOTYPE(epel_hv64, 8, avx2); + +PEL_PROTOTYPE(epel_hv16,10, avx2); +PEL_PROTOTYPE(epel_hv24,10, avx2); +PEL_PROTOTYPE(epel_hv32,10, avx2); +PEL_PROTOTYPE(epel_hv48,10, avx2); +PEL_PROTOTYPE(epel_hv64,10, avx2); + +/////////////////////////////////////////////////////////////////////////////// +// QPEL +/////////////////////////////////////////////////////////////////////////////// +QPEL_PROTOTYPES(qpel_h , 8, sse4); +QPEL_PROTOTYPES(qpel_h , 10, sse4); +QPEL_PROTOTYPES(qpel_h , 12, sse4); + +QPEL_PROTOTYPES(qpel_v, 8, sse4); +QPEL_PROTOTYPES(qpel_v, 10, sse4); +QPEL_PROTOTYPES(qpel_v, 12, sse4); + +QPEL_PROTOTYPES(qpel_hv, 8, sse4); +QPEL_PROTOTYPES(qpel_hv, 10, sse4); +QPEL_PROTOTYPES(qpel_hv, 12, sse4); + +PEL_PROTOTYPE(qpel_h16, 8, avx2); +PEL_PROTOTYPE(qpel_h24, 8, avx2); +PEL_PROTOTYPE(qpel_h32, 8, avx2); +PEL_PROTOTYPE(qpel_h48, 8, avx2); +PEL_PROTOTYPE(qpel_h64, 8, avx2); + +PEL_PROTOTYPE(qpel_h16,10, avx2); +PEL_PROTOTYPE(qpel_h24,10, avx2); +PEL_PROTOTYPE(qpel_h32,10, avx2); +PEL_PROTOTYPE(qpel_h48,10, avx2); +PEL_PROTOTYPE(qpel_h64,10, avx2); + +PEL_PROTOTYPE(qpel_v16, 8, avx2); +PEL_PROTOTYPE(qpel_v24, 8, avx2); +PEL_PROTOTYPE(qpel_v32, 8, avx2); +PEL_PROTOTYPE(qpel_v48, 8, avx2); +PEL_PROTOTYPE(qpel_v64, 8, avx2); + +PEL_PROTOTYPE(qpel_v16,10, avx2); +PEL_PROTOTYPE(qpel_v24,10, avx2); +PEL_PROTOTYPE(qpel_v32,10, avx2); +PEL_PROTOTYPE(qpel_v48,10, avx2); +PEL_PROTOTYPE(qpel_v64,10, avx2); + +PEL_PROTOTYPE(qpel_hv16, 8, avx2); +PEL_PROTOTYPE(qpel_hv24, 8, avx2); +PEL_PROTOTYPE(qpel_hv32, 8, avx2); +PEL_PROTOTYPE(qpel_hv48, 8, avx2); +PEL_PROTOTYPE(qpel_hv64, 8, avx2); + +PEL_PROTOTYPE(qpel_hv16,10, avx2); +PEL_PROTOTYPE(qpel_hv24,10, avx2); +PEL_PROTOTYPE(qpel_hv32,10, avx2); +PEL_PROTOTYPE(qpel_hv48,10, avx2); +PEL_PROTOTYPE(qpel_hv64,10, avx2); + +WEIGHTING_PROTOTYPES(8, sse4); +WEIGHTING_PROTOTYPES(10, sse4); +WEIGHTING_PROTOTYPES(12, sse4); + +/////////////////////////////////////////////////////////////////////////////// +// TRANSFORM_ADD +/////////////////////////////////////////////////////////////////////////////// + +void ff_hevc_add_residual_4_8_mmxext(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_8_8_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_16_8_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_32_8_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); + +void ff_hevc_add_residual_8_8_avx(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_16_8_avx(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_32_8_avx(uint8_t *dst, int16_t *res, ptrdiff_t stride); + +void ff_hevc_add_residual_32_8_avx2(uint8_t *dst, int16_t *res, ptrdiff_t stride); + +void ff_hevc_add_residual_4_10_mmxext(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_8_10_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_16_10_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_32_10_sse2(uint8_t *dst, int16_t *res, ptrdiff_t stride); + +void ff_hevc_add_residual_16_10_avx2(uint8_t *dst, int16_t *res, ptrdiff_t stride); +void ff_hevc_add_residual_32_10_avx2(uint8_t *dst, int16_t *res, ptrdiff_t stride); + +#endif // AVCODEC_X86_HEVCDSP_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hpeldsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hpeldsp.h new file mode 100644 index 00000000..bf97029b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/hpeldsp.h @@ -0,0 +1,57 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_HPELDSP_H +#define AVCODEC_X86_HPELDSP_H + +#include +#include + +#include "libavcodec/hpeldsp.h" + +void ff_avg_pixels8_x2_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +void ff_avg_pixels8_xy2_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels8_xy2_mmxext(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels8_xy2_ssse3(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +void ff_avg_pixels16_xy2_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels16_xy2_sse2(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_avg_pixels16_xy2_ssse3(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +void ff_put_pixels8_xy2_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels8_xy2_ssse3(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_xy2_mmx(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_xy2_sse2(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); +void ff_put_pixels16_xy2_ssse3(uint8_t *block, const uint8_t *pixels, + ptrdiff_t line_size, int h); + +void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags); + +#endif /* AVCODEC_X86_HPELDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/idctdsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/idctdsp.h new file mode 100644 index 00000000..0d0bdb5f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/idctdsp.h @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_IDCTDSP_H +#define AVCODEC_X86_IDCTDSP_H + +#include +#include + +void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +void ff_add_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +void ff_put_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); +void ff_put_signed_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels, + ptrdiff_t line_size); + + +#endif /* AVCODEC_X86_IDCTDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/inline_asm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/inline_asm.h new file mode 100644 index 00000000..01987467 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/inline_asm.h @@ -0,0 +1,100 @@ +/* + * inline assembly helper macros + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_INLINE_ASM_H +#define AVCODEC_X86_INLINE_ASM_H + +#include "constants.h" + +#define MOVQ_WONE(regd) \ + __asm__ volatile ( \ + "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ + "psrlw $15, %%" #regd ::) + +#define JUMPALIGN() __asm__ volatile (".p2align 3"::) +#define MOVQ_ZERO(regd) __asm__ volatile ("pxor %%"#regd", %%"#regd ::) + +#define MOVQ_BFE(regd) \ + __asm__ volatile ( \ + "pcmpeqd %%"#regd", %%"#regd" \n\t" \ + "paddb %%"#regd", %%"#regd" \n\t" ::) + +#ifndef PIC +#define MOVQ_WTWO(regd) __asm__ volatile ("movq %0, %%"#regd" \n\t" :: "m"(ff_pw_2)) +#else +// for shared library it's better to use this way for accessing constants +// pcmpeqd -> -1 +#define MOVQ_WTWO(regd) \ + __asm__ volatile ( \ + "pcmpeqd %%"#regd", %%"#regd" \n\t" \ + "psrlw $15, %%"#regd" \n\t" \ + "psllw $1, %%"#regd" \n\t"::) + +#endif + +// using regr as temporary and for the output result +// first argument is unmodified and second is trashed +// regfe is supposed to contain 0xfefefefefefefefe +#define PAVGB_MMX_NO_RND(rega, regb, regr, regfe) \ + "movq "#rega", "#regr" \n\t" \ + "pand "#regb", "#regr" \n\t" \ + "pxor "#rega", "#regb" \n\t" \ + "pand "#regfe", "#regb" \n\t" \ + "psrlq $1, "#regb" \n\t" \ + "paddb "#regb", "#regr" \n\t" + +#define PAVGB_MMX(rega, regb, regr, regfe) \ + "movq "#rega", "#regr" \n\t" \ + "por "#regb", "#regr" \n\t" \ + "pxor "#rega", "#regb" \n\t" \ + "pand "#regfe", "#regb" \n\t" \ + "psrlq $1, "#regb" \n\t" \ + "psubb "#regb", "#regr" \n\t" + +// mm6 is supposed to contain 0xfefefefefefefefe +#define PAVGBP_MMX_NO_RND(rega, regb, regr, regc, regd, regp) \ + "movq "#rega", "#regr" \n\t" \ + "movq "#regc", "#regp" \n\t" \ + "pand "#regb", "#regr" \n\t" \ + "pand "#regd", "#regp" \n\t" \ + "pxor "#rega", "#regb" \n\t" \ + "pxor "#regc", "#regd" \n\t" \ + "pand %%mm6, "#regb" \n\t" \ + "pand %%mm6, "#regd" \n\t" \ + "psrlq $1, "#regb" \n\t" \ + "psrlq $1, "#regd" \n\t" \ + "paddb "#regb", "#regr" \n\t" \ + "paddb "#regd", "#regp" \n\t" + +#define PAVGBP_MMX(rega, regb, regr, regc, regd, regp) \ + "movq "#rega", "#regr" \n\t" \ + "movq "#regc", "#regp" \n\t" \ + "por "#regb", "#regr" \n\t" \ + "por "#regd", "#regp" \n\t" \ + "pxor "#rega", "#regb" \n\t" \ + "pxor "#regc", "#regd" \n\t" \ + "pand %%mm6, "#regb" \n\t" \ + "pand %%mm6, "#regd" \n\t" \ + "psrlq $1, "#regd" \n\t" \ + "psrlq $1, "#regb" \n\t" \ + "psubb "#regb", "#regr" \n\t" \ + "psubb "#regd", "#regp" \n\t" + +#endif /* AVCODEC_X86_INLINE_ASM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/mathops.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/mathops.h new file mode 100644 index 00000000..6298f5ed --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/mathops.h @@ -0,0 +1,133 @@ +/* + * simple math operations + * Copyright (c) 2006 Michael Niedermayer et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_MATHOPS_H +#define AVCODEC_X86_MATHOPS_H + +#include "config.h" + +#include "libavutil/common.h" +#include "libavutil/x86/asm.h" + +#if HAVE_INLINE_ASM + +#if ARCH_X86_32 + +#define MULL MULL +static av_always_inline av_const int MULL(int a, int b, unsigned shift) +{ + int rt, dummy; + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) + :"a"(a), "rm"(b), "ci"((uint8_t)shift) + ); + return rt; +} + +#define MULH MULH +static av_always_inline av_const int MULH(int a, int b) +{ + int rt, dummy; + __asm__ ( + "imull %3" + :"=d"(rt), "=a"(dummy) + :"a"(a), "rm"(b) + ); + return rt; +} + +#define MUL64 MUL64 +static av_always_inline av_const int64_t MUL64(int a, int b) +{ + int64_t rt; + __asm__ ( + "imull %2" + :"=A"(rt) + :"a"(a), "rm"(b) + ); + return rt; +} + +#endif /* ARCH_X86_32 */ + +#if HAVE_I686 +/* median of 3 */ +#define mid_pred mid_pred +static inline av_const int mid_pred(int a, int b, int c) +{ + int i=b; + __asm__ ( + "cmp %2, %1 \n\t" + "cmovg %1, %0 \n\t" + "cmovg %2, %1 \n\t" + "cmp %3, %1 \n\t" + "cmovl %3, %1 \n\t" + "cmp %1, %0 \n\t" + "cmovg %1, %0 \n\t" + :"+&r"(i), "+&r"(a) + :"r"(b), "r"(c) + ); + return i; +} + +#if HAVE_6REGS +#define COPY3_IF_LT(x, y, a, b, c, d)\ +__asm__ volatile(\ + "cmpl %0, %3 \n\t"\ + "cmovl %3, %0 \n\t"\ + "cmovl %4, %1 \n\t"\ + "cmovl %5, %2 \n\t"\ + : "+&r" (x), "+&r" (a), "+r" (c)\ + : "r" (y), "r" (b), "r" (d)\ +); +#endif /* HAVE_6REGS */ + +#endif /* HAVE_I686 */ + +#define MASK_ABS(mask, level) \ + __asm__ ("cdq \n\t" \ + "xorl %1, %0 \n\t" \ + "subl %1, %0 \n\t" \ + : "+a"(level), "=&d"(mask)) + +// avoid +32 for shift optimization (gcc should do that ...) +#define NEG_SSR32 NEG_SSR32 +static inline int32_t NEG_SSR32( int32_t a, int8_t s){ + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) + : "ic" ((uint8_t)(-s)) + ); + return a; +} + +#define NEG_USR32 NEG_USR32 +static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) + : "ic" ((uint8_t)(-s)) + ); + return a; +} + +#endif /* HAVE_INLINE_ASM */ +#endif /* AVCODEC_X86_MATHOPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/simple_idct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/simple_idct.h new file mode 100644 index 00000000..9b64cfe9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/simple_idct.h @@ -0,0 +1,53 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_SIMPLE_IDCT_H +#define AVCODEC_X86_SIMPLE_IDCT_H + +#include +#include + +void ff_simple_idct_mmx(int16_t *block); +void ff_simple_idct_add_mmx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_put_mmx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct_add_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct8_sse2(int16_t *block); +void ff_simple_idct8_avx(int16_t *block); + +void ff_simple_idct8_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct8_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct8_add_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct8_add_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct10_sse2(int16_t *block); +void ff_simple_idct10_avx(int16_t *block); + +void ff_simple_idct10_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct10_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_simple_idct12_sse2(int16_t *block); +void ff_simple_idct12_avx(int16_t *block); + +void ff_simple_idct12_put_sse2(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_simple_idct12_put_avx(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +#endif /* AVCODEC_X86_SIMPLE_IDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vc1dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vc1dsp.h new file mode 100644 index 00000000..fdd4de18 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vc1dsp.h @@ -0,0 +1,29 @@ +/* + * VC-1 and WMV3 decoder - X86 DSP init functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_VC1DSP_H +#define AVCODEC_X86_VC1DSP_H + +#include "libavcodec/vc1dsp.h" + +void ff_vc1dsp_init_mmx(VC1DSPContext *dsp); +void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp); + +#endif /* AVCODEC_X86_VC1DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp56_arith.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp56_arith.h new file mode 100644 index 00000000..810cc8dc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp56_arith.h @@ -0,0 +1,51 @@ +/** + * VP5 and VP6 compatible video decoder (arith decoder) + * + * Copyright (C) 2006 Aurelien Jacobs + * Copyright (C) 2010 Eli Friedman + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_VP56_ARITH_H +#define AVCODEC_X86_VP56_ARITH_H + +#if HAVE_INLINE_ASM && HAVE_FAST_CMOV && HAVE_6REGS +#define vp56_rac_get_prob vp56_rac_get_prob +static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) +{ + unsigned int code_word = vp56_rac_renorm(c); + unsigned int low = 1 + (((c->high - 1) * prob) >> 8); + unsigned int low_shift = low << 16; + int bit = 0; + c->code_word = code_word; + + __asm__( + "subl %4, %1 \n\t" + "subl %3, %2 \n\t" + "setae %b0 \n\t" + "cmovb %4, %1 \n\t" + "cmovb %5, %2 \n\t" + : "+q"(bit), "+&r"(c->high), "+&r"(c->code_word) + : "r"(low_shift), "r"(low), "r"(code_word) + ); + + return bit; +} +#endif + +#endif /* AVCODEC_X86_VP56_ARITH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp9dsp_init.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp9dsp_init.h new file mode 100644 index 00000000..e410cab3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/vp9dsp_init.h @@ -0,0 +1,189 @@ +/* + * VP9 SIMD optimizations + * + * Copyright (c) 2013 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_X86_VP9DSP_INIT_H +#define AVCODEC_X86_VP9DSP_INIT_H + +#include "libavcodec/vp9dsp.h" + +// hack to force-expand BPC +#define cat(a, bpp, b) a##bpp##b + +#define decl_fpel_func(avg, sz, bpp, opt) \ +void ff_vp9_##avg##sz##bpp##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ + int h, int mx, int my) + +#define decl_mc_func(avg, sz, dir, opt, type, f_sz, bpp) \ +void ff_vp9_##avg##_8tap_1d_##dir##_##sz##_##bpp##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ + int h, const type (*filter)[f_sz]) + +#define decl_mc_funcs(sz, opt, type, fsz, bpp) \ +decl_mc_func(put, sz, h, opt, type, fsz, bpp); \ +decl_mc_func(avg, sz, h, opt, type, fsz, bpp); \ +decl_mc_func(put, sz, v, opt, type, fsz, bpp); \ +decl_mc_func(avg, sz, v, opt, type, fsz, bpp) + +#define decl_ipred_fn(type, sz, bpp, opt) \ +void ff_vp9_ipred_##type##_##sz##x##sz##_##bpp##_##opt(uint8_t *dst, \ + ptrdiff_t stride, \ + const uint8_t *l, \ + const uint8_t *a) + +#define decl_ipred_fns(type, bpp, opt4, opt8_16_32) \ +decl_ipred_fn(type, 4, bpp, opt4); \ +decl_ipred_fn(type, 8, bpp, opt8_16_32); \ +decl_ipred_fn(type, 16, bpp, opt8_16_32); \ +decl_ipred_fn(type, 32, bpp, opt8_16_32) + +#define decl_itxfm_func(typea, typeb, size, bpp, opt) \ +void cat(ff_vp9_##typea##_##typeb##_##size##x##size##_add_, bpp, _##opt)(uint8_t *dst, \ + ptrdiff_t stride, \ + int16_t *block, \ + int eob) + +#define decl_itxfm_funcs(size, bpp, opt) \ +decl_itxfm_func(idct, idct, size, bpp, opt); \ +decl_itxfm_func(iadst, idct, size, bpp, opt); \ +decl_itxfm_func(idct, iadst, size, bpp, opt); \ +decl_itxfm_func(iadst, iadst, size, bpp, opt) + +#define mc_rep_func(avg, sz, hsz, hszb, dir, opt, type, f_sz, bpp) \ +static av_always_inline void \ +ff_vp9_##avg##_8tap_1d_##dir##_##sz##_##bpp##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ + int h, const type (*filter)[f_sz]) \ +{ \ + ff_vp9_##avg##_8tap_1d_##dir##_##hsz##_##bpp##_##opt(dst, dst_stride, src, \ + src_stride, h, filter); \ + ff_vp9_##avg##_8tap_1d_##dir##_##hsz##_##bpp##_##opt(dst + hszb, dst_stride, src + hszb, \ + src_stride, h, filter); \ +} + +#define mc_rep_funcs(sz, hsz, hszb, opt, type, fsz, bpp) \ +mc_rep_func(put, sz, hsz, hszb, h, opt, type, fsz, bpp) \ +mc_rep_func(avg, sz, hsz, hszb, h, opt, type, fsz, bpp) \ +mc_rep_func(put, sz, hsz, hszb, v, opt, type, fsz, bpp) \ +mc_rep_func(avg, sz, hsz, hszb, v, opt, type, fsz, bpp) + +#define filter_8tap_1d_fn(op, sz, f, f_opt, fname, dir, dvar, bpp, opt) \ +static void op##_8tap_##fname##_##sz##dir##_##bpp##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ + int h, int mx, int my) \ +{ \ + ff_vp9_##op##_8tap_1d_##dir##_##sz##_##bpp##_##opt(dst, dst_stride, src, src_stride, \ + h, ff_filters_##f_opt[f][dvar - 1]); \ +} + +#define filters_8tap_1d_fn(op, sz, dir, dvar, bpp, opt, f_opt) \ +filter_8tap_1d_fn(op, sz, FILTER_8TAP_REGULAR, f_opt, regular, dir, dvar, bpp, opt) \ +filter_8tap_1d_fn(op, sz, FILTER_8TAP_SHARP, f_opt, sharp, dir, dvar, bpp, opt) \ +filter_8tap_1d_fn(op, sz, FILTER_8TAP_SMOOTH, f_opt, smooth, dir, dvar, bpp, opt) + +#define filters_8tap_1d_fn2(op, sz, bpp, opt, f_opt) \ +filters_8tap_1d_fn(op, sz, h, mx, bpp, opt, f_opt) \ +filters_8tap_1d_fn(op, sz, v, my, bpp, opt, f_opt) + +#define filters_8tap_1d_fn3(op, bpp, opt4, opt8, f_opt) \ +filters_8tap_1d_fn2(op, 64, bpp, opt8, f_opt) \ +filters_8tap_1d_fn2(op, 32, bpp, opt8, f_opt) \ +filters_8tap_1d_fn2(op, 16, bpp, opt8, f_opt) \ +filters_8tap_1d_fn2(op, 8, bpp, opt8, f_opt) \ +filters_8tap_1d_fn2(op, 4, bpp, opt4, f_opt) + +#define filter_8tap_2d_fn(op, sz, f, f_opt, fname, align, bpp, bytes, opt) \ +static void op##_8tap_##fname##_##sz##hv_##bpp##_##opt(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, \ + int h, int mx, int my) \ +{ \ + LOCAL_ALIGNED_##align(uint8_t, temp, [71 * 64 * bytes]); \ + ff_vp9_put_8tap_1d_h_##sz##_##bpp##_##opt(temp, 64 * bytes, src - 3 * src_stride, \ + src_stride, h + 7, \ + ff_filters_##f_opt[f][mx - 1]); \ + ff_vp9_##op##_8tap_1d_v_##sz##_##bpp##_##opt(dst, dst_stride, temp + 3 * bytes * 64, \ + 64 * bytes, h, \ + ff_filters_##f_opt[f][my - 1]); \ +} + +#define filters_8tap_2d_fn(op, sz, align, bpp, bytes, opt, f_opt) \ +filter_8tap_2d_fn(op, sz, FILTER_8TAP_REGULAR, f_opt, regular, align, bpp, bytes, opt) \ +filter_8tap_2d_fn(op, sz, FILTER_8TAP_SHARP, f_opt, sharp, align, bpp, bytes, opt) \ +filter_8tap_2d_fn(op, sz, FILTER_8TAP_SMOOTH, f_opt, smooth, align, bpp, bytes, opt) + +#define filters_8tap_2d_fn2(op, align, bpp, bytes, opt4, opt8, f_opt) \ +filters_8tap_2d_fn(op, 64, align, bpp, bytes, opt8, f_opt) \ +filters_8tap_2d_fn(op, 32, align, bpp, bytes, opt8, f_opt) \ +filters_8tap_2d_fn(op, 16, align, bpp, bytes, opt8, f_opt) \ +filters_8tap_2d_fn(op, 8, align, bpp, bytes, opt8, f_opt) \ +filters_8tap_2d_fn(op, 4, align, bpp, bytes, opt4, f_opt) + +#define init_fpel_func(idx1, idx2, sz, type, bpp, opt) \ + dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \ + dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \ + dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0][0] = \ + dsp->mc[idx1][FILTER_BILINEAR ][idx2][0][0] = ff_vp9_##type##sz##bpp##_##opt + +#define init_subpel1(idx1, idx2, idxh, idxv, sz, dir, type, bpp, opt) \ + dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][idxh][idxv] = \ + type##_8tap_smooth_##sz##dir##_##bpp##_##opt; \ + dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][idxh][idxv] = \ + type##_8tap_regular_##sz##dir##_##bpp##_##opt; \ + dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][idxh][idxv] = \ + type##_8tap_sharp_##sz##dir##_##bpp##_##opt + +#define init_subpel2(idx1, idx2, sz, type, bpp, opt) \ + init_subpel1(idx1, idx2, 1, 1, sz, hv, type, bpp, opt); \ + init_subpel1(idx1, idx2, 0, 1, sz, v, type, bpp, opt); \ + init_subpel1(idx1, idx2, 1, 0, sz, h, type, bpp, opt) + +#define init_subpel3_32_64(idx, type, bpp, opt) \ + init_subpel2(0, idx, 64, type, bpp, opt); \ + init_subpel2(1, idx, 32, type, bpp, opt) + +#define init_subpel3_8to64(idx, type, bpp, opt) \ + init_subpel3_32_64(idx, type, bpp, opt); \ + init_subpel2(2, idx, 16, type, bpp, opt); \ + init_subpel2(3, idx, 8, type, bpp, opt) + +#define init_subpel3(idx, type, bpp, opt) \ + init_subpel3_8to64(idx, type, bpp, opt); \ + init_subpel2(4, idx, 4, type, bpp, opt) + +#define init_ipred_func(type, enum, sz, bpp, opt) \ + dsp->intra_pred[TX_##sz##X##sz][enum##_PRED] = \ + cat(ff_vp9_ipred_##type##_##sz##x##sz##_, bpp, _##opt) + +#define init_8_16_32_ipred_funcs(type, enum, bpp, opt) \ + init_ipred_func(type, enum, 8, bpp, opt); \ + init_ipred_func(type, enum, 16, bpp, opt); \ + init_ipred_func(type, enum, 32, bpp, opt) + +#define init_ipred_funcs(type, enum, bpp, opt) \ + init_ipred_func(type, enum, 4, bpp, opt); \ + init_8_16_32_ipred_funcs(type, enum, bpp, opt) + +void ff_vp9dsp_init_10bpp_x86(VP9DSPContext *dsp, int bitexact); +void ff_vp9dsp_init_12bpp_x86(VP9DSPContext *dsp, int bitexact); +void ff_vp9dsp_init_16bpp_x86(VP9DSPContext *dsp); + +#endif /* AVCODEC_X86_VP9DSP_INIT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/xvididct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/xvididct.h new file mode 100644 index 00000000..edb5ebfd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/x86/xvididct.h @@ -0,0 +1,44 @@ +/* + * XVID MPEG-4 VIDEO CODEC + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * header for Xvid IDCT functions + */ + +#ifndef AVCODEC_X86_XVIDIDCT_H +#define AVCODEC_X86_XVIDIDCT_H + +#include +#include + +void ff_xvid_idct_mmx(short *block); +void ff_xvid_idct_mmx_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_xvid_idct_mmx_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_xvid_idct_mmxext(short *block); +void ff_xvid_idct_mmxext_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); +void ff_xvid_idct_mmxext_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); + +void ff_xvid_idct_sse2(short *block); +void ff_xvid_idct_put_sse2(uint8_t *dest, ptrdiff_t line_size, short *block); +void ff_xvid_idct_add_sse2(uint8_t *dest, ptrdiff_t line_size, short *block); + +#endif /* AVCODEC_X86_XVIDIDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xface.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xface.h new file mode 100644 index 00000000..d366fdb1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xface.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 1990 James Ashton - Sydney University + * Copyright (c) 2012 Stefano Sabatini + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * X-Face common definitions. + */ + +#ifndef AVCODEC_XFACE_H +#define AVCODEC_XFACE_H + +#include + +/* define the face size - 48x48x1 */ +#define XFACE_WIDTH 48 +#define XFACE_HEIGHT 48 +#define XFACE_PIXELS (XFACE_WIDTH * XFACE_HEIGHT) + +/* compressed output uses the full range of printable characters. + * In ASCII these are in a contiguous block so we just need to know + * the first and last. The total number of printables is needed too. */ +#define XFACE_FIRST_PRINT '!' +#define XFACE_LAST_PRINT '~' +#define XFACE_PRINTS (XFACE_LAST_PRINT - XFACE_FIRST_PRINT + 1) + +/* + * Image is encoded as a big integer, using characters from '~' to + * '!', for a total of 94 symbols. In order to express + * 48x48 pixels with the worst case encoding 666 symbols should + * be sufficient. + */ +#define XFACE_MAX_DIGITS 666 + +#define XFACE_BITSPERWORD 8 +#define XFACE_WORDCARRY (1 << XFACE_BITSPERWORD) +#define XFACE_WORDMASK (XFACE_WORDCARRY - 1) + +// This must be larger or equal to log256(94^XFACE_MAX_DIGITS) +#define XFACE_MAX_WORDS 546 + +/* Portable, very large unsigned integer arithmetic is needed. + * Implementation uses arrays of WORDs. */ +typedef struct { + int nb_words; + uint8_t words[XFACE_MAX_WORDS]; +} BigInt; + +/** + * Add a to b storing the result in b. + */ +void ff_big_add(BigInt *b, uint8_t a); + +/** + * Divide b by a storing the result in b and the remainder in the word + * pointed to by r. + */ +void ff_big_div(BigInt *b, uint8_t a, uint8_t *r); + +/** + * Multiply a by b storing the result in b. + */ +void ff_big_mul(BigInt *b, uint8_t a); + +/* Each face is encoded using 9 octrees of 16x16 each. Each level of the + * trees has varying probabilities of being white, grey or black. + * The table below is based on sampling many faces */ +enum XFaceColor { XFACE_COLOR_BLACK = 0, XFACE_COLOR_GREY, XFACE_COLOR_WHITE }; + +/* Data of varying probabilities are encoded by a value in the range 0 - 255. + * The probability of the data determines the range of possible encodings. + * Offset gives the first possible encoding of the range. */ +typedef struct { + uint8_t range; + uint8_t offset; +} ProbRange; + +extern const ProbRange ff_xface_probranges_per_level[4][3]; + +extern const ProbRange ff_xface_probranges_2x2[16]; + +void ff_xface_generate_face(uint8_t *dst, uint8_t * const src); + +#endif /* AVCODEC_XFACE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xiph.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xiph.h new file mode 100644 index 00000000..1741a51b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xiph.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2007 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_XIPH_H +#define AVCODEC_XIPH_H + +#include "libavutil/common.h" + +/** + * Split a single extradata buffer into the three headers that most + * Xiph codecs use. (e.g. Theora and Vorbis) + * Works both with Matroska's packing and lavc's packing. + * + * @param[in] extradata The single chunk that combines all three headers + * @param[in] extradata_size The size of the extradata buffer + * @param[in] first_header_size The size of the first header, used to + * differentiate between the Matroska packing and lavc packing. + * @param[out] header_start Pointers to the start of the three separate headers. + * @param[out] header_len The sizes of each of the three headers. + * @return On error a negative value is returned, on success zero. + */ +int avpriv_split_xiph_headers(const uint8_t *extradata, int extradata_size, + int first_header_size, const uint8_t *header_start[3], + int header_len[3]); + +#endif /* AVCODEC_XIPH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvididct.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvididct.h new file mode 100644 index 00000000..e0bc1a2b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvididct.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_XVIDIDCT_H +#define AVCODEC_XVIDIDCT_H + +#include + +#include "avcodec.h" +#include "idctdsp.h" + +void ff_xvid_idct(int16_t *const in); + +void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx); + +void ff_xvid_idct_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); +void ff_xvid_idct_init_mips(IDCTDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth); + +#endif /* AVCODEC_XVIDIDCT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc.h new file mode 100644 index 00000000..465ee78d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc.h @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2003 Ivan Kalvachev + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_XVMC_H +#define AVCODEC_XVMC_H + +/** + * @file + * @ingroup lavc_codec_hwaccel_xvmc + * Public libavcodec XvMC header. + */ + +#include + +#include "libavutil/attributes.h" +#include "version.h" +#include "avcodec.h" + +/** + * @defgroup lavc_codec_hwaccel_xvmc XvMC + * @ingroup lavc_codec_hwaccel + * + * @{ + */ + +#define AV_XVMC_ID 0x1DC711C0 /**< special value to ensure that regular pixel routines haven't corrupted the struct + the number is 1337 speak for the letters IDCT MCo (motion compensation) */ + +struct attribute_deprecated xvmc_pix_fmt { + /** The field contains the special constant value AV_XVMC_ID. + It is used as a test that the application correctly uses the API, + and that there is no corruption caused by pixel routines. + - application - set during initialization + - libavcodec - unchanged + */ + int xvmc_id; + + /** Pointer to the block array allocated by XvMCCreateBlocks(). + The array has to be freed by XvMCDestroyBlocks(). + Each group of 64 values represents one data block of differential + pixel information (in MoCo mode) or coefficients for IDCT. + - application - set the pointer during initialization + - libavcodec - fills coefficients/pixel data into the array + */ + short* data_blocks; + + /** Pointer to the macroblock description array allocated by + XvMCCreateMacroBlocks() and freed by XvMCDestroyMacroBlocks(). + - application - set the pointer during initialization + - libavcodec - fills description data into the array + */ + XvMCMacroBlock* mv_blocks; + + /** Number of macroblock descriptions that can be stored in the mv_blocks + array. + - application - set during initialization + - libavcodec - unchanged + */ + int allocated_mv_blocks; + + /** Number of blocks that can be stored at once in the data_blocks array. + - application - set during initialization + - libavcodec - unchanged + */ + int allocated_data_blocks; + + /** Indicate that the hardware would interpret data_blocks as IDCT + coefficients and perform IDCT on them. + - application - set during initialization + - libavcodec - unchanged + */ + int idct; + + /** In MoCo mode it indicates that intra macroblocks are assumed to be in + unsigned format; same as the XVMC_INTRA_UNSIGNED flag. + - application - set during initialization + - libavcodec - unchanged + */ + int unsigned_intra; + + /** Pointer to the surface allocated by XvMCCreateSurface(). + It has to be freed by XvMCDestroySurface() on application exit. + It identifies the frame and its state on the video hardware. + - application - set during initialization + - libavcodec - unchanged + */ + XvMCSurface* p_surface; + +/** Set by the decoder before calling ff_draw_horiz_band(), + needed by the XvMCRenderSurface function. */ +//@{ + /** Pointer to the surface used as past reference + - application - unchanged + - libavcodec - set + */ + XvMCSurface* p_past_surface; + + /** Pointer to the surface used as future reference + - application - unchanged + - libavcodec - set + */ + XvMCSurface* p_future_surface; + + /** top/bottom field or frame + - application - unchanged + - libavcodec - set + */ + unsigned int picture_structure; + + /** XVMC_SECOND_FIELD - 1st or 2nd field in the sequence + - application - unchanged + - libavcodec - set + */ + unsigned int flags; +//}@ + + /** Number of macroblock descriptions in the mv_blocks array + that have already been passed to the hardware. + - application - zeroes it on get_buffer(). + A successful ff_draw_horiz_band() may increment it + with filled_mb_block_num or zero both. + - libavcodec - unchanged + */ + int start_mv_blocks_num; + + /** Number of new macroblock descriptions in the mv_blocks array (after + start_mv_blocks_num) that are filled by libavcodec and have to be + passed to the hardware. + - application - zeroes it on get_buffer() or after successful + ff_draw_horiz_band(). + - libavcodec - increment with one of each stored MB + */ + int filled_mv_blocks_num; + + /** Number of the next free data block; one data block consists of + 64 short values in the data_blocks array. + All blocks before this one have already been claimed by placing their + position into the corresponding block description structure field, + that are part of the mv_blocks array. + - application - zeroes it on get_buffer(). + A successful ff_draw_horiz_band() may zero it together + with start_mb_blocks_num. + - libavcodec - each decoded macroblock increases it by the number + of coded blocks it contains. + */ + int next_free_data_block_num; +}; + +/** + * @} + */ + +#endif /* AVCODEC_XVMC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc_internal.h new file mode 100644 index 00000000..d365ef02 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xvmc_internal.h @@ -0,0 +1,31 @@ +/* + * XVideo Motion Compensation internal functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_XVMC_INTERNAL_H +#define AVCODEC_XVMC_INTERNAL_H + +#include "avcodec.h" +#include "mpegvideo.h" +#include "version.h" + +void ff_xvmc_init_block(MpegEncContext *s); +void ff_xvmc_pack_pblocks(MpegEncContext *s, int cbp); + +#endif /* AVCODEC_XVMC_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xwd.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xwd.h new file mode 100644 index 00000000..d0460465 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavcodec/xwd.h @@ -0,0 +1,41 @@ +/* + * XWD image format + * + * Copyright (c) 2012 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_XWD_H +#define AVCODEC_XWD_H + +#define XWD_VERSION 7 +#define XWD_HEADER_SIZE 100 +#define XWD_CMAP_SIZE 12 + +#define XWD_XY_BITMAP 0 +#define XWD_XY_PIXMAP 1 +#define XWD_Z_PIXMAP 2 + +#define XWD_STATIC_GRAY 0 +#define XWD_GRAY_SCALE 1 +#define XWD_STATIC_COLOR 2 +#define XWD_PSEUDO_COLOR 3 +#define XWD_TRUE_COLOR 4 +#define XWD_DIRECT_COLOR 5 + +#endif /* AVCODEC_XWD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/alsa.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/alsa.h new file mode 100644 index 00000000..1ed8c821 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/alsa.h @@ -0,0 +1,108 @@ +/* + * ALSA input and output + * Copyright (c) 2007 Luca Abeni ( lucabe72 email it ) + * Copyright (c) 2007 Benoit Fouet ( benoit fouet free fr ) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * ALSA input and output: definitions and structures + * @author Luca Abeni ( lucabe72 email it ) + * @author Benoit Fouet ( benoit fouet free fr ) + */ + +#ifndef AVDEVICE_ALSA_H +#define AVDEVICE_ALSA_H + +#include +#include "config.h" +#include "libavutil/log.h" +#include "timefilter.h" +#include "avdevice.h" + +/* XXX: we make the assumption that the soundcard accepts this format */ +/* XXX: find better solution with "preinit" method, needed also in + other formats */ +#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) + +typedef void (*ff_reorder_func)(const void *, void *, int); + +#define ALSA_BUFFER_SIZE_MAX 131072 + +typedef struct AlsaData { + AVClass *class; + snd_pcm_t *h; + int frame_size; ///< bytes per sample * channels + int period_size; ///< preferred size for reads and writes, in frames + int sample_rate; ///< sample rate set by user + int channels; ///< number of channels set by user + int last_period; + TimeFilter *timefilter; + void (*reorder_func)(const void *, void *, int); + void *reorder_buf; + int reorder_buf_size; ///< in frames + int64_t timestamp; ///< current timestamp, without latency applied. +} AlsaData; + +/** + * Open an ALSA PCM. + * + * @param s media file handle + * @param mode either SND_PCM_STREAM_CAPTURE or SND_PCM_STREAM_PLAYBACK + * @param sample_rate in: requested sample rate; + * out: actually selected sample rate + * @param channels number of channels + * @param codec_id in: requested AVCodecID or AV_CODEC_ID_NONE; + * out: actually selected AVCodecID, changed only if + * AV_CODEC_ID_NONE was requested + * + * @return 0 if OK, AVERROR_xxx on error + */ +av_warn_unused_result +int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode, + unsigned int *sample_rate, + int channels, enum AVCodecID *codec_id); + +/** + * Close the ALSA PCM. + * + * @param s1 media file handle + * + * @return 0 + */ +int ff_alsa_close(AVFormatContext *s1); + +/** + * Try to recover from ALSA buffer underrun. + * + * @param s1 media file handle + * @param err error code reported by the previous ALSA call + * + * @return 0 if OK, AVERROR_xxx on error + */ +av_warn_unused_result +int ff_alsa_xrun_recover(AVFormatContext *s1, int err); + +av_warn_unused_result +int ff_alsa_extend_reorder_buf(AlsaData *s, int size); + +av_warn_unused_result +int ff_alsa_get_device_list(AVDeviceInfoList *device_list, snd_pcm_stream_t stream_type); + +#endif /* AVDEVICE_ALSA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/avdevice.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/avdevice.h new file mode 100644 index 00000000..ee946248 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/avdevice.h @@ -0,0 +1,514 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_AVDEVICE_H +#define AVDEVICE_AVDEVICE_H + +#include "version.h" + +/** + * @file + * @ingroup lavd + * Main libavdevice API header + */ + +/** + * @defgroup lavd libavdevice + * Special devices muxing/demuxing library. + * + * Libavdevice is a complementary library to @ref libavf "libavformat". It + * provides various "special" platform-specific muxers and demuxers, e.g. for + * grabbing devices, audio capture and playback etc. As a consequence, the + * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own + * I/O functions). The filename passed to avformat_open_input() often does not + * refer to an actually existing file, but has some special device-specific + * meaning - e.g. for xcbgrab it is the display name. + * + * To use libavdevice, simply call avdevice_register_all() to register all + * compiled muxers and demuxers. They all use standard libavformat API. + * + * @{ + */ + +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/dict.h" +#include "libavformat/avformat.h" + +/** + * Return the LIBAVDEVICE_VERSION_INT constant. + */ +unsigned avdevice_version(void); + +/** + * Return the libavdevice build-time configuration. + */ +const char *avdevice_configuration(void); + +/** + * Return the libavdevice license. + */ +const char *avdevice_license(void); + +/** + * Initialize libavdevice and register all the input and output devices. + */ +void avdevice_register_all(void); + +/** + * Audio input devices iterator. + * + * If d is NULL, returns the first registered input audio/video device, + * if d is non-NULL, returns the next registered input audio/video device after d + * or NULL if d is the last one. + */ +AVInputFormat *av_input_audio_device_next(AVInputFormat *d); + +/** + * Video input devices iterator. + * + * If d is NULL, returns the first registered input audio/video device, + * if d is non-NULL, returns the next registered input audio/video device after d + * or NULL if d is the last one. + */ +AVInputFormat *av_input_video_device_next(AVInputFormat *d); + +/** + * Audio output devices iterator. + * + * If d is NULL, returns the first registered output audio/video device, + * if d is non-NULL, returns the next registered output audio/video device after d + * or NULL if d is the last one. + */ +AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d); + +/** + * Video output devices iterator. + * + * If d is NULL, returns the first registered output audio/video device, + * if d is non-NULL, returns the next registered output audio/video device after d + * or NULL if d is the last one. + */ +AVOutputFormat *av_output_video_device_next(AVOutputFormat *d); + +typedef struct AVDeviceRect { + int x; /**< x coordinate of top left corner */ + int y; /**< y coordinate of top left corner */ + int width; /**< width */ + int height; /**< height */ +} AVDeviceRect; + +/** + * Message types used by avdevice_app_to_dev_control_message(). + */ +enum AVAppToDevMessageType { + /** + * Dummy message. + */ + AV_APP_TO_DEV_NONE = MKBETAG('N','O','N','E'), + + /** + * Window size change message. + * + * Message is sent to the device every time the application changes the size + * of the window device renders to. + * Message should also be sent right after window is created. + * + * data: AVDeviceRect: new window size. + */ + AV_APP_TO_DEV_WINDOW_SIZE = MKBETAG('G','E','O','M'), + + /** + * Repaint request message. + * + * Message is sent to the device when window has to be repainted. + * + * data: AVDeviceRect: area required to be repainted. + * NULL: whole area is required to be repainted. + */ + AV_APP_TO_DEV_WINDOW_REPAINT = MKBETAG('R','E','P','A'), + + /** + * Request pause/play. + * + * Application requests pause/unpause playback. + * Mostly usable with devices that have internal buffer. + * By default devices are not paused. + * + * data: NULL + */ + AV_APP_TO_DEV_PAUSE = MKBETAG('P', 'A', 'U', ' '), + AV_APP_TO_DEV_PLAY = MKBETAG('P', 'L', 'A', 'Y'), + AV_APP_TO_DEV_TOGGLE_PAUSE = MKBETAG('P', 'A', 'U', 'T'), + + /** + * Volume control message. + * + * Set volume level. It may be device-dependent if volume + * is changed per stream or system wide. Per stream volume + * change is expected when possible. + * + * data: double: new volume with range of 0.0 - 1.0. + */ + AV_APP_TO_DEV_SET_VOLUME = MKBETAG('S', 'V', 'O', 'L'), + + /** + * Mute control messages. + * + * Change mute state. It may be device-dependent if mute status + * is changed per stream or system wide. Per stream mute status + * change is expected when possible. + * + * data: NULL. + */ + AV_APP_TO_DEV_MUTE = MKBETAG(' ', 'M', 'U', 'T'), + AV_APP_TO_DEV_UNMUTE = MKBETAG('U', 'M', 'U', 'T'), + AV_APP_TO_DEV_TOGGLE_MUTE = MKBETAG('T', 'M', 'U', 'T'), + + /** + * Get volume/mute messages. + * + * Force the device to send AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED or + * AV_DEV_TO_APP_MUTE_STATE_CHANGED command respectively. + * + * data: NULL. + */ + AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'), + AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'), +}; + +/** + * Message types used by avdevice_dev_to_app_control_message(). + */ +enum AVDevToAppMessageType { + /** + * Dummy message. + */ + AV_DEV_TO_APP_NONE = MKBETAG('N','O','N','E'), + + /** + * Create window buffer message. + * + * Device requests to create a window buffer. Exact meaning is device- + * and application-dependent. Message is sent before rendering first + * frame and all one-shot initializations should be done here. + * Application is allowed to ignore preferred window buffer size. + * + * @note: Application is obligated to inform about window buffer size + * with AV_APP_TO_DEV_WINDOW_SIZE message. + * + * data: AVDeviceRect: preferred size of the window buffer. + * NULL: no preferred size of the window buffer. + */ + AV_DEV_TO_APP_CREATE_WINDOW_BUFFER = MKBETAG('B','C','R','E'), + + /** + * Prepare window buffer message. + * + * Device requests to prepare a window buffer for rendering. + * Exact meaning is device- and application-dependent. + * Message is sent before rendering of each frame. + * + * data: NULL. + */ + AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER = MKBETAG('B','P','R','E'), + + /** + * Display window buffer message. + * + * Device requests to display a window buffer. + * Message is sent when new frame is ready to be displayed. + * Usually buffers need to be swapped in handler of this message. + * + * data: NULL. + */ + AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER = MKBETAG('B','D','I','S'), + + /** + * Destroy window buffer message. + * + * Device requests to destroy a window buffer. + * Message is sent when device is about to be destroyed and window + * buffer is not required anymore. + * + * data: NULL. + */ + AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER = MKBETAG('B','D','E','S'), + + /** + * Buffer fullness status messages. + * + * Device signals buffer overflow/underflow. + * + * data: NULL. + */ + AV_DEV_TO_APP_BUFFER_OVERFLOW = MKBETAG('B','O','F','L'), + AV_DEV_TO_APP_BUFFER_UNDERFLOW = MKBETAG('B','U','F','L'), + + /** + * Buffer readable/writable. + * + * Device informs that buffer is readable/writable. + * When possible, device informs how many bytes can be read/write. + * + * @warning Device may not inform when number of bytes than can be read/write changes. + * + * data: int64_t: amount of bytes available to read/write. + * NULL: amount of bytes available to read/write is not known. + */ + AV_DEV_TO_APP_BUFFER_READABLE = MKBETAG('B','R','D',' '), + AV_DEV_TO_APP_BUFFER_WRITABLE = MKBETAG('B','W','R',' '), + + /** + * Mute state change message. + * + * Device informs that mute state has changed. + * + * data: int: 0 for not muted state, non-zero for muted state. + */ + AV_DEV_TO_APP_MUTE_STATE_CHANGED = MKBETAG('C','M','U','T'), + + /** + * Volume level change message. + * + * Device informs that volume level has changed. + * + * data: double: new volume with range of 0.0 - 1.0. + */ + AV_DEV_TO_APP_VOLUME_LEVEL_CHANGED = MKBETAG('C','V','O','L'), +}; + +/** + * Send control message from application to device. + * + * @param s device context. + * @param type message type. + * @param data message data. Exact type depends on message type. + * @param data_size size of message data. + * @return >= 0 on success, negative on error. + * AVERROR(ENOSYS) when device doesn't implement handler of the message. + */ +int avdevice_app_to_dev_control_message(struct AVFormatContext *s, + enum AVAppToDevMessageType type, + void *data, size_t data_size); + +/** + * Send control message from device to application. + * + * @param s device context. + * @param type message type. + * @param data message data. Can be NULL. + * @param data_size size of message data. + * @return >= 0 on success, negative on error. + * AVERROR(ENOSYS) when application doesn't implement handler of the message. + */ +int avdevice_dev_to_app_control_message(struct AVFormatContext *s, + enum AVDevToAppMessageType type, + void *data, size_t data_size); + +/** + * Following API allows user to probe device capabilities (supported codecs, + * pixel formats, sample formats, resolutions, channel counts, etc). + * It is build on top op AVOption API. + * Queried capabilities make it possible to set up converters of video or audio + * parameters that fit to the device. + * + * List of capabilities that can be queried: + * - Capabilities valid for both audio and video devices: + * - codec: supported audio/video codecs. + * type: AV_OPT_TYPE_INT (AVCodecID value) + * - Capabilities valid for audio devices: + * - sample_format: supported sample formats. + * type: AV_OPT_TYPE_INT (AVSampleFormat value) + * - sample_rate: supported sample rates. + * type: AV_OPT_TYPE_INT + * - channels: supported number of channels. + * type: AV_OPT_TYPE_INT + * - channel_layout: supported channel layouts. + * type: AV_OPT_TYPE_INT64 + * - Capabilities valid for video devices: + * - pixel_format: supported pixel formats. + * type: AV_OPT_TYPE_INT (AVPixelFormat value) + * - window_size: supported window sizes (describes size of the window size presented to the user). + * type: AV_OPT_TYPE_IMAGE_SIZE + * - frame_size: supported frame sizes (describes size of provided video frames). + * type: AV_OPT_TYPE_IMAGE_SIZE + * - fps: supported fps values + * type: AV_OPT_TYPE_RATIONAL + * + * Value of the capability may be set by user using av_opt_set() function + * and AVDeviceCapabilitiesQuery object. Following queries will + * limit results to the values matching already set capabilities. + * For example, setting a codec may impact number of formats or fps values + * returned during next query. Setting invalid value may limit results to zero. + * + * Example of the usage basing on opengl output device: + * + * @code + * AVFormatContext *oc = NULL; + * AVDeviceCapabilitiesQuery *caps = NULL; + * AVOptionRanges *ranges; + * int ret; + * + * if ((ret = avformat_alloc_output_context2(&oc, NULL, "opengl", NULL)) < 0) + * goto fail; + * if (avdevice_capabilities_create(&caps, oc, NULL) < 0) + * goto fail; + * + * //query codecs + * if (av_opt_query_ranges(&ranges, caps, "codec", AV_OPT_MULTI_COMPONENT_RANGE)) < 0) + * goto fail; + * //pick codec here and set it + * av_opt_set(caps, "codec", AV_CODEC_ID_RAWVIDEO, 0); + * + * //query format + * if (av_opt_query_ranges(&ranges, caps, "pixel_format", AV_OPT_MULTI_COMPONENT_RANGE)) < 0) + * goto fail; + * //pick format here and set it + * av_opt_set(caps, "pixel_format", AV_PIX_FMT_YUV420P, 0); + * + * //query and set more capabilities + * + * fail: + * //clean up code + * avdevice_capabilities_free(&query, oc); + * avformat_free_context(oc); + * @endcode + */ + +/** + * Structure describes device capabilities. + * + * It is used by devices in conjunction with av_device_capabilities AVOption table + * to implement capabilities probing API based on AVOption API. Should not be used directly. + */ +typedef struct AVDeviceCapabilitiesQuery { + const AVClass *av_class; + AVFormatContext *device_context; + enum AVCodecID codec; + enum AVSampleFormat sample_format; + enum AVPixelFormat pixel_format; + int sample_rate; + int channels; + int64_t channel_layout; + int window_width; + int window_height; + int frame_width; + int frame_height; + AVRational fps; +} AVDeviceCapabilitiesQuery; + +/** + * AVOption table used by devices to implement device capabilities API. Should not be used by a user. + */ +extern const AVOption av_device_capabilities[]; + +/** + * Initialize capabilities probing API based on AVOption API. + * + * avdevice_capabilities_free() must be called when query capabilities API is + * not used anymore. + * + * @param[out] caps Device capabilities data. Pointer to a NULL pointer must be passed. + * @param s Context of the device. + * @param device_options An AVDictionary filled with device-private options. + * On return this parameter will be destroyed and replaced with a dict + * containing options that were not found. May be NULL. + * The same options must be passed later to avformat_write_header() for output + * devices or avformat_open_input() for input devices, or at any other place + * that affects device-private options. + * + * @return >= 0 on success, negative otherwise. + */ +int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, + AVDictionary **device_options); + +/** + * Free resources created by avdevice_capabilities_create() + * + * @param caps Device capabilities data to be freed. + * @param s Context of the device. + */ +void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s); + +/** + * Structure describes basic parameters of the device. + */ +typedef struct AVDeviceInfo { + char *device_name; /**< device name, format depends on device */ + char *device_description; /**< human friendly name */ +} AVDeviceInfo; + +/** + * List of devices. + */ +typedef struct AVDeviceInfoList { + AVDeviceInfo **devices; /**< list of autodetected devices */ + int nb_devices; /**< number of autodetected devices */ + int default_device; /**< index of default device or -1 if no default */ +} AVDeviceInfoList; + +/** + * List devices. + * + * Returns available device names and their parameters. + * + * @note: Some devices may accept system-dependent device names that cannot be + * autodetected. The list returned by this function cannot be assumed to + * be always completed. + * + * @param s device context. + * @param[out] device_list list of autodetected devices. + * @return count of autodetected devices, negative on error. + */ +int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_list); + +/** + * Convenient function to free result of avdevice_list_devices(). + * + * @param devices device list to be freed. + */ +void avdevice_free_list_devices(AVDeviceInfoList **device_list); + +/** + * List devices. + * + * Returns available device names and their parameters. + * These are convinient wrappers for avdevice_list_devices(). + * Device context is allocated and deallocated internally. + * + * @param device device format. May be NULL if device name is set. + * @param device_name device name. May be NULL if device format is set. + * @param device_options An AVDictionary filled with device-private options. May be NULL. + * The same options must be passed later to avformat_write_header() for output + * devices or avformat_open_input() for input devices, or at any other place + * that affects device-private options. + * @param[out] device_list list of autodetected devices + * @return count of autodetected devices, negative on error. + * @note device argument takes precedence over device_name when both are set. + */ +int avdevice_list_input_sources(struct AVInputFormat *device, const char *device_name, + AVDictionary *device_options, AVDeviceInfoList **device_list); +int avdevice_list_output_sinks(struct AVOutputFormat *device, const char *device_name, + AVDictionary *device_options, AVDeviceInfoList **device_list); + +/** + * @} + */ + +#endif /* AVDEVICE_AVDEVICE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common.h new file mode 100644 index 00000000..27ce6a8a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common.h @@ -0,0 +1,207 @@ +/* + * Blackmagic DeckLink common code + * Copyright (c) 2013-2014 Ramiro Polla, Luca Barbato, Deti Fliegl + * Copyright (c) 2017 Akamai Technologies, Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_DECKLINK_COMMON_H +#define AVDEVICE_DECKLINK_COMMON_H + +#include +#if BLACKMAGIC_DECKLINK_API_VERSION < 0x0b000000 +#define IID_IDeckLinkProfileAttributes IID_IDeckLinkAttributes +#define IDeckLinkProfileAttributes IDeckLinkAttributes +#endif + +#include "libavutil/thread.h" +#include "decklink_common_c.h" +#if CONFIG_LIBKLVANC +#include "libklvanc/vanc.h" +#endif + +#ifdef _WIN32 +#define DECKLINK_BOOL BOOL +#else +#define DECKLINK_BOOL bool +#endif + +#ifdef _WIN32 +static char *dup_wchar_to_utf8(wchar_t *w) +{ + char *s = NULL; + int l = WideCharToMultiByte(CP_UTF8, 0, w, -1, 0, 0, 0, 0); + s = (char *) av_malloc(l); + if (s) + WideCharToMultiByte(CP_UTF8, 0, w, -1, s, l, 0, 0); + return s; +} +#define DECKLINK_STR OLECHAR * +#define DECKLINK_STRDUP dup_wchar_to_utf8 +#define DECKLINK_FREE(s) SysFreeString(s) +#elif defined(__APPLE__) +static char *dup_cfstring_to_utf8(CFStringRef w) +{ + char s[256]; + CFStringGetCString(w, s, 255, kCFStringEncodingUTF8); + return av_strdup(s); +} +#define DECKLINK_STR const __CFString * +#define DECKLINK_STRDUP dup_cfstring_to_utf8 +#define DECKLINK_FREE(s) CFRelease(s) +#else +#define DECKLINK_STR const char * +#define DECKLINK_STRDUP av_strdup +/* free() is needed for a string returned by the DeckLink SDL. */ +#define DECKLINK_FREE(s) free((void *) s) +#endif + +class decklink_output_callback; +class decklink_input_callback; + +typedef struct AVPacketQueue { + AVPacketList *first_pkt, *last_pkt; + int nb_packets; + unsigned long long size; + int abort_request; + pthread_mutex_t mutex; + pthread_cond_t cond; + AVFormatContext *avctx; + int64_t max_q_size; +} AVPacketQueue; + +struct decklink_ctx { + /* DeckLink SDK interfaces */ + IDeckLink *dl; + IDeckLinkOutput *dlo; + IDeckLinkInput *dli; + IDeckLinkConfiguration *cfg; + IDeckLinkProfileAttributes *attr; + decklink_output_callback *output_callback; + + /* DeckLink mode information */ + BMDTimeValue bmd_tb_den; + BMDTimeValue bmd_tb_num; + BMDDisplayMode bmd_mode; + BMDVideoConnection video_input; + BMDAudioConnection audio_input; + BMDTimecodeFormat tc_format; + int bmd_width; + int bmd_height; + int bmd_field_dominance; + int supports_vanc; + + /* Capture buffer queue */ + AVPacketQueue queue; + + /* Streams present */ + int audio; + int video; + + /* Status */ + int playback_started; + int64_t last_pts; + unsigned long frameCount; + unsigned int dropped; + AVStream *audio_st; + AVStream *video_st; + AVStream *teletext_st; + uint16_t cdp_sequence_num; + + /* Options */ + int list_devices; + int list_formats; + int64_t teletext_lines; + double preroll; + int duplex_mode; + DecklinkPtsSource audio_pts_source; + DecklinkPtsSource video_pts_source; + int draw_bars; + BMDPixelFormat raw_format; + + int frames_preroll; + int frames_buffer; + + pthread_mutex_t mutex; + pthread_cond_t cond; + int frames_buffer_available_spots; + int autodetect; + +#if CONFIG_LIBKLVANC + struct klvanc_context_s *vanc_ctx; +#endif + + int channels; + int audio_depth; + unsigned long tc_seen; // used with option wait_for_tc +}; + +typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t; + +#ifdef _WIN32 +#if BLACKMAGIC_DECKLINK_API_VERSION < 0x0a040000 +typedef unsigned long buffercount_type; +#else +typedef unsigned int buffercount_type; +#endif +IDeckLinkIterator *CreateDeckLinkIteratorInstance(void); +#else +typedef uint32_t buffercount_type; +#endif + +static const BMDAudioConnection decklink_audio_connection_map[] = { + (BMDAudioConnection)0, + bmdAudioConnectionEmbedded, + bmdAudioConnectionAESEBU, + bmdAudioConnectionAnalog, + bmdAudioConnectionAnalogXLR, + bmdAudioConnectionAnalogRCA, + bmdAudioConnectionMicrophone, +}; + +static const BMDVideoConnection decklink_video_connection_map[] = { + (BMDVideoConnection)0, + bmdVideoConnectionSDI, + bmdVideoConnectionHDMI, + bmdVideoConnectionOpticalSDI, + bmdVideoConnectionComponent, + bmdVideoConnectionComposite, + bmdVideoConnectionSVideo, +}; + +static const BMDTimecodeFormat decklink_timecode_format_map[] = { + (BMDTimecodeFormat)0, + bmdTimecodeRP188VITC1, + bmdTimecodeRP188VITC2, + bmdTimecodeRP188LTC, + bmdTimecodeRP188Any, + bmdTimecodeVITC, + bmdTimecodeVITCField2, + bmdTimecodeSerial, +}; + +int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction); +int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction = DIRECTION_OUT); +int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction); +int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs); +void ff_decklink_list_devices_legacy(AVFormatContext *avctx, int show_inputs, int show_outputs); +int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT); +void ff_decklink_cleanup(AVFormatContext *avctx); +int ff_decklink_init_device(AVFormatContext *avctx, const char* name); + +#endif /* AVDEVICE_DECKLINK_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common_c.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common_c.h new file mode 100644 index 00000000..88b1eae1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_common_c.h @@ -0,0 +1,63 @@ +/* + * Blackmagic DeckLink common code + * Copyright (c) 2013-2014 Ramiro Polla + * Copyright (c) 2017 Akamai Technologies, Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_DECKLINK_COMMON_C_H +#define AVDEVICE_DECKLINK_COMMON_C_H + +typedef enum DecklinkPtsSource { + PTS_SRC_AUDIO = 1, + PTS_SRC_VIDEO = 2, + PTS_SRC_REFERENCE = 3, + PTS_SRC_WALLCLOCK = 4, + PTS_SRC_ABS_WALLCLOCK = 5, + PTS_SRC_NB +} DecklinkPtsSource; + +struct decklink_cctx { + const AVClass *cclass; + + void *ctx; + + /* Options */ + int list_devices; + int list_formats; + int64_t teletext_lines; + double preroll; + int audio_channels; + int audio_depth; + int duplex_mode; + DecklinkPtsSource audio_pts_source; + DecklinkPtsSource video_pts_source; + int audio_input; + int video_input; + int tc_format; + int draw_bars; + char *format_code; + int raw_format; + int64_t queue_size; + int copyts; + int64_t timestamp_align; + int timing_offset; + int wait_for_tc; +}; + +#endif /* AVDEVICE_DECKLINK_COMMON_C_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_dec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_dec.h new file mode 100644 index 00000000..fbfbe628 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_dec.h @@ -0,0 +1,38 @@ +/* + * Blackmagic DeckLink input + * Copyright (c) 2013-2014 Ramiro Polla + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_DECKLINK_DEC_H +#define AVDEVICE_DECKLINK_DEC_H + +#ifdef __cplusplus +extern "C" { +#endif + +int ff_decklink_read_header(AVFormatContext *avctx); +int ff_decklink_read_packet(AVFormatContext *avctx, AVPacket *pkt); +int ff_decklink_read_close(AVFormatContext *avctx); +int ff_decklink_list_input_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* AVDEVICE_DECKLINK_DEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_enc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_enc.h new file mode 100644 index 00000000..39237673 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/decklink_enc.h @@ -0,0 +1,38 @@ +/* + * Blackmagic DeckLink output + * Copyright (c) 2013-2014 Ramiro Polla + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_DECKLINK_ENC_H +#define AVDEVICE_DECKLINK_ENC_H + +#ifdef __cplusplus +extern "C" { +#endif + +int ff_decklink_write_header(AVFormatContext *avctx); +int ff_decklink_write_packet(AVFormatContext *avctx, AVPacket *pkt); +int ff_decklink_write_trailer(AVFormatContext *avctx); +int ff_decklink_list_output_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* AVDEVICE_DECKLINK_ENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/dshow_capture.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/dshow_capture.h new file mode 100644 index 00000000..475d62ba --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/dshow_capture.h @@ -0,0 +1,354 @@ +/* + * DirectShow capture interface + * Copyright (c) 2010 Ramiro Polla + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_DSHOW_CAPTURE_H +#define AVDEVICE_DSHOW_CAPTURE_H + +#define DSHOWDEBUG 0 + +#include "avdevice.h" + +#define COBJMACROS +#define WIN32_LEAN_AND_MEAN +#include +#define NO_DSHOW_STRSAFE +#include +#include + +#include "libavcodec/internal.h" + +/* EC_DEVICE_LOST is not defined in MinGW dshow headers. */ +#ifndef EC_DEVICE_LOST +#define EC_DEVICE_LOST 0x1f +#endif + +long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src); +void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps); +void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps); +void ff_print_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *type); +void ff_printGUID(const GUID *g); + +extern const AVClass *ff_dshow_context_class_ptr; +#define dshowdebug(...) ff_dlog(&ff_dshow_context_class_ptr, __VA_ARGS__) + +static inline void nothing(void *foo) +{ +} + +struct GUIDoffset { + const GUID *iid; + int offset; +}; + +enum dshowDeviceType { + VideoDevice = 0, + AudioDevice = 1, +}; + +enum dshowSourceFilterType { + VideoSourceDevice = 0, + AudioSourceDevice = 1, +}; + +#define DECLARE_QUERYINTERFACE(class, ...) \ +long WINAPI \ +class##_QueryInterface(class *this, const GUID *riid, void **ppvObject) \ +{ \ + struct GUIDoffset ifaces[] = __VA_ARGS__; \ + int i; \ + dshowdebug(AV_STRINGIFY(class)"_QueryInterface(%p, %p, %p)\n", this, riid, ppvObject); \ + ff_printGUID(riid); \ + if (!ppvObject) \ + return E_POINTER; \ + for (i = 0; i < sizeof(ifaces)/sizeof(ifaces[0]); i++) { \ + if (IsEqualGUID(riid, ifaces[i].iid)) { \ + void *obj = (void *) ((uint8_t *) this + ifaces[i].offset); \ + class##_AddRef(this); \ + dshowdebug("\tfound %d with offset %d\n", i, ifaces[i].offset); \ + *ppvObject = (void *) obj; \ + return S_OK; \ + } \ + } \ + dshowdebug("\tE_NOINTERFACE\n"); \ + *ppvObject = NULL; \ + return E_NOINTERFACE; \ +} +#define DECLARE_ADDREF(class) \ +unsigned long WINAPI \ +class##_AddRef(class *this) \ +{ \ + dshowdebug(AV_STRINGIFY(class)"_AddRef(%p)\t%ld\n", this, this->ref+1); \ + return InterlockedIncrement(&this->ref); \ +} +#define DECLARE_RELEASE(class) \ +unsigned long WINAPI \ +class##_Release(class *this) \ +{ \ + long ref = InterlockedDecrement(&this->ref); \ + dshowdebug(AV_STRINGIFY(class)"_Release(%p)\t%ld\n", this, ref); \ + if (!ref) \ + class##_Destroy(this); \ + return ref; \ +} + +#define DECLARE_DESTROY(class, func) \ +void class##_Destroy(class *this) \ +{ \ + dshowdebug(AV_STRINGIFY(class)"_Destroy(%p)\n", this); \ + func(this); \ + if (this) { \ + if (this->vtbl) \ + CoTaskMemFree(this->vtbl); \ + CoTaskMemFree(this); \ + } \ +} +#define DECLARE_CREATE(class, setup, ...) \ +class *class##_Create(__VA_ARGS__) \ +{ \ + class *this = CoTaskMemAlloc(sizeof(class)); \ + void *vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \ + dshowdebug(AV_STRINGIFY(class)"_Create(%p)\n", this); \ + if (!this || !vtbl) \ + goto fail; \ + ZeroMemory(this, sizeof(class)); \ + ZeroMemory(vtbl, sizeof(*this->vtbl)); \ + this->ref = 1; \ + this->vtbl = vtbl; \ + if (!setup) \ + goto fail; \ + dshowdebug("created "AV_STRINGIFY(class)" %p\n", this); \ + return this; \ +fail: \ + class##_Destroy(this); \ + dshowdebug("could not create "AV_STRINGIFY(class)"\n"); \ + return NULL; \ +} + +#define SETVTBL(vtbl, class, fn) \ + do { (vtbl)->fn = (void *) class##_##fn; } while(0) + +/***************************************************************************** + * Forward Declarations + ****************************************************************************/ +typedef struct libAVPin libAVPin; +typedef struct libAVMemInputPin libAVMemInputPin; +typedef struct libAVEnumPins libAVEnumPins; +typedef struct libAVEnumMediaTypes libAVEnumMediaTypes; +typedef struct libAVFilter libAVFilter; + +/***************************************************************************** + * libAVPin + ****************************************************************************/ +struct libAVPin { + IPinVtbl *vtbl; + long ref; + libAVFilter *filter; + IPin *connectedto; + AM_MEDIA_TYPE type; + IMemInputPinVtbl *imemvtbl; +}; + +long WINAPI libAVPin_QueryInterface (libAVPin *, const GUID *, void **); +unsigned long WINAPI libAVPin_AddRef (libAVPin *); +unsigned long WINAPI libAVPin_Release (libAVPin *); +long WINAPI libAVPin_Connect (libAVPin *, IPin *, const AM_MEDIA_TYPE *); +long WINAPI libAVPin_ReceiveConnection (libAVPin *, IPin *, const AM_MEDIA_TYPE *); +long WINAPI libAVPin_Disconnect (libAVPin *); +long WINAPI libAVPin_ConnectedTo (libAVPin *, IPin **); +long WINAPI libAVPin_ConnectionMediaType (libAVPin *, AM_MEDIA_TYPE *); +long WINAPI libAVPin_QueryPinInfo (libAVPin *, PIN_INFO *); +long WINAPI libAVPin_QueryDirection (libAVPin *, PIN_DIRECTION *); +long WINAPI libAVPin_QueryId (libAVPin *, wchar_t **); +long WINAPI libAVPin_QueryAccept (libAVPin *, const AM_MEDIA_TYPE *); +long WINAPI libAVPin_EnumMediaTypes (libAVPin *, IEnumMediaTypes **); +long WINAPI libAVPin_QueryInternalConnections(libAVPin *, IPin **, unsigned long *); +long WINAPI libAVPin_EndOfStream (libAVPin *); +long WINAPI libAVPin_BeginFlush (libAVPin *); +long WINAPI libAVPin_EndFlush (libAVPin *); +long WINAPI libAVPin_NewSegment (libAVPin *, REFERENCE_TIME, REFERENCE_TIME, double); + +long WINAPI libAVMemInputPin_QueryInterface (libAVMemInputPin *, const GUID *, void **); +unsigned long WINAPI libAVMemInputPin_AddRef (libAVMemInputPin *); +unsigned long WINAPI libAVMemInputPin_Release (libAVMemInputPin *); +long WINAPI libAVMemInputPin_GetAllocator (libAVMemInputPin *, IMemAllocator **); +long WINAPI libAVMemInputPin_NotifyAllocator (libAVMemInputPin *, IMemAllocator *, BOOL); +long WINAPI libAVMemInputPin_GetAllocatorRequirements(libAVMemInputPin *, ALLOCATOR_PROPERTIES *); +long WINAPI libAVMemInputPin_Receive (libAVMemInputPin *, IMediaSample *); +long WINAPI libAVMemInputPin_ReceiveMultiple (libAVMemInputPin *, IMediaSample **, long, long *); +long WINAPI libAVMemInputPin_ReceiveCanBlock (libAVMemInputPin *); + +void libAVPin_Destroy(libAVPin *); +libAVPin *libAVPin_Create (libAVFilter *filter); + +void libAVMemInputPin_Destroy(libAVMemInputPin *); + +/***************************************************************************** + * libAVEnumPins + ****************************************************************************/ +struct libAVEnumPins { + IEnumPinsVtbl *vtbl; + long ref; + int pos; + libAVPin *pin; + libAVFilter *filter; +}; + +long WINAPI libAVEnumPins_QueryInterface(libAVEnumPins *, const GUID *, void **); +unsigned long WINAPI libAVEnumPins_AddRef (libAVEnumPins *); +unsigned long WINAPI libAVEnumPins_Release (libAVEnumPins *); +long WINAPI libAVEnumPins_Next (libAVEnumPins *, unsigned long, IPin **, unsigned long *); +long WINAPI libAVEnumPins_Skip (libAVEnumPins *, unsigned long); +long WINAPI libAVEnumPins_Reset (libAVEnumPins *); +long WINAPI libAVEnumPins_Clone (libAVEnumPins *, libAVEnumPins **); + +void libAVEnumPins_Destroy(libAVEnumPins *); +libAVEnumPins *libAVEnumPins_Create (libAVPin *pin, libAVFilter *filter); + +/***************************************************************************** + * libAVEnumMediaTypes + ****************************************************************************/ +struct libAVEnumMediaTypes { + IEnumMediaTypesVtbl *vtbl; + long ref; + int pos; + AM_MEDIA_TYPE type; +}; + +long WINAPI libAVEnumMediaTypes_QueryInterface(libAVEnumMediaTypes *, const GUID *, void **); +unsigned long WINAPI libAVEnumMediaTypes_AddRef (libAVEnumMediaTypes *); +unsigned long WINAPI libAVEnumMediaTypes_Release (libAVEnumMediaTypes *); +long WINAPI libAVEnumMediaTypes_Next (libAVEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *); +long WINAPI libAVEnumMediaTypes_Skip (libAVEnumMediaTypes *, unsigned long); +long WINAPI libAVEnumMediaTypes_Reset (libAVEnumMediaTypes *); +long WINAPI libAVEnumMediaTypes_Clone (libAVEnumMediaTypes *, libAVEnumMediaTypes **); + +void libAVEnumMediaTypes_Destroy(libAVEnumMediaTypes *); +libAVEnumMediaTypes *libAVEnumMediaTypes_Create(const AM_MEDIA_TYPE *type); + +/***************************************************************************** + * libAVFilter + ****************************************************************************/ +struct libAVFilter { + IBaseFilterVtbl *vtbl; + long ref; + const wchar_t *name; + libAVPin *pin; + FILTER_INFO info; + FILTER_STATE state; + IReferenceClock *clock; + enum dshowDeviceType type; + void *priv_data; + int stream_index; + int64_t start_time; + void (*callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type); +}; + +long WINAPI libAVFilter_QueryInterface (libAVFilter *, const GUID *, void **); +unsigned long WINAPI libAVFilter_AddRef (libAVFilter *); +unsigned long WINAPI libAVFilter_Release (libAVFilter *); +long WINAPI libAVFilter_GetClassID (libAVFilter *, CLSID *); +long WINAPI libAVFilter_Stop (libAVFilter *); +long WINAPI libAVFilter_Pause (libAVFilter *); +long WINAPI libAVFilter_Run (libAVFilter *, REFERENCE_TIME); +long WINAPI libAVFilter_GetState (libAVFilter *, DWORD, FILTER_STATE *); +long WINAPI libAVFilter_SetSyncSource (libAVFilter *, IReferenceClock *); +long WINAPI libAVFilter_GetSyncSource (libAVFilter *, IReferenceClock **); +long WINAPI libAVFilter_EnumPins (libAVFilter *, IEnumPins **); +long WINAPI libAVFilter_FindPin (libAVFilter *, const wchar_t *, IPin **); +long WINAPI libAVFilter_QueryFilterInfo(libAVFilter *, FILTER_INFO *); +long WINAPI libAVFilter_JoinFilterGraph(libAVFilter *, IFilterGraph *, const wchar_t *); +long WINAPI libAVFilter_QueryVendorInfo(libAVFilter *, wchar_t **); + +void libAVFilter_Destroy(libAVFilter *); +libAVFilter *libAVFilter_Create (void *, void *, enum dshowDeviceType); + +/***************************************************************************** + * dshow_ctx + ****************************************************************************/ +struct dshow_ctx { + const AVClass *class; + + IGraphBuilder *graph; + + char *device_name[2]; + char *device_unique_name[2]; + + int video_device_number; + int audio_device_number; + + int list_options; + int list_devices; + int audio_buffer_size; + int crossbar_video_input_pin_number; + int crossbar_audio_input_pin_number; + char *video_pin_name; + char *audio_pin_name; + int show_video_device_dialog; + int show_audio_device_dialog; + int show_video_crossbar_connection_dialog; + int show_audio_crossbar_connection_dialog; + int show_analog_tv_tuner_dialog; + int show_analog_tv_tuner_audio_dialog; + char *audio_filter_load_file; + char *audio_filter_save_file; + char *video_filter_load_file; + char *video_filter_save_file; + + IBaseFilter *device_filter[2]; + IPin *device_pin[2]; + libAVFilter *capture_filter[2]; + libAVPin *capture_pin[2]; + + HANDLE mutex; + HANDLE event[2]; /* event[0] is set by DirectShow + * event[1] is set by callback() */ + AVPacketList *pktl; + + int eof; + + int64_t curbufsize[2]; + unsigned int video_frame_num; + + IMediaControl *control; + IMediaEvent *media_event; + + enum AVPixelFormat pixel_format; + enum AVCodecID video_codec_id; + char *framerate; + + int requested_width; + int requested_height; + AVRational requested_framerate; + + int sample_rate; + int sample_size; + int channels; +}; + +/***************************************************************************** + * CrossBar + ****************************************************************************/ +HRESULT dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, + IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx); + +void dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx); + +#endif /* AVDEVICE_DSHOW_CAPTURE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/fbdev_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/fbdev_common.h new file mode 100644 index 00000000..7b81a8da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/fbdev_common.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * Copyright (c) 2009 Giliard B. de Freitas + * Copyright (C) 2002 Gunnar Monell + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_FBDEV_COMMON_H +#define AVDEVICE_FBDEV_COMMON_H + +#include +#include +#include "libavutil/pixfmt.h" + +struct AVDeviceInfoList; + +enum AVPixelFormat ff_get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varinfo); + +const char* ff_fbdev_default_device(void); + +int ff_fbdev_get_device_list(struct AVDeviceInfoList *device_list); + +#endif /* AVDEVICE_FBDEV_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/internal.h new file mode 100644 index 00000000..e222cf20 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/internal.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_INTERNAL_H +#define AVDEVICE_INTERNAL_H + +#include "libavformat/avformat.h" + +av_warn_unused_result +int ff_alloc_input_device_context(struct AVFormatContext **avctx, struct AVInputFormat *iformat, + const char *format); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/opengl_enc_shaders.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/opengl_enc_shaders.h new file mode 100644 index 00000000..67ee0ae7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/opengl_enc_shaders.h @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2014 Lukasz Marek + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_OPENGL_ENC_SHADERS_H +#define AVDEVICE_OPENGL_ENC_SHADERS_H + +#include "libavutil/pixfmt.h" + +static const char * const FF_OPENGL_VERTEX_SHADER = + "uniform mat4 u_projectionMatrix;" + "uniform mat4 u_modelViewMatrix;" + + "attribute vec4 a_position;" + "attribute vec2 a_textureCoords;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "gl_Position = u_projectionMatrix * (a_position * u_modelViewMatrix);" + "texture_coordinate = a_textureCoords;" + "}"; + +/** + * Fragment shader for packet RGBA formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform mat4 u_colorMap;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "gl_FragColor = texture2D(u_texture0, texture_coordinate) * u_colorMap;" + "}"; + +/** + * Fragment shader for packet RGB formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform mat4 u_colorMap;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "gl_FragColor = vec4((texture2D(u_texture0, texture_coordinate) * u_colorMap).rgb, 1.0);" + "}"; + +/** + * Fragment shader for planar RGBA formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform sampler2D u_texture1;" + "uniform sampler2D u_texture2;" + "uniform sampler2D u_texture3;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r," + "texture2D(u_texture1, texture_coordinate).r," + "texture2D(u_texture2, texture_coordinate).r," + "texture2D(u_texture3, texture_coordinate).r);" + "}"; + +/** + * Fragment shader for planar RGB formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform sampler2D u_texture1;" + "uniform sampler2D u_texture2;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "gl_FragColor = vec4(texture2D(u_texture0, texture_coordinate).r," + "texture2D(u_texture1, texture_coordinate).r," + "texture2D(u_texture2, texture_coordinate).r," + "1.0);" + "}"; + +/** + * Fragment shader for planar YUV formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform sampler2D u_texture1;" + "uniform sampler2D u_texture2;" + "uniform float u_chroma_div_w;" + "uniform float u_chroma_div_h;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "vec3 yuv;" + + "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;" + "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" + "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" + + "gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643," + "0.0, -0.39173, 2.0170," + "1.5958, -0.81290, 0.0) * yuv, 1.0), 0.0, 1.0);" + + "}"; + +/** + * Fragment shader for planar YUVA formats. + */ +static const char * const FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "uniform sampler2D u_texture1;" + "uniform sampler2D u_texture2;" + "uniform sampler2D u_texture3;" + "uniform float u_chroma_div_w;" + "uniform float u_chroma_div_h;" + + "varying vec2 texture_coordinate;" + + "void main()" + "{" + "vec3 yuv;" + + "yuv.r = texture2D(u_texture0, texture_coordinate).r - 0.0625;" + "yuv.g = texture2D(u_texture1, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" + "yuv.b = texture2D(u_texture2, vec2(texture_coordinate.x / u_chroma_div_w, texture_coordinate.y / u_chroma_div_h)).r - 0.5;" + + "gl_FragColor = clamp(vec4(mat3(1.1643, 1.16430, 1.1643," + "0.0, -0.39173, 2.0170," + "1.5958, -0.81290, 0.0) * yuv, texture2D(u_texture3, texture_coordinate).r), 0.0, 1.0);" + "}"; + +static const char * const FF_OPENGL_FRAGMENT_SHADER_GRAY = +#if defined(GL_ES_VERSION_2_0) + "precision mediump float;" +#endif + "uniform sampler2D u_texture0;" + "varying vec2 texture_coordinate;" + "void main()" + "{" + "float c = texture2D(u_texture0, texture_coordinate).r;" + "gl_FragColor = vec4(c, c, c, 1.0);" + "}"; + +#endif /* AVDEVICE_OPENGL_ENC_SHADERS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/oss.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/oss.h new file mode 100644 index 00000000..1f3f5e4e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/oss.h @@ -0,0 +1,45 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_OSS_H +#define AVDEVICE_OSS_H + +#include "libavcodec/avcodec.h" + +#include "libavformat/avformat.h" + +#define OSS_AUDIO_BLOCK_SIZE 4096 + +typedef struct OSSAudioData { + AVClass *class; + int fd; + int sample_rate; + int channels; + int frame_size; /* in bytes ! */ + enum AVCodecID codec_id; + unsigned int flip_left : 1; + uint8_t buffer[OSS_AUDIO_BLOCK_SIZE]; + int buffer_ptr; +} OSSAudioData; + +int ff_oss_audio_open(AVFormatContext *s1, int is_output, + const char *audio_device); + +int ff_oss_audio_close(OSSAudioData *s); + +#endif /* AVDEVICE_OSS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/pulse_audio_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/pulse_audio_common.h new file mode 100644 index 00000000..902795e4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/pulse_audio_common.h @@ -0,0 +1,40 @@ +/* + * Pulseaudio input + * Copyright (c) 2011 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_PULSE_AUDIO_COMMON_H +#define AVDEVICE_PULSE_AUDIO_COMMON_H + +#include +#include "libavcodec/avcodec.h" +#include "avdevice.h" + +pa_sample_format_t ff_codec_id_to_pulse_format(enum AVCodecID codec_id); + +av_warn_unused_result +int ff_pulse_audio_get_devices(AVDeviceInfoList *devices, const char *server, int output); + +av_warn_unused_result +int ff_pulse_audio_connect_context(pa_mainloop **pa_ml, pa_context **pa_ctx, + const char *server, const char *description); + +void ff_pulse_audio_disconnect_context(pa_mainloop **pa_ml, pa_context **pa_ctx); + +#endif /* AVDEVICE_PULSE_AUDIO_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/sndio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/sndio.h new file mode 100644 index 00000000..54a5ec33 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/sndio.h @@ -0,0 +1,48 @@ +/* + * sndio play and grab interface + * Copyright (c) 2010 Jacob Meuser + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_SNDIO_H +#define AVDEVICE_SNDIO_H + +#include +#include + +#include "libavutil/log.h" +#include "avdevice.h" + +typedef struct SndioData { + AVClass *class; + struct sio_hdl *hdl; + enum AVCodecID codec_id; + int64_t hwpos; + int64_t softpos; + uint8_t *buffer; + int bps; + int buffer_size; + int buffer_offset; + int channels; + int sample_rate; +} SndioData; + +int ff_sndio_open(AVFormatContext *s1, int is_output, const char *audio_device); +int ff_sndio_close(SndioData *s); + +#endif /* AVDEVICE_SNDIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/timefilter.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/timefilter.h new file mode 100644 index 00000000..cb3d0a78 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/timefilter.h @@ -0,0 +1,110 @@ +/* + * Delay Locked Loop based time filter prototypes and declarations + * Copyright (c) 2009 Samalyse + * Copyright (c) 2009 Michael Niedermayer + * Author: Olivier Guilyardi + * Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_TIMEFILTER_H +#define AVDEVICE_TIMEFILTER_H + +/** + * Opaque type representing a time filter state + * + * The purpose of this filter is to provide a way to compute accurate time + * stamps that can be compared to wall clock time, especially when dealing + * with two clocks: the system clock and a hardware device clock, such as + * a soundcard. + */ +typedef struct TimeFilter TimeFilter; + + +/** + * Create a new Delay Locked Loop time filter + * + * feedback2_factor and feedback3_factor are the factors used for the + * multiplications that are respectively performed in the second and third + * feedback paths of the loop. + * + * Unless you know what you are doing, you should set these as follow: + * + * o = 2 * M_PI * bandwidth * period_in_seconds + * feedback2_factor = sqrt(2) * o + * feedback3_factor = o * o + * + * Where bandwidth is up to you to choose. Smaller values will filter out more + * of the jitter, but also take a longer time for the loop to settle. A good + * starting point is something between 0.3 and 3 Hz. + * + * @param time_base period of the hardware clock in seconds + * (for example 1.0/44100) + * @param period expected update interval, in input units + * @param brandwidth filtering bandwidth, in Hz + * + * @return a pointer to a TimeFilter struct, or NULL on error + * + * For more details about these parameters and background concepts please see: + * http://www.kokkinizita.net/papers/usingdll.pdf + */ +TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor); + +/** + * Update the filter + * + * This function must be called in real time, at each process cycle. + * + * @param period the device cycle duration in clock_periods. For example, at + * 44.1kHz and a buffer size of 512 frames, period = 512 when clock_period + * was 1.0/44100, or 512/44100 if clock_period was 1. + * + * system_time, in seconds, should be the value of the system clock time, + * at (or as close as possible to) the moment the device hardware interrupt + * occurred (or any other event the device clock raises at the beginning of a + * cycle). + * + * @return the filtered time, in seconds + */ +double ff_timefilter_update(TimeFilter *self, double system_time, double period); + +/** + * Evaluate the filter at a specified time + * + * @param delta difference between the requested time and the current time + * (last call to ff_timefilter_update). + * @return the filtered time + */ +double ff_timefilter_eval(TimeFilter *self, double delta); + +/** + * Reset the filter + * + * This function should mainly be called in case of XRUN. + * + * Warning: after calling this, the filter is in an undetermined state until + * the next call to ff_timefilter_update() + */ +void ff_timefilter_reset(TimeFilter *); + +/** + * Free all resources associated with the filter + */ +void ff_timefilter_destroy(TimeFilter *); + +#endif /* AVDEVICE_TIMEFILTER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/v4l2-common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/v4l2-common.h new file mode 100644 index 00000000..0cbaec8b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/v4l2-common.h @@ -0,0 +1,61 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_V4L2_COMMON_H +#define AVDEVICE_V4L2_COMMON_H + +#undef __STRICT_ANSI__ //workaround due to broken kernel headers +#include "config.h" +#include "libavformat/internal.h" +#include +#include +#include +#include +#include +#if HAVE_SYS_VIDEOIO_H +#include +#else +#if HAVE_ASM_TYPES_H +#include +#endif +#include +#endif +#include "libavutil/avassert.h" +#include "libavutil/imgutils.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "avdevice.h" +#include "timefilter.h" +#include "libavutil/parseutils.h" +#include "libavutil/pixdesc.h" +#include "libavutil/time.h" +#include "libavutil/avstring.h" + +struct fmt_map { + enum AVPixelFormat ff_fmt; + enum AVCodecID codec_id; + uint32_t v4l2_fmt; +}; + +extern const struct fmt_map ff_fmt_conversion_table[]; + +uint32_t ff_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id); +enum AVPixelFormat ff_fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id); +enum AVCodecID ff_fmt_v4l2codec(uint32_t v4l2_fmt); + +#endif /* AVDEVICE_V4L2_COMMON_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/version.h new file mode 100644 index 00000000..9ee3d3db --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavdevice/version.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVDEVICE_VERSION_H +#define AVDEVICE_VERSION_H + +/** + * @file + * @ingroup lavd + * Libavdevice version macros + */ + +#include "libavutil/version.h" + +#define LIBAVDEVICE_VERSION_MAJOR 58 +#define LIBAVDEVICE_VERSION_MINOR 10 +#define LIBAVDEVICE_VERSION_MICRO 100 + +#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ + LIBAVDEVICE_VERSION_MINOR, \ + LIBAVDEVICE_VERSION_MICRO) +#define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ + LIBAVDEVICE_VERSION_MINOR, \ + LIBAVDEVICE_VERSION_MICRO) +#define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT + +#define LIBAVDEVICE_IDENT "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + +#endif /* AVDEVICE_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_afir.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_afir.h new file mode 100644 index 00000000..4f446758 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_afir.h @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2017 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_AFIR_H +#define AVFILTER_AFIR_H + +#include "libavutil/common.h" +#include "libavutil/float_dsp.h" +#include "libavutil/opt.h" +#include "libavcodec/avfft.h" + +#include "audio.h" +#include "avfilter.h" +#include "formats.h" +#include "internal.h" + +typedef struct AudioFIRSegment { + int nb_partitions; + int part_size; + int block_size; + int fft_length; + int coeff_size; + int input_size; + int input_offset; + + int *output_offset; + int *part_index; + + AVFrame *sum; + AVFrame *block; + AVFrame *buffer; + AVFrame *coeff; + AVFrame *input; + AVFrame *output; + + RDFTContext **rdft, **irdft; +} AudioFIRSegment; + +typedef struct AudioFIRDSPContext { + void (*fcmul_add)(float *sum, const float *t, const float *c, + ptrdiff_t len); +} AudioFIRDSPContext; + +typedef struct AudioFIRContext { + const AVClass *class; + + float wet_gain; + float dry_gain; + float length; + int gtype; + float ir_gain; + int ir_format; + float max_ir_len; + int response; + int w, h; + AVRational frame_rate; + int ir_channel; + int minp; + int maxp; + int nb_irs; + int selir; + + float gain; + + int eof_coeffs[32]; + int have_coeffs; + int nb_taps; + int nb_channels; + int nb_coef_channels; + int one2many; + + AudioFIRSegment seg[1024]; + int nb_segments; + + AVFrame *in; + AVFrame *ir[32]; + AVFrame *video; + int min_part_size; + int64_t pts; + + AudioFIRDSPContext afirdsp; + AVFloatDSPContext *fdsp; + +} AudioFIRContext; + +void ff_afir_init(AudioFIRDSPContext *s); +void ff_afir_init_x86(AudioFIRDSPContext *s); + +#endif /* AVFILTER_AFIR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_anlmdndsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_anlmdndsp.h new file mode 100644 index 00000000..d8f5136c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_anlmdndsp.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2019 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_ANLMDNDSP_H +#define AVFILTER_ANLMDNDSP_H + +#include "libavutil/common.h" + +#include "audio.h" +#include "avfilter.h" +#include "formats.h" +#include "internal.h" + +typedef struct AudioNLMDNDSPContext { + float (*compute_distance_ssd)(const float *f1, const float *f2, ptrdiff_t K); + void (*compute_cache)(float *cache, const float *f, ptrdiff_t S, ptrdiff_t K, + ptrdiff_t i, ptrdiff_t jj); +} AudioNLMDNDSPContext; + +void ff_anlmdn_init(AudioNLMDNDSPContext *s); +void ff_anlmdn_init_x86(AudioNLMDNDSPContext *s); + +#endif /* AVFILTER_ANLMDNDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_volume.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_volume.h new file mode 100644 index 00000000..af46e34f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/af_volume.h @@ -0,0 +1,93 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * audio volume filter + */ + +#ifndef AVFILTER_VOLUME_H +#define AVFILTER_VOLUME_H + +#include "libavutil/common.h" +#include "libavutil/eval.h" +#include "libavutil/float_dsp.h" +#include "libavutil/opt.h" +#include "libavutil/samplefmt.h" + +enum PrecisionType { + PRECISION_FIXED = 0, + PRECISION_FLOAT, + PRECISION_DOUBLE, +}; + +enum EvalMode { + EVAL_MODE_ONCE, + EVAL_MODE_FRAME, + EVAL_MODE_NB +}; + +enum VolumeVarName { + VAR_N, + VAR_NB_CHANNELS, + VAR_NB_CONSUMED_SAMPLES, + VAR_NB_SAMPLES, + VAR_POS, + VAR_PTS, + VAR_SAMPLE_RATE, + VAR_STARTPTS, + VAR_STARTT, + VAR_T, + VAR_TB, + VAR_VOLUME, + VAR_VARS_NB +}; + +enum ReplayGainType { + REPLAYGAIN_DROP, + REPLAYGAIN_IGNORE, + REPLAYGAIN_TRACK, + REPLAYGAIN_ALBUM, +}; + +typedef struct VolumeContext { + const AVClass *class; + AVFloatDSPContext *fdsp; + int precision; + int eval_mode; + const char *volume_expr; + AVExpr *volume_pexpr; + double var_values[VAR_VARS_NB]; + + int replaygain; + double replaygain_preamp; + int replaygain_noclip; + double volume; + int volume_i; + int channels; + int planes; + enum AVSampleFormat sample_fmt; + + void (*scale_samples)(uint8_t *dst, const uint8_t *src, int nb_samples, + int volume); + int samples_align; +} VolumeContext; + +void ff_volume_init_x86(VolumeContext *vol); + +#endif /* AVFILTER_VOLUME_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/atadenoise.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/atadenoise.h new file mode 100644 index 00000000..26cb20b9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/atadenoise.h @@ -0,0 +1,42 @@ + /* + * Copyright (c) 2019 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_ATADENOISE_H +#define AVFILTER_ATADENOISE_H + +#include +#include + +enum ATAAlgorithm { + PARALLEL, + SERIAL, + NB_ATAA +}; + +typedef struct ATADenoiseDSPContext { + void (*filter_row)(const uint8_t *src, uint8_t *dst, + const uint8_t **srcf, + int w, int mid, int size, + int thra, int thrb); +} ATADenoiseDSPContext; + +void ff_atadenoise_init_x86(ATADenoiseDSPContext *dsp, int depth, int algorithm); + +#endif /* AVFILTER_ATADENOISE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/audio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/audio.h new file mode 100644 index 00000000..6adc82dc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/audio.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) Stefano Sabatini | stefasab at gmail.com + * Copyright (c) S.N. Hemanth Meenakshisundaram | smeenaks at ucsd.edu + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_AUDIO_H +#define AVFILTER_AUDIO_H + +#include "avfilter.h" +#include "internal.h" + +static const enum AVSampleFormat ff_packed_sample_fmts_array[] = { + AV_SAMPLE_FMT_U8, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_S32, + AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_DBL, + AV_SAMPLE_FMT_NONE +}; + +static const enum AVSampleFormat ff_planar_sample_fmts_array[] = { + AV_SAMPLE_FMT_U8P, + AV_SAMPLE_FMT_S16P, + AV_SAMPLE_FMT_S32P, + AV_SAMPLE_FMT_FLTP, + AV_SAMPLE_FMT_DBLP, + AV_SAMPLE_FMT_NONE +}; + +/** default handler for get_audio_buffer() for audio inputs */ +AVFrame *ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples); + +/** get_audio_buffer() handler for filters which simply pass audio along */ +AVFrame *ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples); + +/** + * Request an audio samples buffer with a specific set of permissions. + * + * @param link the output link to the filter from which the buffer will + * be requested + * @param nb_samples the number of samples per channel + * @return A reference to the samples. This must be unreferenced with + * avfilter_unref_buffer when you are finished with it. + */ +AVFrame *ff_get_audio_buffer(AVFilterLink *link, int nb_samples); + +#endif /* AVFILTER_AUDIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avf_showcqt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avf_showcqt.h new file mode 100644 index 00000000..0cef5a20 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avf_showcqt.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2015 Muhammad Faiz + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_SHOWCQT_H +#define AVFILTER_SHOWCQT_H + +#include "libavcodec/avfft.h" +#include "avfilter.h" +#include "internal.h" + +typedef struct Coeffs { + FFTSample *val; + int start, len; +} Coeffs; + +typedef struct RGBFloat { + float r, g, b; +} RGBFloat; + +typedef struct YUVFloat { + float y, u, v; +} YUVFloat; + +typedef union { + RGBFloat rgb; + YUVFloat yuv; +} ColorFloat; + +typedef struct ShowCQTContext { + const AVClass *class; + AVFilterContext *ctx; + AVFrame *axis_frame; + AVFrame *sono_frame; + enum AVPixelFormat format; + int sono_idx; + int sono_count; + int step; + AVRational step_frac; + int remaining_frac; + int remaining_fill; + int remaining_fill_max; + int64_t next_pts; + double *freq; + FFTContext *fft_ctx; + Coeffs *coeffs; + FFTComplex *fft_data; + FFTComplex *fft_result; + FFTComplex *cqt_result; + float *attack_data; + int fft_bits; + int fft_len; + int cqt_len; + int cqt_align; + ColorFloat *c_buf; + float *h_buf; + float *rcp_h_buf; + float *sono_v_buf; + float *bar_v_buf; + float cmatrix[3][3]; + float cscheme_v[6]; + /* callback */ + void (*cqt_calc)(FFTComplex *dst, const FFTComplex *src, const Coeffs *coeffs, + int len, int fft_len); + void (*permute_coeffs)(float *v, int len); + void (*draw_bar)(AVFrame *out, const float *h, const float *rcp_h, + const ColorFloat *c, int bar_h, float bar_t); + void (*draw_axis)(AVFrame *out, AVFrame *axis, const ColorFloat *c, int off); + void (*draw_sono)(AVFrame *out, AVFrame *sono, int off, int idx); + void (*update_sono)(AVFrame *sono, const ColorFloat *c, int idx); + /* performance debugging */ + int64_t fft_time; + int64_t cqt_time; + int64_t process_cqt_time; + int64_t update_sono_time; + int64_t alloc_time; + int64_t bar_time; + int64_t axis_time; + int64_t sono_time; + /* option */ + int width, height; + AVRational rate; + int bar_h; + int axis_h; + int sono_h; + int fullhd; /* deprecated */ + char *sono_v; + char *bar_v; + float sono_g; + float bar_g; + float bar_t; + double timeclamp; + double attack; + double basefreq; + double endfreq; + float coeffclamp; /* deprecated - ignored */ + char *tlength; + int count; + int fcount; + char *fontfile; + char *font; + char *fontcolor; + char *axisfile; + int axis; + int csp; + char *cscheme; +} ShowCQTContext; + +void ff_showcqt_init_x86(ShowCQTContext *s); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avfilter.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avfilter.h new file mode 100644 index 00000000..49b4f7a9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/avfilter.h @@ -0,0 +1,1168 @@ +/* + * filter layer + * Copyright (c) 2007 Bobby Bingham + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_AVFILTER_H +#define AVFILTER_AVFILTER_H + +/** + * @file + * @ingroup lavfi + * Main libavfilter public API header + */ + +/** + * @defgroup lavfi libavfilter + * Graph-based frame editing library. + * + * @{ + */ + +#include + +#include "libavutil/attributes.h" +#include "libavutil/avutil.h" +#include "libavutil/buffer.h" +#include "libavutil/dict.h" +#include "libavutil/frame.h" +#include "libavutil/log.h" +#include "libavutil/samplefmt.h" +#include "libavutil/pixfmt.h" +#include "libavutil/rational.h" + +#include "libavfilter/version.h" + +/** + * Return the LIBAVFILTER_VERSION_INT constant. + */ +unsigned avfilter_version(void); + +/** + * Return the libavfilter build-time configuration. + */ +const char *avfilter_configuration(void); + +/** + * Return the libavfilter license. + */ +const char *avfilter_license(void); + +typedef struct AVFilterContext AVFilterContext; +typedef struct AVFilterLink AVFilterLink; +typedef struct AVFilterPad AVFilterPad; +typedef struct AVFilterFormats AVFilterFormats; + +/** + * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. + * AVFilter.inputs/outputs). + */ +int avfilter_pad_count(const AVFilterPad *pads); + +/** + * Get the name of an AVFilterPad. + * + * @param pads an array of AVFilterPads + * @param pad_idx index of the pad in the array; it is the caller's + * responsibility to ensure the index is valid + * + * @return name of the pad_idx'th pad in pads + */ +const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx); + +/** + * Get the type of an AVFilterPad. + * + * @param pads an array of AVFilterPads + * @param pad_idx index of the pad in the array; it is the caller's + * responsibility to ensure the index is valid + * + * @return type of the pad_idx'th pad in pads + */ +enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx); + +/** + * The number of the filter inputs is not determined just by AVFilter.inputs. + * The filter might add additional inputs during initialization depending on the + * options supplied to it. + */ +#define AVFILTER_FLAG_DYNAMIC_INPUTS (1 << 0) +/** + * The number of the filter outputs is not determined just by AVFilter.outputs. + * The filter might add additional outputs during initialization depending on + * the options supplied to it. + */ +#define AVFILTER_FLAG_DYNAMIC_OUTPUTS (1 << 1) +/** + * The filter supports multithreading by splitting frames into multiple parts + * and processing them concurrently. + */ +#define AVFILTER_FLAG_SLICE_THREADS (1 << 2) +/** + * Some filters support a generic "enable" expression option that can be used + * to enable or disable a filter in the timeline. Filters supporting this + * option have this flag set. When the enable expression is false, the default + * no-op filter_frame() function is called in place of the filter_frame() + * callback defined on each input pad, thus the frame is passed unchanged to + * the next filters. + */ +#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC (1 << 16) +/** + * Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will + * have its filter_frame() callback(s) called as usual even when the enable + * expression is false. The filter will disable filtering within the + * filter_frame() callback(s) itself, for example executing code depending on + * the AVFilterContext->is_disabled value. + */ +#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL (1 << 17) +/** + * Handy mask to test whether the filter supports or no the timeline feature + * (internally or generically). + */ +#define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL) + +/** + * Filter definition. This defines the pads a filter contains, and all the + * callback functions used to interact with the filter. + */ +typedef struct AVFilter { + /** + * Filter name. Must be non-NULL and unique among filters. + */ + const char *name; + + /** + * A description of the filter. May be NULL. + * + * You should use the NULL_IF_CONFIG_SMALL() macro to define it. + */ + const char *description; + + /** + * List of inputs, terminated by a zeroed element. + * + * NULL if there are no (static) inputs. Instances of filters with + * AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in + * this list. + */ + const AVFilterPad *inputs; + /** + * List of outputs, terminated by a zeroed element. + * + * NULL if there are no (static) outputs. Instances of filters with + * AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in + * this list. + */ + const AVFilterPad *outputs; + + /** + * A class for the private data, used to declare filter private AVOptions. + * This field is NULL for filters that do not declare any options. + * + * If this field is non-NULL, the first member of the filter private data + * must be a pointer to AVClass, which will be set by libavfilter generic + * code to this class. + */ + const AVClass *priv_class; + + /** + * A combination of AVFILTER_FLAG_* + */ + int flags; + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavfilter and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + + /** + * Filter pre-initialization function + * + * This callback will be called immediately after the filter context is + * allocated, to allow allocating and initing sub-objects. + * + * If this callback is not NULL, the uninit callback will be called on + * allocation failure. + * + * @return 0 on success, + * AVERROR code on failure (but the code will be + * dropped and treated as ENOMEM by the calling code) + */ + int (*preinit)(AVFilterContext *ctx); + + /** + * Filter initialization function. + * + * This callback will be called only once during the filter lifetime, after + * all the options have been set, but before links between filters are + * established and format negotiation is done. + * + * Basic filter initialization should be done here. Filters with dynamic + * inputs and/or outputs should create those inputs/outputs here based on + * provided options. No more changes to this filter's inputs/outputs can be + * done after this callback. + * + * This callback must not assume that the filter links exist or frame + * parameters are known. + * + * @ref AVFilter.uninit "uninit" is guaranteed to be called even if + * initialization fails, so this callback does not have to clean up on + * failure. + * + * @return 0 on success, a negative AVERROR on failure + */ + int (*init)(AVFilterContext *ctx); + + /** + * Should be set instead of @ref AVFilter.init "init" by the filters that + * want to pass a dictionary of AVOptions to nested contexts that are + * allocated during init. + * + * On return, the options dict should be freed and replaced with one that + * contains all the options which could not be processed by this filter (or + * with NULL if all the options were processed). + * + * Otherwise the semantics is the same as for @ref AVFilter.init "init". + */ + int (*init_dict)(AVFilterContext *ctx, AVDictionary **options); + + /** + * Filter uninitialization function. + * + * Called only once right before the filter is freed. Should deallocate any + * memory held by the filter, release any buffer references, etc. It does + * not need to deallocate the AVFilterContext.priv memory itself. + * + * This callback may be called even if @ref AVFilter.init "init" was not + * called or failed, so it must be prepared to handle such a situation. + */ + void (*uninit)(AVFilterContext *ctx); + + /** + * Query formats supported by the filter on its inputs and outputs. + * + * This callback is called after the filter is initialized (so the inputs + * and outputs are fixed), shortly before the format negotiation. This + * callback may be called more than once. + * + * This callback must set AVFilterLink.out_formats on every input link and + * AVFilterLink.in_formats on every output link to a list of pixel/sample + * formats that the filter supports on that link. For audio links, this + * filter must also set @ref AVFilterLink.in_samplerates "in_samplerates" / + * @ref AVFilterLink.out_samplerates "out_samplerates" and + * @ref AVFilterLink.in_channel_layouts "in_channel_layouts" / + * @ref AVFilterLink.out_channel_layouts "out_channel_layouts" analogously. + * + * This callback may be NULL for filters with one input, in which case + * libavfilter assumes that it supports all input formats and preserves + * them on output. + * + * @return zero on success, a negative value corresponding to an + * AVERROR code otherwise + */ + int (*query_formats)(AVFilterContext *); + + int priv_size; ///< size of private data to allocate for the filter + + int flags_internal; ///< Additional flags for avfilter internal use only. + + /** + * Used by the filter registration system. Must not be touched by any other + * code. + */ + struct AVFilter *next; + + /** + * Make the filter instance process a command. + * + * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only + * @param arg the argument for the command + * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported. + * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be + * time consuming then a filter should treat it like an unsupported command + * + * @returns >=0 on success otherwise an error code. + * AVERROR(ENOSYS) on unsupported commands + */ + int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags); + + /** + * Filter initialization function, alternative to the init() + * callback. Args contains the user-supplied parameters, opaque is + * used for providing binary data. + */ + int (*init_opaque)(AVFilterContext *ctx, void *opaque); + + /** + * Filter activation function. + * + * Called when any processing is needed from the filter, instead of any + * filter_frame and request_frame on pads. + * + * The function must examine inlinks and outlinks and perform a single + * step of processing. If there is nothing to do, the function must do + * nothing and not return an error. If more steps are or may be + * possible, it must use ff_filter_set_ready() to schedule another + * activation. + */ + int (*activate)(AVFilterContext *ctx); +} AVFilter; + +/** + * Process multiple parts of the frame concurrently. + */ +#define AVFILTER_THREAD_SLICE (1 << 0) + +typedef struct AVFilterInternal AVFilterInternal; + +/** An instance of a filter */ +struct AVFilterContext { + const AVClass *av_class; ///< needed for av_log() and filters common options + + const AVFilter *filter; ///< the AVFilter of which this is an instance + + char *name; ///< name of this filter instance + + AVFilterPad *input_pads; ///< array of input pads + AVFilterLink **inputs; ///< array of pointers to input links + unsigned nb_inputs; ///< number of input pads + + AVFilterPad *output_pads; ///< array of output pads + AVFilterLink **outputs; ///< array of pointers to output links + unsigned nb_outputs; ///< number of output pads + + void *priv; ///< private data for use by the filter + + struct AVFilterGraph *graph; ///< filtergraph this filter belongs to + + /** + * Type of multithreading being allowed/used. A combination of + * AVFILTER_THREAD_* flags. + * + * May be set by the caller before initializing the filter to forbid some + * or all kinds of multithreading for this filter. The default is allowing + * everything. + * + * When the filter is initialized, this field is combined using bit AND with + * AVFilterGraph.thread_type to get the final mask used for determining + * allowed threading types. I.e. a threading type needs to be set in both + * to be allowed. + * + * After the filter is initialized, libavfilter sets this field to the + * threading type that is actually used (0 for no multithreading). + */ + int thread_type; + + /** + * An opaque struct for libavfilter internal use. + */ + AVFilterInternal *internal; + + struct AVFilterCommand *command_queue; + + char *enable_str; ///< enable expression string + void *enable; ///< parsed expression (AVExpr*) + double *var_values; ///< variable values for the enable expression + int is_disabled; ///< the enabled state from the last expression evaluation + + /** + * For filters which will create hardware frames, sets the device the + * filter should create them in. All other filters will ignore this field: + * in particular, a filter which consumes or processes hardware frames will + * instead use the hw_frames_ctx field in AVFilterLink to carry the + * hardware context information. + */ + AVBufferRef *hw_device_ctx; + + /** + * Max number of threads allowed in this filter instance. + * If <= 0, its value is ignored. + * Overrides global number of threads set per filter graph. + */ + int nb_threads; + + /** + * Ready status of the filter. + * A non-0 value means that the filter needs activating; + * a higher value suggests a more urgent activation. + */ + unsigned ready; + + /** + * Sets the number of extra hardware frames which the filter will + * allocate on its output links for use in following filters or by + * the caller. + * + * Some hardware filters require all frames that they will use for + * output to be defined in advance before filtering starts. For such + * filters, any hardware frame pools used for output must therefore be + * of fixed size. The extra frames set here are on top of any number + * that the filter needs internally in order to operate normally. + * + * This field must be set before the graph containing this filter is + * configured. + */ + int extra_hw_frames; +}; + +/** + * A link between two filters. This contains pointers to the source and + * destination filters between which this link exists, and the indexes of + * the pads involved. In addition, this link also contains the parameters + * which have been negotiated and agreed upon between the filter, such as + * image dimensions, format, etc. + * + * Applications must not normally access the link structure directly. + * Use the buffersrc and buffersink API instead. + * In the future, access to the header may be reserved for filters + * implementation. + */ +struct AVFilterLink { + AVFilterContext *src; ///< source filter + AVFilterPad *srcpad; ///< output pad on the source filter + + AVFilterContext *dst; ///< dest filter + AVFilterPad *dstpad; ///< input pad on the dest filter + + enum AVMediaType type; ///< filter media type + + /* These parameters apply only to video */ + int w; ///< agreed upon image width + int h; ///< agreed upon image height + AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio + /* These parameters apply only to audio */ + uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/channel_layout.h) + int sample_rate; ///< samples per second + + int format; ///< agreed upon media format + + /** + * Define the time base used by the PTS of the frames/samples + * which will pass through this link. + * During the configuration stage, each filter is supposed to + * change only the output timebase, while the timebase of the + * input link is assumed to be an unchangeable property. + */ + AVRational time_base; + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavfilter and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + /** + * Lists of formats and channel layouts supported by the input and output + * filters respectively. These lists are used for negotiating the format + * to actually be used, which will be loaded into the format and + * channel_layout members, above, when chosen. + * + */ + AVFilterFormats *in_formats; + AVFilterFormats *out_formats; + + /** + * Lists of channel layouts and sample rates used for automatic + * negotiation. + */ + AVFilterFormats *in_samplerates; + AVFilterFormats *out_samplerates; + struct AVFilterChannelLayouts *in_channel_layouts; + struct AVFilterChannelLayouts *out_channel_layouts; + + /** + * Audio only, the destination filter sets this to a non-zero value to + * request that buffers with the given number of samples should be sent to + * it. AVFilterPad.needs_fifo must also be set on the corresponding input + * pad. + * Last buffer before EOF will be padded with silence. + */ + int request_samples; + + /** stage of the initialization of the link properties (dimensions, etc) */ + enum { + AVLINK_UNINIT = 0, ///< not started + AVLINK_STARTINIT, ///< started, but incomplete + AVLINK_INIT ///< complete + } init_state; + + /** + * Graph the filter belongs to. + */ + struct AVFilterGraph *graph; + + /** + * Current timestamp of the link, as defined by the most recent + * frame(s), in link time_base units. + */ + int64_t current_pts; + + /** + * Current timestamp of the link, as defined by the most recent + * frame(s), in AV_TIME_BASE units. + */ + int64_t current_pts_us; + + /** + * Index in the age array. + */ + int age_index; + + /** + * Frame rate of the stream on the link, or 1/0 if unknown or variable; + * if left to 0/0, will be automatically copied from the first input + * of the source filter if it exists. + * + * Sources should set it to the best estimation of the real frame rate. + * If the source frame rate is unknown or variable, set this to 1/0. + * Filters should update it if necessary depending on their function. + * Sinks can use it to set a default output frame rate. + * It is similar to the r_frame_rate field in AVStream. + */ + AVRational frame_rate; + + /** + * Buffer partially filled with samples to achieve a fixed/minimum size. + */ + AVFrame *partial_buf; + + /** + * Size of the partial buffer to allocate. + * Must be between min_samples and max_samples. + */ + int partial_buf_size; + + /** + * Minimum number of samples to filter at once. If filter_frame() is + * called with fewer samples, it will accumulate them in partial_buf. + * This field and the related ones must not be changed after filtering + * has started. + * If 0, all related fields are ignored. + */ + int min_samples; + + /** + * Maximum number of samples to filter at once. If filter_frame() is + * called with more samples, it will split them. + */ + int max_samples; + + /** + * Number of channels. + */ + int channels; + + /** + * Link processing flags. + */ + unsigned flags; + + /** + * Number of past frames sent through the link. + */ + int64_t frame_count_in, frame_count_out; + + /** + * A pointer to a FFFramePool struct. + */ + void *frame_pool; + + /** + * True if a frame is currently wanted on the output of this filter. + * Set when ff_request_frame() is called by the output, + * cleared when a frame is filtered. + */ + int frame_wanted_out; + + /** + * For hwaccel pixel formats, this should be a reference to the + * AVHWFramesContext describing the frames. + */ + AVBufferRef *hw_frames_ctx; + +#ifndef FF_INTERNAL_FIELDS + + /** + * Internal structure members. + * The fields below this limit are internal for libavfilter's use + * and must in no way be accessed by applications. + */ + char reserved[0xF000]; + +#else /* FF_INTERNAL_FIELDS */ + + /** + * Queue of frames waiting to be filtered. + */ + FFFrameQueue fifo; + + /** + * If set, the source filter can not generate a frame as is. + * The goal is to avoid repeatedly calling the request_frame() method on + * the same link. + */ + int frame_blocked_in; + + /** + * Link input status. + * If not zero, all attempts of filter_frame will fail with the + * corresponding code. + */ + int status_in; + + /** + * Timestamp of the input status change. + */ + int64_t status_in_pts; + + /** + * Link output status. + * If not zero, all attempts of request_frame will fail with the + * corresponding code. + */ + int status_out; + +#endif /* FF_INTERNAL_FIELDS */ + +}; + +/** + * Link two filters together. + * + * @param src the source filter + * @param srcpad index of the output pad on the source filter + * @param dst the destination filter + * @param dstpad index of the input pad on the destination filter + * @return zero on success + */ +int avfilter_link(AVFilterContext *src, unsigned srcpad, + AVFilterContext *dst, unsigned dstpad); + +/** + * Free the link in *link, and set its pointer to NULL. + */ +void avfilter_link_free(AVFilterLink **link); + +#if FF_API_FILTER_GET_SET +/** + * Get the number of channels of a link. + * @deprecated Use av_buffersink_get_channels() + */ +attribute_deprecated +int avfilter_link_get_channels(AVFilterLink *link); +#endif + +/** + * Set the closed field of a link. + * @deprecated applications are not supposed to mess with links, they should + * close the sinks. + */ +attribute_deprecated +void avfilter_link_set_closed(AVFilterLink *link, int closed); + +/** + * Negotiate the media format, dimensions, etc of all inputs to a filter. + * + * @param filter the filter to negotiate the properties for its inputs + * @return zero on successful negotiation + */ +int avfilter_config_links(AVFilterContext *filter); + +#define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically +#define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw) + +/** + * Make the filter instance process a command. + * It is recommended to use avfilter_graph_send_command(). + */ +int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags); + +/** + * Iterate over all registered filters. + * + * @param opaque a pointer where libavfilter will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered filter or NULL when the iteration is + * finished + */ +const AVFilter *av_filter_iterate(void **opaque); + +#if FF_API_NEXT +/** Initialize the filter system. Register all builtin filters. */ +attribute_deprecated +void avfilter_register_all(void); + +/** + * Register a filter. This is only needed if you plan to use + * avfilter_get_by_name later to lookup the AVFilter structure by name. A + * filter can still by instantiated with avfilter_graph_alloc_filter even if it + * is not registered. + * + * @param filter the filter to register + * @return 0 if the registration was successful, a negative value + * otherwise + */ +attribute_deprecated +int avfilter_register(AVFilter *filter); + +/** + * Iterate over all registered filters. + * @return If prev is non-NULL, next registered filter after prev or NULL if + * prev is the last filter. If prev is NULL, return the first registered filter. + */ +attribute_deprecated +const AVFilter *avfilter_next(const AVFilter *prev); +#endif + +/** + * Get a filter definition matching the given name. + * + * @param name the filter name to find + * @return the filter definition, if any matching one is registered. + * NULL if none found. + */ +const AVFilter *avfilter_get_by_name(const char *name); + + +/** + * Initialize a filter with the supplied parameters. + * + * @param ctx uninitialized filter context to initialize + * @param args Options to initialize the filter with. This must be a + * ':'-separated list of options in the 'key=value' form. + * May be NULL if the options have been set directly using the + * AVOptions API or there are no options that need to be set. + * @return 0 on success, a negative AVERROR on failure + */ +int avfilter_init_str(AVFilterContext *ctx, const char *args); + +/** + * Initialize a filter with the supplied dictionary of options. + * + * @param ctx uninitialized filter context to initialize + * @param options An AVDictionary filled with options for this filter. On + * return this parameter will be destroyed and replaced with + * a dict containing options that were not found. This dictionary + * must be freed by the caller. + * May be NULL, then this function is equivalent to + * avfilter_init_str() with the second parameter set to NULL. + * @return 0 on success, a negative AVERROR on failure + * + * @note This function and avfilter_init_str() do essentially the same thing, + * the difference is in manner in which the options are passed. It is up to the + * calling code to choose whichever is more preferable. The two functions also + * behave differently when some of the provided options are not declared as + * supported by the filter. In such a case, avfilter_init_str() will fail, but + * this function will leave those extra options in the options AVDictionary and + * continue as usual. + */ +int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options); + +/** + * Free a filter context. This will also remove the filter from its + * filtergraph's list of filters. + * + * @param filter the filter to free + */ +void avfilter_free(AVFilterContext *filter); + +/** + * Insert a filter in the middle of an existing link. + * + * @param link the link into which the filter should be inserted + * @param filt the filter to be inserted + * @param filt_srcpad_idx the input pad on the filter to connect + * @param filt_dstpad_idx the output pad on the filter to connect + * @return zero on success + */ +int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, + unsigned filt_srcpad_idx, unsigned filt_dstpad_idx); + +/** + * @return AVClass for AVFilterContext. + * + * @see av_opt_find(). + */ +const AVClass *avfilter_get_class(void); + +typedef struct AVFilterGraphInternal AVFilterGraphInternal; + +/** + * A function pointer passed to the @ref AVFilterGraph.execute callback to be + * executed multiple times, possibly in parallel. + * + * @param ctx the filter context the job belongs to + * @param arg an opaque parameter passed through from @ref + * AVFilterGraph.execute + * @param jobnr the index of the job being executed + * @param nb_jobs the total number of jobs + * + * @return 0 on success, a negative AVERROR on error + */ +typedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); + +/** + * A function executing multiple jobs, possibly in parallel. + * + * @param ctx the filter context to which the jobs belong + * @param func the function to be called multiple times + * @param arg the argument to be passed to func + * @param ret a nb_jobs-sized array to be filled with return values from each + * invocation of func + * @param nb_jobs the number of jobs to execute + * + * @return 0 on success, a negative AVERROR on error + */ +typedef int (avfilter_execute_func)(AVFilterContext *ctx, avfilter_action_func *func, + void *arg, int *ret, int nb_jobs); + +typedef struct AVFilterGraph { + const AVClass *av_class; + AVFilterContext **filters; + unsigned nb_filters; + + char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters +#if FF_API_LAVR_OPTS + attribute_deprecated char *resample_lavr_opts; ///< libavresample options to use for the auto-inserted resample filters +#endif + + /** + * Type of multithreading allowed for filters in this graph. A combination + * of AVFILTER_THREAD_* flags. + * + * May be set by the caller at any point, the setting will apply to all + * filters initialized after that. The default is allowing everything. + * + * When a filter in this graph is initialized, this field is combined using + * bit AND with AVFilterContext.thread_type to get the final mask used for + * determining allowed threading types. I.e. a threading type needs to be + * set in both to be allowed. + */ + int thread_type; + + /** + * Maximum number of threads used by filters in this graph. May be set by + * the caller before adding any filters to the filtergraph. Zero (the + * default) means that the number of threads is determined automatically. + */ + int nb_threads; + + /** + * Opaque object for libavfilter internal use. + */ + AVFilterGraphInternal *internal; + + /** + * Opaque user data. May be set by the caller to an arbitrary value, e.g. to + * be used from callbacks like @ref AVFilterGraph.execute. + * Libavfilter will not touch this field in any way. + */ + void *opaque; + + /** + * This callback may be set by the caller immediately after allocating the + * graph and before adding any filters to it, to provide a custom + * multithreading implementation. + * + * If set, filters with slice threading capability will call this callback + * to execute multiple jobs in parallel. + * + * If this field is left unset, libavfilter will use its internal + * implementation, which may or may not be multithreaded depending on the + * platform and build options. + */ + avfilter_execute_func *execute; + + char *aresample_swr_opts; ///< swr options to use for the auto-inserted aresample filters, Access ONLY through AVOptions + + /** + * Private fields + * + * The following fields are for internal use only. + * Their type, offset, number and semantic can change without notice. + */ + + AVFilterLink **sink_links; + int sink_links_count; + + unsigned disable_auto_convert; +} AVFilterGraph; + +/** + * Allocate a filter graph. + * + * @return the allocated filter graph on success or NULL. + */ +AVFilterGraph *avfilter_graph_alloc(void); + +/** + * Create a new filter instance in a filter graph. + * + * @param graph graph in which the new filter will be used + * @param filter the filter to create an instance of + * @param name Name to give to the new instance (will be copied to + * AVFilterContext.name). This may be used by the caller to identify + * different filters, libavfilter itself assigns no semantics to + * this parameter. May be NULL. + * + * @return the context of the newly created filter instance (note that it is + * also retrievable directly through AVFilterGraph.filters or with + * avfilter_graph_get_filter()) on success or NULL on failure. + */ +AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph, + const AVFilter *filter, + const char *name); + +/** + * Get a filter instance identified by instance name from graph. + * + * @param graph filter graph to search through. + * @param name filter instance name (should be unique in the graph). + * @return the pointer to the found filter instance or NULL if it + * cannot be found. + */ +AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name); + +/** + * Create and add a filter instance into an existing graph. + * The filter instance is created from the filter filt and inited + * with the parameter args. opaque is currently ignored. + * + * In case of success put in *filt_ctx the pointer to the created + * filter instance, otherwise set *filt_ctx to NULL. + * + * @param name the instance name to give to the created filter instance + * @param graph_ctx the filter graph + * @return a negative AVERROR error code in case of failure, a non + * negative value otherwise + */ +int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, + const char *name, const char *args, void *opaque, + AVFilterGraph *graph_ctx); + +/** + * Enable or disable automatic format conversion inside the graph. + * + * Note that format conversion can still happen inside explicitly inserted + * scale and aresample filters. + * + * @param flags any of the AVFILTER_AUTO_CONVERT_* constants + */ +void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags); + +enum { + AVFILTER_AUTO_CONVERT_ALL = 0, /**< all automatic conversions enabled */ + AVFILTER_AUTO_CONVERT_NONE = -1, /**< all automatic conversions disabled */ +}; + +/** + * Check validity and configure all the links and formats in the graph. + * + * @param graphctx the filter graph + * @param log_ctx context used for logging + * @return >= 0 in case of success, a negative AVERROR code otherwise + */ +int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx); + +/** + * Free a graph, destroy its links, and set *graph to NULL. + * If *graph is NULL, do nothing. + */ +void avfilter_graph_free(AVFilterGraph **graph); + +/** + * A linked-list of the inputs/outputs of the filter chain. + * + * This is mainly useful for avfilter_graph_parse() / avfilter_graph_parse2(), + * where it is used to communicate open (unlinked) inputs and outputs from and + * to the caller. + * This struct specifies, per each not connected pad contained in the graph, the + * filter context and the pad index required for establishing a link. + */ +typedef struct AVFilterInOut { + /** unique name for this input/output in the list */ + char *name; + + /** filter context associated to this input/output */ + AVFilterContext *filter_ctx; + + /** index of the filt_ctx pad to use for linking */ + int pad_idx; + + /** next input/input in the list, NULL if this is the last */ + struct AVFilterInOut *next; +} AVFilterInOut; + +/** + * Allocate a single AVFilterInOut entry. + * Must be freed with avfilter_inout_free(). + * @return allocated AVFilterInOut on success, NULL on failure. + */ +AVFilterInOut *avfilter_inout_alloc(void); + +/** + * Free the supplied list of AVFilterInOut and set *inout to NULL. + * If *inout is NULL, do nothing. + */ +void avfilter_inout_free(AVFilterInOut **inout); + +/** + * Add a graph described by a string to a graph. + * + * @note The caller must provide the lists of inputs and outputs, + * which therefore must be known before calling the function. + * + * @note The inputs parameter describes inputs of the already existing + * part of the graph; i.e. from the point of view of the newly created + * part, they are outputs. Similarly the outputs parameter describes + * outputs of the already existing filters, which are provided as + * inputs to the parsed filters. + * + * @param graph the filter graph where to link the parsed graph context + * @param filters string to be parsed + * @param inputs linked list to the inputs of the graph + * @param outputs linked list to the outputs of the graph + * @return zero on success, a negative AVERROR code on error + */ +int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, + AVFilterInOut *inputs, AVFilterInOut *outputs, + void *log_ctx); + +/** + * Add a graph described by a string to a graph. + * + * In the graph filters description, if the input label of the first + * filter is not specified, "in" is assumed; if the output label of + * the last filter is not specified, "out" is assumed. + * + * @param graph the filter graph where to link the parsed graph context + * @param filters string to be parsed + * @param inputs pointer to a linked list to the inputs of the graph, may be NULL. + * If non-NULL, *inputs is updated to contain the list of open inputs + * after the parsing, should be freed with avfilter_inout_free(). + * @param outputs pointer to a linked list to the outputs of the graph, may be NULL. + * If non-NULL, *outputs is updated to contain the list of open outputs + * after the parsing, should be freed with avfilter_inout_free(). + * @return non negative on success, a negative AVERROR code on error + */ +int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters, + AVFilterInOut **inputs, AVFilterInOut **outputs, + void *log_ctx); + +/** + * Add a graph described by a string to a graph. + * + * @param[in] graph the filter graph where to link the parsed graph context + * @param[in] filters string to be parsed + * @param[out] inputs a linked list of all free (unlinked) inputs of the + * parsed graph will be returned here. It is to be freed + * by the caller using avfilter_inout_free(). + * @param[out] outputs a linked list of all free (unlinked) outputs of the + * parsed graph will be returned here. It is to be freed by the + * caller using avfilter_inout_free(). + * @return zero on success, a negative AVERROR code on error + * + * @note This function returns the inputs and outputs that are left + * unlinked after parsing the graph and the caller then deals with + * them. + * @note This function makes no reference whatsoever to already + * existing parts of the graph and the inputs parameter will on return + * contain inputs of the newly parsed part of the graph. Analogously + * the outputs parameter will contain outputs of the newly created + * filters. + */ +int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, + AVFilterInOut **inputs, + AVFilterInOut **outputs); + +/** + * Send a command to one or more filter instances. + * + * @param graph the filter graph + * @param target the filter(s) to which the command should be sent + * "all" sends to all filters + * otherwise it can be a filter or filter instance name + * which will send the command to all matching filters. + * @param cmd the command to send, for handling simplicity all commands must be alphanumeric only + * @param arg the argument for the command + * @param res a buffer with size res_size where the filter(s) can return a response. + * + * @returns >=0 on success otherwise an error code. + * AVERROR(ENOSYS) on unsupported commands + */ +int avfilter_graph_send_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, char *res, int res_len, int flags); + +/** + * Queue a command for one or more filter instances. + * + * @param graph the filter graph + * @param target the filter(s) to which the command should be sent + * "all" sends to all filters + * otherwise it can be a filter or filter instance name + * which will send the command to all matching filters. + * @param cmd the command to sent, for handling simplicity all commands must be alphanumeric only + * @param arg the argument for the command + * @param ts time at which the command should be sent to the filter + * + * @note As this executes commands after this function returns, no return code + * from the filter is provided, also AVFILTER_CMD_FLAG_ONE is not supported. + */ +int avfilter_graph_queue_command(AVFilterGraph *graph, const char *target, const char *cmd, const char *arg, int flags, double ts); + + +/** + * Dump a graph into a human-readable string representation. + * + * @param graph the graph to dump + * @param options formatting options; currently ignored + * @return a string, or NULL in case of memory allocation failure; + * the string must be freed using av_free + */ +char *avfilter_graph_dump(AVFilterGraph *graph, const char *options); + +/** + * Request a frame on the oldest sink link. + * + * If the request returns AVERROR_EOF, try the next. + * + * Note that this function is not meant to be the sole scheduling mechanism + * of a filtergraph, only a convenience function to help drain a filtergraph + * in a balanced way under normal circumstances. + * + * Also note that AVERROR_EOF does not mean that frames did not arrive on + * some of the sinks during the process. + * When there are multiple sink links, in case the requested link + * returns an EOF, this may cause a filter to flush pending frames + * which are sent to another sink link, although unrequested. + * + * @return the return value of ff_request_frame(), + * or AVERROR_EOF if all links returned AVERROR_EOF + */ +int avfilter_graph_request_oldest(AVFilterGraph *graph); + +/** + * @} + */ + +#endif /* AVFILTER_AVFILTER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bbox.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bbox.h new file mode 100644 index 00000000..cf026b81 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bbox.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2005 Robert Edele + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BBOX_H +#define AVFILTER_BBOX_H + +#include + +typedef struct FFBoundingBox { + int x1, x2, y1, y2; +} FFBoundingBox; + +/** + * Calculate the smallest rectangle that will encompass the + * region with values > min_val. + * + * @param bbox bounding box structure which is updated with the found values. + * If no pixels could be found with value > min_val, the + * structure is not modified. + * @return 1 in case at least one pixel with value > min_val was found, + * 0 otherwise + */ +int ff_calculate_bounding_box(FFBoundingBox *bbox, + const uint8_t *data, int linesize, + int w, int h, int min_val); + +#endif /* AVFILTER_BBOX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/blend.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/blend.h new file mode 100644 index 00000000..00db5183 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/blend.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2013 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BLEND_H +#define AVFILTER_BLEND_H + +#include "libavutil/eval.h" +#include "avfilter.h" + +enum BlendMode { + BLEND_UNSET = -1, + BLEND_NORMAL, + BLEND_ADDITION, + BLEND_AND, + BLEND_AVERAGE, + BLEND_BURN, + BLEND_DARKEN, + BLEND_DIFFERENCE, + BLEND_GRAINEXTRACT, + BLEND_DIVIDE, + BLEND_DODGE, + BLEND_EXCLUSION, + BLEND_HARDLIGHT, + BLEND_LIGHTEN, + BLEND_MULTIPLY, + BLEND_NEGATION, + BLEND_OR, + BLEND_OVERLAY, + BLEND_PHOENIX, + BLEND_PINLIGHT, + BLEND_REFLECT, + BLEND_SCREEN, + BLEND_SOFTLIGHT, + BLEND_SUBTRACT, + BLEND_VIVIDLIGHT, + BLEND_XOR, + BLEND_HARDMIX, + BLEND_LINEARLIGHT, + BLEND_GLOW, + BLEND_GRAINMERGE, + BLEND_MULTIPLY128, + BLEND_HEAT, + BLEND_FREEZE, + BLEND_EXTREMITY, + BLEND_NB +}; + +typedef struct FilterParams { + enum BlendMode mode; + double opacity; + AVExpr *e; + char *expr_str; + void (*blend)(const uint8_t *top, ptrdiff_t top_linesize, + const uint8_t *bottom, ptrdiff_t bottom_linesize, + uint8_t *dst, ptrdiff_t dst_linesize, + ptrdiff_t width, ptrdiff_t height, + struct FilterParams *param, double *values, int starty); +} FilterParams; + +void ff_blend_init(FilterParams *param, int depth); +void ff_blend_init_x86(FilterParams *param, int depth); + +#endif /* AVFILTER_BLEND_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/boxblur.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/boxblur.h new file mode 100644 index 00000000..5694722a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/boxblur.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002 Michael Niedermayer + * Copyright (c) 2011 Stefano Sabatini + * Copyright (c) 2018 Danil Iashchenko + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BOXBLUR_H +#define AVFILTER_BOXBLUR_H + +#include "libavutil/eval.h" +#include "libavutil/pixdesc.h" +#include "libavutil/mem.h" + +#include "avfilter.h" + +typedef struct FilterParam { + int radius; + int power; + char *radius_expr; +} FilterParam; + +#define Y 0 +#define U 1 +#define V 2 +#define A 3 + +int ff_boxblur_eval_filter_params(AVFilterLink *inlink, + FilterParam *luma_param, + FilterParam *chroma_param, + FilterParam *alpha_param); + +#endif // AVFILTER_BOXBLUR_H diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bufferqueue.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bufferqueue.h new file mode 100644 index 00000000..f5e5df2d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bufferqueue.h @@ -0,0 +1,121 @@ +/* + * Generic buffer queue + * Copyright (c) 2012 Nicolas George + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BUFFERQUEUE_H +#define AVFILTER_BUFFERQUEUE_H + +/** + * FFBufQueue: simple AVFrame queue API + * + * Note: this API is not thread-safe. Concurrent access to the same queue + * must be protected by a mutex or any synchronization mechanism. + */ + +/** + * Maximum size of the queue. + * + * This value can be overridden by definying it before including this + * header. + * Powers of 2 are recommended. + */ +#ifndef FF_BUFQUEUE_SIZE +#define FF_BUFQUEUE_SIZE 64 +#endif + +#include "avfilter.h" +#include "libavutil/avassert.h" + +/** + * Structure holding the queue + */ +struct FFBufQueue { + AVFrame *queue[FF_BUFQUEUE_SIZE]; + unsigned short head; + unsigned short available; /**< number of available buffers */ +}; + +#define BUCKET(i) queue->queue[(queue->head + (i)) % FF_BUFQUEUE_SIZE] + +/** + * Test if a buffer queue is full. + */ +static inline int ff_bufqueue_is_full(struct FFBufQueue *queue) +{ + return queue->available == FF_BUFQUEUE_SIZE; +} + +/** + * Add a buffer to the queue. + * + * If the queue is already full, then the current last buffer is dropped + * (and unrefed) with a warning before adding the new buffer. + */ +static inline void ff_bufqueue_add(void *log, struct FFBufQueue *queue, + AVFrame *buf) +{ + if (ff_bufqueue_is_full(queue)) { + av_log(log, AV_LOG_WARNING, "Buffer queue overflow, dropping.\n"); + av_frame_free(&BUCKET(--queue->available)); + } + BUCKET(queue->available++) = buf; +} + +/** + * Get a buffer from the queue without altering it. + * + * Buffer with index 0 is the first buffer in the queue. + * Return NULL if the queue has not enough buffers. + */ +static inline AVFrame *ff_bufqueue_peek(struct FFBufQueue *queue, + unsigned index) +{ + return index < queue->available ? BUCKET(index) : NULL; +} + +/** + * Get the first buffer from the queue and remove it. + * + * Do not use on an empty queue. + */ +static inline AVFrame *ff_bufqueue_get(struct FFBufQueue *queue) +{ + AVFrame *ret = queue->queue[queue->head]; + av_assert0(queue->available); + queue->available--; + queue->queue[queue->head] = NULL; + queue->head = (queue->head + 1) % FF_BUFQUEUE_SIZE; + return ret; +} + +/** + * Unref and remove all buffers from the queue. + */ +static inline void ff_bufqueue_discard_all(struct FFBufQueue *queue) +{ + while (queue->available) { + AVFrame *buf = ff_bufqueue_get(queue); + av_frame_free(&buf); + } +} + +#undef BUCKET + +#endif /* AVFILTER_BUFFERQUEUE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersink.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersink.h new file mode 100644 index 00000000..2ec821c6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersink.h @@ -0,0 +1,169 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BUFFERSINK_H +#define AVFILTER_BUFFERSINK_H + +/** + * @file + * @ingroup lavfi_buffersink + * memory buffer sink API for audio and video + */ + +#include "avfilter.h" + +/** + * @defgroup lavfi_buffersink Buffer sink API + * @ingroup lavfi + * @{ + */ + +/** + * Get a frame with filtered data from sink and put it in frame. + * + * @param ctx pointer to a buffersink or abuffersink filter context. + * @param frame pointer to an allocated frame that will be filled with data. + * The data must be freed using av_frame_unref() / av_frame_free() + * @param flags a combination of AV_BUFFERSINK_FLAG_* flags + * + * @return >= 0 in for success, a negative AVERROR code for failure. + */ +int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags); + +/** + * Tell av_buffersink_get_buffer_ref() to read video/samples buffer + * reference, but not remove it from the buffer. This is useful if you + * need only to read a video/samples buffer, without to fetch it. + */ +#define AV_BUFFERSINK_FLAG_PEEK 1 + +/** + * Tell av_buffersink_get_buffer_ref() not to request a frame from its input. + * If a frame is already buffered, it is read (and removed from the buffer), + * but if no frame is present, return AVERROR(EAGAIN). + */ +#define AV_BUFFERSINK_FLAG_NO_REQUEST 2 + +#if FF_API_NEXT +/** + * Struct to use for initializing a buffersink context. + */ +typedef struct AVBufferSinkParams { + const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE +} AVBufferSinkParams; + +/** + * Create an AVBufferSinkParams structure. + * + * Must be freed with av_free(). + */ +attribute_deprecated +AVBufferSinkParams *av_buffersink_params_alloc(void); + +/** + * Struct to use for initializing an abuffersink context. + */ +typedef struct AVABufferSinkParams { + const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE + const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1 + const int *channel_counts; ///< list of allowed channel counts, terminated by -1 + int all_channel_counts; ///< if not 0, accept any channel count or layout + int *sample_rates; ///< list of allowed sample rates, terminated by -1 +} AVABufferSinkParams; + +/** + * Create an AVABufferSinkParams structure. + * + * Must be freed with av_free(). + */ +attribute_deprecated +AVABufferSinkParams *av_abuffersink_params_alloc(void); +#endif + +/** + * Set the frame size for an audio buffer sink. + * + * All calls to av_buffersink_get_buffer_ref will return a buffer with + * exactly the specified number of samples, or AVERROR(EAGAIN) if there is + * not enough. The last buffer at EOF will be padded with 0. + */ +void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size); + +/** + * @defgroup lavfi_buffersink_accessors Buffer sink accessors + * Get the properties of the stream + * @{ + */ + +enum AVMediaType av_buffersink_get_type (const AVFilterContext *ctx); +AVRational av_buffersink_get_time_base (const AVFilterContext *ctx); +int av_buffersink_get_format (const AVFilterContext *ctx); + +AVRational av_buffersink_get_frame_rate (const AVFilterContext *ctx); +int av_buffersink_get_w (const AVFilterContext *ctx); +int av_buffersink_get_h (const AVFilterContext *ctx); +AVRational av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx); + +int av_buffersink_get_channels (const AVFilterContext *ctx); +uint64_t av_buffersink_get_channel_layout (const AVFilterContext *ctx); +int av_buffersink_get_sample_rate (const AVFilterContext *ctx); + +AVBufferRef * av_buffersink_get_hw_frames_ctx (const AVFilterContext *ctx); + +/** @} */ + +/** + * Get a frame with filtered data from sink and put it in frame. + * + * @param ctx pointer to a context of a buffersink or abuffersink AVFilter. + * @param frame pointer to an allocated frame that will be filled with data. + * The data must be freed using av_frame_unref() / av_frame_free() + * + * @return + * - >= 0 if a frame was successfully returned. + * - AVERROR(EAGAIN) if no frames are available at this point; more + * input frames must be added to the filtergraph to get more output. + * - AVERROR_EOF if there will be no more output frames on this sink. + * - A different negative AVERROR code in other failure cases. + */ +int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame); + +/** + * Same as av_buffersink_get_frame(), but with the ability to specify the number + * of samples read. This function is less efficient than + * av_buffersink_get_frame(), because it copies the data around. + * + * @param ctx pointer to a context of the abuffersink AVFilter. + * @param frame pointer to an allocated frame that will be filled with data. + * The data must be freed using av_frame_unref() / av_frame_free() + * frame will contain exactly nb_samples audio samples, except at + * the end of stream, when it can contain less than nb_samples. + * + * @return The return codes have the same meaning as for + * av_buffersink_get_frame(). + * + * @warning do not mix this function with av_buffersink_get_frame(). Use only one or + * the other with a single sink, not both. + */ +int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples); + +/** + * @} + */ + +#endif /* AVFILTER_BUFFERSINK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersrc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersrc.h new file mode 100644 index 00000000..08fbd18a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/buffersrc.h @@ -0,0 +1,209 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BUFFERSRC_H +#define AVFILTER_BUFFERSRC_H + +/** + * @file + * @ingroup lavfi_buffersrc + * Memory buffer source API. + */ + +#include "avfilter.h" + +/** + * @defgroup lavfi_buffersrc Buffer source API + * @ingroup lavfi + * @{ + */ + +enum { + + /** + * Do not check for format changes. + */ + AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1, + + /** + * Immediately push the frame to the output. + */ + AV_BUFFERSRC_FLAG_PUSH = 4, + + /** + * Keep a reference to the frame. + * If the frame if reference-counted, create a new reference; otherwise + * copy the frame data. + */ + AV_BUFFERSRC_FLAG_KEEP_REF = 8, + +}; + +/** + * Get the number of failed requests. + * + * A failed request is when the request_frame method is called while no + * frame is present in the buffer. + * The number is reset when a frame is added. + */ +unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src); + +/** + * This structure contains the parameters describing the frames that will be + * passed to this filter. + * + * It should be allocated with av_buffersrc_parameters_alloc() and freed with + * av_free(). All the allocated fields in it remain owned by the caller. + */ +typedef struct AVBufferSrcParameters { + /** + * video: the pixel format, value corresponds to enum AVPixelFormat + * audio: the sample format, value corresponds to enum AVSampleFormat + */ + int format; + /** + * The timebase to be used for the timestamps on the input frames. + */ + AVRational time_base; + + /** + * Video only, the display dimensions of the input frames. + */ + int width, height; + + /** + * Video only, the sample (pixel) aspect ratio. + */ + AVRational sample_aspect_ratio; + + /** + * Video only, the frame rate of the input video. This field must only be + * set to a non-zero value if input stream has a known constant framerate + * and should be left at its initial value if the framerate is variable or + * unknown. + */ + AVRational frame_rate; + + /** + * Video with a hwaccel pixel format only. This should be a reference to an + * AVHWFramesContext instance describing the input frames. + */ + AVBufferRef *hw_frames_ctx; + + /** + * Audio only, the audio sampling rate in samples per second. + */ + int sample_rate; + + /** + * Audio only, the audio channel layout + */ + uint64_t channel_layout; +} AVBufferSrcParameters; + +/** + * Allocate a new AVBufferSrcParameters instance. It should be freed by the + * caller with av_free(). + */ +AVBufferSrcParameters *av_buffersrc_parameters_alloc(void); + +/** + * Initialize the buffersrc or abuffersrc filter with the provided parameters. + * This function may be called multiple times, the later calls override the + * previous ones. Some of the parameters may also be set through AVOptions, then + * whatever method is used last takes precedence. + * + * @param ctx an instance of the buffersrc or abuffersrc filter + * @param param the stream parameters. The frames later passed to this filter + * must conform to those parameters. All the allocated fields in + * param remain owned by the caller, libavfilter will make internal + * copies or references when necessary. + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param); + +/** + * Add a frame to the buffer source. + * + * @param ctx an instance of the buffersrc filter + * @param frame frame to be added. If the frame is reference counted, this + * function will make a new reference to it. Otherwise the frame data will be + * copied. + * + * @return 0 on success, a negative AVERROR on error + * + * This function is equivalent to av_buffersrc_add_frame_flags() with the + * AV_BUFFERSRC_FLAG_KEEP_REF flag. + */ +av_warn_unused_result +int av_buffersrc_write_frame(AVFilterContext *ctx, const AVFrame *frame); + +/** + * Add a frame to the buffer source. + * + * @param ctx an instance of the buffersrc filter + * @param frame frame to be added. If the frame is reference counted, this + * function will take ownership of the reference(s) and reset the frame. + * Otherwise the frame data will be copied. If this function returns an error, + * the input frame is not touched. + * + * @return 0 on success, a negative AVERROR on error. + * + * @note the difference between this function and av_buffersrc_write_frame() is + * that av_buffersrc_write_frame() creates a new reference to the input frame, + * while this function takes ownership of the reference passed to it. + * + * This function is equivalent to av_buffersrc_add_frame_flags() without the + * AV_BUFFERSRC_FLAG_KEEP_REF flag. + */ +av_warn_unused_result +int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame); + +/** + * Add a frame to the buffer source. + * + * By default, if the frame is reference-counted, this function will take + * ownership of the reference(s) and reset the frame. This can be controlled + * using the flags. + * + * If this function returns an error, the input frame is not touched. + * + * @param buffer_src pointer to a buffer source context + * @param frame a frame, or NULL to mark EOF + * @param flags a combination of AV_BUFFERSRC_FLAG_* + * @return >= 0 in case of success, a negative AVERROR code + * in case of failure + */ +av_warn_unused_result +int av_buffersrc_add_frame_flags(AVFilterContext *buffer_src, + AVFrame *frame, int flags); + +/** + * Close the buffer source after EOF. + * + * This is similar to passing NULL to av_buffersrc_add_frame_flags() + * except it takes the timestamp of the EOF, i.e. the timestamp of the end + * of the last frame. + */ +int av_buffersrc_close(AVFilterContext *ctx, int64_t pts, unsigned flags); + +/** + * @} + */ + +#endif /* AVFILTER_BUFFERSRC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bwdif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bwdif.h new file mode 100644 index 00000000..889ff772 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/bwdif.h @@ -0,0 +1,42 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_BWDIF_H +#define AVFILTER_BWDIF_H + +#include "libavutil/pixdesc.h" +#include "avfilter.h" +#include "yadif.h" + +typedef struct BWDIFContext { + YADIFContext yadif; + + void (*filter_intra)(void *dst1, void *cur1, int w, int prefs, int mrefs, + int prefs3, int mrefs3, int parity, int clip_max); + void (*filter_line)(void *dst, void *prev, void *cur, void *next, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int prefs3, int mrefs3, int prefs4, int mrefs4, + int parity, int clip_max); + void (*filter_edge)(void *dst, void *prev, void *cur, void *next, + int w, int prefs, int mrefs, int prefs2, int mrefs2, + int parity, int clip_max, int spat); +} BWDIFContext; + +void ff_bwdif_init_x86(BWDIFContext *bwdif); + +#endif /* AVFILTER_BWDIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspace.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspace.h new file mode 100644 index 00000000..459a5df6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspace.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2016 Ronald S. Bultje + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_COLORSPACE_H +#define AVFILTER_COLORSPACE_H + +#include "libavutil/common.h" +#include "libavutil/frame.h" + +#define REFERENCE_WHITE 100.0f + +struct LumaCoefficients { + double cr, cg, cb; +}; + +struct PrimaryCoefficients { + double xr, yr, xg, yg, xb, yb; +}; + +struct WhitepointCoefficients { + double xw, yw; +}; + +void ff_matrix_invert_3x3(const double in[3][3], double out[3][3]); +void ff_matrix_mul_3x3(double dst[3][3], + const double src1[3][3], const double src2[3][3]); +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, + const struct WhitepointCoefficients *wp, + double rgb2xyz[3][3]); + +const struct LumaCoefficients *ff_get_luma_coefficients(enum AVColorSpace csp); +void ff_fill_rgb2yuv_table(const struct LumaCoefficients *coeffs, + double rgb2yuv[3][3]); + +double ff_determine_signal_peak(AVFrame *in); +void ff_update_hdr_metadata(AVFrame *in, double peak); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspacedsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspacedsp.h new file mode 100644 index 00000000..a81e4f0a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/colorspacedsp.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2016 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_COLORSPACEDSP_H +#define AVFILTER_COLORSPACEDSP_H + +#include +#include + +typedef void (*yuv2rgb_fn)(int16_t *rgb[3], ptrdiff_t rgb_stride, + uint8_t *yuv[3], const ptrdiff_t yuv_stride[3], + int w, int h, const int16_t yuv2rgb_coeffs[3][3][8], + const int16_t yuv_offset[8]); +typedef void (*rgb2yuv_fn)(uint8_t *yuv[3], const ptrdiff_t yuv_stride[3], + int16_t *rgb[3], ptrdiff_t rgb_stride, + int w, int h, const int16_t rgb2yuv_coeffs[3][3][8], + const int16_t yuv_offset[8]); +typedef void (*rgb2yuv_fsb_fn)(uint8_t *yuv[3], const ptrdiff_t yuv_stride[3], + int16_t *rgb[3], ptrdiff_t rgb_stride, + int w, int h, const int16_t rgb2yuv_coeffs[3][3][8], + const int16_t yuv_offset[8], + int *rnd[3][2]); +typedef void (*yuv2yuv_fn)(uint8_t *yuv_out[3], const ptrdiff_t yuv_out_stride[3], + uint8_t *yuv_in[3], const ptrdiff_t yuv_in_stride[3], + int w, int h, const int16_t yuv2yuv_coeffs[3][3][8], + const int16_t yuv_offset[2][8]); + +enum BitDepthIndex { + BPP_8, + BPP_10, + BPP_12, + NB_BPP, +}; + +enum ChromaSubsamplingIndex { + SS_444, + SS_422, + SS_420, + NB_SS, +}; + +typedef struct ColorSpaceDSPContext { + /* Convert input YUV pixel buffer from a user into an internal, 15bpp array + * of intermediate RGB data. */ + yuv2rgb_fn yuv2rgb[NB_BPP][NB_SS]; + /* Convert intermediate RGB data (15bpp, internal format) into YUV data and + * store into user-provided output buffer */ + rgb2yuv_fn rgb2yuv[NB_BPP][NB_SS]; + /* Same as rgb2yuv(), but use floyd-steinberg dithering */ + rgb2yuv_fsb_fn rgb2yuv_fsb[NB_BPP][NB_SS]; + /* Direct yuv-to-yuv conversion (input and output are both user-provided + * buffers) */ + yuv2yuv_fn yuv2yuv[NB_BPP /* in */][NB_BPP /* out */][NB_SS]; + + /* In-place 3x3 matrix multiplication. Input and output are both 15bpp + * (our internal data format) */ + void (*multiply3x3)(int16_t *data[3], ptrdiff_t stride, + int w, int h, const int16_t m[3][3][8]); +} ColorSpaceDSPContext; + +void ff_colorspacedsp_init(ColorSpaceDSPContext *dsp); + +/* internal */ +void ff_colorspacedsp_x86_init(ColorSpaceDSPContext *dsp); + +#endif /* AVFILTER_COLORSPACEDSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/convolution.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/convolution.h new file mode 100644 index 00000000..fc6aad58 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/convolution.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012-2013 Oka Motofumi (chikuzen.mo at gmail dot com) + * Copyright (c) 2015 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFILTER_CONVOLUTION_H +#define AVFILTER_CONVOLUTION_H +#include "avfilter.h" + +enum MatrixMode { + MATRIX_SQUARE, + MATRIX_ROW, + MATRIX_COLUMN, + MATRIX_NBMODES, +}; + +typedef struct ConvolutionContext { + const AVClass *class; + + char *matrix_str[4]; + float rdiv[4]; + float bias[4]; + int mode[4]; + float scale; + float delta; + int planes; + + int size[4]; + int depth; + int max; + int bpc; + int nb_planes; + int nb_threads; + int planewidth[4]; + int planeheight[4]; + int matrix[4][49]; + int matrix_length[4]; + int copy[4]; + + void (*setup[4])(int radius, const uint8_t *c[], const uint8_t *src, int stride, + int x, int width, int y, int height, int bpc); + void (*filter[4])(uint8_t *dst, int width, + float rdiv, float bias, const int *const matrix, + const uint8_t *c[], int peak, int radius, + int dstride, int stride); +} ConvolutionContext; + +void ff_convolution_init_x86(ConvolutionContext *s); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/deshake.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/deshake.h new file mode 100644 index 00000000..406cbab2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/deshake.h @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2013 Wei Gao + * Copyright (C) 2013 Lenny Wang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_DESHAKE_H +#define AVFILTER_DESHAKE_H + +#include "config.h" +#include "avfilter.h" +#include "transform.h" +#include "libavutil/pixelutils.h" + + +enum SearchMethod { + EXHAUSTIVE, ///< Search all possible positions + SMART_EXHAUSTIVE, ///< Search most possible positions (faster) + SEARCH_COUNT +}; + +typedef struct IntMotionVector { + int x; ///< Horizontal shift + int y; ///< Vertical shift +} IntMotionVector; + +typedef struct MotionVector { + double x; ///< Horizontal shift + double y; ///< Vertical shift +} MotionVector; + +typedef struct Transform { + MotionVector vec; ///< Motion vector + double angle; ///< Angle of rotation + double zoom; ///< Zoom percentage +} Transform; + +#define MAX_R 64 + +typedef struct DeshakeContext { + const AVClass *class; + int counts[2*MAX_R+1][2*MAX_R+1]; /// < Scratch buffer for motion search + double *angles; ///< Scratch buffer for block angles + unsigned angles_size; + AVFrame *ref; ///< Previous frame + int rx; ///< Maximum horizontal shift + int ry; ///< Maximum vertical shift + int edge; ///< Edge fill method + int blocksize; ///< Size of blocks to compare + int contrast; ///< Contrast threshold + int search; ///< Motion search method + av_pixelutils_sad_fn sad; ///< Sum of the absolute difference function + Transform last; ///< Transform from last frame + int refcount; ///< Number of reference frames (defines averaging window) + FILE *fp; + Transform avg; + int cw; ///< Crop motion search to this box + int ch; + int cx; + int cy; + char *filename; ///< Motion search detailed log filename + int opencl; + int (* transform)(AVFilterContext *ctx, int width, int height, int cw, int ch, + const float *matrix_y, const float *matrix_uv, enum InterpolateMethod interpolate, + enum FillMethod fill, AVFrame *in, AVFrame *out); +} DeshakeContext; + +#endif /* AVFILTER_DESHAKE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native.h new file mode 100644 index 00000000..62191ffe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native.h @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for native backend. + */ + + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_H + +#include "../dnn_interface.h" +#include "libavformat/avio.h" + +/** + * the enum value of DNNLayerType should not be changed, + * the same values are used in convert_from_tensorflow.py + * and, it is used to index the layer execution/load function pointer. + */ +typedef enum { + DLT_INPUT = 0, + DLT_CONV2D = 1, + DLT_DEPTH_TO_SPACE = 2, + DLT_MIRROR_PAD = 3, + DLT_MAXIMUM = 4, + DLT_MATH_BINARY = 5, + DLT_MATH_UNARY = 6, + DLT_COUNT +} DNNLayerType; + +typedef enum {DOT_INPUT = 1, DOT_OUTPUT = 2, DOT_INTERMEDIATE = DOT_INPUT | DOT_OUTPUT} DNNOperandType; + +typedef struct Layer{ + DNNLayerType type; + /** + * a layer can have multiple inputs and one output. + * 4 is just a big enough number for input operands (increase it if necessary), + * do not use 'int32_t *input_operand_indexes', so we don't worry about mem leaks. + */ + int32_t input_operand_indexes[4]; + int32_t output_operand_index; + void *params; +} Layer; + +typedef struct DnnOperand{ + /** + * there are two memory layouts, NHWC or NCHW, so we use dims, + * dims[0] is Number. + */ + int32_t dims[4]; + + /** + * input/output/intermediate operand of the network + */ + DNNOperandType type; + + /** + * support different kinds of data type such as float, half float, int8 etc, + * first support float now. + */ + DNNDataType data_type; + + /** + * NHWC if 1, otherwise NCHW. + * let's first support NHWC only, this flag is for extensive usage. + */ + int8_t isNHWC; + + /** + * to avoid possible memory leak, do not use char *name + */ + char name[128]; + + /** + * data pointer with data length in bytes. + * usedNumbersLeft is only valid for intermediate operand, + * it means how many layers still depend on this operand, + * todo: the memory can be reused when usedNumbersLeft is zero. + */ + void *data; + int32_t length; + int32_t usedNumbersLeft; +}DnnOperand; + +typedef struct InputParams{ + int height, width, channels; +} InputParams; + +// Represents simple feed-forward convolutional network. +typedef struct ConvolutionalNetwork{ + Layer *layers; + int32_t layers_num; + DnnOperand *operands; + int32_t operands_num; + int32_t *output_indexes; + uint32_t nb_output; +} ConvolutionalNetwork; + +DNNModel *ff_dnn_load_model_native(const char *model_filename); + +DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, DNNData *outputs, uint32_t nb_output); + +void ff_dnn_free_model_native(DNNModel **model); + +// NOTE: User must check for error (return value <= 0) to handle +// case like integer overflow. +int32_t calculate_operand_data_length(const DnnOperand *oprd); +int32_t calculate_operand_dims_count(const DnnOperand *oprd); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_conv2d.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_conv2d.h new file mode 100644 index 00000000..eeb15fdf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_conv2d.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_CONV2D_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_CONV2D_H + +#include "dnn_backend_native.h" + +typedef enum {RELU, TANH, SIGMOID, NONE, LEAKY_RELU} DNNActivationFunc; +typedef enum {VALID, SAME, SAME_CLAMP_TO_EDGE} DNNConvPaddingParam; + +typedef struct ConvolutionalParams{ + int32_t input_num, output_num, kernel_size; + DNNActivationFunc activation; + DNNConvPaddingParam padding_method; + int32_t dilation; + int32_t has_bias; + float *kernel; + float *biases; +} ConvolutionalParams; + +int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_depth2space.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_depth2space.h new file mode 100644 index 00000000..b2901e01 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_depth2space.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for native backend. + */ + + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_DEPTH2SPACE_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_DEPTH2SPACE_H + +#include "../dnn_interface.h" +#include "libavformat/avio.h" + +typedef struct DepthToSpaceParams{ + int block_size; +} DepthToSpaceParams; + +int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h new file mode 100644 index 00000000..0acf3b0e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2020 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for native backend. + */ + + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MATHBINARY_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MATHBINARY_H + +#include "libavformat/avio.h" +#include "dnn_backend_native.h" + +typedef enum { + DMBO_SUB = 0, + DMBO_ADD = 1, + DMBO_MUL = 2, + DMBO_REALDIV = 3, + DMBO_MINIMUM = 4, + DMBO_COUNT +} DNNMathBinaryOperation; + +typedef struct DnnLayerMathBinaryParams{ + DNNMathBinaryOperation bin_op; + int input0_broadcast; + int input1_broadcast; + float v; +} DnnLayerMathBinaryParams; + +int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathunary.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathunary.h new file mode 100644 index 00000000..a9a8a0d3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_mathunary.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for native backend. + */ + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MATHUNARY_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MATHUNARY_H + +#include "libavformat/avio.h" +#include "dnn_backend_native.h" + +typedef enum { + DMUO_ABS = 0, + DMUO_COUNT +} DNNMathUnaryOperation; + +typedef struct DnnLayerMathUnaryParams{ + DNNMathUnaryOperation un_op; +} DnnLayerMathUnaryParams; + +int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_maximum.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_maximum.h new file mode 100644 index 00000000..c049c63f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_maximum.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2019 Guo Yejun + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for native backend. + */ + + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MAXIMUM_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_MAXIMUM_H + +#include "libavformat/avio.h" +#include "dnn_backend_native.h" + +typedef struct DnnLayerMaximumParams{ + union { + uint32_t u32; + float y; + }val; +} DnnLayerMaximumParams; + +int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_pad.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_pad.h new file mode 100644 index 00000000..18e05bdd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layer_pad.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2019 Guo Yejun + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * layer pad (equivalent to tf.pad) for native backend. + */ +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_PAD_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYER_PAD_H + +#include +#include "dnn_backend_native.h" + +typedef enum {LPMP_CONSTANT, LPMP_REFLECT, LPMP_SYMMETRIC} LayerPadModeParam; + +typedef struct LayerPadParams{ + int32_t paddings[4][2]; + LayerPadModeParam mode; + float constant_values; +} LayerPadParams; + +int dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); +int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layers.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layers.h new file mode 100644 index 00000000..b696e9c6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_native_layers.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2019 Guo Yejun + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYERS_H +#define AVFILTER_DNN_DNN_BACKEND_NATIVE_LAYERS_H + +#include +#include "dnn_backend_native.h" + +typedef int (*LAYER_EXEC_FUNC)(DnnOperand *operands, const int32_t *input_operand_indexes, + int32_t output_operand_index, const void *parameters); +typedef int (*LAYER_LOAD_FUNC)(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num); + +typedef struct LayerFunc { + LAYER_EXEC_FUNC pf_exec; + LAYER_LOAD_FUNC pf_load; +}LayerFunc; + +extern LayerFunc layer_funcs[DLT_COUNT]; + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_tf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_tf.h new file mode 100644 index 00000000..3e450891 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn/dnn_backend_tf.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference functions interface for TensorFlow backend. + */ + + +#ifndef AVFILTER_DNN_DNN_BACKEND_TF_H +#define AVFILTER_DNN_DNN_BACKEND_TF_H + +#include "../dnn_interface.h" + +DNNModel *ff_dnn_load_model_tf(const char *model_filename); + +DNNReturnType ff_dnn_execute_model_tf(const DNNModel *model, DNNData *outputs, uint32_t nb_output); + +void ff_dnn_free_model_tf(DNNModel **model); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn_interface.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn_interface.h new file mode 100644 index 00000000..b20e5c8f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/dnn_interface.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DNN inference engine interface. + */ + +#ifndef AVFILTER_DNN_INTERFACE_H +#define AVFILTER_DNN_INTERFACE_H + +#include + +typedef enum {DNN_SUCCESS, DNN_ERROR} DNNReturnType; + +typedef enum {DNN_NATIVE, DNN_TF} DNNBackendType; + +typedef enum {DNN_FLOAT = 1, DNN_UINT8 = 4} DNNDataType; + +typedef struct DNNData{ + void *data; + DNNDataType dt; + int width, height, channels; +} DNNData; + +typedef struct DNNModel{ + // Stores model that can be different for different backends. + void *model; + // Gets model input information + // Just reuse struct DNNData here, actually the DNNData.data field is not needed. + DNNReturnType (*get_input)(void *model, DNNData *input, const char *input_name); + // Sets model input and output. + // Should be called at least once before model execution. + DNNReturnType (*set_input_output)(void *model, DNNData *input, const char *input_name, const char **output_names, uint32_t nb_output); +} DNNModel; + +// Stores pointers to functions for loading, executing, freeing DNN models for one of the backends. +typedef struct DNNModule{ + // Loads model and parameters from given file. Returns NULL if it is not possible. + DNNModel *(*load_model)(const char *model_filename); + // Executes model with specified input and output. Returns DNN_ERROR otherwise. + DNNReturnType (*execute_model)(const DNNModel *model, DNNData *outputs, uint32_t nb_output); + // Frees memory allocated for model. + void (*free_model)(DNNModel **model); +} DNNModule; + +// Initializes DNNModule depending on chosen backend. +DNNModule *ff_get_dnn_module(DNNBackendType backend_type); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/drawutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/drawutils.h new file mode 100644 index 00000000..b999d70e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/drawutils.h @@ -0,0 +1,162 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_DRAWUTILS_H +#define AVFILTER_DRAWUTILS_H + +/** + * @file + * misc drawing utilities + */ + +#include +#include "avfilter.h" +#include "libavutil/pixfmt.h" + +int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt); + +int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, + uint8_t dst_color[4], + enum AVPixelFormat pix_fmt, uint8_t rgba_color[4], + int *is_packed_rgba, uint8_t rgba_map[4]); + +void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4], + uint8_t *src[4], int pixelstep[4], + int hsub, int vsub, int x, int y, int w, int h); + +void ff_copy_rectangle(uint8_t *dst[4], int dst_linesize[4], + uint8_t *src[4], int src_linesize[4], int pixelstep[4], + int hsub, int vsub, int x, int y, int y2, int w, int h); + +#define MAX_PLANES 4 + +typedef struct FFDrawContext { + const struct AVPixFmtDescriptor *desc; + enum AVPixelFormat format; + unsigned nb_planes; + int pixelstep[MAX_PLANES]; /*< offset between pixels */ + uint8_t comp_mask[MAX_PLANES]; /*< bitmask of used non-alpha components */ + uint8_t hsub[MAX_PLANES]; /*< horizontal subsampling */ + uint8_t vsub[MAX_PLANES]; /*< vertical subsampling */ + uint8_t hsub_max; + uint8_t vsub_max; + int full_range; + unsigned flags; +} FFDrawContext; + +typedef struct FFDrawColor { + uint8_t rgba[4]; + union { + uint32_t u32[4]; + uint16_t u16[8]; + uint8_t u8[16]; + } comp[MAX_PLANES]; +} FFDrawColor; + +/** + * Process alpha pixel component. + */ +#define FF_DRAW_PROCESS_ALPHA 1 + +/** + * Init a draw context. + * + * Only a limited number of pixel formats are supported, if format is not + * supported the function will return an error. + * flags is combination of FF_DRAW_* flags. + * @return 0 for success, < 0 for error + */ +int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags); + +/** + * Prepare a color. + */ +void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4]); + +/** + * Copy a rectangle from an image to another. + * + * The coordinates must be as even as the subsampling requires. + */ +void ff_copy_rectangle2(FFDrawContext *draw, + uint8_t *dst[], int dst_linesize[], + uint8_t *src[], int src_linesize[], + int dst_x, int dst_y, int src_x, int src_y, + int w, int h); + +/** + * Fill a rectangle with an uniform color. + * + * The coordinates must be as even as the subsampling requires. + * The color needs to be inited with ff_draw_color. + */ +void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color, + uint8_t *dst[], int dst_linesize[], + int dst_x, int dst_y, int w, int h); + +/** + * Blend a rectangle with an uniform color. + */ +void ff_blend_rectangle(FFDrawContext *draw, FFDrawColor *color, + uint8_t *dst[], int dst_linesize[], + int dst_w, int dst_h, + int x0, int y0, int w, int h); + +/** + * Blend an alpha mask with an uniform color. + * + * @param draw draw context + * @param color color for the overlay; + * @param dst destination image + * @param dst_linesize line stride of the destination + * @param dst_w width of the destination image + * @param dst_h height of the destination image + * @param mask mask + * @param mask_linesize line stride of the mask + * @param mask_w width of the mask + * @param mask_h height of the mask + * @param l2depth log2 of depth of the mask (0 for 1bpp, 3 for 8bpp) + * @param endianness bit order of the mask (0: MSB to the left) + * @param x0 horizontal position of the overlay + * @param y0 vertical position of the overlay + */ +void ff_blend_mask(FFDrawContext *draw, FFDrawColor *color, + uint8_t *dst[], int dst_linesize[], int dst_w, int dst_h, + const uint8_t *mask, int mask_linesize, int mask_w, int mask_h, + int l2depth, unsigned endianness, int x0, int y0); + +/** + * Round a dimension according to subsampling. + * + * @param draw draw context + * @param sub_dir 0 for horizontal, 1 for vertical + * @param round_dir 0 nearest, -1 round down, +1 round up + * @param value value to round + * @return the rounded value + */ +int ff_draw_round_to_sub(FFDrawContext *draw, int sub_dir, int round_dir, + int value); + +/** + * Return the list of pixel formats supported by the draw functions. + * + * The flags are the same as ff_draw_init, i.e., none currently. + */ +AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags); + +#endif /* AVFILTER_DRAWUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ebur128.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ebur128.h new file mode 100644 index 00000000..74367545 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ebur128.h @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2011 Jan Kokemüller + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * This file is based on libebur128 which is available at + * https://github.com/jiixyj/libebur128/ + * +*/ + +#ifndef AVFILTER_EBUR128_H +#define AVFILTER_EBUR128_H + +/** \file ebur128.h + * \brief libebur128 - a library for loudness measurement according to + * the EBU R128 standard. + */ + +#include /* for size_t */ + +/** \enum channel + * Use these values when setting the channel map with ebur128_set_channel(). + * See definitions in ITU R-REC-BS 1770-4 + */ +enum channel { + FF_EBUR128_UNUSED = 0, /**< unused channel (for example LFE channel) */ + FF_EBUR128_LEFT, + FF_EBUR128_Mp030 = 1, /**< itu M+030 */ + FF_EBUR128_RIGHT, + FF_EBUR128_Mm030 = 2, /**< itu M-030 */ + FF_EBUR128_CENTER, + FF_EBUR128_Mp000 = 3, /**< itu M+000 */ + FF_EBUR128_LEFT_SURROUND, + FF_EBUR128_Mp110 = 4, /**< itu M+110 */ + FF_EBUR128_RIGHT_SURROUND, + FF_EBUR128_Mm110 = 5, /**< itu M-110 */ + FF_EBUR128_DUAL_MONO, /**< a channel that is counted twice */ + FF_EBUR128_MpSC, /**< itu M+SC */ + FF_EBUR128_MmSC, /**< itu M-SC */ + FF_EBUR128_Mp060, /**< itu M+060 */ + FF_EBUR128_Mm060, /**< itu M-060 */ + FF_EBUR128_Mp090, /**< itu M+090 */ + FF_EBUR128_Mm090, /**< itu M-090 */ + FF_EBUR128_Mp135, /**< itu M+135 */ + FF_EBUR128_Mm135, /**< itu M-135 */ + FF_EBUR128_Mp180, /**< itu M+180 */ + FF_EBUR128_Up000, /**< itu U+000 */ + FF_EBUR128_Up030, /**< itu U+030 */ + FF_EBUR128_Um030, /**< itu U-030 */ + FF_EBUR128_Up045, /**< itu U+045 */ + FF_EBUR128_Um045, /**< itu U-030 */ + FF_EBUR128_Up090, /**< itu U+090 */ + FF_EBUR128_Um090, /**< itu U-090 */ + FF_EBUR128_Up110, /**< itu U+110 */ + FF_EBUR128_Um110, /**< itu U-110 */ + FF_EBUR128_Up135, /**< itu U+135 */ + FF_EBUR128_Um135, /**< itu U-135 */ + FF_EBUR128_Up180, /**< itu U+180 */ + FF_EBUR128_Tp000, /**< itu T+000 */ + FF_EBUR128_Bp000, /**< itu B+000 */ + FF_EBUR128_Bp045, /**< itu B+045 */ + FF_EBUR128_Bm045 /**< itu B-045 */ +}; + +/** \enum mode + * Use these values in ebur128_init (or'ed). Try to use the lowest possible + * modes that suit your needs, as performance will be better. + */ +enum mode { + /** can call ff_ebur128_loudness_momentary */ + FF_EBUR128_MODE_M = (1 << 0), + /** can call ff_ebur128_loudness_shortterm */ + FF_EBUR128_MODE_S = (1 << 1) | FF_EBUR128_MODE_M, + /** can call ff_ebur128_loudness_global_* and ff_ebur128_relative_threshold */ + FF_EBUR128_MODE_I = (1 << 2) | FF_EBUR128_MODE_M, + /** can call ff_ebur128_loudness_range */ + FF_EBUR128_MODE_LRA = (1 << 3) | FF_EBUR128_MODE_S, + /** can call ff_ebur128_sample_peak */ + FF_EBUR128_MODE_SAMPLE_PEAK = (1 << 4) | FF_EBUR128_MODE_M, +}; + +/** forward declaration of FFEBUR128StateInternal */ +struct FFEBUR128StateInternal; + +/** \brief Contains information about the state of a loudness measurement. + * + * You should not need to modify this struct directly. + */ +typedef struct FFEBUR128State { + int mode; /**< The current mode. */ + unsigned int channels; /**< The number of channels. */ + unsigned long samplerate; /**< The sample rate. */ + struct FFEBUR128StateInternal *d; /**< Internal state. */ +} FFEBUR128State; + +/** \brief Initialize library state. + * + * @param channels the number of channels. + * @param samplerate the sample rate. + * @param window set the maximum window size in ms, set to 0 for auto. + * @param mode see the mode enum for possible values. + * @return an initialized library state. + */ +FFEBUR128State *ff_ebur128_init(unsigned int channels, + unsigned long samplerate, + unsigned long window, int mode); + +/** \brief Destroy library state. + * + * @param st pointer to a library state. + */ +void ff_ebur128_destroy(FFEBUR128State ** st); + +/** \brief Set channel type. + * + * The default is: + * - 0 -> FF_EBUR128_LEFT + * - 1 -> FF_EBUR128_RIGHT + * - 2 -> FF_EBUR128_CENTER + * - 3 -> FF_EBUR128_UNUSED + * - 4 -> FF_EBUR128_LEFT_SURROUND + * - 5 -> FF_EBUR128_RIGHT_SURROUND + * + * @param st library state. + * @param channel_number zero based channel index. + * @param value channel type from the "channel" enum. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if invalid channel index. + */ +int ff_ebur128_set_channel(FFEBUR128State * st, + unsigned int channel_number, int value); + +/** \brief Add frames to be processed. + * + * @param st library state. + * @param src array of source frames. Channels must be interleaved. + * @param frames number of frames. Not number of samples! + */ +void ff_ebur128_add_frames_short(FFEBUR128State * st, + const short *src, size_t frames); +/** \brief See \ref ebur128_add_frames_short */ +void ff_ebur128_add_frames_int(FFEBUR128State * st, + const int *src, size_t frames); +/** \brief See \ref ebur128_add_frames_short */ +void ff_ebur128_add_frames_float(FFEBUR128State * st, + const float *src, size_t frames); +/** \brief See \ref ebur128_add_frames_short */ +void ff_ebur128_add_frames_double(FFEBUR128State * st, + const double *src, size_t frames); + +/** \brief Add frames to be processed. + * + * @param st library state. + * @param srcs array of source frame channel data pointers + * @param frames number of frames. Not number of samples! + * @param stride number of samples to skip to for the next sample of the same channel + */ +void ff_ebur128_add_frames_planar_short(FFEBUR128State * st, + const short **srcs, + size_t frames, int stride); +/** \brief See \ref ebur128_add_frames_planar_short */ +void ff_ebur128_add_frames_planar_int(FFEBUR128State * st, + const int **srcs, + size_t frames, int stride); +/** \brief See \ref ebur128_add_frames_planar_short */ +void ff_ebur128_add_frames_planar_float(FFEBUR128State * st, + const float **srcs, + size_t frames, int stride); +/** \brief See \ref ebur128_add_frames_planar_short */ +void ff_ebur128_add_frames_planar_double(FFEBUR128State * st, + const double **srcs, + size_t frames, int stride); + +/** \brief Get global integrated loudness in LUFS. + * + * @param st library state. + * @param out integrated loudness in LUFS. -HUGE_VAL if result is negative + * infinity. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_I" has not been set. + */ +int ff_ebur128_loudness_global(FFEBUR128State * st, double *out); +/** \brief Get global integrated loudness in LUFS across multiple instances. + * + * @param sts array of library states. + * @param size length of sts + * @param out integrated loudness in LUFS. -HUGE_VAL if result is negative + * infinity. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_I" has not been set. + */ +int ff_ebur128_loudness_global_multiple(FFEBUR128State ** sts, + size_t size, double *out); + +/** \brief Get momentary loudness (last 400ms) in LUFS. + * + * @param st library state. + * @param out momentary loudness in LUFS. -HUGE_VAL if result is negative + * infinity. + * @return + * - 0 on success. + */ +int ff_ebur128_loudness_momentary(FFEBUR128State * st, double *out); +/** \brief Get short-term loudness (last 3s) in LUFS. + * + * @param st library state. + * @param out short-term loudness in LUFS. -HUGE_VAL if result is negative + * infinity. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_S" has not been set. + */ +int ff_ebur128_loudness_shortterm(FFEBUR128State * st, double *out); + +/** \brief Get loudness of the specified window in LUFS. + * + * window must not be larger than the current window set in st. + * + * @param st library state. + * @param window window in ms to calculate loudness. + * @param out loudness in LUFS. -HUGE_VAL if result is negative infinity. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if window larger than current window in st. + */ +int ff_ebur128_loudness_window(FFEBUR128State * st, + unsigned long window, double *out); + +/** \brief Get loudness range (LRA) of programme in LU. + * + * Calculates loudness range according to EBU 3342. + * + * @param st library state. + * @param out loudness range (LRA) in LU. Will not be changed in case of + * error. AVERROR(EINVAL) will be returned in this case. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_LRA" has not been set. + */ +int ff_ebur128_loudness_range(FFEBUR128State * st, double *out); +/** \brief Get loudness range (LRA) in LU across multiple instances. + * + * Calculates loudness range according to EBU 3342. + * + * @param sts array of library states. + * @param size length of sts + * @param out loudness range (LRA) in LU. Will not be changed in case of + * error. AVERROR(EINVAL) will be returned in this case. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_LRA" has not been set. + */ +int ff_ebur128_loudness_range_multiple(FFEBUR128State ** sts, + size_t size, double *out); + +/** \brief Get maximum sample peak of selected channel in float format. + * + * @param st library state + * @param channel_number channel to analyse + * @param out maximum sample peak in float format (1.0 is 0 dBFS) + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_SAMPLE_PEAK" has not been set. + * - AVERROR(EINVAL) if invalid channel index. + */ +int ff_ebur128_sample_peak(FFEBUR128State * st, + unsigned int channel_number, double *out); + +/** \brief Get relative threshold in LUFS. + * + * @param st library state + * @param out relative threshold in LUFS. + * @return + * - 0 on success. + * - AVERROR(EINVAL) if mode "FF_EBUR128_MODE_I" has not been set. + */ +int ff_ebur128_relative_threshold(FFEBUR128State * st, double *out); + +#endif /* AVFILTER_EBUR128_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/filters.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/filters.h new file mode 100644 index 00000000..11577554 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/filters.h @@ -0,0 +1,261 @@ +/* + * Filters implementation helper functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FILTERS_H +#define AVFILTER_FILTERS_H + +/** + * Filters implementation helper functions + */ + +#include "avfilter.h" +#include "internal.h" + +/** + * Special return code when activate() did not do anything. + */ +#define FFERROR_NOT_READY FFERRTAG('N','R','D','Y') + +/** + * Mark a filter ready and schedule it for activation. + * + * This is automatically done when something happens to the filter (queued + * frame, status change, request on output). + * Filters implementing the activate callback can call it directly to + * perform one more round of processing later. + * It is also useful for filters reacting to external or asynchronous + * events. + */ +void ff_filter_set_ready(AVFilterContext *filter, unsigned priority); + +/** + * Process the commands queued in the link up to the time of the frame. + * Commands will trigger the process_command() callback. + * @return >= 0 or AVERROR code. + */ +int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame); + +/** + * Evaluate the timeline expression of the link for the time and properties + * of the frame. + * @return >0 if enabled, 0 if disabled + * @note It does not update link->dst->is_disabled. + */ +int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame); + +/** + * Get the number of frames available on the link. + * @return the number of frames available in the link fifo. + */ +size_t ff_inlink_queued_frames(AVFilterLink *link); + +/** + * Test if a frame is available on the link. + * @return >0 if a frame is available + */ +int ff_inlink_check_available_frame(AVFilterLink *link); + + +/*** + * Get the number of samples available on the link. + * @return the numer of samples available on the link. + */ +int ff_inlink_queued_samples(AVFilterLink *link); + +/** + * Test if enough samples are available on the link. + * @return >0 if enough samples are available + * @note on EOF and error, min becomes 1 + */ +int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min); + +/** + * Take a frame from the link's FIFO and update the link's stats. + * + * If ff_inlink_check_available_frame() was previously called, the + * preferred way of expressing it is "av_assert1(ret);" immediately after + * ff_inlink_consume_frame(). Negative error codes must still be checked. + * + * @note May trigger process_command() and/or update is_disabled. + * @return >0 if a frame is available, + * 0 and set rframe to NULL if no frame available, + * or AVERROR code + */ +int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe); + +/** + * Take samples from the link's FIFO and update the link's stats. + * + * If ff_inlink_check_available_samples() was previously called, the + * preferred way of expressing it is "av_assert1(ret);" immediately after + * ff_inlink_consume_samples(). Negative error codes must still be checked. + * + * @note May trigger process_command() and/or update is_disabled. + * @return >0 if a frame is available, + * 0 and set rframe to NULL if no frame available, + * or AVERROR code + */ +int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, + AVFrame **rframe); + +/** + * Access a frame in the link fifo without consuming it. + * The first frame is numbered 0; the designated frame must exist. + * @return the frame at idx position in the link fifo. + */ +AVFrame *ff_inlink_peek_frame(AVFilterLink *link, size_t idx); + +/** + * Make sure a frame is writable. + * This is similar to av_frame_make_writable() except it uses the link's + * buffer allocation callback, and therefore allows direct rendering. + */ +int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe); + +/** + * Test and acknowledge the change of status on the link. + * + * Status means EOF or an error condition; a change from the normal (0) + * status to a non-zero status can be queued in a filter's input link, it + * becomes relevant after the frames queued in the link's FIFO are + * processed. This function tests if frames are still queued and if a queued + * status change has not yet been processed. In that case it performs basic + * treatment (updating the link's timestamp) and returns a positive value to + * let the filter do its own treatments (flushing...). + * + * Filters implementing the activate callback should call this function when + * they think it might succeed (usually after checking unsuccessfully for a + * queued frame). + * Filters implementing the filter_frame and request_frame callbacks do not + * need to call that since the same treatment happens in ff_filter_frame(). + * + * @param[out] rstatus new or current status + * @param[out] rpts current timestamp of the link in link time base + * @return >0 if status changed, <0 if status already acked, 0 otherwise + */ +int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts); + +/** + * Mark that a frame is wanted on the link. + * Unlike ff_filter_frame(), it must not be called when the link has a + * non-zero status, and thus does not acknowledge it. + * Also it cannot fail. + */ +void ff_inlink_request_frame(AVFilterLink *link); + +/** + * Set the status on an input link. + * Also discard all frames in the link's FIFO. + */ +void ff_inlink_set_status(AVFilterLink *link, int status); + +/** + * Test if a frame is wanted on an output link. + */ +static inline int ff_outlink_frame_wanted(AVFilterLink *link) +{ + return link->frame_wanted_out; +} + +/** + * Get the status on an output link. + */ +int ff_outlink_get_status(AVFilterLink *link); + +/** + * Set the status field of a link from the source filter. + * The pts should reflect the timestamp of the status change, + * in link time base and relative to the frames timeline. + * In particular, for AVERROR_EOF, it should reflect the + * end time of the last frame. + */ +static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts) +{ + ff_avfilter_link_set_in_status(link, status, pts); +} + +/** + * Forward the status on an output link to an input link. + * If the status is set, it will discard all queued frames and this macro + * will return immediately. + */ +#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink) do { \ + int ret = ff_outlink_get_status(outlink); \ + if (ret) { \ + ff_inlink_set_status(inlink, ret); \ + return 0; \ + } \ +} while (0) + +/** + * Forward the status on an output link to all input links. + * If the status is set, it will discard all queued frames and this macro + * will return immediately. + */ +#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter) do { \ + int ret = ff_outlink_get_status(outlink); \ + if (ret) { \ + unsigned i; \ + for (i = 0; i < filter->nb_inputs; i++) \ + ff_inlink_set_status(filter->inputs[i], ret); \ + return 0; \ + } \ +} while (0) + +/** + * Acknowledge the status on an input link and forward it to an output link. + * If the status is set, this macro will return immediately. + */ +#define FF_FILTER_FORWARD_STATUS(inlink, outlink) do { \ + int status; \ + int64_t pts; \ + if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \ + ff_outlink_set_status(outlink, status, pts); \ + return 0; \ + } \ +} while (0) + +/** + * Acknowledge the status on an input link and forward it to an output link. + * If the status is set, this macro will return immediately. + */ +#define FF_FILTER_FORWARD_STATUS_ALL(inlink, filter) do { \ + int status; \ + int64_t pts; \ + if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \ + unsigned i; \ + for (i = 0; i < filter->nb_outputs; i++) \ + ff_outlink_set_status(filter->outputs[i], status, pts); \ + return 0; \ + } \ +} while (0) + +/** + * Forward the frame_wanted_out flag from an output link to an input link. + * If the flag is set, this macro will return immediately. + */ +#define FF_FILTER_FORWARD_WANTED(outlink, inlink) do { \ + if (ff_outlink_frame_wanted(outlink)) { \ + ff_inlink_request_frame(inlink); \ + return 0; \ + } \ +} while (0) + +#endif /* AVFILTER_FILTERS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/formats.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/formats.h new file mode 100644 index 00000000..cc588f30 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/formats.h @@ -0,0 +1,297 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FORMATS_H +#define AVFILTER_FORMATS_H + +#include "avfilter.h" + +/** + * A list of supported formats for one end of a filter link. This is used + * during the format negotiation process to try to pick the best format to + * use to minimize the number of necessary conversions. Each filter gives a + * list of the formats supported by each input and output pad. The list + * given for each pad need not be distinct - they may be references to the + * same list of formats, as is often the case when a filter supports multiple + * formats, but will always output the same format as it is given in input. + * + * In this way, a list of possible input formats and a list of possible + * output formats are associated with each link. When a set of formats is + * negotiated over a link, the input and output lists are merged to form a + * new list containing only the common elements of each list. In the case + * that there were no common elements, a format conversion is necessary. + * Otherwise, the lists are merged, and all other links which reference + * either of the format lists involved in the merge are also affected. + * + * For example, consider the filter chain: + * filter (a) --> (b) filter (b) --> (c) filter + * + * where the letters in parenthesis indicate a list of formats supported on + * the input or output of the link. Suppose the lists are as follows: + * (a) = {A, B} + * (b) = {A, B, C} + * (c) = {B, C} + * + * First, the first link's lists are merged, yielding: + * filter (a) --> (a) filter (a) --> (c) filter + * + * Notice that format list (b) now refers to the same list as filter list (a). + * Next, the lists for the second link are merged, yielding: + * filter (a) --> (a) filter (a) --> (a) filter + * + * where (a) = {B}. + * + * Unfortunately, when the format lists at the two ends of a link are merged, + * we must ensure that all links which reference either pre-merge format list + * get updated as well. Therefore, we have the format list structure store a + * pointer to each of the pointers to itself. + */ +struct AVFilterFormats { + unsigned nb_formats; ///< number of formats + int *formats; ///< list of media formats + + unsigned refcount; ///< number of references to this list + struct AVFilterFormats ***refs; ///< references to this list +}; + +/** + * A list of supported channel layouts. + * + * The list works the same as AVFilterFormats, except for the following + * differences: + * - A list with all_layouts = 1 means all channel layouts with a known + * disposition; nb_channel_layouts must then be 0. + * - A list with all_counts = 1 means all channel counts, with a known or + * unknown disposition; nb_channel_layouts must then be 0 and all_layouts 1. + * - The list must not contain a layout with a known disposition and a + * channel count with unknown disposition with the same number of channels + * (e.g. AV_CH_LAYOUT_STEREO and FF_COUNT2LAYOUT(2). + */ +typedef struct AVFilterChannelLayouts { + uint64_t *channel_layouts; ///< list of channel layouts + int nb_channel_layouts; ///< number of channel layouts + char all_layouts; ///< accept any known channel layout + char all_counts; ///< accept any channel layout or count + + unsigned refcount; ///< number of references to this list + struct AVFilterChannelLayouts ***refs; ///< references to this list +} AVFilterChannelLayouts; + +/** + * Encode a channel count as a channel layout. + * FF_COUNT2LAYOUT(c) means any channel layout with c channels, with a known + * or unknown disposition. + * The result is only valid inside AVFilterChannelLayouts and immediately + * related functions. + */ +#define FF_COUNT2LAYOUT(c) (0x8000000000000000ULL | (c)) + +/** + * Decode a channel count encoded as a channel layout. + * Return 0 if the channel layout was a real one. + */ +#define FF_LAYOUT2COUNT(l) (((l) & 0x8000000000000000ULL) ? \ + (int)((l) & 0x7FFFFFFF) : 0) + +/** + * Return a channel layouts/samplerates list which contains the intersection of + * the layouts/samplerates of a and b. Also, all the references of a, all the + * references of b, and a and b themselves will be deallocated. + * + * If a and b do not share any common elements, neither is modified, and NULL + * is returned. + */ +AVFilterChannelLayouts *ff_merge_channel_layouts(AVFilterChannelLayouts *a, + AVFilterChannelLayouts *b); +AVFilterFormats *ff_merge_samplerates(AVFilterFormats *a, + AVFilterFormats *b); + +/** + * Construct an empty AVFilterChannelLayouts/AVFilterFormats struct -- + * representing any channel layout (with known disposition)/sample rate. + */ +av_warn_unused_result +AVFilterChannelLayouts *ff_all_channel_layouts(void); + +av_warn_unused_result +AVFilterFormats *ff_all_samplerates(void); + +/** + * Construct an AVFilterChannelLayouts coding for any channel layout, with + * known or unknown disposition. + */ +av_warn_unused_result +AVFilterChannelLayouts *ff_all_channel_counts(void); + +av_warn_unused_result +AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts); + +av_warn_unused_result +AVFilterChannelLayouts *ff_make_formatu64_list(const uint64_t *fmts); + + +/** + * A helper for query_formats() which sets all links to the same list of channel + * layouts/sample rates. If there are no links hooked to this filter, the list + * is freed. + */ +av_warn_unused_result +int ff_set_common_channel_layouts(AVFilterContext *ctx, + AVFilterChannelLayouts *layouts); +av_warn_unused_result +int ff_set_common_samplerates(AVFilterContext *ctx, + AVFilterFormats *samplerates); + +/** + * A helper for query_formats() which sets all links to the same list of + * formats. If there are no links hooked to this filter, the list of formats is + * freed. + */ +av_warn_unused_result +int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats); + +av_warn_unused_result +int ff_add_channel_layout(AVFilterChannelLayouts **l, uint64_t channel_layout); + +/** + * Add *ref as a new reference to f. + */ +av_warn_unused_result +int ff_channel_layouts_ref(AVFilterChannelLayouts *f, + AVFilterChannelLayouts **ref); + +/** + * Remove a reference to a channel layouts list. + */ +void ff_channel_layouts_unref(AVFilterChannelLayouts **ref); + +void ff_channel_layouts_changeref(AVFilterChannelLayouts **oldref, + AVFilterChannelLayouts **newref); + +av_warn_unused_result +int ff_default_query_formats(AVFilterContext *ctx); + + /** + * Set the formats list to all known channel layouts. This function behaves + * like ff_default_query_formats(), except it only accepts known channel + * layouts. It should only be used with audio filters. + */ +av_warn_unused_result +int ff_query_formats_all_layouts(AVFilterContext *ctx); + +/** + * Create a list of supported formats. This is intended for use in + * AVFilter->query_formats(). + * + * @param fmts list of media formats, terminated by -1 + * @return the format list, with no existing references + */ +av_warn_unused_result +AVFilterFormats *ff_make_format_list(const int *fmts); + +/** + * Add fmt to the list of media formats contained in *avff. + * If *avff is NULL the function allocates the filter formats struct + * and puts its pointer in *avff. + * + * @return a non negative value in case of success, or a negative + * value corresponding to an AVERROR code in case of error + */ +av_warn_unused_result +int ff_add_format(AVFilterFormats **avff, int64_t fmt); + +/** + * Return a list of all formats supported by FFmpeg for the given media type. + */ +av_warn_unused_result +AVFilterFormats *ff_all_formats(enum AVMediaType type); + +/** + * Construct a formats list containing all pixel formats with certain + * properties + */ +av_warn_unused_result +int ff_formats_pixdesc_filter(AVFilterFormats **rfmts, unsigned want, unsigned rej); + +//* format is software, non-planar with sub-sampling +#define FF_PIX_FMT_FLAG_SW_FLAT_SUB (1 << 24) + +/** + * Construct a formats list containing all planar sample formats. + */ +av_warn_unused_result +AVFilterFormats *ff_planar_sample_fmts(void); + +/** + * Return a format list which contains the intersection of the formats of + * a and b. Also, all the references of a, all the references of b, and + * a and b themselves will be deallocated. + * + * If a and b do not share any common formats, neither is modified, and NULL + * is returned. + */ +AVFilterFormats *ff_merge_formats(AVFilterFormats *a, AVFilterFormats *b, + enum AVMediaType type); + +/** + * Add *ref as a new reference to formats. + * That is the pointers will point like in the ascii art below: + * ________ + * |formats |<--------. + * | ____ | ____|___________________ + * | |refs| | | __|_ + * | |* * | | | | | | AVFilterLink + * | |* *--------->|*ref| + * | |____| | | |____| + * |________| |________________________ + */ +av_warn_unused_result +int ff_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref); + +/** + * If *ref is non-NULL, remove *ref as a reference to the format list + * it currently points to, deallocates that list if this was the last + * reference, and sets *ref to NULL. + * + * Before After + * ________ ________ NULL + * |formats |<--------. |formats | ^ + * | ____ | ____|________________ | ____ | ____|________________ + * | |refs| | | __|_ | |refs| | | __|_ + * | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink + * | |* *--------->|*ref| | |* | | | |*ref| + * | |____| | | |____| | |____| | | |____| + * |________| |_____________________ |________| |_____________________ + */ +void ff_formats_unref(AVFilterFormats **ref); + +/** + * Before After + * ________ ________ + * |formats |<---------. |formats |<---------. + * | ____ | ___|___ | ____ | ___|___ + * | |refs| | | | | | |refs| | | | | NULL + * | |* *--------->|*oldref| | |* *--------->|*newref| ^ + * | |* * | | |_______| | |* * | | |_______| ___|___ + * | |____| | | |____| | | | | + * |________| |________| |*oldref| + * |_______| + */ +void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref); + +#endif /* AVFILTER_FORMATS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framepool.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framepool.h new file mode 100644 index 00000000..e5560e4c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framepool.h @@ -0,0 +1,118 @@ +/* + * This file is part of FFmpeg. + * + * Copyright (c) 2015 Matthieu Bouron + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FRAMEPOOL_H +#define AVFILTER_FRAMEPOOL_H + +#include "libavutil/buffer.h" +#include "libavutil/frame.h" + +/** + * Frame pool. This structure is opaque and not meant to be accessed + * directly. It is allocated with ff_frame_pool_init() and freed with + * ff_frame_pool_uninit(). + */ +typedef struct FFFramePool FFFramePool; + +/** + * Allocate and initialize a video frame pool. + * + * @param alloc a function that will be used to allocate new frame buffers when + * the pool is empty. May be NULL, then the default allocator will be used + * (av_buffer_alloc()). + * @param width width of each frame in this pool + * @param height height of each frame in this pool + * @param format format of each frame in this pool + * @param align buffers alignement of each frame in this pool + * @return newly created video frame pool on success, NULL on error. + */ +FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(int size), + int width, + int height, + enum AVPixelFormat format, + int align); + +/** + * Allocate and initialize an audio frame pool. + * + * @param alloc a function that will be used to allocate new frame buffers when + * the pool is empty. May be NULL, then the default allocator will be used + * (av_buffer_alloc()). + * @param channels channels of each frame in this pool + * @param nb_samples number of samples of each frame in this pool + * @param format format of each frame in this pool + * @param align buffers alignement of each frame in this pool + * @return newly created audio frame pool on success, NULL on error. + */ +FFFramePool *ff_frame_pool_audio_init(AVBufferRef* (*alloc)(int size), + int channels, + int samples, + enum AVSampleFormat format, + int align); + +/** + * Deallocate the frame pool. It is safe to call this function while + * some of the allocated frame are still in use. + * + * @param pool pointer to the frame pool to be freed. It will be set to NULL. + */ +void ff_frame_pool_uninit(FFFramePool **pool); + +/** + * Get the video frame pool configuration. + * + * @param width width of each frame in this pool + * @param height height of each frame in this pool + * @param format format of each frame in this pool + * @param align buffers alignement of each frame in this pool + * @return 0 on success, a negative AVERROR otherwise. + */ +int ff_frame_pool_get_video_config(FFFramePool *pool, + int *width, + int *height, + enum AVPixelFormat *format, + int *align); + +/** + * Get the audio frame pool configuration. + * + * @param channels channels of each frame in this pool + * @param nb_samples number of samples of each frame in this pool + * @param format format of each frame in this pool + * @param align buffers alignement of each frame in this pool + * @return 0 on success, a negative AVERROR otherwise. + */ +int ff_frame_pool_get_audio_config(FFFramePool *pool, + int *channels, + int *nb_samples, + enum AVSampleFormat *format, + int *align); + + +/** + * Allocate a new AVFrame, reussing old buffers from the pool when available. + * This function may be called simultaneously from multiple threads. + * + * @return a new AVFrame on success, NULL on error. + */ +AVFrame *ff_frame_pool_get(FFFramePool *pool); + + +#endif /* AVFILTER_FRAMEPOOL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framequeue.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framequeue.h new file mode 100644 index 00000000..c49d872e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framequeue.h @@ -0,0 +1,178 @@ +/* + * Generic frame queue + * Copyright (c) 2016 Nicolas George + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FRAMEQUEUE_H +#define AVFILTER_FRAMEQUEUE_H + +/** + * FFFrameQueue: simple AVFrame queue API + * + * Note: this API is not thread-safe. Concurrent access to the same queue + * must be protected by a mutex or any synchronization mechanism. + */ + +#include "libavutil/frame.h" + +typedef struct FFFrameBucket { + AVFrame *frame; +} FFFrameBucket; + +/** + * Structure to hold global options and statistics for frame queues. + * + * This structure is intended to allow implementing global control of the + * frame queues, including memory consumption caps. + * + * It is currently empty. + */ +typedef struct FFFrameQueueGlobal { + char dummy; /* C does not allow empty structs */ +} FFFrameQueueGlobal; + +/** + * Queue of AVFrame pointers. + */ +typedef struct FFFrameQueue { + + /** + * Array of allocated buckets, used as a circular buffer. + */ + FFFrameBucket *queue; + + /** + * Size of the array of buckets. + */ + size_t allocated; + + /** + * Tail of the queue. + * It is the index in the array of the next frame to take. + */ + size_t tail; + + /** + * Number of currently queued frames. + */ + size_t queued; + + /** + * Pre-allocated bucket for queues of size 1. + */ + FFFrameBucket first_bucket; + + /** + * Total number of frames entered in the queue. + */ + uint64_t total_frames_head; + + /** + * Total number of frames dequeued from the queue. + * queued = total_frames_head - total_frames_tail + */ + uint64_t total_frames_tail; + + /** + * Total number of samples entered in the queue. + */ + uint64_t total_samples_head; + + /** + * Total number of samples dequeued from the queue. + * queued_samples = total_samples_head - total_samples_tail + */ + uint64_t total_samples_tail; + + /** + * Indicate that samples are skipped + */ + int samples_skipped; + +} FFFrameQueue; + +/** + * Init a global structure. + */ +void ff_framequeue_global_init(FFFrameQueueGlobal *fqg); + +/** + * Init a frame queue and attach it to a global structure. + */ +void ff_framequeue_init(FFFrameQueue *fq, FFFrameQueueGlobal *fqg); + +/** + * Free the queue and all queued frames. + */ +void ff_framequeue_free(FFFrameQueue *fq); + +/** + * Add a frame. + * @return >=0 or an AVERROR code. + */ +int ff_framequeue_add(FFFrameQueue *fq, AVFrame *frame); + +/** + * Take the first frame in the queue. + * Must not be used with empty queues. + */ +AVFrame *ff_framequeue_take(FFFrameQueue *fq); + +/** + * Access a frame in the queue, without removing it. + * The first frame is numbered 0; the designated frame must exist. + */ +AVFrame *ff_framequeue_peek(FFFrameQueue *fq, size_t idx); + +/** + * Get the number of queued frames. + */ +static inline size_t ff_framequeue_queued_frames(const FFFrameQueue *fq) +{ + return fq->queued; +} + +/** + * Get the number of queued samples. + */ +static inline uint64_t ff_framequeue_queued_samples(const FFFrameQueue *fq) +{ + return fq->total_samples_head - fq->total_samples_tail; +} + +/** + * Update the statistics after a frame accessed using ff_framequeue_peek() + * was modified. + * Currently used only as a marker. + */ +static inline void ff_framequeue_update_peeked(FFFrameQueue *fq, size_t idx) +{ +} + +/** + * Skip samples from the first frame in the queue. + * + * This function must be used when the first frame was accessed using + * ff_framequeue_peek() and samples were consumed from it. + * It adapts the data pointers and timestamps of the head frame to account + * for the skipped samples. + */ +void ff_framequeue_skip_samples(FFFrameQueue *fq, size_t samples, AVRational time_base); + +#endif /* AVFILTER_FRAMEQUEUE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framerate.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framerate.h new file mode 100644 index 00000000..d2556356 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framerate.h @@ -0,0 +1,74 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FRAMERATE_H +#define AVFILTER_FRAMERATE_H + +#include "scene_sad.h" +#include "avfilter.h" + +#define BLEND_FUNC_PARAMS const uint8_t *src1, ptrdiff_t src1_linesize, \ + const uint8_t *src2, ptrdiff_t src2_linesize, \ + uint8_t *dst, ptrdiff_t dst_linesize, \ + ptrdiff_t width, ptrdiff_t height, \ + int factor1, int factor2, int half + +#define BLEND_FACTOR_DEPTH(n) (n-1) + +typedef void (*blend_func)(BLEND_FUNC_PARAMS); + +typedef struct FrameRateContext { + const AVClass *class; + // parameters + AVRational dest_frame_rate; ///< output frames per second + int flags; ///< flags affecting frame rate conversion algorithm + double scene_score; ///< score that denotes a scene change has happened + int interp_start; ///< start of range to apply linear interpolation + int interp_end; ///< end of range to apply linear interpolation + + int line_size[4]; ///< bytes of pixel data per line for each plane + int height[4]; ///< height of each plane + int vsub; + + AVRational srce_time_base; ///< timebase of source + AVRational dest_time_base; ///< timebase of destination + + ff_scene_sad_fn sad; ///< Sum of the absolute difference function (scene detect only) + double prev_mafd; ///< previous MAFD (scene detect only) + + int blend_factor_max; + int bitdepth; + AVFrame *work; + + AVFrame *f0; ///< last frame + AVFrame *f1; ///< current frame + int64_t pts0; ///< last frame pts in dest_time_base + int64_t pts1; ///< current frame pts in dest_time_base + int64_t delta; ///< pts1 to pts0 delta + double score; ///< scene change score (f0 to f1) + int flush; ///< 1 if the filter is being flushed + int64_t start_pts; ///< pts of the first output frame + int64_t n; ///< output frame counter + + blend_func blend; +} FrameRateContext; + +void ff_framerate_init(FrameRateContext *s); +void ff_framerate_init_x86(FrameRateContext *s); + +#endif /* AVFILTER_FRAMERATE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framesync.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framesync.h new file mode 100644 index 00000000..37743ccc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/framesync.h @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2013 Nicolas George + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_FRAMESYNC_H +#define AVFILTER_FRAMESYNC_H + +#include "bufferqueue.h" + +enum EOFAction { + EOF_ACTION_REPEAT, + EOF_ACTION_ENDALL, + EOF_ACTION_PASS +}; + +/* + * TODO + * Export convenient options. + */ + +/** + * This API is intended as a helper for filters that have several video + * input and need to combine them somehow. If the inputs have different or + * variable frame rate, getting the input frames to match requires a rather + * complex logic and a few user-tunable options. + * + * In this API, when a set of synchronized input frames is ready to be + * procesed is called a frame event. Frame event can be generated in + * response to input frames on any or all inputs and the handling of + * situations where some stream extend beyond the beginning or the end of + * others can be configured. + * + * The basic working of this API is the following: set the on_event + * callback, then call ff_framesync_activate() from the filter's activate + * callback. + */ + +/** + * Stream extrapolation mode + * + * Describe how the frames of a stream are extrapolated before the first one + * and after EOF to keep sync with possibly longer other streams. + */ +enum FFFrameSyncExtMode { + + /** + * Completely stop all streams with this one. + */ + EXT_STOP, + + /** + * Ignore this stream and continue processing the other ones. + */ + EXT_NULL, + + /** + * Extend the frame to infinity. + */ + EXT_INFINITY, +}; + +/** + * Input stream structure + */ +typedef struct FFFrameSyncIn { + + /** + * Extrapolation mode for timestamps before the first frame + */ + enum FFFrameSyncExtMode before; + + /** + * Extrapolation mode for timestamps after the last frame + */ + enum FFFrameSyncExtMode after; + + /** + * Time base for the incoming frames + */ + AVRational time_base; + + /** + * Current frame, may be NULL before the first one or after EOF + */ + AVFrame *frame; + + /** + * Next frame, for internal use + */ + AVFrame *frame_next; + + /** + * PTS of the current frame + */ + int64_t pts; + + /** + * PTS of the next frame, for internal use + */ + int64_t pts_next; + + /** + * Boolean flagging the next frame, for internal use + */ + uint8_t have_next; + + /** + * State: before first, in stream or after EOF, for internal use + */ + uint8_t state; + + /** + * Synchronization level: frames on input at the highest sync level will + * generate output frame events. + * + * For example, if inputs #0 and #1 have sync level 2 and input #2 has + * sync level 1, then a frame on either input #0 or #1 will generate a + * frame event, but not a frame on input #2 until both inputs #0 and #1 + * have reached EOF. + * + * If sync is 0, no frame event will be generated. + */ + unsigned sync; + +} FFFrameSyncIn; + +/** + * Frame sync structure. + */ +typedef struct FFFrameSync { + const AVClass *class; + + /** + * Parent filter context. + */ + AVFilterContext *parent; + + /** + * Number of input streams + */ + unsigned nb_in; + + /** + * Time base for the output events + */ + AVRational time_base; + + /** + * Timestamp of the current event + */ + int64_t pts; + + /** + * Callback called when a frame event is ready + */ + int (*on_event)(struct FFFrameSync *fs); + + /** + * Opaque pointer, not used by the API + */ + void *opaque; + + /** + * Index of the input that requires a request + */ + unsigned in_request; + + /** + * Synchronization level: only inputs with the same sync level are sync + * sources. + */ + unsigned sync_level; + + /** + * Flag indicating that a frame event is ready + */ + uint8_t frame_ready; + + /** + * Flag indicating that output has reached EOF. + */ + uint8_t eof; + + /** + * Pointer to array of inputs. + */ + FFFrameSyncIn *in; + + int opt_repeatlast; + int opt_shortest; + int opt_eof_action; + +} FFFrameSync; + +/** + * Get the class for the framesync object. + */ +const AVClass *ff_framesync_get_class(void); + +/** + * Pre-initialize a frame sync structure. + * + * It sets the class pointer and inits the options to their default values. + * The entire structure is expected to be already set to 0. + * This step is optional, but necessary to use the options. + */ +void ff_framesync_preinit(FFFrameSync *fs); + +/** + * Initialize a frame sync structure. + * + * The entire structure is expected to be already set to 0 or preinited. + * + * @param fs frame sync structure to initialize + * @param parent parent AVFilterContext object + * @param nb_in number of inputs + * @return >= 0 for success or a negative error code + */ +int ff_framesync_init(FFFrameSync *fs, AVFilterContext *parent, unsigned nb_in); + +/** + * Configure a frame sync structure. + * + * Must be called after all options are set but before all use. + * + * @return >= 0 for success or a negative error code + */ +int ff_framesync_configure(FFFrameSync *fs); + +/** + * Free all memory currently allocated. + */ +void ff_framesync_uninit(FFFrameSync *fs); + +/** + * Get the current frame in an input. + * + * @param fs frame sync structure + * @param in index of the input + * @param rframe used to return the current frame (or NULL) + * @param get if not zero, the calling code needs to get ownership of + * the returned frame; the current frame will either be + * duplicated or removed from the framesync structure + */ +int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, + unsigned get); + +/** + * Examine the frames in the filter's input and try to produce output. + * + * This function can be the complete implementation of the activate + * method of a filter using framesync. + */ +int ff_framesync_activate(FFFrameSync *fs); + +/** + * Initialize a frame sync structure for dualinput. + * + * Compared to generic framesync, dualinput assumes the first input is the + * main one and the filtering is performed on it. The first input will be + * the only one with sync set and generic timeline support will just pass it + * unchanged when disabled. + * + * Equivalent to ff_framesync_init(fs, parent, 2) then setting the time + * base, sync and ext modes on the inputs. + */ +int ff_framesync_init_dualinput(FFFrameSync *fs, AVFilterContext *parent); + +/** + * @param f0 used to return the main frame + * @param f1 used to return the second frame, or NULL if disabled + * @return >=0 for success or AVERROR code + * @note The frame returned in f0 belongs to the caller (get = 1 in + * ff_framesync_get_frame()) while the frame returned in f1 is still owned + * by the framesync structure. + */ +int ff_framesync_dualinput_get(FFFrameSync *fs, AVFrame **f0, AVFrame **f1); + +/** + * Same as ff_framesync_dualinput_get(), but make sure that f0 is writable. + */ +int ff_framesync_dualinput_get_writable(FFFrameSync *fs, AVFrame **f0, AVFrame **f1); + +#define FRAMESYNC_DEFINE_CLASS(name, context, field) \ +static int name##_framesync_preinit(AVFilterContext *ctx) { \ + context *s = ctx->priv; \ + ff_framesync_preinit(&s->field); \ + return 0; \ +} \ +static const AVClass *name##_child_class_next(const AVClass *prev) { \ + return prev ? NULL : ff_framesync_get_class(); \ +} \ +static void *name##_child_next(void *obj, void *prev) { \ + context *s = obj; \ + s->fs.class = ff_framesync_get_class(); /* FIXME */ \ + return prev ? NULL : &s->field; \ +} \ +static const AVClass name##_class = { \ + .class_name = #name, \ + .item_name = av_default_item_name, \ + .option = name##_options, \ + .version = LIBAVUTIL_VERSION_INT, \ + .category = AV_CLASS_CATEGORY_FILTER, \ + .child_class_next = name##_child_class_next, \ + .child_next = name##_child_next, \ +} + +#endif /* AVFILTER_FRAMESYNC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gblur.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gblur.h new file mode 100644 index 00000000..87129801 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gblur.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2011 Pascal Getreuer + * Copyright (c) 2016 Paul B Mahol + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef AVFILTER_GBLUR_H +#define AVFILTER_GBLUR_H +#include "avfilter.h" + +typedef struct GBlurContext { + const AVClass *class; + + float sigma; + float sigmaV; + int steps; + int planes; + + int depth; + int planewidth[4]; + int planeheight[4]; + float *buffer; + float boundaryscale; + float boundaryscaleV; + float postscale; + float postscaleV; + float nu; + float nuV; + int nb_planes; + void (*horiz_slice)(float *buffer, int width, int height, int steps, float nu, float bscale); +} GBlurContext; +void ff_gblur_init(GBlurContext *s); +void ff_gblur_init_x86(GBlurContext *s); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/generate_wave_table.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/generate_wave_table.h new file mode 100644 index 00000000..5fe297e9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/generate_wave_table.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_GENERATE_WAVE_TABLE_H +#define AVFILTER_GENERATE_WAVE_TABLE_H + +#include "libavutil/samplefmt.h" + +enum WaveType { + WAVE_SIN, + WAVE_TRI, + WAVE_NB, +}; + +void ff_generate_wave_table(enum WaveType wave_type, + enum AVSampleFormat sample_fmt, + void *table, int table_size, + double min, double max, double phase); + +#endif /* AVFILTER_GENERATE_WAVE_TABLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/glslang.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/glslang.h new file mode 100644 index 00000000..d33808b9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/glslang.h @@ -0,0 +1,52 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_GLSLANG_H +#define AVFILTER_GLSLANG_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +int glslang_init(void); +void glslang_uninit(void); + +typedef struct GLSlangResult { + int rval; + char *error_msg; + + void *data; /* Shader data or NULL */ + size_t size; +} GLSlangResult; + +enum GLSlangStage { + GLSLANG_VERTEX, + GLSLANG_FRAGMENT, + GLSLANG_COMPUTE, +}; + +/* Compile GLSL into a SPIRV stream, if possible */ +GLSlangResult *glslang_compile(const char *glsl, enum GLSlangStage stage); + +#ifdef __cplusplus +} +#endif + +#endif /* AVFILTER_GLSLANG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gradfun.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gradfun.h new file mode 100644 index 00000000..eb1f1eb0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/gradfun.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010 Nolan Lum + * Copyright (c) 2009 Loren Merritt + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_GRADFUN_H +#define AVFILTER_GRADFUN_H + +#include "avfilter.h" + +/// Holds instance-specific information for gradfun. +typedef struct GradFunContext { + const AVClass *class; + float strength; + int thresh; ///< threshold for gradient algorithm + int radius; ///< blur radius + int chroma_w; ///< width of the chroma planes + int chroma_h; ///< weight of the chroma planes + int chroma_r; ///< blur radius for the chroma planes + uint16_t *buf; ///< holds image data for blur algorithm passed into filter. + /// DSP functions. + void (*filter_line) (uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers); + void (*blur_line) (uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width); +} GradFunContext; + +void ff_gradfun_init_x86(GradFunContext *gf); + +void ff_gradfun_filter_line_c(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers); +void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width); + +#endif /* AVFILTER_GRADFUN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hermite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hermite.h new file mode 100644 index 00000000..fc1c0c61 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hermite.h @@ -0,0 +1,45 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_HERMITE_H +#define AVFILTER_HERMITE_H + +static inline double hermite_interpolation(double x, double x0, double x1, + double p0, double p1, + double m0, double m1) +{ + double width = x1 - x0; + double t = (x - x0) / width; + double t2, t3; + double ct0, ct1, ct2, ct3; + + m0 *= width; + m1 *= width; + + t2 = t*t; + t3 = t2*t; + ct0 = p0; + ct1 = m0; + + ct2 = -3 * p0 - 2 * m0 + 3 * p1 - m1; + ct3 = 2 * p0 + m0 - 2 * p1 + m1; + + return ct3 * t3 + ct2 * t2 + ct1 * t + ct0; +} + +#endif /* AVFILTER_HERMITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hflip.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hflip.h new file mode 100644 index 00000000..204090db --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/hflip.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007 Benoit Fouet + * Copyright (c) 2010 Stefano Sabatini + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_HFLIP_H +#define AVFILTER_HFLIP_H + +#include "avfilter.h" + +typedef struct FlipContext { + const AVClass *class; + int max_step[4]; ///< max pixel step for each plane, expressed as a number of bytes + int planewidth[4]; ///< width of each plane + int planeheight[4]; ///< height of each plane + + void (*flip_line[4])(const uint8_t *src, uint8_t *dst, int w); +} FlipContext; + +int ff_hflip_init(FlipContext *s, int step[4], int nb_planes); +void ff_hflip_init_x86(FlipContext *s, int step[4], int nb_planes); + +#endif /* AVFILTER_HFLIP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/internal.h new file mode 100644 index 00000000..abe7537b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/internal.h @@ -0,0 +1,417 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_INTERNAL_H +#define AVFILTER_INTERNAL_H + +/** + * @file + * internal API functions + */ + +#include "libavutil/internal.h" +#include "avfilter.h" +#include "formats.h" +#include "framepool.h" +#include "framequeue.h" +#include "thread.h" +#include "version.h" +#include "video.h" +#include "libavcodec/avcodec.h" +#include "libavcodec/internal.h" + +typedef struct AVFilterCommand { + double time; ///< time expressed in seconds + char *command; ///< command + char *arg; ///< optional argument for the command + int flags; + struct AVFilterCommand *next; +} AVFilterCommand; + +/** + * Update the position of a link in the age heap. + */ +void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link); + +/** + * A filter pad used for either input or output. + */ +struct AVFilterPad { + /** + * Pad name. The name is unique among inputs and among outputs, but an + * input may have the same name as an output. This may be NULL if this + * pad has no need to ever be referenced by name. + */ + const char *name; + + /** + * AVFilterPad type. + */ + enum AVMediaType type; + + /** + * Callback function to get a video buffer. If NULL, the filter system will + * use ff_default_get_video_buffer(). + * + * Input video pads only. + */ + AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h); + + /** + * Callback function to get an audio buffer. If NULL, the filter system will + * use ff_default_get_audio_buffer(). + * + * Input audio pads only. + */ + AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples); + + /** + * Filtering callback. This is where a filter receives a frame with + * audio/video data and should do its processing. + * + * Input pads only. + * + * @return >= 0 on success, a negative AVERROR on error. This function + * must ensure that frame is properly unreferenced on error if it + * hasn't been passed on to another filter. + */ + int (*filter_frame)(AVFilterLink *link, AVFrame *frame); + + /** + * Frame request callback. A call to this should result in some progress + * towards producing output over the given link. This should return zero + * on success, and another value on error. + * + * Output pads only. + */ + int (*request_frame)(AVFilterLink *link); + + /** + * Link configuration callback. + * + * For output pads, this should set the link properties such as + * width/height. This should NOT set the format property - that is + * negotiated between filters by the filter system using the + * query_formats() callback before this function is called. + * + * For input pads, this should check the properties of the link, and update + * the filter's internal state as necessary. + * + * For both input and output filters, this should return zero on success, + * and another value on error. + */ + int (*config_props)(AVFilterLink *link); + + /** + * The filter expects a fifo to be inserted on its input link, + * typically because it has a delay. + * + * input pads only. + */ + int needs_fifo; + + /** + * The filter expects writable frames from its input link, + * duplicating data buffers if needed. + * + * input pads only. + */ + int needs_writable; +}; + +struct AVFilterGraphInternal { + void *thread; + avfilter_execute_func *thread_execute; + FFFrameQueueGlobal frame_queues; +}; + +struct AVFilterInternal { + avfilter_execute_func *execute; +}; + +/** + * Tell if an integer is contained in the provided -1-terminated list of integers. + * This is useful for determining (for instance) if an AVPixelFormat is in an + * array of supported formats. + * + * @param fmt provided format + * @param fmts -1-terminated list of formats + * @return 1 if present, 0 if absent + */ +int ff_fmt_is_in(int fmt, const int *fmts); + +/* Functions to parse audio format arguments */ + +/** + * Parse a pixel format. + * + * @param ret pixel format pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx); + +/** + * Parse a sample rate. + * + * @param ret unsigned integer pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx); + +/** + * Parse a time base. + * + * @param ret unsigned AVRational pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx); + +/** + * Parse a sample format name or a corresponding integer representation. + * + * @param ret integer pointer to where the value should be written + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx); + +/** + * Parse a channel layout or a corresponding integer representation. + * + * @param ret 64bit integer pointer to where the value should be written. + * @param nret integer pointer to the number of channels; + * if not NULL, then unknown channel layouts are accepted + * @param arg string to parse + * @param log_ctx log context + * @return >= 0 in case of success, a negative AVERROR code on error + */ +av_warn_unused_result +int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg, + void *log_ctx); + +void ff_update_link_current_pts(AVFilterLink *link, int64_t pts); + +/** + * Set the status field of a link from the source filter. + * The pts should reflect the timestamp of the status change, + * in link time base and relative to the frames timeline. + * In particular, for AVERROR_EOF, it should reflect the + * end time of the last frame. + */ +void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts); + +/** + * Set the status field of a link from the destination filter. + * The pts should probably be left unset (AV_NOPTS_VALUE). + */ +void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts); + +void ff_command_queue_pop(AVFilterContext *filter); + +/* misc trace functions */ + +#define FF_TPRINTF_START(ctx, func) ff_tlog(NULL, "%-16s: ", #func) + +char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms); + +void ff_tlog_ref(void *ctx, AVFrame *ref, int end); + +void ff_tlog_link(void *ctx, AVFilterLink *link, int end); + +/** + * Insert a new pad. + * + * @param idx Insertion point. Pad is inserted at the end if this point + * is beyond the end of the list of pads. + * @param count Pointer to the number of pads in the list + * @param padidx_off Offset within an AVFilterLink structure to the element + * to increment when inserting a new pad causes link + * numbering to change + * @param pads Pointer to the pointer to the beginning of the list of pads + * @param links Pointer to the pointer to the beginning of the list of links + * @param newpad The new pad to add. A copy is made when adding. + * @return >= 0 in case of success, a negative AVERROR code on error + */ +int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, + AVFilterPad **pads, AVFilterLink ***links, + AVFilterPad *newpad); + +/** Insert a new input pad for the filter. */ +static inline int ff_insert_inpad(AVFilterContext *f, unsigned index, + AVFilterPad *p) +{ + return ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad), + &f->input_pads, &f->inputs, p); +} + +/** Insert a new output pad for the filter. */ +static inline int ff_insert_outpad(AVFilterContext *f, unsigned index, + AVFilterPad *p) +{ + return ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad), + &f->output_pads, &f->outputs, p); +} + +/** + * Request an input frame from the filter at the other end of the link. + * + * This function must not be used by filters using the activate callback, + * use ff_link_set_frame_wanted() instead. + * + * The input filter may pass the request on to its inputs, fulfill the + * request from an internal buffer or any other means specific to its function. + * + * When the end of a stream is reached AVERROR_EOF is returned and no further + * frames are returned after that. + * + * When a filter is unable to output a frame for example due to its sources + * being unable to do so or because it depends on external means pushing data + * into it then AVERROR(EAGAIN) is returned. + * It is important that a AVERROR(EAGAIN) return is returned all the way to the + * caller (generally eventually a user application) as this step may (but does + * not have to be) necessary to provide the input with the next frame. + * + * If a request is successful then some progress has been made towards + * providing a frame on the link (through ff_filter_frame()). A filter that + * needs several frames to produce one is allowed to return success if one + * more frame has been processed but no output has been produced yet. A + * filter is also allowed to simply forward a success return value. + * + * @param link the input link + * @return zero on success + * AVERROR_EOF on end of file + * AVERROR(EAGAIN) if the previous filter cannot output a frame + * currently and can neither guarantee that EOF has been reached. + */ +int ff_request_frame(AVFilterLink *link); + +#define AVFILTER_DEFINE_CLASS(fname) \ + static const AVClass fname##_class = { \ + .class_name = #fname, \ + .item_name = av_default_item_name, \ + .option = fname##_options, \ + .version = LIBAVUTIL_VERSION_INT, \ + .category = AV_CLASS_CATEGORY_FILTER, \ + } + +/** + * Find the index of a link. + * + * I.e. find i such that link == ctx->(in|out)puts[i] + */ +#define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads)) +#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads)) + +/** + * Send a frame of data to the next filter. + * + * @param link the output link over which the data is being sent + * @param frame a reference to the buffer of data being sent. The + * receiving filter will free this reference when it no longer + * needs it or pass it on to the next filter. + * + * @return >= 0 on success, a negative AVERROR on error. The receiving filter + * is responsible for unreferencing frame in case of error. + */ +int ff_filter_frame(AVFilterLink *link, AVFrame *frame); + +/** + * Allocate a new filter context and return it. + * + * @param filter what filter to create an instance of + * @param inst_name name to give to the new filter context + * + * @return newly created filter context or NULL on failure + */ +AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name); + +int ff_filter_activate(AVFilterContext *filter); + +/** + * Remove a filter from a graph; + */ +void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter); + +/** + * The filter is aware of hardware frames, and any hardware frame context + * should not be automatically propagated through it. + */ +#define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0) + +/** + * Run one round of processing on a filter graph. + */ +int ff_filter_graph_run_once(AVFilterGraph *graph); + +/** + * Normalize the qscale factor + * FIXME the H264 qscale is a log based scale, mpeg1/2 is not, the code below + * cannot be optimal + */ +static inline int ff_norm_qscale(int qscale, int type) +{ + switch (type) { + case FF_QSCALE_TYPE_MPEG1: return qscale; + case FF_QSCALE_TYPE_MPEG2: return qscale >> 1; + case FF_QSCALE_TYPE_H264: return qscale >> 2; + case FF_QSCALE_TYPE_VP56: return (63 - qscale + 2) >> 2; + } + return qscale; +} + +/** + * Get number of threads for current filter instance. + * This number is always same or less than graph->nb_threads. + */ +int ff_filter_get_nb_threads(AVFilterContext *ctx); + +/** + * Generic processing of user supplied commands that are set + * in the same way as the filter options. + */ +int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, + const char *arg, char *res, int res_len, int flags); + +/** + * Perform any additional setup required for hardware frames. + * + * link->hw_frames_ctx must be set before calling this function. + * Inside link->hw_frames_ctx, the fields format, sw_format, width and + * height must be set. If dynamically allocated pools are not supported, + * then initial_pool_size must also be set, to the minimum hardware frame + * pool size necessary for the filter to work (taking into account any + * frames which need to stored for use in operations as appropriate). If + * default_pool_size is nonzero, then it will be used as the pool size if + * no other modification takes place (this can be used to preserve + * compatibility). + */ +int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link, + int default_pool_size); + +#endif /* AVFILTER_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lavfutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lavfutils.h new file mode 100644 index 00000000..2d5308f7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lavfutils.h @@ -0,0 +1,43 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Miscellaneous utilities which make use of the libavformat library + */ + +#ifndef AVFILTER_LAVFUTILS_H +#define AVFILTER_LAVFUTILS_H + +#include "libavformat/avformat.h" + +/** + * Load image from filename and put the resulting image in data. + * + * @param w pointer to the width of the loaded image + * @param h pointer to the height of the loaded image + * @param pix_fmt pointer to the pixel format of the loaded image + * @param filename the name of the image file to load + * @param log_ctx log context + * @return >= 0 in case of success, a negative error code otherwise. + */ +int ff_load_image(uint8_t *data[4], int linesize[4], + int *w, int *h, enum AVPixelFormat *pix_fmt, + const char *filename, void *log_ctx); + +#endif /* AVFILTER_LAVFUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/limiter.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/limiter.h new file mode 100644 index 00000000..54d423d1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/limiter.h @@ -0,0 +1,33 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_LIMITER_H +#define AVFILTER_LIMITER_H + +#include +#include + +typedef struct LimiterDSPContext { + void (*limiter)(const uint8_t *src, uint8_t *dst, + ptrdiff_t slinesize, ptrdiff_t dlinesize, + int w, int h, int min, int max); +} LimiterDSPContext; + +void ff_limiter_init_x86(LimiterDSPContext *dsp, int bpp); + +#endif /* AVFILTER_LIMITER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lswsutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lswsutils.h new file mode 100644 index 00000000..f5f53202 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/lswsutils.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Miscellaneous utilities which make use of the libswscale library + */ + +#ifndef AVFILTER_LSWSUTILS_H +#define AVFILTER_LSWSUTILS_H + +#include "libswscale/swscale.h" + +/** + * Scale image using libswscale. + */ +int ff_scale_image(uint8_t *dst_data[4], int dst_linesize[4], + int dst_w, int dst_h, enum AVPixelFormat dst_pix_fmt, + uint8_t *const src_data[4], int src_linesize[4], + int src_w, int src_h, enum AVPixelFormat src_pix_fmt, + void *log_ctx); + +#endif /* AVFILTER_LSWSUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedclamp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedclamp.h new file mode 100644 index 00000000..6a1fd9c0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedclamp.h @@ -0,0 +1,35 @@ + /* + * Copyright (c) 2019 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_MASKEDCLAMP_H +#define AVFILTER_MASKEDCLAMP_H + +#include +#include + +typedef struct MaskedClampDSPContext { + void (*maskedclamp)(const uint8_t *bsrc, uint8_t *dst, + const uint8_t *darksrc, const uint8_t *brightsrc, + int w, int undershoot, int overshoot); +} MaskedClampDSPContext; + +void ff_maskedclamp_init_x86(MaskedClampDSPContext *dsp, int depth); + +#endif /* AVFILTER_MASKEDCLAMP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedmerge.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedmerge.h new file mode 100644 index 00000000..8e2b1cf6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/maskedmerge.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2015 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_MASKEDMERGE_H +#define AVFILTER_MASKEDMERGE_H + +#include "avfilter.h" +#include "framesync.h" + +typedef struct MaskedMergeContext { + const AVClass *class; + int width[4], height[4]; + int linesize[4]; + int nb_planes; + int planes; + int half, depth; + FFFrameSync fs; + + void (*maskedmerge)(const uint8_t *bsrc, const uint8_t *osrc, + const uint8_t *msrc, uint8_t *dst, + ptrdiff_t blinesize, ptrdiff_t olinesize, + ptrdiff_t mlinesize, ptrdiff_t dlinesize, + int w, int h, + int half, int shift); +} MaskedMergeContext; + +void ff_maskedmerge_init_x86(MaskedMergeContext *s); + +#endif /* AVFILTER_MASKEDMERGE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/median.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/median.h new file mode 100644 index 00000000..672607ca --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/median.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2019 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + */ + +#ifndef AVFILTER_MEDIAN_H +#define AVFILTER_MEDIAN_H + +#include "avfilter.h" + +typedef struct MedianContext { + const AVClass *class; + + int planes; + int radius; + int radiusV; + float percentile; + + int planewidth[4]; + int planeheight[4]; + int depth; + int nb_planes; + int nb_threads; + + uint16_t **coarse, **fine; + int coarse_size, fine_size; + int bins; + int t; + + void (*hadd)(uint16_t *dst, const uint16_t *src, int bins); + void (*hsub)(uint16_t *dst, const uint16_t *src, int bins); + void (*hmuladd)(uint16_t *dst, const uint16_t *src, int f, int bins); + + void (*filter_plane)(AVFilterContext *ctx, const uint8_t *ssrc, int src_linesize, + uint8_t *ddst, int dst_linesize, int width, int height, + int slice_h_start, int slice_h_end, int jobnr); +} MedianContext; + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/motion_estimation.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/motion_estimation.h new file mode 100644 index 00000000..6ae29dd9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/motion_estimation.h @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2016 Davinder Singh (DSM_) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_MOTION_ESTIMATION_H +#define AVFILTER_MOTION_ESTIMATION_H + +#include "libavutil/avutil.h" + +#define AV_ME_METHOD_ESA 1 +#define AV_ME_METHOD_TSS 2 +#define AV_ME_METHOD_TDLS 3 +#define AV_ME_METHOD_NTSS 4 +#define AV_ME_METHOD_FSS 5 +#define AV_ME_METHOD_DS 6 +#define AV_ME_METHOD_HEXBS 7 +#define AV_ME_METHOD_EPZS 8 +#define AV_ME_METHOD_UMH 9 + +typedef struct AVMotionEstPredictor { + int mvs[10][2]; + int nb; +} AVMotionEstPredictor; + +typedef struct AVMotionEstContext { + uint8_t *data_cur, *data_ref; + int linesize; + + int mb_size; + int search_param; + + int width; + int height; + + int x_min; + int x_max; + int y_min; + int y_max; + + int pred_x; ///< median predictor x + int pred_y; ///< median predictor y + AVMotionEstPredictor preds[2]; + + uint64_t (*get_cost)(struct AVMotionEstContext *me_ctx, int x_mb, int y_mb, + int mv_x, int mv_y); +} AVMotionEstContext; + +void ff_me_init_context(AVMotionEstContext *me_ctx, int mb_size, int search_param, + int width, int height, int x_min, int x_max, int y_min, int y_max); + +uint64_t ff_me_cmp_sad(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int x_mv, int y_mv); + +uint64_t ff_me_search_esa(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_tss(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_tdls(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_ntss(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_fss(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_ds(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_hexbs(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_epzs(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +uint64_t ff_me_search_umh(AVMotionEstContext *me_ctx, int x_mb, int y_mb, int *mv); + +#endif /* AVFILTER_MOTION_ESTIMATION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl.h new file mode 100644 index 00000000..7487e602 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl.h @@ -0,0 +1,304 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_OPENCL_H +#define AVFILTER_OPENCL_H + +// The intended target is OpenCL 1.2, so disable warnings for APIs +// deprecated after that. This primarily applies to clCreateCommandQueue(), +// we can't use the replacement clCreateCommandQueueWithProperties() because +// it was introduced in OpenCL 2.0. +#define CL_USE_DEPRECATED_OPENCL_1_2_APIS + +#include "libavutil/bprint.h" +#include "libavutil/buffer.h" +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_opencl.h" +#include "libavutil/pixfmt.h" + +#include "avfilter.h" + +typedef struct OpenCLFilterContext { + const AVClass *class; + + AVBufferRef *device_ref; + AVHWDeviceContext *device; + AVOpenCLDeviceContext *hwctx; + + cl_program program; + + enum AVPixelFormat output_format; + int output_width; + int output_height; +} OpenCLFilterContext; + +// Groups together information about a kernel argument +typedef struct OpenCLKernelArg { + size_t arg_size; + const void *arg_val; +} OpenCLKernelArg; + +/** + * set argument to specific Kernel. + * This macro relies on usage of local label "fail" and variables: + * avctx, cle and err. + */ +#define CL_SET_KERNEL_ARG(kernel, arg_num, type, arg) \ + cle = clSetKernelArg(kernel, arg_num, sizeof(type), arg); \ + if (cle != CL_SUCCESS) { \ + av_log(avctx, AV_LOG_ERROR, "Failed to set kernel " \ + "argument %d: error %d.\n", arg_num, cle); \ + err = AVERROR(EIO); \ + goto fail; \ + } + +/** + * A helper macro to handle OpenCL errors. It will assign errcode to + * variable err, log error msg, and jump to fail label on error. + */ +#define CL_FAIL_ON_ERROR(errcode, ...) do { \ + if (cle != CL_SUCCESS) { \ + av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \ + err = errcode; \ + goto fail; \ + } \ + } while(0) + +/** + * Create a kernel with the given name. + * + * The kernel variable in the context structure must have a name of the form + * kernel_. + * + * The OpenCLFilterContext variable in the context structure must be named ocf. + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_CREATE_KERNEL(ctx, kernel_name) do { \ + ctx->kernel_ ## kernel_name = clCreateKernel(ctx->ocf.program, #kernel_name, &cle); \ + CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create %s kernel: %d.\n", #kernel_name, cle); \ +} while(0) + +/** + * release an OpenCL Kernel + */ +#define CL_RELEASE_KERNEL(k) \ +do { \ + if (k) { \ + cle = clReleaseKernel(k); \ + if (cle != CL_SUCCESS) \ + av_log(avctx, AV_LOG_ERROR, "Failed to release " \ + "OpenCL kernel: %d.\n", cle); \ + } \ +} while(0) + +/** + * release an OpenCL Memory Object + */ +#define CL_RELEASE_MEMORY(m) \ +do { \ + if (m) { \ + cle = clReleaseMemObject(m); \ + if (cle != CL_SUCCESS) \ + av_log(avctx, AV_LOG_ERROR, "Failed to release " \ + "OpenCL memory: %d.\n", cle); \ + } \ +} while(0) + +/** + * release an OpenCL Command Queue + */ +#define CL_RELEASE_QUEUE(q) \ +do { \ + if (q) { \ + cle = clReleaseCommandQueue(q); \ + if (cle != CL_SUCCESS) \ + av_log(avctx, AV_LOG_ERROR, "Failed to release " \ + "OpenCL command queue: %d.\n", cle); \ + } \ +} while(0) + +/** + * Enqueue a kernel with the given information. + * + * Kernel arguments are provided as KernelArg structures and are set in the order + * that they are passed. + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_ENQUEUE_KERNEL_WITH_ARGS(queue, kernel, global_work_size, local_work_size, event, ...) \ +do { \ + OpenCLKernelArg args[] = {__VA_ARGS__}; \ + for (int i = 0; i < FF_ARRAY_ELEMS(args); i++) { \ + cle = clSetKernelArg(kernel, i, args[i].arg_size, args[i].arg_val); \ + if (cle != CL_SUCCESS) { \ + av_log(avctx, AV_LOG_ERROR, "Failed to set kernel " \ + "argument %d: error %d.\n", i, cle); \ + err = AVERROR(EIO); \ + goto fail; \ + } \ + } \ + \ + cle = clEnqueueNDRangeKernel( \ + queue, \ + kernel, \ + FF_ARRAY_ELEMS(global_work_size), \ + NULL, \ + global_work_size, \ + local_work_size, \ + 0, \ + NULL, \ + event \ + ); \ + CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to enqueue kernel: %d.\n", cle); \ +} while (0) + +/** + * Uses the above macro to enqueue the given kernel and then additionally runs it to + * completion via clFinish. + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_RUN_KERNEL_WITH_ARGS(queue, kernel, global_work_size, local_work_size, event, ...) do { \ + CL_ENQUEUE_KERNEL_WITH_ARGS( \ + queue, kernel, global_work_size, local_work_size, event, __VA_ARGS__ \ + ); \ + \ + cle = clFinish(queue); \ + CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to finish command queue: %d.\n", cle); \ +} while (0) + +/** + * Create a buffer with the given information. + * + * The buffer variable in the context structure must be named . + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_CREATE_BUFFER_FLAGS(ctx, buffer_name, flags, size, host_ptr) do { \ + ctx->buffer_name = clCreateBuffer( \ + ctx->ocf.hwctx->context, \ + flags, \ + size, \ + host_ptr, \ + &cle \ + ); \ + CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to create buffer %s: %d.\n", #buffer_name, cle); \ +} while(0) + +/** + * Perform a blocking write to a buffer. + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_BLOCKING_WRITE_BUFFER(queue, buffer, size, host_ptr, event) do { \ + cle = clEnqueueWriteBuffer( \ + queue, \ + buffer, \ + CL_TRUE, \ + 0, \ + size, \ + host_ptr, \ + 0, \ + NULL, \ + event \ + ); \ + CL_FAIL_ON_ERROR(AVERROR(EIO), "Failed to write buffer to device: %d.\n", cle); \ +} while(0) + +/** + * Create a buffer with the given information. + * + * The buffer variable in the context structure must be named . + * + * Requires the presence of a local cl_int variable named cle and a fail label for error + * handling. + */ +#define CL_CREATE_BUFFER(ctx, buffer_name, size) CL_CREATE_BUFFER_FLAGS(ctx, buffer_name, 0, size, NULL) + +/** + * Return that all inputs and outputs support only AV_PIX_FMT_OPENCL. + */ +int ff_opencl_filter_query_formats(AVFilterContext *avctx); + +/** + * Check that the input link contains a suitable hardware frames + * context and extract the device from it. + */ +int ff_opencl_filter_config_input(AVFilterLink *inlink); + +/** + * Create a suitable hardware frames context for the output. + */ +int ff_opencl_filter_config_output(AVFilterLink *outlink); + +/** + * Initialise an OpenCL filter context. + */ +int ff_opencl_filter_init(AVFilterContext *avctx); + +/** + * Uninitialise an OpenCL filter context. + */ +void ff_opencl_filter_uninit(AVFilterContext *avctx); + +/** + * Load a new OpenCL program from strings in memory. + * + * Creates a new program and compiles it for the current device. + * Will log any build errors if compilation fails. + */ +int ff_opencl_filter_load_program(AVFilterContext *avctx, + const char **program_source_array, + int nb_strings); + +/** + * Load a new OpenCL program from a file. + * + * Same as ff_opencl_filter_load_program(), but from a file. + */ +int ff_opencl_filter_load_program_from_file(AVFilterContext *avctx, + const char *filename); + +/** + * Find the work size needed needed for a given plane of an image. + */ +int ff_opencl_filter_work_size_from_image(AVFilterContext *avctx, + size_t *work_size, + AVFrame *frame, int plane, + int block_alignment); +/** + * Print a 3x3 matrix into a buffer as __constant array, which could + * be included in an OpenCL program. +*/ + +void ff_opencl_print_const_matrix_3x3(AVBPrint *buf, const char *name_str, + double mat[3][3]); + +/** + * Gets the command start and end times for the given event and returns the + * difference (the time that the event took). + */ +cl_ulong ff_opencl_get_event_time(cl_event event); + +#endif /* AVFILTER_OPENCL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl_source.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl_source.h new file mode 100644 index 00000000..7e813309 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/opencl_source.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_OPENCL_SOURCE_H +#define AVFILTER_OPENCL_SOURCE_H + +extern const char *ff_opencl_source_avgblur; +extern const char *ff_opencl_source_colorkey; +extern const char *ff_opencl_source_colorspace_common; +extern const char *ff_opencl_source_convolution; +extern const char *ff_opencl_source_deshake; +extern const char *ff_opencl_source_neighbor; +extern const char *ff_opencl_source_nlmeans; +extern const char *ff_opencl_source_overlay; +extern const char *ff_opencl_source_pad; +extern const char *ff_opencl_source_tonemap; +extern const char *ff_opencl_source_transpose; +extern const char *ff_opencl_source_unsharp; +extern const char *ff_opencl_source_xfade; + +#endif /* AVFILTER_OPENCL_SOURCE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/psnr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/psnr.h new file mode 100644 index 00000000..bbc45411 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/psnr.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_PSNR_H +#define AVFILTER_PSNR_H + +#include +#include + +typedef struct PSNRDSPContext { + uint64_t (*sse_line)(const uint8_t *buf, const uint8_t *ref, int w); +} PSNRDSPContext; + +void ff_psnr_init_x86(PSNRDSPContext *dsp, int bpp); + +#endif /* AVFILTER_PSNR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/qsvvpp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/qsvvpp.h new file mode 100644 index 00000000..c2bcce75 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/qsvvpp.h @@ -0,0 +1,74 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Intel Quick Sync Video VPP base function + */ + +#ifndef AVFILTER_QSVVPP_H +#define AVFILTER_QSVVPP_H + +#include + +#include "avfilter.h" + +#define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads)) +#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads)) + +#define QSV_VERSION_ATLEAST(MAJOR, MINOR) \ + (MFX_VERSION_MAJOR > (MAJOR) || \ + MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR)) + +#define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \ + ((MFX_VERSION.Major > (MAJOR)) || \ + (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))) + +typedef struct QSVVPPContext QSVVPPContext; + +typedef struct QSVVPPCrop { + int in_idx; ///< Input index + int x, y, w, h; ///< Crop rectangle +} QSVVPPCrop; + +typedef struct QSVVPPParam { + /* default is ff_filter_frame */ + int (*filter_frame)(AVFilterLink *outlink, AVFrame *frame); + + /* To fill with MFX enhanced filter configurations */ + int num_ext_buf; + mfxExtBuffer **ext_buf; + + /* Real output format */ + enum AVPixelFormat out_sw_format; + + /* Crop information for each input, if needed */ + int num_crop; + QSVVPPCrop *crop; +} QSVVPPParam; + +/* create and initialize the QSV session */ +int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param); + +/* release the resources (eg.surfaces) */ +int ff_qsvvpp_free(QSVVPPContext **vpp); + +/* vpp filter frame and call the cb if needed */ +int ff_qsvvpp_filter_frame(QSVVPPContext *vpp, AVFilterLink *inlink, AVFrame *frame); + +#endif /* AVFILTER_QSVVPP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/removegrain.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/removegrain.h new file mode 100644 index 00000000..f3f10288 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/removegrain.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015 Paul B Mahol + * Copyright (c) 2015 James Darnley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_REMOVEGRAIN_H +#define AVFILTER_REMOVEGRAIN_H + +#include "avfilter.h" + +typedef struct RemoveGrainContext { + const AVClass *class; + + int mode[4]; + + int nb_planes; + int planewidth[4]; + int planeheight[4]; + int skip_even; + int skip_odd; + + int (*rg[4])(int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); + + void (*fl[4])(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int pixels); +} RemoveGrainContext; + +void ff_removegrain_init_x86(RemoveGrainContext *rg); + +#endif /* AVFILTER_REMOVEGRAIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scale_eval.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scale_eval.h new file mode 100644 index 00000000..fceb023f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scale_eval.h @@ -0,0 +1,48 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_SCALE_EVAL_H +#define AVFILTER_SCALE_EVAL_H + +#include "avfilter.h" + +/** + * Parse and evaluate string expressions for width and height. Upon success, + * ff_scale_adjust_dimensions must be called with evaluated width and height + * to obtain actual target dimensions. + * + * Returns 0 upon success, negative value if one of the expressions could + * not be parsed or if NaN was the result of their evaluation. + */ +int ff_scale_eval_dimensions(void *ctx, + const char *w_expr, const char *h_expr, + AVFilterLink *inlink, AVFilterLink *outlink, + int *ret_w, int *ret_h); + +/** + * Transform evaluated width and height obtained from ff_scale_eval_dimensions + * into actual target width and height for scaling. Adjustment can occur if one + * or both of the evaluated values are of the form '-n' or if + * force_original_aspect_ratio is set. + * + * Returns 0. + */ +int ff_scale_adjust_dimensions(AVFilterLink *inlink, + int *ret_w, int *ret_h, + int force_original_aspect_ratio, int force_divisible_by); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scene_sad.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scene_sad.h new file mode 100644 index 00000000..173a051f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/scene_sad.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Scene SAD functions + */ + +#ifndef AVFILTER_SCENE_SAD_H +#define AVFILTER_SCENE_SAD_H + +#include "avfilter.h" + +#define SCENE_SAD_PARAMS const uint8_t *src1, ptrdiff_t stride1, \ + const uint8_t *src2, ptrdiff_t stride2, \ + ptrdiff_t width, ptrdiff_t height, \ + uint64_t *sum + +typedef void (*ff_scene_sad_fn)(SCENE_SAD_PARAMS); + +void ff_scene_sad_c(SCENE_SAD_PARAMS); + +void ff_scene_sad16_c(SCENE_SAD_PARAMS); + +ff_scene_sad_fn ff_scene_sad_get_fn_x86(int depth); + +ff_scene_sad_fn ff_scene_sad_get_fn(int depth); + +#endif /* AVFILTER_SCENE_SAD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/signature.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/signature.h new file mode 100644 index 00000000..cc198dba --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/signature.h @@ -0,0 +1,569 @@ +/* + * Copyright (c) 2017 Gerion Entrup + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * MPEG-7 video signature calculation and lookup filter + */ + +#ifndef AVFILTER_SIGNATURE_H +#define AVFILTER_SIGNATURE_H + +#include +#include "libavutil/common.h" +#include "libavutil/opt.h" +#include "libavutil/timestamp.h" +#include "avfilter.h" +#include "internal.h" + +#define ELEMENT_COUNT 10 +#define SIGELEM_SIZE 380 +#define DIFFELEM_SIZE 348 /* SIGELEM_SIZE - elem_a1 - elem_a2 */ +#define COARSE_SIZE 90 + +enum lookup_mode { + MODE_OFF, + MODE_FULL, + MODE_FAST, + NB_LOOKUP_MODE +}; + +enum formats { + FORMAT_BINARY, + FORMAT_XML, + NB_FORMATS +}; + +typedef struct Point { + uint8_t x; + uint8_t y; +} Point; + +typedef struct Block { + Point up; + Point to; +} Block; + +typedef struct ElemCat { + int av_elem; /* average element category */ + short left_count; /* count of blocks that will be added together */ + short block_count; /* count of blocks per element */ + short elem_count; + const Block* blocks; +} ElemCat; + +typedef struct FineSignature { + struct FineSignature* next; + struct FineSignature* prev; + uint64_t pts; + uint32_t index; /* needed for xmlexport */ + uint8_t confidence; + uint8_t words[5]; + uint8_t framesig[SIGELEM_SIZE/5]; +} FineSignature; + +typedef struct CoarseSignature { + uint8_t data[5][31]; /* 5 words with min. 243 bit */ + struct FineSignature* first; /* associated Finesignatures */ + struct FineSignature* last; + struct CoarseSignature* next; +} CoarseSignature; + +/* lookup types */ +typedef struct MatchingInfo { + double meandist; + double framerateratio; /* second/first */ + int score; + int offset; + int matchframes; /* number of matching frames */ + int whole; + struct FineSignature* first; + struct FineSignature* second; + struct MatchingInfo* next; +} MatchingInfo; + +typedef struct StreamContext { + AVRational time_base; + /* needed for xml_export */ + int w; /* height */ + int h; /* width */ + + /* overflow protection */ + int divide; + + FineSignature* finesiglist; + FineSignature* curfinesig; + + CoarseSignature* coarsesiglist; + CoarseSignature* coarseend; /* needed for xml export */ + /* helpers to store the alternating signatures */ + CoarseSignature* curcoarsesig1; + CoarseSignature* curcoarsesig2; + + int coarsecount; /* counter from 0 to 89 */ + int midcoarse; /* whether it is a coarsesignature beginning from 45 + i * 90 */ + uint32_t lastindex; /* helper to store amount of frames */ + + int exported; /* boolean whether stream already exported */ +} StreamContext; + +typedef struct SignatureContext { + const AVClass *class; + /* input parameters */ + int mode; + int nb_inputs; + char *filename; + int format; + int thworddist; + int thcomposdist; + int thl1; + int thdi; + int thit; + /* end input parameters */ + + uint8_t l1distlut[243*242/2]; /* 243 + 242 + 241 ... */ + StreamContext* streamcontexts; +} SignatureContext; + + +static const Block elem_a1_data[] = { + {{ 0, 0},{ 7, 7}}, + {{ 8, 0},{15, 7}}, + {{ 0, 8},{ 7,15}}, + {{ 8, 8},{15,15}}, + {{16, 0},{23, 7}}, + {{24, 0},{31, 7}}, + {{16, 8},{23,15}}, + {{24, 8},{31,15}}, + {{ 0,16},{ 7,23}}, + {{ 8,16},{15,23}}, + {{ 0,24},{ 7,31}}, + {{ 8,24},{15,31}}, + {{16,16},{23,23}}, + {{24,16},{31,23}}, + {{16,24},{23,31}}, + {{24,24},{31,31}}, + {{ 0, 0},{15,15}}, + {{16, 0},{31,15}}, + {{ 0,16},{15,31}}, + {{16,16},{31,31}} +}; +static const ElemCat elem_a1 = { 1, 1, 1, 20, elem_a1_data }; + +static const Block elem_a2_data[] = { + {{ 2, 2},{ 9, 9}}, + {{12, 2},{19, 9}}, + {{22, 2},{29, 9}}, + {{ 2,12},{ 9,19}}, + {{12,12},{19,19}}, + {{22,12},{29,19}}, + {{ 2,22},{ 9,29}}, + {{12,22},{19,29}}, + {{22,22},{29,29}}, + {{ 9, 9},{22,22}}, + {{ 6, 6},{25,25}}, + {{ 3, 3},{28,28}} +}; +static const ElemCat elem_a2 = { 1, 1, 1, 12, elem_a2_data }; + +static const Block elem_d1_data[] = { + {{ 0, 0},{ 1, 3}},{{ 2, 0},{ 3, 3}}, + {{ 4, 0},{ 7, 1}},{{ 4, 2},{ 7, 3}}, + {{ 0, 6},{ 3, 7}},{{ 0, 4},{ 3, 5}}, + {{ 6, 4},{ 7, 7}},{{ 4, 4},{ 5, 7}}, + {{ 8, 0},{ 9, 3}},{{10, 0},{11, 3}}, + {{12, 0},{15, 1}},{{12, 2},{15, 3}}, + {{ 8, 6},{11, 7}},{{ 8, 4},{11, 5}}, + {{14, 4},{15, 7}},{{12, 4},{13, 7}}, + {{ 0, 8},{ 1,11}},{{ 2, 8},{ 3,11}}, + {{ 4, 8},{ 7, 9}},{{ 4,10},{ 7,11}}, + {{ 0,14},{ 3,15}},{{ 0,12},{ 3,13}}, + {{ 6,12},{ 7,15}},{{ 4,12},{ 5,15}}, + {{ 8, 8},{ 9,11}},{{10, 8},{11,11}}, + {{12, 8},{15, 9}},{{12,10},{15,11}}, + {{ 8,14},{11,15}},{{ 8,12},{11,13}}, + {{14,12},{15,15}},{{12,12},{13,15}}, + {{16, 0},{19, 1}},{{16, 2},{19, 3}}, + {{22, 0},{23, 3}},{{20, 0},{21, 3}}, + {{16, 4},{17, 7}},{{18, 4},{19, 7}}, + {{20, 6},{23, 7}},{{20, 4},{23, 5}}, + {{24, 0},{27, 1}},{{24, 2},{27, 3}}, + {{30, 0},{31, 3}},{{28, 0},{29, 3}}, + {{24, 4},{25, 7}},{{26, 4},{27, 7}}, + {{28, 6},{31, 7}},{{28, 4},{31, 5}}, + {{16, 8},{19, 9}},{{16,10},{19,11}}, + {{22, 8},{23,11}},{{20, 8},{21,11}}, + {{16,12},{17,15}},{{18,12},{19,15}}, + {{20,14},{23,15}},{{20,12},{23,13}}, + {{24, 8},{27, 9}},{{24,10},{27,11}}, + {{30, 8},{31,11}},{{28, 8},{29,11}}, + {{24,12},{25,15}},{{26,12},{27,15}}, + {{28,14},{31,15}},{{28,12},{31,13}}, + {{ 0,16},{ 3,17}},{{ 0,18},{ 3,19}}, + {{ 6,16},{ 7,19}},{{ 4,16},{ 5,19}}, + {{ 0,20},{ 1,23}},{{ 2,20},{ 3,23}}, + {{ 4,22},{ 7,23}},{{ 4,20},{ 7,21}}, + {{ 8,16},{11,17}},{{ 8,18},{11,19}}, + {{14,16},{15,19}},{{12,16},{13,19}}, + {{ 8,20},{ 9,23}},{{10,20},{11,23}}, + {{12,22},{15,23}},{{12,20},{15,21}}, + {{ 0,24},{ 3,25}},{{ 0,26},{ 3,27}}, + {{ 6,24},{ 7,27}},{{ 4,24},{ 5,27}}, + {{ 0,28},{ 1,31}},{{ 2,28},{ 3,31}}, + {{ 4,30},{ 7,31}},{{ 4,28},{ 7,29}}, + {{ 8,24},{11,25}},{{ 8,26},{11,27}}, + {{14,24},{15,27}},{{12,24},{13,27}}, + {{ 8,28},{ 9,31}},{{10,28},{11,31}}, + {{12,30},{15,31}},{{12,28},{15,29}}, + {{16,16},{17,19}},{{18,16},{19,19}}, + {{20,16},{23,17}},{{20,18},{23,19}}, + {{16,22},{19,23}},{{16,20},{19,21}}, + {{22,20},{23,23}},{{20,20},{21,23}}, + {{24,16},{25,19}},{{26,16},{27,19}}, + {{28,16},{31,17}},{{28,18},{31,19}}, + {{24,22},{27,23}},{{24,20},{27,21}}, + {{30,20},{31,23}},{{28,20},{29,23}}, + {{16,24},{17,27}},{{18,24},{19,27}}, + {{20,24},{23,25}},{{20,26},{23,27}}, + {{16,30},{19,31}},{{16,28},{19,29}}, + {{22,28},{23,31}},{{20,28},{21,31}}, + {{24,24},{25,27}},{{26,24},{27,27}}, + {{28,24},{31,25}},{{28,26},{31,27}}, + {{24,30},{27,31}},{{24,28},{27,29}}, + {{30,28},{31,31}},{{28,28},{29,31}}, + {{ 2, 2},{ 3, 5}},{{ 4, 2},{ 5, 5}}, + {{ 6, 2},{ 9, 3}},{{ 6, 4},{ 9, 5}}, + {{ 2, 8},{ 5, 9}},{{ 2, 6},{ 5, 7}}, + {{ 8, 6},{ 9, 9}},{{ 6, 6},{ 7, 9}}, + {{12, 2},{13, 5}},{{14, 2},{15, 5}}, + {{16, 2},{19, 3}},{{16, 4},{19, 5}}, + {{12, 8},{15, 9}},{{12, 6},{15, 7}}, + {{18, 6},{19, 9}},{{16, 6},{17, 9}}, + {{22, 2},{23, 5}},{{24, 2},{25, 5}}, + {{26, 2},{29, 3}},{{26, 4},{29, 5}}, + {{22, 8},{25, 9}},{{22, 6},{25, 7}}, + {{28, 6},{29, 9}},{{26, 6},{27, 9}}, + {{ 2,12},{ 3,15}},{{ 4,12},{ 5,15}}, + {{ 6,12},{ 9,13}},{{ 6,14},{ 9,15}}, + {{ 2,18},{ 5,19}},{{ 2,16},{ 5,17}}, + {{ 8,16},{ 9,19}},{{ 6,16},{ 7,19}}, + {{12,12},{15,13}},{{12,14},{15,15}}, + {{16,12},{19,13}},{{16,14},{19,15}}, + {{12,18},{15,19}},{{12,16},{15,17}}, + {{16,18},{19,19}},{{16,16},{19,17}}, + {{22,12},{23,15}},{{24,12},{25,15}}, + {{26,12},{29,13}},{{26,14},{29,15}}, + {{22,18},{25,19}},{{22,16},{25,17}}, + {{28,16},{29,19}},{{26,16},{27,19}}, + {{ 2,22},{ 3,25}},{{ 4,22},{ 5,25}}, + {{ 6,22},{ 9,23}},{{ 6,24},{ 9,25}}, + {{ 2,28},{ 5,29}},{{ 2,26},{ 5,27}}, + {{ 8,26},{ 9,29}},{{ 6,26},{ 7,29}}, + {{12,22},{13,25}},{{14,22},{15,25}}, + {{16,22},{19,23}},{{16,24},{19,25}}, + {{12,28},{15,29}},{{12,26},{15,27}}, + {{18,26},{19,29}},{{16,26},{17,29}}, + {{22,22},{23,25}},{{24,22},{25,25}}, + {{26,22},{29,23}},{{26,24},{29,25}}, + {{22,28},{25,29}},{{22,26},{25,27}}, + {{28,26},{29,29}},{{26,26},{27,29}}, + {{ 7, 7},{10, 8}},{{ 7, 9},{10,10}}, + {{11, 7},{12,10}},{{13, 7},{14,10}}, + {{ 7,11},{ 8,14}},{{ 9,11},{10,14}}, + {{11,11},{14,12}},{{11,13},{14,14}}, + {{17, 7},{20, 8}},{{17, 9},{20,10}}, + {{21, 7},{22,10}},{{23, 7},{24,10}}, + {{17,11},{18,14}},{{19,11},{20,14}}, + {{21,11},{24,12}},{{21,13},{24,14}}, + {{ 7,17},{10,18}},{{ 7,19},{10,20}}, + {{11,17},{12,20}},{{13,17},{14,20}}, + {{ 7,21},{ 8,24}},{{ 9,21},{10,24}}, + {{11,21},{14,22}},{{11,23},{14,24}}, + {{17,17},{20,18}},{{17,19},{20,20}}, + {{21,17},{22,20}},{{23,17},{24,20}}, + {{17,21},{18,24}},{{19,21},{20,24}}, + {{21,21},{24,22}},{{21,23},{24,24}} +}; +static const ElemCat elem_d1 = { 0, 1, 2, 116, elem_d1_data }; + +static const Block elem_d2_data[] = { + {{ 0, 0},{ 3, 3}},{{ 4, 4},{ 7, 7}},{{ 4, 0},{ 7, 3}},{{ 0, 4},{ 3, 7}}, + {{ 8, 0},{11, 3}},{{12, 4},{15, 7}},{{12, 0},{15, 3}},{{ 8, 4},{11, 7}}, + {{16, 0},{19, 3}},{{20, 4},{23, 7}},{{20, 0},{23, 3}},{{16, 4},{19, 7}}, + {{24, 0},{27, 3}},{{28, 4},{31, 7}},{{28, 0},{31, 3}},{{24, 4},{27, 7}}, + {{ 0, 8},{ 3,11}},{{ 4,12},{ 7,15}},{{ 4, 8},{ 7,11}},{{ 0,12},{ 3,15}}, + {{ 8, 8},{11,11}},{{12,12},{15,15}},{{12, 8},{15,11}},{{ 8,12},{11,15}}, + {{16, 8},{19,11}},{{20,12},{23,15}},{{20, 8},{23,11}},{{16,12},{19,15}}, + {{24, 8},{27,11}},{{28,12},{31,15}},{{28, 8},{31,11}},{{24,12},{27,15}}, + {{ 0,16},{ 3,19}},{{ 4,20},{ 7,23}},{{ 4,16},{ 7,19}},{{ 0,20},{ 3,23}}, + {{ 8,16},{11,19}},{{12,20},{15,23}},{{12,16},{15,19}},{{ 8,20},{11,23}}, + {{16,16},{19,19}},{{20,20},{23,23}},{{20,16},{23,19}},{{16,20},{19,23}}, + {{24,16},{27,19}},{{28,20},{31,23}},{{28,16},{31,19}},{{24,20},{27,23}}, + {{ 0,24},{ 3,27}},{{ 4,28},{ 7,31}},{{ 4,24},{ 7,27}},{{ 0,28},{ 3,31}}, + {{ 8,24},{11,27}},{{12,28},{15,31}},{{12,24},{15,27}},{{ 8,28},{11,31}}, + {{16,24},{19,27}},{{20,28},{23,31}},{{20,24},{23,27}},{{16,28},{19,31}}, + {{24,24},{27,27}},{{28,28},{31,31}},{{28,24},{31,27}},{{24,28},{27,31}}, + {{ 4, 4},{ 7, 7}},{{ 8, 8},{11,11}},{{ 8, 4},{11, 7}},{{ 4, 8},{ 7,11}}, + {{12, 4},{15, 7}},{{16, 8},{19,11}},{{16, 4},{19, 7}},{{12, 8},{15,11}}, + {{20, 4},{23, 7}},{{24, 8},{27,11}},{{24, 4},{27, 7}},{{20, 8},{23,11}}, + {{ 4,12},{ 7,15}},{{ 8,16},{11,19}},{{ 8,12},{11,15}},{{ 4,16},{ 7,19}}, + {{12,12},{15,15}},{{16,16},{19,19}},{{16,12},{19,15}},{{12,16},{15,19}}, + {{20,12},{23,15}},{{24,16},{27,19}},{{24,12},{27,15}},{{20,16},{23,19}}, + {{ 4,20},{ 7,23}},{{ 8,24},{11,27}},{{ 8,20},{11,23}},{{ 4,24},{ 7,27}}, + {{12,20},{15,23}},{{16,24},{19,27}},{{16,20},{19,23}},{{12,24},{15,27}}, + {{20,20},{23,23}},{{24,24},{27,27}},{{24,20},{27,23}},{{20,24},{23,27}} +}; +static const ElemCat elem_d2 = { 0, 2, 4, 25, elem_d2_data }; + +static const Block elem_d3_data[] = { + {{ 1, 1},{10,10}},{{11, 1},{20,10}}, + {{ 1, 1},{10,10}},{{21, 1},{30,10}}, + {{ 1, 1},{10,10}},{{ 1,11},{10,20}}, + {{ 1, 1},{10,10}},{{11,11},{20,20}}, + {{ 1, 1},{10,10}},{{21,11},{30,20}}, + {{ 1, 1},{10,10}},{{ 1,21},{10,30}}, + {{ 1, 1},{10,10}},{{11,21},{20,30}}, + {{ 1, 1},{10,10}},{{21,21},{30,30}}, + {{11, 1},{20,10}},{{21, 1},{30,10}}, + {{11, 1},{20,10}},{{ 1,11},{10,20}}, + {{11, 1},{20,10}},{{11,11},{20,20}}, + {{11, 1},{20,10}},{{21,11},{30,20}}, + {{11, 1},{20,10}},{{ 1,21},{10,30}}, + {{11, 1},{20,10}},{{11,21},{20,30}}, + {{11, 1},{20,10}},{{21,21},{30,30}}, + {{21, 1},{30,10}},{{ 1,11},{10,20}}, + {{21, 1},{30,10}},{{11,11},{20,20}}, + {{21, 1},{30,10}},{{21,11},{30,20}}, + {{21, 1},{30,10}},{{ 1,21},{10,30}}, + {{21, 1},{30,10}},{{11,21},{20,30}}, + {{21, 1},{30,10}},{{21,21},{30,30}}, + {{ 1,11},{10,20}},{{11,11},{20,20}}, + {{ 1,11},{10,20}},{{21,11},{30,20}}, + {{ 1,11},{10,20}},{{ 1,21},{10,30}}, + {{ 1,11},{10,20}},{{11,21},{20,30}}, + {{ 1,11},{10,20}},{{21,21},{30,30}}, + {{11,11},{20,20}},{{21,11},{30,20}}, + {{11,11},{20,20}},{{ 1,21},{10,30}}, + {{11,11},{20,20}},{{11,21},{20,30}}, + {{11,11},{20,20}},{{21,21},{30,30}}, + {{21,11},{30,20}},{{ 1,21},{10,30}}, + {{21,11},{30,20}},{{11,21},{20,30}}, + {{21,11},{30,20}},{{21,21},{30,30}}, + {{ 1,21},{10,30}},{{11,21},{20,30}}, + {{ 1,21},{10,30}},{{21,21},{30,30}}, + {{11,21},{20,30}},{{21,21},{30,30}} +}; +static const ElemCat elem_d3 = { 0, 1, 2, 36, elem_d3_data }; + +static const Block elem_d4_data[] = { + {{ 7,13},{12,18}},{{19,13},{24,18}}, + {{13, 7},{18,12}},{{13,19},{18,24}}, + {{ 7, 7},{12,12}},{{19,19},{24,24}}, + {{19, 7},{24,12}},{{ 7,19},{12,24}}, + {{13, 7},{18,12}},{{19,13},{24,18}}, + {{19,13},{24,18}},{{13,19},{18,24}}, + {{13,19},{18,24}},{{ 7,13},{12,18}}, + {{ 7,13},{12,18}},{{13, 7},{18,12}}, + {{ 7, 7},{12,12}},{{19, 7},{24,12}}, + {{19, 7},{24,12}},{{19,19},{24,24}}, + {{19,19},{24,24}},{{ 7,19},{12,24}}, + {{ 7,19},{12,24}},{{ 7, 7},{12,12}}, + {{13,13},{18,18}},{{13, 1},{18, 6}}, + {{13,13},{18,18}},{{25,13},{30,18}}, + {{13,13},{18,18}},{{13,25},{18,30}}, + {{13,13},{18,18}},{{ 1,13},{ 6,18}}, + {{13, 1},{18, 6}},{{13,25},{18,30}}, + {{ 1,13},{ 6,18}},{{25,13},{30,18}}, + {{ 7, 1},{12, 6}},{{19, 1},{24, 6}}, + {{ 7,25},{12,30}},{{19,25},{24,30}}, + {{ 1, 7},{ 6,12}},{{ 1,19},{ 6,24}}, + {{25, 7},{30,12}},{{25,19},{30,24}}, + {{ 7, 1},{12, 6}},{{ 1, 7},{ 6,12}}, + {{19, 1},{24, 6}},{{25, 7},{30,12}}, + {{25,19},{30,24}},{{19,25},{24,30}}, + {{ 1,19},{ 6,24}},{{ 7,25},{12,30}}, + {{ 1, 1},{ 6, 6}},{{25, 1},{30, 6}}, + {{25, 1},{30, 6}},{{25,25},{30,30}}, + {{25,25},{30,30}},{{ 1,25},{ 6,30}}, + {{ 1,25},{ 6,30}},{{ 1, 1},{ 6, 6}} +}; +static const ElemCat elem_d4 = { 0, 1, 2, 30, elem_d4_data }; + +static const Block elem_d5_data[] = { + {{ 1, 1},{10, 3}},{{ 1, 4},{ 3, 7}},{{ 8, 4},{10, 7}},{{ 1, 8},{10,10}},{{ 4, 4},{ 7, 7}}, + {{11, 1},{20, 3}},{{11, 4},{13, 7}},{{18, 4},{20, 7}},{{11, 8},{20,10}},{{14, 4},{17, 7}}, + {{21, 1},{30, 3}},{{21, 4},{23, 7}},{{28, 4},{30, 7}},{{21, 8},{30,10}},{{24, 4},{27, 7}}, + {{ 1,11},{10,13}},{{ 1,14},{ 3,17}},{{ 8,14},{10,17}},{{ 1,18},{10,20}},{{ 4,14},{ 7,17}}, + {{11,11},{20,13}},{{11,14},{13,17}},{{18,14},{20,17}},{{11,18},{20,20}},{{14,14},{17,17}}, + {{21,11},{30,13}},{{21,14},{23,17}},{{28,14},{30,17}},{{21,18},{30,20}},{{24,14},{27,17}}, + {{ 1,21},{10,23}},{{ 1,24},{ 3,27}},{{ 8,24},{10,27}},{{ 1,28},{10,30}},{{ 4,24},{ 7,27}}, + {{11,21},{20,23}},{{11,24},{13,27}},{{18,24},{20,27}},{{11,28},{20,30}},{{14,24},{17,27}}, + {{21,21},{30,23}},{{21,24},{23,27}},{{28,24},{30,27}},{{21,28},{30,30}},{{24,24},{27,27}}, + {{ 6, 6},{15, 8}},{{ 6, 9},{ 8,12}},{{13, 9},{15,12}},{{ 6,13},{15,15}},{{ 9, 9},{12,12}}, + {{16, 6},{25, 8}},{{16, 9},{18,12}},{{23, 9},{25,12}},{{16,13},{25,15}},{{19, 9},{22,12}}, + {{ 6,16},{15,18}},{{ 6,19},{ 8,22}},{{13,19},{15,22}},{{ 6,23},{15,25}},{{ 9,19},{12,22}}, + {{16,16},{25,18}},{{16,19},{18,22}},{{23,19},{25,22}},{{16,23},{25,25}},{{19,19},{22,22}}, + {{ 6, 1},{15, 3}},{{ 6, 4},{ 8, 7}},{{13, 4},{15, 7}},{{ 6, 8},{15,10}},{{ 9, 4},{12, 7}}, + {{16, 1},{25, 3}},{{16, 4},{18, 7}},{{23, 4},{25, 7}},{{16, 8},{25,10}},{{19, 4},{22, 7}}, + {{ 1, 6},{10, 8}},{{ 1, 9},{ 3,12}},{{ 8, 9},{10,12}},{{ 1,13},{10,15}},{{ 4, 9},{ 7,12}}, + {{11, 6},{20, 8}},{{11, 9},{13,12}},{{18, 9},{20,12}},{{11,13},{20,15}},{{14, 9},{17,12}}, + {{21, 6},{30, 8}},{{21, 9},{23,12}},{{28, 9},{30,12}},{{21,13},{30,15}},{{24, 9},{27,12}}, + {{ 6,11},{15,13}},{{ 6,14},{ 8,17}},{{13,14},{15,17}},{{ 6,18},{15,20}},{{ 9,14},{12,17}}, + {{16,11},{25,13}},{{16,14},{18,17}},{{23,14},{25,17}},{{16,18},{25,20}},{{19,14},{22,17}}, + {{ 1,16},{10,18}},{{ 1,19},{ 3,22}},{{ 8,19},{10,22}},{{ 1,23},{10,25}},{{ 4,19},{ 7,22}}, + {{11,16},{20,18}},{{11,19},{13,22}},{{18,19},{20,22}},{{11,23},{20,25}},{{14,19},{17,22}}, + {{21,16},{30,18}},{{21,19},{23,22}},{{28,19},{30,22}},{{21,23},{30,25}},{{24,19},{27,22}}, + {{ 6,21},{15,23}},{{ 6,24},{ 8,27}},{{13,24},{15,27}},{{ 6,28},{15,30}},{{ 9,24},{12,27}}, + {{16,21},{25,23}},{{16,24},{18,27}},{{23,24},{25,27}},{{16,28},{25,30}},{{19,24},{22,27}}, + {{ 2, 2},{14, 6}},{{ 2, 7},{ 6, 9}},{{10, 7},{14, 9}},{{ 2,10},{14,14}},{{ 7, 7},{ 9, 9}}, + {{ 7, 2},{19, 6}},{{ 7, 7},{11, 9}},{{15, 7},{19, 9}},{{ 7,10},{19,14}},{{12, 7},{14, 9}}, + {{12, 2},{24, 6}},{{12, 7},{16, 9}},{{20, 7},{24, 9}},{{12,10},{24,14}},{{17, 7},{19, 9}}, + {{17, 2},{29, 6}},{{17, 7},{21, 9}},{{25, 7},{29, 9}},{{17,10},{29,14}},{{22, 7},{24, 9}}, + {{ 2, 7},{14,11}},{{ 2,12},{ 6,14}},{{10,12},{14,14}},{{ 2,15},{14,19}},{{ 7,12},{ 9,14}}, + {{ 7, 7},{19,11}},{{ 7,12},{11,14}},{{15,12},{19,14}},{{ 7,15},{19,19}},{{12,12},{14,14}}, + {{12, 7},{24,11}},{{12,12},{16,14}},{{20,12},{24,14}},{{12,15},{24,19}},{{17,12},{19,14}}, + {{17, 7},{29,11}},{{17,12},{21,14}},{{25,12},{29,14}},{{17,15},{29,19}},{{22,12},{24,14}}, + {{ 2,12},{14,16}},{{ 2,17},{ 6,19}},{{10,17},{14,19}},{{ 2,20},{14,24}},{{ 7,17},{ 9,19}}, + {{ 7,12},{19,16}},{{ 7,17},{11,19}},{{15,17},{19,19}},{{ 7,20},{19,24}},{{12,17},{14,19}}, + {{12,12},{24,16}},{{12,17},{16,19}},{{20,17},{24,19}},{{12,20},{24,24}},{{17,17},{19,19}}, + {{17,12},{29,16}},{{17,17},{21,19}},{{25,17},{29,19}},{{17,20},{29,24}},{{22,17},{24,19}}, + {{ 2,17},{14,21}},{{ 2,22},{ 6,24}},{{10,22},{14,24}},{{ 2,25},{14,29}},{{ 7,22},{ 9,24}}, + {{ 7,17},{19,21}},{{ 7,22},{11,24}},{{15,22},{19,24}},{{ 7,25},{19,29}},{{12,22},{14,24}}, + {{12,17},{24,21}},{{12,22},{16,24}},{{20,22},{24,24}},{{12,25},{24,29}},{{17,22},{19,24}}, + {{17,17},{29,21}},{{17,22},{21,24}},{{25,22},{29,24}},{{17,25},{29,29}},{{22,22},{24,24}}, + {{ 8, 3},{13, 4}},{{ 8, 5},{ 9, 6}},{{12, 5},{13, 6}},{{ 8, 7},{13, 8}},{{10, 5},{11, 6}}, + {{13, 3},{18, 4}},{{13, 5},{14, 6}},{{17, 5},{18, 6}},{{13, 7},{18, 8}},{{15, 5},{16, 6}}, + {{18, 3},{23, 4}},{{18, 5},{19, 6}},{{22, 5},{23, 6}},{{18, 7},{23, 8}},{{20, 5},{21, 6}}, + {{ 3, 8},{ 8, 9}},{{ 3,10},{ 4,11}},{{ 7,10},{ 8,11}},{{ 3,12},{ 8,13}},{{ 5,10},{ 6,11}}, + {{ 8, 8},{13, 9}},{{ 8,10},{ 9,11}},{{12,10},{13,11}},{{ 8,12},{13,13}},{{10,10},{11,11}}, + {{13, 8},{18, 9}},{{13,10},{14,11}},{{17,10},{18,11}},{{13,12},{18,13}},{{15,10},{16,11}}, + {{18, 8},{23, 9}},{{18,10},{19,11}},{{22,10},{23,11}},{{18,12},{23,13}},{{20,10},{21,11}}, + {{23, 8},{28, 9}},{{23,10},{24,11}},{{27,10},{28,11}},{{23,12},{28,13}},{{25,10},{26,11}}, + {{ 3,13},{ 8,14}},{{ 3,15},{ 4,16}},{{ 7,15},{ 8,16}},{{ 3,17},{ 8,18}},{{ 5,15},{ 6,16}}, + {{ 8,13},{13,14}},{{ 8,15},{ 9,16}},{{12,15},{13,16}},{{ 8,17},{13,18}},{{10,15},{11,16}}, + {{13,13},{18,14}},{{13,15},{14,16}},{{17,15},{18,16}},{{13,17},{18,18}},{{15,15},{16,16}}, + {{18,13},{23,14}},{{18,15},{19,16}},{{22,15},{23,16}},{{18,17},{23,18}},{{20,15},{21,16}}, + {{23,13},{28,14}},{{23,15},{24,16}},{{27,15},{28,16}},{{23,17},{28,18}},{{25,15},{26,16}}, + {{ 3,18},{ 8,19}},{{ 3,20},{ 4,21}},{{ 7,20},{ 8,21}},{{ 3,22},{ 8,23}},{{ 5,20},{ 6,21}}, + {{ 8,18},{13,19}},{{ 8,20},{ 9,21}},{{12,20},{13,21}},{{ 8,22},{13,23}},{{10,20},{11,21}}, + {{13,18},{18,19}},{{13,20},{14,21}},{{17,20},{18,21}},{{13,22},{18,23}},{{15,20},{16,21}}, + {{18,18},{23,19}},{{18,20},{19,21}},{{22,20},{23,21}},{{18,22},{23,23}},{{20,20},{21,21}}, + {{23,18},{28,19}},{{23,20},{24,21}},{{27,20},{28,21}},{{23,22},{28,23}},{{25,20},{26,21}}, + {{ 8,23},{13,24}},{{ 8,25},{ 9,26}},{{12,25},{13,26}},{{ 8,27},{13,28}},{{10,25},{11,26}}, + {{13,23},{18,24}},{{13,25},{14,26}},{{17,25},{18,26}},{{13,27},{18,28}},{{15,25},{16,26}}, + {{18,23},{23,24}},{{18,25},{19,26}},{{22,25},{23,26}},{{18,27},{23,28}},{{20,25},{21,26}} +}; +static const ElemCat elem_d5 = { 0, 4, 5, 62, elem_d5_data }; + +static const Block elem_d6_data[] = { + {{ 3, 5},{12,10}},{{ 5, 3},{10,12}}, + {{11, 5},{20,10}},{{13, 3},{18,12}}, + {{19, 5},{28,10}},{{21, 3},{26,12}}, + {{ 3,13},{12,18}},{{ 5,11},{10,20}}, + {{11,13},{20,18}},{{13,11},{18,20}}, + {{19,13},{28,18}},{{21,11},{26,20}}, + {{ 3,21},{12,26}},{{ 5,19},{10,28}}, + {{11,21},{20,26}},{{13,19},{18,28}}, + {{19,21},{28,26}},{{21,19},{26,28}} +}; +static const ElemCat elem_d6 = { 0, 1, 2, 9, elem_d6_data }; + +static const Block elem_d7_data[] = { + {{ 0, 4},{ 3, 7}},{{ 8, 4},{11, 7}},{{ 4, 4},{ 7, 7}}, + {{ 4, 0},{ 7, 3}},{{ 4, 8},{ 7,11}},{{ 4, 4},{ 7, 7}}, + {{ 5, 4},{ 8, 7}},{{13, 4},{16, 7}},{{ 9, 4},{12, 7}}, + {{ 9, 0},{12, 3}},{{ 9, 8},{12,11}},{{ 9, 4},{12, 7}}, + {{10, 4},{13, 7}},{{18, 4},{21, 7}},{{14, 4},{17, 7}}, + {{14, 0},{17, 3}},{{14, 8},{17,11}},{{14, 4},{17, 7}}, + {{15, 4},{18, 7}},{{23, 4},{26, 7}},{{19, 4},{22, 7}}, + {{19, 0},{22, 3}},{{19, 8},{22,11}},{{19, 4},{22, 7}}, + {{20, 4},{23, 7}},{{28, 4},{31, 7}},{{24, 4},{27, 7}}, + {{24, 0},{27, 3}},{{24, 8},{27,11}},{{24, 4},{27, 7}}, + {{ 0, 9},{ 3,12}},{{ 8, 9},{11,12}},{{ 4, 9},{ 7,12}}, + {{ 4, 5},{ 7, 8}},{{ 4,13},{ 7,16}},{{ 4, 9},{ 7,12}}, + {{ 5, 9},{ 8,12}},{{13, 9},{16,12}},{{ 9, 9},{12,12}}, + {{ 9, 5},{12, 8}},{{ 9,13},{12,16}},{{ 9, 9},{12,12}}, + {{10, 9},{13,12}},{{18, 9},{21,12}},{{14, 9},{17,12}}, + {{14, 5},{17, 8}},{{14,13},{17,16}},{{14, 9},{17,12}}, + {{15, 9},{18,12}},{{23, 9},{26,12}},{{19, 9},{22,12}}, + {{19, 5},{22, 8}},{{19,13},{22,16}},{{19, 9},{22,12}}, + {{20, 9},{23,12}},{{28, 9},{31,12}},{{24, 9},{27,12}}, + {{24, 5},{27, 8}},{{24,13},{27,16}},{{24, 9},{27,12}}, + {{ 0,14},{ 3,17}},{{ 8,14},{11,17}},{{ 4,14},{ 7,17}}, + {{ 4,10},{ 7,13}},{{ 4,18},{ 7,21}},{{ 4,14},{ 7,17}}, + {{ 5,14},{ 8,17}},{{13,14},{16,17}},{{ 9,14},{12,17}}, + {{ 9,10},{12,13}},{{ 9,18},{12,21}},{{ 9,14},{12,17}}, + {{10,14},{13,17}},{{18,14},{21,17}},{{14,14},{17,17}}, + {{14,10},{17,13}},{{14,18},{17,21}},{{14,14},{17,17}}, + {{15,14},{18,17}},{{23,14},{26,17}},{{19,14},{22,17}}, + {{19,10},{22,13}},{{19,18},{22,21}},{{19,14},{22,17}}, + {{20,14},{23,17}},{{28,14},{31,17}},{{24,14},{27,17}}, + {{24,10},{27,13}},{{24,18},{27,21}},{{24,14},{27,17}}, + {{ 0,19},{ 3,22}},{{ 8,19},{11,22}},{{ 4,19},{ 7,22}}, + {{ 4,15},{ 7,18}},{{ 4,23},{ 7,26}},{{ 4,19},{ 7,22}}, + {{ 5,19},{ 8,22}},{{13,19},{16,22}},{{ 9,19},{12,22}}, + {{ 9,15},{12,18}},{{ 9,23},{12,26}},{{ 9,19},{12,22}}, + {{10,19},{13,22}},{{18,19},{21,22}},{{14,19},{17,22}}, + {{14,15},{17,18}},{{14,23},{17,26}},{{14,19},{17,22}}, + {{15,19},{18,22}},{{23,19},{26,22}},{{19,19},{22,22}}, + {{19,15},{22,18}},{{19,23},{22,26}},{{19,19},{22,22}}, + {{20,19},{23,22}},{{28,19},{31,22}},{{24,19},{27,22}}, + {{24,15},{27,18}},{{24,23},{27,26}},{{24,19},{27,22}}, + {{ 0,24},{ 3,27}},{{ 8,24},{11,27}},{{ 4,24},{ 7,27}}, + {{ 4,20},{ 7,23}},{{ 4,28},{ 7,31}},{{ 4,24},{ 7,27}}, + {{ 5,24},{ 8,27}},{{13,24},{16,27}},{{ 9,24},{12,27}}, + {{ 9,20},{12,23}},{{ 9,28},{12,31}},{{ 9,24},{12,27}}, + {{10,24},{13,27}},{{18,24},{21,27}},{{14,24},{17,27}}, + {{14,20},{17,23}},{{14,28},{17,31}},{{14,24},{17,27}}, + {{15,24},{18,27}},{{23,24},{26,27}},{{19,24},{22,27}}, + {{19,20},{22,23}},{{19,28},{22,31}},{{19,24},{22,27}}, + {{20,24},{23,27}},{{28,24},{31,27}},{{24,24},{27,27}}, + {{24,20},{27,23}},{{24,28},{27,31}},{{24,24},{27,27}} +}; +static const ElemCat elem_d7 = { 0, 2, 3, 50, elem_d7_data }; + +static const Block elem_d8_data[] = { + {{ 0, 0},{ 7, 3}},{{ 0, 4},{ 7, 7}}, + {{ 8, 0},{11, 7}},{{12, 0},{15, 7}}, + {{ 0, 8},{ 3,15}},{{ 4, 8},{ 7,15}}, + {{ 8, 8},{15,11}},{{ 8,12},{15,15}}, + {{16, 0},{19, 7}},{{20, 0},{23, 7}}, + {{24, 0},{31, 3}},{{24, 4},{31, 7}}, + {{16, 8},{23,11}},{{16,12},{23,15}}, + {{24, 8},{27,15}},{{28, 8},{31,15}}, + {{ 0,16},{ 3,23}},{{ 4,16},{ 7,23}}, + {{ 8,16},{15,19}},{{ 8,20},{15,23}}, + {{ 0,24},{ 7,27}},{{ 0,28},{ 7,31}}, + {{ 8,24},{11,31}},{{12,24},{15,31}}, + {{16,16},{23,19}},{{16,20},{23,23}}, + {{24,16},{27,23}},{{28,16},{31,23}}, + {{16,24},{19,31}},{{20,24},{23,31}}, + {{24,24},{31,27}},{{24,28},{31,31}}, + {{ 0, 0},{ 7,15}},{{ 8, 0},{15,15}}, + {{16, 0},{31, 7}},{{16, 8},{31,15}}, + {{ 0,16},{15,23}},{{ 0,24},{15,31}}, + {{16,16},{23,31}},{{24,16},{31,31}} +}; +static const ElemCat elem_d8 = { 0, 1, 2, 20, elem_d8_data }; + +static const ElemCat* elements[ELEMENT_COUNT] = { &elem_a1, &elem_a2, + &elem_d1, &elem_d2, &elem_d3, &elem_d4, + &elem_d5, &elem_d6, &elem_d7, &elem_d8 }; +#endif /* AVFILTER_SIGNATURE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ssim.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ssim.h new file mode 100644 index 00000000..a6a41aab --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/ssim.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_SSIM_H +#define AVFILTER_SSIM_H + +#include +#include + +typedef struct SSIMDSPContext { + void (*ssim_4x4_line)(const uint8_t *buf, ptrdiff_t buf_stride, + const uint8_t *ref, ptrdiff_t ref_stride, + int (*sums)[4], int w); + double (*ssim_end_line)(const int (*sum0)[4], const int (*sum1)[4], int w); +} SSIMDSPContext; + +void ff_ssim_init_x86(SSIMDSPContext *dsp); + +#endif /* AVFILTER_SSIM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/stereo3d.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/stereo3d.h new file mode 100644 index 00000000..54611d12 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/stereo3d.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_STEREO3D_H +#define AVFILTER_STEREO3D_H + +#include +#include + +typedef struct Stereo3DDSPContext { + void (*anaglyph)(uint8_t *dst, uint8_t *lsrc, uint8_t *rsrc, + ptrdiff_t dst_linesize, ptrdiff_t l_linesize, ptrdiff_t r_linesize, + int width, int height, + const int *ana_matrix_r, const int *ana_matrix_g, const int *ana_matrix_b); +} Stereo3DDSPContext; + +void ff_stereo3d_init_x86(Stereo3DDSPContext *dsp); + +#endif /* AVFILTER_STEREO3D_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/thread.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/thread.h new file mode 100644 index 00000000..c709f17a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/thread.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_THREAD_H +#define AVFILTER_THREAD_H + +#include "avfilter.h" + +int ff_graph_thread_init(AVFilterGraph *graph); + +void ff_graph_thread_free(AVFilterGraph *graph); + +#endif /* AVFILTER_THREAD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/threshold.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/threshold.h new file mode 100644 index 00000000..775a9f9c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/threshold.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2016 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_THRESHOLD_H +#define AVFILTER_THRESHOLD_H + +#include "avfilter.h" +#include "framesync.h" + +typedef struct ThresholdContext { + const AVClass *class; + + int depth; + int planes; + int bpc; + + int nb_planes; + int width[4], height[4]; + + void (*threshold)(const uint8_t *in, const uint8_t *threshold, + const uint8_t *min, const uint8_t *max, + uint8_t *out, + ptrdiff_t ilinesize, ptrdiff_t tlinesize, + ptrdiff_t flinesize, ptrdiff_t slinesize, + ptrdiff_t olinesize, + int w, int h); + + AVFrame *frames[4]; + FFFrameSync fs; +} ThresholdContext; + +void ff_threshold_init(ThresholdContext *s); +void ff_threshold_init_x86(ThresholdContext *s); + +#endif /* AVFILTER_THRESHOLD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/tinterlace.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/tinterlace.h new file mode 100644 index 00000000..020887ff --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/tinterlace.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2011 Stefano Sabatini + * Copyright (c) 2010 Baptiste Coudurier + * Copyright (c) 2003 Michael Zucchi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * @file + * temporal field interlace filter, ported from MPlayer/libmpcodecs + */ +#ifndef AVFILTER_TINTERLACE_H +#define AVFILTER_TINTERLACE_H + +#include "libavutil/bswap.h" +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "drawutils.h" +#include "avfilter.h" + +#define TINTERLACE_FLAG_VLPF 01 +#define TINTERLACE_FLAG_CVLPF 2 +#define TINTERLACE_FLAG_EXACT_TB 4 +#define TINTERLACE_FLAG_BYPASS_IL 8 + +enum VLPFilter { + VLPF_OFF = 0, + VLPF_LIN = 1, + VLPF_CMP = 2, +}; + +enum TInterlaceMode { + MODE_MERGE = 0, + MODE_DROP_EVEN, + MODE_DROP_ODD, + MODE_PAD, + MODE_INTERLEAVE_TOP, + MODE_INTERLEAVE_BOTTOM, + MODE_INTERLACEX2, + MODE_MERGEX2, + MODE_NB, +}; + +enum InterlaceScanMode { + MODE_TFF = 0, + MODE_BFF, +}; + +typedef struct TInterlaceContext { + const AVClass *class; + int mode; ///< TInterlaceMode, interlace mode selected + AVRational preout_time_base; + int flags; ///< flags affecting interlacing algorithm + int lowpass; ///< legacy interlace filter lowpass mode + int frame; ///< number of the output frame + int vsub; ///< chroma vertical subsampling + AVFrame *cur; + AVFrame *next; + uint8_t *black_data[4]; ///< buffer used to fill padded lines + int black_linesize[4]; + FFDrawContext draw; + FFDrawColor color; + const AVPixFmtDescriptor *csp; + void (*lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp, + ptrdiff_t mref, ptrdiff_t pref, int clip_max); +} TInterlaceContext; + +void ff_tinterlace_init_x86(TInterlaceContext *interlace); + +#endif /* AVFILTER_TINTERLACE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transform.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transform.h new file mode 100644 index 00000000..9b0c19ce --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transform.h @@ -0,0 +1,135 @@ +/* + * Copyright (C) 2010 Georg Martius + * Copyright (C) 2010 Daniel G. Taylor + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_TRANSFORM_H +#define AVFILTER_TRANSFORM_H + +#include + +/** + * @file + * transform input video + * + * All matrices are defined as a single 9-item block of contiguous memory. For + * example, the identity matrix would be: + * + * float *matrix = {1, 0, 0, + * 0, 1, 0, + * 0, 0, 1}; + */ + +enum InterpolateMethod { + INTERPOLATE_NEAREST, //< Nearest-neighbor (fast) + INTERPOLATE_BILINEAR, //< Bilinear + INTERPOLATE_BIQUADRATIC, //< Biquadratic (best) + INTERPOLATE_COUNT, //< Number of interpolation methods +}; + +// Shortcuts for the fastest and best interpolation methods +#define INTERPOLATE_DEFAULT INTERPOLATE_BILINEAR +#define INTERPOLATE_FAST INTERPOLATE_NEAREST +#define INTERPOLATE_BEST INTERPOLATE_BIQUADRATIC + +enum FillMethod { + FILL_BLANK, //< Fill zeroes at blank locations + FILL_ORIGINAL, //< Original image at blank locations + FILL_CLAMP, //< Extruded edge value at blank locations + FILL_MIRROR, //< Mirrored edge at blank locations + FILL_COUNT, //< Number of edge fill methods +}; + +// Shortcuts for fill methods +#define FILL_DEFAULT FILL_ORIGINAL + +/** + * Get an affine transformation matrix from given translation, rotation, and + * zoom factors. The matrix will look like: + * + * [ scale_x * cos(angle), -sin(angle), x_shift, + * sin(angle), scale_y * cos(angle), y_shift, + * 0, 0, 1 ] + * + * @param x_shift horizontal translation + * @param y_shift vertical translation + * @param angle rotation in radians + * @param scale_x x scale percent (1.0 = 100%) + * @param scale_y y scale percent (1.0 = 100%) + * @param matrix 9-item affine transformation matrix + */ +void ff_get_matrix( + float x_shift, + float y_shift, + float angle, + float scale_x, + float scale_y, + float *matrix +); + +/** + * Add two matrices together. result = m1 + m2. + * + * @param m1 9-item transformation matrix + * @param m2 9-item transformation matrix + * @param result 9-item transformation matrix + */ +void avfilter_add_matrix(const float *m1, const float *m2, float *result); + +/** + * Subtract one matrix from another. result = m1 - m2. + * + * @param m1 9-item transformation matrix + * @param m2 9-item transformation matrix + * @param result 9-item transformation matrix + */ +void avfilter_sub_matrix(const float *m1, const float *m2, float *result); + +/** + * Multiply a matrix by a scalar value. result = m1 * scalar. + * + * @param m1 9-item transformation matrix + * @param scalar a number + * @param result 9-item transformation matrix + */ +void avfilter_mul_matrix(const float *m1, float scalar, float *result); + +/** + * Do an affine transformation with the given interpolation method. This + * multiplies each vector [x,y,1] by the matrix and then interpolates to + * get the final value. + * + * @param src source image + * @param dst destination image + * @param src_stride source image line size in bytes + * @param dst_stride destination image line size in bytes + * @param width image width in pixels + * @param height image height in pixels + * @param matrix 9-item affine transformation matrix + * @param interpolate pixel interpolation method + * @param fill edge fill method + * @return negative on error + */ +int avfilter_transform(const uint8_t *src, uint8_t *dst, + int src_stride, int dst_stride, + int width, int height, const float *matrix, + enum InterpolateMethod interpolate, + enum FillMethod fill); + +#endif /* AVFILTER_TRANSFORM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transpose.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transpose.h new file mode 100644 index 00000000..4e850ef0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/transpose.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFILTER_TRANSPOSE_H +#define AVFILTER_TRANSPOSE_H + +#include +#include + +enum PassthroughType { + TRANSPOSE_PT_TYPE_NONE, + TRANSPOSE_PT_TYPE_LANDSCAPE, + TRANSPOSE_PT_TYPE_PORTRAIT, +}; + +enum TransposeDir { + TRANSPOSE_CCLOCK_FLIP, + TRANSPOSE_CLOCK, + TRANSPOSE_CCLOCK, + TRANSPOSE_CLOCK_FLIP, + TRANSPOSE_REVERSAL, // rotate by half-turn + TRANSPOSE_HFLIP, + TRANSPOSE_VFLIP, +}; + +typedef struct TransVtable { + void (*transpose_8x8)(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize); + void (*transpose_block)(uint8_t *src, ptrdiff_t src_linesize, + uint8_t *dst, ptrdiff_t dst_linesize, + int w, int h); +} TransVtable; + +void ff_transpose_init_x86(TransVtable *v, int pixstep); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/unsharp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/unsharp.h new file mode 100644 index 00000000..a60b30f3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/unsharp.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2013 Wei Gao + * Copyright (C) 2013 Lenny Wang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_UNSHARP_H +#define AVFILTER_UNSHARP_H + +#include "config.h" +#include "avfilter.h" + +#define MIN_MATRIX_SIZE 3 +#define MAX_MATRIX_SIZE 63 + + +typedef struct UnsharpFilterParam { + int msize_x; ///< matrix width + int msize_y; ///< matrix height + int amount; ///< effect amount + int steps_x; ///< horizontal step count + int steps_y; ///< vertical step count + int scalebits; ///< bits to shift pixel + int32_t halfscale; ///< amount to add to pixel + uint32_t *sr; ///< finite state machine storage within a row + uint32_t **sc; ///< finite state machine storage across rows +} UnsharpFilterParam; + +typedef struct UnsharpContext { + const AVClass *class; + int lmsize_x, lmsize_y, cmsize_x, cmsize_y; + float lamount, camount; + UnsharpFilterParam luma; ///< luma parameters (width, height, amount) + UnsharpFilterParam chroma; ///< chroma parameters (width, height, amount) + int hsub, vsub; + int nb_threads; + int opencl; + int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out); +} UnsharpContext; + +#endif /* AVFILTER_UNSHARP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/v360.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/v360.h new file mode 100644 index 00000000..e9a47593 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/v360.h @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2019 Eugene Lyapustin + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_V360_H +#define AVFILTER_V360_H +#include "avfilter.h" + +enum StereoFormats { + STEREO_2D, + STEREO_SBS, + STEREO_TB, + NB_STEREO_FMTS, +}; + +enum Projections { + EQUIRECTANGULAR, + CUBEMAP_3_2, + CUBEMAP_6_1, + EQUIANGULAR, + FLAT, + DUAL_FISHEYE, + BARREL, + CUBEMAP_1_6, + STEREOGRAPHIC, + MERCATOR, + BALL, + HAMMER, + SINUSOIDAL, + FISHEYE, + PANNINI, + CYLINDRICAL, + PERSPECTIVE, + TETRAHEDRON, + BARREL_SPLIT, + TSPYRAMID, + HEQUIRECTANGULAR, + NB_PROJECTIONS, +}; + +enum InterpMethod { + NEAREST, + BILINEAR, + LAGRANGE9, + BICUBIC, + LANCZOS, + SPLINE16, + GAUSSIAN, + NB_INTERP_METHODS, +}; + +enum Faces { + TOP_LEFT, + TOP_MIDDLE, + TOP_RIGHT, + BOTTOM_LEFT, + BOTTOM_MIDDLE, + BOTTOM_RIGHT, + NB_FACES, +}; + +enum Direction { + RIGHT, ///< Axis +X + LEFT, ///< Axis -X + UP, ///< Axis +Y + DOWN, ///< Axis -Y + FRONT, ///< Axis -Z + BACK, ///< Axis +Z + NB_DIRECTIONS, +}; + +enum Rotation { + ROT_0, + ROT_90, + ROT_180, + ROT_270, + NB_ROTATIONS, +}; + +enum RotationOrder { + YAW, + PITCH, + ROLL, + NB_RORDERS, +}; + +typedef struct XYRemap { + int16_t u[4][4]; + int16_t v[4][4]; + float ker[4][4]; +} XYRemap; + +typedef struct V360Context { + const AVClass *class; + int in, out; + int interp; + int alpha; + int width, height; + char *in_forder; + char *out_forder; + char *in_frot; + char *out_frot; + char *rorder; + + int in_cubemap_face_order[6]; + int out_cubemap_direction_order[6]; + int in_cubemap_face_rotation[6]; + int out_cubemap_face_rotation[6]; + int rotation_order[3]; + + int in_stereo, out_stereo; + + float in_pad, out_pad; + int fin_pad, fout_pad; + + float yaw, pitch, roll; + + int ih_flip, iv_flip; + int h_flip, v_flip, d_flip; + int in_transpose, out_transpose; + + float h_fov, v_fov, d_fov; + float ih_fov, iv_fov, id_fov; + float flat_range[2]; + float iflat_range[2]; + + float rot_mat[3][3]; + + float input_mirror_modifier[2]; + float output_mirror_modifier[3]; + + int in_width, in_height; + int out_width, out_height; + + int pr_width[4], pr_height[4]; + + int in_offset_w[4], in_offset_h[4]; + int out_offset_w[4], out_offset_h[4]; + + int planewidth[4], planeheight[4]; + int inplanewidth[4], inplaneheight[4]; + int uv_linesize[4]; + int nb_planes; + int nb_allocated; + int elements; + int mask_size; + int max_value; + + int16_t *u[2], *v[2]; + int16_t *ker[2]; + uint8_t *mask; + unsigned map[4]; + + int (*in_transform)(const struct V360Context *s, + const float *vec, int width, int height, + int16_t us[4][4], int16_t vs[4][4], float *du, float *dv); + + int (*out_transform)(const struct V360Context *s, + int i, int j, int width, int height, + float *vec); + + void (*calculate_kernel)(float du, float dv, const XYRemap *rmap, + int16_t *u, int16_t *v, int16_t *ker); + + int (*remap_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); + + void (*remap_line)(uint8_t *dst, int width, const uint8_t *const src, ptrdiff_t in_linesize, + const int16_t *const u, const int16_t *const v, const int16_t *const ker); +} V360Context; + +void ff_v360_init(V360Context *s, int depth); +void ff_v360_init_x86(V360Context *s, int depth); + +#endif /* AVFILTER_V360_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vaapi_vpp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vaapi_vpp.h new file mode 100644 index 00000000..c3da9171 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vaapi_vpp.h @@ -0,0 +1,86 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VAAPI_VPP_H +#define AVFILTER_VAAPI_VPP_H + +#include +#include + +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_vaapi.h" + +#include "avfilter.h" + +// ARGB black, for VAProcPipelineParameterBuffer.output_background_color. +#define VAAPI_VPP_BACKGROUND_BLACK 0xff000000 + +typedef struct VAAPIVPPContext { + const AVClass *class; + + AVVAAPIDeviceContext *hwctx; + AVBufferRef *device_ref; + + int valid_ids; + VAConfigID va_config; + VAContextID va_context; + + AVBufferRef *input_frames_ref; + AVHWFramesContext *input_frames; + VARectangle input_region; + + enum AVPixelFormat output_format; + int output_width; // computed width + int output_height; // computed height + + VABufferID filter_buffers[VAProcFilterCount]; + int nb_filter_buffers; + + int (*build_filter_params)(AVFilterContext *avctx); + + void (*pipeline_uninit)(AVFilterContext *avctx); +} VAAPIVPPContext; + +void ff_vaapi_vpp_ctx_init(AVFilterContext *avctx); + +void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx); + +int ff_vaapi_vpp_query_formats(AVFilterContext *avctx); + +void ff_vaapi_vpp_pipeline_uninit(AVFilterContext *avctx); + +int ff_vaapi_vpp_config_input(AVFilterLink *inlink); + +int ff_vaapi_vpp_config_output(AVFilterLink *outlink); + +int ff_vaapi_vpp_init_params(AVFilterContext *avctx, + VAProcPipelineParameterBuffer *params, + const AVFrame *input_frame, + AVFrame *output_frame); + +int ff_vaapi_vpp_make_param_buffers(AVFilterContext *avctx, + int type, + const void *data, + size_t size, + int count); + +int ff_vaapi_vpp_render_picture(AVFilterContext *avctx, + VAProcPipelineParameterBuffer *params, + AVFrame *output_frame); + +#endif /* AVFILTER_VAAPI_VPP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/version.h new file mode 100644 index 00000000..96b14d67 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/version.h @@ -0,0 +1,69 @@ +/* + * Version macros. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VERSION_H +#define AVFILTER_VERSION_H + +/** + * @file + * @ingroup lavfi + * Libavfilter version macros + */ + +#include "libavutil/version.h" + +#define LIBAVFILTER_VERSION_MAJOR 7 +#define LIBAVFILTER_VERSION_MINOR 85 +#define LIBAVFILTER_VERSION_MICRO 100 + + +#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ + LIBAVFILTER_VERSION_MINOR, \ + LIBAVFILTER_VERSION_MICRO) +#define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \ + LIBAVFILTER_VERSION_MINOR, \ + LIBAVFILTER_VERSION_MICRO) +#define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT + +#define LIBAVFILTER_IDENT "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + +#ifndef FF_API_OLD_FILTER_OPTS_ERROR +#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 8) +#endif +#ifndef FF_API_LAVR_OPTS +#define FF_API_LAVR_OPTS (LIBAVFILTER_VERSION_MAJOR < 8) +#endif +#ifndef FF_API_FILTER_GET_SET +#define FF_API_FILTER_GET_SET (LIBAVFILTER_VERSION_MAJOR < 8) +#endif +#ifndef FF_API_SWS_PARAM_OPTION +#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 8) +#endif +#ifndef FF_API_NEXT +#define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8) +#endif + +#endif /* AVFILTER_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_eq.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_eq.h new file mode 100644 index 00000000..cd0cd75f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_eq.h @@ -0,0 +1,106 @@ +/* + * Original MPlayer filters by Richard Felker, Hampa Hug, Daniel Moreno, + * and Michael Niedermeyer. + * + * Copyright (c) 2014 James Darnley + * Copyright (c) 2015 Arwa Arif + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef AVFILTER_EQ_H +#define AVFILTER_EQ_H + +#include "avfilter.h" +#include "libavutil/eval.h" + +static const char *const var_names[] = { + "n", // frame count + "pos", // frame position + "r", // frame rate + "t", // timestamp expressed in seconds + NULL +}; + +enum var_name { + VAR_N, + VAR_POS, + VAR_R, + VAR_T, + VAR_NB +}; + +typedef struct EQParameters { + void (*adjust)(struct EQParameters *eq, uint8_t *dst, int dst_stride, + const uint8_t *src, int src_stride, int w, int h); + + uint8_t lut[256]; + + double brightness, contrast, gamma, gamma_weight; + int lut_clean; + +} EQParameters; + +typedef struct EQContext { + const AVClass *class; + + EQParameters param[3]; + + char *contrast_expr; + AVExpr *contrast_pexpr; + double contrast; + + char *brightness_expr; + AVExpr *brightness_pexpr; + double brightness; + + char *saturation_expr; + AVExpr *saturation_pexpr; + double saturation; + + char *gamma_expr; + AVExpr *gamma_pexpr; + double gamma; + + char *gamma_weight_expr; + AVExpr *gamma_weight_pexpr; + double gamma_weight; + + char *gamma_r_expr; + AVExpr *gamma_r_pexpr; + double gamma_r; + + char *gamma_g_expr; + AVExpr *gamma_g_pexpr; + double gamma_g; + + char *gamma_b_expr; + AVExpr *gamma_b_pexpr; + double gamma_b; + + double var_values[VAR_NB]; + + void (*process)(struct EQParameters *par, uint8_t *dst, int dst_stride, + const uint8_t *src, int src_stride, int w, int h); + + enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } eval_mode; +} EQContext; + +void ff_eq_init(EQContext *eq); +void ff_eq_init_x86(EQContext *eq); + +#endif /* AVFILTER_EQ_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_fspp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_fspp.h new file mode 100644 index 00000000..73d8c7c7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_fspp.h @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2003 Michael Niedermayer + * Copyright (C) 2005 Nikolaj Poroshin + * Copyright (c) 2014 Arwa Arif + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef AVFILTER_FSPP_H +#define AVFILTER_FSPP_H + +#include "avfilter.h" + +#define BLOCKSZ 12 +#define MAX_LEVEL 5 + +#define DCTSIZE 8 +#define DCTSIZE_S "8" + +#define FIX(x,s) ((x) * (1 << s) + 0.5) + +#define MULTIPLY16H(x,k) (((x) * (k)) >> 16) +#define THRESHOLD(r,x,t) \ + if(((unsigned)((x) + t)) > t * 2) r = (x); \ + else r = 0; +#define DESCALE(x,n) (((x) + (1 << ((n) - 1))) >> n) + +typedef int32_t int_simd16_t; +static const int16_t FIX_0_382683433 = FIX(0.382683433, 14); +static const int16_t FIX_0_541196100 = FIX(0.541196100, 14); +static const int16_t FIX_0_707106781 = FIX(M_SQRT1_2 , 14); +static const int16_t FIX_1_306562965 = FIX(1.306562965, 14); +static const int16_t FIX_1_414213562_A = FIX(M_SQRT2 , 14); +static const int16_t FIX_1_847759065 = FIX(1.847759065, 13); +static const int16_t FIX_2_613125930 = FIX(-2.613125930, 13); +static const int16_t FIX_1_414213562 = FIX(M_SQRT2 , 13); +static const int16_t FIX_1_082392200 = FIX(1.082392200, 13); + +typedef struct FSPPContext { + AVClass *class; + uint64_t threshold_mtx_noq[8 * 2]; + uint64_t threshold_mtx[8 * 2]; //used in both C & MMX (& later SSE2) versions + + int log2_count; + int strength; + int hsub; + int vsub; + int temp_stride; + int qp; + int qscale_type; + int prev_q; + uint8_t *src; + int16_t *temp; + uint8_t *non_b_qp_table; + int non_b_qp_alloc_size; + int use_bframe_qp; + + void (*store_slice)(uint8_t *dst, int16_t *src, + ptrdiff_t dst_stride, ptrdiff_t src_stride, + ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale); + + void (*store_slice2)(uint8_t *dst, int16_t *src, + ptrdiff_t dst_stride, ptrdiff_t src_stride, + ptrdiff_t width, ptrdiff_t height, ptrdiff_t log2_scale); + + void (*mul_thrmat)(int16_t *thr_adr_noq, int16_t *thr_adr, int q); + + void (*column_fidct)(int16_t *thr_adr, int16_t *data, + int16_t *output, int cnt); + + void (*row_idct)(int16_t *workspace, int16_t *output_adr, + ptrdiff_t output_stride, int cnt); + + void (*row_fdct)(int16_t *data, const uint8_t *pixels, + ptrdiff_t line_size, int cnt); + +} FSPPContext; + +void ff_fspp_init_x86(FSPPContext *fspp); + +#endif /* AVFILTER_FSPP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_hqdn3d.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_hqdn3d.h new file mode 100644 index 00000000..3279bbcc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_hqdn3d.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2003 Daniel Moreno + * Copyright (c) 2010 Baptiste Coudurier + * Copyright (c) 2012 Loren Merritt + * + * This file is part of FFmpeg, ported from MPlayer. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef AVFILTER_HQDN3D_H +#define AVFILTER_HQDN3D_H + +#include +#include + +#include "libavutil/opt.h" + +typedef struct HQDN3DContext { + const AVClass *class; + int16_t *coefs[4]; + uint16_t *line[3]; + uint16_t *frame_prev[3]; + double strength[4]; + int hsub, vsub; + int depth; + void (*denoise_row[17])(uint8_t *src, uint8_t *dst, uint16_t *line_ant, uint16_t *frame_ant, ptrdiff_t w, int16_t *spatial, int16_t *temporal); +} HQDN3DContext; + +#define LUMA_SPATIAL 0 +#define LUMA_TMP 1 +#define CHROMA_SPATIAL 2 +#define CHROMA_TMP 3 + +void ff_hqdn3d_init_x86(HQDN3DContext *hqdn3d); + +#endif /* AVFILTER_HQDN3D_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_idet.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_idet.h new file mode 100644 index 00000000..afd89470 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_idet.h @@ -0,0 +1,80 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_IDET_H +#define AVFILTER_IDET_H + +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +#define HIST_SIZE 4 + +typedef int (*ff_idet_filter_func)(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w); + +typedef enum { + TFF, + BFF, + PROGRESSIVE, + UNDETERMINED, +} Type; + +typedef enum { + REPEAT_NONE, + REPEAT_TOP, + REPEAT_BOTTOM, +} RepeatedField; + +typedef struct IDETContext { + const AVClass *class; + float interlace_threshold; + float progressive_threshold; + float repeat_threshold; + float half_life; + uint64_t decay_coefficient; + + Type last_type; + + uint64_t repeats[3]; + uint64_t prestat[4]; + uint64_t poststat[4]; + uint64_t total_repeats[3]; + uint64_t total_prestat[4]; + uint64_t total_poststat[4]; + + uint8_t history[HIST_SIZE]; + + AVFrame *cur; + AVFrame *next; + AVFrame *prev; + ff_idet_filter_func filter_line; + + int interlaced_flag_accuracy; + int analyze_interlaced_flag; + int analyze_interlaced_flag_done; + + const AVPixFmtDescriptor *csp; + int eof; +} IDETContext; + +void ff_idet_init_x86(IDETContext *idet, int for_16b); + +/* main fall-back for left-over */ +int ff_idet_filter_line_c(const uint8_t *a, const uint8_t *b, const uint8_t *c, int w); +int ff_idet_filter_line_c_16bit(const uint16_t *a, const uint16_t *b, const uint16_t *c, int w); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_nlmeans.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_nlmeans.h new file mode 100644 index 00000000..0a9aab29 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_nlmeans.h @@ -0,0 +1,35 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_NLMEANS_H +#define AVFILTER_NLMEANS_H + +#include +#include + +typedef struct NLMeansDSPContext { + void (*compute_safe_ssd_integral_image)(uint32_t *dst, ptrdiff_t dst_linesize_32, + const uint8_t *s1, ptrdiff_t linesize1, + const uint8_t *s2, ptrdiff_t linesize2, + int w, int h); +} NLMeansDSPContext; + +void ff_nlmeans_init(NLMeansDSPContext *dsp); +void ff_nlmeans_init_aarch64(NLMeansDSPContext *dsp); + +#endif /* AVFILTER_NLMEANS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_noise.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_noise.h new file mode 100644 index 00000000..92998e54 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_noise.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002 Michael Niedermayer + * Copyright (c) 2013 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_NOISE_H +#define AVFILTER_NOISE_H + +#include "libavutil/lfg.h" +#include "avfilter.h" + +#define MAX_NOISE 5120 +#define MAX_SHIFT 1024 +#define MAX_RES (MAX_NOISE-MAX_SHIFT) + +#define NOISE_UNIFORM 1 +#define NOISE_TEMPORAL 2 +#define NOISE_AVERAGED 8 +#define NOISE_PATTERN 16 + +typedef struct FilterParams { + int strength; + unsigned flags; + AVLFG lfg; + int seed; + int8_t *noise; + int8_t *prev_shift[MAX_RES][3]; + int rand_shift[MAX_RES]; + int rand_shift_init; +} FilterParams; + +typedef struct NoiseContext { + const AVClass *class; + int nb_planes; + int bytewidth[4]; + int height[4]; + FilterParams all; + FilterParams param[4]; + void (*line_noise)(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift); + void (*line_noise_avg)(uint8_t *dst, const uint8_t *src, int len, const int8_t * const *shift); +} NoiseContext; + +void ff_line_noise_c(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift); +void ff_line_noise_avg_c(uint8_t *dst, const uint8_t *src, int len, const int8_t * const *shift); + +void ff_noise_init_x86(NoiseContext *n); + +#endif /* AVFILTER_NOISE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_overlay.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_overlay.h new file mode 100644 index 00000000..98b06eaa --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_overlay.h @@ -0,0 +1,86 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_OVERLAY_H +#define AVFILTER_OVERLAY_H + +#include "libavutil/eval.h" +#include "libavutil/pixdesc.h" +#include "framesync.h" +#include "avfilter.h" + +enum var_name { + VAR_MAIN_W, VAR_MW, + VAR_MAIN_H, VAR_MH, + VAR_OVERLAY_W, VAR_OW, + VAR_OVERLAY_H, VAR_OH, + VAR_HSUB, + VAR_VSUB, + VAR_X, + VAR_Y, + VAR_N, + VAR_POS, + VAR_T, + VAR_VARS_NB +}; + +enum OverlayFormat { + OVERLAY_FORMAT_YUV420, + OVERLAY_FORMAT_YUV422, + OVERLAY_FORMAT_YUV444, + OVERLAY_FORMAT_RGB, + OVERLAY_FORMAT_GBRP, + OVERLAY_FORMAT_AUTO, + OVERLAY_FORMAT_NB +}; + +typedef struct OverlayContext { + const AVClass *class; + int x, y; ///< position of overlaid picture + + uint8_t main_is_packed_rgb; + uint8_t main_rgba_map[4]; + uint8_t main_has_alpha; + uint8_t overlay_is_packed_rgb; + uint8_t overlay_rgba_map[4]; + uint8_t overlay_has_alpha; + int format; ///< OverlayFormat + int alpha_format; + int eval_mode; ///< EvalMode + + FFFrameSync fs; + + int main_pix_step[4]; ///< steps per pixel for each plane of the main output + int overlay_pix_step[4]; ///< steps per pixel for each plane of the overlay + int hsub, vsub; ///< chroma subsampling values + const AVPixFmtDescriptor *main_desc; ///< format descriptor for main input + + double var_values[VAR_VARS_NB]; + char *x_expr, *y_expr; + + AVExpr *x_pexpr, *y_pexpr; + + int (*blend_row[4])(uint8_t *d, uint8_t *da, uint8_t *s, uint8_t *a, int w, + ptrdiff_t alinesize); + int (*blend_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); +} OverlayContext; + +void ff_overlay_init_x86(OverlayContext *s, int format, int pix_format, + int alpha_format, int main_has_alpha); + +#endif /* AVFILTER_OVERLAY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pp7.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pp7.h new file mode 100644 index 00000000..9aa8d732 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pp7.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2005 Michael Niedermayer + * Copyright (c) 2014 Arwa Arif + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef AVFILTER_PP7_H +#define AVFILTER_PP7_H + +#include "avfilter.h" + +typedef struct PP7Context { + AVClass *class; + int thres2[99][16]; + + int qp; + int mode; + int qscale_type; + int hsub; + int vsub; + int temp_stride; + uint8_t *src; + + int (*requantize)(struct PP7Context *p, int16_t *src, int qp); + void (*dctB)(int16_t *dst, int16_t *src); + +} PP7Context; + +void ff_pp7_init_x86(PP7Context *pp7); + +#endif /* AVFILTER_PP7_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pullup.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pullup.h new file mode 100644 index 00000000..8f593351 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_pullup.h @@ -0,0 +1,71 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_PULLUP_H +#define AVFILTER_PULLUP_H + +#include "avfilter.h" + +typedef struct PullupBuffer { + int lock[2]; + uint8_t *planes[4]; +} PullupBuffer; + +typedef struct PullupField { + int parity; + PullupBuffer *buffer; + unsigned flags; + int breaks; + int affinity; + int *diffs; + int *combs; + int *vars; + struct PullupField *prev, *next; +} PullupField; + +typedef struct PullupFrame { + int lock; + int length; + int parity; + PullupBuffer *ifields[4], *ofields[2]; + PullupBuffer *buffer; +} PullupFrame; + +typedef struct PullupContext { + const AVClass *class; + int junk_left, junk_right, junk_top, junk_bottom; + int metric_plane; + int strict_breaks; + int strict_pairs; + int metric_w, metric_h, metric_length; + int metric_offset; + int nb_planes; + int planewidth[4]; + int planeheight[4]; + PullupField *first, *last, *head; + PullupBuffer buffers[10]; + PullupFrame frame; + + int (*diff)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*comb)(const uint8_t *a, const uint8_t *b, ptrdiff_t s); + int (*var )(const uint8_t *a, const uint8_t *b, ptrdiff_t s); +} PullupContext; + +void ff_pullup_init_x86(PullupContext *s); + +#endif /* AVFILTER_PULLUP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_spp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_spp.h new file mode 100644 index 00000000..879ed40f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vf_spp.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2003 Michael Niedermayer + * Copyright (c) 2013 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef AVFILTER_SPP_H +#define AVFILTER_SPP_H + +#include "libavcodec/avdct.h" +#include "avfilter.h" + +#define MAX_LEVEL 6 /* quality levels */ + +typedef struct SPPContext { + const AVClass *av_class; + + int log2_count; + int qp; + int mode; + int qscale_type; + int temp_linesize; + uint8_t *src; + uint16_t *temp; + AVDCT *dct; + int8_t *non_b_qp_table; + int non_b_qp_alloc_size; + int use_bframe_qp; + int hsub, vsub; + + void (*store_slice)(uint8_t *dst, const int16_t *src, + int dst_stride, int src_stride, + int width, int height, int log2_scale, + const uint8_t dither[8][8]); + + void (*requantize)(int16_t dst[64], const int16_t src[64], + int qp, const uint8_t *permutation); +} SPPContext; + +void ff_spp_init_x86(SPPContext *s); + +#endif /* AVFILTER_SPP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/video.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/video.h new file mode 100644 index 00000000..56c58d67 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/video.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2007 Bobby Bingham + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VIDEO_H +#define AVFILTER_VIDEO_H + +#include "avfilter.h" + +AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h); +AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h); + +/** + * Request a picture buffer with a specific set of permissions. + * + * @param link the output link to the filter from which the buffer will + * be requested + * @param w the minimum width of the buffer to allocate + * @param h the minimum height of the buffer to allocate + * @return A reference to the buffer. This must be unreferenced with + * avfilter_unref_buffer when you are finished with it. + */ +AVFrame *ff_get_video_buffer(AVFilterLink *link, int w, int h); + +#endif /* AVFILTER_VIDEO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vidstabutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vidstabutils.h new file mode 100644 index 00000000..c6d6cedb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vidstabutils.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2013 Georg Martius + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VIDSTABUTILS_H +#define AVFILTER_VIDSTABUTILS_H + +#include + +#include "avfilter.h" + +/* Conversion routines between libav* and vid.stab */ + +/** + * Converts an AVPixelFormat to a VSPixelFormat. + * + * @param[in] ctx AVFilterContext used for logging + * @param[in] pf AVPixelFormat + * @return a corresponding VSPixelFormat + */ +VSPixelFormat ff_av2vs_pixfmt(AVFilterContext *ctx, enum AVPixelFormat pf); + +/** + * Initialize libvidstab + * + * Sets the memory allocation functions and logging constants to corresponding + * av* versions. + */ +void ff_vs_init(void); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vmaf_motion.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vmaf_motion.h new file mode 100644 index 00000000..09984506 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vmaf_motion.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2017 Ronald S. Bultje + * Copyright (c) 2017 Ashish Pratap Singh + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VMAF_MOTION_H +#define AVFILTER_VMAF_MOTION_H + +#include +#include +#include "video.h" + +typedef struct VMAFMotionDSPContext { + uint64_t (*sad)(const uint16_t *img1, const uint16_t *img2, int w, int h, + ptrdiff_t img1_stride, ptrdiff_t img2_stride); + void (*convolution_x)(const uint16_t *filter, int filt_w, const uint16_t *src, + uint16_t *dst, int w, int h, ptrdiff_t src_stride, + ptrdiff_t dst_stride); + void (*convolution_y)(const uint16_t *filter, int filt_w, const uint8_t *src, + uint16_t *dst, int w, int h, ptrdiff_t src_stride, + ptrdiff_t dst_stride); +} VMAFMotionDSPContext; + +void ff_vmafmotion_init_x86(VMAFMotionDSPContext *dsp); + +typedef struct VMAFMotionData { + uint16_t filter[5]; + int width; + int height; + ptrdiff_t stride; + uint16_t *blur_data[2 /* cur, prev */]; + uint16_t *temp_data; + double motion_sum; + uint64_t nb_frames; + VMAFMotionDSPContext vmafdsp; +} VMAFMotionData; + +int ff_vmafmotion_init(VMAFMotionData *data, int w, int h, enum AVPixelFormat fmt); +double ff_vmafmotion_process(VMAFMotionData *data, AVFrame *frame); +double ff_vmafmotion_uninit(VMAFMotionData *data); + +#endif /* AVFILTER_VMAF_MOTION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vulkan.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vulkan.h new file mode 100644 index 00000000..f9a4dc58 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/vulkan.h @@ -0,0 +1,376 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_VULKAN_H +#define AVFILTER_VULKAN_H + +#include "avfilter.h" +#include "libavutil/pixdesc.h" +#include "libavutil/bprint.h" +#include "libavutil/hwcontext.h" +#include "libavutil/hwcontext_vulkan.h" + +/* GLSL management macros */ +#define INDENT(N) INDENT_##N +#define INDENT_0 +#define INDENT_1 INDENT_0 " " +#define INDENT_2 INDENT_1 INDENT_1 +#define INDENT_3 INDENT_2 INDENT_1 +#define INDENT_4 INDENT_3 INDENT_1 +#define INDENT_5 INDENT_4 INDENT_1 +#define INDENT_6 INDENT_5 INDENT_1 +#define C(N, S) INDENT(N) #S "\n" +#define GLSLC(N, S) av_bprintf(&shd->src, C(N, S)) +#define GLSLA(...) av_bprintf(&shd->src, __VA_ARGS__) +#define GLSLF(N, S, ...) av_bprintf(&shd->src, C(N, S), __VA_ARGS__) +#define GLSLD(D) GLSLC(0, ); \ + av_bprint_append_data(&shd->src, D, strlen(D)); \ + GLSLC(0, ) + +/* Helper, pretty much every Vulkan return value needs to be checked */ +#define RET(x) \ + do { \ + if ((err = (x)) < 0) \ + goto fail; \ + } while (0) + +/* Gets the queues count for a single queue family */ +#define GET_QUEUE_COUNT(hwctx, graph, comp, tx) ( \ + graph ? hwctx->nb_graphics_queues : \ + comp ? (hwctx->nb_comp_queues ? \ + hwctx->nb_comp_queues : hwctx->nb_graphics_queues) : \ + tx ? (hwctx->nb_tx_queues ? hwctx->nb_tx_queues : \ + (hwctx->nb_comp_queues ? \ + hwctx->nb_comp_queues : hwctx->nb_graphics_queues)) : \ + 0 \ +) + +/* Useful for attaching immutable samplers to arrays */ +#define DUP_SAMPLER_ARRAY4(x) (VkSampler []){ x, x, x, x, } + +typedef struct SPIRVShader { + const char *name; /* Name for id/debugging purposes */ + AVBPrint src; + int local_size[3]; /* Compute shader workgroup sizes */ + VkPipelineShaderStageCreateInfo shader; +} SPIRVShader; + +typedef struct VulkanDescriptorSetBinding { + const char *name; + VkDescriptorType type; + const char *mem_layout; /* Storage images (rgba8, etc.) and buffers (std430, etc.) */ + const char *mem_quali; /* readonly, writeonly, etc. */ + const char *buf_content; /* For buffers */ + uint32_t dimensions; /* Needed for e.g. sampler%iD */ + uint32_t elems; /* 0 - scalar, 1 or more - vector */ + VkShaderStageFlags stages; + const VkSampler *samplers; /* Immutable samplers, length - #elems */ + void *updater; /* Pointer to VkDescriptor*Info */ +} VulkanDescriptorSetBinding; + +typedef struct FFVkBuffer { + VkBuffer buf; + VkDeviceMemory mem; + VkMemoryPropertyFlagBits flags; +} FFVkBuffer; + +typedef struct VulkanPipeline { + VkPipelineBindPoint bind_point; + + /* Contexts */ + VkPipelineLayout pipeline_layout; + VkPipeline pipeline; + + /* Shaders */ + SPIRVShader **shaders; + int shaders_num; + + /* Push consts */ + VkPushConstantRange *push_consts; + int push_consts_num; + + /* Descriptors */ + VkDescriptorSetLayout *desc_layout; + VkDescriptorPool desc_pool; + VkDescriptorSet *desc_set; + VkDescriptorUpdateTemplate *desc_template; + int desc_layout_num; + int descriptor_sets_num; + int pool_size_desc_num; + + /* Temporary, used to store data in between initialization stages */ + VkDescriptorUpdateTemplateCreateInfo *desc_template_info; + VkDescriptorPoolSize *pool_size_desc; +} VulkanPipeline; + +typedef struct FFVkQueueCtx { + VkFence fence; + VkQueue queue; + + /* Buffer dependencies */ + AVBufferRef **buf_deps; + int nb_buf_deps; + int buf_deps_alloc_size; + + /* Frame dependencies */ + AVFrame **frame_deps; + int nb_frame_deps; + int frame_deps_alloc_size; +} FFVkQueueCtx; + +typedef struct FFVkExecContext { + VkCommandPool pool; + VkCommandBuffer *bufs; + FFVkQueueCtx *queues; + + AVBufferRef ***deps; + int *nb_deps; + int *dep_alloc_size; + + VulkanPipeline *bound_pl; + + VkSemaphore *sem_wait; + int sem_wait_alloc; /* Allocated sem_wait */ + int sem_wait_cnt; + + VkPipelineStageFlagBits *sem_wait_dst; + int sem_wait_dst_alloc; /* Allocated sem_wait_dst */ + + VkSemaphore *sem_sig; + int sem_sig_alloc; /* Allocated sem_sig */ + int sem_sig_cnt; +} FFVkExecContext; + +typedef struct VulkanFilterContext { + const AVClass *class; + + AVBufferRef *device_ref; + AVBufferRef *frames_ref; /* For in-place filtering */ + AVHWDeviceContext *device; + AVVulkanDeviceContext *hwctx; + + /* State - mirrored with the exec ctx */ + int cur_queue_idx; + int queue_family_idx; + int queue_count; + + /* Properties */ + int output_width; + int output_height; + enum AVPixelFormat output_format; + enum AVPixelFormat input_format; + + /* Samplers */ + VkSampler **samplers; + int samplers_num; + + /* Exec contexts */ + FFVkExecContext **exec_ctx; + int exec_ctx_num; + + /* Pipelines (each can have 1 shader of each type) */ + VulkanPipeline **pipelines; + int pipelines_num; + + void *scratch; /* Scratch memory used only in functions */ + unsigned int scratch_size; +} VulkanFilterContext; + +/* Identity mapping - r = r, b = b, g = g, a = a */ +extern const VkComponentMapping ff_comp_identity_map; + +/** + * General lavfi IO functions + */ +int ff_vk_filter_query_formats (AVFilterContext *avctx); +int ff_vk_filter_init (AVFilterContext *avctx); +int ff_vk_filter_config_input (AVFilterLink *inlink); +int ff_vk_filter_config_output (AVFilterLink *outlink); +int ff_vk_filter_config_output_inplace(AVFilterLink *outlink); +void ff_vk_filter_uninit (AVFilterContext *avctx); + +/** + * Converts Vulkan return values to strings + */ +const char *ff_vk_ret2str(VkResult res); + +/** + * Returns 1 if the image is any sort of supported RGB + */ +int ff_vk_mt_is_np_rgb(enum AVPixelFormat pix_fmt); + +/** + * Gets the glsl format string for a pixel format + */ +const char *ff_vk_shader_rep_fmt(enum AVPixelFormat pixfmt); + +/** + * Create a Vulkan sampler, will be auto-freed in ff_vk_filter_uninit() + */ +VkSampler *ff_vk_init_sampler(AVFilterContext *avctx, int unnorm_coords, + VkFilter filt); + +/** + * Create an imageview. + * Guaranteed to remain alive until the queue submission has finished executing, + * and will be destroyed after that. + */ +int ff_vk_create_imageview(AVFilterContext *avctx, FFVkExecContext *e, + VkImageView *v, VkImage img, VkFormat fmt, + const VkComponentMapping map); + +/** + * Define a push constant for a given stage into a pipeline. + * Must be called before the pipeline layout has been initialized. + */ +int ff_vk_add_push_constant(AVFilterContext *avctx, VulkanPipeline *pl, + int offset, int size, VkShaderStageFlagBits stage); + +/** + * Inits a pipeline. Everything in it will be auto-freed when calling + * ff_vk_filter_uninit(). + */ +VulkanPipeline *ff_vk_create_pipeline(AVFilterContext *avctx); + +/** + * Inits a shader for a specific pipeline. Will be auto-freed on uninit. + */ +SPIRVShader *ff_vk_init_shader(AVFilterContext *avctx, VulkanPipeline *pl, + const char *name, VkShaderStageFlags stage); + +/** + * Writes the workgroup size for a shader. + */ +void ff_vk_set_compute_shader_sizes(AVFilterContext *avctx, SPIRVShader *shd, + int local_size[3]); + +/** + * Adds a descriptor set to the shader and registers them in the pipeline. + */ +int ff_vk_add_descriptor_set(AVFilterContext *avctx, VulkanPipeline *pl, + SPIRVShader *shd, VulkanDescriptorSetBinding *desc, + int num, int only_print_to_shader); + +/** + * Compiles the shader, entrypoint must be set to "main". + */ +int ff_vk_compile_shader(AVFilterContext *avctx, SPIRVShader *shd, + const char *entrypoint); + +/** + * Initializes the pipeline layout after all shaders and descriptor sets have + * been finished. + */ +int ff_vk_init_pipeline_layout(AVFilterContext *avctx, VulkanPipeline *pl); + +/** + * Initializes a compute pipeline. Will pick the first shader with the + * COMPUTE flag set. + */ +int ff_vk_init_compute_pipeline(AVFilterContext *avctx, VulkanPipeline *pl); + +/** + * Updates a descriptor set via the updaters defined. + * Can be called immediately after pipeline creation, but must be called + * at least once before queue submission. + */ +void ff_vk_update_descriptor_set(AVFilterContext *avctx, VulkanPipeline *pl, + int set_id); + +/** + * Init an execution context for command recording and queue submission. + * WIll be auto-freed on uninit. + */ +int ff_vk_create_exec_ctx(AVFilterContext *avctx, FFVkExecContext **ctx); + +/** + * Begin recording to the command buffer. Previous execution must have been + * completed, which ff_vk_submit_exec_queue() will ensure. + */ +int ff_vk_start_exec_recording(AVFilterContext *avctx, FFVkExecContext *e); + +/** + * Add a command to bind the completed pipeline and its descriptor sets. + * Must be called after ff_vk_start_exec_recording() and before submission. + */ +void ff_vk_bind_pipeline_exec(AVFilterContext *avctx, FFVkExecContext *e, + VulkanPipeline *pl); + +/** + * Updates push constants. + * Must be called after binding a pipeline if any push constants were defined. + */ +void ff_vk_update_push_exec(AVFilterContext *avctx, FFVkExecContext *e, + VkShaderStageFlagBits stage, int offset, + size_t size, void *src); + +/** + * Gets the command buffer to use for this submission from the exe context. + */ +VkCommandBuffer ff_vk_get_exec_buf(AVFilterContext *avctx, FFVkExecContext *e); + +/** + * Adds a generic AVBufferRef as a queue depenency. + */ +int ff_vk_add_dep_exec_ctx(AVFilterContext *avctx, FFVkExecContext *e, + AVBufferRef **deps, int nb_deps); + +/** + * Discards all queue dependencies + */ +void ff_vk_discard_exec_deps(AVFilterContext *avctx, FFVkExecContext *e); + +/** + * Adds a frame as a queue dependency. This also manages semaphore signalling. + * Must be called before submission. + */ +int ff_vk_add_exec_dep(AVFilterContext *avctx, FFVkExecContext *e, + AVFrame *frame, VkPipelineStageFlagBits in_wait_dst_flag); + +/** + * Submits a command buffer to the queue for execution. + * Will block until execution has finished in order to simplify resource + * management. + */ +int ff_vk_submit_exec_queue(AVFilterContext *avctx, FFVkExecContext *e); + +/** + * Create a VkBuffer with the specified parameters. + */ +int ff_vk_create_buf(AVFilterContext *avctx, FFVkBuffer *buf, size_t size, + VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags); + +/** + * Maps the buffer to userspace. Set invalidate to 1 if reading the contents + * is necessary. + */ +int ff_vk_map_buffers(AVFilterContext *avctx, FFVkBuffer *buf, uint8_t *mem[], + int nb_buffers, int invalidate); + +/** + * Unmaps the buffer from userspace. Set flush to 1 to write and sync. + */ +int ff_vk_unmap_buffers(AVFilterContext *avctx, FFVkBuffer *buf, int nb_buffers, + int flush); + +/** + * Frees a buffer. + */ +void ff_vk_free_buf(AVFilterContext *avctx, FFVkBuffer *buf); + +#endif /* AVFILTER_VULKAN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/w3fdif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/w3fdif.h new file mode 100644 index 00000000..9c0b723a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/w3fdif.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_W3FDIF_H +#define AVFILTER_W3FDIF_H + +#include +#include + +typedef struct W3FDIFDSPContext { + void (*filter_simple_low)(int32_t *work_line, + uint8_t *in_lines_cur[2], + const int16_t *coef, int linesize); + void (*filter_complex_low)(int32_t *work_line, + uint8_t *in_lines_cur[4], + const int16_t *coef, int linesize); + void (*filter_simple_high)(int32_t *work_line, + uint8_t *in_lines_cur[3], + uint8_t *in_lines_adj[3], + const int16_t *coef, int linesize); + void (*filter_complex_high)(int32_t *work_line, + uint8_t *in_lines_cur[5], + uint8_t *in_lines_adj[5], + const int16_t *coef, int linesize); + void (*filter_scale)(uint8_t *out_pixel, const int32_t *work_pixel, + int linesize, int max); +} W3FDIFDSPContext; + +void ff_w3fdif_init_x86(W3FDIFDSPContext *dsp, int depth); + +#endif /* AVFILTER_W3FDIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/window_func.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/window_func.h new file mode 100644 index 00000000..494c5b1c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/window_func.h @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2015 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVFILTER_WINDOW_FUNC_H +#define AVFILTER_WINDOW_FUNC_H + +#include +#include "libavutil/avassert.h" + +enum WindowFunc { WFUNC_RECT, WFUNC_HANNING, WFUNC_HAMMING, WFUNC_BLACKMAN, + WFUNC_BARTLETT, WFUNC_WELCH, WFUNC_FLATTOP, + WFUNC_BHARRIS, WFUNC_BNUTTALL, WFUNC_SINE, WFUNC_NUTTALL, + WFUNC_BHANN, WFUNC_LANCZOS, WFUNC_GAUSS, WFUNC_TUKEY, + WFUNC_DOLPH, WFUNC_CAUCHY, WFUNC_PARZEN, WFUNC_POISSON, + WFUNC_BOHMAN, + NB_WFUNC }; + +static inline void generate_window_func(float *lut, int N, int win_func, + float *overlap) +{ + int n; + + switch (win_func) { + case WFUNC_RECT: + for (n = 0; n < N; n++) + lut[n] = 1.; + *overlap = 0.; + break; + case WFUNC_BARTLETT: + for (n = 0; n < N; n++) + lut[n] = 1.-fabs((n-(N-1)/2.)/((N-1)/2.)); + *overlap = 0.5; + break; + case WFUNC_HANNING: + for (n = 0; n < N; n++) + lut[n] = .5*(1-cos(2*M_PI*n/(N-1))); + *overlap = 0.5; + break; + case WFUNC_HAMMING: + for (n = 0; n < N; n++) + lut[n] = .54-.46*cos(2*M_PI*n/(N-1)); + *overlap = 0.5; + break; + case WFUNC_BLACKMAN: + for (n = 0; n < N; n++) + lut[n] = .42659-.49656*cos(2*M_PI*n/(N-1))+.076849*cos(4*M_PI*n/(N-1)); + *overlap = 0.661; + break; + case WFUNC_WELCH: + for (n = 0; n < N; n++) + lut[n] = 1.-(n-(N-1)/2.)/((N-1)/2.)*(n-(N-1)/2.)/((N-1)/2.); + *overlap = 0.293; + break; + case WFUNC_FLATTOP: + for (n = 0; n < N; n++) + lut[n] = 1.-1.985844164102*cos( 2*M_PI*n/(N-1))+1.791176438506*cos( 4*M_PI*n/(N-1))- + 1.282075284005*cos( 6*M_PI*n/(N-1))+0.667777530266*cos( 8*M_PI*n/(N-1))- + 0.240160796576*cos(10*M_PI*n/(N-1))+0.056656381764*cos(12*M_PI*n/(N-1))- + 0.008134974479*cos(14*M_PI*n/(N-1))+0.000624544650*cos(16*M_PI*n/(N-1))- + 0.000019808998*cos(18*M_PI*n/(N-1))+0.000000132974*cos(20*M_PI*n/(N-1)); + *overlap = 0.841; + break; + case WFUNC_BHARRIS: + for (n = 0; n < N; n++) + lut[n] = 0.35875-0.48829*cos(2*M_PI*n/(N-1))+0.14128*cos(4*M_PI*n/(N-1))-0.01168*cos(6*M_PI*n/(N-1)); + *overlap = 0.661; + break; + case WFUNC_BNUTTALL: + for (n = 0; n < N; n++) + lut[n] = 0.3635819-0.4891775*cos(2*M_PI*n/(N-1))+0.1365995*cos(4*M_PI*n/(N-1))-0.0106411*cos(6*M_PI*n/(N-1)); + *overlap = 0.661; + break; + case WFUNC_BHANN: + for (n = 0; n < N; n++) + lut[n] = 0.62-0.48*fabs(n/(double)(N-1)-.5)-0.38*cos(2*M_PI*n/(N-1)); + *overlap = 0.5; + break; + case WFUNC_SINE: + for (n = 0; n < N; n++) + lut[n] = sin(M_PI*n/(N-1)); + *overlap = 0.75; + break; + case WFUNC_NUTTALL: + for (n = 0; n < N; n++) + lut[n] = 0.355768-0.487396*cos(2*M_PI*n/(N-1))+0.144232*cos(4*M_PI*n/(N-1))-0.012604*cos(6*M_PI*n/(N-1)); + *overlap = 0.663; + break; + case WFUNC_LANCZOS: + #define SINC(x) (!(x)) ? 1 : sin(M_PI * (x))/(M_PI * (x)); + for (n = 0; n < N; n++) + lut[n] = SINC((2.*n)/(N-1)-1); + *overlap = 0.75; + break; + case WFUNC_GAUSS: + #define SQR(x) ((x)*(x)) + for (n = 0; n < N; n++) + lut[n] = exp(-0.5 * SQR((n-(N-1)/2)/(0.4*(N-1)/2.f))); + *overlap = 0.75; + break; + case WFUNC_TUKEY: + for (n = 0; n < N; n++) { + float M = (N-1)/2.; + + if (FFABS(n - M) >= 0.3 * M) { + lut[n] = 0.5 * (1 + cos((M_PI*(FFABS(n - M) - 0.3 * M))/((1 - 0.3) * M))); + } else { + lut[n] = 1; + } + } + *overlap = 0.33; + break; + case WFUNC_DOLPH: { + double b = cosh(7.6009022095419887 / (N-1)), sum, t, c, norm = 0; + int j; + for (c = 1 - 1 / (b*b), n = (N-1) / 2; n >= 0; --n) { + for (sum = !n, b = t = j = 1; j <= n && sum != t; b *= (n-j) * (1./j), ++j) + t = sum, sum += (b *= c * (N - n - j) * (1./j)); + sum /= (N - 1 - n), norm = norm ? norm : sum, sum /= norm; + lut[n] = sum; + lut[N - 1 - n] = sum; + } + *overlap = 0.5;} + break; + case WFUNC_CAUCHY: + for (n = 0; n < N; n++) { + double x = 2 * ((n / (double)(N - 1)) - .5); + + if (x <= -.5 || x >= .5) { + lut[n] = 0; + } else { + lut[n] = FFMIN(1, fabs(1/(1+4*16*x*x))); + } + } + *overlap = 0.75; + break; + case WFUNC_PARZEN: + for (n = 0; n < N; n++) { + double x = 2 * ((n / (double)(N - 1)) - .5); + + if (x > 0.25 && x <= 0.5) { + lut[n] = -2 * powf(-1 + 2 * x, 3); + } else if (x >= -.5 && x < -.25) { + lut[n] = 2 * powf(1 + 2 * x, 3); + } else if (x >= -.25 && x < 0) { + lut[n] = 1 - 24 * x * x - 48 * x * x * x; + } else if (x >= 0 && x <= .25) { + lut[n] = 1 - 24 * x * x + 48 * x * x * x; + } else { + lut[n] = 0; + } + } + *overlap = 0.75; + break; + case WFUNC_POISSON: + for (n = 0; n < N; n++) { + double x = 2 * ((n / (double)(N - 1)) - .5); + + if (x >= 0 && x <= .5) { + lut[n] = exp(-6*x); + } else if (x < 0 && x >= -.5) { + lut[n] = exp(6*x); + } else { + lut[n] = 0; + } + } + *overlap = 0.75; + break; + case WFUNC_BOHMAN: + for (n = 0; n < N; n++) { + double x = 2 * ((n / (double)(N - 1))) - 1.; + + lut[n] = (1 - fabs(x)) * cos(M_PI*fabs(x)) + 1./M_PI*sin(M_PI*fabs(x)); + } + *overlap = 0.75; + break; + default: + av_assert0(0); + } +} + +#endif /* AVFILTER_WINDOW_FUNC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/yadif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/yadif.h new file mode 100644 index 00000000..c928911b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavfilter/yadif.h @@ -0,0 +1,97 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFILTER_YADIF_H +#define AVFILTER_YADIF_H + +#include "libavutil/opt.h" +#include "libavutil/pixdesc.h" +#include "avfilter.h" + +enum YADIFMode { + YADIF_MODE_SEND_FRAME = 0, ///< send 1 frame for each frame + YADIF_MODE_SEND_FIELD = 1, ///< send 1 frame for each field + YADIF_MODE_SEND_FRAME_NOSPATIAL = 2, ///< send 1 frame for each frame but skips spatial interlacing check + YADIF_MODE_SEND_FIELD_NOSPATIAL = 3, ///< send 1 frame for each field but skips spatial interlacing check +}; + +enum YADIFParity { + YADIF_PARITY_TFF = 0, ///< top field first + YADIF_PARITY_BFF = 1, ///< bottom field first + YADIF_PARITY_AUTO = -1, ///< auto detection +}; + +enum YADIFDeint { + YADIF_DEINT_ALL = 0, ///< deinterlace all frames + YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced +}; + +enum YADIFCurrentField { + YADIF_FIELD_BACK_END = -1, ///< The last frame in a sequence + YADIF_FIELD_END = 0, ///< The first or last field in a sequence + YADIF_FIELD_NORMAL = 1, ///< A normal field in the middle of a sequence +}; + +typedef struct YADIFContext { + const AVClass *class; + + int mode; ///< YADIFMode + int parity; ///< YADIFParity + int deint; ///< YADIFDeint + + int frame_pending; + + AVFrame *cur; + AVFrame *next; + AVFrame *prev; + AVFrame *out; + + void (*filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff); + + /** + * Required alignment for filter_line + */ + void (*filter_line)(void *dst, + void *prev, void *cur, void *next, + int w, int prefs, int mrefs, int parity, int mode); + void (*filter_edges)(void *dst, void *prev, void *cur, void *next, + int w, int prefs, int mrefs, int parity, int mode); + + const AVPixFmtDescriptor *csp; + int eof; + uint8_t *temp_line; + int temp_line_size; + + /* + * An algorithm that treats first and/or last fields in a sequence + * differently can use this to detect those cases. It is the algorithm's + * responsibility to set the value to YADIF_FIELD_NORMAL after processing + * the first field. + */ + int current_field; ///< YADIFCurrentField +} YADIFContext; + +void ff_yadif_init_x86(YADIFContext *yadif); + +int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame); + +int ff_yadif_request_frame(AVFilterLink *link); + +extern const AVOption ff_yadif_options[]; + +#endif /* AVFILTER_YADIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/aiff.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/aiff.h new file mode 100644 index 00000000..0ed10a24 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/aiff.h @@ -0,0 +1,61 @@ +/* + * AIFF/AIFF-C muxer/demuxer common header + * Copyright (c) 2006 Patrick Guimond + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * common header for AIFF muxer and demuxer + */ + +#ifndef AVFORMAT_AIFF_H +#define AVFORMAT_AIFF_H + +#include "avformat.h" +#include "internal.h" + +static const AVCodecTag ff_codec_aiff_tags[] = { + { AV_CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') }, + { AV_CODEC_ID_PCM_S8, MKTAG('N','O','N','E') }, + { AV_CODEC_ID_PCM_U8, MKTAG('r','a','w',' ') }, + { AV_CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') }, + { AV_CODEC_ID_PCM_S32BE, MKTAG('N','O','N','E') }, + { AV_CODEC_ID_PCM_F32BE, MKTAG('f','l','3','2') }, + { AV_CODEC_ID_PCM_F64BE, MKTAG('f','l','6','4') }, + { AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') }, + { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') }, + { AV_CODEC_ID_PCM_S24BE, MKTAG('i','n','2','4') }, + { AV_CODEC_ID_PCM_S32BE, MKTAG('i','n','3','2') }, + { AV_CODEC_ID_MACE3, MKTAG('M','A','C','3') }, + { AV_CODEC_ID_MACE6, MKTAG('M','A','C','6') }, + { AV_CODEC_ID_GSM, MKTAG('G','S','M',' ') }, + { AV_CODEC_ID_ADPCM_G722, MKTAG('G','7','2','2') }, + { AV_CODEC_ID_ADPCM_G726LE, MKTAG('G','7','2','6') }, + { AV_CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') }, + { AV_CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') }, + { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') }, + { AV_CODEC_ID_QDMC, MKTAG('Q','D','M','C') }, + { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') }, + { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') }, + { AV_CODEC_ID_SDX2_DPCM, MKTAG('S','D','X','2') }, + { AV_CODEC_ID_ADPCM_IMA_WS, MKTAG('A','D','P','4') }, + { AV_CODEC_ID_NONE, 0 }, +}; + +#endif /* AVFORMAT_AIFF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/apetag.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/apetag.h new file mode 100644 index 00000000..49cd10eb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/apetag.h @@ -0,0 +1,45 @@ +/* + * APE tag handling + * Copyright (c) 2007 Benjamin Zores + * based upon libdemac from Dave Chapman. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_APETAG_H +#define AVFORMAT_APETAG_H + +#include "avformat.h" + +#define APE_TAG_PREAMBLE "APETAGEX" +#define APE_TAG_VERSION 2000 +#define APE_TAG_FOOTER_BYTES 32 +#define APE_TAG_HEADER_BYTES 32 + +/** + * Read and parse an APE tag + * + * @return offset of the tag start in the file + */ +int64_t ff_ape_parse_tag(AVFormatContext *s); + +/** + * Write an APE tag into a file. + */ +int ff_ape_write_tag(AVFormatContext *s); + +#endif /* AVFORMAT_APETAG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asf.h new file mode 100644 index 00000000..a30d3bb2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asf.h @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2000, 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_ASF_H +#define AVFORMAT_ASF_H + +#include +#include "avformat.h" +#include "metadata.h" +#include "riff.h" + +typedef enum ASFDataType { + ASF_UNICODE = 0, + ASF_BYTE_ARRAY = 1, + ASF_BOOL = 2, + ASF_DWORD = 3, + ASF_QWORD = 4, + ASF_WORD = 5, + ASF_GUID = 6, +}ASFDataType; + +typedef struct ASFMainHeader { + ff_asf_guid guid; ///< generated by client computer + uint64_t file_size; /**< in bytes + * invalid if broadcasting */ + uint64_t create_time; /**< time of creation, in 100-nanosecond units since 1.1.1601 + * invalid if broadcasting */ + uint64_t play_time; /**< play time, in 100-nanosecond units + * invalid if broadcasting */ + uint64_t send_time; /**< time to send file, in 100-nanosecond units + * invalid if broadcasting (could be ignored) */ + uint32_t preroll; /**< timestamp of the first packet, in milliseconds + * if nonzero - subtract from time */ + uint32_t ignore; ///< preroll is 64 bits - but let's just ignore it + uint32_t flags; /**< 0x01 - broadcast + * 0x02 - seekable + * rest is reserved should be 0 */ + uint32_t min_pktsize; /**< size of a data packet + * invalid if broadcasting */ + uint32_t max_pktsize; /**< shall be the same as for min_pktsize + * invalid if broadcasting */ + uint32_t max_bitrate; /**< bandwidth of stream in bps + * should be the sum of bitrates of the + * individual media streams */ +} ASFMainHeader; + + +typedef struct ASFIndex { + uint32_t packet_number; + uint16_t packet_count; + uint64_t send_time; + uint64_t offset; +} ASFIndex; + +extern const ff_asf_guid ff_asf_header; +extern const ff_asf_guid ff_asf_file_header; +extern const ff_asf_guid ff_asf_stream_header; +extern const ff_asf_guid ff_asf_ext_stream_header; +extern const ff_asf_guid ff_asf_audio_stream; +extern const ff_asf_guid ff_asf_audio_conceal_none; +extern const ff_asf_guid ff_asf_audio_conceal_spread; +extern const ff_asf_guid ff_asf_video_stream; +extern const ff_asf_guid ff_asf_jfif_media; +extern const ff_asf_guid ff_asf_video_conceal_none; +extern const ff_asf_guid ff_asf_command_stream; +extern const ff_asf_guid ff_asf_comment_header; +extern const ff_asf_guid ff_asf_codec_comment_header; +extern const ff_asf_guid ff_asf_codec_comment1_header; +extern const ff_asf_guid ff_asf_data_header; +extern const ff_asf_guid ff_asf_head1_guid; +extern const ff_asf_guid ff_asf_head2_guid; +extern const ff_asf_guid ff_asf_extended_content_header; +extern const ff_asf_guid ff_asf_simple_index_header; +extern const ff_asf_guid ff_asf_ext_stream_embed_stream_header; +extern const ff_asf_guid ff_asf_ext_stream_audio_stream; +extern const ff_asf_guid ff_asf_metadata_header; +extern const ff_asf_guid ff_asf_metadata_library_header; +extern const ff_asf_guid ff_asf_marker_header; +extern const ff_asf_guid ff_asf_reserved_4; +extern const ff_asf_guid ff_asf_my_guid; +extern const ff_asf_guid ff_asf_language_guid; +extern const ff_asf_guid ff_asf_content_encryption; +extern const ff_asf_guid ff_asf_ext_content_encryption; +extern const ff_asf_guid ff_asf_digital_signature; +extern const ff_asf_guid ff_asf_extended_stream_properties_object; +extern const ff_asf_guid ff_asf_group_mutual_exclusion_object; +extern const ff_asf_guid ff_asf_mutex_language; + +extern const AVMetadataConv ff_asf_metadata_conv[]; + +#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000 + + +// ASF data packet structure +// ========================= +// +// +// ----------------------------------- +// | Error Correction Data | Optional +// ----------------------------------- +// | Payload Parsing Information (PPI) | +// ----------------------------------- +// | Payload Data | +// ----------------------------------- +// | Padding Data | +// ----------------------------------- + + +// PPI_FLAG - Payload parsing information flags +#define ASF_PPI_FLAG_MULTIPLE_PAYLOADS_PRESENT 1 + +#define ASF_PPI_FLAG_SEQUENCE_FIELD_IS_BYTE 0x02 //0000 0010 +#define ASF_PPI_FLAG_SEQUENCE_FIELD_IS_WORD 0x04 //0000 0100 +#define ASF_PPI_FLAG_SEQUENCE_FIELD_IS_DWORD 0x06 //0000 0110 +#define ASF_PPI_MASK_SEQUENCE_FIELD_SIZE 0x06 //0000 0110 + +#define ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_BYTE 0x08 //0000 1000 +#define ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_WORD 0x10 //0001 0000 +#define ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_DWORD 0x18 //0001 1000 +#define ASF_PPI_MASK_PADDING_LENGTH_FIELD_SIZE 0x18 //0001 1000 + +#define ASF_PPI_FLAG_PACKET_LENGTH_FIELD_IS_BYTE 0x20 //0010 0000 +#define ASF_PPI_FLAG_PACKET_LENGTH_FIELD_IS_WORD 0x40 //0100 0000 +#define ASF_PPI_FLAG_PACKET_LENGTH_FIELD_IS_DWORD 0x60 //0110 0000 +#define ASF_PPI_MASK_PACKET_LENGTH_FIELD_SIZE 0x60 //0110 0000 + +// PL_FLAG - Payload flags +#define ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_IS_BYTE 0x01 //0000 0001 +#define ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_IS_WORD 0x02 //0000 0010 +#define ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_IS_DWORD 0x03 //0000 0011 +#define ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE 0x03 //0000 0011 + +#define ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_IS_BYTE 0x04 //0000 0100 +#define ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_IS_WORD 0x08 //0000 1000 +#define ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_IS_DWORD 0x0c //0000 1100 +#define ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE 0x0c //0000 1100 + +#define ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_IS_BYTE 0x10 //0001 0000 +#define ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_IS_WORD 0x20 //0010 0000 +#define ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_IS_DWORD 0x30 //0011 0000 +#define ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE 0x30 //0011 0000 + +#define ASF_PL_FLAG_STREAM_NUMBER_LENGTH_FIELD_IS_BYTE 0x40 //0100 0000 +#define ASF_PL_MASK_STREAM_NUMBER_LENGTH_FIELD_SIZE 0xc0 //1100 0000 + +#define ASF_PL_FLAG_PAYLOAD_LENGTH_FIELD_IS_BYTE 0x40 //0100 0000 +#define ASF_PL_FLAG_PAYLOAD_LENGTH_FIELD_IS_WORD 0x80 //1000 0000 +#define ASF_PL_MASK_PAYLOAD_LENGTH_FIELD_SIZE 0xc0 //1100 0000 + +#define ASF_PL_FLAG_KEY_FRAME 0x80 //1000 0000 + +#endif /* AVFORMAT_ASF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asfcrypt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asfcrypt.h new file mode 100644 index 00000000..8b80d63c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/asfcrypt.h @@ -0,0 +1,29 @@ +/* + * ASF decryption + * Copyright (c) 2007 Reimar Doeffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_ASFCRYPT_H +#define AVFORMAT_ASFCRYPT_H + +#include + +void ff_asfcrypt_dec(const uint8_t key[20], uint8_t *data, int len); + +#endif /* AVFORMAT_ASFCRYPT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ast.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ast.h new file mode 100644 index 00000000..4a399ea4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ast.h @@ -0,0 +1,30 @@ +/* + * AST common code + * Copyright (c) 2012 James Almer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AST_H +#define AVFORMAT_AST_H + +#include "avformat.h" +#include "internal.h" + +extern const AVCodecTag ff_codec_ast_tags[]; + +#endif /* AVFORMAT_AST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/av1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/av1.h new file mode 100644 index 00000000..dd5b47dc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/av1.h @@ -0,0 +1,102 @@ +/* + * AV1 helper functions for muxers + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AV1_H +#define AVFORMAT_AV1_H + +#include + +#include "avio.h" + +typedef struct AV1SequenceParameters { + uint8_t profile; + uint8_t level; + uint8_t tier; + uint8_t bitdepth; + uint8_t monochrome; + uint8_t chroma_subsampling_x; + uint8_t chroma_subsampling_y; + uint8_t chroma_sample_position; + uint8_t color_description_present_flag; + uint8_t color_primaries; + uint8_t transfer_characteristics; + uint8_t matrix_coefficients; + uint8_t color_range; +} AV1SequenceParameters; + +/** + * Filter out AV1 OBUs not meant to be present in ISOBMFF sample data and write + * the resulting bitstream to the provided AVIOContext. + * + * @param pb pointer to the AVIOContext where the filtered bitstream shall be + * written + * @param buf input data buffer + * @param size size of the input data buffer + * + * @return the amount of bytes written in case of success, a negative AVERROR + * code in case of failure + */ +int ff_av1_filter_obus(AVIOContext *pb, const uint8_t *buf, int size); + +/** + * Filter out AV1 OBUs not meant to be present in ISOBMFF sample data and return + * the result in a data buffer, avoiding allocations and copies if possible. + * + * @param in input data buffer + * @param out pointer to pointer for the returned buffer. In case of success, + * it is independently allocated if and only if `*out` differs from in. + * @param size size of the input data buffer. The size of the resulting output + * data buffer will be written here + * @param offset offset of the returned data inside `*out`: It runs from + * `*out + offset` (inclusive) to `*out + offset + size` + * (exclusive); is zero if `*out` is independently allocated. + * + * @return 0 in case of success, a negative AVERROR code in case of failure. + * On failure, *out and *size are unchanged + * @note *out will be treated as unintialized on input and will not be freed. + */ +int ff_av1_filter_obus_buf(const uint8_t *in, uint8_t **out, + int *size, int *offset); + +/** + * Parses a Sequence Header from the the provided buffer. + * + * @param seq pointer to the AV1SequenceParameters where the parsed values will + * be written + * @param buf input data buffer + * @param size size in bytes of the input data buffer + * + * @return >= 0 in case of success, a negative AVERROR code in case of failure + */ +int ff_av1_parse_seq_header(AV1SequenceParameters *seq, const uint8_t *buf, int size); + +/** + * Writes AV1 extradata (Sequence Header and Metadata OBUs) to the provided + * AVIOContext. + * + * @param pb pointer to the AVIOContext where the av1C box shall be written + * @param buf input data buffer + * @param size size in bytes of the input data buffer + * + * @return >= 0 in case of success, a negative AVERROR code in case of failure + */ +int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size); + +#endif /* AVFORMAT_AV1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avc.h new file mode 100644 index 00000000..9792b779 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avc.h @@ -0,0 +1,53 @@ +/* + * AVC helper functions for muxers + * Copyright (c) 2008 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AVC_H +#define AVFORMAT_AVC_H + +#include +#include "avio.h" + +int ff_avc_parse_nal_units(AVIOContext *s, const uint8_t *buf, int size); +int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size); +int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len); +const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end); +int ff_avc_write_annexb_extradata(const uint8_t *in, uint8_t **buf, int *size); +const uint8_t *ff_avc_mp4_find_startcode(const uint8_t *start, + const uint8_t *end, + int nal_length_size); +uint8_t *ff_nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len, + uint32_t *dst_len, int header_len); + +typedef struct { + uint8_t id; + uint8_t profile_idc; + uint8_t level_idc; + uint8_t constraint_set_flags; + uint8_t chroma_format_idc; + uint8_t bit_depth_luma; + uint8_t bit_depth_chroma; + uint8_t frame_mbs_only_flag; + AVRational sar; +} H264SPS; + +int ff_avc_decode_sps(H264SPS *sps, const uint8_t *buf, int buf_size); + +#endif /* AVFORMAT_AVC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avformat.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avformat.h new file mode 100644 index 00000000..21c282a1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avformat.h @@ -0,0 +1,3093 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AVFORMAT_H +#define AVFORMAT_AVFORMAT_H + +/** + * @file + * @ingroup libavf + * Main libavformat public API header + */ + +/** + * @defgroup libavf libavformat + * I/O and Muxing/Demuxing Library + * + * Libavformat (lavf) is a library for dealing with various media container + * formats. Its main two purposes are demuxing - i.e. splitting a media file + * into component streams, and the reverse process of muxing - writing supplied + * data in a specified container format. It also has an @ref lavf_io + * "I/O module" which supports a number of protocols for accessing the data (e.g. + * file, tcp, http and others). + * Unless you are absolutely sure you won't use libavformat's network + * capabilities, you should also call avformat_network_init(). + * + * A supported input format is described by an AVInputFormat struct, conversely + * an output format is described by AVOutputFormat. You can iterate over all + * input/output formats using the av_demuxer_iterate / av_muxer_iterate() functions. + * The protocols layer is not part of the public API, so you can only get the names + * of supported protocols with the avio_enum_protocols() function. + * + * Main lavf structure used for both muxing and demuxing is AVFormatContext, + * which exports all information about the file being read or written. As with + * most Libavformat structures, its size is not part of public ABI, so it cannot be + * allocated on stack or directly with av_malloc(). To create an + * AVFormatContext, use avformat_alloc_context() (some functions, like + * avformat_open_input() might do that for you). + * + * Most importantly an AVFormatContext contains: + * @li the @ref AVFormatContext.iformat "input" or @ref AVFormatContext.oformat + * "output" format. It is either autodetected or set by user for input; + * always set by user for output. + * @li an @ref AVFormatContext.streams "array" of AVStreams, which describe all + * elementary streams stored in the file. AVStreams are typically referred to + * using their index in this array. + * @li an @ref AVFormatContext.pb "I/O context". It is either opened by lavf or + * set by user for input, always set by user for output (unless you are dealing + * with an AVFMT_NOFILE format). + * + * @section lavf_options Passing options to (de)muxers + * It is possible to configure lavf muxers and demuxers using the @ref avoptions + * mechanism. Generic (format-independent) libavformat options are provided by + * AVFormatContext, they can be examined from a user program by calling + * av_opt_next() / av_opt_find() on an allocated AVFormatContext (or its AVClass + * from avformat_get_class()). Private (format-specific) options are provided by + * AVFormatContext.priv_data if and only if AVInputFormat.priv_class / + * AVOutputFormat.priv_class of the corresponding format struct is non-NULL. + * Further options may be provided by the @ref AVFormatContext.pb "I/O context", + * if its AVClass is non-NULL, and the protocols layer. See the discussion on + * nesting in @ref avoptions documentation to learn how to access those. + * + * @section urls + * URL strings in libavformat are made of a scheme/protocol, a ':', and a + * scheme specific string. URLs without a scheme and ':' used for local files + * are supported but deprecated. "file:" should be used for local files. + * + * It is important that the scheme string is not taken from untrusted + * sources without checks. + * + * Note that some schemes/protocols are quite powerful, allowing access to + * both local and remote files, parts of them, concatenations of them, local + * audio and video devices and so on. + * + * @{ + * + * @defgroup lavf_decoding Demuxing + * @{ + * Demuxers read a media file and split it into chunks of data (@em packets). A + * @ref AVPacket "packet" contains one or more encoded frames which belongs to a + * single elementary stream. In the lavf API this process is represented by the + * avformat_open_input() function for opening a file, av_read_frame() for + * reading a single packet and finally avformat_close_input(), which does the + * cleanup. + * + * @section lavf_decoding_open Opening a media file + * The minimum information required to open a file is its URL, which + * is passed to avformat_open_input(), as in the following code: + * @code + * const char *url = "file:in.mp3"; + * AVFormatContext *s = NULL; + * int ret = avformat_open_input(&s, url, NULL, NULL); + * if (ret < 0) + * abort(); + * @endcode + * The above code attempts to allocate an AVFormatContext, open the + * specified file (autodetecting the format) and read the header, exporting the + * information stored there into s. Some formats do not have a header or do not + * store enough information there, so it is recommended that you call the + * avformat_find_stream_info() function which tries to read and decode a few + * frames to find missing information. + * + * In some cases you might want to preallocate an AVFormatContext yourself with + * avformat_alloc_context() and do some tweaking on it before passing it to + * avformat_open_input(). One such case is when you want to use custom functions + * for reading input data instead of lavf internal I/O layer. + * To do that, create your own AVIOContext with avio_alloc_context(), passing + * your reading callbacks to it. Then set the @em pb field of your + * AVFormatContext to newly created AVIOContext. + * + * Since the format of the opened file is in general not known until after + * avformat_open_input() has returned, it is not possible to set demuxer private + * options on a preallocated context. Instead, the options should be passed to + * avformat_open_input() wrapped in an AVDictionary: + * @code + * AVDictionary *options = NULL; + * av_dict_set(&options, "video_size", "640x480", 0); + * av_dict_set(&options, "pixel_format", "rgb24", 0); + * + * if (avformat_open_input(&s, url, NULL, &options) < 0) + * abort(); + * av_dict_free(&options); + * @endcode + * This code passes the private options 'video_size' and 'pixel_format' to the + * demuxer. They would be necessary for e.g. the rawvideo demuxer, since it + * cannot know how to interpret raw video data otherwise. If the format turns + * out to be something different than raw video, those options will not be + * recognized by the demuxer and therefore will not be applied. Such unrecognized + * options are then returned in the options dictionary (recognized options are + * consumed). The calling program can handle such unrecognized options as it + * wishes, e.g. + * @code + * AVDictionaryEntry *e; + * if (e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX)) { + * fprintf(stderr, "Option %s not recognized by the demuxer.\n", e->key); + * abort(); + * } + * @endcode + * + * After you have finished reading the file, you must close it with + * avformat_close_input(). It will free everything associated with the file. + * + * @section lavf_decoding_read Reading from an opened file + * Reading data from an opened AVFormatContext is done by repeatedly calling + * av_read_frame() on it. Each call, if successful, will return an AVPacket + * containing encoded data for one AVStream, identified by + * AVPacket.stream_index. This packet may be passed straight into the libavcodec + * decoding functions avcodec_send_packet() or avcodec_decode_subtitle2() if the + * caller wishes to decode the data. + * + * AVPacket.pts, AVPacket.dts and AVPacket.duration timing information will be + * set if known. They may also be unset (i.e. AV_NOPTS_VALUE for + * pts/dts, 0 for duration) if the stream does not provide them. The timing + * information will be in AVStream.time_base units, i.e. it has to be + * multiplied by the timebase to convert them to seconds. + * + * A packet returned by av_read_frame() is always reference-counted, + * i.e. AVPacket.buf is set and the user may keep it indefinitely. + * The packet must be freed with av_packet_unref() when it is no + * longer needed. + * + * @section lavf_decoding_seek Seeking + * @} + * + * @defgroup lavf_encoding Muxing + * @{ + * Muxers take encoded data in the form of @ref AVPacket "AVPackets" and write + * it into files or other output bytestreams in the specified container format. + * + * The main API functions for muxing are avformat_write_header() for writing the + * file header, av_write_frame() / av_interleaved_write_frame() for writing the + * packets and av_write_trailer() for finalizing the file. + * + * At the beginning of the muxing process, the caller must first call + * avformat_alloc_context() to create a muxing context. The caller then sets up + * the muxer by filling the various fields in this context: + * + * - The @ref AVFormatContext.oformat "oformat" field must be set to select the + * muxer that will be used. + * - Unless the format is of the AVFMT_NOFILE type, the @ref AVFormatContext.pb + * "pb" field must be set to an opened IO context, either returned from + * avio_open2() or a custom one. + * - Unless the format is of the AVFMT_NOSTREAMS type, at least one stream must + * be created with the avformat_new_stream() function. The caller should fill + * the @ref AVStream.codecpar "stream codec parameters" information, such as the + * codec @ref AVCodecParameters.codec_type "type", @ref AVCodecParameters.codec_id + * "id" and other parameters (e.g. width / height, the pixel or sample format, + * etc.) as known. The @ref AVStream.time_base "stream timebase" should + * be set to the timebase that the caller desires to use for this stream (note + * that the timebase actually used by the muxer can be different, as will be + * described later). + * - It is advised to manually initialize only the relevant fields in + * AVCodecParameters, rather than using @ref avcodec_parameters_copy() during + * remuxing: there is no guarantee that the codec context values remain valid + * for both input and output format contexts. + * - The caller may fill in additional information, such as @ref + * AVFormatContext.metadata "global" or @ref AVStream.metadata "per-stream" + * metadata, @ref AVFormatContext.chapters "chapters", @ref + * AVFormatContext.programs "programs", etc. as described in the + * AVFormatContext documentation. Whether such information will actually be + * stored in the output depends on what the container format and the muxer + * support. + * + * When the muxing context is fully set up, the caller must call + * avformat_write_header() to initialize the muxer internals and write the file + * header. Whether anything actually is written to the IO context at this step + * depends on the muxer, but this function must always be called. Any muxer + * private options must be passed in the options parameter to this function. + * + * The data is then sent to the muxer by repeatedly calling av_write_frame() or + * av_interleaved_write_frame() (consult those functions' documentation for + * discussion on the difference between them; only one of them may be used with + * a single muxing context, they should not be mixed). Do note that the timing + * information on the packets sent to the muxer must be in the corresponding + * AVStream's timebase. That timebase is set by the muxer (in the + * avformat_write_header() step) and may be different from the timebase + * requested by the caller. + * + * Once all the data has been written, the caller must call av_write_trailer() + * to flush any buffered packets and finalize the output file, then close the IO + * context (if any) and finally free the muxing context with + * avformat_free_context(). + * @} + * + * @defgroup lavf_io I/O Read/Write + * @{ + * @section lavf_io_dirlist Directory listing + * The directory listing API makes it possible to list files on remote servers. + * + * Some of possible use cases: + * - an "open file" dialog to choose files from a remote location, + * - a recursive media finder providing a player with an ability to play all + * files from a given directory. + * + * @subsection lavf_io_dirlist_open Opening a directory + * At first, a directory needs to be opened by calling avio_open_dir() + * supplied with a URL and, optionally, ::AVDictionary containing + * protocol-specific parameters. The function returns zero or positive + * integer and allocates AVIODirContext on success. + * + * @code + * AVIODirContext *ctx = NULL; + * if (avio_open_dir(&ctx, "smb://example.com/some_dir", NULL) < 0) { + * fprintf(stderr, "Cannot open directory.\n"); + * abort(); + * } + * @endcode + * + * This code tries to open a sample directory using smb protocol without + * any additional parameters. + * + * @subsection lavf_io_dirlist_read Reading entries + * Each directory's entry (i.e. file, another directory, anything else + * within ::AVIODirEntryType) is represented by AVIODirEntry. + * Reading consecutive entries from an opened AVIODirContext is done by + * repeatedly calling avio_read_dir() on it. Each call returns zero or + * positive integer if successful. Reading can be stopped right after the + * NULL entry has been read -- it means there are no entries left to be + * read. The following code reads all entries from a directory associated + * with ctx and prints their names to standard output. + * @code + * AVIODirEntry *entry = NULL; + * for (;;) { + * if (avio_read_dir(ctx, &entry) < 0) { + * fprintf(stderr, "Cannot list directory.\n"); + * abort(); + * } + * if (!entry) + * break; + * printf("%s\n", entry->name); + * avio_free_directory_entry(&entry); + * } + * @endcode + * @} + * + * @defgroup lavf_codec Demuxers + * @{ + * @defgroup lavf_codec_native Native Demuxers + * @{ + * @} + * @defgroup lavf_codec_wrappers External library wrappers + * @{ + * @} + * @} + * @defgroup lavf_protos I/O Protocols + * @{ + * @} + * @defgroup lavf_internal Internal + * @{ + * @} + * @} + */ + +#include +#include /* FILE */ +#include "libavcodec/avcodec.h" +#include "libavutil/dict.h" +#include "libavutil/log.h" + +#include "avio.h" +#include "libavformat/version.h" + +struct AVFormatContext; + +struct AVDeviceInfoList; +struct AVDeviceCapabilitiesQuery; + +/** + * @defgroup metadata_api Public Metadata API + * @{ + * @ingroup libavf + * The metadata API allows libavformat to export metadata tags to a client + * application when demuxing. Conversely it allows a client application to + * set metadata when muxing. + * + * Metadata is exported or set as pairs of key/value strings in the 'metadata' + * fields of the AVFormatContext, AVStream, AVChapter and AVProgram structs + * using the @ref lavu_dict "AVDictionary" API. Like all strings in FFmpeg, + * metadata is assumed to be UTF-8 encoded Unicode. Note that metadata + * exported by demuxers isn't checked to be valid UTF-8 in most cases. + * + * Important concepts to keep in mind: + * - Keys are unique; there can never be 2 tags with the same key. This is + * also meant semantically, i.e., a demuxer should not knowingly produce + * several keys that are literally different but semantically identical. + * E.g., key=Author5, key=Author6. In this example, all authors must be + * placed in the same tag. + * - Metadata is flat, not hierarchical; there are no subtags. If you + * want to store, e.g., the email address of the child of producer Alice + * and actor Bob, that could have key=alice_and_bobs_childs_email_address. + * - Several modifiers can be applied to the tag name. This is done by + * appending a dash character ('-') and the modifier name in the order + * they appear in the list below -- e.g. foo-eng-sort, not foo-sort-eng. + * - language -- a tag whose value is localized for a particular language + * is appended with the ISO 639-2/B 3-letter language code. + * For example: Author-ger=Michael, Author-eng=Mike + * The original/default language is in the unqualified "Author" tag. + * A demuxer should set a default if it sets any translated tag. + * - sorting -- a modified version of a tag that should be used for + * sorting will have '-sort' appended. E.g. artist="The Beatles", + * artist-sort="Beatles, The". + * - Some protocols and demuxers support metadata updates. After a successful + * call to av_read_packet(), AVFormatContext.event_flags or AVStream.event_flags + * will be updated to indicate if metadata changed. In order to detect metadata + * changes on a stream, you need to loop through all streams in the AVFormatContext + * and check their individual event_flags. + * + * - Demuxers attempt to export metadata in a generic format, however tags + * with no generic equivalents are left as they are stored in the container. + * Follows a list of generic tag names: + * + @verbatim + album -- name of the set this work belongs to + album_artist -- main creator of the set/album, if different from artist. + e.g. "Various Artists" for compilation albums. + artist -- main creator of the work + comment -- any additional description of the file. + composer -- who composed the work, if different from artist. + copyright -- name of copyright holder. + creation_time-- date when the file was created, preferably in ISO 8601. + date -- date when the work was created, preferably in ISO 8601. + disc -- number of a subset, e.g. disc in a multi-disc collection. + encoder -- name/settings of the software/hardware that produced the file. + encoded_by -- person/group who created the file. + filename -- original name of the file. + genre -- . + language -- main language in which the work is performed, preferably + in ISO 639-2 format. Multiple languages can be specified by + separating them with commas. + performer -- artist who performed the work, if different from artist. + E.g for "Also sprach Zarathustra", artist would be "Richard + Strauss" and performer "London Philharmonic Orchestra". + publisher -- name of the label/publisher. + service_name -- name of the service in broadcasting (channel name). + service_provider -- name of the service provider in broadcasting. + title -- name of the work. + track -- number of this work in the set, can be in form current/total. + variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of + @endverbatim + * + * Look in the examples section for an application example how to use the Metadata API. + * + * @} + */ + +/* packet functions */ + + +/** + * Allocate and read the payload of a packet and initialize its + * fields with default values. + * + * @param s associated IO context + * @param pkt packet + * @param size desired payload size + * @return >0 (read size) if OK, AVERROR_xxx otherwise + */ +int av_get_packet(AVIOContext *s, AVPacket *pkt, int size); + + +/** + * Read data and append it to the current content of the AVPacket. + * If pkt->size is 0 this is identical to av_get_packet. + * Note that this uses av_grow_packet and thus involves a realloc + * which is inefficient. Thus this function should only be used + * when there is no reasonable way to know (an upper bound of) + * the final size. + * + * @param s associated IO context + * @param pkt packet + * @param size amount of data to read + * @return >0 (read size) if OK, AVERROR_xxx otherwise, previous data + * will not be lost even if an error occurs. + */ +int av_append_packet(AVIOContext *s, AVPacket *pkt, int size); + +/*************************************************/ +/* input/output formats */ + +struct AVCodecTag; + +/** + * This structure contains the data a format has to probe a file. + */ +typedef struct AVProbeData { + const char *filename; + unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero. */ + int buf_size; /**< Size of buf except extra allocated bytes */ + const char *mime_type; /**< mime_type, when known. */ +} AVProbeData; + +#define AVPROBE_SCORE_RETRY (AVPROBE_SCORE_MAX/4) +#define AVPROBE_SCORE_STREAM_RETRY (AVPROBE_SCORE_MAX/4-1) + +#define AVPROBE_SCORE_EXTENSION 50 ///< score for file extension +#define AVPROBE_SCORE_MIME 75 ///< score for file mime type +#define AVPROBE_SCORE_MAX 100 ///< maximum score + +#define AVPROBE_PADDING_SIZE 32 ///< extra allocated bytes at the end of the probe buffer + +/// Demuxer will use avio_open, no opened file should be provided by the caller. +#define AVFMT_NOFILE 0x0001 +#define AVFMT_NEEDNUMBER 0x0002 /**< Needs '%d' in filename. */ +#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */ +#define AVFMT_GLOBALHEADER 0x0040 /**< Format wants global header. */ +#define AVFMT_NOTIMESTAMPS 0x0080 /**< Format does not need / have any timestamps. */ +#define AVFMT_GENERIC_INDEX 0x0100 /**< Use generic index building code. */ +#define AVFMT_TS_DISCONT 0x0200 /**< Format allows timestamp discontinuities. Note, muxers always require valid (monotone) timestamps */ +#define AVFMT_VARIABLE_FPS 0x0400 /**< Format allows variable fps. */ +#define AVFMT_NODIMENSIONS 0x0800 /**< Format does not need width/height */ +#define AVFMT_NOSTREAMS 0x1000 /**< Format does not require any streams */ +#define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fall back on binary search via read_timestamp */ +#define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fall back on generic search */ +#define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */ +#define AVFMT_ALLOW_FLUSH 0x10000 /**< Format allows flushing. If not set, the muxer will not receive a NULL packet in the write_packet function. */ +#define AVFMT_TS_NONSTRICT 0x20000 /**< Format does not require strictly + increasing timestamps, but they must + still be monotonic */ +#define AVFMT_TS_NEGATIVE 0x40000 /**< Format allows muxing negative + timestamps. If not set the timestamp + will be shifted in av_write_frame and + av_interleaved_write_frame so they + start from 0. + The user or muxer can override this through + AVFormatContext.avoid_negative_ts + */ + +#define AVFMT_SEEK_TO_PTS 0x4000000 /**< Seeking is based on PTS */ + +/** + * @addtogroup lavf_encoding + * @{ + */ +typedef struct AVOutputFormat { + const char *name; + /** + * Descriptive name for the format, meant to be more human-readable + * than name. You should use the NULL_IF_CONFIG_SMALL() macro + * to define it. + */ + const char *long_name; + const char *mime_type; + const char *extensions; /**< comma-separated filename extensions */ + /* output support */ + enum AVCodecID audio_codec; /**< default audio codec */ + enum AVCodecID video_codec; /**< default video codec */ + enum AVCodecID subtitle_codec; /**< default subtitle codec */ + /** + * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, + * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, + * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_ALLOW_FLUSH, + * AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE + */ + int flags; + + /** + * List of supported codec_id-codec_tag pairs, ordered by "better + * choice first". The arrays are all terminated by AV_CODEC_ID_NONE. + */ + const struct AVCodecTag * const *codec_tag; + + + const AVClass *priv_class; ///< AVClass for the private context + + /***************************************************************** + * No fields below this line are part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + /** + * The ff_const59 define is not part of the public API and will + * be removed without further warning. + */ +#if FF_API_AVIOFORMAT +#define ff_const59 +#else +#define ff_const59 const +#endif + ff_const59 struct AVOutputFormat *next; + /** + * size of private data so that it can be allocated in the wrapper + */ + int priv_data_size; + + int (*write_header)(struct AVFormatContext *); + /** + * Write a packet. If AVFMT_ALLOW_FLUSH is set in flags, + * pkt can be NULL in order to flush data buffered in the muxer. + * When flushing, return 0 if there still is more data to flush, + * or 1 if everything was flushed and there is no more buffered + * data. + */ + int (*write_packet)(struct AVFormatContext *, AVPacket *pkt); + int (*write_trailer)(struct AVFormatContext *); + /** + * A format-specific function for interleavement. + * If unset, packets will be interleaved by dts. + */ + int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, + AVPacket *in, int flush); + /** + * Test if the given codec can be stored in this container. + * + * @return 1 if the codec is supported, 0 if it is not. + * A negative number if unknown. + * MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC + */ + int (*query_codec)(enum AVCodecID id, int std_compliance); + + void (*get_output_timestamp)(struct AVFormatContext *s, int stream, + int64_t *dts, int64_t *wall); + /** + * Allows sending messages from application to device. + */ + int (*control_message)(struct AVFormatContext *s, int type, + void *data, size_t data_size); + + /** + * Write an uncoded AVFrame. + * + * See av_write_uncoded_frame() for details. + * + * The library will free *frame afterwards, but the muxer can prevent it + * by setting the pointer to NULL. + */ + int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index, + AVFrame **frame, unsigned flags); + /** + * Returns device list with it properties. + * @see avdevice_list_devices() for more details. + */ + int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); + /** + * Initialize device capabilities submodule. + * @see avdevice_capabilities_create() for more details. + */ + int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); + /** + * Free device capabilities submodule. + * @see avdevice_capabilities_free() for more details. + */ + int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); + enum AVCodecID data_codec; /**< default data codec */ + /** + * Initialize format. May allocate data here, and set any AVFormatContext or + * AVStream parameters that need to be set before packets are sent. + * This method must not write output. + * + * Return 0 if streams were fully configured, 1 if not, negative AVERROR on failure + * + * Any allocations made here must be freed in deinit(). + */ + int (*init)(struct AVFormatContext *); + /** + * Deinitialize format. If present, this is called whenever the muxer is being + * destroyed, regardless of whether or not the header has been written. + * + * If a trailer is being written, this is called after write_trailer(). + * + * This is called if init() fails as well. + */ + void (*deinit)(struct AVFormatContext *); + /** + * Set up any necessary bitstream filtering and extract any extra data needed + * for the global header. + * Return 0 if more packets from this stream must be checked; 1 if not. + */ + int (*check_bitstream)(struct AVFormatContext *, const AVPacket *pkt); +} AVOutputFormat; +/** + * @} + */ + +/** + * @addtogroup lavf_decoding + * @{ + */ +typedef struct AVInputFormat { + /** + * A comma separated list of short names for the format. New names + * may be appended with a minor bump. + */ + const char *name; + + /** + * Descriptive name for the format, meant to be more human-readable + * than name. You should use the NULL_IF_CONFIG_SMALL() macro + * to define it. + */ + const char *long_name; + + /** + * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, + * AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, + * AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. + */ + int flags; + + /** + * If extensions are defined, then no probe is done. You should + * usually not use extension format guessing because it is not + * reliable enough + */ + const char *extensions; + + const struct AVCodecTag * const *codec_tag; + + const AVClass *priv_class; ///< AVClass for the private context + + /** + * Comma-separated list of mime types. + * It is used check for matching mime types while probing. + * @see av_probe_input_format2 + */ + const char *mime_type; + + /***************************************************************** + * No fields below this line are part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + ff_const59 struct AVInputFormat *next; + + /** + * Raw demuxers store their codec ID here. + */ + int raw_codec_id; + + /** + * Size of private data so that it can be allocated in the wrapper. + */ + int priv_data_size; + + /** + * Tell if a given file has a chance of being parsed as this format. + * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes + * big so you do not have to check for that unless you need more. + */ + int (*read_probe)(const AVProbeData *); + + /** + * Read the format header and initialize the AVFormatContext + * structure. Return 0 if OK. 'avformat_new_stream' should be + * called to create new streams. + */ + int (*read_header)(struct AVFormatContext *); + + /** + * Read one packet and put it in 'pkt'. pts and flags are also + * set. 'avformat_new_stream' can be called only if the flag + * AVFMTCTX_NOHEADER is used and only in the calling thread (not in a + * background thread). + * @return 0 on success, < 0 on error. + * Upon returning an error, pkt must be unreferenced by the caller. + */ + int (*read_packet)(struct AVFormatContext *, AVPacket *pkt); + + /** + * Close the stream. The AVFormatContext and AVStreams are not + * freed by this function + */ + int (*read_close)(struct AVFormatContext *); + + /** + * Seek to a given timestamp relative to the frames in + * stream component stream_index. + * @param stream_index Must not be -1. + * @param flags Selects which direction should be preferred if no exact + * match is available. + * @return >= 0 on success (but not necessarily the new offset) + */ + int (*read_seek)(struct AVFormatContext *, + int stream_index, int64_t timestamp, int flags); + + /** + * Get the next timestamp in stream[stream_index].time_base units. + * @return the timestamp or AV_NOPTS_VALUE if an error occurred + */ + int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index, + int64_t *pos, int64_t pos_limit); + + /** + * Start/resume playing - only meaningful if using a network-based format + * (RTSP). + */ + int (*read_play)(struct AVFormatContext *); + + /** + * Pause playing - only meaningful if using a network-based format + * (RTSP). + */ + int (*read_pause)(struct AVFormatContext *); + + /** + * Seek to timestamp ts. + * Seeking will be done so that the point from which all active streams + * can be presented successfully will be closest to ts and within min/max_ts. + * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. + */ + int (*read_seek2)(struct AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); + + /** + * Returns device list with it properties. + * @see avdevice_list_devices() for more details. + */ + int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); + + /** + * Initialize device capabilities submodule. + * @see avdevice_capabilities_create() for more details. + */ + int (*create_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); + + /** + * Free device capabilities submodule. + * @see avdevice_capabilities_free() for more details. + */ + int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps); +} AVInputFormat; +/** + * @} + */ + +enum AVStreamParseType { + AVSTREAM_PARSE_NONE, + AVSTREAM_PARSE_FULL, /**< full parsing and repack */ + AVSTREAM_PARSE_HEADERS, /**< Only parse headers, do not repack. */ + AVSTREAM_PARSE_TIMESTAMPS, /**< full parsing and interpolation of timestamps for frames not starting on a packet boundary */ + AVSTREAM_PARSE_FULL_ONCE, /**< full parsing and repack of the first frame only, only implemented for H.264 currently */ + AVSTREAM_PARSE_FULL_RAW, /**< full parsing and repack with timestamp and position generation by parser for raw + this assumes that each packet in the file contains no demuxer level headers and + just codec level data, otherwise position generation would fail */ +}; + +typedef struct AVIndexEntry { + int64_t pos; + int64_t timestamp; /**< + * Timestamp in AVStream.time_base units, preferably the time from which on correctly decoded frames are available + * when seeking to this entry. That means preferable PTS on keyframe based formats. + * But demuxers can choose to store a different timestamp, if it is more convenient for the implementation or nothing better + * is known + */ +#define AVINDEX_KEYFRAME 0x0001 +#define AVINDEX_DISCARD_FRAME 0x0002 /** + * Flag is used to indicate which frame should be discarded after decoding. + */ + int flags:2; + int size:30; //Yeah, trying to keep the size of this small to reduce memory requirements (it is 24 vs. 32 bytes due to possible 8-byte alignment). + int min_distance; /**< Minimum distance between this and the previous keyframe, used to avoid unneeded searching. */ +} AVIndexEntry; + +#define AV_DISPOSITION_DEFAULT 0x0001 +#define AV_DISPOSITION_DUB 0x0002 +#define AV_DISPOSITION_ORIGINAL 0x0004 +#define AV_DISPOSITION_COMMENT 0x0008 +#define AV_DISPOSITION_LYRICS 0x0010 +#define AV_DISPOSITION_KARAOKE 0x0020 + +/** + * Track should be used during playback by default. + * Useful for subtitle track that should be displayed + * even when user did not explicitly ask for subtitles. + */ +#define AV_DISPOSITION_FORCED 0x0040 +#define AV_DISPOSITION_HEARING_IMPAIRED 0x0080 /**< stream for hearing impaired audiences */ +#define AV_DISPOSITION_VISUAL_IMPAIRED 0x0100 /**< stream for visual impaired audiences */ +#define AV_DISPOSITION_CLEAN_EFFECTS 0x0200 /**< stream without voice */ +/** + * The stream is stored in the file as an attached picture/"cover art" (e.g. + * APIC frame in ID3v2). The first (usually only) packet associated with it + * will be returned among the first few packets read from the file unless + * seeking takes place. It can also be accessed at any time in + * AVStream.attached_pic. + */ +#define AV_DISPOSITION_ATTACHED_PIC 0x0400 +/** + * The stream is sparse, and contains thumbnail images, often corresponding + * to chapter markers. Only ever used with AV_DISPOSITION_ATTACHED_PIC. + */ +#define AV_DISPOSITION_TIMED_THUMBNAILS 0x0800 + +typedef struct AVStreamInternal AVStreamInternal; + +/** + * To specify text track kind (different from subtitles default). + */ +#define AV_DISPOSITION_CAPTIONS 0x10000 +#define AV_DISPOSITION_DESCRIPTIONS 0x20000 +#define AV_DISPOSITION_METADATA 0x40000 +#define AV_DISPOSITION_DEPENDENT 0x80000 ///< dependent audio stream (mix_type=0 in mpegts) +#define AV_DISPOSITION_STILL_IMAGE 0x100000 ///< still images in video stream (still_picture_flag=1 in mpegts) + +/** + * Options for behavior on timestamp wrap detection. + */ +#define AV_PTS_WRAP_IGNORE 0 ///< ignore the wrap +#define AV_PTS_WRAP_ADD_OFFSET 1 ///< add the format specific offset on wrap detection +#define AV_PTS_WRAP_SUB_OFFSET -1 ///< subtract the format specific offset on wrap detection + +/** + * Stream structure. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(AVStream) must not be used outside libav*. + */ +typedef struct AVStream { + int index; /**< stream index in AVFormatContext */ + /** + * Format-specific stream ID. + * decoding: set by libavformat + * encoding: set by the user, replaced by libavformat if left unset + */ + int id; +#if FF_API_LAVF_AVCTX + /** + * @deprecated use the codecpar struct instead + */ + attribute_deprecated + AVCodecContext *codec; +#endif + void *priv_data; + + /** + * This is the fundamental unit of time (in seconds) in terms + * of which frame timestamps are represented. + * + * decoding: set by libavformat + * encoding: May be set by the caller before avformat_write_header() to + * provide a hint to the muxer about the desired timebase. In + * avformat_write_header(), the muxer will overwrite this field + * with the timebase that will actually be used for the timestamps + * written into the file (which may or may not be related to the + * user-provided one, depending on the format). + */ + AVRational time_base; + + /** + * Decoding: pts of the first frame of the stream in presentation order, in stream time base. + * Only set this if you are absolutely 100% sure that the value you set + * it to really is the pts of the first frame. + * This may be undefined (AV_NOPTS_VALUE). + * @note The ASF header does NOT contain a correct start_time the ASF + * demuxer must NOT set this. + */ + int64_t start_time; + + /** + * Decoding: duration of the stream, in stream time base. + * If a source file does not specify a duration, but does specify + * a bitrate, this value will be estimated from bitrate and file size. + * + * Encoding: May be set by the caller before avformat_write_header() to + * provide a hint to the muxer about the estimated duration. + */ + int64_t duration; + + int64_t nb_frames; ///< number of frames in this stream if known or 0 + + int disposition; /**< AV_DISPOSITION_* bit field */ + + enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed. + + /** + * sample aspect ratio (0 if unknown) + * - encoding: Set by user. + * - decoding: Set by libavformat. + */ + AVRational sample_aspect_ratio; + + AVDictionary *metadata; + + /** + * Average framerate + * + * - demuxing: May be set by libavformat when creating the stream or in + * avformat_find_stream_info(). + * - muxing: May be set by the caller before avformat_write_header(). + */ + AVRational avg_frame_rate; + + /** + * For streams with AV_DISPOSITION_ATTACHED_PIC disposition, this packet + * will contain the attached picture. + * + * decoding: set by libavformat, must not be modified by the caller. + * encoding: unused + */ + AVPacket attached_pic; + + /** + * An array of side data that applies to the whole stream (i.e. the + * container does not allow it to change between packets). + * + * There may be no overlap between the side data in this array and side data + * in the packets. I.e. a given side data is either exported by the muxer + * (demuxing) / set by the caller (muxing) in this array, then it never + * appears in the packets, or the side data is exported / sent through + * the packets (always in the first packet where the value becomes known or + * changes), then it does not appear in this array. + * + * - demuxing: Set by libavformat when the stream is created. + * - muxing: May be set by the caller before avformat_write_header(). + * + * Freed by libavformat in avformat_free_context(). + * + * @see av_format_inject_global_side_data() + */ + AVPacketSideData *side_data; + /** + * The number of elements in the AVStream.side_data array. + */ + int nb_side_data; + + /** + * Flags for the user to detect events happening on the stream. Flags must + * be cleared by the user once the event has been handled. + * A combination of AVSTREAM_EVENT_FLAG_*. + */ + int event_flags; +#define AVSTREAM_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata. + + /** + * Real base framerate of the stream. + * This is the lowest framerate with which all timestamps can be + * represented accurately (it is the least common multiple of all + * framerates in the stream). Note, this value is just a guess! + * For example, if the time base is 1/90000 and all frames have either + * approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. + */ + AVRational r_frame_rate; + +#if FF_API_LAVF_FFSERVER + /** + * String containing pairs of key and values describing recommended encoder configuration. + * Pairs are separated by ','. + * Keys are separated from values by '='. + * + * @deprecated unused + */ + attribute_deprecated + char *recommended_encoder_configuration; +#endif + + /** + * Codec parameters associated with this stream. Allocated and freed by + * libavformat in avformat_new_stream() and avformat_free_context() + * respectively. + * + * - demuxing: filled by libavformat on stream creation or in + * avformat_find_stream_info() + * - muxing: filled by the caller before avformat_write_header() + */ + AVCodecParameters *codecpar; + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * Internal note: be aware that physically removing these fields + * will break ABI. Replace removed fields with dummy fields, and + * add new fields to AVStreamInternal. + ***************************************************************** + */ + +#define MAX_STD_TIMEBASES (30*12+30+3+6) + /** + * Stream information used internally by avformat_find_stream_info() + */ + struct { + int64_t last_dts; + int64_t duration_gcd; + int duration_count; + int64_t rfps_duration_sum; + double (*duration_error)[2][MAX_STD_TIMEBASES]; + int64_t codec_info_duration; + int64_t codec_info_duration_fields; + int frame_delay_evidence; + + /** + * 0 -> decoder has not been searched for yet. + * >0 -> decoder found + * <0 -> decoder with codec_id == -found_decoder has not been found + */ + int found_decoder; + + int64_t last_duration; + + /** + * Those are used for average framerate estimation. + */ + int64_t fps_first_dts; + int fps_first_dts_idx; + int64_t fps_last_dts; + int fps_last_dts_idx; + + } *info; + + int pts_wrap_bits; /**< number of bits in pts (used for wrapping control) */ + + // Timestamp generation support: + /** + * Timestamp corresponding to the last dts sync point. + * + * Initialized when AVCodecParserContext.dts_sync_point >= 0 and + * a DTS is received from the underlying container. Otherwise set to + * AV_NOPTS_VALUE by default. + */ + int64_t first_dts; + int64_t cur_dts; + int64_t last_IP_pts; + int last_IP_duration; + + /** + * Number of packets to buffer for codec probing + */ + int probe_packets; + + /** + * Number of frames that have been demuxed during avformat_find_stream_info() + */ + int codec_info_nb_frames; + + /* av_read_frame() support */ + enum AVStreamParseType need_parsing; + struct AVCodecParserContext *parser; + + /** + * last packet in packet_buffer for this stream when muxing. + */ + struct AVPacketList *last_in_packet_buffer; + AVProbeData probe_data; +#define MAX_REORDER_DELAY 16 + int64_t pts_buffer[MAX_REORDER_DELAY+1]; + + AVIndexEntry *index_entries; /**< Only used if the format does not + support seeking natively. */ + int nb_index_entries; + unsigned int index_entries_allocated_size; + + /** + * Stream Identifier + * This is the MPEG-TS stream identifier +1 + * 0 means unknown + */ + int stream_identifier; + + /** + * Details of the MPEG-TS program which created this stream. + */ + int program_num; + int pmt_version; + int pmt_stream_idx; + + int64_t interleaver_chunk_size; + int64_t interleaver_chunk_duration; + + /** + * stream probing state + * -1 -> probing finished + * 0 -> no probing requested + * rest -> perform probing with request_probe being the minimum score to accept. + */ + int request_probe; + /** + * Indicates that everything up to the next keyframe + * should be discarded. + */ + int skip_to_keyframe; + + /** + * Number of samples to skip at the start of the frame decoded from the next packet. + */ + int skip_samples; + + /** + * If not 0, the number of samples that should be skipped from the start of + * the stream (the samples are removed from packets with pts==0, which also + * assumes negative timestamps do not happen). + * Intended for use with formats such as mp3 with ad-hoc gapless audio + * support. + */ + int64_t start_skip_samples; + + /** + * If not 0, the first audio sample that should be discarded from the stream. + * This is broken by design (needs global sample count), but can't be + * avoided for broken by design formats such as mp3 with ad-hoc gapless + * audio support. + */ + int64_t first_discard_sample; + + /** + * The sample after last sample that is intended to be discarded after + * first_discard_sample. Works on frame boundaries only. Used to prevent + * early EOF if the gapless info is broken (considered concatenated mp3s). + */ + int64_t last_discard_sample; + + /** + * Number of internally decoded frames, used internally in libavformat, do not access + * its lifetime differs from info which is why it is not in that structure. + */ + int nb_decoded_frames; + + /** + * Timestamp offset added to timestamps before muxing + */ + int64_t mux_ts_offset; + + /** + * Internal data to check for wrapping of the time stamp + */ + int64_t pts_wrap_reference; + + /** + * Options for behavior, when a wrap is detected. + * + * Defined by AV_PTS_WRAP_ values. + * + * If correction is enabled, there are two possibilities: + * If the first time stamp is near the wrap point, the wrap offset + * will be subtracted, which will create negative time stamps. + * Otherwise the offset will be added. + */ + int pts_wrap_behavior; + + /** + * Internal data to prevent doing update_initial_durations() twice + */ + int update_initial_durations_done; + + /** + * Internal data to generate dts from pts + */ + int64_t pts_reorder_error[MAX_REORDER_DELAY+1]; + uint8_t pts_reorder_error_count[MAX_REORDER_DELAY+1]; + + /** + * Internal data to analyze DTS and detect faulty mpeg streams + */ + int64_t last_dts_for_order_check; + uint8_t dts_ordered; + uint8_t dts_misordered; + + /** + * Internal data to inject global side data + */ + int inject_global_side_data; + + /** + * display aspect ratio (0 if unknown) + * - encoding: unused + * - decoding: Set by libavformat to calculate sample_aspect_ratio internally + */ + AVRational display_aspect_ratio; + + /** + * An opaque field for libavformat internal usage. + * Must not be accessed in any way by callers. + */ + AVStreamInternal *internal; +} AVStream; + +#if FF_API_FORMAT_GET_SET +/** + * Accessors for some AVStream fields. These used to be provided for ABI + * compatibility, and do not need to be used anymore. + */ +attribute_deprecated +AVRational av_stream_get_r_frame_rate(const AVStream *s); +attribute_deprecated +void av_stream_set_r_frame_rate(AVStream *s, AVRational r); +#if FF_API_LAVF_FFSERVER +attribute_deprecated +char* av_stream_get_recommended_encoder_configuration(const AVStream *s); +attribute_deprecated +void av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration); +#endif +#endif + +struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + +/** + * Returns the pts of the last muxed packet + its duration + * + * the retuned value is undefined when used with a demuxer. + */ +int64_t av_stream_get_end_pts(const AVStream *st); + +#define AV_PROGRAM_RUNNING 1 + +/** + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(AVProgram) must not be used outside libav*. + */ +typedef struct AVProgram { + int id; + int flags; + enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller + unsigned int *stream_index; + unsigned int nb_stream_indexes; + AVDictionary *metadata; + + int program_num; + int pmt_pid; + int pcr_pid; + int pmt_version; + + /***************************************************************** + * All fields below this line are not part of the public API. They + * may not be used outside of libavformat and can be changed and + * removed at will. + * New public fields should be added right above. + ***************************************************************** + */ + int64_t start_time; + int64_t end_time; + + int64_t pts_wrap_reference; ///< reference dts for wrap detection + int pts_wrap_behavior; ///< behavior on wrap detection +} AVProgram; + +#define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present + (streams are added dynamically) */ +#define AVFMTCTX_UNSEEKABLE 0x0002 /**< signal that the stream is definitely + not seekable, and attempts to call the + seek function will fail. For some + network protocols (e.g. HLS), this can + change dynamically at runtime. */ + +typedef struct AVChapter { + int id; ///< unique ID to identify the chapter + AVRational time_base; ///< time base in which the start/end timestamps are specified + int64_t start, end; ///< chapter start/end time in time_base units + AVDictionary *metadata; +} AVChapter; + + +/** + * Callback used by devices to communicate with application. + */ +typedef int (*av_format_control_message)(struct AVFormatContext *s, int type, + void *data, size_t data_size); + +typedef int (*AVOpenCallback)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); + +/** + * The duration of a video can be estimated through various ways, and this enum can be used + * to know how the duration was estimated. + */ +enum AVDurationEstimationMethod { + AVFMT_DURATION_FROM_PTS, ///< Duration accurately estimated from PTSes + AVFMT_DURATION_FROM_STREAM, ///< Duration estimated from a stream with a known duration + AVFMT_DURATION_FROM_BITRATE ///< Duration estimated from bitrate (less accurate) +}; + +typedef struct AVFormatInternal AVFormatInternal; + +/** + * Format I/O context. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(AVFormatContext) must not be used outside libav*, use + * avformat_alloc_context() to create an AVFormatContext. + * + * Fields can be accessed through AVOptions (av_opt*), + * the name string used matches the associated command line parameter name and + * can be found in libavformat/options_table.h. + * The AVOption/command line parameter names differ in some cases from the C + * structure field names for historic reasons or brevity. + */ +typedef struct AVFormatContext { + /** + * A class for logging and @ref avoptions. Set by avformat_alloc_context(). + * Exports (de)muxer private options if they exist. + */ + const AVClass *av_class; + + /** + * The input container format. + * + * Demuxing only, set by avformat_open_input(). + */ + ff_const59 struct AVInputFormat *iformat; + + /** + * The output container format. + * + * Muxing only, must be set by the caller before avformat_write_header(). + */ + ff_const59 struct AVOutputFormat *oformat; + + /** + * Format private data. This is an AVOptions-enabled struct + * if and only if iformat/oformat.priv_class is not NULL. + * + * - muxing: set by avformat_write_header() + * - demuxing: set by avformat_open_input() + */ + void *priv_data; + + /** + * I/O context. + * + * - demuxing: either set by the user before avformat_open_input() (then + * the user must close it manually) or set by avformat_open_input(). + * - muxing: set by the user before avformat_write_header(). The caller must + * take care of closing / freeing the IO context. + * + * Do NOT set this field if AVFMT_NOFILE flag is set in + * iformat/oformat.flags. In such a case, the (de)muxer will handle + * I/O in some other way and this field will be NULL. + */ + AVIOContext *pb; + + /* stream info */ + /** + * Flags signalling stream properties. A combination of AVFMTCTX_*. + * Set by libavformat. + */ + int ctx_flags; + + /** + * Number of elements in AVFormatContext.streams. + * + * Set by avformat_new_stream(), must not be modified by any other code. + */ + unsigned int nb_streams; + /** + * A list of all streams in the file. New streams are created with + * avformat_new_stream(). + * + * - demuxing: streams are created by libavformat in avformat_open_input(). + * If AVFMTCTX_NOHEADER is set in ctx_flags, then new streams may also + * appear in av_read_frame(). + * - muxing: streams are created by the user before avformat_write_header(). + * + * Freed by libavformat in avformat_free_context(). + */ + AVStream **streams; + +#if FF_API_FORMAT_FILENAME + /** + * input or output filename + * + * - demuxing: set by avformat_open_input() + * - muxing: may be set by the caller before avformat_write_header() + * + * @deprecated Use url instead. + */ + attribute_deprecated + char filename[1024]; +#endif + + /** + * input or output URL. Unlike the old filename field, this field has no + * length restriction. + * + * - demuxing: set by avformat_open_input(), initialized to an empty + * string if url parameter was NULL in avformat_open_input(). + * - muxing: may be set by the caller before calling avformat_write_header() + * (or avformat_init_output() if that is called first) to a string + * which is freeable by av_free(). Set to an empty string if it + * was NULL in avformat_init_output(). + * + * Freed by libavformat in avformat_free_context(). + */ + char *url; + + /** + * Position of the first frame of the component, in + * AV_TIME_BASE fractional seconds. NEVER set this value directly: + * It is deduced from the AVStream values. + * + * Demuxing only, set by libavformat. + */ + int64_t start_time; + + /** + * Duration of the stream, in AV_TIME_BASE fractional + * seconds. Only set this value if you know none of the individual stream + * durations and also do not set any of them. This is deduced from the + * AVStream values if not set. + * + * Demuxing only, set by libavformat. + */ + int64_t duration; + + /** + * Total stream bitrate in bit/s, 0 if not + * available. Never set it directly if the file_size and the + * duration are known as FFmpeg can compute it automatically. + */ + int64_t bit_rate; + + unsigned int packet_size; + int max_delay; + + /** + * Flags modifying the (de)muxer behaviour. A combination of AVFMT_FLAG_*. + * Set by the user before avformat_open_input() / avformat_write_header(). + */ + int flags; +#define AVFMT_FLAG_GENPTS 0x0001 ///< Generate missing pts even if it requires parsing future frames. +#define AVFMT_FLAG_IGNIDX 0x0002 ///< Ignore index. +#define AVFMT_FLAG_NONBLOCK 0x0004 ///< Do not block when reading packets from input. +#define AVFMT_FLAG_IGNDTS 0x0008 ///< Ignore DTS on frames that contain both DTS & PTS +#define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container +#define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled +#define AVFMT_FLAG_NOBUFFER 0x0040 ///< Do not buffer frames when possible +#define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it. +#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted +#define AVFMT_FLAG_FLUSH_PACKETS 0x0200 ///< Flush the AVIOContext every packet. +/** + * When muxing, try to avoid writing any random/volatile data to the output. + * This includes any random IDs, real-time timestamps/dates, muxer version, etc. + * + * This flag is mainly intended for testing. + */ +#define AVFMT_FLAG_BITEXACT 0x0400 +#if FF_API_LAVF_MP4A_LATM +#define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Deprecated, does nothing. +#endif +#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) +#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted) +#if FF_API_LAVF_KEEPSIDE_FLAG +#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing. +#endif +#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats +#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. +#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer + + /** + * Maximum size of the data read from input for determining + * the input container format. + * Demuxing only, set by the caller before avformat_open_input(). + */ + int64_t probesize; + + /** + * Maximum duration (in AV_TIME_BASE units) of the data read + * from input in avformat_find_stream_info(). + * Demuxing only, set by the caller before avformat_find_stream_info(). + * Can be set to 0 to let avformat choose using a heuristic. + */ + int64_t max_analyze_duration; + + const uint8_t *key; + int keylen; + + unsigned int nb_programs; + AVProgram **programs; + + /** + * Forced video codec_id. + * Demuxing: Set by user. + */ + enum AVCodecID video_codec_id; + + /** + * Forced audio codec_id. + * Demuxing: Set by user. + */ + enum AVCodecID audio_codec_id; + + /** + * Forced subtitle codec_id. + * Demuxing: Set by user. + */ + enum AVCodecID subtitle_codec_id; + + /** + * Maximum amount of memory in bytes to use for the index of each stream. + * If the index exceeds this size, entries will be discarded as + * needed to maintain a smaller size. This can lead to slower or less + * accurate seeking (depends on demuxer). + * Demuxers for which a full in-memory index is mandatory will ignore + * this. + * - muxing: unused + * - demuxing: set by user + */ + unsigned int max_index_size; + + /** + * Maximum amount of memory in bytes to use for buffering frames + * obtained from realtime capture devices. + */ + unsigned int max_picture_buffer; + + /** + * Number of chapters in AVChapter array. + * When muxing, chapters are normally written in the file header, + * so nb_chapters should normally be initialized before write_header + * is called. Some muxers (e.g. mov and mkv) can also write chapters + * in the trailer. To write chapters in the trailer, nb_chapters + * must be zero when write_header is called and non-zero when + * write_trailer is called. + * - muxing: set by user + * - demuxing: set by libavformat + */ + unsigned int nb_chapters; + AVChapter **chapters; + + /** + * Metadata that applies to the whole file. + * + * - demuxing: set by libavformat in avformat_open_input() + * - muxing: may be set by the caller before avformat_write_header() + * + * Freed by libavformat in avformat_free_context(). + */ + AVDictionary *metadata; + + /** + * Start time of the stream in real world time, in microseconds + * since the Unix epoch (00:00 1st January 1970). That is, pts=0 in the + * stream was captured at this real world time. + * - muxing: Set by the caller before avformat_write_header(). If set to + * either 0 or AV_NOPTS_VALUE, then the current wall-time will + * be used. + * - demuxing: Set by libavformat. AV_NOPTS_VALUE if unknown. Note that + * the value may become known after some number of frames + * have been received. + */ + int64_t start_time_realtime; + + /** + * The number of frames used for determining the framerate in + * avformat_find_stream_info(). + * Demuxing only, set by the caller before avformat_find_stream_info(). + */ + int fps_probe_size; + + /** + * Error recognition; higher values will detect more errors but may + * misdetect some more or less valid parts as errors. + * Demuxing only, set by the caller before avformat_open_input(). + */ + int error_recognition; + + /** + * Custom interrupt callbacks for the I/O layer. + * + * demuxing: set by the user before avformat_open_input(). + * muxing: set by the user before avformat_write_header() + * (mainly useful for AVFMT_NOFILE formats). The callback + * should also be passed to avio_open2() if it's used to + * open the file. + */ + AVIOInterruptCB interrupt_callback; + + /** + * Flags to enable debugging. + */ + int debug; +#define FF_FDEBUG_TS 0x0001 + + /** + * Maximum buffering duration for interleaving. + * + * To ensure all the streams are interleaved correctly, + * av_interleaved_write_frame() will wait until it has at least one packet + * for each stream before actually writing any packets to the output file. + * When some streams are "sparse" (i.e. there are large gaps between + * successive packets), this can result in excessive buffering. + * + * This field specifies the maximum difference between the timestamps of the + * first and the last packet in the muxing queue, above which libavformat + * will output a packet regardless of whether it has queued a packet for all + * the streams. + * + * Muxing only, set by the caller before avformat_write_header(). + */ + int64_t max_interleave_delta; + + /** + * Allow non-standard and experimental extension + * @see AVCodecContext.strict_std_compliance + */ + int strict_std_compliance; + + /** + * Flags for the user to detect events happening on the file. Flags must + * be cleared by the user once the event has been handled. + * A combination of AVFMT_EVENT_FLAG_*. + */ + int event_flags; +#define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata. + + /** + * Maximum number of packets to read while waiting for the first timestamp. + * Decoding only. + */ + int max_ts_probe; + + /** + * Avoid negative timestamps during muxing. + * Any value of the AVFMT_AVOID_NEG_TS_* constants. + * Note, this only works when using av_interleaved_write_frame. (interleave_packet_per_dts is in use) + * - muxing: Set by user + * - demuxing: unused + */ + int avoid_negative_ts; +#define AVFMT_AVOID_NEG_TS_AUTO -1 ///< Enabled when required by target format +#define AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE 1 ///< Shift timestamps so they are non negative +#define AVFMT_AVOID_NEG_TS_MAKE_ZERO 2 ///< Shift timestamps so that they start at 0 + + /** + * Transport stream id. + * This will be moved into demuxer private options. Thus no API/ABI compatibility + */ + int ts_id; + + /** + * Audio preload in microseconds. + * Note, not all formats support this and unpredictable things may happen if it is used when not supported. + * - encoding: Set by user + * - decoding: unused + */ + int audio_preload; + + /** + * Max chunk time in microseconds. + * Note, not all formats support this and unpredictable things may happen if it is used when not supported. + * - encoding: Set by user + * - decoding: unused + */ + int max_chunk_duration; + + /** + * Max chunk size in bytes + * Note, not all formats support this and unpredictable things may happen if it is used when not supported. + * - encoding: Set by user + * - decoding: unused + */ + int max_chunk_size; + + /** + * forces the use of wallclock timestamps as pts/dts of packets + * This has undefined results in the presence of B frames. + * - encoding: unused + * - decoding: Set by user + */ + int use_wallclock_as_timestamps; + + /** + * avio flags, used to force AVIO_FLAG_DIRECT. + * - encoding: unused + * - decoding: Set by user + */ + int avio_flags; + + /** + * The duration field can be estimated through various ways, and this field can be used + * to know how the duration was estimated. + * - encoding: unused + * - decoding: Read by user + */ + enum AVDurationEstimationMethod duration_estimation_method; + + /** + * Skip initial bytes when opening stream + * - encoding: unused + * - decoding: Set by user + */ + int64_t skip_initial_bytes; + + /** + * Correct single timestamp overflows + * - encoding: unused + * - decoding: Set by user + */ + unsigned int correct_ts_overflow; + + /** + * Force seeking to any (also non key) frames. + * - encoding: unused + * - decoding: Set by user + */ + int seek2any; + + /** + * Flush the I/O context after each packet. + * - encoding: Set by user + * - decoding: unused + */ + int flush_packets; + + /** + * format probing score. + * The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes + * the format. + * - encoding: unused + * - decoding: set by avformat, read by user + */ + int probe_score; + + /** + * number of bytes to read maximally to identify format. + * - encoding: unused + * - decoding: set by user + */ + int format_probesize; + + /** + * ',' separated list of allowed decoders. + * If NULL then all are allowed + * - encoding: unused + * - decoding: set by user + */ + char *codec_whitelist; + + /** + * ',' separated list of allowed demuxers. + * If NULL then all are allowed + * - encoding: unused + * - decoding: set by user + */ + char *format_whitelist; + + /** + * An opaque field for libavformat internal usage. + * Must not be accessed in any way by callers. + */ + AVFormatInternal *internal; + + /** + * IO repositioned flag. + * This is set by avformat when the underlaying IO context read pointer + * is repositioned, for example when doing byte based seeking. + * Demuxers can use the flag to detect such changes. + */ + int io_repositioned; + + /** + * Forced video codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user + */ + AVCodec *video_codec; + + /** + * Forced audio codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user + */ + AVCodec *audio_codec; + + /** + * Forced subtitle codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user + */ + AVCodec *subtitle_codec; + + /** + * Forced data codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user + */ + AVCodec *data_codec; + + /** + * Number of bytes to be written as padding in a metadata header. + * Demuxing: Unused. + * Muxing: Set by user via av_format_set_metadata_header_padding. + */ + int metadata_header_padding; + + /** + * User data. + * This is a place for some private data of the user. + */ + void *opaque; + + /** + * Callback used by devices to communicate with application. + */ + av_format_control_message control_message_cb; + + /** + * Output timestamp offset, in microseconds. + * Muxing: set by user + */ + int64_t output_ts_offset; + + /** + * dump format separator. + * can be ", " or "\n " or anything else + * - muxing: Set by user. + * - demuxing: Set by user. + */ + uint8_t *dump_separator; + + /** + * Forced Data codec_id. + * Demuxing: Set by user. + */ + enum AVCodecID data_codec_id; + +#if FF_API_OLD_OPEN_CALLBACKS + /** + * Called to open further IO contexts when needed for demuxing. + * + * This can be set by the user application to perform security checks on + * the URLs before opening them. + * The function should behave like avio_open2(), AVFormatContext is provided + * as contextual information and to reach AVFormatContext.opaque. + * + * If NULL then some simple checks are used together with avio_open2(). + * + * Must not be accessed directly from outside avformat. + * @See av_format_set_open_cb() + * + * Demuxing: Set by user. + * + * @deprecated Use io_open and io_close. + */ + attribute_deprecated + int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options); +#endif + + /** + * ',' separated list of allowed protocols. + * - encoding: unused + * - decoding: set by user + */ + char *protocol_whitelist; + + /** + * A callback for opening new IO streams. + * + * Whenever a muxer or a demuxer needs to open an IO stream (typically from + * avformat_open_input() for demuxers, but for certain formats can happen at + * other times as well), it will call this callback to obtain an IO context. + * + * @param s the format context + * @param pb on success, the newly opened IO context should be returned here + * @param url the url to open + * @param flags a combination of AVIO_FLAG_* + * @param options a dictionary of additional options, with the same + * semantics as in avio_open2() + * @return 0 on success, a negative AVERROR code on failure + * + * @note Certain muxers and demuxers do nesting, i.e. they open one or more + * additional internal format contexts. Thus the AVFormatContext pointer + * passed to this callback may be different from the one facing the caller. + * It will, however, have the same 'opaque' field. + */ + int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, + int flags, AVDictionary **options); + + /** + * A callback for closing the streams opened with AVFormatContext.io_open(). + */ + void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); + + /** + * ',' separated list of disallowed protocols. + * - encoding: unused + * - decoding: set by user + */ + char *protocol_blacklist; + + /** + * The maximum number of streams. + * - encoding: unused + * - decoding: set by user + */ + int max_streams; + + /** + * Skip duration calcuation in estimate_timings_from_pts. + * - encoding: unused + * - decoding: set by user + */ + int skip_estimate_duration_from_pts; + + /** + * Maximum number of packets that can be probed + * - encoding: unused + * - decoding: set by user + */ + int max_probe_packets; +} AVFormatContext; + +#if FF_API_FORMAT_GET_SET +/** + * Accessors for some AVFormatContext fields. These used to be provided for ABI + * compatibility, and do not need to be used anymore. + */ +attribute_deprecated +int av_format_get_probe_score(const AVFormatContext *s); +attribute_deprecated +AVCodec * av_format_get_video_codec(const AVFormatContext *s); +attribute_deprecated +void av_format_set_video_codec(AVFormatContext *s, AVCodec *c); +attribute_deprecated +AVCodec * av_format_get_audio_codec(const AVFormatContext *s); +attribute_deprecated +void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c); +attribute_deprecated +AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s); +attribute_deprecated +void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c); +attribute_deprecated +AVCodec * av_format_get_data_codec(const AVFormatContext *s); +attribute_deprecated +void av_format_set_data_codec(AVFormatContext *s, AVCodec *c); +attribute_deprecated +int av_format_get_metadata_header_padding(const AVFormatContext *s); +attribute_deprecated +void av_format_set_metadata_header_padding(AVFormatContext *s, int c); +attribute_deprecated +void * av_format_get_opaque(const AVFormatContext *s); +attribute_deprecated +void av_format_set_opaque(AVFormatContext *s, void *opaque); +attribute_deprecated +av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s); +attribute_deprecated +void av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback); +#if FF_API_OLD_OPEN_CALLBACKS +attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s); +attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback); +#endif +#endif + +/** + * This function will cause global side data to be injected in the next packet + * of each stream as well as after any subsequent seek. + */ +void av_format_inject_global_side_data(AVFormatContext *s); + +/** + * Returns the method used to set ctx->duration. + * + * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE. + */ +enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx); + +typedef struct AVPacketList { + AVPacket pkt; + struct AVPacketList *next; +} AVPacketList; + + +/** + * @defgroup lavf_core Core functions + * @ingroup libavf + * + * Functions for querying libavformat capabilities, allocating core structures, + * etc. + * @{ + */ + +/** + * Return the LIBAVFORMAT_VERSION_INT constant. + */ +unsigned avformat_version(void); + +/** + * Return the libavformat build-time configuration. + */ +const char *avformat_configuration(void); + +/** + * Return the libavformat license. + */ +const char *avformat_license(void); + +#if FF_API_NEXT +/** + * Initialize libavformat and register all the muxers, demuxers and + * protocols. If you do not call this function, then you can select + * exactly which formats you want to support. + * + * @see av_register_input_format() + * @see av_register_output_format() + */ +attribute_deprecated +void av_register_all(void); + +attribute_deprecated +void av_register_input_format(AVInputFormat *format); +attribute_deprecated +void av_register_output_format(AVOutputFormat *format); +#endif + +/** + * Do global initialization of network libraries. This is optional, + * and not recommended anymore. + * + * This functions only exists to work around thread-safety issues + * with older GnuTLS or OpenSSL libraries. If libavformat is linked + * to newer versions of those libraries, or if you do not use them, + * calling this function is unnecessary. Otherwise, you need to call + * this function before any other threads using them are started. + * + * This function will be deprecated once support for older GnuTLS and + * OpenSSL libraries is removed, and this function has no purpose + * anymore. + */ +int avformat_network_init(void); + +/** + * Undo the initialization done by avformat_network_init. Call it only + * once for each time you called avformat_network_init. + */ +int avformat_network_deinit(void); + +#if FF_API_NEXT +/** + * If f is NULL, returns the first registered input format, + * if f is non-NULL, returns the next registered input format after f + * or NULL if f is the last one. + */ +attribute_deprecated +AVInputFormat *av_iformat_next(const AVInputFormat *f); + +/** + * If f is NULL, returns the first registered output format, + * if f is non-NULL, returns the next registered output format after f + * or NULL if f is the last one. + */ +attribute_deprecated +AVOutputFormat *av_oformat_next(const AVOutputFormat *f); +#endif + +/** + * Iterate over all registered muxers. + * + * @param opaque a pointer where libavformat will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered muxer or NULL when the iteration is + * finished + */ +const AVOutputFormat *av_muxer_iterate(void **opaque); + +/** + * Iterate over all registered demuxers. + * + * @param opaque a pointer where libavformat will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered demuxer or NULL when the iteration is + * finished + */ +const AVInputFormat *av_demuxer_iterate(void **opaque); + +/** + * Allocate an AVFormatContext. + * avformat_free_context() can be used to free the context and everything + * allocated by the framework within it. + */ +AVFormatContext *avformat_alloc_context(void); + +/** + * Free an AVFormatContext and all its streams. + * @param s context to free + */ +void avformat_free_context(AVFormatContext *s); + +/** + * Get the AVClass for AVFormatContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *avformat_get_class(void); + +/** + * Add a new stream to a media file. + * + * When demuxing, it is called by the demuxer in read_header(). If the + * flag AVFMTCTX_NOHEADER is set in s.ctx_flags, then it may also + * be called in read_packet(). + * + * When muxing, should be called by the user before avformat_write_header(). + * + * User is required to call avcodec_close() and avformat_free_context() to + * clean up the allocation by avformat_new_stream(). + * + * @param s media file handle + * @param c If non-NULL, the AVCodecContext corresponding to the new stream + * will be initialized to use this codec. This is needed for e.g. codec-specific + * defaults to be set, so codec should be provided if it is known. + * + * @return newly created stream or NULL on error. + */ +AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); + +/** + * Wrap an existing array as stream side data. + * + * @param st stream + * @param type side information type + * @param data the side data array. It must be allocated with the av_malloc() + * family of functions. The ownership of the data is transferred to + * st. + * @param size side information size + * @return zero on success, a negative AVERROR code on failure. On failure, + * the stream is unchanged and the data remains owned by the caller. + */ +int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, + uint8_t *data, size_t size); + +/** + * Allocate new information from stream. + * + * @param stream stream + * @param type desired side information type + * @param size side information size + * @return pointer to fresh allocated data or NULL otherwise + */ +uint8_t *av_stream_new_side_data(AVStream *stream, + enum AVPacketSideDataType type, int size); +/** + * Get side information from stream. + * + * @param stream stream + * @param type desired side information type + * @param size pointer for side information size to store (optional) + * @return pointer to data if present or NULL otherwise + */ +uint8_t *av_stream_get_side_data(const AVStream *stream, + enum AVPacketSideDataType type, int *size); + +AVProgram *av_new_program(AVFormatContext *s, int id); + +/** + * @} + */ + + +/** + * Allocate an AVFormatContext for an output format. + * avformat_free_context() can be used to free the context and + * everything allocated by the framework within it. + * + * @param *ctx is set to the created format context, or to NULL in + * case of failure + * @param oformat format to use for allocating the context, if NULL + * format_name and filename are used instead + * @param format_name the name of output format to use for allocating the + * context, if NULL filename is used instead + * @param filename the name of the filename to use for allocating the + * context, may be NULL + * @return >= 0 in case of success, a negative AVERROR code in case of + * failure + */ +int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 AVOutputFormat *oformat, + const char *format_name, const char *filename); + +/** + * @addtogroup lavf_decoding + * @{ + */ + +/** + * Find AVInputFormat based on the short name of the input format. + */ +ff_const59 AVInputFormat *av_find_input_format(const char *short_name); + +/** + * Guess the file format. + * + * @param pd data to be probed + * @param is_opened Whether the file is already opened; determines whether + * demuxers with or without AVFMT_NOFILE are probed. + */ +ff_const59 AVInputFormat *av_probe_input_format(ff_const59 AVProbeData *pd, int is_opened); + +/** + * Guess the file format. + * + * @param pd data to be probed + * @param is_opened Whether the file is already opened; determines whether + * demuxers with or without AVFMT_NOFILE are probed. + * @param score_max A probe score larger that this is required to accept a + * detection, the variable is set to the actual detection + * score afterwards. + * If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended + * to retry with a larger probe buffer. + */ +ff_const59 AVInputFormat *av_probe_input_format2(ff_const59 AVProbeData *pd, int is_opened, int *score_max); + +/** + * Guess the file format. + * + * @param is_opened Whether the file is already opened; determines whether + * demuxers with or without AVFMT_NOFILE are probed. + * @param score_ret The score of the best detection. + */ +ff_const59 AVInputFormat *av_probe_input_format3(ff_const59 AVProbeData *pd, int is_opened, int *score_ret); + +/** + * Probe a bytestream to determine the input format. Each time a probe returns + * with a score that is too low, the probe buffer size is increased and another + * attempt is made. When the maximum probe size is reached, the input format + * with the highest score is returned. + * + * @param pb the bytestream to probe + * @param fmt the input format is put here + * @param url the url of the stream + * @param logctx the log context + * @param offset the offset within the bytestream to probe from + * @param max_probe_size the maximum probe buffer size (zero for default) + * @return the score in case of success, a negative value corresponding to an + * the maximal score is AVPROBE_SCORE_MAX + * AVERROR code otherwise + */ +int av_probe_input_buffer2(AVIOContext *pb, ff_const59 AVInputFormat **fmt, + const char *url, void *logctx, + unsigned int offset, unsigned int max_probe_size); + +/** + * Like av_probe_input_buffer2() but returns 0 on success + */ +int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt, + const char *url, void *logctx, + unsigned int offset, unsigned int max_probe_size); + +/** + * Open an input stream and read the header. The codecs are not opened. + * The stream must be closed with avformat_close_input(). + * + * @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context). + * May be a pointer to NULL, in which case an AVFormatContext is allocated by this + * function and written into ps. + * Note that a user-supplied AVFormatContext will be freed on failure. + * @param url URL of the stream to open. + * @param fmt If non-NULL, this parameter forces a specific input format. + * Otherwise the format is autodetected. + * @param options A dictionary filled with AVFormatContext and demuxer-private options. + * On return this parameter will be destroyed and replaced with a dict containing + * options that were not found. May be NULL. + * + * @return 0 on success, a negative AVERROR on failure. + * + * @note If you want to use custom IO, preallocate the format context and set its pb field. + */ +int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options); + +attribute_deprecated +int av_demuxer_open(AVFormatContext *ic); + +/** + * Read packets of a media file to get stream information. This + * is useful for file formats with no headers such as MPEG. This + * function also computes the real framerate in case of MPEG-2 repeat + * frame mode. + * The logical file position is not changed by this function; + * examined packets may be buffered for later processing. + * + * @param ic media file handle + * @param options If non-NULL, an ic.nb_streams long array of pointers to + * dictionaries, where i-th member contains options for + * codec corresponding to i-th stream. + * On return each dictionary will be filled with options that were not found. + * @return >=0 if OK, AVERROR_xxx on error + * + * @note this function isn't guaranteed to open all the codecs, so + * options being non-empty at return is a perfectly normal behavior. + * + * @todo Let the user decide somehow what information is needed so that + * we do not waste time getting stuff the user does not need. + */ +int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options); + +/** + * Find the programs which belong to a given stream. + * + * @param ic media file handle + * @param last the last found program, the search will start after this + * program, or from the beginning if it is NULL + * @param s stream index + * @return the next program which belongs to s, NULL if no program is found or + * the last program is not among the programs of ic. + */ +AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int s); + +void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx); + +/** + * Find the "best" stream in the file. + * The best stream is determined according to various heuristics as the most + * likely to be what the user expects. + * If the decoder parameter is non-NULL, av_find_best_stream will find the + * default decoder for the stream's codec; streams for which no decoder can + * be found are ignored. + * + * @param ic media file handle + * @param type stream type: video, audio, subtitles, etc. + * @param wanted_stream_nb user-requested stream number, + * or -1 for automatic selection + * @param related_stream try to find a stream related (eg. in the same + * program) to this one, or -1 if none + * @param decoder_ret if non-NULL, returns the decoder for the + * selected stream + * @param flags flags; none are currently defined + * @return the non-negative stream number in case of success, + * AVERROR_STREAM_NOT_FOUND if no stream with the requested type + * could be found, + * AVERROR_DECODER_NOT_FOUND if streams were found but no decoder + * @note If av_find_best_stream returns successfully and decoder_ret is not + * NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec. + */ +int av_find_best_stream(AVFormatContext *ic, + enum AVMediaType type, + int wanted_stream_nb, + int related_stream, + AVCodec **decoder_ret, + int flags); + +/** + * Return the next frame of a stream. + * This function returns what is stored in the file, and does not validate + * that what is there are valid frames for the decoder. It will split what is + * stored in the file into frames and return one for each call. It will not + * omit invalid data between valid frames so as to give the decoder the maximum + * information possible for decoding. + * + * On success, the returned packet is reference-counted (pkt->buf is set) and + * valid indefinitely. The packet must be freed with av_packet_unref() when + * it is no longer needed. For video, the packet contains exactly one frame. + * For audio, it contains an integer number of frames if each frame has + * a known fixed size (e.g. PCM or ADPCM data). If the audio frames have + * a variable size (e.g. MPEG audio), then it contains one frame. + * + * pkt->pts, pkt->dts and pkt->duration are always set to correct + * values in AVStream.time_base units (and guessed if the format cannot + * provide them). pkt->pts can be AV_NOPTS_VALUE if the video format + * has B-frames, so it is better to rely on pkt->dts if you do not + * decompress the payload. + * + * @return 0 if OK, < 0 on error or end of file. On error, pkt will be blank + * (as if it came from av_packet_alloc()). + * + * @note pkt will be initialized, so it may be uninitialized, but it must not + * contain data that needs to be freed. + */ +int av_read_frame(AVFormatContext *s, AVPacket *pkt); + +/** + * Seek to the keyframe at timestamp. + * 'timestamp' in 'stream_index'. + * + * @param s media file handle + * @param stream_index If stream_index is (-1), a default + * stream is selected, and timestamp is automatically converted + * from AV_TIME_BASE units to the stream specific time_base. + * @param timestamp Timestamp in AVStream.time_base units + * or, if no stream is specified, in AV_TIME_BASE units. + * @param flags flags which select direction and seeking mode + * @return >= 0 on success + */ +int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, + int flags); + +/** + * Seek to timestamp ts. + * Seeking will be done so that the point from which all active streams + * can be presented successfully will be closest to ts and within min/max_ts. + * Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. + * + * If flags contain AVSEEK_FLAG_BYTE, then all timestamps are in bytes and + * are the file position (this may not be supported by all demuxers). + * If flags contain AVSEEK_FLAG_FRAME, then all timestamps are in frames + * in the stream with stream_index (this may not be supported by all demuxers). + * Otherwise all timestamps are in units of the stream selected by stream_index + * or if stream_index is -1, in AV_TIME_BASE units. + * If flags contain AVSEEK_FLAG_ANY, then non-keyframes are treated as + * keyframes (this may not be supported by all demuxers). + * If flags contain AVSEEK_FLAG_BACKWARD, it is ignored. + * + * @param s media file handle + * @param stream_index index of the stream which is used as time base reference + * @param min_ts smallest acceptable timestamp + * @param ts target timestamp + * @param max_ts largest acceptable timestamp + * @param flags flags + * @return >=0 on success, error code otherwise + * + * @note This is part of the new seek API which is still under construction. + */ +int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags); + +/** + * Discard all internally buffered data. This can be useful when dealing with + * discontinuities in the byte stream. Generally works only with formats that + * can resync. This includes headerless formats like MPEG-TS/TS but should also + * work with NUT, Ogg and in a limited way AVI for example. + * + * The set of streams, the detected duration, stream parameters and codecs do + * not change when calling this function. If you want a complete reset, it's + * better to open a new AVFormatContext. + * + * This does not flush the AVIOContext (s->pb). If necessary, call + * avio_flush(s->pb) before calling this function. + * + * @param s media file handle + * @return >=0 on success, error code otherwise + */ +int avformat_flush(AVFormatContext *s); + +/** + * Start playing a network-based stream (e.g. RTSP stream) at the + * current position. + */ +int av_read_play(AVFormatContext *s); + +/** + * Pause a network-based stream (e.g. RTSP stream). + * + * Use av_read_play() to resume it. + */ +int av_read_pause(AVFormatContext *s); + +/** + * Close an opened input AVFormatContext. Free it and all its contents + * and set *s to NULL. + */ +void avformat_close_input(AVFormatContext **s); +/** + * @} + */ + +#define AVSEEK_FLAG_BACKWARD 1 ///< seek backward +#define AVSEEK_FLAG_BYTE 2 ///< seeking based on position in bytes +#define AVSEEK_FLAG_ANY 4 ///< seek to any frame, even non-keyframes +#define AVSEEK_FLAG_FRAME 8 ///< seeking based on frame number + +/** + * @addtogroup lavf_encoding + * @{ + */ + +#define AVSTREAM_INIT_IN_WRITE_HEADER 0 ///< stream parameters initialized in avformat_write_header +#define AVSTREAM_INIT_IN_INIT_OUTPUT 1 ///< stream parameters initialized in avformat_init_output + +/** + * Allocate the stream private data and write the stream header to + * an output media file. + * + * @param s Media file handle, must be allocated with avformat_alloc_context(). + * Its oformat field must be set to the desired output format; + * Its pb field must be set to an already opened AVIOContext. + * @param options An AVDictionary filled with AVFormatContext and muxer-private options. + * On return this parameter will be destroyed and replaced with a dict containing + * options that were not found. May be NULL. + * + * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, + * AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, + * negative AVERROR on failure. + * + * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_init_output. + */ +av_warn_unused_result +int avformat_write_header(AVFormatContext *s, AVDictionary **options); + +/** + * Allocate the stream private data and initialize the codec, but do not write the header. + * May optionally be used before avformat_write_header to initialize stream parameters + * before actually writing the header. + * If using this function, do not pass the same options to avformat_write_header. + * + * @param s Media file handle, must be allocated with avformat_alloc_context(). + * Its oformat field must be set to the desired output format; + * Its pb field must be set to an already opened AVIOContext. + * @param options An AVDictionary filled with AVFormatContext and muxer-private options. + * On return this parameter will be destroyed and replaced with a dict containing + * options that were not found. May be NULL. + * + * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, + * AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, + * negative AVERROR on failure. + * + * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header. + */ +av_warn_unused_result +int avformat_init_output(AVFormatContext *s, AVDictionary **options); + +/** + * Write a packet to an output media file. + * + * This function passes the packet directly to the muxer, without any buffering + * or reordering. The caller is responsible for correctly interleaving the + * packets if the format requires it. Callers that want libavformat to handle + * the interleaving should call av_interleaved_write_frame() instead of this + * function. + * + * @param s media file handle + * @param pkt The packet containing the data to be written. Note that unlike + * av_interleaved_write_frame(), this function does not take + * ownership of the packet passed to it (though some muxers may make + * an internal reference to the input packet). + *
+ * This parameter can be NULL (at any time, not just at the end), in + * order to immediately flush data buffered within the muxer, for + * muxers that buffer up data internally before writing it to the + * output. + *
+ * Packet's @ref AVPacket.stream_index "stream_index" field must be + * set to the index of the corresponding stream in @ref + * AVFormatContext.streams "s->streams". + *
+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts") + * must be set to correct values in the stream's timebase (unless the + * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then + * they can be set to AV_NOPTS_VALUE). + * The dts for subsequent packets passed to this function must be strictly + * increasing when compared in their respective timebases (unless the + * output format is flagged with the AVFMT_TS_NONSTRICT, then they + * merely have to be nondecreasing). @ref AVPacket.duration + * "duration") should also be set if known. + * @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush + * + * @see av_interleaved_write_frame() + */ +int av_write_frame(AVFormatContext *s, AVPacket *pkt); + +/** + * Write a packet to an output media file ensuring correct interleaving. + * + * This function will buffer the packets internally as needed to make sure the + * packets in the output file are properly interleaved in the order of + * increasing dts. Callers doing their own interleaving should call + * av_write_frame() instead of this function. + * + * Using this function instead of av_write_frame() can give muxers advance + * knowledge of future packets, improving e.g. the behaviour of the mp4 + * muxer for VFR content in fragmenting mode. + * + * @param s media file handle + * @param pkt The packet containing the data to be written. + *
+ * If the packet is reference-counted, this function will take + * ownership of this reference and unreference it later when it sees + * fit. + * The caller must not access the data through this reference after + * this function returns. If the packet is not reference-counted, + * libavformat will make a copy. + *
+ * This parameter can be NULL (at any time, not just at the end), to + * flush the interleaving queues. + *
+ * Packet's @ref AVPacket.stream_index "stream_index" field must be + * set to the index of the corresponding stream in @ref + * AVFormatContext.streams "s->streams". + *
+ * The timestamps (@ref AVPacket.pts "pts", @ref AVPacket.dts "dts") + * must be set to correct values in the stream's timebase (unless the + * output format is flagged with the AVFMT_NOTIMESTAMPS flag, then + * they can be set to AV_NOPTS_VALUE). + * The dts for subsequent packets in one stream must be strictly + * increasing (unless the output format is flagged with the + * AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing). + * @ref AVPacket.duration "duration") should also be set if known. + * + * @return 0 on success, a negative AVERROR on error. Libavformat will always + * take care of freeing the packet, even if this function fails. + * + * @see av_write_frame(), AVFormatContext.max_interleave_delta + */ +int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); + +/** + * Write an uncoded frame to an output media file. + * + * The frame must be correctly interleaved according to the container + * specification; if not, av_interleaved_write_uncoded_frame() must be used. + * + * See av_interleaved_write_uncoded_frame() for details. + */ +int av_write_uncoded_frame(AVFormatContext *s, int stream_index, + AVFrame *frame); + +/** + * Write an uncoded frame to an output media file. + * + * If the muxer supports it, this function makes it possible to write an AVFrame + * structure directly, without encoding it into a packet. + * It is mostly useful for devices and similar special muxers that use raw + * video or PCM data and will not serialize it into a byte stream. + * + * To test whether it is possible to use it with a given muxer and stream, + * use av_write_uncoded_frame_query(). + * + * The caller gives up ownership of the frame and must not access it + * afterwards. + * + * @return >=0 for success, a negative code on error + */ +int av_interleaved_write_uncoded_frame(AVFormatContext *s, int stream_index, + AVFrame *frame); + +/** + * Test whether a muxer supports uncoded frame. + * + * @return >=0 if an uncoded frame can be written to that muxer and stream, + * <0 if not + */ +int av_write_uncoded_frame_query(AVFormatContext *s, int stream_index); + +/** + * Write the stream trailer to an output media file and free the + * file private data. + * + * May only be called after a successful call to avformat_write_header. + * + * @param s media file handle + * @return 0 if OK, AVERROR_xxx on error + */ +int av_write_trailer(AVFormatContext *s); + +/** + * Return the output format in the list of registered output formats + * which best matches the provided parameters, or return NULL if + * there is no match. + * + * @param short_name if non-NULL checks if short_name matches with the + * names of the registered formats + * @param filename if non-NULL checks if filename terminates with the + * extensions of the registered formats + * @param mime_type if non-NULL checks if mime_type matches with the + * MIME type of the registered formats + */ +ff_const59 AVOutputFormat *av_guess_format(const char *short_name, + const char *filename, + const char *mime_type); + +/** + * Guess the codec ID based upon muxer and filename. + */ +enum AVCodecID av_guess_codec(ff_const59 AVOutputFormat *fmt, const char *short_name, + const char *filename, const char *mime_type, + enum AVMediaType type); + +/** + * Get timing information for the data currently output. + * The exact meaning of "currently output" depends on the format. + * It is mostly relevant for devices that have an internal buffer and/or + * work in real time. + * @param s media file handle + * @param stream stream in the media file + * @param[out] dts DTS of the last packet output for the stream, in stream + * time_base units + * @param[out] wall absolute time when that packet whas output, + * in microsecond + * @return 0 if OK, AVERROR(ENOSYS) if the format does not support it + * Note: some formats or devices may not allow to measure dts and wall + * atomically. + */ +int av_get_output_timestamp(struct AVFormatContext *s, int stream, + int64_t *dts, int64_t *wall); + + +/** + * @} + */ + + +/** + * @defgroup lavf_misc Utility functions + * @ingroup libavf + * @{ + * + * Miscellaneous utility functions related to both muxing and demuxing + * (or neither). + */ + +/** + * Send a nice hexadecimal dump of a buffer to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. + * @param buf buffer + * @param size buffer size + * + * @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2 + */ +void av_hex_dump(FILE *f, const uint8_t *buf, int size); + +/** + * Send a nice hexadecimal dump of a buffer to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param buf buffer + * @param size buffer size + * + * @see av_hex_dump, av_pkt_dump2, av_pkt_dump_log2 + */ +void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size); + +/** + * Send a nice dump of a packet to the specified file stream. + * + * @param f The file stream pointer where the dump should be sent to. + * @param pkt packet to dump + * @param dump_payload True if the payload must be displayed, too. + * @param st AVStream that the packet belongs to + */ +void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st); + + +/** + * Send a nice dump of a packet to the log. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message, lower values signifying + * higher importance. + * @param pkt packet to dump + * @param dump_payload True if the payload must be displayed, too. + * @param st AVStream that the packet belongs to + */ +void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, + const AVStream *st); + +/** + * Get the AVCodecID for the given codec tag tag. + * If no codec id is found returns AV_CODEC_ID_NONE. + * + * @param tags list of supported codec_id-codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param tag codec tag to match to a codec ID + */ +enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag); + +/** + * Get the codec tag for the given codec id id. + * If no codec tag is found returns 0. + * + * @param tags list of supported codec_id-codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param id codec ID to match to a codec tag + */ +unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id); + +/** + * Get the codec tag for the given codec id. + * + * @param tags list of supported codec_id - codec_tag pairs, as stored + * in AVInputFormat.codec_tag and AVOutputFormat.codec_tag + * @param id codec id that should be searched for in the list + * @param tag A pointer to the found tag + * @return 0 if id was not found in tags, > 0 if it was found + */ +int av_codec_get_tag2(const struct AVCodecTag * const *tags, enum AVCodecID id, + unsigned int *tag); + +int av_find_default_stream_index(AVFormatContext *s); + +/** + * Get the index for a specific timestamp. + * + * @param st stream that the timestamp belongs to + * @param timestamp timestamp to retrieve the index for + * @param flags if AVSEEK_FLAG_BACKWARD then the returned index will correspond + * to the timestamp which is <= the requested one, if backward + * is 0, then it will be >= + * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise + * @return < 0 if no such timestamp could be found + */ +int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); + +/** + * Add an index entry into a sorted list. Update the entry if the list + * already contains it. + * + * @param timestamp timestamp in the time base of the given stream + */ +int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, + int size, int distance, int flags); + + +/** + * Split a URL string into components. + * + * The pointers to buffers for storing individual components may be null, + * in order to ignore that component. Buffers for components not found are + * set to empty strings. If the port is not found, it is set to a negative + * value. + * + * @param proto the buffer for the protocol + * @param proto_size the size of the proto buffer + * @param authorization the buffer for the authorization + * @param authorization_size the size of the authorization buffer + * @param hostname the buffer for the host name + * @param hostname_size the size of the hostname buffer + * @param port_ptr a pointer to store the port number in + * @param path the buffer for the path + * @param path_size the size of the path buffer + * @param url the URL to split + */ +void av_url_split(char *proto, int proto_size, + char *authorization, int authorization_size, + char *hostname, int hostname_size, + int *port_ptr, + char *path, int path_size, + const char *url); + + +/** + * Print detailed information about the input or output format, such as + * duration, bitrate, streams, container, programs, metadata, side data, + * codec and time base. + * + * @param ic the context to analyze + * @param index index of the stream to dump information about + * @param url the URL to print, such as source or destination file + * @param is_output Select whether the specified context is an input(0) or output(1) + */ +void av_dump_format(AVFormatContext *ic, + int index, + const char *url, + int is_output); + + +#define AV_FRAME_FILENAME_FLAGS_MULTIPLE 1 ///< Allow multiple %d + +/** + * Return in 'buf' the path with '%d' replaced by a number. + * + * Also handles the '%0nd' format where 'n' is the total number + * of digits and '%%'. + * + * @param buf destination buffer + * @param buf_size destination buffer size + * @param path numbered sequence string + * @param number frame number + * @param flags AV_FRAME_FILENAME_FLAGS_* + * @return 0 if OK, -1 on format error + */ +int av_get_frame_filename2(char *buf, int buf_size, + const char *path, int number, int flags); + +int av_get_frame_filename(char *buf, int buf_size, + const char *path, int number); + +/** + * Check whether filename actually is a numbered sequence generator. + * + * @param filename possible numbered sequence string + * @return 1 if a valid numbered sequence string, 0 otherwise + */ +int av_filename_number_test(const char *filename); + +/** + * Generate an SDP for an RTP session. + * + * Note, this overwrites the id values of AVStreams in the muxer contexts + * for getting unique dynamic payload types. + * + * @param ac array of AVFormatContexts describing the RTP streams. If the + * array is composed by only one context, such context can contain + * multiple AVStreams (one AVStream per RTP stream). Otherwise, + * all the contexts in the array (an AVCodecContext per RTP stream) + * must contain only one AVStream. + * @param n_files number of AVCodecContexts contained in ac + * @param buf buffer where the SDP will be stored (must be allocated by + * the caller) + * @param size the size of the buffer + * @return 0 if OK, AVERROR_xxx on error + */ +int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size); + +/** + * Return a positive value if the given filename has one of the given + * extensions, 0 otherwise. + * + * @param filename file name to check against the given extensions + * @param extensions a comma-separated list of filename extensions + */ +int av_match_ext(const char *filename, const char *extensions); + +/** + * Test if the given container can store a codec. + * + * @param ofmt container to check for compatibility + * @param codec_id codec to potentially store in container + * @param std_compliance standards compliance level, one of FF_COMPLIANCE_* + * + * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. + * A negative number if this information is not available. + */ +int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id, + int std_compliance); + +/** + * @defgroup riff_fourcc RIFF FourCCs + * @{ + * Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are + * meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the + * following code: + * @code + * uint32_t tag = MKTAG('H', '2', '6', '4'); + * const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 }; + * enum AVCodecID id = av_codec_get_id(table, tag); + * @endcode + */ +/** + * @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID. + */ +const struct AVCodecTag *avformat_get_riff_video_tags(void); +/** + * @return the table mapping RIFF FourCCs for audio to AVCodecID. + */ +const struct AVCodecTag *avformat_get_riff_audio_tags(void); +/** + * @return the table mapping MOV FourCCs for video to libavcodec AVCodecID. + */ +const struct AVCodecTag *avformat_get_mov_video_tags(void); +/** + * @return the table mapping MOV FourCCs for audio to AVCodecID. + */ +const struct AVCodecTag *avformat_get_mov_audio_tags(void); + +/** + * @} + */ + +/** + * Guess the sample aspect ratio of a frame, based on both the stream and the + * frame aspect ratio. + * + * Since the frame aspect ratio is set by the codec but the stream aspect ratio + * is set by the demuxer, these two may not be equal. This function tries to + * return the value that you should use if you would like to display the frame. + * + * Basic logic is to use the stream aspect ratio if it is set to something sane + * otherwise use the frame aspect ratio. This way a container setting, which is + * usually easy to modify can override the coded value in the frames. + * + * @param format the format context which the stream is part of + * @param stream the stream which the frame is part of + * @param frame the frame with the aspect ratio to be determined + * @return the guessed (valid) sample_aspect_ratio, 0/1 if no idea + */ +AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame); + +/** + * Guess the frame rate, based on both the container and codec information. + * + * @param ctx the format context which the stream is part of + * @param stream the stream which the frame is part of + * @param frame the frame for which the frame rate should be determined, may be NULL + * @return the guessed (valid) frame rate, 0/1 if no idea + */ +AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame); + +/** + * Check if the stream st contained in s is matched by the stream specifier + * spec. + * + * See the "stream specifiers" chapter in the documentation for the syntax + * of spec. + * + * @return >0 if st is matched by spec; + * 0 if st is not matched by spec; + * AVERROR code if spec is invalid + * + * @note A stream specifier can match several streams in the format. + */ +int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, + const char *spec); + +int avformat_queue_attached_pictures(AVFormatContext *s); + +#if FF_API_OLD_BSF +/** + * Apply a list of bitstream filters to a packet. + * + * @param codec AVCodecContext, usually from an AVStream + * @param pkt the packet to apply filters to. If, on success, the returned + * packet has size == 0 and side_data_elems == 0, it indicates that + * the packet should be dropped + * @param bsfc a NULL-terminated list of filters to apply + * @return >=0 on success; + * AVERROR code on failure + */ +attribute_deprecated +int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, + AVBitStreamFilterContext *bsfc); +#endif + +enum AVTimebaseSource { + AVFMT_TBCF_AUTO = -1, + AVFMT_TBCF_DECODER, + AVFMT_TBCF_DEMUXER, +#if FF_API_R_FRAME_RATE + AVFMT_TBCF_R_FRAMERATE, +#endif +}; + +/** + * Transfer internal timing information from one stream to another. + * + * This function is useful when doing stream copy. + * + * @param ofmt target output format for ost + * @param ost output stream which needs timings copy and adjustments + * @param ist reference input stream to copy timings from + * @param copy_tb define from where the stream codec timebase needs to be imported + */ +int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, + AVStream *ost, const AVStream *ist, + enum AVTimebaseSource copy_tb); + +/** + * Get the internal codec timebase from a stream. + * + * @param st input stream to extract the timebase from + */ +AVRational av_stream_get_codec_timebase(const AVStream *st); + +/** + * @} + */ + +#endif /* AVFORMAT_AVFORMAT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avi.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avi.h new file mode 100644 index 00000000..b1711f0c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avi.h @@ -0,0 +1,41 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AVI_H +#define AVFORMAT_AVI_H + +#define AVIF_HASINDEX 0x00000010 // Index at end of file? +#define AVIF_MUSTUSEINDEX 0x00000020 +#define AVIF_ISINTERLEAVED 0x00000100 +#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames? +#define AVIF_WASCAPTUREFILE 0x00010000 +#define AVIF_COPYRIGHTED 0x00020000 + +#define AVI_MAX_RIFF_SIZE 0x40000000LL +#define AVI_MAX_STREAM_COUNT 100 + +/* stream header flags */ +#define AVISF_VIDEO_PALCHANGES 0x00010000 + +/* index flags */ +#define AVIIF_INDEX 0x00000010 +#define AVIIF_NO_TIME 0x00000100 + +#endif /* AVFORMAT_AVI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio.h new file mode 100644 index 00000000..d022820a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio.h @@ -0,0 +1,888 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_AVIO_H +#define AVFORMAT_AVIO_H + +/** + * @file + * @ingroup lavf_io + * Buffered I/O operations + */ + +#include + +#include "libavutil/common.h" +#include "libavutil/dict.h" +#include "libavutil/log.h" + +#include "libavformat/version.h" + +/** + * Seeking works like for a local file. + */ +#define AVIO_SEEKABLE_NORMAL (1 << 0) + +/** + * Seeking by timestamp with avio_seek_time() is possible. + */ +#define AVIO_SEEKABLE_TIME (1 << 1) + +/** + * Callback for checking whether to abort blocking functions. + * AVERROR_EXIT is returned in this case by the interrupted + * function. During blocking operations, callback is called with + * opaque as parameter. If the callback returns 1, the + * blocking operation will be aborted. + * + * No members can be added to this struct without a major bump, if + * new elements have been added after this struct in AVFormatContext + * or AVIOContext. + */ +typedef struct AVIOInterruptCB { + int (*callback)(void*); + void *opaque; +} AVIOInterruptCB; + +/** + * Directory entry types. + */ +enum AVIODirEntryType { + AVIO_ENTRY_UNKNOWN, + AVIO_ENTRY_BLOCK_DEVICE, + AVIO_ENTRY_CHARACTER_DEVICE, + AVIO_ENTRY_DIRECTORY, + AVIO_ENTRY_NAMED_PIPE, + AVIO_ENTRY_SYMBOLIC_LINK, + AVIO_ENTRY_SOCKET, + AVIO_ENTRY_FILE, + AVIO_ENTRY_SERVER, + AVIO_ENTRY_SHARE, + AVIO_ENTRY_WORKGROUP, +}; + +/** + * Describes single entry of the directory. + * + * Only name and type fields are guaranteed be set. + * Rest of fields are protocol or/and platform dependent and might be unknown. + */ +typedef struct AVIODirEntry { + char *name; /**< Filename */ + int type; /**< Type of the entry */ + int utf8; /**< Set to 1 when name is encoded with UTF-8, 0 otherwise. + Name can be encoded with UTF-8 even though 0 is set. */ + int64_t size; /**< File size in bytes, -1 if unknown. */ + int64_t modification_timestamp; /**< Time of last modification in microseconds since unix + epoch, -1 if unknown. */ + int64_t access_timestamp; /**< Time of last access in microseconds since unix epoch, + -1 if unknown. */ + int64_t status_change_timestamp; /**< Time of last status change in microseconds since unix + epoch, -1 if unknown. */ + int64_t user_id; /**< User ID of owner, -1 if unknown. */ + int64_t group_id; /**< Group ID of owner, -1 if unknown. */ + int64_t filemode; /**< Unix file mode, -1 if unknown. */ +} AVIODirEntry; + +typedef struct AVIODirContext { + struct URLContext *url_context; +} AVIODirContext; + +/** + * Different data types that can be returned via the AVIO + * write_data_type callback. + */ +enum AVIODataMarkerType { + /** + * Header data; this needs to be present for the stream to be decodeable. + */ + AVIO_DATA_MARKER_HEADER, + /** + * A point in the output bytestream where a decoder can start decoding + * (i.e. a keyframe). A demuxer/decoder given the data flagged with + * AVIO_DATA_MARKER_HEADER, followed by any AVIO_DATA_MARKER_SYNC_POINT, + * should give decodeable results. + */ + AVIO_DATA_MARKER_SYNC_POINT, + /** + * A point in the output bytestream where a demuxer can start parsing + * (for non self synchronizing bytestream formats). That is, any + * non-keyframe packet start point. + */ + AVIO_DATA_MARKER_BOUNDARY_POINT, + /** + * This is any, unlabelled data. It can either be a muxer not marking + * any positions at all, it can be an actual boundary/sync point + * that the muxer chooses not to mark, or a later part of a packet/fragment + * that is cut into multiple write callbacks due to limited IO buffer size. + */ + AVIO_DATA_MARKER_UNKNOWN, + /** + * Trailer data, which doesn't contain actual content, but only for + * finalizing the output file. + */ + AVIO_DATA_MARKER_TRAILER, + /** + * A point in the output bytestream where the underlying AVIOContext might + * flush the buffer depending on latency or buffering requirements. Typically + * means the end of a packet. + */ + AVIO_DATA_MARKER_FLUSH_POINT, +}; + +/** + * Bytestream IO Context. + * New fields can be added to the end with minor version bumps. + * Removal, reordering and changes to existing fields require a major + * version bump. + * sizeof(AVIOContext) must not be used outside libav*. + * + * @note None of the function pointers in AVIOContext should be called + * directly, they should only be set by the client application + * when implementing custom I/O. Normally these are set to the + * function pointers specified in avio_alloc_context() + */ +typedef struct AVIOContext { + /** + * A class for private options. + * + * If this AVIOContext is created by avio_open2(), av_class is set and + * passes the options down to protocols. + * + * If this AVIOContext is manually allocated, then av_class may be set by + * the caller. + * + * warning -- this field can be NULL, be sure to not pass this AVIOContext + * to any av_opt_* functions in that case. + */ + const AVClass *av_class; + + /* + * The following shows the relationship between buffer, buf_ptr, + * buf_ptr_max, buf_end, buf_size, and pos, when reading and when writing + * (since AVIOContext is used for both): + * + ********************************************************************************** + * READING + ********************************************************************************** + * + * | buffer_size | + * |---------------------------------------| + * | | + * + * buffer buf_ptr buf_end + * +---------------+-----------------------+ + * |/ / / / / / / /|/ / / / / / /| | + * read buffer: |/ / consumed / | to be read /| | + * |/ / / / / / / /|/ / / / / / /| | + * +---------------+-----------------------+ + * + * pos + * +-------------------------------------------+-----------------+ + * input file: | | | + * +-------------------------------------------+-----------------+ + * + * + ********************************************************************************** + * WRITING + ********************************************************************************** + * + * | buffer_size | + * |--------------------------------------| + * | | + * + * buf_ptr_max + * buffer (buf_ptr) buf_end + * +-----------------------+--------------+ + * |/ / / / / / / / / / / /| | + * write buffer: | / / to be flushed / / | | + * |/ / / / / / / / / / / /| | + * +-----------------------+--------------+ + * buf_ptr can be in this + * due to a backward seek + * + * pos + * +-------------+----------------------------------------------+ + * output file: | | | + * +-------------+----------------------------------------------+ + * + */ + unsigned char *buffer; /**< Start of the buffer. */ + int buffer_size; /**< Maximum buffer size */ + unsigned char *buf_ptr; /**< Current position in the buffer */ + unsigned char *buf_end; /**< End of the data, may be less than + buffer+buffer_size if the read function returned + less data than requested, e.g. for streams where + no more data has been received yet. */ + void *opaque; /**< A private pointer, passed to the read/write/seek/... + functions. */ + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size); + int (*write_packet)(void *opaque, uint8_t *buf, int buf_size); + int64_t (*seek)(void *opaque, int64_t offset, int whence); + int64_t pos; /**< position in the file of the current buffer */ + int eof_reached; /**< true if was unable to read due to error or eof */ + int write_flag; /**< true if open for writing */ + int max_packet_size; + unsigned long checksum; + unsigned char *checksum_ptr; + unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size); + int error; /**< contains the error code or 0 if no error happened */ + /** + * Pause or resume playback for network streaming protocols - e.g. MMS. + */ + int (*read_pause)(void *opaque, int pause); + /** + * Seek to a given timestamp in stream with the specified stream_index. + * Needed for some network streaming protocols which don't support seeking + * to byte position. + */ + int64_t (*read_seek)(void *opaque, int stream_index, + int64_t timestamp, int flags); + /** + * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable. + */ + int seekable; + + /** + * max filesize, used to limit allocations + * This field is internal to libavformat and access from outside is not allowed. + */ + int64_t maxsize; + + /** + * avio_read and avio_write should if possible be satisfied directly + * instead of going through a buffer, and avio_seek will always + * call the underlying seek function directly. + */ + int direct; + + /** + * Bytes read statistic + * This field is internal to libavformat and access from outside is not allowed. + */ + int64_t bytes_read; + + /** + * seek statistic + * This field is internal to libavformat and access from outside is not allowed. + */ + int seek_count; + + /** + * writeout statistic + * This field is internal to libavformat and access from outside is not allowed. + */ + int writeout_count; + + /** + * Original buffer size + * used internally after probing and ensure seekback to reset the buffer size + * This field is internal to libavformat and access from outside is not allowed. + */ + int orig_buffer_size; + + /** + * Threshold to favor readahead over seek. + * This is current internal only, do not use from outside. + */ + int short_seek_threshold; + + /** + * ',' separated list of allowed protocols. + */ + const char *protocol_whitelist; + + /** + * ',' separated list of disallowed protocols. + */ + const char *protocol_blacklist; + + /** + * A callback that is used instead of write_packet. + */ + int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size, + enum AVIODataMarkerType type, int64_t time); + /** + * If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT, + * but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly + * small chunks of data returned from the callback). + */ + int ignore_boundary_point; + + /** + * Internal, not meant to be used from outside of AVIOContext. + */ + enum AVIODataMarkerType current_type; + int64_t last_time; + + /** + * A callback that is used instead of short_seek_threshold. + * This is current internal only, do not use from outside. + */ + int (*short_seek_get)(void *opaque); + + int64_t written; + + /** + * Maximum reached position before a backward seek in the write buffer, + * used keeping track of already written data for a later flush. + */ + unsigned char *buf_ptr_max; + + /** + * Try to buffer at least this amount of data before flushing it + */ + int min_packet_size; +} AVIOContext; + +/** + * Return the name of the protocol that will handle the passed URL. + * + * NULL is returned if no protocol could be found for the given URL. + * + * @return Name of the protocol or NULL. + */ +const char *avio_find_protocol_name(const char *url); + +/** + * Return AVIO_FLAG_* access flags corresponding to the access permissions + * of the resource in url, or a negative value corresponding to an + * AVERROR code in case of failure. The returned access flags are + * masked by the value in flags. + * + * @note This function is intrinsically unsafe, in the sense that the + * checked resource may change its existence or permission status from + * one call to another. Thus you should not trust the returned value, + * unless you are sure that no other processes are accessing the + * checked resource. + */ +int avio_check(const char *url, int flags); + +/** + * Move or rename a resource. + * + * @note url_src and url_dst should share the same protocol and authority. + * + * @param url_src url to resource to be moved + * @param url_dst new url to resource if the operation succeeded + * @return >=0 on success or negative on error. + */ +int avpriv_io_move(const char *url_src, const char *url_dst); + +/** + * Delete a resource. + * + * @param url resource to be deleted. + * @return >=0 on success or negative on error. + */ +int avpriv_io_delete(const char *url); + +/** + * Open directory for reading. + * + * @param s directory read context. Pointer to a NULL pointer must be passed. + * @param url directory to be listed. + * @param options A dictionary filled with protocol-private options. On return + * this parameter will be destroyed and replaced with a dictionary + * containing options that were not found. May be NULL. + * @return >=0 on success or negative on error. + */ +int avio_open_dir(AVIODirContext **s, const char *url, AVDictionary **options); + +/** + * Get next directory entry. + * + * Returned entry must be freed with avio_free_directory_entry(). In particular + * it may outlive AVIODirContext. + * + * @param s directory read context. + * @param[out] next next entry or NULL when no more entries. + * @return >=0 on success or negative on error. End of list is not considered an + * error. + */ +int avio_read_dir(AVIODirContext *s, AVIODirEntry **next); + +/** + * Close directory. + * + * @note Entries created using avio_read_dir() are not deleted and must be + * freeded with avio_free_directory_entry(). + * + * @param s directory read context. + * @return >=0 on success or negative on error. + */ +int avio_close_dir(AVIODirContext **s); + +/** + * Free entry allocated by avio_read_dir(). + * + * @param entry entry to be freed. + */ +void avio_free_directory_entry(AVIODirEntry **entry); + +/** + * Allocate and initialize an AVIOContext for buffered I/O. It must be later + * freed with avio_context_free(). + * + * @param buffer Memory block for input/output operations via AVIOContext. + * The buffer must be allocated with av_malloc() and friends. + * It may be freed and replaced with a new buffer by libavformat. + * AVIOContext.buffer holds the buffer currently in use, + * which must be later freed with av_free(). + * @param buffer_size The buffer size is very important for performance. + * For protocols with fixed blocksize it should be set to this blocksize. + * For others a typical size is a cache page, e.g. 4kb. + * @param write_flag Set to 1 if the buffer should be writable, 0 otherwise. + * @param opaque An opaque pointer to user-specific data. + * @param read_packet A function for refilling the buffer, may be NULL. + * For stream protocols, must never return 0 but rather + * a proper AVERROR code. + * @param write_packet A function for writing the buffer contents, may be NULL. + * The function may not change the input buffers content. + * @param seek A function for seeking to specified byte position, may be NULL. + * + * @return Allocated AVIOContext or NULL on failure. + */ +AVIOContext *avio_alloc_context( + unsigned char *buffer, + int buffer_size, + int write_flag, + void *opaque, + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), + int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), + int64_t (*seek)(void *opaque, int64_t offset, int whence)); + +/** + * Free the supplied IO context and everything associated with it. + * + * @param s Double pointer to the IO context. This function will write NULL + * into s. + */ +void avio_context_free(AVIOContext **s); + +void avio_w8(AVIOContext *s, int b); +void avio_write(AVIOContext *s, const unsigned char *buf, int size); +void avio_wl64(AVIOContext *s, uint64_t val); +void avio_wb64(AVIOContext *s, uint64_t val); +void avio_wl32(AVIOContext *s, unsigned int val); +void avio_wb32(AVIOContext *s, unsigned int val); +void avio_wl24(AVIOContext *s, unsigned int val); +void avio_wb24(AVIOContext *s, unsigned int val); +void avio_wl16(AVIOContext *s, unsigned int val); +void avio_wb16(AVIOContext *s, unsigned int val); + +/** + * Write a NULL-terminated string. + * @return number of bytes written. + */ +int avio_put_str(AVIOContext *s, const char *str); + +/** + * Convert an UTF-8 string to UTF-16LE and write it. + * @param s the AVIOContext + * @param str NULL-terminated UTF-8 string + * + * @return number of bytes written. + */ +int avio_put_str16le(AVIOContext *s, const char *str); + +/** + * Convert an UTF-8 string to UTF-16BE and write it. + * @param s the AVIOContext + * @param str NULL-terminated UTF-8 string + * + * @return number of bytes written. + */ +int avio_put_str16be(AVIOContext *s, const char *str); + +/** + * Mark the written bytestream as a specific type. + * + * Zero-length ranges are omitted from the output. + * + * @param time the stream time the current bytestream pos corresponds to + * (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not + * applicable + * @param type the kind of data written starting at the current pos + */ +void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type); + +/** + * ORing this as the "whence" parameter to a seek function causes it to + * return the filesize without seeking anywhere. Supporting this is optional. + * If it is not supported then the seek function will return <0. + */ +#define AVSEEK_SIZE 0x10000 + +/** + * Passing this flag as the "whence" parameter to a seek function causes it to + * seek by any means (like reopening and linear reading) or other normally unreasonable + * means that can be extremely slow. + * This may be ignored by the seek code. + */ +#define AVSEEK_FORCE 0x20000 + +/** + * fseek() equivalent for AVIOContext. + * @return new position or AVERROR. + */ +int64_t avio_seek(AVIOContext *s, int64_t offset, int whence); + +/** + * Skip given number of bytes forward + * @return new position or AVERROR. + */ +int64_t avio_skip(AVIOContext *s, int64_t offset); + +/** + * ftell() equivalent for AVIOContext. + * @return position or AVERROR. + */ +static av_always_inline int64_t avio_tell(AVIOContext *s) +{ + return avio_seek(s, 0, SEEK_CUR); +} + +/** + * Get the filesize. + * @return filesize or AVERROR + */ +int64_t avio_size(AVIOContext *s); + +/** + * Similar to feof() but also returns nonzero on read errors. + * @return non zero if and only if at end of file or a read error happened when reading. + */ +int avio_feof(AVIOContext *s); + +/** + * Writes a formatted string to the context. + * @return number of bytes written, < 0 on error. + */ +int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3); + +/** + * Write a NULL terminated array of strings to the context. + * Usually you don't need to use this function directly but its macro wrapper, + * avio_print. + */ +void avio_print_string_array(AVIOContext *s, const char *strings[]); + +/** + * Write strings (const char *) to the context. + * This is a convenience macro around avio_print_string_array and it + * automatically creates the string array from the variable argument list. + * For simple string concatenations this function is more performant than using + * avio_printf since it does not need a temporary buffer. + */ +#define avio_print(s, ...) \ + avio_print_string_array(s, (const char*[]){__VA_ARGS__, NULL}) + +/** + * Force flushing of buffered data. + * + * For write streams, force the buffered data to be immediately written to the output, + * without to wait to fill the internal buffer. + * + * For read streams, discard all currently buffered data, and advance the + * reported file position to that of the underlying stream. This does not + * read new data, and does not perform any seeks. + */ +void avio_flush(AVIOContext *s); + +/** + * Read size bytes from AVIOContext into buf. + * @return number of bytes read or AVERROR + */ +int avio_read(AVIOContext *s, unsigned char *buf, int size); + +/** + * Read size bytes from AVIOContext into buf. Unlike avio_read(), this is allowed + * to read fewer bytes than requested. The missing bytes can be read in the next + * call. This always tries to read at least 1 byte. + * Useful to reduce latency in certain cases. + * @return number of bytes read or AVERROR + */ +int avio_read_partial(AVIOContext *s, unsigned char *buf, int size); + +/** + * @name Functions for reading from AVIOContext + * @{ + * + * @note return 0 if EOF, so you cannot use it if EOF handling is + * necessary + */ +int avio_r8 (AVIOContext *s); +unsigned int avio_rl16(AVIOContext *s); +unsigned int avio_rl24(AVIOContext *s); +unsigned int avio_rl32(AVIOContext *s); +uint64_t avio_rl64(AVIOContext *s); +unsigned int avio_rb16(AVIOContext *s); +unsigned int avio_rb24(AVIOContext *s); +unsigned int avio_rb32(AVIOContext *s); +uint64_t avio_rb64(AVIOContext *s); +/** + * @} + */ + +/** + * Read a string from pb into buf. The reading will terminate when either + * a NULL character was encountered, maxlen bytes have been read, or nothing + * more can be read from pb. The result is guaranteed to be NULL-terminated, it + * will be truncated if buf is too small. + * Note that the string is not interpreted or validated in any way, it + * might get truncated in the middle of a sequence for multi-byte encodings. + * + * @return number of bytes read (is always <= maxlen). + * If reading ends on EOF or error, the return value will be one more than + * bytes actually read. + */ +int avio_get_str(AVIOContext *pb, int maxlen, char *buf, int buflen); + +/** + * Read a UTF-16 string from pb and convert it to UTF-8. + * The reading will terminate when either a null or invalid character was + * encountered or maxlen bytes have been read. + * @return number of bytes read (is always <= maxlen) + */ +int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen); +int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); + + +/** + * @name URL open modes + * The flags argument to avio_open must be one of the following + * constants, optionally ORed with other flags. + * @{ + */ +#define AVIO_FLAG_READ 1 /**< read-only */ +#define AVIO_FLAG_WRITE 2 /**< write-only */ +#define AVIO_FLAG_READ_WRITE (AVIO_FLAG_READ|AVIO_FLAG_WRITE) /**< read-write pseudo flag */ +/** + * @} + */ + +/** + * Use non-blocking mode. + * If this flag is set, operations on the context will return + * AVERROR(EAGAIN) if they can not be performed immediately. + * If this flag is not set, operations on the context will never return + * AVERROR(EAGAIN). + * Note that this flag does not affect the opening/connecting of the + * context. Connecting a protocol will always block if necessary (e.g. on + * network protocols) but never hang (e.g. on busy devices). + * Warning: non-blocking protocols is work-in-progress; this flag may be + * silently ignored. + */ +#define AVIO_FLAG_NONBLOCK 8 + +/** + * Use direct mode. + * avio_read and avio_write should if possible be satisfied directly + * instead of going through a buffer, and avio_seek will always + * call the underlying seek function directly. + */ +#define AVIO_FLAG_DIRECT 0x8000 + +/** + * Create and initialize a AVIOContext for accessing the + * resource indicated by url. + * @note When the resource indicated by url has been opened in + * read+write mode, the AVIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created AVIOContext. + * In case of failure the pointed to value is set to NULL. + * @param url resource to access + * @param flags flags which control how the resource indicated by url + * is to be opened + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int avio_open(AVIOContext **s, const char *url, int flags); + +/** + * Create and initialize a AVIOContext for accessing the + * resource indicated by url. + * @note When the resource indicated by url has been opened in + * read+write mode, the AVIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created AVIOContext. + * In case of failure the pointed to value is set to NULL. + * @param url resource to access + * @param flags flags which control how the resource indicated by url + * is to be opened + * @param int_cb an interrupt callback to be used at the protocols level + * @param options A dictionary filled with protocol-private options. On return + * this parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int avio_open2(AVIOContext **s, const char *url, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); + +/** + * Close the resource accessed by the AVIOContext s and free it. + * This function can only be used if s was opened by avio_open(). + * + * The internal buffer is automatically flushed before closing the + * resource. + * + * @return 0 on success, an AVERROR < 0 on error. + * @see avio_closep + */ +int avio_close(AVIOContext *s); + +/** + * Close the resource accessed by the AVIOContext *s, free it + * and set the pointer pointing to it to NULL. + * This function can only be used if s was opened by avio_open(). + * + * The internal buffer is automatically flushed before closing the + * resource. + * + * @return 0 on success, an AVERROR < 0 on error. + * @see avio_close + */ +int avio_closep(AVIOContext **s); + + +/** + * Open a write only memory stream. + * + * @param s new IO context + * @return zero if no error. + */ +int avio_open_dyn_buf(AVIOContext **s); + +/** + * Return the written size and a pointer to the buffer. + * The AVIOContext stream is left intact. + * The buffer must NOT be freed. + * No padding is added to the buffer. + * + * @param s IO context + * @param pbuffer pointer to a byte buffer + * @return the length of the byte buffer + */ +int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer); + +/** + * Return the written size and a pointer to the buffer. The buffer + * must be freed with av_free(). + * Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer. + * + * @param s IO context + * @param pbuffer pointer to a byte buffer + * @return the length of the byte buffer + */ +int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); + +/** + * Iterate through names of available protocols. + * + * @param opaque A private pointer representing current protocol. + * It must be a pointer to NULL on first iteration and will + * be updated by successive calls to avio_enum_protocols. + * @param output If set to 1, iterate over output protocols, + * otherwise over input protocols. + * + * @return A static string containing the name of current protocol or NULL + */ +const char *avio_enum_protocols(void **opaque, int output); + +/** + * Get AVClass by names of available protocols. + * + * @return A AVClass of input protocol name or NULL + */ +const AVClass *avio_protocol_get_class(const char *name); + +/** + * Pause and resume playing - only meaningful if using a network streaming + * protocol (e.g. MMS). + * + * @param h IO context from which to call the read_pause function pointer + * @param pause 1 for pause, 0 for resume + */ +int avio_pause(AVIOContext *h, int pause); + +/** + * Seek to a given timestamp relative to some component stream. + * Only meaningful if using a network streaming protocol (e.g. MMS.). + * + * @param h IO context from which to call the seek function pointers + * @param stream_index The stream index that the timestamp is relative to. + * If stream_index is (-1) the timestamp should be in AV_TIME_BASE + * units from the beginning of the presentation. + * If a stream_index >= 0 is used and the protocol does not support + * seeking based on component streams, the call will fail. + * @param timestamp timestamp in AVStream.time_base units + * or if there is no stream specified then in AV_TIME_BASE units. + * @param flags Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE + * and AVSEEK_FLAG_ANY. The protocol may silently ignore + * AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will + * fail if used and not supported. + * @return >= 0 on success + * @see AVInputFormat::read_seek + */ +int64_t avio_seek_time(AVIOContext *h, int stream_index, + int64_t timestamp, int flags); + +/* Avoid a warning. The header can not be included because it breaks c++. */ +struct AVBPrint; + +/** + * Read contents of h into print buffer, up to max_size bytes, or up to EOF. + * + * @return 0 for success (max_size bytes read or EOF reached), negative error + * code otherwise + */ +int avio_read_to_bprint(AVIOContext *h, struct AVBPrint *pb, size_t max_size); + +/** + * Accept and allocate a client context on a server context. + * @param s the server context + * @param c the client context, must be unallocated + * @return >= 0 on success or a negative value corresponding + * to an AVERROR on failure + */ +int avio_accept(AVIOContext *s, AVIOContext **c); + +/** + * Perform one step of the protocol handshake to accept a new client. + * This function must be called on a client returned by avio_accept() before + * using it as a read/write context. + * It is separate from avio_accept() because it may block. + * A step of the handshake is defined by places where the application may + * decide to change the proceedings. + * For example, on a protocol with a request header and a reply header, each + * one can constitute a step because the application may use the parameters + * from the request to change parameters in the reply; or each individual + * chunk of the request can constitute a step. + * If the handshake is already finished, avio_handshake() does nothing and + * returns 0 immediately. + * + * @param c the client context to perform the handshake on + * @return 0 on a complete and successful handshake + * > 0 if the handshake progressed, but is not complete + * < 0 for an AVERROR code + */ +int avio_handshake(AVIOContext *c); +#endif /* AVFORMAT_AVIO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio_internal.h new file mode 100644 index 00000000..c575df80 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avio_internal.h @@ -0,0 +1,188 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AVIO_INTERNAL_H +#define AVFORMAT_AVIO_INTERNAL_H + +#include "avio.h" +#include "url.h" + +#include "libavutil/log.h" + +extern const AVClass ff_avio_class; + +int ffio_init_context(AVIOContext *s, + unsigned char *buffer, + int buffer_size, + int write_flag, + void *opaque, + int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), + int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), + int64_t (*seek)(void *opaque, int64_t offset, int whence)); + + +/** + * Read size bytes from AVIOContext, returning a pointer. + * Note that the data pointed at by the returned pointer is only + * valid until the next call that references the same IO context. + * @param s IO context + * @param buf pointer to buffer into which to assemble the requested + * data if it is not available in contiguous addresses in the + * underlying buffer + * @param size number of bytes requested + * @param data address at which to store pointer: this will be a + * a direct pointer into the underlying buffer if the requested + * number of bytes are available at contiguous addresses, otherwise + * will be a copy of buf + * @return number of bytes read or AVERROR + */ +int ffio_read_indirect(AVIOContext *s, unsigned char *buf, int size, const unsigned char **data); + +void ffio_fill(AVIOContext *s, int b, int count); + +static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s) +{ + avio_wl32(pb, MKTAG(s[0], s[1], s[2], s[3])); +} + +/** + * Rewind the AVIOContext using the specified buffer containing the first buf_size bytes of the file. + * Used after probing to avoid seeking. + * Joins buf and s->buffer, taking any overlap into consideration. + * @note s->buffer must overlap with buf or they can't be joined and the function fails + * + * @param s The read-only AVIOContext to rewind + * @param buf The probe buffer containing the first buf_size bytes of the file + * @param buf_size The size of buf + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ffio_rewind_with_probe_data(AVIOContext *s, unsigned char **buf, int buf_size); + +uint64_t ffio_read_varlen(AVIOContext *bc); + +/** + * Read size bytes from AVIOContext into buf. + * Check that exactly size bytes have been read. + * @return number of bytes read or AVERROR + */ +int ffio_read_size(AVIOContext *s, unsigned char *buf, int size); + +/** @warning must be called before any I/O */ +int ffio_set_buf_size(AVIOContext *s, int buf_size); + +/** + * Reallocate a given buffer for AVIOContext. + * + * @param s the AVIOContext to realloc. + * @param buf_size required new buffer size. + * @return 0 on success, a negative AVERROR on failure. + */ +int ffio_realloc_buf(AVIOContext *s, int buf_size); + +/** + * Ensures that the requested seekback buffer size will be available + * + * Will ensure that when reading sequentially up to buf_size, seeking + * within the current pos and pos+buf_size is possible. + * Once the stream position moves outside this window this guarantee is lost. + */ +int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size); + +int ffio_limit(AVIOContext *s, int size); + +void ffio_init_checksum(AVIOContext *s, + unsigned long (*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), + unsigned long checksum); +unsigned long ffio_get_checksum(AVIOContext *s); +unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, + unsigned int len); +unsigned long ff_crcEDB88320_update(unsigned long checksum, const uint8_t *buf, + unsigned int len); +unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf, + unsigned int len); + +/** + * Open a write only packetized memory stream with a maximum packet + * size of 'max_packet_size'. The stream is stored in a memory buffer + * with a big-endian 4 byte header giving the packet size in bytes. + * + * @param s new IO context + * @param max_packet_size maximum packet size (must be > 0) + * @return zero if no error. + */ +int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); + +/** + * Create and initialize a AVIOContext for accessing the + * resource referenced by the URLContext h. + * @note When the URLContext h has been opened in read+write mode, the + * AVIOContext can be used only for writing. + * + * @param s Used to return the pointer to the created AVIOContext. + * In case of failure the pointed to value is set to NULL. + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ffio_fdopen(AVIOContext **s, URLContext *h); + +/** + * Return the URLContext associated with the AVIOContext + * + * @param s IO context + * @return pointer to URLContext or NULL. + */ +URLContext *ffio_geturlcontext(AVIOContext *s); + +/** + * Open a write-only fake memory stream. The written data is not stored + * anywhere - this is only used for measuring the amount of data + * written. + * + * @param s new IO context + * @return zero if no error. + */ +int ffio_open_null_buf(AVIOContext **s); + +int ffio_open_whitelist(AVIOContext **s, const char *url, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options, + const char *whitelist, const char *blacklist); + +/** + * Close a null buffer. + * + * @param s an IO context opened by ffio_open_null_buf + * @return the number of bytes written to the null buffer + */ +int ffio_close_null_buf(AVIOContext *s); + +/** + * Reset a dynamic buffer. + * + * Resets everything, but keeps the allocated buffer for later use. + */ +void ffio_reset_dyn_buf(AVIOContext *s); + +/** + * Free a dynamic buffer. + * + * @param s a pointer to an IO context opened by avio_open_dyn_buf() + */ +void ffio_free_dyn_buf(AVIOContext **s); + +#endif /* AVFORMAT_AVIO_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avlanguage.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avlanguage.h new file mode 100644 index 00000000..1d72dcb3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/avlanguage.h @@ -0,0 +1,46 @@ +/* + * Cyril Comparon, Larbi Joubala, Resonate-MP4 2009 + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_AVLANGUAGE_H +#define AVFORMAT_AVLANGUAGE_H + +#include "libavutil/attributes.h" +#include "libavformat/version.h" + +/** + * Known language codespaces + */ +enum AVLangCodespace { + AV_LANG_ISO639_2_BIBL, /** 3-char bibliographic language codes as per ISO-IEC 639-2 */ + AV_LANG_ISO639_2_TERM, /** 3-char terminological language codes as per ISO-IEC 639-2 */ + AV_LANG_ISO639_1 /** 2-char code of language as per ISO/IEC 639-1 */ +}; + +/** + * Convert a language code to a target codespace. The source codespace is guessed. + * @return NULL if the provided lang is null or invalid. + */ +const char *ff_convert_lang_to(const char *lang, enum AVLangCodespace target_codespace); +#if LIBAVFORMAT_VERSION_MAJOR < 58 +attribute_deprecated +const char *av_convert_lang_to(const char *lang, enum AVLangCodespace target_codespace); +#endif + +#endif /* AVFORMAT_AVLANGUAGE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/caf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/caf.h new file mode 100644 index 00000000..9c25f2c6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/caf.h @@ -0,0 +1,34 @@ +/* + * CAF common code + * Copyright (c) 2007 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * CAF common code + */ + +#ifndef AVFORMAT_CAF_H +#define AVFORMAT_CAF_H + +#include "internal.h" + +extern const AVCodecTag ff_codec_caf_tags[]; + +#endif /* AVFORMAT_CAF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dash.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dash.h new file mode 100644 index 00000000..c6d9d2c3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dash.h @@ -0,0 +1,39 @@ +/* + * MPEG-DASH ISO BMFF segmenter + * Copyright (c) 2014 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_DASH_H +#define AVFORMAT_DASH_H +#include "avformat.h" + +// See ISO/IEC 23009-1:2014 5.3.9.4.4 +typedef enum { + DASH_TMPL_ID_UNDEFINED = -1, + DASH_TMPL_ID_ESCAPE, + DASH_TMPL_ID_REP_ID, + DASH_TMPL_ID_NUMBER, + DASH_TMPL_ID_BANDWIDTH, + DASH_TMPL_ID_TIME, +} DASHTmplId; + + +void ff_dash_fill_tmpl_params(char *dst, size_t buffer_size, const char *template, int rep_id, int number, int bit_rate, int64_t time); + +#endif /* AVFORMAT_DASH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dv.h new file mode 100644 index 00000000..160c6ab8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/dv.h @@ -0,0 +1,41 @@ +/* + * General DV muxer/demuxer + * Copyright (c) 2003 Roman Shaposhnik + * + * Many thanks to Dan Dennedy for providing wealth + * of DV technical info. + * + * Raw DV format + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_DV_H +#define AVFORMAT_DV_H + +#include "avformat.h" + +typedef struct DVDemuxContext DVDemuxContext; +DVDemuxContext* avpriv_dv_init_demux(AVFormatContext* s); +int avpriv_dv_get_packet(DVDemuxContext*, AVPacket *); +int avpriv_dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int, int64_t); +void ff_dv_offset_reset(DVDemuxContext *c, int64_t frame_offset); + +typedef struct DVMuxContext DVMuxContext; + +#endif /* AVFORMAT_DV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ffmeta.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ffmeta.h new file mode 100644 index 00000000..ae8778d6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ffmeta.h @@ -0,0 +1,29 @@ +/* + * Common data for metadata muxer/demuxer + * Copyright (c) 2010 Anton Khirnov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_FFMETA_H +#define AVFORMAT_FFMETA_H + +#define ID_STRING ";FFMETADATA" +#define ID_CHAPTER "[CHAPTER]" +#define ID_STREAM "[STREAM]" + +#endif /* AVFORMAT_FFMETA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flac_picture.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flac_picture.h new file mode 100644 index 00000000..61fd0c88 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flac_picture.h @@ -0,0 +1,31 @@ +/* + * Raw FLAC picture parser + * Copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_FLAC_PICTURE_H +#define AVFORMAT_FLAC_PICTURE_H + +#include "avformat.h" + +#define RETURN_ERROR(code) do { ret = (code); goto fail; } while (0) + +int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size, int truncate_workaround); + +#endif /* AVFORMAT_FLAC_PICTURE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flacenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flacenc.h new file mode 100644 index 00000000..b308d0d0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flacenc.h @@ -0,0 +1,34 @@ +/* + * raw FLAC muxer + * Copyright (C) 2009 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_FLACENC_H +#define AVFORMAT_FLACENC_H + +#include "libavcodec/flac.h" +#include "libavcodec/bytestream.h" +#include "avformat.h" + +int ff_flac_write_header(AVIOContext *pb, const uint8_t *extradata, + int extradata_size, int last_block); + +int ff_flac_is_native_layout(uint64_t channel_layout); + +#endif /* AVFORMAT_FLACENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flv.h new file mode 100644 index 00000000..3571b902 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/flv.h @@ -0,0 +1,139 @@ +/* + * FLV common header + * + * Copyright (c) 2006 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * FLV common header + */ + +#ifndef AVFORMAT_FLV_H +#define AVFORMAT_FLV_H + +/* offsets for packed values */ +#define FLV_AUDIO_SAMPLESSIZE_OFFSET 1 +#define FLV_AUDIO_SAMPLERATE_OFFSET 2 +#define FLV_AUDIO_CODECID_OFFSET 4 + +#define FLV_VIDEO_FRAMETYPE_OFFSET 4 + +/* bitmasks to isolate specific values */ +#define FLV_AUDIO_CHANNEL_MASK 0x01 +#define FLV_AUDIO_SAMPLESIZE_MASK 0x02 +#define FLV_AUDIO_SAMPLERATE_MASK 0x0c +#define FLV_AUDIO_CODECID_MASK 0xf0 + +#define FLV_VIDEO_CODECID_MASK 0x0f +#define FLV_VIDEO_FRAMETYPE_MASK 0xf0 + +#define AMF_END_OF_OBJECT 0x09 + +#define KEYFRAMES_TAG "keyframes" +#define KEYFRAMES_TIMESTAMP_TAG "times" +#define KEYFRAMES_BYTEOFFSET_TAG "filepositions" + + +enum { + FLV_HEADER_FLAG_HASVIDEO = 1, + FLV_HEADER_FLAG_HASAUDIO = 4, +}; + +enum FlvTagType { + FLV_TAG_TYPE_AUDIO = 0x08, + FLV_TAG_TYPE_VIDEO = 0x09, + FLV_TAG_TYPE_META = 0x12, +}; + +enum { + FLV_STREAM_TYPE_VIDEO, + FLV_STREAM_TYPE_AUDIO, + FLV_STREAM_TYPE_SUBTITLE, + FLV_STREAM_TYPE_DATA, + FLV_STREAM_TYPE_NB, +}; + +enum { + FLV_MONO = 0, + FLV_STEREO = 1, +}; + +enum { + FLV_SAMPLESSIZE_8BIT = 0, + FLV_SAMPLESSIZE_16BIT = 1 << FLV_AUDIO_SAMPLESSIZE_OFFSET, +}; + +enum { + FLV_SAMPLERATE_SPECIAL = 0, /**< signifies 5512Hz and 8000Hz in the case of NELLYMOSER */ + FLV_SAMPLERATE_11025HZ = 1 << FLV_AUDIO_SAMPLERATE_OFFSET, + FLV_SAMPLERATE_22050HZ = 2 << FLV_AUDIO_SAMPLERATE_OFFSET, + FLV_SAMPLERATE_44100HZ = 3 << FLV_AUDIO_SAMPLERATE_OFFSET, +}; + +enum { + FLV_CODECID_PCM = 0, + FLV_CODECID_ADPCM = 1 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_MP3 = 2 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_PCM_LE = 3 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_NELLYMOSER_16KHZ_MONO = 4 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_NELLYMOSER_8KHZ_MONO = 5 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_NELLYMOSER = 6 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_PCM_ALAW = 7 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_PCM_MULAW = 8 << FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_AAC = 10<< FLV_AUDIO_CODECID_OFFSET, + FLV_CODECID_SPEEX = 11<< FLV_AUDIO_CODECID_OFFSET, +}; + +enum { + FLV_CODECID_H263 = 2, + FLV_CODECID_SCREEN = 3, + FLV_CODECID_VP6 = 4, + FLV_CODECID_VP6A = 5, + FLV_CODECID_SCREEN2 = 6, + FLV_CODECID_H264 = 7, + FLV_CODECID_REALH263= 8, + FLV_CODECID_MPEG4 = 9, +}; + +enum { + FLV_FRAME_KEY = 1 << FLV_VIDEO_FRAMETYPE_OFFSET, ///< key frame (for AVC, a seekable frame) + FLV_FRAME_INTER = 2 << FLV_VIDEO_FRAMETYPE_OFFSET, ///< inter frame (for AVC, a non-seekable frame) + FLV_FRAME_DISP_INTER = 3 << FLV_VIDEO_FRAMETYPE_OFFSET, ///< disposable inter frame (H.263 only) + FLV_FRAME_GENERATED_KEY = 4 << FLV_VIDEO_FRAMETYPE_OFFSET, ///< generated key frame (reserved for server use only) + FLV_FRAME_VIDEO_INFO_CMD = 5 << FLV_VIDEO_FRAMETYPE_OFFSET, ///< video info/command frame +}; + +typedef enum { + AMF_DATA_TYPE_NUMBER = 0x00, + AMF_DATA_TYPE_BOOL = 0x01, + AMF_DATA_TYPE_STRING = 0x02, + AMF_DATA_TYPE_OBJECT = 0x03, + AMF_DATA_TYPE_NULL = 0x05, + AMF_DATA_TYPE_UNDEFINED = 0x06, + AMF_DATA_TYPE_REFERENCE = 0x07, + AMF_DATA_TYPE_MIXEDARRAY = 0x08, + AMF_DATA_TYPE_OBJECT_END = 0x09, + AMF_DATA_TYPE_ARRAY = 0x0a, + AMF_DATA_TYPE_DATE = 0x0b, + AMF_DATA_TYPE_LONG_STRING = 0x0c, + AMF_DATA_TYPE_UNSUPPORTED = 0x0d, +} AMFDataType; + +#endif /* AVFORMAT_FLV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/gxf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/gxf.h new file mode 100644 index 00000000..dcdcdefc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/gxf.h @@ -0,0 +1,52 @@ +/* + * GXF demuxer + * copyright (c) 2006 Reimar Doeffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_GXF_H +#define AVFORMAT_GXF_H + +typedef enum { + PKT_MAP = 0xbc, + PKT_MEDIA = 0xbf, + PKT_EOS = 0xfb, + PKT_FLT = 0xfc, + PKT_UMF = 0xfd, +} GXFPktType; + +typedef enum { + MAT_NAME = 0x40, + MAT_FIRST_FIELD = 0x41, + MAT_LAST_FIELD = 0x42, + MAT_MARK_IN = 0x43, + MAT_MARK_OUT = 0x44, + MAT_SIZE = 0x45, +} GXFMatTag; + +typedef enum { + TRACK_NAME = 0x4c, + TRACK_AUX = 0x4d, + TRACK_VER = 0x4e, + TRACK_MPG_AUX = 0x4f, + TRACK_FPS = 0x50, + TRACK_LINES = 0x51, + TRACK_FPF = 0x52, +} GXFTrackTag; + +#endif /* AVFORMAT_GXF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hevc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hevc.h new file mode 100644 index 00000000..0f56325c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hevc.h @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2014 Tim Walker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal header for HEVC (de)muxer utilities + */ + +#ifndef AVFORMAT_HEVC_H +#define AVFORMAT_HEVC_H + +#include +#include "avio.h" + +/** + * Writes Annex B formatted HEVC NAL units to the provided AVIOContext. + * + * The NAL units are converted to an MP4-compatible format (start code prefixes + * are replaced by 4-byte size fields, as per ISO/IEC 14496-15). + * + * If filter_ps is non-zero, any HEVC parameter sets found in the input will be + * discarded, and *ps_count will be set to the number of discarded PS NAL units. + * + * @param pb address of the AVIOContext where the data shall be written + * @param buf_in address of the buffer holding the input data + * @param size size (in bytes) of the input buffer + * @param filter_ps whether to write parameter set NAL units to the output (0) + * or to discard them (non-zero) + * @param ps_count address of the variable where the number of discarded + * parameter set NAL units shall be written, may be NULL + * @return the amount (in bytes) of data written in case of success, a negative + * value corresponding to an AVERROR code in case of failure + */ +int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in, + int size, int filter_ps, int *ps_count); + +/** + * Writes Annex B formatted HEVC NAL units to a data buffer. + * + * The NAL units are converted to an MP4-compatible format (start code prefixes + * are replaced by 4-byte size fields, as per ISO/IEC 14496-15). + * + * If filter_ps is non-zero, any HEVC parameter sets found in the input will be + * discarded, and *ps_count will be set to the number of discarded PS NAL units. + * + * On success, *size holds the size (in bytes) of the output data buffer. + * + * @param buf_in address of the buffer holding the input data + * @param size address of the variable holding the size (in bytes) of the input + * buffer (on input) and of the output buffer (on success) + * @param buf_out on success, address of the variable holding the address of + * the output buffer + * @param filter_ps whether to write parameter set NAL units to the output (0) + * or to discard them (non-zero) + * @param ps_count address of the variable where the number of discarded + * parameter set NAL units shall be written, may be NULL + * @return 0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + * @note *buf_out will be treated as uninitialized on input and won't be freed. + */ +int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, + int *size, int filter_ps, int *ps_count); + +/** + * Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the + * provided AVIOContext. + * + * If the extradata is Annex B format, it gets converted to hvcC format before + * writing. + * + * @param pb address of the AVIOContext where the hvcC shall be written + * @param data address of the buffer holding the data needed to write the hvcC + * @param size size (in bytes) of the data buffer + * @param ps_array_completeness whether all parameter sets are in the hvcC (1) + * or there may be additional parameter sets in the bitstream (0) + * @return >=0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + */ +int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness); + +#endif /* AVFORMAT_HEVC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hlsplaylist.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hlsplaylist.h new file mode 100644 index 00000000..29487da3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/hlsplaylist.h @@ -0,0 +1,65 @@ +/* + * Apple HTTP Live Streaming segmenter + * Copyright (c) 2012, Luca Barbato + * Copyright (c) 2017 Akamai Technologies, Inc. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_HLSPLAYLIST_H +#define AVFORMAT_HLSPLAYLIST_H + +#include + +#include "libavutil/common.h" +#include "avformat.h" +#include "avio.h" + +typedef enum { + PLAYLIST_TYPE_NONE, + PLAYLIST_TYPE_EVENT, + PLAYLIST_TYPE_VOD, + PLAYLIST_TYPE_NB, +} PlaylistType; + +void ff_hls_write_playlist_version(AVIOContext *out, int version); +void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, + const char *filename, const char *language, + int name_id, int is_default); +void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, + const char *filename, const char *language, + int name_id, int is_default); +void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth, + const char *filename, const char *agroup, + const char *codecs, const char *ccgroup, + const char *sgroup); +void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache, + int target_duration, int64_t sequence, + uint32_t playlist_type, int iframe_mode); +void ff_hls_write_init_file(AVIOContext *out, const char *filename, + int byterange_mode, int64_t size, int64_t pos); +int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, + int byterange_mode, double duration, + int round_duration, int64_t size, + int64_t pos /* Used only if HLS_SINGLE_FILE flag is set */, + const char *baseurl /* Ignored if NULL */, + const char *filename, double *prog_date_time, + int64_t video_keyframe_size, int64_t video_keyframe_pos, + int iframe_mode); +void ff_hls_write_end_list (AVIOContext *out); + +#endif /* AVFORMAT_HLSPLAYLIST_H_ */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/http.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/http.h new file mode 100644 index 00000000..5557ce9b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/http.h @@ -0,0 +1,74 @@ +/* + * HTTP definitions + * Copyright (c) 2010 Josh Allmann + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_HTTP_H +#define AVFORMAT_HTTP_H + +#include "url.h" + +#define HTTP_HEADERS_SIZE 4096 + +/** + * Initialize the authentication state based on another HTTP URLContext. + * This can be used to pre-initialize the authentication parameters if + * they are known beforehand, to avoid having to do an initial failing + * request just to get the parameters. + * + * @param dest URL context whose authentication state gets updated + * @param src URL context whose authentication state gets copied + */ +void ff_http_init_auth_state(URLContext *dest, const URLContext *src); + +/** + * Get the HTTP shutdown response status, be used after http_shutdown. + * + * @param h pointer to the resource + * @return a negative value if an error condition occurred, 0 + * otherwise + */ +int ff_http_get_shutdown_status(URLContext *h); + +/** + * Send a new HTTP request, reusing the old connection. + * + * @param h pointer to the resource + * @param uri uri used to perform the request + * @return a negative value if an error condition occurred, 0 + * otherwise + */ +int ff_http_do_new_request(URLContext *h, const char *uri); + +/** + * Send a new HTTP request, reusing the old connection. + * + * @param h pointer to the resource + * @param uri uri used to perform the request + * @param options A dictionary filled with HTTP options. On return + * this parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. + * @return a negative value if an error condition occurred, 0 + * otherwise + */ +int ff_http_do_new_request2(URLContext *h, const char *uri, AVDictionary **options); + +int ff_http_averror(int status_code, int default_averror); + +#endif /* AVFORMAT_HTTP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/httpauth.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/httpauth.h new file mode 100644 index 00000000..0e708590 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/httpauth.h @@ -0,0 +1,79 @@ +/* + * HTTP authentication + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_HTTPAUTH_H +#define AVFORMAT_HTTPAUTH_H + +/** + * Authentication types, ordered from weakest to strongest. + */ +typedef enum HTTPAuthType { + HTTP_AUTH_NONE = 0, /**< No authentication specified */ + HTTP_AUTH_BASIC, /**< HTTP 1.0 Basic auth from RFC 1945 + * (also in RFC 2617) */ + HTTP_AUTH_DIGEST, /**< HTTP 1.1 Digest auth from RFC 2617 */ +} HTTPAuthType; + +typedef struct DigestParams { + char nonce[300]; /**< Server specified nonce */ + char algorithm[10]; /**< Server specified digest algorithm */ + char qop[30]; /**< Quality of protection, containing the one + * that we've chosen to use, from the + * alternatives that the server offered. */ + char opaque[300]; /**< A server-specified string that should be + * included in authentication responses, not + * included in the actual digest calculation. */ + char stale[10]; /**< The server indicated that the auth was ok, + * but needs to be redone with a new, non-stale + * nonce. */ + int nc; /**< Nonce count, the number of earlier replies + * where this particular nonce has been used. */ +} DigestParams; + +/** + * HTTP Authentication state structure. Must be zero-initialized + * before used with the functions below. + */ +typedef struct HTTPAuthState { + /** + * The currently chosen auth type. + */ + int auth_type; + /** + * Authentication realm + */ + char realm[200]; + /** + * The parameters specific to digest authentication. + */ + DigestParams digest_params; + /** + * Auth ok, but needs to be resent with a new nonce. + */ + int stale; +} HTTPAuthState; + +void ff_http_auth_handle_header(HTTPAuthState *state, const char *key, + const char *value); +char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, + const char *path, const char *method); + +#endif /* AVFORMAT_HTTPAUTH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v1.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v1.h new file mode 100644 index 00000000..b3ad16df --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v1.h @@ -0,0 +1,41 @@ +/* + * ID3v1 header parser + * Copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_ID3V1_H +#define AVFORMAT_ID3V1_H + +#include "avformat.h" + +#define ID3v1_TAG_SIZE 128 + +#define ID3v1_GENRE_MAX 191 + +/** + * ID3v1 genres + */ +extern const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1]; + +/** + * Read an ID3v1 tag + */ +void ff_id3v1_read(AVFormatContext *s); + +#endif /* AVFORMAT_ID3V1_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v2.h new file mode 100644 index 00000000..a41fb271 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/id3v2.h @@ -0,0 +1,214 @@ +/* + * ID3v2 header parser + * Copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_ID3V2_H +#define AVFORMAT_ID3V2_H + +#include +#include "avformat.h" +#include "internal.h" +#include "metadata.h" + +#define ID3v2_HEADER_SIZE 10 + +/** + * Default magic bytes for ID3v2 header: "ID3" + */ +#define ID3v2_DEFAULT_MAGIC "ID3" + +#define ID3v2_FLAG_DATALEN 0x0001 +#define ID3v2_FLAG_UNSYNCH 0x0002 +#define ID3v2_FLAG_ENCRYPTION 0x0004 +#define ID3v2_FLAG_COMPRESSION 0x0008 + +#define ID3v2_PRIV_METADATA_PREFIX "id3v2_priv." + +enum ID3v2Encoding { + ID3v2_ENCODING_ISO8859 = 0, + ID3v2_ENCODING_UTF16BOM = 1, + ID3v2_ENCODING_UTF16BE = 2, + ID3v2_ENCODING_UTF8 = 3, +}; + +typedef struct ID3v2EncContext { + int version; ///< ID3v2 minor version, either 3 or 4 + int64_t size_pos; ///< offset of the tag total size + int len; ///< size of the tag written so far +} ID3v2EncContext; + +typedef struct ID3v2ExtraMetaGEOB { + uint32_t datasize; + uint8_t *mime_type; + uint8_t *file_name; + uint8_t *description; + uint8_t *data; +} ID3v2ExtraMetaGEOB; + +typedef struct ID3v2ExtraMetaAPIC { + AVBufferRef *buf; + const char *type; + uint8_t *description; + enum AVCodecID id; +} ID3v2ExtraMetaAPIC; + +typedef struct ID3v2ExtraMetaPRIV { + uint8_t *owner; + uint8_t *data; + uint32_t datasize; +} ID3v2ExtraMetaPRIV; + +typedef struct ID3v2ExtraMetaCHAP { + uint8_t *element_id; + uint32_t start, end; + AVDictionary *meta; +} ID3v2ExtraMetaCHAP; + +typedef struct ID3v2ExtraMeta { + const char *tag; + struct ID3v2ExtraMeta *next; + union { + ID3v2ExtraMetaAPIC apic; + ID3v2ExtraMetaCHAP chap; + ID3v2ExtraMetaGEOB geob; + ID3v2ExtraMetaPRIV priv; + } data; +} ID3v2ExtraMeta; + +/** + * Detect ID3v2 Header. + * @param buf must be ID3v2_HEADER_SIZE byte long + * @param magic magic bytes to identify the header. + * If in doubt, use ID3v2_DEFAULT_MAGIC. + */ +int ff_id3v2_match(const uint8_t *buf, const char *magic); + +/** + * Get the length of an ID3v2 tag. + * @param buf must be ID3v2_HEADER_SIZE bytes long and point to the start of an + * already detected ID3v2 tag + */ +int ff_id3v2_tag_len(const uint8_t *buf); + +/** + * Read an ID3v2 tag into specified dictionary and retrieve supported extra metadata. + * + * @param metadata Parsed metadata is stored here + * @param extra_meta If not NULL, extra metadata is parsed into a list of + * ID3v2ExtraMeta structs and *extra_meta points to the head of the list + */ +void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *magic, ID3v2ExtraMeta **extra_meta); + +/** + * Read an ID3v2 tag, including supported extra metadata. + * + * Data is read from and stored to AVFormatContext. + * + * @param extra_meta If not NULL, extra metadata is parsed into a list of + * ID3v2ExtraMeta structs and *extra_meta points to the head of the list + * @param[opt] max_search_search restrict ID3 magic number search (bytes from start) + */ +void ff_id3v2_read(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **extra_meta, + unsigned int max_search_size); + +/** + * Initialize an ID3v2 tag. + */ +void ff_id3v2_start(ID3v2EncContext *id3, AVIOContext *pb, int id3v2_version, + const char *magic); + +/** + * Convert and write all global metadata from s into an ID3v2 tag. + */ +int ff_id3v2_write_metadata(AVFormatContext *s, ID3v2EncContext *id3); + +/** + * Write an attached picture from pkt into an ID3v2 tag. + */ +int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt); + +/** + * Finalize an opened ID3v2 tag. + */ +void ff_id3v2_finish(ID3v2EncContext *id3, AVIOContext *pb, int padding_bytes); + +/** + * Write an ID3v2 tag containing all global metadata from s. + * @param id3v2_version Subversion of ID3v2; supported values are 3 and 4 + * @param magic magic bytes to identify the header + * If in doubt, use ID3v2_DEFAULT_MAGIC. + */ +int ff_id3v2_write_simple(struct AVFormatContext *s, int id3v2_version, const char *magic); + +/** + * Free memory allocated parsing special (non-text) metadata. + * @param extra_meta Pointer to a pointer to the head of a ID3v2ExtraMeta list, *extra_meta is set to NULL. + */ +void ff_id3v2_free_extra_meta(ID3v2ExtraMeta **extra_meta); + +/** + * Create a stream for each APIC (attached picture) extracted from the + * ID3v2 header. + */ +int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta *extra_meta); + +/** + * Create chapters for all CHAP tags found in the ID3v2 header. + */ +int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *extra_meta); + +/** + * Parse PRIV tags into a dictionary. The PRIV owner is the metadata key. The + * PRIV data is the value, with non-printable characters escaped. + */ +int ff_id3v2_parse_priv_dict(AVDictionary **d, ID3v2ExtraMeta *extra_meta); + +/** + * Add metadata for all PRIV tags in the ID3v2 header. The PRIV owner is the + * metadata key. The PRIV data is the value, with non-printable characters + * escaped. + */ +int ff_id3v2_parse_priv(AVFormatContext *s, ID3v2ExtraMeta *extra_meta); + +extern const AVMetadataConv ff_id3v2_34_metadata_conv[]; +extern const AVMetadataConv ff_id3v2_4_metadata_conv[]; + +/** + * A list of text information frames allowed in both ID3 v2.3 and v2.4 + * http://www.id3.org/id3v2.4.0-frames + * http://www.id3.org/id3v2.4.0-changes + */ +extern const char ff_id3v2_tags[][4]; + +/** + * ID3v2.4-only text information frames. + */ +extern const char ff_id3v2_4_tags[][4]; + +/** + * ID3v2.3-only text information frames. + */ +extern const char ff_id3v2_3_tags[][4]; + +extern const CodecMime ff_id3v2_mime_tags[]; + +extern const char * const ff_id3v2_picture_types[21]; + +#endif /* AVFORMAT_ID3V2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/img2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/img2.h new file mode 100644 index 00000000..5fd8ff77 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/img2.h @@ -0,0 +1,79 @@ +/* + * Image format + * Copyright (c) 2014 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_IMG2_H +#define AVFORMAT_IMG2_H + +#include +#include "avformat.h" +#include "libavutil/opt.h" + +#if HAVE_GLOB +#include +#endif + +enum PatternType { + PT_GLOB_SEQUENCE, + PT_GLOB, + PT_SEQUENCE, + PT_NONE, + PT_DEFAULT +}; + +typedef struct VideoDemuxData { + const AVClass *class; /**< Class for private options. */ + int img_first; + int img_last; + int img_number; + int64_t pts; + int img_count; + int is_pipe; + int split_planes; /**< use independent file for each Y, U, V plane */ + char path[1024]; + char *pixel_format; /**< Set by a private option. */ + int width, height; /**< Set by a private option. */ + AVRational framerate; /**< Set by a private option. */ + int loop; + int pattern_type; /**< PatternType */ + int use_glob; +#if HAVE_GLOB + glob_t globstate; +#endif + int start_number; + int start_number_range; + int frame_size; + int ts_from_file; + int export_path_metadata; /**< enabled when set to 1. */ +} VideoDemuxData; + +typedef struct IdStrMap { + enum AVCodecID id; + const char *str; +} IdStrMap; + +extern const IdStrMap ff_img_tags[]; + +extern const AVOption ff_img_options[]; + +int ff_img_read_header(AVFormatContext *s1); + +int ff_img_read_packet(AVFormatContext *s1, AVPacket *pkt); +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/internal.h new file mode 100644 index 00000000..17a6ab07 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/internal.h @@ -0,0 +1,777 @@ +/* + * copyright (c) 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_INTERNAL_H +#define AVFORMAT_INTERNAL_H + +#include + +#include "libavutil/bprint.h" +#include "avformat.h" +#include "os_support.h" + +#define MAX_URL_SIZE 4096 + +/** size of probe buffer, for guessing file type from file contents */ +#define PROBE_BUF_MIN 2048 +#define PROBE_BUF_MAX (1 << 20) + +#ifdef DEBUG +# define hex_dump_debug(class, buf, size) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size) +#else +# define hex_dump_debug(class, buf, size) do { if (0) av_hex_dump_log(class, AV_LOG_DEBUG, buf, size); } while(0) +#endif + +typedef struct AVCodecTag { + enum AVCodecID id; + unsigned int tag; +} AVCodecTag; + +typedef struct CodecMime{ + char str[32]; + enum AVCodecID id; +} CodecMime; + +/*************************************************/ +/* fractional numbers for exact pts handling */ + +/** + * The exact value of the fractional number is: 'val + num / den'. + * num is assumed to be 0 <= num < den. + */ +typedef struct FFFrac { + int64_t val, num, den; +} FFFrac; + + +struct AVFormatInternal { + /** + * Number of streams relevant for interleaving. + * Muxing only. + */ + int nb_interleaved_streams; + + /** + * This buffer is only needed when packets were already buffered but + * not decoded, for example to get the codec parameters in MPEG + * streams. + */ + struct AVPacketList *packet_buffer; + struct AVPacketList *packet_buffer_end; + + /* av_seek_frame() support */ + int64_t data_offset; /**< offset of the first packet */ + + /** + * Raw packets from the demuxer, prior to parsing and decoding. + * This buffer is used for buffering packets until the codec can + * be identified, as parsing cannot be done without knowing the + * codec. + */ + struct AVPacketList *raw_packet_buffer; + struct AVPacketList *raw_packet_buffer_end; + /** + * Packets split by the parser get queued here. + */ + struct AVPacketList *parse_queue; + struct AVPacketList *parse_queue_end; + /** + * Remaining size available for raw_packet_buffer, in bytes. + */ +#define RAW_PACKET_BUFFER_SIZE 2500000 + int raw_packet_buffer_remaining_size; + + /** + * Offset to remap timestamps to be non-negative. + * Expressed in timebase units. + * @see AVStream.mux_ts_offset + */ + int64_t offset; + + /** + * Timebase for the timestamp offset. + */ + AVRational offset_timebase; + +#if FF_API_COMPUTE_PKT_FIELDS2 + int missing_ts_warning; +#endif + + int inject_global_side_data; + + int avoid_negative_ts_use_pts; + + /** + * Timestamp of the end of the shortest stream. + */ + int64_t shortest_end; + + /** + * Whether or not avformat_init_output has already been called + */ + int initialized; + + /** + * Whether or not avformat_init_output fully initialized streams + */ + int streams_initialized; + + /** + * ID3v2 tag useful for MP3 demuxing + */ + AVDictionary *id3v2_meta; + + /* + * Prefer the codec framerate for avg_frame_rate computation. + */ + int prefer_codec_framerate; +}; + +struct AVStreamInternal { + /** + * Set to 1 if the codec allows reordering, so pts can be different + * from dts. + */ + int reorder; + + /** + * bitstream filter to run on stream + * - encoding: Set by muxer using ff_stream_add_bitstream_filter + * - decoding: unused + */ + AVBSFContext *bsfc; + + /** + * Whether or not check_bitstream should still be run on each packet + */ + int bitstream_checked; + + /** + * The codec context used by avformat_find_stream_info, the parser, etc. + */ + AVCodecContext *avctx; + /** + * 1 if avctx has been initialized with the values from the codec parameters + */ + int avctx_inited; + + enum AVCodecID orig_codec_id; + + /* the context for extracting extradata in find_stream_info() + * inited=1/bsf=NULL signals that extracting is not possible (codec not + * supported) */ + struct { + AVBSFContext *bsf; + AVPacket *pkt; + int inited; + } extract_extradata; + + /** + * Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar) + */ + int need_context_update; + + int is_intra_only; + + FFFrac *priv_pts; +}; + +#ifdef __GNUC__ +#define dynarray_add(tab, nb_ptr, elem)\ +do {\ + __typeof__(tab) _tab = (tab);\ + __typeof__(elem) _elem = (elem);\ + (void)sizeof(**_tab == _elem); /* check that types are compatible */\ + av_dynarray_add(_tab, nb_ptr, _elem);\ +} while(0) +#else +#define dynarray_add(tab, nb_ptr, elem)\ +do {\ + av_dynarray_add((tab), nb_ptr, (elem));\ +} while(0) +#endif + +struct tm *ff_brktimegm(time_t secs, struct tm *tm); + +/** + * Automatically create sub-directories + * + * @param path will create sub-directories by path + * @return 0, or < 0 on error + */ +int ff_mkdir_p(const char *path); + +char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase); + +/** + * Parse a string of hexadecimal strings. Any space between the hexadecimal + * digits is ignored. + * + * @param data if non-null, the parsed data is written to this pointer + * @param p the string to parse + * @return the number of bytes written (or to be written, if data is null) + */ +int ff_hex_to_data(uint8_t *data, const char *p); + +/** + * Add packet to an AVFormatContext's packet_buffer list, determining its + * interleaved position using compare() function argument. + * @return 0 on success, < 0 on error. pkt will always be blank on return. + */ +int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, + int (*compare)(AVFormatContext *, const AVPacket *, const AVPacket *)); + +void ff_read_frame_flush(AVFormatContext *s); + +#define NTP_OFFSET 2208988800ULL +#define NTP_OFFSET_US (NTP_OFFSET * 1000000ULL) + +/** Get the current time since NTP epoch in microseconds. */ +uint64_t ff_ntp_time(void); + +/** + * Get the NTP time stamp formatted as per the RFC-5905. + * + * @param ntp_time NTP time in micro seconds (since NTP epoch) + * @return the formatted NTP time stamp + */ +uint64_t ff_get_formatted_ntp_time(uint64_t ntp_time_us); + +/** + * Append the media-specific SDP fragment for the media stream c + * to the buffer buff. + * + * Note, the buffer needs to be initialized, since it is appended to + * existing content. + * + * @param buff the buffer to append the SDP fragment to + * @param size the size of the buff buffer + * @param st the AVStream of the media to describe + * @param idx the global stream index + * @param dest_addr the destination address of the media stream, may be NULL + * @param dest_type the destination address type, may be NULL + * @param port the destination port of the media stream, 0 if unknown + * @param ttl the time to live of the stream, 0 if not multicast + * @param fmt the AVFormatContext, which might contain options modifying + * the generated SDP + */ +void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx, + const char *dest_addr, const char *dest_type, + int port, int ttl, AVFormatContext *fmt); + +/** + * Write a packet to another muxer than the one the user originally + * intended. Useful when chaining muxers, where one muxer internally + * writes a received packet to another muxer. + * + * @param dst the muxer to write the packet to + * @param dst_stream the stream index within dst to write the packet to + * @param pkt the packet to be written + * @param src the muxer the packet originally was intended for + * @param interleave 0->use av_write_frame, 1->av_interleaved_write_frame + * @return the value av_write_frame returned + */ +int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, + AVFormatContext *src, int interleave); + +/** + * Read a whole line of text from AVIOContext. Stop reading after reaching + * either a \\n, a \\0 or EOF. The returned string is always \\0-terminated, + * and may be truncated if the buffer is too small. + * + * @param s the read-only AVIOContext + * @param buf buffer to store the read line + * @param maxlen size of the buffer + * @return the length of the string written in the buffer, not including the + * final \\0 + */ +int ff_get_line(AVIOContext *s, char *buf, int maxlen); + +/** + * Same as ff_get_line but strip the white-space characters in the text tail + * + * @param s the read-only AVIOContext + * @param buf buffer to store the read line + * @param maxlen size of the buffer + * @return the length of the string written in the buffer + */ +int ff_get_chomp_line(AVIOContext *s, char *buf, int maxlen); + +/** + * Read a whole line of text from AVIOContext to an AVBPrint buffer. Stop + * reading after reaching a \\r, a \\n, a \\r\\n, a \\0 or EOF. The line + * ending characters are NOT included in the buffer, but they are skipped on + * the input. + * + * @param s the read-only AVIOContext + * @param bp the AVBPrint buffer + * @return the length of the read line, not including the line endings, + * negative on error. + */ +int64_t ff_read_line_to_bprint(AVIOContext *s, AVBPrint *bp); + +/** + * Read a whole line of text from AVIOContext to an AVBPrint buffer overwriting + * its contents. Stop reading after reaching a \\r, a \\n, a \\r\\n, a \\0 or + * EOF. The line ending characters are NOT included in the buffer, but they + * are skipped on the input. + * + * @param s the read-only AVIOContext + * @param bp the AVBPrint buffer + * @return the length of the read line not including the line endings, + * negative on error, or if the buffer becomes truncated. + */ +int64_t ff_read_line_to_bprint_overwrite(AVIOContext *s, AVBPrint *bp); + +#define SPACE_CHARS " \t\r\n" + +/** + * Callback function type for ff_parse_key_value. + * + * @param key a pointer to the key + * @param key_len the number of bytes that belong to the key, including the '=' + * char + * @param dest return the destination pointer for the value in *dest, may + * be null to ignore the value + * @param dest_len the length of the *dest buffer + */ +typedef void (*ff_parse_key_val_cb)(void *context, const char *key, + int key_len, char **dest, int *dest_len); +/** + * Parse a string with comma-separated key=value pairs. The value strings + * may be quoted and may contain escaped characters within quoted strings. + * + * @param str the string to parse + * @param callback_get_buf function that returns where to store the + * unescaped value string. + * @param context the opaque context pointer to pass to callback_get_buf + */ +void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf, + void *context); + +/** + * Find stream index based on format-specific stream ID + * @return stream index, or < 0 on error + */ +int ff_find_stream_index(AVFormatContext *s, int id); + +/** + * Internal version of av_index_search_timestamp + */ +int ff_index_search_timestamp(const AVIndexEntry *entries, int nb_entries, + int64_t wanted_timestamp, int flags); + +/** + * Internal version of av_add_index_entry + */ +int ff_add_index_entry(AVIndexEntry **index_entries, + int *nb_index_entries, + unsigned int *index_entries_allocated_size, + int64_t pos, int64_t timestamp, int size, int distance, int flags); + +void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance); + +/** + * Add a new chapter. + * + * @param s media file handle + * @param id unique ID for this chapter + * @param start chapter start time in time_base units + * @param end chapter end time in time_base units + * @param title chapter title + * + * @return AVChapter or NULL on error + */ +AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, + int64_t start, int64_t end, const char *title); + +/** + * Ensure the index uses less memory than the maximum specified in + * AVFormatContext.max_index_size by discarding entries if it grows + * too large. + */ +void ff_reduce_index(AVFormatContext *s, int stream_index); + +enum AVCodecID ff_guess_image2_codec(const char *filename); + +/** + * Perform a binary search using av_index_search_timestamp() and + * AVInputFormat.read_timestamp(). + * + * @param target_ts target timestamp in the time base of the given stream + * @param stream_index stream number + */ +int ff_seek_frame_binary(AVFormatContext *s, int stream_index, + int64_t target_ts, int flags); + +/** + * Update cur_dts of all streams based on the given timestamp and AVStream. + * + * Stream ref_st unchanged, others set cur_dts in their native time base. + * Only needed for timestamp wrapping or if (dts not set and pts!=dts). + * @param timestamp new dts expressed in time_base of param ref_st + * @param ref_st reference stream giving time_base of param timestamp + */ +void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp); + +int ff_find_last_ts(AVFormatContext *s, int stream_index, int64_t *ts, int64_t *pos, + int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); + +/** + * Perform a binary search using read_timestamp(). + * + * @param target_ts target timestamp in the time base of the given stream + * @param stream_index stream number + */ +int64_t ff_gen_search(AVFormatContext *s, int stream_index, + int64_t target_ts, int64_t pos_min, + int64_t pos_max, int64_t pos_limit, + int64_t ts_min, int64_t ts_max, + int flags, int64_t *ts_ret, + int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t )); + +/** + * Set the time base and wrapping info for a given stream. This will be used + * to interpret the stream's timestamps. If the new time base is invalid + * (numerator or denominator are non-positive), it leaves the stream + * unchanged. + * + * @param s stream + * @param pts_wrap_bits number of bits effectively used by the pts + * (used for wrap control) + * @param pts_num time base numerator + * @param pts_den time base denominator + */ +void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, + unsigned int pts_num, unsigned int pts_den); + +/** + * Add side data to a packet for changing parameters to the given values. + * Parameters set to 0 aren't included in the change. + */ +int ff_add_param_change(AVPacket *pkt, int32_t channels, + uint64_t channel_layout, int32_t sample_rate, + int32_t width, int32_t height); + +/** + * Set the timebase for each stream from the corresponding codec timebase and + * print it. + */ +int ff_framehash_write_header(AVFormatContext *s); + +/** + * Read a transport packet from a media file. + * + * @param s media file handle + * @param pkt is filled + * @return 0 if OK, AVERROR_xxx on error + */ +int ff_read_packet(AVFormatContext *s, AVPacket *pkt); + +/** + * Interleave an AVPacket per dts so it can be muxed. + * + * @param s an AVFormatContext for output. pkt resp. out will be added to + * resp. taken from its packet buffer. + * @param out the interleaved packet will be output here + * @param pkt the input packet; will be blank on return if not NULL + * @param flush 1 if no further packets are available as input and all + * remaining packets should be output + * @return 1 if a packet was output, 0 if no packet could be output + * (in which case out may be uninitialized), < 0 if an error occurred + */ +int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, + AVPacket *pkt, int flush); + +void ff_free_stream(AVFormatContext *s, AVStream *st); + +/** + * Return the frame duration in seconds. Return 0 if not available. + */ +void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStream *st, + AVCodecParserContext *pc, AVPacket *pkt); + +unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id); + +enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag); + +int ff_is_intra_only(enum AVCodecID id); + +/** + * Select a PCM codec based on the given parameters. + * + * @param bps bits-per-sample + * @param flt floating-point + * @param be big-endian + * @param sflags signed flags. each bit corresponds to one byte of bit depth. + * e.g. the 1st bit indicates if 8-bit should be signed or + * unsigned, the 2nd bit indicates if 16-bit should be signed or + * unsigned, etc... This is useful for formats such as WAVE where + * only 8-bit is unsigned and all other bit depths are signed. + * @return a PCM codec id or AV_CODEC_ID_NONE + */ +enum AVCodecID ff_get_pcm_codec_id(int bps, int flt, int be, int sflags); + +/** + * Chooses a timebase for muxing the specified stream. + * + * The chosen timebase allows sample accurate timestamps based + * on the framerate or sample rate for audio streams. It also is + * at least as precise as 1/min_precision would be. + */ +AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precision); + +/** + * Chooses a timebase for muxing the specified stream. + */ +enum AVChromaLocation ff_choose_chroma_location(AVFormatContext *s, AVStream *st); + +/** + * Generate standard extradata for AVC-Intra based on width/height and field + * order. + */ +int ff_generate_avci_extradata(AVStream *st); + +/** + * Add a bitstream filter to a stream. + * + * @param st output stream to add a filter to + * @param name the name of the filter to add + * @param args filter-specific argument string + * @return >0 on success; + * AVERROR code on failure + */ +int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args); + +/** + * Copy encoding parameters from source to destination stream + * + * @param dst pointer to destination AVStream + * @param src pointer to source AVStream + * @return >=0 on success, AVERROR code on error + */ +int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src); + +/** + * Wrap avpriv_io_move and log if error happens. + * + * @param url_src source path + * @param url_dst destination path + * @return 0 or AVERROR on failure + */ +int ff_rename(const char *url_src, const char *url_dst, void *logctx); + +/** + * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end + * which is always set to 0. + * + * Previously allocated extradata in par will be freed. + * + * @param size size of extradata + * @return 0 if OK, AVERROR_xxx on error + */ +int ff_alloc_extradata(AVCodecParameters *par, int size); + +/** + * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end + * which is always set to 0 and fill it from pb. + * + * @param size size of extradata + * @return >= 0 if OK, AVERROR_xxx on error + */ +int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size); + +/** + * add frame for rfps calculation. + * + * @param dts timestamp of the i-th frame + * @return 0 if OK, AVERROR_xxx on error + */ +int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t dts); + +void ff_rfps_calculate(AVFormatContext *ic); + +/** + * Flags for AVFormatContext.write_uncoded_frame() + */ +enum AVWriteUncodedFrameFlags { + + /** + * Query whether the feature is possible on this stream. + * The frame argument is ignored. + */ + AV_WRITE_UNCODED_FRAME_QUERY = 0x0001, + +}; + +/** + * Copies the whilelists from one context to the other + */ +int ff_copy_whiteblacklists(AVFormatContext *dst, const AVFormatContext *src); + +/** + * Returned by demuxers to indicate that data was consumed but discarded + * (ignored streams or junk data). The framework will re-call the demuxer. + */ +#define FFERROR_REDO FFERRTAG('R','E','D','O') + +/** + * Utility function to open IO stream of output format. + * + * @param s AVFormatContext + * @param url URL or file name to open for writing + * @options optional options which will be passed to io_open callback + * @return >=0 on success, negative AVERROR in case of failure + */ +int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options); + +/* + * A wrapper around AVFormatContext.io_close that should be used + * instead of calling the pointer directly. + */ +void ff_format_io_close(AVFormatContext *s, AVIOContext **pb); + +/** + * Utility function to check if the file uses http or https protocol + * + * @param s AVFormatContext + * @param filename URL or file name to open for writing + */ +int ff_is_http_proto(char *filename); + +/** + * Parse creation_time in AVFormatContext metadata if exists and warn if the + * parsing fails. + * + * @param s AVFormatContext + * @param timestamp parsed timestamp in microseconds, only set on successful parsing + * @param return_seconds set this to get the number of seconds in timestamp instead of microseconds + * @return 1 if OK, 0 if the metadata was not present, AVERROR(EINVAL) on parse error + */ +int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds); + +/** + * Standardize creation_time metadata in AVFormatContext to an ISO-8601 + * timestamp string. + * + * @param s AVFormatContext + * @return <0 on error + */ +int ff_standardize_creation_time(AVFormatContext *s); + +#define CONTAINS_PAL 2 +/** + * Reshuffles the lines to use the user specified stride. + * + * @param ppkt input and output packet + * @return negative error code or + * 0 if no new packet was allocated + * non-zero if a new packet was allocated and ppkt has to be freed + * CONTAINS_PAL if in addition to a new packet the old contained a palette + */ +int ff_reshuffle_raw_rgb(AVFormatContext *s, AVPacket **ppkt, AVCodecParameters *par, int expected_stride); + +/** + * Retrieves the palette from a packet, either from side data, or + * appended to the video data in the packet itself (raw video only). + * It is commonly used after a call to ff_reshuffle_raw_rgb(). + * + * Use 0 for the ret parameter to check for side data only. + * + * @param pkt pointer to packet before calling ff_reshuffle_raw_rgb() + * @param ret return value from ff_reshuffle_raw_rgb(), or 0 + * @param palette pointer to palette buffer + * @return negative error code or + * 1 if the packet has a palette, else 0 + */ +int ff_get_packet_palette(AVFormatContext *s, AVPacket *pkt, int ret, uint32_t *palette); + +/** + * Finalize buf into extradata and set its size appropriately. + */ +int ff_bprint_to_codecpar_extradata(AVCodecParameters *par, struct AVBPrint *buf); + +/** + * Find the next packet in the interleaving queue for the given stream. + * The pkt parameter is filled in with the queued packet, including + * references to the data (which the caller is not allowed to keep or + * modify). + * + * @return 0 if a packet was found, a negative value if no packet was found + */ +int ff_interleaved_peek(AVFormatContext *s, int stream, + AVPacket *pkt, int add_offset); + + +int ff_lock_avformat(void); +int ff_unlock_avformat(void); + +/** + * Set AVFormatContext url field to the provided pointer. The pointer must + * point to a valid string. The existing url field is freed if necessary. Also + * set the legacy filename field to the same string which was provided in url. + */ +void ff_format_set_url(AVFormatContext *s, char *url); + +#define FF_PACKETLIST_FLAG_REF_PACKET (1 << 0) /**< Create a new reference for the packet instead of + transferring the ownership of the existing one to the + list. */ + +/** + * Append an AVPacket to the list. + * + * @param head List head element + * @param tail List tail element + * @param pkt The packet being appended. The data described in it will + * be made reference counted if it isn't already. + * @param flags Any combination of FF_PACKETLIST_FLAG_* flags + * @return 0 on success, negative AVERROR value on failure. On failure, + the list is unchanged + */ +int ff_packet_list_put(AVPacketList **head, AVPacketList **tail, + AVPacket *pkt, int flags); + +/** + * Remove the oldest AVPacket in the list and return it. + * The behaviour is undefined if the packet list is empty. + * + * @note The pkt will be overwritten completely. The caller owns the + * packet and must unref it by itself. + * + * @param head List head element + * @param tail List tail element + * @param pkt Pointer to an AVPacket struct + * @return 0 on success. Success is guaranteed + * if the packet list is not empty. + */ +int ff_packet_list_get(AVPacketList **head, AVPacketList **tail, + AVPacket *pkt); + +/** + * Wipe the list and unref all the packets in it. + * + * @param head List head element + * @param tail List tail element + */ +void ff_packet_list_free(AVPacketList **head, AVPacketList **tail); + +void avpriv_register_devices(const AVOutputFormat * const o[], const AVInputFormat * const i[]); + +#endif /* AVFORMAT_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ip.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ip.h new file mode 100644 index 00000000..b76cdab9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ip.h @@ -0,0 +1,72 @@ +/* + * IP common code + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_IP_H +#define AVFORMAT_IP_H + +#include "network.h" + +/** + * Structure for storing IP (UDP) source filters or block lists. + */ +typedef struct IPSourceFilters { + int nb_include_addrs; + int nb_exclude_addrs; + struct sockaddr_storage *include_addrs; + struct sockaddr_storage *exclude_addrs; +} IPSourceFilters; + +/** + * Checks the source address against a given IP source filter. + * @return 0 if packet should be processed based on the filter, 1 if the packet + * can be dropped. + */ +int ff_ip_check_source_lists(struct sockaddr_storage *source_addr_ptr, IPSourceFilters *s); + +/** + * Resolves hostname into an addrinfo structure. + * @return addrinfo structure which should be freed by the user, NULL in case + * of error. + */ +struct addrinfo *ff_ip_resolve_host(void *log_ctx, + const char *hostname, int port, + int type, int family, int flags); + +/** + * Parses the address[,address] source list in buf and adds it to the filters + * in the IPSourceFilters structure. + * @return 0 on success, < 0 AVERROR code on error. + */ +int ff_ip_parse_sources(void *log_ctx, const char *buf, IPSourceFilters *filters); + +/** + * Parses the address[,address] source block list in buf and adds it to the + * filters in the IPSourceFilters structure. + * @return 0 on success, < 0 AVERROR code on error. + */ +int ff_ip_parse_blocks(void *log_ctx, const char *buf, IPSourceFilters *filters); + +/** + * Resets the IP filter list and frees the internal fields of an + * IPSourceFilters structure. + */ +void ff_ip_reset_filters(IPSourceFilters *filters); + +#endif /* AVFORMAT_IP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ircam.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ircam.h new file mode 100644 index 00000000..f7f9c84b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/ircam.h @@ -0,0 +1,30 @@ +/* + * IRCAM common code + * Copyright (c) 2012 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_IRCAM_H +#define AVFORMAT_IRCAM_H + +#include "internal.h" + +extern const AVCodecTag ff_codec_ircam_be_tags[]; +extern const AVCodecTag ff_codec_ircam_le_tags[]; + +#endif /* AVFORMAT_IRCAM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/isom.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/isom.h new file mode 100644 index 00000000..41a9c64c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/isom.h @@ -0,0 +1,383 @@ +/* + * ISO Media common code + * copyright (c) 2001 Fabrice Bellard + * copyright (c) 2002 Francois Revol + * copyright (c) 2006 Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_ISOM_H +#define AVFORMAT_ISOM_H + +#include +#include + +#include "libavutil/encryption_info.h" +#include "libavutil/mastering_display_metadata.h" +#include "libavutil/spherical.h" +#include "libavutil/stereo3d.h" + +#include "avio.h" +#include "internal.h" +#include "dv.h" + +/* isom.c */ +extern const AVCodecTag ff_mp4_obj_type[]; +extern const AVCodecTag ff_codec_movvideo_tags[]; +extern const AVCodecTag ff_codec_movaudio_tags[]; +extern const AVCodecTag ff_codec_movsubtitle_tags[]; +extern const AVCodecTag ff_codec_movdata_tags[]; + +int ff_mov_iso639_to_lang(const char lang[4], int mp4); +int ff_mov_lang_to_iso639(unsigned code, char to[4]); + +struct AVAESCTR; + +/* the QuickTime file format is quite convoluted... + * it has lots of index tables, each indexing something in another one... + * Here we just use what is needed to read the chunks + */ + +typedef struct MOVStts { + unsigned int count; + int duration; +} MOVStts; + +typedef struct MOVStsc { + int first; + int count; + int id; +} MOVStsc; + +typedef struct MOVElst { + int64_t duration; + int64_t time; + float rate; +} MOVElst; + +typedef struct MOVDref { + uint32_t type; + char *path; + char *dir; + char volume[28]; + char filename[64]; + int16_t nlvl_to, nlvl_from; +} MOVDref; + +typedef struct MOVAtom { + uint32_t type; + int64_t size; /* total size (excluding the size and type fields) */ +} MOVAtom; + +struct MOVParseTableEntry; + +typedef struct MOVFragment { + int found_tfhd; + unsigned track_id; + uint64_t base_data_offset; + uint64_t moof_offset; + uint64_t implicit_offset; + unsigned stsd_id; + unsigned duration; + unsigned size; + unsigned flags; +} MOVFragment; + +typedef struct MOVTrackExt { + unsigned track_id; + unsigned stsd_id; + unsigned duration; + unsigned size; + unsigned flags; +} MOVTrackExt; + +typedef struct MOVSbgp { + unsigned int count; + unsigned int index; +} MOVSbgp; + +typedef struct MOVEncryptionIndex { + // Individual encrypted samples. If there are no elements, then the default + // settings will be used. + unsigned int nb_encrypted_samples; + AVEncryptionInfo **encrypted_samples; + + uint8_t* auxiliary_info_sizes; + size_t auxiliary_info_sample_count; + uint8_t auxiliary_info_default_size; + uint64_t* auxiliary_offsets; ///< Absolute seek position + size_t auxiliary_offsets_count; +} MOVEncryptionIndex; + +typedef struct MOVFragmentStreamInfo { + int id; + int64_t sidx_pts; + int64_t first_tfra_pts; + int64_t tfdt_dts; + int64_t next_trun_dts; + int index_entry; + MOVEncryptionIndex *encryption_index; +} MOVFragmentStreamInfo; + +typedef struct MOVFragmentIndexItem { + int64_t moof_offset; + int headers_read; + int current; + int nb_stream_info; + MOVFragmentStreamInfo * stream_info; +} MOVFragmentIndexItem; + +typedef struct MOVFragmentIndex { + int allocated_size; + int complete; + int current; + int nb_items; + MOVFragmentIndexItem * item; +} MOVFragmentIndex; + +typedef struct MOVIndexRange { + int64_t start; + int64_t end; +} MOVIndexRange; + +typedef struct MOVStreamContext { + AVIOContext *pb; + int pb_is_copied; + int ffindex; ///< AVStream index + int next_chunk; + unsigned int chunk_count; + int64_t *chunk_offsets; + unsigned int stts_count; + MOVStts *stts_data; + unsigned int sdtp_count; + uint8_t *sdtp_data; + unsigned int ctts_count; + unsigned int ctts_allocated_size; + MOVStts *ctts_data; + unsigned int stsc_count; + MOVStsc *stsc_data; + unsigned int stsc_index; + int stsc_sample; + unsigned int stps_count; + unsigned *stps_data; ///< partial sync sample for mpeg-2 open gop + MOVElst *elst_data; + unsigned int elst_count; + int ctts_index; + int ctts_sample; + unsigned int sample_size; ///< may contain value calculated from stsd or value from stsz atom + unsigned int stsz_sample_size; ///< always contains sample size from stsz atom + unsigned int sample_count; + int *sample_sizes; + int keyframe_absent; + unsigned int keyframe_count; + int *keyframes; + int time_scale; + int64_t time_offset; ///< time offset of the edit list entries + int64_t min_corrected_pts; ///< minimum Composition time shown by the edits excluding empty edits. + int current_sample; + int64_t current_index; + MOVIndexRange* index_ranges; + MOVIndexRange* current_index_range; + unsigned int bytes_per_frame; + unsigned int samples_per_frame; + int dv_audio_container; + int pseudo_stream_id; ///< -1 means demux all ids + int16_t audio_cid; ///< stsd audio compression id + unsigned drefs_count; + MOVDref *drefs; + int dref_id; + int timecode_track; + int width; ///< tkhd width + int height; ///< tkhd height + int dts_shift; ///< dts shift when ctts is negative + uint32_t palette[256]; + int has_palette; + int64_t data_size; + uint32_t tmcd_flags; ///< tmcd track flags + int64_t track_end; ///< used for dts generation in fragmented movie files + int start_pad; ///< amount of samples to skip due to enc-dec delay + unsigned int rap_group_count; + MOVSbgp *rap_group; + + int nb_frames_for_fps; + int64_t duration_for_fps; + + /** extradata array (and size) for multiple stsd */ + uint8_t **extradata; + int *extradata_size; + int last_stsd_index; + int stsd_count; + int stsd_version; + + int32_t *display_matrix; + AVStereo3D *stereo3d; + AVSphericalMapping *spherical; + size_t spherical_size; + AVMasteringDisplayMetadata *mastering; + AVContentLightMetadata *coll; + size_t coll_size; + + uint32_t format; + + int has_sidx; // If there is an sidx entry for this stream. + struct { + struct AVAESCTR* aes_ctr; + unsigned int per_sample_iv_size; // Either 0, 8, or 16. + AVEncryptionInfo *default_encrypted_sample; + MOVEncryptionIndex *encryption_index; + } cenc; +} MOVStreamContext; + +typedef struct MOVContext { + const AVClass *class; ///< class for private options + AVFormatContext *fc; + int time_scale; + int64_t duration; ///< duration of the longest track + int found_moov; ///< 'moov' atom has been found + int found_mdat; ///< 'mdat' atom has been found + int found_hdlr_mdta; ///< 'hdlr' atom with type 'mdta' has been found + int trak_index; ///< Index of the current 'trak' + char **meta_keys; + unsigned meta_keys_count; + DVDemuxContext *dv_demux; + AVFormatContext *dv_fctx; + int isom; ///< 1 if file is ISO Media (mp4/3gp) + MOVFragment fragment; ///< current fragment in moof atom + MOVTrackExt *trex_data; + unsigned trex_count; + int itunes_metadata; ///< metadata are itunes style + int handbrake_version; + int *chapter_tracks; + unsigned int nb_chapter_tracks; + int use_absolute_path; + int ignore_editlist; + int advanced_editlist; + int ignore_chapters; + int seek_individually; + int64_t next_root_atom; ///< offset of the next root atom + int export_all; + int export_xmp; + int *bitrates; ///< bitrates read before streams creation + int bitrates_count; + int moov_retry; + int use_mfra_for; + int has_looked_for_mfra; + MOVFragmentIndex frag_index; + int atom_depth; + unsigned int aax_mode; ///< 'aax' file has been detected + uint8_t file_key[20]; + uint8_t file_iv[20]; + void *activation_bytes; + int activation_bytes_size; + void *audible_fixed_key; + int audible_fixed_key_size; + struct AVAES *aes_decrypt; + uint8_t *decryption_key; + int decryption_key_len; + int enable_drefs; + int32_t movie_display_matrix[3][3]; ///< display matrix from mvhd +} MOVContext; + +int ff_mp4_read_descr_len(AVIOContext *pb); +int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag); +int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb); +void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id); + +#define MP4ODescrTag 0x01 +#define MP4IODescrTag 0x02 +#define MP4ESDescrTag 0x03 +#define MP4DecConfigDescrTag 0x04 +#define MP4DecSpecificDescrTag 0x05 +#define MP4SLDescrTag 0x06 + +#define MOV_TFHD_BASE_DATA_OFFSET 0x01 +#define MOV_TFHD_STSD_ID 0x02 +#define MOV_TFHD_DEFAULT_DURATION 0x08 +#define MOV_TFHD_DEFAULT_SIZE 0x10 +#define MOV_TFHD_DEFAULT_FLAGS 0x20 +#define MOV_TFHD_DURATION_IS_EMPTY 0x010000 +#define MOV_TFHD_DEFAULT_BASE_IS_MOOF 0x020000 + +#define MOV_TRUN_DATA_OFFSET 0x01 +#define MOV_TRUN_FIRST_SAMPLE_FLAGS 0x04 +#define MOV_TRUN_SAMPLE_DURATION 0x100 +#define MOV_TRUN_SAMPLE_SIZE 0x200 +#define MOV_TRUN_SAMPLE_FLAGS 0x400 +#define MOV_TRUN_SAMPLE_CTS 0x800 + +#define MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK 0x0000ffff +#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC 0x00010000 +#define MOV_FRAG_SAMPLE_FLAG_PADDING_MASK 0x000e0000 +#define MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK 0x00300000 +#define MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK 0x00c00000 +#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK 0x03000000 + +#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO 0x02000000 +#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000 + +#define MOV_TKHD_FLAG_ENABLED 0x0001 +#define MOV_TKHD_FLAG_IN_MOVIE 0x0002 +#define MOV_TKHD_FLAG_IN_PREVIEW 0x0004 +#define MOV_TKHD_FLAG_IN_POSTER 0x0008 + +#define MOV_SAMPLE_DEPENDENCY_UNKNOWN 0x0 +#define MOV_SAMPLE_DEPENDENCY_YES 0x1 +#define MOV_SAMPLE_DEPENDENCY_NO 0x2 + + +#define TAG_IS_AVCI(tag) \ + ((tag) == MKTAG('a', 'i', '5', 'p') || \ + (tag) == MKTAG('a', 'i', '5', 'q') || \ + (tag) == MKTAG('a', 'i', '5', '2') || \ + (tag) == MKTAG('a', 'i', '5', '3') || \ + (tag) == MKTAG('a', 'i', '5', '5') || \ + (tag) == MKTAG('a', 'i', '5', '6') || \ + (tag) == MKTAG('a', 'i', '1', 'p') || \ + (tag) == MKTAG('a', 'i', '1', 'q') || \ + (tag) == MKTAG('a', 'i', '1', '2') || \ + (tag) == MKTAG('a', 'i', '1', '3') || \ + (tag) == MKTAG('a', 'i', '1', '5') || \ + (tag) == MKTAG('a', 'i', '1', '6') || \ + (tag) == MKTAG('a', 'i', 'v', 'x') || \ + (tag) == MKTAG('A', 'V', 'i', 'n')) + + +int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb); + +int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries); +void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout); + +#define FF_MOV_FLAG_MFRA_AUTO -1 +#define FF_MOV_FLAG_MFRA_DTS 1 +#define FF_MOV_FLAG_MFRA_PTS 2 + +/** + * Compute codec id for 'lpcm' tag. + * See CoreAudioTypes and AudioStreamBasicDescription at Apple. + */ +static inline enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags) +{ + /* lpcm flags: + * 0x1 = float + * 0x2 = big-endian + * 0x4 = signed + */ + return ff_get_pcm_codec_id(bps, flags & 1, flags & 2, flags & 4 ? -1 : 0); +} + +#endif /* AVFORMAT_ISOM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/lrc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/lrc.h new file mode 100644 index 00000000..0297bc1e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/lrc.h @@ -0,0 +1,29 @@ +/* + * LRC lyrics file format decoder + * Copyright (c) 2014 StarBrilliant + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_LRC_H +#define AVFORMAT_LRC_H + +#include "metadata.h" + +extern const AVMetadataConv ff_lrc_metadata_conv[]; + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/matroska.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/matroska.h new file mode 100644 index 00000000..6f198f06 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/matroska.h @@ -0,0 +1,383 @@ +/* + * Matroska constants + * Copyright (c) 2003-2004 The FFmpeg project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_MATROSKA_H +#define AVFORMAT_MATROSKA_H + +#include "libavcodec/avcodec.h" +#include "metadata.h" +#include "internal.h" + +/* EBML version supported */ +#define EBML_VERSION 1 + +/* top-level master-IDs */ +#define EBML_ID_HEADER 0x1A45DFA3 + +/* IDs in the HEADER master */ +#define EBML_ID_EBMLVERSION 0x4286 +#define EBML_ID_EBMLREADVERSION 0x42F7 +#define EBML_ID_EBMLMAXIDLENGTH 0x42F2 +#define EBML_ID_EBMLMAXSIZELENGTH 0x42F3 +#define EBML_ID_DOCTYPE 0x4282 +#define EBML_ID_DOCTYPEVERSION 0x4287 +#define EBML_ID_DOCTYPEREADVERSION 0x4285 + +/* general EBML types */ +#define EBML_ID_VOID 0xEC +#define EBML_ID_CRC32 0xBF + +/* + * Matroska element IDs, max. 32 bits + */ + +/* toplevel segment */ +#define MATROSKA_ID_SEGMENT 0x18538067 + +/* Matroska top-level master IDs */ +#define MATROSKA_ID_INFO 0x1549A966 +#define MATROSKA_ID_TRACKS 0x1654AE6B +#define MATROSKA_ID_CUES 0x1C53BB6B +#define MATROSKA_ID_TAGS 0x1254C367 +#define MATROSKA_ID_SEEKHEAD 0x114D9B74 +#define MATROSKA_ID_ATTACHMENTS 0x1941A469 +#define MATROSKA_ID_CLUSTER 0x1F43B675 +#define MATROSKA_ID_CHAPTERS 0x1043A770 + +/* IDs in the info master */ +#define MATROSKA_ID_TIMECODESCALE 0x2AD7B1 +#define MATROSKA_ID_DURATION 0x4489 +#define MATROSKA_ID_TITLE 0x7BA9 +#define MATROSKA_ID_WRITINGAPP 0x5741 +#define MATROSKA_ID_MUXINGAPP 0x4D80 +#define MATROSKA_ID_DATEUTC 0x4461 +#define MATROSKA_ID_SEGMENTUID 0x73A4 + +/* ID in the tracks master */ +#define MATROSKA_ID_TRACKENTRY 0xAE + +/* IDs in the trackentry master */ +#define MATROSKA_ID_TRACKNUMBER 0xD7 +#define MATROSKA_ID_TRACKUID 0x73C5 +#define MATROSKA_ID_TRACKTYPE 0x83 +#define MATROSKA_ID_TRACKVIDEO 0xE0 +#define MATROSKA_ID_TRACKAUDIO 0xE1 +#define MATROSKA_ID_TRACKOPERATION 0xE2 +#define MATROSKA_ID_TRACKCOMBINEPLANES 0xE3 +#define MATROSKA_ID_TRACKPLANE 0xE4 +#define MATROSKA_ID_TRACKPLANEUID 0xE5 +#define MATROSKA_ID_TRACKPLANETYPE 0xE6 +#define MATROSKA_ID_CODECID 0x86 +#define MATROSKA_ID_CODECPRIVATE 0x63A2 +#define MATROSKA_ID_CODECNAME 0x258688 +#define MATROSKA_ID_CODECINFOURL 0x3B4040 +#define MATROSKA_ID_CODECDOWNLOADURL 0x26B240 +#define MATROSKA_ID_CODECDECODEALL 0xAA +#define MATROSKA_ID_CODECDELAY 0x56AA +#define MATROSKA_ID_SEEKPREROLL 0x56BB +#define MATROSKA_ID_TRACKNAME 0x536E +#define MATROSKA_ID_TRACKLANGUAGE 0x22B59C +#define MATROSKA_ID_TRACKFLAGENABLED 0xB9 +#define MATROSKA_ID_TRACKFLAGDEFAULT 0x88 +#define MATROSKA_ID_TRACKFLAGFORCED 0x55AA +#define MATROSKA_ID_TRACKFLAGLACING 0x9C +#define MATROSKA_ID_TRACKMINCACHE 0x6DE7 +#define MATROSKA_ID_TRACKMAXCACHE 0x6DF8 +#define MATROSKA_ID_TRACKDEFAULTDURATION 0x23E383 +#define MATROSKA_ID_TRACKCONTENTENCODINGS 0x6D80 +#define MATROSKA_ID_TRACKCONTENTENCODING 0x6240 +#define MATROSKA_ID_TRACKTIMECODESCALE 0x23314F +#define MATROSKA_ID_TRACKMAXBLKADDID 0x55EE + +/* IDs in the trackvideo master */ +#define MATROSKA_ID_VIDEOFRAMERATE 0x2383E3 +#define MATROSKA_ID_VIDEODISPLAYWIDTH 0x54B0 +#define MATROSKA_ID_VIDEODISPLAYHEIGHT 0x54BA +#define MATROSKA_ID_VIDEOPIXELWIDTH 0xB0 +#define MATROSKA_ID_VIDEOPIXELHEIGHT 0xBA +#define MATROSKA_ID_VIDEOPIXELCROPB 0x54AA +#define MATROSKA_ID_VIDEOPIXELCROPT 0x54BB +#define MATROSKA_ID_VIDEOPIXELCROPL 0x54CC +#define MATROSKA_ID_VIDEOPIXELCROPR 0x54DD +#define MATROSKA_ID_VIDEODISPLAYUNIT 0x54B2 +#define MATROSKA_ID_VIDEOFLAGINTERLACED 0x9A +#define MATROSKA_ID_VIDEOFIELDORDER 0x9D +#define MATROSKA_ID_VIDEOSTEREOMODE 0x53B8 +#define MATROSKA_ID_VIDEOALPHAMODE 0x53C0 +#define MATROSKA_ID_VIDEOASPECTRATIO 0x54B3 +#define MATROSKA_ID_VIDEOCOLORSPACE 0x2EB524 +#define MATROSKA_ID_VIDEOCOLOR 0x55B0 + +#define MATROSKA_ID_VIDEOCOLORMATRIXCOEFF 0x55B1 +#define MATROSKA_ID_VIDEOCOLORBITSPERCHANNEL 0x55B2 +#define MATROSKA_ID_VIDEOCOLORCHROMASUBHORZ 0x55B3 +#define MATROSKA_ID_VIDEOCOLORCHROMASUBVERT 0x55B4 +#define MATROSKA_ID_VIDEOCOLORCBSUBHORZ 0x55B5 +#define MATROSKA_ID_VIDEOCOLORCBSUBVERT 0x55B6 +#define MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ 0x55B7 +#define MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT 0x55B8 +#define MATROSKA_ID_VIDEOCOLORRANGE 0x55B9 +#define MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS 0x55BA + +#define MATROSKA_ID_VIDEOCOLORPRIMARIES 0x55BB +#define MATROSKA_ID_VIDEOCOLORMAXCLL 0x55BC +#define MATROSKA_ID_VIDEOCOLORMAXFALL 0x55BD + +#define MATROSKA_ID_VIDEOCOLORMASTERINGMETA 0x55D0 +#define MATROSKA_ID_VIDEOCOLOR_RX 0x55D1 +#define MATROSKA_ID_VIDEOCOLOR_RY 0x55D2 +#define MATROSKA_ID_VIDEOCOLOR_GX 0x55D3 +#define MATROSKA_ID_VIDEOCOLOR_GY 0x55D4 +#define MATROSKA_ID_VIDEOCOLOR_BX 0x55D5 +#define MATROSKA_ID_VIDEOCOLOR_BY 0x55D6 +#define MATROSKA_ID_VIDEOCOLOR_WHITEX 0x55D7 +#define MATROSKA_ID_VIDEOCOLOR_WHITEY 0x55D8 +#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX 0x55D9 +#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN 0x55DA + +#define MATROSKA_ID_VIDEOPROJECTION 0x7670 +#define MATROSKA_ID_VIDEOPROJECTIONTYPE 0x7671 +#define MATROSKA_ID_VIDEOPROJECTIONPRIVATE 0x7672 +#define MATROSKA_ID_VIDEOPROJECTIONPOSEYAW 0x7673 +#define MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH 0x7674 +#define MATROSKA_ID_VIDEOPROJECTIONPOSEROLL 0x7675 + +/* IDs in the trackaudio master */ +#define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5 +#define MATROSKA_ID_AUDIOOUTSAMPLINGFREQ 0x78B5 + +#define MATROSKA_ID_AUDIOBITDEPTH 0x6264 +#define MATROSKA_ID_AUDIOCHANNELS 0x9F + +/* IDs in the content encoding master */ +#define MATROSKA_ID_ENCODINGORDER 0x5031 +#define MATROSKA_ID_ENCODINGSCOPE 0x5032 +#define MATROSKA_ID_ENCODINGTYPE 0x5033 +#define MATROSKA_ID_ENCODINGCOMPRESSION 0x5034 +#define MATROSKA_ID_ENCODINGCOMPALGO 0x4254 +#define MATROSKA_ID_ENCODINGCOMPSETTINGS 0x4255 + +#define MATROSKA_ID_ENCODINGENCRYPTION 0x5035 +#define MATROSKA_ID_ENCODINGENCAESSETTINGS 0x47E7 +#define MATROSKA_ID_ENCODINGENCALGO 0x47E1 +#define MATROSKA_ID_ENCODINGENCKEYID 0x47E2 +#define MATROSKA_ID_ENCODINGSIGALGO 0x47E5 +#define MATROSKA_ID_ENCODINGSIGHASHALGO 0x47E6 +#define MATROSKA_ID_ENCODINGSIGKEYID 0x47E4 +#define MATROSKA_ID_ENCODINGSIGNATURE 0x47E3 + +/* ID in the cues master */ +#define MATROSKA_ID_POINTENTRY 0xBB + +/* IDs in the pointentry master */ +#define MATROSKA_ID_CUETIME 0xB3 +#define MATROSKA_ID_CUETRACKPOSITION 0xB7 + +/* IDs in the cuetrackposition master */ +#define MATROSKA_ID_CUETRACK 0xF7 +#define MATROSKA_ID_CUECLUSTERPOSITION 0xF1 +#define MATROSKA_ID_CUERELATIVEPOSITION 0xF0 +#define MATROSKA_ID_CUEDURATION 0xB2 +#define MATROSKA_ID_CUEBLOCKNUMBER 0x5378 + +/* IDs in the tags master */ +#define MATROSKA_ID_TAG 0x7373 +#define MATROSKA_ID_SIMPLETAG 0x67C8 +#define MATROSKA_ID_TAGNAME 0x45A3 +#define MATROSKA_ID_TAGSTRING 0x4487 +#define MATROSKA_ID_TAGLANG 0x447A +#define MATROSKA_ID_TAGDEFAULT 0x4484 +#define MATROSKA_ID_TAGDEFAULT_BUG 0x44B4 +#define MATROSKA_ID_TAGTARGETS 0x63C0 +#define MATROSKA_ID_TAGTARGETS_TYPE 0x63CA +#define MATROSKA_ID_TAGTARGETS_TYPEVALUE 0x68CA +#define MATROSKA_ID_TAGTARGETS_TRACKUID 0x63C5 +#define MATROSKA_ID_TAGTARGETS_CHAPTERUID 0x63C4 +#define MATROSKA_ID_TAGTARGETS_ATTACHUID 0x63C6 + +/* IDs in the seekhead master */ +#define MATROSKA_ID_SEEKENTRY 0x4DBB + +/* IDs in the seekpoint master */ +#define MATROSKA_ID_SEEKID 0x53AB +#define MATROSKA_ID_SEEKPOSITION 0x53AC + +/* IDs in the cluster master */ +#define MATROSKA_ID_CLUSTERTIMECODE 0xE7 +#define MATROSKA_ID_CLUSTERPOSITION 0xA7 +#define MATROSKA_ID_CLUSTERPREVSIZE 0xAB +#define MATROSKA_ID_BLOCKGROUP 0xA0 +#define MATROSKA_ID_BLOCKADDITIONS 0x75A1 +#define MATROSKA_ID_BLOCKMORE 0xA6 +#define MATROSKA_ID_BLOCKADDID 0xEE +#define MATROSKA_ID_BLOCKADDITIONAL 0xA5 +#define MATROSKA_ID_SIMPLEBLOCK 0xA3 + +/* IDs in the blockgroup master */ +#define MATROSKA_ID_BLOCK 0xA1 +#define MATROSKA_ID_BLOCKDURATION 0x9B +#define MATROSKA_ID_BLOCKREFERENCE 0xFB +#define MATROSKA_ID_CODECSTATE 0xA4 +#define MATROSKA_ID_DISCARDPADDING 0x75A2 + +/* IDs in the attachments master */ +#define MATROSKA_ID_ATTACHEDFILE 0x61A7 +#define MATROSKA_ID_FILEDESC 0x467E +#define MATROSKA_ID_FILENAME 0x466E +#define MATROSKA_ID_FILEMIMETYPE 0x4660 +#define MATROSKA_ID_FILEDATA 0x465C +#define MATROSKA_ID_FILEUID 0x46AE + +/* IDs in the chapters master */ +#define MATROSKA_ID_EDITIONENTRY 0x45B9 +#define MATROSKA_ID_CHAPTERATOM 0xB6 +#define MATROSKA_ID_CHAPTERTIMESTART 0x91 +#define MATROSKA_ID_CHAPTERTIMEEND 0x92 +#define MATROSKA_ID_CHAPTERDISPLAY 0x80 +#define MATROSKA_ID_CHAPSTRING 0x85 +#define MATROSKA_ID_CHAPLANG 0x437C +#define MATROSKA_ID_CHAPCOUNTRY 0x437E +#define MATROSKA_ID_EDITIONUID 0x45BC +#define MATROSKA_ID_EDITIONFLAGHIDDEN 0x45BD +#define MATROSKA_ID_EDITIONFLAGDEFAULT 0x45DB +#define MATROSKA_ID_EDITIONFLAGORDERED 0x45DD +#define MATROSKA_ID_CHAPTERUID 0x73C4 +#define MATROSKA_ID_CHAPTERFLAGHIDDEN 0x98 +#define MATROSKA_ID_CHAPTERFLAGENABLED 0x4598 +#define MATROSKA_ID_CHAPTERPHYSEQUIV 0x63C3 + +typedef enum { + MATROSKA_TRACK_TYPE_NONE = 0x0, + MATROSKA_TRACK_TYPE_VIDEO = 0x1, + MATROSKA_TRACK_TYPE_AUDIO = 0x2, + MATROSKA_TRACK_TYPE_COMPLEX = 0x3, + MATROSKA_TRACK_TYPE_LOGO = 0x10, + MATROSKA_TRACK_TYPE_SUBTITLE = 0x11, + MATROSKA_TRACK_TYPE_BUTTONS = 0x12, + MATROSKA_TRACK_TYPE_CONTROL = 0x20, + MATROSKA_TRACK_TYPE_METADATA = 0x21, +} MatroskaTrackType; + +typedef enum { + MATROSKA_TRACK_ENCODING_COMP_ZLIB = 0, + MATROSKA_TRACK_ENCODING_COMP_BZLIB = 1, + MATROSKA_TRACK_ENCODING_COMP_LZO = 2, + MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP = 3, +} MatroskaTrackEncodingCompAlgo; + +typedef enum { + MATROSKA_VIDEO_INTERLACE_FLAG_UNDETERMINED = 0, + MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED = 1, + MATROSKA_VIDEO_INTERLACE_FLAG_PROGRESSIVE = 2, +} MatroskaVideoInterlaceFlag; + +typedef enum { + MATROSKA_VIDEO_FIELDORDER_PROGRESSIVE = 0, + MATROSKA_VIDEO_FIELDORDER_TT = 1, + MATROSKA_VIDEO_FIELDORDER_UNDETERMINED = 2, + MATROSKA_VIDEO_FIELDORDER_BB = 6, + MATROSKA_VIDEO_FIELDORDER_TB = 9, + MATROSKA_VIDEO_FIELDORDER_BT = 14, +} MatroskaVideoFieldOrder; + +typedef enum { + MATROSKA_VIDEO_STEREOMODE_TYPE_MONO = 0, + MATROSKA_VIDEO_STEREOMODE_TYPE_LEFT_RIGHT = 1, + MATROSKA_VIDEO_STEREOMODE_TYPE_BOTTOM_TOP = 2, + MATROSKA_VIDEO_STEREOMODE_TYPE_TOP_BOTTOM = 3, + MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_RL = 4, + MATROSKA_VIDEO_STEREOMODE_TYPE_CHECKERBOARD_LR = 5, + MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_RL = 6, + MATROSKA_VIDEO_STEREOMODE_TYPE_ROW_INTERLEAVED_LR = 7, + MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_RL = 8, + MATROSKA_VIDEO_STEREOMODE_TYPE_COL_INTERLEAVED_LR = 9, + MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_CYAN_RED = 10, + MATROSKA_VIDEO_STEREOMODE_TYPE_RIGHT_LEFT = 11, + MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_GREEN_MAG = 12, + MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_LR = 13, + MATROSKA_VIDEO_STEREOMODE_TYPE_BOTH_EYES_BLOCK_RL = 14, + MATROSKA_VIDEO_STEREOMODE_TYPE_NB, +} MatroskaVideoStereoModeType; + +typedef enum { + MATROSKA_VIDEO_DISPLAYUNIT_PIXELS = 0, + MATROSKA_VIDEO_DISPLAYUNIT_CENTIMETERS = 1, + MATROSKA_VIDEO_DISPLAYUNIT_INCHES = 2, + MATROSKA_VIDEO_DISPLAYUNIT_DAR = 3, + MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN = 4, +} MatroskaVideoDisplayUnit; + +typedef enum { + MATROSKA_COLOUR_CHROMASITINGHORZ_UNDETERMINED = 0, + MATROSKA_COLOUR_CHROMASITINGHORZ_LEFT = 1, + MATROSKA_COLOUR_CHROMASITINGHORZ_HALF = 2, + MATROSKA_COLOUR_CHROMASITINGHORZ_NB +} MatroskaColourChromaSitingHorz; + +typedef enum { + MATROSKA_COLOUR_CHROMASITINGVERT_UNDETERMINED = 0, + MATROSKA_COLOUR_CHROMASITINGVERT_TOP = 1, + MATROSKA_COLOUR_CHROMASITINGVERT_HALF = 2, + MATROSKA_COLOUR_CHROMASITINGVERT_NB +} MatroskaColourChromaSitingVert; + +typedef enum { + MATROSKA_VIDEO_PROJECTION_TYPE_RECTANGULAR = 0, + MATROSKA_VIDEO_PROJECTION_TYPE_EQUIRECTANGULAR = 1, + MATROSKA_VIDEO_PROJECTION_TYPE_CUBEMAP = 2, + MATROSKA_VIDEO_PROJECTION_TYPE_MESH = 3, +} MatroskaVideoProjectionType; + +/* + * Matroska Codec IDs, strings + */ + +typedef struct CodecTags{ + char str[22]; + enum AVCodecID id; +}CodecTags; + +/* max. depth in the EBML tree structure */ +#define EBML_MAX_DEPTH 16 + +#define MATROSKA_VIDEO_STEREO_PLANE_COUNT 3 + +extern const CodecTags ff_mkv_codec_tags[]; +extern const CodecTags ff_webm_codec_tags[]; +extern const AVMetadataConv ff_mkv_metadata_conv[]; +extern const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREOMODE_TYPE_NB]; +extern const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_PLANE_COUNT]; + +/* AVStream Metadata tag keys for WebM Dash Manifest */ +#define INITIALIZATION_RANGE "webm_dash_manifest_initialization_range" +#define CUES_START "webm_dash_manifest_cues_start" +#define CUES_END "webm_dash_manifest_cues_end" +#define FILENAME "webm_dash_manifest_file_name" +#define BANDWIDTH "webm_dash_manifest_bandwidth" +#define DURATION "webm_dash_manifest_duration" +#define CLUSTER_KEYFRAME "webm_dash_manifest_cluster_keyframe" +#define CUE_TIMESTAMPS "webm_dash_manifest_cue_timestamps" +#define TRACK_NUMBER "webm_dash_manifest_track_number" +#define CODEC_PRIVATE_SIZE "webm_dash_manifest_codec_priv_size" + +int ff_mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mode); + +#endif /* AVFORMAT_MATROSKA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/metadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/metadata.h new file mode 100644 index 00000000..6586094e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/metadata.h @@ -0,0 +1,44 @@ +/* + * copyright (c) 2009 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_METADATA_H +#define AVFORMAT_METADATA_H + +/** + * @file + * internal metadata API header + * see avformat.h or the public API! + */ + + +#include "avformat.h" +#include "libavutil/dict.h" + +typedef struct AVMetadataConv { + const char *native; + const char *generic; +} AVMetadataConv; + +void ff_metadata_conv(AVDictionary **pm, const AVMetadataConv *d_conv, + const AVMetadataConv *s_conv); +void ff_metadata_conv_ctx(AVFormatContext *ctx, const AVMetadataConv *d_conv, + const AVMetadataConv *s_conv); + +#endif /* AVFORMAT_METADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mms.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mms.h new file mode 100644 index 00000000..57e3d7e1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mms.h @@ -0,0 +1,64 @@ +/* + * MMS protocol common definitions. + * Copyright (c) 2010 Zhentan Feng + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_MMS_H +#define AVFORMAT_MMS_H + +#include "url.h" + +typedef struct MMSStream { + int id; +}MMSStream; + +typedef struct MMSContext { + URLContext *mms_hd; ///< TCP connection handle + MMSStream *streams; + + /** Buffer for outgoing packets. */ + /*@{*/ + uint8_t *write_out_ptr; ///< Pointer for writing the buffer. + uint8_t out_buffer[512]; ///< Buffer for outgoing packet. + /*@}*/ + + /** Buffer for incoming packets. */ + /*@{*/ + uint8_t in_buffer[65536]; ///< Buffer for incoming packets. + uint8_t *read_in_ptr; ///< Pointer for reading from incoming buffer. + int remaining_in_len; ///< Reading length from incoming buffer. + /*@}*/ + + /** Internal handling of the ASF header */ + /*@{*/ + uint8_t *asf_header; ///< Stored ASF header. + int asf_header_size; ///< Size of stored ASF header. + int header_parsed; ///< The header has been received and parsed. + int asf_packet_len; + int asf_header_read_size; + /*@}*/ + + int stream_num; ///< stream numbers. + unsigned int nb_streams_allocated; ///< allocated size of streams +} MMSContext; + +int ff_mms_asf_header_parser(MMSContext * mms); +int ff_mms_read_data(MMSContext *mms, uint8_t *buf, const int size); +int ff_mms_read_header(MMSContext * mms, uint8_t * buf, const int size); + +#endif /* AVFORMAT_MMS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mov_chan.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mov_chan.h new file mode 100644 index 00000000..ca28345a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mov_chan.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2011 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * mov 'chan' tag reading/writing. + * @author Justin Ruggles + */ + +#ifndef AVFORMAT_MOV_CHAN_H +#define AVFORMAT_MOV_CHAN_H + +#include + +#include "libavcodec/avcodec.h" +#include "avformat.h" + +/** + * Get the channel layout for the specified channel layout tag. + * + * @param[in] tag channel layout tag + * @param[out] bitmap channel bitmap (only used if needed) + * @return channel layout + */ +uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap); + +/** + * Get the channel layout tag for the specified codec id and channel layout. + * If the layout tag was not found, use a channel bitmap if possible. + * + * @param[in] codec_id codec id + * @param[in] channel_layout channel layout + * @param[out] bitmap channel bitmap + * @return channel layout tag + */ +uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, + uint64_t channel_layout, + uint32_t *bitmap); + +/** + * Read 'chan' tag from the input stream. + * + * @param s AVFormatContext + * @param pb AVIOContext + * @param st The stream to set codec values for + * @param size Remaining size in the 'chan' tag + * @return 0 if ok, or negative AVERROR code on failure + */ +int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, + int64_t size); + +#endif /* AVFORMAT_MOV_CHAN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenc.h new file mode 100644 index 00000000..997b2d61 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenc.h @@ -0,0 +1,273 @@ +/* + * MOV, 3GP, MP4 muxer + * Copyright (c) 2003 Thomas Raivio + * Copyright (c) 2004 Gildas Bazin + * Copyright (c) 2009 Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_MOVENC_H +#define AVFORMAT_MOVENC_H + +#include "avformat.h" +#include "movenccenc.h" + +#define MOV_FRAG_INFO_ALLOC_INCREMENT 64 +#define MOV_INDEX_CLUSTER_SIZE 1024 +#define MOV_TIMESCALE 1000 + +#define RTP_MAX_PACKET_SIZE 1450 + +#define MODE_MP4 0x01 +#define MODE_MOV 0x02 +#define MODE_3GP 0x04 +#define MODE_PSP 0x08 // example working PSP command line: +// ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V00001.MP4 +#define MODE_3G2 0x10 +#define MODE_IPOD 0x20 +#define MODE_ISM 0x40 +#define MODE_F4V 0x80 + +typedef struct MOVIentry { + uint64_t pos; + int64_t dts; + int64_t pts; + unsigned int size; + unsigned int samples_in_chunk; + unsigned int chunkNum; ///< Chunk number if the current entry is a chunk start otherwise 0 + unsigned int entries; + int cts; +#define MOV_SYNC_SAMPLE 0x0001 +#define MOV_PARTIAL_SYNC_SAMPLE 0x0002 +#define MOV_DISPOSABLE_SAMPLE 0x0004 + uint32_t flags; + AVProducerReferenceTime prft; +} MOVIentry; + +typedef struct HintSample { + uint8_t *data; + int size; + int sample_number; + int offset; + int own_data; +} HintSample; + +typedef struct HintSampleQueue { + int size; + int len; + HintSample *samples; +} HintSampleQueue; + +typedef struct MOVFragmentInfo { + int64_t offset; + int64_t time; + int64_t duration; + int64_t tfrf_offset; + int size; +} MOVFragmentInfo; + +typedef struct MOVTrack { + int mode; + int entry; + unsigned timescale; + uint64_t time; + int64_t track_duration; + int last_sample_is_subtitle_end; + long sample_count; + long sample_size; + long chunkCount; + int has_keyframes; + int has_disposable; +#define MOV_TRACK_CTTS 0x0001 +#define MOV_TRACK_STPS 0x0002 +#define MOV_TRACK_ENABLED 0x0004 + uint32_t flags; +#define MOV_TIMECODE_FLAG_DROPFRAME 0x0001 +#define MOV_TIMECODE_FLAG_24HOURSMAX 0x0002 +#define MOV_TIMECODE_FLAG_ALLOWNEGATIVE 0x0004 + uint32_t timecode_flags; + int language; + int track_id; + int tag; ///< stsd fourcc + AVStream *st; + AVCodecParameters *par; + int multichannel_as_mono; + + int vos_len; + uint8_t *vos_data; + MOVIentry *cluster; + unsigned cluster_capacity; + int audio_vbr; + int height; ///< active picture (w/o VBI) height for D-10/IMX + uint32_t tref_tag; + int tref_id; ///< trackID of the referenced track + int64_t start_dts; + int64_t start_cts; + int64_t end_pts; + int end_reliable; + int64_t dts_shift; + + int hint_track; ///< the track that hints this track, -1 if no hint track is set + int src_track; ///< the track that this hint (or tmcd) track describes + AVFormatContext *rtp_ctx; ///< the format context for the hinting rtp muxer + uint32_t prev_rtp_ts; + int64_t cur_rtp_ts_unwrapped; + uint32_t max_packet_size; + + int64_t default_duration; + uint32_t default_sample_flags; + uint32_t default_size; + + HintSampleQueue sample_queue; + AVPacket cover_image; + + AVIOContext *mdat_buf; + int64_t data_offset; + int64_t frag_start; + int frag_discont; + int entries_flushed; + + int nb_frag_info; + MOVFragmentInfo *frag_info; + unsigned frag_info_capacity; + + struct { + int first_packet_seq; + int first_packet_entry; + int first_packet_seen; + int first_frag_written; + int packet_seq; + int packet_entry; + int slices; + } vc1_info; + + void *eac3_priv; + + MOVMuxCencContext cenc; + + uint32_t palette[AVPALETTE_COUNT]; + int pal_done; + + int is_unaligned_qt_rgb; +} MOVTrack; + +typedef enum { + MOV_ENC_NONE = 0, + MOV_ENC_CENC_AES_CTR, +} MOVEncryptionScheme; + +typedef enum { + MOV_PRFT_NONE = 0, + MOV_PRFT_SRC_WALLCLOCK, + MOV_PRFT_SRC_PTS, + MOV_PRFT_NB +} MOVPrftBox; + +typedef struct MOVMuxContext { + const AVClass *av_class; + int mode; + int64_t time; + int nb_streams; + int nb_meta_tmcd; ///< number of new created tmcd track based on metadata (aka not data copy) + int chapter_track; ///< qt chapter track number + int64_t mdat_pos; + uint64_t mdat_size; + MOVTrack *tracks; + + int flags; + int rtp_flags; + + int iods_skip; + int iods_video_profile; + int iods_audio_profile; + + int moov_written; + int fragments; + int max_fragment_duration; + int min_fragment_duration; + int max_fragment_size; + int ism_lookahead; + AVIOContext *mdat_buf; + int first_trun; + + int video_track_timescale; + + int reserved_moov_size; ///< 0 for disabled, -1 for automatic, size otherwise + int64_t reserved_header_pos; + + char *major_brand; + + int per_stream_grouping; + AVFormatContext *fc; + + int use_editlist; + float gamma; + + int frag_interleave; + int missing_duration_warned; + + char *encryption_scheme_str; + MOVEncryptionScheme encryption_scheme; + uint8_t *encryption_key; + int encryption_key_len; + uint8_t *encryption_kid; + int encryption_kid_len; + + int need_rewrite_extradata; + + int use_stream_ids_as_track_ids; + int track_ids_ok; + int write_tmcd; + MOVPrftBox write_prft; + int empty_hdlr_name; +} MOVMuxContext; + +#define FF_MOV_FLAG_RTP_HINT (1 << 0) +#define FF_MOV_FLAG_FRAGMENT (1 << 1) +#define FF_MOV_FLAG_EMPTY_MOOV (1 << 2) +#define FF_MOV_FLAG_FRAG_KEYFRAME (1 << 3) +#define FF_MOV_FLAG_SEPARATE_MOOF (1 << 4) +#define FF_MOV_FLAG_FRAG_CUSTOM (1 << 5) +#define FF_MOV_FLAG_ISML (1 << 6) +#define FF_MOV_FLAG_FASTSTART (1 << 7) +#define FF_MOV_FLAG_OMIT_TFHD_OFFSET (1 << 8) +#define FF_MOV_FLAG_DISABLE_CHPL (1 << 9) +#define FF_MOV_FLAG_DEFAULT_BASE_MOOF (1 << 10) +#define FF_MOV_FLAG_DASH (1 << 11) +#define FF_MOV_FLAG_FRAG_DISCONT (1 << 12) +#define FF_MOV_FLAG_DELAY_MOOV (1 << 13) +#define FF_MOV_FLAG_GLOBAL_SIDX (1 << 14) +#define FF_MOV_FLAG_WRITE_COLR (1 << 15) +#define FF_MOV_FLAG_WRITE_GAMA (1 << 16) +#define FF_MOV_FLAG_USE_MDTA (1 << 17) +#define FF_MOV_FLAG_SKIP_TRAILER (1 << 18) +#define FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS (1 << 19) +#define FF_MOV_FLAG_FRAG_EVERY_FRAME (1 << 20) +#define FF_MOV_FLAG_SKIP_SIDX (1 << 21) +#define FF_MOV_FLAG_CMAF (1 << 22) +#define FF_MOV_FLAG_PREFER_ICC (1 << 23) + +int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt); + +int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index); +int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, + int track_index, int sample, + uint8_t *sample_data, int sample_size); +void ff_mov_close_hinting(MOVTrack *track); + +#endif /* AVFORMAT_MOVENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenccenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenccenc.h new file mode 100644 index 00000000..6f9e70e9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/movenccenc.h @@ -0,0 +1,86 @@ +/* + * MOV CENC (Common Encryption) writer + * Copyright (c) 2015 Eran Kornblau + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_MOVENCCENC_H +#define AVFORMAT_MOVENCCENC_H + +#include "libavutil/aes_ctr.h" +#include "avformat.h" +#include "avio.h" + +#define CENC_KID_SIZE (16) + +struct MOVTrack; + +typedef struct { + struct AVAESCTR* aes_ctr; + uint8_t* auxiliary_info; + size_t auxiliary_info_size; + size_t auxiliary_info_alloc_size; + uint32_t auxiliary_info_entries; + + /* subsample support */ + int use_subsamples; + uint16_t subsample_count; + size_t auxiliary_info_subsample_start; + uint8_t* auxiliary_info_sizes; + size_t auxiliary_info_sizes_alloc_size; +} MOVMuxCencContext; + +/** + * Initialize a CENC context + * @param key encryption key, must have a length of AES_CTR_KEY_SIZE + * @param use_subsamples when enabled parts of a packet can be encrypted, otherwise the whole packet is encrypted + */ +int ff_mov_cenc_init(MOVMuxCencContext* ctx, uint8_t* encryption_key, int use_subsamples, int bitexact); + +/** + * Free a CENC context + */ +void ff_mov_cenc_free(MOVMuxCencContext* ctx); + +/** + * Write a fully encrypted packet + */ +int ff_mov_cenc_write_packet(MOVMuxCencContext* ctx, AVIOContext *pb, const uint8_t *buf_in, int size); + +/** + * Parse AVC NAL units from annex B format, the nal size and type are written in the clear while the body is encrypted + */ +int ff_mov_cenc_avc_parse_nal_units(MOVMuxCencContext* ctx, AVIOContext *pb, const uint8_t *buf_in, int size); + +/** + * Write AVC NAL units that are in MP4 format, the nal size and type are written in the clear while the body is encrypted + */ +int ff_mov_cenc_avc_write_nal_units(AVFormatContext *s, MOVMuxCencContext* ctx, int nal_length_size, + AVIOContext *pb, const uint8_t *buf_in, int size); + +/** + * Write the cenc atoms that should reside inside stbl + */ +void ff_mov_cenc_write_stbl_atoms(MOVMuxCencContext* ctx, AVIOContext *pb); + +/** + * Write the sinf atom, contained inside stsd + */ +int ff_mov_cenc_write_sinf_tag(struct MOVTrack* track, AVIOContext *pb, uint8_t* kid); + +#endif /* AVFORMAT_MOVENCCENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpeg.h new file mode 100644 index 00000000..b6352957 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpeg.h @@ -0,0 +1,74 @@ +/* + * MPEG-1/2 muxer and demuxer common defines + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_MPEG_H +#define AVFORMAT_MPEG_H + +#include +#include "libavutil/intreadwrite.h" + +#define PACK_START_CODE ((unsigned int)0x000001ba) +#define SYSTEM_HEADER_START_CODE ((unsigned int)0x000001bb) +#define SEQUENCE_END_CODE ((unsigned int)0x000001b7) +#define PACKET_START_CODE_MASK ((unsigned int)0xffffff00) +#define PACKET_START_CODE_PREFIX ((unsigned int)0x00000100) +#define ISO_11172_END_CODE ((unsigned int)0x000001b9) + +/* mpeg2 */ +#define PROGRAM_STREAM_MAP 0x1bc +#define PRIVATE_STREAM_1 0x1bd +#define PADDING_STREAM 0x1be +#define PRIVATE_STREAM_2 0x1bf + +#define AUDIO_ID 0xc0 +#define VIDEO_ID 0xe0 +#define H264_ID 0xe2 +#define AC3_ID 0x80 +#define DTS_ID 0x88 +#define LPCM_ID 0xa0 +#define SUB_ID 0x20 + +#define STREAM_TYPE_VIDEO_MPEG1 0x01 +#define STREAM_TYPE_VIDEO_MPEG2 0x02 +#define STREAM_TYPE_AUDIO_MPEG1 0x03 +#define STREAM_TYPE_AUDIO_MPEG2 0x04 +#define STREAM_TYPE_PRIVATE_SECTION 0x05 +#define STREAM_TYPE_PRIVATE_DATA 0x06 +#define STREAM_TYPE_AUDIO_AAC 0x0f +#define STREAM_TYPE_VIDEO_MPEG4 0x10 +#define STREAM_TYPE_VIDEO_H264 0x1b +#define STREAM_TYPE_VIDEO_HEVC 0x24 +#define STREAM_TYPE_VIDEO_CAVS 0x42 + +#define STREAM_TYPE_AUDIO_AC3 0x81 + +static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 }; + +/** + * Parse MPEG-PES five-byte timestamp + */ +static inline int64_t ff_parse_pes_pts(const uint8_t *buf) { + return (int64_t)(*buf & 0x0e) << 29 | + (AV_RB16(buf+1) >> 1) << 15 | + AV_RB16(buf+3) >> 1; +} + +#endif /* AVFORMAT_MPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpegts.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpegts.h new file mode 100644 index 00000000..059b693f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mpegts.h @@ -0,0 +1,191 @@ +/* + * MPEG-2 transport stream defines + * Copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_MPEGTS_H +#define AVFORMAT_MPEGTS_H + +#include "avformat.h" + +#define TS_FEC_PACKET_SIZE 204 +#define TS_DVHS_PACKET_SIZE 192 +#define TS_PACKET_SIZE 188 +#define TS_MAX_PACKET_SIZE 204 + +#define NB_PID_MAX 8192 +#define USUAL_SECTION_SIZE 1024 /* except EIT which is limited to 4096 */ +#define MAX_SECTION_SIZE 4096 + +/* pids */ +#define PAT_PID 0x0000 /* Program Association Table */ +#define CAT_PID 0x0001 /* Conditional Access Table */ +#define TSDT_PID 0x0002 /* Transport Stream Description Table */ +#define IPMP_PID 0x0003 +/* PID from 0x0004 to 0x000F are reserved */ +#define NIT_PID 0x0010 /* Network Information Table */ +#define SDT_PID 0x0011 /* Service Description Table */ +#define BAT_PID 0x0011 /* Bouquet Association Table */ +#define EIT_PID 0x0012 /* Event Information Table */ +#define RST_PID 0x0013 /* Running Status Table */ +#define TDT_PID 0x0014 /* Time and Date Table */ +#define TOT_PID 0x0014 +#define NET_SYNC_PID 0x0015 +#define RNT_PID 0x0016 /* RAR Notification Table */ +/* PID from 0x0017 to 0x001B are reserved for future use */ +/* PID value 0x001C allocated to link-local inband signalling shall not be + * used on any broadcast signals. It shall only be used between devices in a + * controlled environment. */ +#define LINK_LOCAL_PID 0x001C +#define MEASUREMENT_PID 0x001D +#define DIT_PID 0x001E /* Discontinuity Information Table */ +#define SIT_PID 0x001F /* Selection Information Table */ +/* PID from 0x0020 to 0x1FFA may be assigned as needed to PMT, elementary + * streams and other data tables */ +#define FIRST_OTHER_PID 0x0020 +#define LAST_OTHER_PID 0x1FFA +/* PID 0x1FFB is used by DigiCipher 2/ATSC MGT metadata */ +/* PID from 0x1FFC to 0x1FFE may be assigned as needed to PMT, elementary + * streams and other data tables */ +#define NULL_PID 0x1FFF /* Null packet (used for fixed bandwidth padding) */ + +/* m2ts pids */ +#define M2TS_PMT_PID 0x0100 +#define M2TS_PCR_PID 0x1001 +#define M2TS_VIDEO_PID 0x1011 +#define M2TS_AUDIO_START_PID 0x1100 +#define M2TS_PGSSUB_START_PID 0x1200 +#define M2TS_TEXTSUB_PID 0x1800 +#define M2TS_SECONDARY_AUDIO_START_PID 0x1A00 +#define M2TS_SECONDARY_VIDEO_START_PID 0x1B00 + +/* table ids */ +#define PAT_TID 0x00 /* Program Association section */ +#define CAT_TID 0x01 /* Conditional Access section */ +#define PMT_TID 0x02 /* Program Map section */ +#define TSDT_TID 0x03 /* Transport Stream Description section */ +/* TID from 0x04 to 0x3F are reserved */ +#define M4OD_TID 0x05 +#define NIT_TID 0x40 /* Network Information section - actual network */ +#define ONIT_TID 0x41 /* Network Information section - other network */ +#define SDT_TID 0x42 /* Service Description section - actual TS */ +/* TID from 0x43 to 0x45 are reserved for future use */ +#define OSDT_TID 0x46 /* Service Descrition section - other TS */ +/* TID from 0x47 to 0x49 are reserved for future use */ +#define BAT_TID 0x4A /* Bouquet Association section */ +#define UNT_TID 0x4B /* Update Notification Table section */ +#define DFI_TID 0x4C /* Downloadable Font Info section */ +/* TID 0x4D is reserved for future use */ +#define EIT_TID 0x4E /* Event Information section - actual TS */ +#define OEIT_TID 0x4F /* Event Information section - other TS */ +#define EITS_START_TID 0x50 /* Event Information section schedule - actual TS */ +#define EITS_END_TID 0x5F /* Event Information section schedule - actual TS */ +#define OEITS_START_TID 0x60 /* Event Information section schedule - other TS */ +#define OEITS_END_TID 0x6F /* Event Information section schedule - other TS */ +#define TDT_TID 0x70 /* Time Date section */ +#define RST_TID 0x71 /* Running Status section */ +#define ST_TID 0x72 /* Stuffing section */ +#define TOT_TID 0x73 /* Time Offset section */ +#define AIT_TID 0x74 /* Application Inforamtion section */ +#define CT_TID 0x75 /* Container section */ +#define RCT_TID 0x76 /* Related Content section */ +#define CIT_TID 0x77 /* Content Identifier section */ +#define MPE_FEC_TID 0x78 /* MPE-FEC section */ +#define RPNT_TID 0x79 /* Resolution Provider Notification section */ +#define MPE_IFEC_TID 0x7A /* MPE-IFEC section */ +#define PROTMT_TID 0x7B /* Protection Message section */ +/* TID from 0x7C to 0x7D are reserved for future use */ +#define DIT_TID 0x7E /* Discontinuity Information section */ +#define SIT_TID 0x7F /* Selection Information section */ +/* TID from 0x80 to 0xFE are user defined */ +/* TID 0xFF is reserved */ + +#define STREAM_TYPE_VIDEO_MPEG1 0x01 +#define STREAM_TYPE_VIDEO_MPEG2 0x02 +#define STREAM_TYPE_AUDIO_MPEG1 0x03 +#define STREAM_TYPE_AUDIO_MPEG2 0x04 +#define STREAM_TYPE_PRIVATE_SECTION 0x05 +#define STREAM_TYPE_PRIVATE_DATA 0x06 +#define STREAM_TYPE_AUDIO_AAC 0x0f +#define STREAM_TYPE_AUDIO_AAC_LATM 0x11 +#define STREAM_TYPE_VIDEO_MPEG4 0x10 +#define STREAM_TYPE_METADATA 0x15 +#define STREAM_TYPE_VIDEO_H264 0x1b +#define STREAM_TYPE_VIDEO_HEVC 0x24 +#define STREAM_TYPE_VIDEO_CAVS 0x42 +#define STREAM_TYPE_VIDEO_VC1 0xea +#define STREAM_TYPE_VIDEO_DIRAC 0xd1 + +#define STREAM_TYPE_AUDIO_AC3 0x81 +#define STREAM_TYPE_AUDIO_DTS 0x82 +#define STREAM_TYPE_AUDIO_TRUEHD 0x83 +#define STREAM_TYPE_AUDIO_EAC3 0x87 + +typedef struct MpegTSContext MpegTSContext; + +MpegTSContext *avpriv_mpegts_parse_open(AVFormatContext *s); +int avpriv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, + const uint8_t *buf, int len); +void avpriv_mpegts_parse_close(MpegTSContext *ts); + +typedef struct SLConfigDescr { + int use_au_start; + int use_au_end; + int use_rand_acc_pt; + int use_padding; + int use_timestamps; + int use_idle; + int timestamp_res; + int timestamp_len; + int ocr_len; + int au_len; + int inst_bitrate_len; + int degr_prior_len; + int au_seq_num_len; + int packet_seq_num_len; +} SLConfigDescr; + +typedef struct Mp4Descr { + int es_id; + int dec_config_descr_len; + uint8_t *dec_config_descr; + SLConfigDescr sl; +} Mp4Descr; + +/** + * Parse an MPEG-2 descriptor + * @param[in] fc Format context (used for logging only) + * @param st Stream + * @param stream_type STREAM_TYPE_xxx + * @param pp Descriptor buffer pointer + * @param desc_list_end End of buffer + * @return <0 to stop processing + */ +int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type, + const uint8_t **pp, const uint8_t *desc_list_end, + Mp4Descr *mp4_descr, int mp4_descr_count, int pid, + MpegTSContext *ts); + +/** + * Check presence of H264 startcode + * @return <0 to stop processing + */ +int ff_check_h264_startcode(AVFormatContext *s, const AVStream *st, const AVPacket *pkt); + +#endif /* AVFORMAT_MPEGTS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mxf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mxf.h new file mode 100644 index 00000000..f2fff278 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/mxf.h @@ -0,0 +1,139 @@ +/* + * MXF + * Copyright (c) 2006 SmartJog S.A., Baptiste Coudurier + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_MXF_H +#define AVFORMAT_MXF_H + +#include "avformat.h" +#include "libavcodec/avcodec.h" +#include + +typedef uint8_t UID[16]; + +enum MXFMetadataSetType { + AnyType, + MaterialPackage, + SourcePackage, + SourceClip, + TimecodeComponent, + PulldownComponent, + Sequence, + MultipleDescriptor, + Descriptor, + Track, + CryptoContext, + Preface, + Identification, + ContentStorage, + SubDescriptor, + IndexTableSegment, + EssenceContainerData, + EssenceGroup, + TaggedValue, + TapeDescriptor, + AVCSubDescriptor, +}; + +enum MXFFrameLayout { + FullFrame = 0, + SeparateFields, + OneField, + MixedFields, + SegmentedFrame, +}; + +typedef struct MXFContentPackageRate { + int rate; + AVRational tb; +} MXFContentPackageRate; + +typedef struct KLVPacket { + UID key; + int64_t offset; + uint64_t length; + int64_t next_klv; +} KLVPacket; + +typedef enum { + NormalWrap = 0, + D10D11Wrap, + RawAWrap, + RawVWrap +} MXFWrappingIndicatorType; + +typedef struct MXFCodecUL { + UID uid; + unsigned matching_len; + int id; + const char *desc; + unsigned wrapping_indicator_pos; + MXFWrappingIndicatorType wrapping_indicator_type; +} MXFCodecUL; + +extern const MXFCodecUL ff_mxf_data_definition_uls[]; +extern const MXFCodecUL ff_mxf_codec_uls[]; +extern const MXFCodecUL ff_mxf_pixel_format_uls[]; +extern const MXFCodecUL ff_mxf_codec_tag_uls[]; + +int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *pix_fmt); +int ff_mxf_get_content_package_rate(AVRational time_base); + + +#define PRIxUID \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x" + +#define UID_ARG(x) \ + (x)[0], (x)[1], (x)[2], (x)[3], \ + (x)[4], (x)[5], (x)[6], (x)[7], \ + (x)[8], (x)[9], (x)[10], (x)[11], \ + (x)[12], (x)[13], (x)[14], (x)[15] \ + +#ifdef DEBUG +#define PRINT_KEY(pc, s, x) \ + av_log(pc, AV_LOG_VERBOSE, \ + "%s " \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x ", \ + s, UID_ARG(x)); \ + av_log(pc, AV_LOG_INFO, \ + "%s " \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x." \ + "%02x.%02x.%02x.%02x\n", \ + s, UID_ARG(x)) +#else +#define PRINT_KEY(pc, s, x) do { if(0) \ + av_log(pc, AV_LOG_VERBOSE, \ + "%s " \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x," \ + "0x%02x,0x%02x,0x%02x,0x%02x ", \ + s, UID_ARG(x)); \ + }while(0) +#endif + +#endif /* AVFORMAT_MXF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/network.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/network.h new file mode 100644 index 00000000..71347e81 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/network.h @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2007 The FFmpeg Project + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_NETWORK_H +#define AVFORMAT_NETWORK_H + +#include +#include + +#include "config.h" +#include "libavutil/error.h" +#include "os_support.h" +#include "avio.h" +#include "url.h" + +#if HAVE_UNISTD_H +#include +#endif + +#if HAVE_WINSOCK2_H +#include +#include + +#ifndef EPROTONOSUPPORT +#define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#endif +#ifndef ETIMEDOUT +#define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED +#define ECONNREFUSED WSAECONNREFUSED +#endif +#ifndef EINPROGRESS +#define EINPROGRESS WSAEINPROGRESS +#endif +#ifndef ENOTCONN +#define ENOTCONN WSAENOTCONN +#endif + +#define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e) +#define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e) + +int ff_neterrno(void); +#else +#include +#include +#include +#include +#include + +#define ff_neterrno() AVERROR(errno) +#endif /* HAVE_WINSOCK2_H */ + +#if HAVE_ARPA_INET_H +#include +#endif + +#if HAVE_POLL_H +#include +#endif + +int ff_socket_nonblock(int socket, int enable); + +int ff_network_init(void); +void ff_network_close(void); + +int ff_tls_init(void); +void ff_tls_deinit(void); + +int ff_network_wait_fd(int fd, int write); + +/** + * This works similarly to ff_network_wait_fd, but waits up to 'timeout' microseconds + * Uses ff_network_wait_fd in a loop + * + * @param fd Socket descriptor + * @param write Set 1 to wait for socket able to be read, 0 to be written + * @param timeout Timeout interval, in microseconds. Actual precision is 100000 mcs, due to ff_network_wait_fd usage + * @param int_cb Interrupt callback, is checked before each ff_network_wait_fd call + * @return 0 if data can be read/written, AVERROR(ETIMEDOUT) if timeout expired, or negative error code + */ +int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterruptCB *int_cb); + +/** + * Waits for up to 'timeout' microseconds. If the usert's int_cb is set and + * triggered, return before that. + * @param timeout Timeout in microseconds. Maybe have lower actual precision. + * @param int_cb Interrupt callback, is checked regularly. + * @return AVERROR(ETIMEDOUT) if timeout expirted, AVERROR_EXIT if interrupted by int_cb + */ +int ff_network_sleep_interruptible(int64_t timeout, AVIOInterruptCB *int_cb); + +#if !HAVE_STRUCT_SOCKADDR_STORAGE +struct sockaddr_storage { +#if HAVE_STRUCT_SOCKADDR_SA_LEN + uint8_t ss_len; + uint8_t ss_family; +#else + uint16_t ss_family; +#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */ + char ss_pad1[6]; + int64_t ss_align; + char ss_pad2[112]; +}; +#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ + +typedef union sockaddr_union { + struct sockaddr_storage storage; + struct sockaddr_in in; +#if HAVE_STRUCT_SOCKADDR_IN6 + struct sockaddr_in6 in6; +#endif +} sockaddr_union; + +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + +#if !HAVE_STRUCT_ADDRINFO +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + int ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; +#endif /* !HAVE_STRUCT_ADDRINFO */ + +/* getaddrinfo constants */ +#ifndef EAI_AGAIN +#define EAI_AGAIN 2 +#endif +#ifndef EAI_BADFLAGS +#define EAI_BADFLAGS 3 +#endif +#ifndef EAI_FAIL +#define EAI_FAIL 4 +#endif +#ifndef EAI_FAMILY +#define EAI_FAMILY 5 +#endif +#ifndef EAI_MEMORY +#define EAI_MEMORY 6 +#endif +#ifndef EAI_NODATA +#define EAI_NODATA 7 +#endif +#ifndef EAI_NONAME +#define EAI_NONAME 8 +#endif +#ifndef EAI_SERVICE +#define EAI_SERVICE 9 +#endif +#ifndef EAI_SOCKTYPE +#define EAI_SOCKTYPE 10 +#endif + +#ifndef AI_PASSIVE +#define AI_PASSIVE 1 +#endif + +#ifndef AI_CANONNAME +#define AI_CANONNAME 2 +#endif + +#ifndef AI_NUMERICHOST +#define AI_NUMERICHOST 4 +#endif + +#ifndef NI_NOFQDN +#define NI_NOFQDN 1 +#endif + +#ifndef NI_NUMERICHOST +#define NI_NUMERICHOST 2 +#endif + +#ifndef NI_NAMERQD +#define NI_NAMERQD 4 +#endif + +#ifndef NI_NUMERICSERV +#define NI_NUMERICSERV 8 +#endif + +#ifndef NI_DGRAM +#define NI_DGRAM 16 +#endif + +#if !HAVE_GETADDRINFO +int ff_getaddrinfo(const char *node, const char *service, + const struct addrinfo *hints, struct addrinfo **res); +void ff_freeaddrinfo(struct addrinfo *res); +int ff_getnameinfo(const struct sockaddr *sa, int salen, + char *host, int hostlen, + char *serv, int servlen, int flags); +#define getaddrinfo ff_getaddrinfo +#define freeaddrinfo ff_freeaddrinfo +#define getnameinfo ff_getnameinfo +#endif /* !HAVE_GETADDRINFO */ + +#if !HAVE_GETADDRINFO || HAVE_WINSOCK2_H +const char *ff_gai_strerror(int ecode); +#undef gai_strerror +#define gai_strerror ff_gai_strerror +#endif /* !HAVE_GETADDRINFO || HAVE_WINSOCK2_H */ + +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK 0x7f000001 +#endif + +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif + +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN INET_ADDRSTRLEN +#endif + +#ifndef IN_MULTICAST +#define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000) +#endif +#ifndef IN6_IS_ADDR_MULTICAST +#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff) +#endif + +int ff_is_multicast_address(struct sockaddr *addr); + +#define POLLING_TIME 100 /// Time in milliseconds between interrupt check + +/** + * Bind to a file descriptor and poll for a connection. + * + * @param fd First argument of bind(). + * @param addr Second argument of bind(). + * @param addrlen Third argument of bind(). + * @param timeout Polling timeout in milliseconds. + * @param h URLContext providing interrupt check + * callback and logging context. + * @return A non-blocking file descriptor on success + * or an AVERROR on failure. + */ +int ff_listen_bind(int fd, const struct sockaddr *addr, + socklen_t addrlen, int timeout, + URLContext *h); + +/** + * Bind to a file descriptor to an address without accepting connections. + * @param fd First argument of bind(). + * @param addr Second argument of bind(). + * @param addrlen Third argument of bind(). + * @return 0 on success or an AVERROR on failure. + */ +int ff_listen(int fd, const struct sockaddr *addr, socklen_t addrlen); + +/** + * Poll for a single connection on the passed file descriptor. + * @param fd The listening socket file descriptor. + * @param timeout Polling timeout in milliseconds. + * @param h URLContext providing interrupt check + * callback and logging context. + * @return A non-blocking file descriptor on success + * or an AVERROR on failure. + */ +int ff_accept(int fd, int timeout, URLContext *h); + +/** + * Connect to a file descriptor and poll for result. + * + * @param fd First argument of connect(), + * will be set as non-blocking. + * @param addr Second argument of connect(). + * @param addrlen Third argument of connect(). + * @param timeout Polling timeout in milliseconds. + * @param h URLContext providing interrupt check + * callback and logging context. + * @param will_try_next Whether the caller will try to connect to another + * address for the same host name, affecting the form of + * logged errors. + * @return 0 on success, AVERROR on failure. + */ +int ff_listen_connect(int fd, const struct sockaddr *addr, + socklen_t addrlen, int timeout, + URLContext *h, int will_try_next); + +int ff_http_match_no_proxy(const char *no_proxy, const char *hostname); + +int ff_socket(int domain, int type, int protocol); + +void ff_log_net_error(void *ctx, int level, const char* prefix); + +/** + * Connect to any of the given addrinfo addresses, with multiple attempts + * running in parallel. + * + * @param addrs The list of addresses to try to connect to. + * This list will be mutated internally, but the list head + * will remain as such, so this doesn't affect the caller + * freeing the list afterwards. + * @param timeout_ms_per_address The number of milliseconds to wait for each + * connection attempt. Since multiple addresses are tried, + * some of them in parallel, the total run time will at most + * be timeout_ms_per_address*ceil(nb_addrs/parallel) + + * (parallel - 1) * NEXT_ATTEMPT_DELAY_MS. + * @param parallel The maximum number of connections to attempt in parallel. + * This is limited to an internal maximum capacity. + * @param h URLContext providing interrupt check + * callback and logging context. + * @param fd If successful, the connected socket is returned here. + * @param customize_fd Function that will be called for each socket created, + * to allow the caller to set socket options before calling + * connect() on it, may be NULL. + * @param customize_ctx Context parameter passed to customize_fd. + * @return 0 on success, AVERROR on failure. + */ +int ff_connect_parallel(struct addrinfo *addrs, int timeout_ms_per_address, + int parallel, URLContext *h, int *fd, + void (*customize_fd)(void *, int), void *customize_ctx); + +#endif /* AVFORMAT_NETWORK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/nut.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/nut.h new file mode 100644 index 00000000..a4409ee2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/nut.h @@ -0,0 +1,144 @@ +/* + * "NUT" Container Format (de)muxer + * Copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_NUT_H +#define AVFORMAT_NUT_H + +#include "avformat.h" +#include "internal.h" +#include "metadata.h" + +#define MAIN_STARTCODE (0x7A561F5F04ADULL + (((uint64_t)('N'<<8) + 'M')<<48)) +#define STREAM_STARTCODE (0x11405BF2F9DBULL + (((uint64_t)('N'<<8) + 'S')<<48)) +#define SYNCPOINT_STARTCODE (0xE4ADEECA4569ULL + (((uint64_t)('N'<<8) + 'K')<<48)) +#define INDEX_STARTCODE (0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48)) +#define INFO_STARTCODE (0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48)) + +#define ID_STRING "nut/multimedia container\0" + +#define MAX_DISTANCE (1024*32-1) + +#define NUT_MAX_VERSION 4 +#define NUT_STABLE_VERSION 3 +#define NUT_MIN_VERSION 2 + +typedef enum{ + FLAG_KEY = 1, // if set, frame is keyframe + FLAG_EOR = 2, // if set, stream has no relevance on presentation. (EOR) + FLAG_CODED_PTS = 8, // if set, coded_pts is in the frame header + FLAG_STREAM_ID = 16, // if set, stream_id is coded in the frame header + FLAG_SIZE_MSB = 32, // if set, data_size_msb is at frame header, otherwise data_size_msb is 0 + FLAG_CHECKSUM = 64, // if set, the frame header contains a checksum + FLAG_RESERVED = 128, // if set, reserved_count is coded in the frame header + FLAG_SM_DATA = 256, // if set, side / meta data is stored in the frame header. + FLAG_HEADER_IDX =1024, // If set, header_idx is coded in the frame header. + FLAG_MATCH_TIME =2048, // If set, match_time_delta is coded in the frame header + FLAG_CODED =4096, // if set, coded_flags are stored in the frame header + FLAG_INVALID =8192, // if set, frame_code is invalid +} Flag; + +typedef struct Syncpoint { + uint64_t pos; + uint64_t back_ptr; +// uint64_t global_key_pts; + int64_t ts; +} Syncpoint; + +typedef struct FrameCode { + uint16_t flags; + uint8_t stream_id; + uint16_t size_mul; + uint16_t size_lsb; + int16_t pts_delta; + uint8_t reserved_count; + uint8_t header_idx; +} FrameCode; + +typedef struct StreamContext { + int last_flags; + int skip_until_key_frame; + int64_t last_pts; + int time_base_id; + AVRational *time_base; + int msb_pts_shift; + int max_pts_distance; + int decode_delay; //FIXME duplicate of has_b_frames + int64_t *keyframe_pts; +} StreamContext; + +typedef struct ChapterContext { + AVRational *time_base; +} ChapterContext; + +typedef struct NUTContext { + const AVClass *av_class; + AVFormatContext *avf; +// int written_packet_size; +// int64_t packet_start; + FrameCode frame_code[256]; + uint8_t header_len[128]; + const uint8_t *header[128]; + uint64_t next_startcode; // stores the next startcode if it has already been parsed but the stream is not seekable + StreamContext *stream; + ChapterContext *chapter; + unsigned int max_distance; + unsigned int time_base_count; + int64_t last_syncpoint_pos; + int64_t last_resync_pos; + int header_count; + AVRational *time_base; + struct AVTreeNode *syncpoints; + int sp_count; + int write_index; + int64_t max_pts; + AVRational *max_pts_tb; +#define NUT_BROADCAST 1 // use extended syncpoints +#define NUT_PIPE 2 // do not write syncpoints + int flags; + int version; // version currently in use + int minor_version; +} NUTContext; + +extern const AVCodecTag ff_nut_subtitle_tags[]; +extern const AVCodecTag ff_nut_video_tags[]; +extern const AVCodecTag ff_nut_audio_tags[]; +extern const AVCodecTag ff_nut_audio_extra_tags[]; +extern const AVCodecTag ff_nut_data_tags[]; + +extern const AVCodecTag * const ff_nut_codec_tags[]; + +typedef struct Dispositions { + char str[9]; + int flag; +} Dispositions; + +void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val); +int64_t ff_lsb2full(StreamContext *stream, int64_t lsb); +int ff_nut_sp_pos_cmp(const void *a, const void *b); +int ff_nut_sp_pts_cmp(const void *a, const void *b); +int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts); +void ff_nut_free_sp(NUTContext *nut); + +extern const Dispositions ff_nut_dispositions[]; + +extern const AVMetadataConv ff_nut_metadata_conv[]; + +#endif /* AVFORMAT_NUT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oggdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oggdec.h new file mode 100644 index 00000000..629a1d62 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oggdec.h @@ -0,0 +1,174 @@ +/** + Copyright (C) 2005 Michael Ahlberg, Måns Rullgård + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +**/ + +#ifndef AVFORMAT_OGGDEC_H +#define AVFORMAT_OGGDEC_H + +#include "avformat.h" +#include "metadata.h" + +struct ogg_codec { + const int8_t *magic; + uint8_t magicsize; + const int8_t *name; + /** + * Attempt to process a packet as a header + * @return 1 if the packet was a valid header, + * 0 if the packet was not a header (was a data packet) + * -1 if an error occurred or for unsupported stream + */ + int (*header)(AVFormatContext *, int); + int (*packet)(AVFormatContext *, int); + /** + * Translate a granule into a timestamp. + * Will set dts if non-null and known. + * @return pts + */ + uint64_t (*gptopts)(AVFormatContext *, int, uint64_t, int64_t *dts); + /** + * 1 if granule is the start time of the associated packet. + * 0 if granule is the end time of the associated packet. + */ + int granule_is_start; + /** + * Number of expected headers + */ + int nb_header; + void (*cleanup)(AVFormatContext *s, int idx); +}; + +struct ogg_stream { + uint8_t *buf; + unsigned int bufsize; + unsigned int bufpos; + unsigned int pstart; + unsigned int psize; + unsigned int pflags; + unsigned int pduration; + uint32_t serial; + uint64_t granule; + uint64_t start_granule; + int64_t lastpts; + int64_t lastdts; + int64_t sync_pos; ///< file offset of the first page needed to reconstruct the current packet + int64_t page_pos; ///< file offset of the current page + int flags; + const struct ogg_codec *codec; + int header; + int nsegs, segp; + uint8_t segments[255]; + int incomplete; ///< whether we're expecting a continuation in the next page + int page_end; ///< current packet is the last one completed in the page + int keyframe_seek; + int got_start; + int got_data; ///< 1 if the stream got some data (non-initial packets), 0 otherwise + int nb_header; ///< set to the number of parsed headers + int start_trimming; ///< set the number of packets to drop from the start + int end_trimming; ///< set the number of packets to drop from the end + uint8_t *new_metadata; + unsigned int new_metadata_size; + void *private; +}; + +struct ogg_state { + uint64_t pos; + int curidx; + struct ogg_state *next; + int nstreams; + struct ogg_stream streams[1]; +}; + +struct ogg { + struct ogg_stream *streams; + int nstreams; + int headers; + int curidx; + int64_t page_pos; ///< file offset of the current page + struct ogg_state *state; +}; + +#define OGG_FLAG_CONT 1 +#define OGG_FLAG_BOS 2 +#define OGG_FLAG_EOS 4 + +#define OGG_NOGRANULE_VALUE (-1ull) + +extern const struct ogg_codec ff_celt_codec; +extern const struct ogg_codec ff_dirac_codec; +extern const struct ogg_codec ff_flac_codec; +extern const struct ogg_codec ff_ogm_audio_codec; +extern const struct ogg_codec ff_ogm_old_codec; +extern const struct ogg_codec ff_ogm_text_codec; +extern const struct ogg_codec ff_ogm_video_codec; +extern const struct ogg_codec ff_old_dirac_codec; +extern const struct ogg_codec ff_old_flac_codec; +extern const struct ogg_codec ff_opus_codec; +extern const struct ogg_codec ff_skeleton_codec; +extern const struct ogg_codec ff_speex_codec; +extern const struct ogg_codec ff_theora_codec; +extern const struct ogg_codec ff_vorbis_codec; +extern const struct ogg_codec ff_vp8_codec; + +int ff_vorbis_comment(AVFormatContext *ms, AVDictionary **m, + const uint8_t *buf, int size, int parse_picture); + +int ff_vorbis_stream_comment(AVFormatContext *as, AVStream *st, + const uint8_t *buf, int size); + +static inline int +ogg_find_stream (struct ogg * ogg, int serial) +{ + int i; + + for (i = 0; i < ogg->nstreams; i++) + if (ogg->streams[i].serial == serial) + return i; + + return -1; +} + +static inline uint64_t +ogg_gptopts (AVFormatContext * s, int i, uint64_t gp, int64_t *dts) +{ + struct ogg *ogg = s->priv_data; + struct ogg_stream *os = ogg->streams + i; + uint64_t pts = AV_NOPTS_VALUE; + + if(os->codec && os->codec->gptopts){ + pts = os->codec->gptopts(s, i, gp, dts); + } else { + pts = gp; + if (dts) + *dts = pts; + } + if (pts > INT64_MAX && pts != AV_NOPTS_VALUE) { + // The return type is unsigned, we thus cannot return negative pts + av_log(s, AV_LOG_ERROR, "invalid pts %"PRId64"\n", pts); + pts = AV_NOPTS_VALUE; + } + + return pts; +} + +#endif /* AVFORMAT_OGGDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oma.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oma.h new file mode 100644 index 00000000..36fd0125 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/oma.h @@ -0,0 +1,49 @@ +/* + * Sony OpenMG (OMA) common data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_OMA_H +#define AVFORMAT_OMA_H + +#include + +#include "internal.h" + +#define EA3_HEADER_SIZE 96 +#define ID3v2_EA3_MAGIC "ea3" +#define OMA_ENC_HEADER_SIZE 16 + +enum { + OMA_CODECID_ATRAC3 = 0, + OMA_CODECID_ATRAC3P = 1, + OMA_CODECID_MP3 = 3, + OMA_CODECID_LPCM = 4, + OMA_CODECID_WMA = 5, + OMA_CODECID_ATRAC3PAL = 33, + OMA_CODECID_ATRAC3AL = 34, +}; + +extern const uint16_t ff_oma_srate_tab[8]; + +extern const AVCodecTag ff_oma_codec_tags[]; + +extern const uint64_t ff_oma_chid_to_native_layout[7]; +extern const int ff_oma_chid_to_num_channels[7]; + +#endif /* AVFORMAT_OMA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/options_table.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/options_table.h new file mode 100644 index 00000000..b4141564 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/options_table.h @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_OPTIONS_TABLE_H +#define AVFORMAT_OPTIONS_TABLE_H + +#include + +#include "libavutil/opt.h" +#include "avformat.h" +#include "internal.h" + +#define OFFSET(x) offsetof(AVFormatContext,x) +#define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C +//these names are too long to be readable +#define E AV_OPT_FLAG_ENCODING_PARAM +#define D AV_OPT_FLAG_DECODING_PARAM + +static const AVOption avformat_options[] = { +{"avioflags", NULL, OFFSET(avio_flags), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "avioflags"}, +{"direct", "reduce buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVIO_FLAG_DIRECT }, INT_MIN, INT_MAX, D|E, "avioflags"}, +{"probesize", "set probing size", OFFSET(probesize), AV_OPT_TYPE_INT64, {.i64 = 5000000 }, 32, INT64_MAX, D}, +{"formatprobesize", "number of bytes to probe file format", OFFSET(format_probesize), AV_OPT_TYPE_INT, {.i64 = PROBE_BUF_MAX}, 0, INT_MAX-1, D}, +{"packetsize", "set packet size", OFFSET(packet_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, E}, +{"fflags", NULL, OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = AVFMT_FLAG_AUTO_BSF }, INT_MIN, INT_MAX, D|E, "fflags"}, +{"flush_packets", "reduce the latency by flushing out packets immediately", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FLUSH_PACKETS }, INT_MIN, INT_MAX, E, "fflags"}, +{"ignidx", "ignore index", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNIDX }, INT_MIN, INT_MAX, D, "fflags"}, +{"genpts", "generate pts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_GENPTS }, INT_MIN, INT_MAX, D, "fflags"}, +{"nofillin", "do not fill in missing values that can be exactly calculated", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOFILLIN }, INT_MIN, INT_MAX, D, "fflags"}, +{"noparse", "disable AVParsers, this needs nofillin too", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOPARSE }, INT_MIN, INT_MAX, D, "fflags"}, +{"igndts", "ignore dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_IGNDTS }, INT_MIN, INT_MAX, D, "fflags"}, +{"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, +{"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, +#if FF_API_LAVF_KEEPSIDE_FLAG +{"keepside", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"}, +#endif +{"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"}, +#if FF_API_LAVF_MP4A_LATM +{"latm", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, +#endif +{"nobuffer", "reduce the latency introduced by optional buffering", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_NOBUFFER }, 0, INT_MAX, D, "fflags"}, +{"bitexact", "do not write random/volatile data", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_BITEXACT }, 0, 0, E, "fflags" }, +{"shortest", "stop muxing with the shortest stream", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_SHORTEST }, 0, 0, E, "fflags" }, +{"autobsf", "add needed bsfs automatically", 0, AV_OPT_TYPE_CONST, { .i64 = AVFMT_FLAG_AUTO_BSF }, 0, 0, E, "fflags" }, +{"seek2any", "allow seeking to non-keyframes on demuxer level when supported", OFFSET(seek2any), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, D}, +{"analyzeduration", "specify how many microseconds are analyzed to probe the input", OFFSET(max_analyze_duration), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, D}, +{"cryptokey", "decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, {.dbl = 0}, 0, 0, D}, +{"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), AV_OPT_TYPE_INT, {.i64 = 1<<20 }, 0, INT_MAX, D}, +{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), AV_OPT_TYPE_INT, {.i64 = 3041280 }, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */ +{"fdebug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, E|D, "fdebug"}, +{"ts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"}, +{"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, INT_MAX, E|D}, +{"start_time_realtime", "wall-clock time when stream begins (PTS==0)", OFFSET(start_time_realtime), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE}, INT64_MIN, INT64_MAX, E}, +{"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX-1, D}, +{"audio_preload", "microseconds by which audio packets should be interleaved earlier", OFFSET(audio_preload), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, E}, +{"chunk_duration", "microseconds for each chunk", OFFSET(max_chunk_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, E}, +{"chunk_size", "size in bytes for each chunk", OFFSET(max_chunk_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX-1, E}, +/* this is a crutch for avconv, since it cannot deal with identically named options in different contexts. + * to be removed when avconv is fixed */ +{"f_err_detect", "set error detection flags (deprecated; use err_detect, save via avconv)", OFFSET(error_recognition), AV_OPT_TYPE_FLAGS, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"}, +{"err_detect", "set error detection flags", OFFSET(error_recognition), AV_OPT_TYPE_FLAGS, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"}, +{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"}, +{"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, D, "err_detect"}, +{"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BUFFER }, INT_MIN, INT_MAX, D, "err_detect"}, +{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, D, "err_detect"}, +{"ignore_err", "ignore errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_IGNORE_ERR }, INT_MIN, INT_MAX, D, "err_detect"}, +{"careful", "consider things that violate the spec, are fast to check and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, D, "err_detect"}, +{"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT | AV_EF_CAREFUL }, INT_MIN, INT_MAX, D, "err_detect"}, +{"aggressive", "consider things that a sane encoder shouldn't do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, D, "err_detect"}, +{"use_wallclock_as_timestamps", "use wallclock as timestamps", OFFSET(use_wallclock_as_timestamps), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, D}, +{"skip_initial_bytes", "set number of bytes to skip before reading header and frames", OFFSET(skip_initial_bytes), AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX-1, D}, +{"correct_ts_overflow", "correct single timestamp overflows", OFFSET(correct_ts_overflow), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, D}, +{"flush_packets", "enable flushing of the I/O context after each packet", OFFSET(flush_packets), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1, E}, +{"metadata_header_padding", "set number of bytes to be written as padding in a metadata header", OFFSET(metadata_header_padding), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, E}, +{"output_ts_offset", "set output timestamp offset", OFFSET(output_ts_offset), AV_OPT_TYPE_DURATION, {.i64 = 0}, -INT64_MAX, INT64_MAX, E}, +{"max_interleave_delta", "maximum buffering duration for interleaving", OFFSET(max_interleave_delta), AV_OPT_TYPE_INT64, { .i64 = 10000000 }, 0, INT64_MAX, E }, +{"f_strict", "how strictly to follow the standards (deprecated; use strict, save via avconv)", OFFSET(strict_std_compliance), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "strict"}, +{"strict", "how strictly to follow the standards", OFFSET(strict_std_compliance), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, D|E, "strict"}, +{"very", "strictly conform to a older more strict version of the spec or reference software", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_VERY_STRICT }, INT_MIN, INT_MAX, D|E, "strict"}, +{"strict", "strictly conform to all the things in the spec no matter what the consequences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, D|E, "strict"}, +{"normal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, D|E, "strict"}, +{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, D|E, "strict"}, +{"experimental", "allow non-standardized experimental variants", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, D|E, "strict"}, +{"max_ts_probe", "maximum number of packets to read while waiting for the first timestamp", OFFSET(max_ts_probe), AV_OPT_TYPE_INT, { .i64 = 50 }, 0, INT_MAX, D }, +{"avoid_negative_ts", "shift timestamps so they start at 0", OFFSET(avoid_negative_ts), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 2, E, "avoid_negative_ts"}, +{"auto", "enabled when required by target format", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_AUTO }, INT_MIN, INT_MAX, E, "avoid_negative_ts"}, +{"disabled", "do not change timestamps", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, E, "avoid_negative_ts"}, +{"make_non_negative", "shift timestamps so they are non negative", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE }, INT_MIN, INT_MAX, E, "avoid_negative_ts"}, +{"make_zero", "shift timestamps so they start at 0", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_MAKE_ZERO }, INT_MIN, INT_MAX, E, "avoid_negative_ts"}, +{"dump_separator", "set information dump field separator", OFFSET(dump_separator), AV_OPT_TYPE_STRING, {.str = ", "}, 0, 0, D|E}, +{"codec_whitelist", "List of decoders that are allowed to be used", OFFSET(codec_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, +{"format_whitelist", "List of demuxers that are allowed to be used", OFFSET(format_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, +{"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, +{"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, +{"max_streams", "maximum number of streams", OFFSET(max_streams), AV_OPT_TYPE_INT, { .i64 = 1000 }, 0, INT_MAX, D }, +{"skip_estimate_duration_from_pts", "skip duration calculation in estimate_timings_from_pts", OFFSET(skip_estimate_duration_from_pts), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, D}, +{"max_probe_packets", "Maximum number of packets to probe a codec", OFFSET(max_probe_packets), AV_OPT_TYPE_INT, { .i64 = 2500 }, 0, INT_MAX, D }, +{NULL}, +}; + +#undef E +#undef D +#undef DEFAULT +#undef OFFSET + +#endif /* AVFORMAT_OPTIONS_TABLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/os_support.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/os_support.h new file mode 100644 index 00000000..5e6b32d2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/os_support.h @@ -0,0 +1,250 @@ +/* + * various OS-feature replacement utilities + * copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_OS_SUPPORT_H +#define AVFORMAT_OS_SUPPORT_H + +/** + * @file + * miscellaneous OS support macros and functions. + */ + +#include "config.h" + +#include + +#ifdef _WIN32 +#if HAVE_DIRECT_H +#include +#endif +#if HAVE_IO_H +#include +#endif +#endif + +#ifdef _WIN32 +# include +# ifdef lseek +# undef lseek +# endif +# define lseek(f,p,w) _lseeki64((f), (p), (w)) +# ifdef stat +# undef stat +# endif +# define stat _stati64 +# ifdef fstat +# undef fstat +# endif +# define fstat(f,s) _fstati64((f), (s)) +#endif /* defined(_WIN32) */ + + +#ifdef __ANDROID__ +# if HAVE_UNISTD_H +# include +# endif +# ifdef lseek +# undef lseek +# endif +# define lseek(f,p,w) lseek64((f), (p), (w)) +#endif + +static inline int is_dos_path(const char *path) +{ +#if HAVE_DOS_PATHS + if (path[0] && path[1] == ':') + return 1; +#endif + return 0; +} + +#if defined(_WIN32) +#ifndef S_IRUSR +#define S_IRUSR S_IREAD +#endif +#ifndef S_IWUSR +#define S_IWUSR S_IWRITE +#endif +#endif + +#if CONFIG_NETWORK +#if defined(_WIN32) +#define SHUT_RD SD_RECEIVE +#define SHUT_WR SD_SEND +#define SHUT_RDWR SD_BOTH +#else +#include +#if !defined(SHUT_RD) /* OS/2, DJGPP */ +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 +#endif +#endif + +#if !HAVE_SOCKLEN_T +typedef int socklen_t; +#endif + +/* most of the time closing a socket is just closing an fd */ +#if !HAVE_CLOSESOCKET +#define closesocket close +#endif + +#if !HAVE_POLL_H +typedef unsigned long nfds_t; + +#if HAVE_WINSOCK2_H +#include +#endif +#if !HAVE_STRUCT_POLLFD +struct pollfd { + int fd; + short events; /* events to look for */ + short revents; /* events that occurred */ +}; + +/* events & revents */ +#define POLLIN 0x0001 /* any readable data available */ +#define POLLOUT 0x0002 /* file descriptor is writeable */ +#define POLLRDNORM POLLIN +#define POLLWRNORM POLLOUT +#define POLLRDBAND 0x0008 /* priority readable data */ +#define POLLWRBAND 0x0010 /* priority data can be written */ +#define POLLPRI 0x0020 /* high priority readable data */ + +/* revents only */ +#define POLLERR 0x0004 /* errors pending */ +#define POLLHUP 0x0080 /* disconnected */ +#define POLLNVAL 0x1000 /* invalid file descriptor */ +#endif + + +int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout); +#define poll ff_poll +#endif /* HAVE_POLL_H */ +#endif /* CONFIG_NETWORK */ + +#ifdef _WIN32 +#include +#include +#include "libavutil/wchar_filename.h" + +#define DEF_FS_FUNCTION(name, wfunc, afunc) \ +static inline int win32_##name(const char *filename_utf8) \ +{ \ + wchar_t *filename_w; \ + int ret; \ + \ + if (utf8towchar(filename_utf8, &filename_w)) \ + return -1; \ + if (!filename_w) \ + goto fallback; \ + \ + ret = wfunc(filename_w); \ + av_free(filename_w); \ + return ret; \ + \ +fallback: \ + /* filename may be be in CP_ACP */ \ + return afunc(filename_utf8); \ +} + +DEF_FS_FUNCTION(unlink, _wunlink, _unlink) +DEF_FS_FUNCTION(mkdir, _wmkdir, _mkdir) +DEF_FS_FUNCTION(rmdir, _wrmdir , _rmdir) + +#define DEF_FS_FUNCTION2(name, wfunc, afunc, partype) \ +static inline int win32_##name(const char *filename_utf8, partype par) \ +{ \ + wchar_t *filename_w; \ + int ret; \ + \ + if (utf8towchar(filename_utf8, &filename_w)) \ + return -1; \ + if (!filename_w) \ + goto fallback; \ + \ + ret = wfunc(filename_w, par); \ + av_free(filename_w); \ + return ret; \ + \ +fallback: \ + /* filename may be be in CP_ACP */ \ + return afunc(filename_utf8, par); \ +} + +DEF_FS_FUNCTION2(access, _waccess, _access, int) +DEF_FS_FUNCTION2(stat, _wstati64, _stati64, struct stat*) + +static inline int win32_rename(const char *src_utf8, const char *dest_utf8) +{ + wchar_t *src_w, *dest_w; + int ret; + + if (utf8towchar(src_utf8, &src_w)) + return -1; + if (utf8towchar(dest_utf8, &dest_w)) { + av_free(src_w); + return -1; + } + if (!src_w || !dest_w) { + av_free(src_w); + av_free(dest_w); + goto fallback; + } + + ret = MoveFileExW(src_w, dest_w, MOVEFILE_REPLACE_EXISTING); + av_free(src_w); + av_free(dest_w); + // Lacking proper mapping from GetLastError() error codes to errno codes + if (ret) + errno = EPERM; + return ret; + +fallback: + /* filename may be be in CP_ACP */ +#if !HAVE_UWP + ret = MoveFileExA(src_utf8, dest_utf8, MOVEFILE_REPLACE_EXISTING); + if (ret) + errno = EPERM; +#else + /* Windows Phone doesn't have MoveFileExA, and for Windows Store apps, + * it is available but not allowed by the app certification kit. However, + * it's unlikely that anybody would input filenames in CP_ACP there, so this + * fallback is kept mostly for completeness. Alternatively we could + * do MultiByteToWideChar(CP_ACP) and use MoveFileExW, but doing + * explicit conversions with CP_ACP is allegedly forbidden in windows + * store apps (or windows phone), and the notion of a native code page + * doesn't make much sense there. */ + ret = rename(src_utf8, dest_utf8); +#endif + return ret; +} + +#define mkdir(a, b) win32_mkdir(a) +#define rename win32_rename +#define rmdir win32_rmdir +#define unlink win32_unlink +#define access win32_access + +#endif + +#endif /* AVFORMAT_OS_SUPPORT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/pcm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/pcm.h new file mode 100644 index 00000000..9af36d5a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/pcm.h @@ -0,0 +1,31 @@ +/* + * PCM common functions + * Copyright (C) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_PCM_H +#define AVFORMAT_PCM_H + +#include "avformat.h" + +int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt); +int ff_pcm_read_seek(AVFormatContext *s, + int stream_index, int64_t timestamp, int flags); + +#endif /* AVFORMAT_PCM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/qtpalette.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/qtpalette.h new file mode 100644 index 00000000..016e91f1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/qtpalette.h @@ -0,0 +1,332 @@ +/* + * Default Palettes for Quicktime Files + * Automatically generated from a utility derived from XAnim: + * http://xanim.va.pubnix.com/home.html + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_QTPALETTE_H +#define AVFORMAT_QTPALETTE_H + +#include +#include "avformat.h" + +static const uint8_t ff_qt_default_palette_2[2 * 3] = { + 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00 +}; + +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ +static const uint8_t ff_qt_default_palette_4[4 * 3] = { + 0xFF, 0xFF, 0xFF, + 0xAC, 0xAC, 0xAC, + 0x55, 0x55, 0x55, + 0x00, 0x00, 0x00 +}; + +/* From a screenshot of the "Monitors & Sound" control panel in Mac OS 7.5.5 */ +static const uint8_t ff_qt_default_palette_16[16 * 3] = { + 0xFF, 0xFF, 0xFF, + 0xFC, 0xF3, 0x05, + 0xFF, 0x64, 0x02, + 0xDD, 0x08, 0x06, + 0xF2, 0x08, 0x84, + 0x46, 0x00, 0xA5, + 0x00, 0x00, 0xD4, + 0x02, 0xAB, 0xEA, + 0x1F, 0xB7, 0x14, + 0x00, 0x64, 0x11, + 0x56, 0x2C, 0x05, + 0x90, 0x71, 0x3A, + 0xC0, 0xC0, 0xC0, + 0x80, 0x80, 0x80, + 0x40, 0x40, 0x40, + 0x00, 0x00, 0x00 +}; + +static const uint8_t ff_qt_default_palette_256[256 * 3] = { + /* 0, 0x00 */ 0xFF, 0xFF, 0xFF, + /* 1, 0x01 */ 0xFF, 0xFF, 0xCC, + /* 2, 0x02 */ 0xFF, 0xFF, 0x99, + /* 3, 0x03 */ 0xFF, 0xFF, 0x66, + /* 4, 0x04 */ 0xFF, 0xFF, 0x33, + /* 5, 0x05 */ 0xFF, 0xFF, 0x00, + /* 6, 0x06 */ 0xFF, 0xCC, 0xFF, + /* 7, 0x07 */ 0xFF, 0xCC, 0xCC, + /* 8, 0x08 */ 0xFF, 0xCC, 0x99, + /* 9, 0x09 */ 0xFF, 0xCC, 0x66, + /* 10, 0x0A */ 0xFF, 0xCC, 0x33, + /* 11, 0x0B */ 0xFF, 0xCC, 0x00, + /* 12, 0x0C */ 0xFF, 0x99, 0xFF, + /* 13, 0x0D */ 0xFF, 0x99, 0xCC, + /* 14, 0x0E */ 0xFF, 0x99, 0x99, + /* 15, 0x0F */ 0xFF, 0x99, 0x66, + /* 16, 0x10 */ 0xFF, 0x99, 0x33, + /* 17, 0x11 */ 0xFF, 0x99, 0x00, + /* 18, 0x12 */ 0xFF, 0x66, 0xFF, + /* 19, 0x13 */ 0xFF, 0x66, 0xCC, + /* 20, 0x14 */ 0xFF, 0x66, 0x99, + /* 21, 0x15 */ 0xFF, 0x66, 0x66, + /* 22, 0x16 */ 0xFF, 0x66, 0x33, + /* 23, 0x17 */ 0xFF, 0x66, 0x00, + /* 24, 0x18 */ 0xFF, 0x33, 0xFF, + /* 25, 0x19 */ 0xFF, 0x33, 0xCC, + /* 26, 0x1A */ 0xFF, 0x33, 0x99, + /* 27, 0x1B */ 0xFF, 0x33, 0x66, + /* 28, 0x1C */ 0xFF, 0x33, 0x33, + /* 29, 0x1D */ 0xFF, 0x33, 0x00, + /* 30, 0x1E */ 0xFF, 0x00, 0xFF, + /* 31, 0x1F */ 0xFF, 0x00, 0xCC, + /* 32, 0x20 */ 0xFF, 0x00, 0x99, + /* 33, 0x21 */ 0xFF, 0x00, 0x66, + /* 34, 0x22 */ 0xFF, 0x00, 0x33, + /* 35, 0x23 */ 0xFF, 0x00, 0x00, + /* 36, 0x24 */ 0xCC, 0xFF, 0xFF, + /* 37, 0x25 */ 0xCC, 0xFF, 0xCC, + /* 38, 0x26 */ 0xCC, 0xFF, 0x99, + /* 39, 0x27 */ 0xCC, 0xFF, 0x66, + /* 40, 0x28 */ 0xCC, 0xFF, 0x33, + /* 41, 0x29 */ 0xCC, 0xFF, 0x00, + /* 42, 0x2A */ 0xCC, 0xCC, 0xFF, + /* 43, 0x2B */ 0xCC, 0xCC, 0xCC, + /* 44, 0x2C */ 0xCC, 0xCC, 0x99, + /* 45, 0x2D */ 0xCC, 0xCC, 0x66, + /* 46, 0x2E */ 0xCC, 0xCC, 0x33, + /* 47, 0x2F */ 0xCC, 0xCC, 0x00, + /* 48, 0x30 */ 0xCC, 0x99, 0xFF, + /* 49, 0x31 */ 0xCC, 0x99, 0xCC, + /* 50, 0x32 */ 0xCC, 0x99, 0x99, + /* 51, 0x33 */ 0xCC, 0x99, 0x66, + /* 52, 0x34 */ 0xCC, 0x99, 0x33, + /* 53, 0x35 */ 0xCC, 0x99, 0x00, + /* 54, 0x36 */ 0xCC, 0x66, 0xFF, + /* 55, 0x37 */ 0xCC, 0x66, 0xCC, + /* 56, 0x38 */ 0xCC, 0x66, 0x99, + /* 57, 0x39 */ 0xCC, 0x66, 0x66, + /* 58, 0x3A */ 0xCC, 0x66, 0x33, + /* 59, 0x3B */ 0xCC, 0x66, 0x00, + /* 60, 0x3C */ 0xCC, 0x33, 0xFF, + /* 61, 0x3D */ 0xCC, 0x33, 0xCC, + /* 62, 0x3E */ 0xCC, 0x33, 0x99, + /* 63, 0x3F */ 0xCC, 0x33, 0x66, + /* 64, 0x40 */ 0xCC, 0x33, 0x33, + /* 65, 0x41 */ 0xCC, 0x33, 0x00, + /* 66, 0x42 */ 0xCC, 0x00, 0xFF, + /* 67, 0x43 */ 0xCC, 0x00, 0xCC, + /* 68, 0x44 */ 0xCC, 0x00, 0x99, + /* 69, 0x45 */ 0xCC, 0x00, 0x66, + /* 70, 0x46 */ 0xCC, 0x00, 0x33, + /* 71, 0x47 */ 0xCC, 0x00, 0x00, + /* 72, 0x48 */ 0x99, 0xFF, 0xFF, + /* 73, 0x49 */ 0x99, 0xFF, 0xCC, + /* 74, 0x4A */ 0x99, 0xFF, 0x99, + /* 75, 0x4B */ 0x99, 0xFF, 0x66, + /* 76, 0x4C */ 0x99, 0xFF, 0x33, + /* 77, 0x4D */ 0x99, 0xFF, 0x00, + /* 78, 0x4E */ 0x99, 0xCC, 0xFF, + /* 79, 0x4F */ 0x99, 0xCC, 0xCC, + /* 80, 0x50 */ 0x99, 0xCC, 0x99, + /* 81, 0x51 */ 0x99, 0xCC, 0x66, + /* 82, 0x52 */ 0x99, 0xCC, 0x33, + /* 83, 0x53 */ 0x99, 0xCC, 0x00, + /* 84, 0x54 */ 0x99, 0x99, 0xFF, + /* 85, 0x55 */ 0x99, 0x99, 0xCC, + /* 86, 0x56 */ 0x99, 0x99, 0x99, + /* 87, 0x57 */ 0x99, 0x99, 0x66, + /* 88, 0x58 */ 0x99, 0x99, 0x33, + /* 89, 0x59 */ 0x99, 0x99, 0x00, + /* 90, 0x5A */ 0x99, 0x66, 0xFF, + /* 91, 0x5B */ 0x99, 0x66, 0xCC, + /* 92, 0x5C */ 0x99, 0x66, 0x99, + /* 93, 0x5D */ 0x99, 0x66, 0x66, + /* 94, 0x5E */ 0x99, 0x66, 0x33, + /* 95, 0x5F */ 0x99, 0x66, 0x00, + /* 96, 0x60 */ 0x99, 0x33, 0xFF, + /* 97, 0x61 */ 0x99, 0x33, 0xCC, + /* 98, 0x62 */ 0x99, 0x33, 0x99, + /* 99, 0x63 */ 0x99, 0x33, 0x66, + /* 100, 0x64 */ 0x99, 0x33, 0x33, + /* 101, 0x65 */ 0x99, 0x33, 0x00, + /* 102, 0x66 */ 0x99, 0x00, 0xFF, + /* 103, 0x67 */ 0x99, 0x00, 0xCC, + /* 104, 0x68 */ 0x99, 0x00, 0x99, + /* 105, 0x69 */ 0x99, 0x00, 0x66, + /* 106, 0x6A */ 0x99, 0x00, 0x33, + /* 107, 0x6B */ 0x99, 0x00, 0x00, + /* 108, 0x6C */ 0x66, 0xFF, 0xFF, + /* 109, 0x6D */ 0x66, 0xFF, 0xCC, + /* 110, 0x6E */ 0x66, 0xFF, 0x99, + /* 111, 0x6F */ 0x66, 0xFF, 0x66, + /* 112, 0x70 */ 0x66, 0xFF, 0x33, + /* 113, 0x71 */ 0x66, 0xFF, 0x00, + /* 114, 0x72 */ 0x66, 0xCC, 0xFF, + /* 115, 0x73 */ 0x66, 0xCC, 0xCC, + /* 116, 0x74 */ 0x66, 0xCC, 0x99, + /* 117, 0x75 */ 0x66, 0xCC, 0x66, + /* 118, 0x76 */ 0x66, 0xCC, 0x33, + /* 119, 0x77 */ 0x66, 0xCC, 0x00, + /* 120, 0x78 */ 0x66, 0x99, 0xFF, + /* 121, 0x79 */ 0x66, 0x99, 0xCC, + /* 122, 0x7A */ 0x66, 0x99, 0x99, + /* 123, 0x7B */ 0x66, 0x99, 0x66, + /* 124, 0x7C */ 0x66, 0x99, 0x33, + /* 125, 0x7D */ 0x66, 0x99, 0x00, + /* 126, 0x7E */ 0x66, 0x66, 0xFF, + /* 127, 0x7F */ 0x66, 0x66, 0xCC, + /* 128, 0x80 */ 0x66, 0x66, 0x99, + /* 129, 0x81 */ 0x66, 0x66, 0x66, + /* 130, 0x82 */ 0x66, 0x66, 0x33, + /* 131, 0x83 */ 0x66, 0x66, 0x00, + /* 132, 0x84 */ 0x66, 0x33, 0xFF, + /* 133, 0x85 */ 0x66, 0x33, 0xCC, + /* 134, 0x86 */ 0x66, 0x33, 0x99, + /* 135, 0x87 */ 0x66, 0x33, 0x66, + /* 136, 0x88 */ 0x66, 0x33, 0x33, + /* 137, 0x89 */ 0x66, 0x33, 0x00, + /* 138, 0x8A */ 0x66, 0x00, 0xFF, + /* 139, 0x8B */ 0x66, 0x00, 0xCC, + /* 140, 0x8C */ 0x66, 0x00, 0x99, + /* 141, 0x8D */ 0x66, 0x00, 0x66, + /* 142, 0x8E */ 0x66, 0x00, 0x33, + /* 143, 0x8F */ 0x66, 0x00, 0x00, + /* 144, 0x90 */ 0x33, 0xFF, 0xFF, + /* 145, 0x91 */ 0x33, 0xFF, 0xCC, + /* 146, 0x92 */ 0x33, 0xFF, 0x99, + /* 147, 0x93 */ 0x33, 0xFF, 0x66, + /* 148, 0x94 */ 0x33, 0xFF, 0x33, + /* 149, 0x95 */ 0x33, 0xFF, 0x00, + /* 150, 0x96 */ 0x33, 0xCC, 0xFF, + /* 151, 0x97 */ 0x33, 0xCC, 0xCC, + /* 152, 0x98 */ 0x33, 0xCC, 0x99, + /* 153, 0x99 */ 0x33, 0xCC, 0x66, + /* 154, 0x9A */ 0x33, 0xCC, 0x33, + /* 155, 0x9B */ 0x33, 0xCC, 0x00, + /* 156, 0x9C */ 0x33, 0x99, 0xFF, + /* 157, 0x9D */ 0x33, 0x99, 0xCC, + /* 158, 0x9E */ 0x33, 0x99, 0x99, + /* 159, 0x9F */ 0x33, 0x99, 0x66, + /* 160, 0xA0 */ 0x33, 0x99, 0x33, + /* 161, 0xA1 */ 0x33, 0x99, 0x00, + /* 162, 0xA2 */ 0x33, 0x66, 0xFF, + /* 163, 0xA3 */ 0x33, 0x66, 0xCC, + /* 164, 0xA4 */ 0x33, 0x66, 0x99, + /* 165, 0xA5 */ 0x33, 0x66, 0x66, + /* 166, 0xA6 */ 0x33, 0x66, 0x33, + /* 167, 0xA7 */ 0x33, 0x66, 0x00, + /* 168, 0xA8 */ 0x33, 0x33, 0xFF, + /* 169, 0xA9 */ 0x33, 0x33, 0xCC, + /* 170, 0xAA */ 0x33, 0x33, 0x99, + /* 171, 0xAB */ 0x33, 0x33, 0x66, + /* 172, 0xAC */ 0x33, 0x33, 0x33, + /* 173, 0xAD */ 0x33, 0x33, 0x00, + /* 174, 0xAE */ 0x33, 0x00, 0xFF, + /* 175, 0xAF */ 0x33, 0x00, 0xCC, + /* 176, 0xB0 */ 0x33, 0x00, 0x99, + /* 177, 0xB1 */ 0x33, 0x00, 0x66, + /* 178, 0xB2 */ 0x33, 0x00, 0x33, + /* 179, 0xB3 */ 0x33, 0x00, 0x00, + /* 180, 0xB4 */ 0x00, 0xFF, 0xFF, + /* 181, 0xB5 */ 0x00, 0xFF, 0xCC, + /* 182, 0xB6 */ 0x00, 0xFF, 0x99, + /* 183, 0xB7 */ 0x00, 0xFF, 0x66, + /* 184, 0xB8 */ 0x00, 0xFF, 0x33, + /* 185, 0xB9 */ 0x00, 0xFF, 0x00, + /* 186, 0xBA */ 0x00, 0xCC, 0xFF, + /* 187, 0xBB */ 0x00, 0xCC, 0xCC, + /* 188, 0xBC */ 0x00, 0xCC, 0x99, + /* 189, 0xBD */ 0x00, 0xCC, 0x66, + /* 190, 0xBE */ 0x00, 0xCC, 0x33, + /* 191, 0xBF */ 0x00, 0xCC, 0x00, + /* 192, 0xC0 */ 0x00, 0x99, 0xFF, + /* 193, 0xC1 */ 0x00, 0x99, 0xCC, + /* 194, 0xC2 */ 0x00, 0x99, 0x99, + /* 195, 0xC3 */ 0x00, 0x99, 0x66, + /* 196, 0xC4 */ 0x00, 0x99, 0x33, + /* 197, 0xC5 */ 0x00, 0x99, 0x00, + /* 198, 0xC6 */ 0x00, 0x66, 0xFF, + /* 199, 0xC7 */ 0x00, 0x66, 0xCC, + /* 200, 0xC8 */ 0x00, 0x66, 0x99, + /* 201, 0xC9 */ 0x00, 0x66, 0x66, + /* 202, 0xCA */ 0x00, 0x66, 0x33, + /* 203, 0xCB */ 0x00, 0x66, 0x00, + /* 204, 0xCC */ 0x00, 0x33, 0xFF, + /* 205, 0xCD */ 0x00, 0x33, 0xCC, + /* 206, 0xCE */ 0x00, 0x33, 0x99, + /* 207, 0xCF */ 0x00, 0x33, 0x66, + /* 208, 0xD0 */ 0x00, 0x33, 0x33, + /* 209, 0xD1 */ 0x00, 0x33, 0x00, + /* 210, 0xD2 */ 0x00, 0x00, 0xFF, + /* 211, 0xD3 */ 0x00, 0x00, 0xCC, + /* 212, 0xD4 */ 0x00, 0x00, 0x99, + /* 213, 0xD5 */ 0x00, 0x00, 0x66, + /* 214, 0xD6 */ 0x00, 0x00, 0x33, + /* 215, 0xD7 */ 0xEE, 0x00, 0x00, + /* 216, 0xD8 */ 0xDD, 0x00, 0x00, + /* 217, 0xD9 */ 0xBB, 0x00, 0x00, + /* 218, 0xDA */ 0xAA, 0x00, 0x00, + /* 219, 0xDB */ 0x88, 0x00, 0x00, + /* 220, 0xDC */ 0x77, 0x00, 0x00, + /* 221, 0xDD */ 0x55, 0x00, 0x00, + /* 222, 0xDE */ 0x44, 0x00, 0x00, + /* 223, 0xDF */ 0x22, 0x00, 0x00, + /* 224, 0xE0 */ 0x11, 0x00, 0x00, + /* 225, 0xE1 */ 0x00, 0xEE, 0x00, + /* 226, 0xE2 */ 0x00, 0xDD, 0x00, + /* 227, 0xE3 */ 0x00, 0xBB, 0x00, + /* 228, 0xE4 */ 0x00, 0xAA, 0x00, + /* 229, 0xE5 */ 0x00, 0x88, 0x00, + /* 230, 0xE6 */ 0x00, 0x77, 0x00, + /* 231, 0xE7 */ 0x00, 0x55, 0x00, + /* 232, 0xE8 */ 0x00, 0x44, 0x00, + /* 233, 0xE9 */ 0x00, 0x22, 0x00, + /* 234, 0xEA */ 0x00, 0x11, 0x00, + /* 235, 0xEB */ 0x00, 0x00, 0xEE, + /* 236, 0xEC */ 0x00, 0x00, 0xDD, + /* 237, 0xED */ 0x00, 0x00, 0xBB, + /* 238, 0xEE */ 0x00, 0x00, 0xAA, + /* 239, 0xEF */ 0x00, 0x00, 0x88, + /* 240, 0xF0 */ 0x00, 0x00, 0x77, + /* 241, 0xF1 */ 0x00, 0x00, 0x55, + /* 242, 0xF2 */ 0x00, 0x00, 0x44, + /* 243, 0xF3 */ 0x00, 0x00, 0x22, + /* 244, 0xF4 */ 0x00, 0x00, 0x11, + /* 245, 0xF5 */ 0xEE, 0xEE, 0xEE, + /* 246, 0xF6 */ 0xDD, 0xDD, 0xDD, + /* 247, 0xF7 */ 0xBB, 0xBB, 0xBB, + /* 248, 0xF8 */ 0xAA, 0xAA, 0xAA, + /* 249, 0xF9 */ 0x88, 0x88, 0x88, + /* 250, 0xFA */ 0x77, 0x77, 0x77, + /* 251, 0xFB */ 0x55, 0x55, 0x55, + /* 252, 0xFC */ 0x44, 0x44, 0x44, + /* 253, 0xFD */ 0x22, 0x22, 0x22, + /* 254, 0xFE */ 0x11, 0x11, 0x11, + /* 255, 0xFF */ 0x00, 0x00, 0x00 +}; + +/** + * Retrieve the palette (or "color table" in QuickTime terms), either + * from the video sample description, or from the default Macintosh + * palette. + * + * The file offset of the AVIOContext pointed to by the 'pb' variable + * should be the start of the video sample description (the sample + * description size and the data format). + */ +int ff_get_qtpalette(int codec_id, AVIOContext *pb, uint32_t *palette); + +#endif /* AVFORMAT_QTPALETTE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawdec.h new file mode 100644 index 00000000..34c8adcb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawdec.h @@ -0,0 +1,112 @@ +/* + * RAW demuxers + * Copyright (C) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RAWDEC_H +#define AVFORMAT_RAWDEC_H + +#include "avformat.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" + +typedef struct FFRawVideoDemuxerContext { + const AVClass *class; /**< Class for private options. */ + int raw_packet_size; + char *video_size; /**< String describing video size, set by a private option. */ + char *pixel_format; /**< Set by a private option. */ + AVRational framerate; /**< AVRational describing framerate, set by a private option. */ +} FFRawVideoDemuxerContext; + +typedef struct FFRawDemuxerContext { + const AVClass *class; /**< Class for private options. */ + int raw_packet_size; +} FFRawDemuxerContext; + +extern const AVOption ff_rawvideo_options[]; +extern const AVOption ff_raw_options[]; + +int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt); + +int ff_raw_audio_read_header(AVFormatContext *s); + +int ff_raw_video_read_header(AVFormatContext *s); + +int ff_raw_subtitle_read_header(AVFormatContext *s); + +int ff_raw_data_read_header(AVFormatContext *s); + +#define FF_RAW_DEMUXER_CLASS(name)\ +static const AVClass name ## _demuxer_class = {\ + .class_name = #name " demuxer",\ + .item_name = av_default_item_name,\ + .option = ff_raw_options,\ + .version = LIBAVUTIL_VERSION_INT,\ +}; + +#define FF_RAWVIDEO_DEMUXER_CLASS(name)\ +static const AVClass name ## _demuxer_class = {\ + .class_name = #name " demuxer",\ + .item_name = av_default_item_name,\ + .option = ff_rawvideo_options,\ + .version = LIBAVUTIL_VERSION_INT,\ +}; + +#define FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, flag)\ +FF_RAWVIDEO_DEMUXER_CLASS(shortname)\ +AVInputFormat ff_ ## shortname ## _demuxer = {\ + .name = #shortname,\ + .long_name = NULL_IF_CONFIG_SMALL(longname),\ + .read_probe = probe,\ + .read_header = ff_raw_video_read_header,\ + .read_packet = ff_raw_read_partial_packet,\ + .extensions = ext,\ + .flags = flag,\ + .raw_codec_id = id,\ + .priv_data_size = sizeof(FFRawVideoDemuxerContext),\ + .priv_class = &shortname ## _demuxer_class,\ +}; + +#define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\ +FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, AVFMT_GENERIC_INDEX) + +#define FF_RAWSUB_DEMUXER_CLASS(name)\ +static const AVClass name ## _demuxer_class = {\ + .class_name = #name " demuxer",\ + .item_name = av_default_item_name,\ + .option = ff_raw_options,\ + .version = LIBAVUTIL_VERSION_INT,\ +}; + +#define FF_DEF_RAWSUB_DEMUXER(shortname, longname, probe, ext, id, flag)\ +FF_RAWSUB_DEMUXER_CLASS(shortname)\ +AVInputFormat ff_ ## shortname ## _demuxer = {\ + .name = #shortname,\ + .long_name = NULL_IF_CONFIG_SMALL(longname),\ + .read_probe = probe,\ + .read_header = ff_raw_subtitle_read_header,\ + .read_packet = ff_raw_read_partial_packet,\ + .extensions = ext,\ + .flags = flag,\ + .raw_codec_id = id,\ + .priv_data_size = sizeof(FFRawDemuxerContext),\ + .priv_class = &shortname ## _demuxer_class,\ +}; + +#endif /* AVFORMAT_RAWDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawenc.h new file mode 100644 index 00000000..b5523090 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rawenc.h @@ -0,0 +1,29 @@ +/* + * RAW muxers + * Copyright (C) 2007 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RAWENC_H +#define AVFORMAT_RAWENC_H + +#include "avformat.h" + +int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt); + +#endif /* AVFORMAT_RAWENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rdt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rdt.h new file mode 100644 index 00000000..67fb3084 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rdt.h @@ -0,0 +1,107 @@ +/* + * Realmedia RTSP (RDT) definitions + * Copyright (c) 2007 Ronald S. Bultje + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RDT_H +#define AVFORMAT_RDT_H + +#include +#include "avformat.h" +#include "rtpdec.h" + +typedef struct RDTDemuxContext RDTDemuxContext; + +/** + * Allocate and init the RDT parsing context. + * @param ic the containing RTSP demuxer context + * @param first_stream_of_set_idx index to the first AVStream in the RTSP + * demuxer context's ic->streams array that is part of this + * particular stream's set of streams (with identical content) + * @param priv_data private data of the payload data handler context + * @param handler pointer to the parse_packet() payload parsing function + * @return a newly allocated RDTDemuxContext. Free with ff_rdt_parse_close(). + */ +RDTDemuxContext *ff_rdt_parse_open(AVFormatContext *ic, + int first_stream_of_set_idx, + void *priv_data, + const RTPDynamicProtocolHandler *handler); +void ff_rdt_parse_close(RDTDemuxContext *s); + +/** + * Calculate the response (RealChallenge2 in the RTSP header) to the + * challenge (RealChallenge1 in the RTSP header from the Real/Helix + * server), which is used as some sort of client validation. + * + * @param response pointer to response buffer, it should be at least 41 bytes + * (40 data + 1 zero) bytes long. + * @param chksum pointer to buffer containing a checksum of the response, + * it should be at least 9 (8 data + 1 zero) bytes long. + * @param challenge pointer to the RealChallenge1 value provided by the + * server. + */ +void ff_rdt_calc_response_and_checksum(char response[41], char chksum[9], + const char *challenge); + +/** + * Add subscription information to Subscribe parameter string. + * + * @param cmd string to write the subscription information into. + * @param size size of cmd. + * @param stream_nr stream number. + * @param rule_nr rule number to conform to. + */ +void ff_rdt_subscribe_rule(char *cmd, int size, + int stream_nr, int rule_nr); + +/** + * Parse RDT-style packet header. + * + * @param buf input buffer + * @param len length of input buffer + * @param pset_id will be set to the set ID this packet belongs to + * @param pseq_no will be set to the sequence number of the packet + * @param pstream_id will be set to the stream ID this packet belongs to + * @param pis_keyframe will be whether this packet belongs to a keyframe + * @param ptimestamp will be set to the timestamp of the packet + * @return the amount of bytes consumed, or negative on error + */ +int ff_rdt_parse_header(const uint8_t *buf, int len, + int *pset_id, int *pseq_no, int *pstream_id, + int *pis_keyframe, uint32_t *ptimestamp); + +/** + * Parse RDT-style packet data (header + media data). + * Usage similar to rtp_parse_packet(). + */ +int ff_rdt_parse_packet(RDTDemuxContext *s, AVPacket *pkt, + uint8_t **buf, int len); + +/** + * Parse a server-related SDP line. + * + * @param s the RTSP AVFormatContext + * @param stream_index the index of the first stream in the set represented + * by the SDP m= line (in s->streams) + * @param buf the SDP line + */ +void ff_real_parse_sdp_a_line(AVFormatContext *s, int stream_index, + const char *buf); + +#endif /* AVFORMAT_RDT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/replaygain.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/replaygain.h new file mode 100644 index 00000000..ceacb214 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/replaygain.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_REPLAYGAIN_H +#define AVFORMAT_REPLAYGAIN_H + +#include "libavutil/dict.h" + +#include "avformat.h" + +/** + * Parse replaygain tags and export them as per-stream side data. + */ +int ff_replaygain_export(AVStream *st, AVDictionary *metadata); + + +/** + * Export already decoded replaygain values as per-stream side data. + */ +int ff_replaygain_export_raw(AVStream *st, int32_t tg, uint32_t tp, + int32_t ag, uint32_t ap); + +#endif /* AVFORMAT_REPLAYGAIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/riff.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/riff.h new file mode 100644 index 00000000..21078b77 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/riff.h @@ -0,0 +1,129 @@ +/* + * RIFF common functions and data + * copyright (c) 2000 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal header for RIFF based (de)muxers + * do NOT include this in end user applications + */ + +#ifndef AVFORMAT_RIFF_H +#define AVFORMAT_RIFF_H + +#include "libavcodec/avcodec.h" +#include "avio.h" +#include "internal.h" +#include "metadata.h" + +extern const AVMetadataConv ff_riff_info_conv[]; + +int64_t ff_start_tag(AVIOContext *pb, const char *tag); +void ff_end_tag(AVIOContext *pb, int64_t start); + +/** + * Read BITMAPINFOHEADER structure and set AVStream codec width, height and + * bits_per_encoded_sample fields. Does not read extradata. + * Writes the size of the BMP file to *size. + * @return codec tag + */ +int ff_get_bmp_header(AVIOContext *pb, AVStream *st, uint32_t *size); + +void ff_put_bmp_header(AVIOContext *pb, AVCodecParameters *par, int for_asf, int ignore_extradata); + +/** + * Tell ff_put_wav_header() to use WAVEFORMATEX even for PCM codecs. + */ +#define FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX 0x00000001 + +/** + * Tell ff_put_wav_header() to write an empty channel mask. + */ +#define FF_PUT_WAV_HEADER_SKIP_CHANNELMASK 0x00000002 + +/** + * Write WAVEFORMAT header structure. + * + * @param flags a combination of FF_PUT_WAV_HEADER_* constants + * + * @return the size or -1 on error + */ +int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int flags); + +enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps); +int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian); + +extern const AVCodecTag ff_codec_bmp_tags[]; // exposed through avformat_get_riff_video_tags() +extern const AVCodecTag ff_codec_wav_tags[]; + +extern const AVCodecTag ff_codec_bmp_tags_unofficial[]; + +void ff_parse_specific_params(AVStream *st, int *au_rate, int *au_ssize, int *au_scale); + +int ff_read_riff_info(AVFormatContext *s, int64_t size); + +/** + * Write all recognized RIFF tags from s->metadata + */ +void ff_riff_write_info(AVFormatContext *s); + +/** + * Write a single RIFF info tag + */ +void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str); + +typedef uint8_t ff_asf_guid[16]; + +typedef struct AVCodecGuid { + enum AVCodecID id; + ff_asf_guid guid; +} AVCodecGuid; + +extern const AVCodecGuid ff_codec_wav_guids[]; + +#define FF_PRI_GUID \ + "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x " \ + "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}" + +#define FF_ARG_GUID(g) \ + g[0], g[1], g[2], g[3], g[4], g[5], g[6], g[7], \ + g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15],\ + g[3], g[2], g[1], g[0], g[5], g[4], g[7], g[6], \ + g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15] + +#define FF_MEDIASUBTYPE_BASE_GUID \ + 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 +#define FF_AMBISONIC_BASE_GUID \ + 0x21, 0x07, 0xD3, 0x11, 0x86, 0x44, 0xC8, 0xC1, 0xCA, 0x00, 0x00, 0x00 +#define FF_BROKEN_BASE_GUID \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA + +static av_always_inline int ff_guidcmp(const void *g1, const void *g2) +{ + return memcmp(g1, g2, sizeof(ff_asf_guid)); +} + +int ff_get_guid(AVIOContext *s, ff_asf_guid *g); +void ff_put_guid(AVIOContext *s, const ff_asf_guid *g); +const ff_asf_guid *ff_get_codec_guid(enum AVCodecID id, const AVCodecGuid *av_guid); + +enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid); + +#endif /* AVFORMAT_RIFF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rm.h new file mode 100644 index 00000000..7b080e2a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rm.h @@ -0,0 +1,95 @@ +/* + * "Real" compatible muxer and demuxer. + * Copyright (c) 2000, 2001 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RM_H +#define AVFORMAT_RM_H + +#include "avformat.h" +#include "internal.h" + +extern const char * const ff_rm_metadata[4]; +extern const AVCodecTag ff_rm_codec_tags[]; + +typedef struct RMStream RMStream; + +RMStream *ff_rm_alloc_rmstream (void); +void ff_rm_free_rmstream (RMStream *rms); + +/*< input format for Realmedia-style RTSP streams */ +extern AVInputFormat ff_rdt_demuxer; + +/** + * Read the MDPR chunk, which contains stream-specific codec initialization + * parameters. + * + * @param s context containing RMContext and AVIOContext for stream reading + * @param pb context to read the data from + * @param st the stream that the MDPR chunk belongs to and where to store the + * parameters read from the chunk into + * @param rst real-specific stream information + * @param codec_data_size size of the MDPR chunk + * @return 0 on success, errno codes on error + */ +int ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb, + AVStream *st, RMStream *rst, + unsigned int codec_data_size, const uint8_t *mime); + +/** + * Parse one rm-stream packet from the input bytestream. + * + * @param s context containing RMContext and AVIOContext for stream reading + * @param pb context to read the data from + * @param st stream to which the packet to be read belongs + * @param rst Real-specific stream information + * @param len packet length to read from the input + * @param pkt packet location to store the parsed packet data + * @param seq pointer to an integer containing the sequence number, may be + * updated + * @param flags the packet flags + * @param ts timestamp of the current packet + * @return <0 on error, 0 if a packet was placed in the pkt pointer. A + * value >0 means that no data was placed in pkt, but that cached + * data is available by calling ff_rm_retrieve_cache(). + */ +int ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb, + AVStream *st, RMStream *rst, int len, + AVPacket *pkt, int *seq, int flags, int64_t ts); + +/** + * Retrieve one cached packet from the rm-context. The real container can + * store several packets (as interpreted by the codec) in a single container + * packet, which means the demuxer holds some back when the first container + * packet is parsed and returned. The result is that rm->audio_pkt_cnt is + * a positive number, the amount of cached packets. Using this function, each + * of those packets can be retrieved sequentially. + * + * @param s context containing RMContext and AVIOContext for stream reading + * @param pb context to read the data from + * @param st stream that this packet belongs to + * @param rst Real-specific stream information + * @param pkt location to store the packet data + * @return the number of samples left for subsequent calls to this same + * function, or 0 if all samples have been retrieved. + */ +int ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb, + AVStream *st, RMStream *rst, AVPacket *pkt); + +#endif /* AVFORMAT_RM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rmsipr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rmsipr.h new file mode 100644 index 00000000..2837336d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rmsipr.h @@ -0,0 +1,35 @@ +/* + * tables and functions for demuxing SIPR audio muxed RealMedia style + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RMSIPR_H +#define AVFORMAT_RMSIPR_H + +#include + +extern const unsigned char ff_sipr_subpk_size[4]; + +/** + * Perform 4-bit block reordering for SIPR data. + * + * @param buf SIPR data + */ +void ff_rm_reorder_sipr_data(uint8_t *buf, int sub_packet_h, int framesize); + +#endif /* AVFORMAT_RMSIPR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rso.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rso.h new file mode 100644 index 00000000..1f65dd90 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rso.h @@ -0,0 +1,32 @@ +/* + * RSO format common data + * Copyright (c) 2010 Rafael Carre + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RSO_H +#define AVFORMAT_RSO_H + +#include "internal.h" + +#define RSO_HEADER_SIZE 8 + +/* The libavcodec codecs we support, and the IDs they have in the file */ +extern const AVCodecTag ff_codec_rso_tags[]; + +#endif /* AVFORMAT_RSO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmp.h new file mode 100644 index 00000000..6600da74 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmp.h @@ -0,0 +1,68 @@ +/* + * RTMP definitions + * Copyright (c) 2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTMP_H +#define AVFORMAT_RTMP_H + +#include "avformat.h" + +#define RTMP_DEFAULT_PORT 1935 +#define RTMPS_DEFAULT_PORT 443 + +#define RTMP_HANDSHAKE_PACKET_SIZE 1536 + +/** + * emulated Flash client version - 9.0.124.2 on Linux + * @{ + */ +#define RTMP_CLIENT_PLATFORM "LNX" +#define RTMP_CLIENT_VER1 9 +#define RTMP_CLIENT_VER2 0 +#define RTMP_CLIENT_VER3 124 +#define RTMP_CLIENT_VER4 2 +/** @} */ //version defines + +/** + * Calculate HMAC-SHA2 digest for RTMP handshake packets. + * + * @param src input buffer + * @param len input buffer length (should be 1536) + * @param gap offset in buffer where 32 bytes should not be taken into account + * when calculating digest (since it will be used to store that digest) + * @param key digest key + * @param keylen digest key length + * @param dst buffer where calculated digest will be stored (32 bytes) + */ +int ff_rtmp_calc_digest(const uint8_t *src, int len, int gap, + const uint8_t *key, int keylen, uint8_t *dst); + +/** + * Calculate digest position for RTMP handshake packets. + * + * @param buf input buffer (should be 1536 bytes) + * @param off offset in buffer where to start calculating digest position + * @param mod_val value used for computing modulo + * @param add_val value added at the end (after computing modulo) + */ +int ff_rtmp_calc_digest_pos(const uint8_t *buf, int off, int mod_val, + int add_val); + +#endif /* AVFORMAT_RTMP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpcrypt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpcrypt.h new file mode 100644 index 00000000..590a8c81 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpcrypt.h @@ -0,0 +1,69 @@ +/* + * RTMPE encryption utilities + * Copyright (c) 2012 Samuel Pitoiset + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTMPCRYPT_H +#define AVFORMAT_RTMPCRYPT_H + +#include + +#include "url.h" + +/** + * Initialize the Diffie-Hellmann context and generate the public key. + * + * @param h an URLContext + * @param buf handshake data (1536 bytes) + * @return zero on success, negative value otherwise + */ +int ff_rtmpe_gen_pub_key(URLContext *h, uint8_t *buf); + +/** + * Compute the shared secret key and initialize the RC4 encryption. + * + * @param h an URLContext + * @param serverdata server data (1536 bytes) + * @param clientdata client data (1536 bytes) + * @param type the position of the server digest + * @return zero on success, negative value otherwise + */ +int ff_rtmpe_compute_secret_key(URLContext *h, const uint8_t *serverdata, + const uint8_t *clientdata, int type); + +/** + * Encrypt the signature. + * + * @param h an URLContext + * @param signature the signature to encrypt + * @param digest the digest used for finding the encryption key + * @param type type of encryption (8 for XTEA, 9 for Blowfish) + */ +void ff_rtmpe_encrypt_sig(URLContext *h, uint8_t *signature, + const uint8_t *digest, int type); + +/** + * Update the keystream and set RC4 keys for encryption. + * + * @param h an URLContext + * @return zero on success, negative value otherwise + */ +int ff_rtmpe_update_keystream(URLContext *h); + +#endif /* AVFORMAT_RTMPCRYPT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpdh.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpdh.h new file mode 100644 index 00000000..8cc1a42b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmpdh.h @@ -0,0 +1,107 @@ +/* + * RTMP Diffie-Hellmann utilities + * Copyright (c) 2012 Samuel Pitoiset + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTMPDH_H +#define AVFORMAT_RTMPDH_H + +#include + +#include "config.h" + +#if CONFIG_GMP +#include + +typedef mpz_ptr FFBigNum; +#elif CONFIG_GCRYPT +#include + +typedef gcry_mpi_t FFBigNum; + +#elif CONFIG_OPENSSL +#include +#include + +typedef BIGNUM *FFBigNum; +#elif CONFIG_MBEDTLS +#include + +typedef mbedtls_mpi *FFBigNum; + +#endif + +typedef struct FF_DH { + FFBigNum p; + FFBigNum g; + FFBigNum pub_key; + FFBigNum priv_key; + long length; +} FF_DH; + + +/** + * Initialize a Diffie-Hellmann context. + * + * @param key_len length of the key + * @return a new Diffie-Hellmann context on success, NULL otherwise + */ +FF_DH *ff_dh_init(int key_len); + +/** + * Free a Diffie-Hellmann context. + * + * @param dh a Diffie-Hellmann context to free + */ +void ff_dh_free(FF_DH *dh); + +/** + * Generate a public key. + * + * @param dh a Diffie-Hellmann context + * @return zero on success, negative value otherwise + */ +int ff_dh_generate_public_key(FF_DH *dh); + +/** + * Write the public key into the given buffer. + * + * @param dh a Diffie-Hellmann context, containing the public key to write + * @param pub_key the buffer where the public key is written + * @param pub_key_len the length of the buffer + * @return zero on success, negative value otherwise + */ +int ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len); + +/** + * Compute the shared secret key from the private FF_DH value and the + * other party's public value. + * + * @param dh a Diffie-Hellmann context, containing the private key + * @param pub_key the buffer containing the public key + * @param pub_key_len the length of the public key buffer + * @param secret_key the buffer where the secret key is written + * @param secret_key_len the length of the secret key buffer + * @return length of the shared secret key on success, negative value otherwise + */ +int ff_dh_compute_shared_secret_key(FF_DH *dh, const uint8_t *pub_key, + int pub_key_len, uint8_t *secret_key, + int secret_key_len); + +#endif /* AVFORMAT_RTMPDH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmppkt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmppkt.h new file mode 100644 index 00000000..eb68f1d3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtmppkt.h @@ -0,0 +1,330 @@ +/* + * RTMP packet utilities + * Copyright (c) 2009 Konstantin Shishkov + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTMPPKT_H +#define AVFORMAT_RTMPPKT_H + +#include "libavcodec/bytestream.h" +#include "avformat.h" +#include "url.h" + +/** maximum possible number of different RTMP channels */ +#define RTMP_CHANNELS 65599 + +/** + * channels used to for RTMP packets with different purposes (i.e. data, network + * control, remote procedure calls, etc.) + */ +enum RTMPChannel { + RTMP_NETWORK_CHANNEL = 2, ///< channel for network-related messages (bandwidth report, ping, etc) + RTMP_SYSTEM_CHANNEL, ///< channel for sending server control messages + RTMP_AUDIO_CHANNEL, ///< channel for audio data + RTMP_VIDEO_CHANNEL = 6, ///< channel for video data + RTMP_SOURCE_CHANNEL = 8, ///< channel for a/v invokes +}; + +/** + * known RTMP packet types + */ +typedef enum RTMPPacketType { + RTMP_PT_CHUNK_SIZE = 1, ///< chunk size change + RTMP_PT_BYTES_READ = 3, ///< number of bytes read + RTMP_PT_USER_CONTROL, ///< user control + RTMP_PT_WINDOW_ACK_SIZE, ///< window acknowledgement size + RTMP_PT_SET_PEER_BW, ///< peer bandwidth + RTMP_PT_AUDIO = 8, ///< audio packet + RTMP_PT_VIDEO, ///< video packet + RTMP_PT_FLEX_STREAM = 15, ///< Flex shared stream + RTMP_PT_FLEX_OBJECT, ///< Flex shared object + RTMP_PT_FLEX_MESSAGE, ///< Flex shared message + RTMP_PT_NOTIFY, ///< some notification + RTMP_PT_SHARED_OBJ, ///< shared object + RTMP_PT_INVOKE, ///< invoke some stream action + RTMP_PT_METADATA = 22, ///< FLV metadata +} RTMPPacketType; + +/** + * possible RTMP packet header sizes + */ +enum RTMPPacketSize { + RTMP_PS_TWELVEBYTES = 0, ///< packet has 12-byte header + RTMP_PS_EIGHTBYTES, ///< packet has 8-byte header + RTMP_PS_FOURBYTES, ///< packet has 4-byte header + RTMP_PS_ONEBYTE ///< packet is really a next chunk of a packet +}; + +/** + * structure for holding RTMP packets + */ +typedef struct RTMPPacket { + int channel_id; ///< RTMP channel ID (nothing to do with audio/video channels though) + RTMPPacketType type; ///< packet payload type + uint32_t timestamp; ///< packet full timestamp + uint32_t ts_field; ///< 24-bit timestamp or increment to the previous one, in milliseconds (latter only for media packets). Clipped to a maximum of 0xFFFFFF, indicating an extended timestamp field. + uint32_t extra; ///< probably an additional channel ID used during streaming data + uint8_t *data; ///< packet payload + int size; ///< packet payload size + int offset; ///< amount of data read so far + int read; ///< amount read, including headers +} RTMPPacket; + +/** + * Create new RTMP packet with given attributes. + * + * @param pkt packet + * @param channel_id packet channel ID + * @param type packet type + * @param timestamp packet timestamp + * @param size packet size + * @return zero on success, negative value otherwise + */ +int ff_rtmp_packet_create(RTMPPacket *pkt, int channel_id, RTMPPacketType type, + int timestamp, int size); + +/** + * Free RTMP packet. + * + * @param pkt packet + */ +void ff_rtmp_packet_destroy(RTMPPacket *pkt); + +/** + * Read RTMP packet sent by the server. + * + * @param h reader context + * @param p packet + * @param chunk_size current chunk size + * @param prev_pkt previously read packet headers for all channels + * (may be needed for restoring incomplete packet header) + * @param nb_prev_pkt number of allocated elements in prev_pkt + * @return number of bytes read on success, negative value otherwise + */ +int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, + int chunk_size, RTMPPacket **prev_pkt, + int *nb_prev_pkt); +/** + * Read internal RTMP packet sent by the server. + * + * @param h reader context + * @param p packet + * @param chunk_size current chunk size + * @param prev_pkt previously read packet headers for all channels + * (may be needed for restoring incomplete packet header) + * @param nb_prev_pkt number of allocated elements in prev_pkt + * @param c the first byte already read + * @return number of bytes read on success, negative value otherwise + */ +int ff_rtmp_packet_read_internal(URLContext *h, RTMPPacket *p, int chunk_size, + RTMPPacket **prev_pkt, int *nb_prev_pkt, + uint8_t c); + +/** + * Send RTMP packet to the server. + * + * @param h reader context + * @param p packet to send + * @param chunk_size current chunk size + * @param prev_pkt previously sent packet headers for all channels + * (may be used for packet header compressing) + * @param nb_prev_pkt number of allocated elements in prev_pkt + * @return number of bytes written on success, negative value otherwise + */ +int ff_rtmp_packet_write(URLContext *h, RTMPPacket *p, + int chunk_size, RTMPPacket **prev_pkt, + int *nb_prev_pkt); + +/** + * Print information and contents of RTMP packet. + * + * @param ctx output context + * @param p packet to dump + */ +void ff_rtmp_packet_dump(void *ctx, RTMPPacket *p); + +/** + * Enlarge the prev_pkt array to fit the given channel + * + * @param prev_pkt array with previously sent packet headers + * @param nb_prev_pkt number of allocated elements in prev_pkt + * @param channel the channel number that needs to be allocated + */ +int ff_rtmp_check_alloc_array(RTMPPacket **prev_pkt, int *nb_prev_pkt, + int channel); + +/** + * @name Functions used to work with the AMF format (which is also used in .flv) + * @see amf_* funcs in libavformat/flvdec.c + * @{ + */ + +/** + * Calculate number of bytes taken by first AMF entry in data. + * + * @param data input data + * @param data_end input buffer end + * @return number of bytes used by first AMF entry + */ +int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end); + +/** + * Retrieve value of given AMF object field in string form. + * + * @param data AMF object data + * @param data_end input buffer end + * @param name name of field to retrieve + * @param dst buffer for storing result + * @param dst_size output buffer size + * @return 0 if search and retrieval succeeded, negative value otherwise + */ +int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end, + const uint8_t *name, uint8_t *dst, int dst_size); + +/** + * Write boolean value in AMF format to buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param val value to write + */ +void ff_amf_write_bool(uint8_t **dst, int val); + +/** + * Write number in AMF format to buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param num value to write + */ +void ff_amf_write_number(uint8_t **dst, double num); + +/** + * Write string in AMF format to buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param str string to write + */ +void ff_amf_write_string(uint8_t **dst, const char *str); + +/** + * Write a string consisting of two parts in AMF format to a buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param str1 first string to write, may be null + * @param str2 second string to write, may be null + */ +void ff_amf_write_string2(uint8_t **dst, const char *str1, const char *str2); + +/** + * Write AMF NULL value to buffer. + * + * @param dst pointer to the input buffer (will be modified) + */ +void ff_amf_write_null(uint8_t **dst); + +/** + * Write marker for AMF object to buffer. + * + * @param dst pointer to the input buffer (will be modified) + */ +void ff_amf_write_object_start(uint8_t **dst); + +/** + * Write string used as field name in AMF object to buffer. + * + * @param dst pointer to the input buffer (will be modified) + * @param str string to write + */ +void ff_amf_write_field_name(uint8_t **dst, const char *str); + +/** + * Write marker for end of AMF object to buffer. + * + * @param dst pointer to the input buffer (will be modified) + */ +void ff_amf_write_object_end(uint8_t **dst); + +/** + * Read AMF boolean value. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@param[out] val 0 or 1 + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_read_bool(GetByteContext *gbc, int *val); + +/** + * Read AMF number value. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@param[out] val read value + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_read_number(GetByteContext *gbc, double *val); + +/** + * Get AMF string value. + * + * This function behaves the same as ff_amf_read_string except that + * it does not expect the AMF type prepended to the actual data. + * Appends a trailing null byte to output string in order to + * ease later parsing. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@param[out] str read string + *@param[in] strsize buffer size available to store the read string + *@param[out] length read string length + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_get_string(GetByteContext *bc, uint8_t *str, + int strsize, int *length); + +/** + * Read AMF string value. + * + * Appends a trailing null byte to output string in order to + * ease later parsing. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@param[out] str read string + *@param[in] strsize buffer size available to store the read string + *@param[out] length read string length + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_read_string(GetByteContext *gbc, uint8_t *str, + int strsize, int *length); + +/** + * Read AMF NULL value. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_read_null(GetByteContext *gbc); + +/** + * Match AMF string with a NULL-terminated string. + * + * @return 0 if the strings do not match. + */ + +int ff_amf_match_string(const uint8_t *data, int size, const char *str); + +/** @} */ // AMF funcs + +#endif /* AVFORMAT_RTMPPKT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtp.h new file mode 100644 index 00000000..54512c6f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtp.h @@ -0,0 +1,115 @@ +/* + * RTP definitions + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_RTP_H +#define AVFORMAT_RTP_H + +#include "libavformat/avformat.h" +#include "libavcodec/avcodec.h" +#include "libavutil/mathematics.h" + +/** + * Return the payload type for a given stream used in the given format context. + * Static payload types are derived from the codec. + * Dynamic payload type are derived from the id field in AVStream. + * The format context private option payload_type overrides both. + * + * @param fmt The context of the format + * @param par The codec parameters + * @param idx The stream index + * @return The payload type (the 'PT' field in the RTP header). + */ +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecParameters *par, + int idx); + +/** + * Initialize a codec context based on the payload type. + * + * Fill the codec_type and codec_id fields of a codec context with + * information depending on the payload type; for audio codecs, the + * channels and sample_rate fields are also filled. + * + * @param par The codec parameters + * @param payload_type The payload type (the 'PT' field in the RTP header) + * @return In case of unknown payload type or dynamic payload type, a + * negative value is returned; otherwise, 0 is returned + */ +int ff_rtp_get_codec_info(AVCodecParameters *par, int payload_type); + +/** + * Return the encoding name (as defined in + * http://www.iana.org/assignments/rtp-parameters) for a given payload type. + * + * @param payload_type The payload type (the 'PT' field in the RTP header) + * @return In case of unknown payload type or dynamic payload type, a pointer + * to an empty string is returned; otherwise, a pointer to a string containing + * the encoding name is returned + */ +const char *ff_rtp_enc_name(int payload_type); + +/** + * Return the codec id for the given encoding name and codec type. + * + * @param buf A pointer to the string containing the encoding name + * @param codec_type The codec type + * @return In case of unknown encoding name, AV_CODEC_ID_NONE is returned; + * otherwise, the codec id is returned + */ +enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type); + +#define RTP_PT_PRIVATE 96 +#define RTP_VERSION 2 +#define RTP_MAX_SDES 256 /**< maximum text length for SDES */ + +/* RTCP packets use 0.5% of the bandwidth */ +#define RTCP_TX_RATIO_NUM 5 +#define RTCP_TX_RATIO_DEN 1000 + +/* An arbitrary id value for RTP Xiph streams - only relevant to indicate + * that the configuration has changed within a stream (by changing the + * ident value sent). + */ +#define RTP_XIPH_IDENT 0xfecdba + +/* RTCP packet types */ +enum RTCPType { + RTCP_FIR = 192, + RTCP_NACK, // 193 + RTCP_SMPTETC,// 194 + RTCP_IJ, // 195 + RTCP_SR = 200, + RTCP_RR, // 201 + RTCP_SDES, // 202 + RTCP_BYE, // 203 + RTCP_APP, // 204 + RTCP_RTPFB,// 205 + RTCP_PSFB, // 206 + RTCP_XR, // 207 + RTCP_AVB, // 208 + RTCP_RSI, // 209 + RTCP_TOKEN,// 210 +}; + +#define RTP_PT_IS_RTCP(x) (((x) >= RTCP_FIR && (x) <= RTCP_IJ) || \ + ((x) >= RTCP_SR && (x) <= RTCP_TOKEN)) + +#define NTP_TO_RTP_FORMAT(x) av_rescale((x), INT64_C(1) << 32, 1000000) + +#endif /* AVFORMAT_RTP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec.h new file mode 100644 index 00000000..9144edbe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec.h @@ -0,0 +1,237 @@ +/* + * RTP demuxer definitions + * Copyright (c) 2002 Fabrice Bellard + * Copyright (c) 2006 Ryan Martell + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTPDEC_H +#define AVFORMAT_RTPDEC_H + +#include "libavcodec/avcodec.h" +#include "avformat.h" +#include "rtp.h" +#include "url.h" +#include "srtp.h" + +typedef struct PayloadContext PayloadContext; +typedef struct RTPDynamicProtocolHandler RTPDynamicProtocolHandler; + +#define RTP_MIN_PACKET_LENGTH 12 +#define RTP_MAX_PACKET_LENGTH 8192 + +#define RTP_REORDER_QUEUE_DEFAULT_SIZE 500 + +#define RTP_NOTS_VALUE ((uint32_t)-1) + +typedef struct RTPDemuxContext RTPDemuxContext; +RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, + int payload_type, int queue_size); +void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx, + const RTPDynamicProtocolHandler *handler); +void ff_rtp_parse_set_crypto(RTPDemuxContext *s, const char *suite, + const char *params); +int ff_rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt, + uint8_t **buf, int len); +void ff_rtp_parse_close(RTPDemuxContext *s); +int64_t ff_rtp_queued_packet_time(RTPDemuxContext *s); +void ff_rtp_reset_packet_queue(RTPDemuxContext *s); + +/** + * Send a dummy packet on both port pairs to set up the connection + * state in potential NAT routers, so that we're able to receive + * packets. + * + * Note, this only works if the NAT router doesn't remap ports. This + * isn't a standardized procedure, but it works in many cases in practice. + * + * The same routine is used with RDT too, even if RDT doesn't use normal + * RTP packets otherwise. + */ +void ff_rtp_send_punch_packets(URLContext* rtp_handle); + +/** + * some rtp servers assume client is dead if they don't hear from them... + * so we send a Receiver Report to the provided URLContext or AVIOContext + * (we don't have access to the rtcp handle from here) + */ +int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, URLContext *fd, + AVIOContext *avio, int count); +int ff_rtp_send_rtcp_feedback(RTPDemuxContext *s, URLContext *fd, + AVIOContext *avio); + +// these statistics are used for rtcp receiver reports... +typedef struct RTPStatistics { + uint16_t max_seq; ///< highest sequence number seen + uint32_t cycles; ///< shifted count of sequence number cycles + uint32_t base_seq; ///< base sequence number + uint32_t bad_seq; ///< last bad sequence number + 1 + int probation; ///< sequence packets till source is valid + uint32_t received; ///< packets received + uint32_t expected_prior; ///< packets expected in last interval + uint32_t received_prior; ///< packets received in last interval + uint32_t transit; ///< relative transit time for previous packet + uint32_t jitter; ///< estimated jitter. +} RTPStatistics; + +#define RTP_FLAG_KEY 0x1 ///< RTP packet contains a keyframe +#define RTP_FLAG_MARKER 0x2 ///< RTP marker bit was set for this packet +/** + * Packet parsing for "private" payloads in the RTP specs. + * + * @param ctx RTSP demuxer context + * @param s stream context + * @param st stream that this packet belongs to + * @param pkt packet in which to write the parsed data + * @param timestamp pointer to the RTP timestamp of the input data, can be + * updated by the function if returning older, buffered data + * @param buf pointer to raw RTP packet data + * @param len length of buf + * @param seq RTP sequence number of the packet + * @param flags flags from the RTP packet header (RTP_FLAG_*) + */ +typedef int (*DynamicPayloadPacketHandlerProc)(AVFormatContext *ctx, + PayloadContext *s, + AVStream *st, AVPacket *pkt, + uint32_t *timestamp, + const uint8_t * buf, + int len, uint16_t seq, int flags); + +struct RTPDynamicProtocolHandler { + const char *enc_name; + enum AVMediaType codec_type; + enum AVCodecID codec_id; + enum AVStreamParseType need_parsing; + int static_payload_id; /* 0 means no payload id is set. 0 is a valid + * payload ID (PCMU), too, but that format doesn't + * require any custom depacketization code. */ + int priv_data_size; + + /** Initialize dynamic protocol handler, called after the full rtpmap line is parsed, may be null */ + int (*init)(AVFormatContext *s, int st_index, PayloadContext *priv_data); + /** Parse the a= line from the sdp field */ + int (*parse_sdp_a_line)(AVFormatContext *s, int st_index, + PayloadContext *priv_data, const char *line); + /** Free any data needed by the rtp parsing for this dynamic data. + * Don't free the protocol_data pointer itself, that is freed by the + * caller. This is called even if the init method failed. */ + void (*close)(PayloadContext *protocol_data); + /** Parse handler for this dynamic packet */ + DynamicPayloadPacketHandlerProc parse_packet; + int (*need_keyframe)(PayloadContext *context); + + struct RTPDynamicProtocolHandler *next; +}; + +typedef struct RTPPacket { + uint16_t seq; + uint8_t *buf; + int len; + int64_t recvtime; + struct RTPPacket *next; +} RTPPacket; + +struct RTPDemuxContext { + AVFormatContext *ic; + AVStream *st; + int payload_type; + uint32_t ssrc; + uint16_t seq; + uint32_t timestamp; + uint32_t base_timestamp; + int64_t unwrapped_timestamp; + int64_t range_start_offset; + int max_payload_size; + /* used to send back RTCP RR */ + char hostname[256]; + + int srtp_enabled; + struct SRTPContext srtp; + + /** Statistics for this stream (used by RTCP receiver reports) */ + RTPStatistics statistics; + + /** Fields for packet reordering @{ */ + int prev_ret; ///< The return value of the actual parsing of the previous packet + RTPPacket* queue; ///< A sorted queue of buffered packets not yet returned + int queue_len; ///< The number of packets in queue + int queue_size; ///< The size of queue, or 0 if reordering is disabled + /*@}*/ + + /* rtcp sender statistics receive */ + uint64_t last_rtcp_ntp_time; + int64_t last_rtcp_reception_time; + uint64_t first_rtcp_ntp_time; + uint32_t last_rtcp_timestamp; + int64_t rtcp_ts_offset; + + /* rtcp sender statistics */ + unsigned int packet_count; + unsigned int octet_count; + unsigned int last_octet_count; + int64_t last_feedback_time; + + /* dynamic payload stuff */ + const RTPDynamicProtocolHandler *handler; + PayloadContext *dynamic_protocol_context; +}; + +/** + * Iterate over all registered rtp dynamic protocol handlers. + * + * @param opaque a pointer where libavformat will store the iteration state. Must + * point to NULL to start the iteration. + * + * @return the next registered rtp dynamic protocol handler or NULL when the iteration is + * finished + */ +const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque); +/** + * Find a registered rtp dynamic protocol handler with the specified name. + * + * @param name name of the requested rtp dynamic protocol handler + * @return A rtp dynamic protocol handler if one was found, NULL otherwise. + */ +const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, + enum AVMediaType codec_type); +/** + * Find a registered rtp dynamic protocol handler with a matching codec ID. + * + * @param id AVCodecID of the requested rtp dynamic protocol handler. + * @return A rtp dynamic protocol handler if one was found, NULL otherwise. + */ +const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id, + enum AVMediaType codec_type); + +/* from rtsp.c, but used by rtp dynamic protocol handlers. */ +int ff_rtsp_next_attr_and_value(const char **p, char *attr, int attr_size, + char *value, int value_size); + +int ff_parse_fmtp(AVFormatContext *s, + AVStream *stream, PayloadContext *data, const char *p, + int (*parse_fmtp)(AVFormatContext *s, + AVStream *stream, + PayloadContext *data, + const char *attr, const char *value)); + +/** + * Close the dynamic buffer and make a packet from it. + */ +int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx); + +#endif /* AVFORMAT_RTPDEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec_formats.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec_formats.h new file mode 100644 index 00000000..dad2b8ac --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpdec_formats.h @@ -0,0 +1,93 @@ +/* + * RTP depacketizer declarations + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTPDEC_FORMATS_H +#define AVFORMAT_RTPDEC_FORMATS_H + +#include "rtpdec.h" + +/** + * Parse a Windows Media Server-specific SDP line + * + * @param s RTSP demux context + */ +int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p); + +int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data, + AVStream *st, AVPacket *pkt, uint32_t *timestamp, + const uint8_t *buf, int len, uint16_t seq, int flags); + +int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s, + uint8_t **data_ptr, int *size_ptr, + const char *value); +int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, PayloadContext *data, AVPacket *pkt, + const uint8_t *buf, int len, + int start_skip, int *nal_counters, + int nal_mask); +int ff_h264_handle_frag_packet(AVPacket *pkt, const uint8_t *buf, int len, + int start_bit, const uint8_t *nal_header, + int nal_header_len); +void ff_h264_parse_framesize(AVCodecParameters *par, const char *p); + +extern const RTPDynamicProtocolHandler ff_ac3_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_dv_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726_16_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726_24_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726_32_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726_40_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726le_16_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726le_24_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726le_32_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_g726le_40_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_h261_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_h264_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_hevc_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_ilbc_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_jpeg_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mpeg_audio_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mpeg_video_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_mpegts_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_ms_rtp_asf_pfa_handler; +extern const RTPDynamicProtocolHandler ff_ms_rtp_asf_pfv_handler; +extern const RTPDynamicProtocolHandler ff_qcelp_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_qdm2_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_qt_rtp_aud_handler; +extern const RTPDynamicProtocolHandler ff_qt_rtp_vid_handler; +extern const RTPDynamicProtocolHandler ff_quicktime_rtp_aud_handler; +extern const RTPDynamicProtocolHandler ff_quicktime_rtp_vid_handler; +extern const RTPDynamicProtocolHandler ff_rfc4175_rtp_handler; +extern const RTPDynamicProtocolHandler ff_svq3_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_theora_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_vc2hq_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_vorbis_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_vp8_dynamic_handler; +extern const RTPDynamicProtocolHandler ff_vp9_dynamic_handler; + +#endif /* AVFORMAT_RTPDEC_FORMATS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc.h new file mode 100644 index 00000000..62dc9ab1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc.h @@ -0,0 +1,102 @@ +/* + * RTP muxer definitions + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_RTPENC_H +#define AVFORMAT_RTPENC_H + +#include "avformat.h" +#include "rtp.h" + +struct RTPMuxContext { + const AVClass *av_class; + AVFormatContext *ic; + AVStream *st; + int payload_type; + uint32_t ssrc; + const char *cname; + int seq; + uint32_t timestamp; + uint32_t base_timestamp; + uint32_t cur_timestamp; + int max_payload_size; + int num_frames; + + /* rtcp sender statistics */ + int64_t last_rtcp_ntp_time; + int64_t first_rtcp_ntp_time; + unsigned int packet_count; + unsigned int octet_count; + unsigned int last_octet_count; + int first_packet; + /* buffer for output */ + uint8_t *buf; + uint8_t *buf_ptr; + + int max_frames_per_packet; + + /** + * Number of bytes used for H.264 NAL length, if the MP4 syntax is used + * (1, 2 or 4) + */ + int nal_length_size; + int buffered_nals; + + int flags; + + unsigned int frame_count; +}; + +typedef struct RTPMuxContext RTPMuxContext; + +#define FF_RTP_FLAG_MP4A_LATM 1 +#define FF_RTP_FLAG_RFC2190 2 +#define FF_RTP_FLAG_SKIP_RTCP 4 +#define FF_RTP_FLAG_H264_MODE0 8 +#define FF_RTP_FLAG_SEND_BYE 16 + +#define FF_RTP_FLAG_OPTS(ctx, fieldname) \ + { "rtpflags", "RTP muxer flags", offsetof(ctx, fieldname), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "h264_mode0", "Use mode 0 for H.264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \ + { "send_bye", "Send RTCP BYE packets when finishing", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SEND_BYE}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \ + +void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m); + +void ff_rtp_send_h264_hevc(AVFormatContext *s1, const uint8_t *buf1, int size); +void ff_rtp_send_h261(AVFormatContext *s1, const uint8_t *buf1, int size); +void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size); +void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf1, int size, + const uint8_t *mb_info, int mb_info_size); +void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_latm(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size); +void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_vc2hq(AVFormatContext *s1, const uint8_t *buf, int size, int interlaced); +void ff_rtp_send_vp8(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_vp9(AVFormatContext *s1, const uint8_t *buff, int size); +void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buff, int size); + +const uint8_t *ff_h263_find_resync_marker_reverse(const uint8_t *av_restrict start, + const uint8_t *av_restrict end); + +#endif /* AVFORMAT_RTPENC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc_chain.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc_chain.h new file mode 100644 index 00000000..21c27c14 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpenc_chain.h @@ -0,0 +1,32 @@ +/* + * RTP muxer chaining code + * Copyright (c) 2010 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTPENC_CHAIN_H +#define AVFORMAT_RTPENC_CHAIN_H + +#include "avformat.h" +#include "url.h" + +int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s, + AVStream *st, URLContext *handle, int packet_size, + int id); + +#endif /* AVFORMAT_RTPENC_CHAIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpproto.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpproto.h new file mode 100644 index 00000000..131aac5f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtpproto.h @@ -0,0 +1,30 @@ +/* + * RTP network protocol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTPPROTO_H +#define AVFORMAT_RTPPROTO_H + +#include "url.h" + +int ff_rtp_set_remote_url(URLContext *h, const char *uri); + +int ff_rtp_get_local_rtp_port(URLContext *h); + +#endif /* AVFORMAT_RTPPROTO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtsp.h new file mode 100644 index 00000000..54a9a30c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtsp.h @@ -0,0 +1,644 @@ +/* + * RTSP definitions + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVFORMAT_RTSP_H +#define AVFORMAT_RTSP_H + +#include +#include "avformat.h" +#include "rtspcodes.h" +#include "rtpdec.h" +#include "network.h" +#include "httpauth.h" + +#include "libavutil/log.h" +#include "libavutil/opt.h" + +/** + * Network layer over which RTP/etc packet data will be transported. + */ +enum RTSPLowerTransport { + RTSP_LOWER_TRANSPORT_UDP = 0, /**< UDP/unicast */ + RTSP_LOWER_TRANSPORT_TCP = 1, /**< TCP; interleaved in RTSP */ + RTSP_LOWER_TRANSPORT_UDP_MULTICAST = 2, /**< UDP/multicast */ + RTSP_LOWER_TRANSPORT_NB, + RTSP_LOWER_TRANSPORT_HTTP = 8, /**< HTTP tunneled - not a proper + transport mode as such, + only for use via AVOptions */ + RTSP_LOWER_TRANSPORT_HTTPS, /**< HTTPS tunneled */ + RTSP_LOWER_TRANSPORT_CUSTOM = 16, /**< Custom IO - not a public + option for lower_transport_mask, + but set in the SDP demuxer based + on a flag. */ +}; + +/** + * Packet profile of the data that we will be receiving. Real servers + * commonly send RDT (although they can sometimes send RTP as well), + * whereas most others will send RTP. + */ +enum RTSPTransport { + RTSP_TRANSPORT_RTP, /**< Standards-compliant RTP */ + RTSP_TRANSPORT_RDT, /**< Realmedia Data Transport */ + RTSP_TRANSPORT_RAW, /**< Raw data (over UDP) */ + RTSP_TRANSPORT_NB +}; + +/** + * Transport mode for the RTSP data. This may be plain, or + * tunneled, which is done over HTTP. + */ +enum RTSPControlTransport { + RTSP_MODE_PLAIN, /**< Normal RTSP */ + RTSP_MODE_TUNNEL /**< RTSP over HTTP (tunneling) */ +}; + +#define RTSP_DEFAULT_PORT 554 +#define RTSPS_DEFAULT_PORT 322 +#define RTSP_MAX_TRANSPORTS 8 +#define RTSP_TCP_MAX_PACKET_SIZE 1472 +#define RTSP_DEFAULT_NB_AUDIO_CHANNELS 1 +#define RTSP_DEFAULT_AUDIO_SAMPLERATE 44100 +#define RTSP_RTP_PORT_MIN 5000 +#define RTSP_RTP_PORT_MAX 65000 + +/** + * This describes a single item in the "Transport:" line of one stream as + * negotiated by the SETUP RTSP command. Multiple transports are comma- + * separated ("Transport: x-read-rdt/tcp;interleaved=0-1,rtp/avp/udp; + * client_port=1000-1001;server_port=1800-1801") and described in separate + * RTSPTransportFields. + */ +typedef struct RTSPTransportField { + /** interleave ids, if TCP transport; each TCP/RTSP data packet starts + * with a '$', stream length and stream ID. If the stream ID is within + * the range of this interleaved_min-max, then the packet belongs to + * this stream. */ + int interleaved_min, interleaved_max; + + /** UDP multicast port range; the ports to which we should connect to + * receive multicast UDP data. */ + int port_min, port_max; + + /** UDP client ports; these should be the local ports of the UDP RTP + * (and RTCP) sockets over which we receive RTP/RTCP data. */ + int client_port_min, client_port_max; + + /** UDP unicast server port range; the ports to which we should connect + * to receive unicast UDP RTP/RTCP data. */ + int server_port_min, server_port_max; + + /** time-to-live value (required for multicast); the amount of HOPs that + * packets will be allowed to make before being discarded. */ + int ttl; + + /** transport set to record data */ + int mode_record; + + struct sockaddr_storage destination; /**< destination IP address */ + char source[INET6_ADDRSTRLEN + 1]; /**< source IP address */ + + /** data/packet transport protocol; e.g. RTP or RDT */ + enum RTSPTransport transport; + + /** network layer transport protocol; e.g. TCP or UDP uni-/multicast */ + enum RTSPLowerTransport lower_transport; +} RTSPTransportField; + +/** + * This describes the server response to each RTSP command. + */ +typedef struct RTSPMessageHeader { + /** length of the data following this header */ + int content_length; + + enum RTSPStatusCode status_code; /**< response code from server */ + + /** number of items in the 'transports' variable below */ + int nb_transports; + + /** Time range of the streams that the server will stream. In + * AV_TIME_BASE unit, AV_NOPTS_VALUE if not used */ + int64_t range_start, range_end; + + /** describes the complete "Transport:" line of the server in response + * to a SETUP RTSP command by the client */ + RTSPTransportField transports[RTSP_MAX_TRANSPORTS]; + + int seq; /**< sequence number */ + + /** the "Session:" field. This value is initially set by the server and + * should be re-transmitted by the client in every RTSP command. */ + char session_id[512]; + + /** the "Location:" field. This value is used to handle redirection. + */ + char location[4096]; + + /** the "RealChallenge1:" field from the server */ + char real_challenge[64]; + + /** the "Server: field, which can be used to identify some special-case + * servers that are not 100% standards-compliant. We use this to identify + * Windows Media Server, which has a value "WMServer/v.e.r.sion", where + * version is a sequence of digits (e.g. 9.0.0.3372). Helix/Real servers + * use something like "Helix [..] Server Version v.e.r.sion (platform) + * (RealServer compatible)" or "RealServer Version v.e.r.sion (platform)", + * where platform is the output of $uname -msr | sed 's/ /-/g'. */ + char server[64]; + + /** The "timeout" comes as part of the server response to the "SETUP" + * command, in the "Session: [;timeout=]" line. It is the + * time, in seconds, that the server will go without traffic over the + * RTSP/TCP connection before it closes the connection. To prevent + * this, sent dummy requests (e.g. OPTIONS) with intervals smaller + * than this value. */ + int timeout; + + /** The "Notice" or "X-Notice" field value. See + * http://tools.ietf.org/html/draft-stiemerling-rtsp-announce-00 + * for a complete list of supported values. */ + int notice; + + /** The "reason" is meant to specify better the meaning of the error code + * returned + */ + char reason[256]; + + /** + * Content type header + */ + char content_type[64]; +} RTSPMessageHeader; + +/** + * Client state, i.e. whether we are currently receiving data (PLAYING) or + * setup-but-not-receiving (PAUSED). State can be changed in applications + * by calling av_read_play/pause(). + */ +enum RTSPClientState { + RTSP_STATE_IDLE, /**< not initialized */ + RTSP_STATE_STREAMING, /**< initialized and sending/receiving data */ + RTSP_STATE_PAUSED, /**< initialized, but not receiving data */ + RTSP_STATE_SEEKING, /**< initialized, requesting a seek */ +}; + +/** + * Identify particular servers that require special handling, such as + * standards-incompliant "Transport:" lines in the SETUP request. + */ +enum RTSPServerType { + RTSP_SERVER_RTP, /**< Standards-compliant RTP-server */ + RTSP_SERVER_REAL, /**< Realmedia-style server */ + RTSP_SERVER_WMS, /**< Windows Media server */ + RTSP_SERVER_NB +}; + +/** + * Private data for the RTSP demuxer. + * + * @todo Use AVIOContext instead of URLContext + */ +typedef struct RTSPState { + const AVClass *class; /**< Class for private options. */ + URLContext *rtsp_hd; /* RTSP TCP connection handle */ + + /** number of items in the 'rtsp_streams' variable */ + int nb_rtsp_streams; + + struct RTSPStream **rtsp_streams; /**< streams in this session */ + + /** indicator of whether we are currently receiving data from the + * server. Basically this isn't more than a simple cache of the + * last PLAY/PAUSE command sent to the server, to make sure we don't + * send 2x the same unexpectedly or commands in the wrong state. */ + enum RTSPClientState state; + + /** the seek value requested when calling av_seek_frame(). This value + * is subsequently used as part of the "Range" parameter when emitting + * the RTSP PLAY command. If we are currently playing, this command is + * called instantly. If we are currently paused, this command is called + * whenever we resume playback. Either way, the value is only used once, + * see rtsp_read_play() and rtsp_read_seek(). */ + int64_t seek_timestamp; + + int seq; /**< RTSP command sequence number */ + + /** copy of RTSPMessageHeader->session_id, i.e. the server-provided session + * identifier that the client should re-transmit in each RTSP command */ + char session_id[512]; + + /** copy of RTSPMessageHeader->timeout, i.e. the time (in seconds) that + * the server will go without traffic on the RTSP/TCP line before it + * closes the connection. */ + int timeout; + + /** timestamp of the last RTSP command that we sent to the RTSP server. + * This is used to calculate when to send dummy commands to keep the + * connection alive, in conjunction with timeout. */ + int64_t last_cmd_time; + + /** the negotiated data/packet transport protocol; e.g. RTP or RDT */ + enum RTSPTransport transport; + + /** the negotiated network layer transport protocol; e.g. TCP or UDP + * uni-/multicast */ + enum RTSPLowerTransport lower_transport; + + /** brand of server that we're talking to; e.g. WMS, REAL or other. + * Detected based on the value of RTSPMessageHeader->server or the presence + * of RTSPMessageHeader->real_challenge */ + enum RTSPServerType server_type; + + /** the "RealChallenge1:" field from the server */ + char real_challenge[64]; + + /** plaintext authorization line (username:password) */ + char auth[128]; + + /** authentication state */ + HTTPAuthState auth_state; + + /** The last reply of the server to a RTSP command */ + char last_reply[2048]; /* XXX: allocate ? */ + + /** RTSPStream->transport_priv of the last stream that we read a + * packet from */ + void *cur_transport_priv; + + /** The following are used for Real stream selection */ + //@{ + /** whether we need to send a "SET_PARAMETER Subscribe:" command */ + int need_subscription; + + /** stream setup during the last frame read. This is used to detect if + * we need to subscribe or unsubscribe to any new streams. */ + enum AVDiscard *real_setup_cache; + + /** current stream setup. This is a temporary buffer used to compare + * current setup to previous frame setup. */ + enum AVDiscard *real_setup; + + /** the last value of the "SET_PARAMETER Subscribe:" RTSP command. + * this is used to send the same "Unsubscribe:" if stream setup changed, + * before sending a new "Subscribe:" command. */ + char last_subscription[1024]; + //@} + + /** The following are used for RTP/ASF streams */ + //@{ + /** ASF demuxer context for the embedded ASF stream from WMS servers */ + AVFormatContext *asf_ctx; + + /** cache for position of the asf demuxer, since we load a new + * data packet in the bytecontext for each incoming RTSP packet. */ + uint64_t asf_pb_pos; + //@} + + /** some MS RTSP streams contain a URL in the SDP that we need to use + * for all subsequent RTSP requests, rather than the input URI; in + * other cases, this is a copy of AVFormatContext->filename. */ + char control_uri[1024]; + + /** The following are used for parsing raw mpegts in udp */ + //@{ + struct MpegTSContext *ts; + int recvbuf_pos; + int recvbuf_len; + //@} + + /** Additional output handle, used when input and output are done + * separately, eg for HTTP tunneling. */ + URLContext *rtsp_hd_out; + + /** RTSP transport mode, such as plain or tunneled. */ + enum RTSPControlTransport control_transport; + + /* Number of RTCP BYE packets the RTSP session has received. + * An EOF is propagated back if nb_byes == nb_streams. + * This is reset after a seek. */ + int nb_byes; + + /** Reusable buffer for receiving packets */ + uint8_t* recvbuf; + + /** + * A mask with all requested transport methods + */ + int lower_transport_mask; + + /** + * The number of returned packets + */ + uint64_t packets; + + /** + * Polling array for udp + */ + struct pollfd *p; + int max_p; + + /** + * Whether the server supports the GET_PARAMETER method. + */ + int get_parameter_supported; + + /** + * Do not begin to play the stream immediately. + */ + int initial_pause; + + /** + * Option flags for the chained RTP muxer. + */ + int rtp_muxer_flags; + + /** Whether the server accepts the x-Dynamic-Rate header */ + int accept_dynamic_rate; + + /** + * Various option flags for the RTSP muxer/demuxer. + */ + int rtsp_flags; + + /** + * Mask of all requested media types + */ + int media_type_mask; + + /** + * Minimum and maximum local UDP ports. + */ + int rtp_port_min, rtp_port_max; + + /** + * Timeout to wait for incoming connections. + */ + int initial_timeout; + + /** + * timeout of socket i/o operations. + */ + int stimeout; + + /** + * Size of RTP packet reordering queue. + */ + int reordering_queue_size; + + /** + * User-Agent string + */ + char *user_agent; + + char default_lang[4]; + int buffer_size; + int pkt_size; +} RTSPState; + +#define RTSP_FLAG_FILTER_SRC 0x1 /**< Filter incoming UDP packets - + receive packets only from the right + source address and port. */ +#define RTSP_FLAG_LISTEN 0x2 /**< Wait for incoming connections. */ +#define RTSP_FLAG_CUSTOM_IO 0x4 /**< Do all IO via the AVIOContext. */ +#define RTSP_FLAG_RTCP_TO_SOURCE 0x8 /**< Send RTCP packets to the source + address of received packets. */ +#define RTSP_FLAG_PREFER_TCP 0x10 /**< Try RTP via TCP first if possible. */ + +typedef struct RTSPSource { + char addr[128]; /**< Source-specific multicast include source IP address (from SDP content) */ +} RTSPSource; + +/** + * Describe a single stream, as identified by a single m= line block in the + * SDP content. In the case of RDT, one RTSPStream can represent multiple + * AVStreams. In this case, each AVStream in this set has similar content + * (but different codec/bitrate). + */ +typedef struct RTSPStream { + URLContext *rtp_handle; /**< RTP stream handle (if UDP) */ + void *transport_priv; /**< RTP/RDT parse context if input, RTP AVFormatContext if output */ + + /** corresponding stream index, if any. -1 if none (MPEG2TS case) */ + int stream_index; + + /** interleave IDs; copies of RTSPTransportField->interleaved_min/max + * for the selected transport. Only used for TCP. */ + int interleaved_min, interleaved_max; + + char control_url[1024]; /**< url for this stream (from SDP) */ + + /** The following are used only in SDP, not RTSP */ + //@{ + int sdp_port; /**< port (from SDP content) */ + struct sockaddr_storage sdp_ip; /**< IP address (from SDP content) */ + int nb_include_source_addrs; /**< Number of source-specific multicast include source IP addresses (from SDP content) */ + struct RTSPSource **include_source_addrs; /**< Source-specific multicast include source IP addresses (from SDP content) */ + int nb_exclude_source_addrs; /**< Number of source-specific multicast exclude source IP addresses (from SDP content) */ + struct RTSPSource **exclude_source_addrs; /**< Source-specific multicast exclude source IP addresses (from SDP content) */ + int sdp_ttl; /**< IP Time-To-Live (from SDP content) */ + int sdp_payload_type; /**< payload type */ + //@} + + /** The following are used for dynamic protocols (rtpdec_*.c/rdt.c) */ + //@{ + /** handler structure */ + const RTPDynamicProtocolHandler *dynamic_handler; + + /** private data associated with the dynamic protocol */ + PayloadContext *dynamic_protocol_context; + //@} + + /** Enable sending RTCP feedback messages according to RFC 4585 */ + int feedback; + + /** SSRC for this stream, to allow identifying RTCP packets before the first RTP packet */ + uint32_t ssrc; + + char crypto_suite[40]; + char crypto_params[100]; +} RTSPStream; + +void ff_rtsp_parse_line(AVFormatContext *s, + RTSPMessageHeader *reply, const char *buf, + RTSPState *rt, const char *method); + +/** + * Send a command to the RTSP server without waiting for the reply. + * + * @see rtsp_send_cmd_with_content_async + */ +int ff_rtsp_send_cmd_async(AVFormatContext *s, const char *method, + const char *url, const char *headers); + +/** + * Send a command to the RTSP server and wait for the reply. + * + * @param s RTSP (de)muxer context + * @param method the method for the request + * @param url the target url for the request + * @param headers extra header lines to include in the request + * @param reply pointer where the RTSP message header will be stored + * @param content_ptr pointer where the RTSP message body, if any, will + * be stored (length is in reply) + * @param send_content if non-null, the data to send as request body content + * @param send_content_length the length of the send_content data, or 0 if + * send_content is null + * + * @return zero if success, nonzero otherwise + */ +int ff_rtsp_send_cmd_with_content(AVFormatContext *s, + const char *method, const char *url, + const char *headers, + RTSPMessageHeader *reply, + unsigned char **content_ptr, + const unsigned char *send_content, + int send_content_length); + +/** + * Send a command to the RTSP server and wait for the reply. + * + * @see rtsp_send_cmd_with_content + */ +int ff_rtsp_send_cmd(AVFormatContext *s, const char *method, + const char *url, const char *headers, + RTSPMessageHeader *reply, unsigned char **content_ptr); + +/** + * Read a RTSP message from the server, or prepare to read data + * packets if we're reading data interleaved over the TCP/RTSP + * connection as well. + * + * @param s RTSP (de)muxer context + * @param reply pointer where the RTSP message header will be stored + * @param content_ptr pointer where the RTSP message body, if any, will + * be stored (length is in reply) + * @param return_on_interleaved_data whether the function may return if we + * encounter a data marker ('$'), which precedes data + * packets over interleaved TCP/RTSP connections. If this + * is set, this function will return 1 after encountering + * a '$'. If it is not set, the function will skip any + * data packets (if they are encountered), until a reply + * has been fully parsed. If no more data is available + * without parsing a reply, it will return an error. + * @param method the RTSP method this is a reply to. This affects how + * some response headers are acted upon. May be NULL. + * + * @return 1 if a data packets is ready to be received, -1 on error, + * and 0 on success. + */ +int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply, + unsigned char **content_ptr, + int return_on_interleaved_data, const char *method); + +/** + * Skip a RTP/TCP interleaved packet. + */ +void ff_rtsp_skip_packet(AVFormatContext *s); + +/** + * Connect to the RTSP server and set up the individual media streams. + * This can be used for both muxers and demuxers. + * + * @param s RTSP (de)muxer context + * + * @return 0 on success, < 0 on error. Cleans up all allocations done + * within the function on error. + */ +int ff_rtsp_connect(AVFormatContext *s); + +/** + * Close and free all streams within the RTSP (de)muxer + * + * @param s RTSP (de)muxer context + */ +void ff_rtsp_close_streams(AVFormatContext *s); + +/** + * Close all connection handles within the RTSP (de)muxer + * + * @param s RTSP (de)muxer context + */ +void ff_rtsp_close_connections(AVFormatContext *s); + +/** + * Get the description of the stream and set up the RTSPStream child + * objects. + */ +int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply); + +/** + * Announce the stream to the server and set up the RTSPStream child + * objects for each media stream. + */ +int ff_rtsp_setup_output_streams(AVFormatContext *s, const char *addr); + +/** + * Parse RTSP commands (OPTIONS, PAUSE and TEARDOWN) during streaming in + * listen mode. + */ +int ff_rtsp_parse_streaming_commands(AVFormatContext *s); + +/** + * Parse an SDP description of streams by populating an RTSPState struct + * within the AVFormatContext; also allocate the RTP streams and the + * pollfd array used for UDP streams. + */ +int ff_sdp_parse(AVFormatContext *s, const char *content); + +/** + * Receive one RTP packet from an TCP interleaved RTSP stream. + */ +int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, + uint8_t *buf, int buf_size); + +/** + * Send buffered packets over TCP. + */ +int ff_rtsp_tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st); + +/** + * Receive one packet from the RTSPStreams set up in the AVFormatContext + * (which should contain a RTSPState struct as priv_data). + */ +int ff_rtsp_fetch_packet(AVFormatContext *s, AVPacket *pkt); + +/** + * Do the SETUP requests for each stream for the chosen + * lower transport mode. + * @return 0 on success, <0 on error, 1 if protocol is unavailable + */ +int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, + int lower_transport, const char *real_challenge); + +/** + * Undo the effect of ff_rtsp_make_setup_request, close the + * transport_priv and rtp_handle fields. + */ +void ff_rtsp_undo_setup(AVFormatContext *s, int send_packets); + +/** + * Open RTSP transport context. + */ +int ff_rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st); + +extern const AVOption ff_rtsp_options[]; + +#endif /* AVFORMAT_RTSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtspcodes.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtspcodes.h new file mode 100644 index 00000000..0ae490a4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/rtspcodes.h @@ -0,0 +1,149 @@ +/* + * RTSP definitions + * copyright (c) 2002 Fabrice Bellard + * copyright (c) 2014 Samsung Electronics. All rights reserved. + * @Author: Reynaldo H. Verdejo Pinochet + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_RTSPCODES_H +#define AVFORMAT_RTSPCODES_H + +#include "libavutil/common.h" +#include "libavformat/http.h" + +/** RTSP handling */ +enum RTSPStatusCode { +RTSP_STATUS_CONTINUE =100, +RTSP_STATUS_OK =200, +RTSP_STATUS_CREATED =201, +RTSP_STATUS_LOW_ON_STORAGE_SPACE =250, +RTSP_STATUS_MULTIPLE_CHOICES =300, +RTSP_STATUS_MOVED_PERMANENTLY =301, +RTSP_STATUS_MOVED_TEMPORARILY =302, +RTSP_STATUS_SEE_OTHER =303, +RTSP_STATUS_NOT_MODIFIED =304, +RTSP_STATUS_USE_PROXY =305, +RTSP_STATUS_BAD_REQUEST =400, +RTSP_STATUS_UNAUTHORIZED =401, +RTSP_STATUS_PAYMENT_REQUIRED =402, +RTSP_STATUS_FORBIDDEN =403, +RTSP_STATUS_NOT_FOUND =404, +RTSP_STATUS_METHOD =405, +RTSP_STATUS_NOT_ACCEPTABLE =406, +RTSP_STATUS_PROXY_AUTH_REQUIRED =407, +RTSP_STATUS_REQ_TIME_OUT =408, +RTSP_STATUS_GONE =410, +RTSP_STATUS_LENGTH_REQUIRED =411, +RTSP_STATUS_PRECONDITION_FAILED =412, +RTSP_STATUS_REQ_ENTITY_2LARGE =413, +RTSP_STATUS_REQ_URI_2LARGE =414, +RTSP_STATUS_UNSUPPORTED_MTYPE =415, +RTSP_STATUS_PARAM_NOT_UNDERSTOOD =451, +RTSP_STATUS_CONFERENCE_NOT_FOUND =452, +RTSP_STATUS_BANDWIDTH =453, +RTSP_STATUS_SESSION =454, +RTSP_STATUS_STATE =455, +RTSP_STATUS_INVALID_HEADER_FIELD =456, +RTSP_STATUS_INVALID_RANGE =457, +RTSP_STATUS_RONLY_PARAMETER =458, +RTSP_STATUS_AGGREGATE =459, +RTSP_STATUS_ONLY_AGGREGATE =460, +RTSP_STATUS_TRANSPORT =461, +RTSP_STATUS_UNREACHABLE =462, +RTSP_STATUS_INTERNAL =500, +RTSP_STATUS_NOT_IMPLEMENTED =501, +RTSP_STATUS_BAD_GATEWAY =502, +RTSP_STATUS_SERVICE =503, +RTSP_STATUS_GATEWAY_TIME_OUT =504, +RTSP_STATUS_VERSION =505, +RTSP_STATUS_UNSUPPORTED_OPTION =551, +}; + +static const av_unused char * const rtsp_status_strings[] = { +[RTSP_STATUS_CONTINUE] ="Continue", +[RTSP_STATUS_OK] ="OK", +[RTSP_STATUS_CREATED] ="Created", +[RTSP_STATUS_LOW_ON_STORAGE_SPACE] ="Low on Storage Space", +[RTSP_STATUS_MULTIPLE_CHOICES] ="Multiple Choices", +[RTSP_STATUS_MOVED_PERMANENTLY] ="Moved Permanently", +[RTSP_STATUS_MOVED_TEMPORARILY] ="Moved Temporarily", +[RTSP_STATUS_SEE_OTHER] ="See Other", +[RTSP_STATUS_NOT_MODIFIED] ="Not Modified", +[RTSP_STATUS_USE_PROXY] ="Use Proxy", +[RTSP_STATUS_BAD_REQUEST] ="Bad Request", +[RTSP_STATUS_UNAUTHORIZED] ="Unauthorized", +[RTSP_STATUS_PAYMENT_REQUIRED] ="Payment Required", +[RTSP_STATUS_FORBIDDEN] ="Forbidden", +[RTSP_STATUS_NOT_FOUND] ="Not Found", +[RTSP_STATUS_METHOD] ="Method Not Allowed", +[RTSP_STATUS_NOT_ACCEPTABLE] ="Not Acceptable", +[RTSP_STATUS_PROXY_AUTH_REQUIRED] ="Proxy Authentication Required", +[RTSP_STATUS_REQ_TIME_OUT] ="Request Time-out", +[RTSP_STATUS_GONE] ="Gone", +[RTSP_STATUS_LENGTH_REQUIRED] ="Length Required", +[RTSP_STATUS_PRECONDITION_FAILED] ="Precondition Failed", +[RTSP_STATUS_REQ_ENTITY_2LARGE] ="Request Entity Too Large", +[RTSP_STATUS_REQ_URI_2LARGE] ="Request URI Too Large", +[RTSP_STATUS_UNSUPPORTED_MTYPE] ="Unsupported Media Type", +[RTSP_STATUS_PARAM_NOT_UNDERSTOOD] ="Parameter Not Understood", +[RTSP_STATUS_CONFERENCE_NOT_FOUND] ="Conference Not Found", +[RTSP_STATUS_BANDWIDTH] ="Not Enough Bandwidth", +[RTSP_STATUS_SESSION] ="Session Not Found", +[RTSP_STATUS_STATE] ="Method Not Valid in This State", +[RTSP_STATUS_INVALID_HEADER_FIELD] ="Header Field Not Valid for Resource", +[RTSP_STATUS_INVALID_RANGE] ="Invalid Range", +[RTSP_STATUS_RONLY_PARAMETER] ="Parameter Is Read-Only", +[RTSP_STATUS_AGGREGATE] ="Aggregate Operation no Allowed", +[RTSP_STATUS_ONLY_AGGREGATE] ="Only Aggregate Operation Allowed", +[RTSP_STATUS_TRANSPORT] ="Unsupported Transport", +[RTSP_STATUS_UNREACHABLE] ="Destination Unreachable", +[RTSP_STATUS_INTERNAL] ="Internal Server Error", +[RTSP_STATUS_NOT_IMPLEMENTED] ="Not Implemented", +[RTSP_STATUS_BAD_GATEWAY] ="Bad Gateway", +[RTSP_STATUS_SERVICE] ="Service Unavailable", +[RTSP_STATUS_GATEWAY_TIME_OUT] ="Gateway Time-out", +[RTSP_STATUS_VERSION] ="RTSP Version not Supported", +[RTSP_STATUS_UNSUPPORTED_OPTION] ="Option not supported", +}; + +#define RTSP_STATUS_CODE2STRING(x) (\ +x >= 100 && x < FF_ARRAY_ELEMS(rtsp_status_strings) && rtsp_status_strings[x] \ +)? rtsp_status_strings[x] : NULL + +enum RTSPMethod { + DESCRIBE, + ANNOUNCE, + OPTIONS, + SETUP, + PLAY, + PAUSE, + TEARDOWN, + GET_PARAMETER, + SET_PARAMETER, + REDIRECT, + RECORD, + UNKNOWN = -1, +}; + +static inline int ff_rtsp_averror(enum RTSPStatusCode status_code, int default_averror) +{ + return ff_http_averror(status_code, default_averror); +} + +#endif /* AVFORMAT_RTSPCODES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sauce.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sauce.h new file mode 100644 index 00000000..0ba9ae5b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sauce.h @@ -0,0 +1,40 @@ +/* + * SAUCE header parser + * Copyright (c) 2010 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SAUCE header parser + */ + +#ifndef AVFORMAT_SAUCE_H +#define AVFORMAT_SAUCE_H + +#include "avformat.h" + +/** + * @param avctx AVFormatContext + * @param[out] fsize return length of file, less SAUCE header + * @param[out] got_width set to non-zero if SAUCE header reported height + * @param get_height Tell SAUCE header to parse height + */ +int ff_sauce_read(AVFormatContext *avctx, uint64_t *fsize, int *got_width, int get_height); + +#endif /* AVFORMAT_SAUCE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/smjpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/smjpeg.h new file mode 100644 index 00000000..995ddf22 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/smjpeg.h @@ -0,0 +1,45 @@ +/* + * SMJPEG common code + * Copyright (c) 2011-2012 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * SMJPEG common code + */ + +#ifndef AVFORMAT_SMJPEG_H +#define AVFORMAT_SMJPEG_H + +#include "internal.h" + +#define SMJPEG_MAGIC "\x0\xaSMJPEG" + +#define SMJPEG_DONE MKTAG('D', 'O', 'N', 'E') +#define SMJPEG_HEND MKTAG('H', 'E', 'N', 'D') +#define SMJPEG_SND MKTAG('_', 'S', 'N', 'D') +#define SMJPEG_SNDD MKTAG('s', 'n', 'd', 'D') +#define SMJPEG_TXT MKTAG('_', 'T', 'X', 'T') +#define SMJPEG_VID MKTAG('_', 'V', 'I', 'D') +#define SMJPEG_VIDD MKTAG('v', 'i', 'd', 'D') + +extern const AVCodecTag ff_codec_smjpeg_video_tags[]; +extern const AVCodecTag ff_codec_smjpeg_audio_tags[]; + +#endif /* AVFORMAT_SMJPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sox.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sox.h new file mode 100644 index 00000000..f4a12e93 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/sox.h @@ -0,0 +1,29 @@ +/* + * SoX native format common data + * Copyright (c) 2009 Daniel Verkamp + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_SOX_H +#define AVFORMAT_SOX_H + +#define SOX_FIXED_HDR (4 + 8 + 8 + 4 + 4) /**< Size of fixed header without magic */ + +#define SOX_TAG MKTAG('.', 'S', 'o', 'X') + +#endif /* AVFORMAT_SOX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/spdif.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/spdif.h new file mode 100644 index 00000000..0039fcfe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/spdif.h @@ -0,0 +1,65 @@ +/* + * IEC 61937 common header + * Copyright (c) 2009 Bartlomiej Wolowiec + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_SPDIF_H +#define AVFORMAT_SPDIF_H + +#include +#include "avformat.h" + +#define SYNCWORD1 0xF872 +#define SYNCWORD2 0x4E1F +#define BURST_HEADER_SIZE 0x8 + +enum IEC61937DataType { + IEC61937_AC3 = 0x01, ///< AC-3 data + IEC61937_MPEG1_LAYER1 = 0x04, ///< MPEG-1 layer 1 + IEC61937_MPEG1_LAYER23 = 0x05, ///< MPEG-1 layer 2 or 3 data or MPEG-2 without extension + IEC61937_MPEG2_EXT = 0x06, ///< MPEG-2 data with extension + IEC61937_MPEG2_AAC = 0x07, ///< MPEG-2 AAC ADTS + IEC61937_MPEG2_LAYER1_LSF = 0x08, ///< MPEG-2, layer-1 low sampling frequency + IEC61937_MPEG2_LAYER2_LSF = 0x09, ///< MPEG-2, layer-2 low sampling frequency + IEC61937_MPEG2_LAYER3_LSF = 0x0A, ///< MPEG-2, layer-3 low sampling frequency + IEC61937_DTS1 = 0x0B, ///< DTS type I (512 samples) + IEC61937_DTS2 = 0x0C, ///< DTS type II (1024 samples) + IEC61937_DTS3 = 0x0D, ///< DTS type III (2048 samples) + IEC61937_ATRAC = 0x0E, ///< ATRAC data + IEC61937_ATRAC3 = 0x0F, ///< ATRAC3 data + IEC61937_ATRACX = 0x10, ///< ATRAC3+ data + IEC61937_DTSHD = 0x11, ///< DTS HD data + IEC61937_WMAPRO = 0x12, ///< WMA 9 Professional data + IEC61937_MPEG2_AAC_LSF_2048 = 0x13, ///< MPEG-2 AAC ADTS half-rate low sampling frequency + IEC61937_MPEG2_AAC_LSF_4096 = 0x13 | 0x20, ///< MPEG-2 AAC ADTS quarter-rate low sampling frequency + IEC61937_EAC3 = 0x15, ///< E-AC-3 data + IEC61937_TRUEHD = 0x16, ///< TrueHD data +}; + +static const uint16_t spdif_mpeg_pkt_offset[2][3] = { + //LAYER1 LAYER2 LAYER3 + { 3072, 9216, 4608 }, // MPEG-2 LSF + { 1536, 4608, 4608 }, // MPEG-1 +}; + +void ff_spdif_bswap_buf16(uint16_t *dst, const uint16_t *src, int w); +int ff_spdif_read_packet(AVFormatContext *s, AVPacket *pkt); +int ff_spdif_probe(const uint8_t *p_buf, int buf_size, enum AVCodecID *codec); + +#endif /* AVFORMAT_SPDIF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/srtp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/srtp.h new file mode 100644 index 00000000..3189f8f5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/srtp.h @@ -0,0 +1,52 @@ +/* + * SRTP encryption/decryption + * Copyright (c) 2012 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_SRTP_H +#define AVFORMAT_SRTP_H + +#include + +struct AVAES; +struct AVHMAC; + +struct SRTPContext { + struct AVAES *aes; + struct AVHMAC *hmac; + int rtp_hmac_size, rtcp_hmac_size; + uint8_t master_key[16]; + uint8_t master_salt[14]; + uint8_t rtp_key[16], rtcp_key[16]; + uint8_t rtp_salt[14], rtcp_salt[14]; + uint8_t rtp_auth[20], rtcp_auth[20]; + int seq_largest, seq_initialized; + uint32_t roc; + + uint32_t rtcp_index; +}; + +int ff_srtp_set_crypto(struct SRTPContext *s, const char *suite, + const char *params); +void ff_srtp_free(struct SRTPContext *s); +int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr); +int ff_srtp_encrypt(struct SRTPContext *s, const uint8_t *in, int len, + uint8_t *out, int outlen); + +#endif /* AVFORMAT_SRTP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/subtitles.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/subtitles.h new file mode 100644 index 00000000..6b418e36 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/subtitles.h @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2012 Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_SUBTITLES_H +#define AVFORMAT_SUBTITLES_H + +#include +#include +#include "avformat.h" +#include "libavutil/bprint.h" + +enum sub_sort { + SUB_SORT_TS_POS = 0, ///< sort by timestamps, then position + SUB_SORT_POS_TS, ///< sort by position, then timestamps +}; + +enum ff_utf_type { + FF_UTF_8, // or other 8 bit encodings + FF_UTF16LE, + FF_UTF16BE, +}; + +typedef struct { + int type; + AVIOContext *pb; + unsigned char buf[8]; + int buf_pos, buf_len; + AVIOContext buf_pb; +} FFTextReader; + +/** + * Initialize the FFTextReader from the given AVIOContext. This function will + * read some bytes from pb, and test for UTF-8 or UTF-16 BOMs. Further accesses + * to FFTextReader will read more data from pb. + * If s is not NULL, the user will be warned if a UTF-16 conversion takes place. + * + * The purpose of FFTextReader is to transparently convert read data to UTF-8 + * if the stream had a UTF-16 BOM. + * + * @param s Pointer to provide av_log context + * @param r object which will be initialized + * @param pb stream to read from (referenced as long as FFTextReader is in use) + */ +void ff_text_init_avio(void *s, FFTextReader *r, AVIOContext *pb); + +/** + * Similar to ff_text_init_avio(), but sets it up to read from a bounded buffer. + * + * @param r object which will be initialized + * @param buf buffer to read from (referenced as long as FFTextReader is in use) + * @param size size of buf + */ +void ff_text_init_buf(FFTextReader *r, void *buf, size_t size); + +/** + * Return the byte position of the next byte returned by ff_text_r8(). For + * UTF-16 source streams, this will return the original position, but it will + * be incorrect if a codepoint was only partially read with ff_text_r8(). + */ +int64_t ff_text_pos(FFTextReader *r); + +/** + * Return the next byte. The return value is always 0 - 255. Returns 0 on EOF. + * If the source stream is UTF-16, this reads from the stream converted to + * UTF-8. On invalid UTF-16, 0 is returned. + */ +int ff_text_r8(FFTextReader *r); + +/** + * Return non-zero if EOF was reached. + */ +int ff_text_eof(FFTextReader *r); + +/** + * Like ff_text_r8(), but don't remove the byte from the buffer. + */ +int ff_text_peek_r8(FFTextReader *r); + +/** + * Read the given number of bytes (in UTF-8). On error or EOF, \0 bytes are + * written. + */ +void ff_text_read(FFTextReader *r, char *buf, size_t size); + +typedef struct { + AVPacket *subs; ///< array of subtitles packets + int nb_subs; ///< number of subtitles packets + int allocated_size; ///< allocated size for subs + int current_sub_idx; ///< current position for the read packet callback + enum sub_sort sort; ///< sort method to use when finalizing subtitles + int keep_duplicates; ///< set to 1 to keep duplicated subtitle events +} FFDemuxSubtitlesQueue; + +/** + * Insert a new subtitle event. + * + * @param event the subtitle line, may not be zero terminated + * @param len the length of the event (in strlen() sense, so without '\0') + * @param merge set to 1 if the current event should be concatenated with the + * previous one instead of adding a new entry, 0 otherwise + */ +AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q, + const uint8_t *event, size_t len, int merge); + +/** + * Set missing durations, sort subtitles by PTS (and then byte position), and + * drop duplicated events. + */ +void ff_subtitles_queue_finalize(void *log_ctx, FFDemuxSubtitlesQueue *q); + +/** + * Generic read_packet() callback for subtitles demuxers using this queue + * system. + */ +int ff_subtitles_queue_read_packet(FFDemuxSubtitlesQueue *q, AVPacket *pkt); + +/** + * Update current_sub_idx to emulate a seek. Except the first parameter, it + * matches AVInputFormat->read_seek2 prototypes. + */ +int ff_subtitles_queue_seek(FFDemuxSubtitlesQueue *q, AVFormatContext *s, int stream_index, + int64_t min_ts, int64_t ts, int64_t max_ts, int flags); + +/** + * Remove and destroy all the subtitles packets. + */ +void ff_subtitles_queue_clean(FFDemuxSubtitlesQueue *q); + +/** + * SMIL helper to load next chunk ("<...>" or untagged content) in buf. + * + * @param c cached character, to avoid a backward seek + */ +int ff_smil_extract_next_text_chunk(FFTextReader *tr, AVBPrint *buf, char *c); + +/** + * SMIL helper to point on the value of an attribute in the given tag. + * + * @param s SMIL tag ("<...>") + * @param attr the attribute to look for + */ +const char *ff_smil_get_attr_ptr(const char *s, const char *attr); + +/** + * @brief Same as ff_subtitles_read_text_chunk(), but read from an AVIOContext. + */ +void ff_subtitles_read_chunk(AVIOContext *pb, AVBPrint *buf); + +/** + * @brief Read a subtitles chunk from FFTextReader. + * + * A chunk is defined by a multiline "event", ending with a second line break. + * The trailing line breaks are trimmed. CRLF are supported. + * Example: "foo\r\nbar\r\n\r\nnext" will print "foo\r\nbar" into buf, and pb + * will focus on the 'n' of the "next" string. + * + * @param tr I/O context + * @param buf an initialized buf where the chunk is written + * + * @note buf is cleared before writing into it. + */ +void ff_subtitles_read_text_chunk(FFTextReader *tr, AVBPrint *buf); + +/** + * Get the number of characters to increment to jump to the next line, or to + * the end of the string. + * The function handles the following line breaks schemes: + * LF, CRLF (MS), or standalone CR (old MacOS). + */ +static av_always_inline int ff_subtitles_next_line(const char *ptr) +{ + int n = strcspn(ptr, "\r\n"); + ptr += n; + while (*ptr == '\r') { + ptr++; + n++; + } + if (*ptr == '\n') + n++; + return n; +} + +/** + * Read a line of text. Discards line ending characters. + * The function handles the following line breaks schemes: + * LF, CRLF (MS), or standalone CR (old MacOS). + * + * Returns the number of bytes written to buf. Always writes a terminating 0, + * similar as with snprintf. + * + * @note returns a negative error code if a \0 byte is found + */ +ptrdiff_t ff_subtitles_read_line(FFTextReader *tr, char *buf, size_t size); + +#endif /* AVFORMAT_SUBTITLES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/swf.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/swf.h new file mode 100644 index 00000000..d0f0194c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/swf.h @@ -0,0 +1,147 @@ +/* + * Flash Compatible Streaming Format common header. + * Copyright (c) 2000 Fabrice Bellard + * Copyright (c) 2003 Tinic Uro + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_SWF_H +#define AVFORMAT_SWF_H + +#include "config.h" + +#if CONFIG_ZLIB +#include +#endif + +#include "libavutil/fifo.h" +#include "avformat.h" +#include "avio.h" +#include "internal.h" + +/* should have a generic way to indicate probable size */ +#define DUMMY_FILE_SIZE (100 * 1024 * 1024) +#define DUMMY_DURATION 600 /* in seconds */ + +enum { + TAG_END = 0, + TAG_SHOWFRAME = 1, + TAG_DEFINESHAPE = 2, + TAG_FREECHARACTER = 3, + TAG_PLACEOBJECT = 4, + TAG_REMOVEOBJECT = 5, + TAG_DEFINEBITS = 6, + TAG_DEFINEBUTTON = 7, + TAG_JPEGTABLES = 8, + TAG_SETBACKGROUNDCOLOR = 9, + TAG_DEFINEFONT = 10, + TAG_DEFINETEXT = 11, + TAG_DOACTION = 12, + TAG_DEFINEFONTINFO = 13, + TAG_DEFINESOUND = 14, + TAG_STARTSOUND = 15, + TAG_DEFINEBUTTONSOUND = 17, + TAG_STREAMHEAD = 18, + TAG_STREAMBLOCK = 19, + TAG_DEFINEBITSLOSSLESS = 20, + TAG_JPEG2 = 21, + TAG_DEFINESHAPE2 = 22, + TAG_DEFINEBUTTONCXFORM = 23, + TAG_PROTECT = 24, + TAG_PLACEOBJECT2 = 26, + TAG_REMOVEOBJECT2 = 28, + TAG_DEFINESHAPE3 = 32, + TAG_DEFINETEXT2 = 33, + TAG_DEFINEBUTTON2 = 34, + TAG_DEFINEBITSJPEG3 = 35, + TAG_DEFINEBITSLOSSLESS2 = 36, + TAG_DEFINEEDITTEXT = 37, + TAG_DEFINESPRITE = 39, + TAG_FRAMELABEL = 43, + TAG_STREAMHEAD2 = 45, + TAG_DEFINEMORPHSHAPE = 46, + TAG_DEFINEFONT2 = 48, + TAG_EXPORTASSETS = 56, + TAG_IMPORTASSETS = 57, + TAG_ENABLEDEBUGGER = 58, + TAG_DOINITACTION = 59, + TAG_VIDEOSTREAM = 60, + TAG_VIDEOFRAME = 61, + TAG_DEFINEFONTINFO2 = 62, + TAG_ENABLEDEBUGGER2 = 64, + TAG_SCRIPTLIMITS = 65, + TAG_SETTABINDEX = 66, + TAG_FILEATTRIBUTES = 69, + TAG_PLACEOBJECT3 = 70, + TAG_IMPORTASSETS2 = 71, + TAG_DEFINEFONTALIGNZONES = 73, + TAG_CSMTEXTSETTINGS = 74, + TAG_DEFINEFONT3 = 75, + TAG_SYMBOLCLASS = 76, + TAG_METADATA = 77, + TAG_DEFINESCALINGGRID = 78, + TAG_DOABC = 82, + TAG_DEFINESHAPE4 = 83, + TAG_DEFINEMORPHSHAPE2 = 84, + TAG_DEFINESCENEANDFRAMELABELDATA = 86, + TAG_DEFINEBINARYDATA = 87, + TAG_DEFINEFONTNAME = 88, + TAG_STARTSOUND2 = 89, + TAG_DEFINEBITSJPEG4 = 90, + TAG_DEFINEFONT4 = 91, +}; + +#define TAG_LONG 0x100 + +/* flags for shape definition */ +#define FLAG_MOVETO 0x01 +#define FLAG_SETFILL0 0x02 +#define FLAG_SETFILL1 0x04 + +#define AUDIO_FIFO_SIZE 65536 + +/* character id used */ +#define BITMAP_ID 0 +#define VIDEO_ID 0 +#define SHAPE_ID 1 + +typedef struct SWFContext { + int64_t duration_pos; + int64_t tag_pos; + int64_t vframes_pos; + int samples_per_frame; + int sound_samples; + int swf_frame_number; + int video_frame_number; + int frame_rate; + int tag; + AVFifoBuffer *audio_fifo; + AVCodecParameters *audio_par, *video_par; + AVStream *video_st; +#if CONFIG_ZLIB +#define ZBUF_SIZE 4096 + AVIOContext *zpb; + uint8_t *zbuf_in; + uint8_t *zbuf_out; + z_stream zstream; +#endif +} SWFContext; + +extern const AVCodecTag ff_swf_codec_tags[]; + +#endif /* AVFORMAT_SWF_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tee_common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tee_common.h new file mode 100644 index 00000000..dcd7f63e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tee_common.h @@ -0,0 +1,30 @@ +/* + * Tee common code + * Copyright (c) 2016 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software * Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_TEE_COMMON_H +#define AVFORMAT_TEE_COMMON_H + +#include "libavutil/dict.h" + +int ff_tee_parse_slave_options(void *log, char *slave, + AVDictionary **options, char **filename); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tls.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tls.h new file mode 100644 index 00000000..beb19d6d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/tls.h @@ -0,0 +1,62 @@ +/* + * TLS/SSL Protocol + * Copyright (c) 2011 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_TLS_H +#define AVFORMAT_TLS_H + +#include "libavutil/opt.h" + +#include "url.h" + +typedef struct TLSShared { + char *ca_file; + int verify; + char *cert_file; + char *key_file; + int listen; + + char *host; + + char underlying_host[200]; + int numerichost; + + URLContext *tcp; +} TLSShared; + +#define TLS_OPTFL (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM) +#define TLS_COMMON_OPTIONS(pstruct, options_field) \ + {"ca_file", "Certificate Authority database file", offsetof(pstruct, options_field . ca_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ + {"cafile", "Certificate Authority database file", offsetof(pstruct, options_field . ca_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ + {"tls_verify", "Verify the peer certificate", offsetof(pstruct, options_field . verify), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \ + {"cert_file", "Certificate file", offsetof(pstruct, options_field . cert_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ + {"key_file", "Private key file", offsetof(pstruct, options_field . key_file), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL }, \ + {"listen", "Listen for incoming connections", offsetof(pstruct, options_field . listen), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, .flags = TLS_OPTFL }, \ + {"verifyhost", "Verify against a specific hostname", offsetof(pstruct, options_field . host), AV_OPT_TYPE_STRING, .flags = TLS_OPTFL } + +int ff_tls_open_underlying(TLSShared *c, URLContext *parent, const char *uri, AVDictionary **options); + +void ff_gnutls_init(void); +void ff_gnutls_deinit(void); + +int ff_openssl_init(void); +void ff_openssl_deinit(void); + +#endif /* AVFORMAT_TLS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/url.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/url.h new file mode 100644 index 00000000..728a861b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/url.h @@ -0,0 +1,384 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * unbuffered private I/O API + */ + +#ifndef AVFORMAT_URL_H +#define AVFORMAT_URL_H + +#include "avio.h" +#include "libavformat/version.h" + +#include "libavutil/dict.h" +#include "libavutil/log.h" + +#define URL_PROTOCOL_FLAG_NESTED_SCHEME 1 /*< The protocol name can be the first part of a nested protocol scheme */ +#define URL_PROTOCOL_FLAG_NETWORK 2 /*< The protocol uses network */ + +extern const AVClass ffurl_context_class; + +typedef struct URLContext { + const AVClass *av_class; /**< information for av_log(). Set by url_open(). */ + const struct URLProtocol *prot; + void *priv_data; + char *filename; /**< specified URL */ + int flags; + int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */ + int is_streamed; /**< true if streamed (no seek possible), default = false */ + int is_connected; + AVIOInterruptCB interrupt_callback; + int64_t rw_timeout; /**< maximum time to wait for (network) read/write operation completion, in mcs */ + const char *protocol_whitelist; + const char *protocol_blacklist; + int min_packet_size; /**< if non zero, the stream is packetized with this min packet size */ +} URLContext; + +typedef struct URLProtocol { + const char *name; + int (*url_open)( URLContext *h, const char *url, int flags); + /** + * This callback is to be used by protocols which open further nested + * protocols. options are then to be passed to ffurl_open()/ffurl_connect() + * for those nested protocols. + */ + int (*url_open2)(URLContext *h, const char *url, int flags, AVDictionary **options); + int (*url_accept)(URLContext *s, URLContext **c); + int (*url_handshake)(URLContext *c); + + /** + * Read data from the protocol. + * If data is immediately available (even less than size), EOF is + * reached or an error occurs (including EINTR), return immediately. + * Otherwise: + * In non-blocking mode, return AVERROR(EAGAIN) immediately. + * In blocking mode, wait for data/EOF/error with a short timeout (0.1s), + * and return AVERROR(EAGAIN) on timeout. + * Checking interrupt_callback, looping on EINTR and EAGAIN and until + * enough data has been read is left to the calling function; see + * retry_transfer_wrapper in avio.c. + */ + int (*url_read)( URLContext *h, unsigned char *buf, int size); + int (*url_write)(URLContext *h, const unsigned char *buf, int size); + int64_t (*url_seek)( URLContext *h, int64_t pos, int whence); + int (*url_close)(URLContext *h); + int (*url_read_pause)(URLContext *h, int pause); + int64_t (*url_read_seek)(URLContext *h, int stream_index, + int64_t timestamp, int flags); + int (*url_get_file_handle)(URLContext *h); + int (*url_get_multi_file_handle)(URLContext *h, int **handles, + int *numhandles); + int (*url_get_short_seek)(URLContext *h); + int (*url_shutdown)(URLContext *h, int flags); + int priv_data_size; + const AVClass *priv_data_class; + int flags; + int (*url_check)(URLContext *h, int mask); + int (*url_open_dir)(URLContext *h); + int (*url_read_dir)(URLContext *h, AVIODirEntry **next); + int (*url_close_dir)(URLContext *h); + int (*url_delete)(URLContext *h); + int (*url_move)(URLContext *h_src, URLContext *h_dst); + const char *default_whitelist; +} URLProtocol; + +/** + * Create a URLContext for accessing to the resource indicated by + * url, but do not initiate the connection yet. + * + * @param puc pointer to the location where, in case of success, the + * function puts the pointer to the created URLContext + * @param flags flags which control how the resource indicated by url + * is to be opened + * @param int_cb interrupt callback to use for the URLContext, may be + * NULL + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ffurl_alloc(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb); + +/** + * Connect an URLContext that has been allocated by ffurl_alloc + * + * @param options A dictionary filled with options for nested protocols, + * i.e. it will be passed to url_open2() for protocols implementing it. + * This parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. + */ +int ffurl_connect(URLContext *uc, AVDictionary **options); + +/** + * Create an URLContext for accessing to the resource indicated by + * url, and open it. + * + * @param puc pointer to the location where, in case of success, the + * function puts the pointer to the created URLContext + * @param flags flags which control how the resource indicated by url + * is to be opened + * @param int_cb interrupt callback to use for the URLContext, may be + * NULL + * @param options A dictionary filled with protocol-private options. On return + * this parameter will be destroyed and replaced with a dict containing options + * that were not found. May be NULL. + * @param parent An enclosing URLContext, whose generic options should + * be applied to this URLContext as well. + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code in case of failure + */ +int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options, + const char *whitelist, const char* blacklist, + URLContext *parent); + +int ffurl_open(URLContext **puc, const char *filename, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); + +/** + * Accept an URLContext c on an URLContext s + * + * @param s server context + * @param c client context, must be unallocated. + * @return >= 0 on success, ff_neterrno() on failure. + */ +int ffurl_accept(URLContext *s, URLContext **c); + +/** + * Perform one step of the protocol handshake to accept a new client. + * See avio_handshake() for details. + * Implementations should try to return decreasing values. + * If the protocol uses an underlying protocol, the underlying handshake is + * usually the first step, and the return value can be: + * (largest value for this protocol) + (return value from other protocol) + * + * @param c the client context + * @return >= 0 on success or a negative value corresponding + * to an AVERROR code on failure + */ +int ffurl_handshake(URLContext *c); + +/** + * Read up to size bytes from the resource accessed by h, and store + * the read bytes in buf. + * + * @return The number of bytes actually read, or a negative value + * corresponding to an AVERROR code in case of error. A value of zero + * indicates that it is not possible to read more from the accessed + * resource (except if the value of the size argument is also zero). + */ +int ffurl_read(URLContext *h, unsigned char *buf, int size); + +/** + * Read as many bytes as possible (up to size), calling the + * read function multiple times if necessary. + * This makes special short-read handling in applications + * unnecessary, if the return value is < size then it is + * certain there was either an error or the end of file was reached. + */ +int ffurl_read_complete(URLContext *h, unsigned char *buf, int size); + +/** + * Write size bytes from buf to the resource accessed by h. + * + * @return the number of bytes actually written, or a negative value + * corresponding to an AVERROR code in case of failure + */ +int ffurl_write(URLContext *h, const unsigned char *buf, int size); + +/** + * Change the position that will be used by the next read/write + * operation on the resource accessed by h. + * + * @param pos specifies the new position to set + * @param whence specifies how pos should be interpreted, it must be + * one of SEEK_SET (seek from the beginning), SEEK_CUR (seek from the + * current position), SEEK_END (seek from the end), or AVSEEK_SIZE + * (return the filesize of the requested resource, pos is ignored). + * @return a negative value corresponding to an AVERROR code in case + * of failure, or the resulting file position, measured in bytes from + * the beginning of the file. You can use this feature together with + * SEEK_CUR to read the current file position. + */ +int64_t ffurl_seek(URLContext *h, int64_t pos, int whence); + +/** + * Close the resource accessed by the URLContext h, and free the + * memory used by it. Also set the URLContext pointer to NULL. + * + * @return a negative value if an error condition occurred, 0 + * otherwise + */ +int ffurl_closep(URLContext **h); +int ffurl_close(URLContext *h); + +/** + * Return the filesize of the resource accessed by h, AVERROR(ENOSYS) + * if the operation is not supported by h, or another negative value + * corresponding to an AVERROR error code in case of failure. + */ +int64_t ffurl_size(URLContext *h); + +/** + * Return the file descriptor associated with this URL. For RTP, this + * will return only the RTP file descriptor, not the RTCP file descriptor. + * + * @return the file descriptor associated with this URL, or <0 on error. + */ +int ffurl_get_file_handle(URLContext *h); + +/** + * Return the file descriptors associated with this URL. + * + * @return 0 on success or <0 on error. + */ +int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles); + +/** + * Return the current short seek threshold value for this URL. + * + * @return threshold (>0) on success or <=0 on error. + */ +int ffurl_get_short_seek(URLContext *h); + +/** + * Signal the URLContext that we are done reading or writing the stream. + * + * @param h pointer to the resource + * @param flags flags which control how the resource indicated by url + * is to be shutdown + * + * @return a negative value if an error condition occurred, 0 + * otherwise + */ +int ffurl_shutdown(URLContext *h, int flags); + +/** + * Check if the user has requested to interrupt a blocking function + * associated with cb. + */ +int ff_check_interrupt(AVIOInterruptCB *cb); + +/* udp.c */ +int ff_udp_set_remote_url(URLContext *h, const char *uri); +int ff_udp_get_local_port(URLContext *h); + +/** + * Assemble a URL string from components. This is the reverse operation + * of av_url_split. + * + * Note, this requires networking to be initialized, so the caller must + * ensure ff_network_init has been called. + * + * @see av_url_split + * + * @param str the buffer to fill with the url + * @param size the size of the str buffer + * @param proto the protocol identifier, if null, the separator + * after the identifier is left out, too + * @param authorization an optional authorization string, may be null. + * An empty string is treated the same as a null string. + * @param hostname the host name string + * @param port the port number, left out from the string if negative + * @param fmt a generic format string for everything to add after the + * host/port, may be null + * @return the number of characters written to the destination buffer + */ +int ff_url_join(char *str, int size, const char *proto, + const char *authorization, const char *hostname, + int port, const char *fmt, ...) av_printf_format(7, 8); + +/** + * Convert a relative url into an absolute url, given a base url. + * + * @param buf the buffer where output absolute url is written + * @param size the size of buf + * @param base the base url, may be equal to buf. + * @param rel the new url, which is interpreted relative to base + */ +int ff_make_absolute_url(char *buf, int size, const char *base, + const char *rel); + +/** + * Allocate directory entry with default values. + * + * @return entry or NULL on error + */ +AVIODirEntry *ff_alloc_dir_entry(void); + +const AVClass *ff_urlcontext_child_class_next(const AVClass *prev); + +/** + * Construct a list of protocols matching a given whitelist and/or blacklist. + * + * @param whitelist a comma-separated list of allowed protocol names or NULL. If + * this is a non-empty string, only protocols in this list will + * be included. + * @param blacklist a comma-separated list of forbidden protocol names or NULL. + * If this is a non-empty string, all protocols in this list + * will be excluded. + * + * @return a NULL-terminated array of matching protocols. The array must be + * freed by the caller. + */ +const URLProtocol **ffurl_get_protocols(const char *whitelist, + const char *blacklist); + +typedef struct URLComponents { + const char *url; /**< whole URL, for reference */ + const char *scheme; /**< possibly including lavf-specific options */ + const char *authority; /**< "//" if it is a real URL */ + const char *userinfo; /**< including final '@' if present */ + const char *host; + const char *port; /**< including initial ':' if present */ + const char *path; + const char *query; /**< including initial '?' if present */ + const char *fragment; /**< including initial '#' if present */ + const char *end; +} URLComponents; + +#define url_component_end_scheme authority +#define url_component_end_authority userinfo +#define url_component_end_userinfo host +#define url_component_end_host port +#define url_component_end_port path +#define url_component_end_path query +#define url_component_end_query fragment +#define url_component_end_fragment end +#define url_component_end_authority_full path + +#define URL_COMPONENT_HAVE(uc, component) \ + ((uc).url_component_end_##component > (uc).component) + +/** + * Parse an URL to find the components. + * + * Each component runs until the start of the next component, + * possibly including a mandatory delimiter. + * + * @param uc structure to fill with pointers to the components. + * @param url URL to parse. + * @param end end of the URL, or NULL to parse to the end of string. + * + * @return >= 0 for success or an AVERROR code, especially if the URL is + * malformed. + */ +int ff_url_decompose(URLComponents *uc, const char *url, const char *end); + +#endif /* AVFORMAT_URL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/urldecode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/urldecode.h new file mode 100644 index 00000000..80b11c34 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/urldecode.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_URLDECODE_H +#define AVFORMAT_URLDECODE_H + +/** + * Decodes an URL from its percent-encoded form back into normal + * representation. This function returns the decoded URL in a string. + * The URL to be decoded does not necessarily have to be encoded but + * in that case the original string is duplicated. + * + * @param url a string to be decoded. + * @param decode_plus_sign if nonzero plus sign is decoded to space + * @return new string with the URL decoded or NULL if decoding failed. + * Note that the returned string should be explicitly freed when not + * used anymore. + */ +char *ff_urldecode(const char *url, int decode_plus_sign); + +#endif /* AVFORMAT_URLDECODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/version.h new file mode 100644 index 00000000..13c8a615 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/version.h @@ -0,0 +1,114 @@ +/* + * Version macros. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_VERSION_H +#define AVFORMAT_VERSION_H + +/** + * @file + * @ingroup libavf + * Libavformat version macros + */ + +#include "libavutil/version.h" + +// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) +// Also please add any ticket numbers that you believe might be affected here +#define LIBAVFORMAT_VERSION_MAJOR 58 +#define LIBAVFORMAT_VERSION_MINOR 45 +#define LIBAVFORMAT_VERSION_MICRO 100 + +#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ + LIBAVFORMAT_VERSION_MINOR, \ + LIBAVFORMAT_VERSION_MICRO) +#define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \ + LIBAVFORMAT_VERSION_MINOR, \ + LIBAVFORMAT_VERSION_MICRO) +#define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT + +#define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + * + * @note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + * + */ +#ifndef FF_API_COMPUTE_PKT_FIELDS2 +#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_OPEN_CALLBACKS +#define FF_API_OLD_OPEN_CALLBACKS (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_LAVF_AVCTX +#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_HTTP_USER_AGENT +#define FF_API_HTTP_USER_AGENT (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_HLS_WRAP +#define FF_API_HLS_WRAP (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_HLS_USE_LOCALTIME +#define FF_API_HLS_USE_LOCALTIME (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_LAVF_KEEPSIDE_FLAG +#define FF_API_LAVF_KEEPSIDE_FLAG (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_ROTATE_API +#define FF_API_OLD_ROTATE_API (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_FORMAT_GET_SET +#define FF_API_FORMAT_GET_SET (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_AVIO_EOF_0 +#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_LAVF_FFSERVER +#define FF_API_LAVF_FFSERVER (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_FORMAT_FILENAME +#define FF_API_FORMAT_FILENAME (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_OLD_RTSP_OPTIONS +#define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_NEXT +#define FF_API_NEXT (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_DASH_MIN_SEG_DURATION +#define FF_API_DASH_MIN_SEG_DURATION (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_LAVF_MP4A_LATM +#define FF_API_LAVF_MP4A_LATM (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif +#ifndef FF_API_AVIOFORMAT +#define FF_API_AVIOFORMAT (LIBAVFORMAT_VERSION_MAJOR < 59) +#endif + + +#ifndef FF_API_R_FRAME_RATE +#define FF_API_R_FRAME_RATE 1 +#endif +#endif /* AVFORMAT_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/voc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/voc.h new file mode 100644 index 00000000..1f9a8be0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/voc.h @@ -0,0 +1,52 @@ +/* + * Creative Voice File demuxer. + * Copyright (c) 2006 Aurelien Jacobs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_VOC_H +#define AVFORMAT_VOC_H + +#include "avformat.h" +#include "internal.h" + +typedef struct voc_dec_context { + int64_t remaining_size; + int64_t pts; +} VocDecContext; + +typedef enum voc_type { + VOC_TYPE_EOF = 0x00, + VOC_TYPE_VOICE_DATA = 0x01, + VOC_TYPE_VOICE_DATA_CONT = 0x02, + VOC_TYPE_SILENCE = 0x03, + VOC_TYPE_MARKER = 0x04, + VOC_TYPE_ASCII = 0x05, + VOC_TYPE_REPETITION_START = 0x06, + VOC_TYPE_REPETITION_END = 0x07, + VOC_TYPE_EXTENDED = 0x08, + VOC_TYPE_NEW_VOICE_DATA = 0x09, +} VocType; + +extern const unsigned char ff_voc_magic[21]; +extern const AVCodecTag ff_voc_codec_tags[]; + +int ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, + AVStream *st, int max_size); + +#endif /* AVFORMAT_VOC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vorbiscomment.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vorbiscomment.h new file mode 100644 index 00000000..7cacd0b2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vorbiscomment.h @@ -0,0 +1,57 @@ +/* + * VorbisComment writer + * Copyright (c) 2009 James Darnley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_VORBISCOMMENT_H +#define AVFORMAT_VORBISCOMMENT_H + +#include "avformat.h" +#include "metadata.h" + +/** + * Calculate the length in bytes of a VorbisComment. This is the minimum + * size required by ff_vorbiscomment_write(). + * + * @param m The metadata structure to be parsed. For no metadata, set to NULL. + * @param vendor_string The vendor string to be added into the VorbisComment. + * For no string, set to an empty string. + * @return The length in bytes. + */ +int64_t ff_vorbiscomment_length(const AVDictionary *m, const char *vendor_string, + AVChapter **chapters, unsigned int nb_chapters); + +/** + * Write a VorbisComment into an AVIOContext. The output size can be obtained + * in advance by passing the same chapters, AVDictionary and vendor_string to + * ff_vorbiscomment_length() + * + * @param pb The AVIOContext to write the output. + * @param m The metadata struct to write. + * @param vendor_string The vendor string to write. + * @param chapters The chapters to write. + * @param nb_chapters The number of chapters to write. + */ +int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m, + const char *vendor_string, + AVChapter **chapters, unsigned int nb_chapters); + +extern const AVMetadataConv ff_vorbiscomment_metadata_conv[]; + +#endif /* AVFORMAT_VORBISCOMMENT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vpcc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vpcc.h new file mode 100644 index 00000000..e87bec55 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/vpcc.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2016 Google Inc. + * Copyright (c) 2016 KongQun Yang (kqyang@google.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal header for VPx codec configuration utilities. + */ + +#ifndef AVFORMAT_VPCC_H +#define AVFORMAT_VPCC_H + +#include +#include "avio.h" +#include "avformat.h" +#include "libavcodec/avcodec.h" + +typedef struct VPCC { + int profile; + int level; + int bitdepth; + int chroma_subsampling; + int full_range_flag; +} VPCC; + +/** + * Writes VP codec configuration to the provided AVIOContext. + * + * @param s address of the AVFormatContext for the logging context. + * @param pb address of the AVIOContext where the vpcC shall be written. + * @param par address of the AVCodecParameters which contains codec information. + * @return >=0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + */ +int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, + AVCodecParameters *par); + +int ff_isom_get_vpcc_features(AVFormatContext *s, AVCodecParameters *par, + AVRational *frame_rate, VPCC *vpcc); + +#endif /* AVFORMAT_VPCC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/w64.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/w64.h new file mode 100644 index 00000000..0ec3fa91 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/w64.h @@ -0,0 +1,31 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_W64_H +#define AVFORMAT_W64_H + +#include + +extern const uint8_t ff_w64_guid_riff[16]; +extern const uint8_t ff_w64_guid_wave[16]; +extern const uint8_t ff_w64_guid_fmt [16]; +extern const uint8_t ff_w64_guid_fact[16]; +extern const uint8_t ff_w64_guid_data[16]; +extern const uint8_t ff_w64_guid_summarylist[16]; + +#endif /* AVFORMAT_W64_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wtv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wtv.h new file mode 100644 index 00000000..f26ad5ef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wtv.h @@ -0,0 +1,60 @@ +/* + * Windows Television (WTV) + * Copyright (c) 2010-2011 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_WTV_H +#define AVFORMAT_WTV_H + +#include "riff.h" +#include "asf.h" + +#define WTV_SECTOR_BITS 12 +#define WTV_SECTOR_SIZE (1 << WTV_SECTOR_BITS) +#define WTV_BIGSECTOR_BITS 18 +#define WTV_PAD8(x) (((x) + 7) & ~7) + +extern const uint8_t ff_timeline_le16[16]; +extern const uint8_t ff_timeline_table_0_entries_Events_le16[62]; +extern const uint8_t ff_table_0_entries_legacy_attrib_le16[58]; +extern const uint8_t ff_table_0_entries_time_le16[40]; + +extern const ff_asf_guid ff_dir_entry_guid; +extern const ff_asf_guid ff_wtv_guid; +extern const ff_asf_guid ff_timestamp_guid; +extern const ff_asf_guid ff_data_guid; +extern const ff_asf_guid ff_SBE2_STREAM_DESC_EVENT; +extern const ff_asf_guid ff_stream1_guid; +extern const ff_asf_guid ff_sync_guid; +extern const ff_asf_guid ff_index_guid; +extern const ff_asf_guid ff_mediatype_audio; +extern const ff_asf_guid ff_mediatype_video; +extern const ff_asf_guid ff_format_none; +extern const AVCodecGuid ff_video_guids[]; + +extern const ff_asf_guid ff_DSATTRIB_TRANSPORT_PROPERTIES; +extern const ff_asf_guid ff_metadata_guid; +extern const ff_asf_guid ff_stream2_guid; +extern const ff_asf_guid ff_mediasubtype_cpfilters_processed; +extern const ff_asf_guid ff_format_cpfilters_processed; +extern const ff_asf_guid ff_format_waveformatex; +extern const ff_asf_guid ff_format_mpeg2_video; +extern const ff_asf_guid ff_format_videoinfo2; + +#endif /* AVFORMAT_WTV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wv.h new file mode 100644 index 00000000..07d2e1bc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/wv.h @@ -0,0 +1,56 @@ +/* + * WavPack shared functions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_WV_H +#define AVFORMAT_WV_H + +#include + +#define WV_HEADER_SIZE 32 + +#define WV_FLAG_INITIAL_BLOCK (1 << 11) +#define WV_FLAG_FINAL_BLOCK (1 << 12) + +// specs say that maximum block size is 1Mb +#define WV_BLOCK_LIMIT 1048576 + +typedef struct WvHeader { + uint32_t blocksize; //< size of the block data (excluding the header) + uint16_t version; //< bitstream version + uint32_t total_samples; //< total number of samples in the stream + uint32_t block_idx; //< index of the first sample in this block + uint32_t samples; //< number of samples in this block + uint32_t flags; + uint32_t crc; + + int initial, final; +} WvHeader; + +/** + * Parse a WavPack block header. + * + * @param wv this struct will be filled with parse header information + * @param data header data, must be WV_HEADER_SIZE bytes long + * + * @return 0 on success, a negative AVERROR code on failure + */ +int ff_wv_parse_header(WvHeader *wv, const uint8_t *data); + +#endif /* AVFORMAT_WV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/yuv4mpeg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/yuv4mpeg.h new file mode 100644 index 00000000..eba7337f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavformat/yuv4mpeg.h @@ -0,0 +1,28 @@ +/* + * YUV4MPEG common definitions + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVFORMAT_YUV4MPEG_H +#define AVFORMAT_YUV4MPEG_H + +#define Y4M_MAGIC "YUV4MPEG2" +#define Y4M_FRAME_MAGIC "FRAME" +#define Y4M_FRAME_MAGIC_LEN 6 + +#endif /* AVFORMAT_YUV4MPEG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/aarch64/asm-offsets.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/aarch64/asm-offsets.h new file mode 100644 index 00000000..0b582446 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/aarch64/asm-offsets.h @@ -0,0 +1,28 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_AARCH64_ASM_OFFSETS_H +#define AVRESAMPLE_AARCH64_ASM_OFFSETS_H + +/* struct ResampleContext */ +#define FILTER_BANK 0x10 +#define FILTER_LENGTH 0x18 +#define PHASE_SHIFT 0x34 +#define PHASE_MASK (PHASE_SHIFT + 0x04) // loaded as pair + +#endif /* AVRESAMPLE_AARCH64_ASM_OFFSETS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/arm/asm-offsets.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/arm/asm-offsets.h new file mode 100644 index 00000000..4d3d116d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/arm/asm-offsets.h @@ -0,0 +1,29 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_ARM_ASM_OFFSETS_H +#define AVRESAMPLE_ARM_ASM_OFFSETS_H + +/* struct ResampleContext */ +#define FILTER_BANK 0x08 +#define FILTER_LENGTH 0x0c +#define SRC_INCR 0x20 +#define PHASE_SHIFT 0x28 +#define PHASE_MASK (PHASE_SHIFT + 0x04) + +#endif /* AVRESAMPLE_ARM_ASM_OFFSETS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_convert.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_convert.h new file mode 100644 index 00000000..df15442c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_convert.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_AUDIO_CONVERT_H +#define AVRESAMPLE_AUDIO_CONVERT_H + +#include "libavutil/samplefmt.h" +#include "avresample.h" +#include "internal.h" +#include "audio_data.h" + +/** + * Set conversion function if the parameters match. + * + * This compares the parameters of the conversion function to the parameters + * in the AudioConvert context. If the parameters do not match, no changes are + * made to the active functions. If the parameters do match and the alignment + * is not constrained, the function is set as the generic conversion function. + * If the parameters match and the alignment is constrained, the function is + * set as the optimized conversion function. + * + * @param ac AudioConvert context + * @param out_fmt output sample format + * @param in_fmt input sample format + * @param channels number of channels, or 0 for any number of channels + * @param ptr_align buffer pointer alignment, in bytes + * @param samples_align buffer size alignment, in samples + * @param descr function type description (e.g. "C" or "SSE") + * @param conv conversion function pointer + */ +void ff_audio_convert_set_func(AudioConvert *ac, enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, int channels, + int ptr_align, int samples_align, + const char *descr, void *conv); + +/** + * Allocate and initialize AudioConvert context for sample format conversion. + * + * @param avr AVAudioResampleContext + * @param out_fmt output sample format + * @param in_fmt input sample format + * @param channels number of channels + * @param sample_rate sample rate (used for dithering) + * @param apply_map apply channel map during conversion + * @return newly-allocated AudioConvert context + */ +AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, + enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels, int sample_rate, + int apply_map); + +/** + * Free AudioConvert. + * + * The AudioConvert must have been previously allocated with ff_audio_convert_alloc(). + * + * @param ac AudioConvert struct + */ +void ff_audio_convert_free(AudioConvert **ac); + +/** + * Convert audio data from one sample format to another. + * + * For each call, the alignment of the input and output AudioData buffers are + * examined to determine whether to use the generic or optimized conversion + * function (when available). + * + * The number of samples to convert is determined by in->nb_samples. The output + * buffer must be large enough to handle this many samples. out->nb_samples is + * set by this function before a successful return. + * + * @param ac AudioConvert context + * @param out output audio data + * @param in input audio data + * @return 0 on success, negative AVERROR code on failure + */ +int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in); + +/* arch-specific initialization functions */ + +void ff_audio_convert_init_aarch64(AudioConvert *ac); +void ff_audio_convert_init_arm(AudioConvert *ac); +void ff_audio_convert_init_x86(AudioConvert *ac); + +#endif /* AVRESAMPLE_AUDIO_CONVERT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_data.h new file mode 100644 index 00000000..1280307a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_data.h @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_AUDIO_DATA_H +#define AVRESAMPLE_AUDIO_DATA_H + +#include + +#include "libavutil/audio_fifo.h" +#include "libavutil/log.h" +#include "libavutil/samplefmt.h" +#include "avresample.h" +#include "internal.h" + +int ff_sample_fmt_is_planar(enum AVSampleFormat sample_fmt, int channels); + +/** + * Audio buffer used for intermediate storage between conversion phases. + */ +struct AudioData { + const AVClass *class; /**< AVClass for logging */ + uint8_t *data[AVRESAMPLE_MAX_CHANNELS]; /**< data plane pointers */ + uint8_t *buffer; /**< data buffer */ + unsigned int buffer_size; /**< allocated buffer size */ + int allocated_samples; /**< number of samples the buffer can hold */ + int nb_samples; /**< current number of samples */ + enum AVSampleFormat sample_fmt; /**< sample format */ + int channels; /**< channel count */ + int allocated_channels; /**< allocated channel count */ + int is_planar; /**< sample format is planar */ + int planes; /**< number of data planes */ + int sample_size; /**< bytes per sample */ + int stride; /**< sample byte offset within a plane */ + int read_only; /**< data is read-only */ + int allow_realloc; /**< realloc is allowed */ + int ptr_align; /**< minimum data pointer alignment */ + int samples_align; /**< allocated samples alignment */ + const char *name; /**< name for debug logging */ +}; + +int ff_audio_data_set_channels(AudioData *a, int channels); + +/** + * Initialize AudioData using a given source. + * + * This does not allocate an internal buffer. It only sets the data pointers + * and audio parameters. + * + * @param a AudioData struct + * @param src source data pointers + * @param plane_size plane size, in bytes. + * This can be 0 if unknown, but that will lead to + * optimized functions not being used in many cases, + * which could slow down some conversions. + * @param channels channel count + * @param nb_samples number of samples in the source data + * @param sample_fmt sample format + * @param read_only indicates if buffer is read only or read/write + * @param name name for debug logging (can be NULL) + * @return 0 on success, negative AVERROR value on error + */ +int ff_audio_data_init(AudioData *a, uint8_t * const *src, int plane_size, + int channels, int nb_samples, + enum AVSampleFormat sample_fmt, int read_only, + const char *name); + +/** + * Allocate AudioData. + * + * This allocates an internal buffer and sets audio parameters. + * + * @param channels channel count + * @param nb_samples number of samples to allocate space for + * @param sample_fmt sample format + * @param name name for debug logging (can be NULL) + * @return newly allocated AudioData struct, or NULL on error + */ +AudioData *ff_audio_data_alloc(int channels, int nb_samples, + enum AVSampleFormat sample_fmt, + const char *name); + +/** + * Reallocate AudioData. + * + * The AudioData must have been previously allocated with ff_audio_data_alloc(). + * + * @param a AudioData struct + * @param nb_samples number of samples to allocate space for + * @return 0 on success, negative AVERROR value on error + */ +int ff_audio_data_realloc(AudioData *a, int nb_samples); + +/** + * Free AudioData. + * + * The AudioData must have been previously allocated with ff_audio_data_alloc(). + * + * @param a AudioData struct + */ +void ff_audio_data_free(AudioData **a); + +/** + * Copy data from one AudioData to another. + * + * @param out output AudioData + * @param in input AudioData + * @param map channel map, NULL if not remapping + * @return 0 on success, negative AVERROR value on error + */ +int ff_audio_data_copy(AudioData *out, AudioData *in, ChannelMapInfo *map); + +/** + * Append data from one AudioData to the end of another. + * + * @param dst destination AudioData + * @param dst_offset offset, in samples, to start writing, relative to the + * start of dst + * @param src source AudioData + * @param src_offset offset, in samples, to start copying, relative to the + * start of the src + * @param nb_samples number of samples to copy + * @return 0 on success, negative AVERROR value on error + */ +int ff_audio_data_combine(AudioData *dst, int dst_offset, AudioData *src, + int src_offset, int nb_samples); + +/** + * Drain samples from the start of the AudioData. + * + * Remaining samples are shifted to the start of the AudioData. + * + * @param a AudioData struct + * @param nb_samples number of samples to drain + */ +void ff_audio_data_drain(AudioData *a, int nb_samples); + +/** + * Add samples in AudioData to an AVAudioFifo. + * + * @param af Audio FIFO Buffer + * @param a AudioData struct + * @param offset number of samples to skip from the start of the data + * @param nb_samples number of samples to add to the FIFO + * @return number of samples actually added to the FIFO, or + * negative AVERROR code on error + */ +int ff_audio_data_add_to_fifo(AVAudioFifo *af, AudioData *a, int offset, + int nb_samples); + +/** + * Read samples from an AVAudioFifo to AudioData. + * + * @param af Audio FIFO Buffer + * @param a AudioData struct + * @param nb_samples number of samples to read from the FIFO + * @return number of samples actually read from the FIFO, or + * negative AVERROR code on error + */ +int ff_audio_data_read_from_fifo(AVAudioFifo *af, AudioData *a, int nb_samples); + +#endif /* AVRESAMPLE_AUDIO_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_mix.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_mix.h new file mode 100644 index 00000000..0187d0f9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/audio_mix.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_AUDIO_MIX_H +#define AVRESAMPLE_AUDIO_MIX_H + +#include + +#include "libavutil/samplefmt.h" +#include "avresample.h" +#include "internal.h" +#include "audio_data.h" + +typedef void (mix_func)(uint8_t **src, void **matrix, int len, int out_ch, + int in_ch); + +/** + * Set mixing function if the parameters match. + * + * This compares the parameters of the mixing function to the parameters in the + * AudioMix context. If the parameters do not match, no changes are made to the + * active functions. If the parameters do match and the alignment is not + * constrained, the function is set as the generic mixing function. If the + * parameters match and the alignment is constrained, the function is set as + * the optimized mixing function. + * + * @param am AudioMix context + * @param fmt input/output sample format + * @param coeff_type mixing coefficient type + * @param in_channels number of input channels, or 0 for any number of channels + * @param out_channels number of output channels, or 0 for any number of channels + * @param ptr_align buffer pointer alignment, in bytes + * @param samples_align buffer size alignment, in samples + * @param descr function type description (e.g. "C" or "SSE") + * @param mix_func mixing function pointer + */ +void ff_audio_mix_set_func(AudioMix *am, enum AVSampleFormat fmt, + enum AVMixCoeffType coeff_type, int in_channels, + int out_channels, int ptr_align, int samples_align, + const char *descr, void *mix_func); + +/** + * Allocate and initialize an AudioMix context. + * + * The parameters in the AVAudioResampleContext are used to initialize the + * AudioMix context. + * + * @param avr AVAudioResampleContext + * @return newly-allocated AudioMix context. + */ +AudioMix *ff_audio_mix_alloc(AVAudioResampleContext *avr); + +/** + * Free an AudioMix context. + */ +void ff_audio_mix_free(AudioMix **am); + +/** + * Apply channel mixing to audio data using the current mixing matrix. + */ +int ff_audio_mix(AudioMix *am, AudioData *src); + +/** + * Get the current mixing matrix. + */ +int ff_audio_mix_get_matrix(AudioMix *am, double *matrix, int stride); + +/** + * Set the current mixing matrix. + */ +int ff_audio_mix_set_matrix(AudioMix *am, const double *matrix, int stride); + +/* arch-specific initialization functions */ + +void ff_audio_mix_init_x86(AudioMix *am); + +#endif /* AVRESAMPLE_AUDIO_MIX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/avresample.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/avresample.h new file mode 100644 index 00000000..5ac9adb4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/avresample.h @@ -0,0 +1,595 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_AVRESAMPLE_H +#define AVRESAMPLE_AVRESAMPLE_H + +/** + * @file + * @ingroup lavr + * external API header + */ + +/** + * @defgroup lavr libavresample + * @{ + * + * Libavresample (lavr) is a library that handles audio resampling, sample + * format conversion and mixing. + * + * Interaction with lavr is done through AVAudioResampleContext, which is + * allocated with avresample_alloc_context(). It is opaque, so all parameters + * must be set with the @ref avoptions API. + * + * For example the following code will setup conversion from planar float sample + * format to interleaved signed 16-bit integer, downsampling from 48kHz to + * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing + * matrix): + * @code + * AVAudioResampleContext *avr = avresample_alloc_context(); + * av_opt_set_int(avr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0); + * av_opt_set_int(avr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); + * av_opt_set_int(avr, "in_sample_rate", 48000, 0); + * av_opt_set_int(avr, "out_sample_rate", 44100, 0); + * av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); + * av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + * @endcode + * + * Once the context is initialized, it must be opened with avresample_open(). If + * you need to change the conversion parameters, you must close the context with + * avresample_close(), change the parameters as described above, then reopen it + * again. + * + * The conversion itself is done by repeatedly calling avresample_convert(). + * Note that the samples may get buffered in two places in lavr. The first one + * is the output FIFO, where the samples end up if the output buffer is not + * large enough. The data stored in there may be retrieved at any time with + * avresample_read(). The second place is the resampling delay buffer, + * applicable only when resampling is done. The samples in it require more input + * before they can be processed. Their current amount is returned by + * avresample_get_delay(). At the end of conversion the resampling buffer can be + * flushed by calling avresample_convert() with NULL input. + * + * The following code demonstrates the conversion loop assuming the parameters + * from above and caller-defined functions get_input() and handle_output(): + * @code + * uint8_t **input; + * int in_linesize, in_samples; + * + * while (get_input(&input, &in_linesize, &in_samples)) { + * uint8_t *output + * int out_linesize; + * int out_samples = avresample_get_out_samples(avr, in_samples); + * + * av_samples_alloc(&output, &out_linesize, 2, out_samples, + * AV_SAMPLE_FMT_S16, 0); + * out_samples = avresample_convert(avr, &output, out_linesize, out_samples, + * input, in_linesize, in_samples); + * handle_output(output, out_linesize, out_samples); + * av_freep(&output); + * } + * @endcode + * + * When the conversion is finished and the FIFOs are flushed if required, the + * conversion context and everything associated with it must be freed with + * avresample_free(). + */ + +#include "libavutil/avutil.h" +#include "libavutil/channel_layout.h" +#include "libavutil/dict.h" +#include "libavutil/frame.h" +#include "libavutil/log.h" +#include "libavutil/mathematics.h" + +#include "libavresample/version.h" + +#define AVRESAMPLE_MAX_CHANNELS 32 + +typedef struct AVAudioResampleContext AVAudioResampleContext; + +/** + * @deprecated use libswresample + * + * Mixing Coefficient Types */ +enum attribute_deprecated AVMixCoeffType { + AV_MIX_COEFF_TYPE_Q8, /** 16-bit 8.8 fixed-point */ + AV_MIX_COEFF_TYPE_Q15, /** 32-bit 17.15 fixed-point */ + AV_MIX_COEFF_TYPE_FLT, /** floating-point */ + AV_MIX_COEFF_TYPE_NB, /** Number of coeff types. Not part of ABI */ +}; + +/** + * @deprecated use libswresample + * + * Resampling Filter Types */ +enum attribute_deprecated AVResampleFilterType { + AV_RESAMPLE_FILTER_TYPE_CUBIC, /**< Cubic */ + AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */ + AV_RESAMPLE_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */ +}; + +/** + * @deprecated use libswresample + */ +enum attribute_deprecated AVResampleDitherMethod { + AV_RESAMPLE_DITHER_NONE, /**< Do not use dithering */ + AV_RESAMPLE_DITHER_RECTANGULAR, /**< Rectangular Dither */ + AV_RESAMPLE_DITHER_TRIANGULAR, /**< Triangular Dither*/ + AV_RESAMPLE_DITHER_TRIANGULAR_HP, /**< Triangular Dither with High Pass */ + AV_RESAMPLE_DITHER_TRIANGULAR_NS, /**< Triangular Dither with Noise Shaping */ + AV_RESAMPLE_DITHER_NB, /**< Number of dither types. Not part of ABI. */ +}; + +/** + * + * @deprecated use libswresample + * + * Return the LIBAVRESAMPLE_VERSION_INT constant. + */ +attribute_deprecated +unsigned avresample_version(void); + +/** + * + * @deprecated use libswresample + * + * Return the libavresample build-time configuration. + * @return configure string + */ +attribute_deprecated +const char *avresample_configuration(void); + +/** + * + * @deprecated use libswresample + * + * Return the libavresample license. + */ +attribute_deprecated +const char *avresample_license(void); + +/** + * + * @deprecated use libswresample + * + * Get the AVClass for AVAudioResampleContext. + * + * Can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options + * without allocating a context. + * + * @see av_opt_find(). + * + * @return AVClass for AVAudioResampleContext + */ +attribute_deprecated +const AVClass *avresample_get_class(void); + +/** + * + * @deprecated use libswresample + * + * Allocate AVAudioResampleContext and set options. + * + * @return allocated audio resample context, or NULL on failure + */ +attribute_deprecated +AVAudioResampleContext *avresample_alloc_context(void); + +/** + * + * @deprecated use libswresample + * + * Initialize AVAudioResampleContext. + * @note The context must be configured using the AVOption API. + * @note The fields "in_channel_layout", "out_channel_layout", + * "in_sample_rate", "out_sample_rate", "in_sample_fmt", + * "out_sample_fmt" must be set. + * + * @see av_opt_set_int() + * @see av_opt_set_dict() + * @see av_get_default_channel_layout() + * + * @param avr audio resample context + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_open(AVAudioResampleContext *avr); + +/** + * + * @deprecated use libswresample + * + * Check whether an AVAudioResampleContext is open or closed. + * + * @param avr AVAudioResampleContext to check + * @return 1 if avr is open, 0 if avr is closed. + */ +attribute_deprecated +int avresample_is_open(AVAudioResampleContext *avr); + +/** + * + * @deprecated use libswresample + * + * Close AVAudioResampleContext. + * + * This closes the context, but it does not change the parameters. The context + * can be reopened with avresample_open(). It does, however, clear the output + * FIFO and any remaining leftover samples in the resampling delay buffer. If + * there was a custom matrix being used, that is also cleared. + * + * @see avresample_convert() + * @see avresample_set_matrix() + * + * @param avr audio resample context + */ +attribute_deprecated +void avresample_close(AVAudioResampleContext *avr); + +/** + * + * @deprecated use libswresample + * + * Free AVAudioResampleContext and associated AVOption values. + * + * This also calls avresample_close() before freeing. + * + * @param avr audio resample context + */ +attribute_deprecated +void avresample_free(AVAudioResampleContext **avr); + +/** + * + * @deprecated use libswresample + * + * Generate a channel mixing matrix. + * + * This function is the one used internally by libavresample for building the + * default mixing matrix. It is made public just as a utility function for + * building custom matrices. + * + * @param in_layout input channel layout + * @param out_layout output channel layout + * @param center_mix_level mix level for the center channel + * @param surround_mix_level mix level for the surround channel(s) + * @param lfe_mix_level mix level for the low-frequency effects channel + * @param normalize if 1, coefficients will be normalized to prevent + * overflow. if 0, coefficients will not be + * normalized. + * @param[out] matrix mixing coefficients; matrix[i + stride * o] is + * the weight of input channel i in output channel o. + * @param stride distance between adjacent input channels in the + * matrix array + * @param matrix_encoding matrixed stereo downmix mode (e.g. dplii) + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, + double center_mix_level, double surround_mix_level, + double lfe_mix_level, int normalize, double *matrix, + int stride, enum AVMatrixEncoding matrix_encoding); + +/** + * + * @deprecated use libswresample + * + * Get the current channel mixing matrix. + * + * If no custom matrix has been previously set or the AVAudioResampleContext is + * not open, an error is returned. + * + * @param avr audio resample context + * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of + * input channel i in output channel o. + * @param stride distance between adjacent input channels in the matrix array + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix, + int stride); + +/** + * + * @deprecated use libswresample + * + * Set channel mixing matrix. + * + * Allows for setting a custom mixing matrix, overriding the default matrix + * generated internally during avresample_open(). This function can be called + * anytime on an allocated context, either before or after calling + * avresample_open(), as long as the channel layouts have been set. + * avresample_convert() always uses the current matrix. + * Calling avresample_close() on the context will clear the current matrix. + * + * @see avresample_close() + * + * @param avr audio resample context + * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of + * input channel i in output channel o. + * @param stride distance between adjacent input channels in the matrix array + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix, + int stride); + +/** + * + * @deprecated use libswresample + * + * Set a customized input channel mapping. + * + * This function can only be called when the allocated context is not open. + * Also, the input channel layout must have already been set. + * + * Calling avresample_close() on the context will clear the channel mapping. + * + * The map for each input channel specifies the channel index in the source to + * use for that particular channel, or -1 to mute the channel. Source channels + * can be duplicated by using the same index for multiple input channels. + * + * Examples: + * + * Reordering 5.1 AAC order (C,L,R,Ls,Rs,LFE) to FFmpeg order (L,R,C,LFE,Ls,Rs): + * { 1, 2, 0, 5, 3, 4 } + * + * Muting the 3rd channel in 4-channel input: + * { 0, 1, -1, 3 } + * + * Duplicating the left channel of stereo input: + * { 0, 0 } + * + * @param avr audio resample context + * @param channel_map customized input channel mapping + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_set_channel_mapping(AVAudioResampleContext *avr, + const int *channel_map); + +/** + * + * @deprecated use libswresample + * + * Set compensation for resampling. + * + * This can be called anytime after avresample_open(). If resampling is not + * automatically enabled because of a sample rate conversion, the + * "force_resampling" option must have been set to 1 when opening the context + * in order to use resampling compensation. + * + * @param avr audio resample context + * @param sample_delta compensation delta, in samples + * @param compensation_distance compensation distance, in samples + * @return 0 on success, negative AVERROR code on failure + */ +attribute_deprecated +int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, + int compensation_distance); + +/** + * + * @deprecated use libswresample + * + * Provide the upper bound on the number of samples the configured + * conversion would output. + * + * @param avr audio resample context + * @param in_nb_samples number of input samples + * + * @return number of samples or AVERROR(EINVAL) if the value + * would exceed INT_MAX + */ +attribute_deprecated +int avresample_get_out_samples(AVAudioResampleContext *avr, int in_nb_samples); + +/** + * + * @deprecated use libswresample + * + * Convert input samples and write them to the output FIFO. + * + * The upper bound on the number of output samples can be obtained through + * avresample_get_out_samples(). + * + * The output data can be NULL or have fewer allocated samples than required. + * In this case, any remaining samples not written to the output will be added + * to an internal FIFO buffer, to be returned at the next call to this function + * or to avresample_read(). + * + * If converting sample rate, there may be data remaining in the internal + * resampling delay buffer. avresample_get_delay() tells the number of remaining + * samples. To get this data as output, call avresample_convert() with NULL + * input. + * + * At the end of the conversion process, there may be data remaining in the + * internal FIFO buffer. avresample_available() tells the number of remaining + * samples. To get this data as output, either call avresample_convert() with + * NULL input or call avresample_read(). + * + * @see avresample_get_out_samples() + * @see avresample_read() + * @see avresample_get_delay() + * + * @param avr audio resample context + * @param output output data pointers + * @param out_plane_size output plane size, in bytes. + * This can be 0 if unknown, but that will lead to + * optimized functions not being used directly on the + * output, which could slow down some conversions. + * @param out_samples maximum number of samples that the output buffer can hold + * @param input input data pointers + * @param in_plane_size input plane size, in bytes + * This can be 0 if unknown, but that will lead to + * optimized functions not being used directly on the + * input, which could slow down some conversions. + * @param in_samples number of input samples to convert + * @return number of samples written to the output buffer, + * not including converted samples added to the internal + * output FIFO + */ +attribute_deprecated +int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, + int out_plane_size, int out_samples, + uint8_t * const *input, int in_plane_size, + int in_samples); + +/** + * + * @deprecated use libswresample + * + * Return the number of samples currently in the resampling delay buffer. + * + * When resampling, there may be a delay between the input and output. Any + * unconverted samples in each call are stored internally in a delay buffer. + * This function allows the user to determine the current number of samples in + * the delay buffer, which can be useful for synchronization. + * + * @see avresample_convert() + * + * @param avr audio resample context + * @return number of samples currently in the resampling delay buffer + */ +attribute_deprecated +int avresample_get_delay(AVAudioResampleContext *avr); + +/** + * + * @deprecated use libswresample + * + * Return the number of available samples in the output FIFO. + * + * During conversion, if the user does not specify an output buffer or + * specifies an output buffer that is smaller than what is needed, remaining + * samples that are not written to the output are stored to an internal FIFO + * buffer. The samples in the FIFO can be read with avresample_read() or + * avresample_convert(). + * + * @see avresample_read() + * @see avresample_convert() + * + * @param avr audio resample context + * @return number of samples available for reading + */ +attribute_deprecated +int avresample_available(AVAudioResampleContext *avr); + +/** + * + * @deprecated use libswresample + * + * Read samples from the output FIFO. + * + * During conversion, if the user does not specify an output buffer or + * specifies an output buffer that is smaller than what is needed, remaining + * samples that are not written to the output are stored to an internal FIFO + * buffer. This function can be used to read samples from that internal FIFO. + * + * @see avresample_available() + * @see avresample_convert() + * + * @param avr audio resample context + * @param output output data pointers. May be NULL, in which case + * nb_samples of data is discarded from output FIFO. + * @param nb_samples number of samples to read from the FIFO + * @return the number of samples written to output + */ +attribute_deprecated +int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples); + +/** + * + * @deprecated use libswresample + * + * Convert the samples in the input AVFrame and write them to the output AVFrame. + * + * Input and output AVFrames must have channel_layout, sample_rate and format set. + * + * The upper bound on the number of output samples is obtained through + * avresample_get_out_samples(). + * + * If the output AVFrame does not have the data pointers allocated the nb_samples + * field will be set using avresample_get_out_samples() and av_frame_get_buffer() + * is called to allocate the frame. + * + * The output AVFrame can be NULL or have fewer allocated samples than required. + * In this case, any remaining samples not written to the output will be added + * to an internal FIFO buffer, to be returned at the next call to this function + * or to avresample_convert() or to avresample_read(). + * + * If converting sample rate, there may be data remaining in the internal + * resampling delay buffer. avresample_get_delay() tells the number of + * remaining samples. To get this data as output, call this function or + * avresample_convert() with NULL input. + * + * At the end of the conversion process, there may be data remaining in the + * internal FIFO buffer. avresample_available() tells the number of remaining + * samples. To get this data as output, either call this function or + * avresample_convert() with NULL input or call avresample_read(). + * + * If the AVAudioResampleContext configuration does not match the output and + * input AVFrame settings the conversion does not take place and depending on + * which AVFrame is not matching AVERROR_OUTPUT_CHANGED, AVERROR_INPUT_CHANGED + * or AVERROR_OUTPUT_CHANGED|AVERROR_INPUT_CHANGED is returned. + * + * @see avresample_get_out_samples() + * @see avresample_available() + * @see avresample_convert() + * @see avresample_read() + * @see avresample_get_delay() + * + * @param avr audio resample context + * @param output output AVFrame + * @param input input AVFrame + * @return 0 on success, AVERROR on failure or nonmatching + * configuration. + */ +attribute_deprecated +int avresample_convert_frame(AVAudioResampleContext *avr, + AVFrame *output, AVFrame *input); + +/** + * + * @deprecated use libswresample + * + * Configure or reconfigure the AVAudioResampleContext using the information + * provided by the AVFrames. + * + * The original resampling context is reset even on failure. + * The function calls avresample_close() internally if the context is open. + * + * @see avresample_open(); + * @see avresample_close(); + * + * @param avr audio resample context + * @param out output AVFrame + * @param in input AVFrame + * @return 0 on success, AVERROR on failure. + */ +attribute_deprecated +int avresample_config(AVAudioResampleContext *avr, AVFrame *out, AVFrame *in); + +/** + * @} + */ + +#endif /* AVRESAMPLE_AVRESAMPLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/dither.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/dither.h new file mode 100644 index 00000000..72f09cbd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/dither.h @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_DITHER_H +#define AVRESAMPLE_DITHER_H + +#include "avresample.h" +#include "audio_data.h" + +typedef struct DitherContext DitherContext; + +typedef struct DitherDSPContext { + /** + * Convert samples from flt to s16 with added dither noise. + * + * @param dst destination float array, range -0.5 to 0.5 + * @param src source int array, range INT_MIN to INT_MAX. + * @param dither float dither noise array + * @param len number of samples + */ + void (*quantize)(int16_t *dst, const float *src, float *dither, int len); + + int ptr_align; ///< src and dst constraints for quantize() + int samples_align; ///< len constraints for quantize() + + /** + * Convert dither noise from int to float with triangular distribution. + * + * @param dst destination float array, range -0.5 to 0.5 + * constraints: 32-byte aligned + * @param src0 source int array, range INT_MIN to INT_MAX. + * the array size is len * 2 + * constraints: 32-byte aligned + * @param len number of output noise samples + * constraints: multiple of 16 + */ + void (*dither_int_to_float)(float *dst, int *src0, int len); +} DitherDSPContext; + +/** + * Allocate and initialize a DitherContext. + * + * The parameters in the AVAudioResampleContext are used to initialize the + * DitherContext. + * + * @param avr AVAudioResampleContext + * @return newly-allocated DitherContext + */ +DitherContext *ff_dither_alloc(AVAudioResampleContext *avr, + enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels, int sample_rate, int apply_map); + +/** + * Free a DitherContext. + * + * @param c DitherContext + */ +void ff_dither_free(DitherContext **c); + +/** + * Convert audio sample format with dithering. + * + * @param c DitherContext + * @param dst destination audio data + * @param src source audio data + * @return 0 if ok, negative AVERROR code on failure + */ +int ff_convert_dither(DitherContext *c, AudioData *dst, AudioData *src); + +/* arch-specific initialization functions */ + +void ff_dither_init_x86(DitherDSPContext *ddsp, + enum AVResampleDitherMethod method); + +#endif /* AVRESAMPLE_DITHER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/internal.h new file mode 100644 index 00000000..2fc3f6da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/internal.h @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_INTERNAL_H +#define AVRESAMPLE_INTERNAL_H + +#include "libavutil/audio_fifo.h" +#include "libavutil/log.h" +#include "libavutil/opt.h" +#include "libavutil/samplefmt.h" +#include "avresample.h" + +typedef struct AudioData AudioData; +typedef struct AudioConvert AudioConvert; +typedef struct AudioMix AudioMix; +typedef struct ResampleContext ResampleContext; + +enum RemapPoint { + REMAP_NONE, + REMAP_IN_COPY, + REMAP_IN_CONVERT, + REMAP_OUT_COPY, + REMAP_OUT_CONVERT, +}; + +typedef struct ChannelMapInfo { + int channel_map[AVRESAMPLE_MAX_CHANNELS]; /**< source index of each output channel, -1 if not remapped */ + int do_remap; /**< remap needed */ + int channel_copy[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to copy from */ + int do_copy; /**< copy needed */ + int channel_zero[AVRESAMPLE_MAX_CHANNELS]; /**< dest index to zero */ + int do_zero; /**< zeroing needed */ + int input_map[AVRESAMPLE_MAX_CHANNELS]; /**< dest index of each input channel */ +} ChannelMapInfo; + +struct AVAudioResampleContext { + const AVClass *av_class; /**< AVClass for logging and AVOptions */ + + uint64_t in_channel_layout; /**< input channel layout */ + enum AVSampleFormat in_sample_fmt; /**< input sample format */ + int in_sample_rate; /**< input sample rate */ + uint64_t out_channel_layout; /**< output channel layout */ + enum AVSampleFormat out_sample_fmt; /**< output sample format */ + int out_sample_rate; /**< output sample rate */ + enum AVSampleFormat internal_sample_fmt; /**< internal sample format */ + enum AVMixCoeffType mix_coeff_type; /**< mixing coefficient type */ + double center_mix_level; /**< center mix level */ + double surround_mix_level; /**< surround mix level */ + double lfe_mix_level; /**< lfe mix level */ + int normalize_mix_level; /**< enable mix level normalization */ + int force_resampling; /**< force resampling */ + int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ + int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ + int linear_interp; /**< if 1 then the resampling FIR filter will be linearly interpolated */ + double cutoff; /**< resampling cutoff frequency. 1.0 corresponds to half the output sample rate */ + enum AVResampleFilterType filter_type; /**< resampling filter type */ + int kaiser_beta; /**< beta value for Kaiser window (only applicable if filter_type == AV_FILTER_TYPE_KAISER) */ + enum AVResampleDitherMethod dither_method; /**< dither method */ + + int in_channels; /**< number of input channels */ + int out_channels; /**< number of output channels */ + int resample_channels; /**< number of channels used for resampling */ + int downmix_needed; /**< downmixing is needed */ + int upmix_needed; /**< upmixing is needed */ + int mixing_needed; /**< either upmixing or downmixing is needed */ + int resample_needed; /**< resampling is needed */ + int in_convert_needed; /**< input sample format conversion is needed */ + int out_convert_needed; /**< output sample format conversion is needed */ + int in_copy_needed; /**< input data copy is needed */ + + AudioData *in_buffer; /**< buffer for converted input */ + AudioData *resample_out_buffer; /**< buffer for output from resampler */ + AudioData *out_buffer; /**< buffer for converted output */ + AVAudioFifo *out_fifo; /**< FIFO for output samples */ + + AudioConvert *ac_in; /**< input sample format conversion context */ + AudioConvert *ac_out; /**< output sample format conversion context */ + ResampleContext *resample; /**< resampling context */ + AudioMix *am; /**< channel mixing context */ + enum AVMatrixEncoding matrix_encoding; /**< matrixed stereo encoding */ + + /** + * mix matrix + * only used if avresample_set_matrix() is called before avresample_open() + */ + double *mix_matrix; + + int use_channel_map; + enum RemapPoint remap_point; + ChannelMapInfo ch_map_info; +}; + + +void ff_audio_resample_init_aarch64(ResampleContext *c, + enum AVSampleFormat sample_fmt); +void ff_audio_resample_init_arm(ResampleContext *c, + enum AVSampleFormat sample_fmt); + +#endif /* AVRESAMPLE_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/resample.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/resample.h new file mode 100644 index 00000000..be9f5627 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/resample.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_RESAMPLE_H +#define AVRESAMPLE_RESAMPLE_H + +#include "avresample.h" +#include "internal.h" +#include "audio_data.h" + +struct ResampleContext { + AVAudioResampleContext *avr; + AudioData *buffer; + uint8_t *filter_bank; + int filter_length; + int ideal_dst_incr; + int dst_incr; + unsigned int index; + int frac; + int src_incr; + int compensation_distance; + int phase_shift; + int phase_mask; + int linear; + enum AVResampleFilterType filter_type; + int kaiser_beta; + void (*set_filter)(void *filter, double *tab, int phase, int tap_count); + void (*resample_one)(struct ResampleContext *c, void *dst0, + int dst_index, const void *src0, + unsigned int index, int frac); + void (*resample_nearest)(void *dst0, int dst_index, + const void *src0, unsigned int index); + int padding_size; + int initial_padding_filled; + int initial_padding_samples; + int final_padding_filled; + int final_padding_samples; +}; + +/** + * Allocate and initialize a ResampleContext. + * + * The parameters in the AVAudioResampleContext are used to initialize the + * ResampleContext. + * + * @param avr AVAudioResampleContext + * @return newly-allocated ResampleContext + */ +ResampleContext *ff_audio_resample_init(AVAudioResampleContext *avr); + +/** + * Free a ResampleContext. + * + * @param c ResampleContext + */ +void ff_audio_resample_free(ResampleContext **c); + +/** + * Resample audio data. + * + * Changes the sample rate. + * + * @par + * All samples in the source data may not be consumed depending on the + * resampling parameters and the size of the output buffer. The unconsumed + * samples are automatically added to the start of the source in the next call. + * If the destination data can be reallocated, that may be done in this function + * in order to fit all available output. If it cannot be reallocated, fewer + * input samples will be consumed in order to have the output fit in the + * destination data buffers. + * + * @param c ResampleContext + * @param dst destination audio data + * @param src source audio data + * @return 0 on success, negative AVERROR code on failure + */ +int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src); + +#endif /* AVRESAMPLE_RESAMPLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/version.h new file mode 100644 index 00000000..d5d3ea82 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavresample/version.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVRESAMPLE_VERSION_H +#define AVRESAMPLE_VERSION_H + +/** + * @file + * @ingroup lavr + * Libavresample version macros. + */ + +#include "libavutil/version.h" + +#define LIBAVRESAMPLE_VERSION_MAJOR 4 +#define LIBAVRESAMPLE_VERSION_MINOR 0 +#define LIBAVRESAMPLE_VERSION_MICRO 0 + +#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \ + LIBAVRESAMPLE_VERSION_MINOR, \ + LIBAVRESAMPLE_VERSION_MICRO) +#define LIBAVRESAMPLE_VERSION AV_VERSION(LIBAVRESAMPLE_VERSION_MAJOR, \ + LIBAVRESAMPLE_VERSION_MINOR, \ + LIBAVRESAMPLE_VERSION_MICRO) +#define LIBAVRESAMPLE_BUILD LIBAVRESAMPLE_VERSION_INT + +#define LIBAVRESAMPLE_IDENT "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + +#endif /* AVRESAMPLE_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/bswap.h new file mode 100644 index 00000000..1e735c52 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/bswap.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AARCH64_BSWAP_H +#define AVUTIL_AARCH64_BSWAP_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#if HAVE_INLINE_ASM + +#define av_bswap16 av_bswap16 +static av_always_inline av_const unsigned av_bswap16(unsigned x) +{ + __asm__("rev16 %w0, %w0" : "+r"(x)); + return x; +} + +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + __asm__("rev %w0, %w0" : "+r"(x)); + return x; +} + +#define av_bswap64 av_bswap64 +static av_always_inline av_const uint64_t av_bswap64(uint64_t x) +{ + __asm__("rev %0, %0" : "+r"(x)); + return x; +} + +#endif /* HAVE_INLINE_ASM */ +#endif /* AVUTIL_AARCH64_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/cpu.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/cpu.h new file mode 100644 index 00000000..2ee3f932 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/cpu.h @@ -0,0 +1,29 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AARCH64_CPU_H +#define AVUTIL_AARCH64_CPU_H + +#include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" + +#define have_armv8(flags) CPUEXT(flags, ARMV8) +#define have_neon(flags) CPUEXT(flags, NEON) +#define have_vfp(flags) CPUEXT(flags, VFP) + +#endif /* AVUTIL_AARCH64_CPU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/neontest.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/neontest.h new file mode 100644 index 00000000..2d0fc199 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/neontest.h @@ -0,0 +1,70 @@ +/* + * check NEON registers for clobbering + * Copyright (c) 2008 Ramiro Polla + * Copyright (c) 2013 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AARCH64_NEONTEST_H +#define AVUTIL_AARCH64_NEONTEST_H + +#include +#include +#include +#include +#include + +#include "libavutil/bswap.h" + +#define storeneonregs(mem) \ + __asm__ volatile( \ + "stp d8, d9, [%0]\n\t" \ + "stp d10, d11, [%0, #16]\n\t" \ + "stp d12, d13, [%0, #32]\n\t" \ + "stp d14, d15, [%0, #48]\n\t" \ + :: "r"(mem) : "memory") + +#define testneonclobbers(func, ctx, ...) \ + uint64_t neon[2][8]; \ + int ret; \ + storeneonregs(neon[0]); \ + ret = __real_ ## func(ctx, __VA_ARGS__); \ + storeneonregs(neon[1]); \ + if (memcmp(neon[0], neon[1], sizeof(neon[0]))) { \ + int i; \ + av_log(ctx, AV_LOG_ERROR, \ + "NEON REGS CLOBBERED IN %s!\n", #func); \ + for (i = 0; i < 8; i ++) \ + if (neon[0][i] != neon[1][i]) { \ + av_log(ctx, AV_LOG_ERROR, \ + "d%-2d = %016"PRIx64"\n", \ + 8 + i, av_bswap64(neon[0][i])); \ + av_log(ctx, AV_LOG_ERROR, \ + " -> %016"PRIx64"\n", \ + av_bswap64(neon[1][i])); \ + } \ + abort(); \ + } \ + return ret + +#define wrap(func) \ +int __real_ ## func; \ +int __wrap_ ## func; \ +int __wrap_ ## func + +#endif /* AVUTIL_AARCH64_NEONTEST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/timer.h new file mode 100644 index 00000000..b5700394 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aarch64/timer.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2015 Janne Grunau + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AARCH64_TIMER_H +#define AVUTIL_AARCH64_TIMER_H + +#include +#include "config.h" + +#if HAVE_INLINE_ASM + +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + uint64_t cycle_counter; + __asm__ volatile( + "isb \t\n" + "mrs %0, pmccntr_el0 " + : "=r"(cycle_counter) :: "memory" ); + + return cycle_counter; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_AARCH64_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/adler32.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/adler32.h new file mode 100644 index 00000000..a1f035b7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/adler32.h @@ -0,0 +1,60 @@ +/* + * copyright (c) 2006 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_adler32 + * Public header for Adler-32 hash function implementation. + */ + +#ifndef AVUTIL_ADLER32_H +#define AVUTIL_ADLER32_H + +#include +#include "attributes.h" + +/** + * @defgroup lavu_adler32 Adler-32 + * @ingroup lavu_hash + * Adler-32 hash function implementation. + * + * @{ + */ + +/** + * Calculate the Adler32 checksum of a buffer. + * + * Passing the return value to a subsequent av_adler32_update() call + * allows the checksum of multiple buffers to be calculated as though + * they were concatenated. + * + * @param adler initial checksum value + * @param buf pointer to input buffer + * @param len size of input buffer + * @return updated checksum + */ +unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, + unsigned int len) av_pure; + +/** + * @} + */ + +#endif /* AVUTIL_ADLER32_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes.h new file mode 100644 index 00000000..09efbda1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes.h @@ -0,0 +1,65 @@ +/* + * copyright (c) 2007 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AES_H +#define AVUTIL_AES_H + +#include + +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_aes AES + * @ingroup lavu_crypto + * @{ + */ + +extern const int av_aes_size; + +struct AVAES; + +/** + * Allocate an AVAES context. + */ +struct AVAES *av_aes_alloc(void); + +/** + * Initialize an AVAES context. + * @param key_bits 128, 192 or 256 + * @param decrypt 0 for encryption, 1 for decryption + */ +int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); + +/** + * Encrypt or decrypt a buffer using a previously initialized context. + * @param count number of 16 byte blocks + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param iv initialization vector for CBC mode, if NULL then ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); + +/** + * @} + */ + +#endif /* AVUTIL_AES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_ctr.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_ctr.h new file mode 100644 index 00000000..e4aae126 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_ctr.h @@ -0,0 +1,88 @@ +/* + * AES-CTR cipher + * Copyright (c) 2015 Eran Kornblau + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AES_CTR_H +#define AVUTIL_AES_CTR_H + +#include + +#include "attributes.h" +#include "version.h" + +#define AES_CTR_KEY_SIZE (16) +#define AES_CTR_IV_SIZE (8) + +struct AVAESCTR; + +/** + * Allocate an AVAESCTR context. + */ +struct AVAESCTR *av_aes_ctr_alloc(void); + +/** + * Initialize an AVAESCTR context. + * @param key encryption key, must have a length of AES_CTR_KEY_SIZE + */ +int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key); + +/** + * Release an AVAESCTR context. + */ +void av_aes_ctr_free(struct AVAESCTR *a); + +/** + * Process a buffer using a previously initialized context. + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param size the size of src and dst + */ +void av_aes_ctr_crypt(struct AVAESCTR *a, uint8_t *dst, const uint8_t *src, int size); + +/** + * Get the current iv + */ +const uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a); + +/** + * Generate a random iv + */ +void av_aes_ctr_set_random_iv(struct AVAESCTR *a); + +/** + * Forcefully change the 8-byte iv + */ +void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv); + +/** + * Forcefully change the "full" 16-byte iv, including the counter + */ +void av_aes_ctr_set_full_iv(struct AVAESCTR *a, const uint8_t* iv); + +/** + * Increment the top 64 bit of the iv (performed after each frame) + */ +void av_aes_ctr_increment_iv(struct AVAESCTR *a); + +/** + * @} + */ + +#endif /* AVUTIL_AES_CTR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_internal.h new file mode 100644 index 00000000..49442587 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/aes_internal.h @@ -0,0 +1,43 @@ +/* + * copyright (c) 2015 Rodger Combs + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AES_INTERNAL_H +#define AVUTIL_AES_INTERNAL_H + +#include "mem.h" +#include + +typedef union { + uint64_t u64[2]; + uint32_t u32[4]; + uint8_t u8x4[4][4]; + uint8_t u8[16]; +} av_aes_block; + +typedef struct AVAES { + // Note: round_key[16] is accessed in the init code, but this only + // overwrites state, which does not matter (see also commit ba554c0). + DECLARE_ALIGNED(16, av_aes_block, round_key)[15]; + DECLARE_ALIGNED(16, av_aes_block, state)[2]; + int rounds; + void (*crypt)(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int rounds); +} AVAES; + +#endif /* AVUTIL_AES_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/bswap.h new file mode 100644 index 00000000..611ff0ad --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/bswap.h @@ -0,0 +1,67 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_BSWAP_H +#define AVUTIL_ARM_BSWAP_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#ifdef __ARMCC_VERSION + +#if HAVE_ARMV6 +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + return __rev(x); +} +#endif /* HAVE_ARMV6 */ + +#elif HAVE_INLINE_ASM + +#if HAVE_ARMV6_INLINE +#define av_bswap16 av_bswap16 +static av_always_inline av_const unsigned av_bswap16(unsigned x) +{ + __asm__("rev16 %0, %0" : "+r"(x)); + return x; +} +#endif + +#if AV_GCC_VERSION_AT_MOST(4,4) +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ +#if HAVE_ARMV6_INLINE + __asm__("rev %0, %0" : "+r"(x)); +#else + uint32_t t; + __asm__ ("eor %1, %0, %0, ror #16 \n\t" + "bic %1, %1, #0xFF0000 \n\t" + "mov %0, %0, ror #8 \n\t" + "eor %0, %0, %1, lsr #8 \n\t" + : "+r"(x), "=&r"(t)); +#endif /* HAVE_ARMV6_INLINE */ + return x; +} +#endif /* AV_GCC_VERSION_AT_MOST(4,4) */ + +#endif /* __ARMCC_VERSION */ + +#endif /* AVUTIL_ARM_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/cpu.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/cpu.h new file mode 100644 index 00000000..1d6cc65d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/cpu.h @@ -0,0 +1,38 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_CPU_H +#define AVUTIL_ARM_CPU_H + +#include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" + +#define have_armv5te(flags) CPUEXT(flags, ARMV5TE) +#define have_armv6(flags) CPUEXT(flags, ARMV6) +#define have_armv6t2(flags) CPUEXT(flags, ARMV6T2) +#define have_vfp(flags) CPUEXT(flags, VFP) +#define have_vfpv3(flags) CPUEXT(flags, VFPV3) +#define have_neon(flags) CPUEXT(flags, NEON) +#define have_setend(flags) CPUEXT(flags, SETEND) + +/* some functions use the VFPv2 vector mode which is deprecated in ARMv7-A + * and might trap on such CPU depending on the OS configuration */ +#define have_vfp_vm(flags) \ + (HAVE_VFP && ((flags) & AV_CPU_FLAG_VFP_VM)) + +#endif /* AVUTIL_ARM_CPU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/float_dsp_arm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/float_dsp_arm.h new file mode 100644 index 00000000..fe311cc0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/float_dsp_arm.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_FLOAT_DSP_ARM_H +#define AVUTIL_ARM_FLOAT_DSP_ARM_H + +#include "libavutil/float_dsp.h" + +void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags); +void ff_float_dsp_init_neon(AVFloatDSPContext *fdsp); + +#endif /* AVUTIL_ARM_FLOAT_DSP_ARM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intmath.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intmath.h new file mode 100644 index 00000000..5311a7d5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intmath.h @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_INTMATH_H +#define AVUTIL_ARM_INTMATH_H + +#include + +#include "config.h" +#include "libavutil/attributes.h" + +#if HAVE_INLINE_ASM + +#if HAVE_ARMV6_INLINE + +#define av_clip_uint8 av_clip_uint8_arm +static av_always_inline av_const int av_clip_uint8_arm(int a) +{ + int x; + __asm__ ("usat %0, #8, %1" : "=r"(x) : "r"(a)); + return x; +} + +#define av_clip_int8 av_clip_int8_arm +static av_always_inline av_const int av_clip_int8_arm(int a) +{ + int x; + __asm__ ("ssat %0, #8, %1" : "=r"(x) : "r"(a)); + return x; +} + +#define av_clip_uint16 av_clip_uint16_arm +static av_always_inline av_const int av_clip_uint16_arm(int a) +{ + int x; + __asm__ ("usat %0, #16, %1" : "=r"(x) : "r"(a)); + return x; +} + +#define av_clip_int16 av_clip_int16_arm +static av_always_inline av_const int av_clip_int16_arm(int a) +{ + int x; + __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a)); + return x; +} + +#define av_clip_intp2 av_clip_intp2_arm +static av_always_inline av_const int av_clip_intp2_arm(int a, int p) +{ + unsigned x; + __asm__ ("ssat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p+1)); + return x; +} + +#define av_clip_uintp2 av_clip_uintp2_arm +static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p) +{ + unsigned x; + __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p)); + return x; +} + +#define av_sat_add32 av_sat_add32_arm +static av_always_inline int av_sat_add32_arm(int a, int b) +{ + int r; + __asm__ ("qadd %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#define av_sat_dadd32 av_sat_dadd32_arm +static av_always_inline int av_sat_dadd32_arm(int a, int b) +{ + int r; + __asm__ ("qdadd %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#define av_sat_sub32 av_sat_sub32_arm +static av_always_inline int av_sat_sub32_arm(int a, int b) +{ + int r; + __asm__ ("qsub %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#define av_sat_dsub32 av_sat_dsub32_arm +static av_always_inline int av_sat_dsub32_arm(int a, int b) +{ + int r; + __asm__ ("qdsub %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + return r; +} + +#endif /* HAVE_ARMV6_INLINE */ + +#if HAVE_ASM_MOD_Q + +#define av_clipl_int32 av_clipl_int32_arm +static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a) +{ + int x, y; + __asm__ ("adds %1, %R2, %Q2, lsr #31 \n\t" + "itet ne \n\t" + "mvnne %1, #1<<31 \n\t" + "moveq %0, %Q2 \n\t" + "eorne %0, %1, %R2, asr #31 \n\t" + : "=r"(x), "=&r"(y) : "r"(a) : "cc"); + return x; +} + +#endif /* HAVE_ASM_MOD_Q */ + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_ARM_INTMATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intreadwrite.h new file mode 100644 index 00000000..60fc860c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/intreadwrite.h @@ -0,0 +1,91 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_INTREADWRITE_H +#define AVUTIL_ARM_INTREADWRITE_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM && AV_GCC_VERSION_AT_MOST(4,6) + +#define AV_RN16 AV_RN16 +static av_always_inline unsigned AV_RN16(const void *p) +{ + const uint8_t *q = p; + unsigned v; +#if AV_GCC_VERSION_AT_MOST(4,5) + __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)q)); +#elif defined __thumb__ + __asm__ ("ldrh %0, %1" : "=r"(v) : "m"(q[0]), "m"(q[1])); +#else + __asm__ ("ldrh %0, %1" : "=r"(v) : "Uq"(q[0]), "m"(q[1])); +#endif + return v; +} + +#define AV_WN16 AV_WN16 +static av_always_inline void AV_WN16(void *p, uint16_t v) +{ + __asm__ ("strh %1, %0" : "=m"(*(uint16_t *)p) : "r"(v)); +} + +#define AV_RN32 AV_RN32 +static av_always_inline uint32_t AV_RN32(const void *p) +{ + const struct __attribute__((packed)) { uint32_t v; } *q = p; + uint32_t v; + __asm__ ("ldr %0, %1" : "=r"(v) : "m"(*q)); + return v; +} + +#define AV_WN32 AV_WN32 +static av_always_inline void AV_WN32(void *p, uint32_t v) +{ + __asm__ ("str %1, %0" : "=m"(*(uint32_t *)p) : "r"(v)); +} + +#if HAVE_ASM_MOD_Q + +#define AV_RN64 AV_RN64 +static av_always_inline uint64_t AV_RN64(const void *p) +{ + const struct __attribute__((packed)) { uint32_t v; } *q = p; + uint64_t v; + __asm__ ("ldr %Q0, %1 \n\t" + "ldr %R0, %2 \n\t" + : "=&r"(v) + : "m"(q[0]), "m"(q[1])); + return v; +} + +#define AV_WN64 AV_WN64 +static av_always_inline void AV_WN64(void *p, uint64_t v) +{ + __asm__ ("str %Q2, %0 \n\t" + "str %R2, %1 \n\t" + : "=m"(*(uint32_t*)p), "=m"(*((uint32_t*)p+1)) + : "r"(v)); +} + +#endif /* HAVE_ASM_MOD_Q */ + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_ARM_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/neontest.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/neontest.h new file mode 100644 index 00000000..d75ab838 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/neontest.h @@ -0,0 +1,67 @@ +/* + * check NEON registers for clobbering + * Copyright (c) 2008 Ramiro Polla + * Copyright (c) 2013 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_NEONTEST_H +#define AVUTIL_ARM_NEONTEST_H + +#include +#include +#include +#include +#include + +#include "libavutil/bswap.h" + +#define storeneonregs(mem) \ + __asm__ volatile( \ + "vstm %0, {d8-d15}\n\t" \ + :: "r"(mem) : "memory") + +#define testneonclobbers(func, ctx, ...) \ + uint64_t neon[2][8]; \ + int ret; \ + storeneonregs(neon[0]); \ + ret = __real_ ## func(ctx, __VA_ARGS__); \ + storeneonregs(neon[1]); \ + if (memcmp(neon[0], neon[1], sizeof(neon[0]))) { \ + int i; \ + av_log(ctx, AV_LOG_ERROR, \ + "NEON REGS CLOBBERED IN %s!\n", #func); \ + for (i = 0; i < 8; i ++) \ + if (neon[0][i] != neon[1][i]) { \ + av_log(ctx, AV_LOG_ERROR, \ + "d%-2d = %016"PRIx64"\n", \ + 8 + i, av_bswap64(neon[0][i])); \ + av_log(ctx, AV_LOG_ERROR, \ + " -> %016"PRIx64"\n", \ + av_bswap64(neon[1][i])); \ + } \ + abort(); \ + } \ + return ret + +#define wrap(func) \ +int __real_ ## func; \ +int __wrap_ ## func; \ +int __wrap_ ## func + +#endif /* AVUTIL_ARM_NEONTEST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/timer.h new file mode 100644 index 00000000..5e8bc8ed --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/arm/timer.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ARM_TIMER_H +#define AVUTIL_ARM_TIMER_H + +#include +#include "config.h" + +#if HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__) + +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + unsigned cc; + __asm__ volatile ("mrc p15, 0, %0, c9, c13, 0" : "=r"(cc)); + return cc; +} + +#endif /* HAVE_INLINE_ASM && __ARM_ARCH_7A__ */ + +#endif /* AVUTIL_ARM_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/attributes.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/attributes.h new file mode 100644 index 00000000..5cb9fe34 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/attributes.h @@ -0,0 +1,173 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Macro definitions for various function/variable attributes + */ + +#ifndef AVUTIL_ATTRIBUTES_H +#define AVUTIL_ATTRIBUTES_H + +#ifdef __GNUC__ +# define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y)) +# define AV_GCC_VERSION_AT_MOST(x,y) (__GNUC__ < (x) || __GNUC__ == (x) && __GNUC_MINOR__ <= (y)) +#else +# define AV_GCC_VERSION_AT_LEAST(x,y) 0 +# define AV_GCC_VERSION_AT_MOST(x,y) 0 +#endif + +#ifdef __has_builtin +# define AV_HAS_BUILTIN(x) __has_builtin(x) +#else +# define AV_HAS_BUILTIN(x) 0 +#endif + +#ifndef av_always_inline +#if AV_GCC_VERSION_AT_LEAST(3,1) +# define av_always_inline __attribute__((always_inline)) inline +#elif defined(_MSC_VER) +# define av_always_inline __forceinline +#else +# define av_always_inline inline +#endif +#endif + +#ifndef av_extern_inline +#if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__) +# define av_extern_inline extern inline +#else +# define av_extern_inline inline +#endif +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,4) +# define av_warn_unused_result __attribute__((warn_unused_result)) +#else +# define av_warn_unused_result +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,1) +# define av_noinline __attribute__((noinline)) +#elif defined(_MSC_VER) +# define av_noinline __declspec(noinline) +#else +# define av_noinline +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__) +# define av_pure __attribute__((pure)) +#else +# define av_pure +#endif + +#if AV_GCC_VERSION_AT_LEAST(2,6) || defined(__clang__) +# define av_const __attribute__((const)) +#else +# define av_const +#endif + +#if AV_GCC_VERSION_AT_LEAST(4,3) || defined(__clang__) +# define av_cold __attribute__((cold)) +#else +# define av_cold +#endif + +#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__) +# define av_flatten __attribute__((flatten)) +#else +# define av_flatten +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,1) +# define attribute_deprecated __attribute__((deprecated)) +#elif defined(_MSC_VER) +# define attribute_deprecated __declspec(deprecated) +#else +# define attribute_deprecated +#endif + +/** + * Disable warnings about deprecated features + * This is useful for sections of code kept for backward compatibility and + * scheduled for removal. + */ +#ifndef AV_NOWARN_DEPRECATED +#if AV_GCC_VERSION_AT_LEAST(4,6) +# define AV_NOWARN_DEPRECATED(code) \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ + code \ + _Pragma("GCC diagnostic pop") +#elif defined(_MSC_VER) +# define AV_NOWARN_DEPRECATED(code) \ + __pragma(warning(push)) \ + __pragma(warning(disable : 4996)) \ + code; \ + __pragma(warning(pop)) +#else +# define AV_NOWARN_DEPRECATED(code) code +#endif +#endif + +#if defined(__GNUC__) || defined(__clang__) +# define av_unused __attribute__((unused)) +#else +# define av_unused +#endif + +/** + * Mark a variable as used and prevent the compiler from optimizing it + * away. This is useful for variables accessed only from inline + * assembler without the compiler being aware. + */ +#if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__) +# define av_used __attribute__((used)) +#else +# define av_used +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,3) || defined(__clang__) +# define av_alias __attribute__((may_alias)) +#else +# define av_alias +#endif + +#if (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER) +# define av_uninit(x) x=x +#else +# define av_uninit(x) x +#endif + +#if defined(__GNUC__) || defined(__clang__) +# define av_builtin_constant_p __builtin_constant_p +# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos))) +#else +# define av_builtin_constant_p(x) 0 +# define av_printf_format(fmtpos, attrpos) +#endif + +#if AV_GCC_VERSION_AT_LEAST(2,5) || defined(__clang__) +# define av_noreturn __attribute__((noreturn)) +#else +# define av_noreturn +#endif + +#endif /* AVUTIL_ATTRIBUTES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/audio_fifo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/audio_fifo.h new file mode 100644 index 00000000..d8a9194a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/audio_fifo.h @@ -0,0 +1,187 @@ +/* + * Audio FIFO + * Copyright (c) 2012 Justin Ruggles + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Audio FIFO Buffer + */ + +#ifndef AVUTIL_AUDIO_FIFO_H +#define AVUTIL_AUDIO_FIFO_H + +#include "avutil.h" +#include "fifo.h" +#include "samplefmt.h" + +/** + * @addtogroup lavu_audio + * @{ + * + * @defgroup lavu_audiofifo Audio FIFO Buffer + * @{ + */ + +/** + * Context for an Audio FIFO Buffer. + * + * - Operates at the sample level rather than the byte level. + * - Supports multiple channels with either planar or packed sample format. + * - Automatic reallocation when writing to a full buffer. + */ +typedef struct AVAudioFifo AVAudioFifo; + +/** + * Free an AVAudioFifo. + * + * @param af AVAudioFifo to free + */ +void av_audio_fifo_free(AVAudioFifo *af); + +/** + * Allocate an AVAudioFifo. + * + * @param sample_fmt sample format + * @param channels number of channels + * @param nb_samples initial allocation size, in samples + * @return newly allocated AVAudioFifo, or NULL on error + */ +AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, + int nb_samples); + +/** + * Reallocate an AVAudioFifo. + * + * @param af AVAudioFifo to reallocate + * @param nb_samples new allocation size, in samples + * @return 0 if OK, or negative AVERROR code on failure + */ +av_warn_unused_result +int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples); + +/** + * Write data to an AVAudioFifo. + * + * The AVAudioFifo will be reallocated automatically if the available space + * is less than nb_samples. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param af AVAudioFifo to write to + * @param data audio data plane pointers + * @param nb_samples number of samples to write + * @return number of samples actually written, or negative AVERROR + * code on failure. If successful, the number of samples + * actually written will always be nb_samples. + */ +int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples); + +/** + * Peek data from an AVAudioFifo. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param af AVAudioFifo to read from + * @param data audio data plane pointers + * @param nb_samples number of samples to peek + * @return number of samples actually peek, or negative AVERROR code + * on failure. The number of samples actually peek will not + * be greater than nb_samples, and will only be less than + * nb_samples if av_audio_fifo_size is less than nb_samples. + */ +int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples); + +/** + * Peek data from an AVAudioFifo. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param af AVAudioFifo to read from + * @param data audio data plane pointers + * @param nb_samples number of samples to peek + * @param offset offset from current read position + * @return number of samples actually peek, or negative AVERROR code + * on failure. The number of samples actually peek will not + * be greater than nb_samples, and will only be less than + * nb_samples if av_audio_fifo_size is less than nb_samples. + */ +int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset); + +/** + * Read data from an AVAudioFifo. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param af AVAudioFifo to read from + * @param data audio data plane pointers + * @param nb_samples number of samples to read + * @return number of samples actually read, or negative AVERROR code + * on failure. The number of samples actually read will not + * be greater than nb_samples, and will only be less than + * nb_samples if av_audio_fifo_size is less than nb_samples. + */ +int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples); + +/** + * Drain data from an AVAudioFifo. + * + * Removes the data without reading it. + * + * @param af AVAudioFifo to drain + * @param nb_samples number of samples to drain + * @return 0 if OK, or negative AVERROR code on failure + */ +int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples); + +/** + * Reset the AVAudioFifo buffer. + * + * This empties all data in the buffer. + * + * @param af AVAudioFifo to reset + */ +void av_audio_fifo_reset(AVAudioFifo *af); + +/** + * Get the current number of samples in the AVAudioFifo available for reading. + * + * @param af the AVAudioFifo to query + * @return number of samples available for reading + */ +int av_audio_fifo_size(AVAudioFifo *af); + +/** + * Get the current number of samples in the AVAudioFifo available for writing. + * + * @param af the AVAudioFifo to query + * @return number of samples available for writing + */ +int av_audio_fifo_space(AVAudioFifo *af); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_AUDIO_FIFO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avassert.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avassert.h new file mode 100644 index 00000000..9abeadea --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avassert.h @@ -0,0 +1,75 @@ +/* + * copyright (c) 2010 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * simple assert() macros that are a bit more flexible than ISO C assert(). + * @author Michael Niedermayer + */ + +#ifndef AVUTIL_AVASSERT_H +#define AVUTIL_AVASSERT_H + +#include +#include "avutil.h" +#include "log.h" + +/** + * assert() equivalent, that is always enabled. + */ +#define av_assert0(cond) do { \ + if (!(cond)) { \ + av_log(NULL, AV_LOG_PANIC, "Assertion %s failed at %s:%d\n", \ + AV_STRINGIFY(cond), __FILE__, __LINE__); \ + abort(); \ + } \ +} while (0) + + +/** + * assert() equivalent, that does not lie in speed critical code. + * These asserts() thus can be enabled without fearing speed loss. + */ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0 +#define av_assert1(cond) av_assert0(cond) +#else +#define av_assert1(cond) ((void)0) +#endif + + +/** + * assert() equivalent, that does lie in speed critical code. + */ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 +#define av_assert2(cond) av_assert0(cond) +#define av_assert2_fpu() av_assert0_fpu() +#else +#define av_assert2(cond) ((void)0) +#define av_assert2_fpu() ((void)0) +#endif + +/** + * Assert that floating point operations can be executed. + * + * This will av_assert0() that the cpu is not in MMX state on X86 + */ +void av_assert0_fpu(void); + +#endif /* AVUTIL_AVASSERT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avconfig.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avconfig.h new file mode 100644 index 00000000..c289fbb5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avconfig.h @@ -0,0 +1,6 @@ +/* Generated by ffmpeg configure */ +#ifndef AVUTIL_AVCONFIG_H +#define AVUTIL_AVCONFIG_H +#define AV_HAVE_BIGENDIAN 0 +#define AV_HAVE_FAST_UNALIGNED 1 +#endif /* AVUTIL_AVCONFIG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/bswap.h new file mode 100644 index 00000000..e79d53f3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/bswap.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AVR32_BSWAP_H +#define AVUTIL_AVR32_BSWAP_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#if HAVE_INLINE_ASM + +#define av_bswap16 av_bswap16 +static av_always_inline av_const uint16_t av_bswap16(uint16_t x) +{ + __asm__ ("swap.bh %0" : "+r"(x)); + return x; +} + +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + __asm__ ("swap.b %0" : "+r"(x)); + return x; +} + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_AVR32_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/intreadwrite.h new file mode 100644 index 00000000..95179f1d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avr32/intreadwrite.h @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AVR32_INTREADWRITE_H +#define AVUTIL_AVR32_INTREADWRITE_H + +#include +#include "config.h" +#include "libavutil/bswap.h" + +/* + * AVR32 does not support unaligned memory accesses, except for the AP + * series which supports unaligned 32-bit loads and stores. 16-bit + * and 64-bit accesses must be aligned to 16 and 32 bits, respectively. + * This means we cannot use the byte-swapping load/store instructions + * here. + * + * For 16-bit, 24-bit, and (on UC series) 32-bit loads, we instead use + * the LDINS.B instruction, which gcc fails to utilise with the + * generic code. GCC also fails to use plain LD.W and ST.W even for + * AP processors, so we override the generic code. The 64-bit + * versions are improved by using our optimised 32-bit functions. + */ + +#define AV_RL16 AV_RL16 +static av_always_inline uint16_t AV_RL16(const void *p) +{ + uint16_t v; + __asm__ ("ld.ub %0, %1 \n\t" + "ldins.b %0:l, %2 \n\t" + : "=&r"(v) + : "m"(*(const uint8_t*)p), "RKs12"(*((const uint8_t*)p+1))); + return v; +} + +#define AV_RB16 AV_RB16 +static av_always_inline uint16_t AV_RB16(const void *p) +{ + uint16_t v; + __asm__ ("ld.ub %0, %2 \n\t" + "ldins.b %0:l, %1 \n\t" + : "=&r"(v) + : "RKs12"(*(const uint8_t*)p), "m"(*((const uint8_t*)p+1))); + return v; +} + +#define AV_RB24 AV_RB24 +static av_always_inline uint32_t AV_RB24(const void *p) +{ + uint32_t v; + __asm__ ("ld.ub %0, %3 \n\t" + "ldins.b %0:l, %2 \n\t" + "ldins.b %0:u, %1 \n\t" + : "=&r"(v) + : "RKs12"(* (const uint8_t*)p), + "RKs12"(*((const uint8_t*)p+1)), + "m" (*((const uint8_t*)p+2))); + return v; +} + +#define AV_RL24 AV_RL24 +static av_always_inline uint32_t AV_RL24(const void *p) +{ + uint32_t v; + __asm__ ("ld.ub %0, %1 \n\t" + "ldins.b %0:l, %2 \n\t" + "ldins.b %0:u, %3 \n\t" + : "=&r"(v) + : "m" (* (const uint8_t*)p), + "RKs12"(*((const uint8_t*)p+1)), + "RKs12"(*((const uint8_t*)p+2))); + return v; +} + +#if ARCH_AVR32_AP + +#define AV_RB32 AV_RB32 +static av_always_inline uint32_t AV_RB32(const void *p) +{ + uint32_t v; + __asm__ ("ld.w %0, %1" : "=r"(v) : "m"(*(const uint32_t*)p)); + return v; +} + +#define AV_WB32 AV_WB32 +static av_always_inline void AV_WB32(void *p, uint32_t v) +{ + __asm__ ("st.w %0, %1" : "=m"(*(uint32_t*)p) : "r"(v)); +} + +/* These two would be defined by generic code, but we need them sooner. */ +#define AV_RL32(p) av_bswap32(AV_RB32(p)) +#define AV_WL32(p, v) AV_WB32(p, av_bswap32(v)) + +#define AV_WB64 AV_WB64 +static av_always_inline void AV_WB64(void *p, uint64_t v) +{ + union { uint64_t v; uint32_t hl[2]; } vv = { v }; + AV_WB32(p, vv.hl[0]); + AV_WB32((uint32_t*)p+1, vv.hl[1]); +} + +#define AV_WL64 AV_WL64 +static av_always_inline void AV_WL64(void *p, uint64_t v) +{ + union { uint64_t v; uint32_t hl[2]; } vv = { v }; + AV_WL32(p, vv.hl[1]); + AV_WL32((uint32_t*)p+1, vv.hl[0]); +} + +#else /* ARCH_AVR32_AP */ + +#define AV_RB32 AV_RB32 +static av_always_inline uint32_t AV_RB32(const void *p) +{ + uint32_t v; + __asm__ ("ld.ub %0, %4 \n\t" + "ldins.b %0:l, %3 \n\t" + "ldins.b %0:u, %2 \n\t" + "ldins.b %0:t, %1 \n\t" + : "=&r"(v) + : "RKs12"(* (const uint8_t*)p), + "RKs12"(*((const uint8_t*)p+1)), + "RKs12"(*((const uint8_t*)p+2)), + "m" (*((const uint8_t*)p+3))); + return v; +} + +#define AV_RL32 AV_RL32 +static av_always_inline uint32_t AV_RL32(const void *p) +{ + uint32_t v; + __asm__ ("ld.ub %0, %1 \n\t" + "ldins.b %0:l, %2 \n\t" + "ldins.b %0:u, %3 \n\t" + "ldins.b %0:t, %4 \n\t" + : "=&r"(v) + : "m" (* (const uint8_t*)p), + "RKs12"(*((const uint8_t*)p+1)), + "RKs12"(*((const uint8_t*)p+2)), + "RKs12"(*((const uint8_t*)p+3))); + return v; +} + +#endif /* ARCH_AVR32_AP */ + +#define AV_RB64 AV_RB64 +static av_always_inline uint64_t AV_RB64(const void *p) +{ + union { uint64_t v; uint32_t hl[2]; } v; + v.hl[0] = AV_RB32(p); + v.hl[1] = AV_RB32((const uint32_t*)p+1); + return v.v; +} + +#define AV_RL64 AV_RL64 +static av_always_inline uint64_t AV_RL64(const void *p) +{ + union { uint64_t v; uint32_t hl[2]; } v; + v.hl[1] = AV_RL32(p); + v.hl[0] = AV_RL32((const uint32_t*)p+1); + return v.v; +} + +#endif /* AVUTIL_AVR32_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avstring.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avstring.h new file mode 100644 index 00000000..274335cf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avstring.h @@ -0,0 +1,418 @@ +/* + * Copyright (c) 2007 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AVSTRING_H +#define AVUTIL_AVSTRING_H + +#include +#include +#include "attributes.h" + +/** + * @addtogroup lavu_string + * @{ + */ + +/** + * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to + * the address of the first character in str after the prefix. + * + * @param str input string + * @param pfx prefix to test + * @param ptr updated if the prefix is matched inside str + * @return non-zero if the prefix matches, zero otherwise + */ +int av_strstart(const char *str, const char *pfx, const char **ptr); + +/** + * Return non-zero if pfx is a prefix of str independent of case. If + * it is, *ptr is set to the address of the first character in str + * after the prefix. + * + * @param str input string + * @param pfx prefix to test + * @param ptr updated if the prefix is matched inside str + * @return non-zero if the prefix matches, zero otherwise + */ +int av_stristart(const char *str, const char *pfx, const char **ptr); + +/** + * Locate the first case-independent occurrence in the string haystack + * of the string needle. A zero-length string needle is considered to + * match at the start of haystack. + * + * This function is a case-insensitive version of the standard strstr(). + * + * @param haystack string to search in + * @param needle string to search for + * @return pointer to the located match within haystack + * or a null pointer if no match + */ +char *av_stristr(const char *haystack, const char *needle); + +/** + * Locate the first occurrence of the string needle in the string haystack + * where not more than hay_length characters are searched. A zero-length + * string needle is considered to match at the start of haystack. + * + * This function is a length-limited version of the standard strstr(). + * + * @param haystack string to search in + * @param needle string to search for + * @param hay_length length of string to search in + * @return pointer to the located match within haystack + * or a null pointer if no match + */ +char *av_strnstr(const char *haystack, const char *needle, size_t hay_length); + +/** + * Copy the string src to dst, but no more than size - 1 bytes, and + * null-terminate dst. + * + * This function is the same as BSD strlcpy(). + * + * @param dst destination buffer + * @param src source string + * @param size size of destination buffer + * @return the length of src + * + * @warning since the return value is the length of src, src absolutely + * _must_ be a properly 0-terminated string, otherwise this will read beyond + * the end of the buffer and possibly crash. + */ +size_t av_strlcpy(char *dst, const char *src, size_t size); + +/** + * Append the string src to the string dst, but to a total length of + * no more than size - 1 bytes, and null-terminate dst. + * + * This function is similar to BSD strlcat(), but differs when + * size <= strlen(dst). + * + * @param dst destination buffer + * @param src source string + * @param size size of destination buffer + * @return the total length of src and dst + * + * @warning since the return value use the length of src and dst, these + * absolutely _must_ be a properly 0-terminated strings, otherwise this + * will read beyond the end of the buffer and possibly crash. + */ +size_t av_strlcat(char *dst, const char *src, size_t size); + +/** + * Append output to a string, according to a format. Never write out of + * the destination buffer, and always put a terminating 0 within + * the buffer. + * @param dst destination buffer (string to which the output is + * appended) + * @param size total size of the destination buffer + * @param fmt printf-compatible format string, specifying how the + * following parameters are used + * @return the length of the string that would have been generated + * if enough space had been available + */ +size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4); + +/** + * Get the count of continuous non zero chars starting from the beginning. + * + * @param len maximum number of characters to check in the string, that + * is the maximum value which is returned by the function + */ +static inline size_t av_strnlen(const char *s, size_t len) +{ + size_t i; + for (i = 0; i < len && s[i]; i++) + ; + return i; +} + +/** + * Print arguments following specified format into a large enough auto + * allocated buffer. It is similar to GNU asprintf(). + * @param fmt printf-compatible format string, specifying how the + * following parameters are used. + * @return the allocated string + * @note You have to free the string yourself with av_free(). + */ +char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2); + +/** + * Convert a number to an av_malloced string. + */ +char *av_d2str(double d); + +/** + * Unescape the given string until a non escaped terminating char, + * and return the token corresponding to the unescaped string. + * + * The normal \ and ' escaping is supported. Leading and trailing + * whitespaces are removed, unless they are escaped with '\' or are + * enclosed between ''. + * + * @param buf the buffer to parse, buf will be updated to point to the + * terminating char + * @param term a 0-terminated list of terminating chars + * @return the malloced unescaped string, which must be av_freed by + * the user, NULL in case of allocation failure + */ +char *av_get_token(const char **buf, const char *term); + +/** + * Split the string into several tokens which can be accessed by + * successive calls to av_strtok(). + * + * A token is defined as a sequence of characters not belonging to the + * set specified in delim. + * + * On the first call to av_strtok(), s should point to the string to + * parse, and the value of saveptr is ignored. In subsequent calls, s + * should be NULL, and saveptr should be unchanged since the previous + * call. + * + * This function is similar to strtok_r() defined in POSIX.1. + * + * @param s the string to parse, may be NULL + * @param delim 0-terminated list of token delimiters, must be non-NULL + * @param saveptr user-provided pointer which points to stored + * information necessary for av_strtok() to continue scanning the same + * string. saveptr is updated to point to the next character after the + * first delimiter found, or to NULL if the string was terminated + * @return the found token, or NULL when no token is found + */ +char *av_strtok(char *s, const char *delim, char **saveptr); + +/** + * Locale-independent conversion of ASCII isdigit. + */ +static inline av_const int av_isdigit(int c) +{ + return c >= '0' && c <= '9'; +} + +/** + * Locale-independent conversion of ASCII isgraph. + */ +static inline av_const int av_isgraph(int c) +{ + return c > 32 && c < 127; +} + +/** + * Locale-independent conversion of ASCII isspace. + */ +static inline av_const int av_isspace(int c) +{ + return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || + c == '\v'; +} + +/** + * Locale-independent conversion of ASCII characters to uppercase. + */ +static inline av_const int av_toupper(int c) +{ + if (c >= 'a' && c <= 'z') + c ^= 0x20; + return c; +} + +/** + * Locale-independent conversion of ASCII characters to lowercase. + */ +static inline av_const int av_tolower(int c) +{ + if (c >= 'A' && c <= 'Z') + c ^= 0x20; + return c; +} + +/** + * Locale-independent conversion of ASCII isxdigit. + */ +static inline av_const int av_isxdigit(int c) +{ + c = av_tolower(c); + return av_isdigit(c) || (c >= 'a' && c <= 'f'); +} + +/** + * Locale-independent case-insensitive compare. + * @note This means only ASCII-range characters are case-insensitive + */ +int av_strcasecmp(const char *a, const char *b); + +/** + * Locale-independent case-insensitive compare. + * @note This means only ASCII-range characters are case-insensitive + */ +int av_strncasecmp(const char *a, const char *b, size_t n); + +/** + * Locale-independent strings replace. + * @note This means only ASCII-range characters are replace + */ +char *av_strireplace(const char *str, const char *from, const char *to); + +/** + * Thread safe basename. + * @param path the string to parse, on DOS both \ and / are considered separators. + * @return pointer to the basename substring. + * If path does not contain a slash, the function returns a copy of path. + * If path is a NULL pointer or points to an empty string, a pointer + * to a string "." is returned. + */ +const char *av_basename(const char *path); + +/** + * Thread safe dirname. + * @param path the string to parse, on DOS both \ and / are considered separators. + * @return A pointer to a string that's the parent directory of path. + * If path is a NULL pointer or points to an empty string, a pointer + * to a string "." is returned. + * @note the function may modify the contents of the path, so copies should be passed. + */ +const char *av_dirname(char *path); + +/** + * Match instances of a name in a comma-separated list of names. + * List entries are checked from the start to the end of the names list, + * the first match ends further processing. If an entry prefixed with '-' + * matches, then 0 is returned. The "ALL" list entry is considered to + * match all names. + * + * @param name Name to look for. + * @param names List of names. + * @return 1 on match, 0 otherwise. + */ +int av_match_name(const char *name, const char *names); + +/** + * Append path component to the existing path. + * Path separator '/' is placed between when needed. + * Resulting string have to be freed with av_free(). + * @param path base path + * @param component component to be appended + * @return new path or NULL on error. + */ +char *av_append_path_component(const char *path, const char *component); + +enum AVEscapeMode { + AV_ESCAPE_MODE_AUTO, ///< Use auto-selected escaping mode. + AV_ESCAPE_MODE_BACKSLASH, ///< Use backslash escaping. + AV_ESCAPE_MODE_QUOTE, ///< Use single-quote escaping. +}; + +/** + * Consider spaces special and escape them even in the middle of the + * string. + * + * This is equivalent to adding the whitespace characters to the special + * characters lists, except it is guaranteed to use the exact same list + * of whitespace characters as the rest of libavutil. + */ +#define AV_ESCAPE_FLAG_WHITESPACE (1 << 0) + +/** + * Escape only specified special characters. + * Without this flag, escape also any characters that may be considered + * special by av_get_token(), such as the single quote. + */ +#define AV_ESCAPE_FLAG_STRICT (1 << 1) + +/** + * Escape string in src, and put the escaped string in an allocated + * string in *dst, which must be freed with av_free(). + * + * @param dst pointer where an allocated string is put + * @param src string to escape, must be non-NULL + * @param special_chars string containing the special characters which + * need to be escaped, can be NULL + * @param mode escape mode to employ, see AV_ESCAPE_MODE_* macros. + * Any unknown value for mode will be considered equivalent to + * AV_ESCAPE_MODE_BACKSLASH, but this behaviour can change without + * notice. + * @param flags flags which control how to escape, see AV_ESCAPE_FLAG_ macros + * @return the length of the allocated string, or a negative error code in case of error + * @see av_bprint_escape() + */ +av_warn_unused_result +int av_escape(char **dst, const char *src, const char *special_chars, + enum AVEscapeMode mode, int flags); + +#define AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES 1 ///< accept codepoints over 0x10FFFF +#define AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS 2 ///< accept non-characters - 0xFFFE and 0xFFFF +#define AV_UTF8_FLAG_ACCEPT_SURROGATES 4 ///< accept UTF-16 surrogates codes +#define AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES 8 ///< exclude control codes not accepted by XML + +#define AV_UTF8_FLAG_ACCEPT_ALL \ + AV_UTF8_FLAG_ACCEPT_INVALID_BIG_CODES|AV_UTF8_FLAG_ACCEPT_NON_CHARACTERS|AV_UTF8_FLAG_ACCEPT_SURROGATES + +/** + * Read and decode a single UTF-8 code point (character) from the + * buffer in *buf, and update *buf to point to the next byte to + * decode. + * + * In case of an invalid byte sequence, the pointer will be updated to + * the next byte after the invalid sequence and the function will + * return an error code. + * + * Depending on the specified flags, the function will also fail in + * case the decoded code point does not belong to a valid range. + * + * @note For speed-relevant code a carefully implemented use of + * GET_UTF8() may be preferred. + * + * @param codep pointer used to return the parsed code in case of success. + * The value in *codep is set even in case the range check fails. + * @param bufp pointer to the address the first byte of the sequence + * to decode, updated by the function to point to the + * byte next after the decoded sequence + * @param buf_end pointer to the end of the buffer, points to the next + * byte past the last in the buffer. This is used to + * avoid buffer overreads (in case of an unfinished + * UTF-8 sequence towards the end of the buffer). + * @param flags a collection of AV_UTF8_FLAG_* flags + * @return >= 0 in case a sequence was successfully read, a negative + * value in case of invalid sequence + */ +av_warn_unused_result +int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end, + unsigned int flags); + +/** + * Check if a name is in a list. + * @returns 0 if not found, or the 1 based index where it has been found in the + * list. + */ +int av_match_list(const char *name, const char *list, char separator); + +/** + * See libc sscanf manual for more information. + * Locale-independent sscanf implementation. + */ +int av_sscanf(const char *string, const char *format, ...); + +/** + * @} + */ + +#endif /* AVUTIL_AVSTRING_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avutil.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avutil.h new file mode 100644 index 00000000..4d633156 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/avutil.h @@ -0,0 +1,365 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_AVUTIL_H +#define AVUTIL_AVUTIL_H + +/** + * @file + * @ingroup lavu + * Convenience header that includes @ref lavu "libavutil"'s core. + */ + +/** + * @mainpage + * + * @section ffmpeg_intro Introduction + * + * This document describes the usage of the different libraries + * provided by FFmpeg. + * + * @li @ref libavc "libavcodec" encoding/decoding library + * @li @ref lavfi "libavfilter" graph-based frame editing library + * @li @ref libavf "libavformat" I/O and muxing/demuxing library + * @li @ref lavd "libavdevice" special devices muxing/demuxing library + * @li @ref lavu "libavutil" common utility library + * @li @ref lswr "libswresample" audio resampling, format conversion and mixing + * @li @ref lpp "libpostproc" post processing library + * @li @ref libsws "libswscale" color conversion and scaling library + * + * @section ffmpeg_versioning Versioning and compatibility + * + * Each of the FFmpeg libraries contains a version.h header, which defines a + * major, minor and micro version number with the + * LIBRARYNAME_VERSION_{MAJOR,MINOR,MICRO} macros. The major version + * number is incremented with backward incompatible changes - e.g. removing + * parts of the public API, reordering public struct members, etc. The minor + * version number is incremented for backward compatible API changes or major + * new features - e.g. adding a new public function or a new decoder. The micro + * version number is incremented for smaller changes that a calling program + * might still want to check for - e.g. changing behavior in a previously + * unspecified situation. + * + * FFmpeg guarantees backward API and ABI compatibility for each library as long + * as its major version number is unchanged. This means that no public symbols + * will be removed or renamed. Types and names of the public struct members and + * values of public macros and enums will remain the same (unless they were + * explicitly declared as not part of the public API). Documented behavior will + * not change. + * + * In other words, any correct program that works with a given FFmpeg snapshot + * should work just as well without any changes with any later snapshot with the + * same major versions. This applies to both rebuilding the program against new + * FFmpeg versions or to replacing the dynamic FFmpeg libraries that a program + * links against. + * + * However, new public symbols may be added and new members may be appended to + * public structs whose size is not part of public ABI (most public structs in + * FFmpeg). New macros and enum values may be added. Behavior in undocumented + * situations may change slightly (and be documented). All those are accompanied + * by an entry in doc/APIchanges and incrementing either the minor or micro + * version number. + */ + +/** + * @defgroup lavu libavutil + * Common code shared across all FFmpeg libraries. + * + * @note + * libavutil is designed to be modular. In most cases, in order to use the + * functions provided by one component of libavutil you must explicitly include + * the specific header containing that feature. If you are only using + * media-related components, you could simply include libavutil/avutil.h, which + * brings in most of the "core" components. + * + * @{ + * + * @defgroup lavu_crypto Crypto and Hashing + * + * @{ + * @} + * + * @defgroup lavu_math Mathematics + * @{ + * + * @} + * + * @defgroup lavu_string String Manipulation + * + * @{ + * + * @} + * + * @defgroup lavu_mem Memory Management + * + * @{ + * + * @} + * + * @defgroup lavu_data Data Structures + * @{ + * + * @} + * + * @defgroup lavu_video Video related + * + * @{ + * + * @} + * + * @defgroup lavu_audio Audio related + * + * @{ + * + * @} + * + * @defgroup lavu_error Error Codes + * + * @{ + * + * @} + * + * @defgroup lavu_log Logging Facility + * + * @{ + * + * @} + * + * @defgroup lavu_misc Other + * + * @{ + * + * @defgroup preproc_misc Preprocessor String Macros + * + * @{ + * + * @} + * + * @defgroup version_utils Library Version Macros + * + * @{ + * + * @} + */ + + +/** + * @addtogroup lavu_ver + * @{ + */ + +/** + * Return the LIBAVUTIL_VERSION_INT constant. + */ +unsigned avutil_version(void); + +/** + * Return an informative version string. This usually is the actual release + * version number or a git commit description. This string has no fixed format + * and can change any time. It should never be parsed by code. + */ +const char *av_version_info(void); + +/** + * Return the libavutil build-time configuration. + */ +const char *avutil_configuration(void); + +/** + * Return the libavutil license. + */ +const char *avutil_license(void); + +/** + * @} + */ + +/** + * @addtogroup lavu_media Media Type + * @brief Media Type + */ + +enum AVMediaType { + AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA + AVMEDIA_TYPE_VIDEO, + AVMEDIA_TYPE_AUDIO, + AVMEDIA_TYPE_DATA, ///< Opaque data information usually continuous + AVMEDIA_TYPE_SUBTITLE, + AVMEDIA_TYPE_ATTACHMENT, ///< Opaque data information usually sparse + AVMEDIA_TYPE_NB +}; + +/** + * Return a string describing the media_type enum, NULL if media_type + * is unknown. + */ +const char *av_get_media_type_string(enum AVMediaType media_type); + +/** + * @defgroup lavu_const Constants + * @{ + * + * @defgroup lavu_enc Encoding specific + * + * @note those definition should move to avcodec + * @{ + */ + +#define FF_LAMBDA_SHIFT 7 +#define FF_LAMBDA_SCALE (1< + +/** + * @defgroup lavu_base64 Base64 + * @ingroup lavu_crypto + * @{ + */ + +/** + * Decode a base64-encoded string. + * + * @param out buffer for decoded data + * @param in null-terminated input string + * @param out_size size in bytes of the out buffer, must be at + * least 3/4 of the length of in, that is AV_BASE64_DECODE_SIZE(strlen(in)) + * @return number of bytes written, or a negative value in case of + * invalid input + */ +int av_base64_decode(uint8_t *out, const char *in, int out_size); + +/** + * Calculate the output size in bytes needed to decode a base64 string + * with length x to a data buffer. + */ +#define AV_BASE64_DECODE_SIZE(x) ((x) * 3LL / 4) + +/** + * Encode data to base64 and null-terminate. + * + * @param out buffer for encoded data + * @param out_size size in bytes of the out buffer (including the + * null terminator), must be at least AV_BASE64_SIZE(in_size) + * @param in input buffer containing the data to encode + * @param in_size size in bytes of the in buffer + * @return out or NULL in case of error + */ +char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); + +/** + * Calculate the output size needed to base64-encode x bytes to a + * null-terminated string. + */ +#define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) + + /** + * @} + */ + +#endif /* AVUTIL_BASE64_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/bswap.h new file mode 100644 index 00000000..363ed40b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/bswap.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2007 Marc Hoffman + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * byte swapping routines + */ + +#ifndef AVUTIL_BFIN_BSWAP_H +#define AVUTIL_BFIN_BSWAP_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + unsigned tmp; + __asm__("%1 = %0 >> 8 (V); \n\t" + "%0 = %0 << 8 (V); \n\t" + "%0 = %0 | %1; \n\t" + "%0 = PACK(%0.L, %0.H); \n\t" + : "+d"(x), "=&d"(tmp)); + return x; +} + +#endif /* AVUTIL_BFIN_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/timer.h new file mode 100644 index 00000000..644573da --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bfin/timer.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2007 Marc Hoffman + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_BFIN_TIMER_H +#define AVUTIL_BFIN_TIMER_H + +#include + +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + union { + struct { + unsigned lo; + unsigned hi; + } p; + unsigned long long c; + } t; + __asm__ volatile ("%0=cycles; %1=cycles2;" : "=d" (t.p.lo), "=d" (t.p.hi)); + return t.c; +} + +#endif /* AVUTIL_BFIN_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/blowfish.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/blowfish.h new file mode 100644 index 00000000..9e289a40 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/blowfish.h @@ -0,0 +1,82 @@ +/* + * Blowfish algorithm + * Copyright (c) 2012 Samuel Pitoiset + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_BLOWFISH_H +#define AVUTIL_BLOWFISH_H + +#include + +/** + * @defgroup lavu_blowfish Blowfish + * @ingroup lavu_crypto + * @{ + */ + +#define AV_BF_ROUNDS 16 + +typedef struct AVBlowfish { + uint32_t p[AV_BF_ROUNDS + 2]; + uint32_t s[4][256]; +} AVBlowfish; + +/** + * Allocate an AVBlowfish context. + */ +AVBlowfish *av_blowfish_alloc(void); + +/** + * Initialize an AVBlowfish context. + * + * @param ctx an AVBlowfish context + * @param key a key + * @param key_len length of the key + */ +void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len); + +/** + * Encrypt or decrypt a buffer using a previously initialized context. + * + * @param ctx an AVBlowfish context + * @param xl left four bytes halves of input to be encrypted + * @param xr right four bytes halves of input to be encrypted + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr, + int decrypt); + +/** + * Encrypt or decrypt a buffer using a previously initialized context. + * + * @param ctx an AVBlowfish context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, if NULL ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt); + +/** + * @} + */ + +#endif /* AVUTIL_BLOWFISH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bprint.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bprint.h new file mode 100644 index 00000000..c09b1ac1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bprint.h @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2012 Nicolas George + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_BPRINT_H +#define AVUTIL_BPRINT_H + +#include + +#include "attributes.h" +#include "avstring.h" + +/** + * Define a structure with extra padding to a fixed size + * This helps ensuring binary compatibility with future versions. + */ + +#define FF_PAD_STRUCTURE(name, size, ...) \ +struct ff_pad_helper_##name { __VA_ARGS__ }; \ +typedef struct name { \ + __VA_ARGS__ \ + char reserved_padding[size - sizeof(struct ff_pad_helper_##name)]; \ +} name; + +/** + * Buffer to print data progressively + * + * The string buffer grows as necessary and is always 0-terminated. + * The content of the string is never accessed, and thus is + * encoding-agnostic and can even hold binary data. + * + * Small buffers are kept in the structure itself, and thus require no + * memory allocation at all (unless the contents of the buffer is needed + * after the structure goes out of scope). This is almost as lightweight as + * declaring a local "char buf[512]". + * + * The length of the string can go beyond the allocated size: the buffer is + * then truncated, but the functions still keep account of the actual total + * length. + * + * In other words, buf->len can be greater than buf->size and records the + * total length of what would have been to the buffer if there had been + * enough memory. + * + * Append operations do not need to be tested for failure: if a memory + * allocation fails, data stop being appended to the buffer, but the length + * is still updated. This situation can be tested with + * av_bprint_is_complete(). + * + * The size_max field determines several possible behaviours: + * + * size_max = -1 (= UINT_MAX) or any large value will let the buffer be + * reallocated as necessary, with an amortized linear cost. + * + * size_max = 0 prevents writing anything to the buffer: only the total + * length is computed. The write operations can then possibly be repeated in + * a buffer with exactly the necessary size + * (using size_init = size_max = len + 1). + * + * size_max = 1 is automatically replaced by the exact size available in the + * structure itself, thus ensuring no dynamic memory allocation. The + * internal buffer is large enough to hold a reasonable paragraph of text, + * such as the current paragraph. + */ + +FF_PAD_STRUCTURE(AVBPrint, 1024, + char *str; /**< string so far */ + unsigned len; /**< length so far */ + unsigned size; /**< allocated memory */ + unsigned size_max; /**< maximum allocated memory */ + char reserved_internal_buffer[1]; +) + +/** + * Convenience macros for special values for av_bprint_init() size_max + * parameter. + */ +#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1) +#define AV_BPRINT_SIZE_AUTOMATIC 1 +#define AV_BPRINT_SIZE_COUNT_ONLY 0 + +/** + * Init a print buffer. + * + * @param buf buffer to init + * @param size_init initial size (including the final 0) + * @param size_max maximum size; + * 0 means do not write anything, just count the length; + * 1 is replaced by the maximum value for automatic storage; + * any large value means that the internal buffer will be + * reallocated as needed up to that limit; -1 is converted to + * UINT_MAX, the largest limit possible. + * Check also AV_BPRINT_SIZE_* macros. + */ +void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max); + +/** + * Init a print buffer using a pre-existing buffer. + * + * The buffer will not be reallocated. + * + * @param buf buffer structure to init + * @param buffer byte buffer to use for the string data + * @param size size of buffer + */ +void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size); + +/** + * Append a formatted string to a print buffer. + */ +void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); + +/** + * Append a formatted string to a print buffer. + */ +void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg); + +/** + * Append char c n times to a print buffer. + */ +void av_bprint_chars(AVBPrint *buf, char c, unsigned n); + +/** + * Append data to a print buffer. + * + * param buf bprint buffer to use + * param data pointer to data + * param size size of data + */ +void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size); + +struct tm; +/** + * Append a formatted date and time to a print buffer. + * + * param buf bprint buffer to use + * param fmt date and time format string, see strftime() + * param tm broken-down time structure to translate + * + * @note due to poor design of the standard strftime function, it may + * produce poor results if the format string expands to a very long text and + * the bprint buffer is near the limit stated by the size_max option. + */ +void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm); + +/** + * Allocate bytes in the buffer for external use. + * + * @param[in] buf buffer structure + * @param[in] size required size + * @param[out] mem pointer to the memory area + * @param[out] actual_size size of the memory area after allocation; + * can be larger or smaller than size + */ +void av_bprint_get_buffer(AVBPrint *buf, unsigned size, + unsigned char **mem, unsigned *actual_size); + +/** + * Reset the string to "" but keep internal allocated data. + */ +void av_bprint_clear(AVBPrint *buf); + +/** + * Test if the print buffer is complete (not truncated). + * + * It may have been truncated due to a memory allocation failure + * or the size_max limit (compare size and size_max if necessary). + */ +static inline int av_bprint_is_complete(const AVBPrint *buf) +{ + return buf->len < buf->size; +} + +/** + * Finalize a print buffer. + * + * The print buffer can no longer be used afterwards, + * but the len and size fields are still valid. + * + * @arg[out] ret_str if not NULL, used to return a permanent copy of the + * buffer contents, or NULL if memory allocation fails; + * if NULL, the buffer is discarded and freed + * @return 0 for success or error code (probably AVERROR(ENOMEM)) + */ +int av_bprint_finalize(AVBPrint *buf, char **ret_str); + +/** + * Escape the content in src and append it to dstbuf. + * + * @param dstbuf already inited destination bprint buffer + * @param src string containing the text to escape + * @param special_chars string containing the special characters which + * need to be escaped, can be NULL + * @param mode escape mode to employ, see AV_ESCAPE_MODE_* macros. + * Any unknown value for mode will be considered equivalent to + * AV_ESCAPE_MODE_BACKSLASH, but this behaviour can change without + * notice. + * @param flags flags which control how to escape, see AV_ESCAPE_FLAG_* macros + */ +void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, + enum AVEscapeMode mode, int flags); + +#endif /* AVUTIL_BPRINT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bswap.h new file mode 100644 index 00000000..91cb7953 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/bswap.h @@ -0,0 +1,109 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * byte swapping routines + */ + +#ifndef AVUTIL_BSWAP_H +#define AVUTIL_BSWAP_H + +#include +#include "libavutil/avconfig.h" +#include "attributes.h" + +#ifdef HAVE_AV_CONFIG_H + +#include "config.h" + +#if ARCH_AARCH64 +# include "aarch64/bswap.h" +#elif ARCH_ARM +# include "arm/bswap.h" +#elif ARCH_AVR32 +# include "avr32/bswap.h" +#elif ARCH_SH4 +# include "sh4/bswap.h" +#elif ARCH_X86 +# include "x86/bswap.h" +#endif + +#endif /* HAVE_AV_CONFIG_H */ + +#define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff)) +#define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16)) +#define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32)) + +#define AV_BSWAPC(s, x) AV_BSWAP##s##C(x) + +#ifndef av_bswap16 +static av_always_inline av_const uint16_t av_bswap16(uint16_t x) +{ + x= (x>>8) | (x<<8); + return x; +} +#endif + +#ifndef av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + return AV_BSWAP32C(x); +} +#endif + +#ifndef av_bswap64 +static inline uint64_t av_const av_bswap64(uint64_t x) +{ + return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32); +} +#endif + +// be2ne ... big-endian to native-endian +// le2ne ... little-endian to native-endian + +#if AV_HAVE_BIGENDIAN +#define av_be2ne16(x) (x) +#define av_be2ne32(x) (x) +#define av_be2ne64(x) (x) +#define av_le2ne16(x) av_bswap16(x) +#define av_le2ne32(x) av_bswap32(x) +#define av_le2ne64(x) av_bswap64(x) +#define AV_BE2NEC(s, x) (x) +#define AV_LE2NEC(s, x) AV_BSWAPC(s, x) +#else +#define av_be2ne16(x) av_bswap16(x) +#define av_be2ne32(x) av_bswap32(x) +#define av_be2ne64(x) av_bswap64(x) +#define av_le2ne16(x) (x) +#define av_le2ne32(x) (x) +#define av_le2ne64(x) (x) +#define AV_BE2NEC(s, x) AV_BSWAPC(s, x) +#define AV_LE2NEC(s, x) (x) +#endif + +#define AV_BE2NE16C(x) AV_BE2NEC(16, x) +#define AV_BE2NE32C(x) AV_BE2NEC(32, x) +#define AV_BE2NE64C(x) AV_BE2NEC(64, x) +#define AV_LE2NE16C(x) AV_LE2NEC(16, x) +#define AV_LE2NE32C(x) AV_LE2NEC(32, x) +#define AV_LE2NE64C(x) AV_LE2NEC(64, x) + +#endif /* AVUTIL_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer.h new file mode 100644 index 00000000..c0f3f6cc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer.h @@ -0,0 +1,305 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_buffer + * refcounted data buffer API + */ + +#ifndef AVUTIL_BUFFER_H +#define AVUTIL_BUFFER_H + +#include + +/** + * @defgroup lavu_buffer AVBuffer + * @ingroup lavu_data + * + * @{ + * AVBuffer is an API for reference-counted data buffers. + * + * There are two core objects in this API -- AVBuffer and AVBufferRef. AVBuffer + * represents the data buffer itself; it is opaque and not meant to be accessed + * by the caller directly, but only through AVBufferRef. However, the caller may + * e.g. compare two AVBuffer pointers to check whether two different references + * are describing the same data buffer. AVBufferRef represents a single + * reference to an AVBuffer and it is the object that may be manipulated by the + * caller directly. + * + * There are two functions provided for creating a new AVBuffer with a single + * reference -- av_buffer_alloc() to just allocate a new buffer, and + * av_buffer_create() to wrap an existing array in an AVBuffer. From an existing + * reference, additional references may be created with av_buffer_ref(). + * Use av_buffer_unref() to free a reference (this will automatically free the + * data once all the references are freed). + * + * The convention throughout this API and the rest of FFmpeg is such that the + * buffer is considered writable if there exists only one reference to it (and + * it has not been marked as read-only). The av_buffer_is_writable() function is + * provided to check whether this is true and av_buffer_make_writable() will + * automatically create a new writable buffer when necessary. + * Of course nothing prevents the calling code from violating this convention, + * however that is safe only when all the existing references are under its + * control. + * + * @note Referencing and unreferencing the buffers is thread-safe and thus + * may be done from multiple threads simultaneously without any need for + * additional locking. + * + * @note Two different references to the same buffer can point to different + * parts of the buffer (i.e. their AVBufferRef.data will not be equal). + */ + +/** + * A reference counted buffer type. It is opaque and is meant to be used through + * references (AVBufferRef). + */ +typedef struct AVBuffer AVBuffer; + +/** + * A reference to a data buffer. + * + * The size of this struct is not a part of the public ABI and it is not meant + * to be allocated directly. + */ +typedef struct AVBufferRef { + AVBuffer *buffer; + + /** + * The data buffer. It is considered writable if and only if + * this is the only reference to the buffer, in which case + * av_buffer_is_writable() returns 1. + */ + uint8_t *data; + /** + * Size of data in bytes. + */ + int size; +} AVBufferRef; + +/** + * Allocate an AVBuffer of the given size using av_malloc(). + * + * @return an AVBufferRef of given size or NULL when out of memory + */ +AVBufferRef *av_buffer_alloc(int size); + +/** + * Same as av_buffer_alloc(), except the returned buffer will be initialized + * to zero. + */ +AVBufferRef *av_buffer_allocz(int size); + +/** + * Always treat the buffer as read-only, even when it has only one + * reference. + */ +#define AV_BUFFER_FLAG_READONLY (1 << 0) + +/** + * Create an AVBuffer from an existing array. + * + * If this function is successful, data is owned by the AVBuffer. The caller may + * only access data through the returned AVBufferRef and references derived from + * it. + * If this function fails, data is left untouched. + * @param data data array + * @param size size of data in bytes + * @param free a callback for freeing this buffer's data + * @param opaque parameter to be got for processing or passed to free + * @param flags a combination of AV_BUFFER_FLAG_* + * + * @return an AVBufferRef referring to data on success, NULL on failure. + */ +AVBufferRef *av_buffer_create(uint8_t *data, int size, + void (*free)(void *opaque, uint8_t *data), + void *opaque, int flags); + +/** + * Default free callback, which calls av_free() on the buffer data. + * This function is meant to be passed to av_buffer_create(), not called + * directly. + */ +void av_buffer_default_free(void *opaque, uint8_t *data); + +/** + * Create a new reference to an AVBuffer. + * + * @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on + * failure. + */ +AVBufferRef *av_buffer_ref(AVBufferRef *buf); + +/** + * Free a given reference and automatically free the buffer if there are no more + * references to it. + * + * @param buf the reference to be freed. The pointer is set to NULL on return. + */ +void av_buffer_unref(AVBufferRef **buf); + +/** + * @return 1 if the caller may write to the data referred to by buf (which is + * true if and only if buf is the only reference to the underlying AVBuffer). + * Return 0 otherwise. + * A positive answer is valid until av_buffer_ref() is called on buf. + */ +int av_buffer_is_writable(const AVBufferRef *buf); + +/** + * @return the opaque parameter set by av_buffer_create. + */ +void *av_buffer_get_opaque(const AVBufferRef *buf); + +int av_buffer_get_ref_count(const AVBufferRef *buf); + +/** + * Create a writable reference from a given buffer reference, avoiding data copy + * if possible. + * + * @param buf buffer reference to make writable. On success, buf is either left + * untouched, or it is unreferenced and a new writable AVBufferRef is + * written in its place. On failure, buf is left untouched. + * @return 0 on success, a negative AVERROR on failure. + */ +int av_buffer_make_writable(AVBufferRef **buf); + +/** + * Reallocate a given buffer. + * + * @param buf a buffer reference to reallocate. On success, buf will be + * unreferenced and a new reference with the required size will be + * written in its place. On failure buf will be left untouched. *buf + * may be NULL, then a new buffer is allocated. + * @param size required new buffer size. + * @return 0 on success, a negative AVERROR on failure. + * + * @note the buffer is actually reallocated with av_realloc() only if it was + * initially allocated through av_buffer_realloc(NULL) and there is only one + * reference to it (i.e. the one passed to this function). In all other cases + * a new buffer is allocated and the data is copied. + */ +int av_buffer_realloc(AVBufferRef **buf, int size); + +/** + * @} + */ + +/** + * @defgroup lavu_bufferpool AVBufferPool + * @ingroup lavu_data + * + * @{ + * AVBufferPool is an API for a lock-free thread-safe pool of AVBuffers. + * + * Frequently allocating and freeing large buffers may be slow. AVBufferPool is + * meant to solve this in cases when the caller needs a set of buffers of the + * same size (the most obvious use case being buffers for raw video or audio + * frames). + * + * At the beginning, the user must call av_buffer_pool_init() to create the + * buffer pool. Then whenever a buffer is needed, call av_buffer_pool_get() to + * get a reference to a new buffer, similar to av_buffer_alloc(). This new + * reference works in all aspects the same way as the one created by + * av_buffer_alloc(). However, when the last reference to this buffer is + * unreferenced, it is returned to the pool instead of being freed and will be + * reused for subsequent av_buffer_pool_get() calls. + * + * When the caller is done with the pool and no longer needs to allocate any new + * buffers, av_buffer_pool_uninit() must be called to mark the pool as freeable. + * Once all the buffers are released, it will automatically be freed. + * + * Allocating and releasing buffers with this API is thread-safe as long as + * either the default alloc callback is used, or the user-supplied one is + * thread-safe. + */ + +/** + * The buffer pool. This structure is opaque and not meant to be accessed + * directly. It is allocated with av_buffer_pool_init() and freed with + * av_buffer_pool_uninit(). + */ +typedef struct AVBufferPool AVBufferPool; + +/** + * Allocate and initialize a buffer pool. + * + * @param size size of each buffer in this pool + * @param alloc a function that will be used to allocate new buffers when the + * pool is empty. May be NULL, then the default allocator will be used + * (av_buffer_alloc()). + * @return newly created buffer pool on success, NULL on error. + */ +AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size)); + +/** + * Allocate and initialize a buffer pool with a more complex allocator. + * + * @param size size of each buffer in this pool + * @param opaque arbitrary user data used by the allocator + * @param alloc a function that will be used to allocate new buffers when the + * pool is empty. May be NULL, then the default allocator will be + * used (av_buffer_alloc()). + * @param pool_free a function that will be called immediately before the pool + * is freed. I.e. after av_buffer_pool_uninit() is called + * by the caller and all the frames are returned to the pool + * and freed. It is intended to uninitialize the user opaque + * data. May be NULL. + * @return newly created buffer pool on success, NULL on error. + */ +AVBufferPool *av_buffer_pool_init2(int size, void *opaque, + AVBufferRef* (*alloc)(void *opaque, int size), + void (*pool_free)(void *opaque)); + +/** + * Mark the pool as being available for freeing. It will actually be freed only + * once all the allocated buffers associated with the pool are released. Thus it + * is safe to call this function while some of the allocated buffers are still + * in use. + * + * @param pool pointer to the pool to be freed. It will be set to NULL. + */ +void av_buffer_pool_uninit(AVBufferPool **pool); + +/** + * Allocate a new AVBuffer, reusing an old buffer from the pool when available. + * This function may be called simultaneously from multiple threads. + * + * @return a reference to the new buffer on success, NULL on error. + */ +AVBufferRef *av_buffer_pool_get(AVBufferPool *pool); + +/** + * Query the original opaque parameter of an allocated buffer in the pool. + * + * @param ref a buffer reference to a buffer returned by av_buffer_pool_get. + * @return the opaque parameter set by the buffer allocator function of the + * buffer pool. + * + * @note the opaque parameter of ref is used by the buffer pool implementation, + * therefore you have to use this function to access the original opaque + * parameter of an allocated buffer. + */ +void *av_buffer_pool_buffer_get_opaque(AVBufferRef *ref); + +/** + * @} + */ + +#endif /* AVUTIL_BUFFER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer_internal.h new file mode 100644 index 00000000..70d2615a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/buffer_internal.h @@ -0,0 +1,99 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_BUFFER_INTERNAL_H +#define AVUTIL_BUFFER_INTERNAL_H + +#include +#include + +#include "buffer.h" +#include "thread.h" + +/** + * The buffer was av_realloc()ed, so it is reallocatable. + */ +#define BUFFER_FLAG_REALLOCATABLE (1 << 0) + +struct AVBuffer { + uint8_t *data; /**< data described by this buffer */ + int size; /**< size of data in bytes */ + + /** + * number of existing AVBufferRef instances referring to this buffer + */ + atomic_uint refcount; + + /** + * a callback for freeing the data + */ + void (*free)(void *opaque, uint8_t *data); + + /** + * an opaque pointer, to be used by the freeing callback + */ + void *opaque; + + /** + * A combination of AV_BUFFER_FLAG_* + */ + int flags; + + /** + * A combination of BUFFER_FLAG_* + */ + int flags_internal; +}; + +typedef struct BufferPoolEntry { + uint8_t *data; + + /* + * Backups of the original opaque/free of the AVBuffer corresponding to + * data. They will be used to free the buffer when the pool is freed. + */ + void *opaque; + void (*free)(void *opaque, uint8_t *data); + + AVBufferPool *pool; + struct BufferPoolEntry *next; +} BufferPoolEntry; + +struct AVBufferPool { + AVMutex mutex; + BufferPoolEntry *pool; + + /* + * This is used to track when the pool is to be freed. + * The pointer to the pool itself held by the caller is considered to + * be one reference. Each buffer requested by the caller increases refcount + * by one, returning the buffer to the pool decreases it by one. + * refcount reaches zero when the buffer has been uninited AND all the + * buffers have been released, then it's safe to free the pool and all + * the buffers in it. + */ + atomic_uint refcount; + + int size; + void *opaque; + AVBufferRef* (*alloc)(int size); + AVBufferRef* (*alloc2)(void *opaque, int size); + void (*pool_free)(void *opaque); +}; + +#endif /* AVUTIL_BUFFER_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/camellia.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/camellia.h new file mode 100644 index 00000000..e674c9b9 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/camellia.h @@ -0,0 +1,70 @@ +/* + * An implementation of the CAMELLIA algorithm as mentioned in RFC3713 + * Copyright (c) 2014 Supraja Meedinti + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_CAMELLIA_H +#define AVUTIL_CAMELLIA_H + +#include + + +/** + * @file + * @brief Public header for libavutil CAMELLIA algorithm + * @defgroup lavu_camellia CAMELLIA + * @ingroup lavu_crypto + * @{ + */ + +extern const int av_camellia_size; + +struct AVCAMELLIA; + +/** + * Allocate an AVCAMELLIA context + * To free the struct: av_free(ptr) + */ +struct AVCAMELLIA *av_camellia_alloc(void); + +/** + * Initialize an AVCAMELLIA context. + * + * @param ctx an AVCAMELLIA context + * @param key a key of 16, 24, 32 bytes used for encryption/decryption + * @param key_bits number of keybits: possible are 128, 192, 256 + */ +int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits); + +/** + * Encrypt or decrypt a buffer using a previously initialized context + * + * @param ctx an AVCAMELLIA context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 16 byte blocks + * @paran iv initialization vector for CBC mode, NULL for ECB mode + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); + +/** + * @} + */ +#endif /* AVUTIL_CAMELLIA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cast5.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cast5.h new file mode 100644 index 00000000..ad5b347e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cast5.h @@ -0,0 +1,80 @@ +/* + * An implementation of the CAST128 algorithm as mentioned in RFC2144 + * Copyright (c) 2014 Supraja Meedinti + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_CAST5_H +#define AVUTIL_CAST5_H + +#include + + +/** + * @file + * @brief Public header for libavutil CAST5 algorithm + * @defgroup lavu_cast5 CAST5 + * @ingroup lavu_crypto + * @{ + */ + +extern const int av_cast5_size; + +struct AVCAST5; + +/** + * Allocate an AVCAST5 context + * To free the struct: av_free(ptr) + */ +struct AVCAST5 *av_cast5_alloc(void); +/** + * Initialize an AVCAST5 context. + * + * @param ctx an AVCAST5 context + * @param key a key of 5,6,...16 bytes used for encryption/decryption + * @param key_bits number of keybits: possible are 40,48,...,128 + * @return 0 on success, less than 0 on failure + */ +int av_cast5_init(struct AVCAST5 *ctx, const uint8_t *key, int key_bits); + +/** + * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only + * + * @param ctx an AVCAST5 context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt); + +/** + * Encrypt or decrypt a buffer using a previously initialized context + * + * @param ctx an AVCAST5 context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, NULL for ECB mode + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); +/** + * @} + */ +#endif /* AVUTIL_CAST5_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/channel_layout.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/channel_layout.h new file mode 100644 index 00000000..50bb8f03 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/channel_layout.h @@ -0,0 +1,232 @@ +/* + * Copyright (c) 2006 Michael Niedermayer + * Copyright (c) 2008 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_CHANNEL_LAYOUT_H +#define AVUTIL_CHANNEL_LAYOUT_H + +#include + +/** + * @file + * audio channel layout utility functions + */ + +/** + * @addtogroup lavu_audio + * @{ + */ + +/** + * @defgroup channel_masks Audio channel masks + * + * A channel layout is a 64-bits integer with a bit set for every channel. + * The number of bits set must be equal to the number of channels. + * The value 0 means that the channel layout is not known. + * @note this data structure is not powerful enough to handle channels + * combinations that have the same channel multiple times, such as + * dual-mono. + * + * @{ + */ +#define AV_CH_FRONT_LEFT 0x00000001 +#define AV_CH_FRONT_RIGHT 0x00000002 +#define AV_CH_FRONT_CENTER 0x00000004 +#define AV_CH_LOW_FREQUENCY 0x00000008 +#define AV_CH_BACK_LEFT 0x00000010 +#define AV_CH_BACK_RIGHT 0x00000020 +#define AV_CH_FRONT_LEFT_OF_CENTER 0x00000040 +#define AV_CH_FRONT_RIGHT_OF_CENTER 0x00000080 +#define AV_CH_BACK_CENTER 0x00000100 +#define AV_CH_SIDE_LEFT 0x00000200 +#define AV_CH_SIDE_RIGHT 0x00000400 +#define AV_CH_TOP_CENTER 0x00000800 +#define AV_CH_TOP_FRONT_LEFT 0x00001000 +#define AV_CH_TOP_FRONT_CENTER 0x00002000 +#define AV_CH_TOP_FRONT_RIGHT 0x00004000 +#define AV_CH_TOP_BACK_LEFT 0x00008000 +#define AV_CH_TOP_BACK_CENTER 0x00010000 +#define AV_CH_TOP_BACK_RIGHT 0x00020000 +#define AV_CH_STEREO_LEFT 0x20000000 ///< Stereo downmix. +#define AV_CH_STEREO_RIGHT 0x40000000 ///< See AV_CH_STEREO_LEFT. +#define AV_CH_WIDE_LEFT 0x0000000080000000ULL +#define AV_CH_WIDE_RIGHT 0x0000000100000000ULL +#define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL +#define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL +#define AV_CH_LOW_FREQUENCY_2 0x0000000800000000ULL + +/** Channel mask value used for AVCodecContext.request_channel_layout + to indicate that the user requests the channel order of the decoder output + to be the native codec channel order. */ +#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL + +/** + * @} + * @defgroup channel_mask_c Audio channel layouts + * @{ + * */ +#define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER) +#define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT) +#define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER) +#define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT) +#define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT) +#define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER) +#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY) +#define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) +#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT) + +enum AVMatrixEncoding { + AV_MATRIX_ENCODING_NONE, + AV_MATRIX_ENCODING_DOLBY, + AV_MATRIX_ENCODING_DPLII, + AV_MATRIX_ENCODING_DPLIIX, + AV_MATRIX_ENCODING_DPLIIZ, + AV_MATRIX_ENCODING_DOLBYEX, + AV_MATRIX_ENCODING_DOLBYHEADPHONE, + AV_MATRIX_ENCODING_NB +}; + +/** + * Return a channel layout id that matches name, or 0 if no match is found. + * + * name can be one or several of the following notations, + * separated by '+' or '|': + * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0, + * 5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix); + * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC, + * SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR); + * - a number of channels, in decimal, followed by 'c', yielding + * the default channel layout for that number of channels (@see + * av_get_default_channel_layout); + * - a channel layout mask, in hexadecimal starting with "0x" (see the + * AV_CH_* macros). + * + * Example: "stereo+FC" = "2c+FC" = "2c+1c" = "0x7" + */ +uint64_t av_get_channel_layout(const char *name); + +/** + * Return a channel layout and the number of channels based on the specified name. + * + * This function is similar to (@see av_get_channel_layout), but can also parse + * unknown channel layout specifications. + * + * @param[in] name channel layout specification string + * @param[out] channel_layout parsed channel layout (0 if unknown) + * @param[out] nb_channels number of channels + * + * @return 0 on success, AVERROR(EINVAL) if the parsing fails. + */ +int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels); + +/** + * Return a description of a channel layout. + * If nb_channels is <= 0, it is guessed from the channel_layout. + * + * @param buf put here the string containing the channel layout + * @param buf_size size in bytes of the buffer + */ +void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout); + +struct AVBPrint; +/** + * Append a description of a channel layout to a bprint buffer. + */ +void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout); + +/** + * Return the number of channels in the channel layout. + */ +int av_get_channel_layout_nb_channels(uint64_t channel_layout); + +/** + * Return default channel layout for a given number of channels. + */ +int64_t av_get_default_channel_layout(int nb_channels); + +/** + * Get the index of a channel in channel_layout. + * + * @param channel a channel layout describing exactly one channel which must be + * present in channel_layout. + * + * @return index of channel in channel_layout on success, a negative AVERROR + * on error. + */ +int av_get_channel_layout_channel_index(uint64_t channel_layout, + uint64_t channel); + +/** + * Get the channel with the given index in channel_layout. + */ +uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index); + +/** + * Get the name of a given channel. + * + * @return channel name on success, NULL on error. + */ +const char *av_get_channel_name(uint64_t channel); + +/** + * Get the description of a given channel. + * + * @param channel a channel layout with a single channel + * @return channel description on success, NULL on error + */ +const char *av_get_channel_description(uint64_t channel); + +/** + * Get the value and name of a standard channel layout. + * + * @param[in] index index in an internal list, starting at 0 + * @param[out] layout channel layout mask + * @param[out] name name of the layout + * @return 0 if the layout exists, + * <0 if index is beyond the limits + */ +int av_get_standard_channel_layout(unsigned index, uint64_t *layout, + const char **name); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_CHANNEL_LAYOUT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/color_utils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/color_utils.h new file mode 100644 index 00000000..95290064 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/color_utils.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015 Kevin Wheatley + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_COLOR_UTILS_H +#define AVUTIL_COLOR_UTILS_H + + +#include "libavutil/pixfmt.h" + +/** + * Determine a suitable 'gamma' value to match the supplied + * AVColorTransferCharacteristic. + * + * See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html) + * + * @return Will return an approximation to the simple gamma function matching + * the supplied Transfer Characteristic, Will return 0.0 for any + * we cannot reasonably match against. + */ +double avpriv_get_gamma_from_trc(enum AVColorTransferCharacteristic trc); + + +typedef double (*avpriv_trc_function)(double); + +/** + * Determine the function needed to apply the given + * AVColorTransferCharacteristic to linear input. + * + * The function returned should expect a nominal domain and range of [0.0-1.0] + * values outside of this range maybe valid depending on the chosen + * characteristic function. + * + * @return Will return pointer to the function matching the + * supplied Transfer Characteristic. If unspecified will + * return NULL: + */ +avpriv_trc_function avpriv_get_trc_function_from_trc(enum AVColorTransferCharacteristic trc); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/colorspace.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/colorspace.h new file mode 100644 index 00000000..ef6f6107 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/colorspace.h @@ -0,0 +1,150 @@ +/* + * Colorspace conversion defines + * Copyright (c) 2001, 2002, 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Various defines for YUV<->RGB conversion + */ + +#ifndef AVUTIL_COLORSPACE_H +#define AVUTIL_COLORSPACE_H + +#define SCALEBITS 10 +#define ONE_HALF (1 << (SCALEBITS - 1)) +#define FIX(x) ((int) ((x) * (1<> SCALEBITS];\ + g = cm[(y + g_add) >> SCALEBITS];\ + b = cm[(y + b_add) >> SCALEBITS];\ +} + +#define YUV_TO_RGB1(cb1, cr1)\ +{\ + cb = (cb1) - 128;\ + cr = (cr1) - 128;\ + r_add = FIX(1.40200) * cr + ONE_HALF;\ + g_add = - FIX(0.34414) * cb - FIX(0.71414) * cr + ONE_HALF;\ + b_add = FIX(1.77200) * cb + ONE_HALF;\ +} + +#define YUV_TO_RGB2(r, g, b, y1)\ +{\ + y = (y1) << SCALEBITS;\ + r = cm[(y + r_add) >> SCALEBITS];\ + g = cm[(y + g_add) >> SCALEBITS];\ + b = cm[(y + b_add) >> SCALEBITS];\ +} + +#define Y_CCIR_TO_JPEG(y)\ + cm[((y) * FIX(255.0/219.0) + (ONE_HALF - 16 * FIX(255.0/219.0))) >> SCALEBITS] + +#define Y_JPEG_TO_CCIR(y)\ + (((y) * FIX(219.0/255.0) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS) + +#define C_CCIR_TO_JPEG(y)\ + cm[(((y) - 128) * FIX(127.0/112.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS] + +/* NOTE: the clamp is really necessary! */ +static inline int C_JPEG_TO_CCIR(int y) { + y = (((y - 128) * FIX(112.0/127.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS); + if (y < 16) + y = 16; + return y; +} + + +#define RGB_TO_Y_CCIR(r, g, b) \ +((FIX(0.29900*219.0/255.0) * (r) + FIX(0.58700*219.0/255.0) * (g) + \ + FIX(0.11400*219.0/255.0) * (b) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS) + +#define RGB_TO_U_CCIR(r1, g1, b1, shift)\ +(((- FIX(0.16874*224.0/255.0) * r1 - FIX(0.33126*224.0/255.0) * g1 + \ + FIX(0.50000*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) + +#define RGB_TO_V_CCIR(r1, g1, b1, shift)\ +(((FIX(0.50000*224.0/255.0) * r1 - FIX(0.41869*224.0/255.0) * g1 - \ + FIX(0.08131*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) + +#define RGB_TO_Y_JPEG(r, g, b) \ +(FFMIN((FIX(0.29900) * (r) + FIX(0.58700) * (g) + \ + FIX(0.11400) * (b) + (ONE_HALF)) >> SCALEBITS, 255)) + +#define RGB_TO_U_JPEG(r1, g1, b1)\ +(((- FIX(0.16874) * r1 - FIX(0.33126) * g1 + \ + FIX(0.50000) * b1 + (ONE_HALF) - 1) >> (SCALEBITS)) + 128) + +#define RGB_TO_V_JPEG(r1, g1, b1)\ +(((FIX(0.50000) * r1 - FIX(0.41869) * g1 - \ + FIX(0.08131) * b1 + (ONE_HALF) - 1) >> (SCALEBITS)) + 128) + +// Conversion macros for 8-bit RGB to YUV +// Derived from ITU-R BT.709-6 (06/2015) Item 3.5 +// https://www.itu.int/rec/R-REC-BT.709-6-201506-I/en + +#define RGB_TO_Y_BT709(r, g, b) \ +((FIX(0.21260*219.0/255.0) * (r) + FIX(0.71520*219.0/255.0) * (g) + \ + FIX(0.07220*219.0/255.0) * (b) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS) + +#define RGB_TO_U_BT709(r1, g1, b1, shift)\ +(((- FIX(0.11457*224.0/255.0) * r1 - FIX(0.38543*224.0/255.0) * g1 + \ + FIX(0.50000*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) + +#define RGB_TO_V_BT709(r1, g1, b1, shift)\ +(((FIX(0.50000*224.0/255.0) * r1 - FIX(0.45415*224.0/255.0) * g1 - \ + FIX(0.04585*224.0/255.0) * b1 + (ONE_HALF << shift) - 1) >> (SCALEBITS + shift)) + 128) + +#define RGB_TO_Y_BT709_FULL(r, g, b) \ +(FFMIN((FIX(0.21260) * (r) + FIX(0.71520) * (g) + \ + FIX(0.07220) * (b) + (ONE_HALF)) >> SCALEBITS, 255)) + +#define RGB_TO_U_BT709_FULL(r1, g1, b1)\ +(((- FIX(0.11457) * r1 - FIX(0.38543) * g1 + \ + FIX(0.50000) * b1 + (ONE_HALF) - 1) >> (SCALEBITS)) + 128) + +#define RGB_TO_V_BT709_FULL(r1, g1, b1)\ +(((FIX(0.50000) * r1 - FIX(0.45415) * g1 - \ + FIX(0.04585) * b1 + (ONE_HALF) - 1) >> (SCALEBITS)) + 128) + +#endif /* AVUTIL_COLORSPACE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/common.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/common.h new file mode 100644 index 00000000..92b721a5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/common.h @@ -0,0 +1,608 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * common internal and external API header + */ + +#ifndef AVUTIL_COMMON_H +#define AVUTIL_COMMON_H + +#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) && !defined(UINT64_C) +#error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "attributes.h" +#include "macros.h" +#include "version.h" +#include "libavutil/avconfig.h" + +#if AV_HAVE_BIGENDIAN +# define AV_NE(be, le) (be) +#else +# define AV_NE(be, le) (le) +#endif + +//rounded division & shift +#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) +/* assume b>0 */ +#define ROUNDED_DIV(a,b) (((a)>=0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) +/* Fast a/(1<=0 and b>=0 */ +#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \ + : ((a) + (1<<(b)) - 1) >> (b)) +/* Backwards compat. */ +#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT + +#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b)) +#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b)) + +/** + * Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they + * are not representable as absolute values of their type. This is the same + * as with *abs() + * @see FFNABS() + */ +#define FFABS(a) ((a) >= 0 ? (a) : (-(a))) +#define FFSIGN(a) ((a) > 0 ? 1 : -1) + +/** + * Negative Absolute value. + * this works for all integers of all types. + * As with many macros, this evaluates its argument twice, it thus must not have + * a sideeffect, that is FFNABS(x++) has undefined behavior. + */ +#define FFNABS(a) ((a) <= 0 ? (a) : (-(a))) + +/** + * Comparator. + * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0 + * if x == y. This is useful for instance in a qsort comparator callback. + * Furthermore, compilers are able to optimize this to branchless code, and + * there is no risk of overflow with signed types. + * As with many macros, this evaluates its argument multiple times, it thus + * must not have a side-effect. + */ +#define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y))) + +#define FFMAX(a,b) ((a) > (b) ? (a) : (b)) +#define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c) +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) +#define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c) + +#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) +#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) + +/* misc math functions */ + +#ifdef HAVE_AV_CONFIG_H +# include "config.h" +# include "intmath.h" +#endif + +/* Pull in unguarded fallback defines at the end of this file. */ +#include "common.h" + +#ifndef av_log2 +av_const int av_log2(unsigned v); +#endif + +#ifndef av_log2_16bit +av_const int av_log2_16bit(unsigned v); +#endif + +/** + * Clip a signed integer value into the amin-amax range. + * @param a value to clip + * @param amin minimum value of the clip range + * @param amax maximum value of the clip range + * @return clipped value + */ +static av_always_inline av_const int av_clip_c(int a, int amin, int amax) +{ +#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + if (a < amin) return amin; + else if (a > amax) return amax; + else return a; +} + +/** + * Clip a signed 64bit integer value into the amin-amax range. + * @param a value to clip + * @param amin minimum value of the clip range + * @param amax maximum value of the clip range + * @return clipped value + */ +static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax) +{ +#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + if (a < amin) return amin; + else if (a > amax) return amax; + else return a; +} + +/** + * Clip a signed integer value into the 0-255 range. + * @param a value to clip + * @return clipped value + */ +static av_always_inline av_const uint8_t av_clip_uint8_c(int a) +{ + if (a&(~0xFF)) return (~a)>>31; + else return a; +} + +/** + * Clip a signed integer value into the -128,127 range. + * @param a value to clip + * @return clipped value + */ +static av_always_inline av_const int8_t av_clip_int8_c(int a) +{ + if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F; + else return a; +} + +/** + * Clip a signed integer value into the 0-65535 range. + * @param a value to clip + * @return clipped value + */ +static av_always_inline av_const uint16_t av_clip_uint16_c(int a) +{ + if (a&(~0xFFFF)) return (~a)>>31; + else return a; +} + +/** + * Clip a signed integer value into the -32768,32767 range. + * @param a value to clip + * @return clipped value + */ +static av_always_inline av_const int16_t av_clip_int16_c(int a) +{ + if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF; + else return a; +} + +/** + * Clip a signed 64-bit integer value into the -2147483648,2147483647 range. + * @param a value to clip + * @return clipped value + */ +static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a) +{ + if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF); + else return (int32_t)a; +} + +/** + * Clip a signed integer into the -(2^p),(2^p-1) range. + * @param a value to clip + * @param p bit position to clip at + * @return clipped value + */ +static av_always_inline av_const int av_clip_intp2_c(int a, int p) +{ + if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) + return (a >> 31) ^ ((1 << p) - 1); + else + return a; +} + +/** + * Clip a signed integer to an unsigned power of two range. + * @param a value to clip + * @param p bit position to clip at + * @return clipped value + */ +static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p) +{ + if (a & ~((1<> 31 & ((1<= 0 && a >= INT64_MAX - b) + return INT64_MAX; + if (b <= 0 && a <= INT64_MIN - b) + return INT64_MIN; + return a + b; +#endif +} + +/** + * Subtract two signed 64-bit values with saturation. + * + * @param a one value + * @param b another value + * @return difference with signed saturation + */ +static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b) { +#if (!defined(__INTEL_COMPILER) && AV_GCC_VERSION_AT_LEAST(5,1)) || AV_HAS_BUILTIN(__builtin_sub_overflow) + int64_t tmp; + return !__builtin_sub_overflow(a, b, &tmp) ? tmp : (tmp < 0 ? INT64_MAX : INT64_MIN); +#else + if (b <= 0 && a >= INT64_MAX + b) + return INT64_MAX; + if (b >= 0 && a <= INT64_MIN + b) + return INT64_MIN; + return a - b; +#endif +} + +/** + * Clip a float value into the amin-amax range. + * @param a value to clip + * @param amin minimum value of the clip range + * @param amax maximum value of the clip range + * @return clipped value + */ +static av_always_inline av_const float av_clipf_c(float a, float amin, float amax) +{ +#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + if (a < amin) return amin; + else if (a > amax) return amax; + else return a; +} + +/** + * Clip a double value into the amin-amax range. + * @param a value to clip + * @param amin minimum value of the clip range + * @param amax maximum value of the clip range + * @return clipped value + */ +static av_always_inline av_const double av_clipd_c(double a, double amin, double amax) +{ +#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + if (a < amin) return amin; + else if (a > amax) return amax; + else return a; +} + +/** Compute ceil(log2(x)). + * @param x value used to compute ceil(log2(x)) + * @return computed ceiling of log2(x) + */ +static av_always_inline av_const int av_ceil_log2_c(int x) +{ + return av_log2((x - 1U) << 1); +} + +/** + * Count number of bits set to one in x + * @param x value to count bits of + * @return the number of bits set to one in x + */ +static av_always_inline av_const int av_popcount_c(uint32_t x) +{ + x -= (x >> 1) & 0x55555555; + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + x = (x + (x >> 4)) & 0x0F0F0F0F; + x += x >> 8; + return (x + (x >> 16)) & 0x3F; +} + +/** + * Count number of bits set to one in x + * @param x value to count bits of + * @return the number of bits set to one in x + */ +static av_always_inline av_const int av_popcount64_c(uint64_t x) +{ + return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32)); +} + +static av_always_inline av_const int av_parity_c(uint32_t v) +{ + return av_popcount(v) & 1; +} + +#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24)) +#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((unsigned)(a) << 24)) + +/** + * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form. + * + * @param val Output value, must be an lvalue of type uint32_t. + * @param GET_BYTE Expression reading one byte from the input. + * Evaluated up to 7 times (4 for the currently + * assigned Unicode range). With a memory buffer + * input, this could be *ptr++, or if you want to make sure + * that *ptr stops at the end of a NULL terminated string then + * *ptr ? *ptr++ : 0 + * @param ERROR Expression to be evaluated on invalid input, + * typically a goto statement. + * + * @warning ERROR should not contain a loop control statement which + * could interact with the internal while loop, and should force an + * exit from the macro code (e.g. through a goto or a return) in order + * to prevent undefined results. + */ +#define GET_UTF8(val, GET_BYTE, ERROR)\ + val= (GET_BYTE);\ + {\ + uint32_t top = (val & 128) >> 1;\ + if ((val & 0xc0) == 0x80 || val >= 0xFE)\ + {ERROR}\ + while (val & top) {\ + unsigned int tmp = (GET_BYTE) - 128;\ + if(tmp>>6)\ + {ERROR}\ + val= (val<<6) + tmp;\ + top <<= 5;\ + }\ + val &= (top << 1) - 1;\ + } + +/** + * Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form. + * + * @param val Output value, must be an lvalue of type uint32_t. + * @param GET_16BIT Expression returning two bytes of UTF-16 data converted + * to native byte order. Evaluated one or two times. + * @param ERROR Expression to be evaluated on invalid input, + * typically a goto statement. + */ +#define GET_UTF16(val, GET_16BIT, ERROR)\ + val = (GET_16BIT);\ + {\ + unsigned int hi = val - 0xD800;\ + if (hi < 0x800) {\ + val = (GET_16BIT) - 0xDC00;\ + if (val > 0x3FFU || hi > 0x3FFU)\ + {ERROR}\ + val += (hi<<10) + 0x10000;\ + }\ + }\ + +/** + * @def PUT_UTF8(val, tmp, PUT_BYTE) + * Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long). + * @param val is an input-only argument and should be of type uint32_t. It holds + * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If + * val is given as a function it is executed only once. + * @param tmp is a temporary variable and should be of type uint8_t. It + * represents an intermediate value during conversion that is to be + * output by PUT_BYTE. + * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination. + * It could be a function or a statement, and uses tmp as the input byte. + * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be + * executed up to 4 times for values in the valid UTF-8 range and up to + * 7 times in the general case, depending on the length of the converted + * Unicode character. + */ +#define PUT_UTF8(val, tmp, PUT_BYTE)\ + {\ + int bytes, shift;\ + uint32_t in = val;\ + if (in < 0x80) {\ + tmp = in;\ + PUT_BYTE\ + } else {\ + bytes = (av_log2(in) + 4) / 5;\ + shift = (bytes - 1) * 6;\ + tmp = (256 - (256 >> bytes)) | (in >> shift);\ + PUT_BYTE\ + while (shift >= 6) {\ + shift -= 6;\ + tmp = 0x80 | ((in >> shift) & 0x3f);\ + PUT_BYTE\ + }\ + }\ + } + +/** + * @def PUT_UTF16(val, tmp, PUT_16BIT) + * Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes). + * @param val is an input-only argument and should be of type uint32_t. It holds + * a UCS-4 encoded Unicode character that is to be converted to UTF-16. If + * val is given as a function it is executed only once. + * @param tmp is a temporary variable and should be of type uint16_t. It + * represents an intermediate value during conversion that is to be + * output by PUT_16BIT. + * @param PUT_16BIT writes the converted UTF-16 data to any proper destination + * in desired endianness. It could be a function or a statement, and uses tmp + * as the input byte. For example, PUT_BYTE could be "*output++ = tmp;" + * PUT_BYTE will be executed 1 or 2 times depending on input character. + */ +#define PUT_UTF16(val, tmp, PUT_16BIT)\ + {\ + uint32_t in = val;\ + if (in < 0x10000) {\ + tmp = in;\ + PUT_16BIT\ + } else {\ + tmp = 0xD800 | ((in - 0x10000) >> 10);\ + PUT_16BIT\ + tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\ + PUT_16BIT\ + }\ + }\ + + + +#include "mem.h" + +#ifdef HAVE_AV_CONFIG_H +# include "internal.h" +#endif /* HAVE_AV_CONFIG_H */ + +#endif /* AVUTIL_COMMON_H */ + +/* + * The following definitions are outside the multiple inclusion guard + * to ensure they are immediately available in intmath.h. + */ + +#ifndef av_ceil_log2 +# define av_ceil_log2 av_ceil_log2_c +#endif +#ifndef av_clip +# define av_clip av_clip_c +#endif +#ifndef av_clip64 +# define av_clip64 av_clip64_c +#endif +#ifndef av_clip_uint8 +# define av_clip_uint8 av_clip_uint8_c +#endif +#ifndef av_clip_int8 +# define av_clip_int8 av_clip_int8_c +#endif +#ifndef av_clip_uint16 +# define av_clip_uint16 av_clip_uint16_c +#endif +#ifndef av_clip_int16 +# define av_clip_int16 av_clip_int16_c +#endif +#ifndef av_clipl_int32 +# define av_clipl_int32 av_clipl_int32_c +#endif +#ifndef av_clip_intp2 +# define av_clip_intp2 av_clip_intp2_c +#endif +#ifndef av_clip_uintp2 +# define av_clip_uintp2 av_clip_uintp2_c +#endif +#ifndef av_mod_uintp2 +# define av_mod_uintp2 av_mod_uintp2_c +#endif +#ifndef av_sat_add32 +# define av_sat_add32 av_sat_add32_c +#endif +#ifndef av_sat_dadd32 +# define av_sat_dadd32 av_sat_dadd32_c +#endif +#ifndef av_sat_sub32 +# define av_sat_sub32 av_sat_sub32_c +#endif +#ifndef av_sat_dsub32 +# define av_sat_dsub32 av_sat_dsub32_c +#endif +#ifndef av_sat_add64 +# define av_sat_add64 av_sat_add64_c +#endif +#ifndef av_sat_sub64 +# define av_sat_sub64 av_sat_sub64_c +#endif +#ifndef av_clipf +# define av_clipf av_clipf_c +#endif +#ifndef av_clipd +# define av_clipd av_clipd_c +#endif +#ifndef av_popcount +# define av_popcount av_popcount_c +#endif +#ifndef av_popcount64 +# define av_popcount64 av_popcount64_c +#endif +#ifndef av_parity +# define av_parity av_parity_c +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu.h new file mode 100644 index 00000000..8bb9eb60 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu.h @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_CPU_H +#define AVUTIL_CPU_H + +#include + +#include "attributes.h" + +#define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ + + /* lower 16 bits - CPU features */ +#define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX +#define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext +#define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext +#define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW +#define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions +#define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions +#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster + ///< than regular MMX/SSE (e.g. Core1) +#define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt +#define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions +#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster + ///< than regular MMX/SSE (e.g. Core1) +#define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions +#define AV_CPU_FLAG_SSSE3SLOW 0x4000000 ///< SSSE3 supported, but usually not faster +#define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower +#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions +#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions +#define AV_CPU_FLAG_AESNI 0x80000 ///< Advanced Encryption Standard functions +#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used +#define AV_CPU_FLAG_AVXSLOW 0x8000000 ///< AVX supported, but slow when using YMM registers (e.g. Bulldozer) +#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions +#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions +#define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction +#define AV_CPU_FLAG_AVX2 0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used +#define AV_CPU_FLAG_FMA3 0x10000 ///< Haswell FMA3 functions +#define AV_CPU_FLAG_BMI1 0x20000 ///< Bit Manipulation Instruction Set 1 +#define AV_CPU_FLAG_BMI2 0x40000 ///< Bit Manipulation Instruction Set 2 +#define AV_CPU_FLAG_AVX512 0x100000 ///< AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used + +#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard +#define AV_CPU_FLAG_VSX 0x0002 ///< ISA 2.06 +#define AV_CPU_FLAG_POWER8 0x0004 ///< ISA 2.07 + +#define AV_CPU_FLAG_ARMV5TE (1 << 0) +#define AV_CPU_FLAG_ARMV6 (1 << 1) +#define AV_CPU_FLAG_ARMV6T2 (1 << 2) +#define AV_CPU_FLAG_VFP (1 << 3) +#define AV_CPU_FLAG_VFPV3 (1 << 4) +#define AV_CPU_FLAG_NEON (1 << 5) +#define AV_CPU_FLAG_ARMV8 (1 << 6) +#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations +#define AV_CPU_FLAG_SETEND (1 <<16) + +/** + * Return the flags which specify extensions supported by the CPU. + * The returned value is affected by av_force_cpu_flags() if that was used + * before. So av_get_cpu_flags() can easily be used in an application to + * detect the enabled cpu flags. + */ +int av_get_cpu_flags(void); + +/** + * Disables cpu detection and forces the specified flags. + * -1 is a special case that disables forcing of specific flags. + */ +void av_force_cpu_flags(int flags); + +/** + * Set a mask on flags returned by av_get_cpu_flags(). + * This function is mainly useful for testing. + * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible + */ +attribute_deprecated void av_set_cpu_flags_mask(int mask); + +/** + * Parse CPU flags from a string. + * + * The returned flags contain the specified flags as well as related unspecified flags. + * + * This function exists only for compatibility with libav. + * Please use av_parse_cpu_caps() when possible. + * @return a combination of AV_CPU_* flags, negative on error. + */ +attribute_deprecated +int av_parse_cpu_flags(const char *s); + +/** + * Parse CPU caps from a string and update the given AV_CPU_* flags based on that. + * + * @return negative on error. + */ +int av_parse_cpu_caps(unsigned *flags, const char *s); + +/** + * @return the number of logical CPU cores present. + */ +int av_cpu_count(void); + +/** + * Get the maximum data alignment that may be required by FFmpeg. + * + * Note that this is affected by the build configuration and the CPU flags mask, + * so e.g. if the CPU supports AVX, but libavutil has been built with + * --disable-avx or the AV_CPU_FLAG_AVX flag has been disabled through + * av_set_cpu_flags_mask(), then this function will behave as if AVX is not + * present. + */ +size_t av_cpu_max_align(void); + +#endif /* AVUTIL_CPU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu_internal.h new file mode 100644 index 00000000..37122d1c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cpu_internal.h @@ -0,0 +1,54 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_CPU_INTERNAL_H +#define AVUTIL_CPU_INTERNAL_H + +#include "config.h" + +#include "cpu.h" + +#define CPUEXT_SUFFIX(flags, suffix, cpuext) \ + (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext)) + +#define CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, slow_cpuext) \ + (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ + !((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW)) + +#define CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, slow_cpuext) \ + (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext) && \ + ((flags) & AV_CPU_FLAG_ ## slow_cpuext ## SLOW)) + +#define CPUEXT_SUFFIX_FAST(flags, suffix, cpuext) CPUEXT_SUFFIX_FAST2(flags, suffix, cpuext, cpuext) +#define CPUEXT_SUFFIX_SLOW(flags, suffix, cpuext) CPUEXT_SUFFIX_SLOW2(flags, suffix, cpuext, cpuext) + +#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext) +#define CPUEXT_FAST(flags, cpuext) CPUEXT_SUFFIX_FAST(flags, , cpuext) +#define CPUEXT_SLOW(flags, cpuext) CPUEXT_SUFFIX_SLOW(flags, , cpuext) + +int ff_get_cpu_flags_aarch64(void); +int ff_get_cpu_flags_arm(void); +int ff_get_cpu_flags_ppc(void); +int ff_get_cpu_flags_x86(void); + +size_t ff_get_cpu_max_align_aarch64(void); +size_t ff_get_cpu_max_align_arm(void); +size_t ff_get_cpu_max_align_ppc(void); +size_t ff_get_cpu_max_align_x86(void); + +#endif /* AVUTIL_CPU_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/crc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/crc.h new file mode 100644 index 00000000..47e22b4c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/crc.h @@ -0,0 +1,100 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_crc32 + * Public header for CRC hash function implementation. + */ + +#ifndef AVUTIL_CRC_H +#define AVUTIL_CRC_H + +#include +#include +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_crc32 CRC + * @ingroup lavu_hash + * CRC (Cyclic Redundancy Check) hash function implementation. + * + * This module supports numerous CRC polynomials, in addition to the most + * widely used CRC-32-IEEE. See @ref AVCRCId for a list of available + * polynomials. + * + * @{ + */ + +typedef uint32_t AVCRC; + +typedef enum { + AV_CRC_8_ATM, + AV_CRC_16_ANSI, + AV_CRC_16_CCITT, + AV_CRC_32_IEEE, + AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */ + AV_CRC_16_ANSI_LE, /*< reversed bitorder version of AV_CRC_16_ANSI */ + AV_CRC_24_IEEE, + AV_CRC_8_EBU, + AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */ +}AVCRCId; + +/** + * Initialize a CRC table. + * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 + * @param le If 1, the lowest bit represents the coefficient for the highest + * exponent of the corresponding polynomial (both for poly and + * actual CRC). + * If 0, you must swap the CRC parameter and the result of av_crc + * if you need the standard representation (can be simplified in + * most cases to e.g. bswap16): + * av_bswap32(crc << (32-bits)) + * @param bits number of bits for the CRC + * @param poly generator polynomial without the x**bits coefficient, in the + * representation as specified by le + * @param ctx_size size of ctx in bytes + * @return <0 on failure + */ +int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size); + +/** + * Get an initialized standard CRC table. + * @param crc_id ID of a standard CRC + * @return a pointer to the CRC table or NULL on failure + */ +const AVCRC *av_crc_get_table(AVCRCId crc_id); + +/** + * Calculate the CRC of a block. + * @param crc CRC of previous blocks if any or initial value for CRC + * @return CRC updated with the data from the given block + * + * @see av_crc_init() "le" parameter + */ +uint32_t av_crc(const AVCRC *ctx, uint32_t crc, + const uint8_t *buffer, size_t length) av_pure; + +/** + * @} + */ + +#endif /* AVUTIL_CRC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cuda_check.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cuda_check.h new file mode 100644 index 00000000..d02ea7ee --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/cuda_check.h @@ -0,0 +1,64 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_CUDA_CHECK_H +#define AVUTIL_CUDA_CHECK_H + +typedef CUresult CUDAAPI cuda_check_GetErrorName(CUresult error, const char** pstr); +typedef CUresult CUDAAPI cuda_check_GetErrorString(CUresult error, const char** pstr); + +/** + * Wrap a CUDA function call and print error information if it fails. + */ +static inline int ff_cuda_check(void *avctx, + void *cuGetErrorName_fn, void *cuGetErrorString_fn, + CUresult err, const char *func) +{ + const char *err_name; + const char *err_string; + + av_log(avctx, AV_LOG_TRACE, "Calling %s\n", func); + + if (err == CUDA_SUCCESS) + return 0; + + ((cuda_check_GetErrorName *)cuGetErrorName_fn)(err, &err_name); + ((cuda_check_GetErrorString *)cuGetErrorString_fn)(err, &err_string); + + av_log(avctx, AV_LOG_ERROR, "%s failed", func); + if (err_name && err_string) + av_log(avctx, AV_LOG_ERROR, " -> %s: %s", err_name, err_string); + av_log(avctx, AV_LOG_ERROR, "\n"); + + return AVERROR_EXTERNAL; +} + +/** + * Convenience wrapper for ff_cuda_check when directly linking libcuda. + */ + +#define FF_CUDA_CHECK(avclass, x) ff_cuda_check(avclass, cuGetErrorName, cuGetErrorString, (x), #x) + +/** + * Convenience wrapper for ff_cuda_check when dynamically loading cuda symbols. + */ + +#define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x) + +#endif /* AVUTIL_CUDA_CHECK_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/des.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/des.h new file mode 100644 index 00000000..4cf11f5b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/des.h @@ -0,0 +1,77 @@ +/* + * DES encryption/decryption + * Copyright (c) 2007 Reimar Doeffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_DES_H +#define AVUTIL_DES_H + +#include + +/** + * @defgroup lavu_des DES + * @ingroup lavu_crypto + * @{ + */ + +typedef struct AVDES { + uint64_t round_keys[3][16]; + int triple_des; +} AVDES; + +/** + * Allocate an AVDES context. + */ +AVDES *av_des_alloc(void); + +/** + * @brief Initializes an AVDES context. + * + * @param key_bits must be 64 or 192 + * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption + * @return zero on success, negative value otherwise + */ +int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt); + +/** + * @brief Encrypts / decrypts using the DES algorithm. + * + * @param count number of 8 byte blocks + * @param dst destination array, can be equal to src, must be 8-byte aligned + * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + * @param iv initialization vector for CBC mode, if NULL then ECB will be used, + * must be 8-byte aligned + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); + +/** + * @brief Calculates CBC-MAC using the DES algorithm. + * + * @param count number of 8 byte blocks + * @param dst destination array, can be equal to src, must be 8-byte aligned + * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + */ +void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count); + +/** + * @} + */ + +#endif /* AVUTIL_DES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dict.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dict.h new file mode 100644 index 00000000..118f1f00 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dict.h @@ -0,0 +1,200 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Public dictionary API. + * @deprecated + * AVDictionary is provided for compatibility with libav. It is both in + * implementation as well as API inefficient. It does not scale and is + * extremely slow with large dictionaries. + * It is recommended that new code uses our tree container from tree.c/h + * where applicable, which uses AVL trees to achieve O(log n) performance. + */ + +#ifndef AVUTIL_DICT_H +#define AVUTIL_DICT_H + +#include + +#include "version.h" + +/** + * @addtogroup lavu_dict AVDictionary + * @ingroup lavu_data + * + * @brief Simple key:value store + * + * @{ + * Dictionaries are used for storing key:value pairs. To create + * an AVDictionary, simply pass an address of a NULL pointer to + * av_dict_set(). NULL can be used as an empty dictionary wherever + * a pointer to an AVDictionary is required. + * Use av_dict_get() to retrieve an entry or iterate over all + * entries and finally av_dict_free() to free the dictionary + * and all its contents. + * + @code + AVDictionary *d = NULL; // "create" an empty dictionary + AVDictionaryEntry *t = NULL; + + av_dict_set(&d, "foo", "bar", 0); // add an entry + + char *k = av_strdup("key"); // if your strings are already allocated, + char *v = av_strdup("value"); // you can avoid copying them like this + av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); + + while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) { + <....> // iterate over all entries in d + } + av_dict_free(&d); + @endcode + */ + +#define AV_DICT_MATCH_CASE 1 /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */ +#define AV_DICT_IGNORE_SUFFIX 2 /**< Return first entry in a dictionary whose first part corresponds to the search key, + ignoring the suffix of the found key string. Only relevant in av_dict_get(). */ +#define AV_DICT_DONT_STRDUP_KEY 4 /**< Take ownership of a key that's been + allocated with av_malloc() or another memory allocation function. */ +#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been + allocated with av_malloc() or another memory allocation function. */ +#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries. +#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no + delimiter is added, the strings are simply concatenated. */ +#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */ + +typedef struct AVDictionaryEntry { + char *key; + char *value; +} AVDictionaryEntry; + +typedef struct AVDictionary AVDictionary; + +/** + * Get a dictionary entry with matching key. + * + * The returned entry key or value must not be changed, or it will + * cause undefined behavior. + * + * To iterate through all the dictionary entries, you can set the matching key + * to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag. + * + * @param prev Set to the previous matching element to find the next. + * If set to NULL the first matching element is returned. + * @param key matching key + * @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved + * @return found entry or NULL in case no matching entry was found in the dictionary + */ +AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key, + const AVDictionaryEntry *prev, int flags); + +/** + * Get number of entries in dictionary. + * + * @param m dictionary + * @return number of entries in dictionary + */ +int av_dict_count(const AVDictionary *m); + +/** + * Set the given entry in *pm, overwriting an existing entry. + * + * Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set, + * these arguments will be freed on error. + * + * Warning: Adding a new entry to a dictionary invalidates all existing entries + * previously returned with av_dict_get. + * + * @param pm pointer to a pointer to a dictionary struct. If *pm is NULL + * a dictionary struct is allocated and put in *pm. + * @param key entry key to add to *pm (will either be av_strduped or added as a new key depending on flags) + * @param value entry value to add to *pm (will be av_strduped or added as a new key depending on flags). + * Passing a NULL value will cause an existing entry to be deleted. + * @return >= 0 on success otherwise an error code <0 + */ +int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags); + +/** + * Convenience wrapper for av_dict_set that converts the value to a string + * and stores it. + * + * Note: If AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error. + */ +int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags); + +/** + * Parse the key/value pairs list and add the parsed entries to a dictionary. + * + * In case of failure, all the successfully set entries are stored in + * *pm. You may need to manually free the created dictionary. + * + * @param key_val_sep a 0-terminated list of characters used to separate + * key from value + * @param pairs_sep a 0-terminated list of characters used to separate + * two pairs from each other + * @param flags flags to use when adding to dictionary. + * AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL + * are ignored since the key/value tokens will always + * be duplicated. + * @return 0 on success, negative AVERROR code on failure + */ +int av_dict_parse_string(AVDictionary **pm, const char *str, + const char *key_val_sep, const char *pairs_sep, + int flags); + +/** + * Copy entries from one AVDictionary struct into another. + * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, + * this function will allocate a struct for you and put it in *dst + * @param src pointer to source AVDictionary struct + * @param flags flags to use when setting entries in *dst + * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag + * @return 0 on success, negative AVERROR code on failure. If dst was allocated + * by this function, callers should free the associated memory. + */ +int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags); + +/** + * Free all the memory allocated for an AVDictionary struct + * and all keys and values. + */ +void av_dict_free(AVDictionary **m); + +/** + * Get dictionary entries as a string. + * + * Create a string containing dictionary's entries. + * Such string may be passed back to av_dict_parse_string(). + * @note String is escaped with backslashes ('\'). + * + * @param[in] m dictionary + * @param[out] buffer Pointer to buffer that will be allocated with string containg entries. + * Buffer must be freed by the caller when is no longer needed. + * @param[in] key_val_sep character used to separate key from value + * @param[in] pairs_sep character used to separate two pairs from each other + * @return >= 0 on success, negative on error + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. + */ +int av_dict_get_string(const AVDictionary *m, char **buffer, + const char key_val_sep, const char pairs_sep); + +/** + * @} + */ + +#endif /* AVUTIL_DICT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/display.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/display.h new file mode 100644 index 00000000..515adad7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/display.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2014 Vittorio Giovara + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Display matrix + */ + +#ifndef AVUTIL_DISPLAY_H +#define AVUTIL_DISPLAY_H + +#include +#include "common.h" + +/** + * @addtogroup lavu_video + * @{ + * + * @defgroup lavu_video_display Display transformation matrix functions + * @{ + */ + +/** + * @addtogroup lavu_video_display + * The display transformation matrix specifies an affine transformation that + * should be applied to video frames for correct presentation. It is compatible + * with the matrices stored in the ISO/IEC 14496-12 container format. + * + * The data is a 3x3 matrix represented as a 9-element array: + * + * @code{.unparsed} + * | a b u | + * (a, b, u, c, d, v, x, y, w) -> | c d v | + * | x y w | + * @endcode + * + * All numbers are stored in native endianness, as 16.16 fixed-point values, + * except for u, v and w, which are stored as 2.30 fixed-point values. + * + * The transformation maps a point (p, q) in the source (pre-transformation) + * frame to the point (p', q') in the destination (post-transformation) frame as + * follows: + * + * @code{.unparsed} + * | a b u | + * (p, q, 1) . | c d v | = z * (p', q', 1) + * | x y w | + * @endcode + * + * The transformation can also be more explicitly written in components as + * follows: + * + * @code{.unparsed} + * p' = (a * p + c * q + x) / z; + * q' = (b * p + d * q + y) / z; + * z = u * p + v * q + w + * @endcode + */ + +/** + * Extract the rotation component of the transformation matrix. + * + * @param matrix the transformation matrix + * @return the angle (in degrees) by which the transformation rotates the frame + * counterclockwise. The angle will be in range [-180.0, 180.0], + * or NaN if the matrix is singular. + * + * @note floating point numbers are inherently inexact, so callers are + * recommended to round the return value to nearest integer before use. + */ +double av_display_rotation_get(const int32_t matrix[9]); + +/** + * Initialize a transformation matrix describing a pure counterclockwise + * rotation by the specified angle (in degrees). + * + * @param matrix an allocated transformation matrix (will be fully overwritten + * by this function) + * @param angle rotation angle in degrees. + */ +void av_display_rotation_set(int32_t matrix[9], double angle); + +/** + * Flip the input matrix horizontally and/or vertically. + * + * @param matrix an allocated transformation matrix + * @param hflip whether the matrix should be flipped horizontally + * @param vflip whether the matrix should be flipped vertically + */ +void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_DISPLAY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dovi_meta.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dovi_meta.h new file mode 100644 index 00000000..299911d4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dovi_meta.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020 Vacing Fang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * DOVI configuration + */ + + +#ifndef AVUTIL_DOVI_META_H +#define AVUTIL_DOVI_META_H + +#include +#include + +/* + * DOVI configuration + * ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2.1.2 + dolby-vision-bitstreams-in-mpeg-2-transport-stream-multiplex-v1.2 + * @code + * uint8_t dv_version_major, the major version number that the stream complies with + * uint8_t dv_version_minor, the minor version number that the stream complies with + * uint8_t dv_profile, the Dolby Vision profile + * uint8_t dv_level, the Dolby Vision level + * uint8_t rpu_present_flag + * uint8_t el_present_flag + * uint8_t bl_present_flag + * uint8_t dv_bl_signal_compatibility_id + * @endcode + * + * @note The struct must be allocated with av_dovi_alloc() and + * its size is not a part of the public ABI. + */ +typedef struct AVDOVIDecoderConfigurationRecord { + uint8_t dv_version_major; + uint8_t dv_version_minor; + uint8_t dv_profile; + uint8_t dv_level; + uint8_t rpu_present_flag; + uint8_t el_present_flag; + uint8_t bl_present_flag; + uint8_t dv_bl_signal_compatibility_id; +} AVDOVIDecoderConfigurationRecord; + +/** + * Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its + * fields to default values. + * + * @return the newly allocated struct or NULL on failure + */ +AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size); + +#endif /* AVUTIL_DOVI_META_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/downmix_info.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/downmix_info.h new file mode 100644 index 00000000..221cf5bf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/downmix_info.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2014 Tim Walker + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_DOWNMIX_INFO_H +#define AVUTIL_DOWNMIX_INFO_H + +#include "frame.h" + +/** + * @file + * audio downmix medatata + */ + +/** + * @addtogroup lavu_audio + * @{ + */ + +/** + * @defgroup downmix_info Audio downmix metadata + * @{ + */ + +/** + * Possible downmix types. + */ +enum AVDownmixType { + AV_DOWNMIX_TYPE_UNKNOWN, /**< Not indicated. */ + AV_DOWNMIX_TYPE_LORO, /**< Lo/Ro 2-channel downmix (Stereo). */ + AV_DOWNMIX_TYPE_LTRT, /**< Lt/Rt 2-channel downmix, Dolby Surround compatible. */ + AV_DOWNMIX_TYPE_DPLII, /**< Lt/Rt 2-channel downmix, Dolby Pro Logic II compatible. */ + AV_DOWNMIX_TYPE_NB /**< Number of downmix types. Not part of ABI. */ +}; + +/** + * This structure describes optional metadata relevant to a downmix procedure. + * + * All fields are set by the decoder to the value indicated in the audio + * bitstream (if present), or to a "sane" default otherwise. + */ +typedef struct AVDownmixInfo { + /** + * Type of downmix preferred by the mastering engineer. + */ + enum AVDownmixType preferred_downmix_type; + + /** + * Absolute scale factor representing the nominal level of the center + * channel during a regular downmix. + */ + double center_mix_level; + + /** + * Absolute scale factor representing the nominal level of the center + * channel during an Lt/Rt compatible downmix. + */ + double center_mix_level_ltrt; + + /** + * Absolute scale factor representing the nominal level of the surround + * channels during a regular downmix. + */ + double surround_mix_level; + + /** + * Absolute scale factor representing the nominal level of the surround + * channels during an Lt/Rt compatible downmix. + */ + double surround_mix_level_ltrt; + + /** + * Absolute scale factor representing the level at which the LFE data is + * mixed into L/R channels during downmixing. + */ + double lfe_mix_level; +} AVDownmixInfo; + +/** + * Get a frame's AV_FRAME_DATA_DOWNMIX_INFO side data for editing. + * + * If the side data is absent, it is created and added to the frame. + * + * @param frame the frame for which the side data is to be obtained or created + * + * @return the AVDownmixInfo structure to be edited by the caller, or NULL if + * the structure cannot be allocated. + */ +AVDownmixInfo *av_downmix_info_update_side_data(AVFrame *frame); + +/** + * @} + */ + +/** + * @} + */ + +#endif /* AVUTIL_DOWNMIX_INFO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dynarray.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dynarray.h new file mode 100644 index 00000000..3a7e1464 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/dynarray.h @@ -0,0 +1,70 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_DYNARRAY_H +#define AVUTIL_DYNARRAY_H + +#include "log.h" +#include "mem.h" + +/** + * Add an element to a dynamic array. + * + * The array is reallocated when its number of elements reaches powers of 2. + * Therefore, the amortized cost of adding an element is constant. + * + * In case of success, the pointer to the array is updated in order to + * point to the new grown array, and the size is incremented. + * + * @param av_size_max maximum size of the array, usually the MAX macro of + * the type of the size + * @param av_elt_size size of the elements in the array, in bytes + * @param av_array pointer to the array, must be a lvalue + * @param av_size size of the array, must be an integer lvalue + * @param av_success statement to execute on success; at this point, the + * size variable is not yet incremented + * @param av_failure statement to execute on failure; if this happens, the + * array and size are not changed; the statement can end + * with a return or a goto + */ +#define FF_DYNARRAY_ADD(av_size_max, av_elt_size, av_array, av_size, \ + av_success, av_failure) \ + do { \ + size_t av_size_new = (av_size); \ + if (!((av_size) & ((av_size) - 1))) { \ + av_size_new = (av_size) ? (av_size) << 1 : 1; \ + if (av_size_new > (av_size_max) / (av_elt_size)) { \ + av_size_new = 0; \ + } else { \ + void *av_array_new = \ + av_realloc((av_array), av_size_new * (av_elt_size)); \ + if (!av_array_new) \ + av_size_new = 0; \ + else \ + (av_array) = av_array_new; \ + } \ + } \ + if (av_size_new) { \ + { av_success } \ + (av_size)++; \ + } else { \ + av_failure \ + } \ + } while (0) + +#endif /* AVUTIL_DYNARRAY_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/encryption_info.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/encryption_info.h new file mode 100644 index 00000000..8fe7ebfe --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/encryption_info.h @@ -0,0 +1,205 @@ +/** + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_ENCRYPTION_INFO_H +#define AVUTIL_ENCRYPTION_INFO_H + +#include +#include + +typedef struct AVSubsampleEncryptionInfo { + /** The number of bytes that are clear. */ + unsigned int bytes_of_clear_data; + + /** + * The number of bytes that are protected. If using pattern encryption, + * the pattern applies to only the protected bytes; if not using pattern + * encryption, all these bytes are encrypted. + */ + unsigned int bytes_of_protected_data; +} AVSubsampleEncryptionInfo; + +/** + * This describes encryption info for a packet. This contains frame-specific + * info for how to decrypt the packet before passing it to the decoder. + * + * The size of this struct is not part of the public ABI. + */ +typedef struct AVEncryptionInfo { + /** The fourcc encryption scheme, in big-endian byte order. */ + uint32_t scheme; + + /** + * Only used for pattern encryption. This is the number of 16-byte blocks + * that are encrypted. + */ + uint32_t crypt_byte_block; + + /** + * Only used for pattern encryption. This is the number of 16-byte blocks + * that are clear. + */ + uint32_t skip_byte_block; + + /** + * The ID of the key used to encrypt the packet. This should always be + * 16 bytes long, but may be changed in the future. + */ + uint8_t *key_id; + uint32_t key_id_size; + + /** + * The initialization vector. This may have been zero-filled to be the + * correct block size. This should always be 16 bytes long, but may be + * changed in the future. + */ + uint8_t *iv; + uint32_t iv_size; + + /** + * An array of subsample encryption info specifying how parts of the sample + * are encrypted. If there are no subsamples, then the whole sample is + * encrypted. + */ + AVSubsampleEncryptionInfo *subsamples; + uint32_t subsample_count; +} AVEncryptionInfo; + +/** + * This describes info used to initialize an encryption key system. + * + * The size of this struct is not part of the public ABI. + */ +typedef struct AVEncryptionInitInfo { + /** + * A unique identifier for the key system this is for, can be NULL if it + * is not known. This should always be 16 bytes, but may change in the + * future. + */ + uint8_t* system_id; + uint32_t system_id_size; + + /** + * An array of key IDs this initialization data is for. All IDs are the + * same length. Can be NULL if there are no known key IDs. + */ + uint8_t** key_ids; + /** The number of key IDs. */ + uint32_t num_key_ids; + /** + * The number of bytes in each key ID. This should always be 16, but may + * change in the future. + */ + uint32_t key_id_size; + + /** + * Key-system specific initialization data. This data is copied directly + * from the file and the format depends on the specific key system. This + * can be NULL if there is no initialization data; in that case, there + * will be at least one key ID. + */ + uint8_t* data; + uint32_t data_size; + + /** + * An optional pointer to the next initialization info in the list. + */ + struct AVEncryptionInitInfo *next; +} AVEncryptionInitInfo; + +/** + * Allocates an AVEncryptionInfo structure and sub-pointers to hold the given + * number of subsamples. This will allocate pointers for the key ID, IV, + * and subsample entries, set the size members, and zero-initialize the rest. + * + * @param subsample_count The number of subsamples. + * @param key_id_size The number of bytes in the key ID, should be 16. + * @param iv_size The number of bytes in the IV, should be 16. + * + * @return The new AVEncryptionInfo structure, or NULL on error. + */ +AVEncryptionInfo *av_encryption_info_alloc(uint32_t subsample_count, uint32_t key_id_size, uint32_t iv_size); + +/** + * Allocates an AVEncryptionInfo structure with a copy of the given data. + * @return The new AVEncryptionInfo structure, or NULL on error. + */ +AVEncryptionInfo *av_encryption_info_clone(const AVEncryptionInfo *info); + +/** + * Frees the given encryption info object. This MUST NOT be used to free the + * side-data data pointer, that should use normal side-data methods. + */ +void av_encryption_info_free(AVEncryptionInfo *info); + +/** + * Creates a copy of the AVEncryptionInfo that is contained in the given side + * data. The resulting object should be passed to av_encryption_info_free() + * when done. + * + * @return The new AVEncryptionInfo structure, or NULL on error. + */ +AVEncryptionInfo *av_encryption_info_get_side_data(const uint8_t *side_data, size_t side_data_size); + +/** + * Allocates and initializes side data that holds a copy of the given encryption + * info. The resulting pointer should be either freed using av_free or given + * to av_packet_add_side_data(). + * + * @return The new side-data pointer, or NULL. + */ +uint8_t *av_encryption_info_add_side_data( + const AVEncryptionInfo *info, size_t *side_data_size); + + +/** + * Allocates an AVEncryptionInitInfo structure and sub-pointers to hold the + * given sizes. This will allocate pointers and set all the fields. + * + * @return The new AVEncryptionInitInfo structure, or NULL on error. + */ +AVEncryptionInitInfo *av_encryption_init_info_alloc( + uint32_t system_id_size, uint32_t num_key_ids, uint32_t key_id_size, uint32_t data_size); + +/** + * Frees the given encryption init info object. This MUST NOT be used to free + * the side-data data pointer, that should use normal side-data methods. + */ +void av_encryption_init_info_free(AVEncryptionInitInfo* info); + +/** + * Creates a copy of the AVEncryptionInitInfo that is contained in the given + * side data. The resulting object should be passed to + * av_encryption_init_info_free() when done. + * + * @return The new AVEncryptionInitInfo structure, or NULL on error. + */ +AVEncryptionInitInfo *av_encryption_init_info_get_side_data( + const uint8_t* side_data, size_t side_data_size); + +/** + * Allocates and initializes side data that holds a copy of the given encryption + * init info. The resulting pointer should be either freed using av_free or + * given to av_packet_add_side_data(). + * + * @return The new side-data pointer, or NULL. + */ +uint8_t *av_encryption_init_info_add_side_data( + const AVEncryptionInitInfo *info, size_t *side_data_size); + +#endif /* AVUTIL_ENCRYPTION_INFO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/error.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/error.h new file mode 100644 index 00000000..71df4da3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/error.h @@ -0,0 +1,126 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * error code definitions + */ + +#ifndef AVUTIL_ERROR_H +#define AVUTIL_ERROR_H + +#include +#include + +/** + * @addtogroup lavu_error + * + * @{ + */ + + +/* error handling */ +#if EDOM > 0 +#define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions. +#define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value. +#else +/* Some platforms have E* and errno already negated. */ +#define AVERROR(e) (e) +#define AVUNERROR(e) (e) +#endif + +#define FFERRTAG(a, b, c, d) (-(int)MKTAG(a, b, c, d)) + +#define AVERROR_BSF_NOT_FOUND FFERRTAG(0xF8,'B','S','F') ///< Bitstream filter not found +#define AVERROR_BUG FFERRTAG( 'B','U','G','!') ///< Internal bug, also see AVERROR_BUG2 +#define AVERROR_BUFFER_TOO_SMALL FFERRTAG( 'B','U','F','S') ///< Buffer too small +#define AVERROR_DECODER_NOT_FOUND FFERRTAG(0xF8,'D','E','C') ///< Decoder not found +#define AVERROR_DEMUXER_NOT_FOUND FFERRTAG(0xF8,'D','E','M') ///< Demuxer not found +#define AVERROR_ENCODER_NOT_FOUND FFERRTAG(0xF8,'E','N','C') ///< Encoder not found +#define AVERROR_EOF FFERRTAG( 'E','O','F',' ') ///< End of file +#define AVERROR_EXIT FFERRTAG( 'E','X','I','T') ///< Immediate exit was requested; the called function should not be restarted +#define AVERROR_EXTERNAL FFERRTAG( 'E','X','T',' ') ///< Generic error in an external library +#define AVERROR_FILTER_NOT_FOUND FFERRTAG(0xF8,'F','I','L') ///< Filter not found +#define AVERROR_INVALIDDATA FFERRTAG( 'I','N','D','A') ///< Invalid data found when processing input +#define AVERROR_MUXER_NOT_FOUND FFERRTAG(0xF8,'M','U','X') ///< Muxer not found +#define AVERROR_OPTION_NOT_FOUND FFERRTAG(0xF8,'O','P','T') ///< Option not found +#define AVERROR_PATCHWELCOME FFERRTAG( 'P','A','W','E') ///< Not yet implemented in FFmpeg, patches welcome +#define AVERROR_PROTOCOL_NOT_FOUND FFERRTAG(0xF8,'P','R','O') ///< Protocol not found + +#define AVERROR_STREAM_NOT_FOUND FFERRTAG(0xF8,'S','T','R') ///< Stream not found +/** + * This is semantically identical to AVERROR_BUG + * it has been introduced in Libav after our AVERROR_BUG and with a modified value. + */ +#define AVERROR_BUG2 FFERRTAG( 'B','U','G',' ') +#define AVERROR_UNKNOWN FFERRTAG( 'U','N','K','N') ///< Unknown error, typically from an external library +#define AVERROR_EXPERIMENTAL (-0x2bb2afa8) ///< Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it. +#define AVERROR_INPUT_CHANGED (-0x636e6701) ///< Input changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_OUTPUT_CHANGED) +#define AVERROR_OUTPUT_CHANGED (-0x636e6702) ///< Output changed between calls. Reconfiguration is required. (can be OR-ed with AVERROR_INPUT_CHANGED) +/* HTTP & RTSP errors */ +#define AVERROR_HTTP_BAD_REQUEST FFERRTAG(0xF8,'4','0','0') +#define AVERROR_HTTP_UNAUTHORIZED FFERRTAG(0xF8,'4','0','1') +#define AVERROR_HTTP_FORBIDDEN FFERRTAG(0xF8,'4','0','3') +#define AVERROR_HTTP_NOT_FOUND FFERRTAG(0xF8,'4','0','4') +#define AVERROR_HTTP_OTHER_4XX FFERRTAG(0xF8,'4','X','X') +#define AVERROR_HTTP_SERVER_ERROR FFERRTAG(0xF8,'5','X','X') + +#define AV_ERROR_MAX_STRING_SIZE 64 + +/** + * Put a description of the AVERROR code errnum in errbuf. + * In case of failure the global variable errno is set to indicate the + * error. Even in case of failure av_strerror() will print a generic + * error message indicating the errnum provided to errbuf. + * + * @param errnum error code to describe + * @param errbuf buffer to which description is written + * @param errbuf_size the size in bytes of errbuf + * @return 0 on success, a negative value if a description for errnum + * cannot be found + */ +int av_strerror(int errnum, char *errbuf, size_t errbuf_size); + +/** + * Fill the provided buffer with a string containing an error string + * corresponding to the AVERROR code errnum. + * + * @param errbuf a buffer + * @param errbuf_size size in bytes of errbuf + * @param errnum error code to describe + * @return the buffer in input, filled with the error description + * @see av_strerror() + */ +static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum) +{ + av_strerror(errnum, errbuf, errbuf_size); + return errbuf; +} + +/** + * Convenience macro, the return value should be used only directly in + * function arguments but never stand-alone. + */ +#define av_err2str(errnum) \ + av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum) + +/** + * @} + */ + +#endif /* AVUTIL_ERROR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/eval.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/eval.h new file mode 100644 index 00000000..068c62cd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/eval.h @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2002 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * simple arithmetic expression evaluator + */ + +#ifndef AVUTIL_EVAL_H +#define AVUTIL_EVAL_H + +#include "avutil.h" + +typedef struct AVExpr AVExpr; + +/** + * Parse and evaluate an expression. + * Note, this is significantly slower than av_expr_eval(). + * + * @param res a pointer to a double where is put the result value of + * the expression, or NAN in case of error + * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)" + * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0} + * @param const_values a zero terminated array of values for the identifiers from const_names + * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers + * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument + * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers + * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments + * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2 + * @param log_ctx parent logging context + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code otherwise + */ +int av_expr_parse_and_eval(double *res, const char *s, + const char * const *const_names, const double *const_values, + const char * const *func1_names, double (* const *funcs1)(void *, double), + const char * const *func2_names, double (* const *funcs2)(void *, double, double), + void *opaque, int log_offset, void *log_ctx); + +/** + * Parse an expression. + * + * @param expr a pointer where is put an AVExpr containing the parsed + * value in case of successful parsing, or NULL otherwise. + * The pointed to AVExpr must be freed with av_expr_free() by the user + * when it is not needed anymore. + * @param s expression as a zero terminated string, for example "1+2^3+5*5+sin(2/3)" + * @param const_names NULL terminated array of zero terminated strings of constant identifiers, for example {"PI", "E", 0} + * @param func1_names NULL terminated array of zero terminated strings of funcs1 identifiers + * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument + * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers + * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments + * @param log_ctx parent logging context + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code otherwise + */ +int av_expr_parse(AVExpr **expr, const char *s, + const char * const *const_names, + const char * const *func1_names, double (* const *funcs1)(void *, double), + const char * const *func2_names, double (* const *funcs2)(void *, double, double), + int log_offset, void *log_ctx); + +/** + * Evaluate a previously parsed expression. + * + * @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names + * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2 + * @return the value of the expression + */ +double av_expr_eval(AVExpr *e, const double *const_values, void *opaque); + +/** + * Track the presence of variables and their number of occurrences in a parsed expression + * + * @param counter a zero-initialized array where the count of each variable will be stored + * @param size size of array + * @return 0 on success, a negative value indicates that no expression or array was passed + * or size was zero + */ +int av_expr_count_vars(AVExpr *e, unsigned *counter, int size); + +/** + * Track the presence of user provided functions and their number of occurrences + * in a parsed expression. + * + * @param counter a zero-initialized array where the count of each function will be stored + * if you passed 5 functions with 2 arguments to av_expr_parse() + * then for arg=2 this will use upto 5 entries. + * @param size size of array + * @param arg number of arguments the counted functions have + * @return 0 on success, a negative value indicates that no expression or array was passed + * or size was zero + */ +int av_expr_count_func(AVExpr *e, unsigned *counter, int size, int arg); + +/** + * Free a parsed expression previously created with av_expr_parse(). + */ +void av_expr_free(AVExpr *e); + +/** + * Parse the string in numstr and return its value as a double. If + * the string is empty, contains only whitespaces, or does not contain + * an initial substring that has the expected syntax for a + * floating-point number, no conversion is performed. In this case, + * returns a value of zero and the value returned in tail is the value + * of numstr. + * + * @param numstr a string representing a number, may contain one of + * the International System number postfixes, for example 'K', 'M', + * 'G'. If 'i' is appended after the postfix, powers of 2 are used + * instead of powers of 10. The 'B' postfix multiplies the value by + * 8, and can be appended after another postfix or used alone. This + * allows using for example 'KB', 'MiB', 'G' and 'B' as postfix. + * @param tail if non-NULL puts here the pointer to the char next + * after the last parsed character + */ +double av_strtod(const char *numstr, char **tail); + +#endif /* AVUTIL_EVAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffmath.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffmath.h new file mode 100644 index 00000000..aad1347f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffmath.h @@ -0,0 +1,67 @@ +/* + * copyright (c) 2016 Ganesh Ajjanagadde + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal math functions header + */ + +#ifndef AVUTIL_FFMATH_H +#define AVUTIL_FFMATH_H + +#include "attributes.h" +#include "libm.h" + +/** + * Compute 10^x for floating point values. Note: this function is by no means + * "correctly rounded", and is meant as a fast, reasonably accurate approximation. + * For instance, maximum relative error for the double precision variant is + * ~ 1e-13 for very small and very large values. + * This is ~2x faster than GNU libm's approach, which is still off by 2ulp on + * some inputs. + * @param x exponent + * @return 10^x + */ +static av_always_inline double ff_exp10(double x) +{ + return exp2(M_LOG2_10 * x); +} + +static av_always_inline float ff_exp10f(float x) +{ + return exp2f(M_LOG2_10 * x); +} + +/** + * Compute x^y for floating point x, y. Note: this function is faster than the + * libm variant due to mainly 2 reasons: + * 1. It does not handle any edge cases. In particular, this is only guaranteed + * to work correctly for x > 0. + * 2. It is not as accurate as a standard nearly "correctly rounded" libm variant. + * @param x base + * @param y exponent + * @return x^y + */ +static av_always_inline float ff_fast_powf(float x, float y) +{ + return expf(logf(x) * y); +} + +#endif /* AVUTIL_FFMATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffversion.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffversion.h new file mode 100644 index 00000000..555ce16a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ffversion.h @@ -0,0 +1,5 @@ +/* Automatically generated by version.sh, do not manually edit! */ +#ifndef AVUTIL_FFVERSION_H +#define AVUTIL_FFVERSION_H +#define FFMPEG_VERSION "4.3.2" +#endif /* AVUTIL_FFVERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fifo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fifo.h new file mode 100644 index 00000000..dc7bc6f0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fifo.h @@ -0,0 +1,179 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * a very simple circular buffer FIFO implementation + */ + +#ifndef AVUTIL_FIFO_H +#define AVUTIL_FIFO_H + +#include +#include "avutil.h" +#include "attributes.h" + +typedef struct AVFifoBuffer { + uint8_t *buffer; + uint8_t *rptr, *wptr, *end; + uint32_t rndx, wndx; +} AVFifoBuffer; + +/** + * Initialize an AVFifoBuffer. + * @param size of FIFO + * @return AVFifoBuffer or NULL in case of memory allocation failure + */ +AVFifoBuffer *av_fifo_alloc(unsigned int size); + +/** + * Initialize an AVFifoBuffer. + * @param nmemb number of elements + * @param size size of the single element + * @return AVFifoBuffer or NULL in case of memory allocation failure + */ +AVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size); + +/** + * Free an AVFifoBuffer. + * @param f AVFifoBuffer to free + */ +void av_fifo_free(AVFifoBuffer *f); + +/** + * Free an AVFifoBuffer and reset pointer to NULL. + * @param f AVFifoBuffer to free + */ +void av_fifo_freep(AVFifoBuffer **f); + +/** + * Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied. + * @param f AVFifoBuffer to reset + */ +void av_fifo_reset(AVFifoBuffer *f); + +/** + * Return the amount of data in bytes in the AVFifoBuffer, that is the + * amount of data you can read from it. + * @param f AVFifoBuffer to read from + * @return size + */ +int av_fifo_size(const AVFifoBuffer *f); + +/** + * Return the amount of space in bytes in the AVFifoBuffer, that is the + * amount of data you can write into it. + * @param f AVFifoBuffer to write into + * @return size + */ +int av_fifo_space(const AVFifoBuffer *f); + +/** + * Feed data at specific position from an AVFifoBuffer to a user-supplied callback. + * Similar as av_fifo_gereric_read but without discarding data. + * @param f AVFifoBuffer to read from + * @param offset offset from current read position + * @param buf_size number of bytes to read + * @param func generic read function + * @param dest data destination + */ +int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int)); + +/** + * Feed data from an AVFifoBuffer to a user-supplied callback. + * Similar as av_fifo_gereric_read but without discarding data. + * @param f AVFifoBuffer to read from + * @param buf_size number of bytes to read + * @param func generic read function + * @param dest data destination + */ +int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)); + +/** + * Feed data from an AVFifoBuffer to a user-supplied callback. + * @param f AVFifoBuffer to read from + * @param buf_size number of bytes to read + * @param func generic read function + * @param dest data destination + */ +int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)); + +/** + * Feed data from a user-supplied callback to an AVFifoBuffer. + * @param f AVFifoBuffer to write to + * @param src data source; non-const since it may be used as a + * modifiable context by the function defined in func + * @param size number of bytes to write + * @param func generic write function; the first parameter is src, + * the second is dest_buf, the third is dest_buf_size. + * func must return the number of bytes written to dest_buf, or <= 0 to + * indicate no more data available to write. + * If func is NULL, src is interpreted as a simple byte array for source data. + * @return the number of bytes written to the FIFO + */ +int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)); + +/** + * Resize an AVFifoBuffer. + * In case of reallocation failure, the old FIFO is kept unchanged. + * + * @param f AVFifoBuffer to resize + * @param size new AVFifoBuffer size in bytes + * @return <0 for failure, >=0 otherwise + */ +int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size); + +/** + * Enlarge an AVFifoBuffer. + * In case of reallocation failure, the old FIFO is kept unchanged. + * The new fifo size may be larger than the requested size. + * + * @param f AVFifoBuffer to resize + * @param additional_space the amount of space in bytes to allocate in addition to av_fifo_size() + * @return <0 for failure, >=0 otherwise + */ +int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space); + +/** + * Read and discard the specified amount of data from an AVFifoBuffer. + * @param f AVFifoBuffer to read from + * @param size amount of data to read in bytes + */ +void av_fifo_drain(AVFifoBuffer *f, int size); + +/** + * Return a pointer to the data stored in a FIFO buffer at a certain offset. + * The FIFO buffer is not modified. + * + * @param f AVFifoBuffer to peek at, f must be non-NULL + * @param offs an offset in bytes, its absolute value must be less + * than the used buffer size or the returned pointer will + * point outside to the buffer data. + * The used buffer size can be checked with av_fifo_size(). + */ +static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) +{ + uint8_t *ptr = f->rptr + offs; + if (ptr >= f->end) + ptr = f->buffer + (ptr - f->end); + else if (ptr < f->buffer) + ptr = f->end - (f->buffer - ptr); + return ptr; +} + +#endif /* AVUTIL_FIFO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/file.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/file.h new file mode 100644 index 00000000..3ef4a602 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/file.h @@ -0,0 +1,71 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_FILE_H +#define AVUTIL_FILE_H + +#include + +#include "avutil.h" + +/** + * @file + * Misc file utilities. + */ + +/** + * Read the file with name filename, and put its content in a newly + * allocated buffer or map it with mmap() when available. + * In case of success set *bufptr to the read or mmapped buffer, and + * *size to the size in bytes of the buffer in *bufptr. + * Unlike mmap this function succeeds with zero sized files, in this + * case *bufptr will be set to NULL and *size will be set to 0. + * The returned buffer must be released with av_file_unmap(). + * + * @param log_offset loglevel offset used for logging + * @param log_ctx context used for logging + * @return a non negative number in case of success, a negative value + * corresponding to an AVERROR error code in case of failure + */ +av_warn_unused_result +int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, + int log_offset, void *log_ctx); + +/** + * Unmap or free the buffer bufptr created by av_file_map(). + * + * @param size size in bytes of bufptr, must be the same as returned + * by av_file_map() + */ +void av_file_unmap(uint8_t *bufptr, size_t size); + +/** + * Wrapper to work around the lack of mkstemp() on mingw. + * Also, tries to create file in /tmp first, if possible. + * *prefix can be a character constant; *filename will be allocated internally. + * @return file descriptor of opened file (or negative value corresponding to an + * AVERROR code on error) + * and opened file name in **filename. + * @note On very old libcs it is necessary to set a secure umask before + * calling this, av_tempfile() can't call umask itself as it is used in + * libraries and could interfere with the calling application. + * @deprecated as fd numbers cannot be passed saftely between libs on some platforms + */ +int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); + +#endif /* AVUTIL_FILE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fixed_dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fixed_dsp.h new file mode 100644 index 00000000..f554cb50 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/fixed_dsp.h @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Nedeljko Babic (nbabic@mips.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_FIXED_DSP_H +#define AVUTIL_FIXED_DSP_H + +#include +#include "attributes.h" +#include "common.h" +#include "libavcodec/mathops.h" + +typedef struct AVFixedDSPContext { + /* Assume len is a multiple of 16, and arrays are 32-byte aligned */ + /* Results of multiplications are scaled down by 31 bit (and rounded) if not + * stated otherwise */ + + /** + * Overlap/add with window function. + * Result is scaled down by "bits" bits. + * Used primarily by MDCT-based audio codecs. + * Source and destination vectors must overlap exactly or not at all. + * + * @param dst result vector + * constraints: 16-byte aligned + * @param src0 first source vector + * constraints: 16-byte aligned + * @param src1 second source vector + * constraints: 16-byte aligned + * @param win half-window vector + * constraints: 16-byte aligned + * @param len length of vector + * constraints: multiple of 4 + * @param bits scaling parameter + * + */ + void (*vector_fmul_window_scaled)(int16_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len, uint8_t bits); + + /** + * Overlap/add with window function. + * Used primarily by MDCT-based audio codecs. + * Source and destination vectors must overlap exactly or not at all. + * + * @param dst result vector + * constraints: 32-byte aligned + * @param src0 first source vector + * constraints: 16-byte aligned + * @param src1 second source vector + * constraints: 16-byte aligned + * @param win half-window vector + * constraints: 16-byte aligned + * @param len length of vector + * constraints: multiple of 4 + */ + void (*vector_fmul_window)(int32_t *dst, const int32_t *src0, const int32_t *src1, const int32_t *win, int len); + + /** + * Fixed-point multiplication that calculates the entry wise product of two + * vectors of integers and stores the result in a vector of integers. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_fmul)(int *dst, const int *src0, const int *src1, + int len); + + void (*vector_fmul_reverse)(int *dst, const int *src0, const int *src1, int len); + /** + * Calculate the entry wise product of two vectors of integers, add a third vector of + * integers and store the result in a vector of integers. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param src2 third input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_fmul_add)(int *dst, const int *src0, const int *src1, + const int *src2, int len); + + /** + * Calculate the scalar product of two vectors of integers. + * + * @param v1 first vector, 16-byte aligned + * @param v2 second vector, 16-byte aligned + * @param len length of vectors, multiple of 4 + * + * @return sum of elementwise products + */ + int (*scalarproduct_fixed)(const int *v1, const int *v2, int len); + + /** + * Calculate the sum and difference of two vectors of integers. + * + * @param v1 first input vector, sum output, 16-byte aligned + * @param v2 second input vector, difference output, 16-byte aligned + * @param len length of vectors, multiple of 4 + */ + void (*butterflies_fixed)(int *av_restrict v1, int *av_restrict v2, int len); +} AVFixedDSPContext; + +/** + * Allocate and initialize a fixed DSP context. + * note: should be freed with a av_free call when no longer needed. + * + * @param strict setting to non-zero avoids using functions which may not be IEEE-754 compliant + */ +AVFixedDSPContext * avpriv_alloc_fixed_dsp(int strict); + +void ff_fixed_dsp_init_x86(AVFixedDSPContext *fdsp); + +/** + * Calculate the square root + * + * @param x input fixed point number + * + * @param bits format of fixed point number (32 - bits).bits + * + * note: input is normalized to (0, 1) fixed point value + */ + +static av_always_inline int fixed_sqrt(int x, int bits) +{ + int retval, bit_mask, guess, square, i; + int64_t accu; + int shift1 = 30 - bits; + int shift2 = bits - 15; + + if (shift1 > 0) retval = ff_sqrt(x << shift1); + else retval = ff_sqrt(x >> -shift1); + + if (shift2 > 0) { + retval = retval << shift2; + bit_mask = (1 << (shift2 - 1)); + + for (i=0; i> bits); + if (x >= square) + retval += bit_mask; + bit_mask >>= 1; + } + + } + else retval >>= (-shift2); + + return retval; +} + +#endif /* AVUTIL_FIXED_DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/float_dsp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/float_dsp.h new file mode 100644 index 00000000..9c664592 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/float_dsp.h @@ -0,0 +1,218 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_FLOAT_DSP_H +#define AVUTIL_FLOAT_DSP_H + +#include "config.h" + +typedef struct AVFloatDSPContext { + /** + * Calculate the entry wise product of two vectors of floats and store the result in + * a vector of floats. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_fmul)(float *dst, const float *src0, const float *src1, + int len); + + /** + * Multiply a vector of floats by a scalar float and add to + * destination vector. Source and destination vectors must + * overlap exactly or not at all. + * + * @param dst result vector + * constraints: 32-byte aligned + * @param src input vector + * constraints: 32-byte aligned + * @param mul scalar value + * @param len length of vector + * constraints: multiple of 16 + */ + void (*vector_fmac_scalar)(float *dst, const float *src, float mul, + int len); + + /** + * Multiply a vector of doubles by a scalar double and add to + * destination vector. Source and destination vectors must + * overlap exactly or not at all. + * + * @param dst result vector + * constraints: 32-byte aligned + * @param src input vector + * constraints: 32-byte aligned + * @param mul scalar value + * @param len length of vector + * constraints: multiple of 16 + */ + void (*vector_dmac_scalar)(double *dst, const double *src, double mul, + int len); + + /** + * Multiply a vector of floats by a scalar float. Source and + * destination vectors must overlap exactly or not at all. + * + * @param dst result vector + * constraints: 16-byte aligned + * @param src input vector + * constraints: 16-byte aligned + * @param mul scalar value + * @param len length of vector + * constraints: multiple of 4 + */ + void (*vector_fmul_scalar)(float *dst, const float *src, float mul, + int len); + + /** + * Multiply a vector of double by a scalar double. Source and + * destination vectors must overlap exactly or not at all. + * + * @param dst result vector + * constraints: 32-byte aligned + * @param src input vector + * constraints: 32-byte aligned + * @param mul scalar value + * @param len length of vector + * constraints: multiple of 8 + */ + void (*vector_dmul_scalar)(double *dst, const double *src, double mul, + int len); + + /** + * Overlap/add with window function. + * Used primarily by MDCT-based audio codecs. + * Source and destination vectors must overlap exactly or not at all. + * + * @param dst result vector + * constraints: 16-byte aligned + * @param src0 first source vector + * constraints: 16-byte aligned + * @param src1 second source vector + * constraints: 16-byte aligned + * @param win half-window vector + * constraints: 16-byte aligned + * @param len length of vector + * constraints: multiple of 4 + */ + void (*vector_fmul_window)(float *dst, const float *src0, + const float *src1, const float *win, int len); + + /** + * Calculate the entry wise product of two vectors of floats, add a third vector of + * floats and store the result in a vector of floats. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param src2 third input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_fmul_add)(float *dst, const float *src0, const float *src1, + const float *src2, int len); + + /** + * Calculate the entry wise product of two vectors of floats, and store the result + * in a vector of floats. The second vector of floats is iterated over + * in reverse order. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_fmul_reverse)(float *dst, const float *src0, + const float *src1, int len); + + /** + * Calculate the sum and difference of two vectors of floats. + * + * @param v1 first input vector, sum output, 16-byte aligned + * @param v2 second input vector, difference output, 16-byte aligned + * @param len length of vectors, multiple of 4 + */ + void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len); + + /** + * Calculate the scalar product of two vectors of floats. + * + * @param v1 first vector, 16-byte aligned + * @param v2 second vector, 16-byte aligned + * @param len length of vectors, multiple of 4 + * + * @return sum of elementwise products + */ + float (*scalarproduct_float)(const float *v1, const float *v2, int len); + + /** + * Calculate the entry wise product of two vectors of doubles and store the result in + * a vector of doubles. + * + * @param dst output vector + * constraints: 32-byte aligned + * @param src0 first input vector + * constraints: 32-byte aligned + * @param src1 second input vector + * constraints: 32-byte aligned + * @param len number of elements in the input + * constraints: multiple of 16 + */ + void (*vector_dmul)(double *dst, const double *src0, const double *src1, + int len); +} AVFloatDSPContext; + +/** + * Return the scalar product of two vectors. + * + * @param v1 first input vector + * @param v2 first input vector + * @param len number of elements + * + * @return sum of elementwise products + */ +float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len); + +void ff_float_dsp_init_aarch64(AVFloatDSPContext *fdsp); +void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp); +void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict); +void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp); +void ff_float_dsp_init_mips(AVFloatDSPContext *fdsp); + +/** + * Allocate a float DSP context. + * + * @param strict setting to non-zero avoids using functions which may not be IEEE-754 compliant + */ +AVFloatDSPContext *avpriv_float_dsp_alloc(int strict); + +#endif /* AVUTIL_FLOAT_DSP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/frame.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/frame.h new file mode 100644 index 00000000..fc67db0f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/frame.h @@ -0,0 +1,975 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_frame + * reference-counted frame API + */ + +#ifndef AVUTIL_FRAME_H +#define AVUTIL_FRAME_H + +#include +#include + +#include "avutil.h" +#include "buffer.h" +#include "dict.h" +#include "rational.h" +#include "samplefmt.h" +#include "pixfmt.h" +#include "version.h" + + +/** + * @defgroup lavu_frame AVFrame + * @ingroup lavu_data + * + * @{ + * AVFrame is an abstraction for reference-counted raw multimedia data. + */ + +enum AVFrameSideDataType { + /** + * The data is the AVPanScan struct defined in libavcodec. + */ + AV_FRAME_DATA_PANSCAN, + /** + * ATSC A53 Part 4 Closed Captions. + * A53 CC bitstream is stored as uint8_t in AVFrameSideData.data. + * The number of bytes of CC data is AVFrameSideData.size. + */ + AV_FRAME_DATA_A53_CC, + /** + * Stereoscopic 3d metadata. + * The data is the AVStereo3D struct defined in libavutil/stereo3d.h. + */ + AV_FRAME_DATA_STEREO3D, + /** + * The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h. + */ + AV_FRAME_DATA_MATRIXENCODING, + /** + * Metadata relevant to a downmix procedure. + * The data is the AVDownmixInfo struct defined in libavutil/downmix_info.h. + */ + AV_FRAME_DATA_DOWNMIX_INFO, + /** + * ReplayGain information in the form of the AVReplayGain struct. + */ + AV_FRAME_DATA_REPLAYGAIN, + /** + * This side data contains a 3x3 transformation matrix describing an affine + * transformation that needs to be applied to the frame for correct + * presentation. + * + * See libavutil/display.h for a detailed description of the data. + */ + AV_FRAME_DATA_DISPLAYMATRIX, + /** + * Active Format Description data consisting of a single byte as specified + * in ETSI TS 101 154 using AVActiveFormatDescription enum. + */ + AV_FRAME_DATA_AFD, + /** + * Motion vectors exported by some codecs (on demand through the export_mvs + * flag set in the libavcodec AVCodecContext flags2 option). + * The data is the AVMotionVector struct defined in + * libavutil/motion_vector.h. + */ + AV_FRAME_DATA_MOTION_VECTORS, + /** + * Recommmends skipping the specified number of samples. This is exported + * only if the "skip_manual" AVOption is set in libavcodec. + * This has the same format as AV_PKT_DATA_SKIP_SAMPLES. + * @code + * u32le number of samples to skip from start of this packet + * u32le number of samples to skip from end of this packet + * u8 reason for start skip + * u8 reason for end skip (0=padding silence, 1=convergence) + * @endcode + */ + AV_FRAME_DATA_SKIP_SAMPLES, + /** + * This side data must be associated with an audio frame and corresponds to + * enum AVAudioServiceType defined in avcodec.h. + */ + AV_FRAME_DATA_AUDIO_SERVICE_TYPE, + /** + * Mastering display metadata associated with a video frame. The payload is + * an AVMasteringDisplayMetadata type and contains information about the + * mastering display color volume. + */ + AV_FRAME_DATA_MASTERING_DISPLAY_METADATA, + /** + * The GOP timecode in 25 bit timecode format. Data format is 64-bit integer. + * This is set on the first frame of a GOP that has a temporal reference of 0. + */ + AV_FRAME_DATA_GOP_TIMECODE, + + /** + * The data represents the AVSphericalMapping structure defined in + * libavutil/spherical.h. + */ + AV_FRAME_DATA_SPHERICAL, + + /** + * Content light level (based on CTA-861.3). This payload contains data in + * the form of the AVContentLightMetadata struct. + */ + AV_FRAME_DATA_CONTENT_LIGHT_LEVEL, + + /** + * The data contains an ICC profile as an opaque octet buffer following the + * format described by ISO 15076-1 with an optional name defined in the + * metadata key entry "name". + */ + AV_FRAME_DATA_ICC_PROFILE, + +#if FF_API_FRAME_QP + /** + * Implementation-specific description of the format of AV_FRAME_QP_TABLE_DATA. + * The contents of this side data are undocumented and internal; use + * av_frame_set_qp_table() and av_frame_get_qp_table() to access this in a + * meaningful way instead. + */ + AV_FRAME_DATA_QP_TABLE_PROPERTIES, + + /** + * Raw QP table data. Its format is described by + * AV_FRAME_DATA_QP_TABLE_PROPERTIES. Use av_frame_set_qp_table() and + * av_frame_get_qp_table() to access this instead. + */ + AV_FRAME_DATA_QP_TABLE_DATA, +#endif + + /** + * Timecode which conforms to SMPTE ST 12-1. The data is an array of 4 uint32_t + * where the first uint32_t describes how many (1-3) of the other timecodes are used. + * The timecode format is described in the av_timecode_get_smpte_from_framenum() + * function in libavutil/timecode.c. + */ + AV_FRAME_DATA_S12M_TIMECODE, + + /** + * HDR dynamic metadata associated with a video frame. The payload is + * an AVDynamicHDRPlus type and contains information for color + * volume transform - application 4 of SMPTE 2094-40:2016 standard. + */ + AV_FRAME_DATA_DYNAMIC_HDR_PLUS, + + /** + * Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of + * array element is implied by AVFrameSideData.size / AVRegionOfInterest.self_size. + */ + AV_FRAME_DATA_REGIONS_OF_INTEREST, + + /** + * Encoding parameters for a video frame, as described by AVVideoEncParams. + */ + AV_FRAME_DATA_VIDEO_ENC_PARAMS, +}; + +enum AVActiveFormatDescription { + AV_AFD_SAME = 8, + AV_AFD_4_3 = 9, + AV_AFD_16_9 = 10, + AV_AFD_14_9 = 11, + AV_AFD_4_3_SP_14_9 = 13, + AV_AFD_16_9_SP_14_9 = 14, + AV_AFD_SP_4_3 = 15, +}; + + +/** + * Structure to hold side data for an AVFrame. + * + * sizeof(AVFrameSideData) is not a part of the public ABI, so new fields may be added + * to the end with a minor bump. + */ +typedef struct AVFrameSideData { + enum AVFrameSideDataType type; + uint8_t *data; + int size; + AVDictionary *metadata; + AVBufferRef *buf; +} AVFrameSideData; + +/** + * Structure describing a single Region Of Interest. + * + * When multiple regions are defined in a single side-data block, they + * should be ordered from most to least important - some encoders are only + * capable of supporting a limited number of distinct regions, so will have + * to truncate the list. + * + * When overlapping regions are defined, the first region containing a given + * area of the frame applies. + */ +typedef struct AVRegionOfInterest { + /** + * Must be set to the size of this data structure (that is, + * sizeof(AVRegionOfInterest)). + */ + uint32_t self_size; + /** + * Distance in pixels from the top edge of the frame to the top and + * bottom edges and from the left edge of the frame to the left and + * right edges of the rectangle defining this region of interest. + * + * The constraints on a region are encoder dependent, so the region + * actually affected may be slightly larger for alignment or other + * reasons. + */ + int top; + int bottom; + int left; + int right; + /** + * Quantisation offset. + * + * Must be in the range -1 to +1. A value of zero indicates no quality + * change. A negative value asks for better quality (less quantisation), + * while a positive value asks for worse quality (greater quantisation). + * + * The range is calibrated so that the extreme values indicate the + * largest possible offset - if the rest of the frame is encoded with the + * worst possible quality, an offset of -1 indicates that this region + * should be encoded with the best possible quality anyway. Intermediate + * values are then interpolated in some codec-dependent way. + * + * For example, in 10-bit H.264 the quantisation parameter varies between + * -12 and 51. A typical qoffset value of -1/10 therefore indicates that + * this region should be encoded with a QP around one-tenth of the full + * range better than the rest of the frame. So, if most of the frame + * were to be encoded with a QP of around 30, this region would get a QP + * of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3). + * An extreme value of -1 would indicate that this region should be + * encoded with the best possible quality regardless of the treatment of + * the rest of the frame - that is, should be encoded at a QP of -12. + */ + AVRational qoffset; +} AVRegionOfInterest; + +/** + * This structure describes decoded (raw) audio or video data. + * + * AVFrame must be allocated using av_frame_alloc(). Note that this only + * allocates the AVFrame itself, the buffers for the data must be managed + * through other means (see below). + * AVFrame must be freed with av_frame_free(). + * + * AVFrame is typically allocated once and then reused multiple times to hold + * different data (e.g. a single AVFrame to hold frames received from a + * decoder). In such a case, av_frame_unref() will free any references held by + * the frame and reset it to its original clean state before it + * is reused again. + * + * The data described by an AVFrame is usually reference counted through the + * AVBuffer API. The underlying buffer references are stored in AVFrame.buf / + * AVFrame.extended_buf. An AVFrame is considered to be reference counted if at + * least one reference is set, i.e. if AVFrame.buf[0] != NULL. In such a case, + * every single data plane must be contained in one of the buffers in + * AVFrame.buf or AVFrame.extended_buf. + * There may be a single buffer for all the data, or one separate buffer for + * each plane, or anything in between. + * + * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added + * to the end with a minor bump. + * + * Fields can be accessed through AVOptions, the name string used, matches the + * C structure field name for fields accessible through AVOptions. The AVClass + * for AVFrame can be obtained from avcodec_get_frame_class() + */ +typedef struct AVFrame { +#define AV_NUM_DATA_POINTERS 8 + /** + * pointer to the picture/channel planes. + * This might be different from the first allocated byte + * + * Some decoders access areas outside 0,0 - width,height, please + * see avcodec_align_dimensions2(). Some filters and swscale can read + * up to 16 bytes beyond the planes, if these filters are to be used, + * then 16 extra bytes must be allocated. + * + * NOTE: Except for hwaccel formats, pointers not needed by the format + * MUST be set to NULL. + */ + uint8_t *data[AV_NUM_DATA_POINTERS]; + + /** + * For video, size in bytes of each picture line. + * For audio, size in bytes of each plane. + * + * For audio, only linesize[0] may be set. For planar audio, each channel + * plane must be the same size. + * + * For video the linesizes should be multiples of the CPUs alignment + * preference, this is 16 or 32 for modern desktop CPUs. + * Some code requires such alignment other code can be slower without + * correct alignment, for yet other it makes no difference. + * + * @note The linesize may be larger than the size of usable data -- there + * may be extra padding present for performance reasons. + */ + int linesize[AV_NUM_DATA_POINTERS]; + + /** + * pointers to the data planes/channels. + * + * For video, this should simply point to data[]. + * + * For planar audio, each channel has a separate data pointer, and + * linesize[0] contains the size of each channel buffer. + * For packed audio, there is just one data pointer, and linesize[0] + * contains the total size of the buffer for all channels. + * + * Note: Both data and extended_data should always be set in a valid frame, + * but for planar audio with more channels that can fit in data, + * extended_data must be used in order to access all channels. + */ + uint8_t **extended_data; + + /** + * @name Video dimensions + * Video frames only. The coded dimensions (in pixels) of the video frame, + * i.e. the size of the rectangle that contains some well-defined values. + * + * @note The part of the frame intended for display/presentation is further + * restricted by the @ref cropping "Cropping rectangle". + * @{ + */ + int width, height; + /** + * @} + */ + + /** + * number of audio samples (per channel) described by this frame + */ + int nb_samples; + + /** + * format of the frame, -1 if unknown or unset + * Values correspond to enum AVPixelFormat for video frames, + * enum AVSampleFormat for audio) + */ + int format; + + /** + * 1 -> keyframe, 0-> not + */ + int key_frame; + + /** + * Picture type of the frame. + */ + enum AVPictureType pict_type; + + /** + * Sample aspect ratio for the video frame, 0/1 if unknown/unspecified. + */ + AVRational sample_aspect_ratio; + + /** + * Presentation timestamp in time_base units (time when frame should be shown to user). + */ + int64_t pts; + +#if FF_API_PKT_PTS + /** + * PTS copied from the AVPacket that was decoded to produce this frame. + * @deprecated use the pts field instead + */ + attribute_deprecated + int64_t pkt_pts; +#endif + + /** + * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used) + * This is also the Presentation time of this AVFrame calculated from + * only AVPacket.dts values without pts values. + */ + int64_t pkt_dts; + + /** + * picture number in bitstream order + */ + int coded_picture_number; + /** + * picture number in display order + */ + int display_picture_number; + + /** + * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) + */ + int quality; + + /** + * for some private data of the user + */ + void *opaque; + +#if FF_API_ERROR_FRAME + /** + * @deprecated unused + */ + attribute_deprecated + uint64_t error[AV_NUM_DATA_POINTERS]; +#endif + + /** + * When decoding, this signals how much the picture must be delayed. + * extra_delay = repeat_pict / (2*fps) + */ + int repeat_pict; + + /** + * The content of the picture is interlaced. + */ + int interlaced_frame; + + /** + * If the content is interlaced, is top field displayed first. + */ + int top_field_first; + + /** + * Tell user application that palette has changed from previous frame. + */ + int palette_has_changed; + + /** + * reordered opaque 64 bits (generally an integer or a double precision float + * PTS but can be anything). + * The user sets AVCodecContext.reordered_opaque to represent the input at + * that time, + * the decoder reorders values as needed and sets AVFrame.reordered_opaque + * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque + */ + int64_t reordered_opaque; + + /** + * Sample rate of the audio data. + */ + int sample_rate; + + /** + * Channel layout of the audio data. + */ + uint64_t channel_layout; + + /** + * AVBuffer references backing the data for this frame. If all elements of + * this array are NULL, then this frame is not reference counted. This array + * must be filled contiguously -- if buf[i] is non-NULL then buf[j] must + * also be non-NULL for all j < i. + * + * There may be at most one AVBuffer per data plane, so for video this array + * always contains all the references. For planar audio with more than + * AV_NUM_DATA_POINTERS channels, there may be more buffers than can fit in + * this array. Then the extra AVBufferRef pointers are stored in the + * extended_buf array. + */ + AVBufferRef *buf[AV_NUM_DATA_POINTERS]; + + /** + * For planar audio which requires more than AV_NUM_DATA_POINTERS + * AVBufferRef pointers, this array will hold all the references which + * cannot fit into AVFrame.buf. + * + * Note that this is different from AVFrame.extended_data, which always + * contains all the pointers. This array only contains the extra pointers, + * which cannot fit into AVFrame.buf. + * + * This array is always allocated using av_malloc() by whoever constructs + * the frame. It is freed in av_frame_unref(). + */ + AVBufferRef **extended_buf; + /** + * Number of elements in extended_buf. + */ + int nb_extended_buf; + + AVFrameSideData **side_data; + int nb_side_data; + +/** + * @defgroup lavu_frame_flags AV_FRAME_FLAGS + * @ingroup lavu_frame + * Flags describing additional frame properties. + * + * @{ + */ + +/** + * The frame data may be corrupted, e.g. due to decoding errors. + */ +#define AV_FRAME_FLAG_CORRUPT (1 << 0) +/** + * A flag to mark the frames which need to be decoded, but shouldn't be output. + */ +#define AV_FRAME_FLAG_DISCARD (1 << 2) +/** + * @} + */ + + /** + * Frame flags, a combination of @ref lavu_frame_flags + */ + int flags; + + /** + * MPEG vs JPEG YUV range. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorRange color_range; + + enum AVColorPrimaries color_primaries; + + enum AVColorTransferCharacteristic color_trc; + + /** + * YUV colorspace type. + * - encoding: Set by user + * - decoding: Set by libavcodec + */ + enum AVColorSpace colorspace; + + enum AVChromaLocation chroma_location; + + /** + * frame timestamp estimated using various heuristics, in stream time base + * - encoding: unused + * - decoding: set by libavcodec, read by user. + */ + int64_t best_effort_timestamp; + + /** + * reordered pos from the last AVPacket that has been input into the decoder + * - encoding: unused + * - decoding: Read by user. + */ + int64_t pkt_pos; + + /** + * duration of the corresponding packet, expressed in + * AVStream->time_base units, 0 if unknown. + * - encoding: unused + * - decoding: Read by user. + */ + int64_t pkt_duration; + + /** + * metadata. + * - encoding: Set by user. + * - decoding: Set by libavcodec. + */ + AVDictionary *metadata; + + /** + * decode error flags of the frame, set to a combination of + * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there + * were errors during the decoding. + * - encoding: unused + * - decoding: set by libavcodec, read by user. + */ + int decode_error_flags; +#define FF_DECODE_ERROR_INVALID_BITSTREAM 1 +#define FF_DECODE_ERROR_MISSING_REFERENCE 2 +#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4 +#define FF_DECODE_ERROR_DECODE_SLICES 8 + + /** + * number of audio channels, only used for audio. + * - encoding: unused + * - decoding: Read by user. + */ + int channels; + + /** + * size of the corresponding packet containing the compressed + * frame. + * It is set to a negative value if unknown. + * - encoding: unused + * - decoding: set by libavcodec, read by user. + */ + int pkt_size; + +#if FF_API_FRAME_QP + /** + * QP table + */ + attribute_deprecated + int8_t *qscale_table; + /** + * QP store stride + */ + attribute_deprecated + int qstride; + + attribute_deprecated + int qscale_type; + + attribute_deprecated + AVBufferRef *qp_table_buf; +#endif + /** + * For hwaccel-format frames, this should be a reference to the + * AVHWFramesContext describing the frame. + */ + AVBufferRef *hw_frames_ctx; + + /** + * AVBufferRef for free use by the API user. FFmpeg will never check the + * contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when + * the frame is unreferenced. av_frame_copy_props() calls create a new + * reference with av_buffer_ref() for the target frame's opaque_ref field. + * + * This is unrelated to the opaque field, although it serves a similar + * purpose. + */ + AVBufferRef *opaque_ref; + + /** + * @anchor cropping + * @name Cropping + * Video frames only. The number of pixels to discard from the the + * top/bottom/left/right border of the frame to obtain the sub-rectangle of + * the frame intended for presentation. + * @{ + */ + size_t crop_top; + size_t crop_bottom; + size_t crop_left; + size_t crop_right; + /** + * @} + */ + + /** + * AVBufferRef for internal use by a single libav* library. + * Must not be used to transfer data between libraries. + * Has to be NULL when ownership of the frame leaves the respective library. + * + * Code outside the FFmpeg libs should never check or change the contents of the buffer ref. + * + * FFmpeg calls av_buffer_unref() on it when the frame is unreferenced. + * av_frame_copy_props() calls create a new reference with av_buffer_ref() + * for the target frame's private_ref field. + */ + AVBufferRef *private_ref; +} AVFrame; + +#if FF_API_FRAME_GET_SET +/** + * Accessors for some AVFrame fields. These used to be provided for ABI + * compatibility, and do not need to be used anymore. + */ +attribute_deprecated +int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame); +attribute_deprecated +void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val); +attribute_deprecated +int64_t av_frame_get_pkt_duration (const AVFrame *frame); +attribute_deprecated +void av_frame_set_pkt_duration (AVFrame *frame, int64_t val); +attribute_deprecated +int64_t av_frame_get_pkt_pos (const AVFrame *frame); +attribute_deprecated +void av_frame_set_pkt_pos (AVFrame *frame, int64_t val); +attribute_deprecated +int64_t av_frame_get_channel_layout (const AVFrame *frame); +attribute_deprecated +void av_frame_set_channel_layout (AVFrame *frame, int64_t val); +attribute_deprecated +int av_frame_get_channels (const AVFrame *frame); +attribute_deprecated +void av_frame_set_channels (AVFrame *frame, int val); +attribute_deprecated +int av_frame_get_sample_rate (const AVFrame *frame); +attribute_deprecated +void av_frame_set_sample_rate (AVFrame *frame, int val); +attribute_deprecated +AVDictionary *av_frame_get_metadata (const AVFrame *frame); +attribute_deprecated +void av_frame_set_metadata (AVFrame *frame, AVDictionary *val); +attribute_deprecated +int av_frame_get_decode_error_flags (const AVFrame *frame); +attribute_deprecated +void av_frame_set_decode_error_flags (AVFrame *frame, int val); +attribute_deprecated +int av_frame_get_pkt_size(const AVFrame *frame); +attribute_deprecated +void av_frame_set_pkt_size(AVFrame *frame, int val); +#if FF_API_FRAME_QP +attribute_deprecated +int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type); +attribute_deprecated +int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type); +#endif +attribute_deprecated +enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame); +attribute_deprecated +void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val); +attribute_deprecated +enum AVColorRange av_frame_get_color_range(const AVFrame *frame); +attribute_deprecated +void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val); +#endif + +/** + * Get the name of a colorspace. + * @return a static string identifying the colorspace; can be NULL. + */ +const char *av_get_colorspace_name(enum AVColorSpace val); + +/** + * Allocate an AVFrame and set its fields to default values. The resulting + * struct must be freed using av_frame_free(). + * + * @return An AVFrame filled with default values or NULL on failure. + * + * @note this only allocates the AVFrame itself, not the data buffers. Those + * must be allocated through other means, e.g. with av_frame_get_buffer() or + * manually. + */ +AVFrame *av_frame_alloc(void); + +/** + * Free the frame and any dynamically allocated objects in it, + * e.g. extended_data. If the frame is reference counted, it will be + * unreferenced first. + * + * @param frame frame to be freed. The pointer will be set to NULL. + */ +void av_frame_free(AVFrame **frame); + +/** + * Set up a new reference to the data described by the source frame. + * + * Copy frame properties from src to dst and create a new reference for each + * AVBufferRef from src. + * + * If src is not reference counted, new buffers are allocated and the data is + * copied. + * + * @warning: dst MUST have been either unreferenced with av_frame_unref(dst), + * or newly allocated with av_frame_alloc() before calling this + * function, or undefined behavior will occur. + * + * @return 0 on success, a negative AVERROR on error + */ +int av_frame_ref(AVFrame *dst, const AVFrame *src); + +/** + * Create a new frame that references the same data as src. + * + * This is a shortcut for av_frame_alloc()+av_frame_ref(). + * + * @return newly created AVFrame on success, NULL on error. + */ +AVFrame *av_frame_clone(const AVFrame *src); + +/** + * Unreference all the buffers referenced by frame and reset the frame fields. + */ +void av_frame_unref(AVFrame *frame); + +/** + * Move everything contained in src to dst and reset src. + * + * @warning: dst is not unreferenced, but directly overwritten without reading + * or deallocating its contents. Call av_frame_unref(dst) manually + * before calling this function to ensure that no memory is leaked. + */ +void av_frame_move_ref(AVFrame *dst, AVFrame *src); + +/** + * Allocate new buffer(s) for audio or video data. + * + * The following fields must be set on frame before calling this function: + * - format (pixel format for video, sample format for audio) + * - width and height for video + * - nb_samples and channel_layout for audio + * + * This function will fill AVFrame.data and AVFrame.buf arrays and, if + * necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf. + * For planar formats, one buffer will be allocated for each plane. + * + * @warning: if frame already has been allocated, calling this function will + * leak memory. In addition, undefined behavior can occur in certain + * cases. + * + * @param frame frame in which to store the new buffers. + * @param align Required buffer size alignment. If equal to 0, alignment will be + * chosen automatically for the current CPU. It is highly + * recommended to pass 0 here unless you know what you are doing. + * + * @return 0 on success, a negative AVERROR on error. + */ +int av_frame_get_buffer(AVFrame *frame, int align); + +/** + * Check if the frame data is writable. + * + * @return A positive value if the frame data is writable (which is true if and + * only if each of the underlying buffers has only one reference, namely the one + * stored in this frame). Return 0 otherwise. + * + * If 1 is returned the answer is valid until av_buffer_ref() is called on any + * of the underlying AVBufferRefs (e.g. through av_frame_ref() or directly). + * + * @see av_frame_make_writable(), av_buffer_is_writable() + */ +int av_frame_is_writable(AVFrame *frame); + +/** + * Ensure that the frame data is writable, avoiding data copy if possible. + * + * Do nothing if the frame is writable, allocate new buffers and copy the data + * if it is not. + * + * @return 0 on success, a negative AVERROR on error. + * + * @see av_frame_is_writable(), av_buffer_is_writable(), + * av_buffer_make_writable() + */ +int av_frame_make_writable(AVFrame *frame); + +/** + * Copy the frame data from src to dst. + * + * This function does not allocate anything, dst must be already initialized and + * allocated with the same parameters as src. + * + * This function only copies the frame data (i.e. the contents of the data / + * extended data arrays), not any other properties. + * + * @return >= 0 on success, a negative AVERROR on error. + */ +int av_frame_copy(AVFrame *dst, const AVFrame *src); + +/** + * Copy only "metadata" fields from src to dst. + * + * Metadata for the purpose of this function are those fields that do not affect + * the data layout in the buffers. E.g. pts, sample rate (for audio) or sample + * aspect ratio (for video), but not width/height or channel layout. + * Side data is also copied. + */ +int av_frame_copy_props(AVFrame *dst, const AVFrame *src); + +/** + * Get the buffer reference a given data plane is stored in. + * + * @param plane index of the data plane of interest in frame->extended_data. + * + * @return the buffer reference that contains the plane or NULL if the input + * frame is not valid. + */ +AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); + +/** + * Add a new side data to a frame. + * + * @param frame a frame to which the side data should be added + * @param type type of the added side data + * @param size size of the side data + * + * @return newly added side data on success, NULL on error + */ +AVFrameSideData *av_frame_new_side_data(AVFrame *frame, + enum AVFrameSideDataType type, + int size); + +/** + * Add a new side data to a frame from an existing AVBufferRef + * + * @param frame a frame to which the side data should be added + * @param type the type of the added side data + * @param buf an AVBufferRef to add as side data. The ownership of + * the reference is transferred to the frame. + * + * @return newly added side data on success, NULL on error. On failure + * the frame is unchanged and the AVBufferRef remains owned by + * the caller. + */ +AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame, + enum AVFrameSideDataType type, + AVBufferRef *buf); + +/** + * @return a pointer to the side data of a given type on success, NULL if there + * is no side data with such type in this frame. + */ +AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, + enum AVFrameSideDataType type); + +/** + * Remove and free all side data instances of the given type. + */ +void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type); + + +/** + * Flags for frame cropping. + */ +enum { + /** + * Apply the maximum possible cropping, even if it requires setting the + * AVFrame.data[] entries to unaligned pointers. Passing unaligned data + * to FFmpeg API is generally not allowed, and causes undefined behavior + * (such as crashes). You can pass unaligned data only to FFmpeg APIs that + * are explicitly documented to accept it. Use this flag only if you + * absolutely know what you are doing. + */ + AV_FRAME_CROP_UNALIGNED = 1 << 0, +}; + +/** + * Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ + * crop_bottom fields. If cropping is successful, the function will adjust the + * data pointers and the width/height fields, and set the crop fields to 0. + * + * In all cases, the cropping boundaries will be rounded to the inherent + * alignment of the pixel format. In some cases, such as for opaque hwaccel + * formats, the left/top cropping is ignored. The crop fields are set to 0 even + * if the cropping was rounded or ignored. + * + * @param frame the frame which should be cropped + * @param flags Some combination of AV_FRAME_CROP_* flags, or 0. + * + * @return >= 0 on success, a negative AVERROR on error. If the cropping fields + * were invalid, AVERROR(ERANGE) is returned, and nothing is changed. + */ +int av_frame_apply_cropping(AVFrame *frame, int flags); + +/** + * @return a string identifying the side data type + */ +const char *av_frame_side_data_name(enum AVFrameSideDataType type); + +/** + * @} + */ + +#endif /* AVUTIL_FRAME_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hash.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hash.h new file mode 100644 index 00000000..7693e6bf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hash.h @@ -0,0 +1,269 @@ +/* + * Copyright (C) 2013 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_hash_generic + * Generic hashing API + */ + +#ifndef AVUTIL_HASH_H +#define AVUTIL_HASH_H + +#include + +#include "version.h" + +/** + * @defgroup lavu_hash Hash Functions + * @ingroup lavu_crypto + * Hash functions useful in multimedia. + * + * Hash functions are widely used in multimedia, from error checking and + * concealment to internal regression testing. libavutil has efficient + * implementations of a variety of hash functions that may be useful for + * FFmpeg and other multimedia applications. + * + * @{ + * + * @defgroup lavu_hash_generic Generic Hashing API + * An abstraction layer for all hash functions supported by libavutil. + * + * If your application needs to support a wide range of different hash + * functions, then the Generic Hashing API is for you. It provides a generic, + * reusable API for @ref lavu_hash "all hash functions" implemented in libavutil. + * If you just need to use one particular hash function, use the @ref lavu_hash + * "individual hash" directly. + * + * @section Sample Code + * + * A basic template for using the Generic Hashing API follows: + * + * @code + * struct AVHashContext *ctx = NULL; + * const char *hash_name = NULL; + * uint8_t *output_buf = NULL; + * + * // Select from a string returned by av_hash_names() + * hash_name = ...; + * + * // Allocate a hash context + * ret = av_hash_alloc(&ctx, hash_name); + * if (ret < 0) + * return ret; + * + * // Initialize the hash context + * av_hash_init(ctx); + * + * // Update the hash context with data + * while (data_left) { + * av_hash_update(ctx, data, size); + * } + * + * // Now we have no more data, so it is time to finalize the hash and get the + * // output. But we need to first allocate an output buffer. Note that you can + * // use any memory allocation function, including malloc(), not just + * // av_malloc(). + * output_buf = av_malloc(av_hash_get_size(ctx)); + * if (!output_buf) + * return AVERROR(ENOMEM); + * + * // Finalize the hash context. + * // You can use any of the av_hash_final*() functions provided, for other + * // output formats. If you do so, be sure to adjust the memory allocation + * // above. See the function documentation below for the exact amount of extra + * // memory needed. + * av_hash_final(ctx, output_buffer); + * + * // Free the context + * av_hash_freep(&ctx); + * @endcode + * + * @section Hash Function-Specific Information + * If the CRC32 hash is selected, the #AV_CRC_32_IEEE polynomial will be + * used. + * + * If the Murmur3 hash is selected, the default seed will be used. See @ref + * lavu_murmur3_seedinfo "Murmur3" for more information. + * + * @{ + */ + +/** + * @example ffhash.c + * This example is a simple command line application that takes one or more + * arguments. It demonstrates a typical use of the hashing API with allocation, + * initialization, updating, and finalizing. + */ + +struct AVHashContext; + +/** + * Allocate a hash context for the algorithm specified by name. + * + * @return >= 0 for success, a negative error code for failure + * + * @note The context is not initialized after a call to this function; you must + * call av_hash_init() to do so. + */ +int av_hash_alloc(struct AVHashContext **ctx, const char *name); + +/** + * Get the names of available hash algorithms. + * + * This function can be used to enumerate the algorithms. + * + * @param[in] i Index of the hash algorithm, starting from 0 + * @return Pointer to a static string or `NULL` if `i` is out of range + */ +const char *av_hash_names(int i); + +/** + * Get the name of the algorithm corresponding to the given hash context. + */ +const char *av_hash_get_name(const struct AVHashContext *ctx); + +/** + * Maximum value that av_hash_get_size() will currently return. + * + * You can use this if you absolutely want or need to use static allocation for + * the output buffer and are fine with not supporting hashes newly added to + * libavutil without recompilation. + * + * @warning + * Adding new hashes with larger sizes, and increasing the macro while doing + * so, will not be considered an ABI change. To prevent your code from + * overflowing a buffer, either dynamically allocate the output buffer with + * av_hash_get_size(), or limit your use of the Hashing API to hashes that are + * already in FFmpeg during the time of compilation. + */ +#define AV_HASH_MAX_SIZE 64 + +/** + * Get the size of the resulting hash value in bytes. + * + * The maximum value this function will currently return is available as macro + * #AV_HASH_MAX_SIZE. + * + * @param[in] ctx Hash context + * @return Size of the hash value in bytes + */ +int av_hash_get_size(const struct AVHashContext *ctx); + +/** + * Initialize or reset a hash context. + * + * @param[in,out] ctx Hash context + */ +void av_hash_init(struct AVHashContext *ctx); + +/** + * Update a hash context with additional data. + * + * @param[in,out] ctx Hash context + * @param[in] src Data to be added to the hash context + * @param[in] len Size of the additional data + */ +#if FF_API_CRYPTO_SIZE_T +void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, int len); +#else +void av_hash_update(struct AVHashContext *ctx, const uint8_t *src, size_t len); +#endif + +/** + * Finalize a hash context and compute the actual hash value. + * + * The minimum size of `dst` buffer is given by av_hash_get_size() or + * #AV_HASH_MAX_SIZE. The use of the latter macro is discouraged. + * + * It is not safe to update or finalize a hash context again, if it has already + * been finalized. + * + * @param[in,out] ctx Hash context + * @param[out] dst Where the final hash value will be stored + * + * @see av_hash_final_bin() provides an alternative API + */ +void av_hash_final(struct AVHashContext *ctx, uint8_t *dst); + +/** + * Finalize a hash context and store the actual hash value in a buffer. + * + * It is not safe to update or finalize a hash context again, if it has already + * been finalized. + * + * If `size` is smaller than the hash size (given by av_hash_get_size()), the + * hash is truncated; if size is larger, the buffer is padded with 0. + * + * @param[in,out] ctx Hash context + * @param[out] dst Where the final hash value will be stored + * @param[in] size Number of bytes to write to `dst` + */ +void av_hash_final_bin(struct AVHashContext *ctx, uint8_t *dst, int size); + +/** + * Finalize a hash context and store the hexadecimal representation of the + * actual hash value as a string. + * + * It is not safe to update or finalize a hash context again, if it has already + * been finalized. + * + * The string is always 0-terminated. + * + * If `size` is smaller than `2 * hash_size + 1`, where `hash_size` is the + * value returned by av_hash_get_size(), the string will be truncated. + * + * @param[in,out] ctx Hash context + * @param[out] dst Where the string will be stored + * @param[in] size Maximum number of bytes to write to `dst` + */ +void av_hash_final_hex(struct AVHashContext *ctx, uint8_t *dst, int size); + +/** + * Finalize a hash context and store the Base64 representation of the + * actual hash value as a string. + * + * It is not safe to update or finalize a hash context again, if it has already + * been finalized. + * + * The string is always 0-terminated. + * + * If `size` is smaller than AV_BASE64_SIZE(hash_size), where `hash_size` is + * the value returned by av_hash_get_size(), the string will be truncated. + * + * @param[in,out] ctx Hash context + * @param[out] dst Where the final hash value will be stored + * @param[in] size Maximum number of bytes to write to `dst` + */ +void av_hash_final_b64(struct AVHashContext *ctx, uint8_t *dst, int size); + +/** + * Free hash context and set hash context pointer to `NULL`. + * + * @param[in,out] ctx Pointer to hash context + */ +void av_hash_freep(struct AVHashContext **ctx); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_HASH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hdr_dynamic_metadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hdr_dynamic_metadata.h new file mode 100644 index 00000000..2d72de56 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hdr_dynamic_metadata.h @@ -0,0 +1,343 @@ +/* + * Copyright (c) 2018 Mohammad Izadi + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HDR_DYNAMIC_METADATA_H +#define AVUTIL_HDR_DYNAMIC_METADATA_H + +#include "frame.h" +#include "rational.h" + +/** + * Option for overlapping elliptical pixel selectors in an image. + */ +enum AVHDRPlusOverlapProcessOption { + AV_HDR_PLUS_OVERLAP_PROCESS_WEIGHTED_AVERAGING = 0, + AV_HDR_PLUS_OVERLAP_PROCESS_LAYERING = 1, +}; + +/** + * Represents the percentile at a specific percentage in + * a distribution. + */ +typedef struct AVHDRPlusPercentile { + /** + * The percentage value corresponding to a specific percentile linearized + * RGB value in the processing window in the scene. The value shall be in + * the range of 0 to100, inclusive. + */ + uint8_t percentage; + + /** + * The linearized maxRGB value at a specific percentile in the processing + * window in the scene. The value shall be in the range of 0 to 1, inclusive + * and in multiples of 0.00001. + */ + AVRational percentile; +} AVHDRPlusPercentile; + +/** + * Color transform parameters at a processing window in a dynamic metadata for + * SMPTE 2094-40. + */ +typedef struct AVHDRPlusColorTransformParams { + /** + * The relative x coordinate of the top left pixel of the processing + * window. The value shall be in the range of 0 and 1, inclusive and + * in multiples of 1/(width of Picture - 1). The value 1 corresponds + * to the absolute coordinate of width of Picture - 1. The value for + * first processing window shall be 0. + */ + AVRational window_upper_left_corner_x; + + /** + * The relative y coordinate of the top left pixel of the processing + * window. The value shall be in the range of 0 and 1, inclusive and + * in multiples of 1/(height of Picture - 1). The value 1 corresponds + * to the absolute coordinate of height of Picture - 1. The value for + * first processing window shall be 0. + */ + AVRational window_upper_left_corner_y; + + /** + * The relative x coordinate of the bottom right pixel of the processing + * window. The value shall be in the range of 0 and 1, inclusive and + * in multiples of 1/(width of Picture - 1). The value 1 corresponds + * to the absolute coordinate of width of Picture - 1. The value for + * first processing window shall be 1. + */ + AVRational window_lower_right_corner_x; + + /** + * The relative y coordinate of the bottom right pixel of the processing + * window. The value shall be in the range of 0 and 1, inclusive and + * in multiples of 1/(height of Picture - 1). The value 1 corresponds + * to the absolute coordinate of height of Picture - 1. The value for + * first processing window shall be 1. + */ + AVRational window_lower_right_corner_y; + + /** + * The x coordinate of the center position of the concentric internal and + * external ellipses of the elliptical pixel selector in the processing + * window. The value shall be in the range of 0 to (width of Picture - 1), + * inclusive and in multiples of 1 pixel. + */ + uint16_t center_of_ellipse_x; + + /** + * The y coordinate of the center position of the concentric internal and + * external ellipses of the elliptical pixel selector in the processing + * window. The value shall be in the range of 0 to (height of Picture - 1), + * inclusive and in multiples of 1 pixel. + */ + uint16_t center_of_ellipse_y; + + /** + * The clockwise rotation angle in degree of arc with respect to the + * positive direction of the x-axis of the concentric internal and external + * ellipses of the elliptical pixel selector in the processing window. The + * value shall be in the range of 0 to 180, inclusive and in multiples of 1. + */ + uint8_t rotation_angle; + + /** + * The semi-major axis value of the internal ellipse of the elliptical pixel + * selector in amount of pixels in the processing window. The value shall be + * in the range of 1 to 65535, inclusive and in multiples of 1 pixel. + */ + uint16_t semimajor_axis_internal_ellipse; + + /** + * The semi-major axis value of the external ellipse of the elliptical pixel + * selector in amount of pixels in the processing window. The value + * shall not be less than semimajor_axis_internal_ellipse of the current + * processing window. The value shall be in the range of 1 to 65535, + * inclusive and in multiples of 1 pixel. + */ + uint16_t semimajor_axis_external_ellipse; + + /** + * The semi-minor axis value of the external ellipse of the elliptical pixel + * selector in amount of pixels in the processing window. The value shall be + * in the range of 1 to 65535, inclusive and in multiples of 1 pixel. + */ + uint16_t semiminor_axis_external_ellipse; + + /** + * Overlap process option indicates one of the two methods of combining + * rendered pixels in the processing window in an image with at least one + * elliptical pixel selector. For overlapping elliptical pixel selectors + * in an image, overlap_process_option shall have the same value. + */ + enum AVHDRPlusOverlapProcessOption overlap_process_option; + + /** + * The maximum of the color components of linearized RGB values in the + * processing window in the scene. The values should be in the range of 0 to + * 1, inclusive and in multiples of 0.00001. maxscl[ 0 ], maxscl[ 1 ], and + * maxscl[ 2 ] are corresponding to R, G, B color components respectively. + */ + AVRational maxscl[3]; + + /** + * The average of linearized maxRGB values in the processing window in the + * scene. The value should be in the range of 0 to 1, inclusive and in + * multiples of 0.00001. + */ + AVRational average_maxrgb; + + /** + * The number of linearized maxRGB values at given percentiles in the + * processing window in the scene. The maximum value shall be 15. + */ + uint8_t num_distribution_maxrgb_percentiles; + + /** + * The linearized maxRGB values at given percentiles in the + * processing window in the scene. + */ + AVHDRPlusPercentile distribution_maxrgb[15]; + + /** + * The fraction of selected pixels in the image that contains the brightest + * pixel in the scene. The value shall be in the range of 0 to 1, inclusive + * and in multiples of 0.001. + */ + AVRational fraction_bright_pixels; + + /** + * This flag indicates that the metadata for the tone mapping function in + * the processing window is present (for value of 1). + */ + uint8_t tone_mapping_flag; + + /** + * The x coordinate of the separation point between the linear part and the + * curved part of the tone mapping function. The value shall be in the range + * of 0 to 1, excluding 0 and in multiples of 1/4095. + */ + AVRational knee_point_x; + + /** + * The y coordinate of the separation point between the linear part and the + * curved part of the tone mapping function. The value shall be in the range + * of 0 to 1, excluding 0 and in multiples of 1/4095. + */ + AVRational knee_point_y; + + /** + * The number of the intermediate anchor parameters of the tone mapping + * function in the processing window. The maximum value shall be 15. + */ + uint8_t num_bezier_curve_anchors; + + /** + * The intermediate anchor parameters of the tone mapping function in the + * processing window in the scene. The values should be in the range of 0 + * to 1, inclusive and in multiples of 1/1023. + */ + AVRational bezier_curve_anchors[15]; + + /** + * This flag shall be equal to 0 in bitstreams conforming to this version of + * this Specification. Other values are reserved for future use. + */ + uint8_t color_saturation_mapping_flag; + + /** + * The color saturation gain in the processing window in the scene. The + * value shall be in the range of 0 to 63/8, inclusive and in multiples of + * 1/8. The default value shall be 1. + */ + AVRational color_saturation_weight; +} AVHDRPlusColorTransformParams; + +/** + * This struct represents dynamic metadata for color volume transform - + * application 4 of SMPTE 2094-40:2016 standard. + * + * To be used as payload of a AVFrameSideData or AVPacketSideData with the + * appropriate type. + * + * @note The struct should be allocated with + * av_dynamic_hdr_plus_alloc() and its size is not a part of + * the public ABI. + */ +typedef struct AVDynamicHDRPlus { + /** + * Country code by Rec. ITU-T T.35 Annex A. The value shall be 0xB5. + */ + uint8_t itu_t_t35_country_code; + + /** + * Application version in the application defining document in ST-2094 + * suite. The value shall be set to 0. + */ + uint8_t application_version; + + /** + * The number of processing windows. The value shall be in the range + * of 1 to 3, inclusive. + */ + uint8_t num_windows; + + /** + * The color transform parameters for every processing window. + */ + AVHDRPlusColorTransformParams params[3]; + + /** + * The nominal maximum display luminance of the targeted system display, + * in units of 0.0001 candelas per square metre. The value shall be in + * the range of 0 to 10000, inclusive. + */ + AVRational targeted_system_display_maximum_luminance; + + /** + * This flag shall be equal to 0 in bit streams conforming to this version + * of this Specification. The value 1 is reserved for future use. + */ + uint8_t targeted_system_display_actual_peak_luminance_flag; + + /** + * The number of rows in the targeted system_display_actual_peak_luminance + * array. The value shall be in the range of 2 to 25, inclusive. + */ + uint8_t num_rows_targeted_system_display_actual_peak_luminance; + + /** + * The number of columns in the + * targeted_system_display_actual_peak_luminance array. The value shall be + * in the range of 2 to 25, inclusive. + */ + uint8_t num_cols_targeted_system_display_actual_peak_luminance; + + /** + * The normalized actual peak luminance of the targeted system display. The + * values should be in the range of 0 to 1, inclusive and in multiples of + * 1/15. + */ + AVRational targeted_system_display_actual_peak_luminance[25][25]; + + /** + * This flag shall be equal to 0 in bitstreams conforming to this version of + * this Specification. The value 1 is reserved for future use. + */ + uint8_t mastering_display_actual_peak_luminance_flag; + + /** + * The number of rows in the mastering_display_actual_peak_luminance array. + * The value shall be in the range of 2 to 25, inclusive. + */ + uint8_t num_rows_mastering_display_actual_peak_luminance; + + /** + * The number of columns in the mastering_display_actual_peak_luminance + * array. The value shall be in the range of 2 to 25, inclusive. + */ + uint8_t num_cols_mastering_display_actual_peak_luminance; + + /** + * The normalized actual peak luminance of the mastering display used for + * mastering the image essence. The values should be in the range of 0 to 1, + * inclusive and in multiples of 1/15. + */ + AVRational mastering_display_actual_peak_luminance[25][25]; +} AVDynamicHDRPlus; + +/** + * Allocate an AVDynamicHDRPlus structure and set its fields to + * default values. The resulting struct can be freed using av_freep(). + * + * @return An AVDynamicHDRPlus filled with default values or NULL + * on failure. + */ +AVDynamicHDRPlus *av_dynamic_hdr_plus_alloc(size_t *size); + +/** + * Allocate a complete AVDynamicHDRPlus and add it to the frame. + * @param frame The frame which side data is added to. + * + * @return The AVDynamicHDRPlus structure to be filled by caller or NULL + * on failure. + */ +AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_HDR_DYNAMIC_METADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hmac.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hmac.h new file mode 100644 index 00000000..412e9507 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hmac.h @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2012 Martin Storsjo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HMAC_H +#define AVUTIL_HMAC_H + +#include + +#include "version.h" +/** + * @defgroup lavu_hmac HMAC + * @ingroup lavu_crypto + * @{ + */ + +enum AVHMACType { + AV_HMAC_MD5, + AV_HMAC_SHA1, + AV_HMAC_SHA224, + AV_HMAC_SHA256, + AV_HMAC_SHA384, + AV_HMAC_SHA512, +}; + +typedef struct AVHMAC AVHMAC; + +/** + * Allocate an AVHMAC context. + * @param type The hash function used for the HMAC. + */ +AVHMAC *av_hmac_alloc(enum AVHMACType type); + +/** + * Free an AVHMAC context. + * @param ctx The context to free, may be NULL + */ +void av_hmac_free(AVHMAC *ctx); + +/** + * Initialize an AVHMAC context with an authentication key. + * @param ctx The HMAC context + * @param key The authentication key + * @param keylen The length of the key, in bytes + */ +void av_hmac_init(AVHMAC *ctx, const uint8_t *key, unsigned int keylen); + +/** + * Hash data with the HMAC. + * @param ctx The HMAC context + * @param data The data to hash + * @param len The length of the data, in bytes + */ +void av_hmac_update(AVHMAC *ctx, const uint8_t *data, unsigned int len); + +/** + * Finish hashing and output the HMAC digest. + * @param ctx The HMAC context + * @param out The output buffer to write the digest into + * @param outlen The length of the out buffer, in bytes + * @return The number of bytes written to out, or a negative error code. + */ +int av_hmac_final(AVHMAC *ctx, uint8_t *out, unsigned int outlen); + +/** + * Hash an array of data with a key. + * @param ctx The HMAC context + * @param data The data to hash + * @param len The length of the data, in bytes + * @param key The authentication key + * @param keylen The length of the key, in bytes + * @param out The output buffer to write the digest into + * @param outlen The length of the out buffer, in bytes + * @return The number of bytes written to out, or a negative error code. + */ +int av_hmac_calc(AVHMAC *ctx, const uint8_t *data, unsigned int len, + const uint8_t *key, unsigned int keylen, + uint8_t *out, unsigned int outlen); + +/** + * @} + */ + +#endif /* AVUTIL_HMAC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext.h new file mode 100644 index 00000000..04d19d89 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext.h @@ -0,0 +1,605 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_H +#define AVUTIL_HWCONTEXT_H + +#include "buffer.h" +#include "frame.h" +#include "log.h" +#include "pixfmt.h" + +enum AVHWDeviceType { + AV_HWDEVICE_TYPE_NONE, + AV_HWDEVICE_TYPE_VDPAU, + AV_HWDEVICE_TYPE_CUDA, + AV_HWDEVICE_TYPE_VAAPI, + AV_HWDEVICE_TYPE_DXVA2, + AV_HWDEVICE_TYPE_QSV, + AV_HWDEVICE_TYPE_VIDEOTOOLBOX, + AV_HWDEVICE_TYPE_D3D11VA, + AV_HWDEVICE_TYPE_DRM, + AV_HWDEVICE_TYPE_OPENCL, + AV_HWDEVICE_TYPE_MEDIACODEC, + AV_HWDEVICE_TYPE_VULKAN, +}; + +typedef struct AVHWDeviceInternal AVHWDeviceInternal; + +/** + * This struct aggregates all the (hardware/vendor-specific) "high-level" state, + * i.e. state that is not tied to a concrete processing configuration. + * E.g., in an API that supports hardware-accelerated encoding and decoding, + * this struct will (if possible) wrap the state that is common to both encoding + * and decoding and from which specific instances of encoders or decoders can be + * derived. + * + * This struct is reference-counted with the AVBuffer mechanism. The + * av_hwdevice_ctx_alloc() constructor yields a reference, whose data field + * points to the actual AVHWDeviceContext. Further objects derived from + * AVHWDeviceContext (such as AVHWFramesContext, describing a frame pool with + * specific properties) will hold an internal reference to it. After all the + * references are released, the AVHWDeviceContext itself will be freed, + * optionally invoking a user-specified callback for uninitializing the hardware + * state. + */ +typedef struct AVHWDeviceContext { + /** + * A class for logging. Set by av_hwdevice_ctx_alloc(). + */ + const AVClass *av_class; + + /** + * Private data used internally by libavutil. Must not be accessed in any + * way by the caller. + */ + AVHWDeviceInternal *internal; + + /** + * This field identifies the underlying API used for hardware access. + * + * This field is set when this struct is allocated and never changed + * afterwards. + */ + enum AVHWDeviceType type; + + /** + * The format-specific data, allocated and freed by libavutil along with + * this context. + * + * Should be cast by the user to the format-specific context defined in the + * corresponding header (hwcontext_*.h) and filled as described in the + * documentation before calling av_hwdevice_ctx_init(). + * + * After calling av_hwdevice_ctx_init() this struct should not be modified + * by the caller. + */ + void *hwctx; + + /** + * This field may be set by the caller before calling av_hwdevice_ctx_init(). + * + * If non-NULL, this callback will be called when the last reference to + * this context is unreferenced, immediately before it is freed. + * + * @note when other objects (e.g an AVHWFramesContext) are derived from this + * struct, this callback will be invoked after all such child objects + * are fully uninitialized and their respective destructors invoked. + */ + void (*free)(struct AVHWDeviceContext *ctx); + + /** + * Arbitrary user data, to be used e.g. by the free() callback. + */ + void *user_opaque; +} AVHWDeviceContext; + +typedef struct AVHWFramesInternal AVHWFramesInternal; + +/** + * This struct describes a set or pool of "hardware" frames (i.e. those with + * data not located in normal system memory). All the frames in the pool are + * assumed to be allocated in the same way and interchangeable. + * + * This struct is reference-counted with the AVBuffer mechanism and tied to a + * given AVHWDeviceContext instance. The av_hwframe_ctx_alloc() constructor + * yields a reference, whose data field points to the actual AVHWFramesContext + * struct. + */ +typedef struct AVHWFramesContext { + /** + * A class for logging. + */ + const AVClass *av_class; + + /** + * Private data used internally by libavutil. Must not be accessed in any + * way by the caller. + */ + AVHWFramesInternal *internal; + + /** + * A reference to the parent AVHWDeviceContext. This reference is owned and + * managed by the enclosing AVHWFramesContext, but the caller may derive + * additional references from it. + */ + AVBufferRef *device_ref; + + /** + * The parent AVHWDeviceContext. This is simply a pointer to + * device_ref->data provided for convenience. + * + * Set by libavutil in av_hwframe_ctx_init(). + */ + AVHWDeviceContext *device_ctx; + + /** + * The format-specific data, allocated and freed automatically along with + * this context. + * + * Should be cast by the user to the format-specific context defined in the + * corresponding header (hwframe_*.h) and filled as described in the + * documentation before calling av_hwframe_ctx_init(). + * + * After any frames using this context are created, the contents of this + * struct should not be modified by the caller. + */ + void *hwctx; + + /** + * This field may be set by the caller before calling av_hwframe_ctx_init(). + * + * If non-NULL, this callback will be called when the last reference to + * this context is unreferenced, immediately before it is freed. + */ + void (*free)(struct AVHWFramesContext *ctx); + + /** + * Arbitrary user data, to be used e.g. by the free() callback. + */ + void *user_opaque; + + /** + * A pool from which the frames are allocated by av_hwframe_get_buffer(). + * This field may be set by the caller before calling av_hwframe_ctx_init(). + * The buffers returned by calling av_buffer_pool_get() on this pool must + * have the properties described in the documentation in the corresponding hw + * type's header (hwcontext_*.h). The pool will be freed strictly before + * this struct's free() callback is invoked. + * + * This field may be NULL, then libavutil will attempt to allocate a pool + * internally. Note that certain device types enforce pools allocated at + * fixed size (frame count), which cannot be extended dynamically. In such a + * case, initial_pool_size must be set appropriately. + */ + AVBufferPool *pool; + + /** + * Initial size of the frame pool. If a device type does not support + * dynamically resizing the pool, then this is also the maximum pool size. + * + * May be set by the caller before calling av_hwframe_ctx_init(). Must be + * set if pool is NULL and the device type does not support dynamic pools. + */ + int initial_pool_size; + + /** + * The pixel format identifying the underlying HW surface type. + * + * Must be a hwaccel format, i.e. the corresponding descriptor must have the + * AV_PIX_FMT_FLAG_HWACCEL flag set. + * + * Must be set by the user before calling av_hwframe_ctx_init(). + */ + enum AVPixelFormat format; + + /** + * The pixel format identifying the actual data layout of the hardware + * frames. + * + * Must be set by the caller before calling av_hwframe_ctx_init(). + * + * @note when the underlying API does not provide the exact data layout, but + * only the colorspace/bit depth, this field should be set to the fully + * planar version of that format (e.g. for 8-bit 420 YUV it should be + * AV_PIX_FMT_YUV420P, not AV_PIX_FMT_NV12 or anything else). + */ + enum AVPixelFormat sw_format; + + /** + * The allocated dimensions of the frames in this pool. + * + * Must be set by the user before calling av_hwframe_ctx_init(). + */ + int width, height; +} AVHWFramesContext; + +/** + * Look up an AVHWDeviceType by name. + * + * @param name String name of the device type (case-insensitive). + * @return The type from enum AVHWDeviceType, or AV_HWDEVICE_TYPE_NONE if + * not found. + */ +enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name); + +/** Get the string name of an AVHWDeviceType. + * + * @param type Type from enum AVHWDeviceType. + * @return Pointer to a static string containing the name, or NULL if the type + * is not valid. + */ +const char *av_hwdevice_get_type_name(enum AVHWDeviceType type); + +/** + * Iterate over supported device types. + * + * @param type AV_HWDEVICE_TYPE_NONE initially, then the previous type + * returned by this function in subsequent iterations. + * @return The next usable device type from enum AVHWDeviceType, or + * AV_HWDEVICE_TYPE_NONE if there are no more. + */ +enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev); + +/** + * Allocate an AVHWDeviceContext for a given hardware type. + * + * @param type the type of the hardware device to allocate. + * @return a reference to the newly created AVHWDeviceContext on success or NULL + * on failure. + */ +AVBufferRef *av_hwdevice_ctx_alloc(enum AVHWDeviceType type); + +/** + * Finalize the device context before use. This function must be called after + * the context is filled with all the required information and before it is + * used in any way. + * + * @param ref a reference to the AVHWDeviceContext + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwdevice_ctx_init(AVBufferRef *ref); + +/** + * Open a device of the specified type and create an AVHWDeviceContext for it. + * + * This is a convenience function intended to cover the simple cases. Callers + * who need to fine-tune device creation/management should open the device + * manually and then wrap it in an AVHWDeviceContext using + * av_hwdevice_ctx_alloc()/av_hwdevice_ctx_init(). + * + * The returned context is already initialized and ready for use, the caller + * should not call av_hwdevice_ctx_init() on it. The user_opaque/free fields of + * the created AVHWDeviceContext are set by this function and should not be + * touched by the caller. + * + * @param device_ctx On success, a reference to the newly-created device context + * will be written here. The reference is owned by the caller + * and must be released with av_buffer_unref() when no longer + * needed. On failure, NULL will be written to this pointer. + * @param type The type of the device to create. + * @param device A type-specific string identifying the device to open. + * @param opts A dictionary of additional (type-specific) options to use in + * opening the device. The dictionary remains owned by the caller. + * @param flags currently unused + * + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, + const char *device, AVDictionary *opts, int flags); + +/** + * Create a new device of the specified type from an existing device. + * + * If the source device is a device of the target type or was originally + * derived from such a device (possibly through one or more intermediate + * devices of other types), then this will return a reference to the + * existing device of the same type as is requested. + * + * Otherwise, it will attempt to derive a new device from the given source + * device. If direct derivation to the new type is not implemented, it will + * attempt the same derivation from each ancestor of the source device in + * turn looking for an implemented derivation method. + * + * @param dst_ctx On success, a reference to the newly-created + * AVHWDeviceContext. + * @param type The type of the new device to create. + * @param src_ctx A reference to an existing AVHWDeviceContext which will be + * used to create the new device. + * @param flags Currently unused; should be set to zero. + * @return Zero on success, a negative AVERROR code on failure. + */ +int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ctx, + enum AVHWDeviceType type, + AVBufferRef *src_ctx, int flags); + +/** + * Create a new device of the specified type from an existing device. + * + * This function performs the same action as av_hwdevice_ctx_create_derived, + * however, it is able to set options for the new device to be derived. + * + * @param dst_ctx On success, a reference to the newly-created + * AVHWDeviceContext. + * @param type The type of the new device to create. + * @param src_ctx A reference to an existing AVHWDeviceContext which will be + * used to create the new device. + * @param options Options for the new device to create, same format as in + * av_hwdevice_ctx_create. + * @param flags Currently unused; should be set to zero. + * @return Zero on success, a negative AVERROR code on failure. + */ +int av_hwdevice_ctx_create_derived_opts(AVBufferRef **dst_ctx, + enum AVHWDeviceType type, + AVBufferRef *src_ctx, + AVDictionary *options, int flags); + +/** + * Allocate an AVHWFramesContext tied to a given device context. + * + * @param device_ctx a reference to a AVHWDeviceContext. This function will make + * a new reference for internal use, the one passed to the + * function remains owned by the caller. + * @return a reference to the newly created AVHWFramesContext on success or NULL + * on failure. + */ +AVBufferRef *av_hwframe_ctx_alloc(AVBufferRef *device_ctx); + +/** + * Finalize the context before use. This function must be called after the + * context is filled with all the required information and before it is attached + * to any frames. + * + * @param ref a reference to the AVHWFramesContext + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwframe_ctx_init(AVBufferRef *ref); + +/** + * Allocate a new frame attached to the given AVHWFramesContext. + * + * @param hwframe_ctx a reference to an AVHWFramesContext + * @param frame an empty (freshly allocated or unreffed) frame to be filled with + * newly allocated buffers. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR code on failure + */ +int av_hwframe_get_buffer(AVBufferRef *hwframe_ctx, AVFrame *frame, int flags); + +/** + * Copy data to or from a hw surface. At least one of dst/src must have an + * AVHWFramesContext attached. + * + * If src has an AVHWFramesContext attached, then the format of dst (if set) + * must use one of the formats returned by av_hwframe_transfer_get_formats(src, + * AV_HWFRAME_TRANSFER_DIRECTION_FROM). + * If dst has an AVHWFramesContext attached, then the format of src must use one + * of the formats returned by av_hwframe_transfer_get_formats(dst, + * AV_HWFRAME_TRANSFER_DIRECTION_TO) + * + * dst may be "clean" (i.e. with data/buf pointers unset), in which case the + * data buffers will be allocated by this function using av_frame_get_buffer(). + * If dst->format is set, then this format will be used, otherwise (when + * dst->format is AV_PIX_FMT_NONE) the first acceptable format will be chosen. + * + * The two frames must have matching allocated dimensions (i.e. equal to + * AVHWFramesContext.width/height), since not all device types support + * transferring a sub-rectangle of the whole surface. The display dimensions + * (i.e. AVFrame.width/height) may be smaller than the allocated dimensions, but + * also have to be equal for both frames. When the display dimensions are + * smaller than the allocated dimensions, the content of the padding in the + * destination frame is unspecified. + * + * @param dst the destination frame. dst is not touched on failure. + * @param src the source frame. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR error code on failure. + */ +int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags); + +enum AVHWFrameTransferDirection { + /** + * Transfer the data from the queried hw frame. + */ + AV_HWFRAME_TRANSFER_DIRECTION_FROM, + + /** + * Transfer the data to the queried hw frame. + */ + AV_HWFRAME_TRANSFER_DIRECTION_TO, +}; + +/** + * Get a list of possible source or target formats usable in + * av_hwframe_transfer_data(). + * + * @param hwframe_ctx the frame context to obtain the information for + * @param dir the direction of the transfer + * @param formats the pointer to the output format list will be written here. + * The list is terminated with AV_PIX_FMT_NONE and must be freed + * by the caller when no longer needed using av_free(). + * If this function returns successfully, the format list will + * have at least one item (not counting the terminator). + * On failure, the contents of this pointer are unspecified. + * @param flags currently unused, should be set to zero + * @return 0 on success, a negative AVERROR code on failure. + */ +int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ctx, + enum AVHWFrameTransferDirection dir, + enum AVPixelFormat **formats, int flags); + + +/** + * This struct describes the constraints on hardware frames attached to + * a given device with a hardware-specific configuration. This is returned + * by av_hwdevice_get_hwframe_constraints() and must be freed by + * av_hwframe_constraints_free() after use. + */ +typedef struct AVHWFramesConstraints { + /** + * A list of possible values for format in the hw_frames_ctx, + * terminated by AV_PIX_FMT_NONE. This member will always be filled. + */ + enum AVPixelFormat *valid_hw_formats; + + /** + * A list of possible values for sw_format in the hw_frames_ctx, + * terminated by AV_PIX_FMT_NONE. Can be NULL if this information is + * not known. + */ + enum AVPixelFormat *valid_sw_formats; + + /** + * The minimum size of frames in this hw_frames_ctx. + * (Zero if not known.) + */ + int min_width; + int min_height; + + /** + * The maximum size of frames in this hw_frames_ctx. + * (INT_MAX if not known / no limit.) + */ + int max_width; + int max_height; +} AVHWFramesConstraints; + +/** + * Allocate a HW-specific configuration structure for a given HW device. + * After use, the user must free all members as required by the specific + * hardware structure being used, then free the structure itself with + * av_free(). + * + * @param device_ctx a reference to the associated AVHWDeviceContext. + * @return The newly created HW-specific configuration structure on + * success or NULL on failure. + */ +void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx); + +/** + * Get the constraints on HW frames given a device and the HW-specific + * configuration to be used with that device. If no HW-specific + * configuration is provided, returns the maximum possible capabilities + * of the device. + * + * @param ref a reference to the associated AVHWDeviceContext. + * @param hwconfig a filled HW-specific configuration structure, or NULL + * to return the maximum possible capabilities of the device. + * @return AVHWFramesConstraints structure describing the constraints + * on the device, or NULL if not available. + */ +AVHWFramesConstraints *av_hwdevice_get_hwframe_constraints(AVBufferRef *ref, + const void *hwconfig); + +/** + * Free an AVHWFrameConstraints structure. + * + * @param constraints The (filled or unfilled) AVHWFrameConstraints structure. + */ +void av_hwframe_constraints_free(AVHWFramesConstraints **constraints); + + +/** + * Flags to apply to frame mappings. + */ +enum { + /** + * The mapping must be readable. + */ + AV_HWFRAME_MAP_READ = 1 << 0, + /** + * The mapping must be writeable. + */ + AV_HWFRAME_MAP_WRITE = 1 << 1, + /** + * The mapped frame will be overwritten completely in subsequent + * operations, so the current frame data need not be loaded. Any values + * which are not overwritten are unspecified. + */ + AV_HWFRAME_MAP_OVERWRITE = 1 << 2, + /** + * The mapping must be direct. That is, there must not be any copying in + * the map or unmap steps. Note that performance of direct mappings may + * be much lower than normal memory. + */ + AV_HWFRAME_MAP_DIRECT = 1 << 3, +}; + +/** + * Map a hardware frame. + * + * This has a number of different possible effects, depending on the format + * and origin of the src and dst frames. On input, src should be a usable + * frame with valid buffers and dst should be blank (typically as just created + * by av_frame_alloc()). src should have an associated hwframe context, and + * dst may optionally have a format and associated hwframe context. + * + * If src was created by mapping a frame from the hwframe context of dst, + * then this function undoes the mapping - dst is replaced by a reference to + * the frame that src was originally mapped from. + * + * If both src and dst have an associated hwframe context, then this function + * attempts to map the src frame from its hardware context to that of dst and + * then fill dst with appropriate data to be usable there. This will only be + * possible if the hwframe contexts and associated devices are compatible - + * given compatible devices, av_hwframe_ctx_create_derived() can be used to + * create a hwframe context for dst in which mapping should be possible. + * + * If src has a hwframe context but dst does not, then the src frame is + * mapped to normal memory and should thereafter be usable as a normal frame. + * If the format is set on dst, then the mapping will attempt to create dst + * with that format and fail if it is not possible. If format is unset (is + * AV_PIX_FMT_NONE) then dst will be mapped with whatever the most appropriate + * format to use is (probably the sw_format of the src hwframe context). + * + * A return value of AVERROR(ENOSYS) indicates that the mapping is not + * possible with the given arguments and hwframe setup, while other return + * values indicate that it failed somehow. + * + * @param dst Destination frame, to contain the mapping. + * @param src Source frame, to be mapped. + * @param flags Some combination of AV_HWFRAME_MAP_* flags. + * @return Zero on success, negative AVERROR code on failure. + */ +int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags); + + +/** + * Create and initialise an AVHWFramesContext as a mapping of another existing + * AVHWFramesContext on a different device. + * + * av_hwframe_ctx_init() should not be called after this. + * + * @param derived_frame_ctx On success, a reference to the newly created + * AVHWFramesContext. + * @param derived_device_ctx A reference to the device to create the new + * AVHWFramesContext on. + * @param source_frame_ctx A reference to an existing AVHWFramesContext + * which will be mapped to the derived context. + * @param flags Some combination of AV_HWFRAME_MAP_* flags, defining the + * mapping parameters to apply to frames which are allocated + * in the derived device. + * @return Zero on success, negative AVERROR code on failure. + */ +int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx, + enum AVPixelFormat format, + AVBufferRef *derived_device_ctx, + AVBufferRef *source_frame_ctx, + int flags); + +#endif /* AVUTIL_HWCONTEXT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda.h new file mode 100644 index 00000000..cefbe0ce --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda.h @@ -0,0 +1,69 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_CUDA_H +#define AVUTIL_HWCONTEXT_CUDA_H + +#ifndef CUDA_VERSION +#include +#endif + +#include "pixfmt.h" + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_CUDA. + * + * This API supports dynamic frame pools. AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a CUdeviceptr. + */ + +typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal; + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVCUDADeviceContext { + CUcontext cuda_ctx; + CUstream stream; + AVCUDADeviceContextInternal *internal; +} AVCUDADeviceContext; + +/** + * AVHWFramesContext.hwctx is currently not used + */ + +/** + * @defgroup hwcontext_cuda Device context creation flags + * + * Flags for av_hwdevice_ctx_create. + * + * @{ + */ + +/** + * Use primary device context instead of creating a new one. + */ +#define AV_CUDA_USE_PRIMARY_CONTEXT (1 << 0) + +/** + * @} + */ + +#endif /* AVUTIL_HWCONTEXT_CUDA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda_internal.h new file mode 100644 index 00000000..d5633c58 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_cuda_internal.h @@ -0,0 +1,39 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_CUDA_INTERNAL_H +#define AVUTIL_HWCONTEXT_CUDA_INTERNAL_H + +#include "compat/cuda/dynlink_loader.h" +#include "hwcontext_cuda.h" + +/** + * @file + * FFmpeg internal API for CUDA. + */ + +struct AVCUDADeviceContextInternal { + CudaFunctions *cuda_dl; + int is_allocated; + CUdevice cuda_device; + int flags; +}; + +#endif /* AVUTIL_HWCONTEXT_CUDA_INTERNAL_H */ + diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_d3d11va.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_d3d11va.h new file mode 100644 index 00000000..9f91e9b1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_d3d11va.h @@ -0,0 +1,169 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_D3D11VA_H +#define AVUTIL_HWCONTEXT_D3D11VA_H + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_D3D11VA. + * + * The default pool implementation will be fixed-size if initial_pool_size is + * set (and allocate elements from an array texture). Otherwise it will allocate + * individual textures. Be aware that decoding requires a single array texture. + * + * Using sw_format==AV_PIX_FMT_YUV420P has special semantics, and maps to + * DXGI_FORMAT_420_OPAQUE. av_hwframe_transfer_data() is not supported for + * this format. Refer to MSDN for details. + * + * av_hwdevice_ctx_create() for this device type supports a key named "debug" + * for the AVDictionary entry. If this is set to any value, the device creation + * code will try to load various supported D3D debugging layers. + */ + +#include +#include + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVD3D11VADeviceContext { + /** + * Device used for texture creation and access. This can also be used to + * set the libavcodec decoding device. + * + * Must be set by the user. This is the only mandatory field - the other + * device context fields are set from this and are available for convenience. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11Device *device; + + /** + * If unset, this will be set from the device field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11DeviceContext *device_context; + + /** + * If unset, this will be set from the device field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11VideoDevice *video_device; + + /** + * If unset, this will be set from the device_context field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11VideoContext *video_context; + + /** + * Callbacks for locking. They protect accesses to device_context and + * video_context calls. They also protect access to the internal staging + * texture (for av_hwframe_transfer_data() calls). They do NOT protect + * access to hwcontext or decoder state in general. + * + * If unset on init, the hwcontext implementation will set them to use an + * internal mutex. + * + * The underlying lock must be recursive. lock_ctx is for free use by the + * locking implementation. + */ + void (*lock)(void *lock_ctx); + void (*unlock)(void *lock_ctx); + void *lock_ctx; +} AVD3D11VADeviceContext; + +/** + * D3D11 frame descriptor for pool allocation. + * + * In user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer pointing at an object of this type describing the + * planes of the frame. + * + * This has no use outside of custom allocation, and AVFrame AVBufferRef do not + * necessarily point to an instance of this struct. + */ +typedef struct AVD3D11FrameDescriptor { + /** + * The texture in which the frame is located. The reference count is + * managed by the AVBufferRef, and destroying the reference will release + * the interface. + * + * Normally stored in AVFrame.data[0]. + */ + ID3D11Texture2D *texture; + + /** + * The index into the array texture element representing the frame, or 0 + * if the texture is not an array texture. + * + * Normally stored in AVFrame.data[1] (cast from intptr_t). + */ + intptr_t index; +} AVD3D11FrameDescriptor; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVD3D11VAFramesContext { + /** + * The canonical texture used for pool allocation. If this is set to NULL + * on init, the hwframes implementation will allocate and set an array + * texture if initial_pool_size > 0. + * + * The only situation when the API user should set this is: + * - the user wants to do manual pool allocation (setting + * AVHWFramesContext.pool), instead of letting AVHWFramesContext + * allocate the pool + * - of an array texture + * - and wants it to use it for decoding + * - this has to be done before calling av_hwframe_ctx_init() + * + * Deallocating the AVHWFramesContext will always release this interface, + * and it does not matter whether it was user-allocated. + * + * This is in particular used by the libavcodec D3D11VA hwaccel, which + * requires a single array texture. It will create ID3D11VideoDecoderOutputView + * objects for each array texture element on decoder initialization. + */ + ID3D11Texture2D *texture; + + /** + * D3D11_TEXTURE2D_DESC.BindFlags used for texture creation. The user must + * at least set D3D11_BIND_DECODER if the frames context is to be used for + * video decoding. + * This field is ignored/invalid if a user-allocated texture is provided. + */ + UINT BindFlags; + + /** + * D3D11_TEXTURE2D_DESC.MiscFlags used for texture creation. + * This field is ignored/invalid if a user-allocated texture is provided. + */ + UINT MiscFlags; +} AVD3D11VAFramesContext; + +#endif /* AVUTIL_HWCONTEXT_D3D11VA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_drm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_drm.h new file mode 100644 index 00000000..42709f21 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_drm.h @@ -0,0 +1,169 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_DRM_H +#define AVUTIL_HWCONTEXT_DRM_H + +#include +#include + +/** + * @file + * API-specific header for AV_HWDEVICE_TYPE_DRM. + * + * Internal frame allocation is not currently supported - all frames + * must be allocated by the user. Thus AVHWFramesContext is always + * NULL, though this may change if support for frame allocation is + * added in future. + */ + +enum { + /** + * The maximum number of layers/planes in a DRM frame. + */ + AV_DRM_MAX_PLANES = 4 +}; + +/** + * DRM object descriptor. + * + * Describes a single DRM object, addressing it as a PRIME file + * descriptor. + */ +typedef struct AVDRMObjectDescriptor { + /** + * DRM PRIME fd for the object. + */ + int fd; + /** + * Total size of the object. + * + * (This includes any parts not which do not contain image data.) + */ + size_t size; + /** + * Format modifier applied to the object (DRM_FORMAT_MOD_*). + * + * If the format modifier is unknown then this should be set to + * DRM_FORMAT_MOD_INVALID. + */ + uint64_t format_modifier; +} AVDRMObjectDescriptor; + +/** + * DRM plane descriptor. + * + * Describes a single plane of a layer, which is contained within + * a single object. + */ +typedef struct AVDRMPlaneDescriptor { + /** + * Index of the object containing this plane in the objects + * array of the enclosing frame descriptor. + */ + int object_index; + /** + * Offset within that object of this plane. + */ + ptrdiff_t offset; + /** + * Pitch (linesize) of this plane. + */ + ptrdiff_t pitch; +} AVDRMPlaneDescriptor; + +/** + * DRM layer descriptor. + * + * Describes a single layer within a frame. This has the structure + * defined by its format, and will contain one or more planes. + */ +typedef struct AVDRMLayerDescriptor { + /** + * Format of the layer (DRM_FORMAT_*). + */ + uint32_t format; + /** + * Number of planes in the layer. + * + * This must match the number of planes required by format. + */ + int nb_planes; + /** + * Array of planes in this layer. + */ + AVDRMPlaneDescriptor planes[AV_DRM_MAX_PLANES]; +} AVDRMLayerDescriptor; + +/** + * DRM frame descriptor. + * + * This is used as the data pointer for AV_PIX_FMT_DRM_PRIME frames. + * It is also used by user-allocated frame pools - allocating in + * AVHWFramesContext.pool must return AVBufferRefs which contain + * an object of this type. + * + * The fields of this structure should be set such it can be + * imported directly by EGL using the EGL_EXT_image_dma_buf_import + * and EGL_EXT_image_dma_buf_import_modifiers extensions. + * (Note that the exact layout of a particular format may vary between + * platforms - we only specify that the same platform should be able + * to import it.) + * + * The total number of planes must not exceed AV_DRM_MAX_PLANES, and + * the order of the planes by increasing layer index followed by + * increasing plane index must be the same as the order which would + * be used for the data pointers in the equivalent software format. + */ +typedef struct AVDRMFrameDescriptor { + /** + * Number of DRM objects making up this frame. + */ + int nb_objects; + /** + * Array of objects making up the frame. + */ + AVDRMObjectDescriptor objects[AV_DRM_MAX_PLANES]; + /** + * Number of layers in the frame. + */ + int nb_layers; + /** + * Array of layers in the frame. + */ + AVDRMLayerDescriptor layers[AV_DRM_MAX_PLANES]; +} AVDRMFrameDescriptor; + +/** + * DRM device. + * + * Allocated as AVHWDeviceContext.hwctx. + */ +typedef struct AVDRMDeviceContext { + /** + * File descriptor of DRM device. + * + * This is used as the device to create frames on, and may also be + * used in some derivation and mapping operations. + * + * If no device is required, set to -1. + */ + int fd; +} AVDRMDeviceContext; + +#endif /* AVUTIL_HWCONTEXT_DRM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_dxva2.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_dxva2.h new file mode 100644 index 00000000..e1b79bc0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_dxva2.h @@ -0,0 +1,75 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_DXVA2_H +#define AVUTIL_HWCONTEXT_DXVA2_H + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_DXVA2. + * + * Only fixed-size pools are supported. + * + * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer set to a pointer to IDirect3DSurface9. + */ + +#include +#include + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVDXVA2DeviceContext { + IDirect3DDeviceManager9 *devmgr; +} AVDXVA2DeviceContext; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVDXVA2FramesContext { + /** + * The surface type (e.g. DXVA2_VideoProcessorRenderTarget or + * DXVA2_VideoDecoderRenderTarget). Must be set by the caller. + */ + DWORD surface_type; + + /** + * The surface pool. When an external pool is not provided by the caller, + * this will be managed (allocated and filled on init, freed on uninit) by + * libavutil. + */ + IDirect3DSurface9 **surfaces; + int nb_surfaces; + + /** + * Certain drivers require the decoder to be destroyed before the surfaces. + * To allow internally managed pools to work properly in such cases, this + * field is provided. + * + * If it is non-NULL, libavutil will call IDirectXVideoDecoder_Release() on + * it just before the internal surface pool is freed. + * + * This is for convenience only. Some code uses other methods to manage the + * decoder reference. + */ + IDirectXVideoDecoder *decoder_to_release; +} AVDXVA2FramesContext; + +#endif /* AVUTIL_HWCONTEXT_DXVA2_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_internal.h new file mode 100644 index 00000000..e6266494 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_internal.h @@ -0,0 +1,178 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_INTERNAL_H +#define AVUTIL_HWCONTEXT_INTERNAL_H + +#include + +#include "buffer.h" +#include "hwcontext.h" +#include "frame.h" +#include "pixfmt.h" + +typedef struct HWContextType { + enum AVHWDeviceType type; + const char *name; + + /** + * An array of pixel formats supported by the AVHWFramesContext instances + * Terminated by AV_PIX_FMT_NONE. + */ + const enum AVPixelFormat *pix_fmts; + + /** + * size of the public hardware-specific context, + * i.e. AVHWDeviceContext.hwctx + */ + size_t device_hwctx_size; + /** + * size of the private data, i.e. + * AVHWDeviceInternal.priv + */ + size_t device_priv_size; + + /** + * Size of the hardware-specific device configuration. + * (Used to query hwframe constraints.) + */ + size_t device_hwconfig_size; + + /** + * size of the public frame pool hardware-specific context, + * i.e. AVHWFramesContext.hwctx + */ + size_t frames_hwctx_size; + /** + * size of the private data, i.e. + * AVHWFramesInternal.priv + */ + size_t frames_priv_size; + + int (*device_create)(AVHWDeviceContext *ctx, const char *device, + AVDictionary *opts, int flags); + int (*device_derive)(AVHWDeviceContext *dst_ctx, + AVHWDeviceContext *src_ctx, + AVDictionary *opts, int flags); + + int (*device_init)(AVHWDeviceContext *ctx); + void (*device_uninit)(AVHWDeviceContext *ctx); + + int (*frames_get_constraints)(AVHWDeviceContext *ctx, + const void *hwconfig, + AVHWFramesConstraints *constraints); + + int (*frames_init)(AVHWFramesContext *ctx); + void (*frames_uninit)(AVHWFramesContext *ctx); + + int (*frames_get_buffer)(AVHWFramesContext *ctx, AVFrame *frame); + int (*transfer_get_formats)(AVHWFramesContext *ctx, + enum AVHWFrameTransferDirection dir, + enum AVPixelFormat **formats); + int (*transfer_data_to)(AVHWFramesContext *ctx, AVFrame *dst, + const AVFrame *src); + int (*transfer_data_from)(AVHWFramesContext *ctx, AVFrame *dst, + const AVFrame *src); + + int (*map_to)(AVHWFramesContext *ctx, AVFrame *dst, + const AVFrame *src, int flags); + int (*map_from)(AVHWFramesContext *ctx, AVFrame *dst, + const AVFrame *src, int flags); + + int (*frames_derive_to)(AVHWFramesContext *dst_ctx, + AVHWFramesContext *src_ctx, int flags); + int (*frames_derive_from)(AVHWFramesContext *dst_ctx, + AVHWFramesContext *src_ctx, int flags); +} HWContextType; + +struct AVHWDeviceInternal { + const HWContextType *hw_type; + void *priv; + + /** + * For a derived device, a reference to the original device + * context it was derived from. + */ + AVBufferRef *source_device; +}; + +struct AVHWFramesInternal { + const HWContextType *hw_type; + void *priv; + + AVBufferPool *pool_internal; + + /** + * For a derived context, a reference to the original frames + * context it was derived from. + */ + AVBufferRef *source_frames; + /** + * Flags to apply to the mapping from the source to the derived + * frame context when trying to allocate in the derived context. + */ + int source_allocation_map_flags; +}; + +typedef struct HWMapDescriptor { + /** + * A reference to the original source of the mapping. + */ + AVFrame *source; + /** + * A reference to the hardware frames context in which this + * mapping was made. May be the same as source->hw_frames_ctx, + * but need not be. + */ + AVBufferRef *hw_frames_ctx; + /** + * Unmap function. + */ + void (*unmap)(AVHWFramesContext *ctx, + struct HWMapDescriptor *hwmap); + /** + * Hardware-specific private data associated with the mapping. + */ + void *priv; +} HWMapDescriptor; + +int ff_hwframe_map_create(AVBufferRef *hwframe_ref, + AVFrame *dst, const AVFrame *src, + void (*unmap)(AVHWFramesContext *ctx, + HWMapDescriptor *hwmap), + void *priv); + +/** + * Replace the current hwmap of dst with the one from src, used for indirect + * mappings like VAAPI->(DRM)->OpenCL/Vulkan where a direct interop is missing + */ +int ff_hwframe_map_replace(AVFrame *dst, const AVFrame *src); + +extern const HWContextType ff_hwcontext_type_cuda; +extern const HWContextType ff_hwcontext_type_d3d11va; +extern const HWContextType ff_hwcontext_type_drm; +extern const HWContextType ff_hwcontext_type_dxva2; +extern const HWContextType ff_hwcontext_type_opencl; +extern const HWContextType ff_hwcontext_type_qsv; +extern const HWContextType ff_hwcontext_type_vaapi; +extern const HWContextType ff_hwcontext_type_vdpau; +extern const HWContextType ff_hwcontext_type_videotoolbox; +extern const HWContextType ff_hwcontext_type_mediacodec; +extern const HWContextType ff_hwcontext_type_vulkan; + +#endif /* AVUTIL_HWCONTEXT_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_mediacodec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_mediacodec.h new file mode 100644 index 00000000..101a9806 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_mediacodec.h @@ -0,0 +1,36 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_MEDIACODEC_H +#define AVUTIL_HWCONTEXT_MEDIACODEC_H + +/** + * MediaCodec details. + * + * Allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVMediaCodecDeviceContext { + /** + * android/view/Surface handle, to be filled by the user. + * + * This is the default surface used by decoders on this device. + */ + void *surface; +} AVMediaCodecDeviceContext; + +#endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_opencl.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_opencl.h new file mode 100644 index 00000000..ef54486c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_opencl.h @@ -0,0 +1,100 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_OPENCL_H +#define AVUTIL_HWCONTEXT_OPENCL_H + +#ifdef __APPLE__ +#include +#else +#include +#endif + +#include "frame.h" + +/** + * @file + * API-specific header for AV_HWDEVICE_TYPE_OPENCL. + * + * Pools allocated internally are always dynamic, and are primarily intended + * to be used in OpenCL-only cases. If interoperation is required, it is + * typically required to allocate frames in the other API and then map the + * frames context to OpenCL with av_hwframe_ctx_create_derived(). + */ + +/** + * OpenCL frame descriptor for pool allocation. + * + * In user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer pointing at an object of this type describing the + * planes of the frame. + */ +typedef struct AVOpenCLFrameDescriptor { + /** + * Number of planes in the frame. + */ + int nb_planes; + /** + * OpenCL image2d objects for each plane of the frame. + */ + cl_mem planes[AV_NUM_DATA_POINTERS]; +} AVOpenCLFrameDescriptor; + +/** + * OpenCL device details. + * + * Allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVOpenCLDeviceContext { + /** + * The primary device ID of the device. If multiple OpenCL devices + * are associated with the context then this is the one which will + * be used for all operations internal to FFmpeg. + */ + cl_device_id device_id; + /** + * The OpenCL context which will contain all operations and frames on + * this device. + */ + cl_context context; + /** + * The default command queue for this device, which will be used by all + * frames contexts which do not have their own command queue. If not + * intialised by the user, a default queue will be created on the + * primary device. + */ + cl_command_queue command_queue; +} AVOpenCLDeviceContext; + +/** + * OpenCL-specific data associated with a frame pool. + * + * Allocated as AVHWFramesContext.hwctx. + */ +typedef struct AVOpenCLFramesContext { + /** + * The command queue used for internal asynchronous operations on this + * device (av_hwframe_transfer_data(), av_hwframe_map()). + * + * If this is not set, the command queue from the associated device is + * used instead. + */ + cl_command_queue command_queue; +} AVOpenCLFramesContext; + +#endif /* AVUTIL_HWCONTEXT_OPENCL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_qsv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_qsv.h new file mode 100644 index 00000000..b98d611c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_qsv.h @@ -0,0 +1,53 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_QSV_H +#define AVUTIL_HWCONTEXT_QSV_H + +#include + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_QSV. + * + * This API does not support dynamic frame pools. AVHWFramesContext.pool must + * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVQSVDeviceContext { + mfxSession session; +} AVQSVDeviceContext; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVQSVFramesContext { + mfxFrameSurface1 *surfaces; + int nb_surfaces; + + /** + * A combination of MFX_MEMTYPE_* describing the frame pool. + */ + int frame_type; +} AVQSVFramesContext; + +#endif /* AVUTIL_HWCONTEXT_QSV_H */ + diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vaapi.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vaapi.h new file mode 100644 index 00000000..0b2e071c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vaapi.h @@ -0,0 +1,117 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VAAPI_H +#define AVUTIL_HWCONTEXT_VAAPI_H + +#include + +/** + * @file + * API-specific header for AV_HWDEVICE_TYPE_VAAPI. + * + * Dynamic frame pools are supported, but note that any pool used as a render + * target is required to be of fixed size in order to be be usable as an + * argument to vaCreateContext(). + * + * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer set to a VASurfaceID. + */ + +enum { + /** + * The quirks field has been set by the user and should not be detected + * automatically by av_hwdevice_ctx_init(). + */ + AV_VAAPI_DRIVER_QUIRK_USER_SET = (1 << 0), + /** + * The driver does not destroy parameter buffers when they are used by + * vaRenderPicture(). Additional code will be required to destroy them + * separately afterwards. + */ + AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1), + + /** + * The driver does not support the VASurfaceAttribMemoryType attribute, + * so the surface allocation code will not try to use it. + */ + AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2), + + /** + * The driver does not support surface attributes at all. + * The surface allocation code will never pass them to surface allocation, + * and the results of the vaQuerySurfaceAttributes() call will be faked. + */ + AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES = (1 << 3), +}; + +/** + * VAAPI connection details. + * + * Allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVVAAPIDeviceContext { + /** + * The VADisplay handle, to be filled by the user. + */ + VADisplay display; + /** + * Driver quirks to apply - this is filled by av_hwdevice_ctx_init(), + * with reference to a table of known drivers, unless the + * AV_VAAPI_DRIVER_QUIRK_USER_SET bit is already present. The user + * may need to refer to this field when performing any later + * operations using VAAPI with the same VADisplay. + */ + unsigned int driver_quirks; +} AVVAAPIDeviceContext; + +/** + * VAAPI-specific data associated with a frame pool. + * + * Allocated as AVHWFramesContext.hwctx. + */ +typedef struct AVVAAPIFramesContext { + /** + * Set by the user to apply surface attributes to all surfaces in + * the frame pool. If null, default settings are used. + */ + VASurfaceAttrib *attributes; + int nb_attributes; + /** + * The surfaces IDs of all surfaces in the pool after creation. + * Only valid if AVHWFramesContext.initial_pool_size was positive. + * These are intended to be used as the render_targets arguments to + * vaCreateContext(). + */ + VASurfaceID *surface_ids; + int nb_surfaces; +} AVVAAPIFramesContext; + +/** + * VAAPI hardware pipeline configuration details. + * + * Allocated with av_hwdevice_hwconfig_alloc(). + */ +typedef struct AVVAAPIHWConfig { + /** + * ID of a VAAPI pipeline configuration. + */ + VAConfigID config_id; +} AVVAAPIHWConfig; + +#endif /* AVUTIL_HWCONTEXT_VAAPI_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vdpau.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vdpau.h new file mode 100644 index 00000000..1b7ea1e4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vdpau.h @@ -0,0 +1,44 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VDPAU_H +#define AVUTIL_HWCONTEXT_VDPAU_H + +#include + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_VDPAU. + * + * This API supports dynamic frame pools. AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a VdpVideoSurface. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVVDPAUDeviceContext { + VdpDevice device; + VdpGetProcAddress *get_proc_address; +} AVVDPAUDeviceContext; + +/** + * AVHWFramesContext.hwctx is currently not used + */ + +#endif /* AVUTIL_HWCONTEXT_VDPAU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_videotoolbox.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_videotoolbox.h new file mode 100644 index 00000000..5074d79e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_videotoolbox.h @@ -0,0 +1,60 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H +#define AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H + +#include + +#include + +#include "pixfmt.h" + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_VIDEOTOOLBOX. + * + * This API currently does not support frame allocation, as the raw VideoToolbox + * API does allocation, and FFmpeg itself never has the need to allocate frames. + * + * If the API user sets a custom pool, AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a CVImageBufferRef or CVPixelBufferRef. + * + * Currently AVHWDeviceContext.hwctx and AVHWFramesContext.hwctx are always + * NULL. + */ + +/** + * Convert a VideoToolbox (actually CoreVideo) format to AVPixelFormat. + * Returns AV_PIX_FMT_NONE if no known equivalent was found. + */ +enum AVPixelFormat av_map_videotoolbox_format_to_pixfmt(uint32_t cv_fmt); + +/** + * Convert an AVPixelFormat to a VideoToolbox (actually CoreVideo) format. + * Returns 0 if no known equivalent was found. + */ +uint32_t av_map_videotoolbox_format_from_pixfmt(enum AVPixelFormat pix_fmt); + +/** + * Same as av_map_videotoolbox_format_from_pixfmt function, but can map and + * return full range pixel formats via a flag. + */ +uint32_t av_map_videotoolbox_format_from_pixfmt2(enum AVPixelFormat pix_fmt, bool full_range); + +#endif /* AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vulkan.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vulkan.h new file mode 100644 index 00000000..5cbeb8e7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/hwcontext_vulkan.h @@ -0,0 +1,204 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_VULKAN_H +#define AVUTIL_HWCONTEXT_VULKAN_H + +#include + +#include "pixfmt.h" +#include "frame.h" + +/** + * @file + * API-specific header for AV_HWDEVICE_TYPE_VULKAN. + * + * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer set to an AVVkFrame. + */ + +/** + * Main Vulkan context, allocated as AVHWDeviceContext.hwctx. + * All of these can be set before init to change what the context uses + */ +typedef struct AVVulkanDeviceContext { + /** + * Custom memory allocator, else NULL + */ + const VkAllocationCallbacks *alloc; + /** + * Vulkan instance. Must be at least version 1.1. + */ + VkInstance inst; + /** + * Physical device + */ + VkPhysicalDevice phys_dev; + /** + * Active device + */ + VkDevice act_dev; + /** + * Queue family index for graphics + * @note av_hwdevice_create() will set all 3 queue indices if unset + * If there is no dedicated queue for compute or transfer operations, + * they will be set to the graphics queue index which can handle both. + * nb_graphics_queues indicates how many queues were enabled for the + * graphics queue (must be at least 1) + */ + int queue_family_index; + int nb_graphics_queues; + /** + * Queue family index to use for transfer operations, and the amount of queues + * enabled. In case there is no dedicated transfer queue, nb_tx_queues + * must be 0 and queue_family_tx_index must be the same as either the graphics + * queue or the compute queue, if available. + */ + int queue_family_tx_index; + int nb_tx_queues; + /** + * Queue family index for compute ops, and the amount of queues enabled. + * In case there are no dedicated compute queues, nb_comp_queues must be + * 0 and its queue family index must be set to the graphics queue. + */ + int queue_family_comp_index; + int nb_comp_queues; + /** + * Enabled instance extensions. + * If supplying your own device context, set this to an array of strings, with + * each entry containing the specified Vulkan extension string to enable. + * Duplicates are possible and accepted. + * If no extensions are enabled, set these fields to NULL, and 0 respectively. + */ + const char * const *enabled_inst_extensions; + int nb_enabled_inst_extensions; + /** + * Enabled device extensions. By default, VK_KHR_external_memory_fd, + * VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier, + * VK_KHR_external_semaphore_fd and VK_EXT_external_memory_host are enabled if found. + * If supplying your own device context, these fields takes the same format as + * the above fields, with the same conditions that duplicates are possible + * and accepted, and that NULL and 0 respectively means no extensions are enabled. + */ + const char * const *enabled_dev_extensions; + int nb_enabled_dev_extensions; + /** + * This structure should be set to the set of features that present and enabled + * during device creation. When a device is created by FFmpeg, it will default to + * enabling all that are present of the shaderImageGatherExtended, + * fragmentStoresAndAtomics, shaderInt64 and vertexPipelineStoresAndAtomics features. + */ + VkPhysicalDeviceFeatures2 device_features; +} AVVulkanDeviceContext; + +/** + * Allocated as AVHWFramesContext.hwctx, used to set pool-specific options + */ +typedef struct AVVulkanFramesContext { + /** + * Controls the tiling of allocated frames. + */ + VkImageTiling tiling; + /** + * Defines extra usage of output frames. If left as 0, the following bits + * are set: TRANSFER_SRC, TRANSFER_DST. SAMPLED and STORAGE. + */ + VkImageUsageFlagBits usage; + /** + * Extension data for image creation. + */ + void *create_pnext; + /** + * Extension data for memory allocation. Must have as many entries as + * the number of planes of the sw_format. + * This will be chained to VkExportMemoryAllocateInfo, which is used + * to make all pool images exportable to other APIs if the necessary + * extensions are present in enabled_dev_extensions. + */ + void *alloc_pnext[AV_NUM_DATA_POINTERS]; +} AVVulkanFramesContext; + +/* + * Frame structure, the VkFormat of the image will always match + * the pool's sw_format. + * All frames, imported or allocated, will be created with the + * VK_IMAGE_CREATE_ALIAS_BIT flag set, so the memory may be aliased if needed. + * + * If all three queue family indices in the device context are the same, + * images will be created with the EXCLUSIVE sharing mode. Otherwise, all images + * will be created using the CONCURRENT sharing mode. + * + * @note the size of this structure is not part of the ABI, to allocate + * you must use @av_vk_frame_alloc(). + */ +typedef struct AVVkFrame { + /** + * Vulkan images to which the memory is bound to. + */ + VkImage img[AV_NUM_DATA_POINTERS]; + + /** + * The same tiling must be used for all images in the frame. + */ + VkImageTiling tiling; + + /** + * Memory backing the images. Could be less than the amount of images + * if importing from a DRM or VAAPI frame. + */ + VkDeviceMemory mem[AV_NUM_DATA_POINTERS]; + size_t size[AV_NUM_DATA_POINTERS]; + + /** + * OR'd flags for all memory allocated + */ + VkMemoryPropertyFlagBits flags; + + /** + * Updated after every barrier + */ + VkAccessFlagBits access[AV_NUM_DATA_POINTERS]; + VkImageLayout layout[AV_NUM_DATA_POINTERS]; + + /** + * Synchronization semaphores. Must not be freed manually. Must be waited on + * and signalled at every queue submission. + * Could be less than the amount of images: either one per VkDeviceMemory + * or one for the entire frame. All others will be set to VK_NULL_HANDLE. + */ + VkSemaphore sem[AV_NUM_DATA_POINTERS]; + + /** + * Internal data. + */ + struct AVVkFrameInternal *internal; +} AVVkFrame; + +/** + * Allocates a single AVVkFrame and initializes everything as 0. + * @note Must be freed via av_free() + */ +AVVkFrame *av_vk_frame_alloc(void); + +/** + * Returns the format of each image up to the number of planes for a given sw_format. + * Returns NULL on unsupported formats. + */ +const VkFormat *av_vkfmt_from_pixfmt(enum AVPixelFormat p); + +#endif /* AVUTIL_HWCONTEXT_VULKAN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils.h new file mode 100644 index 00000000..5b790ecf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils.h @@ -0,0 +1,277 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_IMGUTILS_H +#define AVUTIL_IMGUTILS_H + +/** + * @file + * misc image utilities + * + * @addtogroup lavu_picture + * @{ + */ + +#include "avutil.h" +#include "pixdesc.h" +#include "rational.h" + +/** + * Compute the max pixel step for each plane of an image with a + * format described by pixdesc. + * + * The pixel step is the distance in bytes between the first byte of + * the group of bytes which describe a pixel component and the first + * byte of the successive group in the same plane for the same + * component. + * + * @param max_pixsteps an array which is filled with the max pixel step + * for each plane. Since a plane may contain different pixel + * components, the computed max_pixsteps[plane] is relative to the + * component in the plane with the max pixel step. + * @param max_pixstep_comps an array which is filled with the component + * for each plane which has the max pixel step. May be NULL. + */ +void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], + const AVPixFmtDescriptor *pixdesc); + +/** + * Compute the size of an image line with format pix_fmt and width + * width for the plane plane. + * + * @return the computed size in bytes + */ +int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane); + +/** + * Fill plane linesizes for an image with pixel format pix_fmt and + * width width. + * + * @param linesizes array to be filled with the linesize for each plane + * @return >= 0 in case of success, a negative error code otherwise + */ +int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width); + +/** + * Fill plane data pointers for an image with pixel format pix_fmt and + * height height. + * + * @param data pointers array to be filled with the pointer for each image plane + * @param ptr the pointer to a buffer which will contain the image + * @param linesizes the array containing the linesize for each + * plane, should be filled by av_image_fill_linesizes() + * @return the size in bytes required for the image buffer, a negative + * error code in case of failure + */ +int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, + uint8_t *ptr, const int linesizes[4]); + +/** + * Allocate an image with size w and h and pixel format pix_fmt, and + * fill pointers and linesizes accordingly. + * The allocated image buffer has to be freed by using + * av_freep(&pointers[0]). + * + * @param align the value to use for buffer size alignment + * @return the size in bytes required for the image buffer, a negative + * error code in case of failure + */ +int av_image_alloc(uint8_t *pointers[4], int linesizes[4], + int w, int h, enum AVPixelFormat pix_fmt, int align); + +/** + * Copy image plane from src to dst. + * That is, copy "height" number of lines of "bytewidth" bytes each. + * The first byte of each successive line is separated by *_linesize + * bytes. + * + * bytewidth must be contained by both absolute values of dst_linesize + * and src_linesize, otherwise the function behavior is undefined. + * + * @param dst_linesize linesize for the image plane in dst + * @param src_linesize linesize for the image plane in src + */ +void av_image_copy_plane(uint8_t *dst, int dst_linesize, + const uint8_t *src, int src_linesize, + int bytewidth, int height); + +/** + * Copy image in src_data to dst_data. + * + * @param dst_linesizes linesizes for the image in dst_data + * @param src_linesizes linesizes for the image in src_data + */ +void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], + const uint8_t *src_data[4], const int src_linesizes[4], + enum AVPixelFormat pix_fmt, int width, int height); + +/** + * Copy image data located in uncacheable (e.g. GPU mapped) memory. Where + * available, this function will use special functionality for reading from such + * memory, which may result in greatly improved performance compared to plain + * av_image_copy(). + * + * The data pointers and the linesizes must be aligned to the maximum required + * by the CPU architecture. + * + * @note The linesize parameters have the type ptrdiff_t here, while they are + * int for av_image_copy(). + * @note On x86, the linesizes currently need to be aligned to the cacheline + * size (i.e. 64) to get improved performance. + */ +void av_image_copy_uc_from(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4], + const uint8_t *src_data[4], const ptrdiff_t src_linesizes[4], + enum AVPixelFormat pix_fmt, int width, int height); + +/** + * Setup the data pointers and linesizes based on the specified image + * parameters and the provided array. + * + * The fields of the given image are filled in by using the src + * address which points to the image data buffer. Depending on the + * specified pixel format, one or multiple image data pointers and + * line sizes will be set. If a planar format is specified, several + * pointers will be set pointing to the different picture planes and + * the line sizes of the different planes will be stored in the + * lines_sizes array. Call with src == NULL to get the required + * size for the src buffer. + * + * To allocate the buffer and fill in the dst_data and dst_linesize in + * one call, use av_image_alloc(). + * + * @param dst_data data pointers to be filled in + * @param dst_linesize linesizes for the image in dst_data to be filled in + * @param src buffer which will contain or contains the actual image data, can be NULL + * @param pix_fmt the pixel format of the image + * @param width the width of the image in pixels + * @param height the height of the image in pixels + * @param align the value used in src for linesize alignment + * @return the size in bytes required for src, a negative error code + * in case of failure + */ +int av_image_fill_arrays(uint8_t *dst_data[4], int dst_linesize[4], + const uint8_t *src, + enum AVPixelFormat pix_fmt, int width, int height, int align); + +/** + * Return the size in bytes of the amount of data required to store an + * image with the given parameters. + * + * @param pix_fmt the pixel format of the image + * @param width the width of the image in pixels + * @param height the height of the image in pixels + * @param align the assumed linesize alignment + * @return the buffer size in bytes, a negative error code in case of failure + */ +int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align); + +/** + * Copy image data from an image into a buffer. + * + * av_image_get_buffer_size() can be used to compute the required size + * for the buffer to fill. + * + * @param dst a buffer into which picture data will be copied + * @param dst_size the size in bytes of dst + * @param src_data pointers containing the source image data + * @param src_linesize linesizes for the image in src_data + * @param pix_fmt the pixel format of the source image + * @param width the width of the source image in pixels + * @param height the height of the source image in pixels + * @param align the assumed linesize alignment for dst + * @return the number of bytes written to dst, or a negative value + * (error code) on error + */ +int av_image_copy_to_buffer(uint8_t *dst, int dst_size, + const uint8_t * const src_data[4], const int src_linesize[4], + enum AVPixelFormat pix_fmt, int width, int height, int align); + +/** + * Check if the given dimension of an image is valid, meaning that all + * bytes of the image can be addressed with a signed int. + * + * @param w the width of the picture + * @param h the height of the picture + * @param log_offset the offset to sum to the log level for logging with log_ctx + * @param log_ctx the parent logging context, it may be NULL + * @return >= 0 if valid, a negative error code otherwise + */ +int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx); + +/** + * Check if the given dimension of an image is valid, meaning that all + * bytes of a plane of an image with the specified pix_fmt can be addressed + * with a signed int. + * + * @param w the width of the picture + * @param h the height of the picture + * @param max_pixels the maximum number of pixels the user wants to accept + * @param pix_fmt the pixel format, can be AV_PIX_FMT_NONE if unknown. + * @param log_offset the offset to sum to the log level for logging with log_ctx + * @param log_ctx the parent logging context, it may be NULL + * @return >= 0 if valid, a negative error code otherwise + */ +int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enum AVPixelFormat pix_fmt, int log_offset, void *log_ctx); + +/** + * Check if the given sample aspect ratio of an image is valid. + * + * It is considered invalid if the denominator is 0 or if applying the ratio + * to the image size would make the smaller dimension less than 1. If the + * sar numerator is 0, it is considered unknown and will return as valid. + * + * @param w width of the image + * @param h height of the image + * @param sar sample aspect ratio of the image + * @return 0 if valid, a negative AVERROR code otherwise + */ +int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar); + +/** + * Overwrite the image data with black. This is suitable for filling a + * sub-rectangle of an image, meaning the padding between the right most pixel + * and the left most pixel on the next line will not be overwritten. For some + * formats, the image size might be rounded up due to inherent alignment. + * + * If the pixel format has alpha, the alpha is cleared to opaque. + * + * This can return an error if the pixel format is not supported. Normally, all + * non-hwaccel pixel formats should be supported. + * + * Passing NULL for dst_data is allowed. Then the function returns whether the + * operation would have succeeded. (It can return an error if the pix_fmt is + * not supported.) + * + * @param dst_data data pointers to destination image + * @param dst_linesize linesizes for the destination image + * @param pix_fmt the pixel format of the image + * @param range the color range of the image (important for colorspaces such as YUV) + * @param width the width of the image in pixels + * @param height the height of the image in pixels + * @return 0 if the image data was cleared, a negative AVERROR code otherwise + */ +int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4], + enum AVPixelFormat pix_fmt, enum AVColorRange range, + int width, int height); + +/** + * @} + */ + + +#endif /* AVUTIL_IMGUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils_internal.h new file mode 100644 index 00000000..d5158584 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/imgutils_internal.h @@ -0,0 +1,30 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_IMGUTILS_INTERNAL_H +#define AVUTIL_IMGUTILS_INTERNAL_H + +#include +#include + +int ff_image_copy_plane_uc_from_x86(uint8_t *dst, ptrdiff_t dst_linesize, + const uint8_t *src, ptrdiff_t src_linesize, + ptrdiff_t bytewidth, int height); + + +#endif /* AVUTIL_IMGUTILS_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/integer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/integer.h new file mode 100644 index 00000000..45f733c0 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/integer.h @@ -0,0 +1,86 @@ +/* + * arbitrary precision integers + * Copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * arbitrary precision integers + * @author Michael Niedermayer + */ + +#ifndef AVUTIL_INTEGER_H +#define AVUTIL_INTEGER_H + +#include +#include "common.h" + +#define AV_INTEGER_SIZE 8 + +typedef struct AVInteger{ + uint16_t v[AV_INTEGER_SIZE]; +} AVInteger; + +AVInteger av_add_i(AVInteger a, AVInteger b) av_const; +AVInteger av_sub_i(AVInteger a, AVInteger b) av_const; + +/** + * Return the rounded-down value of the base 2 logarithm of the given + * AVInteger. This is simply the index of the most significant bit + * which is 1, or 0 if all bits are 0. + */ +int av_log2_i(AVInteger a) av_const; +AVInteger av_mul_i(AVInteger a, AVInteger b) av_const; + +/** + * Return 0 if a==b, 1 if a>b and -1 if a + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * common internal API header + */ + +#ifndef AVUTIL_INTERNAL_H +#define AVUTIL_INTERNAL_H + +#if !defined(DEBUG) && !defined(NDEBUG) +# define NDEBUG +#endif + +// This can be enabled to allow detection of additional integer overflows with ubsan +//#define CHECKED + +#include +#include +#include +#include +#include "config.h" +#include "attributes.h" +#include "timer.h" +#include "cpu.h" +#include "dict.h" +#include "macros.h" +#include "mem.h" +#include "pixfmt.h" +#include "version.h" + +#if ARCH_X86 +# include "x86/emms.h" +#endif + +#ifndef emms_c +# define emms_c() do {} while(0) +#endif + +#ifndef attribute_align_arg +#if ARCH_X86_32 && AV_GCC_VERSION_AT_LEAST(4,2) +# define attribute_align_arg __attribute__((force_align_arg_pointer)) +#else +# define attribute_align_arg +#endif +#endif + +#if defined(_WIN32) && CONFIG_SHARED && !defined(BUILDING_avutil) +# define av_export_avutil __declspec(dllimport) +#else +# define av_export_avutil +#endif + +#if HAVE_PRAGMA_DEPRECATED +# if defined(__ICL) || defined (__INTEL_COMPILER) +# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:1478)) +# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop)) +# elif defined(_MSC_VER) +# define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996)) +# define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop)) +# else +# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop") +# endif +#else +# define FF_DISABLE_DEPRECATION_WARNINGS +# define FF_ENABLE_DEPRECATION_WARNINGS +#endif + + +#define FF_MEMORY_POISON 0x2a + +#define MAKE_ACCESSORS(str, name, type, field) \ + type av_##name##_get_##field(const str *s) { return s->field; } \ + void av_##name##_set_##field(str *s, type v) { s->field = v; } + +// Some broken preprocessors need a second expansion +// to be forced to tokenize __VA_ARGS__ +#define E1(x) x + +/* Check if the hard coded offset of a struct member still matches reality. + * Induce a compilation failure if not. + */ +#define AV_CHECK_OFFSET(s, m, o) struct check_##o { \ + int x_##o[offsetof(s, m) == o? 1: -1]; \ + } + +#define LOCAL_ALIGNED_A(a, t, v, s, o, ...) \ + uint8_t la_##v[sizeof(t s o) + (a)]; \ + t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a) + +#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) \ + DECLARE_ALIGNED(a, t, la_##v) s o; \ + t (*v) o = la_##v + +#define LOCAL_ALIGNED(a, t, v, ...) LOCAL_ALIGNED_##a(t, v, __VA_ARGS__) + +#if HAVE_LOCAL_ALIGNED +# define LOCAL_ALIGNED_4(t, v, ...) E1(LOCAL_ALIGNED_D(4, t, v, __VA_ARGS__,,)) +#else +# define LOCAL_ALIGNED_4(t, v, ...) E1(LOCAL_ALIGNED_A(4, t, v, __VA_ARGS__,,)) +#endif + +#if HAVE_LOCAL_ALIGNED +# define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,)) +#else +# define LOCAL_ALIGNED_8(t, v, ...) E1(LOCAL_ALIGNED_A(8, t, v, __VA_ARGS__,,)) +#endif + +#if HAVE_LOCAL_ALIGNED +# define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,)) +#else +# define LOCAL_ALIGNED_16(t, v, ...) E1(LOCAL_ALIGNED_A(16, t, v, __VA_ARGS__,,)) +#endif + +#if HAVE_LOCAL_ALIGNED +# define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_D(32, t, v, __VA_ARGS__,,)) +#else +# define LOCAL_ALIGNED_32(t, v, ...) E1(LOCAL_ALIGNED_A(32, t, v, __VA_ARGS__,,)) +#endif + +#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ +{\ + p = av_malloc(size);\ + if (!(p) && (size) != 0) {\ + av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\ + goto label;\ + }\ +} + +#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)\ +{\ + p = av_mallocz(size);\ + if (!(p) && (size) != 0) {\ + av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\ + goto label;\ + }\ +} + +#define FF_ALLOC_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\ +{\ + p = av_malloc_array(nelem, elsize);\ + if (!p) {\ + av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\ + goto label;\ + }\ +} + +#define FF_ALLOCZ_ARRAY_OR_GOTO(ctx, p, nelem, elsize, label)\ +{\ + p = av_mallocz_array(nelem, elsize);\ + if (!p) {\ + av_log(ctx, AV_LOG_ERROR, "Cannot allocate memory.\n");\ + goto label;\ + }\ +} + +#include "libm.h" + +/** + * Return NULL if CONFIG_SMALL is true, otherwise the argument + * without modification. Used to disable the definition of strings + * (for example AVCodec long_names). + */ +#if CONFIG_SMALL +# define NULL_IF_CONFIG_SMALL(x) NULL +#else +# define NULL_IF_CONFIG_SMALL(x) x +#endif + +/** + * Define a function with only the non-default version specified. + * + * On systems with ELF shared libraries, all symbols exported from + * FFmpeg libraries are tagged with the name and major version of the + * library to which they belong. If a function is moved from one + * library to another, a wrapper must be retained in the original + * location to preserve binary compatibility. + * + * Functions defined with this macro will never be used to resolve + * symbols by the build-time linker. + * + * @param type return type of function + * @param name name of function + * @param args argument list of function + * @param ver version tag to assign function + */ +#if HAVE_SYMVER_ASM_LABEL +# define FF_SYMVER(type, name, args, ver) \ + type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver); \ + type ff_##name args +#elif HAVE_SYMVER_GNU_ASM +# define FF_SYMVER(type, name, args, ver) \ + __asm__ (".symver ff_" #name "," EXTERN_PREFIX #name "@" ver); \ + type ff_##name args; \ + type ff_##name args +#endif + +/** + * Return NULL if a threading library has not been enabled. + * Used to disable threading functions in AVCodec definitions + * when not needed. + */ +#if HAVE_THREADS +# define ONLY_IF_THREADS_ENABLED(x) x +#else +# define ONLY_IF_THREADS_ENABLED(x) NULL +#endif + +/** + * Log a generic warning message about a missing feature. + * + * @param[in] avc a pointer to an arbitrary struct of which the first + * field is a pointer to an AVClass struct + * @param[in] msg string containing the name of the missing feature + */ +void avpriv_report_missing_feature(void *avc, + const char *msg, ...) av_printf_format(2, 3); + +/** + * Log a generic warning message about a missing feature. + * Additionally request that a sample showcasing the feature be uploaded. + * + * @param[in] avc a pointer to an arbitrary struct of which the first field is + * a pointer to an AVClass struct + * @param[in] msg string containing the name of the missing feature + */ +void avpriv_request_sample(void *avc, + const char *msg, ...) av_printf_format(2, 3); + +#if HAVE_LIBC_MSVCRT +#include +#if defined(_VC_CRT_MAJOR_VERSION) && _VC_CRT_MAJOR_VERSION < 14 +#pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_strtod") +#pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf") +#endif + +#define avpriv_open ff_open +#define avpriv_tempfile ff_tempfile +#define PTRDIFF_SPECIFIER "Id" +#define SIZE_SPECIFIER "Iu" +#else +#define PTRDIFF_SPECIFIER "td" +#define SIZE_SPECIFIER "zu" +#endif + +#ifdef DEBUG +# define ff_dlog(ctx, ...) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__) +#else +# define ff_dlog(ctx, ...) do { if (0) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0) +#endif + +// For debuging we use signed operations so overflows can be detected (by ubsan) +// For production we use unsigned so there are no undefined operations +#ifdef CHECKED +#define SUINT int +#define SUINT32 int32_t +#else +#define SUINT unsigned +#define SUINT32 uint32_t +#endif + +/** + * Clip and convert a double value into the long long amin-amax range. + * This function is needed because conversion of floating point to integers when + * it does not fit in the integer's representation does not necessarily saturate + * correctly (usually converted to a cvttsd2si on x86) which saturates numbers + * > INT64_MAX to INT64_MIN. The standard marks such conversions as undefined + * behavior, allowing this sort of mathematically bogus conversions. This provides + * a safe alternative that is slower obviously but assures safety and better + * mathematical behavior. + * @param a value to clip + * @param amin minimum value of the clip range + * @param amax maximum value of the clip range + * @return clipped value + */ +static av_always_inline av_const int64_t ff_rint64_clip(double a, int64_t amin, int64_t amax) +{ + int64_t res; +#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + // INT64_MAX+1,INT64_MIN are exactly representable as IEEE doubles + // do range checks first + if (a >= 9223372036854775808.0) + return amax; + if (a <= -9223372036854775808.0) + return amin; + + // safe to call llrint and clip accordingly + res = llrint(a); + if (res > amax) + return amax; + if (res < amin) + return amin; + return res; +} + +/** + * A wrapper for open() setting O_CLOEXEC. + */ +av_warn_unused_result +int avpriv_open(const char *filename, int flags, ...); + +/** + * Wrapper to work around the lack of mkstemp() on mingw. + * Also, tries to create file in /tmp first, if possible. + * *prefix can be a character constant; *filename will be allocated internally. + * @return file descriptor of opened file (or negative value corresponding to an + * AVERROR code on error) + * and opened file name in **filename. + * @note On very old libcs it is necessary to set a secure umask before + * calling this, av_tempfile() can't call umask itself as it is used in + * libraries and could interfere with the calling application. + */ +int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); + +int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt); + +static av_always_inline av_const int avpriv_mirror(int x, int w) +{ + if (!w) + return 0; + + while ((unsigned)x > (unsigned)w) { + x = -x; + if (x < 0) + x += 2 * w; + } + return x; +} + +void ff_check_pixfmt_descriptors(void); + +/** + * Set a dictionary value to an ISO-8601 compliant timestamp string. + * + * @param s AVFormatContext + * @param key metadata key + * @param timestamp unix timestamp in microseconds + * @return <0 on error + */ +int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp); + +// Helper macro for AV_PIX_FMT_FLAG_PSEUDOPAL deprecation. Code inside FFmpeg +// should always use FF_PSEUDOPAL. Once the public API flag gets removed, all +// code using it is dead code. +#if FF_API_PSEUDOPAL +#define FF_PSEUDOPAL AV_PIX_FMT_FLAG_PSEUDOPAL +#else +#define FF_PSEUDOPAL 0 +#endif + +#endif /* AVUTIL_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intfloat.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intfloat.h new file mode 100644 index 00000000..fe3d7ec4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intfloat.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2011 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_INTFLOAT_H +#define AVUTIL_INTFLOAT_H + +#include +#include "attributes.h" + +union av_intfloat32 { + uint32_t i; + float f; +}; + +union av_intfloat64 { + uint64_t i; + double f; +}; + +/** + * Reinterpret a 32-bit integer as a float. + */ +static av_always_inline float av_int2float(uint32_t i) +{ + union av_intfloat32 v; + v.i = i; + return v.f; +} + +/** + * Reinterpret a float as a 32-bit integer. + */ +static av_always_inline uint32_t av_float2int(float f) +{ + union av_intfloat32 v; + v.f = f; + return v.i; +} + +/** + * Reinterpret a 64-bit integer as a double. + */ +static av_always_inline double av_int2double(uint64_t i) +{ + union av_intfloat64 v; + v.i = i; + return v.f; +} + +/** + * Reinterpret a double as a 64-bit integer. + */ +static av_always_inline uint64_t av_double2int(double f) +{ + union av_intfloat64 v; + v.f = f; + return v.i; +} + +#endif /* AVUTIL_INTFLOAT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intmath.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intmath.h new file mode 100644 index 00000000..9573109e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intmath.h @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_INTMATH_H +#define AVUTIL_INTMATH_H + +#include + +#include "config.h" +#include "attributes.h" + +#if ARCH_ARM +# include "arm/intmath.h" +#endif +#if ARCH_X86 +# include "x86/intmath.h" +#endif + +#if HAVE_FAST_CLZ +#if AV_GCC_VERSION_AT_LEAST(3,4) +#ifndef ff_log2 +# define ff_log2(x) (31 - __builtin_clz((x)|1)) +# ifndef ff_log2_16bit +# define ff_log2_16bit av_log2 +# endif +#endif /* ff_log2 */ +#endif /* AV_GCC_VERSION_AT_LEAST(3,4) */ +#endif + +extern const uint8_t ff_log2_tab[256]; + +#ifndef ff_log2 +#define ff_log2 ff_log2_c +static av_always_inline av_const int ff_log2_c(unsigned int v) +{ + int n = 0; + if (v & 0xffff0000) { + v >>= 16; + n += 16; + } + if (v & 0xff00) { + v >>= 8; + n += 8; + } + n += ff_log2_tab[v]; + + return n; +} +#endif + +#ifndef ff_log2_16bit +#define ff_log2_16bit ff_log2_16bit_c +static av_always_inline av_const int ff_log2_16bit_c(unsigned int v) +{ + int n = 0; + if (v & 0xff00) { + v >>= 8; + n += 8; + } + n += ff_log2_tab[v]; + + return n; +} +#endif + +#define av_log2 ff_log2 +#define av_log2_16bit ff_log2_16bit + +/** + * @addtogroup lavu_math + * @{ + */ + +#if HAVE_FAST_CLZ +#if AV_GCC_VERSION_AT_LEAST(3,4) +#ifndef ff_ctz +#define ff_ctz(v) __builtin_ctz(v) +#endif +#ifndef ff_ctzll +#define ff_ctzll(v) __builtin_ctzll(v) +#endif +#ifndef ff_clz +#define ff_clz(v) __builtin_clz(v) +#endif +#endif +#endif + +#ifndef ff_ctz +#define ff_ctz ff_ctz_c +/** + * Trailing zero bit count. + * + * @param v input value. If v is 0, the result is undefined. + * @return the number of trailing 0-bits + */ +/* We use the De-Bruijn method outlined in: + * http://supertech.csail.mit.edu/papers/debruijn.pdf. */ +static av_always_inline av_const int ff_ctz_c(int v) +{ + static const uint8_t debruijn_ctz32[32] = { + 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, + 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 + }; + return debruijn_ctz32[(uint32_t)((v & -v) * 0x077CB531U) >> 27]; +} +#endif + +#ifndef ff_ctzll +#define ff_ctzll ff_ctzll_c +/* We use the De-Bruijn method outlined in: + * http://supertech.csail.mit.edu/papers/debruijn.pdf. */ +static av_always_inline av_const int ff_ctzll_c(long long v) +{ + static const uint8_t debruijn_ctz64[64] = { + 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28, + 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11, + 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10, + 51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12 + }; + return debruijn_ctz64[(uint64_t)((v & -v) * 0x022FDD63CC95386DU) >> 58]; +} +#endif + +#ifndef ff_clz +#define ff_clz ff_clz_c +static av_always_inline av_const unsigned ff_clz_c(unsigned x) +{ + unsigned i = sizeof(x) * 8; + + while (x) { + x >>= 1; + i--; + } + + return i; +} +#endif + +#if AV_GCC_VERSION_AT_LEAST(3,4) +#ifndef av_parity +#define av_parity __builtin_parity +#endif +#endif + +/** + * @} + */ +#endif /* AVUTIL_INTMATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intreadwrite.h new file mode 100644 index 00000000..4c8413a5 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/intreadwrite.h @@ -0,0 +1,644 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_INTREADWRITE_H +#define AVUTIL_INTREADWRITE_H + +#include +#include "libavutil/avconfig.h" +#include "attributes.h" +#include "bswap.h" + +typedef union { + uint64_t u64; + uint32_t u32[2]; + uint16_t u16[4]; + uint8_t u8 [8]; + double f64; + float f32[2]; +} av_alias av_alias64; + +typedef union { + uint32_t u32; + uint16_t u16[2]; + uint8_t u8 [4]; + float f32; +} av_alias av_alias32; + +typedef union { + uint16_t u16; + uint8_t u8 [2]; +} av_alias av_alias16; + +/* + * Arch-specific headers can provide any combination of + * AV_[RW][BLN](16|24|32|48|64) and AV_(COPY|SWAP|ZERO)(64|128) macros. + * Preprocessor symbols must be defined, even if these are implemented + * as inline functions. + * + * R/W means read/write, B/L/N means big/little/native endianness. + * The following macros require aligned access, compared to their + * unaligned variants: AV_(COPY|SWAP|ZERO)(64|128), AV_[RW]N[8-64]A. + * Incorrect usage may range from abysmal performance to crash + * depending on the platform. + * + * The unaligned variants are AV_[RW][BLN][8-64] and AV_COPY*U. + */ + +#ifdef HAVE_AV_CONFIG_H + +#include "config.h" + +#if ARCH_ARM +# include "arm/intreadwrite.h" +#elif ARCH_AVR32 +# include "avr32/intreadwrite.h" +#elif ARCH_MIPS +# include "mips/intreadwrite.h" +#elif ARCH_PPC +# include "ppc/intreadwrite.h" +#elif ARCH_TOMI +# include "tomi/intreadwrite.h" +#elif ARCH_X86 +# include "x86/intreadwrite.h" +#endif + +#endif /* HAVE_AV_CONFIG_H */ + +/* + * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers. + */ + +#if AV_HAVE_BIGENDIAN + +# if defined(AV_RN16) && !defined(AV_RB16) +# define AV_RB16(p) AV_RN16(p) +# elif !defined(AV_RN16) && defined(AV_RB16) +# define AV_RN16(p) AV_RB16(p) +# endif + +# if defined(AV_WN16) && !defined(AV_WB16) +# define AV_WB16(p, v) AV_WN16(p, v) +# elif !defined(AV_WN16) && defined(AV_WB16) +# define AV_WN16(p, v) AV_WB16(p, v) +# endif + +# if defined(AV_RN24) && !defined(AV_RB24) +# define AV_RB24(p) AV_RN24(p) +# elif !defined(AV_RN24) && defined(AV_RB24) +# define AV_RN24(p) AV_RB24(p) +# endif + +# if defined(AV_WN24) && !defined(AV_WB24) +# define AV_WB24(p, v) AV_WN24(p, v) +# elif !defined(AV_WN24) && defined(AV_WB24) +# define AV_WN24(p, v) AV_WB24(p, v) +# endif + +# if defined(AV_RN32) && !defined(AV_RB32) +# define AV_RB32(p) AV_RN32(p) +# elif !defined(AV_RN32) && defined(AV_RB32) +# define AV_RN32(p) AV_RB32(p) +# endif + +# if defined(AV_WN32) && !defined(AV_WB32) +# define AV_WB32(p, v) AV_WN32(p, v) +# elif !defined(AV_WN32) && defined(AV_WB32) +# define AV_WN32(p, v) AV_WB32(p, v) +# endif + +# if defined(AV_RN48) && !defined(AV_RB48) +# define AV_RB48(p) AV_RN48(p) +# elif !defined(AV_RN48) && defined(AV_RB48) +# define AV_RN48(p) AV_RB48(p) +# endif + +# if defined(AV_WN48) && !defined(AV_WB48) +# define AV_WB48(p, v) AV_WN48(p, v) +# elif !defined(AV_WN48) && defined(AV_WB48) +# define AV_WN48(p, v) AV_WB48(p, v) +# endif + +# if defined(AV_RN64) && !defined(AV_RB64) +# define AV_RB64(p) AV_RN64(p) +# elif !defined(AV_RN64) && defined(AV_RB64) +# define AV_RN64(p) AV_RB64(p) +# endif + +# if defined(AV_WN64) && !defined(AV_WB64) +# define AV_WB64(p, v) AV_WN64(p, v) +# elif !defined(AV_WN64) && defined(AV_WB64) +# define AV_WN64(p, v) AV_WB64(p, v) +# endif + +#else /* AV_HAVE_BIGENDIAN */ + +# if defined(AV_RN16) && !defined(AV_RL16) +# define AV_RL16(p) AV_RN16(p) +# elif !defined(AV_RN16) && defined(AV_RL16) +# define AV_RN16(p) AV_RL16(p) +# endif + +# if defined(AV_WN16) && !defined(AV_WL16) +# define AV_WL16(p, v) AV_WN16(p, v) +# elif !defined(AV_WN16) && defined(AV_WL16) +# define AV_WN16(p, v) AV_WL16(p, v) +# endif + +# if defined(AV_RN24) && !defined(AV_RL24) +# define AV_RL24(p) AV_RN24(p) +# elif !defined(AV_RN24) && defined(AV_RL24) +# define AV_RN24(p) AV_RL24(p) +# endif + +# if defined(AV_WN24) && !defined(AV_WL24) +# define AV_WL24(p, v) AV_WN24(p, v) +# elif !defined(AV_WN24) && defined(AV_WL24) +# define AV_WN24(p, v) AV_WL24(p, v) +# endif + +# if defined(AV_RN32) && !defined(AV_RL32) +# define AV_RL32(p) AV_RN32(p) +# elif !defined(AV_RN32) && defined(AV_RL32) +# define AV_RN32(p) AV_RL32(p) +# endif + +# if defined(AV_WN32) && !defined(AV_WL32) +# define AV_WL32(p, v) AV_WN32(p, v) +# elif !defined(AV_WN32) && defined(AV_WL32) +# define AV_WN32(p, v) AV_WL32(p, v) +# endif + +# if defined(AV_RN48) && !defined(AV_RL48) +# define AV_RL48(p) AV_RN48(p) +# elif !defined(AV_RN48) && defined(AV_RL48) +# define AV_RN48(p) AV_RL48(p) +# endif + +# if defined(AV_WN48) && !defined(AV_WL48) +# define AV_WL48(p, v) AV_WN48(p, v) +# elif !defined(AV_WN48) && defined(AV_WL48) +# define AV_WN48(p, v) AV_WL48(p, v) +# endif + +# if defined(AV_RN64) && !defined(AV_RL64) +# define AV_RL64(p) AV_RN64(p) +# elif !defined(AV_RN64) && defined(AV_RL64) +# define AV_RN64(p) AV_RL64(p) +# endif + +# if defined(AV_WN64) && !defined(AV_WL64) +# define AV_WL64(p, v) AV_WN64(p, v) +# elif !defined(AV_WN64) && defined(AV_WL64) +# define AV_WN64(p, v) AV_WL64(p, v) +# endif + +#endif /* !AV_HAVE_BIGENDIAN */ + +/* + * Define AV_[RW]N helper macros to simplify definitions not provided + * by per-arch headers. + */ + +#if defined(__GNUC__) + +union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias; +union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias; +union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias; + +# define AV_RN(s, p) (((const union unaligned_##s *) (p))->l) +# define AV_WN(s, p, v) ((((union unaligned_##s *) (p))->l) = (v)) + +#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_X64) || defined(_M_ARM64)) && AV_HAVE_FAST_UNALIGNED + +# define AV_RN(s, p) (*((const __unaligned uint##s##_t*)(p))) +# define AV_WN(s, p, v) (*((__unaligned uint##s##_t*)(p)) = (v)) + +#elif AV_HAVE_FAST_UNALIGNED + +# define AV_RN(s, p) (((const av_alias##s*)(p))->u##s) +# define AV_WN(s, p, v) (((av_alias##s*)(p))->u##s = (v)) + +#else + +#ifndef AV_RB16 +# define AV_RB16(x) \ + ((((const uint8_t*)(x))[0] << 8) | \ + ((const uint8_t*)(x))[1]) +#endif +#ifndef AV_WB16 +# define AV_WB16(p, val) do { \ + uint16_t d = (val); \ + ((uint8_t*)(p))[1] = (d); \ + ((uint8_t*)(p))[0] = (d)>>8; \ + } while(0) +#endif + +#ifndef AV_RL16 +# define AV_RL16(x) \ + ((((const uint8_t*)(x))[1] << 8) | \ + ((const uint8_t*)(x))[0]) +#endif +#ifndef AV_WL16 +# define AV_WL16(p, val) do { \ + uint16_t d = (val); \ + ((uint8_t*)(p))[0] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + } while(0) +#endif + +#ifndef AV_RB32 +# define AV_RB32(x) \ + (((uint32_t)((const uint8_t*)(x))[0] << 24) | \ + (((const uint8_t*)(x))[1] << 16) | \ + (((const uint8_t*)(x))[2] << 8) | \ + ((const uint8_t*)(x))[3]) +#endif +#ifndef AV_WB32 +# define AV_WB32(p, val) do { \ + uint32_t d = (val); \ + ((uint8_t*)(p))[3] = (d); \ + ((uint8_t*)(p))[2] = (d)>>8; \ + ((uint8_t*)(p))[1] = (d)>>16; \ + ((uint8_t*)(p))[0] = (d)>>24; \ + } while(0) +#endif + +#ifndef AV_RL32 +# define AV_RL32(x) \ + (((uint32_t)((const uint8_t*)(x))[3] << 24) | \ + (((const uint8_t*)(x))[2] << 16) | \ + (((const uint8_t*)(x))[1] << 8) | \ + ((const uint8_t*)(x))[0]) +#endif +#ifndef AV_WL32 +# define AV_WL32(p, val) do { \ + uint32_t d = (val); \ + ((uint8_t*)(p))[0] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + ((uint8_t*)(p))[2] = (d)>>16; \ + ((uint8_t*)(p))[3] = (d)>>24; \ + } while(0) +#endif + +#ifndef AV_RB64 +# define AV_RB64(x) \ + (((uint64_t)((const uint8_t*)(x))[0] << 56) | \ + ((uint64_t)((const uint8_t*)(x))[1] << 48) | \ + ((uint64_t)((const uint8_t*)(x))[2] << 40) | \ + ((uint64_t)((const uint8_t*)(x))[3] << 32) | \ + ((uint64_t)((const uint8_t*)(x))[4] << 24) | \ + ((uint64_t)((const uint8_t*)(x))[5] << 16) | \ + ((uint64_t)((const uint8_t*)(x))[6] << 8) | \ + (uint64_t)((const uint8_t*)(x))[7]) +#endif +#ifndef AV_WB64 +# define AV_WB64(p, val) do { \ + uint64_t d = (val); \ + ((uint8_t*)(p))[7] = (d); \ + ((uint8_t*)(p))[6] = (d)>>8; \ + ((uint8_t*)(p))[5] = (d)>>16; \ + ((uint8_t*)(p))[4] = (d)>>24; \ + ((uint8_t*)(p))[3] = (d)>>32; \ + ((uint8_t*)(p))[2] = (d)>>40; \ + ((uint8_t*)(p))[1] = (d)>>48; \ + ((uint8_t*)(p))[0] = (d)>>56; \ + } while(0) +#endif + +#ifndef AV_RL64 +# define AV_RL64(x) \ + (((uint64_t)((const uint8_t*)(x))[7] << 56) | \ + ((uint64_t)((const uint8_t*)(x))[6] << 48) | \ + ((uint64_t)((const uint8_t*)(x))[5] << 40) | \ + ((uint64_t)((const uint8_t*)(x))[4] << 32) | \ + ((uint64_t)((const uint8_t*)(x))[3] << 24) | \ + ((uint64_t)((const uint8_t*)(x))[2] << 16) | \ + ((uint64_t)((const uint8_t*)(x))[1] << 8) | \ + (uint64_t)((const uint8_t*)(x))[0]) +#endif +#ifndef AV_WL64 +# define AV_WL64(p, val) do { \ + uint64_t d = (val); \ + ((uint8_t*)(p))[0] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + ((uint8_t*)(p))[2] = (d)>>16; \ + ((uint8_t*)(p))[3] = (d)>>24; \ + ((uint8_t*)(p))[4] = (d)>>32; \ + ((uint8_t*)(p))[5] = (d)>>40; \ + ((uint8_t*)(p))[6] = (d)>>48; \ + ((uint8_t*)(p))[7] = (d)>>56; \ + } while(0) +#endif + +#if AV_HAVE_BIGENDIAN +# define AV_RN(s, p) AV_RB##s(p) +# define AV_WN(s, p, v) AV_WB##s(p, v) +#else +# define AV_RN(s, p) AV_RL##s(p) +# define AV_WN(s, p, v) AV_WL##s(p, v) +#endif + +#endif /* HAVE_FAST_UNALIGNED */ + +#ifndef AV_RN16 +# define AV_RN16(p) AV_RN(16, p) +#endif + +#ifndef AV_RN32 +# define AV_RN32(p) AV_RN(32, p) +#endif + +#ifndef AV_RN64 +# define AV_RN64(p) AV_RN(64, p) +#endif + +#ifndef AV_WN16 +# define AV_WN16(p, v) AV_WN(16, p, v) +#endif + +#ifndef AV_WN32 +# define AV_WN32(p, v) AV_WN(32, p, v) +#endif + +#ifndef AV_WN64 +# define AV_WN64(p, v) AV_WN(64, p, v) +#endif + +#if AV_HAVE_BIGENDIAN +# define AV_RB(s, p) AV_RN##s(p) +# define AV_WB(s, p, v) AV_WN##s(p, v) +# define AV_RL(s, p) av_bswap##s(AV_RN##s(p)) +# define AV_WL(s, p, v) AV_WN##s(p, av_bswap##s(v)) +#else +# define AV_RB(s, p) av_bswap##s(AV_RN##s(p)) +# define AV_WB(s, p, v) AV_WN##s(p, av_bswap##s(v)) +# define AV_RL(s, p) AV_RN##s(p) +# define AV_WL(s, p, v) AV_WN##s(p, v) +#endif + +#define AV_RB8(x) (((const uint8_t*)(x))[0]) +#define AV_WB8(p, d) do { ((uint8_t*)(p))[0] = (d); } while(0) + +#define AV_RL8(x) AV_RB8(x) +#define AV_WL8(p, d) AV_WB8(p, d) + +#ifndef AV_RB16 +# define AV_RB16(p) AV_RB(16, p) +#endif +#ifndef AV_WB16 +# define AV_WB16(p, v) AV_WB(16, p, v) +#endif + +#ifndef AV_RL16 +# define AV_RL16(p) AV_RL(16, p) +#endif +#ifndef AV_WL16 +# define AV_WL16(p, v) AV_WL(16, p, v) +#endif + +#ifndef AV_RB32 +# define AV_RB32(p) AV_RB(32, p) +#endif +#ifndef AV_WB32 +# define AV_WB32(p, v) AV_WB(32, p, v) +#endif + +#ifndef AV_RL32 +# define AV_RL32(p) AV_RL(32, p) +#endif +#ifndef AV_WL32 +# define AV_WL32(p, v) AV_WL(32, p, v) +#endif + +#ifndef AV_RB64 +# define AV_RB64(p) AV_RB(64, p) +#endif +#ifndef AV_WB64 +# define AV_WB64(p, v) AV_WB(64, p, v) +#endif + +#ifndef AV_RL64 +# define AV_RL64(p) AV_RL(64, p) +#endif +#ifndef AV_WL64 +# define AV_WL64(p, v) AV_WL(64, p, v) +#endif + +#ifndef AV_RB24 +# define AV_RB24(x) \ + ((((const uint8_t*)(x))[0] << 16) | \ + (((const uint8_t*)(x))[1] << 8) | \ + ((const uint8_t*)(x))[2]) +#endif +#ifndef AV_WB24 +# define AV_WB24(p, d) do { \ + ((uint8_t*)(p))[2] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + ((uint8_t*)(p))[0] = (d)>>16; \ + } while(0) +#endif + +#ifndef AV_RL24 +# define AV_RL24(x) \ + ((((const uint8_t*)(x))[2] << 16) | \ + (((const uint8_t*)(x))[1] << 8) | \ + ((const uint8_t*)(x))[0]) +#endif +#ifndef AV_WL24 +# define AV_WL24(p, d) do { \ + ((uint8_t*)(p))[0] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + ((uint8_t*)(p))[2] = (d)>>16; \ + } while(0) +#endif + +#ifndef AV_RB48 +# define AV_RB48(x) \ + (((uint64_t)((const uint8_t*)(x))[0] << 40) | \ + ((uint64_t)((const uint8_t*)(x))[1] << 32) | \ + ((uint64_t)((const uint8_t*)(x))[2] << 24) | \ + ((uint64_t)((const uint8_t*)(x))[3] << 16) | \ + ((uint64_t)((const uint8_t*)(x))[4] << 8) | \ + (uint64_t)((const uint8_t*)(x))[5]) +#endif +#ifndef AV_WB48 +# define AV_WB48(p, darg) do { \ + uint64_t d = (darg); \ + ((uint8_t*)(p))[5] = (d); \ + ((uint8_t*)(p))[4] = (d)>>8; \ + ((uint8_t*)(p))[3] = (d)>>16; \ + ((uint8_t*)(p))[2] = (d)>>24; \ + ((uint8_t*)(p))[1] = (d)>>32; \ + ((uint8_t*)(p))[0] = (d)>>40; \ + } while(0) +#endif + +#ifndef AV_RL48 +# define AV_RL48(x) \ + (((uint64_t)((const uint8_t*)(x))[5] << 40) | \ + ((uint64_t)((const uint8_t*)(x))[4] << 32) | \ + ((uint64_t)((const uint8_t*)(x))[3] << 24) | \ + ((uint64_t)((const uint8_t*)(x))[2] << 16) | \ + ((uint64_t)((const uint8_t*)(x))[1] << 8) | \ + (uint64_t)((const uint8_t*)(x))[0]) +#endif +#ifndef AV_WL48 +# define AV_WL48(p, darg) do { \ + uint64_t d = (darg); \ + ((uint8_t*)(p))[0] = (d); \ + ((uint8_t*)(p))[1] = (d)>>8; \ + ((uint8_t*)(p))[2] = (d)>>16; \ + ((uint8_t*)(p))[3] = (d)>>24; \ + ((uint8_t*)(p))[4] = (d)>>32; \ + ((uint8_t*)(p))[5] = (d)>>40; \ + } while(0) +#endif + +/* + * The AV_[RW]NA macros access naturally aligned data + * in a type-safe way. + */ + +#define AV_RNA(s, p) (((const av_alias##s*)(p))->u##s) +#define AV_WNA(s, p, v) (((av_alias##s*)(p))->u##s = (v)) + +#ifndef AV_RN16A +# define AV_RN16A(p) AV_RNA(16, p) +#endif + +#ifndef AV_RN32A +# define AV_RN32A(p) AV_RNA(32, p) +#endif + +#ifndef AV_RN64A +# define AV_RN64A(p) AV_RNA(64, p) +#endif + +#ifndef AV_WN16A +# define AV_WN16A(p, v) AV_WNA(16, p, v) +#endif + +#ifndef AV_WN32A +# define AV_WN32A(p, v) AV_WNA(32, p, v) +#endif + +#ifndef AV_WN64A +# define AV_WN64A(p, v) AV_WNA(64, p, v) +#endif + +#if AV_HAVE_BIGENDIAN +# define AV_RLA(s, p) av_bswap##s(AV_RN##s##A(p)) +# define AV_WLA(s, p, v) AV_WN##s##A(p, av_bswap##s(v)) +#else +# define AV_RLA(s, p) AV_RN##s##A(p) +# define AV_WLA(s, p, v) AV_WN##s##A(p, v) +#endif + +#ifndef AV_RL64A +# define AV_RL64A(p) AV_RLA(64, p) +#endif +#ifndef AV_WL64A +# define AV_WL64A(p, v) AV_WLA(64, p, v) +#endif + +/* + * The AV_COPYxxU macros are suitable for copying data to/from unaligned + * memory locations. + */ + +#define AV_COPYU(n, d, s) AV_WN##n(d, AV_RN##n(s)); + +#ifndef AV_COPY16U +# define AV_COPY16U(d, s) AV_COPYU(16, d, s) +#endif + +#ifndef AV_COPY32U +# define AV_COPY32U(d, s) AV_COPYU(32, d, s) +#endif + +#ifndef AV_COPY64U +# define AV_COPY64U(d, s) AV_COPYU(64, d, s) +#endif + +#ifndef AV_COPY128U +# define AV_COPY128U(d, s) \ + do { \ + AV_COPY64U(d, s); \ + AV_COPY64U((char *)(d) + 8, (const char *)(s) + 8); \ + } while(0) +#endif + +/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be + * naturally aligned. They may be implemented using MMX, + * so emms_c() must be called before using any float code + * afterwards. + */ + +#define AV_COPY(n, d, s) \ + (((av_alias##n*)(d))->u##n = ((const av_alias##n*)(s))->u##n) + +#ifndef AV_COPY16 +# define AV_COPY16(d, s) AV_COPY(16, d, s) +#endif + +#ifndef AV_COPY32 +# define AV_COPY32(d, s) AV_COPY(32, d, s) +#endif + +#ifndef AV_COPY64 +# define AV_COPY64(d, s) AV_COPY(64, d, s) +#endif + +#ifndef AV_COPY128 +# define AV_COPY128(d, s) \ + do { \ + AV_COPY64(d, s); \ + AV_COPY64((char*)(d)+8, (char*)(s)+8); \ + } while(0) +#endif + +#define AV_SWAP(n, a, b) FFSWAP(av_alias##n, *(av_alias##n*)(a), *(av_alias##n*)(b)) + +#ifndef AV_SWAP64 +# define AV_SWAP64(a, b) AV_SWAP(64, a, b) +#endif + +#define AV_ZERO(n, d) (((av_alias##n*)(d))->u##n = 0) + +#ifndef AV_ZERO16 +# define AV_ZERO16(d) AV_ZERO(16, d) +#endif + +#ifndef AV_ZERO32 +# define AV_ZERO32(d) AV_ZERO(32, d) +#endif + +#ifndef AV_ZERO64 +# define AV_ZERO64(d) AV_ZERO(64, d) +#endif + +#ifndef AV_ZERO128 +# define AV_ZERO128(d) \ + do { \ + AV_ZERO64(d); \ + AV_ZERO64((char*)(d)+8); \ + } while(0) +#endif + +#endif /* AVUTIL_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lfg.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lfg.h new file mode 100644 index 00000000..2b669205 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lfg.h @@ -0,0 +1,80 @@ +/* + * Lagged Fibonacci PRNG + * Copyright (c) 2008 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_LFG_H +#define AVUTIL_LFG_H + +#include + +/** + * Context structure for the Lagged Fibonacci PRNG. + * The exact layout, types and content of this struct may change and should + * not be accessed directly. Only its sizeof() is guranteed to stay the same + * to allow easy instanciation. + */ +typedef struct AVLFG { + unsigned int state[64]; + int index; +} AVLFG; + +void av_lfg_init(AVLFG *c, unsigned int seed); + +/** + * Seed the state of the ALFG using binary data. + * + * Return value: 0 on success, negative value (AVERROR) on failure. + */ +int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int length); + +/** + * Get the next random unsigned 32-bit number using an ALFG. + * + * Please also consider a simple LCG like state= state*1664525+1013904223, + * it may be good enough and faster for your specific use case. + */ +static inline unsigned int av_lfg_get(AVLFG *c){ + unsigned a = c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; + c->index += 1U; + return a; +} + +/** + * Get the next random unsigned 32-bit number using a MLFG. + * + * Please also consider av_lfg_get() above, it is faster. + */ +static inline unsigned int av_mlfg_get(AVLFG *c){ + unsigned int a= c->state[(c->index-55) & 63]; + unsigned int b= c->state[(c->index-24) & 63]; + a = c->state[c->index & 63] = 2*a*b+a+b; + c->index += 1U; + return a; +} + +/** + * Get the next two numbers generated by a Box-Muller Gaussian + * generator using the random numbers issued by lfg. + * + * @param out array where the two generated numbers are placed + */ +void av_bmg_get(AVLFG *lfg, double out[2]); + +#endif /* AVUTIL_LFG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/libm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/libm.h new file mode 100644 index 00000000..a8199623 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/libm.h @@ -0,0 +1,471 @@ +/* + * erf function: Copyright (c) 2006 John Maddock + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Replacements for frequently missing libm functions + */ + +#ifndef AVUTIL_LIBM_H +#define AVUTIL_LIBM_H + +#include +#include "config.h" +#include "attributes.h" +#include "intfloat.h" +#include "mathematics.h" + +#if HAVE_MIPSFPU && HAVE_INLINE_ASM +#include "libavutil/mips/libm_mips.h" +#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/ + +#if !HAVE_ATANF +#undef atanf +#define atanf(x) ((float)atan(x)) +#endif /* HAVE_ATANF */ + +#if !HAVE_ATAN2F +#undef atan2f +#define atan2f(y, x) ((float)atan2(y, x)) +#endif /* HAVE_ATAN2F */ + +#if !HAVE_POWF +#undef powf +#define powf(x, y) ((float)pow(x, y)) +#endif /* HAVE_POWF */ + +#if !HAVE_CBRT +static av_always_inline double cbrt(double x) +{ + return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); +} +#endif /* HAVE_CBRT */ + +#if !HAVE_CBRTF +static av_always_inline float cbrtf(float x) +{ + return x < 0 ? -powf(-x, 1.0 / 3.0) : powf(x, 1.0 / 3.0); +} +#endif /* HAVE_CBRTF */ + +#if !HAVE_COPYSIGN +static av_always_inline double copysign(double x, double y) +{ + uint64_t vx = av_double2int(x); + uint64_t vy = av_double2int(y); + return av_int2double((vx & UINT64_C(0x7fffffffffffffff)) | (vy & UINT64_C(0x8000000000000000))); +} +#endif /* HAVE_COPYSIGN */ + +#if !HAVE_COSF +#undef cosf +#define cosf(x) ((float)cos(x)) +#endif /* HAVE_COSF */ + +#if !HAVE_ERF +static inline double ff_eval_poly(const double *coeff, int size, double x) { + double sum = coeff[size-1]; + int i; + for (i = size-2; i >= 0; --i) { + sum *= x; + sum += coeff[i]; + } + return sum; +} + +/** + * erf function + * Algorithm taken from the Boost project, source: + * http://www.boost.org/doc/libs/1_46_1/boost/math/special_functions/erf.hpp + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0 (see notice below). + * Boost Software License - Version 1.0 - August 17th, 2003 +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + */ +static inline double erf(double z) +{ +#ifndef FF_ARRAY_ELEMS +#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) +#endif + double result; + + /* handle the symmetry: erf(-x) = -erf(x) */ + if (z < 0) + return -erf(-z); + + /* branch based on range of z, and pick appropriate approximation */ + if (z == 0) + return 0; + else if (z < 1e-10) + return z * 1.125 + z * 0.003379167095512573896158903121545171688; + else if (z < 0.5) { + // Maximum Deviation Found: 1.561e-17 + // Expected Error Term: 1.561e-17 + // Maximum Relative Change in Control Points: 1.155e-04 + // Max Error found at double precision = 2.961182e-17 + + static const double y = 1.044948577880859375; + static const double p[] = { + 0.0834305892146531832907, + -0.338165134459360935041, + -0.0509990735146777432841, + -0.00772758345802133288487, + -0.000322780120964605683831, + }; + static const double q[] = { + 1, + 0.455004033050794024546, + 0.0875222600142252549554, + 0.00858571925074406212772, + 0.000370900071787748000569, + }; + double zz = z * z; + return z * (y + ff_eval_poly(p, FF_ARRAY_ELEMS(p), zz) / ff_eval_poly(q, FF_ARRAY_ELEMS(q), zz)); + } + /* here onwards compute erfc */ + else if (z < 1.5) { + // Maximum Deviation Found: 3.702e-17 + // Expected Error Term: 3.702e-17 + // Maximum Relative Change in Control Points: 2.845e-04 + // Max Error found at double precision = 4.841816e-17 + static const double y = 0.405935764312744140625; + static const double p[] = { + -0.098090592216281240205, + 0.178114665841120341155, + 0.191003695796775433986, + 0.0888900368967884466578, + 0.0195049001251218801359, + 0.00180424538297014223957, + }; + static const double q[] = { + 1, + 1.84759070983002217845, + 1.42628004845511324508, + 0.578052804889902404909, + 0.12385097467900864233, + 0.0113385233577001411017, + 0.337511472483094676155e-5, + }; + result = y + ff_eval_poly(p, FF_ARRAY_ELEMS(p), z - 0.5) / ff_eval_poly(q, FF_ARRAY_ELEMS(q), z - 0.5); + result *= exp(-z * z) / z; + return 1 - result; + } + else if (z < 2.5) { + // Max Error found at double precision = 6.599585e-18 + // Maximum Deviation Found: 3.909e-18 + // Expected Error Term: 3.909e-18 + // Maximum Relative Change in Control Points: 9.886e-05 + static const double y = 0.50672817230224609375; + static const double p[] = { + -0.0243500476207698441272, + 0.0386540375035707201728, + 0.04394818964209516296, + 0.0175679436311802092299, + 0.00323962406290842133584, + 0.000235839115596880717416, + }; + static const double q[] = { + 1, + 1.53991494948552447182, + 0.982403709157920235114, + 0.325732924782444448493, + 0.0563921837420478160373, + 0.00410369723978904575884, + }; + result = y + ff_eval_poly(p, FF_ARRAY_ELEMS(p), z - 1.5) / ff_eval_poly(q, FF_ARRAY_ELEMS(q), z - 1.5); + result *= exp(-z * z) / z; + return 1 - result; + } + else if (z < 4.5) { + // Maximum Deviation Found: 1.512e-17 + // Expected Error Term: 1.512e-17 + // Maximum Relative Change in Control Points: 2.222e-04 + // Max Error found at double precision = 2.062515e-17 + static const double y = 0.5405750274658203125; + static const double p[] = { + 0.00295276716530971662634, + 0.0137384425896355332126, + 0.00840807615555585383007, + 0.00212825620914618649141, + 0.000250269961544794627958, + 0.113212406648847561139e-4, + }; + static const double q[] = { + 1, + 1.04217814166938418171, + 0.442597659481563127003, + 0.0958492726301061423444, + 0.0105982906484876531489, + 0.000479411269521714493907, + }; + result = y + ff_eval_poly(p, FF_ARRAY_ELEMS(p), z - 3.5) / ff_eval_poly(q, FF_ARRAY_ELEMS(q), z - 3.5); + result *= exp(-z * z) / z; + return 1 - result; + } + /* differ from Boost here, the claim of underflow of erfc(x) past 5.8 is + * slightly incorrect, change to 5.92 + * (really somewhere between 5.9125 and 5.925 is when it saturates) */ + else if (z < 5.92) { + // Max Error found at double precision = 2.997958e-17 + // Maximum Deviation Found: 2.860e-17 + // Expected Error Term: 2.859e-17 + // Maximum Relative Change in Control Points: 1.357e-05 + static const double y = 0.5579090118408203125; + static const double p[] = { + 0.00628057170626964891937, + 0.0175389834052493308818, + -0.212652252872804219852, + -0.687717681153649930619, + -2.5518551727311523996, + -3.22729451764143718517, + -2.8175401114513378771, + }; + static const double q[] = { + 1, + 2.79257750980575282228, + 11.0567237927800161565, + 15.930646027911794143, + 22.9367376522880577224, + 13.5064170191802889145, + 5.48409182238641741584, + }; + result = y + ff_eval_poly(p, FF_ARRAY_ELEMS(p), 1 / z) / ff_eval_poly(q, FF_ARRAY_ELEMS(q), 1 / z); + result *= exp(-z * z) / z; + return 1 - result; + } + /* handle the nan case, but don't use isnan for max portability */ + else if (z != z) + return z; + /* finally return saturated result */ + else + return 1; +} +#endif /* HAVE_ERF */ + +#if !HAVE_EXPF +#undef expf +#define expf(x) ((float)exp(x)) +#endif /* HAVE_EXPF */ + +#if !HAVE_EXP2 +#undef exp2 +#define exp2(x) exp((x) * M_LN2) +#endif /* HAVE_EXP2 */ + +#if !HAVE_EXP2F +#undef exp2f +#define exp2f(x) ((float)exp2(x)) +#endif /* HAVE_EXP2F */ + +#if !HAVE_ISINF +#undef isinf +/* Note: these do not follow the BSD/Apple/GNU convention of returning -1 for +-Inf, +1 for Inf, 0 otherwise, but merely follow the POSIX/ISO mandated spec of +returning a non-zero value for +/-Inf, 0 otherwise. */ +static av_always_inline av_const int avpriv_isinff(float x) +{ + uint32_t v = av_float2int(x); + if ((v & 0x7f800000) != 0x7f800000) + return 0; + return !(v & 0x007fffff); +} + +static av_always_inline av_const int avpriv_isinf(double x) +{ + uint64_t v = av_double2int(x); + if ((v & 0x7ff0000000000000) != 0x7ff0000000000000) + return 0; + return !(v & 0x000fffffffffffff); +} + +#define isinf(x) \ + (sizeof(x) == sizeof(float) \ + ? avpriv_isinff(x) \ + : avpriv_isinf(x)) +#endif /* HAVE_ISINF */ + +#if !HAVE_ISNAN +static av_always_inline av_const int avpriv_isnanf(float x) +{ + uint32_t v = av_float2int(x); + if ((v & 0x7f800000) != 0x7f800000) + return 0; + return v & 0x007fffff; +} + +static av_always_inline av_const int avpriv_isnan(double x) +{ + uint64_t v = av_double2int(x); + if ((v & 0x7ff0000000000000) != 0x7ff0000000000000) + return 0; + return (v & 0x000fffffffffffff) && 1; +} + +#define isnan(x) \ + (sizeof(x) == sizeof(float) \ + ? avpriv_isnanf(x) \ + : avpriv_isnan(x)) +#endif /* HAVE_ISNAN */ + +#if !HAVE_ISFINITE +static av_always_inline av_const int avpriv_isfinitef(float x) +{ + uint32_t v = av_float2int(x); + return (v & 0x7f800000) != 0x7f800000; +} + +static av_always_inline av_const int avpriv_isfinite(double x) +{ + uint64_t v = av_double2int(x); + return (v & 0x7ff0000000000000) != 0x7ff0000000000000; +} + +#define isfinite(x) \ + (sizeof(x) == sizeof(float) \ + ? avpriv_isfinitef(x) \ + : avpriv_isfinite(x)) +#endif /* HAVE_ISFINITE */ + +#if !HAVE_HYPOT +static inline av_const double hypot(double x, double y) +{ + double ret, temp; + x = fabs(x); + y = fabs(y); + + if (isinf(x) || isinf(y)) + return av_int2double(0x7ff0000000000000); + if (x == 0 || y == 0) + return x + y; + if (x < y) { + temp = x; + x = y; + y = temp; + } + + y = y/x; + return x*sqrt(1 + y*y); +} +#endif /* HAVE_HYPOT */ + +#if !HAVE_LDEXPF +#undef ldexpf +#define ldexpf(x, exp) ((float)ldexp(x, exp)) +#endif /* HAVE_LDEXPF */ + +#if !HAVE_LLRINT +#undef llrint +#define llrint(x) ((long long)rint(x)) +#endif /* HAVE_LLRINT */ + +#if !HAVE_LLRINTF +#undef llrintf +#define llrintf(x) ((long long)rint(x)) +#endif /* HAVE_LLRINT */ + +#if !HAVE_LOG2 +#undef log2 +#define log2(x) (log(x) * 1.44269504088896340736) +#endif /* HAVE_LOG2 */ + +#if !HAVE_LOG2F +#undef log2f +#define log2f(x) ((float)log2(x)) +#endif /* HAVE_LOG2F */ + +#if !HAVE_LOG10F +#undef log10f +#define log10f(x) ((float)log10(x)) +#endif /* HAVE_LOG10F */ + +#if !HAVE_SINF +#undef sinf +#define sinf(x) ((float)sin(x)) +#endif /* HAVE_SINF */ + +#if !HAVE_RINT +static inline double rint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif /* HAVE_RINT */ + +#if !HAVE_LRINT +static av_always_inline av_const long int lrint(double x) +{ + return rint(x); +} +#endif /* HAVE_LRINT */ + +#if !HAVE_LRINTF +static av_always_inline av_const long int lrintf(float x) +{ + return (int)(rint(x)); +} +#endif /* HAVE_LRINTF */ + +#if !HAVE_ROUND +static av_always_inline av_const double round(double x) +{ + return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif /* HAVE_ROUND */ + +#if !HAVE_ROUNDF +static av_always_inline av_const float roundf(float x) +{ + return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5); +} +#endif /* HAVE_ROUNDF */ + +#if !HAVE_TRUNC +static av_always_inline av_const double trunc(double x) +{ + return (x > 0) ? floor(x) : ceil(x); +} +#endif /* HAVE_TRUNC */ + +#if !HAVE_TRUNCF +static av_always_inline av_const float truncf(float x) +{ + return (x > 0) ? floor(x) : ceil(x); +} +#endif /* HAVE_TRUNCF */ + +#endif /* AVUTIL_LIBM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lls.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lls.h new file mode 100644 index 00000000..1a276d53 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lls.h @@ -0,0 +1,64 @@ +/* + * linear least squares model + * + * Copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_LLS_H +#define AVUTIL_LLS_H + +#include "macros.h" +#include "mem.h" +#include "version.h" + +#define MAX_VARS 32 +#define MAX_VARS_ALIGN FFALIGN(MAX_VARS+1,4) + +//FIXME avoid direct access to LLSModel from outside + +/** + * Linear least squares model. + */ +typedef struct LLSModel { + DECLARE_ALIGNED(32, double, covariance[MAX_VARS_ALIGN][MAX_VARS_ALIGN]); + DECLARE_ALIGNED(32, double, coeff[MAX_VARS][MAX_VARS]); + double variance[MAX_VARS]; + int indep_count; + /** + * Take the outer-product of var[] with itself, and add to the covariance matrix. + * @param m this context + * @param var training samples, starting with the value to be predicted + * 32-byte aligned, and any padding elements must be initialized + * (i.e not denormal/nan). + */ + void (*update_lls)(struct LLSModel *m, const double *var); + /** + * Inner product of var[] and the LPC coefs. + * @param m this context + * @param var training samples, excluding the value to be predicted. unaligned. + * @param order lpc order + */ + double (*evaluate_lls)(struct LLSModel *m, const double *var, int order); +} LLSModel; + +void avpriv_init_lls(LLSModel *m, int indep_count); +void ff_init_lls_x86(LLSModel *m); +void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order); + +#endif /* AVUTIL_LLS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/log.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/log.h new file mode 100644 index 00000000..9c14188a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/log.h @@ -0,0 +1,383 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_LOG_H +#define AVUTIL_LOG_H + +#include +#include "avutil.h" +#include "attributes.h" +#include "version.h" + +typedef enum { + AV_CLASS_CATEGORY_NA = 0, + AV_CLASS_CATEGORY_INPUT, + AV_CLASS_CATEGORY_OUTPUT, + AV_CLASS_CATEGORY_MUXER, + AV_CLASS_CATEGORY_DEMUXER, + AV_CLASS_CATEGORY_ENCODER, + AV_CLASS_CATEGORY_DECODER, + AV_CLASS_CATEGORY_FILTER, + AV_CLASS_CATEGORY_BITSTREAM_FILTER, + AV_CLASS_CATEGORY_SWSCALER, + AV_CLASS_CATEGORY_SWRESAMPLER, + AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40, + AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT, + AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT, + AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT, + AV_CLASS_CATEGORY_DEVICE_OUTPUT, + AV_CLASS_CATEGORY_DEVICE_INPUT, + AV_CLASS_CATEGORY_NB ///< not part of ABI/API +}AVClassCategory; + +#define AV_IS_INPUT_DEVICE(category) \ + (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT) || \ + ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT) || \ + ((category) == AV_CLASS_CATEGORY_DEVICE_INPUT)) + +#define AV_IS_OUTPUT_DEVICE(category) \ + (((category) == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT) || \ + ((category) == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT) || \ + ((category) == AV_CLASS_CATEGORY_DEVICE_OUTPUT)) + +struct AVOptionRanges; + +/** + * Describe the class of an AVClass context structure. That is an + * arbitrary struct of which the first field is a pointer to an + * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). + */ +typedef struct AVClass { + /** + * The name of the class; usually it is the same name as the + * context structure type to which the AVClass is associated. + */ + const char* class_name; + + /** + * A pointer to a function which returns the name of a context + * instance ctx associated with the class. + */ + const char* (*item_name)(void* ctx); + + /** + * a pointer to the first option specified in the class if any or NULL + * + * @see av_set_default_options() + */ + const struct AVOption *option; + + /** + * LIBAVUTIL_VERSION with which this structure was created. + * This is used to allow fields to be added without requiring major + * version bumps everywhere. + */ + + int version; + + /** + * Offset in the structure where log_level_offset is stored. + * 0 means there is no such variable + */ + int log_level_offset_offset; + + /** + * Offset in the structure where a pointer to the parent context for + * logging is stored. For example a decoder could pass its AVCodecContext + * to eval as such a parent context, which an av_log() implementation + * could then leverage to display the parent context. + * The offset can be NULL. + */ + int parent_log_context_offset; + + /** + * Return next AVOptions-enabled child or NULL + */ + void* (*child_next)(void *obj, void *prev); + + /** + * Return an AVClass corresponding to the next potential + * AVOptions-enabled child. + * + * The difference between child_next and this is that + * child_next iterates over _already existing_ objects, while + * child_class_next iterates over _all possible_ children. + */ + const struct AVClass* (*child_class_next)(const struct AVClass *prev); + + /** + * Category used for visualization (like color) + * This is only set if the category is equal for all objects using this class. + * available since version (51 << 16 | 56 << 8 | 100) + */ + AVClassCategory category; + + /** + * Callback to return the category. + * available since version (51 << 16 | 59 << 8 | 100) + */ + AVClassCategory (*get_category)(void* ctx); + + /** + * Callback to return the supported/allowed ranges. + * available since version (52.12) + */ + int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags); +} AVClass; + +/** + * @addtogroup lavu_log + * + * @{ + * + * @defgroup lavu_log_constants Logging Constants + * + * @{ + */ + +/** + * Print no output. + */ +#define AV_LOG_QUIET -8 + +/** + * Something went really wrong and we will crash now. + */ +#define AV_LOG_PANIC 0 + +/** + * Something went wrong and recovery is not possible. + * For example, no header was found for a format which depends + * on headers or an illegal combination of parameters is used. + */ +#define AV_LOG_FATAL 8 + +/** + * Something went wrong and cannot losslessly be recovered. + * However, not all future data is affected. + */ +#define AV_LOG_ERROR 16 + +/** + * Something somehow does not look correct. This may or may not + * lead to problems. An example would be the use of '-vstrict -2'. + */ +#define AV_LOG_WARNING 24 + +/** + * Standard information. + */ +#define AV_LOG_INFO 32 + +/** + * Detailed information. + */ +#define AV_LOG_VERBOSE 40 + +/** + * Stuff which is only useful for libav* developers. + */ +#define AV_LOG_DEBUG 48 + +/** + * Extremely verbose debugging, useful for libav* development. + */ +#define AV_LOG_TRACE 56 + +#define AV_LOG_MAX_OFFSET (AV_LOG_TRACE - AV_LOG_QUIET) + +/** + * @} + */ + +/** + * Sets additional colors for extended debugging sessions. + * @code + av_log(ctx, AV_LOG_DEBUG|AV_LOG_C(134), "Message in purple\n"); + @endcode + * Requires 256color terminal support. Uses outside debugging is not + * recommended. + */ +#define AV_LOG_C(x) ((x) << 8) + +/** + * Send the specified message to the log if the level is less than or equal + * to the current av_log_level. By default, all logging messages are sent to + * stderr. This behavior can be altered by setting a different logging callback + * function. + * @see av_log_set_callback + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct or NULL if general log. + * @param level The importance level of the message expressed using a @ref + * lavu_log_constants "Logging Constant". + * @param fmt The format string (printf-compatible) that specifies how + * subsequent arguments are converted to output. + */ +void av_log(void *avcl, int level, const char *fmt, ...) av_printf_format(3, 4); + +/** + * Send the specified message to the log once with the initial_level and then with + * the subsequent_level. By default, all logging messages are sent to + * stderr. This behavior can be altered by setting a different logging callback + * function. + * @see av_log + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct or NULL if general log. + * @param initial_level importance level of the message expressed using a @ref + * lavu_log_constants "Logging Constant" for the first occurance. + * @param subsequent_level importance level of the message expressed using a @ref + * lavu_log_constants "Logging Constant" after the first occurance. + * @param fmt The format string (printf-compatible) that specifies how + * subsequent arguments are converted to output. + * @param state a variable to keep trak of if a message has already been printed + * this must be initialized to 0 before the first use. The same state + * must not be accessed by 2 Threads simultaneously. + */ +void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) av_printf_format(5, 6); + + +/** + * Send the specified message to the log if the level is less than or equal + * to the current av_log_level. By default, all logging messages are sent to + * stderr. This behavior can be altered by setting a different logging callback + * function. + * @see av_log_set_callback + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message expressed using a @ref + * lavu_log_constants "Logging Constant". + * @param fmt The format string (printf-compatible) that specifies how + * subsequent arguments are converted to output. + * @param vl The arguments referenced by the format string. + */ +void av_vlog(void *avcl, int level, const char *fmt, va_list vl); + +/** + * Get the current log level + * + * @see lavu_log_constants + * + * @return Current log level + */ +int av_log_get_level(void); + +/** + * Set the log level + * + * @see lavu_log_constants + * + * @param level Logging level + */ +void av_log_set_level(int level); + +/** + * Set the logging callback + * + * @note The callback must be thread safe, even if the application does not use + * threads itself as some codecs are multithreaded. + * + * @see av_log_default_callback + * + * @param callback A logging function with a compatible signature. + */ +void av_log_set_callback(void (*callback)(void*, int, const char*, va_list)); + +/** + * Default logging callback + * + * It prints the message to stderr, optionally colorizing it. + * + * @param avcl A pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct. + * @param level The importance level of the message expressed using a @ref + * lavu_log_constants "Logging Constant". + * @param fmt The format string (printf-compatible) that specifies how + * subsequent arguments are converted to output. + * @param vl The arguments referenced by the format string. + */ +void av_log_default_callback(void *avcl, int level, const char *fmt, + va_list vl); + +/** + * Return the context name + * + * @param ctx The AVClass context + * + * @return The AVClass class_name + */ +const char* av_default_item_name(void* ctx); +AVClassCategory av_default_get_category(void *ptr); + +/** + * Format a line of log the same way as the default callback. + * @param line buffer to receive the formatted line + * @param line_size size of the buffer + * @param print_prefix used to store whether the prefix must be printed; + * must point to a persistent integer initially set to 1 + */ +void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, + char *line, int line_size, int *print_prefix); + +/** + * Format a line of log the same way as the default callback. + * @param line buffer to receive the formatted line; + * may be NULL if line_size is 0 + * @param line_size size of the buffer; at most line_size-1 characters will + * be written to the buffer, plus one null terminator + * @param print_prefix used to store whether the prefix must be printed; + * must point to a persistent integer initially set to 1 + * @return Returns a negative value if an error occurred, otherwise returns + * the number of characters that would have been written for a + * sufficiently large buffer, not including the terminating null + * character. If the return value is not less than line_size, it means + * that the log message was truncated to fit the buffer. + */ +int av_log_format_line2(void *ptr, int level, const char *fmt, va_list vl, + char *line, int line_size, int *print_prefix); + +/** + * Skip repeated messages, this requires the user app to use av_log() instead of + * (f)printf as the 2 would otherwise interfere and lead to + * "Last message repeated x times" messages below (f)printf messages with some + * bad luck. + * Also to receive the last, "last repeated" line if any, the user app must + * call av_log(NULL, AV_LOG_QUIET, "%s", ""); at the end + */ +#define AV_LOG_SKIP_REPEATED 1 + +/** + * Include the log severity in messages originating from codecs. + * + * Results in messages such as: + * [rawvideo @ 0xDEADBEEF] [error] encode did not produce valid pts + */ +#define AV_LOG_PRINT_LEVEL 2 + +void av_log_set_flags(int arg); +int av_log_get_flags(void); + +/** + * @} + */ + +#endif /* AVUTIL_LOG_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lzo.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lzo.h new file mode 100644 index 00000000..c0340399 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/lzo.h @@ -0,0 +1,66 @@ +/* + * LZO 1x decompression + * copyright (c) 2006 Reimar Doeffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_LZO_H +#define AVUTIL_LZO_H + +/** + * @defgroup lavu_lzo LZO + * @ingroup lavu_crypto + * + * @{ + */ + +#include + +/** @name Error flags returned by av_lzo1x_decode + * @{ */ +/// end of the input buffer reached before decoding finished +#define AV_LZO_INPUT_DEPLETED 1 +/// decoded data did not fit into output buffer +#define AV_LZO_OUTPUT_FULL 2 +/// a reference to previously decoded data was wrong +#define AV_LZO_INVALID_BACKPTR 4 +/// a non-specific error in the compressed bitstream +#define AV_LZO_ERROR 8 +/** @} */ + +#define AV_LZO_INPUT_PADDING 8 +#define AV_LZO_OUTPUT_PADDING 12 + +/** + * @brief Decodes LZO 1x compressed data. + * @param out output buffer + * @param outlen size of output buffer, number of bytes left are returned here + * @param in input buffer + * @param inlen size of input buffer, number of bytes left are returned here + * @return 0 on success, otherwise a combination of the error flags above + * + * Make sure all buffers are appropriately padded, in must provide + * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes. + */ +int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen); + +/** + * @} + */ + +#endif /* AVUTIL_LZO_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/macros.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/macros.h new file mode 100644 index 00000000..2007ee56 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/macros.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu + * Utility Preprocessor macros + */ + +#ifndef AVUTIL_MACROS_H +#define AVUTIL_MACROS_H + +/** + * @addtogroup preproc_misc Preprocessor String Macros + * + * String manipulation macros + * + * @{ + */ + +#define AV_STRINGIFY(s) AV_TOSTRING(s) +#define AV_TOSTRING(s) #s + +#define AV_GLUE(a, b) a ## b +#define AV_JOIN(a, b) AV_GLUE(a, b) + +/** + * @} + */ + +#define AV_PRAGMA(s) _Pragma(#s) + +#define FFALIGN(x, a) (((x)+(a)-1)&~((a)-1)) + +#endif /* AVUTIL_MACROS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mastering_display_metadata.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mastering_display_metadata.h new file mode 100644 index 00000000..c23b07c3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mastering_display_metadata.h @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2016 Neil Birkbeck + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MASTERING_DISPLAY_METADATA_H +#define AVUTIL_MASTERING_DISPLAY_METADATA_H + +#include "frame.h" +#include "rational.h" + + +/** + * Mastering display metadata capable of representing the color volume of + * the display used to master the content (SMPTE 2086:2014). + * + * To be used as payload of a AVFrameSideData or AVPacketSideData with the + * appropriate type. + * + * @note The struct should be allocated with av_mastering_display_metadata_alloc() + * and its size is not a part of the public ABI. + */ +typedef struct AVMasteringDisplayMetadata { + /** + * CIE 1931 xy chromaticity coords of color primaries (r, g, b order). + */ + AVRational display_primaries[3][2]; + + /** + * CIE 1931 xy chromaticity coords of white point. + */ + AVRational white_point[2]; + + /** + * Min luminance of mastering display (cd/m^2). + */ + AVRational min_luminance; + + /** + * Max luminance of mastering display (cd/m^2). + */ + AVRational max_luminance; + + /** + * Flag indicating whether the display primaries (and white point) are set. + */ + int has_primaries; + + /** + * Flag indicating whether the luminance (min_ and max_) have been set. + */ + int has_luminance; + +} AVMasteringDisplayMetadata; + +/** + * Allocate an AVMasteringDisplayMetadata structure and set its fields to + * default values. The resulting struct can be freed using av_freep(). + * + * @return An AVMasteringDisplayMetadata filled with default values or NULL + * on failure. + */ +AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc(void); + +/** + * Allocate a complete AVMasteringDisplayMetadata and add it to the frame. + * + * @param frame The frame which side data is added to. + * + * @return The AVMasteringDisplayMetadata structure to be filled by caller. + */ +AVMasteringDisplayMetadata *av_mastering_display_metadata_create_side_data(AVFrame *frame); + +/** + * Content light level needed by to transmit HDR over HDMI (CTA-861.3). + * + * To be used as payload of a AVFrameSideData or AVPacketSideData with the + * appropriate type. + * + * @note The struct should be allocated with av_content_light_metadata_alloc() + * and its size is not a part of the public ABI. + */ +typedef struct AVContentLightMetadata { + /** + * Max content light level (cd/m^2). + */ + unsigned MaxCLL; + + /** + * Max average light level per frame (cd/m^2). + */ + unsigned MaxFALL; +} AVContentLightMetadata; + +/** + * Allocate an AVContentLightMetadata structure and set its fields to + * default values. The resulting struct can be freed using av_freep(). + * + * @return An AVContentLightMetadata filled with default values or NULL + * on failure. + */ +AVContentLightMetadata *av_content_light_metadata_alloc(size_t *size); + +/** + * Allocate a complete AVContentLightMetadata and add it to the frame. + * + * @param frame The frame which side data is added to. + * + * @return The AVContentLightMetadata structure to be filled by caller. + */ +AVContentLightMetadata *av_content_light_metadata_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_MASTERING_DISPLAY_METADATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mathematics.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mathematics.h new file mode 100644 index 00000000..54901800 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mathematics.h @@ -0,0 +1,242 @@ +/* + * copyright (c) 2005-2012 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @addtogroup lavu_math + * Mathematical utilities for working with timestamp and time base. + */ + +#ifndef AVUTIL_MATHEMATICS_H +#define AVUTIL_MATHEMATICS_H + +#include +#include +#include "attributes.h" +#include "rational.h" +#include "intfloat.h" + +#ifndef M_E +#define M_E 2.7182818284590452354 /* e */ +#endif +#ifndef M_LN2 +#define M_LN2 0.69314718055994530942 /* log_e 2 */ +#endif +#ifndef M_LN10 +#define M_LN10 2.30258509299404568402 /* log_e 10 */ +#endif +#ifndef M_LOG2_10 +#define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ +#endif +#ifndef M_PHI +#define M_PHI 1.61803398874989484820 /* phi / golden ratio */ +#endif +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* pi */ +#endif +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* pi/2 */ +#endif +#ifndef M_SQRT1_2 +#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ +#endif +#ifndef M_SQRT2 +#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ +#endif +#ifndef NAN +#define NAN av_int2float(0x7fc00000) +#endif +#ifndef INFINITY +#define INFINITY av_int2float(0x7f800000) +#endif + +/** + * @addtogroup lavu_math + * + * @{ + */ + +/** + * Rounding methods. + */ +enum AVRounding { + AV_ROUND_ZERO = 0, ///< Round toward zero. + AV_ROUND_INF = 1, ///< Round away from zero. + AV_ROUND_DOWN = 2, ///< Round toward -infinity. + AV_ROUND_UP = 3, ///< Round toward +infinity. + AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero. + /** + * Flag telling rescaling functions to pass `INT64_MIN`/`MAX` through + * unchanged, avoiding special cases for #AV_NOPTS_VALUE. + * + * Unlike other values of the enumeration AVRounding, this value is a + * bitmask that must be used in conjunction with another value of the + * enumeration through a bitwise OR, in order to set behavior for normal + * cases. + * + * @code{.c} + * av_rescale_rnd(3, 1, 2, AV_ROUND_UP | AV_ROUND_PASS_MINMAX); + * // Rescaling 3: + * // Calculating 3 * 1 / 2 + * // 3 / 2 is rounded up to 2 + * // => 2 + * + * av_rescale_rnd(AV_NOPTS_VALUE, 1, 2, AV_ROUND_UP | AV_ROUND_PASS_MINMAX); + * // Rescaling AV_NOPTS_VALUE: + * // AV_NOPTS_VALUE == INT64_MIN + * // AV_NOPTS_VALUE is passed through + * // => AV_NOPTS_VALUE + * @endcode + */ + AV_ROUND_PASS_MINMAX = 8192, +}; + +/** + * Compute the greatest common divisor of two integer operands. + * + * @param a,b Operands + * @return GCD of a and b up to sign; if a >= 0 and b >= 0, return value is >= 0; + * if a == 0 and b == 0, returns 0. + */ +int64_t av_const av_gcd(int64_t a, int64_t b); + +/** + * Rescale a 64-bit integer with rounding to nearest. + * + * The operation is mathematically equivalent to `a * b / c`, but writing that + * directly can overflow. + * + * This function is equivalent to av_rescale_rnd() with #AV_ROUND_NEAR_INF. + * + * @see av_rescale_rnd(), av_rescale_q(), av_rescale_q_rnd() + */ +int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const; + +/** + * Rescale a 64-bit integer with specified rounding. + * + * The operation is mathematically equivalent to `a * b / c`, but writing that + * directly can overflow, and does not support different rounding methods. + * + * @see av_rescale(), av_rescale_q(), av_rescale_q_rnd() + */ +int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const; + +/** + * Rescale a 64-bit integer by 2 rational numbers. + * + * The operation is mathematically equivalent to `a * bq / cq`. + * + * This function is equivalent to av_rescale_q_rnd() with #AV_ROUND_NEAR_INF. + * + * @see av_rescale(), av_rescale_rnd(), av_rescale_q_rnd() + */ +int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const; + +/** + * Rescale a 64-bit integer by 2 rational numbers with specified rounding. + * + * The operation is mathematically equivalent to `a * bq / cq`. + * + * @see av_rescale(), av_rescale_rnd(), av_rescale_q() + */ +int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, + enum AVRounding rnd) av_const; + +/** + * Compare two timestamps each in its own time base. + * + * @return One of the following values: + * - -1 if `ts_a` is before `ts_b` + * - 1 if `ts_a` is after `ts_b` + * - 0 if they represent the same position + * + * @warning + * The result of the function is undefined if one of the timestamps is outside + * the `int64_t` range when represented in the other's timebase. + */ +int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); + +/** + * Compare the remainders of two integer operands divided by a common divisor. + * + * In other words, compare the least significant `log2(mod)` bits of integers + * `a` and `b`. + * + * @code{.c} + * av_compare_mod(0x11, 0x02, 0x10) < 0 // since 0x11 % 0x10 (0x1) < 0x02 % 0x10 (0x2) + * av_compare_mod(0x11, 0x02, 0x20) > 0 // since 0x11 % 0x20 (0x11) > 0x02 % 0x20 (0x02) + * @endcode + * + * @param a,b Operands + * @param mod Divisor; must be a power of 2 + * @return + * - a negative value if `a % mod < b % mod` + * - a positive value if `a % mod > b % mod` + * - zero if `a % mod == b % mod` + */ +int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); + +/** + * Rescale a timestamp while preserving known durations. + * + * This function is designed to be called per audio packet to scale the input + * timestamp to a different time base. Compared to a simple av_rescale_q() + * call, this function is robust against possible inconsistent frame durations. + * + * The `last` parameter is a state variable that must be preserved for all + * subsequent calls for the same stream. For the first call, `*last` should be + * initialized to #AV_NOPTS_VALUE. + * + * @param[in] in_tb Input time base + * @param[in] in_ts Input timestamp + * @param[in] fs_tb Duration time base; typically this is finer-grained + * (greater) than `in_tb` and `out_tb` + * @param[in] duration Duration till the next call to this function (i.e. + * duration of the current packet/frame) + * @param[in,out] last Pointer to a timestamp expressed in terms of + * `fs_tb`, acting as a state variable + * @param[in] out_tb Output timebase + * @return Timestamp expressed in terms of `out_tb` + * + * @note In the context of this function, "duration" is in term of samples, not + * seconds. + */ +int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb); + +/** + * Add a value to a timestamp. + * + * This function guarantees that when the same value is repeatly added that + * no accumulation of rounding errors occurs. + * + * @param[in] ts Input timestamp + * @param[in] ts_tb Input timestamp time base + * @param[in] inc Value to be added + * @param[in] inc_tb Time base of `inc` + */ +int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc); + + +/** + * @} + */ + +#endif /* AVUTIL_MATHEMATICS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/md5.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/md5.h new file mode 100644 index 00000000..ca72ccbf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/md5.h @@ -0,0 +1,98 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_md5 + * Public header for MD5 hash function implementation. + */ + +#ifndef AVUTIL_MD5_H +#define AVUTIL_MD5_H + +#include +#include + +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_md5 MD5 + * @ingroup lavu_hash + * MD5 hash function implementation. + * + * @{ + */ + +extern const int av_md5_size; + +struct AVMD5; + +/** + * Allocate an AVMD5 context. + */ +struct AVMD5 *av_md5_alloc(void); + +/** + * Initialize MD5 hashing. + * + * @param ctx pointer to the function context (of size av_md5_size) + */ +void av_md5_init(struct AVMD5 *ctx); + +/** + * Update hash value. + * + * @param ctx hash function context + * @param src input data to update hash with + * @param len input data length + */ +#if FF_API_CRYPTO_SIZE_T +void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, int len); +#else +void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, size_t len); +#endif + +/** + * Finish hashing and output digest value. + * + * @param ctx hash function context + * @param dst buffer where output digest value is stored + */ +void av_md5_final(struct AVMD5 *ctx, uint8_t *dst); + +/** + * Hash an array of data. + * + * @param dst The output buffer to write the digest into + * @param src The data to hash + * @param len The length of the data, in bytes + */ +#if FF_API_CRYPTO_SIZE_T +void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); +#else +void av_md5_sum(uint8_t *dst, const uint8_t *src, size_t len); +#endif + +/** + * @} + */ + +#endif /* AVUTIL_MD5_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem.h new file mode 100644 index 00000000..5fb1a02d --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem.h @@ -0,0 +1,700 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_mem + * Memory handling functions + */ + +#ifndef AVUTIL_MEM_H +#define AVUTIL_MEM_H + +#include +#include + +#include "attributes.h" +#include "error.h" +#include "avutil.h" + +/** + * @addtogroup lavu_mem + * Utilities for manipulating memory. + * + * FFmpeg has several applications of memory that are not required of a typical + * program. For example, the computing-heavy components like video decoding and + * encoding can be sped up significantly through the use of aligned memory. + * + * However, for each of FFmpeg's applications of memory, there might not be a + * recognized or standardized API for that specific use. Memory alignment, for + * instance, varies wildly depending on operating systems, architectures, and + * compilers. Hence, this component of @ref libavutil is created to make + * dealing with memory consistently possible on all platforms. + * + * @{ + * + * @defgroup lavu_mem_macros Alignment Macros + * Helper macros for declaring aligned variables. + * @{ + */ + +/** + * @def DECLARE_ALIGNED(n,t,v) + * Declare a variable that is aligned in memory. + * + * @code{.c} + * DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42; + * DECLARE_ALIGNED(32, uint8_t, aligned_array)[128]; + * + * // The default-alignment equivalent would be + * uint16_t aligned_int = 42; + * uint8_t aligned_array[128]; + * @endcode + * + * @param n Minimum alignment in bytes + * @param t Type of the variable (or array element) + * @param v Name of the variable + */ + +/** + * @def DECLARE_ASM_ALIGNED(n,t,v) + * Declare an aligned variable appropriate for use in inline assembly code. + * + * @code{.c} + * DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008); + * @endcode + * + * @param n Minimum alignment in bytes + * @param t Type of the variable (or array element) + * @param v Name of the variable + */ + +/** + * @def DECLARE_ASM_CONST(n,t,v) + * Declare a static constant aligned variable appropriate for use in inline + * assembly code. + * + * @code{.c} + * DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008); + * @endcode + * + * @param n Minimum alignment in bytes + * @param t Type of the variable (or array element) + * @param v Name of the variable + */ + +#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C) + #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v + #define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v + #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v +#elif defined(__DJGPP__) + #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v + #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v + #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v +#elif defined(__GNUC__) || defined(__clang__) + #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v + #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v + #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v +#elif defined(_MSC_VER) + #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v + #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v + #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v +#else + #define DECLARE_ALIGNED(n,t,v) t v + #define DECLARE_ASM_ALIGNED(n,t,v) t v + #define DECLARE_ASM_CONST(n,t,v) static const t v +#endif + +/** + * @} + */ + +/** + * @defgroup lavu_mem_attrs Function Attributes + * Function attributes applicable to memory handling functions. + * + * These function attributes can help compilers emit more useful warnings, or + * generate better code. + * @{ + */ + +/** + * @def av_malloc_attrib + * Function attribute denoting a malloc-like function. + * + * @see Function attribute `malloc` in GCC's documentation + */ + +#if AV_GCC_VERSION_AT_LEAST(3,1) + #define av_malloc_attrib __attribute__((__malloc__)) +#else + #define av_malloc_attrib +#endif + +/** + * @def av_alloc_size(...) + * Function attribute used on a function that allocates memory, whose size is + * given by the specified parameter(s). + * + * @code{.c} + * void *av_malloc(size_t size) av_alloc_size(1); + * void *av_calloc(size_t nmemb, size_t size) av_alloc_size(1, 2); + * @endcode + * + * @param ... One or two parameter indexes, separated by a comma + * + * @see Function attribute `alloc_size` in GCC's documentation + */ + +#if AV_GCC_VERSION_AT_LEAST(4,3) + #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) +#else + #define av_alloc_size(...) +#endif + +/** + * @} + */ + +/** + * @defgroup lavu_mem_funcs Heap Management + * Functions responsible for allocating, freeing, and copying memory. + * + * All memory allocation functions have a built-in upper limit of `INT_MAX` + * bytes. This may be changed with av_max_alloc(), although exercise extreme + * caution when doing so. + * + * @{ + */ + +/** + * Allocate a memory block with alignment suitable for all memory accesses + * (including vectors if available on the CPU). + * + * @param size Size in bytes for the memory block to be allocated + * @return Pointer to the allocated block, or `NULL` if the block cannot + * be allocated + * @see av_mallocz() + */ +void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1); + +/** + * Allocate a memory block with alignment suitable for all memory accesses + * (including vectors if available on the CPU) and zero all the bytes of the + * block. + * + * @param size Size in bytes for the memory block to be allocated + * @return Pointer to the allocated block, or `NULL` if it cannot be allocated + * @see av_malloc() + */ +void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1); + +/** + * Allocate a memory block for an array with av_malloc(). + * + * The allocated memory will have size `size * nmemb` bytes. + * + * @param nmemb Number of element + * @param size Size of a single element + * @return Pointer to the allocated block, or `NULL` if the block cannot + * be allocated + * @see av_malloc() + */ +av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size); + +/** + * Allocate a memory block for an array with av_mallocz(). + * + * The allocated memory will have size `size * nmemb` bytes. + * + * @param nmemb Number of elements + * @param size Size of the single element + * @return Pointer to the allocated block, or `NULL` if the block cannot + * be allocated + * + * @see av_mallocz() + * @see av_malloc_array() + */ +av_alloc_size(1, 2) void *av_mallocz_array(size_t nmemb, size_t size); + +/** + * Non-inlined equivalent of av_mallocz_array(). + * + * Created for symmetry with the calloc() C function. + */ +void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib; + +/** + * Allocate, reallocate, or free a block of memory. + * + * If `ptr` is `NULL` and `size` > 0, allocate a new block. If `size` is + * zero, free the memory block pointed to by `ptr`. Otherwise, expand or + * shrink that block of memory according to `size`. + * + * @param ptr Pointer to a memory block already allocated with + * av_realloc() or `NULL` + * @param size Size in bytes of the memory block to be allocated or + * reallocated + * + * @return Pointer to a newly-reallocated block or `NULL` if the block + * cannot be reallocated or the function is used to free the memory block + * + * @warning Unlike av_malloc(), the returned pointer is not guaranteed to be + * correctly aligned. + * @see av_fast_realloc() + * @see av_reallocp() + */ +void *av_realloc(void *ptr, size_t size) av_alloc_size(2); + +/** + * Allocate, reallocate, or free a block of memory through a pointer to a + * pointer. + * + * If `*ptr` is `NULL` and `size` > 0, allocate a new block. If `size` is + * zero, free the memory block pointed to by `*ptr`. Otherwise, expand or + * shrink that block of memory according to `size`. + * + * @param[in,out] ptr Pointer to a pointer to a memory block already allocated + * with av_realloc(), or a pointer to `NULL`. The pointer + * is updated on success, or freed on failure. + * @param[in] size Size in bytes for the memory block to be allocated or + * reallocated + * + * @return Zero on success, an AVERROR error code on failure + * + * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be + * correctly aligned. + */ +av_warn_unused_result +int av_reallocp(void *ptr, size_t size); + +/** + * Allocate, reallocate, or free a block of memory. + * + * This function does the same thing as av_realloc(), except: + * - It takes two size arguments and allocates `nelem * elsize` bytes, + * after checking the result of the multiplication for integer overflow. + * - It frees the input block in case of failure, thus avoiding the memory + * leak with the classic + * @code{.c} + * buf = realloc(buf); + * if (!buf) + * return -1; + * @endcode + * pattern. + */ +void *av_realloc_f(void *ptr, size_t nelem, size_t elsize); + +/** + * Allocate, reallocate, or free an array. + * + * If `ptr` is `NULL` and `nmemb` > 0, allocate a new block. If + * `nmemb` is zero, free the memory block pointed to by `ptr`. + * + * @param ptr Pointer to a memory block already allocated with + * av_realloc() or `NULL` + * @param nmemb Number of elements in the array + * @param size Size of the single element of the array + * + * @return Pointer to a newly-reallocated block or NULL if the block + * cannot be reallocated or the function is used to free the memory block + * + * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be + * correctly aligned. + * @see av_reallocp_array() + */ +av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size); + +/** + * Allocate, reallocate, or free an array through a pointer to a pointer. + * + * If `*ptr` is `NULL` and `nmemb` > 0, allocate a new block. If `nmemb` is + * zero, free the memory block pointed to by `*ptr`. + * + * @param[in,out] ptr Pointer to a pointer to a memory block already + * allocated with av_realloc(), or a pointer to `NULL`. + * The pointer is updated on success, or freed on failure. + * @param[in] nmemb Number of elements + * @param[in] size Size of the single element + * + * @return Zero on success, an AVERROR error code on failure + * + * @warning Unlike av_malloc(), the allocated memory is not guaranteed to be + * correctly aligned. + */ +int av_reallocp_array(void *ptr, size_t nmemb, size_t size); + +/** + * Reallocate the given buffer if it is not large enough, otherwise do nothing. + * + * If the given buffer is `NULL`, then a new uninitialized buffer is allocated. + * + * If the given buffer is not large enough, and reallocation fails, `NULL` is + * returned and `*size` is set to 0, but the original buffer is not changed or + * freed. + * + * A typical use pattern follows: + * + * @code{.c} + * uint8_t *buf = ...; + * uint8_t *new_buf = av_fast_realloc(buf, ¤t_size, size_needed); + * if (!new_buf) { + * // Allocation failed; clean up original buffer + * av_freep(&buf); + * return AVERROR(ENOMEM); + * } + * @endcode + * + * @param[in,out] ptr Already allocated buffer, or `NULL` + * @param[in,out] size Pointer to the size of buffer `ptr`. `*size` is + * updated to the new allocated size, in particular 0 + * in case of failure. + * @param[in] min_size Desired minimal size of buffer `ptr` + * @return `ptr` if the buffer is large enough, a pointer to newly reallocated + * buffer if the buffer was not large enough, or `NULL` in case of + * error + * @see av_realloc() + * @see av_fast_malloc() + */ +void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size); + +/** + * Allocate a buffer, reusing the given one if large enough. + * + * Contrary to av_fast_realloc(), the current buffer contents might not be + * preserved and on error the old buffer is freed, thus no special handling to + * avoid memleaks is necessary. + * + * `*ptr` is allowed to be `NULL`, in which case allocation always happens if + * `size_needed` is greater than 0. + * + * @code{.c} + * uint8_t *buf = ...; + * av_fast_malloc(&buf, ¤t_size, size_needed); + * if (!buf) { + * // Allocation failed; buf already freed + * return AVERROR(ENOMEM); + * } + * @endcode + * + * @param[in,out] ptr Pointer to pointer to an already allocated buffer. + * `*ptr` will be overwritten with pointer to new + * buffer on success or `NULL` on failure + * @param[in,out] size Pointer to the size of buffer `*ptr`. `*size` is + * updated to the new allocated size, in particular 0 + * in case of failure. + * @param[in] min_size Desired minimal size of buffer `*ptr` + * @see av_realloc() + * @see av_fast_mallocz() + */ +void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size); + +/** + * Allocate and clear a buffer, reusing the given one if large enough. + * + * Like av_fast_malloc(), but all newly allocated space is initially cleared. + * Reused buffer is not cleared. + * + * `*ptr` is allowed to be `NULL`, in which case allocation always happens if + * `size_needed` is greater than 0. + * + * @param[in,out] ptr Pointer to pointer to an already allocated buffer. + * `*ptr` will be overwritten with pointer to new + * buffer on success or `NULL` on failure + * @param[in,out] size Pointer to the size of buffer `*ptr`. `*size` is + * updated to the new allocated size, in particular 0 + * in case of failure. + * @param[in] min_size Desired minimal size of buffer `*ptr` + * @see av_fast_malloc() + */ +void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size); + +/** + * Free a memory block which has been allocated with a function of av_malloc() + * or av_realloc() family. + * + * @param ptr Pointer to the memory block which should be freed. + * + * @note `ptr = NULL` is explicitly allowed. + * @note It is recommended that you use av_freep() instead, to prevent leaving + * behind dangling pointers. + * @see av_freep() + */ +void av_free(void *ptr); + +/** + * Free a memory block which has been allocated with a function of av_malloc() + * or av_realloc() family, and set the pointer pointing to it to `NULL`. + * + * @code{.c} + * uint8_t *buf = av_malloc(16); + * av_free(buf); + * // buf now contains a dangling pointer to freed memory, and accidental + * // dereference of buf will result in a use-after-free, which may be a + * // security risk. + * + * uint8_t *buf = av_malloc(16); + * av_freep(&buf); + * // buf is now NULL, and accidental dereference will only result in a + * // NULL-pointer dereference. + * @endcode + * + * @param ptr Pointer to the pointer to the memory block which should be freed + * @note `*ptr = NULL` is safe and leads to no action. + * @see av_free() + */ +void av_freep(void *ptr); + +/** + * Duplicate a string. + * + * @param s String to be duplicated + * @return Pointer to a newly-allocated string containing a + * copy of `s` or `NULL` if the string cannot be allocated + * @see av_strndup() + */ +char *av_strdup(const char *s) av_malloc_attrib; + +/** + * Duplicate a substring of a string. + * + * @param s String to be duplicated + * @param len Maximum length of the resulting string (not counting the + * terminating byte) + * @return Pointer to a newly-allocated string containing a + * substring of `s` or `NULL` if the string cannot be allocated + */ +char *av_strndup(const char *s, size_t len) av_malloc_attrib; + +/** + * Duplicate a buffer with av_malloc(). + * + * @param p Buffer to be duplicated + * @param size Size in bytes of the buffer copied + * @return Pointer to a newly allocated buffer containing a + * copy of `p` or `NULL` if the buffer cannot be allocated + */ +void *av_memdup(const void *p, size_t size); + +/** + * Overlapping memcpy() implementation. + * + * @param dst Destination buffer + * @param back Number of bytes back to start copying (i.e. the initial size of + * the overlapping window); must be > 0 + * @param cnt Number of bytes to copy; must be >= 0 + * + * @note `cnt > back` is valid, this will copy the bytes we just copied, + * thus creating a repeating pattern with a period length of `back`. + */ +void av_memcpy_backptr(uint8_t *dst, int back, int cnt); + +/** + * @} + */ + +/** + * @defgroup lavu_mem_dynarray Dynamic Array + * + * Utilities to make an array grow when needed. + * + * Sometimes, the programmer would want to have an array that can grow when + * needed. The libavutil dynamic array utilities fill that need. + * + * libavutil supports two systems of appending elements onto a dynamically + * allocated array, the first one storing the pointer to the value in the + * array, and the second storing the value directly. In both systems, the + * caller is responsible for maintaining a variable containing the length of + * the array, as well as freeing of the array after use. + * + * The first system stores pointers to values in a block of dynamically + * allocated memory. Since only pointers are stored, the function does not need + * to know the size of the type. Both av_dynarray_add() and + * av_dynarray_add_nofree() implement this system. + * + * @code + * type **array = NULL; //< an array of pointers to values + * int nb = 0; //< a variable to keep track of the length of the array + * + * type to_be_added = ...; + * type to_be_added2 = ...; + * + * av_dynarray_add(&array, &nb, &to_be_added); + * if (nb == 0) + * return AVERROR(ENOMEM); + * + * av_dynarray_add(&array, &nb, &to_be_added2); + * if (nb == 0) + * return AVERROR(ENOMEM); + * + * // Now: + * // nb == 2 + * // &to_be_added == array[0] + * // &to_be_added2 == array[1] + * + * av_freep(&array); + * @endcode + * + * The second system stores the value directly in a block of memory. As a + * result, the function has to know the size of the type. av_dynarray2_add() + * implements this mechanism. + * + * @code + * type *array = NULL; //< an array of values + * int nb = 0; //< a variable to keep track of the length of the array + * + * type to_be_added = ...; + * type to_be_added2 = ...; + * + * type *addr = av_dynarray2_add((void **)&array, &nb, sizeof(*array), NULL); + * if (!addr) + * return AVERROR(ENOMEM); + * memcpy(addr, &to_be_added, sizeof(to_be_added)); + * + * // Shortcut of the above. + * type *addr = av_dynarray2_add((void **)&array, &nb, sizeof(*array), + * (const void *)&to_be_added2); + * if (!addr) + * return AVERROR(ENOMEM); + * + * // Now: + * // nb == 2 + * // to_be_added == array[0] + * // to_be_added2 == array[1] + * + * av_freep(&array); + * @endcode + * + * @{ + */ + +/** + * Add the pointer to an element to a dynamic array. + * + * The array to grow is supposed to be an array of pointers to + * structures, and the element to add must be a pointer to an already + * allocated structure. + * + * The array is reallocated when its size reaches powers of 2. + * Therefore, the amortized cost of adding an element is constant. + * + * In case of success, the pointer to the array is updated in order to + * point to the new grown array, and the number pointed to by `nb_ptr` + * is incremented. + * In case of failure, the array is freed, `*tab_ptr` is set to `NULL` and + * `*nb_ptr` is set to 0. + * + * @param[in,out] tab_ptr Pointer to the array to grow + * @param[in,out] nb_ptr Pointer to the number of elements in the array + * @param[in] elem Element to add + * @see av_dynarray_add_nofree(), av_dynarray2_add() + */ +void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem); + +/** + * Add an element to a dynamic array. + * + * Function has the same functionality as av_dynarray_add(), + * but it doesn't free memory on fails. It returns error code + * instead and leave current buffer untouched. + * + * @return >=0 on success, negative otherwise + * @see av_dynarray_add(), av_dynarray2_add() + */ +av_warn_unused_result +int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem); + +/** + * Add an element of size `elem_size` to a dynamic array. + * + * The array is reallocated when its number of elements reaches powers of 2. + * Therefore, the amortized cost of adding an element is constant. + * + * In case of success, the pointer to the array is updated in order to + * point to the new grown array, and the number pointed to by `nb_ptr` + * is incremented. + * In case of failure, the array is freed, `*tab_ptr` is set to `NULL` and + * `*nb_ptr` is set to 0. + * + * @param[in,out] tab_ptr Pointer to the array to grow + * @param[in,out] nb_ptr Pointer to the number of elements in the array + * @param[in] elem_size Size in bytes of an element in the array + * @param[in] elem_data Pointer to the data of the element to add. If + * `NULL`, the space of the newly added element is + * allocated but left uninitialized. + * + * @return Pointer to the data of the element to copy in the newly allocated + * space + * @see av_dynarray_add(), av_dynarray_add_nofree() + */ +void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, + const uint8_t *elem_data); + +/** + * @} + */ + +/** + * @defgroup lavu_mem_misc Miscellaneous Functions + * + * Other functions related to memory allocation. + * + * @{ + */ + +/** + * Multiply two `size_t` values checking for overflow. + * + * @param[in] a,b Operands of multiplication + * @param[out] r Pointer to the result of the operation + * @return 0 on success, AVERROR(EINVAL) on overflow + */ +static inline int av_size_mult(size_t a, size_t b, size_t *r) +{ + size_t t = a * b; + /* Hack inspired from glibc: don't try the division if nelem and elsize + * are both less than sqrt(SIZE_MAX). */ + if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b) + return AVERROR(EINVAL); + *r = t; + return 0; +} + +/** + * Set the maximum size that may be allocated in one block. + * + * The value specified with this function is effective for all libavutil's @ref + * lavu_mem_funcs "heap management functions." + * + * By default, the max value is defined as `INT_MAX`. + * + * @param max Value to be set as the new maximum size + * + * @warning Exercise extreme caution when using this function. Don't touch + * this if you do not understand the full consequence of doing so. + */ +void av_max_alloc(size_t max); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_MEM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem_internal.h new file mode 100644 index 00000000..6fdbcb01 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mem_internal.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MEM_INTERNAL_H +#define AVUTIL_MEM_INTERNAL_H + +#include "avassert.h" +#include "mem.h" + +static inline int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc) +{ + void *val; + + memcpy(&val, ptr, sizeof(val)); + if (min_size <= *size) { + av_assert0(val || !min_size); + return 0; + } + min_size = FFMAX(min_size + min_size / 16 + 32, min_size); + av_freep(ptr); + val = zero_realloc ? av_mallocz(min_size) : av_malloc(min_size); + memcpy(ptr, &val, sizeof(val)); + if (!val) + min_size = 0; + *size = min_size; + return 1; +} +#endif /* AVUTIL_MEM_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/asmdefs.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/asmdefs.h new file mode 100644 index 00000000..74811991 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/asmdefs.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2015 Imagination Technologies Ltd + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MIPS assembly defines from sys/asm.h but rewritten for use with C inline + * assembly (rather than from within .s files). + */ + +#ifndef AVUTIL_MIPS_ASMDEFS_H +#define AVUTIL_MIPS_ASMDEFS_H + +#if defined(_ABI64) && _MIPS_SIM == _ABI64 +# define mips_reg int64_t +# define PTRSIZE " 8 " +# define PTRLOG " 3 " +# define PTR_ADDU "daddu " +# define PTR_ADDIU "daddiu " +# define PTR_ADDI "daddi " +# define PTR_SUBU "dsubu " +# define PTR_L "ld " +# define PTR_S "sd " +# define PTR_SRA "dsra " +# define PTR_SRL "dsrl " +# define PTR_SLL "dsll " +#else +# define mips_reg int32_t +# define PTRSIZE " 4 " +# define PTRLOG " 2 " +# define PTR_ADDU "addu " +# define PTR_ADDIU "addiu " +# define PTR_ADDI "addi " +# define PTR_SUBU "subu " +# define PTR_L "lw " +# define PTR_S "sw " +# define PTR_SRA "sra " +# define PTR_SRL "srl " +# define PTR_SLL "sll " +#endif + +#endif /* AVCODEC_MIPS_ASMDEFS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/generic_macros_msa.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/generic_macros_msa.h new file mode 100644 index 00000000..267d4e6c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/generic_macros_msa.h @@ -0,0 +1,2856 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (Manojkumar.Bhosale@imgtec.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MIPS_GENERIC_MACROS_MSA_H +#define AVUTIL_MIPS_GENERIC_MACROS_MSA_H + +#include +#include +#include + +#if HAVE_MSA2 +#include +#endif + +#define ALIGNMENT 16 +#define ALLOC_ALIGNED(align) __attribute__ ((aligned((align) << 1))) + +#define LD_V(RTYPE, psrc) *((RTYPE *)(psrc)) +#define LD_UB(...) LD_V(v16u8, __VA_ARGS__) +#define LD_SB(...) LD_V(v16i8, __VA_ARGS__) +#define LD_UH(...) LD_V(v8u16, __VA_ARGS__) +#define LD_SH(...) LD_V(v8i16, __VA_ARGS__) +#define LD_UW(...) LD_V(v4u32, __VA_ARGS__) +#define LD_SW(...) LD_V(v4i32, __VA_ARGS__) + +#define ST_V(RTYPE, in, pdst) *((RTYPE *)(pdst)) = (in) +#define ST_UB(...) ST_V(v16u8, __VA_ARGS__) +#define ST_SB(...) ST_V(v16i8, __VA_ARGS__) +#define ST_UH(...) ST_V(v8u16, __VA_ARGS__) +#define ST_SH(...) ST_V(v8i16, __VA_ARGS__) +#define ST_UW(...) ST_V(v4u32, __VA_ARGS__) +#define ST_SW(...) ST_V(v4i32, __VA_ARGS__) + +#if (__mips_isa_rev >= 6) + #define LH(psrc) \ + ( { \ + uint16_t val_lh_m = *(uint16_t *)(psrc); \ + val_lh_m; \ + } ) + + #define LW(psrc) \ + ( { \ + uint32_t val_lw_m = *(uint32_t *)(psrc); \ + val_lw_m; \ + } ) + + #if (__mips == 64) + #define LD(psrc) \ + ( { \ + uint64_t val_ld_m = *(uint64_t *)(psrc); \ + val_ld_m; \ + } ) + #else // !(__mips == 64) + #define LD(psrc) \ + ( { \ + uint8_t *psrc_ld_m = (uint8_t *) (psrc); \ + uint32_t val0_ld_m, val1_ld_m; \ + uint64_t val_ld_m = 0; \ + \ + val0_ld_m = LW(psrc_ld_m); \ + val1_ld_m = LW(psrc_ld_m + 4); \ + \ + val_ld_m = (uint64_t) (val1_ld_m); \ + val_ld_m = (uint64_t) ((val_ld_m << 32) & 0xFFFFFFFF00000000); \ + val_ld_m = (uint64_t) (val_ld_m | (uint64_t) val0_ld_m); \ + \ + val_ld_m; \ + } ) + #endif // (__mips == 64) + + #define SH(val, pdst) *(uint16_t *)(pdst) = (val); + #define SW(val, pdst) *(uint32_t *)(pdst) = (val); + #define SD(val, pdst) *(uint64_t *)(pdst) = (val); + +#else // !(__mips_isa_rev >= 6) + #define LH(psrc) \ + ( { \ + uint8_t *psrc_lh_m = (uint8_t *) (psrc); \ + uint16_t val_lh_m; \ + \ + __asm__ volatile ( \ + "ulh %[val_lh_m], %[psrc_lh_m] \n\t" \ + \ + : [val_lh_m] "=r" (val_lh_m) \ + : [psrc_lh_m] "m" (*psrc_lh_m) \ + ); \ + \ + val_lh_m; \ + } ) + + #define LW(psrc) \ + ( { \ + uint8_t *psrc_lw_m = (uint8_t *) (psrc); \ + uint32_t val_lw_m; \ + \ + __asm__ volatile ( \ + "ulw %[val_lw_m], %[psrc_lw_m] \n\t" \ + \ + : [val_lw_m] "=r" (val_lw_m) \ + : [psrc_lw_m] "m" (*psrc_lw_m) \ + ); \ + \ + val_lw_m; \ + } ) + + #if (__mips == 64) + #define LD(psrc) \ + ( { \ + uint8_t *psrc_ld_m = (uint8_t *) (psrc); \ + uint64_t val_ld_m = 0; \ + \ + __asm__ volatile ( \ + "uld %[val_ld_m], %[psrc_ld_m] \n\t" \ + \ + : [val_ld_m] "=r" (val_ld_m) \ + : [psrc_ld_m] "m" (*psrc_ld_m) \ + ); \ + \ + val_ld_m; \ + } ) + #else // !(__mips == 64) + #define LD(psrc) \ + ( { \ + uint8_t *psrc_ld_m = (uint8_t *) (psrc); \ + uint32_t val0_ld_m, val1_ld_m; \ + uint64_t val_ld_m = 0; \ + \ + val0_ld_m = LW(psrc_ld_m); \ + val1_ld_m = LW(psrc_ld_m + 4); \ + \ + val_ld_m = (uint64_t) (val1_ld_m); \ + val_ld_m = (uint64_t) ((val_ld_m << 32) & 0xFFFFFFFF00000000); \ + val_ld_m = (uint64_t) (val_ld_m | (uint64_t) val0_ld_m); \ + \ + val_ld_m; \ + } ) + #endif // (__mips == 64) + + #define SH(val, pdst) \ + { \ + uint8_t *pdst_sh_m = (uint8_t *) (pdst); \ + uint16_t val_sh_m = (val); \ + \ + __asm__ volatile ( \ + "ush %[val_sh_m], %[pdst_sh_m] \n\t" \ + \ + : [pdst_sh_m] "=m" (*pdst_sh_m) \ + : [val_sh_m] "r" (val_sh_m) \ + ); \ + } + + #define SW(val, pdst) \ + { \ + uint8_t *pdst_sw_m = (uint8_t *) (pdst); \ + uint32_t val_sw_m = (val); \ + \ + __asm__ volatile ( \ + "usw %[val_sw_m], %[pdst_sw_m] \n\t" \ + \ + : [pdst_sw_m] "=m" (*pdst_sw_m) \ + : [val_sw_m] "r" (val_sw_m) \ + ); \ + } + + #define SD(val, pdst) \ + { \ + uint8_t *pdst_sd_m = (uint8_t *) (pdst); \ + uint32_t val0_sd_m, val1_sd_m; \ + \ + val0_sd_m = (uint32_t) ((val) & 0x00000000FFFFFFFF); \ + val1_sd_m = (uint32_t) (((val) >> 32) & 0x00000000FFFFFFFF); \ + \ + SW(val0_sd_m, pdst_sd_m); \ + SW(val1_sd_m, pdst_sd_m + 4); \ + } +#endif // (__mips_isa_rev >= 6) + +/* Description : Load 4 words with stride + Arguments : Inputs - psrc (source pointer to load from) + - stride + Outputs - out0, out1, out2, out3 + Details : Loads word in 'out0' from (psrc) + Loads word in 'out1' from (psrc + stride) + Loads word in 'out2' from (psrc + 2 * stride) + Loads word in 'out3' from (psrc + 3 * stride) +*/ +#define LW4(psrc, stride, out0, out1, out2, out3) \ +{ \ + out0 = LW((psrc)); \ + out1 = LW((psrc) + stride); \ + out2 = LW((psrc) + 2 * stride); \ + out3 = LW((psrc) + 3 * stride); \ +} + +#define LW2(psrc, stride, out0, out1) \ +{ \ + out0 = LW((psrc)); \ + out1 = LW((psrc) + stride); \ +} + +/* Description : Load double words with stride + Arguments : Inputs - psrc (source pointer to load from) + - stride + Outputs - out0, out1 + Details : Loads double word in 'out0' from (psrc) + Loads double word in 'out1' from (psrc + stride) +*/ +#define LD2(psrc, stride, out0, out1) \ +{ \ + out0 = LD((psrc)); \ + out1 = LD((psrc) + stride); \ +} +#define LD4(psrc, stride, out0, out1, out2, out3) \ +{ \ + LD2((psrc), stride, out0, out1); \ + LD2((psrc) + 2 * stride, stride, out2, out3); \ +} + +/* Description : Store 4 words with stride + Arguments : Inputs - in0, in1, in2, in3, pdst, stride + Details : Stores word from 'in0' to (pdst) + Stores word from 'in1' to (pdst + stride) + Stores word from 'in2' to (pdst + 2 * stride) + Stores word from 'in3' to (pdst + 3 * stride) +*/ +#define SW4(in0, in1, in2, in3, pdst, stride) \ +{ \ + SW(in0, (pdst)) \ + SW(in1, (pdst) + stride); \ + SW(in2, (pdst) + 2 * stride); \ + SW(in3, (pdst) + 3 * stride); \ +} + +/* Description : Store 4 double words with stride + Arguments : Inputs - in0, in1, in2, in3, pdst, stride + Details : Stores double word from 'in0' to (pdst) + Stores double word from 'in1' to (pdst + stride) + Stores double word from 'in2' to (pdst + 2 * stride) + Stores double word from 'in3' to (pdst + 3 * stride) +*/ +#define SD4(in0, in1, in2, in3, pdst, stride) \ +{ \ + SD(in0, (pdst)) \ + SD(in1, (pdst) + stride); \ + SD(in2, (pdst) + 2 * stride); \ + SD(in3, (pdst) + 3 * stride); \ +} + +/* Description : Load vector elements with stride + Arguments : Inputs - psrc (source pointer to load from) + - stride + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Loads elements in 'out0' from (psrc) + Loads elements in 'out1' from (psrc + stride) +*/ +#define LD_V2(RTYPE, psrc, stride, out0, out1) \ +{ \ + out0 = LD_V(RTYPE, (psrc)); \ + out1 = LD_V(RTYPE, (psrc) + stride); \ +} +#define LD_UB2(...) LD_V2(v16u8, __VA_ARGS__) +#define LD_SB2(...) LD_V2(v16i8, __VA_ARGS__) +#define LD_UH2(...) LD_V2(v8u16, __VA_ARGS__) +#define LD_SH2(...) LD_V2(v8i16, __VA_ARGS__) +#define LD_SW2(...) LD_V2(v4i32, __VA_ARGS__) + +#define LD_V3(RTYPE, psrc, stride, out0, out1, out2) \ +{ \ + LD_V2(RTYPE, (psrc), stride, out0, out1); \ + out2 = LD_V(RTYPE, (psrc) + 2 * stride); \ +} +#define LD_UB3(...) LD_V3(v16u8, __VA_ARGS__) +#define LD_SB3(...) LD_V3(v16i8, __VA_ARGS__) + +#define LD_V4(RTYPE, psrc, stride, out0, out1, out2, out3) \ +{ \ + LD_V2(RTYPE, (psrc), stride, out0, out1); \ + LD_V2(RTYPE, (psrc) + 2 * stride , stride, out2, out3); \ +} +#define LD_UB4(...) LD_V4(v16u8, __VA_ARGS__) +#define LD_SB4(...) LD_V4(v16i8, __VA_ARGS__) +#define LD_UH4(...) LD_V4(v8u16, __VA_ARGS__) +#define LD_SH4(...) LD_V4(v8i16, __VA_ARGS__) +#define LD_SW4(...) LD_V4(v4i32, __VA_ARGS__) + +#define LD_V5(RTYPE, psrc, stride, out0, out1, out2, out3, out4) \ +{ \ + LD_V4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ + out4 = LD_V(RTYPE, (psrc) + 4 * stride); \ +} +#define LD_UB5(...) LD_V5(v16u8, __VA_ARGS__) +#define LD_SB5(...) LD_V5(v16i8, __VA_ARGS__) + +#define LD_V6(RTYPE, psrc, stride, out0, out1, out2, out3, out4, out5) \ +{ \ + LD_V4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ + LD_V2(RTYPE, (psrc) + 4 * stride, stride, out4, out5); \ +} +#define LD_UB6(...) LD_V6(v16u8, __VA_ARGS__) +#define LD_SB6(...) LD_V6(v16i8, __VA_ARGS__) +#define LD_UH6(...) LD_V6(v8u16, __VA_ARGS__) +#define LD_SH6(...) LD_V6(v8i16, __VA_ARGS__) + +#define LD_V7(RTYPE, psrc, stride, \ + out0, out1, out2, out3, out4, out5, out6) \ +{ \ + LD_V5(RTYPE, (psrc), stride, out0, out1, out2, out3, out4); \ + LD_V2(RTYPE, (psrc) + 5 * stride, stride, out5, out6); \ +} +#define LD_UB7(...) LD_V7(v16u8, __VA_ARGS__) +#define LD_SB7(...) LD_V7(v16i8, __VA_ARGS__) + +#define LD_V8(RTYPE, psrc, stride, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + LD_V4(RTYPE, (psrc), stride, out0, out1, out2, out3); \ + LD_V4(RTYPE, (psrc) + 4 * stride, stride, out4, out5, out6, out7); \ +} +#define LD_UB8(...) LD_V8(v16u8, __VA_ARGS__) +#define LD_SB8(...) LD_V8(v16i8, __VA_ARGS__) +#define LD_UH8(...) LD_V8(v8u16, __VA_ARGS__) +#define LD_SH8(...) LD_V8(v8i16, __VA_ARGS__) +#define LD_SW8(...) LD_V8(v4i32, __VA_ARGS__) + +#define LD_V16(RTYPE, psrc, stride, \ + out0, out1, out2, out3, out4, out5, out6, out7, \ + out8, out9, out10, out11, out12, out13, out14, out15) \ +{ \ + LD_V8(RTYPE, (psrc), stride, \ + out0, out1, out2, out3, out4, out5, out6, out7); \ + LD_V8(RTYPE, (psrc) + 8 * stride, stride, \ + out8, out9, out10, out11, out12, out13, out14, out15); \ +} +#define LD_SH16(...) LD_V16(v8i16, __VA_ARGS__) + +/* Description : Store vectors with stride + Arguments : Inputs - in0, in1, stride + Outputs - pdst (destination pointer to store to) + Details : Stores elements from 'in0' to (pdst) + Stores elements from 'in1' to (pdst + stride) +*/ +#define ST_V2(RTYPE, in0, in1, pdst, stride) \ +{ \ + ST_V(RTYPE, in0, (pdst)); \ + ST_V(RTYPE, in1, (pdst) + stride); \ +} +#define ST_UB2(...) ST_V2(v16u8, __VA_ARGS__) +#define ST_SB2(...) ST_V2(v16i8, __VA_ARGS__) +#define ST_UH2(...) ST_V2(v8u16, __VA_ARGS__) +#define ST_SH2(...) ST_V2(v8i16, __VA_ARGS__) +#define ST_SW2(...) ST_V2(v4i32, __VA_ARGS__) + +#define ST_V4(RTYPE, in0, in1, in2, in3, pdst, stride) \ +{ \ + ST_V2(RTYPE, in0, in1, (pdst), stride); \ + ST_V2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ +} +#define ST_UB4(...) ST_V4(v16u8, __VA_ARGS__) +#define ST_SB4(...) ST_V4(v16i8, __VA_ARGS__) +#define ST_SH4(...) ST_V4(v8i16, __VA_ARGS__) +#define ST_SW4(...) ST_V4(v4i32, __VA_ARGS__) + +#define ST_V6(RTYPE, in0, in1, in2, in3, in4, in5, pdst, stride) \ +{ \ + ST_V4(RTYPE, in0, in1, in2, in3, (pdst), stride); \ + ST_V2(RTYPE, in4, in5, (pdst) + 4 * stride, stride); \ +} +#define ST_SH6(...) ST_V6(v8i16, __VA_ARGS__) + +#define ST_V8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + ST_V4(RTYPE, in0, in1, in2, in3, (pdst), stride); \ + ST_V4(RTYPE, in4, in5, in6, in7, (pdst) + 4 * stride, stride); \ +} +#define ST_UB8(...) ST_V8(v16u8, __VA_ARGS__) +#define ST_SH8(...) ST_V8(v8i16, __VA_ARGS__) +#define ST_SW8(...) ST_V8(v4i32, __VA_ARGS__) + +/* Description : Store half word elements of vector with stride + * Arguments : Inputs - in source vector + * - pdst (destination pointer to store to) + * - stride + * Details : Stores half word 'idx0' from 'in' to (pdst) + * Stores half word 'idx1' from 'in' to (pdst + stride) + * Similar for other elements + */ +#define ST_H1(in, idx, pdst) \ +{ \ + uint16_t out0_m; \ + out0_m = __msa_copy_u_h((v8i16) in, idx); \ + SH(out0_m, (pdst)); \ +} +#define ST_H2(in, idx0, idx1, pdst, stride) \ +{ \ + uint16_t out0_m, out1_m; \ + out0_m = __msa_copy_u_h((v8i16) in, idx0); \ + out1_m = __msa_copy_u_h((v8i16) in, idx1); \ + SH(out0_m, (pdst)); \ + SH(out1_m, (pdst) + stride); \ +} +#define ST_H4(in, idx0, idx1, idx2, idx3, pdst, stride) \ +{ \ + uint16_t out0_m, out1_m, out2_m, out3_m; \ + out0_m = __msa_copy_u_h((v8i16) in, idx0); \ + out1_m = __msa_copy_u_h((v8i16) in, idx1); \ + out2_m = __msa_copy_u_h((v8i16) in, idx2); \ + out3_m = __msa_copy_u_h((v8i16) in, idx3); \ + SH(out0_m, (pdst)); \ + SH(out1_m, (pdst) + stride); \ + SH(out2_m, (pdst) + 2 * stride); \ + SH(out3_m, (pdst) + 3 * stride); \ +} +#define ST_H8(in, idx0, idx1, idx2, idx3, idx4, idx5, \ + idx6, idx7, pdst, stride) \ +{ \ + ST_H4(in, idx0, idx1, idx2, idx3, pdst, stride) \ + ST_H4(in, idx4, idx5, idx6, idx7, (pdst) + 4*stride, stride) \ +} + +/* Description : Store word elements of vector with stride + * Arguments : Inputs - in source vector + * - pdst (destination pointer to store to) + * - stride + * Details : Stores word 'idx0' from 'in' to (pdst) + * Stores word 'idx1' from 'in' to (pdst + stride) + * Similar for other elements + */ +#define ST_W1(in, idx, pdst) \ +{ \ + uint32_t out0_m; \ + out0_m = __msa_copy_u_w((v4i32) in, idx); \ + SW(out0_m, (pdst)); \ +} +#define ST_W2(in, idx0, idx1, pdst, stride) \ +{ \ + uint32_t out0_m, out1_m; \ + out0_m = __msa_copy_u_w((v4i32) in, idx0); \ + out1_m = __msa_copy_u_w((v4i32) in, idx1); \ + SW(out0_m, (pdst)); \ + SW(out1_m, (pdst) + stride); \ +} +#define ST_W4(in, idx0, idx1, idx2, idx3, pdst, stride) \ +{ \ + uint32_t out0_m, out1_m, out2_m, out3_m; \ + out0_m = __msa_copy_u_w((v4i32) in, idx0); \ + out1_m = __msa_copy_u_w((v4i32) in, idx1); \ + out2_m = __msa_copy_u_w((v4i32) in, idx2); \ + out3_m = __msa_copy_u_w((v4i32) in, idx3); \ + SW(out0_m, (pdst)); \ + SW(out1_m, (pdst) + stride); \ + SW(out2_m, (pdst) + 2*stride); \ + SW(out3_m, (pdst) + 3*stride); \ +} +#define ST_W8(in0, in1, idx0, idx1, idx2, idx3, \ + idx4, idx5, idx6, idx7, pdst, stride) \ +{ \ + ST_W4(in0, idx0, idx1, idx2, idx3, pdst, stride) \ + ST_W4(in1, idx4, idx5, idx6, idx7, pdst + 4*stride, stride) \ +} + +/* Description : Store double word elements of vector with stride + * Arguments : Inputs - in source vector + * - pdst (destination pointer to store to) + * - stride + * Details : Stores double word 'idx0' from 'in' to (pdst) + * Stores double word 'idx1' from 'in' to (pdst + stride) + * Similar for other elements + */ +#define ST_D1(in, idx, pdst) \ +{ \ + uint64_t out0_m; \ + out0_m = __msa_copy_u_d((v2i64) in, idx); \ + SD(out0_m, (pdst)); \ +} +#define ST_D2(in, idx0, idx1, pdst, stride) \ +{ \ + uint64_t out0_m, out1_m; \ + out0_m = __msa_copy_u_d((v2i64) in, idx0); \ + out1_m = __msa_copy_u_d((v2i64) in, idx1); \ + SD(out0_m, (pdst)); \ + SD(out1_m, (pdst) + stride); \ +} +#define ST_D4(in0, in1, idx0, idx1, idx2, idx3, pdst, stride) \ +{ \ + uint64_t out0_m, out1_m, out2_m, out3_m; \ + out0_m = __msa_copy_u_d((v2i64) in0, idx0); \ + out1_m = __msa_copy_u_d((v2i64) in0, idx1); \ + out2_m = __msa_copy_u_d((v2i64) in1, idx2); \ + out3_m = __msa_copy_u_d((v2i64) in1, idx3); \ + SD(out0_m, (pdst)); \ + SD(out1_m, (pdst) + stride); \ + SD(out2_m, (pdst) + 2 * stride); \ + SD(out3_m, (pdst) + 3 * stride); \ +} +#define ST_D8(in0, in1, in2, in3, idx0, idx1, idx2, idx3, \ + idx4, idx5, idx6, idx7, pdst, stride) \ +{ \ + ST_D4(in0, in1, idx0, idx1, idx2, idx3, pdst, stride) \ + ST_D4(in2, in3, idx4, idx5, idx6, idx7, pdst + 4 * stride, stride) \ +} + +/* Description : Store as 12x8 byte block to destination memory from + input vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Index 0 double word element from input vector 'in0' is copied + and stored to destination memory at (pblk_12x8_m) followed by + index 2 word element from same input vector 'in0' at + (pblk_12x8_m + 8) + Similar to remaining lines +*/ +#define ST12x8_UB(in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + uint64_t out0_m, out1_m, out2_m, out3_m; \ + uint64_t out4_m, out5_m, out6_m, out7_m; \ + uint32_t out8_m, out9_m, out10_m, out11_m; \ + uint32_t out12_m, out13_m, out14_m, out15_m; \ + uint8_t *pblk_12x8_m = (uint8_t *) (pdst); \ + \ + out0_m = __msa_copy_u_d((v2i64) in0, 0); \ + out1_m = __msa_copy_u_d((v2i64) in1, 0); \ + out2_m = __msa_copy_u_d((v2i64) in2, 0); \ + out3_m = __msa_copy_u_d((v2i64) in3, 0); \ + out4_m = __msa_copy_u_d((v2i64) in4, 0); \ + out5_m = __msa_copy_u_d((v2i64) in5, 0); \ + out6_m = __msa_copy_u_d((v2i64) in6, 0); \ + out7_m = __msa_copy_u_d((v2i64) in7, 0); \ + \ + out8_m = __msa_copy_u_w((v4i32) in0, 2); \ + out9_m = __msa_copy_u_w((v4i32) in1, 2); \ + out10_m = __msa_copy_u_w((v4i32) in2, 2); \ + out11_m = __msa_copy_u_w((v4i32) in3, 2); \ + out12_m = __msa_copy_u_w((v4i32) in4, 2); \ + out13_m = __msa_copy_u_w((v4i32) in5, 2); \ + out14_m = __msa_copy_u_w((v4i32) in6, 2); \ + out15_m = __msa_copy_u_w((v4i32) in7, 2); \ + \ + SD(out0_m, pblk_12x8_m); \ + SW(out8_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out1_m, pblk_12x8_m); \ + SW(out9_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out2_m, pblk_12x8_m); \ + SW(out10_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out3_m, pblk_12x8_m); \ + SW(out11_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out4_m, pblk_12x8_m); \ + SW(out12_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out5_m, pblk_12x8_m); \ + SW(out13_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out6_m, pblk_12x8_m); \ + SW(out14_m, pblk_12x8_m + 8); \ + pblk_12x8_m += stride; \ + SD(out7_m, pblk_12x8_m); \ + SW(out15_m, pblk_12x8_m + 8); \ +} + +/* Description : average with rounding (in0 + in1 + 1) / 2. + Arguments : Inputs - in0, in1, in2, in3, + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Each byte element from 'in0' vector is added with each byte + element from 'in1' vector. The addition of the elements plus 1 + (for rounding) is done unsigned with full precision, + i.e. the result has one extra bit. Unsigned division by 2 + (or logical shift right by one bit) is performed before writing + the result to vector 'out0' + Similar for the pair of 'in2' and 'in3' +*/ +#define AVER_UB2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_aver_u_b((v16u8) in0, (v16u8) in1); \ + out1 = (RTYPE) __msa_aver_u_b((v16u8) in2, (v16u8) in3); \ +} +#define AVER_UB2_UB(...) AVER_UB2(v16u8, __VA_ARGS__) + +#define AVER_UB4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + AVER_UB2(RTYPE, in0, in1, in2, in3, out0, out1) \ + AVER_UB2(RTYPE, in4, in5, in6, in7, out2, out3) \ +} +#define AVER_UB4_UB(...) AVER_UB4(v16u8, __VA_ARGS__) + +/* Description : Immediate number of columns to slide + Arguments : Inputs - s, d, slide_val + Outputs - out + Return Type - as per RTYPE + Details : Byte elements from 'd' vector are slide into 's' by + number of elements specified by 'slide_val' +*/ +#define SLDI_B(RTYPE, d, s, slide_val, out) \ +{ \ + out = (RTYPE) __msa_sldi_b((v16i8) d, (v16i8) s, slide_val); \ +} + +#define SLDI_B2(RTYPE, d0, s0, d1, s1, slide_val, out0, out1) \ +{ \ + SLDI_B(RTYPE, d0, s0, slide_val, out0) \ + SLDI_B(RTYPE, d1, s1, slide_val, out1) \ +} +#define SLDI_B2_UB(...) SLDI_B2(v16u8, __VA_ARGS__) +#define SLDI_B2_SB(...) SLDI_B2(v16i8, __VA_ARGS__) +#define SLDI_B2_SH(...) SLDI_B2(v8i16, __VA_ARGS__) +#define SLDI_B2_SW(...) SLDI_B2(v4i32, __VA_ARGS__) + +#define SLDI_B3(RTYPE, d0, s0, d1, s1, d2, s2, slide_val, \ + out0, out1, out2) \ +{ \ + SLDI_B2(RTYPE, d0, s0, d1, s1, slide_val, out0, out1) \ + SLDI_B(RTYPE, d2, s2, slide_val, out2) \ +} +#define SLDI_B3_UB(...) SLDI_B3(v16u8, __VA_ARGS__) +#define SLDI_B3_SB(...) SLDI_B3(v16i8, __VA_ARGS__) +#define SLDI_B3_UH(...) SLDI_B3(v8u16, __VA_ARGS__) + +#define SLDI_B4(RTYPE, d0, s0, d1, s1, d2, s2, d3, s3, \ + slide_val, out0, out1, out2, out3) \ +{ \ + SLDI_B2(RTYPE, d0, s0, d1, s1, slide_val, out0, out1) \ + SLDI_B2(RTYPE, d2, s2, d3, s3, slide_val, out2, out3) \ +} +#define SLDI_B4_UB(...) SLDI_B4(v16u8, __VA_ARGS__) +#define SLDI_B4_SB(...) SLDI_B4(v16i8, __VA_ARGS__) +#define SLDI_B4_SH(...) SLDI_B4(v8i16, __VA_ARGS__) + +/* Description : Shuffle byte vector elements as per mask vector + Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Selective byte elements from in0 & in1 are copied to out0 as + per control vector mask0 + Selective byte elements from in2 & in3 are copied to out1 as + per control vector mask1 +*/ +#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_vshf_b((v16i8) mask0, (v16i8) in1, (v16i8) in0); \ + out1 = (RTYPE) __msa_vshf_b((v16i8) mask1, (v16i8) in3, (v16i8) in2); \ +} +#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) +#define VSHF_B2_SB(...) VSHF_B2(v16i8, __VA_ARGS__) +#define VSHF_B2_UH(...) VSHF_B2(v8u16, __VA_ARGS__) +#define VSHF_B2_SH(...) VSHF_B2(v8i16, __VA_ARGS__) + +#define VSHF_B3(RTYPE, in0, in1, in2, in3, in4, in5, mask0, mask1, mask2, \ + out0, out1, out2) \ +{ \ + VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1); \ + out2 = (RTYPE) __msa_vshf_b((v16i8) mask2, (v16i8) in5, (v16i8) in4); \ +} +#define VSHF_B3_SB(...) VSHF_B3(v16i8, __VA_ARGS__) + +#define VSHF_B4(RTYPE, in0, in1, mask0, mask1, mask2, mask3, \ + out0, out1, out2, out3) \ +{ \ + VSHF_B2(RTYPE, in0, in1, in0, in1, mask0, mask1, out0, out1); \ + VSHF_B2(RTYPE, in0, in1, in0, in1, mask2, mask3, out2, out3); \ +} +#define VSHF_B4_SB(...) VSHF_B4(v16i8, __VA_ARGS__) +#define VSHF_B4_SH(...) VSHF_B4(v8i16, __VA_ARGS__) + +/* Description : Shuffle halfword vector elements as per mask vector + Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Selective halfword elements from in0 & in1 are copied to out0 + as per control vector mask0 + Selective halfword elements from in2 & in3 are copied to out1 + as per control vector mask1 +*/ +#define VSHF_H2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_vshf_h((v8i16) mask0, (v8i16) in1, (v8i16) in0); \ + out1 = (RTYPE) __msa_vshf_h((v8i16) mask1, (v8i16) in3, (v8i16) in2); \ +} +#define VSHF_H2_SH(...) VSHF_H2(v8i16, __VA_ARGS__) + +#define VSHF_H3(RTYPE, in0, in1, in2, in3, in4, in5, mask0, mask1, mask2, \ + out0, out1, out2) \ +{ \ + VSHF_H2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1); \ + out2 = (RTYPE) __msa_vshf_h((v8i16) mask2, (v8i16) in5, (v8i16) in4); \ +} +#define VSHF_H3_SH(...) VSHF_H3(v8i16, __VA_ARGS__) + +/* Description : Shuffle byte vector elements as per mask vector + Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Selective byte elements from in0 & in1 are copied to out0 as + per control vector mask0 + Selective byte elements from in2 & in3 are copied to out1 as + per control vector mask1 +*/ +#define VSHF_W2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_vshf_w((v4i32) mask0, (v4i32) in1, (v4i32) in0); \ + out1 = (RTYPE) __msa_vshf_w((v4i32) mask1, (v4i32) in3, (v4i32) in2); \ +} +#define VSHF_W2_SB(...) VSHF_W2(v16i8, __VA_ARGS__) + +/* Description : Dot product of byte vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Unsigned byte elements from mult0 are multiplied with + unsigned byte elements from cnst0 producing a result + twice the size of input i.e. unsigned halfword. + Then this multiplication results of adjacent odd-even elements + are added together and stored to the out vector + (2 unsigned halfword results) +*/ +#define DOTP_UB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dotp_u_h((v16u8) mult0, (v16u8) cnst0); \ + out1 = (RTYPE) __msa_dotp_u_h((v16u8) mult1, (v16u8) cnst1); \ +} +#define DOTP_UB2_UH(...) DOTP_UB2(v8u16, __VA_ARGS__) + +#define DOTP_UB4(RTYPE, mult0, mult1, mult2, mult3, \ + cnst0, cnst1, cnst2, cnst3, \ + out0, out1, out2, out3) \ +{ \ + DOTP_UB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + DOTP_UB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ +} +#define DOTP_UB4_UH(...) DOTP_UB4(v8u16, __VA_ARGS__) + +/* Description : Dot product of byte vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Signed byte elements from mult0 are multiplied with + signed byte elements from cnst0 producing a result + twice the size of input i.e. signed halfword. + Then this multiplication results of adjacent odd-even elements + are added together and stored to the out vector + (2 signed halfword results) +*/ +#define DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dotp_s_h((v16i8) mult0, (v16i8) cnst0); \ + out1 = (RTYPE) __msa_dotp_s_h((v16i8) mult1, (v16i8) cnst1); \ +} +#define DOTP_SB2_SH(...) DOTP_SB2(v8i16, __VA_ARGS__) + +#define DOTP_SB3(RTYPE, mult0, mult1, mult2, cnst0, cnst1, cnst2, \ + out0, out1, out2) \ +{ \ + DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + out2 = (RTYPE) __msa_dotp_s_h((v16i8) mult2, (v16i8) cnst2); \ +} +#define DOTP_SB3_SH(...) DOTP_SB3(v8i16, __VA_ARGS__) + +#define DOTP_SB4(RTYPE, mult0, mult1, mult2, mult3, \ + cnst0, cnst1, cnst2, cnst3, out0, out1, out2, out3) \ +{ \ + DOTP_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + DOTP_SB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ +} +#define DOTP_SB4_SH(...) DOTP_SB4(v8i16, __VA_ARGS__) + +/* Description : Dot product of halfword vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Signed halfword elements from mult0 are multiplied with + signed halfword elements from cnst0 producing a result + twice the size of input i.e. signed word. + Then this multiplication results of adjacent odd-even elements + are added together and stored to the out vector + (2 signed word results) +*/ +#define DOTP_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dotp_s_w((v8i16) mult0, (v8i16) cnst0); \ + out1 = (RTYPE) __msa_dotp_s_w((v8i16) mult1, (v8i16) cnst1); \ +} +#define DOTP_SH2_SW(...) DOTP_SH2(v4i32, __VA_ARGS__) + +#define DOTP_SH4(RTYPE, mult0, mult1, mult2, mult3, \ + cnst0, cnst1, cnst2, cnst3, \ + out0, out1, out2, out3) \ +{ \ + DOTP_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + DOTP_SH2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ +} +#define DOTP_SH4_SW(...) DOTP_SH4(v4i32, __VA_ARGS__) + +/* Description : Dot product & addition of byte vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Signed byte elements from mult0 are multiplied with + signed byte elements from cnst0 producing a result + twice the size of input i.e. signed halfword. + Then this multiplication results of adjacent odd-even elements + are added to the out vector + (2 signed halfword results) +*/ +#define DPADD_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dpadd_s_h((v8i16) out0, \ + (v16i8) mult0, (v16i8) cnst0); \ + out1 = (RTYPE) __msa_dpadd_s_h((v8i16) out1, \ + (v16i8) mult1, (v16i8) cnst1); \ +} +#define DPADD_SB2_SH(...) DPADD_SB2(v8i16, __VA_ARGS__) + +#define DPADD_SB4(RTYPE, mult0, mult1, mult2, mult3, \ + cnst0, cnst1, cnst2, cnst3, out0, out1, out2, out3) \ +{ \ + DPADD_SB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + DPADD_SB2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ +} +#define DPADD_SB4_SH(...) DPADD_SB4(v8i16, __VA_ARGS__) + +/* Description : Dot product & addition of byte vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Unsigned byte elements from mult0 are multiplied with + unsigned byte elements from cnst0 producing a result + twice the size of input i.e. unsigned halfword. + Then this multiplication results of adjacent odd-even elements + are added to the out vector + (2 unsigned halfword results) +*/ +#define DPADD_UB2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dpadd_u_h((v8u16) out0, \ + (v16u8) mult0, (v16u8) cnst0); \ + out1 = (RTYPE) __msa_dpadd_u_h((v8u16) out1, \ + (v16u8) mult1, (v16u8) cnst1); \ +} +#define DPADD_UB2_UH(...) DPADD_UB2(v8u16, __VA_ARGS__) + +/* Description : Dot product & addition of halfword vector elements + Arguments : Inputs - mult0, mult1 + cnst0, cnst1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Signed halfword elements from mult0 are multiplied with + signed halfword elements from cnst0 producing a result + twice the size of input i.e. signed word. + Then this multiplication results of adjacent odd-even elements + are added to the out vector + (2 signed word results) +*/ +#define DPADD_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_dpadd_s_w((v4i32) out0, \ + (v8i16) mult0, (v8i16) cnst0); \ + out1 = (RTYPE) __msa_dpadd_s_w((v4i32) out1, \ + (v8i16) mult1, (v8i16) cnst1); \ +} +#define DPADD_SH2_SW(...) DPADD_SH2(v4i32, __VA_ARGS__) + +#define DPADD_SH4(RTYPE, mult0, mult1, mult2, mult3, \ + cnst0, cnst1, cnst2, cnst3, out0, out1, out2, out3) \ +{ \ + DPADD_SH2(RTYPE, mult0, mult1, cnst0, cnst1, out0, out1); \ + DPADD_SH2(RTYPE, mult2, mult3, cnst2, cnst3, out2, out3); \ +} +#define DPADD_SH4_SW(...) DPADD_SH4(v4i32, __VA_ARGS__) + +/* Description : Minimum values between unsigned elements of + either vector are copied to the output vector + Arguments : Inputs - in0, in1, min_vec + Outputs - in0, in1, (in place) + Return Type - as per RTYPE + Details : Minimum of unsigned halfword element values from 'in0' and + 'min_value' are written to output vector 'in0' +*/ +#define MIN_UH2(RTYPE, in0, in1, min_vec) \ +{ \ + in0 = (RTYPE) __msa_min_u_h((v8u16) in0, min_vec); \ + in1 = (RTYPE) __msa_min_u_h((v8u16) in1, min_vec); \ +} +#define MIN_UH2_UH(...) MIN_UH2(v8u16, __VA_ARGS__) + +#define MIN_UH4(RTYPE, in0, in1, in2, in3, min_vec) \ +{ \ + MIN_UH2(RTYPE, in0, in1, min_vec); \ + MIN_UH2(RTYPE, in2, in3, min_vec); \ +} +#define MIN_UH4_UH(...) MIN_UH4(v8u16, __VA_ARGS__) + +/* Description : Clips all halfword elements of input vector between min & max + out = ((in) < (min)) ? (min) : (((in) > (max)) ? (max) : (in)) + Arguments : Inputs - in (input vector) + - min (min threshold) + - max (max threshold) + Outputs - in (output vector with clipped elements) + Return Type - signed halfword +*/ +#define CLIP_SH(in, min, max) \ +{ \ + in = __msa_max_s_h((v8i16) min, (v8i16) in); \ + in = __msa_min_s_h((v8i16) max, (v8i16) in); \ +} + +/* Description : Clips all signed halfword elements of input vector + between 0 & 255 + Arguments : Inputs - in (input vector) + Outputs - in (output vector with clipped elements) + Return Type - signed halfwords +*/ +#define CLIP_SH_0_255(in) \ +{ \ + in = __msa_maxi_s_h((v8i16) in, 0); \ + in = (v8i16) __msa_sat_u_h((v8u16) in, 7); \ +} + +#define CLIP_SH2_0_255(in0, in1) \ +{ \ + CLIP_SH_0_255(in0); \ + CLIP_SH_0_255(in1); \ +} + +#define CLIP_SH4_0_255(in0, in1, in2, in3) \ +{ \ + CLIP_SH2_0_255(in0, in1); \ + CLIP_SH2_0_255(in2, in3); \ +} + +#define CLIP_SH8_0_255(in0, in1, in2, in3, \ + in4, in5, in6, in7) \ +{ \ + CLIP_SH4_0_255(in0, in1, in2, in3); \ + CLIP_SH4_0_255(in4, in5, in6, in7); \ +} + +/* Description : Clips all signed word elements of input vector + between 0 & 255 + Arguments : Inputs - in (input vector) + Outputs - in (output vector with clipped elements) + Return Type - signed word +*/ +#define CLIP_SW_0_255(in) \ +{ \ + in = __msa_maxi_s_w((v4i32) in, 0); \ + in = (v4i32) __msa_sat_u_w((v4u32) in, 7); \ +} + +#define CLIP_SW2_0_255(in0, in1) \ +{ \ + CLIP_SW_0_255(in0); \ + CLIP_SW_0_255(in1); \ +} + +#define CLIP_SW4_0_255(in0, in1, in2, in3) \ +{ \ + CLIP_SW2_0_255(in0, in1); \ + CLIP_SW2_0_255(in2, in3); \ +} + +#define CLIP_SW8_0_255(in0, in1, in2, in3, \ + in4, in5, in6, in7) \ +{ \ + CLIP_SW4_0_255(in0, in1, in2, in3); \ + CLIP_SW4_0_255(in4, in5, in6, in7); \ +} + +/* Description : Addition of 4 signed word elements + 4 signed word elements of input vector are added together and + resulted integer sum is returned + Arguments : Inputs - in (signed word vector) + Outputs - sum_m (i32 sum) + Return Type - signed word +*/ +#define HADD_SW_S32(in) \ +( { \ + v2i64 res0_m, res1_m; \ + int32_t sum_m; \ + \ + res0_m = __msa_hadd_s_d((v4i32) in, (v4i32) in); \ + res1_m = __msa_splati_d(res0_m, 1); \ + res0_m += res1_m; \ + sum_m = __msa_copy_s_w((v4i32) res0_m, 0); \ + sum_m; \ +} ) + +/* Description : Addition of 8 unsigned halfword elements + 8 unsigned halfword elements of input vector are added + together and resulted integer sum is returned + Arguments : Inputs - in (unsigned halfword vector) + Outputs - sum_m (u32 sum) + Return Type - unsigned word +*/ +#define HADD_UH_U32(in) \ +( { \ + v4u32 res_m; \ + v2u64 res0_m, res1_m; \ + uint32_t sum_m; \ + \ + res_m = __msa_hadd_u_w((v8u16) in, (v8u16) in); \ + res0_m = __msa_hadd_u_d(res_m, res_m); \ + res1_m = (v2u64) __msa_splati_d((v2i64) res0_m, 1); \ + res0_m += res1_m; \ + sum_m = __msa_copy_u_w((v4i32) res0_m, 0); \ + sum_m; \ +} ) + +/* Description : Horizontal addition of signed byte vector elements + Arguments : Inputs - in0, in1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Each signed odd byte element from 'in0' is added to + even signed byte element from 'in0' (pairwise) and the + halfword result is stored in 'out0' +*/ +#define HADD_SB2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_hadd_s_h((v16i8) in0, (v16i8) in0); \ + out1 = (RTYPE) __msa_hadd_s_h((v16i8) in1, (v16i8) in1); \ +} +#define HADD_SB2_SH(...) HADD_SB2(v8i16, __VA_ARGS__) + +#define HADD_SB4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + HADD_SB2(RTYPE, in0, in1, out0, out1); \ + HADD_SB2(RTYPE, in2, in3, out2, out3); \ +} +#define HADD_SB4_UH(...) HADD_SB4(v8u16, __VA_ARGS__) +#define HADD_SB4_SH(...) HADD_SB4(v8i16, __VA_ARGS__) + +/* Description : Horizontal addition of unsigned byte vector elements + Arguments : Inputs - in0, in1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Each unsigned odd byte element from 'in0' is added to + even unsigned byte element from 'in0' (pairwise) and the + halfword result is stored in 'out0' +*/ +#define HADD_UB2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_hadd_u_h((v16u8) in0, (v16u8) in0); \ + out1 = (RTYPE) __msa_hadd_u_h((v16u8) in1, (v16u8) in1); \ +} +#define HADD_UB2_UH(...) HADD_UB2(v8u16, __VA_ARGS__) + +#define HADD_UB3(RTYPE, in0, in1, in2, out0, out1, out2) \ +{ \ + HADD_UB2(RTYPE, in0, in1, out0, out1); \ + out2 = (RTYPE) __msa_hadd_u_h((v16u8) in2, (v16u8) in2); \ +} +#define HADD_UB3_UH(...) HADD_UB3(v8u16, __VA_ARGS__) + +#define HADD_UB4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + HADD_UB2(RTYPE, in0, in1, out0, out1); \ + HADD_UB2(RTYPE, in2, in3, out2, out3); \ +} +#define HADD_UB4_UB(...) HADD_UB4(v16u8, __VA_ARGS__) +#define HADD_UB4_UH(...) HADD_UB4(v8u16, __VA_ARGS__) +#define HADD_UB4_SH(...) HADD_UB4(v8i16, __VA_ARGS__) + +/* Description : Horizontal subtraction of unsigned byte vector elements + Arguments : Inputs - in0, in1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Each unsigned odd byte element from 'in0' is subtracted from + even unsigned byte element from 'in0' (pairwise) and the + halfword result is stored in 'out0' +*/ +#define HSUB_UB2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_hsub_u_h((v16u8) in0, (v16u8) in0); \ + out1 = (RTYPE) __msa_hsub_u_h((v16u8) in1, (v16u8) in1); \ +} +#define HSUB_UB2_UH(...) HSUB_UB2(v8u16, __VA_ARGS__) +#define HSUB_UB2_SH(...) HSUB_UB2(v8i16, __VA_ARGS__) + +#define HSUB_UB4(RTYPE, in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + HSUB_UB2(RTYPE, in0, in1, out0, out1); \ + HSUB_UB2(RTYPE, in2, in3, out2, out3); \ +} +#define HSUB_UB4_UH(...) HSUB_UB4(v8u16, __VA_ARGS__) +#define HSUB_UB4_SH(...) HSUB_UB4(v8i16, __VA_ARGS__) + +/* Description : SAD (Sum of Absolute Difference) + Arguments : Inputs - in0, in1, ref0, ref1 (unsigned byte src & ref) + Outputs - sad_m (halfword vector with sad) + Return Type - unsigned halfword + Details : Absolute difference of all the byte elements from 'in0' with + 'ref0' is calculated and preserved in 'diff0'. From the 16 + unsigned absolute diff values, even-odd pairs are added + together to generate 8 halfword results. +*/ +#if HAVE_MSA2 +#define SAD_UB2_UH(in0, in1, ref0, ref1) \ +( { \ + v8u16 sad_m = { 0 }; \ + sad_m += __builtin_msa2_sad_adj2_u_w2x_b((v16u8) in0, (v16u8) ref0); \ + sad_m += __builtin_msa2_sad_adj2_u_w2x_b((v16u8) in1, (v16u8) ref1); \ + sad_m; \ +} ) +#else +#define SAD_UB2_UH(in0, in1, ref0, ref1) \ +( { \ + v16u8 diff0_m, diff1_m; \ + v8u16 sad_m = { 0 }; \ + \ + diff0_m = __msa_asub_u_b((v16u8) in0, (v16u8) ref0); \ + diff1_m = __msa_asub_u_b((v16u8) in1, (v16u8) ref1); \ + \ + sad_m += __msa_hadd_u_h((v16u8) diff0_m, (v16u8) diff0_m); \ + sad_m += __msa_hadd_u_h((v16u8) diff1_m, (v16u8) diff1_m); \ + \ + sad_m; \ +} ) +#endif // #if HAVE_MSA2 + +/* Description : Insert specified word elements from input vectors to 1 + destination vector + Arguments : Inputs - in0, in1, in2, in3 (4 input vectors) + Outputs - out (output vector) + Return Type - as per RTYPE +*/ +#define INSERT_W2(RTYPE, in0, in1, out) \ +{ \ + out = (RTYPE) __msa_insert_w((v4i32) out, 0, in0); \ + out = (RTYPE) __msa_insert_w((v4i32) out, 1, in1); \ +} +#define INSERT_W2_UB(...) INSERT_W2(v16u8, __VA_ARGS__) +#define INSERT_W2_SB(...) INSERT_W2(v16i8, __VA_ARGS__) + +#define INSERT_W4(RTYPE, in0, in1, in2, in3, out) \ +{ \ + out = (RTYPE) __msa_insert_w((v4i32) out, 0, in0); \ + out = (RTYPE) __msa_insert_w((v4i32) out, 1, in1); \ + out = (RTYPE) __msa_insert_w((v4i32) out, 2, in2); \ + out = (RTYPE) __msa_insert_w((v4i32) out, 3, in3); \ +} +#define INSERT_W4_UB(...) INSERT_W4(v16u8, __VA_ARGS__) +#define INSERT_W4_SB(...) INSERT_W4(v16i8, __VA_ARGS__) +#define INSERT_W4_SH(...) INSERT_W4(v8i16, __VA_ARGS__) +#define INSERT_W4_SW(...) INSERT_W4(v4i32, __VA_ARGS__) + +/* Description : Insert specified double word elements from input vectors to 1 + destination vector + Arguments : Inputs - in0, in1 (2 input vectors) + Outputs - out (output vector) + Return Type - as per RTYPE +*/ +#define INSERT_D2(RTYPE, in0, in1, out) \ +{ \ + out = (RTYPE) __msa_insert_d((v2i64) out, 0, in0); \ + out = (RTYPE) __msa_insert_d((v2i64) out, 1, in1); \ +} +#define INSERT_D2_UB(...) INSERT_D2(v16u8, __VA_ARGS__) +#define INSERT_D2_SB(...) INSERT_D2(v16i8, __VA_ARGS__) +#define INSERT_D2_SH(...) INSERT_D2(v8i16, __VA_ARGS__) +#define INSERT_D2_SD(...) INSERT_D2(v2i64, __VA_ARGS__) + +/* Description : Interleave even byte elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even byte elements of 'in0' and even byte + elements of 'in1' are interleaved and copied to 'out0' + Even byte elements of 'in2' and even byte + elements of 'in3' are interleaved and copied to 'out1' +*/ +#define ILVEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvev_b((v16i8) in1, (v16i8) in0); \ + out1 = (RTYPE) __msa_ilvev_b((v16i8) in3, (v16i8) in2); \ +} +#define ILVEV_B2_UB(...) ILVEV_B2(v16u8, __VA_ARGS__) +#define ILVEV_B2_SB(...) ILVEV_B2(v16i8, __VA_ARGS__) +#define ILVEV_B2_SH(...) ILVEV_B2(v8i16, __VA_ARGS__) +#define ILVEV_B2_SD(...) ILVEV_B2(v2i64, __VA_ARGS__) + +/* Description : Interleave even halfword elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even halfword elements of 'in0' and even halfword + elements of 'in1' are interleaved and copied to 'out0' + Even halfword elements of 'in2' and even halfword + elements of 'in3' are interleaved and copied to 'out1' +*/ +#define ILVEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvev_h((v8i16) in1, (v8i16) in0); \ + out1 = (RTYPE) __msa_ilvev_h((v8i16) in3, (v8i16) in2); \ +} +#define ILVEV_H2_UB(...) ILVEV_H2(v16u8, __VA_ARGS__) +#define ILVEV_H2_SH(...) ILVEV_H2(v8i16, __VA_ARGS__) +#define ILVEV_H2_SW(...) ILVEV_H2(v4i32, __VA_ARGS__) + +/* Description : Interleave even word elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even word elements of 'in0' and even word + elements of 'in1' are interleaved and copied to 'out0' + Even word elements of 'in2' and even word + elements of 'in3' are interleaved and copied to 'out1' +*/ +#define ILVEV_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvev_w((v4i32) in1, (v4i32) in0); \ + out1 = (RTYPE) __msa_ilvev_w((v4i32) in3, (v4i32) in2); \ +} +#define ILVEV_W2_UB(...) ILVEV_W2(v16u8, __VA_ARGS__) +#define ILVEV_W2_SB(...) ILVEV_W2(v16i8, __VA_ARGS__) +#define ILVEV_W2_UH(...) ILVEV_W2(v8u16, __VA_ARGS__) +#define ILVEV_W2_SD(...) ILVEV_W2(v2i64, __VA_ARGS__) + +/* Description : Interleave even double word elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even double word elements of 'in0' and even double word + elements of 'in1' are interleaved and copied to 'out0' + Even double word elements of 'in2' and even double word + elements of 'in3' are interleaved and copied to 'out1' +*/ +#define ILVEV_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvev_d((v2i64) in1, (v2i64) in0); \ + out1 = (RTYPE) __msa_ilvev_d((v2i64) in3, (v2i64) in2); \ +} +#define ILVEV_D2_UB(...) ILVEV_D2(v16u8, __VA_ARGS__) +#define ILVEV_D2_SB(...) ILVEV_D2(v16i8, __VA_ARGS__) +#define ILVEV_D2_SW(...) ILVEV_D2(v4i32, __VA_ARGS__) + +/* Description : Interleave left half of byte elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Left half of byte elements of in0 and left half of byte + elements of in1 are interleaved and copied to out0. + Left half of byte elements of in2 and left half of byte + elements of in3 are interleaved and copied to out1. +*/ +#define ILVL_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvl_b((v16i8) in0, (v16i8) in1); \ + out1 = (RTYPE) __msa_ilvl_b((v16i8) in2, (v16i8) in3); \ +} +#define ILVL_B2_UB(...) ILVL_B2(v16u8, __VA_ARGS__) +#define ILVL_B2_SB(...) ILVL_B2(v16i8, __VA_ARGS__) +#define ILVL_B2_UH(...) ILVL_B2(v8u16, __VA_ARGS__) +#define ILVL_B2_SH(...) ILVL_B2(v8i16, __VA_ARGS__) + +#define ILVL_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVL_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVL_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVL_B4_UB(...) ILVL_B4(v16u8, __VA_ARGS__) +#define ILVL_B4_SB(...) ILVL_B4(v16i8, __VA_ARGS__) +#define ILVL_B4_UH(...) ILVL_B4(v8u16, __VA_ARGS__) +#define ILVL_B4_SH(...) ILVL_B4(v8i16, __VA_ARGS__) + +/* Description : Interleave left half of halfword elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Left half of halfword elements of in0 and left half of halfword + elements of in1 are interleaved and copied to out0. + Left half of halfword elements of in2 and left half of halfword + elements of in3 are interleaved and copied to out1. +*/ +#define ILVL_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvl_h((v8i16) in0, (v8i16) in1); \ + out1 = (RTYPE) __msa_ilvl_h((v8i16) in2, (v8i16) in3); \ +} +#define ILVL_H2_SH(...) ILVL_H2(v8i16, __VA_ARGS__) +#define ILVL_H2_SW(...) ILVL_H2(v4i32, __VA_ARGS__) + +#define ILVL_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVL_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVL_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVL_H4_SH(...) ILVL_H4(v8i16, __VA_ARGS__) +#define ILVL_H4_SW(...) ILVL_H4(v4i32, __VA_ARGS__) + +/* Description : Interleave left half of word elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Left half of word elements of in0 and left half of word + elements of in1 are interleaved and copied to out0. + Left half of word elements of in2 and left half of word + elements of in3 are interleaved and copied to out1. +*/ +#define ILVL_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvl_w((v4i32) in0, (v4i32) in1); \ + out1 = (RTYPE) __msa_ilvl_w((v4i32) in2, (v4i32) in3); \ +} +#define ILVL_W2_UB(...) ILVL_W2(v16u8, __VA_ARGS__) +#define ILVL_W2_SB(...) ILVL_W2(v16i8, __VA_ARGS__) +#define ILVL_W2_SH(...) ILVL_W2(v8i16, __VA_ARGS__) + +/* Description : Interleave right half of byte elements from vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 + Outputs - out0, out1, out2, out3 + Return Type - as per RTYPE + Details : Right half of byte elements of in0 and right half of byte + elements of in1 are interleaved and copied to out0. + Right half of byte elements of in2 and right half of byte + elements of in3 are interleaved and copied to out1. + Similar for other pairs +*/ +#define ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_b((v16i8) in0, (v16i8) in1); \ + out1 = (RTYPE) __msa_ilvr_b((v16i8) in2, (v16i8) in3); \ +} +#define ILVR_B2_UB(...) ILVR_B2(v16u8, __VA_ARGS__) +#define ILVR_B2_SB(...) ILVR_B2(v16i8, __VA_ARGS__) +#define ILVR_B2_UH(...) ILVR_B2(v8u16, __VA_ARGS__) +#define ILVR_B2_SH(...) ILVR_B2(v8i16, __VA_ARGS__) +#define ILVR_B2_SW(...) ILVR_B2(v4i32, __VA_ARGS__) + +#define ILVR_B3(RTYPE, in0, in1, in2, in3, in4, in5, out0, out1, out2) \ +{ \ + ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ + out2 = (RTYPE) __msa_ilvr_b((v16i8) in4, (v16i8) in5); \ +} +#define ILVR_B3_UB(...) ILVR_B3(v16u8, __VA_ARGS__) +#define ILVR_B3_SB(...) ILVR_B3(v16i8, __VA_ARGS__) +#define ILVR_B3_UH(...) ILVR_B3(v8u16, __VA_ARGS__) +#define ILVR_B3_SH(...) ILVR_B3(v8i16, __VA_ARGS__) + +#define ILVR_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVR_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVR_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVR_B4_UB(...) ILVR_B4(v16u8, __VA_ARGS__) +#define ILVR_B4_SB(...) ILVR_B4(v16i8, __VA_ARGS__) +#define ILVR_B4_UH(...) ILVR_B4(v8u16, __VA_ARGS__) +#define ILVR_B4_SH(...) ILVR_B4(v8i16, __VA_ARGS__) +#define ILVR_B4_SW(...) ILVR_B4(v4i32, __VA_ARGS__) + +#define ILVR_B8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + in8, in9, in10, in11, in12, in13, in14, in15, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + ILVR_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3); \ + ILVR_B4(RTYPE, in8, in9, in10, in11, in12, in13, in14, in15, \ + out4, out5, out6, out7); \ +} +#define ILVR_B8_UH(...) ILVR_B8(v8u16, __VA_ARGS__) +#define ILVR_B8_SW(...) ILVR_B8(v4i32, __VA_ARGS__) + +/* Description : Interleave right half of halfword elements from vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 + Outputs - out0, out1, out2, out3 + Return Type - as per RTYPE + Details : Right half of halfword elements of in0 and right half of + halfword elements of in1 are interleaved and copied to out0. + Right half of halfword elements of in2 and right half of + halfword elements of in3 are interleaved and copied to out1. + Similar for other pairs +*/ +#define ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_h((v8i16) in0, (v8i16) in1); \ + out1 = (RTYPE) __msa_ilvr_h((v8i16) in2, (v8i16) in3); \ +} +#define ILVR_H2_SH(...) ILVR_H2(v8i16, __VA_ARGS__) +#define ILVR_H2_SW(...) ILVR_H2(v4i32, __VA_ARGS__) + +#define ILVR_H3(RTYPE, in0, in1, in2, in3, in4, in5, out0, out1, out2) \ +{ \ + ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ + out2 = (RTYPE) __msa_ilvr_h((v8i16) in4, (v8i16) in5); \ +} +#define ILVR_H3_SH(...) ILVR_H3(v8i16, __VA_ARGS__) + +#define ILVR_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVR_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVR_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVR_H4_SH(...) ILVR_H4(v8i16, __VA_ARGS__) +#define ILVR_H4_SW(...) ILVR_H4(v4i32, __VA_ARGS__) + +#define ILVR_W2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_w((v4i32) in0, (v4i32) in1); \ + out1 = (RTYPE) __msa_ilvr_w((v4i32) in2, (v4i32) in3); \ +} +#define ILVR_W2_UB(...) ILVR_W2(v16u8, __VA_ARGS__) +#define ILVR_W2_SB(...) ILVR_W2(v16i8, __VA_ARGS__) +#define ILVR_W2_SH(...) ILVR_W2(v8i16, __VA_ARGS__) + +#define ILVR_W4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVR_W2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVR_W2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVR_W4_SB(...) ILVR_W4(v16i8, __VA_ARGS__) +#define ILVR_W4_UB(...) ILVR_W4(v16u8, __VA_ARGS__) + +/* Description : Interleave right half of double word elements from vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 + Outputs - out0, out1, out2, out3 + Return Type - as per RTYPE + Details : Right half of double word elements of in0 and right half of + double word elements of in1 are interleaved and copied to out0. + Right half of double word elements of in2 and right half of + double word elements of in3 are interleaved and copied to out1. +*/ +#define ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_d((v2i64) in0, (v2i64) in1); \ + out1 = (RTYPE) __msa_ilvr_d((v2i64) in2, (v2i64) in3); \ +} +#define ILVR_D2_UB(...) ILVR_D2(v16u8, __VA_ARGS__) +#define ILVR_D2_SB(...) ILVR_D2(v16i8, __VA_ARGS__) +#define ILVR_D2_SH(...) ILVR_D2(v8i16, __VA_ARGS__) + +#define ILVR_D3(RTYPE, in0, in1, in2, in3, in4, in5, out0, out1, out2) \ +{ \ + ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ + out2 = (RTYPE) __msa_ilvr_d((v2i64) in4, (v2i64) in5); \ +} +#define ILVR_D3_SB(...) ILVR_D3(v16i8, __VA_ARGS__) + +#define ILVR_D4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ILVR_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ILVR_D2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ILVR_D4_SB(...) ILVR_D4(v16i8, __VA_ARGS__) +#define ILVR_D4_UB(...) ILVR_D4(v16u8, __VA_ARGS__) + +/* Description : Interleave left half of double word elements from vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Left half of double word elements of in0 and left half of + double word elements of in1 are interleaved and copied to out0. + Left half of double word elements of in2 and left half of + double word elements of in3 are interleaved and copied to out1. +*/ +#define ILVL_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvl_d((v2i64) in0, (v2i64) in1); \ + out1 = (RTYPE) __msa_ilvl_d((v2i64) in2, (v2i64) in3); \ +} +#define ILVL_D2_UB(...) ILVL_D2(v16u8, __VA_ARGS__) +#define ILVL_D2_SB(...) ILVL_D2(v16i8, __VA_ARGS__) +#define ILVL_D2_SH(...) ILVL_D2(v8i16, __VA_ARGS__) + +/* Description : Interleave both left and right half of input vectors + Arguments : Inputs - in0, in1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Right half of byte elements from 'in0' and 'in1' are + interleaved and stored to 'out0' + Left half of byte elements from 'in0' and 'in1' are + interleaved and stored to 'out1' +*/ +#define ILVRL_B2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_b((v16i8) in0, (v16i8) in1); \ + out1 = (RTYPE) __msa_ilvl_b((v16i8) in0, (v16i8) in1); \ +} +#define ILVRL_B2_UB(...) ILVRL_B2(v16u8, __VA_ARGS__) +#define ILVRL_B2_SB(...) ILVRL_B2(v16i8, __VA_ARGS__) +#define ILVRL_B2_UH(...) ILVRL_B2(v8u16, __VA_ARGS__) +#define ILVRL_B2_SH(...) ILVRL_B2(v8i16, __VA_ARGS__) +#define ILVRL_B2_SW(...) ILVRL_B2(v4i32, __VA_ARGS__) + +#define ILVRL_H2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_h((v8i16) in0, (v8i16) in1); \ + out1 = (RTYPE) __msa_ilvl_h((v8i16) in0, (v8i16) in1); \ +} +#define ILVRL_H2_UB(...) ILVRL_H2(v16u8, __VA_ARGS__) +#define ILVRL_H2_SB(...) ILVRL_H2(v16i8, __VA_ARGS__) +#define ILVRL_H2_SH(...) ILVRL_H2(v8i16, __VA_ARGS__) +#define ILVRL_H2_SW(...) ILVRL_H2(v4i32, __VA_ARGS__) + +#define ILVRL_W2(RTYPE, in0, in1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_ilvr_w((v4i32) in0, (v4i32) in1); \ + out1 = (RTYPE) __msa_ilvl_w((v4i32) in0, (v4i32) in1); \ +} +#define ILVRL_W2_UB(...) ILVRL_W2(v16u8, __VA_ARGS__) +#define ILVRL_W2_SH(...) ILVRL_W2(v8i16, __VA_ARGS__) +#define ILVRL_W2_SW(...) ILVRL_W2(v4i32, __VA_ARGS__) + +/* Description : Maximum values between signed elements of vector and + 5-bit signed immediate value are copied to the output vector + Arguments : Inputs - in0, in1, in2, in3, max_val + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Maximum of signed halfword element values from 'in0' and + 'max_val' are written to output vector 'in0' +*/ +#define MAXI_SH2(RTYPE, in0, in1, max_val) \ +{ \ + in0 = (RTYPE) __msa_maxi_s_h((v8i16) in0, max_val); \ + in1 = (RTYPE) __msa_maxi_s_h((v8i16) in1, max_val); \ +} +#define MAXI_SH2_UH(...) MAXI_SH2(v8u16, __VA_ARGS__) +#define MAXI_SH2_SH(...) MAXI_SH2(v8i16, __VA_ARGS__) + +#define MAXI_SH4(RTYPE, in0, in1, in2, in3, max_val) \ +{ \ + MAXI_SH2(RTYPE, in0, in1, max_val); \ + MAXI_SH2(RTYPE, in2, in3, max_val); \ +} +#define MAXI_SH4_UH(...) MAXI_SH4(v8u16, __VA_ARGS__) +#define MAXI_SH4_SH(...) MAXI_SH4(v8i16, __VA_ARGS__) + +#define MAXI_SH8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, max_val) \ +{ \ + MAXI_SH4(RTYPE, in0, in1, in2, in3, max_val); \ + MAXI_SH4(RTYPE, in4, in5, in6, in7, max_val); \ +} +#define MAXI_SH8_UH(...) MAXI_SH8(v8u16, __VA_ARGS__) +#define MAXI_SH8_SH(...) MAXI_SH8(v8i16, __VA_ARGS__) + +/* Description : Saturate the halfword element values to the max + unsigned value of (sat_val+1 bits) + The element data width remains unchanged + Arguments : Inputs - in0, in1, in2, in3, sat_val + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Each unsigned halfword element from 'in0' is saturated to the + value generated with (sat_val+1) bit range + Results are in placed to original vectors +*/ +#define SAT_UH2(RTYPE, in0, in1, sat_val) \ +{ \ + in0 = (RTYPE) __msa_sat_u_h((v8u16) in0, sat_val); \ + in1 = (RTYPE) __msa_sat_u_h((v8u16) in1, sat_val); \ +} +#define SAT_UH2_UH(...) SAT_UH2(v8u16, __VA_ARGS__) +#define SAT_UH2_SH(...) SAT_UH2(v8i16, __VA_ARGS__) + +#define SAT_UH4(RTYPE, in0, in1, in2, in3, sat_val) \ +{ \ + SAT_UH2(RTYPE, in0, in1, sat_val); \ + SAT_UH2(RTYPE, in2, in3, sat_val); \ +} +#define SAT_UH4_UH(...) SAT_UH4(v8u16, __VA_ARGS__) +#define SAT_UH4_SH(...) SAT_UH4(v8i16, __VA_ARGS__) + +#define SAT_UH8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, sat_val) \ +{ \ + SAT_UH4(RTYPE, in0, in1, in2, in3, sat_val); \ + SAT_UH4(RTYPE, in4, in5, in6, in7, sat_val); \ +} +#define SAT_UH8_UH(...) SAT_UH8(v8u16, __VA_ARGS__) +#define SAT_UH8_SH(...) SAT_UH8(v8i16, __VA_ARGS__) + +/* Description : Saturate the halfword element values to the max + unsigned value of (sat_val+1 bits) + The element data width remains unchanged + Arguments : Inputs - in0, in1, in2, in3, sat_val + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Each unsigned halfword element from 'in0' is saturated to the + value generated with (sat_val+1) bit range + Results are in placed to original vectors +*/ +#define SAT_SH2(RTYPE, in0, in1, sat_val) \ +{ \ + in0 = (RTYPE) __msa_sat_s_h((v8i16) in0, sat_val); \ + in1 = (RTYPE) __msa_sat_s_h((v8i16) in1, sat_val); \ +} +#define SAT_SH2_SH(...) SAT_SH2(v8i16, __VA_ARGS__) + +#define SAT_SH3(RTYPE, in0, in1, in2, sat_val) \ +{ \ + SAT_SH2(RTYPE, in0, in1, sat_val); \ + in2 = (RTYPE) __msa_sat_s_h((v8i16) in2, sat_val); \ +} +#define SAT_SH3_SH(...) SAT_SH3(v8i16, __VA_ARGS__) + +#define SAT_SH4(RTYPE, in0, in1, in2, in3, sat_val) \ +{ \ + SAT_SH2(RTYPE, in0, in1, sat_val); \ + SAT_SH2(RTYPE, in2, in3, sat_val); \ +} +#define SAT_SH4_SH(...) SAT_SH4(v8i16, __VA_ARGS__) + +/* Description : Saturate the word element values to the max + unsigned value of (sat_val+1 bits) + The element data width remains unchanged + Arguments : Inputs - in0, in1, in2, in3, sat_val + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Each unsigned word element from 'in0' is saturated to the + value generated with (sat_val+1) bit range + Results are in placed to original vectors +*/ +#define SAT_SW2(RTYPE, in0, in1, sat_val) \ +{ \ + in0 = (RTYPE) __msa_sat_s_w((v4i32) in0, sat_val); \ + in1 = (RTYPE) __msa_sat_s_w((v4i32) in1, sat_val); \ +} +#define SAT_SW2_SW(...) SAT_SW2(v4i32, __VA_ARGS__) + +#define SAT_SW4(RTYPE, in0, in1, in2, in3, sat_val) \ +{ \ + SAT_SW2(RTYPE, in0, in1, sat_val); \ + SAT_SW2(RTYPE, in2, in3, sat_val); \ +} +#define SAT_SW4_SW(...) SAT_SW4(v4i32, __VA_ARGS__) + +/* Description : Indexed halfword element values are replicated to all + elements in output vector + Arguments : Inputs - in, idx0, idx1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : 'idx0' element value from 'in' vector is replicated to all + elements in 'out0' vector + Valid index range for halfword operation is 0-7 +*/ +#define SPLATI_H2(RTYPE, in, idx0, idx1, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_splati_h((v8i16) in, idx0); \ + out1 = (RTYPE) __msa_splati_h((v8i16) in, idx1); \ +} +#define SPLATI_H2_SB(...) SPLATI_H2(v16i8, __VA_ARGS__) +#define SPLATI_H2_SH(...) SPLATI_H2(v8i16, __VA_ARGS__) + +#define SPLATI_H3(RTYPE, in, idx0, idx1, idx2, \ + out0, out1, out2) \ +{ \ + SPLATI_H2(RTYPE, in, idx0, idx1, out0, out1); \ + out2 = (RTYPE) __msa_splati_h((v8i16) in, idx2); \ +} +#define SPLATI_H3_SB(...) SPLATI_H3(v16i8, __VA_ARGS__) +#define SPLATI_H3_SH(...) SPLATI_H3(v8i16, __VA_ARGS__) + +#define SPLATI_H4(RTYPE, in, idx0, idx1, idx2, idx3, \ + out0, out1, out2, out3) \ +{ \ + SPLATI_H2(RTYPE, in, idx0, idx1, out0, out1); \ + SPLATI_H2(RTYPE, in, idx2, idx3, out2, out3); \ +} +#define SPLATI_H4_SB(...) SPLATI_H4(v16i8, __VA_ARGS__) +#define SPLATI_H4_SH(...) SPLATI_H4(v8i16, __VA_ARGS__) + +/* Description : Indexed word element values are replicated to all + elements in output vector + Arguments : Inputs - in, stidx + Outputs - out0, out1 + Return Type - as per RTYPE + Details : 'stidx' element value from 'in' vector is replicated to all + elements in 'out0' vector + 'stidx + 1' element value from 'in' vector is replicated to all + elements in 'out1' vector + Valid index range for halfword operation is 0-3 +*/ +#define SPLATI_W2(RTYPE, in, stidx, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_splati_w((v4i32) in, stidx); \ + out1 = (RTYPE) __msa_splati_w((v4i32) in, (stidx+1)); \ +} +#define SPLATI_W2_SH(...) SPLATI_W2(v8i16, __VA_ARGS__) +#define SPLATI_W2_SW(...) SPLATI_W2(v4i32, __VA_ARGS__) + +#define SPLATI_W4(RTYPE, in, out0, out1, out2, out3) \ +{ \ + SPLATI_W2(RTYPE, in, 0, out0, out1); \ + SPLATI_W2(RTYPE, in, 2, out2, out3); \ +} +#define SPLATI_W4_SH(...) SPLATI_W4(v8i16, __VA_ARGS__) +#define SPLATI_W4_SW(...) SPLATI_W4(v4i32, __VA_ARGS__) + +/* Description : Pack even byte elements of vector pairs + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even byte elements of in0 are copied to the left half of + out0 & even byte elements of in1 are copied to the right + half of out0. + Even byte elements of in2 are copied to the left half of + out1 & even byte elements of in3 are copied to the right + half of out1. +*/ +#define PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_pckev_b((v16i8) in0, (v16i8) in1); \ + out1 = (RTYPE) __msa_pckev_b((v16i8) in2, (v16i8) in3); \ +} +#define PCKEV_B2_SB(...) PCKEV_B2(v16i8, __VA_ARGS__) +#define PCKEV_B2_UB(...) PCKEV_B2(v16u8, __VA_ARGS__) +#define PCKEV_B2_SH(...) PCKEV_B2(v8i16, __VA_ARGS__) +#define PCKEV_B2_SW(...) PCKEV_B2(v4i32, __VA_ARGS__) + +#define PCKEV_B3(RTYPE, in0, in1, in2, in3, in4, in5, out0, out1, out2) \ +{ \ + PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ + out2 = (RTYPE) __msa_pckev_b((v16i8) in4, (v16i8) in5); \ +} +#define PCKEV_B3_UB(...) PCKEV_B3(v16u8, __VA_ARGS__) +#define PCKEV_B3_SB(...) PCKEV_B3(v16i8, __VA_ARGS__) + +#define PCKEV_B4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + PCKEV_B2(RTYPE, in0, in1, in2, in3, out0, out1); \ + PCKEV_B2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define PCKEV_B4_SB(...) PCKEV_B4(v16i8, __VA_ARGS__) +#define PCKEV_B4_UB(...) PCKEV_B4(v16u8, __VA_ARGS__) +#define PCKEV_B4_SH(...) PCKEV_B4(v8i16, __VA_ARGS__) +#define PCKEV_B4_SW(...) PCKEV_B4(v4i32, __VA_ARGS__) + +/* Description : Pack even halfword elements of vector pairs + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even halfword elements of in0 are copied to the left half of + out0 & even halfword elements of in1 are copied to the right + half of out0. + Even halfword elements of in2 are copied to the left half of + out1 & even halfword elements of in3 are copied to the right + half of out1. +*/ +#define PCKEV_H2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_pckev_h((v8i16) in0, (v8i16) in1); \ + out1 = (RTYPE) __msa_pckev_h((v8i16) in2, (v8i16) in3); \ +} +#define PCKEV_H2_SH(...) PCKEV_H2(v8i16, __VA_ARGS__) +#define PCKEV_H2_SW(...) PCKEV_H2(v4i32, __VA_ARGS__) + +#define PCKEV_H4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + PCKEV_H2(RTYPE, in0, in1, in2, in3, out0, out1); \ + PCKEV_H2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define PCKEV_H4_SH(...) PCKEV_H4(v8i16, __VA_ARGS__) +#define PCKEV_H4_SW(...) PCKEV_H4(v4i32, __VA_ARGS__) + +/* Description : Pack even double word elements of vector pairs + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Even double elements of in0 are copied to the left half of + out0 & even double elements of in1 are copied to the right + half of out0. + Even double elements of in2 are copied to the left half of + out1 & even double elements of in3 are copied to the right + half of out1. +*/ +#define PCKEV_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_pckev_d((v2i64) in0, (v2i64) in1); \ + out1 = (RTYPE) __msa_pckev_d((v2i64) in2, (v2i64) in3); \ +} +#define PCKEV_D2_UB(...) PCKEV_D2(v16u8, __VA_ARGS__) +#define PCKEV_D2_SB(...) PCKEV_D2(v16i8, __VA_ARGS__) +#define PCKEV_D2_SH(...) PCKEV_D2(v8i16, __VA_ARGS__) + +#define PCKEV_D4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + PCKEV_D2(RTYPE, in0, in1, in2, in3, out0, out1); \ + PCKEV_D2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define PCKEV_D4_UB(...) PCKEV_D4(v16u8, __VA_ARGS__) + +/* Description : Pack odd double word elements of vector pairs + Arguments : Inputs - in0, in1 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : As operation is on same input 'in0' vector, index 1 double word + element is overwritten to index 0 and result is written to out0 + As operation is on same input 'in1' vector, index 1 double word + element is overwritten to index 0 and result is written to out1 +*/ +#define PCKOD_D2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_pckod_d((v2i64) in0, (v2i64) in1); \ + out1 = (RTYPE) __msa_pckod_d((v2i64) in2, (v2i64) in3); \ +} +#define PCKOD_D2_UB(...) PCKOD_D2(v16u8, __VA_ARGS__) +#define PCKOD_D2_SH(...) PCKOD_D2(v8i16, __VA_ARGS__) +#define PCKOD_D2_SD(...) PCKOD_D2(v2i64, __VA_ARGS__) + +/* Description : Each byte element is logically xor'ed with immediate 128 + Arguments : Inputs - in0, in1 + Outputs - in0, in1 (in-place) + Return Type - as per RTYPE + Details : Each unsigned byte element from input vector 'in0' is + logically xor'ed with 128 and result is in-place stored in + 'in0' vector + Each unsigned byte element from input vector 'in1' is + logically xor'ed with 128 and result is in-place stored in + 'in1' vector + Similar for other pairs +*/ +#define XORI_B2_128(RTYPE, in0, in1) \ +{ \ + in0 = (RTYPE) __msa_xori_b((v16u8) in0, 128); \ + in1 = (RTYPE) __msa_xori_b((v16u8) in1, 128); \ +} +#define XORI_B2_128_UB(...) XORI_B2_128(v16u8, __VA_ARGS__) +#define XORI_B2_128_SB(...) XORI_B2_128(v16i8, __VA_ARGS__) +#define XORI_B2_128_SH(...) XORI_B2_128(v8i16, __VA_ARGS__) + +#define XORI_B3_128(RTYPE, in0, in1, in2) \ +{ \ + XORI_B2_128(RTYPE, in0, in1); \ + in2 = (RTYPE) __msa_xori_b((v16u8) in2, 128); \ +} +#define XORI_B3_128_SB(...) XORI_B3_128(v16i8, __VA_ARGS__) + +#define XORI_B4_128(RTYPE, in0, in1, in2, in3) \ +{ \ + XORI_B2_128(RTYPE, in0, in1); \ + XORI_B2_128(RTYPE, in2, in3); \ +} +#define XORI_B4_128_UB(...) XORI_B4_128(v16u8, __VA_ARGS__) +#define XORI_B4_128_SB(...) XORI_B4_128(v16i8, __VA_ARGS__) +#define XORI_B4_128_SH(...) XORI_B4_128(v8i16, __VA_ARGS__) + +#define XORI_B5_128(RTYPE, in0, in1, in2, in3, in4) \ +{ \ + XORI_B3_128(RTYPE, in0, in1, in2); \ + XORI_B2_128(RTYPE, in3, in4); \ +} +#define XORI_B5_128_SB(...) XORI_B5_128(v16i8, __VA_ARGS__) + +#define XORI_B6_128(RTYPE, in0, in1, in2, in3, in4, in5) \ +{ \ + XORI_B4_128(RTYPE, in0, in1, in2, in3); \ + XORI_B2_128(RTYPE, in4, in5); \ +} +#define XORI_B6_128_SB(...) XORI_B6_128(v16i8, __VA_ARGS__) + +#define XORI_B7_128(RTYPE, in0, in1, in2, in3, in4, in5, in6) \ +{ \ + XORI_B4_128(RTYPE, in0, in1, in2, in3); \ + XORI_B3_128(RTYPE, in4, in5, in6); \ +} +#define XORI_B7_128_SB(...) XORI_B7_128(v16i8, __VA_ARGS__) + +#define XORI_B8_128(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7) \ +{ \ + XORI_B4_128(RTYPE, in0, in1, in2, in3); \ + XORI_B4_128(RTYPE, in4, in5, in6, in7); \ +} +#define XORI_B8_128_SB(...) XORI_B8_128(v16i8, __VA_ARGS__) +#define XORI_B8_128_UB(...) XORI_B8_128(v16u8, __VA_ARGS__) + +/* Description : Addition of signed halfword elements and signed saturation + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Return Type - as per RTYPE + Details : Signed halfword elements from 'in0' are added to signed + halfword elements of 'in1'. The result is then signed saturated + between -32768 to +32767 (as per halfword data type) + Similar for other pairs +*/ +#define ADDS_SH2(RTYPE, in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = (RTYPE) __msa_adds_s_h((v8i16) in0, (v8i16) in1); \ + out1 = (RTYPE) __msa_adds_s_h((v8i16) in2, (v8i16) in3); \ +} +#define ADDS_SH2_SH(...) ADDS_SH2(v8i16, __VA_ARGS__) + +#define ADDS_SH4(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + ADDS_SH2(RTYPE, in0, in1, in2, in3, out0, out1); \ + ADDS_SH2(RTYPE, in4, in5, in6, in7, out2, out3); \ +} +#define ADDS_SH4_UH(...) ADDS_SH4(v8u16, __VA_ARGS__) +#define ADDS_SH4_SH(...) ADDS_SH4(v8i16, __VA_ARGS__) + +/* Description : Shift left all elements of vector (generic for all data types) + Arguments : Inputs - in0, in1, in2, in3, shift + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per input vector RTYPE + Details : Each element of vector 'in0' is left shifted by 'shift' and + result is in place written to 'in0' + Similar for other pairs +*/ +#define SLLI_2V(in0, in1, shift) \ +{ \ + in0 = in0 << shift; \ + in1 = in1 << shift; \ +} +#define SLLI_4V(in0, in1, in2, in3, shift) \ +{ \ + in0 = in0 << shift; \ + in1 = in1 << shift; \ + in2 = in2 << shift; \ + in3 = in3 << shift; \ +} + +/* Description : Arithmetic shift right all elements of vector + (generic for all data types) + Arguments : Inputs - in0, in1, in2, in3, shift + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per input vector RTYPE + Details : Each element of vector 'in0' is right shifted by 'shift' and + result is in place written to 'in0' + Here, 'shift' is GP variable passed in + Similar for other pairs +*/ +#define SRA_4V(in0, in1, in2, in3, shift) \ +{ \ + in0 = in0 >> shift; \ + in1 = in1 >> shift; \ + in2 = in2 >> shift; \ + in3 = in3 >> shift; \ +} + +/* Description : Shift right logical all halfword elements of vector + Arguments : Inputs - in0, in1, in2, in3, shift + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Each element of vector 'in0' is shifted right logical by + number of bits respective element holds in vector 'shift' and + result is in place written to 'in0' + Here, 'shift' is a vector passed in + Similar for other pairs +*/ +#define SRL_H4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + in0 = (RTYPE) __msa_srl_h((v8i16) in0, (v8i16) shift); \ + in1 = (RTYPE) __msa_srl_h((v8i16) in1, (v8i16) shift); \ + in2 = (RTYPE) __msa_srl_h((v8i16) in2, (v8i16) shift); \ + in3 = (RTYPE) __msa_srl_h((v8i16) in3, (v8i16) shift); \ +} +#define SRL_H4_UH(...) SRL_H4(v8u16, __VA_ARGS__) + +#define SRLR_H4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + in0 = (RTYPE) __msa_srlr_h((v8i16) in0, (v8i16) shift); \ + in1 = (RTYPE) __msa_srlr_h((v8i16) in1, (v8i16) shift); \ + in2 = (RTYPE) __msa_srlr_h((v8i16) in2, (v8i16) shift); \ + in3 = (RTYPE) __msa_srlr_h((v8i16) in3, (v8i16) shift); \ +} +#define SRLR_H4_UH(...) SRLR_H4(v8u16, __VA_ARGS__) +#define SRLR_H4_SH(...) SRLR_H4(v8i16, __VA_ARGS__) + +#define SRLR_H8(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, shift) \ +{ \ + SRLR_H4(RTYPE, in0, in1, in2, in3, shift); \ + SRLR_H4(RTYPE, in4, in5, in6, in7, shift); \ +} +#define SRLR_H8_UH(...) SRLR_H8(v8u16, __VA_ARGS__) +#define SRLR_H8_SH(...) SRLR_H8(v8i16, __VA_ARGS__) + +/* Description : Shift right arithmetic rounded halfwords + Arguments : Inputs - in0, in1, shift + Outputs - in0, in1, (in place) + Return Type - as per RTYPE + Details : Each element of vector 'in0' is shifted right arithmetic by + number of bits respective element holds in vector 'shift'. + The last discarded bit is added to shifted value for rounding + and the result is in place written to 'in0' + Here, 'shift' is a vector passed in + Similar for other pairs +*/ +#define SRAR_H2(RTYPE, in0, in1, shift) \ +{ \ + in0 = (RTYPE) __msa_srar_h((v8i16) in0, (v8i16) shift); \ + in1 = (RTYPE) __msa_srar_h((v8i16) in1, (v8i16) shift); \ +} +#define SRAR_H2_UH(...) SRAR_H2(v8u16, __VA_ARGS__) +#define SRAR_H2_SH(...) SRAR_H2(v8i16, __VA_ARGS__) + +#define SRAR_H3(RTYPE, in0, in1, in2, shift) \ +{ \ + SRAR_H2(RTYPE, in0, in1, shift) \ + in2 = (RTYPE) __msa_srar_h((v8i16) in2, (v8i16) shift); \ +} +#define SRAR_H3_SH(...) SRAR_H3(v8i16, __VA_ARGS__) + +#define SRAR_H4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + SRAR_H2(RTYPE, in0, in1, shift) \ + SRAR_H2(RTYPE, in2, in3, shift) \ +} +#define SRAR_H4_UH(...) SRAR_H4(v8u16, __VA_ARGS__) +#define SRAR_H4_SH(...) SRAR_H4(v8i16, __VA_ARGS__) + +/* Description : Shift right arithmetic rounded words + Arguments : Inputs - in0, in1, shift + Outputs - in0, in1, (in place) + Return Type - as per RTYPE + Details : Each element of vector 'in0' is shifted right arithmetic by + number of bits respective element holds in vector 'shift'. + The last discarded bit is added to shifted value for rounding + and the result is in place written to 'in0' + Here, 'shift' is a vector passed in + Similar for other pairs +*/ +#define SRAR_W2(RTYPE, in0, in1, shift) \ +{ \ + in0 = (RTYPE) __msa_srar_w((v4i32) in0, (v4i32) shift); \ + in1 = (RTYPE) __msa_srar_w((v4i32) in1, (v4i32) shift); \ +} +#define SRAR_W2_SW(...) SRAR_W2(v4i32, __VA_ARGS__) + +#define SRAR_W4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + SRAR_W2(RTYPE, in0, in1, shift) \ + SRAR_W2(RTYPE, in2, in3, shift) \ +} +#define SRAR_W4_SW(...) SRAR_W4(v4i32, __VA_ARGS__) + +/* Description : Shift right arithmetic rounded (immediate) + Arguments : Inputs - in0, in1, in2, in3, shift + Outputs - in0, in1, in2, in3 (in place) + Return Type - as per RTYPE + Details : Each element of vector 'in0' is shifted right arithmetic by + value in 'shift'. + The last discarded bit is added to shifted value for rounding + and the result is in place written to 'in0' + Similar for other pairs +*/ +#define SRARI_H2(RTYPE, in0, in1, shift) \ +{ \ + in0 = (RTYPE) __msa_srari_h((v8i16) in0, shift); \ + in1 = (RTYPE) __msa_srari_h((v8i16) in1, shift); \ +} +#define SRARI_H2_UH(...) SRARI_H2(v8u16, __VA_ARGS__) +#define SRARI_H2_SH(...) SRARI_H2(v8i16, __VA_ARGS__) + +#define SRARI_H4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + SRARI_H2(RTYPE, in0, in1, shift); \ + SRARI_H2(RTYPE, in2, in3, shift); \ +} +#define SRARI_H4_UH(...) SRARI_H4(v8u16, __VA_ARGS__) +#define SRARI_H4_SH(...) SRARI_H4(v8i16, __VA_ARGS__) + +/* Description : Shift right arithmetic rounded (immediate) + Arguments : Inputs - in0, in1, shift + Outputs - in0, in1 (in place) + Return Type - as per RTYPE + Details : Each element of vector 'in0' is shifted right arithmetic by + value in 'shift'. + The last discarded bit is added to shifted value for rounding + and the result is in place written to 'in0' + Similar for other pairs +*/ +#define SRARI_W2(RTYPE, in0, in1, shift) \ +{ \ + in0 = (RTYPE) __msa_srari_w((v4i32) in0, shift); \ + in1 = (RTYPE) __msa_srari_w((v4i32) in1, shift); \ +} +#define SRARI_W2_SW(...) SRARI_W2(v4i32, __VA_ARGS__) + +#define SRARI_W4(RTYPE, in0, in1, in2, in3, shift) \ +{ \ + SRARI_W2(RTYPE, in0, in1, shift); \ + SRARI_W2(RTYPE, in2, in3, shift); \ +} +#define SRARI_W4_SH(...) SRARI_W4(v8i16, __VA_ARGS__) +#define SRARI_W4_SW(...) SRARI_W4(v4i32, __VA_ARGS__) + +/* Description : Multiplication of pairs of vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Details : Each element from 'in0' is multiplied with elements from 'in1' + and result is written to 'out0' + Similar for other pairs +*/ +#define MUL2(in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = in0 * in1; \ + out1 = in2 * in3; \ +} +#define MUL4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ +{ \ + MUL2(in0, in1, in2, in3, out0, out1); \ + MUL2(in4, in5, in6, in7, out2, out3); \ +} + +/* Description : Addition of 2 pairs of vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Details : Each element from 2 pairs vectors is added and 2 results are + produced +*/ +#define ADD2(in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = in0 + in1; \ + out1 = in2 + in3; \ +} +#define ADD4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ +{ \ + ADD2(in0, in1, in2, in3, out0, out1); \ + ADD2(in4, in5, in6, in7, out2, out3); \ +} + +/* Description : Subtraction of 2 pairs of vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1 + Details : Each element from 2 pairs vectors is subtracted and 2 results + are produced +*/ +#define SUB2(in0, in1, in2, in3, out0, out1) \ +{ \ + out0 = in0 - in1; \ + out1 = in2 - in3; \ +} +#define SUB4(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, out3) \ +{ \ + out0 = in0 - in1; \ + out1 = in2 - in3; \ + out2 = in4 - in5; \ + out3 = in6 - in7; \ +} + +/* Description : Sign extend byte elements from right half of the vector + Arguments : Input - in (byte vector) + Output - out (sign extended halfword vector) + Return Type - signed halfword + Details : Sign bit of byte elements from input vector 'in' is + extracted and interleaved with same vector 'in' to generate + 8 halfword elements keeping sign intact +*/ +#define UNPCK_R_SB_SH(in, out) \ +{ \ + v16i8 sign_m; \ + \ + sign_m = __msa_clti_s_b((v16i8) in, 0); \ + out = (v8i16) __msa_ilvr_b(sign_m, (v16i8) in); \ +} + +/* Description : Sign extend halfword elements from right half of the vector + Arguments : Inputs - in (input halfword vector) + Outputs - out (sign extended word vectors) + Return Type - signed word + Details : Sign bit of halfword elements from input vector 'in' is + extracted and interleaved with same vector 'in0' to generate + 4 word elements keeping sign intact +*/ +#if HAVE_MSA2 +#define UNPCK_R_SH_SW(in, out) \ +{ \ + out = (v4i32) __builtin_msa2_w2x_lo_s_h((v8i16) in); \ +} +#else +#define UNPCK_R_SH_SW(in, out) \ +{ \ + v8i16 sign_m; \ + \ + sign_m = __msa_clti_s_h((v8i16) in, 0); \ + out = (v4i32) __msa_ilvr_h(sign_m, (v8i16) in); \ +} +#endif // #if HAVE_MSA2 + +/* Description : Sign extend byte elements from input vector and return + halfword results in pair of vectors + Arguments : Inputs - in (1 input byte vector) + Outputs - out0, out1 (sign extended 2 halfword vectors) + Return Type - signed halfword + Details : Sign bit of byte elements from input vector 'in' is + extracted and interleaved right with same vector 'in0' to + generate 8 signed halfword elements in 'out0' + Then interleaved left with same vector 'in0' to + generate 8 signed halfword elements in 'out1' +*/ +#if HAVE_MSA2 +#define UNPCK_SB_SH(in, out0, out1) \ +{ \ + out0 = (v4i32) __builtin_msa2_w2x_lo_s_b((v16i8) in); \ + out1 = (v4i32) __builtin_msa2_w2x_hi_s_b((v16i8) in); \ +} +#else +#define UNPCK_SB_SH(in, out0, out1) \ +{ \ + v16i8 tmp_m; \ + \ + tmp_m = __msa_clti_s_b((v16i8) in, 0); \ + ILVRL_B2_SH(tmp_m, in, out0, out1); \ +} +#endif // #if HAVE_MSA2 + +/* Description : Zero extend unsigned byte elements to halfword elements + Arguments : Inputs - in (1 input unsigned byte vector) + Outputs - out0, out1 (unsigned 2 halfword vectors) + Return Type - signed halfword + Details : Zero extended right half of vector is returned in 'out0' + Zero extended left half of vector is returned in 'out1' +*/ +#define UNPCK_UB_SH(in, out0, out1) \ +{ \ + v16i8 zero_m = { 0 }; \ + \ + ILVRL_B2_SH(zero_m, in, out0, out1); \ +} + +/* Description : Sign extend halfword elements from input vector and return + result in pair of vectors + Arguments : Inputs - in (1 input halfword vector) + Outputs - out0, out1 (sign extended 2 word vectors) + Return Type - signed word + Details : Sign bit of halfword elements from input vector 'in' is + extracted and interleaved right with same vector 'in0' to + generate 4 signed word elements in 'out0' + Then interleaved left with same vector 'in0' to + generate 4 signed word elements in 'out1' +*/ +#if HAVE_MSA2 +#define UNPCK_SH_SW(in, out0, out1) \ +{ \ + out0 = (v4i32) __builtin_msa2_w2x_lo_s_h((v8i16) in); \ + out1 = (v4i32) __builtin_msa2_w2x_hi_s_h((v8i16) in); \ +} +#else +#define UNPCK_SH_SW(in, out0, out1) \ +{ \ + v8i16 tmp_m; \ + \ + tmp_m = __msa_clti_s_h((v8i16) in, 0); \ + ILVRL_H2_SW(tmp_m, in, out0, out1); \ +} +#endif // #if HAVE_MSA2 + +/* Description : Swap two variables + Arguments : Inputs - in0, in1 + Outputs - in0, in1 (in-place) + Details : Swapping of two input variables using xor +*/ +#define SWAP(in0, in1) \ +{ \ + in0 = in0 ^ in1; \ + in1 = in0 ^ in1; \ + in0 = in0 ^ in1; \ +} + +/* Description : Butterfly of 4 input vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1, out2, out3 + Details : Butterfly operation +*/ +#define BUTTERFLY_4(in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + out0 = in0 + in3; \ + out1 = in1 + in2; \ + \ + out2 = in1 - in2; \ + out3 = in0 - in3; \ +} + +/* Description : Butterfly of 8 input vectors + Arguments : Inputs - in0 ... in7 + Outputs - out0 .. out7 + Details : Butterfly operation +*/ +#define BUTTERFLY_8(in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + out0 = in0 + in7; \ + out1 = in1 + in6; \ + out2 = in2 + in5; \ + out3 = in3 + in4; \ + \ + out4 = in3 - in4; \ + out5 = in2 - in5; \ + out6 = in1 - in6; \ + out7 = in0 - in7; \ +} + +/* Description : Butterfly of 16 input vectors + Arguments : Inputs - in0 ... in15 + Outputs - out0 .. out15 + Details : Butterfly operation +*/ +#define BUTTERFLY_16(in0, in1, in2, in3, in4, in5, in6, in7, \ + in8, in9, in10, in11, in12, in13, in14, in15, \ + out0, out1, out2, out3, out4, out5, out6, out7, \ + out8, out9, out10, out11, out12, out13, out14, out15) \ +{ \ + out0 = in0 + in15; \ + out1 = in1 + in14; \ + out2 = in2 + in13; \ + out3 = in3 + in12; \ + out4 = in4 + in11; \ + out5 = in5 + in10; \ + out6 = in6 + in9; \ + out7 = in7 + in8; \ + \ + out8 = in7 - in8; \ + out9 = in6 - in9; \ + out10 = in5 - in10; \ + out11 = in4 - in11; \ + out12 = in3 - in12; \ + out13 = in2 - in13; \ + out14 = in1 - in14; \ + out15 = in0 - in15; \ +} + +/* Description : Transposes input 4x4 byte block + Arguments : Inputs - in0, in1, in2, in3 (input 4x4 byte block) + Outputs - out0, out1, out2, out3 (output 4x4 byte block) + Return Type - unsigned byte + Details : +*/ +#define TRANSPOSE4x4_UB_UB(in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + v16i8 zero_m = { 0 }; \ + v16i8 s0_m, s1_m, s2_m, s3_m; \ + \ + ILVR_D2_SB(in1, in0, in3, in2, s0_m, s1_m); \ + ILVRL_B2_SB(s1_m, s0_m, s2_m, s3_m); \ + \ + out0 = (v16u8) __msa_ilvr_b(s3_m, s2_m); \ + out1 = (v16u8) __msa_sldi_b(zero_m, (v16i8) out0, 4); \ + out2 = (v16u8) __msa_sldi_b(zero_m, (v16i8) out1, 4); \ + out3 = (v16u8) __msa_sldi_b(zero_m, (v16i8) out2, 4); \ +} + +/* Description : Transposes input 8x4 byte block into 4x8 + Arguments : Inputs - in0, in1, in2, in3 (input 8x4 byte block) + Outputs - out0, out1, out2, out3 (output 4x8 byte block) + Return Type - as per RTYPE + Details : +*/ +#define TRANSPOSE8x4_UB(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3) \ +{ \ + v16i8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + \ + ILVEV_W2_SB(in0, in4, in1, in5, tmp0_m, tmp1_m); \ + tmp2_m = __msa_ilvr_b(tmp1_m, tmp0_m); \ + ILVEV_W2_SB(in2, in6, in3, in7, tmp0_m, tmp1_m); \ + \ + tmp3_m = __msa_ilvr_b(tmp1_m, tmp0_m); \ + ILVRL_H2_SB(tmp3_m, tmp2_m, tmp0_m, tmp1_m); \ + \ + ILVRL_W2(RTYPE, tmp1_m, tmp0_m, out0, out2); \ + out1 = (RTYPE) __msa_ilvl_d((v2i64) out2, (v2i64) out0); \ + out3 = (RTYPE) __msa_ilvl_d((v2i64) out0, (v2i64) out2); \ +} +#define TRANSPOSE8x4_UB_UB(...) TRANSPOSE8x4_UB(v16u8, __VA_ARGS__) +#define TRANSPOSE8x4_UB_UH(...) TRANSPOSE8x4_UB(v8u16, __VA_ARGS__) + +/* Description : Transposes input 8x8 byte block + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 + (input 8x8 byte block) + Outputs - out0, out1, out2, out3, out4, out5, out6, out7 + (output 8x8 byte block) + Return Type - as per RTYPE + Details : +*/ +#define TRANSPOSE8x8_UB(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + v16i8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + v16i8 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ + v16i8 zeros = { 0 }; \ + \ + ILVR_B4_SB(in2, in0, in3, in1, in6, in4, in7, in5, \ + tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ + ILVRL_B2_SB(tmp1_m, tmp0_m, tmp4_m, tmp5_m); \ + ILVRL_B2_SB(tmp3_m, tmp2_m, tmp6_m, tmp7_m); \ + ILVRL_W2(RTYPE, tmp6_m, tmp4_m, out0, out2); \ + ILVRL_W2(RTYPE, tmp7_m, tmp5_m, out4, out6); \ + SLDI_B4(RTYPE, zeros, out0, zeros, out2, zeros, out4, zeros, out6, \ + 8, out1, out3, out5, out7); \ +} +#define TRANSPOSE8x8_UB_UB(...) TRANSPOSE8x8_UB(v16u8, __VA_ARGS__) +#define TRANSPOSE8x8_UB_UH(...) TRANSPOSE8x8_UB(v8u16, __VA_ARGS__) + +/* Description : Transposes 16x4 block into 4x16 with byte elements in vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, + in8, in9, in10, in11, in12, in13, in14, in15 + Outputs - out0, out1, out2, out3 + Return Type - unsigned byte + Details : +*/ +#define TRANSPOSE16x4_UB_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + in8, in9, in10, in11, in12, in13, in14, in15, \ + out0, out1, out2, out3) \ +{ \ + v2i64 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + \ + ILVEV_W2_SD(in0, in4, in8, in12, tmp0_m, tmp1_m); \ + out1 = (v16u8) __msa_ilvev_d(tmp1_m, tmp0_m); \ + \ + ILVEV_W2_SD(in1, in5, in9, in13, tmp0_m, tmp1_m); \ + out3 = (v16u8) __msa_ilvev_d(tmp1_m, tmp0_m); \ + \ + ILVEV_W2_SD(in2, in6, in10, in14, tmp0_m, tmp1_m); \ + \ + tmp2_m = __msa_ilvev_d(tmp1_m, tmp0_m); \ + ILVEV_W2_SD(in3, in7, in11, in15, tmp0_m, tmp1_m); \ + \ + tmp3_m = __msa_ilvev_d(tmp1_m, tmp0_m); \ + ILVEV_B2_SD(out1, out3, tmp2_m, tmp3_m, tmp0_m, tmp1_m); \ + out0 = (v16u8) __msa_ilvev_h((v8i16) tmp1_m, (v8i16) tmp0_m); \ + out2 = (v16u8) __msa_ilvod_h((v8i16) tmp1_m, (v8i16) tmp0_m); \ + \ + tmp0_m = (v2i64) __msa_ilvod_b((v16i8) out3, (v16i8) out1); \ + tmp1_m = (v2i64) __msa_ilvod_b((v16i8) tmp3_m, (v16i8) tmp2_m); \ + out1 = (v16u8) __msa_ilvev_h((v8i16) tmp1_m, (v8i16) tmp0_m); \ + out3 = (v16u8) __msa_ilvod_h((v8i16) tmp1_m, (v8i16) tmp0_m); \ +} + +/* Description : Transposes 16x8 block into 8x16 with byte elements in vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, + in8, in9, in10, in11, in12, in13, in14, in15 + Outputs - out0, out1, out2, out3, out4, out5, out6, out7 + Return Type - unsigned byte + Details : +*/ +#define TRANSPOSE16x8_UB_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + in8, in9, in10, in11, in12, in13, in14, in15, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + v16u8 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ + \ + ILVEV_D2_UB(in0, in8, in1, in9, out7, out6); \ + ILVEV_D2_UB(in2, in10, in3, in11, out5, out4); \ + ILVEV_D2_UB(in4, in12, in5, in13, out3, out2); \ + ILVEV_D2_UB(in6, in14, in7, in15, out1, out0); \ + \ + tmp0_m = (v16u8) __msa_ilvev_b((v16i8) out6, (v16i8) out7); \ + tmp4_m = (v16u8) __msa_ilvod_b((v16i8) out6, (v16i8) out7); \ + tmp1_m = (v16u8) __msa_ilvev_b((v16i8) out4, (v16i8) out5); \ + tmp5_m = (v16u8) __msa_ilvod_b((v16i8) out4, (v16i8) out5); \ + out5 = (v16u8) __msa_ilvev_b((v16i8) out2, (v16i8) out3); \ + tmp6_m = (v16u8) __msa_ilvod_b((v16i8) out2, (v16i8) out3); \ + out7 = (v16u8) __msa_ilvev_b((v16i8) out0, (v16i8) out1); \ + tmp7_m = (v16u8) __msa_ilvod_b((v16i8) out0, (v16i8) out1); \ + \ + ILVEV_H2_UB(tmp0_m, tmp1_m, out5, out7, tmp2_m, tmp3_m); \ + out0 = (v16u8) __msa_ilvev_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + out4 = (v16u8) __msa_ilvod_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + \ + tmp2_m = (v16u8) __msa_ilvod_h((v8i16) tmp1_m, (v8i16) tmp0_m); \ + tmp3_m = (v16u8) __msa_ilvod_h((v8i16) out7, (v8i16) out5); \ + out2 = (v16u8) __msa_ilvev_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + out6 = (v16u8) __msa_ilvod_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + \ + ILVEV_H2_UB(tmp4_m, tmp5_m, tmp6_m, tmp7_m, tmp2_m, tmp3_m); \ + out1 = (v16u8) __msa_ilvev_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + out5 = (v16u8) __msa_ilvod_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + \ + tmp2_m = (v16u8) __msa_ilvod_h((v8i16) tmp5_m, (v8i16) tmp4_m); \ + tmp3_m = (v16u8) __msa_ilvod_h((v8i16) tmp7_m, (v8i16) tmp6_m); \ + out3 = (v16u8) __msa_ilvev_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ + out7 = (v16u8) __msa_ilvod_w((v4i32) tmp3_m, (v4i32) tmp2_m); \ +} + +/* Description : Transposes 4x4 block with half word elements in vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1, out2, out3 + Return Type - signed halfword + Details : +*/ +#define TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + v8i16 s0_m, s1_m; \ + \ + ILVR_H2_SH(in1, in0, in3, in2, s0_m, s1_m); \ + ILVRL_W2_SH(s1_m, s0_m, out0, out2); \ + out1 = (v8i16) __msa_ilvl_d((v2i64) out0, (v2i64) out0); \ + out3 = (v8i16) __msa_ilvl_d((v2i64) out0, (v2i64) out2); \ +} + +/* Description : Transposes 8x8 block with half word elements in vectors + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7 + Outputs - out0, out1, out2, out3, out4, out5, out6, out7 + Return Type - as per RTYPE + Details : +*/ +#define TRANSPOSE8x8_H(RTYPE, in0, in1, in2, in3, in4, in5, in6, in7, \ + out0, out1, out2, out3, out4, out5, out6, out7) \ +{ \ + v8i16 s0_m, s1_m; \ + v8i16 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + v8i16 tmp4_m, tmp5_m, tmp6_m, tmp7_m; \ + \ + ILVR_H2_SH(in6, in4, in7, in5, s0_m, s1_m); \ + ILVRL_H2_SH(s1_m, s0_m, tmp0_m, tmp1_m); \ + ILVL_H2_SH(in6, in4, in7, in5, s0_m, s1_m); \ + ILVRL_H2_SH(s1_m, s0_m, tmp2_m, tmp3_m); \ + ILVR_H2_SH(in2, in0, in3, in1, s0_m, s1_m); \ + ILVRL_H2_SH(s1_m, s0_m, tmp4_m, tmp5_m); \ + ILVL_H2_SH(in2, in0, in3, in1, s0_m, s1_m); \ + ILVRL_H2_SH(s1_m, s0_m, tmp6_m, tmp7_m); \ + PCKEV_D4(RTYPE, tmp0_m, tmp4_m, tmp1_m, tmp5_m, tmp2_m, tmp6_m, \ + tmp3_m, tmp7_m, out0, out2, out4, out6); \ + out1 = (RTYPE) __msa_pckod_d((v2i64) tmp0_m, (v2i64) tmp4_m); \ + out3 = (RTYPE) __msa_pckod_d((v2i64) tmp1_m, (v2i64) tmp5_m); \ + out5 = (RTYPE) __msa_pckod_d((v2i64) tmp2_m, (v2i64) tmp6_m); \ + out7 = (RTYPE) __msa_pckod_d((v2i64) tmp3_m, (v2i64) tmp7_m); \ +} +#define TRANSPOSE8x8_UH_UH(...) TRANSPOSE8x8_H(v8u16, __VA_ARGS__) +#define TRANSPOSE8x8_SH_SH(...) TRANSPOSE8x8_H(v8i16, __VA_ARGS__) + +/* Description : Transposes 4x4 block with word elements in vectors + Arguments : Inputs - in0, in1, in2, in3 + Outputs - out0, out1, out2, out3 + Return Type - signed word + Details : +*/ +#define TRANSPOSE4x4_SW_SW(in0, in1, in2, in3, out0, out1, out2, out3) \ +{ \ + v4i32 s0_m, s1_m, s2_m, s3_m; \ + \ + ILVRL_W2_SW(in1, in0, s0_m, s1_m); \ + ILVRL_W2_SW(in3, in2, s2_m, s3_m); \ + \ + out0 = (v4i32) __msa_ilvr_d((v2i64) s2_m, (v2i64) s0_m); \ + out1 = (v4i32) __msa_ilvl_d((v2i64) s2_m, (v2i64) s0_m); \ + out2 = (v4i32) __msa_ilvr_d((v2i64) s3_m, (v2i64) s1_m); \ + out3 = (v4i32) __msa_ilvl_d((v2i64) s3_m, (v2i64) s1_m); \ +} + +/* Description : Average byte elements from pair of vectors and store 8x4 byte + block in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + averaged (a + b)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + averaged (a + b)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + averaged (a + b)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + averaged (a + b)/2 and stored in 'tmp3_m' + The half vector results from all 4 vectors are stored in + destination memory as 8x4 byte block +*/ +#define AVE_ST8x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + uint64_t out0_m, out1_m, out2_m, out3_m; \ + v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + \ + tmp0_m = __msa_ave_u_b((v16u8) in0, (v16u8) in1); \ + tmp1_m = __msa_ave_u_b((v16u8) in2, (v16u8) in3); \ + tmp2_m = __msa_ave_u_b((v16u8) in4, (v16u8) in5); \ + tmp3_m = __msa_ave_u_b((v16u8) in6, (v16u8) in7); \ + \ + out0_m = __msa_copy_u_d((v2i64) tmp0_m, 0); \ + out1_m = __msa_copy_u_d((v2i64) tmp1_m, 0); \ + out2_m = __msa_copy_u_d((v2i64) tmp2_m, 0); \ + out3_m = __msa_copy_u_d((v2i64) tmp3_m, 0); \ + SD4(out0_m, out1_m, out2_m, out3_m, pdst, stride); \ +} + +/* Description : Average byte elements from pair of vectors and store 16x4 byte + block in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + averaged (a + b)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + averaged (a + b)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + averaged (a + b)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + averaged (a + b)/2 and stored in 'tmp3_m' + The results from all 4 vectors are stored in destination + memory as 16x4 byte block +*/ +#define AVE_ST16x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + \ + tmp0_m = __msa_ave_u_b((v16u8) in0, (v16u8) in1); \ + tmp1_m = __msa_ave_u_b((v16u8) in2, (v16u8) in3); \ + tmp2_m = __msa_ave_u_b((v16u8) in4, (v16u8) in5); \ + tmp3_m = __msa_ave_u_b((v16u8) in6, (v16u8) in7); \ + \ + ST_UB4(tmp0_m, tmp1_m, tmp2_m, tmp3_m, pdst, stride); \ +} + +/* Description : Average rounded byte elements from pair of vectors and store + 8x4 byte block in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + average rounded (a + b + 1)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + average rounded (a + b + 1)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + average rounded (a + b + 1)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + average rounded (a + b + 1)/2 and stored in 'tmp3_m' + The half vector results from all 4 vectors are stored in + destination memory as 8x4 byte block +*/ +#define AVER_ST8x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + uint64_t out0_m, out1_m, out2_m, out3_m; \ + v16u8 tp0_m, tp1_m, tp2_m, tp3_m; \ + \ + AVER_UB4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + tp0_m, tp1_m, tp2_m, tp3_m); \ + \ + out0_m = __msa_copy_u_d((v2i64) tp0_m, 0); \ + out1_m = __msa_copy_u_d((v2i64) tp1_m, 0); \ + out2_m = __msa_copy_u_d((v2i64) tp2_m, 0); \ + out3_m = __msa_copy_u_d((v2i64) tp3_m, 0); \ + SD4(out0_m, out1_m, out2_m, out3_m, pdst, stride); \ +} + +/* Description : Average rounded byte elements from pair of vectors and store + 16x4 byte block in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + average rounded (a + b + 1)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + average rounded (a + b + 1)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + average rounded (a + b + 1)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + average rounded (a + b + 1)/2 and stored in 'tmp3_m' + The vector results from all 4 vectors are stored in + destination memory as 16x4 byte block +*/ +#define AVER_ST16x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride) \ +{ \ + v16u8 t0_m, t1_m, t2_m, t3_m; \ + \ + AVER_UB4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + t0_m, t1_m, t2_m, t3_m); \ + ST_UB4(t0_m, t1_m, t2_m, t3_m, pdst, stride); \ +} + +/* Description : Average rounded byte elements from pair of vectors, + average rounded with destination and store 8x4 byte block + in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + average rounded (a + b + 1)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + average rounded (a + b + 1)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + average rounded (a + b + 1)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + average rounded (a + b + 1)/2 and stored in 'tmp3_m' + The half vector results from all 4 vectors are stored in + destination memory as 8x4 byte block +*/ +#define AVER_DST_ST8x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + pdst, stride) \ +{ \ + v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + v16u8 dst0_m, dst1_m, dst2_m, dst3_m; \ + \ + LD_UB4(pdst, stride, dst0_m, dst1_m, dst2_m, dst3_m); \ + AVER_UB4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ + AVER_ST8x4_UB(dst0_m, tmp0_m, dst1_m, tmp1_m, \ + dst2_m, tmp2_m, dst3_m, tmp3_m, pdst, stride); \ +} + +/* Description : Average rounded byte elements from pair of vectors, + average rounded with destination and store 16x4 byte block + in destination memory + Arguments : Inputs - in0, in1, in2, in3, in4, in5, in6, in7, pdst, stride + Details : Each byte element from input vector pair 'in0' and 'in1' are + average rounded (a + b + 1)/2 and stored in 'tmp0_m' + Each byte element from input vector pair 'in2' and 'in3' are + average rounded (a + b + 1)/2 and stored in 'tmp1_m' + Each byte element from input vector pair 'in4' and 'in5' are + average rounded (a + b + 1)/2 and stored in 'tmp2_m' + Each byte element from input vector pair 'in6' and 'in7' are + average rounded (a + b + 1)/2 and stored in 'tmp3_m' + The vector results from all 4 vectors are stored in + destination memory as 16x4 byte block +*/ +#define AVER_DST_ST16x4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + pdst, stride) \ +{ \ + v16u8 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \ + v16u8 dst0_m, dst1_m, dst2_m, dst3_m; \ + \ + LD_UB4(pdst, stride, dst0_m, dst1_m, dst2_m, dst3_m); \ + AVER_UB4_UB(in0, in1, in2, in3, in4, in5, in6, in7, \ + tmp0_m, tmp1_m, tmp2_m, tmp3_m); \ + AVER_ST16x4_UB(dst0_m, tmp0_m, dst1_m, tmp1_m, \ + dst2_m, tmp2_m, dst3_m, tmp3_m, pdst, stride); \ +} + +/* Description : Add block 4x4 + Arguments : Inputs - in0, in1, in2, in3, pdst, stride + Details : Least significant 4 bytes from each input vector are added to + the destination bytes, clipped between 0-255 and then stored. +*/ +#define ADDBLK_ST4x4_UB(in0, in1, in2, in3, pdst, stride) \ +{ \ + uint32_t src0_m, src1_m, src2_m, src3_m; \ + uint32_t out0_m, out1_m, out2_m, out3_m; \ + v8i16 inp0_m, inp1_m, res0_m, res1_m; \ + v16i8 dst0_m = { 0 }; \ + v16i8 dst1_m = { 0 }; \ + v16i8 zero_m = { 0 }; \ + \ + ILVR_D2_SH(in1, in0, in3, in2, inp0_m, inp1_m) \ + LW4(pdst, stride, src0_m, src1_m, src2_m, src3_m); \ + INSERT_W2_SB(src0_m, src1_m, dst0_m); \ + INSERT_W2_SB(src2_m, src3_m, dst1_m); \ + ILVR_B2_SH(zero_m, dst0_m, zero_m, dst1_m, res0_m, res1_m); \ + ADD2(res0_m, inp0_m, res1_m, inp1_m, res0_m, res1_m); \ + CLIP_SH2_0_255(res0_m, res1_m); \ + PCKEV_B2_SB(res0_m, res0_m, res1_m, res1_m, dst0_m, dst1_m); \ + \ + out0_m = __msa_copy_u_w((v4i32) dst0_m, 0); \ + out1_m = __msa_copy_u_w((v4i32) dst0_m, 1); \ + out2_m = __msa_copy_u_w((v4i32) dst1_m, 0); \ + out3_m = __msa_copy_u_w((v4i32) dst1_m, 1); \ + SW4(out0_m, out1_m, out2_m, out3_m, pdst, stride); \ +} + +/* Description : Dot product and addition of 3 signed halfword input vectors + Arguments : Inputs - in0, in1, in2, coeff0, coeff1, coeff2 + Outputs - out0_m + Return Type - signed halfword + Details : Dot product of 'in0' with 'coeff0' + Dot product of 'in1' with 'coeff1' + Dot product of 'in2' with 'coeff2' + Addition of all the 3 vector results + + out0_m = (in0 * coeff0) + (in1 * coeff1) + (in2 * coeff2) +*/ +#define DPADD_SH3_SH(in0, in1, in2, coeff0, coeff1, coeff2) \ +( { \ + v8i16 out0_m; \ + \ + out0_m = __msa_dotp_s_h((v16i8) in0, (v16i8) coeff0); \ + out0_m = __msa_dpadd_s_h(out0_m, (v16i8) in1, (v16i8) coeff1); \ + out0_m = __msa_dpadd_s_h(out0_m, (v16i8) in2, (v16i8) coeff2); \ + \ + out0_m; \ +} ) + +/* Description : Pack even elements of input vectors & xor with 128 + Arguments : Inputs - in0, in1 + Outputs - out_m + Return Type - unsigned byte + Details : Signed byte even elements from 'in0' and 'in1' are packed + together in one vector and the resulted vector is xor'ed with + 128 to shift the range from signed to unsigned byte +*/ +#define PCKEV_XORI128_UB(in0, in1) \ +( { \ + v16u8 out_m; \ + out_m = (v16u8) __msa_pckev_b((v16i8) in1, (v16i8) in0); \ + out_m = (v16u8) __msa_xori_b((v16u8) out_m, 128); \ + out_m; \ +} ) + +/* Description : Converts inputs to unsigned bytes, interleave, average & store + as 8x4 unsigned byte block + Arguments : Inputs - in0, in1, in2, in3, dst0, dst1, pdst, stride +*/ +#define CONVERT_UB_AVG_ST8x4_UB(in0, in1, in2, in3, \ + dst0, dst1, pdst, stride) \ +{ \ + v16u8 tmp0_m, tmp1_m; \ + uint8_t *pdst_m = (uint8_t *) (pdst); \ + \ + tmp0_m = PCKEV_XORI128_UB(in0, in1); \ + tmp1_m = PCKEV_XORI128_UB(in2, in3); \ + AVER_UB2_UB(tmp0_m, dst0, tmp1_m, dst1, tmp0_m, tmp1_m); \ + ST_D4(tmp0_m, tmp1_m, 0, 1, 0, 1, pdst_m, stride); \ +} + +/* Description : Pack even byte elements, extract 0 & 2 index words from pair + of results and store 4 words in destination memory as per + stride + Arguments : Inputs - in0, in1, in2, in3, pdst, stride +*/ +#define PCKEV_ST4x4_UB(in0, in1, in2, in3, pdst, stride) \ +{ \ + uint32_t out0_m, out1_m, out2_m, out3_m; \ + v16i8 tmp0_m, tmp1_m; \ + \ + PCKEV_B2_SB(in1, in0, in3, in2, tmp0_m, tmp1_m); \ + \ + out0_m = __msa_copy_u_w((v4i32) tmp0_m, 0); \ + out1_m = __msa_copy_u_w((v4i32) tmp0_m, 2); \ + out2_m = __msa_copy_u_w((v4i32) tmp1_m, 0); \ + out3_m = __msa_copy_u_w((v4i32) tmp1_m, 2); \ + \ + SW4(out0_m, out1_m, out2_m, out3_m, pdst, stride); \ +} + +/* Description : Pack even byte elements and store byte vector in destination + memory + Arguments : Inputs - in0, in1, pdst +*/ +#define PCKEV_ST_SB(in0, in1, pdst) \ +{ \ + v16i8 tmp_m; \ + tmp_m = __msa_pckev_b((v16i8) in1, (v16i8) in0); \ + ST_SB(tmp_m, (pdst)); \ +} + +/* Description : Horizontal 2 tap filter kernel code + Arguments : Inputs - in0, in1, mask, coeff, shift +*/ +#define HORIZ_2TAP_FILT_UH(in0, in1, mask, coeff, shift) \ +( { \ + v16i8 tmp0_m; \ + v8u16 tmp1_m; \ + \ + tmp0_m = __msa_vshf_b((v16i8) mask, (v16i8) in1, (v16i8) in0); \ + tmp1_m = __msa_dotp_u_h((v16u8) tmp0_m, (v16u8) coeff); \ + tmp1_m = (v8u16) __msa_srari_h((v8i16) tmp1_m, shift); \ + tmp1_m = __msa_sat_u_h(tmp1_m, shift); \ + \ + tmp1_m; \ +} ) +#endif /* AVUTIL_MIPS_GENERIC_MACROS_MSA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/intreadwrite.h new file mode 100644 index 00000000..32084f68 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/intreadwrite.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2009 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MIPS_INTREADWRITE_H +#define AVUTIL_MIPS_INTREADWRITE_H + +#include +#include "config.h" + +#if ARCH_MIPS64 && HAVE_INLINE_ASM && !HAVE_MIPS64R6 + +#define AV_RN32 AV_RN32 +static av_always_inline uint32_t AV_RN32(const void *p) +{ + struct __attribute__((packed)) u32 { uint32_t v; }; + const uint8_t *q = p; + const struct u32 *pl = (const struct u32 *)(q + 3 * !HAVE_BIGENDIAN); + const struct u32 *pr = (const struct u32 *)(q + 3 * HAVE_BIGENDIAN); + uint32_t v; + __asm__ ("lwl %0, %1 \n\t" + "lwr %0, %2 \n\t" + : "=&r"(v) + : "m"(*pl), "m"(*pr)); + return v; +} + +#endif /* ARCH_MIPS64 && HAVE_INLINE_ASM && !HAVE_MIPS64R6 */ + +#endif /* AVUTIL_MIPS_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/libm_mips.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/libm_mips.h new file mode 100644 index 00000000..757867bc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/libm_mips.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Nedeljko Babic (nbabic@mips.com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * MIPS optimization for some libm functions + */ + +#ifndef AVUTIL_MIPS_LIBM_MIPS_H +#define AVUTIL_MIPS_LIBM_MIPS_H + +static av_always_inline av_const long int lrintf_mips(float x) +{ + register int ret_int; + + __asm__ volatile ( + "cvt.w.s %[x], %[x] \n\t" + "mfc1 %[ret_int], %[x] \n\t" + + :[x]"+f"(x), [ret_int]"=r"(ret_int) + ); + return ret_int; +} + +#undef lrintf +#define lrintf(x) lrintf_mips(x) + +#define HAVE_LRINTF 1 +#endif /* AVUTIL_MIPS_LIBM_MIPS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/mmiutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/mmiutils.h new file mode 100644 index 00000000..8f692e86 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/mips/mmiutils.h @@ -0,0 +1,364 @@ +/* + * Loongson SIMD utils + * + * Copyright (c) 2016 Loongson Technology Corporation Limited + * Copyright (c) 2016 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MIPS_MMIUTILS_H +#define AVUTIL_MIPS_MMIUTILS_H + +#include "config.h" +#include "libavutil/mips/asmdefs.h" + +#if HAVE_LOONGSON2 + +#define DECLARE_VAR_LOW32 int32_t low32 +#define RESTRICT_ASM_LOW32 [low32]"=&r"(low32), +#define DECLARE_VAR_ALL64 int64_t all64 +#define RESTRICT_ASM_ALL64 [all64]"=&r"(all64), +#define DECLARE_VAR_ADDRT mips_reg addrt +#define RESTRICT_ASM_ADDRT [addrt]"=&r"(addrt), + +#define MMI_LWX(reg, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + "lw "#reg", "#bias"(%[addrt]) \n\t" + +#define MMI_SWX(reg, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + "sw "#reg", "#bias"(%[addrt]) \n\t" + +#define MMI_LDX(reg, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + "ld "#reg", "#bias"(%[addrt]) \n\t" + +#define MMI_SDX(reg, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + "sd "#reg", "#bias"(%[addrt]) \n\t" + +#define MMI_LWC1(fp, addr, bias) \ + "lwc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_ULWC1(fp, addr, bias) \ + "ulw %[low32], "#bias"("#addr") \n\t" \ + "mtc1 %[low32], "#fp" \n\t" + +#define MMI_LWXC1(fp, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + MMI_LWC1(fp, %[addrt], bias) + +#define MMI_SWC1(fp, addr, bias) \ + "swc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_USWC1(fp, addr, bias) \ + "mfc1 %[low32], "#fp" \n\t" \ + "usw %[low32], "#bias"("#addr") \n\t" + +#define MMI_SWXC1(fp, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + MMI_SWC1(fp, %[addrt], bias) + +#define MMI_LDC1(fp, addr, bias) \ + "ldc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_ULDC1(fp, addr, bias) \ + "uld %[all64], "#bias"("#addr") \n\t" \ + "dmtc1 %[all64], "#fp" \n\t" + +#define MMI_LDXC1(fp, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + MMI_LDC1(fp, %[addrt], bias) + +#define MMI_SDC1(fp, addr, bias) \ + "sdc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_USDC1(fp, addr, bias) \ + "dmfc1 %[all64], "#fp" \n\t" \ + "usd %[all64], "#bias"("#addr") \n\t" + +#define MMI_SDXC1(fp, addr, stride, bias) \ + PTR_ADDU "%[addrt], "#addr", "#stride" \n\t" \ + MMI_SDC1(fp, %[addrt], bias) + +#define MMI_LQ(reg1, reg2, addr, bias) \ + "ld "#reg1", "#bias"("#addr") \n\t" \ + "ld "#reg2", 8+"#bias"("#addr") \n\t" + +#define MMI_SQ(reg1, reg2, addr, bias) \ + "sd "#reg1", "#bias"("#addr") \n\t" \ + "sd "#reg2", 8+"#bias"("#addr") \n\t" + +#define MMI_LQC1(fp1, fp2, addr, bias) \ + "ldc1 "#fp1", "#bias"("#addr") \n\t" \ + "ldc1 "#fp2", 8+"#bias"("#addr") \n\t" + +#define MMI_SQC1(fp1, fp2, addr, bias) \ + "sdc1 "#fp1", "#bias"("#addr") \n\t" \ + "sdc1 "#fp2", 8+"#bias"("#addr") \n\t" + +#elif HAVE_LOONGSON3 /* !HAVE_LOONGSON2 */ + +#define DECLARE_VAR_ALL64 +#define RESTRICT_ASM_ALL64 +#define DECLARE_VAR_ADDRT +#define RESTRICT_ASM_ADDRT + +#define MMI_LWX(reg, addr, stride, bias) \ + "gslwx "#reg", "#bias"("#addr", "#stride") \n\t" + +#define MMI_SWX(reg, addr, stride, bias) \ + "gsswx "#reg", "#bias"("#addr", "#stride") \n\t" + +#define MMI_LDX(reg, addr, stride, bias) \ + "gsldx "#reg", "#bias"("#addr", "#stride") \n\t" + +#define MMI_SDX(reg, addr, stride, bias) \ + "gssdx "#reg", "#bias"("#addr", "#stride") \n\t" + +#define MMI_LWC1(fp, addr, bias) \ + "lwc1 "#fp", "#bias"("#addr") \n\t" + +#if _MIPS_SIM == _ABIO32 /* workaround for 3A2000 gslwlc1 bug */ + +#define DECLARE_VAR_LOW32 int32_t low32 +#define RESTRICT_ASM_LOW32 [low32]"=&r"(low32), + +#define MMI_ULWC1(fp, addr, bias) \ + "ulw %[low32], "#bias"("#addr") \n\t" \ + "mtc1 %[low32], "#fp" \n\t" + +#else /* _MIPS_SIM != _ABIO32 */ + +#define DECLARE_VAR_LOW32 +#define RESTRICT_ASM_LOW32 + +#define MMI_ULWC1(fp, addr, bias) \ + "gslwlc1 "#fp", 3+"#bias"("#addr") \n\t" \ + "gslwrc1 "#fp", "#bias"("#addr") \n\t" + +#endif /* _MIPS_SIM != _ABIO32 */ + +#define MMI_LWXC1(fp, addr, stride, bias) \ + "gslwxc1 "#fp", "#bias"("#addr", "#stride") \n\t" + +#define MMI_SWC1(fp, addr, bias) \ + "swc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_USWC1(fp, addr, bias) \ + "gsswlc1 "#fp", 3+"#bias"("#addr") \n\t" \ + "gsswrc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_SWXC1(fp, addr, stride, bias) \ + "gsswxc1 "#fp", "#bias"("#addr", "#stride") \n\t" + +#define MMI_LDC1(fp, addr, bias) \ + "ldc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_ULDC1(fp, addr, bias) \ + "gsldlc1 "#fp", 7+"#bias"("#addr") \n\t" \ + "gsldrc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_LDXC1(fp, addr, stride, bias) \ + "gsldxc1 "#fp", "#bias"("#addr", "#stride") \n\t" + +#define MMI_SDC1(fp, addr, bias) \ + "sdc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_USDC1(fp, addr, bias) \ + "gssdlc1 "#fp", 7+"#bias"("#addr") \n\t" \ + "gssdrc1 "#fp", "#bias"("#addr") \n\t" + +#define MMI_SDXC1(fp, addr, stride, bias) \ + "gssdxc1 "#fp", "#bias"("#addr", "#stride") \n\t" + +#define MMI_LQ(reg1, reg2, addr, bias) \ + "gslq "#reg1", "#reg2", "#bias"("#addr") \n\t" + +#define MMI_SQ(reg1, reg2, addr, bias) \ + "gssq "#reg1", "#reg2", "#bias"("#addr") \n\t" + +#define MMI_LQC1(fp1, fp2, addr, bias) \ + "gslqc1 "#fp1", "#fp2", "#bias"("#addr") \n\t" + +#define MMI_SQC1(fp1, fp2, addr, bias) \ + "gssqc1 "#fp1", "#fp2", "#bias"("#addr") \n\t" + +#endif /* HAVE_LOONGSON2 */ + +/** + * backup register + */ +#define BACKUP_REG \ + LOCAL_ALIGNED_16(double, temp_backup_reg, [8]); \ + if (_MIPS_SIM == _ABI64) \ + __asm__ volatile ( \ + "gssqc1 $f25, $f24, 0x00(%[temp]) \n\t" \ + "gssqc1 $f27, $f26, 0x10(%[temp]) \n\t" \ + "gssqc1 $f29, $f28, 0x20(%[temp]) \n\t" \ + "gssqc1 $f31, $f30, 0x30(%[temp]) \n\t" \ + : \ + : [temp]"r"(temp_backup_reg) \ + : "memory" \ + ); \ + else \ + __asm__ volatile ( \ + "gssqc1 $f22, $f20, 0x00(%[temp]) \n\t" \ + "gssqc1 $f26, $f24, 0x10(%[temp]) \n\t" \ + "gssqc1 $f30, $f28, 0x20(%[temp]) \n\t" \ + : \ + : [temp]"r"(temp_backup_reg) \ + : "memory" \ + ); + +/** + * recover register + */ +#define RECOVER_REG \ + if (_MIPS_SIM == _ABI64) \ + __asm__ volatile ( \ + "gslqc1 $f25, $f24, 0x00(%[temp]) \n\t" \ + "gslqc1 $f27, $f26, 0x10(%[temp]) \n\t" \ + "gslqc1 $f29, $f28, 0x20(%[temp]) \n\t" \ + "gslqc1 $f31, $f30, 0x30(%[temp]) \n\t" \ + : \ + : [temp]"r"(temp_backup_reg) \ + : "memory" \ + ); \ + else \ + __asm__ volatile ( \ + "gslqc1 $f22, $f20, 0x00(%[temp]) \n\t" \ + "gslqc1 $f26, $f24, 0x10(%[temp]) \n\t" \ + "gslqc1 $f30, $f28, 0x20(%[temp]) \n\t" \ + : \ + : [temp]"r"(temp_backup_reg) \ + : "memory" \ + ); + +/** + * brief: Transpose 2X2 word packaged data. + * fr_i0, fr_i1: src + * fr_o0, fr_o1: dst + */ +#define TRANSPOSE_2W(fr_i0, fr_i1, fr_o0, fr_o1) \ + "punpcklwd "#fr_o0", "#fr_i0", "#fr_i1" \n\t" \ + "punpckhwd "#fr_o1", "#fr_i0", "#fr_i1" \n\t" + +/** + * brief: Transpose 4X4 half word packaged data. + * fr_i0, fr_i1, fr_i2, fr_i3: src & dst + * fr_t0, fr_t1, fr_t2, fr_t3: temporary register + */ +#define TRANSPOSE_4H(fr_i0, fr_i1, fr_i2, fr_i3, \ + fr_t0, fr_t1, fr_t2, fr_t3) \ + "punpcklhw "#fr_t0", "#fr_i0", "#fr_i1" \n\t" \ + "punpckhhw "#fr_t1", "#fr_i0", "#fr_i1" \n\t" \ + "punpcklhw "#fr_t2", "#fr_i2", "#fr_i3" \n\t" \ + "punpckhhw "#fr_t3", "#fr_i2", "#fr_i3" \n\t" \ + "punpcklwd "#fr_i0", "#fr_t0", "#fr_t2" \n\t" \ + "punpckhwd "#fr_i1", "#fr_t0", "#fr_t2" \n\t" \ + "punpcklwd "#fr_i2", "#fr_t1", "#fr_t3" \n\t" \ + "punpckhwd "#fr_i3", "#fr_t1", "#fr_t3" \n\t" + +/** + * brief: Transpose 8x8 byte packaged data. + * fr_i0~i7: src & dst + * fr_t0~t3: temporary register + */ +#define TRANSPOSE_8B(fr_i0, fr_i1, fr_i2, fr_i3, fr_i4, fr_i5, \ + fr_i6, fr_i7, fr_t0, fr_t1, fr_t2, fr_t3) \ + "punpcklbh "#fr_t0", "#fr_i0", "#fr_i1" \n\t" \ + "punpckhbh "#fr_t1", "#fr_i0", "#fr_i1" \n\t" \ + "punpcklbh "#fr_t2", "#fr_i2", "#fr_i3" \n\t" \ + "punpckhbh "#fr_t3", "#fr_i2", "#fr_i3" \n\t" \ + "punpcklbh "#fr_i0", "#fr_i4", "#fr_i5" \n\t" \ + "punpckhbh "#fr_i1", "#fr_i4", "#fr_i5" \n\t" \ + "punpcklbh "#fr_i2", "#fr_i6", "#fr_i7" \n\t" \ + "punpckhbh "#fr_i3", "#fr_i6", "#fr_i7" \n\t" \ + "punpcklhw "#fr_i4", "#fr_t0", "#fr_t2" \n\t" \ + "punpckhhw "#fr_i5", "#fr_t0", "#fr_t2" \n\t" \ + "punpcklhw "#fr_i6", "#fr_t1", "#fr_t3" \n\t" \ + "punpckhhw "#fr_i7", "#fr_t1", "#fr_t3" \n\t" \ + "punpcklhw "#fr_t0", "#fr_i0", "#fr_i2" \n\t" \ + "punpckhhw "#fr_t1", "#fr_i0", "#fr_i2" \n\t" \ + "punpcklhw "#fr_t2", "#fr_i1", "#fr_i3" \n\t" \ + "punpckhhw "#fr_t3", "#fr_i1", "#fr_i3" \n\t" \ + "punpcklwd "#fr_i0", "#fr_i4", "#fr_t0" \n\t" \ + "punpckhwd "#fr_i1", "#fr_i4", "#fr_t0" \n\t" \ + "punpcklwd "#fr_i2", "#fr_i5", "#fr_t1" \n\t" \ + "punpckhwd "#fr_i3", "#fr_i5", "#fr_t1" \n\t" \ + "punpcklwd "#fr_i4", "#fr_i6", "#fr_t2" \n\t" \ + "punpckhwd "#fr_i5", "#fr_i6", "#fr_t2" \n\t" \ + "punpcklwd "#fr_i6", "#fr_i7", "#fr_t3" \n\t" \ + "punpckhwd "#fr_i7", "#fr_i7", "#fr_t3" \n\t" + +/** + * brief: Parallel SRA for 8 byte packaged data. + * fr_i0: src + * fr_i1: SRA number(SRAB number + 8) + * fr_t0, fr_t1: temporary register + * fr_d0: dst + */ +#define PSRAB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0) \ + "punpcklbh "#fr_t0", "#fr_t0", "#fr_i0" \n\t" \ + "punpckhbh "#fr_t1", "#fr_t1", "#fr_i0" \n\t" \ + "psrah "#fr_t0", "#fr_t0", "#fr_i1" \n\t" \ + "psrah "#fr_t1", "#fr_t1", "#fr_i1" \n\t" \ + "packsshb "#fr_d0", "#fr_t0", "#fr_t1" \n\t" + +/** + * brief: Parallel SRL for 8 byte packaged data. + * fr_i0: src + * fr_i1: SRL number(SRLB number + 8) + * fr_t0, fr_t1: temporary register + * fr_d0: dst + */ +#define PSRLB_MMI(fr_i0, fr_i1, fr_t0, fr_t1, fr_d0) \ + "punpcklbh "#fr_t0", "#fr_t0", "#fr_i0" \n\t" \ + "punpckhbh "#fr_t1", "#fr_t1", "#fr_i0" \n\t" \ + "psrlh "#fr_t0", "#fr_t0", "#fr_i1" \n\t" \ + "psrlh "#fr_t1", "#fr_t1", "#fr_i1" \n\t" \ + "packsshb "#fr_d0", "#fr_t0", "#fr_t1" \n\t" + +#define PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift) \ + "psrah "#fp1", "#fp1", "#shift" \n\t" \ + "psrah "#fp2", "#fp2", "#shift" \n\t" \ + "psrah "#fp3", "#fp3", "#shift" \n\t" \ + "psrah "#fp4", "#fp4", "#shift" \n\t" + +#define PSRAH_8_MMI(fp1, fp2, fp3, fp4, fp5, fp6, fp7, fp8, shift) \ + PSRAH_4_MMI(fp1, fp2, fp3, fp4, shift) \ + PSRAH_4_MMI(fp5, fp6, fp7, fp8, shift) + +/** + * brief: (((value) + (1 << ((n) - 1))) >> (n)) + * fr_i0: src & dst + * fr_i1: Operand number + * fr_t0, fr_t1: temporary FPR + * gr_t0: temporary GPR + */ +#define ROUND_POWER_OF_TWO_MMI(fr_i0, fr_i1, fr_t0, fr_t1, gr_t0) \ + "li "#gr_t0", 0x01 \n\t" \ + "dmtc1 "#gr_t0", "#fr_t0" \n\t" \ + "punpcklwd "#fr_t0", "#fr_t0", "#fr_t0" \n\t" \ + "psubw "#fr_t1", "#fr_i1", "#fr_t0" \n\t" \ + "psllw "#fr_t1", "#fr_t0", "#fr_t1" \n\t" \ + "paddw "#fr_i0", "#fr_i0", "#fr_t1" \n\t" \ + "psraw "#fr_i0", "#fr_i0", "#fr_i1" \n\t" + +#endif /* AVUTILS_MIPS_MMIUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/motion_vector.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/motion_vector.h new file mode 100644 index 00000000..ec295563 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/motion_vector.h @@ -0,0 +1,57 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_MOTION_VECTOR_H +#define AVUTIL_MOTION_VECTOR_H + +#include + +typedef struct AVMotionVector { + /** + * Where the current macroblock comes from; negative value when it comes + * from the past, positive value when it comes from the future. + * XXX: set exact relative ref frame reference instead of a +/- 1 "direction". + */ + int32_t source; + /** + * Width and height of the block. + */ + uint8_t w, h; + /** + * Absolute source position. Can be outside the frame area. + */ + int16_t src_x, src_y; + /** + * Absolute destination position. Can be outside the frame area. + */ + int16_t dst_x, dst_y; + /** + * Extra flag information. + * Currently unused. + */ + uint64_t flags; + /** + * Motion vector + * src_x = dst_x + motion_x / motion_scale + * src_y = dst_y + motion_y / motion_scale + */ + int32_t motion_x, motion_y; + uint16_t motion_scale; +} AVMotionVector; + +#endif /* AVUTIL_MOTION_VECTOR_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/murmur3.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/murmur3.h new file mode 100644 index 00000000..1b09175c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/murmur3.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2013 Reimar Döffinger + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_murmur3 + * Public header for MurmurHash3 hash function implementation. + */ + +#ifndef AVUTIL_MURMUR3_H +#define AVUTIL_MURMUR3_H + +#include + +#include "version.h" + +/** + * @defgroup lavu_murmur3 Murmur3 + * @ingroup lavu_hash + * MurmurHash3 hash function implementation. + * + * MurmurHash3 is a non-cryptographic hash function, of which three + * incompatible versions were created by its inventor Austin Appleby: + * + * - 32-bit output + * - 128-bit output for 32-bit platforms + * - 128-bit output for 64-bit platforms + * + * FFmpeg only implements the last variant: 128-bit output designed for 64-bit + * platforms. Even though the hash function was designed for 64-bit platforms, + * the function in reality works on 32-bit systems too, only with reduced + * performance. + * + * @anchor lavu_murmur3_seedinfo + * By design, MurmurHash3 requires a seed to operate. In response to this, + * libavutil provides two functions for hash initiation, one that requires a + * seed (av_murmur3_init_seeded()) and one that uses a fixed arbitrary integer + * as the seed, and therefore does not (av_murmur3_init()). + * + * To make hashes comparable, you should provide the same seed for all calls to + * this hash function -- if you are supplying one yourself, that is. + * + * @{ + */ + +/** + * Allocate an AVMurMur3 hash context. + * + * @return Uninitialized hash context or `NULL` in case of error + */ +struct AVMurMur3 *av_murmur3_alloc(void); + +/** + * Initialize or reinitialize an AVMurMur3 hash context with a seed. + * + * @param[out] c Hash context + * @param[in] seed Random seed + * + * @see av_murmur3_init() + * @see @ref lavu_murmur3_seedinfo "Detailed description" on a discussion of + * seeds for MurmurHash3. + */ +void av_murmur3_init_seeded(struct AVMurMur3 *c, uint64_t seed); + +/** + * Initialize or reinitialize an AVMurMur3 hash context. + * + * Equivalent to av_murmur3_init_seeded() with a built-in seed. + * + * @param[out] c Hash context + * + * @see av_murmur3_init_seeded() + * @see @ref lavu_murmur3_seedinfo "Detailed description" on a discussion of + * seeds for MurmurHash3. + */ +void av_murmur3_init(struct AVMurMur3 *c); + +/** + * Update hash context with new data. + * + * @param[out] c Hash context + * @param[in] src Input data to update hash with + * @param[in] len Number of bytes to read from `src` + */ +#if FF_API_CRYPTO_SIZE_T +void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, int len); +#else +void av_murmur3_update(struct AVMurMur3 *c, const uint8_t *src, size_t len); +#endif + +/** + * Finish hashing and output digest value. + * + * @param[in,out] c Hash context + * @param[out] dst Buffer where output digest value is stored + */ +void av_murmur3_final(struct AVMurMur3 *c, uint8_t dst[16]); + +/** + * @} + */ + +#endif /* AVUTIL_MURMUR3_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/opt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/opt.h new file mode 100644 index 00000000..e4611957 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/opt.h @@ -0,0 +1,871 @@ +/* + * AVOptions + * copyright (c) 2005 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_OPT_H +#define AVUTIL_OPT_H + +/** + * @file + * AVOptions + */ + +#include "rational.h" +#include "avutil.h" +#include "dict.h" +#include "log.h" +#include "pixfmt.h" +#include "samplefmt.h" +#include "version.h" + +/** + * @defgroup avoptions AVOptions + * @ingroup lavu_data + * @{ + * AVOptions provide a generic system to declare options on arbitrary structs + * ("objects"). An option can have a help text, a type and a range of possible + * values. Options may then be enumerated, read and written to. + * + * @section avoptions_implement Implementing AVOptions + * This section describes how to add AVOptions capabilities to a struct. + * + * All AVOptions-related information is stored in an AVClass. Therefore + * the first member of the struct should be a pointer to an AVClass describing it. + * The option field of the AVClass must be set to a NULL-terminated static array + * of AVOptions. Each AVOption must have a non-empty name, a type, a default + * value and for number-type AVOptions also a range of allowed values. It must + * also declare an offset in bytes from the start of the struct, where the field + * associated with this AVOption is located. Other fields in the AVOption struct + * should also be set when applicable, but are not required. + * + * The following example illustrates an AVOptions-enabled struct: + * @code + * typedef struct test_struct { + * const AVClass *class; + * int int_opt; + * char *str_opt; + * uint8_t *bin_opt; + * int bin_len; + * } test_struct; + * + * static const AVOption test_options[] = { + * { "test_int", "This is a test option of int type.", offsetof(test_struct, int_opt), + * AV_OPT_TYPE_INT, { .i64 = -1 }, INT_MIN, INT_MAX }, + * { "test_str", "This is a test option of string type.", offsetof(test_struct, str_opt), + * AV_OPT_TYPE_STRING }, + * { "test_bin", "This is a test option of binary type.", offsetof(test_struct, bin_opt), + * AV_OPT_TYPE_BINARY }, + * { NULL }, + * }; + * + * static const AVClass test_class = { + * .class_name = "test class", + * .item_name = av_default_item_name, + * .option = test_options, + * .version = LIBAVUTIL_VERSION_INT, + * }; + * @endcode + * + * Next, when allocating your struct, you must ensure that the AVClass pointer + * is set to the correct value. Then, av_opt_set_defaults() can be called to + * initialize defaults. After that the struct is ready to be used with the + * AVOptions API. + * + * When cleaning up, you may use the av_opt_free() function to automatically + * free all the allocated string and binary options. + * + * Continuing with the above example: + * + * @code + * test_struct *alloc_test_struct(void) + * { + * test_struct *ret = av_mallocz(sizeof(*ret)); + * ret->class = &test_class; + * av_opt_set_defaults(ret); + * return ret; + * } + * void free_test_struct(test_struct **foo) + * { + * av_opt_free(*foo); + * av_freep(foo); + * } + * @endcode + * + * @subsection avoptions_implement_nesting Nesting + * It may happen that an AVOptions-enabled struct contains another + * AVOptions-enabled struct as a member (e.g. AVCodecContext in + * libavcodec exports generic options, while its priv_data field exports + * codec-specific options). In such a case, it is possible to set up the + * parent struct to export a child's options. To do that, simply + * implement AVClass.child_next() and AVClass.child_class_next() in the + * parent struct's AVClass. + * Assuming that the test_struct from above now also contains a + * child_struct field: + * + * @code + * typedef struct child_struct { + * AVClass *class; + * int flags_opt; + * } child_struct; + * static const AVOption child_opts[] = { + * { "test_flags", "This is a test option of flags type.", + * offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX }, + * { NULL }, + * }; + * static const AVClass child_class = { + * .class_name = "child class", + * .item_name = av_default_item_name, + * .option = child_opts, + * .version = LIBAVUTIL_VERSION_INT, + * }; + * + * void *child_next(void *obj, void *prev) + * { + * test_struct *t = obj; + * if (!prev && t->child_struct) + * return t->child_struct; + * return NULL + * } + * const AVClass child_class_next(const AVClass *prev) + * { + * return prev ? NULL : &child_class; + * } + * @endcode + * Putting child_next() and child_class_next() as defined above into + * test_class will now make child_struct's options accessible through + * test_struct (again, proper setup as described above needs to be done on + * child_struct right after it is created). + * + * From the above example it might not be clear why both child_next() + * and child_class_next() are needed. The distinction is that child_next() + * iterates over actually existing objects, while child_class_next() + * iterates over all possible child classes. E.g. if an AVCodecContext + * was initialized to use a codec which has private options, then its + * child_next() will return AVCodecContext.priv_data and finish + * iterating. OTOH child_class_next() on AVCodecContext.av_class will + * iterate over all available codecs with private options. + * + * @subsection avoptions_implement_named_constants Named constants + * It is possible to create named constants for options. Simply set the unit + * field of the option the constants should apply to a string and + * create the constants themselves as options of type AV_OPT_TYPE_CONST + * with their unit field set to the same string. + * Their default_val field should contain the value of the named + * constant. + * For example, to add some named constants for the test_flags option + * above, put the following into the child_opts array: + * @code + * { "test_flags", "This is a test option of flags type.", + * offsetof(child_struct, flags_opt), AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT_MIN, INT_MAX, "test_unit" }, + * { "flag1", "This is a flag with value 16", 0, AV_OPT_TYPE_CONST, { .i64 = 16 }, 0, 0, "test_unit" }, + * @endcode + * + * @section avoptions_use Using AVOptions + * This section deals with accessing options in an AVOptions-enabled struct. + * Such structs in FFmpeg are e.g. AVCodecContext in libavcodec or + * AVFormatContext in libavformat. + * + * @subsection avoptions_use_examine Examining AVOptions + * The basic functions for examining options are av_opt_next(), which iterates + * over all options defined for one object, and av_opt_find(), which searches + * for an option with the given name. + * + * The situation is more complicated with nesting. An AVOptions-enabled struct + * may have AVOptions-enabled children. Passing the AV_OPT_SEARCH_CHILDREN flag + * to av_opt_find() will make the function search children recursively. + * + * For enumerating there are basically two cases. The first is when you want to + * get all options that may potentially exist on the struct and its children + * (e.g. when constructing documentation). In that case you should call + * av_opt_child_class_next() recursively on the parent struct's AVClass. The + * second case is when you have an already initialized struct with all its + * children and you want to get all options that can be actually written or read + * from it. In that case you should call av_opt_child_next() recursively (and + * av_opt_next() on each result). + * + * @subsection avoptions_use_get_set Reading and writing AVOptions + * When setting options, you often have a string read directly from the + * user. In such a case, simply passing it to av_opt_set() is enough. For + * non-string type options, av_opt_set() will parse the string according to the + * option type. + * + * Similarly av_opt_get() will read any option type and convert it to a string + * which will be returned. Do not forget that the string is allocated, so you + * have to free it with av_free(). + * + * In some cases it may be more convenient to put all options into an + * AVDictionary and call av_opt_set_dict() on it. A specific case of this + * are the format/codec open functions in lavf/lavc which take a dictionary + * filled with option as a parameter. This makes it possible to set some options + * that cannot be set otherwise, since e.g. the input file format is not known + * before the file is actually opened. + */ + +enum AVOptionType{ + AV_OPT_TYPE_FLAGS, + AV_OPT_TYPE_INT, + AV_OPT_TYPE_INT64, + AV_OPT_TYPE_DOUBLE, + AV_OPT_TYPE_FLOAT, + AV_OPT_TYPE_STRING, + AV_OPT_TYPE_RATIONAL, + AV_OPT_TYPE_BINARY, ///< offset must point to a pointer immediately followed by an int for the length + AV_OPT_TYPE_DICT, + AV_OPT_TYPE_UINT64, + AV_OPT_TYPE_CONST, + AV_OPT_TYPE_IMAGE_SIZE, ///< offset must point to two consecutive integers + AV_OPT_TYPE_PIXEL_FMT, + AV_OPT_TYPE_SAMPLE_FMT, + AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational + AV_OPT_TYPE_DURATION, + AV_OPT_TYPE_COLOR, + AV_OPT_TYPE_CHANNEL_LAYOUT, + AV_OPT_TYPE_BOOL, +}; + +/** + * AVOption + */ +typedef struct AVOption { + const char *name; + + /** + * short English help text + * @todo What about other languages? + */ + const char *help; + + /** + * The offset relative to the context structure where the option + * value is stored. It should be 0 for named constants. + */ + int offset; + enum AVOptionType type; + + /** + * the default value for scalar options + */ + union { + int64_t i64; + double dbl; + const char *str; + /* TODO those are unused now */ + AVRational q; + } default_val; + double min; ///< minimum valid value for the option + double max; ///< maximum valid value for the option + + int flags; +#define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding +#define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding +#define AV_OPT_FLAG_AUDIO_PARAM 8 +#define AV_OPT_FLAG_VIDEO_PARAM 16 +#define AV_OPT_FLAG_SUBTITLE_PARAM 32 +/** + * The option is intended for exporting values to the caller. + */ +#define AV_OPT_FLAG_EXPORT 64 +/** + * The option may not be set through the AVOptions API, only read. + * This flag only makes sense when AV_OPT_FLAG_EXPORT is also set. + */ +#define AV_OPT_FLAG_READONLY 128 +#define AV_OPT_FLAG_BSF_PARAM (1<<8) ///< a generic parameter which can be set by the user for bit stream filtering +#define AV_OPT_FLAG_RUNTIME_PARAM (1<<15) ///< a generic parameter which can be set by the user at runtime +#define AV_OPT_FLAG_FILTERING_PARAM (1<<16) ///< a generic parameter which can be set by the user for filtering +#define AV_OPT_FLAG_DEPRECATED (1<<17) ///< set if option is deprecated, users should refer to AVOption.help text for more information +#define AV_OPT_FLAG_CHILD_CONSTS (1<<18) ///< set if option constants can also reside in child objects +//FIXME think about enc-audio, ... style flags + + /** + * The logical unit to which the option belongs. Non-constant + * options and corresponding named constants share the same + * unit. May be NULL. + */ + const char *unit; +} AVOption; + +/** + * A single allowed range of values, or a single allowed value. + */ +typedef struct AVOptionRange { + const char *str; + /** + * Value range. + * For string ranges this represents the min/max length. + * For dimensions this represents the min/max pixel count or width/height in multi-component case. + */ + double value_min, value_max; + /** + * Value's component range. + * For string this represents the unicode range for chars, 0-127 limits to ASCII. + */ + double component_min, component_max; + /** + * Range flag. + * If set to 1 the struct encodes a range, if set to 0 a single value. + */ + int is_range; +} AVOptionRange; + +/** + * List of AVOptionRange structs. + */ +typedef struct AVOptionRanges { + /** + * Array of option ranges. + * + * Most of option types use just one component. + * Following describes multi-component option types: + * + * AV_OPT_TYPE_IMAGE_SIZE: + * component index 0: range of pixel count (width * height). + * component index 1: range of width. + * component index 2: range of height. + * + * @note To obtain multi-component version of this structure, user must + * provide AV_OPT_MULTI_COMPONENT_RANGE to av_opt_query_ranges or + * av_opt_query_ranges_default function. + * + * Multi-component range can be read as in following example: + * + * @code + * int range_index, component_index; + * AVOptionRanges *ranges; + * AVOptionRange *range[3]; //may require more than 3 in the future. + * av_opt_query_ranges(&ranges, obj, key, AV_OPT_MULTI_COMPONENT_RANGE); + * for (range_index = 0; range_index < ranges->nb_ranges; range_index++) { + * for (component_index = 0; component_index < ranges->nb_components; component_index++) + * range[component_index] = ranges->range[ranges->nb_ranges * component_index + range_index]; + * //do something with range here. + * } + * av_opt_freep_ranges(&ranges); + * @endcode + */ + AVOptionRange **range; + /** + * Number of ranges per component. + */ + int nb_ranges; + /** + * Number of componentes. + */ + int nb_components; +} AVOptionRanges; + +/** + * Show the obj options. + * + * @param req_flags requested flags for the options to show. Show only the + * options for which it is opt->flags & req_flags. + * @param rej_flags rejected flags for the options to show. Show only the + * options for which it is !(opt->flags & req_flags). + * @param av_log_obj log context to use for showing the options + */ +int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags); + +/** + * Set the values of all AVOption fields to their default values. + * + * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass) + */ +void av_opt_set_defaults(void *s); + +/** + * Set the values of all AVOption fields to their default values. Only these + * AVOption fields for which (opt->flags & mask) == flags will have their + * default applied to s. + * + * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass) + * @param mask combination of AV_OPT_FLAG_* + * @param flags combination of AV_OPT_FLAG_* + */ +void av_opt_set_defaults2(void *s, int mask, int flags); + +/** + * Parse the key/value pairs list in opts. For each key/value pair + * found, stores the value in the field in ctx that is named like the + * key. ctx must be an AVClass context, storing is done using + * AVOptions. + * + * @param opts options string to parse, may be NULL + * @param key_val_sep a 0-terminated list of characters used to + * separate key from value + * @param pairs_sep a 0-terminated list of characters used to separate + * two pairs from each other + * @return the number of successfully set key/value pairs, or a negative + * value corresponding to an AVERROR code in case of error: + * AVERROR(EINVAL) if opts cannot be parsed, + * the error code issued by av_opt_set() if a key/value pair + * cannot be set + */ +int av_set_options_string(void *ctx, const char *opts, + const char *key_val_sep, const char *pairs_sep); + +/** + * Parse the key-value pairs list in opts. For each key=value pair found, + * set the value of the corresponding option in ctx. + * + * @param ctx the AVClass object to set options on + * @param opts the options string, key-value pairs separated by a + * delimiter + * @param shorthand a NULL-terminated array of options names for shorthand + * notation: if the first field in opts has no key part, + * the key is taken from the first element of shorthand; + * then again for the second, etc., until either opts is + * finished, shorthand is finished or a named option is + * found; after that, all options must be named + * @param key_val_sep a 0-terminated list of characters used to separate + * key from value, for example '=' + * @param pairs_sep a 0-terminated list of characters used to separate + * two pairs from each other, for example ':' or ',' + * @return the number of successfully set key=value pairs, or a negative + * value corresponding to an AVERROR code in case of error: + * AVERROR(EINVAL) if opts cannot be parsed, + * the error code issued by av_set_string3() if a key/value pair + * cannot be set + * + * Options names must use only the following characters: a-z A-Z 0-9 - . / _ + * Separators must use characters distinct from option names and from each + * other. + */ +int av_opt_set_from_string(void *ctx, const char *opts, + const char *const *shorthand, + const char *key_val_sep, const char *pairs_sep); +/** + * Free all allocated objects in obj. + */ +void av_opt_free(void *obj); + +/** + * Check whether a particular flag is set in a flags field. + * + * @param field_name the name of the flag field option + * @param flag_name the name of the flag to check + * @return non-zero if the flag is set, zero if the flag isn't set, + * isn't of the right type, or the flags field doesn't exist. + */ +int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name); + +/** + * Set all the options from a given dictionary on an object. + * + * @param obj a struct whose first element is a pointer to AVClass + * @param options options to process. This dictionary will be freed and replaced + * by a new one containing all options not found in obj. + * Of course this new dictionary needs to be freed by caller + * with av_dict_free(). + * + * @return 0 on success, a negative AVERROR if some option was found in obj, + * but could not be set. + * + * @see av_dict_copy() + */ +int av_opt_set_dict(void *obj, struct AVDictionary **options); + + +/** + * Set all the options from a given dictionary on an object. + * + * @param obj a struct whose first element is a pointer to AVClass + * @param options options to process. This dictionary will be freed and replaced + * by a new one containing all options not found in obj. + * Of course this new dictionary needs to be freed by caller + * with av_dict_free(). + * @param search_flags A combination of AV_OPT_SEARCH_*. + * + * @return 0 on success, a negative AVERROR if some option was found in obj, + * but could not be set. + * + * @see av_dict_copy() + */ +int av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags); + +/** + * Extract a key-value pair from the beginning of a string. + * + * @param ropts pointer to the options string, will be updated to + * point to the rest of the string (one of the pairs_sep + * or the final NUL) + * @param key_val_sep a 0-terminated list of characters used to separate + * key from value, for example '=' + * @param pairs_sep a 0-terminated list of characters used to separate + * two pairs from each other, for example ':' or ',' + * @param flags flags; see the AV_OPT_FLAG_* values below + * @param rkey parsed key; must be freed using av_free() + * @param rval parsed value; must be freed using av_free() + * + * @return >=0 for success, or a negative value corresponding to an + * AVERROR code in case of error; in particular: + * AVERROR(EINVAL) if no key is present + * + */ +int av_opt_get_key_value(const char **ropts, + const char *key_val_sep, const char *pairs_sep, + unsigned flags, + char **rkey, char **rval); + +enum { + + /** + * Accept to parse a value without a key; the key will then be returned + * as NULL. + */ + AV_OPT_FLAG_IMPLICIT_KEY = 1, +}; + +/** + * @defgroup opt_eval_funcs Evaluating option strings + * @{ + * This group of functions can be used to evaluate option strings + * and get numbers out of them. They do the same thing as av_opt_set(), + * except the result is written into the caller-supplied pointer. + * + * @param obj a struct whose first element is a pointer to AVClass. + * @param o an option for which the string is to be evaluated. + * @param val string to be evaluated. + * @param *_out value of the string will be written here. + * + * @return 0 on success, a negative number on failure. + */ +int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out); +int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out); +int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out); +int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out); +int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out); +int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational *q_out); +/** + * @} + */ + +#define AV_OPT_SEARCH_CHILDREN (1 << 0) /**< Search in possible children of the + given object first. */ +/** + * The obj passed to av_opt_find() is fake -- only a double pointer to AVClass + * instead of a required pointer to a struct containing AVClass. This is + * useful for searching for options without needing to allocate the corresponding + * object. + */ +#define AV_OPT_SEARCH_FAKE_OBJ (1 << 1) + +/** + * In av_opt_get, return NULL if the option has a pointer type and is set to NULL, + * rather than returning an empty string. + */ +#define AV_OPT_ALLOW_NULL (1 << 2) + +/** + * Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than + * one component for certain option types. + * @see AVOptionRanges for details. + */ +#define AV_OPT_MULTI_COMPONENT_RANGE (1 << 12) + +/** + * Look for an option in an object. Consider only options which + * have all the specified flags set. + * + * @param[in] obj A pointer to a struct whose first element is a + * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. + * @param[in] name The name of the option to look for. + * @param[in] unit When searching for named constants, name of the unit + * it belongs to. + * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG). + * @param search_flags A combination of AV_OPT_SEARCH_*. + * + * @return A pointer to the option found, or NULL if no option + * was found. + * + * @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable + * directly with av_opt_set(). Use special calls which take an options + * AVDictionary (e.g. avformat_open_input()) to set options found with this + * flag. + */ +const AVOption *av_opt_find(void *obj, const char *name, const char *unit, + int opt_flags, int search_flags); + +/** + * Look for an option in an object. Consider only options which + * have all the specified flags set. + * + * @param[in] obj A pointer to a struct whose first element is a + * pointer to an AVClass. + * Alternatively a double pointer to an AVClass, if + * AV_OPT_SEARCH_FAKE_OBJ search flag is set. + * @param[in] name The name of the option to look for. + * @param[in] unit When searching for named constants, name of the unit + * it belongs to. + * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG). + * @param search_flags A combination of AV_OPT_SEARCH_*. + * @param[out] target_obj if non-NULL, an object to which the option belongs will be + * written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present + * in search_flags. This parameter is ignored if search_flags contain + * AV_OPT_SEARCH_FAKE_OBJ. + * + * @return A pointer to the option found, or NULL if no option + * was found. + */ +const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, + int opt_flags, int search_flags, void **target_obj); + +/** + * Iterate over all AVOptions belonging to obj. + * + * @param obj an AVOptions-enabled struct or a double pointer to an + * AVClass describing it. + * @param prev result of the previous call to av_opt_next() on this object + * or NULL + * @return next AVOption or NULL + */ +const AVOption *av_opt_next(const void *obj, const AVOption *prev); + +/** + * Iterate over AVOptions-enabled children of obj. + * + * @param prev result of a previous call to this function or NULL + * @return next AVOptions-enabled child or NULL + */ +void *av_opt_child_next(void *obj, void *prev); + +/** + * Iterate over potential AVOptions-enabled children of parent. + * + * @param prev result of a previous call to this function or NULL + * @return AVClass corresponding to next potential child or NULL + */ +const AVClass *av_opt_child_class_next(const AVClass *parent, const AVClass *prev); + +/** + * @defgroup opt_set_funcs Option setting functions + * @{ + * Those functions set the field of obj with the given name to value. + * + * @param[in] obj A struct whose first element is a pointer to an AVClass. + * @param[in] name the name of the field to set + * @param[in] val The value to set. In case of av_opt_set() if the field is not + * of a string type, then the given string is parsed. + * SI postfixes and some named scalars are supported. + * If the field is of a numeric type, it has to be a numeric or named + * scalar. Behavior with more than one scalar and +- infix operators + * is undefined. + * If the field is of a flags type, it has to be a sequence of numeric + * scalars or named flags separated by '+' or '-'. Prefixing a flag + * with '+' causes it to be set without affecting the other flags; + * similarly, '-' unsets a flag. + * If the field is of a dictionary type, it has to be a ':' separated list of + * key=value parameters. Values containing ':' special characters must be + * escaped. + * @param search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN + * is passed here, then the option may be set on a child of obj. + * + * @return 0 if the value has been set, or an AVERROR code in case of + * error: + * AVERROR_OPTION_NOT_FOUND if no matching option exists + * AVERROR(ERANGE) if the value is out of range + * AVERROR(EINVAL) if the value is not valid + */ +int av_opt_set (void *obj, const char *name, const char *val, int search_flags); +int av_opt_set_int (void *obj, const char *name, int64_t val, int search_flags); +int av_opt_set_double (void *obj, const char *name, double val, int search_flags); +int av_opt_set_q (void *obj, const char *name, AVRational val, int search_flags); +int av_opt_set_bin (void *obj, const char *name, const uint8_t *val, int size, int search_flags); +int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_flags); +int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags); +int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags); +int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags); +int av_opt_set_channel_layout(void *obj, const char *name, int64_t ch_layout, int search_flags); +/** + * @note Any old dictionary present is discarded and replaced with a copy of the new one. The + * caller still owns val is and responsible for freeing it. + */ +int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags); + +/** + * Set a binary option to an integer list. + * + * @param obj AVClass object to set options on + * @param name name of the binary option + * @param val pointer to an integer list (must have the correct type with + * regard to the contents of the list) + * @param term list terminator (usually 0 or -1) + * @param flags search flags + */ +#define av_opt_set_int_list(obj, name, val, term, flags) \ + (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \ + AVERROR(EINVAL) : \ + av_opt_set_bin(obj, name, (const uint8_t *)(val), \ + av_int_list_length(val, term) * sizeof(*(val)), flags)) + +/** + * @} + */ + +/** + * @defgroup opt_get_funcs Option getting functions + * @{ + * Those functions get a value of the option with the given name from an object. + * + * @param[in] obj a struct whose first element is a pointer to an AVClass. + * @param[in] name name of the option to get. + * @param[in] search_flags flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN + * is passed here, then the option may be found in a child of obj. + * @param[out] out_val value of the option will be written here + * @return >=0 on success, a negative error code otherwise + */ +/** + * @note the returned string will be av_malloc()ed and must be av_free()ed by the caller + * + * @note if AV_OPT_ALLOW_NULL is set in search_flags in av_opt_get, and the + * option is of type AV_OPT_TYPE_STRING, AV_OPT_TYPE_BINARY or AV_OPT_TYPE_DICT + * and is set to NULL, *out_val will be set to NULL instead of an allocated + * empty string. + */ +int av_opt_get (void *obj, const char *name, int search_flags, uint8_t **out_val); +int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val); +int av_opt_get_double (void *obj, const char *name, int search_flags, double *out_val); +int av_opt_get_q (void *obj, const char *name, int search_flags, AVRational *out_val); +int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_out, int *h_out); +int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt); +int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt); +int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val); +int av_opt_get_channel_layout(void *obj, const char *name, int search_flags, int64_t *ch_layout); +/** + * @param[out] out_val The returned dictionary is a copy of the actual value and must + * be freed with av_dict_free() by the caller + */ +int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDictionary **out_val); +/** + * @} + */ +/** + * Gets a pointer to the requested field in a struct. + * This function allows accessing a struct even when its fields are moved or + * renamed since the application making the access has been compiled, + * + * @returns a pointer to the field, it can be cast to the correct type and read + * or written to. + */ +void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name); + +/** + * Free an AVOptionRanges struct and set it to NULL. + */ +void av_opt_freep_ranges(AVOptionRanges **ranges); + +/** + * Get a list of allowed ranges for the given option. + * + * The returned list may depend on other fields in obj like for example profile. + * + * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored + * AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance + * AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges + * + * The result must be freed with av_opt_freep_ranges. + * + * @return number of compontents returned on success, a negative errro code otherwise + */ +int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags); + +/** + * Copy options from src object into dest object. + * + * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. + * Original memory allocated for such options is freed unless both src and dest options points to the same memory. + * + * @param dest Object to copy from + * @param src Object to copy into + * @return 0 on success, negative on error + */ +int av_opt_copy(void *dest, const void *src); + +/** + * Get a default list of allowed ranges for the given option. + * + * This list is constructed without using the AVClass.query_ranges() callback + * and can be used as fallback from within the callback. + * + * @param flags is a bitmask of flags, undefined flags should not be set and should be ignored + * AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance + * AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges + * + * The result must be freed with av_opt_free_ranges. + * + * @return number of compontents returned on success, a negative errro code otherwise + */ +int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags); + +/** + * Check if given option is set to its default value. + * + * Options o must belong to the obj. This function must not be called to check child's options state. + * @see av_opt_is_set_to_default_by_name(). + * + * @param obj AVClass object to check option on + * @param o option to be checked + * @return >0 when option is set to its default, + * 0 when option is not set its default, + * <0 on error + */ +int av_opt_is_set_to_default(void *obj, const AVOption *o); + +/** + * Check if given option is set to its default value. + * + * @param obj AVClass object to check option on + * @param name option name + * @param search_flags combination of AV_OPT_SEARCH_* + * @return >0 when option is set to its default, + * 0 when option is not set its default, + * <0 on error + */ +int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags); + + +#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 ///< Serialize options that are not set to default values only. +#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 ///< Serialize options that exactly match opt_flags only. + +/** + * Serialize object's options. + * + * Create a string containing object's serialized options. + * Such string may be passed back to av_opt_set_from_string() in order to restore option values. + * A key/value or pairs separator occurring in the serialized value or + * name string are escaped through the av_escape() function. + * + * @param[in] obj AVClass object to serialize + * @param[in] opt_flags serialize options with all the specified flags set (AV_OPT_FLAG) + * @param[in] flags combination of AV_OPT_SERIALIZE_* flags + * @param[out] buffer Pointer to buffer that will be allocated with string containg serialized options. + * Buffer must be freed by the caller when is no longer needed. + * @param[in] key_val_sep character used to separate key from value + * @param[in] pairs_sep character used to separate two pairs from each other + * @return >= 0 on success, negative on error + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. + */ +int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, + const char key_val_sep, const char pairs_sep); +/** + * @} + */ + +#endif /* AVUTIL_OPT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/parseutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/parseutils.h new file mode 100644 index 00000000..e66d24b7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/parseutils.h @@ -0,0 +1,193 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PARSEUTILS_H +#define AVUTIL_PARSEUTILS_H + +#include + +#include "rational.h" + +/** + * @file + * misc parsing utilities + */ + +/** + * Parse str and store the parsed ratio in q. + * + * Note that a ratio with infinite (1/0) or negative value is + * considered valid, so you should check on the returned value if you + * want to exclude those values. + * + * The undefined value can be expressed using the "0:0" string. + * + * @param[in,out] q pointer to the AVRational which will contain the ratio + * @param[in] str the string to parse: it has to be a string in the format + * num:den, a float number or an expression + * @param[in] max the maximum allowed numerator and denominator + * @param[in] log_offset log level offset which is applied to the log + * level of log_ctx + * @param[in] log_ctx parent logging context + * @return >= 0 on success, a negative error code otherwise + */ +int av_parse_ratio(AVRational *q, const char *str, int max, + int log_offset, void *log_ctx); + +#define av_parse_ratio_quiet(rate, str, max) \ + av_parse_ratio(rate, str, max, AV_LOG_MAX_OFFSET, NULL) + +/** + * Parse str and put in width_ptr and height_ptr the detected values. + * + * @param[in,out] width_ptr pointer to the variable which will contain the detected + * width value + * @param[in,out] height_ptr pointer to the variable which will contain the detected + * height value + * @param[in] str the string to parse: it has to be a string in the format + * width x height or a valid video size abbreviation. + * @return >= 0 on success, a negative error code otherwise + */ +int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str); + +/** + * Parse str and store the detected values in *rate. + * + * @param[in,out] rate pointer to the AVRational which will contain the detected + * frame rate + * @param[in] str the string to parse: it has to be a string in the format + * rate_num / rate_den, a float number or a valid video rate abbreviation + * @return >= 0 on success, a negative error code otherwise + */ +int av_parse_video_rate(AVRational *rate, const char *str); + +/** + * Put the RGBA values that correspond to color_string in rgba_color. + * + * @param color_string a string specifying a color. It can be the name of + * a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence, + * possibly followed by "@" and a string representing the alpha + * component. + * The alpha component may be a string composed by "0x" followed by an + * hexadecimal number or a decimal number between 0.0 and 1.0, which + * represents the opacity value (0x00/0.0 means completely transparent, + * 0xff/1.0 completely opaque). + * If the alpha component is not specified then 0xff is assumed. + * The string "random" will result in a random color. + * @param slen length of the initial part of color_string containing the + * color. It can be set to -1 if color_string is a null terminated string + * containing nothing else than the color. + * @return >= 0 in case of success, a negative value in case of + * failure (for example if color_string cannot be parsed). + */ +int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, + void *log_ctx); + +/** + * Get the name of a color from the internal table of hard-coded named + * colors. + * + * This function is meant to enumerate the color names recognized by + * av_parse_color(). + * + * @param color_idx index of the requested color, starting from 0 + * @param rgbp if not NULL, will point to a 3-elements array with the color value in RGB + * @return the color name string or NULL if color_idx is not in the array + */ +const char *av_get_known_color_name(int color_idx, const uint8_t **rgb); + +/** + * Parse timestr and return in *time a corresponding number of + * microseconds. + * + * @param timeval puts here the number of microseconds corresponding + * to the string in timestr. If the string represents a duration, it + * is the number of microseconds contained in the time interval. If + * the string is a date, is the number of microseconds since 1st of + * January, 1970 up to the time of the parsed date. If timestr cannot + * be successfully parsed, set *time to INT64_MIN. + + * @param timestr a string representing a date or a duration. + * - If a date the syntax is: + * @code + * [{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH:MM:SS[.m...]]]}|{HHMMSS[.m...]]]}}[Z] + * now + * @endcode + * If the value is "now" it takes the current time. + * Time is local time unless Z is appended, in which case it is + * interpreted as UTC. + * If the year-month-day part is not specified it takes the current + * year-month-day. + * - If a duration the syntax is: + * @code + * [-][HH:]MM:SS[.m...] + * [-]S+[.m...] + * @endcode + * @param duration flag which tells how to interpret timestr, if not + * zero timestr is interpreted as a duration, otherwise as a date + * @return >= 0 in case of success, a negative value corresponding to an + * AVERROR code otherwise + */ +int av_parse_time(int64_t *timeval, const char *timestr, int duration); + +/** + * Attempt to find a specific tag in a URL. + * + * syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done. + * Return 1 if found. + */ +int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info); + +/** + * Simplified version of strptime + * + * Parse the input string p according to the format string fmt and + * store its results in the structure dt. + * This implementation supports only a subset of the formats supported + * by the standard strptime(). + * + * The supported input field descriptors are listed below. + * - %H: the hour as a decimal number, using a 24-hour clock, in the + * range '00' through '23' + * - %J: hours as a decimal number, in the range '0' through INT_MAX + * - %M: the minute as a decimal number, using a 24-hour clock, in the + * range '00' through '59' + * - %S: the second as a decimal number, using a 24-hour clock, in the + * range '00' through '59' + * - %Y: the year as a decimal number, using the Gregorian calendar + * - %m: the month as a decimal number, in the range '1' through '12' + * - %d: the day of the month as a decimal number, in the range '1' + * through '31' + * - %T: alias for '%H:%M:%S' + * - %%: a literal '%' + * + * @return a pointer to the first character not processed in this function + * call. In case the input string contains more characters than + * required by the format string the return value points right after + * the last consumed input character. In case the whole input string + * is consumed the return value points to the null byte at the end of + * the string. On failure NULL is returned. + */ +char *av_small_strptime(const char *p, const char *fmt, struct tm *dt); + +/** + * Convert the decomposed UTC time in tm to a time_t value. + */ +time_t av_timegm(struct tm *tm); + +#endif /* AVUTIL_PARSEUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pca.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pca.h new file mode 100644 index 00000000..992bb2eb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pca.h @@ -0,0 +1,35 @@ +/* + * principal component analysis (PCA) + * Copyright (c) 2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * principal component analysis (PCA) + */ + +#ifndef AVUTIL_PCA_H +#define AVUTIL_PCA_H + +struct PCA *ff_pca_init(int n); +void ff_pca_free(struct PCA *pca); +void ff_pca_add(struct PCA *pca, const double *v); +int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue); + +#endif /* AVUTIL_PCA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixdesc.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixdesc.h new file mode 100644 index 00000000..c055810a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixdesc.h @@ -0,0 +1,440 @@ +/* + * pixel format descriptor + * Copyright (c) 2009 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PIXDESC_H +#define AVUTIL_PIXDESC_H + +#include + +#include "attributes.h" +#include "pixfmt.h" +#include "version.h" + +typedef struct AVComponentDescriptor { + /** + * Which of the 4 planes contains the component. + */ + int plane; + + /** + * Number of elements between 2 horizontally consecutive pixels. + * Elements are bits for bitstream formats, bytes otherwise. + */ + int step; + + /** + * Number of elements before the component of the first pixel. + * Elements are bits for bitstream formats, bytes otherwise. + */ + int offset; + + /** + * Number of least significant bits that must be shifted away + * to get the value. + */ + int shift; + + /** + * Number of bits in the component. + */ + int depth; + +#if FF_API_PLUS1_MINUS1 + /** deprecated, use step instead */ + attribute_deprecated int step_minus1; + + /** deprecated, use depth instead */ + attribute_deprecated int depth_minus1; + + /** deprecated, use offset instead */ + attribute_deprecated int offset_plus1; +#endif +} AVComponentDescriptor; + +/** + * Descriptor that unambiguously describes how the bits of a pixel are + * stored in the up to 4 data planes of an image. It also stores the + * subsampling factors and number of components. + * + * @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV + * and all the YUV variants) AVPixFmtDescriptor just stores how values + * are stored not what these values represent. + */ +typedef struct AVPixFmtDescriptor { + const char *name; + uint8_t nb_components; ///< The number of components each pixel has, (1-4) + + /** + * Amount to shift the luma width right to find the chroma width. + * For YV12 this is 1 for example. + * chroma_width = AV_CEIL_RSHIFT(luma_width, log2_chroma_w) + * The note above is needed to ensure rounding up. + * This value only refers to the chroma components. + */ + uint8_t log2_chroma_w; + + /** + * Amount to shift the luma height right to find the chroma height. + * For YV12 this is 1 for example. + * chroma_height= AV_CEIL_RSHIFT(luma_height, log2_chroma_h) + * The note above is needed to ensure rounding up. + * This value only refers to the chroma components. + */ + uint8_t log2_chroma_h; + + /** + * Combination of AV_PIX_FMT_FLAG_... flags. + */ + uint64_t flags; + + /** + * Parameters that describe how pixels are packed. + * If the format has 1 or 2 components, then luma is 0. + * If the format has 3 or 4 components: + * if the RGB flag is set then 0 is red, 1 is green and 2 is blue; + * otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V. + * + * If present, the Alpha channel is always the last component. + */ + AVComponentDescriptor comp[4]; + + /** + * Alternative comma-separated names. + */ + const char *alias; +} AVPixFmtDescriptor; + +/** + * Pixel format is big-endian. + */ +#define AV_PIX_FMT_FLAG_BE (1 << 0) +/** + * Pixel format has a palette in data[1], values are indexes in this palette. + */ +#define AV_PIX_FMT_FLAG_PAL (1 << 1) +/** + * All values of a component are bit-wise packed end to end. + */ +#define AV_PIX_FMT_FLAG_BITSTREAM (1 << 2) +/** + * Pixel format is an HW accelerated format. + */ +#define AV_PIX_FMT_FLAG_HWACCEL (1 << 3) +/** + * At least one pixel component is not in the first data plane. + */ +#define AV_PIX_FMT_FLAG_PLANAR (1 << 4) +/** + * The pixel format contains RGB-like data (as opposed to YUV/grayscale). + */ +#define AV_PIX_FMT_FLAG_RGB (1 << 5) + +/** + * The pixel format is "pseudo-paletted". This means that it contains a + * fixed palette in the 2nd plane but the palette is fixed/constant for each + * PIX_FMT. This allows interpreting the data as if it was PAL8, which can + * in some cases be simpler. Or the data can be interpreted purely based on + * the pixel format without using the palette. + * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8 + * + * @deprecated This flag is deprecated, and will be removed. When it is removed, + * the extra palette allocation in AVFrame.data[1] is removed as well. Only + * actual paletted formats (as indicated by AV_PIX_FMT_FLAG_PAL) will have a + * palette. Starting with FFmpeg versions which have this flag deprecated, the + * extra "pseudo" palette is already ignored, and API users are not required to + * allocate a palette for AV_PIX_FMT_FLAG_PSEUDOPAL formats (it was required + * before the deprecation, though). + */ +#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6) + +/** + * The pixel format has an alpha channel. This is set on all formats that + * support alpha in some way, including AV_PIX_FMT_PAL8. The alpha is always + * straight, never pre-multiplied. + * + * If a codec or a filter does not support alpha, it should set all alpha to + * opaque, or use the equivalent pixel formats without alpha component, e.g. + * AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA. + */ +#define AV_PIX_FMT_FLAG_ALPHA (1 << 7) + +/** + * The pixel format is following a Bayer pattern + */ +#define AV_PIX_FMT_FLAG_BAYER (1 << 8) + +/** + * The pixel format contains IEEE-754 floating point values. Precision (double, + * single, or half) should be determined by the pixel size (64, 32, or 16 bits). + */ +#define AV_PIX_FMT_FLAG_FLOAT (1 << 9) + +/** + * Return the number of bits per pixel used by the pixel format + * described by pixdesc. Note that this is not the same as the number + * of bits per sample. + * + * The returned number of bits refers to the number of bits actually + * used for storing the pixel information, that is padding bits are + * not counted. + */ +int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc); + +/** + * Return the number of bits per pixel for the pixel format + * described by pixdesc, including any padding or unused bits. + */ +int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc); + +/** + * @return a pixel format descriptor for provided pixel format or NULL if + * this pixel format is unknown. + */ +const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt); + +/** + * Iterate over all pixel format descriptors known to libavutil. + * + * @param prev previous descriptor. NULL to get the first descriptor. + * + * @return next descriptor or NULL after the last descriptor + */ +const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev); + +/** + * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc + * is not a valid pointer to a pixel format descriptor. + */ +enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc); + +/** + * Utility function to access log2_chroma_w log2_chroma_h from + * the pixel format AVPixFmtDescriptor. + * + * @param[in] pix_fmt the pixel format + * @param[out] h_shift store log2_chroma_w (horizontal/width shift) + * @param[out] v_shift store log2_chroma_h (vertical/height shift) + * + * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format + */ +int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, + int *h_shift, int *v_shift); + +/** + * @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a + * valid pixel format. + */ +int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt); + +/** + * @return the name for provided color range or NULL if unknown. + */ +const char *av_color_range_name(enum AVColorRange range); + +/** + * @return the AVColorRange value for name or an AVError if not found. + */ +int av_color_range_from_name(const char *name); + +/** + * @return the name for provided color primaries or NULL if unknown. + */ +const char *av_color_primaries_name(enum AVColorPrimaries primaries); + +/** + * @return the AVColorPrimaries value for name or an AVError if not found. + */ +int av_color_primaries_from_name(const char *name); + +/** + * @return the name for provided color transfer or NULL if unknown. + */ +const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer); + +/** + * @return the AVColorTransferCharacteristic value for name or an AVError if not found. + */ +int av_color_transfer_from_name(const char *name); + +/** + * @return the name for provided color space or NULL if unknown. + */ +const char *av_color_space_name(enum AVColorSpace space); + +/** + * @return the AVColorSpace value for name or an AVError if not found. + */ +int av_color_space_from_name(const char *name); + +/** + * @return the name for provided chroma location or NULL if unknown. + */ +const char *av_chroma_location_name(enum AVChromaLocation location); + +/** + * @return the AVChromaLocation value for name or an AVError if not found. + */ +int av_chroma_location_from_name(const char *name); + +/** + * Return the pixel format corresponding to name. + * + * If there is no pixel format with name name, then looks for a + * pixel format with the name corresponding to the native endian + * format of name. + * For example in a little-endian system, first looks for "gray16", + * then for "gray16le". + * + * Finally if no pixel format has been found, returns AV_PIX_FMT_NONE. + */ +enum AVPixelFormat av_get_pix_fmt(const char *name); + +/** + * Return the short name for a pixel format, NULL in case pix_fmt is + * unknown. + * + * @see av_get_pix_fmt(), av_get_pix_fmt_string() + */ +const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt); + +/** + * Print in buf the string corresponding to the pixel format with + * number pix_fmt, or a header if pix_fmt is negative. + * + * @param buf the buffer where to write the string + * @param buf_size the size of buf + * @param pix_fmt the number of the pixel format to print the + * corresponding info string, or a negative value to print the + * corresponding header. + */ +char *av_get_pix_fmt_string(char *buf, int buf_size, + enum AVPixelFormat pix_fmt); + +/** + * Read a line from an image, and write the values of the + * pixel format component c to dst. + * + * @param data the array containing the pointers to the planes of the image + * @param linesize the array containing the linesizes of the image + * @param desc the pixel format descriptor for the image + * @param x the horizontal coordinate of the first pixel to read + * @param y the vertical coordinate of the first pixel to read + * @param w the width of the line to read, that is the number of + * values to write to dst + * @param read_pal_component if not zero and the format is a paletted + * format writes the values corresponding to the palette + * component c in data[1] to dst, rather than the palette indexes in + * data[0]. The behavior is undefined if the format is not paletted. + * @param dst_element_size size of elements in dst array (2 or 4 byte) + */ +void av_read_image_line2(void *dst, const uint8_t *data[4], + const int linesize[4], const AVPixFmtDescriptor *desc, + int x, int y, int c, int w, int read_pal_component, + int dst_element_size); + +void av_read_image_line(uint16_t *dst, const uint8_t *data[4], + const int linesize[4], const AVPixFmtDescriptor *desc, + int x, int y, int c, int w, int read_pal_component); + +/** + * Write the values from src to the pixel format component c of an + * image line. + * + * @param src array containing the values to write + * @param data the array containing the pointers to the planes of the + * image to write into. It is supposed to be zeroed. + * @param linesize the array containing the linesizes of the image + * @param desc the pixel format descriptor for the image + * @param x the horizontal coordinate of the first pixel to write + * @param y the vertical coordinate of the first pixel to write + * @param w the width of the line to write, that is the number of + * values to write to the image line + * @param src_element_size size of elements in src array (2 or 4 byte) + */ +void av_write_image_line2(const void *src, uint8_t *data[4], + const int linesize[4], const AVPixFmtDescriptor *desc, + int x, int y, int c, int w, int src_element_size); + +void av_write_image_line(const uint16_t *src, uint8_t *data[4], + const int linesize[4], const AVPixFmtDescriptor *desc, + int x, int y, int c, int w); + +/** + * Utility function to swap the endianness of a pixel format. + * + * @param[in] pix_fmt the pixel format + * + * @return pixel format with swapped endianness if it exists, + * otherwise AV_PIX_FMT_NONE + */ +enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt); + +#define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ +#define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ +#define FF_LOSS_COLORSPACE 0x0004 /**< loss due to color space conversion */ +#define FF_LOSS_ALPHA 0x0008 /**< loss of alpha bits */ +#define FF_LOSS_COLORQUANT 0x0010 /**< loss due to color quantization */ +#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */ + +/** + * Compute what kind of losses will occur when converting from one specific + * pixel format to another. + * When converting from one pixel format to another, information loss may occur. + * For example, when converting from RGB24 to GRAY, the color information will + * be lost. Similarly, other losses occur when converting from some formats to + * other formats. These losses can involve loss of chroma, but also loss of + * resolution, loss of color depth, loss due to the color space conversion, loss + * of the alpha bits or loss due to color quantization. + * av_get_fix_fmt_loss() informs you about the various types of losses + * which will occur when converting from one pixel format to another. + * + * @param[in] dst_pix_fmt destination pixel format + * @param[in] src_pix_fmt source pixel format + * @param[in] has_alpha Whether the source pixel format alpha channel is used. + * @return Combination of flags informing you what kind of losses will occur + * (maximum loss for an invalid dst_pix_fmt). + */ +int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, + enum AVPixelFormat src_pix_fmt, + int has_alpha); + +/** + * Compute what kind of losses will occur when converting from one specific + * pixel format to another. + * When converting from one pixel format to another, information loss may occur. + * For example, when converting from RGB24 to GRAY, the color information will + * be lost. Similarly, other losses occur when converting from some formats to + * other formats. These losses can involve loss of chroma, but also loss of + * resolution, loss of color depth, loss due to the color space conversion, loss + * of the alpha bits or loss due to color quantization. + * av_get_fix_fmt_loss() informs you about the various types of losses + * which will occur when converting from one pixel format to another. + * + * @param[in] dst_pix_fmt destination pixel format + * @param[in] src_pix_fmt source pixel format + * @param[in] has_alpha Whether the source pixel format alpha channel is used. + * @return Combination of flags informing you what kind of losses will occur + * (maximum loss for an invalid dst_pix_fmt). + */ +enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, + enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); + +#endif /* AVUTIL_PIXDESC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixelutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixelutils.h new file mode 100644 index 00000000..a8dbc157 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/pixelutils.h @@ -0,0 +1,52 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PIXELUTILS_H +#define AVUTIL_PIXELUTILS_H + +#include +#include +#include "common.h" + +/** + * Sum of abs(src1[x] - src2[x]) + */ +typedef int (*av_pixelutils_sad_fn)(const uint8_t *src1, ptrdiff_t stride1, + const uint8_t *src2, ptrdiff_t stride2); + +/** + * Get a potentially optimized pointer to a Sum-of-absolute-differences + * function (see the av_pixelutils_sad_fn prototype). + * + * @param w_bits 1< + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PIXFMT_H +#define AVUTIL_PIXFMT_H + +/** + * @file + * pixel format definitions + */ + +#include "libavutil/avconfig.h" +#include "version.h" + +#define AVPALETTE_SIZE 1024 +#define AVPALETTE_COUNT 256 + +/** + * Pixel format. + * + * @note + * AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA + * color is put together as: + * (A << 24) | (R << 16) | (G << 8) | B + * This is stored as BGRA on little-endian CPU architectures and ARGB on + * big-endian CPUs. + * + * @note + * If the resolution is not a multiple of the chroma subsampling factor + * then the chroma plane resolution must be rounded up. + * + * @par + * When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized + * image data is stored in AVFrame.data[0]. The palette is transported in + * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is + * formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is + * also endian-specific). Note also that the individual RGB32 palette + * components stored in AVFrame.data[1] should be in the range 0..255. + * This is important as many custom PAL8 video codecs that were designed + * to run on the IBM VGA graphics adapter use 6-bit palette components. + * + * @par + * For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like + * for pal8. This palette is filled in automatically by the function + * allocating the picture. + */ +enum AVPixelFormat { + AV_PIX_FMT_NONE = -1, + AV_PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples) + AV_PIX_FMT_YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr + AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... + AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR... + AV_PIX_FMT_YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) + AV_PIX_FMT_YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples) + AV_PIX_FMT_YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) + AV_PIX_FMT_YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) + AV_PIX_FMT_GRAY8, ///< Y , 8bpp + AV_PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb + AV_PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb + AV_PIX_FMT_PAL8, ///< 8 bits with AV_PIX_FMT_RGB32 palette + AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range + AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range + AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range + AV_PIX_FMT_UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 + AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 + AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) + AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits + AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) + AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) + AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits + AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb) + AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) + AV_PIX_FMT_NV21, ///< as above, but U and V bytes are swapped + + AV_PIX_FMT_ARGB, ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB... + AV_PIX_FMT_RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA... + AV_PIX_FMT_ABGR, ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR... + AV_PIX_FMT_BGRA, ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA... + + AV_PIX_FMT_GRAY16BE, ///< Y , 16bpp, big-endian + AV_PIX_FMT_GRAY16LE, ///< Y , 16bpp, little-endian + AV_PIX_FMT_YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples) + AV_PIX_FMT_YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range + AV_PIX_FMT_YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples) + AV_PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian + AV_PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian + + AV_PIX_FMT_RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian + AV_PIX_FMT_RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian + AV_PIX_FMT_RGB555BE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined + AV_PIX_FMT_RGB555LE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined + + AV_PIX_FMT_BGR565BE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian + AV_PIX_FMT_BGR565LE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian + AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined + AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined + +#if FF_API_VAAPI + /** @name Deprecated pixel formats */ + /**@{*/ + AV_PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers + AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers + AV_PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a VASurfaceID + /**@}*/ + AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, +#else + /** + * Hardware acceleration through VA-API, data[3] contains a + * VASurfaceID. + */ + AV_PIX_FMT_VAAPI, +#endif + + AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer + + AV_PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined + AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined + AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined + AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined + AV_PIX_FMT_YA8, ///< 8 bits gray, 8 bits alpha + + AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 + AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 + + AV_PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian + AV_PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian + + /** + * The following 12 formats have the disadvantage of needing 1 format for each bit depth. + * Notice that each 9/10 bits sample is stored in 16 bits with extra padding. + * If you want to support multiple bit depths, then using AV_PIX_FMT_YUV420P16* with the bpp stored separately is better. + */ + AV_PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp + AV_PIX_FMT_GBR24P = AV_PIX_FMT_GBRP, // alias for #AV_PIX_FMT_GBRP + AV_PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big-endian + AV_PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little-endian + AV_PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big-endian + AV_PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little-endian + AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big-endian + AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little-endian + AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples) + AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples) + AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian + AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian + AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian + AV_PIX_FMT_YUVA422P9LE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian + AV_PIX_FMT_YUVA444P9BE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian + AV_PIX_FMT_YUVA444P9LE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian + AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian) + AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian) + AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian) + AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian) + AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian) + AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian) + AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian) + AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian) + AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian) + AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian) + AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian) + AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian) + + AV_PIX_FMT_VDPAU, ///< HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface + + AV_PIX_FMT_XYZ12LE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0 + AV_PIX_FMT_XYZ12BE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0 + AV_PIX_FMT_NV16, ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) + AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + + AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian + AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian + AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian + AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian + + AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb + + AV_PIX_FMT_YA16BE, ///< 16 bits gray, 16 bits alpha (big-endian) + AV_PIX_FMT_YA16LE, ///< 16 bits gray, 16 bits alpha (little-endian) + + AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp + AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian + AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian + /** + * HW acceleration through QSV, data[3] contains a pointer to the + * mfxFrameSurface1 structure. + */ + AV_PIX_FMT_QSV, + /** + * HW acceleration though MMAL, data[3] contains a pointer to the + * MMAL_BUFFER_HEADER_T structure. + */ + AV_PIX_FMT_MMAL, + + AV_PIX_FMT_D3D11VA_VLD, ///< HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer + + /** + * HW acceleration through CUDA. data[i] contain CUdeviceptr pointers + * exactly as for system memory frames. + */ + AV_PIX_FMT_CUDA, + + AV_PIX_FMT_0RGB, ///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined + AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined + AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined + AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined + + AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV420P14BE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian + AV_PIX_FMT_YUV420P14LE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian + AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV422P14BE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian + AV_PIX_FMT_YUV422P14LE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian + AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_YUV444P14BE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian + AV_PIX_FMT_YUV444P14LE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian + AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian + AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian + AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian + AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian + AV_PIX_FMT_YUVJ411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range + + AV_PIX_FMT_BAYER_BGGR8, ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples + AV_PIX_FMT_BAYER_RGGB8, ///< bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples + AV_PIX_FMT_BAYER_GBRG8, ///< bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples + AV_PIX_FMT_BAYER_GRBG8, ///< bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples + AV_PIX_FMT_BAYER_BGGR16LE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian + AV_PIX_FMT_BAYER_BGGR16BE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian + AV_PIX_FMT_BAYER_RGGB16LE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian + AV_PIX_FMT_BAYER_RGGB16BE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian + AV_PIX_FMT_BAYER_GBRG16LE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian + AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian + AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian + AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian + + AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing + + AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian + AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian + AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian + AV_PIX_FMT_YUV440P12BE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian + AV_PIX_FMT_AYUV64LE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian + AV_PIX_FMT_AYUV64BE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian + + AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox + + AV_PIX_FMT_P010LE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian + AV_PIX_FMT_P010BE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian + + AV_PIX_FMT_GBRAP12BE, ///< planar GBR 4:4:4:4 48bpp, big-endian + AV_PIX_FMT_GBRAP12LE, ///< planar GBR 4:4:4:4 48bpp, little-endian + + AV_PIX_FMT_GBRAP10BE, ///< planar GBR 4:4:4:4 40bpp, big-endian + AV_PIX_FMT_GBRAP10LE, ///< planar GBR 4:4:4:4 40bpp, little-endian + + AV_PIX_FMT_MEDIACODEC, ///< hardware decoding through MediaCodec + + AV_PIX_FMT_GRAY12BE, ///< Y , 12bpp, big-endian + AV_PIX_FMT_GRAY12LE, ///< Y , 12bpp, little-endian + AV_PIX_FMT_GRAY10BE, ///< Y , 10bpp, big-endian + AV_PIX_FMT_GRAY10LE, ///< Y , 10bpp, little-endian + + AV_PIX_FMT_P016LE, ///< like NV12, with 16bpp per component, little-endian + AV_PIX_FMT_P016BE, ///< like NV12, with 16bpp per component, big-endian + + /** + * Hardware surfaces for Direct3D11. + * + * This is preferred over the legacy AV_PIX_FMT_D3D11VA_VLD. The new D3D11 + * hwaccel API and filtering support AV_PIX_FMT_D3D11 only. + * + * data[0] contains a ID3D11Texture2D pointer, and data[1] contains the + * texture array index of the frame as intptr_t if the ID3D11Texture2D is + * an array texture (or always 0 if it's a normal texture). + */ + AV_PIX_FMT_D3D11, + + AV_PIX_FMT_GRAY9BE, ///< Y , 9bpp, big-endian + AV_PIX_FMT_GRAY9LE, ///< Y , 9bpp, little-endian + + AV_PIX_FMT_GBRPF32BE, ///< IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian + AV_PIX_FMT_GBRPF32LE, ///< IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian + AV_PIX_FMT_GBRAPF32BE, ///< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian + AV_PIX_FMT_GBRAPF32LE, ///< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian + + /** + * DRM-managed buffers exposed through PRIME buffer sharing. + * + * data[0] points to an AVDRMFrameDescriptor. + */ + AV_PIX_FMT_DRM_PRIME, + /** + * Hardware surfaces for OpenCL. + * + * data[i] contain 2D image objects (typed in C as cl_mem, used + * in OpenCL as image2d_t) for each plane of the surface. + */ + AV_PIX_FMT_OPENCL, + + AV_PIX_FMT_GRAY14BE, ///< Y , 14bpp, big-endian + AV_PIX_FMT_GRAY14LE, ///< Y , 14bpp, little-endian + + AV_PIX_FMT_GRAYF32BE, ///< IEEE-754 single precision Y, 32bpp, big-endian + AV_PIX_FMT_GRAYF32LE, ///< IEEE-754 single precision Y, 32bpp, little-endian + + AV_PIX_FMT_YUVA422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian + AV_PIX_FMT_YUVA422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian + AV_PIX_FMT_YUVA444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian + AV_PIX_FMT_YUVA444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian + + AV_PIX_FMT_NV24, ///< planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) + AV_PIX_FMT_NV42, ///< as above, but U and V bytes are swapped + + /** + * Vulkan hardware images. + * + * data[0] points to an AVVkFrame + */ + AV_PIX_FMT_VULKAN, + + AV_PIX_FMT_Y210BE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian + AV_PIX_FMT_Y210LE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian + + AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions +}; + +#if AV_HAVE_BIGENDIAN +# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##be +#else +# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le +#endif + +#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA) +#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR) +#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA) +#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB) +#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0) +#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0) + +#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE) +#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE) +#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE) +#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE) +#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE) +#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE) +#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE) +#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE) +#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE) +#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE) +#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE) +#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE) +#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE) +#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE) +#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE) +#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE) + +#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE) +#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE) +#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE) +#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE) +#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE) +#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE) +#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE) +#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE) +#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE) +#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE) +#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE) +#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE) +#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE) +#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE) +#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE) +#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE) +#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE) + +#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE) +#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE) +#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE) +#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE) +#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE) +#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE) +#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE) +#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE) + +#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE) +#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE) +#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE) +#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE) + +#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE) +#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE) + +#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE) + +#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE) +#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE) +#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE) +#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE) +#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE) +#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE) +#define AV_PIX_FMT_YUVA422P12 AV_PIX_FMT_NE(YUVA422P12BE, YUVA422P12LE) +#define AV_PIX_FMT_YUVA444P12 AV_PIX_FMT_NE(YUVA444P12BE, YUVA444P12LE) +#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE) +#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE) +#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE) + +#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE) +#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) +#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE) +#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE) +#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE) + +#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE) + +/** + * Chromaticity coordinates of the source primaries. + * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1. + */ +enum AVColorPrimaries { + AVCOL_PRI_RESERVED0 = 0, + AVCOL_PRI_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B + AVCOL_PRI_UNSPECIFIED = 2, + AVCOL_PRI_RESERVED = 3, + AVCOL_PRI_BT470M = 4, ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20) + + AVCOL_PRI_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM + AVCOL_PRI_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC + AVCOL_PRI_SMPTE240M = 7, ///< functionally identical to above + AVCOL_PRI_FILM = 8, ///< colour filters using Illuminant C + AVCOL_PRI_BT2020 = 9, ///< ITU-R BT2020 + AVCOL_PRI_SMPTE428 = 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ) + AVCOL_PRI_SMPTEST428_1 = AVCOL_PRI_SMPTE428, + AVCOL_PRI_SMPTE431 = 11, ///< SMPTE ST 431-2 (2011) / DCI P3 + AVCOL_PRI_SMPTE432 = 12, ///< SMPTE ST 432-1 (2010) / P3 D65 / Display P3 + AVCOL_PRI_EBU3213 = 22, ///< EBU Tech. 3213-E / JEDEC P22 phosphors + AVCOL_PRI_JEDEC_P22 = AVCOL_PRI_EBU3213, + AVCOL_PRI_NB ///< Not part of ABI +}; + +/** + * Color Transfer Characteristic. + * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2. + */ +enum AVColorTransferCharacteristic { + AVCOL_TRC_RESERVED0 = 0, + AVCOL_TRC_BT709 = 1, ///< also ITU-R BT1361 + AVCOL_TRC_UNSPECIFIED = 2, + AVCOL_TRC_RESERVED = 3, + AVCOL_TRC_GAMMA22 = 4, ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM + AVCOL_TRC_GAMMA28 = 5, ///< also ITU-R BT470BG + AVCOL_TRC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC + AVCOL_TRC_SMPTE240M = 7, + AVCOL_TRC_LINEAR = 8, ///< "Linear transfer characteristics" + AVCOL_TRC_LOG = 9, ///< "Logarithmic transfer characteristic (100:1 range)" + AVCOL_TRC_LOG_SQRT = 10, ///< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)" + AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4 + AVCOL_TRC_BT1361_ECG = 12, ///< ITU-R BT1361 Extended Colour Gamut + AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC) + AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10-bit system + AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12-bit system + AVCOL_TRC_SMPTE2084 = 16, ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems + AVCOL_TRC_SMPTEST2084 = AVCOL_TRC_SMPTE2084, + AVCOL_TRC_SMPTE428 = 17, ///< SMPTE ST 428-1 + AVCOL_TRC_SMPTEST428_1 = AVCOL_TRC_SMPTE428, + AVCOL_TRC_ARIB_STD_B67 = 18, ///< ARIB STD-B67, known as "Hybrid log-gamma" + AVCOL_TRC_NB ///< Not part of ABI +}; + +/** + * YUV colorspace type. + * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.3. + */ +enum AVColorSpace { + AVCOL_SPC_RGB = 0, ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) + AVCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B + AVCOL_SPC_UNSPECIFIED = 2, + AVCOL_SPC_RESERVED = 3, + AVCOL_SPC_FCC = 4, ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20) + AVCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 + AVCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC + AVCOL_SPC_SMPTE240M = 7, ///< functionally identical to above + AVCOL_SPC_YCGCO = 8, ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 + AVCOL_SPC_YCOCG = AVCOL_SPC_YCGCO, + AVCOL_SPC_BT2020_NCL = 9, ///< ITU-R BT2020 non-constant luminance system + AVCOL_SPC_BT2020_CL = 10, ///< ITU-R BT2020 constant luminance system + AVCOL_SPC_SMPTE2085 = 11, ///< SMPTE 2085, Y'D'zD'x + AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant luminance system + AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant luminance system + AVCOL_SPC_ICTCP = 14, ///< ITU-R BT.2100-0, ICtCp + AVCOL_SPC_NB ///< Not part of ABI +}; + +/** + * MPEG vs JPEG YUV range. + */ +enum AVColorRange { + AVCOL_RANGE_UNSPECIFIED = 0, + AVCOL_RANGE_MPEG = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges + AVCOL_RANGE_JPEG = 2, ///< the normal 2^n-1 "JPEG" YUV ranges + AVCOL_RANGE_NB ///< Not part of ABI +}; + +/** + * Location of chroma samples. + * + * Illustration showing the location of the first (top left) chroma sample of the + * image, the left shows only luma, the right + * shows the location of the chroma sample, the 2 could be imagined to overlay + * each other but are drawn separately due to limitations of ASCII + * + * 1st 2nd 1st 2nd horizontal luma sample positions + * v v v v + * ______ ______ + *1st luma line > |X X ... |3 4 X ... X are luma samples, + * | |1 2 1-6 are possible chroma positions + *2nd luma line > |X X ... |5 6 X ... 0 is undefined/unknown position + */ +enum AVChromaLocation { + AVCHROMA_LOC_UNSPECIFIED = 0, + AVCHROMA_LOC_LEFT = 1, ///< MPEG-2/4 4:2:0, H.264 default for 4:2:0 + AVCHROMA_LOC_CENTER = 2, ///< MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0 + AVCHROMA_LOC_TOPLEFT = 3, ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2 + AVCHROMA_LOC_TOP = 4, + AVCHROMA_LOC_BOTTOMLEFT = 5, + AVCHROMA_LOC_BOTTOM = 6, + AVCHROMA_LOC_NB ///< Not part of ABI +}; + +#endif /* AVUTIL_PIXFMT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/cpu.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/cpu.h new file mode 100644 index 00000000..36973a54 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/cpu.h @@ -0,0 +1,29 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PPC_CPU_H +#define AVUTIL_PPC_CPU_H + +#include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" + +#define PPC_ALTIVEC(flags) CPUEXT(flags, ALTIVEC) +#define PPC_VSX(flags) CPUEXT(flags, VSX) +#define PPC_POWER8(flags) CPUEXT(flags, POWER8) + +#endif /* AVUTIL_PPC_CPU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_altivec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_altivec.h new file mode 100644 index 00000000..e1d530af --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_altivec.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2006 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PPC_FLOAT_DSP_ALTIVEC_H +#define AVUTIL_PPC_FLOAT_DSP_ALTIVEC_H + +void ff_vector_fmul_altivec(float *dst, const float *src0, + const float *src1, int len); + +void ff_vector_fmul_window_altivec(float *dst, const float *src0, + const float *src1, const float *win, + int len); + +void ff_vector_fmul_add_altivec(float *dst, const float *src0, + const float *src1, const float *src2, + int len); + +void ff_vector_fmul_reverse_altivec(float *dst, const float *src0, + const float *src1, int len); + +#endif /* AVUTIL_PPC_FLOAT_DSP_ALTIVEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_vsx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_vsx.h new file mode 100644 index 00000000..5d3cc5ed --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/float_dsp_vsx.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2015 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PPC_FLOAT_DSP_VSX_H +#define AVUTIL_PPC_FLOAT_DSP_VSX_H + +void ff_vector_fmul_vsx(float *dst, const float *src0, + const float *src1, int len); + +void ff_vector_fmul_window_vsx(float *dst, const float *src0, + const float *src1, const float *win, + int len); + +void ff_vector_fmul_add_vsx(float *dst, const float *src0, + const float *src1, const float *src2, + int len); + +void ff_vector_fmul_reverse_vsx(float *dst, const float *src0, + const float *src1, int len); + +#endif /* AVUTIL_PPC_FLOAT_DSP_VSX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/intreadwrite.h new file mode 100644 index 00000000..7671676c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/intreadwrite.h @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2008 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PPC_INTREADWRITE_H +#define AVUTIL_PPC_INTREADWRITE_H + +#include +#include "config.h" + +#if HAVE_XFORM_ASM + +#if HAVE_BIGENDIAN +#define AV_RL16 av_read_bswap16 +#define AV_WL16 av_write_bswap16 +#define AV_RL32 av_read_bswap32 +#define AV_WL32 av_write_bswap32 +#define AV_RL64 av_read_bswap64 +#define AV_WL64 av_write_bswap64 + +#else +#define AV_RB16 av_read_bswap16 +#define AV_WB16 av_write_bswap16 +#define AV_RB32 av_read_bswap32 +#define AV_WB32 av_write_bswap32 +#define AV_RB64 av_read_bswap64 +#define AV_WB64 av_write_bswap64 + +#endif + +static av_always_inline uint16_t av_read_bswap16(const void *p) +{ + uint16_t v; + __asm__ ("lhbrx %0, %y1" : "=r"(v) : "Z"(*(const uint16_t*)p)); + return v; +} + +static av_always_inline void av_write_bswap16(void *p, uint16_t v) +{ + __asm__ ("sthbrx %1, %y0" : "=Z"(*(uint16_t*)p) : "r"(v)); +} + +static av_always_inline uint32_t av_read_bswap32(const void *p) +{ + uint32_t v; + __asm__ ("lwbrx %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p)); + return v; +} + +static av_always_inline void av_write_bswap32(void *p, uint32_t v) +{ + __asm__ ("stwbrx %1, %y0" : "=Z"(*(uint32_t*)p) : "r"(v)); +} + +#if HAVE_LDBRX + +static av_always_inline uint64_t av_read_bswap64(const void *p) +{ + uint64_t v; + __asm__ ("ldbrx %0, %y1" : "=r"(v) : "Z"(*(const uint64_t*)p)); + return v; +} + +static av_always_inline void av_write_bswap64(void *p, uint64_t v) +{ + __asm__ ("stdbrx %1, %y0" : "=Z"(*(uint64_t*)p) : "r"(v)); +} + +#else + +static av_always_inline uint64_t av_read_bswap64(const void *p) +{ + union { uint64_t v; uint32_t hl[2]; } v; + __asm__ ("lwbrx %0, %y2 \n\t" + "lwbrx %1, %y3 \n\t" + : "=&r"(v.hl[1]), "=r"(v.hl[0]) + : "Z"(*(const uint32_t*)p), "Z"(*((const uint32_t*)p+1))); + return v.v; +} + +static av_always_inline void av_write_bswap64(void *p, uint64_t v) +{ + union { uint64_t v; uint32_t hl[2]; } vv = { v }; + __asm__ ("stwbrx %2, %y0 \n\t" + "stwbrx %3, %y1 \n\t" + : "=Z"(*(uint32_t*)p), "=Z"(*((uint32_t*)p+1)) + : "r"(vv.hl[1]), "r"(vv.hl[0])); +} + +#endif /* HAVE_LDBRX */ + +#endif /* HAVE_XFORM_ASM */ + +#endif /* AVUTIL_PPC_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/timer.h new file mode 100644 index 00000000..b28e6245 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/timer.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2005 Luca Barbato + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_PPC_TIMER_H +#define AVUTIL_PPC_TIMER_H + +#include + +#include "config.h" + +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + uint32_t tbu, tbl, temp; + + /* from section 2.2.1 of the 32-bit PowerPC PEM */ + __asm__ volatile( + "mftbu %2\n" + "mftb %0\n" + "mftbu %1\n" + "cmpw %2,%1\n" + "bne $-0x10\n" + : "=r"(tbl), "=r"(tbu), "=r"(temp) + : + : "cc"); + + return (((uint64_t)tbu)<<32) | (uint64_t)tbl; +} + +#endif /* AVUTIL_PPC_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/util_altivec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/util_altivec.h new file mode 100644 index 00000000..2548011b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ppc/util_altivec.h @@ -0,0 +1,195 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Contains misc utility macros and inline functions + */ + +#ifndef AVUTIL_PPC_UTIL_ALTIVEC_H +#define AVUTIL_PPC_UTIL_ALTIVEC_H + +#include + +#include "config.h" + +/*********************************************************************** + * Vector types + **********************************************************************/ +#define vec_u8 vector unsigned char +#define vec_s8 vector signed char +#define vec_u16 vector unsigned short +#define vec_s16 vector signed short +#define vec_u32 vector unsigned int +#define vec_s32 vector signed int +#define vec_f vector float + +/*********************************************************************** + * Null vector + **********************************************************************/ +#define LOAD_ZERO const vec_u8 zerov = vec_splat_u8( 0 ) + +#define zero_u8v (vec_u8) zerov +#define zero_s8v (vec_s8) zerov +#define zero_u16v (vec_u16) zerov +#define zero_s16v (vec_s16) zerov +#define zero_u32v (vec_u32) zerov +#define zero_s32v (vec_s32) zerov + +#if HAVE_ALTIVEC +#include + +// used to build registers permutation vectors (vcprm) +// the 's' are for words in the _s_econd vector +#define WORD_0 0x00,0x01,0x02,0x03 +#define WORD_1 0x04,0x05,0x06,0x07 +#define WORD_2 0x08,0x09,0x0a,0x0b +#define WORD_3 0x0c,0x0d,0x0e,0x0f +#define WORD_s0 0x10,0x11,0x12,0x13 +#define WORD_s1 0x14,0x15,0x16,0x17 +#define WORD_s2 0x18,0x19,0x1a,0x1b +#define WORD_s3 0x1c,0x1d,0x1e,0x1f +#define vcprm(a,b,c,d) (const vec_u8){WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d} + +#define SWP_W2S0 0x02,0x03,0x00,0x01 +#define SWP_W2S1 0x06,0x07,0x04,0x05 +#define SWP_W2S2 0x0a,0x0b,0x08,0x09 +#define SWP_W2S3 0x0e,0x0f,0x0c,0x0d +#define SWP_W2Ss0 0x12,0x13,0x10,0x11 +#define SWP_W2Ss1 0x16,0x17,0x14,0x15 +#define SWP_W2Ss2 0x1a,0x1b,0x18,0x19 +#define SWP_W2Ss3 0x1e,0x1f,0x1c,0x1d +#define vcswapi2s(a,b,c,d) (const vector unsigned char){SWP_W2S ## a, SWP_W2S ## b, SWP_W2S ## c, SWP_W2S ## d} + +#define vcswapc() \ + (const vector unsigned char){0x0f,0x0e,0x0d,0x0c,0x0b,0x0a,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0x00} + + +// Transpose 8x8 matrix of 16-bit elements (in-place) +#define TRANSPOSE8(a,b,c,d,e,f,g,h) \ +do { \ + vec_s16 A1, B1, C1, D1, E1, F1, G1, H1; \ + vec_s16 A2, B2, C2, D2, E2, F2, G2, H2; \ + \ + A1 = vec_mergeh (a, e); \ + B1 = vec_mergel (a, e); \ + C1 = vec_mergeh (b, f); \ + D1 = vec_mergel (b, f); \ + E1 = vec_mergeh (c, g); \ + F1 = vec_mergel (c, g); \ + G1 = vec_mergeh (d, h); \ + H1 = vec_mergel (d, h); \ + \ + A2 = vec_mergeh (A1, E1); \ + B2 = vec_mergel (A1, E1); \ + C2 = vec_mergeh (B1, F1); \ + D2 = vec_mergel (B1, F1); \ + E2 = vec_mergeh (C1, G1); \ + F2 = vec_mergel (C1, G1); \ + G2 = vec_mergeh (D1, H1); \ + H2 = vec_mergel (D1, H1); \ + \ + a = vec_mergeh (A2, E2); \ + b = vec_mergel (A2, E2); \ + c = vec_mergeh (B2, F2); \ + d = vec_mergel (B2, F2); \ + e = vec_mergeh (C2, G2); \ + f = vec_mergel (C2, G2); \ + g = vec_mergeh (D2, H2); \ + h = vec_mergel (D2, H2); \ +} while (0) + + +#if HAVE_BIGENDIAN +#define VEC_LD(offset,b) \ + vec_perm(vec_ld(offset, b), vec_ld((offset)+15, b), vec_lvsl(offset, b)) +#else +#define VEC_LD(offset,b) \ + vec_vsx_ld(offset, b) +#endif + +/** @brief loads unaligned vector @a *src with offset @a offset + and returns it */ +#if HAVE_BIGENDIAN +static inline vec_u8 unaligned_load(int offset, const uint8_t *src) +{ + register vec_u8 first = vec_ld(offset, src); + register vec_u8 second = vec_ld(offset + 15, src); + register vec_u8 mask = vec_lvsl(offset, src); + return vec_perm(first, second, mask); +} +static inline vec_u8 load_with_perm_vec(int offset, const uint8_t *src, vec_u8 perm_vec) +{ + vec_u8 a = vec_ld(offset, src); + vec_u8 b = vec_ld(offset + 15, src); + return vec_perm(a, b, perm_vec); +} +#else +#define unaligned_load(a,b) VEC_LD(a,b) +#define load_with_perm_vec(a,b,c) VEC_LD(a,b) +#endif + + +/** + * loads vector known misalignment + * @param perm_vec the align permute vector to combine the two loads from lvsl + */ + +#define vec_unaligned_load(b) VEC_LD(0, b) + +#if HAVE_BIGENDIAN +#define VEC_MERGEH(a, b) vec_mergeh(a, b) +#define VEC_MERGEL(a, b) vec_mergel(a, b) +#else +#define VEC_MERGEH(a, b) vec_mergeh(b, a) +#define VEC_MERGEL(a, b) vec_mergel(b, a) +#endif + +#if HAVE_BIGENDIAN +#define VEC_ST(a,b,c) vec_st(a,b,c) +#else +#define VEC_ST(a,b,c) vec_vsx_st(a,b,c) +#endif + +#if HAVE_BIGENDIAN +#define VEC_SPLAT16(a,b) vec_splat((vec_s16)(a), b) +#else +#define VEC_SPLAT16(a,b) vec_splat((vec_s16)(vec_perm(a, a, vcswapi2s(0,1,2,3))), b) +#endif + +#if HAVE_BIGENDIAN +#define VEC_SLD16(a,b,c) vec_sld(a, b, c) +#else +#define VEC_SLD16(a,b,c) vec_sld(b, a, c) +#endif + +#endif /* HAVE_ALTIVEC */ + +#if HAVE_VSX +#if HAVE_BIGENDIAN +#define vsx_ld_u8_s16(off, p) \ + ((vec_s16)vec_mergeh((vec_u8)vec_splat_u8(0), \ + (vec_u8)vec_vsx_ld((off), (p)))) +#else +#define vsx_ld_u8_s16(off, p) \ + ((vec_s16)vec_mergeh((vec_u8)vec_vsx_ld((off), (p)), \ + (vec_u8)vec_splat_u8(0))) +#endif /* HAVE_BIGENDIAN */ +#endif /* HAVE_VSX */ + +#endif /* AVUTIL_PPC_UTIL_ALTIVEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/qsort.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/qsort.h new file mode 100644 index 00000000..39b7a088 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/qsort.h @@ -0,0 +1,122 @@ +/* + * copyright (c) 2012 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_QSORT_H +#define AVUTIL_QSORT_H + +#include "common.h" + + +/** + * Quicksort + * This sort is fast, and fully inplace but not stable and it is possible + * to construct input that requires O(n^2) time but this is very unlikely to + * happen with non constructed input. + */ +#define AV_QSORT(p, num, type, cmp) do {\ + void *stack[64][2];\ + int sp= 1;\ + stack[0][0] = p;\ + stack[0][1] = (p)+(num)-1;\ + while(sp){\ + type *start= stack[--sp][0];\ + type *end = stack[ sp][1];\ + while(start < end){\ + if(start < end-1) {\ + int checksort=0;\ + type *right = end-2;\ + type *left = start+1;\ + type *mid = start + ((end-start)>>1);\ + if(cmp(start, end) > 0) {\ + if(cmp( end, mid) > 0) FFSWAP(type, *start, *mid);\ + else FFSWAP(type, *start, *end);\ + }else{\ + if(cmp(start, mid) > 0) FFSWAP(type, *start, *mid);\ + else checksort= 1;\ + }\ + if(cmp(mid, end) > 0){ \ + FFSWAP(type, *mid, *end);\ + checksort=0;\ + }\ + if(start == end-2) break;\ + FFSWAP(type, end[-1], *mid);\ + while(left <= right){\ + while(left<=right && cmp(left, end-1) < 0)\ + left++;\ + while(left<=right && cmp(right, end-1) > 0)\ + right--;\ + if(left <= right){\ + FFSWAP(type, *left, *right);\ + left++;\ + right--;\ + }\ + }\ + FFSWAP(type, end[-1], *left);\ + if(checksort && (mid == left-1 || mid == left)){\ + mid= start;\ + while(mid 0)\ + FFSWAP(type, *start, *end);\ + break;\ + }\ + }\ + }\ +} while (0) + +/** + * Merge sort, this sort requires a temporary buffer and is stable, its worst + * case time is O(n log n) + * @param p must be a lvalue pointer, this function may exchange it with tmp + * @param tmp must be a lvalue pointer, this function may exchange it with p + */ +#define AV_MSORT(p, tmp, num, type, cmp) do {\ + unsigned i, j, step;\ + for(step=1; step<(num); step+=step){\ + for(i=0; i<(num); i+=2*step){\ + unsigned a[2] = {i, i+step};\ + unsigned end = FFMIN(i+2*step, (num));\ + for(j=i; a[0] 0;\ + tmp[j] = p[ a[idx]++ ];\ + }\ + if(a[0]>=i+step) a[0] = a[1];\ + for(; j + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_RANDOM_SEED_H +#define AVUTIL_RANDOM_SEED_H + +#include +/** + * @addtogroup lavu_crypto + * @{ + */ + +/** + * Get a seed to use in conjunction with random functions. + * This function tries to provide a good seed at a best effort bases. + * Its possible to call this function multiple times if more bits are needed. + * It can be quite slow, which is why it should only be used as seed for a faster + * PRNG. The quality of the seed depends on the platform. + */ +uint32_t av_get_random_seed(void); + +/** + * @} + */ + +#endif /* AVUTIL_RANDOM_SEED_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rational.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rational.h new file mode 100644 index 00000000..cbb08a0b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rational.h @@ -0,0 +1,220 @@ +/* + * rational numbers + * Copyright (c) 2003 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_math_rational + * Utilties for rational number calculation. + * @author Michael Niedermayer + */ + +#ifndef AVUTIL_RATIONAL_H +#define AVUTIL_RATIONAL_H + +#include +#include +#include "attributes.h" + +/** + * @defgroup lavu_math_rational AVRational + * @ingroup lavu_math + * Rational number calculation. + * + * While rational numbers can be expressed as floating-point numbers, the + * conversion process is a lossy one, so are floating-point operations. On the + * other hand, the nature of FFmpeg demands highly accurate calculation of + * timestamps. This set of rational number utilities serves as a generic + * interface for manipulating rational numbers as pairs of numerators and + * denominators. + * + * Many of the functions that operate on AVRational's have the suffix `_q`, in + * reference to the mathematical symbol "ℚ" (Q) which denotes the set of all + * rational numbers. + * + * @{ + */ + +/** + * Rational number (pair of numerator and denominator). + */ +typedef struct AVRational{ + int num; ///< Numerator + int den; ///< Denominator +} AVRational; + +/** + * Create an AVRational. + * + * Useful for compilers that do not support compound literals. + * + * @note The return value is not reduced. + * @see av_reduce() + */ +static inline AVRational av_make_q(int num, int den) +{ + AVRational r = { num, den }; + return r; +} + +/** + * Compare two rationals. + * + * @param a First rational + * @param b Second rational + * + * @return One of the following values: + * - 0 if `a == b` + * - 1 if `a > b` + * - -1 if `a < b` + * - `INT_MIN` if one of the values is of the form `0 / 0` + */ +static inline int av_cmp_q(AVRational a, AVRational b){ + const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; + + if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1; + else if(b.den && a.den) return 0; + else if(a.num && b.num) return (a.num>>31) - (b.num>>31); + else return INT_MIN; +} + +/** + * Convert an AVRational to a `double`. + * @param a AVRational to convert + * @return `a` in floating-point form + * @see av_d2q() + */ +static inline double av_q2d(AVRational a){ + return a.num / (double) a.den; +} + +/** + * Reduce a fraction. + * + * This is useful for framerate calculations. + * + * @param[out] dst_num Destination numerator + * @param[out] dst_den Destination denominator + * @param[in] num Source numerator + * @param[in] den Source denominator + * @param[in] max Maximum allowed values for `dst_num` & `dst_den` + * @return 1 if the operation is exact, 0 otherwise + */ +int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max); + +/** + * Multiply two rationals. + * @param b First rational + * @param c Second rational + * @return b*c + */ +AVRational av_mul_q(AVRational b, AVRational c) av_const; + +/** + * Divide one rational by another. + * @param b First rational + * @param c Second rational + * @return b/c + */ +AVRational av_div_q(AVRational b, AVRational c) av_const; + +/** + * Add two rationals. + * @param b First rational + * @param c Second rational + * @return b+c + */ +AVRational av_add_q(AVRational b, AVRational c) av_const; + +/** + * Subtract one rational from another. + * @param b First rational + * @param c Second rational + * @return b-c + */ +AVRational av_sub_q(AVRational b, AVRational c) av_const; + +/** + * Invert a rational. + * @param q value + * @return 1 / q + */ +static av_always_inline AVRational av_inv_q(AVRational q) +{ + AVRational r = { q.den, q.num }; + return r; +} + +/** + * Convert a double precision floating point number to a rational. + * + * In case of infinity, the returned value is expressed as `{1, 0}` or + * `{-1, 0}` depending on the sign. + * + * @param d `double` to convert + * @param max Maximum allowed numerator and denominator + * @return `d` in AVRational form + * @see av_q2d() + */ +AVRational av_d2q(double d, int max) av_const; + +/** + * Find which of the two rationals is closer to another rational. + * + * @param q Rational to be compared against + * @param q1,q2 Rationals to be tested + * @return One of the following values: + * - 1 if `q1` is nearer to `q` than `q2` + * - -1 if `q2` is nearer to `q` than `q1` + * - 0 if they have the same distance + */ +int av_nearer_q(AVRational q, AVRational q1, AVRational q2); + +/** + * Find the value in a list of rationals nearest a given reference rational. + * + * @param q Reference rational + * @param q_list Array of rationals terminated by `{0, 0}` + * @return Index of the nearest value found in the array + */ +int av_find_nearest_q_idx(AVRational q, const AVRational* q_list); + +/** + * Convert an AVRational to a IEEE 32-bit `float` expressed in fixed-point + * format. + * + * @param q Rational to be converted + * @return Equivalent floating-point value, expressed as an unsigned 32-bit + * integer. + * @note The returned value is platform-indepedant. + */ +uint32_t av_q2intfloat(AVRational q); + +/** + * Return the best rational so that a and b are multiple of it. + * If the resulting denominator is larger than max_den, return def. + */ +AVRational av_gcd_q(AVRational a, AVRational b, int max_den, AVRational def); + +/** + * @} + */ + +#endif /* AVUTIL_RATIONAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rc4.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rc4.h new file mode 100644 index 00000000..029cd2ad --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/rc4.h @@ -0,0 +1,66 @@ +/* + * RC4 encryption/decryption/pseudo-random number generator + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_RC4_H +#define AVUTIL_RC4_H + +#include + +/** + * @defgroup lavu_rc4 RC4 + * @ingroup lavu_crypto + * @{ + */ + +typedef struct AVRC4 { + uint8_t state[256]; + int x, y; +} AVRC4; + +/** + * Allocate an AVRC4 context. + */ +AVRC4 *av_rc4_alloc(void); + +/** + * @brief Initializes an AVRC4 context. + * + * @param key_bits must be a multiple of 8 + * @param decrypt 0 for encryption, 1 for decryption, currently has no effect + * @return zero on success, negative value otherwise + */ +int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); + +/** + * @brief Encrypts / decrypts using the RC4 algorithm. + * + * @param count number of bytes + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst, may be NULL + * @param iv not (yet) used for RC4, should be NULL + * @param decrypt 0 for encryption, 1 for decryption, not (yet) used + */ +void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); + +/** + * @} + */ + +#endif /* AVUTIL_RC4_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/replaygain.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/replaygain.h new file mode 100644 index 00000000..b49bf1a3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/replaygain.h @@ -0,0 +1,50 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_REPLAYGAIN_H +#define AVUTIL_REPLAYGAIN_H + +#include + +/** + * ReplayGain information (see + * http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). + * The size of this struct is a part of the public ABI. + */ +typedef struct AVReplayGain { + /** + * Track replay gain in microbels (divide by 100000 to get the value in dB). + * Should be set to INT32_MIN when unknown. + */ + int32_t track_gain; + /** + * Peak track amplitude, with 100000 representing full scale (but values + * may overflow). 0 when unknown. + */ + uint32_t track_peak; + /** + * Same as track_gain, but for the whole album. + */ + int32_t album_gain; + /** + * Same as track_peak, but for the whole album, + */ + uint32_t album_peak; +} AVReplayGain; + +#endif /* AVUTIL_REPLAYGAIN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/reverse.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/reverse.h new file mode 100644 index 00000000..4eb61239 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/reverse.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2002-2004 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_REVERSE_H +#define AVUTIL_REVERSE_H + +#include + +extern const uint8_t ff_reverse[256]; + +#endif /* AVUTIL_REVERSE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ripemd.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ripemd.h new file mode 100644 index 00000000..0db6858f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/ripemd.h @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2007 Michael Niedermayer + * Copyright (C) 2013 James Almer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_ripemd + * Public header for RIPEMD hash function implementation. + */ + +#ifndef AVUTIL_RIPEMD_H +#define AVUTIL_RIPEMD_H + +#include + +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_ripemd RIPEMD + * @ingroup lavu_hash + * RIPEMD hash function implementation. + * + * @{ + */ + +extern const int av_ripemd_size; + +struct AVRIPEMD; + +/** + * Allocate an AVRIPEMD context. + */ +struct AVRIPEMD *av_ripemd_alloc(void); + +/** + * Initialize RIPEMD hashing. + * + * @param context pointer to the function context (of size av_ripemd_size) + * @param bits number of bits in digest (128, 160, 256 or 320 bits) + * @return zero if initialization succeeded, -1 otherwise + */ +int av_ripemd_init(struct AVRIPEMD* context, int bits); + +/** + * Update hash value. + * + * @param context hash function context + * @param data input data to update hash with + * @param len input data length + */ +#if FF_API_CRYPTO_SIZE_T +void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, unsigned int len); +#else +void av_ripemd_update(struct AVRIPEMD* context, const uint8_t* data, size_t len); +#endif + +/** + * Finish hashing and output digest value. + * + * @param context hash function context + * @param digest buffer where output digest value is stored + */ +void av_ripemd_final(struct AVRIPEMD* context, uint8_t *digest); + +/** + * @} + */ + +#endif /* AVUTIL_RIPEMD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/samplefmt.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/samplefmt.h new file mode 100644 index 00000000..8cd43ae8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/samplefmt.h @@ -0,0 +1,272 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_SAMPLEFMT_H +#define AVUTIL_SAMPLEFMT_H + +#include + +#include "avutil.h" +#include "attributes.h" + +/** + * @addtogroup lavu_audio + * @{ + * + * @defgroup lavu_sampfmts Audio sample formats + * + * Audio sample format enumeration and related convenience functions. + * @{ + */ + +/** + * Audio sample formats + * + * - The data described by the sample format is always in native-endian order. + * Sample values can be expressed by native C types, hence the lack of a signed + * 24-bit sample format even though it is a common raw audio data format. + * + * - The floating-point formats are based on full volume being in the range + * [-1.0, 1.0]. Any values outside this range are beyond full volume level. + * + * - The data layout as used in av_samples_fill_arrays() and elsewhere in FFmpeg + * (such as AVFrame in libavcodec) is as follows: + * + * @par + * For planar sample formats, each audio channel is in a separate data plane, + * and linesize is the buffer size, in bytes, for a single plane. All data + * planes must be the same size. For packed sample formats, only the first data + * plane is used, and samples for each channel are interleaved. In this case, + * linesize is the buffer size, in bytes, for the 1 plane. + * + */ +enum AVSampleFormat { + AV_SAMPLE_FMT_NONE = -1, + AV_SAMPLE_FMT_U8, ///< unsigned 8 bits + AV_SAMPLE_FMT_S16, ///< signed 16 bits + AV_SAMPLE_FMT_S32, ///< signed 32 bits + AV_SAMPLE_FMT_FLT, ///< float + AV_SAMPLE_FMT_DBL, ///< double + + AV_SAMPLE_FMT_U8P, ///< unsigned 8 bits, planar + AV_SAMPLE_FMT_S16P, ///< signed 16 bits, planar + AV_SAMPLE_FMT_S32P, ///< signed 32 bits, planar + AV_SAMPLE_FMT_FLTP, ///< float, planar + AV_SAMPLE_FMT_DBLP, ///< double, planar + AV_SAMPLE_FMT_S64, ///< signed 64 bits + AV_SAMPLE_FMT_S64P, ///< signed 64 bits, planar + + AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if linking dynamically +}; + +/** + * Return the name of sample_fmt, or NULL if sample_fmt is not + * recognized. + */ +const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt); + +/** + * Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE + * on error. + */ +enum AVSampleFormat av_get_sample_fmt(const char *name); + +/** + * Return the planar<->packed alternative form of the given sample format, or + * AV_SAMPLE_FMT_NONE on error. If the passed sample_fmt is already in the + * requested planar/packed format, the format returned is the same as the + * input. + */ +enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar); + +/** + * Get the packed alternative form of the given sample format. + * + * If the passed sample_fmt is already in packed format, the format returned is + * the same as the input. + * + * @return the packed alternative form of the given sample format or + AV_SAMPLE_FMT_NONE on error. + */ +enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt); + +/** + * Get the planar alternative form of the given sample format. + * + * If the passed sample_fmt is already in planar format, the format returned is + * the same as the input. + * + * @return the planar alternative form of the given sample format or + AV_SAMPLE_FMT_NONE on error. + */ +enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt); + +/** + * Generate a string corresponding to the sample format with + * sample_fmt, or a header if sample_fmt is negative. + * + * @param buf the buffer where to write the string + * @param buf_size the size of buf + * @param sample_fmt the number of the sample format to print the + * corresponding info string, or a negative value to print the + * corresponding header. + * @return the pointer to the filled buffer or NULL if sample_fmt is + * unknown or in case of other errors + */ +char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt); + +/** + * Return number of bytes per sample. + * + * @param sample_fmt the sample format + * @return number of bytes per sample or zero if unknown for the given + * sample format + */ +int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt); + +/** + * Check if the sample format is planar. + * + * @param sample_fmt the sample format to inspect + * @return 1 if the sample format is planar, 0 if it is interleaved + */ +int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt); + +/** + * Get the required buffer size for the given audio parameters. + * + * @param[out] linesize calculated linesize, may be NULL + * @param nb_channels the number of channels + * @param nb_samples the number of samples in a single channel + * @param sample_fmt the sample format + * @param align buffer size alignment (0 = default, 1 = no alignment) + * @return required buffer size, or negative error code on failure + */ +int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align); + +/** + * @} + * + * @defgroup lavu_sampmanip Samples manipulation + * + * Functions that manipulate audio samples + * @{ + */ + +/** + * Fill plane data pointers and linesize for samples with sample + * format sample_fmt. + * + * The audio_data array is filled with the pointers to the samples data planes: + * for planar, set the start point of each channel's data within the buffer, + * for packed, set the start point of the entire buffer only. + * + * The value pointed to by linesize is set to the aligned size of each + * channel's data buffer for planar layout, or to the aligned size of the + * buffer for all channels for packed layout. + * + * The buffer in buf must be big enough to contain all the samples + * (use av_samples_get_buffer_size() to compute its minimum size), + * otherwise the audio_data pointers will point to invalid data. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param[out] audio_data array to be filled with the pointer for each channel + * @param[out] linesize calculated linesize, may be NULL + * @param buf the pointer to a buffer containing the samples + * @param nb_channels the number of channels + * @param nb_samples the number of samples in a single channel + * @param sample_fmt the sample format + * @param align buffer size alignment (0 = default, 1 = no alignment) + * @return >=0 on success or a negative error code on failure + * @todo return minimum size in bytes required for the buffer in case + * of success at the next bump + */ +int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, + const uint8_t *buf, + int nb_channels, int nb_samples, + enum AVSampleFormat sample_fmt, int align); + +/** + * Allocate a samples buffer for nb_samples samples, and fill data pointers and + * linesize accordingly. + * The allocated samples buffer can be freed by using av_freep(&audio_data[0]) + * Allocated data will be initialized to silence. + * + * @see enum AVSampleFormat + * The documentation for AVSampleFormat describes the data layout. + * + * @param[out] audio_data array to be filled with the pointer for each channel + * @param[out] linesize aligned size for audio buffer(s), may be NULL + * @param nb_channels number of audio channels + * @param nb_samples number of samples per channel + * @param align buffer size alignment (0 = default, 1 = no alignment) + * @return >=0 on success or a negative error code on failure + * @todo return the size of the allocated buffer in case of success at the next bump + * @see av_samples_fill_arrays() + * @see av_samples_alloc_array_and_samples() + */ +int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, + int nb_samples, enum AVSampleFormat sample_fmt, int align); + +/** + * Allocate a data pointers array, samples buffer for nb_samples + * samples, and fill data pointers and linesize accordingly. + * + * This is the same as av_samples_alloc(), but also allocates the data + * pointers array. + * + * @see av_samples_alloc() + */ +int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels, + int nb_samples, enum AVSampleFormat sample_fmt, int align); + +/** + * Copy samples from src to dst. + * + * @param dst destination array of pointers to data planes + * @param src source array of pointers to data planes + * @param dst_offset offset in samples at which the data will be written to dst + * @param src_offset offset in samples at which the data will be read from src + * @param nb_samples number of samples to be copied + * @param nb_channels number of audio channels + * @param sample_fmt audio sample format + */ +int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset, + int src_offset, int nb_samples, int nb_channels, + enum AVSampleFormat sample_fmt); + +/** + * Fill an audio buffer with silence. + * + * @param audio_data array of pointers to data planes + * @param offset offset in samples at which to start filling + * @param nb_samples number of samples to fill + * @param nb_channels number of audio channels + * @param sample_fmt audio sample format + */ +int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, + int nb_channels, enum AVSampleFormat sample_fmt); + +/** + * @} + * @} + */ +#endif /* AVUTIL_SAMPLEFMT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sh4/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sh4/bswap.h new file mode 100644 index 00000000..48dd27f8 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sh4/bswap.h @@ -0,0 +1,48 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * byte swapping routines + */ + +#ifndef AVUTIL_SH4_BSWAP_H +#define AVUTIL_SH4_BSWAP_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#define av_bswap16 av_bswap16 +static av_always_inline av_const uint16_t av_bswap16(uint16_t x) +{ + __asm__("swap.b %0,%0" : "+r"(x)); + return x; +} + +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + __asm__("swap.b %0,%0\n" + "swap.w %0,%0\n" + "swap.b %0,%0\n" + : "+r"(x)); + return x; +} + +#endif /* AVUTIL_SH4_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha.h new file mode 100644 index 00000000..c0180e57 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha.h @@ -0,0 +1,95 @@ +/* + * Copyright (C) 2007 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_sha + * Public header for SHA-1 & SHA-256 hash function implementations. + */ + +#ifndef AVUTIL_SHA_H +#define AVUTIL_SHA_H + +#include +#include + +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_sha SHA + * @ingroup lavu_hash + * SHA-1 and SHA-256 (Secure Hash Algorithm) hash function implementations. + * + * This module supports the following SHA hash functions: + * + * - SHA-1: 160 bits + * - SHA-224: 224 bits, as a variant of SHA-2 + * - SHA-256: 256 bits, as a variant of SHA-2 + * + * @see For SHA-384, SHA-512, and variants thereof, see @ref lavu_sha512. + * + * @{ + */ + +extern const int av_sha_size; + +struct AVSHA; + +/** + * Allocate an AVSHA context. + */ +struct AVSHA *av_sha_alloc(void); + +/** + * Initialize SHA-1 or SHA-2 hashing. + * + * @param context pointer to the function context (of size av_sha_size) + * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits) + * @return zero if initialization succeeded, -1 otherwise + */ +int av_sha_init(struct AVSHA* context, int bits); + +/** + * Update hash value. + * + * @param ctx hash function context + * @param data input data to update hash with + * @param len input data length + */ +#if FF_API_CRYPTO_SIZE_T +void av_sha_update(struct AVSHA *ctx, const uint8_t *data, unsigned int len); +#else +void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len); +#endif + +/** + * Finish hashing and output digest value. + * + * @param context hash function context + * @param digest buffer where output digest value is stored + */ +void av_sha_final(struct AVSHA* context, uint8_t *digest); + +/** + * @} + */ + +#endif /* AVUTIL_SHA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha512.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha512.h new file mode 100644 index 00000000..bef714b4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/sha512.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2007 Michael Niedermayer + * Copyright (C) 2013 James Almer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu_sha512 + * Public header for SHA-512 implementation. + */ + +#ifndef AVUTIL_SHA512_H +#define AVUTIL_SHA512_H + +#include +#include + +#include "attributes.h" +#include "version.h" + +/** + * @defgroup lavu_sha512 SHA-512 + * @ingroup lavu_hash + * SHA-512 (Secure Hash Algorithm) hash function implementations. + * + * This module supports the following SHA-2 hash functions: + * + * - SHA-512/224: 224 bits + * - SHA-512/256: 256 bits + * - SHA-384: 384 bits + * - SHA-512: 512 bits + * + * @see For SHA-1, SHA-256, and variants thereof, see @ref lavu_sha. + * + * @{ + */ + +extern const int av_sha512_size; + +struct AVSHA512; + +/** + * Allocate an AVSHA512 context. + */ +struct AVSHA512 *av_sha512_alloc(void); + +/** + * Initialize SHA-2 512 hashing. + * + * @param context pointer to the function context (of size av_sha512_size) + * @param bits number of bits in digest (224, 256, 384 or 512 bits) + * @return zero if initialization succeeded, -1 otherwise + */ +int av_sha512_init(struct AVSHA512* context, int bits); + +/** + * Update hash value. + * + * @param context hash function context + * @param data input data to update hash with + * @param len input data length + */ +#if FF_API_CRYPTO_SIZE_T +void av_sha512_update(struct AVSHA512* context, const uint8_t* data, unsigned int len); +#else +void av_sha512_update(struct AVSHA512* context, const uint8_t* data, size_t len); +#endif + +/** + * Finish hashing and output digest value. + * + * @param context hash function context + * @param digest buffer where output digest value is stored + */ +void av_sha512_final(struct AVSHA512* context, uint8_t *digest); + +/** + * @} + */ + +#endif /* AVUTIL_SHA512_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/slicethread.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/slicethread.h new file mode 100644 index 00000000..f6f6f302 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/slicethread.h @@ -0,0 +1,52 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_SLICETHREAD_H +#define AVUTIL_SLICETHREAD_H + +typedef struct AVSliceThread AVSliceThread; + +/** + * Create slice threading context. + * @param pctx slice threading context returned here + * @param priv private pointer to be passed to callback function + * @param worker_func callback function to be executed + * @param main_func special callback function, called from main thread, may be NULL + * @param nb_threads number of threads, 0 for automatic, must be >= 0 + * @return return number of threads or negative AVERROR on failure + */ +int avpriv_slicethread_create(AVSliceThread **pctx, void *priv, + void (*worker_func)(void *priv, int jobnr, int threadnr, int nb_jobs, int nb_threads), + void (*main_func)(void *priv), + int nb_threads); + +/** + * Execute slice threading. + * @param ctx slice threading context + * @param nb_jobs number of jobs, must be > 0 + * @param execute_main also execute main_func + */ +void avpriv_slicethread_execute(AVSliceThread *ctx, int nb_jobs, int execute_main); + +/** + * Destroy slice threading context. + * @param pctx pointer to context + */ +void avpriv_slicethread_free(AVSliceThread **pctx); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat.h new file mode 100644 index 00000000..a651406f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat.h @@ -0,0 +1,289 @@ +/* + * Copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_SOFTFLOAT_H +#define AVUTIL_SOFTFLOAT_H + +#include +#include "common.h" + +#include "avassert.h" +#include "softfloat_tables.h" + +#define MIN_EXP -149 +#define MAX_EXP 126 +#define ONE_BITS 29 + +typedef struct SoftFloat{ + int32_t mant; + int32_t exp; +}SoftFloat; + +static const SoftFloat FLOAT_0 = { 0, MIN_EXP}; ///< 0.0 +static const SoftFloat FLOAT_05 = { 0x20000000, 0}; ///< 0.5 +static const SoftFloat FLOAT_1 = { 0x20000000, 1}; ///< 1.0 +static const SoftFloat FLOAT_EPSILON = { 0x29F16B12, -16}; ///< A small value +static const SoftFloat FLOAT_1584893192 = { 0x32B771ED, 1}; ///< 1.584893192 (10^.2) +static const SoftFloat FLOAT_100000 = { 0x30D40000, 17}; ///< 100000 +static const SoftFloat FLOAT_0999999 = { 0x3FFFFBCE, 0}; ///< 0.999999 +static const SoftFloat FLOAT_MIN = { 0x20000000, MIN_EXP}; + + +/** + * Convert a SoftFloat to a double precision float. + */ +static inline av_const double av_sf2double(SoftFloat v) { + v.exp -= ONE_BITS +1; + return ldexp(v.mant, v.exp); +} + +static av_const SoftFloat av_normalize_sf(SoftFloat a){ + if(a.mant){ +#if 1 + while((a.mant + 0x1FFFFFFFU)<0x3FFFFFFFU){ + a.mant += a.mant; + a.exp -= 1; + } +#else + int s=ONE_BITS - av_log2(FFABS(a.mant)); + a.exp -= s; + a.mant <<= s; +#endif + if(a.exp < MIN_EXP){ + a.exp = MIN_EXP; + a.mant= 0; + } + }else{ + a.exp= MIN_EXP; + } + return a; +} + +static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){ +#if 1 + if((int32_t)(a.mant + 0x40000000U) <= 0){ + a.exp++; + a.mant>>=1; + } + av_assert2(a.mant < 0x40000000 && a.mant > -0x40000000); + av_assert2(a.exp <= MAX_EXP); + return a; +#elif 1 + int t= a.mant + 0x40000000 < 0; + return (SoftFloat){ a.mant>>t, a.exp+t}; +#else + int t= (a.mant + 0x3FFFFFFFU)>>31; + return (SoftFloat){a.mant>>t, a.exp+t}; +#endif +} + +/** + * @return Will not be more denormalized than a*b. So if either input is + * normalized, then the output will not be worse then the other input. + * If both are normalized, then the output will be normalized. + */ +static inline av_const SoftFloat av_mul_sf(SoftFloat a, SoftFloat b){ + a.exp += b.exp; + av_assert2((int32_t)((a.mant * (int64_t)b.mant) >> ONE_BITS) == (a.mant * (int64_t)b.mant) >> ONE_BITS); + a.mant = (a.mant * (int64_t)b.mant) >> ONE_BITS; + a = av_normalize1_sf((SoftFloat){a.mant, a.exp - 1}); + if (!a.mant || a.exp < MIN_EXP) + return FLOAT_0; + return a; +} + +/** + * b has to be normalized and not zero. + * @return Will not be more denormalized than a. + */ +static inline av_const SoftFloat av_div_sf(SoftFloat a, SoftFloat b){ + int64_t temp = (int64_t)a.mant * (1<<(ONE_BITS+1)); + temp /= b.mant; + a.exp -= b.exp; + a.mant = temp; + while (a.mant != temp) { + temp /= 2; + a.exp--; + a.mant = temp; + } + a = av_normalize1_sf(a); + if (!a.mant || a.exp < MIN_EXP) + return FLOAT_0; + return a; +} + +/** + * Compares two SoftFloats. + * @returns < 0 if the first is less + * > 0 if the first is greater + * 0 if they are equal + */ +static inline av_const int av_cmp_sf(SoftFloat a, SoftFloat b){ + int t= a.exp - b.exp; + if (t <-31) return - b.mant ; + else if (t < 0) return (a.mant >> (-t)) - b.mant ; + else if (t < 32) return a.mant - (b.mant >> t); + else return a.mant ; +} + +/** + * Compares two SoftFloats. + * @returns 1 if a is greater than b, 0 otherwise + */ +static inline av_const int av_gt_sf(SoftFloat a, SoftFloat b) +{ + int t= a.exp - b.exp; + if (t <-31) return 0 > b.mant ; + else if (t < 0) return (a.mant >> (-t)) > b.mant ; + else if (t < 32) return a.mant > (b.mant >> t); + else return a.mant > 0 ; +} + +/** + * @returns the sum of 2 SoftFloats. + */ +static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){ + int t= a.exp - b.exp; + if (t <-31) return b; + else if (t < 0) return av_normalize_sf(av_normalize1_sf((SoftFloat){ b.mant + (a.mant >> (-t)), b.exp})); + else if (t < 32) return av_normalize_sf(av_normalize1_sf((SoftFloat){ a.mant + (b.mant >> t ), a.exp})); + else return a; +} + +/** + * @returns the difference of 2 SoftFloats. + */ +static inline av_const SoftFloat av_sub_sf(SoftFloat a, SoftFloat b){ + return av_add_sf(a, (SoftFloat){ -b.mant, b.exp}); +} + +//FIXME log, exp, pow + +/** + * Converts a mantisse and exponent to a SoftFloat. + * This converts a fixed point value v with frac_bits fractional bits to a + * SoftFloat. + * @returns a SoftFloat with value v * 2^-frac_bits + */ +static inline av_const SoftFloat av_int2sf(int v, int frac_bits){ + int exp_offset = 0; + if(v <= INT_MIN + 1){ + exp_offset = 1; + v>>=1; + } + return av_normalize_sf(av_normalize1_sf((SoftFloat){v, ONE_BITS + 1 - frac_bits + exp_offset})); +} + +/** + * Converts a SoftFloat to an integer. + * Rounding is to -inf. + */ +static inline av_const int av_sf2int(SoftFloat v, int frac_bits){ + v.exp += frac_bits - (ONE_BITS + 1); + if(v.exp >= 0) return v.mant << v.exp ; + else return v.mant >>(-v.exp); +} + +/** + * Rounding-to-nearest used. + */ +static av_always_inline SoftFloat av_sqrt_sf(SoftFloat val) +{ + int tabIndex, rem; + + if (val.mant == 0) + val.exp = MIN_EXP; + else if (val.mant < 0) + abort(); + else + { + tabIndex = (val.mant - 0x20000000) >> 20; + + rem = val.mant & 0xFFFFF; + val.mant = (int)(((int64_t)av_sqrttbl_sf[tabIndex] * (0x100000 - rem) + + (int64_t)av_sqrttbl_sf[tabIndex + 1] * rem + + 0x80000) >> 20); + val.mant = (int)(((int64_t)av_sqr_exp_multbl_sf[val.exp & 1] * val.mant + + 0x10000000) >> 29); + + if (val.mant < 0x40000000) + val.exp -= 2; + else + val.mant >>= 1; + + val.exp = (val.exp >> 1) + 1; + } + + return val; +} + +/** + * Rounding-to-nearest used. + */ +static av_unused void av_sincos_sf(int a, int *s, int *c) +{ + int idx, sign; + int sv, cv; + int st, ct; + + idx = a >> 26; + sign = (int32_t)((unsigned)idx << 27) >> 31; + cv = av_costbl_1_sf[idx & 0xf]; + cv = (cv ^ sign) - sign; + + idx -= 8; + sign = (int32_t)((unsigned)idx << 27) >> 31; + sv = av_costbl_1_sf[idx & 0xf]; + sv = (sv ^ sign) - sign; + + idx = a >> 21; + ct = av_costbl_2_sf[idx & 0x1f]; + st = av_sintbl_2_sf[idx & 0x1f]; + + idx = (int)(((int64_t)cv * ct - (int64_t)sv * st + 0x20000000) >> 30); + + sv = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); + + cv = idx; + + idx = a >> 16; + ct = av_costbl_3_sf[idx & 0x1f]; + st = av_sintbl_3_sf[idx & 0x1f]; + + idx = (int)(((int64_t)cv * ct - (int64_t)sv * st + 0x20000000) >> 30); + + sv = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); + cv = idx; + + idx = a >> 11; + + ct = (int)(((int64_t)av_costbl_4_sf[idx & 0x1f] * (0x800 - (a & 0x7ff)) + + (int64_t)av_costbl_4_sf[(idx & 0x1f)+1]*(a & 0x7ff) + + 0x400) >> 11); + st = (int)(((int64_t)av_sintbl_4_sf[idx & 0x1f] * (0x800 - (a & 0x7ff)) + + (int64_t)av_sintbl_4_sf[(idx & 0x1f) + 1] * (a & 0x7ff) + + 0x400) >> 11); + + *c = (int)(((int64_t)cv * ct + (int64_t)sv * st + 0x20000000) >> 30); + + *s = (int)(((int64_t)cv * st + (int64_t)sv * ct + 0x20000000) >> 30); +} + +#endif /* AVUTIL_SOFTFLOAT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_ieee754.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_ieee754.h new file mode 100644 index 00000000..3398aa18 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_ieee754.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2016 Umair Khan + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_SOFTFLOAT_IEEE754_H +#define AVUTIL_SOFTFLOAT_IEEE754_H + +#include + +#define EXP_BIAS 127 +#define MANT_BITS 23 + +typedef struct SoftFloat_IEEE754 { + int32_t sign; + uint64_t mant; + int32_t exp; +} SoftFloat_IEEE754; + +static const SoftFloat_IEEE754 FLOAT_0 = {0, 0, -126}; +static const SoftFloat_IEEE754 FLOAT_1 = {0, 0, 0}; + +/** Normalize the softfloat as defined by IEEE 754 single-recision floating + * point specification + */ +static inline SoftFloat_IEEE754 av_normalize_sf_ieee754(SoftFloat_IEEE754 sf) { + while( sf.mant >= 0x1000000UL ) { + sf.exp++; + sf.mant >>= 1; + } + sf.mant &= 0x007fffffUL; + return sf; +} + +/** Convert integer to softfloat. + * @return softfloat with value n * 2^e + */ +static inline SoftFloat_IEEE754 av_int2sf_ieee754(int64_t n, int e) { + int sign = 0; + + if (n < 0) { + sign = 1; + n *= -1; + } + return av_normalize_sf_ieee754((SoftFloat_IEEE754) {sign, n << MANT_BITS, 0 + e}); +} + +/** Make a softfloat out of the bitstream. Assumes the bits are in the form as defined + * by the IEEE 754 spec. + */ +static inline SoftFloat_IEEE754 av_bits2sf_ieee754(uint32_t n) { + return ((SoftFloat_IEEE754) { (n & 0x80000000UL) >> 31, (n & 0x7FFFFFUL), (int8_t)((n & 0x7F800000UL) >> 23)}); +} + +/** Convert the softfloat to integer + */ +static inline int av_sf2int_ieee754(SoftFloat_IEEE754 a) { + if(a.exp >= 0) return a.mant << a.exp ; + else return a.mant >>(-a.exp); +} + +/** Divide a by b. b should not be zero. + * @return normalized result + */ +static inline SoftFloat_IEEE754 av_div_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { + int32_t mant, exp, sign; + a = av_normalize_sf_ieee754(a); + b = av_normalize_sf_ieee754(b); + sign = a.sign ^ b.sign; + mant = ((((uint64_t) (a.mant | 0x00800000UL)) << MANT_BITS) / (b.mant| 0x00800000UL)); + exp = a.exp - b.exp; + return av_normalize_sf_ieee754((SoftFloat_IEEE754) {sign, mant, exp}); +} + +/** Multiply a with b + * #return normalized result + */ +static inline SoftFloat_IEEE754 av_mul_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { + int32_t sign, mant, exp; + a = av_normalize_sf_ieee754(a); + b = av_normalize_sf_ieee754(b); + sign = a.sign ^ b.sign; + mant = (((uint64_t)(a.mant|0x00800000UL) * (uint64_t)(b.mant|0x00800000UL))>>MANT_BITS); + exp = a.exp + b.exp; + return av_normalize_sf_ieee754((SoftFloat_IEEE754) {sign, mant, exp}); +} + +/** Compare a with b strictly + * @returns 1 if the a and b are equal, 0 otherwise. + */ +static inline int av_cmp_sf_ieee754(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) { + a = av_normalize_sf_ieee754(a); + b = av_normalize_sf_ieee754(b); + if (a.sign != b.sign) return 0; + if (a.mant != b.mant) return 0; + if (a.exp != b.exp ) return 0; + return 1; +} + +#endif /*AVUTIL_SOFTFLOAT_IEEE754_H*/ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_tables.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_tables.h new file mode 100644 index 00000000..461f2b22 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/softfloat_tables.h @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2012 + * MIPS Technologies, Inc., California. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the MIPS Technologies, Inc., nor the names of is + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Author: Stanislav Ocovaj (stanislav.ocovaj imgtec com) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AVUTIL_SOFTFLOAT_TABLES_H +#define AVUTIL_SOFTFLOAT_TABLES_H + +#include + +static const int32_t av_sqrttbl_sf[512+1] = { /* sqrt(x), 0.5<=x<1 */ + 0x2d413ccd,0x2d4c8bb3,0x2d57d7c6,0x2d63210a, + 0x2d6e677f,0x2d79ab2a,0x2d84ec0b,0x2d902a23, + 0x2d9b6578,0x2da69e08,0x2db1d3d6,0x2dbd06e6, + 0x2dc83738,0x2dd364ce,0x2dde8fac,0x2de9b7d2, + 0x2df4dd43,0x2e000000,0x2e0b200c,0x2e163d68, + 0x2e215816,0x2e2c701a,0x2e378573,0x2e429824, + 0x2e4da830,0x2e58b598,0x2e63c05d,0x2e6ec883, + 0x2e79ce0a,0x2e84d0f5,0x2e8fd144,0x2e9acefb, + 0x2ea5ca1b,0x2eb0c2a7,0x2ebbb89e,0x2ec6ac04, + 0x2ed19cda,0x2edc8b23,0x2ee776df,0x2ef26012, + 0x2efd46bb,0x2f082add,0x2f130c7b,0x2f1deb95, + 0x2f28c82e,0x2f33a246,0x2f3e79e1,0x2f494eff, + 0x2f5421a3,0x2f5ef1ce,0x2f69bf81,0x2f748abe, + 0x2f7f5388,0x2f8a19e0,0x2f94ddc7,0x2f9f9f3e, + 0x2faa5e48,0x2fb51ae8,0x2fbfd51c,0x2fca8ce9, + 0x2fd5424e,0x2fdff54e,0x2feaa5eb,0x2ff55426, + 0x30000000,0x300aa97b,0x3015509a,0x301ff55c, + 0x302a97c5,0x303537d5,0x303fd58e,0x304a70f2, + 0x30550a01,0x305fa0be,0x306a352a,0x3074c747, + 0x307f5716,0x3089e499,0x30946fd2,0x309ef8c0, + 0x30a97f67,0x30b403c7,0x30be85e2,0x30c905bb, + 0x30d38351,0x30ddfea6,0x30e877bc,0x30f2ee96, + 0x30fd6332,0x3107d594,0x311245bc,0x311cb3ad, + 0x31271f67,0x313188ec,0x313bf03d,0x3146555c, + 0x3150b84a,0x315b1909,0x31657798,0x316fd3fc, + 0x317a2e34,0x31848642,0x318edc28,0x31992fe5, + 0x31a3817d,0x31add0f0,0x31b81e40,0x31c2696e, + 0x31ccb27b,0x31d6f969,0x31e13e38,0x31eb80eb, + 0x31f5c182,0x32000000,0x320a3c65,0x321476b1, + 0x321eaee8,0x3228e50a,0x32331917,0x323d4b13, + 0x32477afc,0x3251a8d6,0x325bd4a2,0x3265fe5f, + 0x32702611,0x327a4bb8,0x32846f55,0x328e90e9, + 0x3298b076,0x32a2cdfd,0x32ace97e,0x32b702fd, + 0x32c11a79,0x32cb2ff3,0x32d5436d,0x32df54e9, + 0x32e96466,0x32f371e8,0x32fd7d6d,0x330786f9, + 0x33118e8c,0x331b9426,0x332597cb,0x332f9979, + 0x33399933,0x334396fa,0x334d92cf,0x33578cb2, + 0x336184a6,0x336b7aab,0x33756ec3,0x337f60ed, + 0x3389512d,0x33933f83,0x339d2bef,0x33a71672, + 0x33b0ff10,0x33bae5c7,0x33c4ca99,0x33cead88, + 0x33d88e95,0x33e26dbf,0x33ec4b09,0x33f62673, + 0x34000000,0x3409d7af,0x3413ad82,0x341d817a, + 0x34275397,0x343123db,0x343af248,0x3444bedd, + 0x344e899d,0x34585288,0x3462199f,0x346bdee3, + 0x3475a254,0x347f63f5,0x348923c6,0x3492e1c9, + 0x349c9dfe,0x34a65865,0x34b01101,0x34b9c7d2, + 0x34c37cda,0x34cd3018,0x34d6e18f,0x34e0913f, + 0x34ea3f29,0x34f3eb4d,0x34fd95ae,0x35073e4c, + 0x3510e528,0x351a8a43,0x35242d9d,0x352dcf39, + 0x35376f16,0x35410d36,0x354aa99a,0x35544442, + 0x355ddd2f,0x35677463,0x357109df,0x357a9da2, + 0x35842fb0,0x358dc007,0x35974ea9,0x35a0db98, + 0x35aa66d3,0x35b3f05c,0x35bd7833,0x35c6fe5a, + 0x35d082d3,0x35da059c,0x35e386b7,0x35ed0626, + 0x35f683e8,0x36000000,0x36097a6e,0x3612f331, + 0x361c6a4d,0x3625dfc1,0x362f538f,0x3638c5b7, + 0x36423639,0x364ba518,0x36551252,0x365e7deb, + 0x3667e7e2,0x36715039,0x367ab6f0,0x36841c07, + 0x368d7f81,0x3696e15d,0x36a0419d,0x36a9a040, + 0x36b2fd49,0x36bc58b8,0x36c5b28e,0x36cf0acb, + 0x36d86170,0x36e1b680,0x36eb09f8,0x36f45bdc, + 0x36fdac2b,0x3706fae7,0x37104810,0x371993a7, + 0x3722ddad,0x372c2622,0x37356d08,0x373eb25f, + 0x3747f629,0x37513865,0x375a7914,0x3763b838, + 0x376cf5d0,0x377631e0,0x377f6c64,0x3788a561, + 0x3791dcd6,0x379b12c4,0x37a4472c,0x37ad7a0e, + 0x37b6ab6a,0x37bfdb44,0x37c90999,0x37d2366d, + 0x37db61be,0x37e48b8e,0x37edb3de,0x37f6daae, + 0x38000000,0x380923d3,0x3812462a,0x381b6703, + 0x38248660,0x382da442,0x3836c0aa,0x383fdb97, + 0x3848f50c,0x38520d09,0x385b238d,0x3864389b, + 0x386d4c33,0x38765e55,0x387f6f01,0x38887e3b, + 0x38918c00,0x389a9853,0x38a3a334,0x38acaca3, + 0x38b5b4a3,0x38bebb32,0x38c7c051,0x38d0c402, + 0x38d9c645,0x38e2c71b,0x38ebc685,0x38f4c482, + 0x38fdc114,0x3906bc3c,0x390fb5fa,0x3918ae4f, + 0x3921a53a,0x392a9abe,0x39338edb,0x393c8192, + 0x394572e2,0x394e62ce,0x39575155,0x39603e77, + 0x39692a36,0x39721494,0x397afd8f,0x3983e527, + 0x398ccb60,0x3995b039,0x399e93b2,0x39a775cc, + 0x39b05689,0x39b935e8,0x39c213e9,0x39caf08e, + 0x39d3cbd9,0x39dca5c7,0x39e57e5b,0x39ee5596, + 0x39f72b77,0x3a000000,0x3a08d331,0x3a11a50a, + 0x3a1a758d,0x3a2344ba,0x3a2c1291,0x3a34df13, + 0x3a3daa41,0x3a46741b,0x3a4f3ca3,0x3a5803d7, + 0x3a60c9ba,0x3a698e4b,0x3a72518b,0x3a7b137c, + 0x3a83d41d,0x3a8c936f,0x3a955173,0x3a9e0e29, + 0x3aa6c992,0x3aaf83ae,0x3ab83c7e,0x3ac0f403, + 0x3ac9aa3c,0x3ad25f2c,0x3adb12d1,0x3ae3c52d, + 0x3aec7642,0x3af5260e,0x3afdd492,0x3b0681d0, + 0x3b0f2dc6,0x3b17d878,0x3b2081e4,0x3b292a0c, + 0x3b31d0f0,0x3b3a7690,0x3b431aec,0x3b4bbe06, + 0x3b545fdf,0x3b5d0077,0x3b659fcd,0x3b6e3de4, + 0x3b76daba,0x3b7f7651,0x3b8810aa,0x3b90a9c4, + 0x3b9941a1,0x3ba1d842,0x3baa6da5,0x3bb301cd, + 0x3bbb94b9,0x3bc4266a,0x3bccb6e2,0x3bd5461f, + 0x3bddd423,0x3be660ee,0x3beeec81,0x3bf776dc, + 0x3c000000,0x3c0887ed,0x3c110ea4,0x3c199426, + 0x3c221872,0x3c2a9b8a,0x3c331d6e,0x3c3b9e1d, + 0x3c441d9a,0x3c4c9be5,0x3c5518fd,0x3c5d94e3, + 0x3c660f98,0x3c6e891d,0x3c770172,0x3c7f7898, + 0x3c87ee8e,0x3c906356,0x3c98d6ef,0x3ca1495b, + 0x3ca9ba9a,0x3cb22aac,0x3cba9992,0x3cc3074c, + 0x3ccb73dc,0x3cd3df41,0x3cdc497b,0x3ce4b28c, + 0x3ced1a73,0x3cf58132,0x3cfde6c8,0x3d064b37, + 0x3d0eae7f,0x3d17109f,0x3d1f719a,0x3d27d16e, + 0x3d30301d,0x3d388da8,0x3d40ea0d,0x3d49454f, + 0x3d519f6d,0x3d59f867,0x3d625040,0x3d6aa6f6, + 0x3d72fc8b,0x3d7b50fe,0x3d83a451,0x3d8bf683, + 0x3d944796,0x3d9c9788,0x3da4e65c,0x3dad3412, + 0x3db580a9,0x3dbdcc24,0x3dc61680,0x3dce5fc0, + 0x3dd6a7e4,0x3ddeeeed,0x3de734d9,0x3def79ab, + 0x3df7bd62,0x3e000000,0x3e084184,0x3e1081ee, + 0x3e18c140,0x3e20ff7a,0x3e293c9c,0x3e3178a7, + 0x3e39b39a,0x3e41ed77,0x3e4a263d,0x3e525def, + 0x3e5a948b,0x3e62ca12,0x3e6afe85,0x3e7331e4, + 0x3e7b642f,0x3e839567,0x3e8bc58c,0x3e93f49f, + 0x3e9c22a1,0x3ea44f91,0x3eac7b6f,0x3eb4a63e, + 0x3ebccffb,0x3ec4f8aa,0x3ecd2049,0x3ed546d9, + 0x3edd6c5a,0x3ee590cd,0x3eedb433,0x3ef5d68c, + 0x3efdf7d7,0x3f061816,0x3f0e3749,0x3f165570, + 0x3f1e728c,0x3f268e9d,0x3f2ea9a4,0x3f36c3a0, + 0x3f3edc93,0x3f46f47c,0x3f4f0b5d,0x3f572135, + 0x3f5f3606,0x3f6749cf,0x3f6f5c90,0x3f776e4a, + 0x3f7f7efe,0x3f878eab,0x3f8f9d53,0x3f97aaf6, + 0x3f9fb793,0x3fa7c32c,0x3fafcdc1,0x3fb7d752, + 0x3fbfdfe0,0x3fc7e76b,0x3fcfedf3,0x3fd7f378, + 0x3fdff7fc,0x3fe7fb7f,0x3feffe00,0x3ff7ff80, + 0x3fffffff, +}; + +static const int32_t av_sqr_exp_multbl_sf[2] = { + 0x20000000,0x2d413ccd, +}; + +static const int32_t av_costbl_1_sf[16] = { + 0x40000000,0x3ec52fa0,0x3b20d79e,0x3536cc52, + 0x2d413ccd,0x238e7673,0x187de2a7,0x0c7c5c1e, + 0x00000000,0xf383a3e3,0xe7821d5a,0xdc71898e, + 0xd2bec334,0xcac933af,0xc4df2863,0xc13ad061, +}; + +static const int32_t av_costbl_2_sf[32] = { + 0x40000000,0x3fffb10b,0x3ffec42d,0x3ffd3969, + 0x3ffb10c1,0x3ff84a3c,0x3ff4e5e0,0x3ff0e3b6, + 0x3fec43c7,0x3fe7061f,0x3fe12acb,0x3fdab1d9, + 0x3fd39b5a,0x3fcbe75e,0x3fc395f9,0x3fbaa740, + 0x3fb11b48,0x3fa6f228,0x3f9c2bfb,0x3f90c8da, + 0x3f84c8e2,0x3f782c30,0x3f6af2e3,0x3f5d1d1d, + 0x3f4eaafe,0x3f3f9cab,0x3f2ff24a,0x3f1fabff, + 0x3f0ec9f5,0x3efd4c54,0x3eeb3347,0x3ed87efc, +}; + +static const int32_t av_sintbl_2_sf[32] = { + 0x00000000,0x006487c4,0x00c90e90,0x012d936c, + 0x0192155f,0x01f69373,0x025b0caf,0x02bf801a, + 0x0323ecbe,0x038851a2,0x03ecadcf,0x0451004d, + 0x04b54825,0x0519845e,0x057db403,0x05e1d61b, + 0x0645e9af,0x06a9edc9,0x070de172,0x0771c3b3, + 0x07d59396,0x08395024,0x089cf867,0x09008b6a, + 0x09640837,0x09c76dd8,0x0a2abb59,0x0a8defc3, + 0x0af10a22,0x0b540982,0x0bb6ecef,0x0c19b374, +}; + +static const int32_t av_costbl_3_sf[32] = { + 0x40000000,0x3fffffec,0x3fffffb1,0x3fffff4e, + 0x3ffffec4,0x3ffffe13,0x3ffffd39,0x3ffffc39, + 0x3ffffb11,0x3ffff9c1,0x3ffff84a,0x3ffff6ac, + 0x3ffff4e6,0x3ffff2f8,0x3ffff0e3,0x3fffeea7, + 0x3fffec43,0x3fffe9b7,0x3fffe705,0x3fffe42a, + 0x3fffe128,0x3fffddff,0x3fffdaae,0x3fffd736, + 0x3fffd396,0x3fffcfcf,0x3fffcbe0,0x3fffc7ca, + 0x3fffc38c,0x3fffbf27,0x3fffba9b,0x3fffb5e7, +}; + +static const int32_t av_sintbl_3_sf[32] = { + 0x00000000,0x0003243f,0x0006487f,0x00096cbe, + 0x000c90fe,0x000fb53d,0x0012d97c,0x0015fdbb, + 0x001921fb,0x001c463a,0x001f6a79,0x00228eb8, + 0x0025b2f7,0x0028d736,0x002bfb74,0x002f1fb3, + 0x003243f1,0x00356830,0x00388c6e,0x003bb0ac, + 0x003ed4ea,0x0041f928,0x00451d66,0x004841a3, + 0x004b65e1,0x004e8a1e,0x0051ae5b,0x0054d297, + 0x0057f6d4,0x005b1b10,0x005e3f4c,0x00616388, +}; + +static const int32_t av_costbl_4_sf[33] = { + 0x40000000,0x40000000,0x40000000,0x40000000, + 0x40000000,0x40000000,0x3fffffff,0x3fffffff, + 0x3fffffff,0x3ffffffe,0x3ffffffe,0x3ffffffe, + 0x3ffffffd,0x3ffffffd,0x3ffffffc,0x3ffffffc, + 0x3ffffffb,0x3ffffffa,0x3ffffffa,0x3ffffff9, + 0x3ffffff8,0x3ffffff7,0x3ffffff7,0x3ffffff6, + 0x3ffffff5,0x3ffffff4,0x3ffffff3,0x3ffffff2, + 0x3ffffff1,0x3ffffff0,0x3fffffef,0x3fffffed, + 0x3fffffec, +}; + +static const int32_t av_sintbl_4_sf[33] = { + 0x00000000,0x00001922,0x00003244,0x00004b66, + 0x00006488,0x00007daa,0x000096cc,0x0000afee, + 0x0000c910,0x0000e232,0x0000fb54,0x00011476, + 0x00012d98,0x000146ba,0x00015fdc,0x000178fe, + 0x00019220,0x0001ab42,0x0001c464,0x0001dd86, + 0x0001f6a8,0x00020fca,0x000228ec,0x0002420e, + 0x00025b30,0x00027452,0x00028d74,0x0002a696, + 0x0002bfb7,0x0002d8d9,0x0002f1fb,0x00030b1d, + 0x0003243f, +}; +#endif /* AVUTIL_SOFTFLOAT_TABLES_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/spherical.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/spherical.h new file mode 100644 index 00000000..cef759cf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/spherical.h @@ -0,0 +1,232 @@ +/* + * Copyright (c) 2016 Vittorio Giovara + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Spherical video + */ + +#ifndef AVUTIL_SPHERICAL_H +#define AVUTIL_SPHERICAL_H + +#include +#include + +/** + * @addtogroup lavu_video + * @{ + * + * @defgroup lavu_video_spherical Spherical video mapping + * @{ + */ + +/** + * @addtogroup lavu_video_spherical + * A spherical video file contains surfaces that need to be mapped onto a + * sphere. Depending on how the frame was converted, a different distortion + * transformation or surface recomposition function needs to be applied before + * the video should be mapped and displayed. + */ + +/** + * Projection of the video surface(s) on a sphere. + */ +enum AVSphericalProjection { + /** + * Video represents a sphere mapped on a flat surface using + * equirectangular projection. + */ + AV_SPHERICAL_EQUIRECTANGULAR, + + /** + * Video frame is split into 6 faces of a cube, and arranged on a + * 3x2 layout. Faces are oriented upwards for the front, left, right, + * and back faces. The up face is oriented so the top of the face is + * forwards and the down face is oriented so the top of the face is + * to the back. + */ + AV_SPHERICAL_CUBEMAP, + + /** + * Video represents a portion of a sphere mapped on a flat surface + * using equirectangular projection. The @ref bounding fields indicate + * the position of the current video in a larger surface. + */ + AV_SPHERICAL_EQUIRECTANGULAR_TILE, +}; + +/** + * This structure describes how to handle spherical videos, outlining + * information about projection, initial layout, and any other view modifier. + * + * @note The struct must be allocated with av_spherical_alloc() and + * its size is not a part of the public ABI. + */ +typedef struct AVSphericalMapping { + /** + * Projection type. + */ + enum AVSphericalProjection projection; + + /** + * @name Initial orientation + * @{ + * There fields describe additional rotations applied to the sphere after + * the video frame is mapped onto it. The sphere is rotated around the + * viewer, who remains stationary. The order of transformation is always + * yaw, followed by pitch, and finally by roll. + * + * The coordinate system matches the one defined in OpenGL, where the + * forward vector (z) is coming out of screen, and it is equivalent to + * a rotation matrix of R = r_y(yaw) * r_x(pitch) * r_z(roll). + * + * A positive yaw rotates the portion of the sphere in front of the viewer + * toward their right. A positive pitch rotates the portion of the sphere + * in front of the viewer upwards. A positive roll tilts the portion of + * the sphere in front of the viewer to the viewer's right. + * + * These values are exported as 16.16 fixed point. + * + * See this equirectangular projection as example: + * + * @code{.unparsed} + * Yaw + * -180 0 180 + * 90 +-------------+-------------+ 180 + * | | | up + * P | | | y| forward + * i | ^ | | /z + * t 0 +-------------X-------------+ 0 Roll | / + * c | | | | / + * h | | | 0|/_____right + * | | | x + * -90 +-------------+-------------+ -180 + * + * X - the default camera center + * ^ - the default up vector + * @endcode + */ + int32_t yaw; ///< Rotation around the up vector [-180, 180]. + int32_t pitch; ///< Rotation around the right vector [-90, 90]. + int32_t roll; ///< Rotation around the forward vector [-180, 180]. + /** + * @} + */ + + /** + * @name Bounding rectangle + * @anchor bounding + * @{ + * These fields indicate the location of the current tile, and where + * it should be mapped relative to the original surface. They are + * exported as 0.32 fixed point, and can be converted to classic + * pixel values with av_spherical_bounds(). + * + * @code{.unparsed} + * +----------------+----------+ + * | |bound_top | + * | +--------+ | + * | bound_left |tile | | + * +<---------->| |<--->+bound_right + * | +--------+ | + * | | | + * | bound_bottom| | + * +----------------+----------+ + * @endcode + * + * If needed, the original video surface dimensions can be derived + * by adding the current stream or frame size to the related bounds, + * like in the following example: + * + * @code{c} + * original_width = tile->width + bound_left + bound_right; + * original_height = tile->height + bound_top + bound_bottom; + * @endcode + * + * @note These values are valid only for the tiled equirectangular + * projection type (@ref AV_SPHERICAL_EQUIRECTANGULAR_TILE), + * and should be ignored in all other cases. + */ + uint32_t bound_left; ///< Distance from the left edge + uint32_t bound_top; ///< Distance from the top edge + uint32_t bound_right; ///< Distance from the right edge + uint32_t bound_bottom; ///< Distance from the bottom edge + /** + * @} + */ + + /** + * Number of pixels to pad from the edge of each cube face. + * + * @note This value is valid for only for the cubemap projection type + * (@ref AV_SPHERICAL_CUBEMAP), and should be ignored in all other + * cases. + */ + uint32_t padding; +} AVSphericalMapping; + +/** + * Allocate a AVSphericalVideo structure and initialize its fields to default + * values. + * + * @return the newly allocated struct or NULL on failure + */ +AVSphericalMapping *av_spherical_alloc(size_t *size); + +/** + * Convert the @ref bounding fields from an AVSphericalVideo + * from 0.32 fixed point to pixels. + * + * @param map The AVSphericalVideo map to read bound values from. + * @param width Width of the current frame or stream. + * @param height Height of the current frame or stream. + * @param left Pixels from the left edge. + * @param top Pixels from the top edge. + * @param right Pixels from the right edge. + * @param bottom Pixels from the bottom edge. + */ +void av_spherical_tile_bounds(const AVSphericalMapping *map, + size_t width, size_t height, + size_t *left, size_t *top, + size_t *right, size_t *bottom); + +/** + * Provide a human-readable name of a given AVSphericalProjection. + * + * @param projection The input AVSphericalProjection. + * + * @return The name of the AVSphericalProjection, or "unknown". + */ +const char *av_spherical_projection_name(enum AVSphericalProjection projection); + +/** + * Get the AVSphericalProjection form a human-readable name. + * + * @param name The input string. + * + * @return The AVSphericalProjection value, or -1 if not found. + */ +int av_spherical_from_name(const char *name); +/** + * @} + * @} + */ + +#endif /* AVUTIL_SPHERICAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/stereo3d.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/stereo3d.h new file mode 100644 index 00000000..d421aac2 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/stereo3d.h @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2013 Vittorio Giovara + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Stereoscopic video + */ + +#ifndef AVUTIL_STEREO3D_H +#define AVUTIL_STEREO3D_H + +#include + +#include "frame.h" + +/** + * @addtogroup lavu_video + * @{ + * + * @defgroup lavu_video_stereo3d Stereo3D types and functions + * @{ + */ + +/** + * @addtogroup lavu_video_stereo3d + * A stereoscopic video file consists in multiple views embedded in a single + * frame, usually describing two views of a scene. This file describes all + * possible codec-independent view arrangements. + * */ + +/** + * List of possible 3D Types + */ +enum AVStereo3DType { + /** + * Video is not stereoscopic (and metadata has to be there). + */ + AV_STEREO3D_2D, + + /** + * Views are next to each other. + * + * @code{.unparsed} + * LLLLRRRR + * LLLLRRRR + * LLLLRRRR + * ... + * @endcode + */ + AV_STEREO3D_SIDEBYSIDE, + + /** + * Views are on top of each other. + * + * @code{.unparsed} + * LLLLLLLL + * LLLLLLLL + * RRRRRRRR + * RRRRRRRR + * @endcode + */ + AV_STEREO3D_TOPBOTTOM, + + /** + * Views are alternated temporally. + * + * @code{.unparsed} + * frame0 frame1 frame2 ... + * LLLLLLLL RRRRRRRR LLLLLLLL + * LLLLLLLL RRRRRRRR LLLLLLLL + * LLLLLLLL RRRRRRRR LLLLLLLL + * ... ... ... + * @endcode + */ + AV_STEREO3D_FRAMESEQUENCE, + + /** + * Views are packed in a checkerboard-like structure per pixel. + * + * @code{.unparsed} + * LRLRLRLR + * RLRLRLRL + * LRLRLRLR + * ... + * @endcode + */ + AV_STEREO3D_CHECKERBOARD, + + /** + * Views are next to each other, but when upscaling + * apply a checkerboard pattern. + * + * @code{.unparsed} + * LLLLRRRR L L L L R R R R + * LLLLRRRR => L L L L R R R R + * LLLLRRRR L L L L R R R R + * LLLLRRRR L L L L R R R R + * @endcode + */ + AV_STEREO3D_SIDEBYSIDE_QUINCUNX, + + /** + * Views are packed per line, as if interlaced. + * + * @code{.unparsed} + * LLLLLLLL + * RRRRRRRR + * LLLLLLLL + * ... + * @endcode + */ + AV_STEREO3D_LINES, + + /** + * Views are packed per column. + * + * @code{.unparsed} + * LRLRLRLR + * LRLRLRLR + * LRLRLRLR + * ... + * @endcode + */ + AV_STEREO3D_COLUMNS, +}; + +/** + * List of possible view types. + */ +enum AVStereo3DView { + /** + * Frame contains two packed views. + */ + AV_STEREO3D_VIEW_PACKED, + + /** + * Frame contains only the left view. + */ + AV_STEREO3D_VIEW_LEFT, + + /** + * Frame contains only the right view. + */ + AV_STEREO3D_VIEW_RIGHT, +}; + +/** + * Inverted views, Right/Bottom represents the left view. + */ +#define AV_STEREO3D_FLAG_INVERT (1 << 0) + +/** + * Stereo 3D type: this structure describes how two videos are packed + * within a single video surface, with additional information as needed. + * + * @note The struct must be allocated with av_stereo3d_alloc() and + * its size is not a part of the public ABI. + */ +typedef struct AVStereo3D { + /** + * How views are packed within the video. + */ + enum AVStereo3DType type; + + /** + * Additional information about the frame packing. + */ + int flags; + + /** + * Determines which views are packed. + */ + enum AVStereo3DView view; +} AVStereo3D; + +/** + * Allocate an AVStereo3D structure and set its fields to default values. + * The resulting struct can be freed using av_freep(). + * + * @return An AVStereo3D filled with default values or NULL on failure. + */ +AVStereo3D *av_stereo3d_alloc(void); + +/** + * Allocate a complete AVFrameSideData and add it to the frame. + * + * @param frame The frame which side data is added to. + * + * @return The AVStereo3D structure to be filled by caller. + */ +AVStereo3D *av_stereo3d_create_side_data(AVFrame *frame); + +/** + * Provide a human-readable name of a given stereo3d type. + * + * @param type The input stereo3d type value. + * + * @return The name of the stereo3d value, or "unknown". + */ +const char *av_stereo3d_type_name(unsigned int type); + +/** + * Get the AVStereo3DType form a human-readable name. + * + * @param name The input string. + * + * @return The AVStereo3DType value, or -1 if not found. + */ +int av_stereo3d_from_name(const char *name); + +/** + * @} + * @} + */ + +#endif /* AVUTIL_STEREO3D_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tablegen.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tablegen.h new file mode 100644 index 00000000..02acdd61 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tablegen.h @@ -0,0 +1,55 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Compatibility libm for table generation files + */ + +#ifndef AVUTIL_TABLEGEN_H +#define AVUTIL_TABLEGEN_H + +#include + +// we lack some functions on all host platforms, and we don't care about +// performance and/or strict ISO C semantics as it's performed at build time +static inline double ff_cbrt(double x) +{ + return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); +} +#define cbrt ff_cbrt + +static inline double ff_rint(double x) +{ + return x >= 0 ? floor(x + 0.5) : ceil(x - 0.5); +} +#define rint ff_rint + +static inline long long ff_llrint(double x) +{ + return rint(x); +} +#define llrint ff_llrint + +static inline long ff_lrint(double x) +{ + return rint(x); +} +#define lrint ff_lrint + +#endif /* AVUTIL_TABLEGEN_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tea.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tea.h new file mode 100644 index 00000000..dd929bda --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tea.h @@ -0,0 +1,71 @@ +/* + * A 32-bit implementation of the TEA algorithm + * Copyright (c) 2015 Vesselin Bontchev + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TEA_H +#define AVUTIL_TEA_H + +#include + +/** + * @file + * @brief Public header for libavutil TEA algorithm + * @defgroup lavu_tea TEA + * @ingroup lavu_crypto + * @{ + */ + +extern const int av_tea_size; + +struct AVTEA; + +/** + * Allocate an AVTEA context + * To free the struct: av_free(ptr) + */ +struct AVTEA *av_tea_alloc(void); + +/** + * Initialize an AVTEA context. + * + * @param ctx an AVTEA context + * @param key a key of 16 bytes used for encryption/decryption + * @param rounds the number of rounds in TEA (64 is the "standard") + */ +void av_tea_init(struct AVTEA *ctx, const uint8_t key[16], int rounds); + +/** + * Encrypt or decrypt a buffer using a previously initialized context. + * + * @param ctx an AVTEA context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, if NULL then ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_tea_crypt(struct AVTEA *ctx, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt); + +/** + * @} + */ + +#endif /* AVUTIL_TEA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/thread.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/thread.h new file mode 100644 index 00000000..be5c4b13 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/thread.h @@ -0,0 +1,186 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// This header should only be used to simplify code where +// threading is optional, not as a generic threading abstraction. + +#ifndef AVUTIL_THREAD_H +#define AVUTIL_THREAD_H + +#include "config.h" + +#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS + +#if HAVE_PTHREADS +#include + +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 + +#include "log.h" + +#define ASSERT_PTHREAD_ABORT(func, ret) do { \ + char errbuf[AV_ERROR_MAX_STRING_SIZE] = ""; \ + av_log(NULL, AV_LOG_FATAL, AV_STRINGIFY(func) \ + " failed with error: %s\n", \ + av_make_error_string(errbuf, AV_ERROR_MAX_STRING_SIZE, \ + AVERROR(ret))); \ + abort(); \ +} while (0) + +#define ASSERT_PTHREAD_NORET(func, ...) do { \ + int ret = func(__VA_ARGS__); \ + if (ret) \ + ASSERT_PTHREAD_ABORT(func, ret); \ +} while (0) + +#define ASSERT_PTHREAD(func, ...) do { \ + ASSERT_PTHREAD_NORET(func, __VA_ARGS__); \ + return 0; \ +} while (0) + +static inline int strict_pthread_join(pthread_t thread, void **value_ptr) +{ + ASSERT_PTHREAD(pthread_join, thread, value_ptr); +} + +static inline int strict_pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) +{ + if (attr) { + ASSERT_PTHREAD_NORET(pthread_mutex_init, mutex, attr); + } else { + pthread_mutexattr_t local_attr; + ASSERT_PTHREAD_NORET(pthread_mutexattr_init, &local_attr); + ASSERT_PTHREAD_NORET(pthread_mutexattr_settype, &local_attr, PTHREAD_MUTEX_ERRORCHECK); + ASSERT_PTHREAD_NORET(pthread_mutex_init, mutex, &local_attr); + ASSERT_PTHREAD_NORET(pthread_mutexattr_destroy, &local_attr); + } + return 0; +} + +static inline int strict_pthread_mutex_destroy(pthread_mutex_t *mutex) +{ + ASSERT_PTHREAD(pthread_mutex_destroy, mutex); +} + +static inline int strict_pthread_mutex_lock(pthread_mutex_t *mutex) +{ + ASSERT_PTHREAD(pthread_mutex_lock, mutex); +} + +static inline int strict_pthread_mutex_unlock(pthread_mutex_t *mutex) +{ + ASSERT_PTHREAD(pthread_mutex_unlock, mutex); +} + +static inline int strict_pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) +{ + ASSERT_PTHREAD(pthread_cond_init, cond, attr); +} + +static inline int strict_pthread_cond_destroy(pthread_cond_t *cond) +{ + ASSERT_PTHREAD(pthread_cond_destroy, cond); +} + +static inline int strict_pthread_cond_signal(pthread_cond_t *cond) +{ + ASSERT_PTHREAD(pthread_cond_signal, cond); +} + +static inline int strict_pthread_cond_broadcast(pthread_cond_t *cond) +{ + ASSERT_PTHREAD(pthread_cond_broadcast, cond); +} + +static inline int strict_pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +{ + ASSERT_PTHREAD(pthread_cond_wait, cond, mutex); +} + +static inline int strict_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime) +{ + int ret = pthread_cond_timedwait(cond, mutex, abstime); + if (ret && ret != ETIMEDOUT) + ASSERT_PTHREAD_ABORT(pthread_cond_timedwait, ret); + return ret; +} + +static inline int strict_pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) +{ + ASSERT_PTHREAD(pthread_once, once_control, init_routine); +} + +#define pthread_join strict_pthread_join +#define pthread_mutex_init strict_pthread_mutex_init +#define pthread_mutex_destroy strict_pthread_mutex_destroy +#define pthread_mutex_lock strict_pthread_mutex_lock +#define pthread_mutex_unlock strict_pthread_mutex_unlock +#define pthread_cond_init strict_pthread_cond_init +#define pthread_cond_destroy strict_pthread_cond_destroy +#define pthread_cond_signal strict_pthread_cond_signal +#define pthread_cond_broadcast strict_pthread_cond_broadcast +#define pthread_cond_wait strict_pthread_cond_wait +#define pthread_cond_timedwait strict_pthread_cond_timedwait +#define pthread_once strict_pthread_once +#endif + +#elif HAVE_OS2THREADS +#include "compat/os2threads.h" +#else +#include "compat/w32pthreads.h" +#endif + +#define AVMutex pthread_mutex_t +#define AV_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER + +#define ff_mutex_init pthread_mutex_init +#define ff_mutex_lock pthread_mutex_lock +#define ff_mutex_unlock pthread_mutex_unlock +#define ff_mutex_destroy pthread_mutex_destroy + +#define AVOnce pthread_once_t +#define AV_ONCE_INIT PTHREAD_ONCE_INIT + +#define ff_thread_once(control, routine) pthread_once(control, routine) + +#else + +#define AVMutex char +#define AV_MUTEX_INITIALIZER 0 + +static inline int ff_mutex_init(AVMutex *mutex, const void *attr){ return 0; } +static inline int ff_mutex_lock(AVMutex *mutex){ return 0; } +static inline int ff_mutex_unlock(AVMutex *mutex){ return 0; } +static inline int ff_mutex_destroy(AVMutex *mutex){ return 0; } + +#define AVOnce char +#define AV_ONCE_INIT 0 + +static inline int ff_thread_once(char *control, void (*routine)(void)) +{ + if (!*control) { + routine(); + *control = 1; + } + return 0; +} + +#endif + +#endif /* AVUTIL_THREAD_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/threadmessage.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/threadmessage.h new file mode 100644 index 00000000..42ce655f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/threadmessage.h @@ -0,0 +1,115 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_THREADMESSAGE_H +#define AVUTIL_THREADMESSAGE_H + +typedef struct AVThreadMessageQueue AVThreadMessageQueue; + +typedef enum AVThreadMessageFlags { + + /** + * Perform non-blocking operation. + * If this flag is set, send and recv operations are non-blocking and + * return AVERROR(EAGAIN) immediately if they can not proceed. + */ + AV_THREAD_MESSAGE_NONBLOCK = 1, + +} AVThreadMessageFlags; + +/** + * Allocate a new message queue. + * + * @param mq pointer to the message queue + * @param nelem maximum number of elements in the queue + * @param elsize size of each element in the queue + * @return >=0 for success; <0 for error, in particular AVERROR(ENOSYS) if + * lavu was built without thread support + */ +int av_thread_message_queue_alloc(AVThreadMessageQueue **mq, + unsigned nelem, + unsigned elsize); + +/** + * Free a message queue. + * + * The message queue must no longer be in use by another thread. + */ +void av_thread_message_queue_free(AVThreadMessageQueue **mq); + +/** + * Send a message on the queue. + */ +int av_thread_message_queue_send(AVThreadMessageQueue *mq, + void *msg, + unsigned flags); + +/** + * Receive a message from the queue. + */ +int av_thread_message_queue_recv(AVThreadMessageQueue *mq, + void *msg, + unsigned flags); + +/** + * Set the sending error code. + * + * If the error code is set to non-zero, av_thread_message_queue_send() will + * return it immediately. Conventional values, such as AVERROR_EOF or + * AVERROR(EAGAIN), can be used to cause the sending thread to stop or + * suspend its operation. + */ +void av_thread_message_queue_set_err_send(AVThreadMessageQueue *mq, + int err); + +/** + * Set the receiving error code. + * + * If the error code is set to non-zero, av_thread_message_queue_recv() will + * return it immediately when there are no longer available messages. + * Conventional values, such as AVERROR_EOF or AVERROR(EAGAIN), can be used + * to cause the receiving thread to stop or suspend its operation. + */ +void av_thread_message_queue_set_err_recv(AVThreadMessageQueue *mq, + int err); + +/** + * Set the optional free message callback function which will be called if an + * operation is removing messages from the queue. + */ +void av_thread_message_queue_set_free_func(AVThreadMessageQueue *mq, + void (*free_func)(void *msg)); + +/** + * Return the current number of messages in the queue. + * + * @return the current number of messages or AVERROR(ENOSYS) if lavu was built + * without thread support + */ +int av_thread_message_queue_nb_elems(AVThreadMessageQueue *mq); + +/** + * Flush the message queue + * + * This function is mostly equivalent to reading and free-ing every message + * except that it will be done in a single operation (no lock/unlock between + * reads). + */ +void av_thread_message_flush(AVThreadMessageQueue *mq); + +#endif /* AVUTIL_THREADMESSAGE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time.h new file mode 100644 index 00000000..dc169b06 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2000-2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TIME_H +#define AVUTIL_TIME_H + +#include + +/** + * Get the current time in microseconds. + */ +int64_t av_gettime(void); + +/** + * Get the current time in microseconds since some unspecified starting point. + * On platforms that support it, the time comes from a monotonic clock + * This property makes this time source ideal for measuring relative time. + * The returned values may not be monotonic on platforms where a monotonic + * clock is not available. + */ +int64_t av_gettime_relative(void); + +/** + * Indicates with a boolean result if the av_gettime_relative() time source + * is monotonic. + */ +int av_gettime_relative_is_monotonic(void); + +/** + * Sleep for a period of time. Although the duration is expressed in + * microseconds, the actual delay may be rounded to the precision of the + * system timer. + * + * @param usec Number of microseconds to sleep. + * @return zero on success or (negative) error code. + */ +int av_usleep(unsigned usec); + +#endif /* AVUTIL_TIME_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time_internal.h new file mode 100644 index 00000000..d0f007ab --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/time_internal.h @@ -0,0 +1,49 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TIME_INTERNAL_H +#define AVUTIL_TIME_INTERNAL_H + +#include +#include "config.h" + +#if !HAVE_GMTIME_R && !defined(gmtime_r) +static inline struct tm *ff_gmtime_r(const time_t* clock, struct tm *result) +{ + struct tm *ptr = gmtime(clock); + if (!ptr) + return NULL; + *result = *ptr; + return result; +} +#define gmtime_r ff_gmtime_r +#endif + +#if !HAVE_LOCALTIME_R && !defined(localtime_r) +static inline struct tm *ff_localtime_r(const time_t* clock, struct tm *result) +{ + struct tm *ptr = localtime(clock); + if (!ptr) + return NULL; + *result = *ptr; + return result; +} +#define localtime_r ff_localtime_r +#endif + +#endif /* AVUTIL_TIME_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timecode.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timecode.h new file mode 100644 index 00000000..37c1361b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timecode.h @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2006 Smartjog S.A.S, Baptiste Coudurier + * Copyright (c) 2011-2012 Smartjog S.A.S, Clément Bœsch + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Timecode helpers header + */ + +#ifndef AVUTIL_TIMECODE_H +#define AVUTIL_TIMECODE_H + +#include +#include "rational.h" + +#define AV_TIMECODE_STR_SIZE 23 + +enum AVTimecodeFlag { + AV_TIMECODE_FLAG_DROPFRAME = 1<<0, ///< timecode is drop frame + AV_TIMECODE_FLAG_24HOURSMAX = 1<<1, ///< timecode wraps after 24 hours + AV_TIMECODE_FLAG_ALLOWNEGATIVE = 1<<2, ///< negative time values are allowed +}; + +typedef struct { + int start; ///< timecode frame start (first base frame number) + uint32_t flags; ///< flags such as drop frame, +24 hours support, ... + AVRational rate; ///< frame rate in rational form + unsigned fps; ///< frame per second; must be consistent with the rate field +} AVTimecode; + +/** + * Adjust frame number for NTSC drop frame time code. + * + * @param framenum frame number to adjust + * @param fps frame per second, 30 or 60 + * @return adjusted frame number + * @warning adjustment is only valid in NTSC 29.97 and 59.94 + */ +int av_timecode_adjust_ntsc_framenum2(int framenum, int fps); + +/** + * Convert frame number to SMPTE 12M binary representation. + * + * @param tc timecode data correctly initialized + * @param framenum frame number + * @return the SMPTE binary representation + * + * @note Frame number adjustment is automatically done in case of drop timecode, + * you do NOT have to call av_timecode_adjust_ntsc_framenum2(). + * @note The frame number is relative to tc->start. + * @note Color frame (CF), binary group flags (BGF) and biphase mark polarity + * correction (PC) bits are set to zero. + */ +uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum); + +/** + * Load timecode string in buf. + * + * @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long + * @param tc timecode data correctly initialized + * @param framenum frame number + * @return the buf parameter + * + * @note Timecode representation can be a negative timecode and have more than + * 24 hours, but will only be honored if the flags are correctly set. + * @note The frame number is relative to tc->start. + */ +char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum); + +/** + * Get the timecode string from the SMPTE timecode format. + * + * @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long + * @param tcsmpte the 32-bit SMPTE timecode + * @param prevent_df prevent the use of a drop flag when it is known the DF bit + * is arbitrary + * @return the buf parameter + */ +char *av_timecode_make_smpte_tc_string(char *buf, uint32_t tcsmpte, int prevent_df); + +/** + * Get the timecode string from the 25-bit timecode format (MPEG GOP format). + * + * @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long + * @param tc25bit the 25-bits timecode + * @return the buf parameter + */ +char *av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit); + +/** + * Init a timecode struct with the passed parameters. + * + * @param log_ctx a pointer to an arbitrary struct of which the first field + * is a pointer to an AVClass struct (used for av_log) + * @param tc pointer to an allocated AVTimecode + * @param rate frame rate in rational form + * @param flags miscellaneous flags such as drop frame, +24 hours, ... + * (see AVTimecodeFlag) + * @param frame_start the first frame number + * @return 0 on success, AVERROR otherwise + */ +int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx); + +/** + * Parse timecode representation (hh:mm:ss[:;.]ff). + * + * @param log_ctx a pointer to an arbitrary struct of which the first field is a + * pointer to an AVClass struct (used for av_log). + * @param tc pointer to an allocated AVTimecode + * @param rate frame rate in rational form + * @param str timecode string which will determine the frame start + * @return 0 on success, AVERROR otherwise + */ +int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx); + +/** + * Check if the timecode feature is available for the given frame rate + * + * @return 0 if supported, <0 otherwise + */ +int av_timecode_check_frame_rate(AVRational rate); + +#endif /* AVUTIL_TIMECODE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timer.h new file mode 100644 index 00000000..0bb353cf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timer.h @@ -0,0 +1,141 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * high precision timer, useful to profile code + */ + +#ifndef AVUTIL_TIMER_H +#define AVUTIL_TIMER_H + +#include "config.h" + +#if CONFIG_LINUX_PERF +# ifndef _GNU_SOURCE +# define _GNU_SOURCE +# endif +# include // read(3) +# include +# include +# include +#endif + +#include +#include +#include + +#if HAVE_MACH_ABSOLUTE_TIME +#include +#endif + +#include "log.h" + +#if ARCH_AARCH64 +# include "aarch64/timer.h" +#elif ARCH_ARM +# include "arm/timer.h" +#elif ARCH_PPC +# include "ppc/timer.h" +#elif ARCH_X86 +# include "x86/timer.h" +#endif + +#if !defined(AV_READ_TIME) +# if HAVE_GETHRTIME +# define AV_READ_TIME gethrtime +# elif HAVE_MACH_ABSOLUTE_TIME +# define AV_READ_TIME mach_absolute_time +# endif +#endif + +#ifndef FF_TIMER_UNITS +# define FF_TIMER_UNITS "UNITS" +#endif + +#define TIMER_REPORT(id, tdiff) \ + { \ + static uint64_t tsum = 0; \ + static int tcount = 0; \ + static int tskip_count = 0; \ + static int thistogram[32] = {0}; \ + thistogram[av_log2(tdiff)]++; \ + if (tcount < 2 || \ + (tdiff) < 8 * tsum / tcount || \ + (tdiff) < 2000) { \ + tsum += (tdiff); \ + tcount++; \ + } else \ + tskip_count++; \ + if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \ + int i; \ + av_log(NULL, AV_LOG_ERROR, \ + "%7"PRIu64" " FF_TIMER_UNITS " in %s,%8d runs,%7d skips", \ + tsum * 10 / tcount, id, tcount, tskip_count); \ + for (i = 0; i < 32; i++) \ + av_log(NULL, AV_LOG_VERBOSE, " %2d", av_log2(2*thistogram[i]));\ + av_log(NULL, AV_LOG_ERROR, "\n"); \ + } \ + } + +#if CONFIG_LINUX_PERF + +#define START_TIMER \ + static int linux_perf_fd; \ + uint64_t tperf; \ + if (!linux_perf_fd) { \ + struct perf_event_attr attr = { \ + .type = PERF_TYPE_HARDWARE, \ + .size = sizeof(struct perf_event_attr), \ + .config = PERF_COUNT_HW_CPU_CYCLES, \ + .disabled = 1, \ + .exclude_kernel = 1, \ + .exclude_hv = 1, \ + }; \ + linux_perf_fd = syscall(__NR_perf_event_open, &attr, \ + 0, -1, -1, 0); \ + } \ + if (linux_perf_fd == -1) { \ + av_log(NULL, AV_LOG_ERROR, "perf_event_open failed: %s\n", \ + av_err2str(AVERROR(errno))); \ + } else { \ + ioctl(linux_perf_fd, PERF_EVENT_IOC_RESET, 0); \ + ioctl(linux_perf_fd, PERF_EVENT_IOC_ENABLE, 0); \ + } + +#define STOP_TIMER(id) \ + ioctl(linux_perf_fd, PERF_EVENT_IOC_DISABLE, 0); \ + read(linux_perf_fd, &tperf, sizeof(tperf)); \ + TIMER_REPORT(id, tperf) + +#elif defined(AV_READ_TIME) +#define START_TIMER \ + uint64_t tend; \ + uint64_t tstart = AV_READ_TIME(); \ + +#define STOP_TIMER(id) \ + tend = AV_READ_TIME(); \ + TIMER_REPORT(id, tend - tstart) +#else +#define START_TIMER +#define STOP_TIMER(id) { } +#endif + +#endif /* AVUTIL_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timestamp.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timestamp.h new file mode 100644 index 00000000..e082f01b --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/timestamp.h @@ -0,0 +1,78 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * timestamp utils, mostly useful for debugging/logging purposes + */ + +#ifndef AVUTIL_TIMESTAMP_H +#define AVUTIL_TIMESTAMP_H + +#include "common.h" + +#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64) +#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS +#endif + +#define AV_TS_MAX_STRING_SIZE 32 + +/** + * Fill the provided buffer with a string containing a timestamp + * representation. + * + * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE + * @param ts the timestamp to represent + * @return the buffer in input + */ +static inline char *av_ts_make_string(char *buf, int64_t ts) +{ + if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); + else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%" PRId64, ts); + return buf; +} + +/** + * Convenience macro, the return value should be used only directly in + * function arguments but never stand-alone. + */ +#define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts) + +/** + * Fill the provided buffer with a string containing a timestamp time + * representation. + * + * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE + * @param ts the timestamp to represent + * @param tb the timebase of the timestamp + * @return the buffer in input + */ +static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb) +{ + if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); + else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts); + return buf; +} + +/** + * Convenience macro, the return value should be used only directly in + * function arguments but never stand-alone. + */ +#define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb) + +#endif /* AVUTIL_TIMESTAMP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tomi/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tomi/intreadwrite.h new file mode 100644 index 00000000..7dec4158 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tomi/intreadwrite.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2010 Mans Rullgard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TOMI_INTREADWRITE_H +#define AVUTIL_TOMI_INTREADWRITE_H + +#include + +#include "config.h" +#include "libavutil/attributes.h" + +#define AV_RB16 AV_RB16 +static av_always_inline uint16_t AV_RB16(const void *p) +{ + uint16_t v; + __asm__ ("loadacc, (%1+) \n\t" + "rol8 \n\t" + "storeacc, %0 \n\t" + "loadacc, (%1+) \n\t" + "add, %0 \n\t" + : "=r"(v), "+a"(p)); + return v; +} + +#define AV_WB16 AV_WB16 +static av_always_inline void AV_WB16(void *p, uint16_t v) +{ + __asm__ volatile ("loadacc, %1 \n\t" + "lsr8 \n\t" + "storeacc, (%0+) \n\t" + "loadacc, %1 \n\t" + "storeacc, (%0+) \n\t" + : "+&a"(p) : "r"(v)); +} + +#define AV_RL16 AV_RL16 +static av_always_inline uint16_t AV_RL16(const void *p) +{ + uint16_t v; + __asm__ ("loadacc, (%1+) \n\t" + "storeacc, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "add, %0 \n\t" + : "=r"(v), "+a"(p)); + return v; +} + +#define AV_WL16 AV_WL16 +static av_always_inline void AV_WL16(void *p, uint16_t v) +{ + __asm__ volatile ("loadacc, %1 \n\t" + "storeacc, (%0+) \n\t" + "lsr8 \n\t" + "storeacc, (%0+) \n\t" + : "+&a"(p) : "r"(v)); +} + +#define AV_RB32 AV_RB32 +static av_always_inline uint32_t AV_RB32(const void *p) +{ + uint32_t v; + __asm__ ("loadacc, (%1+) \n\t" + "rol8 \n\t" + "rol8 \n\t" + "rol8 \n\t" + "storeacc, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "rol8 \n\t" + "add, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "add, %0 \n\t" + "loadacc, (%1+) \n\t" + "add, %0 \n\t" + : "=r"(v), "+a"(p)); + return v; +} + +#define AV_WB32 AV_WB32 +static av_always_inline void AV_WB32(void *p, uint32_t v) +{ + __asm__ volatile ("loadacc, #4 \n\t" + "add, %0 \n\t" + "loadacc, %1 \n\t" + "storeacc, (-%0) \n\t" + "lsr8 \n\t" + "storeacc, (-%0) \n\t" + "lsr8 \n\t" + "storeacc, (-%0) \n\t" + "lsr8 \n\t" + "storeacc, (-%0) \n\t" + : "+&a"(p) : "r"(v)); +} + +#define AV_RL32 AV_RL32 +static av_always_inline uint32_t AV_RL32(const void *p) +{ + uint32_t v; + __asm__ ("loadacc, (%1+) \n\t" + "storeacc, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "add, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "rol8 \n\t" + "add, %0 \n\t" + "loadacc, (%1+) \n\t" + "rol8 \n\t" + "rol8 \n\t" + "rol8 \n\t" + "add, %0 \n\t" + : "=r"(v), "+a"(p)); + return v; +} + +#define AV_WL32 AV_WL32 +static av_always_inline void AV_WL32(void *p, uint32_t v) +{ + __asm__ volatile ("loadacc, %1 \n\t" + "storeacc, (%0+) \n\t" + "lsr8 \n\t" + "storeacc, (%0+) \n\t" + "lsr8 \n\t" + "storeacc, (%0+) \n\t" + "lsr8 \n\t" + "storeacc, (%0+) \n\t" + : "+&a"(p) : "r"(v)); +} + +#endif /* AVUTIL_TOMI_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tree.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tree.h new file mode 100644 index 00000000..d5e0aebf --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tree.h @@ -0,0 +1,138 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * A tree container. + * @author Michael Niedermayer + */ + +#ifndef AVUTIL_TREE_H +#define AVUTIL_TREE_H + +#include "attributes.h" +#include "version.h" + +/** + * @addtogroup lavu_tree AVTree + * @ingroup lavu_data + * + * Low-complexity tree container + * + * Insertion, removal, finding equal, largest which is smaller than and + * smallest which is larger than, all have O(log n) worst-case complexity. + * @{ + */ + + +struct AVTreeNode; +extern const int av_tree_node_size; + +/** + * Allocate an AVTreeNode. + */ +struct AVTreeNode *av_tree_node_alloc(void); + +/** + * Find an element. + * @param root a pointer to the root node of the tree + * @param next If next is not NULL, then next[0] will contain the previous + * element and next[1] the next element. If either does not exist, + * then the corresponding entry in next is unchanged. + * @param cmp compare function used to compare elements in the tree, + * API identical to that of Standard C's qsort + * It is guaranteed that the first and only the first argument to cmp() + * will be the key parameter to av_tree_find(), thus it could if the + * user wants, be a different type (like an opaque context). + * @return An element with cmp(key, elem) == 0 or NULL if no such element + * exists in the tree. + */ +void *av_tree_find(const struct AVTreeNode *root, void *key, + int (*cmp)(const void *key, const void *b), void *next[2]); + +/** + * Insert or remove an element. + * + * If *next is NULL, then the supplied element will be removed if it exists. + * If *next is non-NULL, then the supplied element will be inserted, unless + * it already exists in the tree. + * + * @param rootp A pointer to a pointer to the root node of the tree; note that + * the root node can change during insertions, this is required + * to keep the tree balanced. + * @param key pointer to the element key to insert in the tree + * @param next Used to allocate and free AVTreeNodes. For insertion the user + * must set it to an allocated and zeroed object of at least + * av_tree_node_size bytes size. av_tree_insert() will set it to + * NULL if it has been consumed. + * For deleting elements *next is set to NULL by the user and + * av_tree_insert() will set it to the AVTreeNode which was + * used for the removed element. + * This allows the use of flat arrays, which have + * lower overhead compared to many malloced elements. + * You might want to define a function like: + * @code + * void *tree_insert(struct AVTreeNode **rootp, void *key, + * int (*cmp)(void *key, const void *b), + * AVTreeNode **next) + * { + * if (!*next) + * *next = av_mallocz(av_tree_node_size); + * return av_tree_insert(rootp, key, cmp, next); + * } + * void *tree_remove(struct AVTreeNode **rootp, void *key, + * int (*cmp)(void *key, const void *b, AVTreeNode **next)) + * { + * av_freep(next); + * return av_tree_insert(rootp, key, cmp, next); + * } + * @endcode + * @param cmp compare function used to compare elements in the tree, API identical + * to that of Standard C's qsort + * @return If no insertion happened, the found element; if an insertion or + * removal happened, then either key or NULL will be returned. + * Which one it is depends on the tree state and the implementation. You + * should make no assumptions that it's one or the other in the code. + */ +void *av_tree_insert(struct AVTreeNode **rootp, void *key, + int (*cmp)(const void *key, const void *b), + struct AVTreeNode **next); + +void av_tree_destroy(struct AVTreeNode *t); + +/** + * Apply enu(opaque, &elem) to all the elements in the tree in a given range. + * + * @param cmp a comparison function that returns < 0 for an element below the + * range, > 0 for an element above the range and == 0 for an + * element inside the range + * + * @note The cmp function should use the same ordering used to construct the + * tree. + */ +void av_tree_enumerate(struct AVTreeNode *t, void *opaque, + int (*cmp)(void *opaque, void *elem), + int (*enu)(void *opaque, void *elem)); + +/** + * @} + */ + +#endif /* AVUTIL_TREE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/twofish.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/twofish.h new file mode 100644 index 00000000..813cfecd --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/twofish.h @@ -0,0 +1,70 @@ +/* + * An implementation of the TwoFish algorithm + * Copyright (c) 2015 Supraja Meedinti + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TWOFISH_H +#define AVUTIL_TWOFISH_H + +#include + + +/** + * @file + * @brief Public header for libavutil TWOFISH algorithm + * @defgroup lavu_twofish TWOFISH + * @ingroup lavu_crypto + * @{ + */ + +extern const int av_twofish_size; + +struct AVTWOFISH; + +/** + * Allocate an AVTWOFISH context + * To free the struct: av_free(ptr) + */ +struct AVTWOFISH *av_twofish_alloc(void); + +/** + * Initialize an AVTWOFISH context. + * + * @param ctx an AVTWOFISH context + * @param key a key of size ranging from 1 to 32 bytes used for encryption/decryption + * @param key_bits number of keybits: 128, 192, 256 If less than the required, padded with zeroes to nearest valid value; return value is 0 if key_bits is 128/192/256, -1 if less than 0, 1 otherwise + */ +int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits); + +/** + * Encrypt or decrypt a buffer using a previously initialized context + * + * @param ctx an AVTWOFISH context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 16 byte blocks + * @paran iv initialization vector for CBC mode, NULL for ECB mode + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); + +/** + * @} + */ +#endif /* AVUTIL_TWOFISH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx.h new file mode 100644 index 00000000..418e8ec1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx.h @@ -0,0 +1,117 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TX_H +#define AVUTIL_TX_H + +#include +#include + +typedef struct AVTXContext AVTXContext; + +typedef struct AVComplexFloat { + float re, im; +} AVComplexFloat; + +typedef struct AVComplexDouble { + double re, im; +} AVComplexDouble; + +typedef struct AVComplexInt32 { + int32_t re, im; +} AVComplexInt32; + +enum AVTXType { + /** + * Standard complex to complex FFT with sample data type AVComplexFloat. + * Output is not 1/len normalized. Scaling currently unsupported. + * The stride parameter is ignored. + */ + AV_TX_FLOAT_FFT = 0, + /** + * Standard MDCT with sample data type of float and a scale type of + * float. Length is the frame size, not the window size (which is 2x frame) + * For forward transforms, the stride specifies the spacing between each + * sample in the output array in bytes. The input must be a flat array. + * For inverse transforms, the stride specifies the spacing between each + * sample in the input array in bytes. The output will be a flat array. + * Stride must be a non-zero multiple of sizeof(float). + */ + AV_TX_FLOAT_MDCT = 1, + /** + * Same as AV_TX_FLOAT_FFT with a data type of AVComplexDouble. + */ + AV_TX_DOUBLE_FFT = 2, + /** + * Same as AV_TX_FLOAT_MDCT with data and scale type of double. + * Stride must be a non-zero multiple of sizeof(double). + */ + AV_TX_DOUBLE_MDCT = 3, + /** + * Same as AV_TX_FLOAT_FFT with a data type of AVComplexInt32. + */ + AV_TX_INT32_FFT = 4, + /** + * Same as AV_TX_FLOAT_MDCT with data type of int32_t and scale type of float. + * Only scale values less than or equal to 1.0 are supported. + * Stride must be a non-zero multiple of sizeof(int32_t). + */ + AV_TX_INT32_MDCT = 5, +}; + +/** + * Function pointer to a function to perform the transform. + * + * @note Using a different context than the one allocated during av_tx_init() + * is not allowed. + * + * @param s the transform context + * @param out the output array + * @param in the input array + * @param stride the input or output stride in bytes + * + * The out and in arrays must be aligned to the maximum required by the CPU + * architecture. + * The stride must follow the constraints the transform type has specified. + */ +typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride); + +/** + * Initialize a transform context with the given configuration + * Currently power of two lengths from 2 to 131072 are supported, along with + * any length decomposable to a power of two and either 3, 5 or 15. + * + * @param ctx the context to allocate, will be NULL on error + * @param tx pointer to the transform function pointer to set + * @param type type the type of transform + * @param inv whether to do an inverse or a forward transform + * @param len the size of the transform in samples + * @param scale pointer to the value to scale the output if supported by type + * @param flags currently unused + * + * @return 0 on success, negative error code on failure + */ +int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, + int inv, int len, const void *scale, uint64_t flags); + +/** + * Frees a context and sets ctx to NULL, does nothing when ctx == NULL + */ +void av_tx_uninit(AVTXContext **ctx); + +#endif /* AVUTIL_TX_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx_priv.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx_priv.h new file mode 100644 index 00000000..e0d980ab --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/tx_priv.h @@ -0,0 +1,154 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_TX_PRIV_H +#define AVUTIL_TX_PRIV_H + +#include "tx.h" +#include +#include "thread.h" +#include "mem.h" +#include "avassert.h" +#include "attributes.h" + +#ifdef TX_FLOAT +#define TX_NAME(x) x ## _float +#define SCALE_TYPE float +typedef float FFTSample; +typedef AVComplexFloat FFTComplex; +#elif defined(TX_DOUBLE) +#define TX_NAME(x) x ## _double +#define SCALE_TYPE double +typedef double FFTSample; +typedef AVComplexDouble FFTComplex; +#elif defined(TX_INT32) +#define TX_NAME(x) x ## _int32 +#define SCALE_TYPE float +typedef int32_t FFTSample; +typedef AVComplexInt32 FFTComplex; +#else +typedef void FFTComplex; +#endif + +#if defined(TX_FLOAT) || defined(TX_DOUBLE) + +#define CMUL(dre, dim, are, aim, bre, bim) do { \ + (dre) = (are) * (bre) - (aim) * (bim); \ + (dim) = (are) * (bim) + (aim) * (bre); \ + } while (0) + +#define SMUL(dre, dim, are, aim, bre, bim) do { \ + (dre) = (are) * (bre) - (aim) * (bim); \ + (dim) = (are) * (bim) - (aim) * (bre); \ + } while (0) + +#define RESCALE(x) (x) + +#define FOLD(a, b) ((a) + (b)) + +#elif defined(TX_INT32) + +/* Properly rounds the result */ +#define CMUL(dre, dim, are, aim, bre, bim) do { \ + int64_t accu; \ + (accu) = (int64_t)(bre) * (are); \ + (accu) -= (int64_t)(bim) * (aim); \ + (dre) = (int)(((accu) + 0x40000000) >> 31); \ + (accu) = (int64_t)(bim) * (are); \ + (accu) += (int64_t)(bre) * (aim); \ + (dim) = (int)(((accu) + 0x40000000) >> 31); \ + } while (0) + +#define SMUL(dre, dim, are, aim, bre, bim) do { \ + int64_t accu; \ + (accu) = (int64_t)(bre) * (are); \ + (accu) -= (int64_t)(bim) * (aim); \ + (dre) = (int)(((accu) + 0x40000000) >> 31); \ + (accu) = (int64_t)(bim) * (are); \ + (accu) -= (int64_t)(bre) * (aim); \ + (dim) = (int)(((accu) + 0x40000000) >> 31); \ + } while (0) + +#define RESCALE(x) (lrintf((x) * 2147483648.0)) + +#define FOLD(x, y) ((int)((x) + (unsigned)(y) + 32) >> 6) + +#endif + +#define BF(x, y, a, b) do { \ + x = (a) - (b); \ + y = (a) + (b); \ + } while (0) + +#define CMUL3(c, a, b) \ + CMUL((c).re, (c).im, (a).re, (a).im, (b).re, (b).im) + +#define COSTABLE(size) \ + DECLARE_ALIGNED(32, FFTSample, TX_NAME(ff_cos_##size))[size/2] + +/* Used by asm, reorder with care */ +struct AVTXContext { + int n; /* Nptwo part */ + int m; /* Ptwo part */ + int inv; /* Is inverted */ + int type; /* Type */ + + FFTComplex *exptab; /* MDCT exptab */ + FFTComplex *tmp; /* Temporary buffer needed for all compound transforms */ + int *pfatab; /* Input/Output mapping for compound transforms */ + int *revtab; /* Input mapping for power of two transforms */ +}; + +/* Shared functions */ +int ff_tx_type_is_mdct(enum AVTXType type); +int ff_tx_gen_compound_mapping(AVTXContext *s); +int ff_tx_gen_ptwo_revtab(AVTXContext *s); + +/* Also used by SIMD init */ +static inline int split_radix_permutation(int i, int n, int inverse) +{ + int m; + if (n <= 2) + return i & 1; + m = n >> 1; + if (!(i & m)) + return split_radix_permutation(i, m, inverse)*2; + m >>= 1; + if (inverse == !(i & m)) + return split_radix_permutation(i, m, inverse)*4 + 1; + else + return split_radix_permutation(i, m, inverse)*4 - 1; +} + +/* Templated functions */ +int ff_tx_init_mdct_fft_float(AVTXContext *s, av_tx_fn *tx, + enum AVTXType type, int inv, int len, + const void *scale, uint64_t flags); +int ff_tx_init_mdct_fft_double(AVTXContext *s, av_tx_fn *tx, + enum AVTXType type, int inv, int len, + const void *scale, uint64_t flags); +int ff_tx_init_mdct_fft_int32(AVTXContext *s, av_tx_fn *tx, + enum AVTXType type, int inv, int len, + const void *scale, uint64_t flags); + +typedef struct CosTabsInitOnce { + void (*func)(void); + AVOnce control; +} CosTabsInitOnce; + +#endif /* AVUTIL_TX_PRIV_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/version.h new file mode 100644 index 00000000..0ff722fb --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/version.h @@ -0,0 +1,139 @@ +/* + * copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * @ingroup lavu + * Libavutil version macros + */ + +#ifndef AVUTIL_VERSION_H +#define AVUTIL_VERSION_H + +#include "macros.h" + +/** + * @addtogroup version_utils + * + * Useful to check and match library version in order to maintain + * backward compatibility. + * + * The FFmpeg libraries follow a versioning sheme very similar to + * Semantic Versioning (http://semver.org/) + * The difference is that the component called PATCH is called MICRO in FFmpeg + * and its value is reset to 100 instead of 0 to keep it above or equal to 100. + * Also we do not increase MICRO for every bugfix or change in git master. + * + * Prior to FFmpeg 3.2 point releases did not change any lib version number to + * avoid aliassing different git master checkouts. + * Starting with FFmpeg 3.2, the released library versions will occupy + * a separate MAJOR.MINOR that is not used on the master development branch. + * That is if we branch a release of master 55.10.123 we will bump to 55.11.100 + * for the release and master will continue at 55.12.100 after it. Each new + * point release will then bump the MICRO improving the usefulness of the lib + * versions. + * + * @{ + */ + +#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c)) +#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c +#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) + +/** + * Extract version components from the full ::AV_VERSION_INT int as returned + * by functions like ::avformat_version() and ::avcodec_version() + */ +#define AV_VERSION_MAJOR(a) ((a) >> 16) +#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8) +#define AV_VERSION_MICRO(a) ((a) & 0xFF) + +/** + * @} + */ + +/** + * @defgroup lavu_ver Version and Build diagnostics + * + * Macros and function useful to check at compiletime and at runtime + * which version of libavutil is in use. + * + * @{ + */ + +#define LIBAVUTIL_VERSION_MAJOR 56 +#define LIBAVUTIL_VERSION_MINOR 51 +#define LIBAVUTIL_VERSION_MICRO 100 + +#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ + LIBAVUTIL_VERSION_MINOR, \ + LIBAVUTIL_VERSION_MICRO) +#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \ + LIBAVUTIL_VERSION_MINOR, \ + LIBAVUTIL_VERSION_MICRO) +#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT + +#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) + +/** + * @defgroup lavu_depr_guards Deprecation Guards + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + * + * @note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + * + * @{ + */ + +#ifndef FF_API_VAAPI +#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_FRAME_QP +#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_PLUS1_MINUS1 +#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_ERROR_FRAME +#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_PKT_PTS +#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_CRYPTO_SIZE_T +#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_FRAME_GET_SET +#define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 57) +#endif +#ifndef FF_API_PSEUDOPAL +#define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 57) +#endif + + +/** + * @} + * @} + */ + +#endif /* AVUTIL_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/video_enc_params.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/video_enc_params.h new file mode 100644 index 00000000..43fa4431 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/video_enc_params.h @@ -0,0 +1,163 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_VIDEO_ENC_PARAMS_H +#define AVUTIL_VIDEO_ENC_PARAMS_H + +#include +#include + +#include "libavutil/avassert.h" +#include "libavutil/frame.h" + +enum AVVideoEncParamsType { + AV_VIDEO_ENC_PARAMS_NONE = -1, + /** + * VP9 stores: + * - per-frame base (luma AC) quantizer index, exported as AVVideoEncParams.qp + * - deltas for luma DC, chroma AC and chroma DC, exported in the + * corresponding entries in AVVideoEncParams.delta_qp + * - per-segment delta, exported as for each block as AVVideoBlockParams.delta_qp + * + * To compute the resulting quantizer index for a block: + * - for luma AC, add the base qp and the per-block delta_qp, saturating to + * unsigned 8-bit. + * - for luma DC and chroma AC/DC, add the corresponding + * AVVideoBlockParams.delta_qp to the luma AC index, again saturating to + * unsigned 8-bit. + */ + AV_VIDEO_ENC_PARAMS_VP9, + + /** + * H.264 stores: + * - in PPS (per-picture): + * * initial QP_Y (luma) value, exported as AVVideoEncParams.qp + * * delta(s) for chroma QP values (same for both, or each separately), + * exported as in the corresponding entries in AVVideoEncParams.delta_qp + * - per-slice QP delta, not exported directly, added to the per-MB value + * - per-MB delta; not exported directly; the final per-MB quantizer + * parameter - QP_Y - minus the value in AVVideoEncParams.qp is exported + * as AVVideoBlockParams.qp_delta. + */ + AV_VIDEO_ENC_PARAMS_H264, +}; + +/** + * Video encoding parameters for a given frame. This struct is allocated along + * with an optional array of per-block AVVideoBlockParams descriptors. + * Must be allocated with av_video_enc_params_alloc(). + */ +typedef struct AVVideoEncParams { + /** + * Number of blocks in the array. + * + * May be 0, in which case no per-block information is present. In this case + * the values of blocks_offset / block_size are unspecified and should not + * be accessed. + */ + unsigned int nb_blocks; + /** + * Offset in bytes from the beginning of this structure at which the array + * of blocks starts. + */ + size_t blocks_offset; + /* + * Size of each block in bytes. May not match sizeof(AVVideoBlockParams). + */ + size_t block_size; + + /** + * Type of the parameters (the codec they are used with). + */ + enum AVVideoEncParamsType type; + + /** + * Base quantisation parameter for the frame. The final quantiser for a + * given block in a given plane is obtained from this value, possibly + * combined with {@code delta_qp} and the per-block delta in a manner + * documented for each type. + */ + int32_t qp; + + /** + * Quantisation parameter offset from the base (per-frame) qp for a given + * plane (first index) and AC/DC coefficients (second index). + */ + int32_t delta_qp[4][2]; +} AVVideoEncParams; + +/** + * Data structure for storing block-level encoding information. + * It is allocated as a part of AVVideoEncParams and should be retrieved with + * av_video_enc_params_block(). + * + * sizeof(AVVideoBlockParams) is not a part of the ABI and new fields may be + * added to it. + */ +typedef struct AVVideoBlockParams { + /** + * Distance in luma pixels from the top-left corner of the visible frame + * to the top-left corner of the block. + * Can be negative if top/right padding is present on the coded frame. + */ + int src_x, src_y; + /** + * Width and height of the block in luma pixels. + */ + int w, h; + + /** + * Difference between this block's final quantization parameter and the + * corresponding per-frame value. + */ + int32_t delta_qp; +} AVVideoBlockParams; + +/* + * Get the block at the specified {@code idx}. Must be between 0 and nb_blocks. + */ +static av_always_inline AVVideoBlockParams* +av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx) +{ + av_assert0(idx < par->nb_blocks); + return (AVVideoBlockParams *)((uint8_t *)par + par->blocks_offset + + idx * par->block_size); +} + +/** + * Allocates memory for AVVideoEncParams of the given type, plus an array of + * {@code nb_blocks} AVVideoBlockParams and initializes the variables. Can be + * freed with a normal av_free() call. + * + * @param out_size if non-NULL, the size in bytes of the resulting data array is + * written here. + */ +AVVideoEncParams *av_video_enc_params_alloc(enum AVVideoEncParamsType type, + unsigned int nb_blocks, size_t *out_size); + +/** + * Allocates memory for AVEncodeInfoFrame plus an array of + * {@code nb_blocks} AVEncodeInfoBlock in the given AVFrame {@code frame} + * as AVFrameSideData of type AV_FRAME_DATA_ENCODE_INFO + * and initializes the variables. + */ +AVVideoEncParams* +av_video_enc_params_create_side_data(AVFrame *frame, enum AVVideoEncParamsType type, + unsigned int nb_blocks); + +#endif /* AVUTIL_VIDEO_ENC_PARAMS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/wchar_filename.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/wchar_filename.h new file mode 100644 index 00000000..142d50e7 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/wchar_filename.h @@ -0,0 +1,45 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_WCHAR_FILENAME_H +#define AVUTIL_WCHAR_FILENAME_H + +#ifdef _WIN32 +#include +#include "mem.h" + +av_warn_unused_result +static inline int utf8towchar(const char *filename_utf8, wchar_t **filename_w) +{ + int num_chars; + num_chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename_utf8, -1, NULL, 0); + if (num_chars <= 0) { + *filename_w = NULL; + return 0; + } + *filename_w = (wchar_t *)av_mallocz_array(num_chars, sizeof(wchar_t)); + if (!*filename_w) { + errno = ENOMEM; + return -1; + } + MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, *filename_w, num_chars); + return 0; +} +#endif + +#endif /* AVUTIL_WCHAR_FILENAME_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/asm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/asm.h new file mode 100644 index 00000000..9bff42d6 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/asm.h @@ -0,0 +1,154 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_ASM_H +#define AVUTIL_X86_ASM_H + +#include +#include "config.h" + +typedef struct xmm_reg { uint64_t a, b; } xmm_reg; +typedef struct ymm_reg { uint64_t a, b, c, d; } ymm_reg; + +#if ARCH_X86_64 +# define FF_OPSIZE "q" +# define FF_REG_a "rax" +# define FF_REG_b "rbx" +# define FF_REG_c "rcx" +# define FF_REG_d "rdx" +# define FF_REG_D "rdi" +# define FF_REG_S "rsi" +# define FF_PTR_SIZE "8" +typedef int64_t x86_reg; + +/* FF_REG_SP is defined in Solaris sys headers, so use FF_REG_sp */ +# define FF_REG_sp "rsp" +# define FF_REG_BP "rbp" +# define FF_REGBP rbp +# define FF_REGa rax +# define FF_REGb rbx +# define FF_REGc rcx +# define FF_REGd rdx +# define FF_REGSP rsp + +#elif ARCH_X86_32 + +# define FF_OPSIZE "l" +# define FF_REG_a "eax" +# define FF_REG_b "ebx" +# define FF_REG_c "ecx" +# define FF_REG_d "edx" +# define FF_REG_D "edi" +# define FF_REG_S "esi" +# define FF_PTR_SIZE "4" +typedef int32_t x86_reg; + +# define FF_REG_sp "esp" +# define FF_REG_BP "ebp" +# define FF_REGBP ebp +# define FF_REGa eax +# define FF_REGb ebx +# define FF_REGc ecx +# define FF_REGd edx +# define FF_REGSP esp +#else +typedef int x86_reg; +#endif + +#define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE)) +#define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE)) + +#if ARCH_X86_64 && defined(PIC) +# define BROKEN_RELOCATIONS 1 +#endif + +/* + * If gcc is not set to support sse (-msse) it will not accept xmm registers + * in the clobber list for inline asm. XMM_CLOBBERS takes a list of xmm + * registers to be marked as clobbered and evaluates to nothing if they are + * not supported, or to the list itself if they are supported. Since a clobber + * list may not be empty, XMM_CLOBBERS_ONLY should be used if the xmm + * registers are the only in the clobber list. + * For example a list with "eax" and "xmm0" as clobbers should become: + * : XMM_CLOBBERS("xmm0",) "eax" + * and a list with only "xmm0" should become: + * XMM_CLOBBERS_ONLY("xmm0") + */ +#if HAVE_XMM_CLOBBERS +# define XMM_CLOBBERS(...) __VA_ARGS__ +# define XMM_CLOBBERS_ONLY(...) : __VA_ARGS__ +#else +# define XMM_CLOBBERS(...) +# define XMM_CLOBBERS_ONLY(...) +#endif + +/* Use to export labels from asm. */ +#define LABEL_MANGLE(a) EXTERN_PREFIX #a + +// Use rip-relative addressing if compiling PIC code on x86-64. +#if ARCH_X86_64 && defined(PIC) +# define LOCAL_MANGLE(a) #a "(%%rip)" +#else +# define LOCAL_MANGLE(a) #a +#endif + +#if HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS +# define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a) +# define NAMED_CONSTRAINTS_ADD(...) +# define NAMED_CONSTRAINTS(...) +# define NAMED_CONSTRAINTS_ARRAY_ADD(...) +# define NAMED_CONSTRAINTS_ARRAY(...) +#else + /* When direct symbol references are used in code passed to a compiler that does not support them + * then these references need to be converted to named asm constraints instead. + * Instead of returning a direct symbol MANGLE now returns a named constraint for that specific symbol. + * In order for this to work there must also be a corresponding entry in the asm-interface. To add this + * entry use the macro NAMED_CONSTRAINTS() and pass in a list of each symbol reference used in the + * corresponding block of code. (e.g. NAMED_CONSTRAINTS(var1,var2,var3) where var1 is the first symbol etc. ). + * If there are already existing constraints then use NAMED_CONSTRAINTS_ADD to add to the existing constraint list. + */ +# define MANGLE(a) "%["#a"]" + // Intel/MSVC does not correctly expand va-args so we need a rather ugly hack in order to get it to work +# define FE_0(P,X) P(X) +# define FE_1(P,X,X1) P(X), FE_0(P,X1) +# define FE_2(P,X,X1,X2) P(X), FE_1(P,X1,X2) +# define FE_3(P,X,X1,X2,X3) P(X), FE_2(P,X1,X2,X3) +# define FE_4(P,X,X1,X2,X3,X4) P(X), FE_3(P,X1,X2,X3,X4) +# define FE_5(P,X,X1,X2,X3,X4,X5) P(X), FE_4(P,X1,X2,X3,X4,X5) +# define FE_6(P,X,X1,X2,X3,X4,X5,X6) P(X), FE_5(P,X1,X2,X3,X4,X5,X6) +# define FE_7(P,X,X1,X2,X3,X4,X5,X6,X7) P(X), FE_6(P,X1,X2,X3,X4,X5,X6,X7) +# define FE_8(P,X,X1,X2,X3,X4,X5,X6,X7,X8) P(X), FE_7(P,X1,X2,X3,X4,X5,X6,X7,X8) +# define FE_9(P,X,X1,X2,X3,X4,X5,X6,X7,X8,X9) P(X), FE_8(P,X1,X2,X3,X4,X5,X6,X7,X8,X9) +# define GET_FE_IMPL(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,NAME,...) NAME +# define GET_FE(A) GET_FE_IMPL A +# define GET_FE_GLUE(x, y) x y +# define FOR_EACH_VA(P,...) GET_FE_GLUE(GET_FE((__VA_ARGS__,FE_9,FE_8,FE_7,FE_6,FE_5,FE_4,FE_3,FE_2,FE_1,FE_0)), (P,__VA_ARGS__)) +# define NAME_CONSTRAINT(x) [x] "m"(x) + // Parameters are a list of each symbol reference required +# define NAMED_CONSTRAINTS_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__) + // Same but without comma for when there are no previously defined constraints +# define NAMED_CONSTRAINTS(...) FOR_EACH_VA(NAME_CONSTRAINT,__VA_ARGS__) + // Same as above NAMED_CONSTRAINTS except used for passing arrays/pointers instead of normal variables +# define NAME_CONSTRAINT_ARRAY(x) [x] "m"(*x) +# define NAMED_CONSTRAINTS_ARRAY_ADD(...) , FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__) +# define NAMED_CONSTRAINTS_ARRAY(...) FOR_EACH_VA(NAME_CONSTRAINT_ARRAY,__VA_ARGS__) +#endif + +#endif /* AVUTIL_X86_ASM_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/bswap.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/bswap.h new file mode 100644 index 00000000..b2f18b6c --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/bswap.h @@ -0,0 +1,88 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * byte swapping routines + */ + +#ifndef AVUTIL_X86_BSWAP_H +#define AVUTIL_X86_BSWAP_H + +#include +#if defined(_MSC_VER) +#include +#include +#endif +#include "config.h" +#include "libavutil/attributes.h" + +#if defined(_MSC_VER) + +#define av_bswap16 av_bswap16 +static av_always_inline av_const uint16_t av_bswap16(uint16_t x) +{ + return _rotr16(x, 8); +} + +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + return _byteswap_ulong(x); +} + +#if ARCH_X86_64 +#define av_bswap64 av_bswap64 +static inline uint64_t av_const av_bswap64(uint64_t x) +{ + return _byteswap_uint64(x); +} +#endif + + +#elif HAVE_INLINE_ASM + +#if AV_GCC_VERSION_AT_MOST(4,0) +#define av_bswap16 av_bswap16 +static av_always_inline av_const unsigned av_bswap16(unsigned x) +{ + __asm__("rorw $8, %w0" : "+r"(x)); + return x; +} +#endif /* AV_GCC_VERSION_AT_MOST(4,0) */ + +#if AV_GCC_VERSION_AT_MOST(4,4) || defined(__INTEL_COMPILER) +#define av_bswap32 av_bswap32 +static av_always_inline av_const uint32_t av_bswap32(uint32_t x) +{ + __asm__("bswap %0" : "+r" (x)); + return x; +} + +#if ARCH_X86_64 +#define av_bswap64 av_bswap64 +static inline uint64_t av_const av_bswap64(uint64_t x) +{ + __asm__("bswap %0": "=r" (x) : "0" (x)); + return x; +} +#endif +#endif /* AV_GCC_VERSION_AT_MOST(4,4) */ + +#endif /* HAVE_INLINE_ASM */ +#endif /* AVUTIL_X86_BSWAP_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/cpu.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/cpu.h new file mode 100644 index 00000000..937c697f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/cpu.h @@ -0,0 +1,113 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_CPU_H +#define AVUTIL_X86_CPU_H + +#include "libavutil/cpu.h" +#include "libavutil/cpu_internal.h" + +#define AV_CPU_FLAG_AMD3DNOW AV_CPU_FLAG_3DNOW +#define AV_CPU_FLAG_AMD3DNOWEXT AV_CPU_FLAG_3DNOWEXT + +#define X86_AMD3DNOW(flags) CPUEXT(flags, AMD3DNOW) +#define X86_AMD3DNOWEXT(flags) CPUEXT(flags, AMD3DNOWEXT) +#define X86_MMX(flags) CPUEXT(flags, MMX) +#define X86_MMXEXT(flags) CPUEXT(flags, MMXEXT) +#define X86_SSE(flags) CPUEXT(flags, SSE) +#define X86_SSE2(flags) CPUEXT(flags, SSE2) +#define X86_SSE2_FAST(flags) CPUEXT_FAST(flags, SSE2) +#define X86_SSE2_SLOW(flags) CPUEXT_SLOW(flags, SSE2) +#define X86_SSE3(flags) CPUEXT(flags, SSE3) +#define X86_SSE3_FAST(flags) CPUEXT_FAST(flags, SSE3) +#define X86_SSE3_SLOW(flags) CPUEXT_SLOW(flags, SSE3) +#define X86_SSSE3(flags) CPUEXT(flags, SSSE3) +#define X86_SSSE3_FAST(flags) CPUEXT_FAST(flags, SSSE3) +#define X86_SSSE3_SLOW(flags) CPUEXT_SLOW(flags, SSSE3) +#define X86_SSE4(flags) CPUEXT(flags, SSE4) +#define X86_SSE42(flags) CPUEXT(flags, SSE42) +#define X86_AVX(flags) CPUEXT(flags, AVX) +#define X86_AVX_FAST(flags) CPUEXT_FAST(flags, AVX) +#define X86_AVX_SLOW(flags) CPUEXT_SLOW(flags, AVX) +#define X86_XOP(flags) CPUEXT(flags, XOP) +#define X86_FMA3(flags) CPUEXT(flags, FMA3) +#define X86_FMA4(flags) CPUEXT(flags, FMA4) +#define X86_AVX2(flags) CPUEXT(flags, AVX2) +#define X86_AESNI(flags) CPUEXT(flags, AESNI) +#define X86_AVX512(flags) CPUEXT(flags, AVX512) + +#define EXTERNAL_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOW) +#define EXTERNAL_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AMD3DNOWEXT) +#define EXTERNAL_MMX(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, MMX) +#define EXTERNAL_MMXEXT(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, MMXEXT) +#define EXTERNAL_SSE(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE) +#define EXTERNAL_SSE2(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE2) +#define EXTERNAL_SSE2_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, SSE2) +#define EXTERNAL_SSE2_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, SSE2) +#define EXTERNAL_SSE3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE3) +#define EXTERNAL_SSE3_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, SSE3) +#define EXTERNAL_SSE3_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, SSE3) +#define EXTERNAL_SSSE3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSSE3) +#define EXTERNAL_SSSE3_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, SSSE3) +#define EXTERNAL_SSSE3_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, SSSE3) +#define EXTERNAL_SSE4(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE4) +#define EXTERNAL_SSE42(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, SSE42) +#define EXTERNAL_AVX(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX) +#define EXTERNAL_AVX_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _EXTERNAL, AVX) +#define EXTERNAL_AVX_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _EXTERNAL, AVX) +#define EXTERNAL_XOP(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, XOP) +#define EXTERNAL_FMA3(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, FMA3) +#define EXTERNAL_FMA3_FAST(flags) CPUEXT_SUFFIX_FAST2(flags, _EXTERNAL, FMA3, AVX) +#define EXTERNAL_FMA3_SLOW(flags) CPUEXT_SUFFIX_SLOW2(flags, _EXTERNAL, FMA3, AVX) +#define EXTERNAL_FMA4(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, FMA4) +#define EXTERNAL_AVX2(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX2) +#define EXTERNAL_AVX2_FAST(flags) CPUEXT_SUFFIX_FAST2(flags, _EXTERNAL, AVX2, AVX) +#define EXTERNAL_AVX2_SLOW(flags) CPUEXT_SUFFIX_SLOW2(flags, _EXTERNAL, AVX2, AVX) +#define EXTERNAL_AESNI(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AESNI) +#define EXTERNAL_AVX512(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, AVX512) + +#define INLINE_AMD3DNOW(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOW) +#define INLINE_AMD3DNOWEXT(flags) CPUEXT_SUFFIX(flags, _INLINE, AMD3DNOWEXT) +#define INLINE_MMX(flags) CPUEXT_SUFFIX(flags, _INLINE, MMX) +#define INLINE_MMXEXT(flags) CPUEXT_SUFFIX(flags, _INLINE, MMXEXT) +#define INLINE_SSE(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE) +#define INLINE_SSE2(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE2) +#define INLINE_SSE2_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, SSE2) +#define INLINE_SSE2_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, SSE2) +#define INLINE_SSE3(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE3) +#define INLINE_SSE3_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, SSE3) +#define INLINE_SSE3_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, SSE3) +#define INLINE_SSSE3(flags) CPUEXT_SUFFIX(flags, _INLINE, SSSE3) +#define INLINE_SSSE3_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, SSSE3) +#define INLINE_SSSE3_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, SSSE3) +#define INLINE_SSE4(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE4) +#define INLINE_SSE42(flags) CPUEXT_SUFFIX(flags, _INLINE, SSE42) +#define INLINE_AVX(flags) CPUEXT_SUFFIX(flags, _INLINE, AVX) +#define INLINE_AVX_FAST(flags) CPUEXT_SUFFIX_FAST(flags, _INLINE, AVX) +#define INLINE_AVX_SLOW(flags) CPUEXT_SUFFIX_SLOW(flags, _INLINE, AVX) +#define INLINE_XOP(flags) CPUEXT_SUFFIX(flags, _INLINE, XOP) +#define INLINE_FMA3(flags) CPUEXT_SUFFIX(flags, _INLINE, FMA3) +#define INLINE_FMA4(flags) CPUEXT_SUFFIX(flags, _INLINE, FMA4) +#define INLINE_AVX2(flags) CPUEXT_SUFFIX(flags, _INLINE, AVX2) +#define INLINE_AESNI(flags) CPUEXT_SUFFIX(flags, _INLINE, AESNI) + +void ff_cpu_cpuid(int index, int *eax, int *ebx, int *ecx, int *edx); +void ff_cpu_xgetbv(int op, int *eax, int *edx); +int ff_cpu_cpuid_test(void); + +#endif /* AVUTIL_X86_CPU_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/emms.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/emms.h new file mode 100644 index 00000000..c21e34b4 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/emms.h @@ -0,0 +1,55 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_EMMS_H +#define AVUTIL_X86_EMMS_H + +#include "config.h" +#include "libavutil/attributes.h" +#include "libavutil/cpu.h" + +void avpriv_emms_asm(void); + +#if HAVE_MMX_INLINE +# define emms_c emms_c +/** + * Empty mmx state. + * this must be called between any dsp function and float/double code. + * for example sin(); dsp->idct_put(); emms_c(); cos() + * Note, *alloc() and *free() also use float code in some libc implementations + * thus this also applies to them or any function using them. + */ +static av_always_inline void emms_c(void) +{ +/* Some inlined functions may also use mmx instructions regardless of + * runtime cpuflags. With that in mind, we unconditionally empty the + * mmx state if the target cpu chosen at configure time supports it. + */ +#if !defined(__MMX__) + if(av_get_cpu_flags() & AV_CPU_FLAG_MMX) +#endif + __asm__ volatile ("emms" ::: "memory"); +} +#elif HAVE_MMX && HAVE_MM_EMPTY +# include +# define emms_c _mm_empty +#elif HAVE_MMX_EXTERNAL +# define emms_c avpriv_emms_asm +#endif /* HAVE_MMX_INLINE */ + +#endif /* AVUTIL_X86_EMMS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intmath.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intmath.h new file mode 100644 index 00000000..40743fd1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intmath.h @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2015 James Almer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_INTMATH_H +#define AVUTIL_X86_INTMATH_H + +#include +#include +#if HAVE_FAST_CLZ +#if defined(_MSC_VER) +#include +#elif defined(__INTEL_COMPILER) +#include +#endif +#endif +#include "config.h" + +#if HAVE_FAST_CLZ +#if (defined(__INTEL_COMPILER) && (__INTEL_COMPILER>=1216)) || defined(_MSC_VER) +# if defined(__INTEL_COMPILER) +# define ff_log2(x) (_bit_scan_reverse((x)|1)) +# else +# define ff_log2 ff_log2_x86 +static av_always_inline av_const int ff_log2_x86(unsigned int v) +{ + unsigned long n; + _BitScanReverse(&n, v|1); + return n; +} +# endif +# define ff_log2_16bit av_log2 + +#if defined(__INTEL_COMPILER) || (defined(_MSC_VER) && (_MSC_VER >= 1700) && \ + (defined(__BMI__) || !defined(__clang__))) +# define ff_ctz(v) _tzcnt_u32(v) + +# if ARCH_X86_64 +# define ff_ctzll(v) _tzcnt_u64(v) +# else +# define ff_ctzll ff_ctzll_x86 +static av_always_inline av_const int ff_ctzll_x86(long long v) +{ + return ((uint32_t)v == 0) ? _tzcnt_u32((uint32_t)(v >> 32)) + 32 : _tzcnt_u32((uint32_t)v); +} +# endif +#endif /* _MSC_VER */ + +#endif /* __INTEL_COMPILER */ + +#endif /* HAVE_FAST_CLZ */ + +#if defined(__GNUC__) + +/* Our generic version of av_popcount is faster than GCC's built-in on + * CPUs that don't support the popcnt instruction. + */ +#if defined(__POPCNT__) + #define av_popcount __builtin_popcount +#if ARCH_X86_64 + #define av_popcount64 __builtin_popcountll +#endif + +#endif /* __POPCNT__ */ + +#if defined(__BMI2__) + +#if AV_GCC_VERSION_AT_LEAST(5,1) +#define av_mod_uintp2 __builtin_ia32_bzhi_si +#elif HAVE_INLINE_ASM +/* GCC releases before 5.1.0 have a broken bzhi builtin, so for those we + * implement it using inline assembly + */ +#define av_mod_uintp2 av_mod_uintp2_bmi2 +static av_always_inline av_const unsigned av_mod_uintp2_bmi2(unsigned a, unsigned p) +{ + if (av_builtin_constant_p(p)) + return a & ((1 << p) - 1); + else { + unsigned x; + __asm__ ("bzhi %2, %1, %0 \n\t" : "=r"(x) : "rm"(a), "r"(p)); + return x; + } +} +#endif /* AV_GCC_VERSION_AT_LEAST */ + +#endif /* __BMI2__ */ + +#if defined(__SSE2__) && !defined(__INTEL_COMPILER) + +#define av_clipd av_clipd_sse2 +static av_always_inline av_const double av_clipd_sse2(double a, double amin, double amax) +{ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + __asm__ ("minsd %2, %0 \n\t" + "maxsd %1, %0 \n\t" + : "+&x"(a) : "xm"(amin), "xm"(amax)); + return a; +} + +#endif /* __SSE2__ */ + +#if defined(__SSE__) && !defined(__INTEL_COMPILER) + +#define av_clipf av_clipf_sse +static av_always_inline av_const float av_clipf_sse(float a, float amin, float amax) +{ +#if defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2 + if (amin > amax) abort(); +#endif + __asm__ ("minss %2, %0 \n\t" + "maxss %1, %0 \n\t" + : "+&x"(a) : "xm"(amin), "xm"(amax)); + return a; +} + +#endif /* __SSE__ */ + +#endif /* __GNUC__ */ + +#endif /* AVUTIL_X86_INTMATH_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intreadwrite.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intreadwrite.h new file mode 100644 index 00000000..4061d192 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/intreadwrite.h @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2010 Alexander Strange + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_INTREADWRITE_H +#define AVUTIL_X86_INTREADWRITE_H + +#include +#include "config.h" +#include "libavutil/attributes.h" + +#if HAVE_MMX + +#if !HAVE_FAST_64BIT && defined(__MMX__) + +#define AV_COPY64 AV_COPY64 +static av_always_inline void AV_COPY64(void *d, const void *s) +{ + __asm__("movq %1, %%mm0 \n\t" + "movq %%mm0, %0 \n\t" + : "=m"(*(uint64_t*)d) + : "m" (*(const uint64_t*)s) + : "mm0"); +} + +#define AV_SWAP64 AV_SWAP64 +static av_always_inline void AV_SWAP64(void *a, void *b) +{ + __asm__("movq %1, %%mm0 \n\t" + "movq %0, %%mm1 \n\t" + "movq %%mm0, %0 \n\t" + "movq %%mm1, %1 \n\t" + : "+m"(*(uint64_t*)a), "+m"(*(uint64_t*)b) + ::"mm0", "mm1"); +} + +#define AV_ZERO64 AV_ZERO64 +static av_always_inline void AV_ZERO64(void *d) +{ + __asm__("pxor %%mm0, %%mm0 \n\t" + "movq %%mm0, %0 \n\t" + : "=m"(*(uint64_t*)d) + :: "mm0"); +} + +#endif /* !HAVE_FAST_64BIT && defined(__MMX__) */ + +#ifdef __SSE__ + +#define AV_COPY128 AV_COPY128 +static av_always_inline void AV_COPY128(void *d, const void *s) +{ + struct v {uint64_t v[2];}; + + __asm__("movaps %1, %%xmm0 \n\t" + "movaps %%xmm0, %0 \n\t" + : "=m"(*(struct v*)d) + : "m" (*(const struct v*)s) + : "xmm0"); +} + +#endif /* __SSE__ */ + +#ifdef __SSE2__ + +#define AV_ZERO128 AV_ZERO128 +static av_always_inline void AV_ZERO128(void *d) +{ + struct v {uint64_t v[2];}; + + __asm__("pxor %%xmm0, %%xmm0 \n\t" + "movdqa %%xmm0, %0 \n\t" + : "=m"(*(struct v*)d) + :: "xmm0"); +} + +#endif /* __SSE2__ */ + +#endif /* HAVE_MMX */ + +#endif /* AVUTIL_X86_INTREADWRITE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/pixelutils.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/pixelutils.h new file mode 100644 index 00000000..876cf460 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/pixelutils.h @@ -0,0 +1,26 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_PIXELUTILS_H +#define AVUTIL_X86_PIXELUTILS_H + +#include "libavutil/pixelutils.h" + +void ff_pixelutils_sad_init_x86(av_pixelutils_sad_fn *sad, int aligned); + +#endif /* AVUTIL_X86_PIXELUTILS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/timer.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/timer.h new file mode 100644 index 00000000..4d1e88de --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/timer.h @@ -0,0 +1,50 @@ +/* + * copyright (c) 2006 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_TIMER_H +#define AVUTIL_X86_TIMER_H + +#include + +#if HAVE_INLINE_ASM + +#define FF_TIMER_UNITS "decicycles" +#define AV_READ_TIME read_time + +static inline uint64_t read_time(void) +{ + uint32_t a, d; + __asm__ volatile( +#if ARCH_X86_64 || defined(__SSE2__) + "lfence \n\t" +#endif + "rdtsc \n\t" + : "=a" (a), "=d" (d)); + return ((uint64_t)d << 32) + a; +} + +#elif HAVE_RDTSC + +#include +#define AV_READ_TIME __rdtsc + +#endif /* HAVE_INLINE_ASM */ + +#endif /* AVUTIL_X86_TIMER_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/w64xmmtest.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/w64xmmtest.h new file mode 100644 index 00000000..a4a05b04 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/x86/w64xmmtest.h @@ -0,0 +1,78 @@ +/* + * check XMM registers for clobbers on Win64 + * Copyright (c) 2008 Ramiro Polla + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_X86_W64XMMTEST_H +#define AVUTIL_X86_W64XMMTEST_H + +#include +#include +#include +#include +#include + +#include "libavutil/bswap.h" + +#define storexmmregs(mem) \ + __asm__ volatile( \ + "movups %%xmm6 , 0x00(%0)\n\t" \ + "movups %%xmm7 , 0x10(%0)\n\t" \ + "movups %%xmm8 , 0x20(%0)\n\t" \ + "movups %%xmm9 , 0x30(%0)\n\t" \ + "movups %%xmm10, 0x40(%0)\n\t" \ + "movups %%xmm11, 0x50(%0)\n\t" \ + "movups %%xmm12, 0x60(%0)\n\t" \ + "movups %%xmm13, 0x70(%0)\n\t" \ + "movups %%xmm14, 0x80(%0)\n\t" \ + "movups %%xmm15, 0x90(%0)\n\t" \ + :: "r"(mem) : "memory") + +#define testxmmclobbers(func, ctx, ...) \ + uint64_t xmm[2][10][2]; \ + int ret; \ + storexmmregs(xmm[0]); \ + ret = __real_ ## func(ctx, __VA_ARGS__); \ + storexmmregs(xmm[1]); \ + if (memcmp(xmm[0], xmm[1], sizeof(xmm[0]))) { \ + int i; \ + av_log(ctx, AV_LOG_ERROR, \ + "XMM REGS CLOBBERED IN %s!\n", #func); \ + for (i = 0; i < 10; i ++) \ + if (xmm[0][i][0] != xmm[1][i][0] || \ + xmm[0][i][1] != xmm[1][i][1]) { \ + av_log(ctx, AV_LOG_ERROR, \ + "xmm%-2d = %016"PRIx64"%016"PRIx64"\n", \ + 6 + i, av_bswap64(xmm[0][i][0]), \ + av_bswap64(xmm[0][i][1])); \ + av_log(ctx, AV_LOG_ERROR, \ + " -> %016"PRIx64"%016"PRIx64"\n", \ + av_bswap64(xmm[1][i][0]), \ + av_bswap64(xmm[1][i][1])); \ + } \ + abort(); \ + } \ + return ret + +#define wrap(func) \ +int __real_ ## func; \ +int __wrap_ ## func; \ +int __wrap_ ## func + +#endif /* AVUTIL_X86_W64XMMTEST_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xga_font_data.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xga_font_data.h new file mode 100644 index 00000000..69dc3371 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xga_font_data.h @@ -0,0 +1,35 @@ +/* + * CGA/EGA/VGA ROM font data + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * CGA/EGA/VGA ROM font data + */ + +#ifndef AVUTIL_XGA_FONT_DATA_H +#define AVUTIL_XGA_FONT_DATA_H + +#include +#include "internal.h" + +extern av_export_avutil const uint8_t avpriv_cga_font[2048]; +extern av_export_avutil const uint8_t avpriv_vga16_font[4096]; + +#endif /* AVUTIL_XGA_FONT_DATA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xtea.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xtea.h new file mode 100644 index 00000000..735427c1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libavutil/xtea.h @@ -0,0 +1,94 @@ +/* + * A 32-bit implementation of the XTEA algorithm + * Copyright (c) 2012 Samuel Pitoiset + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_XTEA_H +#define AVUTIL_XTEA_H + +#include + +/** + * @file + * @brief Public header for libavutil XTEA algorithm + * @defgroup lavu_xtea XTEA + * @ingroup lavu_crypto + * @{ + */ + +typedef struct AVXTEA { + uint32_t key[16]; +} AVXTEA; + +/** + * Allocate an AVXTEA context. + */ +AVXTEA *av_xtea_alloc(void); + +/** + * Initialize an AVXTEA context. + * + * @param ctx an AVXTEA context + * @param key a key of 16 bytes used for encryption/decryption, + * interpreted as big endian 32 bit numbers + */ +void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); + +/** + * Initialize an AVXTEA context. + * + * @param ctx an AVXTEA context + * @param key a key of 16 bytes used for encryption/decryption, + * interpreted as little endian 32 bit numbers + */ +void av_xtea_le_init(struct AVXTEA *ctx, const uint8_t key[16]); + +/** + * Encrypt or decrypt a buffer using a previously initialized context, + * in big endian format. + * + * @param ctx an AVXTEA context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, if NULL then ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt); + +/** + * Encrypt or decrypt a buffer using a previously initialized context, + * in little endian format. + * + * @param ctx an AVXTEA context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, if NULL then ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_xtea_le_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt); + +/** + * @} + */ + +#endif /* AVUTIL_XTEA_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess.h new file mode 100644 index 00000000..348ee7cc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess.h @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef POSTPROC_POSTPROCESS_H +#define POSTPROC_POSTPROCESS_H + +/** + * @file + * @ingroup lpp + * external API header + */ + +/** + * @defgroup lpp libpostproc + * Video postprocessing library. + * + * @{ + */ + +#include "libpostproc/version.h" + +/** + * Return the LIBPOSTPROC_VERSION_INT constant. + */ +unsigned postproc_version(void); + +/** + * Return the libpostproc build-time configuration. + */ +const char *postproc_configuration(void); + +/** + * Return the libpostproc license. + */ +const char *postproc_license(void); + +#define PP_QUALITY_MAX 6 + +#include + +typedef void pp_context; +typedef void pp_mode; + +#if LIBPOSTPROC_VERSION_INT < (52<<16) +typedef pp_context pp_context_t; +typedef pp_mode pp_mode_t; +extern const char *const pp_help; ///< a simple help text +#else +extern const char pp_help[]; ///< a simple help text +#endif + +void pp_postprocess(const uint8_t * src[3], const int srcStride[3], + uint8_t * dst[3], const int dstStride[3], + int horizontalSize, int verticalSize, + const int8_t *QP_store, int QP_stride, + pp_mode *mode, pp_context *ppContext, int pict_type); + + +/** + * Return a pp_mode or NULL if an error occurred. + * + * @param name the string after "-pp" on the command line + * @param quality a number from 0 to PP_QUALITY_MAX + */ +pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality); +void pp_free_mode(pp_mode *mode); + +pp_context *pp_get_context(int width, int height, int flags); +void pp_free_context(pp_context *ppContext); + +#define PP_CPU_CAPS_MMX 0x80000000 +#define PP_CPU_CAPS_MMX2 0x20000000 +#define PP_CPU_CAPS_3DNOW 0x40000000 +#define PP_CPU_CAPS_ALTIVEC 0x10000000 +#define PP_CPU_CAPS_AUTO 0x00080000 + +#define PP_FORMAT 0x00000008 +#define PP_FORMAT_420 (0x00000011|PP_FORMAT) +#define PP_FORMAT_422 (0x00000001|PP_FORMAT) +#define PP_FORMAT_411 (0x00000002|PP_FORMAT) +#define PP_FORMAT_444 (0x00000000|PP_FORMAT) +#define PP_FORMAT_440 (0x00000010|PP_FORMAT) + +#define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale + +/** + * @} + */ + +#endif /* POSTPROC_POSTPROCESS_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess_internal.h new file mode 100644 index 00000000..765fdeb1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/postprocess_internal.h @@ -0,0 +1,184 @@ +/* + * Copyright (C) 2001-2002 Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * internal API header. + */ + +#ifndef POSTPROC_POSTPROCESS_INTERNAL_H +#define POSTPROC_POSTPROCESS_INTERNAL_H + +#include +#include "libavutil/avutil.h" +#include "libavutil/intmath.h" +#include "libavutil/log.h" +#include "postprocess.h" + +#define V_DEBLOCK 0x01 +#define H_DEBLOCK 0x02 +#define DERING 0x04 +#define LEVEL_FIX 0x08 ///< Brightness & Contrast + +#define LUM_V_DEBLOCK V_DEBLOCK // 1 +#define LUM_H_DEBLOCK H_DEBLOCK // 2 +#define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16 +#define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32 +#define LUM_DERING DERING // 4 +#define CHROM_DERING (DERING<<4) // 64 +#define LUM_LEVEL_FIX LEVEL_FIX // 8 +#define CHROM_LEVEL_FIX (LEVEL_FIX<<4) // 128 (not implemented yet) + +// Experimental vertical filters +#define V_X1_FILTER 0x0200 // 512 +#define V_A_DEBLOCK 0x0400 + +// Experimental horizontal filters +#define H_X1_FILTER 0x2000 // 8192 +#define H_A_DEBLOCK 0x4000 + +/// select between full y range (255-0) or standard one (234-16) +#define FULL_Y_RANGE 0x8000 // 32768 + +//Deinterlacing Filters +#define LINEAR_IPOL_DEINT_FILTER 0x10000 // 65536 +#define LINEAR_BLEND_DEINT_FILTER 0x20000 // 131072 +#define CUBIC_BLEND_DEINT_FILTER 0x8000 // (not implemented yet) +#define CUBIC_IPOL_DEINT_FILTER 0x40000 // 262144 +#define MEDIAN_DEINT_FILTER 0x80000 // 524288 +#define FFMPEG_DEINT_FILTER 0x400000 +#define LOWPASS5_DEINT_FILTER 0x800000 + +#define TEMP_NOISE_FILTER 0x100000 +#define FORCE_QUANT 0x200000 +#define BITEXACT 0x1000000 +#define VISUALIZE 0x2000000 + +//use if you want a faster postprocessing code +//cannot differentiate between chroma & luma filters (both on or both off) +//obviously the -pp option on the command line has no effect except turning the here selected +//filters on +//#define COMPILE_TIME_MODE 0x77 + +/** + * Postprocessing filter. + */ +struct PPFilter{ + const char *shortName; + const char *longName; + int chromDefault; ///< is chrominance filtering on by default if this filter is manually activated + int minLumQuality; ///< minimum quality to turn luminance filtering on + int minChromQuality; ///< minimum quality to turn chrominance filtering on + int mask; ///< Bitmask to turn this filter on +}; + +/** + * Postprocessing mode. + */ +typedef struct PPMode{ + int lumMode; ///< activates filters for luminance + int chromMode; ///< activates filters for chrominance + int error; ///< non zero on error + + int minAllowedY; ///< for brightness correction + int maxAllowedY; ///< for brightness correction + AVRational maxClippedThreshold; ///< amount of "black" you are willing to lose to get a brightness-corrected picture + + int maxTmpNoise[3]; ///< for Temporal Noise Reducing filter (Maximal sum of abs differences) + + int baseDcDiff; + int flatnessThreshold; + + int forcedQuant; ///< quantizer if FORCE_QUANT is used +} PPMode; + +/** + * postprocess context. + */ +typedef struct PPContext{ + /** + * info on struct for av_log + */ + const AVClass *av_class; + + uint8_t *tempBlocks; /// 0) { + memcpy(dest, src, lines*stride); + } else { + memcpy((uint8_t*)dest+(lines-1)*stride, (const uint8_t*)src+(lines-1)*stride, -lines*stride); + } +} + +#endif /* POSTPROC_POSTPROCESS_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/version.h new file mode 100644 index 00000000..e5de9aef --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libpostproc/version.h @@ -0,0 +1,45 @@ +/* + * Version macros. + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef POSTPROC_VERSION_H +#define POSTPROC_VERSION_H + +/** + * @file + * Libpostproc version macros + */ + +#include "libavutil/avutil.h" + +#define LIBPOSTPROC_VERSION_MAJOR 55 +#define LIBPOSTPROC_VERSION_MINOR 7 +#define LIBPOSTPROC_VERSION_MICRO 100 + +#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ + LIBPOSTPROC_VERSION_MINOR, \ + LIBPOSTPROC_VERSION_MICRO) +#define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ + LIBPOSTPROC_VERSION_MINOR, \ + LIBPOSTPROC_VERSION_MICRO) +#define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT + +#define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) + +#endif /* POSTPROC_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/audioconvert.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/audioconvert.h new file mode 100644 index 00000000..1ca30c2a --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/audioconvert.h @@ -0,0 +1,78 @@ +/* + * audio conversion + * Copyright (c) 2006 Michael Niedermayer + * Copyright (c) 2008 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_AUDIOCONVERT_H +#define SWRESAMPLE_AUDIOCONVERT_H + +/** + * @file + * Audio format conversion routines + */ + + +#include "swresample_internal.h" +#include "libavutil/cpu.h" + + +typedef void (conv_func_type)(uint8_t *po, const uint8_t *pi, int is, int os, uint8_t *end); +typedef void (simd_func_type)(uint8_t **dst, const uint8_t **src, int len); + +typedef struct AudioConvert { + int channels; + int in_simd_align_mask; + int out_simd_align_mask; + conv_func_type *conv_f; + simd_func_type *simd_f; + const int *ch_map; + uint8_t silence[8]; ///< silence input sample +}AudioConvert; + +/** + * Create an audio sample format converter context + * @param out_fmt Output sample format + * @param in_fmt Input sample format + * @param channels Number of channels + * @param flags See AV_CPU_FLAG_xx + * @param ch_map list of the channels id to pick from the source stream, NULL + * if all channels must be selected + * @return NULL on error + */ +AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels, const int *ch_map, + int flags); + +/** + * Free audio sample format converter context. + * and set the pointer to NULL + */ +void swri_audio_convert_free(AudioConvert **ctx); + +/** + * Convert between audio sample formats + * @param[in] out array of output buffers for each channel. set to NULL to ignore processing of the given channel. + * @param[in] in array of input buffers for each channel + * @param len length of audio frame size (measured in samples) + */ +int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len); + +#endif /* SWRESAMPLE_AUDIOCONVERT_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/resample.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/resample.h new file mode 100644 index 00000000..1731dad3 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/resample.h @@ -0,0 +1,68 @@ +/* + * audio resampling + * Copyright (c) 2004-2012 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_RESAMPLE_H +#define SWRESAMPLE_RESAMPLE_H + +#include "libavutil/log.h" +#include "libavutil/samplefmt.h" + +#include "swresample_internal.h" + +typedef struct ResampleContext { + const AVClass *av_class; + uint8_t *filter_bank; + int filter_length; + int filter_alloc; + int ideal_dst_incr; + int dst_incr; + int dst_incr_div; + int dst_incr_mod; + int index; + int frac; + int src_incr; + int compensation_distance; + int phase_count; + int linear; + enum SwrFilterType filter_type; + double kaiser_beta; + double factor; + enum AVSampleFormat format; + int felem_size; + int filter_shift; + int phase_count_compensation; /* desired phase_count when compensation is enabled */ + + struct { + void (*resample_one)(void *dst, const void *src, + int n, int64_t index, int64_t incr); + int (*resample_common)(struct ResampleContext *c, void *dst, + const void *src, int n, int update_ctx); + int (*resample_linear)(struct ResampleContext *c, void *dst, + const void *src, int n, int update_ctx); + } dsp; +} ResampleContext; + +void swri_resample_dsp_init(ResampleContext *c); +void swri_resample_dsp_x86_init(ResampleContext *c); +void swri_resample_dsp_arm_init(ResampleContext *c); +void swri_resample_dsp_aarch64_init(ResampleContext *c); + +#endif /* SWRESAMPLE_RESAMPLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample.h new file mode 100644 index 00000000..c7b84fbc --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample.h @@ -0,0 +1,579 @@ +/* + * Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of libswresample + * + * libswresample is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * libswresample is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_SWRESAMPLE_H +#define SWRESAMPLE_SWRESAMPLE_H + +/** + * @file + * @ingroup lswr + * libswresample public header + */ + +/** + * @defgroup lswr libswresample + * @{ + * + * Audio resampling, sample format conversion and mixing library. + * + * Interaction with lswr is done through SwrContext, which is + * allocated with swr_alloc() or swr_alloc_set_opts(). It is opaque, so all parameters + * must be set with the @ref avoptions API. + * + * The first thing you will need to do in order to use lswr is to allocate + * SwrContext. This can be done with swr_alloc() or swr_alloc_set_opts(). If you + * are using the former, you must set options through the @ref avoptions API. + * The latter function provides the same feature, but it allows you to set some + * common options in the same statement. + * + * For example the following code will setup conversion from planar float sample + * format to interleaved signed 16-bit integer, downsampling from 48kHz to + * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing + * matrix). This is using the swr_alloc() function. + * @code + * SwrContext *swr = swr_alloc(); + * av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0); + * av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); + * av_opt_set_int(swr, "in_sample_rate", 48000, 0); + * av_opt_set_int(swr, "out_sample_rate", 44100, 0); + * av_opt_set_sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0); + * av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + * @endcode + * + * The same job can be done using swr_alloc_set_opts() as well: + * @code + * SwrContext *swr = swr_alloc_set_opts(NULL, // we're allocating a new context + * AV_CH_LAYOUT_STEREO, // out_ch_layout + * AV_SAMPLE_FMT_S16, // out_sample_fmt + * 44100, // out_sample_rate + * AV_CH_LAYOUT_5POINT1, // in_ch_layout + * AV_SAMPLE_FMT_FLTP, // in_sample_fmt + * 48000, // in_sample_rate + * 0, // log_offset + * NULL); // log_ctx + * @endcode + * + * Once all values have been set, it must be initialized with swr_init(). If + * you need to change the conversion parameters, you can change the parameters + * using @ref AVOptions, as described above in the first example; or by using + * swr_alloc_set_opts(), but with the first argument the allocated context. + * You must then call swr_init() again. + * + * The conversion itself is done by repeatedly calling swr_convert(). + * Note that the samples may get buffered in swr if you provide insufficient + * output space or if sample rate conversion is done, which requires "future" + * samples. Samples that do not require future input can be retrieved at any + * time by using swr_convert() (in_count can be set to 0). + * At the end of conversion the resampling buffer can be flushed by calling + * swr_convert() with NULL in and 0 in_count. + * + * The samples used in the conversion process can be managed with the libavutil + * @ref lavu_sampmanip "samples manipulation" API, including av_samples_alloc() + * function used in the following example. + * + * The delay between input and output, can at any time be found by using + * swr_get_delay(). + * + * The following code demonstrates the conversion loop assuming the parameters + * from above and caller-defined functions get_input() and handle_output(): + * @code + * uint8_t **input; + * int in_samples; + * + * while (get_input(&input, &in_samples)) { + * uint8_t *output; + * int out_samples = av_rescale_rnd(swr_get_delay(swr, 48000) + + * in_samples, 44100, 48000, AV_ROUND_UP); + * av_samples_alloc(&output, NULL, 2, out_samples, + * AV_SAMPLE_FMT_S16, 0); + * out_samples = swr_convert(swr, &output, out_samples, + * input, in_samples); + * handle_output(output, out_samples); + * av_freep(&output); + * } + * @endcode + * + * When the conversion is finished, the conversion + * context and everything associated with it must be freed with swr_free(). + * A swr_close() function is also available, but it exists mainly for + * compatibility with libavresample, and is not required to be called. + * + * There will be no memory leak if the data is not completely flushed before + * swr_free(). + */ + +#include +#include "libavutil/channel_layout.h" +#include "libavutil/frame.h" +#include "libavutil/samplefmt.h" + +#include "libswresample/version.h" + +/** + * @name Option constants + * These constants are used for the @ref avoptions interface for lswr. + * @{ + * + */ + +#define SWR_FLAG_RESAMPLE 1 ///< Force resampling even if equal sample rate +//TODO use int resample ? +//long term TODO can we enable this dynamically? + +/** Dithering algorithms */ +enum SwrDitherType { + SWR_DITHER_NONE = 0, + SWR_DITHER_RECTANGULAR, + SWR_DITHER_TRIANGULAR, + SWR_DITHER_TRIANGULAR_HIGHPASS, + + SWR_DITHER_NS = 64, ///< not part of API/ABI + SWR_DITHER_NS_LIPSHITZ, + SWR_DITHER_NS_F_WEIGHTED, + SWR_DITHER_NS_MODIFIED_E_WEIGHTED, + SWR_DITHER_NS_IMPROVED_E_WEIGHTED, + SWR_DITHER_NS_SHIBATA, + SWR_DITHER_NS_LOW_SHIBATA, + SWR_DITHER_NS_HIGH_SHIBATA, + SWR_DITHER_NB, ///< not part of API/ABI +}; + +/** Resampling Engines */ +enum SwrEngine { + SWR_ENGINE_SWR, /**< SW Resampler */ + SWR_ENGINE_SOXR, /**< SoX Resampler */ + SWR_ENGINE_NB, ///< not part of API/ABI +}; + +/** Resampling Filter Types */ +enum SwrFilterType { + SWR_FILTER_TYPE_CUBIC, /**< Cubic */ + SWR_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall windowed sinc */ + SWR_FILTER_TYPE_KAISER, /**< Kaiser windowed sinc */ +}; + +/** + * @} + */ + +/** + * The libswresample context. Unlike libavcodec and libavformat, this structure + * is opaque. This means that if you would like to set options, you must use + * the @ref avoptions API and cannot directly set values to members of the + * structure. + */ +typedef struct SwrContext SwrContext; + +/** + * Get the AVClass for SwrContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + * @return the AVClass of SwrContext + */ +const AVClass *swr_get_class(void); + +/** + * @name SwrContext constructor functions + * @{ + */ + +/** + * Allocate SwrContext. + * + * If you use this function you will need to set the parameters (manually or + * with swr_alloc_set_opts()) before calling swr_init(). + * + * @see swr_alloc_set_opts(), swr_init(), swr_free() + * @return NULL on error, allocated context otherwise + */ +struct SwrContext *swr_alloc(void); + +/** + * Initialize context after user parameters have been set. + * @note The context must be configured using the AVOption API. + * + * @see av_opt_set_int() + * @see av_opt_set_dict() + * + * @param[in,out] s Swr context to initialize + * @return AVERROR error code in case of failure. + */ +int swr_init(struct SwrContext *s); + +/** + * Check whether an swr context has been initialized or not. + * + * @param[in] s Swr context to check + * @see swr_init() + * @return positive if it has been initialized, 0 if not initialized + */ +int swr_is_initialized(struct SwrContext *s); + +/** + * Allocate SwrContext if needed and set/reset common parameters. + * + * This function does not require s to be allocated with swr_alloc(). On the + * other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters + * on the allocated context. + * + * @param s existing Swr context if available, or NULL if not + * @param out_ch_layout output channel layout (AV_CH_LAYOUT_*) + * @param out_sample_fmt output sample format (AV_SAMPLE_FMT_*). + * @param out_sample_rate output sample rate (frequency in Hz) + * @param in_ch_layout input channel layout (AV_CH_LAYOUT_*) + * @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*). + * @param in_sample_rate input sample rate (frequency in Hz) + * @param log_offset logging level offset + * @param log_ctx parent logging context, can be NULL + * + * @see swr_init(), swr_free() + * @return NULL on error, allocated context otherwise + */ +struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, + int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, + int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, + int log_offset, void *log_ctx); + +/** + * @} + * + * @name SwrContext destructor functions + * @{ + */ + +/** + * Free the given SwrContext and set the pointer to NULL. + * + * @param[in] s a pointer to a pointer to Swr context + */ +void swr_free(struct SwrContext **s); + +/** + * Closes the context so that swr_is_initialized() returns 0. + * + * The context can be brought back to life by running swr_init(), + * swr_init() can also be used without swr_close(). + * This function is mainly provided for simplifying the usecase + * where one tries to support libavresample and libswresample. + * + * @param[in,out] s Swr context to be closed + */ +void swr_close(struct SwrContext *s); + +/** + * @} + * + * @name Core conversion functions + * @{ + */ + +/** Convert audio. + * + * in and in_count can be set to 0 to flush the last few samples out at the + * end. + * + * If more input is provided than output space, then the input will be buffered. + * You can avoid this buffering by using swr_get_out_samples() to retrieve an + * upper bound on the required number of output samples for the given number of + * input samples. Conversion will run directly without copying whenever possible. + * + * @param s allocated Swr context, with parameters set + * @param out output buffers, only the first one need be set in case of packed audio + * @param out_count amount of space available for output in samples per channel + * @param in input buffers, only the first one need to be set in case of packed audio + * @param in_count number of input samples available in one channel + * + * @return number of samples output per channel, negative value on error + */ +int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, + const uint8_t **in , int in_count); + +/** + * Convert the next timestamp from input to output + * timestamps are in 1/(in_sample_rate * out_sample_rate) units. + * + * @note There are 2 slightly differently behaving modes. + * @li When automatic timestamp compensation is not used, (min_compensation >= FLT_MAX) + * in this case timestamps will be passed through with delays compensated + * @li When automatic timestamp compensation is used, (min_compensation < FLT_MAX) + * in this case the output timestamps will match output sample numbers. + * See ffmpeg-resampler(1) for the two modes of compensation. + * + * @param s[in] initialized Swr context + * @param pts[in] timestamp for the next input sample, INT64_MIN if unknown + * @see swr_set_compensation(), swr_drop_output(), and swr_inject_silence() are + * function used internally for timestamp compensation. + * @return the output timestamp for the next output sample + */ +int64_t swr_next_pts(struct SwrContext *s, int64_t pts); + +/** + * @} + * + * @name Low-level option setting functions + * These functons provide a means to set low-level options that is not possible + * with the AVOption API. + * @{ + */ + +/** + * Activate resampling compensation ("soft" compensation). This function is + * internally called when needed in swr_next_pts(). + * + * @param[in,out] s allocated Swr context. If it is not initialized, + * or SWR_FLAG_RESAMPLE is not set, swr_init() is + * called with the flag set. + * @param[in] sample_delta delta in PTS per sample + * @param[in] compensation_distance number of samples to compensate for + * @return >= 0 on success, AVERROR error codes if: + * @li @c s is NULL, + * @li @c compensation_distance is less than 0, + * @li @c compensation_distance is 0 but sample_delta is not, + * @li compensation unsupported by resampler, or + * @li swr_init() fails when called. + */ +int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance); + +/** + * Set a customized input channel mapping. + * + * @param[in,out] s allocated Swr context, not yet initialized + * @param[in] channel_map customized input channel mapping (array of channel + * indexes, -1 for a muted channel) + * @return >= 0 on success, or AVERROR error code in case of failure. + */ +int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map); + +/** + * Generate a channel mixing matrix. + * + * This function is the one used internally by libswresample for building the + * default mixing matrix. It is made public just as a utility function for + * building custom matrices. + * + * @param in_layout input channel layout + * @param out_layout output channel layout + * @param center_mix_level mix level for the center channel + * @param surround_mix_level mix level for the surround channel(s) + * @param lfe_mix_level mix level for the low-frequency effects channel + * @param rematrix_maxval if 1.0, coefficients will be normalized to prevent + * overflow. if INT_MAX, coefficients will not be + * normalized. + * @param[out] matrix mixing coefficients; matrix[i + stride * o] is + * the weight of input channel i in output channel o. + * @param stride distance between adjacent input channels in the + * matrix array + * @param matrix_encoding matrixed stereo downmix mode (e.g. dplii) + * @param log_ctx parent logging context, can be NULL + * @return 0 on success, negative AVERROR code on failure + */ +int swr_build_matrix(uint64_t in_layout, uint64_t out_layout, + double center_mix_level, double surround_mix_level, + double lfe_mix_level, double rematrix_maxval, + double rematrix_volume, double *matrix, + int stride, enum AVMatrixEncoding matrix_encoding, + void *log_ctx); + +/** + * Set a customized remix matrix. + * + * @param s allocated Swr context, not yet initialized + * @param matrix remix coefficients; matrix[i + stride * o] is + * the weight of input channel i in output channel o + * @param stride offset between lines of the matrix + * @return >= 0 on success, or AVERROR error code in case of failure. + */ +int swr_set_matrix(struct SwrContext *s, const double *matrix, int stride); + +/** + * @} + * + * @name Sample handling functions + * @{ + */ + +/** + * Drops the specified number of output samples. + * + * This function, along with swr_inject_silence(), is called by swr_next_pts() + * if needed for "hard" compensation. + * + * @param s allocated Swr context + * @param count number of samples to be dropped + * + * @return >= 0 on success, or a negative AVERROR code on failure + */ +int swr_drop_output(struct SwrContext *s, int count); + +/** + * Injects the specified number of silence samples. + * + * This function, along with swr_drop_output(), is called by swr_next_pts() + * if needed for "hard" compensation. + * + * @param s allocated Swr context + * @param count number of samples to be dropped + * + * @return >= 0 on success, or a negative AVERROR code on failure + */ +int swr_inject_silence(struct SwrContext *s, int count); + +/** + * Gets the delay the next input sample will experience relative to the next output sample. + * + * Swresample can buffer data if more input has been provided than available + * output space, also converting between sample rates needs a delay. + * This function returns the sum of all such delays. + * The exact delay is not necessarily an integer value in either input or + * output sample rate. Especially when downsampling by a large value, the + * output sample rate may be a poor choice to represent the delay, similarly + * for upsampling and the input sample rate. + * + * @param s swr context + * @param base timebase in which the returned delay will be: + * @li if it's set to 1 the returned delay is in seconds + * @li if it's set to 1000 the returned delay is in milliseconds + * @li if it's set to the input sample rate then the returned + * delay is in input samples + * @li if it's set to the output sample rate then the returned + * delay is in output samples + * @li if it's the least common multiple of in_sample_rate and + * out_sample_rate then an exact rounding-free delay will be + * returned + * @returns the delay in 1 / @c base units. + */ +int64_t swr_get_delay(struct SwrContext *s, int64_t base); + +/** + * Find an upper bound on the number of samples that the next swr_convert + * call will output, if called with in_samples of input samples. This + * depends on the internal state, and anything changing the internal state + * (like further swr_convert() calls) will may change the number of samples + * swr_get_out_samples() returns for the same number of input samples. + * + * @param in_samples number of input samples. + * @note any call to swr_inject_silence(), swr_convert(), swr_next_pts() + * or swr_set_compensation() invalidates this limit + * @note it is recommended to pass the correct available buffer size + * to all functions like swr_convert() even if swr_get_out_samples() + * indicates that less would be used. + * @returns an upper bound on the number of samples that the next swr_convert + * will output or a negative value to indicate an error + */ +int swr_get_out_samples(struct SwrContext *s, int in_samples); + +/** + * @} + * + * @name Configuration accessors + * @{ + */ + +/** + * Return the @ref LIBSWRESAMPLE_VERSION_INT constant. + * + * This is useful to check if the build-time libswresample has the same version + * as the run-time one. + * + * @returns the unsigned int-typed version + */ +unsigned swresample_version(void); + +/** + * Return the swr build-time configuration. + * + * @returns the build-time @c ./configure flags + */ +const char *swresample_configuration(void); + +/** + * Return the swr license. + * + * @returns the license of libswresample, determined at build-time + */ +const char *swresample_license(void); + +/** + * @} + * + * @name AVFrame based API + * @{ + */ + +/** + * Convert the samples in the input AVFrame and write them to the output AVFrame. + * + * Input and output AVFrames must have channel_layout, sample_rate and format set. + * + * If the output AVFrame does not have the data pointers allocated the nb_samples + * field will be set using av_frame_get_buffer() + * is called to allocate the frame. + * + * The output AVFrame can be NULL or have fewer allocated samples than required. + * In this case, any remaining samples not written to the output will be added + * to an internal FIFO buffer, to be returned at the next call to this function + * or to swr_convert(). + * + * If converting sample rate, there may be data remaining in the internal + * resampling delay buffer. swr_get_delay() tells the number of + * remaining samples. To get this data as output, call this function or + * swr_convert() with NULL input. + * + * If the SwrContext configuration does not match the output and + * input AVFrame settings the conversion does not take place and depending on + * which AVFrame is not matching AVERROR_OUTPUT_CHANGED, AVERROR_INPUT_CHANGED + * or the result of a bitwise-OR of them is returned. + * + * @see swr_delay() + * @see swr_convert() + * @see swr_get_delay() + * + * @param swr audio resample context + * @param output output AVFrame + * @param input input AVFrame + * @return 0 on success, AVERROR on failure or nonmatching + * configuration. + */ +int swr_convert_frame(SwrContext *swr, + AVFrame *output, const AVFrame *input); + +/** + * Configure or reconfigure the SwrContext using the information + * provided by the AVFrames. + * + * The original resampling context is reset even on failure. + * The function calls swr_close() internally if the context is open. + * + * @see swr_close(); + * + * @param swr audio resample context + * @param output output AVFrame + * @param input input AVFrame + * @return 0 on success, AVERROR on failure. + */ +int swr_config_frame(SwrContext *swr, const AVFrame *out, const AVFrame *in); + +/** + * @} + * @} + */ + +#endif /* SWRESAMPLE_SWRESAMPLE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample_internal.h new file mode 100644 index 00000000..f2ea5a22 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/swresample_internal.h @@ -0,0 +1,222 @@ +/* + * Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at) + * + * This file is part of libswresample + * + * libswresample is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * libswresample is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_SWRESAMPLE_INTERNAL_H +#define SWRESAMPLE_SWRESAMPLE_INTERNAL_H + +#include "swresample.h" +#include "libavutil/channel_layout.h" +#include "config.h" + +#define SWR_CH_MAX 64 + +#define SQRT3_2 1.22474487139158904909 /* sqrt(3/2) */ + +#define NS_TAPS 20 + +#if ARCH_X86_64 +typedef int64_t integer; +#else +typedef int integer; +#endif + +typedef void (mix_1_1_func_type)(void *out, const void *in, void *coeffp, integer index, integer len); +typedef void (mix_2_1_func_type)(void *out, const void *in1, const void *in2, void *coeffp, integer index1, integer index2, integer len); + +typedef void (mix_any_func_type)(uint8_t **out, const uint8_t **in1, void *coeffp, integer len); + +typedef struct AudioData{ + uint8_t *ch[SWR_CH_MAX]; ///< samples buffer per channel + uint8_t *data; ///< samples buffer + int ch_count; ///< number of channels + int bps; ///< bytes per sample + int count; ///< number of samples + int planar; ///< 1 if planar audio, 0 otherwise + enum AVSampleFormat fmt; ///< sample format +} AudioData; + +struct DitherContext { + int method; + int noise_pos; + float scale; + float noise_scale; ///< Noise scale + int ns_taps; ///< Noise shaping dither taps + float ns_scale; ///< Noise shaping dither scale + float ns_scale_1; ///< Noise shaping dither scale^-1 + int ns_pos; ///< Noise shaping dither position + float ns_coeffs[NS_TAPS]; ///< Noise shaping filter coefficients + float ns_errors[SWR_CH_MAX][2*NS_TAPS]; + AudioData noise; ///< noise used for dithering + AudioData temp; ///< temporary storage when writing into the input buffer isn't possible + int output_sample_bits; ///< the number of used output bits, needed to scale dither correctly +}; + +typedef struct ResampleContext * (* resample_init_func)(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear, + double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta, double precision, int cheby, int exact_rational); +typedef void (* resample_free_func)(struct ResampleContext **c); +typedef int (* multiple_resample_func)(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed); +typedef int (* resample_flush_func)(struct SwrContext *c); +typedef int (* set_compensation_func)(struct ResampleContext *c, int sample_delta, int compensation_distance); +typedef int64_t (* get_delay_func)(struct SwrContext *s, int64_t base); +typedef int (* invert_initial_buffer_func)(struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count); +typedef int64_t (* get_out_samples_func)(struct SwrContext *s, int in_samples); + +struct Resampler { + resample_init_func init; + resample_free_func free; + multiple_resample_func multiple_resample; + resample_flush_func flush; + set_compensation_func set_compensation; + get_delay_func get_delay; + invert_initial_buffer_func invert_initial_buffer; + get_out_samples_func get_out_samples; +}; + +extern struct Resampler const swri_resampler; +extern struct Resampler const swri_soxr_resampler; + +struct SwrContext { + const AVClass *av_class; ///< AVClass used for AVOption and av_log() + int log_level_offset; ///< logging level offset + void *log_ctx; ///< parent logging context + enum AVSampleFormat in_sample_fmt; ///< input sample format + enum AVSampleFormat int_sample_fmt; ///< internal sample format (AV_SAMPLE_FMT_FLTP or AV_SAMPLE_FMT_S16P) + enum AVSampleFormat out_sample_fmt; ///< output sample format + int64_t in_ch_layout; ///< input channel layout + int64_t out_ch_layout; ///< output channel layout + int in_sample_rate; ///< input sample rate + int out_sample_rate; ///< output sample rate + int flags; ///< miscellaneous flags such as SWR_FLAG_RESAMPLE + float slev; ///< surround mixing level + float clev; ///< center mixing level + float lfe_mix_level; ///< LFE mixing level + float rematrix_volume; ///< rematrixing volume coefficient + float rematrix_maxval; ///< maximum value for rematrixing output + int matrix_encoding; /**< matrixed stereo encoding */ + const int *channel_map; ///< channel index (or -1 if muted channel) map + int used_ch_count; ///< number of used input channels (mapped channel count if channel_map, otherwise in.ch_count) + int engine; + + int user_in_ch_count; ///< User set input channel count + int user_out_ch_count; ///< User set output channel count + int user_used_ch_count; ///< User set used channel count + int64_t user_in_ch_layout; ///< User set input channel layout + int64_t user_out_ch_layout; ///< User set output channel layout + enum AVSampleFormat user_int_sample_fmt; ///< User set internal sample format + int user_dither_method; ///< User set dither method + + struct DitherContext dither; + + int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ + int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ + int linear_interp; /**< if 1 then the resampling FIR filter will be linearly interpolated */ + int exact_rational; /**< if 1 then enable non power of 2 phase_count */ + double cutoff; /**< resampling cutoff frequency (swr: 6dB point; soxr: 0dB point). 1.0 corresponds to half the output sample rate */ + int filter_type; /**< swr resampling filter type */ + double kaiser_beta; /**< swr beta value for Kaiser window (only applicable if filter_type == AV_FILTER_TYPE_KAISER) */ + double precision; /**< soxr resampling precision (in bits) */ + int cheby; /**< soxr: if 1 then passband rolloff will be none (Chebyshev) & irrational ratio approximation precision will be higher */ + + float min_compensation; ///< swr minimum below which no compensation will happen + float min_hard_compensation; ///< swr minimum below which no silence inject / sample drop will happen + float soft_compensation_duration; ///< swr duration over which soft compensation is applied + float max_soft_compensation; ///< swr maximum soft compensation in seconds over soft_compensation_duration + float async; ///< swr simple 1 parameter async, similar to ffmpegs -async + int64_t firstpts_in_samples; ///< swr first pts in samples + + int resample_first; ///< 1 if resampling must come first, 0 if rematrixing + int rematrix; ///< flag to indicate if rematrixing is needed (basically if input and output layouts mismatch) + int rematrix_custom; ///< flag to indicate that a custom matrix has been defined + + AudioData in; ///< input audio data + AudioData postin; ///< post-input audio data: used for rematrix/resample + AudioData midbuf; ///< intermediate audio data (postin/preout) + AudioData preout; ///< pre-output audio data: used for rematrix/resample + AudioData out; ///< converted output audio data + AudioData in_buffer; ///< cached audio data (convert and resample purpose) + AudioData silence; ///< temporary with silence + AudioData drop_temp; ///< temporary used to discard output + int in_buffer_index; ///< cached buffer position + int in_buffer_count; ///< cached buffer length + int resample_in_constraint; ///< 1 if the input end was reach before the output end, 0 otherwise + int flushed; ///< 1 if data is to be flushed and no further input is expected + int64_t outpts; ///< output PTS + int64_t firstpts; ///< first PTS + int drop_output; ///< number of output samples to drop + double delayed_samples_fixup; ///< soxr 0.1.1: needed to fixup delayed_samples after flush has been called. + + struct AudioConvert *in_convert; ///< input conversion context + struct AudioConvert *out_convert; ///< output conversion context + struct AudioConvert *full_convert; ///< full conversion context (single conversion for input and output) + struct ResampleContext *resample; ///< resampling context + struct Resampler const *resampler; ///< resampler virtual function table + + double matrix[SWR_CH_MAX][SWR_CH_MAX]; ///< floating point rematrixing coefficients + float matrix_flt[SWR_CH_MAX][SWR_CH_MAX]; ///< single precision floating point rematrixing coefficients + uint8_t *native_matrix; + uint8_t *native_one; + uint8_t *native_simd_one; + uint8_t *native_simd_matrix; + int32_t matrix32[SWR_CH_MAX][SWR_CH_MAX]; ///< 17.15 fixed point rematrixing coefficients + uint8_t matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1]; ///< Lists of input channels per output channel that have non zero rematrixing coefficients + mix_1_1_func_type *mix_1_1_f; + mix_1_1_func_type *mix_1_1_simd; + + mix_2_1_func_type *mix_2_1_f; + mix_2_1_func_type *mix_2_1_simd; + + mix_any_func_type *mix_any_f; + + /* TODO: callbacks for ASM optimizations */ +}; + +av_warn_unused_result +int swri_realloc_audio(AudioData *a, int count); + +void swri_noise_shaping_int16 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count); +void swri_noise_shaping_int32 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count); +void swri_noise_shaping_float (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count); +void swri_noise_shaping_double(SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count); + +av_warn_unused_result +int swri_rematrix_init(SwrContext *s); +void swri_rematrix_free(SwrContext *s); +int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy); +int swri_rematrix_init_x86(struct SwrContext *s); + +av_warn_unused_result +int swri_get_dither(SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt); +av_warn_unused_result +int swri_dither_init(SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt); + +void swri_audio_convert_init_aarch64(struct AudioConvert *ac, + enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels); +void swri_audio_convert_init_arm(struct AudioConvert *ac, + enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels); +void swri_audio_convert_init_x86(struct AudioConvert *ac, + enum AVSampleFormat out_fmt, + enum AVSampleFormat in_fmt, + int channels); + +#endif diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/version.h new file mode 100644 index 00000000..25773919 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswresample/version.h @@ -0,0 +1,45 @@ +/* + * Version macros. + * + * This file is part of libswresample + * + * libswresample is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * libswresample is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWRESAMPLE_VERSION_H +#define SWRESAMPLE_VERSION_H + +/** + * @file + * Libswresample version macros + */ + +#include "libavutil/avutil.h" + +#define LIBSWRESAMPLE_VERSION_MAJOR 3 +#define LIBSWRESAMPLE_VERSION_MINOR 7 +#define LIBSWRESAMPLE_VERSION_MICRO 100 + +#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ + LIBSWRESAMPLE_VERSION_MINOR, \ + LIBSWRESAMPLE_VERSION_MICRO) +#define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, \ + LIBSWRESAMPLE_VERSION_MINOR, \ + LIBSWRESAMPLE_VERSION_MICRO) +#define LIBSWRESAMPLE_BUILD LIBSWRESAMPLE_VERSION_INT + +#define LIBSWRESAMPLE_IDENT "SwR" AV_STRINGIFY(LIBSWRESAMPLE_VERSION) + +#endif /* SWRESAMPLE_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/ppc/yuv2rgb_altivec.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/ppc/yuv2rgb_altivec.h new file mode 100644 index 00000000..aa52a474 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/ppc/yuv2rgb_altivec.h @@ -0,0 +1,51 @@ +/* + * AltiVec-enhanced yuv2yuvX + * + * Copyright (C) 2004 Romain Dolbeau + * based on the equivalent C code in swscale.c + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWSCALE_PPC_YUV2RGB_ALTIVEC_H +#define SWSCALE_PPC_YUV2RGB_ALTIVEC_H + +#include + +#include "libswscale/swscale_internal.h" + +#define YUV2PACKEDX_HEADER(suffix) \ + void ff_yuv2 ## suffix ## _X_altivec(SwsContext *c, \ + const int16_t *lumFilter, \ + const int16_t **lumSrc, \ + int lumFilterSize, \ + const int16_t *chrFilter, \ + const int16_t **chrUSrc, \ + const int16_t **chrVSrc, \ + int chrFilterSize, \ + const int16_t **alpSrc, \ + uint8_t *dest, \ + int dstW, int dstY); + +YUV2PACKEDX_HEADER(abgr); +YUV2PACKEDX_HEADER(bgra); +YUV2PACKEDX_HEADER(argb); +YUV2PACKEDX_HEADER(rgba); +YUV2PACKEDX_HEADER(rgb24); +YUV2PACKEDX_HEADER(bgr24); + +#endif /* SWSCALE_PPC_YUV2RGB_ALTIVEC_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/rgb2rgb.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/rgb2rgb.h new file mode 100644 index 00000000..48bba158 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/rgb2rgb.h @@ -0,0 +1,175 @@ +/* + * software RGB to RGB converter + * pluralize by Software PAL8 to RGB converter + * Software YUV to YUV converter + * Software YUV to RGB converter + * Written by Nick Kurshev. + * YUV & runtime CPU stuff by Michael (michaelni@gmx.at) + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWSCALE_RGB2RGB_H +#define SWSCALE_RGB2RGB_H + +#include + +#include "libavutil/avutil.h" +#include "swscale.h" + +/* A full collection of RGB to RGB(BGR) converters */ +extern void (*rgb24tobgr32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb15tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb15to32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb16to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb16tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb16to32)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24tobgr24)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24to16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb24to15)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32tobgr16)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*rgb32tobgr15)(const uint8_t *src, uint8_t *dst, int src_size); + +extern void (*shuffle_bytes_0321)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*shuffle_bytes_2103)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*shuffle_bytes_1230)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*shuffle_bytes_3012)(const uint8_t *src, uint8_t *dst, int src_size); +extern void (*shuffle_bytes_3210)(const uint8_t *src, uint8_t *dst, int src_size); + +void rgb64tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb64tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48tobgr48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48tobgr48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb64to48_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb64to48_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48tobgr64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48tobgr64_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48to64_nobswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb48to64_bswap(const uint8_t *src, uint8_t *dst, int src_size); +void rgb24to32(const uint8_t *src, uint8_t *dst, int src_size); +void rgb32to24(const uint8_t *src, uint8_t *dst, int src_size); +void rgb16tobgr32(const uint8_t *src, uint8_t *dst, int src_size); +void rgb16to24(const uint8_t *src, uint8_t *dst, int src_size); +void rgb16tobgr16(const uint8_t *src, uint8_t *dst, int src_size); +void rgb16tobgr15(const uint8_t *src, uint8_t *dst, int src_size); +void rgb15tobgr32(const uint8_t *src, uint8_t *dst, int src_size); +void rgb15to24(const uint8_t *src, uint8_t *dst, int src_size); +void rgb15tobgr16(const uint8_t *src, uint8_t *dst, int src_size); +void rgb15tobgr15(const uint8_t *src, uint8_t *dst, int src_size); +void rgb12tobgr12(const uint8_t *src, uint8_t *dst, int src_size); +void rgb12to15(const uint8_t *src, uint8_t *dst, int src_size); + +void ff_rgb24toyv12_c(const uint8_t *src, uint8_t *ydst, uint8_t *udst, + uint8_t *vdst, int width, int height, int lumStride, + int chromStride, int srcStride, int32_t *rgb2yuv); + +/** + * Height should be a multiple of 2 and width should be a multiple of 16. + * (If this is a problem for anyone then tell me, and I will fix it.) + */ +extern void (*yv12toyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); + +/** + * Width should be a multiple of 16. + */ +extern void (*yuv422ptoyuy2)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); + +/** + * Height should be a multiple of 2 and width should be a multiple of 16. + * (If this is a problem for anyone then tell me, and I will fix it.) + */ +extern void (*yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + int width, int height, + int lumStride, int chromStride, int srcStride); + +/** + * Height should be a multiple of 2 and width should be a multiple of 16. + * (If this is a problem for anyone then tell me, and I will fix it.) + */ +extern void (*yv12touyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); + +/** + * Width should be a multiple of 16. + */ +extern void (*yuv422ptouyvy)(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, + int width, int height, + int lumStride, int chromStride, int dstStride); + +/** + * Height should be a multiple of 2 and width should be a multiple of 2. + * (If this is a problem for anyone then tell me, and I will fix it.) + * Chrominance data is only taken from every second line, others are ignored. + * FIXME: Write high quality version. + */ +extern void (*ff_rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, + int width, int height, + int lumStride, int chromStride, int srcStride, + int32_t *rgb2yuv); +extern void (*planar2x)(const uint8_t *src, uint8_t *dst, int width, int height, + int srcStride, int dstStride); + +extern void (*interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, + int width, int height, int src1Stride, + int src2Stride, int dstStride); + +extern void (*deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2, + int width, int height, int srcStride, + int dst1Stride, int dst2Stride); + +extern void (*vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2, + uint8_t *dst1, uint8_t *dst2, + int width, int height, + int srcStride1, int srcStride2, + int dstStride1, int dstStride2); + +extern void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, + uint8_t *dst, + int width, int height, + int srcStride1, int srcStride2, + int srcStride3, int dstStride); + +extern void (*uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); +extern void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, + int width, int height, + int lumStride, int chromStride, int srcStride); + +void ff_sws_rgb2rgb_init(void); + +void rgb2rgb_init_aarch64(void); +void rgb2rgb_init_x86(void); + +#endif /* SWSCALE_RGB2RGB_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale.h new file mode 100644 index 00000000..7713f51e --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale.h @@ -0,0 +1,336 @@ +/* + * Copyright (C) 2001-2011 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWSCALE_SWSCALE_H +#define SWSCALE_SWSCALE_H + +/** + * @file + * @ingroup libsws + * external API header + */ + +#include + +#include "libavutil/avutil.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "version.h" + +/** + * @defgroup libsws libswscale + * Color conversion and scaling library. + * + * @{ + * + * Return the LIBSWSCALE_VERSION_INT constant. + */ +unsigned swscale_version(void); + +/** + * Return the libswscale build-time configuration. + */ +const char *swscale_configuration(void); + +/** + * Return the libswscale license. + */ +const char *swscale_license(void); + +/* values for the flags, the stuff on the command line is different */ +#define SWS_FAST_BILINEAR 1 +#define SWS_BILINEAR 2 +#define SWS_BICUBIC 4 +#define SWS_X 8 +#define SWS_POINT 0x10 +#define SWS_AREA 0x20 +#define SWS_BICUBLIN 0x40 +#define SWS_GAUSS 0x80 +#define SWS_SINC 0x100 +#define SWS_LANCZOS 0x200 +#define SWS_SPLINE 0x400 + +#define SWS_SRC_V_CHR_DROP_MASK 0x30000 +#define SWS_SRC_V_CHR_DROP_SHIFT 16 + +#define SWS_PARAM_DEFAULT 123456 + +#define SWS_PRINT_INFO 0x1000 + +//the following 3 flags are not completely implemented +//internal chrominance subsampling info +#define SWS_FULL_CHR_H_INT 0x2000 +//input subsampling info +#define SWS_FULL_CHR_H_INP 0x4000 +#define SWS_DIRECT_BGR 0x8000 +#define SWS_ACCURATE_RND 0x40000 +#define SWS_BITEXACT 0x80000 +#define SWS_ERROR_DIFFUSION 0x800000 + +#define SWS_MAX_REDUCE_CUTOFF 0.002 + +#define SWS_CS_ITU709 1 +#define SWS_CS_FCC 4 +#define SWS_CS_ITU601 5 +#define SWS_CS_ITU624 5 +#define SWS_CS_SMPTE170M 5 +#define SWS_CS_SMPTE240M 7 +#define SWS_CS_DEFAULT 5 +#define SWS_CS_BT2020 9 + +/** + * Return a pointer to yuv<->rgb coefficients for the given colorspace + * suitable for sws_setColorspaceDetails(). + * + * @param colorspace One of the SWS_CS_* macros. If invalid, + * SWS_CS_DEFAULT is used. + */ +const int *sws_getCoefficients(int colorspace); + +// when used for filters they must have an odd number of elements +// coeffs cannot be shared between vectors +typedef struct SwsVector { + double *coeff; ///< pointer to the list of coefficients + int length; ///< number of coefficients in the vector +} SwsVector; + +// vectors can be shared +typedef struct SwsFilter { + SwsVector *lumH; + SwsVector *lumV; + SwsVector *chrH; + SwsVector *chrV; +} SwsFilter; + +struct SwsContext; + +/** + * Return a positive value if pix_fmt is a supported input format, 0 + * otherwise. + */ +int sws_isSupportedInput(enum AVPixelFormat pix_fmt); + +/** + * Return a positive value if pix_fmt is a supported output format, 0 + * otherwise. + */ +int sws_isSupportedOutput(enum AVPixelFormat pix_fmt); + +/** + * @param[in] pix_fmt the pixel format + * @return a positive value if an endianness conversion for pix_fmt is + * supported, 0 otherwise. + */ +int sws_isSupportedEndiannessConversion(enum AVPixelFormat pix_fmt); + +/** + * Allocate an empty SwsContext. This must be filled and passed to + * sws_init_context(). For filling see AVOptions, options.c and + * sws_setColorspaceDetails(). + */ +struct SwsContext *sws_alloc_context(void); + +/** + * Initialize the swscaler context sws_context. + * + * @return zero or positive value on success, a negative value on + * error + */ +av_warn_unused_result +int sws_init_context(struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter); + +/** + * Free the swscaler context swsContext. + * If swsContext is NULL, then does nothing. + */ +void sws_freeContext(struct SwsContext *swsContext); + +/** + * Allocate and return an SwsContext. You need it to perform + * scaling/conversion operations using sws_scale(). + * + * @param srcW the width of the source image + * @param srcH the height of the source image + * @param srcFormat the source image format + * @param dstW the width of the destination image + * @param dstH the height of the destination image + * @param dstFormat the destination image format + * @param flags specify which algorithm and options to use for rescaling + * @param param extra parameters to tune the used scaler + * For SWS_BICUBIC param[0] and [1] tune the shape of the basis + * function, param[0] tunes f(1) and param[1] f´(1) + * For SWS_GAUSS param[0] tunes the exponent and thus cutoff + * frequency + * For SWS_LANCZOS param[0] tunes the width of the window function + * @return a pointer to an allocated context, or NULL in case of error + * @note this function is to be removed after a saner alternative is + * written + */ +struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, + int flags, SwsFilter *srcFilter, + SwsFilter *dstFilter, const double *param); + +/** + * Scale the image slice in srcSlice and put the resulting scaled + * slice in the image in dst. A slice is a sequence of consecutive + * rows in an image. + * + * Slices have to be provided in sequential order, either in + * top-bottom or bottom-top order. If slices are provided in + * non-sequential order the behavior of the function is undefined. + * + * @param c the scaling context previously created with + * sws_getContext() + * @param srcSlice the array containing the pointers to the planes of + * the source slice + * @param srcStride the array containing the strides for each plane of + * the source image + * @param srcSliceY the position in the source image of the slice to + * process, that is the number (counted starting from + * zero) in the image of the first row of the slice + * @param srcSliceH the height of the source slice, that is the number + * of rows in the slice + * @param dst the array containing the pointers to the planes of + * the destination image + * @param dstStride the array containing the strides for each plane of + * the destination image + * @return the height of the output slice + */ +int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[], + const int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *const dst[], const int dstStride[]); + +/** + * @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg) + * @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg) + * @param table the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] + * @param inv_table the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] + * @param brightness 16.16 fixed point brightness correction + * @param contrast 16.16 fixed point contrast correction + * @param saturation 16.16 fixed point saturation correction + * @return -1 if not supported + */ +int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], + int srcRange, const int table[4], int dstRange, + int brightness, int contrast, int saturation); + +/** + * @return -1 if not supported + */ +int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, + int *srcRange, int **table, int *dstRange, + int *brightness, int *contrast, int *saturation); + +/** + * Allocate and return an uninitialized vector with length coefficients. + */ +SwsVector *sws_allocVec(int length); + +/** + * Return a normalized Gaussian curve used to filter stuff + * quality = 3 is high quality, lower is lower quality. + */ +SwsVector *sws_getGaussianVec(double variance, double quality); + +/** + * Scale all the coefficients of a by the scalar value. + */ +void sws_scaleVec(SwsVector *a, double scalar); + +/** + * Scale all the coefficients of a so that their sum equals height. + */ +void sws_normalizeVec(SwsVector *a, double height); + +#if FF_API_SWS_VECTOR +attribute_deprecated SwsVector *sws_getConstVec(double c, int length); +attribute_deprecated SwsVector *sws_getIdentityVec(void); +attribute_deprecated void sws_convVec(SwsVector *a, SwsVector *b); +attribute_deprecated void sws_addVec(SwsVector *a, SwsVector *b); +attribute_deprecated void sws_subVec(SwsVector *a, SwsVector *b); +attribute_deprecated void sws_shiftVec(SwsVector *a, int shift); +attribute_deprecated SwsVector *sws_cloneVec(SwsVector *a); +attribute_deprecated void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level); +#endif + +void sws_freeVec(SwsVector *a); + +SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur, + float lumaSharpen, float chromaSharpen, + float chromaHShift, float chromaVShift, + int verbose); +void sws_freeFilter(SwsFilter *filter); + +/** + * Check if context can be reused, otherwise reallocate a new one. + * + * If context is NULL, just calls sws_getContext() to get a new + * context. Otherwise, checks if the parameters are the ones already + * saved in context. If that is the case, returns the current + * context. Otherwise, frees context and gets a new context with + * the new parameters. + * + * Be warned that srcFilter and dstFilter are not checked, they + * are assumed to remain the same. + */ +struct SwsContext *sws_getCachedContext(struct SwsContext *context, + int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, + int flags, SwsFilter *srcFilter, + SwsFilter *dstFilter, const double *param); + +/** + * Convert an 8-bit paletted frame into a frame with a color depth of 32 bits. + * + * The output frame will have the same packed format as the palette. + * + * @param src source frame buffer + * @param dst destination frame buffer + * @param num_pixels number of pixels to convert + * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src + */ +void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette); + +/** + * Convert an 8-bit paletted frame into a frame with a color depth of 24 bits. + * + * With the palette format "ABCD", the destination frame ends up with the format "ABC". + * + * @param src source frame buffer + * @param dst destination frame buffer + * @param num_pixels number of pixels to convert + * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src + */ +void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette); + +/** + * Get the AVClass for swsContext. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +const AVClass *sws_get_class(void); + +/** + * @} + */ + +#endif /* SWSCALE_SWSCALE_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale_internal.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale_internal.h new file mode 100644 index 00000000..ee46092f --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/swscale_internal.h @@ -0,0 +1,1049 @@ +/* + * Copyright (C) 2001-2011 Michael Niedermayer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWSCALE_SWSCALE_INTERNAL_H +#define SWSCALE_SWSCALE_INTERNAL_H + +#include "config.h" +#include "version.h" + +#include "libavutil/avassert.h" +#include "libavutil/avutil.h" +#include "libavutil/common.h" +#include "libavutil/intreadwrite.h" +#include "libavutil/log.h" +#include "libavutil/pixfmt.h" +#include "libavutil/pixdesc.h" +#include "libavutil/ppc/util_altivec.h" + +#define STR(s) AV_TOSTRING(s) // AV_STRINGIFY is too long + +#define YUVRGB_TABLE_HEADROOM 512 +#define YUVRGB_TABLE_LUMA_HEADROOM 512 + +#define MAX_FILTER_SIZE SWS_MAX_FILTER_SIZE + +#define DITHER1XBPP + +#if HAVE_BIGENDIAN +#define ALT32_CORR (-1) +#else +#define ALT32_CORR 1 +#endif + +#if ARCH_X86_64 +# define APCK_PTR2 8 +# define APCK_COEF 16 +# define APCK_SIZE 24 +#else +# define APCK_PTR2 4 +# define APCK_COEF 8 +# define APCK_SIZE 16 +#endif + +#define RETCODE_USE_CASCADE -12345 + +struct SwsContext; + +typedef enum SwsDither { + SWS_DITHER_NONE = 0, + SWS_DITHER_AUTO, + SWS_DITHER_BAYER, + SWS_DITHER_ED, + SWS_DITHER_A_DITHER, + SWS_DITHER_X_DITHER, + NB_SWS_DITHER, +} SwsDither; + +typedef enum SwsAlphaBlend { + SWS_ALPHA_BLEND_NONE = 0, + SWS_ALPHA_BLEND_UNIFORM, + SWS_ALPHA_BLEND_CHECKERBOARD, + SWS_ALPHA_BLEND_NB, +} SwsAlphaBlend; + +typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]); + +/** + * Write one line of horizontally scaled data to planar output + * without any additional vertical scaling (or point-scaling). + * + * @param src scaled source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param dest pointer to the output plane. For >8-bit + * output, this is in uint16_t + * @param dstW width of destination in pixels + * @param dither ordered dither array of type int16_t and size 8 + * @param offset Dither offset + */ +typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + +/** + * Write one line of horizontally scaled data to planar output + * with multi-point vertical scaling between input pixels. + * + * @param filter vertical luma/alpha scaling coefficients, 12 bits [0,4096] + * @param src scaled luma (Y) or alpha (A) source data, 15 bits for + * 8-10-bit output, 19 bits for 16-bit output (in int32_t) + * @param filterSize number of vertical input lines to scale + * @param dest pointer to output plane. For >8-bit + * output, this is in uint16_t + * @param dstW width of destination pixels + * @param offset Dither offset + */ +typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize, + const int16_t **src, uint8_t *dest, int dstW, + const uint8_t *dither, int offset); + +/** + * Write one line of horizontally scaled chroma to interleaved output + * with multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit + * output, 19 bits for 16-bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit + * output, 19 bits for 16-bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param dest pointer to the output plane. For >8-bit + * output, this is in uint16_t + * @param dstW width of chroma planes + */ +typedef void (*yuv2interleavedX_fn)(struct SwsContext *c, + const int16_t *chrFilter, + int chrFilterSize, + const int16_t **chrUSrc, + const int16_t **chrVSrc, + uint8_t *dest, int dstW); + +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output without any additional vertical scaling (or point-scaling). Note + * that this function may do chroma scaling, see the "uvalpha" argument. + * + * @param c SWS scaling context + * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param dest pointer to the output plane. For 16-bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param uvalpha chroma scaling coefficient for the second line of chroma + * pixels, either 2048 or 0. If 0, one chroma input is used + * for 2 output pixels (or if the SWS_FLAG_FULL_CHR_INT flag + * is set, it generates 1 output pixel). If 2048, two chroma + * input pixels should be averaged for 2 output pixels (this + * only happens if SWS_FLAG_FULL_CHR_INT is not set) + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * for some output formats. + */ +typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc, + const int16_t *chrUSrc[2], + const int16_t *chrVSrc[2], + const int16_t *alpSrc, uint8_t *dest, + int dstW, int uvalpha, int y); +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output by doing bilinear scaling between two input lines. + * + * @param c SWS scaling context + * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param dest pointer to the output plane. For 16-bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param yalpha luma/alpha scaling coefficients for the second input line. + * The first line's coefficients can be calculated by using + * 4096 - yalpha + * @param uvalpha chroma scaling coefficient for the second input line. The + * first line's coefficients can be calculated by using + * 4096 - uvalpha + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * for some output formats. + */ +typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2], + const int16_t *chrUSrc[2], + const int16_t *chrVSrc[2], + const int16_t *alpSrc[2], + uint8_t *dest, + int dstW, int yalpha, int uvalpha, int y); +/** + * Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB + * output by doing multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096] + * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param lumFilterSize number of vertical luma/alpha input lines to scale + * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param dest pointer to the output plane. For 16-bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * or some output formats. + */ +typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, + const int16_t **chrUSrc, + const int16_t **chrVSrc, int chrFilterSize, + const int16_t **alpSrc, uint8_t *dest, + int dstW, int y); + +/** + * Write one line of horizontally scaled Y/U/V/A to YUV/RGB + * output by doing multi-point vertical scaling between input pixels. + * + * @param c SWS scaling context + * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096] + * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param lumFilterSize number of vertical luma/alpha input lines to scale + * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096] + * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param chrFilterSize number of vertical chroma input lines to scale + * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output, + * 19 bits for 16-bit output (in int32_t) + * @param dest pointer to the output planes. For 16-bit output, this is + * uint16_t + * @param dstW width of lumSrc and alpSrc in pixels, number of pixels + * to write into dest[] + * @param y vertical line number for this output. This does not need + * to be used to calculate the offset in the destination, + * but can be used to generate comfort noise using dithering + * or some output formats. + */ +typedef void (*yuv2anyX_fn)(struct SwsContext *c, const int16_t *lumFilter, + const int16_t **lumSrc, int lumFilterSize, + const int16_t *chrFilter, + const int16_t **chrUSrc, + const int16_t **chrVSrc, int chrFilterSize, + const int16_t **alpSrc, uint8_t **dest, + int dstW, int y); + +struct SwsSlice; +struct SwsFilterDescriptor; + +/* This struct should be aligned on at least a 32-byte boundary. */ +typedef struct SwsContext { + /** + * info on struct for av_log + */ + const AVClass *av_class; + + /** + * Note that src, dst, srcStride, dstStride will be copied in the + * sws_scale() wrapper so they can be freely modified here. + */ + SwsFunc swscale; + int srcW; ///< Width of source luma/alpha planes. + int srcH; ///< Height of source luma/alpha planes. + int dstH; ///< Height of destination luma/alpha planes. + int chrSrcW; ///< Width of source chroma planes. + int chrSrcH; ///< Height of source chroma planes. + int chrDstW; ///< Width of destination chroma planes. + int chrDstH; ///< Height of destination chroma planes. + int lumXInc, chrXInc; + int lumYInc, chrYInc; + enum AVPixelFormat dstFormat; ///< Destination pixel format. + enum AVPixelFormat srcFormat; ///< Source pixel format. + int dstFormatBpp; ///< Number of bits per pixel of the destination pixel format. + int srcFormatBpp; ///< Number of bits per pixel of the source pixel format. + int dstBpc, srcBpc; + int chrSrcHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in source image. + int chrSrcVSubSample; ///< Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in source image. + int chrDstHSubSample; ///< Binary logarithm of horizontal subsampling factor between luma/alpha and chroma planes in destination image. + int chrDstVSubSample; ///< Binary logarithm of vertical subsampling factor between luma/alpha and chroma planes in destination image. + int vChrDrop; ///< Binary logarithm of extra vertical subsampling factor in source image chroma planes specified by user. + int sliceDir; ///< Direction that slices are fed to the scaler (1 = top-to-bottom, -1 = bottom-to-top). + double param[2]; ///< Input parameters for scaling algorithms that need them. + + /* The cascaded_* fields allow spliting a scaler task into multiple + * sequential steps, this is for example used to limit the maximum + * downscaling factor that needs to be supported in one scaler. + */ + struct SwsContext *cascaded_context[3]; + int cascaded_tmpStride[4]; + uint8_t *cascaded_tmp[4]; + int cascaded1_tmpStride[4]; + uint8_t *cascaded1_tmp[4]; + int cascaded_mainindex; + + double gamma_value; + int gamma_flag; + int is_internal_gamma; + uint16_t *gamma; + uint16_t *inv_gamma; + + int numDesc; + int descIndex[2]; + int numSlice; + struct SwsSlice *slice; + struct SwsFilterDescriptor *desc; + + uint32_t pal_yuv[256]; + uint32_t pal_rgb[256]; + + float uint2float_lut[256]; + + /** + * @name Scaled horizontal lines ring buffer. + * The horizontal scaler keeps just enough scaled lines in a ring buffer + * so they may be passed to the vertical scaler. The pointers to the + * allocated buffers for each line are duplicated in sequence in the ring + * buffer to simplify indexing and avoid wrapping around between lines + * inside the vertical scaler code. The wrapping is done before the + * vertical scaler is called. + */ + //@{ + int lastInLumBuf; ///< Last scaled horizontal luma/alpha line from source in the ring buffer. + int lastInChrBuf; ///< Last scaled horizontal chroma line from source in the ring buffer. + //@} + + uint8_t *formatConvBuffer; + int needAlpha; + + /** + * @name Horizontal and vertical filters. + * To better understand the following fields, here is a pseudo-code of + * their usage in filtering a horizontal line: + * @code + * for (i = 0; i < width; i++) { + * dst[i] = 0; + * for (j = 0; j < filterSize; j++) + * dst[i] += src[ filterPos[i] + j ] * filter[ filterSize * i + j ]; + * dst[i] >>= FRAC_BITS; // The actual implementation is fixed-point. + * } + * @endcode + */ + //@{ + int16_t *hLumFilter; ///< Array of horizontal filter coefficients for luma/alpha planes. + int16_t *hChrFilter; ///< Array of horizontal filter coefficients for chroma planes. + int16_t *vLumFilter; ///< Array of vertical filter coefficients for luma/alpha planes. + int16_t *vChrFilter; ///< Array of vertical filter coefficients for chroma planes. + int32_t *hLumFilterPos; ///< Array of horizontal filter starting positions for each dst[i] for luma/alpha planes. + int32_t *hChrFilterPos; ///< Array of horizontal filter starting positions for each dst[i] for chroma planes. + int32_t *vLumFilterPos; ///< Array of vertical filter starting positions for each dst[i] for luma/alpha planes. + int32_t *vChrFilterPos; ///< Array of vertical filter starting positions for each dst[i] for chroma planes. + int hLumFilterSize; ///< Horizontal filter size for luma/alpha pixels. + int hChrFilterSize; ///< Horizontal filter size for chroma pixels. + int vLumFilterSize; ///< Vertical filter size for luma/alpha pixels. + int vChrFilterSize; ///< Vertical filter size for chroma pixels. + //@} + + int lumMmxextFilterCodeSize; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes. + int chrMmxextFilterCodeSize; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes. + uint8_t *lumMmxextFilterCode; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes. + uint8_t *chrMmxextFilterCode; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes. + + int canMMXEXTBeUsed; + int warned_unuseable_bilinear; + + int dstY; ///< Last destination vertical line output from last slice. + int flags; ///< Flags passed by the user to select scaler algorithm, optimizations, subsampling, etc... + void *yuvTable; // pointer to the yuv->rgb table start so it can be freed() + // alignment ensures the offset can be added in a single + // instruction on e.g. ARM + DECLARE_ALIGNED(16, int, table_gV)[256 + 2*YUVRGB_TABLE_HEADROOM]; + uint8_t *table_rV[256 + 2*YUVRGB_TABLE_HEADROOM]; + uint8_t *table_gU[256 + 2*YUVRGB_TABLE_HEADROOM]; + uint8_t *table_bU[256 + 2*YUVRGB_TABLE_HEADROOM]; + DECLARE_ALIGNED(16, int32_t, input_rgb2yuv_table)[16+40*4]; // This table can contain both C and SIMD formatted values, the C vales are always at the XY_IDX points +#define RY_IDX 0 +#define GY_IDX 1 +#define BY_IDX 2 +#define RU_IDX 3 +#define GU_IDX 4 +#define BU_IDX 5 +#define RV_IDX 6 +#define GV_IDX 7 +#define BV_IDX 8 +#define RGB2YUV_SHIFT 15 + + int *dither_error[4]; + + //Colorspace stuff + int contrast, brightness, saturation; // for sws_getColorspaceDetails + int srcColorspaceTable[4]; + int dstColorspaceTable[4]; + int srcRange; ///< 0 = MPG YUV range, 1 = JPG YUV range (source image). + int dstRange; ///< 0 = MPG YUV range, 1 = JPG YUV range (destination image). + int src0Alpha; + int dst0Alpha; + int srcXYZ; + int dstXYZ; + int src_h_chr_pos; + int dst_h_chr_pos; + int src_v_chr_pos; + int dst_v_chr_pos; + int yuv2rgb_y_offset; + int yuv2rgb_y_coeff; + int yuv2rgb_v2r_coeff; + int yuv2rgb_v2g_coeff; + int yuv2rgb_u2g_coeff; + int yuv2rgb_u2b_coeff; + +#define RED_DITHER "0*8" +#define GREEN_DITHER "1*8" +#define BLUE_DITHER "2*8" +#define Y_COEFF "3*8" +#define VR_COEFF "4*8" +#define UB_COEFF "5*8" +#define VG_COEFF "6*8" +#define UG_COEFF "7*8" +#define Y_OFFSET "8*8" +#define U_OFFSET "9*8" +#define V_OFFSET "10*8" +#define LUM_MMX_FILTER_OFFSET "11*8" +#define CHR_MMX_FILTER_OFFSET "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE) +#define DSTW_OFFSET "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2" +#define ESP_OFFSET "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+8" +#define VROUNDER_OFFSET "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+16" +#define U_TEMP "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+24" +#define V_TEMP "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+32" +#define Y_TEMP "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+40" +#define ALP_MMX_FILTER_OFFSET "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*2+48" +#define UV_OFF_PX "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+48" +#define UV_OFF_BYTE "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+56" +#define DITHER16 "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+64" +#define DITHER32 "11*8+4*4*"AV_STRINGIFY(MAX_FILTER_SIZE)"*3+80" +#define DITHER32_INT (11*8+4*4*MAX_FILTER_SIZE*3+80) // value equal to above, used for checking that the struct hasn't been changed by mistake + + DECLARE_ALIGNED(8, uint64_t, redDither); + DECLARE_ALIGNED(8, uint64_t, greenDither); + DECLARE_ALIGNED(8, uint64_t, blueDither); + + DECLARE_ALIGNED(8, uint64_t, yCoeff); + DECLARE_ALIGNED(8, uint64_t, vrCoeff); + DECLARE_ALIGNED(8, uint64_t, ubCoeff); + DECLARE_ALIGNED(8, uint64_t, vgCoeff); + DECLARE_ALIGNED(8, uint64_t, ugCoeff); + DECLARE_ALIGNED(8, uint64_t, yOffset); + DECLARE_ALIGNED(8, uint64_t, uOffset); + DECLARE_ALIGNED(8, uint64_t, vOffset); + int32_t lumMmxFilter[4 * MAX_FILTER_SIZE]; + int32_t chrMmxFilter[4 * MAX_FILTER_SIZE]; + int dstW; ///< Width of destination luma/alpha planes. + DECLARE_ALIGNED(8, uint64_t, esp); + DECLARE_ALIGNED(8, uint64_t, vRounder); + DECLARE_ALIGNED(8, uint64_t, u_temp); + DECLARE_ALIGNED(8, uint64_t, v_temp); + DECLARE_ALIGNED(8, uint64_t, y_temp); + int32_t alpMmxFilter[4 * MAX_FILTER_SIZE]; + // alignment of these values is not necessary, but merely here + // to maintain the same offset across x8632 and x86-64. Once we + // use proper offset macros in the asm, they can be removed. + DECLARE_ALIGNED(8, ptrdiff_t, uv_off); ///< offset (in pixels) between u and v planes + DECLARE_ALIGNED(8, ptrdiff_t, uv_offx2); ///< offset (in bytes) between u and v planes + DECLARE_ALIGNED(8, uint16_t, dither16)[8]; + DECLARE_ALIGNED(8, uint32_t, dither32)[8]; + + const uint8_t *chrDither8, *lumDither8; + +#if HAVE_ALTIVEC + vector signed short CY; + vector signed short CRV; + vector signed short CBU; + vector signed short CGU; + vector signed short CGV; + vector signed short OY; + vector unsigned short CSHIFT; + vector signed short *vYCoeffsBank, *vCCoeffsBank; +#endif + + int use_mmx_vfilter; + +/* pre defined color-spaces gamma */ +#define XYZ_GAMMA (2.6f) +#define RGB_GAMMA (2.2f) + int16_t *xyzgamma; + int16_t *rgbgamma; + int16_t *xyzgammainv; + int16_t *rgbgammainv; + int16_t xyz2rgb_matrix[3][4]; + int16_t rgb2xyz_matrix[3][4]; + + /* function pointers for swscale() */ + yuv2planar1_fn yuv2plane1; + yuv2planarX_fn yuv2planeX; + yuv2interleavedX_fn yuv2nv12cX; + yuv2packed1_fn yuv2packed1; + yuv2packed2_fn yuv2packed2; + yuv2packedX_fn yuv2packedX; + yuv2anyX_fn yuv2anyX; + + /// Unscaled conversion of luma plane to YV12 for horizontal scaler. + void (*lumToYV12)(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, + int width, uint32_t *pal); + /// Unscaled conversion of alpha plane to YV12 for horizontal scaler. + void (*alpToYV12)(uint8_t *dst, const uint8_t *src, const uint8_t *src2, const uint8_t *src3, + int width, uint32_t *pal); + /// Unscaled conversion of chroma planes to YV12 for horizontal scaler. + void (*chrToYV12)(uint8_t *dstU, uint8_t *dstV, + const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, + int width, uint32_t *pal); + + /** + * Functions to read planar input, such as planar RGB, and convert + * internally to Y/UV/A. + */ + /** @{ */ + void (*readLumPlanar)(uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv); + void (*readChrPlanar)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], + int width, int32_t *rgb2yuv); + void (*readAlpPlanar)(uint8_t *dst, const uint8_t *src[4], int width, int32_t *rgb2yuv); + /** @} */ + + /** + * Scale one horizontal line of input data using a bilinear filter + * to produce one line of output data. Compared to SwsContext->hScale(), + * please take note of the following caveats when using these: + * - Scaling is done using only 7 bits instead of 14-bit coefficients. + * - You can use no more than 5 input pixels to produce 4 output + * pixels. Therefore, this filter should not be used for downscaling + * by more than ~20% in width (because that equals more than 5/4th + * downscaling and thus more than 5 pixels input per 4 pixels output). + * - In general, bilinear filters create artifacts during downscaling + * (even when <20%), because one output pixel will span more than one + * input pixel, and thus some pixels will need edges of both neighbor + * pixels to interpolate the output pixel. Since you can use at most + * two input pixels per output pixel in bilinear scaling, this is + * impossible and thus downscaling by any size will create artifacts. + * To enable this type of scaling, set SWS_FLAG_FAST_BILINEAR + * in SwsContext->flags. + */ + /** @{ */ + void (*hyscale_fast)(struct SwsContext *c, + int16_t *dst, int dstWidth, + const uint8_t *src, int srcW, int xInc); + void (*hcscale_fast)(struct SwsContext *c, + int16_t *dst1, int16_t *dst2, int dstWidth, + const uint8_t *src1, const uint8_t *src2, + int srcW, int xInc); + /** @} */ + + /** + * Scale one horizontal line of input data using a filter over the input + * lines, to produce one (differently sized) line of output data. + * + * @param dst pointer to destination buffer for horizontally scaled + * data. If the number of bits per component of one + * destination pixel (SwsContext->dstBpc) is <= 10, data + * will be 15 bpc in 16 bits (int16_t) width. Else (i.e. + * SwsContext->dstBpc == 16), data will be 19bpc in + * 32 bits (int32_t) width. + * @param dstW width of destination image + * @param src pointer to source data to be scaled. If the number of + * bits per component of a source pixel (SwsContext->srcBpc) + * is 8, this is 8bpc in 8 bits (uint8_t) width. Else + * (i.e. SwsContext->dstBpc > 8), this is native depth + * in 16 bits (uint16_t) width. In other words, for 9-bit + * YUV input, this is 9bpc, for 10-bit YUV input, this is + * 10bpc, and for 16-bit RGB or YUV, this is 16bpc. + * @param filter filter coefficients to be used per output pixel for + * scaling. This contains 14bpp filtering coefficients. + * Guaranteed to contain dstW * filterSize entries. + * @param filterPos position of the first input pixel to be used for + * each output pixel during scaling. Guaranteed to + * contain dstW entries. + * @param filterSize the number of input coefficients to be used (and + * thus the number of input pixels to be used) for + * creating a single output pixel. Is aligned to 4 + * (and input coefficients thus padded with zeroes) + * to simplify creating SIMD code. + */ + /** @{ */ + void (*hyScale)(struct SwsContext *c, int16_t *dst, int dstW, + const uint8_t *src, const int16_t *filter, + const int32_t *filterPos, int filterSize); + void (*hcScale)(struct SwsContext *c, int16_t *dst, int dstW, + const uint8_t *src, const int16_t *filter, + const int32_t *filterPos, int filterSize); + /** @} */ + + /// Color range conversion function for luma plane if needed. + void (*lumConvertRange)(int16_t *dst, int width); + /// Color range conversion function for chroma planes if needed. + void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width); + + int needs_hcscale; ///< Set if there are chroma planes to be converted. + + SwsDither dither; + + SwsAlphaBlend alphablend; +} SwsContext; +//FIXME check init (where 0) + +SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c); +int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], + int fullRange, int brightness, + int contrast, int saturation); +void ff_yuv2rgb_init_tables_ppc(SwsContext *c, const int inv_table[4], + int brightness, int contrast, int saturation); + +void ff_updateMMXDitherTables(SwsContext *c, int dstY); + +av_cold void ff_sws_init_range_convert(SwsContext *c); + +SwsFunc ff_yuv2rgb_init_x86(SwsContext *c); +SwsFunc ff_yuv2rgb_init_ppc(SwsContext *c); + +static av_always_inline int is16BPS(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->comp[0].depth == 16; +} + +static av_always_inline int is32BPS(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->comp[0].depth == 32; +} + +static av_always_inline int isNBPS(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->comp[0].depth >= 9 && desc->comp[0].depth <= 14; +} + +static av_always_inline int isBE(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->flags & AV_PIX_FMT_FLAG_BE; +} + +static av_always_inline int isYUV(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2; +} + +static av_always_inline int isPlanarYUV(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return ((desc->flags & AV_PIX_FMT_FLAG_PLANAR) && isYUV(pix_fmt)); +} + +/* + * Identity semi-planar YUV formats. Specifically, those are YUV formats + * where the second and third components (U & V) are on the same plane. + */ +static av_always_inline int isSemiPlanarYUV(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return (isPlanarYUV(pix_fmt) && desc->comp[1].plane == desc->comp[2].plane); +} + +static av_always_inline int isRGB(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return (desc->flags & AV_PIX_FMT_FLAG_RGB); +} + +static av_always_inline int isGray(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return !(desc->flags & AV_PIX_FMT_FLAG_PAL) && + !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL) && + desc->nb_components <= 2 && + pix_fmt != AV_PIX_FMT_MONOBLACK && + pix_fmt != AV_PIX_FMT_MONOWHITE; +} + +static av_always_inline int isRGBinInt(enum AVPixelFormat pix_fmt) +{ + return pix_fmt == AV_PIX_FMT_RGB48BE || + pix_fmt == AV_PIX_FMT_RGB48LE || + pix_fmt == AV_PIX_FMT_RGB32 || + pix_fmt == AV_PIX_FMT_RGB32_1 || + pix_fmt == AV_PIX_FMT_RGB24 || + pix_fmt == AV_PIX_FMT_RGB565BE || + pix_fmt == AV_PIX_FMT_RGB565LE || + pix_fmt == AV_PIX_FMT_RGB555BE || + pix_fmt == AV_PIX_FMT_RGB555LE || + pix_fmt == AV_PIX_FMT_RGB444BE || + pix_fmt == AV_PIX_FMT_RGB444LE || + pix_fmt == AV_PIX_FMT_RGB8 || + pix_fmt == AV_PIX_FMT_RGB4 || + pix_fmt == AV_PIX_FMT_RGB4_BYTE || + pix_fmt == AV_PIX_FMT_RGBA64BE || + pix_fmt == AV_PIX_FMT_RGBA64LE || + pix_fmt == AV_PIX_FMT_MONOBLACK || + pix_fmt == AV_PIX_FMT_MONOWHITE; +} + +static av_always_inline int isBGRinInt(enum AVPixelFormat pix_fmt) +{ + return pix_fmt == AV_PIX_FMT_BGR48BE || + pix_fmt == AV_PIX_FMT_BGR48LE || + pix_fmt == AV_PIX_FMT_BGR32 || + pix_fmt == AV_PIX_FMT_BGR32_1 || + pix_fmt == AV_PIX_FMT_BGR24 || + pix_fmt == AV_PIX_FMT_BGR565BE || + pix_fmt == AV_PIX_FMT_BGR565LE || + pix_fmt == AV_PIX_FMT_BGR555BE || + pix_fmt == AV_PIX_FMT_BGR555LE || + pix_fmt == AV_PIX_FMT_BGR444BE || + pix_fmt == AV_PIX_FMT_BGR444LE || + pix_fmt == AV_PIX_FMT_BGR8 || + pix_fmt == AV_PIX_FMT_BGR4 || + pix_fmt == AV_PIX_FMT_BGR4_BYTE || + pix_fmt == AV_PIX_FMT_BGRA64BE || + pix_fmt == AV_PIX_FMT_BGRA64LE || + pix_fmt == AV_PIX_FMT_MONOBLACK || + pix_fmt == AV_PIX_FMT_MONOWHITE; +} + +static av_always_inline int isBayer(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER); +} + +static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return (desc->flags & AV_PIX_FMT_FLAG_RGB) || + pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE; +} + +static av_always_inline int isFloat(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->flags & AV_PIX_FMT_FLAG_FLOAT; +} + +static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + if (pix_fmt == AV_PIX_FMT_PAL8) + return 1; + return desc->flags & AV_PIX_FMT_FLAG_ALPHA; +} + +static av_always_inline int isPacked(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return (desc->nb_components >= 2 && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR)) || + pix_fmt == AV_PIX_FMT_PAL8 || + pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE; +} + +static av_always_inline int isPlanar(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return (desc->nb_components >= 2 && (desc->flags & AV_PIX_FMT_FLAG_PLANAR)); +} + +static av_always_inline int isPackedRGB(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return ((desc->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) == AV_PIX_FMT_FLAG_RGB); +} + +static av_always_inline int isPlanarRGB(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return ((desc->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) == + (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)); +} + +static av_always_inline int usePal(enum AVPixelFormat pix_fmt) +{ + switch (pix_fmt) { + case AV_PIX_FMT_PAL8: + case AV_PIX_FMT_BGR4_BYTE: + case AV_PIX_FMT_BGR8: + case AV_PIX_FMT_GRAY8: + case AV_PIX_FMT_RGB4_BYTE: + case AV_PIX_FMT_RGB8: + return 1; + default: + return 0; + } +} + +extern const uint64_t ff_dither4[2]; +extern const uint64_t ff_dither8[2]; + +extern const uint8_t ff_dither_2x2_4[3][8]; +extern const uint8_t ff_dither_2x2_8[3][8]; +extern const uint8_t ff_dither_4x4_16[5][8]; +extern const uint8_t ff_dither_8x8_32[9][8]; +extern const uint8_t ff_dither_8x8_73[9][8]; +extern const uint8_t ff_dither_8x8_128[9][8]; +extern const uint8_t ff_dither_8x8_220[9][8]; + +extern const int32_t ff_yuv2rgb_coeffs[11][4]; + +extern const AVClass ff_sws_context_class; + +/** + * Set c->swscale to an unscaled converter if one exists for the specific + * source and destination formats, bit depths, flags, etc. + */ +void ff_get_unscaled_swscale(SwsContext *c); +void ff_get_unscaled_swscale_ppc(SwsContext *c); +void ff_get_unscaled_swscale_arm(SwsContext *c); +void ff_get_unscaled_swscale_aarch64(SwsContext *c); + +/** + * Return function pointer to fastest main scaler path function depending + * on architecture and available optimizations. + */ +SwsFunc ff_getSwsFunc(SwsContext *c); + +void ff_sws_init_input_funcs(SwsContext *c); +void ff_sws_init_output_funcs(SwsContext *c, + yuv2planar1_fn *yuv2plane1, + yuv2planarX_fn *yuv2planeX, + yuv2interleavedX_fn *yuv2nv12cX, + yuv2packed1_fn *yuv2packed1, + yuv2packed2_fn *yuv2packed2, + yuv2packedX_fn *yuv2packedX, + yuv2anyX_fn *yuv2anyX); +void ff_sws_init_swscale_ppc(SwsContext *c); +void ff_sws_init_swscale_vsx(SwsContext *c); +void ff_sws_init_swscale_x86(SwsContext *c); +void ff_sws_init_swscale_aarch64(SwsContext *c); +void ff_sws_init_swscale_arm(SwsContext *c); + +void ff_hyscale_fast_c(SwsContext *c, int16_t *dst, int dstWidth, + const uint8_t *src, int srcW, int xInc); +void ff_hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2, + int dstWidth, const uint8_t *src1, + const uint8_t *src2, int srcW, int xInc); +int ff_init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode, + int16_t *filter, int32_t *filterPos, + int numSplits); +void ff_hyscale_fast_mmxext(SwsContext *c, int16_t *dst, + int dstWidth, const uint8_t *src, + int srcW, int xInc); +void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2, + int dstWidth, const uint8_t *src1, + const uint8_t *src2, int srcW, int xInc); + +/** + * Allocate and return an SwsContext. + * This is like sws_getContext() but does not perform the init step, allowing + * the user to set additional AVOptions. + * + * @see sws_getContext() + */ +struct SwsContext *sws_alloc_set_opts(int srcW, int srcH, enum AVPixelFormat srcFormat, + int dstW, int dstH, enum AVPixelFormat dstFormat, + int flags, const double *param); + +int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[], + int srcStride[], int srcSliceY, int srcSliceH, + uint8_t *dst[], int dstStride[]); + +static inline void fillPlane16(uint8_t *plane, int stride, int width, int height, int y, + int alpha, int bits, const int big_endian) +{ + int i, j; + uint8_t *ptr = plane + stride * y; + int v = alpha ? 0xFFFF>>(16-bits) : (1<<(bits-1)); + for (i = 0; i < height; i++) { +#define FILL(wfunc) \ + for (j = 0; j < width; j++) {\ + wfunc(ptr+2*j, v);\ + } + if (big_endian) { + FILL(AV_WB16); + } else { + FILL(AV_WL16); + } + ptr += stride; + } +#undef FILL +} + +static inline void fillPlane32(uint8_t *plane, int stride, int width, int height, int y, + int alpha, int bits, const int big_endian, int is_float) +{ + int i, j; + uint8_t *ptr = plane + stride * y; + uint32_t v; + uint32_t onef32 = 0x3f800000; + if (is_float) + v = alpha ? onef32 : 0; + else + v = alpha ? 0xFFFFFFFF>>(32-bits) : (1<<(bits-1)); + + for (i = 0; i < height; i++) { +#define FILL(wfunc) \ + for (j = 0; j < width; j++) {\ + wfunc(ptr+4*j, v);\ + } + if (big_endian) { + FILL(AV_WB32); + } else { + FILL(AV_WL32); + } + ptr += stride; + } +#undef FILL +} + + +#define MAX_SLICE_PLANES 4 + +/// Slice plane +typedef struct SwsPlane +{ + int available_lines; ///< max number of lines that can be hold by this plane + int sliceY; ///< index of first line + int sliceH; ///< number of lines + uint8_t **line; ///< line buffer + uint8_t **tmp; ///< Tmp line buffer used by mmx code +} SwsPlane; + +/** + * Struct which defines a slice of an image to be scaled or an output for + * a scaled slice. + * A slice can also be used as intermediate ring buffer for scaling steps. + */ +typedef struct SwsSlice +{ + int width; ///< Slice line width + int h_chr_sub_sample; ///< horizontal chroma subsampling factor + int v_chr_sub_sample; ///< vertical chroma subsampling factor + int is_ring; ///< flag to identify if this slice is a ring buffer + int should_free_lines; ///< flag to identify if there are dynamic allocated lines + enum AVPixelFormat fmt; ///< planes pixel format + SwsPlane plane[MAX_SLICE_PLANES]; ///< color planes +} SwsSlice; + +/** + * Struct which holds all necessary data for processing a slice. + * A processing step can be a color conversion or horizontal/vertical scaling. + */ +typedef struct SwsFilterDescriptor +{ + SwsSlice *src; ///< Source slice + SwsSlice *dst; ///< Output slice + + int alpha; ///< Flag for processing alpha channel + void *instance; ///< Filter instance data + + /// Function for processing input slice sliceH lines starting from line sliceY + int (*process)(SwsContext *c, struct SwsFilterDescriptor *desc, int sliceY, int sliceH); +} SwsFilterDescriptor; + +// warp input lines in the form (src + width*i + j) to slice format (line[i][j]) +// relative=true means first line src[x][0] otherwise first line is src[x][lum/crh Y] +int ff_init_slice_from_src(SwsSlice * s, uint8_t *src[4], int stride[4], int srcW, int lumY, int lumH, int chrY, int chrH, int relative); + +// Initialize scaler filter descriptor chain +int ff_init_filters(SwsContext *c); + +// Free all filter data +int ff_free_filters(SwsContext *c); + +/* + function for applying ring buffer logic into slice s + It checks if the slice can hold more @lum lines, if yes + do nothing otherwise remove @lum least used lines. + It applies the same procedure for @chr lines. +*/ +int ff_rotate_slice(SwsSlice *s, int lum, int chr); + +/// initializes gamma conversion descriptor +int ff_init_gamma_convert(SwsFilterDescriptor *desc, SwsSlice * src, uint16_t *table); + +/// initializes lum pixel format conversion descriptor +int ff_init_desc_fmt_convert(SwsFilterDescriptor *desc, SwsSlice * src, SwsSlice *dst, uint32_t *pal); + +/// initializes lum horizontal scaling descriptor +int ff_init_desc_hscale(SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint16_t *filter, int * filter_pos, int filter_size, int xInc); + +/// initializes chr pixel format conversion descriptor +int ff_init_desc_cfmt_convert(SwsFilterDescriptor *desc, SwsSlice * src, SwsSlice *dst, uint32_t *pal); + +/// initializes chr horizontal scaling descriptor +int ff_init_desc_chscale(SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst, uint16_t *filter, int * filter_pos, int filter_size, int xInc); + +int ff_init_desc_no_chr(SwsFilterDescriptor *desc, SwsSlice * src, SwsSlice *dst); + +/// initializes vertical scaling descriptors +int ff_init_vscale(SwsContext *c, SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst); + +/// setup vertical scaler functions +void ff_init_vscale_pfn(SwsContext *c, yuv2planar1_fn yuv2plane1, yuv2planarX_fn yuv2planeX, + yuv2interleavedX_fn yuv2nv12cX, yuv2packed1_fn yuv2packed1, yuv2packed2_fn yuv2packed2, + yuv2packedX_fn yuv2packedX, yuv2anyX_fn yuv2anyX, int use_mmx); + +//number of extra lines to process +#define MAX_LINES_AHEAD 4 + +#endif /* SWSCALE_SWSCALE_INTERNAL_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/version.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/version.h new file mode 100644 index 00000000..3aec51f1 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/libswscale/version.h @@ -0,0 +1,53 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SWSCALE_VERSION_H +#define SWSCALE_VERSION_H + +/** + * @file + * swscale version macros + */ + +#include "libavutil/version.h" + +#define LIBSWSCALE_VERSION_MAJOR 5 +#define LIBSWSCALE_VERSION_MINOR 7 +#define LIBSWSCALE_VERSION_MICRO 100 + +#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ + LIBSWSCALE_VERSION_MINOR, \ + LIBSWSCALE_VERSION_MICRO) +#define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \ + LIBSWSCALE_VERSION_MINOR, \ + LIBSWSCALE_VERSION_MICRO) +#define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT + +#define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + */ + +#ifndef FF_API_SWS_VECTOR +#define FF_API_SWS_VECTOR (LIBSWSCALE_VERSION_MAJOR < 6) +#endif + +#endif /* SWSCALE_VERSION_H */ diff --git a/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/tests/checkasm/checkasm.h b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/tests/checkasm/checkasm.h new file mode 100644 index 00000000..0190bc91 --- /dev/null +++ b/Thirdparty/ffmpeg/ffmpeg-4.3.2/arm64/release/include/tests/checkasm/checkasm.h @@ -0,0 +1,282 @@ +/* + * Assembly testing and benchmarking tool + * Copyright (c) 2015 Henrik Gramner + * Copyright (c) 2008 Loren Merritt + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with FFmpeg; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef TESTS_CHECKASM_CHECKASM_H +#define TESTS_CHECKASM_CHECKASM_H + +#include +#include "config.h" + +#if CONFIG_LINUX_PERF +#include // read(3) +#include +#include +#include +#endif + +#include "libavutil/avstring.h" +#include "libavutil/cpu.h" +#include "libavutil/internal.h" +#include "libavutil/lfg.h" +#include "libavutil/timer.h" + +void checkasm_check_aacpsdsp(void); +void checkasm_check_afir(void); +void checkasm_check_alacdsp(void); +void checkasm_check_audiodsp(void); +void checkasm_check_blend(void); +void checkasm_check_blockdsp(void); +void checkasm_check_bswapdsp(void); +void checkasm_check_colorspace(void); +void checkasm_check_exrdsp(void); +void checkasm_check_fixed_dsp(void); +void checkasm_check_flacdsp(void); +void checkasm_check_float_dsp(void); +void checkasm_check_fmtconvert(void); +void checkasm_check_g722dsp(void); +void checkasm_check_h264dsp(void); +void checkasm_check_h264pred(void); +void checkasm_check_h264qpel(void); +void checkasm_check_hevc_add_res(void); +void checkasm_check_hevc_idct(void); +void checkasm_check_hevc_sao(void); +void checkasm_check_huffyuvdsp(void); +void checkasm_check_jpeg2000dsp(void); +void checkasm_check_llviddsp(void); +void checkasm_check_llviddspenc(void); +void checkasm_check_nlmeans(void); +void checkasm_check_opusdsp(void); +void checkasm_check_pixblockdsp(void); +void checkasm_check_sbrdsp(void); +void checkasm_check_synth_filter(void); +void checkasm_check_sw_rgb(void); +void checkasm_check_sw_scale(void); +void checkasm_check_utvideodsp(void); +void checkasm_check_v210dec(void); +void checkasm_check_v210enc(void); +void checkasm_check_vf_eq(void); +void checkasm_check_vf_gblur(void); +void checkasm_check_vf_hflip(void); +void checkasm_check_vf_threshold(void); +void checkasm_check_vp8dsp(void); +void checkasm_check_vp9dsp(void); +void checkasm_check_videodsp(void); + +struct CheckasmPerf; + +void *checkasm_check_func(void *func, const char *name, ...) av_printf_format(2, 3); +int checkasm_bench_func(void); +void checkasm_fail_func(const char *msg, ...) av_printf_format(1, 2); +struct CheckasmPerf *checkasm_get_perf_context(void); +void checkasm_report(const char *name, ...) av_printf_format(1, 2); + +/* float compare utilities */ +int float_near_ulp(float a, float b, unsigned max_ulp); +int float_near_abs_eps(float a, float b, float eps); +int float_near_abs_eps_ulp(float a, float b, float eps, unsigned max_ulp); +int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp, + unsigned len); +int float_near_abs_eps_array(const float *a, const float *b, float eps, + unsigned len); +int float_near_abs_eps_array_ulp(const float *a, const float *b, float eps, + unsigned max_ulp, unsigned len); +int double_near_abs_eps(double a, double b, double eps); +int double_near_abs_eps_array(const double *a, const double *b, double eps, + unsigned len); + +extern AVLFG checkasm_lfg; +#define rnd() av_lfg_get(&checkasm_lfg) + +static av_unused void *func_ref, *func_new; + +#define BENCH_RUNS 1000 /* Trade-off between accuracy and speed */ + +/* Decide whether or not the specified function needs to be tested */ +#define check_func(func, ...) (func_ref = checkasm_check_func((func_new = func), __VA_ARGS__)) + +/* Declare the function prototype. The first argument is the return value, the remaining + * arguments are the function parameters. Naming parameters is optional. */ +#define declare_func(ret, ...) declare_new(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__) +#define declare_func_float(ret, ...) declare_new_float(ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__) +#define declare_func_emms(cpu_flags, ret, ...) declare_new_emms(cpu_flags, ret, __VA_ARGS__) typedef ret func_type(__VA_ARGS__) + +/* Indicate that the current test has failed */ +#define fail() checkasm_fail_func("%s:%d", av_basename(__FILE__), __LINE__) + +/* Print the test outcome */ +#define report checkasm_report + +/* Call the reference function */ +#define call_ref(...) ((func_type *)func_ref)(__VA_ARGS__) + +#if ARCH_X86 && HAVE_X86ASM +/* Verifies that clobbered callee-saved registers are properly saved and restored + * and that either no MMX registers are touched or emms is issued */ +void checkasm_checked_call(void *func, ...); +/* Verifies that clobbered callee-saved registers are properly saved and restored + * and issues emms for asm functions which are not required to do so */ +void checkasm_checked_call_emms(void *func, ...); +/* Verifies that clobbered callee-saved registers are properly saved and restored + * but doesn't issue emms. Meant for dsp functions returning float or double */ +void checkasm_checked_call_float(void *func, ...); + +#if ARCH_X86_64 +/* Evil hack: detect incorrect assumptions that 32-bit ints are zero-extended to 64-bit. + * This is done by clobbering the stack with junk around the stack pointer and calling the + * assembly function through checked_call() with added dummy arguments which forces all + * real arguments to be passed on the stack and not in registers. For 32-bit arguments the + * upper half of the 64-bit register locations on the stack will now contain junk which will + * cause misbehaving functions to either produce incorrect output or segfault. Note that + * even though this works extremely well in practice, it's technically not guaranteed + * and false negatives is theoretically possible, but there can never be any false positives. + */ +void checkasm_stack_clobber(uint64_t clobber, ...); +#define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, __VA_ARGS__)\ + = (void *)checkasm_checked_call; +#define declare_new_float(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, __VA_ARGS__)\ + = (void *)checkasm_checked_call_float; +#define declare_new_emms(cpu_flags, ret, ...) \ + ret (*checked_call)(void *, int, int, int, int, int, __VA_ARGS__) = \ + ((cpu_flags) & av_get_cpu_flags()) ? (void *)checkasm_checked_call_emms : \ + (void *)checkasm_checked_call; +#define CLOB (UINT64_C(0xdeadbeefdeadbeef)) +#define call_new(...) (checkasm_stack_clobber(CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,\ + CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ + checked_call(func_new, 0, 0, 0, 0, 0, __VA_ARGS__)) +#elif ARCH_X86_32 +#define declare_new(ret, ...) ret (*checked_call)(void *, __VA_ARGS__) = (void *)checkasm_checked_call; +#define declare_new_float(ret, ...) ret (*checked_call)(void *, __VA_ARGS__) = (void *)checkasm_checked_call_float; +#define declare_new_emms(cpu_flags, ret, ...) ret (*checked_call)(void *, __VA_ARGS__) = \ + ((cpu_flags) & av_get_cpu_flags()) ? (void *)checkasm_checked_call_emms : \ + (void *)checkasm_checked_call; +#define call_new(...) checked_call(func_new, __VA_ARGS__) +#endif +#elif ARCH_ARM && HAVE_ARMV5TE_EXTERNAL +/* Use a dummy argument, to offset the real parameters by 2, not only 1. + * This makes sure that potential 8-byte-alignment of parameters is kept the same + * even when the extra parameters have been removed. */ +void checkasm_checked_call_vfp(void *func, int dummy, ...); +void checkasm_checked_call_novfp(void *func, int dummy, ...); +extern void (*checkasm_checked_call)(void *func, int dummy, ...); +#define declare_new(ret, ...) ret (*checked_call)(void *, int dummy, __VA_ARGS__, \ + int, int, int, int, int, int, int, int, \ + int, int, int, int, int, int, int) = (void *)checkasm_checked_call; +#define call_new(...) checked_call(func_new, 0, __VA_ARGS__, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0) +#elif ARCH_AARCH64 && !defined(__APPLE__) +void checkasm_stack_clobber(uint64_t clobber, ...); +void checkasm_checked_call(void *func, ...); +#define declare_new(ret, ...) ret (*checked_call)(void *, int, int, int, int, int, int, int, __VA_ARGS__,\ + int, int, int, int, int, int, int, int,\ + int, int, int, int, int, int, int)\ + = (void *)checkasm_checked_call; +#define CLOB (UINT64_C(0xdeadbeefdeadbeef)) +#define call_new(...) (checkasm_stack_clobber(CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,\ + CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB,CLOB),\ + checked_call(func_new, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__,\ + 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0)) +#else +#define declare_new(ret, ...) +#define declare_new_float(ret, ...) +#define declare_new_emms(cpu_flags, ret, ...) +/* Call the function */ +#define call_new(...) ((func_type *)func_new)(__VA_ARGS__) +#endif + +#ifndef declare_new_emms +#define declare_new_emms(cpu_flags, ret, ...) declare_new(ret, __VA_ARGS__) +#endif +#ifndef declare_new_float +#define declare_new_float(ret, ...) declare_new(ret, __VA_ARGS__) +#endif + +typedef struct CheckasmPerf { + int sysfd; + uint64_t cycles; + int iterations; +} CheckasmPerf; + +#if defined(AV_READ_TIME) || CONFIG_LINUX_PERF + +#if CONFIG_LINUX_PERF +#define PERF_START(t) do { \ + ioctl(sysfd, PERF_EVENT_IOC_RESET, 0); \ + ioctl(sysfd, PERF_EVENT_IOC_ENABLE, 0); \ +} while (0) +#define PERF_STOP(t) do { \ + ioctl(sysfd, PERF_EVENT_IOC_DISABLE, 0); \ + read(sysfd, &t, sizeof(t)); \ +} while (0) +#else +#define PERF_START(t) t = AV_READ_TIME() +#define PERF_STOP(t) t = AV_READ_TIME() - t +#endif + +/* Benchmark the function */ +#define bench_new(...)\ + do {\ + if (checkasm_bench_func()) {\ + struct CheckasmPerf *perf = checkasm_get_perf_context();\ + av_unused const int sysfd = perf->sysfd;\ + func_type *tfunc = func_new;\ + uint64_t tsum = 0;\ + int ti, tcount = 0;\ + uint64_t t = 0; \ + for (ti = 0; ti < BENCH_RUNS; ti++) {\ + PERF_START(t);\ + tfunc(__VA_ARGS__);\ + tfunc(__VA_ARGS__);\ + tfunc(__VA_ARGS__);\ + tfunc(__VA_ARGS__);\ + PERF_STOP(t);\ + if (t*tcount <= tsum*4 && ti > 0) {\ + tsum += t;\ + tcount++;\ + }\ + }\ + emms_c();\ + perf->cycles += t;\ + perf->iterations++;\ + }\ + } while (0) +#else +#define bench_new(...) while(0) +#define PERF_START(t) while(0) +#define PERF_STOP(t) while(0) +#endif + +#define DECL_CHECKASM_CHECK_FUNC(type) \ +int checkasm_check_##type(const char *const file, const int line, \ + const type *const buf1, const ptrdiff_t stride1, \ + const type *const buf2, const ptrdiff_t stride2, \ + const int w, const int h, const char *const name) + +DECL_CHECKASM_CHECK_FUNC(uint8_t); +DECL_CHECKASM_CHECK_FUNC(uint16_t); +DECL_CHECKASM_CHECK_FUNC(int16_t); +DECL_CHECKASM_CHECK_FUNC(int32_t); + +#define PASTE(a,b) a ## b +#define CONCAT(a,b) PASTE(a,b) + +#define checkasm_check(prefix, ...) CONCAT(checkasm_check_, prefix)(__FILE__, __LINE__, __VA_ARGS__) + +#endif /* TESTS_CHECKASM_CHECKASM_H */ diff --git a/amf/doc/AMF_API_Reference.pdf b/amf/doc/AMF_API_Reference.pdf index 762104d4..b4647800 100644 Binary files a/amf/doc/AMF_API_Reference.pdf and b/amf/doc/AMF_API_Reference.pdf differ diff --git a/amf/doc/AMF_Video_Encode_AV1_API.pdf b/amf/doc/AMF_Video_Encode_AV1_API.pdf new file mode 100644 index 00000000..e0abd2a0 Binary files /dev/null and b/amf/doc/AMF_Video_Encode_AV1_API.pdf differ diff --git a/amf/doc/AMF_Video_Encode_HEVC_API.pdf b/amf/doc/AMF_Video_Encode_HEVC_API.pdf index dadee1e2..08188219 100644 Binary files a/amf/doc/AMF_Video_Encode_HEVC_API.pdf and b/amf/doc/AMF_Video_Encode_HEVC_API.pdf differ diff --git a/amf/doc/AMF_Video_PreAnalysis_API.pdf b/amf/doc/AMF_Video_PreAnalysis_API.pdf index 64430b23..c0dfb03a 100644 Binary files a/amf/doc/AMF_Video_PreAnalysis_API.pdf and b/amf/doc/AMF_Video_PreAnalysis_API.pdf differ diff --git a/amf/doc/README.md b/amf/doc/README.md index 24a86e6d..e3ddccf5 100644 --- a/amf/doc/README.md +++ b/amf/doc/README.md @@ -16,7 +16,7 @@ AMF is a light-weight, portable multimedia framework that abstracts away most of * Linux * RHEL 8.4 / 7.9 * CentOS 8.4 / 7.9 - * Ubuntu 20.04.2 / 18.04.5 HWE + * Ubuntu 22.04 / 20.04.2 * SLED/SLES 15 SP3 * Driver and AMF component installation instructions are available on the [Wiki page](https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki). * The following table contains the driver versions in which the Linux pro driver started including the AMF runtime, otherwise, the AMF runtime is optional and has to be installed separately. @@ -24,12 +24,12 @@ AMF is a light-weight, portable multimedia framework that abstracts away most of | OS | AMF included starting version: | | ------------- |:-------------: | - | Ubuntu 18.04.1 | 18.30 | | SLE 15 | 18.40 | | Ubuntu 20.04.0 | 20.20 | | \**All supported distros* | 20.40 | * AMF SDK is backward compatible with all previous driver versions. +* Version 1.4.28: AMD Radeon Software Adrenalin Edition 22.12.1 (22.40.00.24) or newer. Added AV1 encoding support and 12-bit AV1 decoding. New VQEnhancer component. New AVC / HEVC encoder rate control methods. * Version 1.4.26: AMD Radeon Software Adrenalin Edition 22.7.1 (22.20.15.01) or newer. Added new PAQ, TAQ, and high motion quality boost modes for PreAnalysis. New HQScaler sharpness, low latency decoder and temporal SVC encoder options. * Version 1.4.24: AMD Radeon Software Adrenalin Edition 22.3.1 (21.50.02.01) or newer. Added new AMD Direct Capture mode, new HQScaler feature(Bilinear/Bicubic/FSR), new Vulkan HEVC encoder on Navi family, improvements on H264 Vulkan encoding. * Version 1.4.23: AMD Radeon Software Adrenalin Edition 21.12.1 (21.40.11.03) or newer. Added new Auto LTR encoder mode, additional encoder usage presets and encoder statistics/feedback. diff --git a/amf/doc/Readme.txt b/amf/doc/Readme.txt index b3ac5e67..51e749cc 100644 --- a/amf/doc/Readme.txt +++ b/amf/doc/Readme.txt @@ -30,6 +30,13 @@ New features are available in Driver: Radeon Software Adrenalin 2019 Edition; 19.7.1 Software: 19.30 and later +1.4.28.0 (13.12.2022) version +-------------------------- + - Added AV1 encoding support + - Added 12-bit AV1 decoding + - New VQEnhancer component + - New AVC / HEVC encoder rate control methods + 1.4.26.0 (26.07.2022) version -------------------------- - New perceptual (PAQ) and temporal (TAQ) adaptive quantization modes for PreAnalysis diff --git a/amf/public/common/ByteArray.h b/amf/public/common/ByteArray.h index b841ac77..766f2d81 100644 --- a/amf/public/common/ByteArray.h +++ b/amf/public/common/ByteArray.h @@ -38,6 +38,7 @@ #pragma once #include "../include/core/Platform.h" #define INIT_ARRAY_SIZE 1024 +#define ARRAY_MAX_SIZE (1LL << 60LL) // extremely large maximum size //------------------------------------------------------------------------ class AMFByteArray { @@ -76,7 +77,16 @@ class AMFByteArray } else if (num > m_iMaxSize) { - m_iMaxSize = (num / INIT_ARRAY_SIZE) * INIT_ARRAY_SIZE + INIT_ARRAY_SIZE; + // This is done to prevent the following error from surfacing + // for the pNewData allocation on some compilers: + // -Werror=alloc-size-larger-than= + amf_size newSize = (num / INIT_ARRAY_SIZE) * INIT_ARRAY_SIZE + INIT_ARRAY_SIZE; + if (newSize > ARRAY_MAX_SIZE) + { + return; + } + m_iMaxSize = newSize; + amf_uint8 *pNewData = new amf_uint8[m_iMaxSize]; memset(pNewData, 0, m_iMaxSize); if (m_pData != NULL) diff --git a/amf/public/common/Linux/CairoImportTable.cpp b/amf/public/common/Linux/CairoImportTable.cpp new file mode 100644 index 00000000..2f45dc2b --- /dev/null +++ b/amf/public/common/Linux/CairoImportTable.cpp @@ -0,0 +1,90 @@ +// +// Notice Regarding Standards. AMD does not provide a license or sublicense to +// any Intellectual Property Rights relating to any standards, including but not +// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; +// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 +// (collectively, the "Media Technologies"). For clarity, you will pay any +// royalties due for such third party technologies, which may include the Media +// Technologies that are owed as a result of AMD providing the Software to you. +// +// MIT license +// +// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +///------------------------------------------------------------------------- +/// @file PulseAudioImprotTable.cpp +/// @brief pulseaudio import table +///------------------------------------------------------------------------- +#include "CairoImportTable.h" +#include "public/common/TraceAdapter.h" +#include "../Thread.h" + +using namespace amf; + +#define GET_SO_ENTRYPOINT(m, h, f) m = reinterpret_cast(amf_get_proc_address(h, #f)); \ + AMF_RETURN_IF_FALSE(nullptr != m, AMF_FAIL, L"Failed to acquire entrypoint %S", #f); + +//------------------------------------------------------------------------------------------------- +CairoImportTable::CairoImportTable() +{} + +//------------------------------------------------------------------------------------------------- +CairoImportTable::~CairoImportTable() +{ + UnloadFunctionsTable(); +} + +//------------------------------------------------------------------------------------------------- +AMF_RESULT CairoImportTable::LoadFunctionsTable() +{ + if (nullptr == m_hLibCairoSO) + { + m_hLibCairoSO = amf_load_library(L"libcairo.so.2"); + AMF_RETURN_IF_FALSE(nullptr != m_hLibCairoSO, AMF_FAIL, L"Failed to load libcairo.so.2"); + } + + GET_SO_ENTRYPOINT(m_cairo_image_surface_create_from_png_stream, m_hLibCairoSO, cairo_image_surface_create_from_png_stream); + GET_SO_ENTRYPOINT(m_cairo_surface_destroy, m_hLibCairoSO, cairo_surface_destroy); + GET_SO_ENTRYPOINT(m_cairo_image_surface_get_width, m_hLibCairoSO, cairo_image_surface_get_width); + GET_SO_ENTRYPOINT(m_cairo_image_surface_get_height, m_hLibCairoSO, cairo_image_surface_get_height); + GET_SO_ENTRYPOINT(m_cairo_image_surface_get_stride, m_hLibCairoSO, cairo_image_surface_get_stride); + GET_SO_ENTRYPOINT(m_cairo_image_surface_get_format, m_hLibCairoSO, cairo_image_surface_get_format); + GET_SO_ENTRYPOINT(m_cairo_image_surface_get_data, m_hLibCairoSO, cairo_image_surface_get_data); + + return AMF_OK; +} + +void CairoImportTable::UnloadFunctionsTable() +{ + if (nullptr != m_hLibCairoSO) + { + amf_free_library(m_hLibCairoSO); + m_hLibCairoSO = nullptr; + } + + m_cairo_image_surface_create_from_png_stream = nullptr; + m_cairo_surface_destroy = nullptr; + m_cairo_image_surface_get_width = nullptr; + m_cairo_image_surface_get_height = nullptr; + m_cairo_image_surface_get_stride = nullptr; + m_cairo_image_surface_get_format = nullptr; + m_cairo_image_surface_get_data = nullptr; +} \ No newline at end of file diff --git a/amf/public/common/Linux/CairoImportTable.h b/amf/public/common/Linux/CairoImportTable.h new file mode 100644 index 00000000..b9182572 --- /dev/null +++ b/amf/public/common/Linux/CairoImportTable.h @@ -0,0 +1,63 @@ +// +// Notice Regarding Standards. AMD does not provide a license or sublicense to +// any Intellectual Property Rights relating to any standards, including but not +// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; +// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 +// (collectively, the "Media Technologies"). For clarity, you will pay any +// royalties due for such third party technologies, which may include the Media +// Technologies that are owed as a result of AMD providing the Software to you. +// +// MIT license +// +// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +///------------------------------------------------------------------------- +/// @file CairoImportTable.h +/// @brief Cairo import table +///------------------------------------------------------------------------- +#pragma once + +#include "../../include/core/Result.h" + +#include +#include + +struct CairoImportTable{ + + CairoImportTable(); + ~CairoImportTable(); + + AMF_RESULT LoadFunctionsTable(); + void UnloadFunctionsTable(); + + decltype(&cairo_image_surface_create_from_png_stream) m_cairo_image_surface_create_from_png_stream = nullptr; + decltype(&cairo_surface_destroy) m_cairo_surface_destroy = nullptr; + decltype(&cairo_image_surface_get_width) m_cairo_image_surface_get_width = nullptr; + decltype(&cairo_image_surface_get_height) m_cairo_image_surface_get_height = nullptr; + decltype(&cairo_image_surface_get_stride) m_cairo_image_surface_get_stride = nullptr; + decltype(&cairo_image_surface_get_format) m_cairo_image_surface_get_format = nullptr; + decltype(&cairo_image_surface_get_data) m_cairo_image_surface_get_data = nullptr; + + amf_handle m_hLibCairoSO = nullptr; + +}; + +typedef std::shared_ptr CairoImportTablePtr; \ No newline at end of file diff --git a/amf/public/include/components/Component.h b/amf/public/include/components/Component.h index 2cd9fa5e..5293b8f4 100644 --- a/amf/public/include/components/Component.h +++ b/amf/public/include/components/Component.h @@ -414,6 +414,7 @@ typedef enum AMF_STREAM_CODEC_ID_ENUM // matched codecs from VideoDecoxcderU AMF_STREAM_CODEC_ID_VP9 = 11, // AMFVideoDecoderHW_VP9 AMF_STREAM_CODEC_ID_VP9_10BIT = 12, // AMFVideoDecoderHW_VP9_10BIT AMF_STREAM_CODEC_ID_AV1 = 13, // AMFVideoDecoderHW_AV1 + AMF_STREAM_CODEC_ID_AV1_12BIT = 14, // AMFVideoDecoderHW_AV1_12BIT } AMF_STREAM_CODEC_ID_ENUM; // common stream properties diff --git a/amf/public/include/components/CursorCapture.h b/amf/public/include/components/CursorCapture.h index 8b071c99..e21c1690 100644 --- a/amf/public/include/components/CursorCapture.h +++ b/amf/public/include/components/CursorCapture.h @@ -43,6 +43,7 @@ namespace amf class AMFCursorCapture : public AMFInterface { public: + AMF_DECLARE_IID(0x166efa1a, 0x19b8, 0x42f2, 0x86, 0x0f, 0x56, 0x69, 0xca, 0x7a, 0x85, 0x4c) virtual AMF_RESULT AMF_STD_CALL AcquireCursor(amf::AMFSurface** pSurface) = 0; virtual AMF_RESULT AMF_STD_CALL Reset() = 0; }; diff --git a/amf/public/include/components/HQScaler.h b/amf/public/include/components/HQScaler.h index 6074ead4..0c38f083 100644 --- a/amf/public/include/components/HQScaler.h +++ b/amf/public/include/components/HQScaler.h @@ -44,6 +44,7 @@ enum AMF_HQ_SCALER_ALGORITHM_ENUM AMF_HQ_SCALER_ALGORITHM_BILINEAR = 0, AMF_HQ_SCALER_ALGORITHM_BICUBIC = 1, AMF_HQ_SCALER_ALGORITHM_FSR = 2, + AMF_HQ_SCALER_ALGORITHM_POINT = 3, }; diff --git a/amf/public/include/components/PreAnalysis.h b/amf/public/include/components/PreAnalysis.h index 2e64b28b..51e8da66 100644 --- a/amf/public/include/components/PreAnalysis.h +++ b/amf/public/include/components/PreAnalysis.h @@ -80,7 +80,8 @@ enum AMF_PA_PAQ_MODE_ENUM enum AMF_PA_TAQ_MODE_ENUM { AMF_PA_TAQ_MODE_NONE = 0, - AMF_PA_TAQ_MODE_1 = 1 + AMF_PA_TAQ_MODE_1 = 1, + AMF_PA_TAQ_MODE_2 = 2 }; enum AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE_ENUM diff --git a/amf/public/include/components/VQEnhancer.h b/amf/public/include/components/VQEnhancer.h new file mode 100644 index 00000000..28c64323 --- /dev/null +++ b/amf/public/include/components/VQEnhancer.h @@ -0,0 +1,47 @@ +// +// Notice Regarding Standards. AMD does not provide a license or sublicense to +// any Intellectual Property Rights relating to any standards, including but not +// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; +// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 +// (collectively, the "Media Technologies"). For clarity, you will pay any +// royalties due for such third party technologies, which may include the Media +// Technologies that are owed as a result of AMD providing the Software to you. +// +// MIT license +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#ifndef AMFVQEnhancer_h +#define AMFVQEnhancer_h + +#pragma once + +#define VE_FCR_DEFAULT_ATTENUATION 0.1 + +#define AMFVQEnhancer L"AMFVQEnhancer" + +#define AMF_VIDEO_ENHANCER_ENGINE_TYPE L"AMF_VIDEI_ENHANCER_ENGINE_TYPE" // AMF_MEMORY_TYPE (DX11, DX12, OPENCL, VULKAN default : DX11)" - determines how the object is initialized and what kernels to use +#define AMF_VIDEO_ENHANCER_OUTPUT_SIZE L"AMF_VIDEO_ENHANCER_OUTPUT_SIZE" // AMFSize +#define AMF_VE_FCR_ATTENUATION L"AMF_VE_FCR_ATTENUATION" // Float in the range of [0.02, 0.4], default : 0.1 +#define AMF_VE_FCR_RADIUS L"AMF_VE_FCR_RADIUS" // int in the range of [1, 4] + +#endif //#ifndef AMFVQEnhancer_h diff --git a/amf/public/include/components/VideoDecoderUVD.h b/amf/public/include/components/VideoDecoderUVD.h index a3f94b5c..eb28c29e 100644 --- a/amf/public/include/components/VideoDecoderUVD.h +++ b/amf/public/include/components/VideoDecoderUVD.h @@ -53,6 +53,7 @@ #define AMFVideoDecoderHW_VP9 L"AMFVideoDecoderHW_VP9" #define AMFVideoDecoderHW_VP9_10BIT L"AMFVideoDecoderHW_VP9_10BIT" #define AMFVideoDecoderHW_AV1 L"AMFVideoDecoderHW_AV1" +#define AMFVideoDecoderHW_AV1_12BIT L"AMFVideoDecoderHW_AV1_12BIT" enum AMF_VIDEO_DECODER_MODE_ENUM { @@ -119,5 +120,4 @@ enum AMF_TIMESTAMP_MODE_ENUM #define AMF_VIDEO_DECODER_NATIVEWINDOW L"AppleNativeWindow" // amf_int64; default = 0; pointer to native window #endif //__APPLE__ - #endif //#ifndef AMF_VideoDecoderUVD_h diff --git a/amf/public/include/components/VideoEncoderAV1.h b/amf/public/include/components/VideoEncoderAV1.h new file mode 100644 index 00000000..81d816be --- /dev/null +++ b/amf/public/include/components/VideoEncoderAV1.h @@ -0,0 +1,292 @@ +// +// Copyright (c) 2021-2022 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +//------------------------------------------------------------------------------------------------- +// VideoEncoderHW_AV1 interface declaration +//------------------------------------------------------------------------------------------------- + +#ifndef AMF_VideoEncoderAV1_h +#define AMF_VideoEncoderAV1_h +#pragma once + +#include "Component.h" +#include "ColorSpace.h" +#include "PreAnalysis.h" + +#define AMFVideoEncoder_AV1 L"AMFVideoEncoderHW_AV1" + +enum AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_NONE = 0, // No encoding latency requirement. Encoder will balance encoding time and power consumption. + AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_POWER_SAVING_REAL_TIME = 1, // Try the best to finish encoding a frame within 1/framerate sec. This mode may cause more power consumption + AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_REAL_TIME = 2, // Try the best to finish encoding a frame within 1/(2 x framerate) sec. This mode will cause more power consumption than POWER_SAVING_REAL_TIME + AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_LOWEST_LATENCY = 3 // Encoding as fast as possible. This mode causes highest power consumption. +}; + +enum AMF_VIDEO_ENCODER_AV1_USAGE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING = 0, + AMF_VIDEO_ENCODER_AV1_USAGE_LOW_LATENCY = 1 +}; + +enum AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN = 1 +}; + +enum AMF_VIDEO_ENCODER_AV1_LEVEL_ENUM +{ + AMF_VIDEO_ENCODER_AV1_LEVEL_2_0 = 0, + AMF_VIDEO_ENCODER_AV1_LEVEL_2_1 = 1, + AMF_VIDEO_ENCODER_AV1_LEVEL_2_2 = 2, + AMF_VIDEO_ENCODER_AV1_LEVEL_2_3 = 3, + AMF_VIDEO_ENCODER_AV1_LEVEL_3_0 = 4, + AMF_VIDEO_ENCODER_AV1_LEVEL_3_1 = 5, + AMF_VIDEO_ENCODER_AV1_LEVEL_3_2 = 6, + AMF_VIDEO_ENCODER_AV1_LEVEL_3_3 = 7, + AMF_VIDEO_ENCODER_AV1_LEVEL_4_0 = 8, + AMF_VIDEO_ENCODER_AV1_LEVEL_4_1 = 9, + AMF_VIDEO_ENCODER_AV1_LEVEL_4_2 = 10, + AMF_VIDEO_ENCODER_AV1_LEVEL_4_3 = 11, + AMF_VIDEO_ENCODER_AV1_LEVEL_5_0 = 12, + AMF_VIDEO_ENCODER_AV1_LEVEL_5_1 = 13, + AMF_VIDEO_ENCODER_AV1_LEVEL_5_2 = 14, + AMF_VIDEO_ENCODER_AV1_LEVEL_5_3 = 15, + AMF_VIDEO_ENCODER_AV1_LEVEL_6_0 = 16, + AMF_VIDEO_ENCODER_AV1_LEVEL_6_1 = 17, + AMF_VIDEO_ENCODER_AV1_LEVEL_6_2 = 18, + AMF_VIDEO_ENCODER_AV1_LEVEL_6_3 = 19, + AMF_VIDEO_ENCODER_AV1_LEVEL_7_0 = 20, + AMF_VIDEO_ENCODER_AV1_LEVEL_7_1 = 21, + AMF_VIDEO_ENCODER_AV1_LEVEL_7_2 = 22, + AMF_VIDEO_ENCODER_AV1_LEVEL_7_3 = 23 +}; + +enum AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_ENUM +{ + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_UNKNOWN = -1, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CONSTANT_QP = 0, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR = 1, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR = 2, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CBR = 3, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_QUALITY_VBR = 4, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR = 5, + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR = 6 +}; + +enum AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY = 1, + AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_1080P_CODED_1082 = 2, + AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS = 3 +}; + +enum AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_NONE = 0, + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_KEY = 1, + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_INTRA_ONLY = 2, + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_SWITCH = 3, + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_SHOW_EXISTING = 4 +}; + +enum AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_KEY = 0, + AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_INTRA_ONLY = 1, + AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_INTER = 2, + AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_SWITCH = 3, + AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_SHOW_EXISTING = 4 +}; + +enum AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_ENUM +{ + AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_HIGH_QUALITY = 0, + AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_QUALITY = 30, + AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_BALANCED = 70, + AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED = 100 +}; + +enum AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_NONE = 0, + AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_GOP_ALIGNED = 1, + AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_KEY_FRAME_ALIGNED = 2 +}; + +enum AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_NONE = 0, + AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_FIXED_INTERVAL = 1 +}; + +enum AMF_VIDEO_ENCODER_AV1_CDEF_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_CDEF_DISABLE = 0, + AMF_VIDEO_ENCODER_AV1_CDEF_ENABLE_DEFAULT = 1 +}; + +enum AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_DISABLE = 0, + AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENABLE_DEFAULT = 1 +}; + +enum AMF_VIDEO_ENCODER_AV1_AQ_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_AQ_MODE_NONE = 0, + AMF_VIDEO_ENCODER_AV1_AQ_MODE_CAQ = 1 // Content adaptive quantization mode +}; + +enum AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM +{ + AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__DISABLED = 0, + AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__GOP_ALIGNED = 1, + AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__CONTINUOUS = 2 +}; + + +// *** Static properties - can be set only before Init() *** + +// Encoder Engine Settings +#define AMF_VIDEO_ENCODER_AV1_ENCODER_INSTANCE_INDEX L"Av1EncoderInstanceIndex" // amf_int64; default = 0; selected HW instance idx. The number of instances is queried by using AMF_VIDEO_ENCODER_AV1_CAP_NUM_OF_HW_INSTANCES +#define AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE L"Av1EncodingLatencyMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_ENUM); default = depends on USAGE; The encoding latency mode. +#define AMF_VIDEO_ENCODER_AV1_QUERY_TIMEOUT L"Av1QueryTimeout" // amf_int64; default = 0 (no wait); timeout for QueryOutput call in ms. + +// Usage Settings +#define AMF_VIDEO_ENCODER_AV1_USAGE L"Av1Usage" // amf_int64(AMF_VIDEO_ENCODER_AV1_USAGE_ENUM); default = N/A; Encoder usage. fully configures parameter set. + +// Session Configuration +#define AMF_VIDEO_ENCODER_AV1_FRAMESIZE L"Av1FrameSize" // AMFSize; default = 0,0; Frame size +#define AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH L"Av1ColorBitDepth" // amf_int64(AMF_COLOR_BIT_DEPTH_ENUM); default = AMF_COLOR_BIT_DEPTH_8 +#define AMF_VIDEO_ENCODER_AV1_PROFILE L"Av1Profile" // amf_int64(AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM) ; default = depends on USAGE; the codec profile of the coded bitstream +#define AMF_VIDEO_ENCODER_AV1_LEVEL L"Av1Level" // amf_int64 (AMF_VIDEO_ENCODER_AV1_LEVEL_ENUM); default = depends on USAGE; the codec level of the coded bitstream +#define AMF_VIDEO_ENCODER_AV1_TILES_PER_FRAME L"Av1NumTilesPerFrame" // amf_int64; default = 1; Number of tiles Per Frame. This is treated as suggestion. The actual number of tiles might be different due to compliance or encoder limitation. +#define AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET L"Av1QualityPreset" // amf_int64(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_ENUM); default = depends on USAGE; Quality Preset + +// Codec Configuration +#define AMF_VIDEO_ENCODER_AV1_SCREEN_CONTENT_TOOLS L"Av1ScreenContentTools" // bool; default = depends on USAGE; If true, allow enabling screen content tools by AMF_VIDEO_ENCODER_AV1_PALETTE_MODE and AMF_VIDEO_ENCODER_AV1_FORCE_INTEGER_MV; if false, all screen content tools are disabled. +#define AMF_VIDEO_ENCODER_AV1_ORDER_HINT L"Av1OrderHint" // bool; default = depends on USAGE; If true, code order hint; if false, don't code order hint +#define AMF_VIDEO_ENCODER_AV1_FRAME_ID L"Av1FrameId" // bool; default = depends on USAGE; If true, code frame id; if false, don't code frame id +#define AMF_VIDEO_ENCODER_AV1_TILE_GROUP_OBU L"Av1TileGroupObu" // bool; default = depends on USAGE; If true, code FrameHeaderObu + TileGroupObu and each TileGroupObu contains one tile; if false, code FrameObu. +#define AMF_VIDEO_ENCODER_AV1_CDEF_MODE L"Av1CdefMode" // amd_int64(AMF_VIDEO_ENCODER_AV1_CDEF_MODE_ENUM); default = depends on USAGE; Cdef mode +#define AMF_VIDEO_ENCODER_AV1_ERROR_RESILIENT_MODE L"Av1ErrorResilientMode" // bool; default = depends on USAGE; If true, enable error resilient mode; if false, disable error resilient mode + +// Rate Control and Quality Enhancement +#define AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD L"Av1RateControlMethod" // amf_int64(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method +#define AMF_VIDEO_ENCODER_AV1_QVBR_QUALITY_LEVEL L"Av1QvbrQualityLevel" // amf_int64; default = 23; QVBR quality level; range = 1-51 +#define AMF_VIDEO_ENCODER_AV1_INITIAL_VBV_BUFFER_FULLNESS L"Av1InitialVBVBufferFullness" // amf_int64; default = depends on USAGE; Initial VBV Buffer Fullness 0=0% 64=100% + +// Alignment Mode Configuration +#define AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE L"Av1AlignmentMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_ENUM); default = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY; Alignment Mode. + +#define AMF_VIDEO_ENCODER_AV1_PRE_ANALYSIS_ENABLE L"Av1EnablePreAnalysis" // bool; default = depends on USAGE; If true, enables the pre-analysis module. Refer to AMF Video PreAnalysis API reference for more details. If false, disable the pre-analysis module. +#define AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_PREENCODE L"Av1RateControlPreEncode" // bool; default = depends on USAGE; If true, enables pre-encode assist in rate control; if false, disables pre-encode assist in rate control. +#define AMF_VIDEO_ENCODER_AV1_HIGH_MOTION_QUALITY_BOOST L"Av1HighMotionQualityBoost" // bool; default = depends on USAGE; If true, enable high motion quality boost mode; if false, disable high motion quality boost mode. +#define AMF_VIDEO_ENCODER_AV1_AQ_MODE L"Av1AQMode" // amd_int64(AMF_VIDEO_ENCODER_AV1_AQ_MODE_ENUM); default = depends on USAGE; AQ mode + +// Picture Management Configuration +#define AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS L"Av1MaxNumOfTemporalLayers" // amf_int64; default = depends on USAGE; Max number of temporal layers might be enabled. The maximum value can be queried from AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_TEMPORAL_LAYERS +#define AMF_VIDEO_ENCODER_AV1_MAX_LTR_FRAMES L"Av1MaxNumLTRFrames" // amf_int64; default = depends on USAGE; Max number of LTR frames. The maximum value can be queried from AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_LTR_FRAMES +#define AMF_VIDEO_ENCODER_AV1_MAX_NUM_REFRAMES L"Av1MaxNumRefFrames" // amf_int64; default = 1; Maximum number of reference frames + +// color conversion +#define AMF_VIDEO_ENCODER_AV1_INPUT_HDR_METADATA L"Av1InHDRMetadata" // AMFBuffer containing AMFHDRMetadata; default NULL + +// Miscellaneous +#define AMF_VIDEO_ENCODER_AV1_EXTRA_DATA L"Av1ExtraData" // AMFInterface* - > AMFBuffer*; buffer to retrieve coded sequence header + + +// *** Dynamic properties - can be set anytime *** + +// Codec Configuration +#define AMF_VIDEO_ENCODER_AV1_PALETTE_MODE L"Av1PaletteMode" // bool; default = depends on USAGE; If true, enable palette mode; if false, disable palette mode. Valid only when AMF_VIDEO_ENCODER_AV1_SCREEN_CONTENT_TOOLS is true. +#define AMF_VIDEO_ENCODER_AV1_FORCE_INTEGER_MV L"Av1ForceIntegerMv" // bool; default = depends on USAGE; If true, enable force integer MV; if false, disable force integer MV. Valid only when AMF_VIDEO_ENCODER_AV1_SCREEN_CONTENT_TOOLS is true. +#define AMF_VIDEO_ENCODER_AV1_CDF_UPDATE L"Av1CdfUpdate" // bool; default = depends on USAGE; If true, enable CDF update; if false, disable CDF update. +#define AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE L"Av1CdfFrameEndUpdateMode" // amd_int64(AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENUM); default = depends on USAGE; CDF frame end update mode + + +// Rate Control and Quality Enhancement +#define AMF_VIDEO_ENCODER_AV1_VBV_BUFFER_SIZE L"Av1VBVBufferSize" // amf_int64; default = depends on USAGE; VBV Buffer Size in bits +#define AMF_VIDEO_ENCODER_AV1_FRAMERATE L"Av1FrameRate" // AMFRate; default = depends on usage; Frame Rate +#define AMF_VIDEO_ENCODER_AV1_ENFORCE_HRD L"Av1EnforceHRD" // bool; default = depends on USAGE; If true, enforce HRD; if false, HRD is not enforced. +#define AMF_VIDEO_ENCODER_AV1_FILLER_DATA L"Av1FillerData" // bool; default = depends on USAGE; If true, code filler data when needed; if false, don't code filler data. +#define AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE L"Av1TargetBitrate" // amf_int64; default = depends on USAGE; Target bit rate in bits +#define AMF_VIDEO_ENCODER_AV1_PEAK_BITRATE L"Av1PeakBitrate" // amf_int64; default = depends on USAGE; Peak bit rate in bits + +#define AMF_VIDEO_ENCODER_AV1_MAX_COMPRESSED_FRAME_SIZE L"Av1MaxCompressedFrameSize" // amf_int64; default = 0; Max compressed frame Size in bits. 0 - no limit +#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTRA L"Av1MinQIndex_Intra" // amf_int64; default = depends on USAGE; Min QIndex for intra frames; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTRA L"Av1MaxQIndex_Intra" // amf_int64; default = depends on USAGE; Max QIndex for intra frames; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTER L"Av1MinQIndex_Inter" // amf_int64; default = depends on USAGE; Min QIndex for inter frames; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTER L"Av1MaxQIndex_Inter" // amf_int64; default = depends on USAGE; Max QIndex for inter frames; range = 0-255 + +#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTRA L"Av1QIndex_Intra" // amf_int64; default = depends on USAGE; intra-frame QIndex; range = 0-255 +#define AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTER L"Av1QIndex_Inter" // amf_int64; default = depends on USAGE; inter-frame QIndex; range = 0-255 + +#define AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_SKIP_FRAME L"Av1RateControlSkipFrameEnable" // bool; default = depends on USAGE; If true, rate control may code skip frame when needed; if false, rate control will not code skip frame. + + +// Picture Management Configuration +#define AMF_VIDEO_ENCODER_AV1_GOP_SIZE L"Av1GOPSize" // amf_int64; default = depends on USAGE; GOP Size (distance between automatically inserted key frames). If 0, key frame will be inserted at first frame only. Note that GOP may be interrupted by AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE. +#define AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE L"Av1HeaderInsertionMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_ENUM); default = depends on USAGE; sequence header insertion mode +#define AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE L"Av1SwitchFrameInsertionMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_ENUM); default = depends on USAGE; switch frame insertin mode +#define AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INTERVAL L"Av1SwitchFrameInterval" // amf_int64; default = depends on USAGE; the interval between two inserted switch frames. Valid only when AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE is AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_FIXED_INTERVAL. +#define AMF_VIDEO_ENCODER_AV1_NUM_TEMPORAL_LAYERS L"Av1NumTemporalLayers" // amf_int64; default = depends on USAGE; Number of temporal layers. Can be changed at any time but the change is only applied when encoding next base layer frame. + +#define AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE L"Av1IntraRefreshMode" // amf_int64(AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM); default AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__DISABLED +#define AMF_VIDEO_ENCODER_AV1_INTRAREFRESH_STRIPES L"Av1IntraRefreshNumOfStripes" // amf_int64; default = N/A; Valid only when intra refresh is enabled. + +// color conversion +#define AMF_VIDEO_ENCODER_AV1_INPUT_COLOR_PROFILE L"Av1InputColorProfile" // amf_int64(AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM); default = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN - mean AUTO by size +#define AMF_VIDEO_ENCODER_AV1_INPUT_TRANSFER_CHARACTERISTIC L"Av1InputColorTransferChar" // amf_int64(AMF_COLOR_TRANSFER_CHARACTERISTIC_ENUM); default = AMF_COLOR_TRANSFER_CHARACTERISTIC_UNDEFINED, ISO/IEC 23001-8_2013 section 7.2 See VideoDecoderUVD.h for enum +#define AMF_VIDEO_ENCODER_AV1_INPUT_COLOR_PRIMARIES L"Av1InputColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 section 7.1 See ColorSpace.h for enum + +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PROFILE L"Av1OutputColorProfile" // amf_int64(AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM); default = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN - mean AUTO by size +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC L"Av1OutputColorTransferChar" // amf_int64(AMF_COLOR_TRANSFER_CHARACTERISTIC_ENUM); default = AMF_COLOR_TRANSFER_CHARACTERISTIC_UNDEFINED, ISO/IEC 23001-8_2013 ?7.2 See VideoDecoderUVD.h for enum +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES L"Av1OutputColorPrimaries" // amf_int64(AMF_COLOR_PRIMARIES_ENUM); default = AMF_COLOR_PRIMARIES_UNDEFINED, ISO/IEC 23001-8_2013 section 7.1 See ColorSpace.h for enum + + +// Frame encode parameters +#define AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE L"Av1ForceFrameType" // amf_int64(AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_ENUM); default = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_NONE; generate particular frame type +#define AMF_VIDEO_ENCODER_AV1_FORCE_INSERT_SEQUENCE_HEADER L"Av1ForceInsertSequenceHeader" // bool; default = false; If true, force insert sequence header with current frame; +#define AMF_VIDEO_ENCODER_AV1_MARK_CURRENT_WITH_LTR_INDEX L"Av1MarkCurrentWithLTRIndex" // amf_int64; default = N/A; Mark current frame with LTR index +#define AMF_VIDEO_ENCODER_AV1_FORCE_LTR_REFERENCE_BITFIELD L"Av1ForceLTRReferenceBitfield" // amf_int64; default = 0; force LTR bit-field +#define AMF_VIDEO_ENCODER_AV1_ROI_DATA L"Av1ROIData" // 2D AMFSurface, surface format: AMF_SURFACE_GRAY32 + +// Encode output parameters +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE L"Av1OutputFrameType" // amf_int64(AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_ENUM); default = N/A +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_MARKED_LTR_INDEX L"Av1MarkedLTRIndex" // amf_int64; default = N/A; Marked LTR index +#define AMF_VIDEO_ENCODER_AV1_OUTPUT_REFERENCED_LTR_INDEX_BITFIELD L"Av1ReferencedLTRIndexBitfield" // amf_int64; default = N/A; referenced LTR bit-field + +// AV1 Encoder capabilities - exposed in AMFCaps interface +#define AMF_VIDEO_ENCODER_AV1_CAP_NUM_OF_HW_INSTANCES L"Av1CapNumOfHwInstances" // amf_int64; default = N/A; number of HW encoder instances +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_THROUGHPUT L"Av1CapMaxThroughput" // amf_int64; default = N/A; MAX throughput for AV1 encoder in MB (16 x 16 pixel) +#define AMF_VIDEO_ENCODER_AV1_CAP_REQUESTED_THROUGHPUT L"Av1CapRequestedThroughput" // amf_int64; default = N/A; Currently total requested throughput for AV1 encode in MB (16 x 16 pixel) +#define AMF_VIDEO_ENCODER_AV1_CAP_COLOR_CONVERSION L"Av1CapColorConversion" // amf_int64(AMF_ACCELERATION_TYPE); default = N/A; type of supported color conversion. +#define AMF_VIDEO_ENCODER_AV1_CAP_PRE_ANALYSIS L"Av1PreAnalysis" // amf_bool - pre analysis module is available for AV1 UVE encoder, n/a for the other encoders +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_BITRATE L"Av1MaxBitrate" // amf_int64; default = N/A; Maximum bit rate in bits +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_PROFILE L"Av1MaxProfile" // amf_int64(AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM); default = N/A; max value of code profile +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_LEVEL L"Av1MaxLevel" // amf_int64(AMF_VIDEO_ENCODER_AV1_LEVEL_ENUM); default = N/A; max value of codec level +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_TEMPORAL_LAYERS L"Av1CapMaxNumTemporalLayers" // amf_int64; default = N/A; The cap of maximum number of temporal layers +#define AMF_VIDEO_ENCODER_AV1_CAP_MAX_NUM_LTR_FRAMES L"Av1CapMaxNumLTRFrames" // amf_int64; default = N/A; The cap of maximum number of LTR frames. This value is calculated based on current value of AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS. + +#endif //#ifndef AMF_VideoEncoderAV1_h diff --git a/amf/public/include/components/VideoEncoderHEVC.h b/amf/public/include/components/VideoEncoderHEVC.h index 6516fb57..19af408f 100644 --- a/amf/public/include/components/VideoEncoderHEVC.h +++ b/amf/public/include/components/VideoEncoderHEVC.h @@ -80,7 +80,10 @@ enum AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CONSTANT_QP = 0, AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR, AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR, - AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR + AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR, + AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_QUALITY_VBR, + AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR, + AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR }; enum AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM @@ -160,6 +163,7 @@ enum AMF_VIDEO_ENCODER_HEVC_LTR_MODE_ENUM // Rate control properties #define AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD L"HevcRateControlMethod" // amf_int64(AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_ENUM); default = depends on USAGE; Rate Control Method +#define AMF_VIDEO_ENCODER_HEVC_QVBR_QUALITY_LEVEL L"HevcQvbrQualityLevel" // amf_int64; default = 23; QVBR quality level; range = 1-51 #define AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE L"HevcVBVBufferSize" // amf_int64; default = depends on USAGE; VBV Buffer Size in bits #define AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS L"HevcInitialVBVBufferFullness" // amf_int64; default = 64; Initial VBV Buffer Fullness 0=0% 64=100% #define AMF_VIDEO_ENCODER_HEVC_ENABLE_VBAQ L"HevcEnableVBAQ" // // bool; default = depends on USAGE; Enable auto VBAQ diff --git a/amf/public/include/core/Platform.h b/amf/public/include/core/Platform.h index 916ca3fc..c2e4d997 100644 --- a/amf/public/include/core/Platform.h +++ b/amf/public/include/core/Platform.h @@ -72,7 +72,7 @@ // #error Need to define AMF_ALIGN #endif -#if defined(__linux) || defined(__ANDROID__) +#ifndef _WIN32 typedef signed int HRESULT; #define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0) #define FAILED(hr) (((HRESULT)(hr)) < 0) diff --git a/amf/public/include/core/Variant.h b/amf/public/include/core/Variant.h index ddb3da25..85914643 100644 --- a/amf/public/include/core/Variant.h +++ b/amf/public/include/core/Variant.h @@ -366,6 +366,8 @@ namespace amf } #if (__cplusplus == 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X) || (_MSC_VER >= 1600) +#pragma warning (push) +#pragma warning (disable : 26439) //This kind of function may not throw. Declare it 'noexcept'. String(String&& p_other) : m_Str(NULL) { operator=(p_other); @@ -498,6 +500,7 @@ namespace amf p_other.m_Str = NULL; // Transfer the ownership return *this; } +#pragma warning (pop) #endif wchar_t& operator[](size_t index) { diff --git a/amf/public/include/core/Version.h b/amf/public/include/core/Version.h index 0458e06f..f3305352 100644 --- a/amf/public/include/core/Version.h +++ b/amf/public/include/core/Version.h @@ -51,7 +51,7 @@ #define AMF_VERSION_MAJOR 1 #define AMF_VERSION_MINOR 4 -#define AMF_VERSION_RELEASE 26 +#define AMF_VERSION_RELEASE 28 #define AMF_VERSION_BUILD_NUM 0 #define AMF_FULL_VERSION AMF_MAKE_FULL_VERSION(AMF_VERSION_MAJOR, AMF_VERSION_MINOR, AMF_VERSION_RELEASE, AMF_VERSION_BUILD_NUM) diff --git a/amf/public/include/core/VulkanAMF.h b/amf/public/include/core/VulkanAMF.h index 60c4e7b0..188e36c7 100644 --- a/amf/public/include/core/VulkanAMF.h +++ b/amf/public/include/core/VulkanAMF.h @@ -102,6 +102,9 @@ namespace amf amf_int32 iPlaneWidthPitch; amf_int32 iPlaneHeightPitch; } AMFVulkanView; + +#define AMF_CONTEXT_VULKAN_COMPUTE_QUEUE L"VulkanComputeQueue" // amf_int64; default=0; Compute queue index in range [0, (VkQueueFamilyProperties.queueCount-1)] of the compute queue family. + #if defined(__cplusplus) } // namespace amf #endif diff --git a/amf/public/make/common_rules.mak b/amf/public/make/common_rules.mak index 2af08827..c22da311 100644 --- a/amf/public/make/common_rules.mak +++ b/amf/public/make/common_rules.mak @@ -117,6 +117,20 @@ $(foreach shader_file,$(vulkan_shader_sources),\ ) custom_target += $(vulkan_shader_headers) +data_file_headers = +# header-ify data files +define data_file_header_rule_fn + $1.h: $1 + $(FILE_TO_HEADER) "$$<" "$$(basename $$(^F))" + + data_file_headers += $1.h +endef + +$(foreach data_file,$(data_files),\ + $(eval $(call data_file_header_rule_fn,$(data_file)))\ +) +custom_target += $(data_file_headers) + # Define a macro that creates rules for each source file, then call # it for each one define compile_source_rule_fn diff --git a/amf/public/samples/CPPSamples/CapabilityManager/CapabilityManager.cpp b/amf/public/samples/CPPSamples/CapabilityManager/CapabilityManager.cpp index 53646976..575accbf 100644 --- a/amf/public/samples/CPPSamples/CapabilityManager/CapabilityManager.cpp +++ b/amf/public/samples/CPPSamples/CapabilityManager/CapabilityManager.cpp @@ -36,6 +36,7 @@ #include "public/include/components/VideoDecoderUVD.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/components/VideoConverter.h" #include "public/include/core/Context.h" #include "public/include/core/Debug.h" @@ -354,6 +355,68 @@ bool QueryEncoderForCodecHEVC(const wchar_t *componentID, amf::AMFContext* pCont } } +bool QueryEncoderForCodecAV1(const wchar_t* componentID, amf::AMFContext* pContext) +{ + std::wcout << L"\tCodec " << componentID << std::endl; + amf::AMFCapsPtr encoderCaps; + bool result = false; + + amf::AMFComponentPtr pEncoder; + g_AMFFactory.GetFactory()->CreateComponent(pContext, componentID, &pEncoder); + if (pEncoder == NULL) + { + std::wcout << AccelTypeToString(amf::AMF_ACCEL_NOT_SUPPORTED) << std::endl; + return false; + } + if (pEncoder->GetCaps(&encoderCaps) == AMF_OK) + { + amf_uint32 NumOfHWInstances = 1; + encoderCaps->GetProperty(AMF_VIDEO_ENCODER_AV1_CAP_NUM_OF_HW_INSTANCES, &NumOfHWInstances); + std::wcout << L"\t\tNumber HW instances:" << NumOfHWInstances << std::endl; + + for (amf_uint32 i = 0; i < NumOfHWInstances; i++) + { + if (NumOfHWInstances > 1) + { + pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODER_INSTANCE_INDEX, i); + std::wcout << L"\t\t--------------------" << std::endl; + std::wcout << L"\t\tInstance:" << i << std::endl; + } + + amf::AMF_ACCELERATION_TYPE accelType = encoderCaps->GetAccelerationType(); + std::wcout << L"\t\tAcceleration Type:" << AccelTypeToString(accelType) << std::endl; + + amf_uint32 maxProfile = 0; + encoderCaps->GetProperty(AMF_VIDEO_ENCODER_AV1_CAP_MAX_PROFILE, &maxProfile); + std::wcout << L"\t\tmaximum profile:" << maxProfile << std::endl; + + amf_uint32 maxLevel = 0; + encoderCaps->GetProperty(AMF_VIDEO_ENCODER_AV1_CAP_MAX_LEVEL, &maxLevel); + std::wcout << L"\t\tmaximum level:" << maxLevel << std::endl; + + std::wcout << L"\t\tEncoder input:\n"; + amf::AMFIOCapsPtr inputCaps; + if (encoderCaps->GetInputCaps(&inputCaps) == AMF_OK) + { + result = QueryIOCaps(inputCaps); + } + + std::wcout << L"\t\tEncoder output:\n"; + amf::AMFIOCapsPtr outputCaps; + if (encoderCaps->GetOutputCaps(&outputCaps) == AMF_OK) + { + result = QueryIOCaps(outputCaps); + } + } + return true; + } + else + { + std::wcout << AccelTypeToString(amf::AMF_ACCEL_NOT_SUPPORTED) << std::endl; + return false; + } +} + void QueryDecoderCaps(amf::AMFContext* pContext) { std::wcout << L"Querying video decoder capabilities...\n"; @@ -375,6 +438,7 @@ void QueryEncoderCaps(amf::AMFContext* pContext) QueryEncoderForCodecAVC(AMFVideoEncoderVCE_AVC, pContext); QueryEncoderForCodecAVC(AMFVideoEncoderVCE_SVC, pContext); QueryEncoderForCodecHEVC(AMFVideoEncoder_HEVC, pContext); + QueryEncoderForCodecAV1(AMFVideoEncoder_AV1, pContext); } bool QueryConverterCaps(amf::AMFContext* pContext) diff --git a/amf/public/samples/CPPSamples/CaptureVideo/CaptureVideo_VS2019.vcxproj b/amf/public/samples/CPPSamples/CaptureVideo/CaptureVideo_VS2019.vcxproj index 72331897..ffd38de5 100644 --- a/amf/public/samples/CPPSamples/CaptureVideo/CaptureVideo_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/CaptureVideo/CaptureVideo_VS2019.vcxproj @@ -102,7 +102,7 @@ - Level3 + Level4 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;STITCH_EXPORTS;%(PreprocessorDefinitions) $(SolutionDir)../../;$(VK_SDK_PATH)\include; @@ -125,7 +125,7 @@ - Level3 + Level4 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;STITCH_EXPORTS;%(PreprocessorDefinitions) $(SolutionDir)../../;$(VK_SDK_PATH)\include; @@ -146,7 +146,7 @@ - Level3 + Level4 MaxSpeed @@ -171,7 +171,7 @@ - Level3 + Level4 MaxSpeed diff --git a/amf/public/samples/CPPSamples/DVR/DVR.cpp b/amf/public/samples/CPPSamples/DVR/DVR.cpp index c2c6f1a9..f612b8f3 100644 --- a/amf/public/samples/CPPSamples/DVR/DVR.cpp +++ b/amf/public/samples/CPPSamples/DVR/DVR.cpp @@ -1,4 +1,4 @@ -// +// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; @@ -6,9 +6,9 @@ // (collectively, the "Media Technologies"). For clarity, you will pay any // royalties due for such third party technologies, which may include the Media // Technologies that are owed as a result of AMD providing the Software to you. -// -// MIT license -// +// +// MIT license +// // // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // @@ -50,6 +50,7 @@ #include "public/common/AMFFactory.h" #include "public/include/components/VideoEncoderVCE.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/core/Debug.h" #include "public/samples/CPPSamples/common/CmdLineParser.h" @@ -78,7 +79,7 @@ HINSTANCE hInst = NULL; // current instance HWND g_hDlg = NULL; // Resolution of the desktops that could be captured -struct CaptureSource +struct CaptureSource { int ResolutionX; int ResolutionY; @@ -92,7 +93,6 @@ static std::vector s_vDisplays; const unsigned __int64 ID_STATUS_BAR = 100; const unsigned TIMER_ID = 10000; -static bool s_bOCLConverter = false; static UINT_PTR s_uiFpsTimerId = 0; static unsigned kDefaultGPUIdx = 0; @@ -129,7 +129,7 @@ void UpdateMessage(const wchar_t *msg); //------------------------------------------------------------------------------------------------- -// define some wrapper classes to guarantee +// define some wrapper classes to guarantee // initialization and proper cleanup class CComInit { @@ -179,8 +179,6 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, UNREFERENCED_PARAMETER(lpCmdLine); hInst = hInstance; // Store instance handle in our global variable - - s_bOCLConverter = false; //------------------------------------------------------------------------------------------------- // Main // initialize required objects @@ -218,7 +216,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, if (parseCmdLineParameters(s_pPipeline)) #else if (parseCmdLineParameters(s_pPipeline, argc, argv)) -#endif +#endif //------------------------------------------------------------------------------------------------- @@ -232,13 +230,18 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, PopulateMenus(GetMenu(g_hDlg)); UpdateButtons(g_hDlg, false); - + //------------------------------------------------------------------------------------------------- // Main message loop: MSG msg = {}; - BOOL ret; - while (ret = GetMessage(&msg, NULL, 0, 0)) - { + + while (true) + { + BOOL ret = GetMessage(&msg, NULL, 0, 0); + + if (ret == 0) + break; + if (ret == -1) return -1; @@ -246,12 +249,12 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, TranslateMessage(&msg); DispatchMessage(&msg); } - } + } return (int)msg.wParam; } -// Description: +// Description: // Creates a status bar and divides it into 2 parts. // Parameters: // hwndParent - parent window for the status bar. @@ -329,7 +332,7 @@ void PopulateMenus(HMENU hMenu) UpdateMessage(adapterMsg.c_str()); #endif // Ensure only AMD GPUs are listed - if (descAdapter.VendorId != 0x1002) + if (descAdapter.VendorId != 0x1002) { continue; } @@ -347,7 +350,7 @@ void PopulateMenus(HMENU hMenu) { break; } - + DXGI_OUTPUT_DESC descOutput; hr = pOutput->GetDesc(&descOutput); if (SUCCEEDED(hr)) @@ -487,8 +490,9 @@ void UpdateMenuItems() HMENU hCaptureSources = GetSubMenu(hMenu, 2); for (int i = 0; i < (int)s_vDisplays.size(); ++i) { - const bool enableItem = s_vDisplays[i].deviceIdx == iSelectedDevice; - const bool checkItem = enableItem && (s_vDisplays[i].adapterIdx == iSelectedCapture); + //Casting is added to avoid signed/unsigned mismatch + const bool enableItem = static_cast(s_vDisplays[i].deviceIdx) == iSelectedDevice; + const bool checkItem = enableItem && (static_cast(s_vDisplays[i].adapterIdx) == iSelectedCapture); CheckMenuItem(hCaptureSources, ID_CAPTURE_SOURCE_START + i, MF_BYCOMMAND | (checkItem ? MF_CHECKED : MF_UNCHECKED)); EnableMenuItem(hCaptureSources, ID_CAPTURE_SOURCE_START + i, enableItem ? MF_ENABLED : MF_DISABLED); } @@ -505,7 +509,6 @@ void UpdateMenuItems() CheckMenuItem(hCaptureComponents, ID_CAPTURE_COMPONENT_START, MF_BYCOMMAND | MF_UNCHECKED); } - s_pPipeline->SetParam(DisplayDvrPipeline::PARAM_NAME_OPENCL_CONVERTER, s_bOCLConverter); } @@ -519,7 +522,8 @@ void UpdateMenuItems() // WM_DESTROY - post a quit message and return // // -INT_PTR CALLBACK DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) + +INT_PTR CALLBACK DialogProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM /*lParam*/) { int wmId, wmEvent; @@ -685,7 +689,7 @@ void GetCurrentFileLocation(TCHAR* szFile) } //------------------------------------------------------------------------------------------------- -// Get record file name +// Get record file name void GetRecordFileLocation(TCHAR* szFile) { // Set record file location @@ -753,7 +757,10 @@ void StartRecording(HWND hWnd) // Update message std::wstring str = L"Recording"; #ifdef _DEBUG - if (s_bOCLConverter) + + bool bOCLConverter = false; + s_pPipeline->GetParam(DisplayDvrPipeline::PARAM_NAME_OPENCL_CONVERTER, bOCLConverter); + if (bOCLConverter) { str += L" (using OCL) "; } @@ -805,7 +812,7 @@ void FailedRecording(HWND hWnd, bool init) // Grey out the Record and Stop buttons UpdateButtons(hWnd, false); - // + // g_AMFFactory.Terminate(); } @@ -820,8 +827,8 @@ void UpdateButtons(HWND hWnd, bool recording) } //------------------------------------------------------------------------------------------------- -// disply the recording FPS in the status bar... -void UpdateFps(HWND hWnd) +// Disply the recording FPS in the status bar... +void UpdateFps(HWND /*hWnd*/) { if (s_pPipeline->GetState() == PipelineStateRunning) { diff --git a/amf/public/samples/CPPSamples/DVR/DVR_VS2019.vcxproj b/amf/public/samples/CPPSamples/DVR/DVR_VS2019.vcxproj index 9f17eaa9..2bf88e77 100644 --- a/amf/public/samples/CPPSamples/DVR/DVR_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/DVR/DVR_VS2019.vcxproj @@ -77,7 +77,7 @@ - Level3 + Level4 Disabled true $(SolutionDir)../../;$(OCL_ROOT)\include;%(AdditionalIncludeDirectories) @@ -95,7 +95,7 @@ - Level3 + Level4 Disabled true $(SolutionDir)../../;$(OCL_ROOT)\include;%(AdditionalIncludeDirectories) @@ -114,10 +114,13 @@ $(SolutionDir)..\..\bin\lib\vs2019x$(PlatformArchitecture)$(Configuration)\$(TargetName).lib C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\atlmfc\lib\spectre\x64;%(AdditionalLibraryDirectories) + + PerMonitorHighDPIAware + - Level3 + Level4 MaxSpeed true true @@ -137,7 +140,7 @@ - Level3 + Level4 MaxSpeed true true diff --git a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency.cpp b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency.cpp index b16e8160..e21a7b68 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency.cpp +++ b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency.cpp @@ -45,8 +45,10 @@ #include "public/common/TraceAdapter.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/samples/CPPSamples/common/EncoderParamsAVC.h" #include "public/samples/CPPSamples/common/EncoderParamsHEVC.h" +#include "public/samples/CPPSamples/common/EncoderParamsAV1.h" #include "../common/ParametersStorage.h" #include "../common/CmdLineParser.h" #include "../common/CmdLogger.h" @@ -56,9 +58,6 @@ #include #include -static const wchar_t* pCodec = AMFVideoEncoderVCE_AVC; -//static const wchar_t *pCodec = AMFVideoEncoder_HEVC; - static AMF_COLOR_BIT_DEPTH_ENUM eDepth = AMF_COLOR_BIT_DEPTH_8; static amf_int32 frameCount = 500; static amf_bool frameCountPassedIn = false; @@ -79,12 +78,12 @@ amf_int32 widthIn = 1920; amf_int32 heightIn = 1080; amf_int32 rectSize = 50; -bool writeToFileMode = false; -amf_int64 formatType = 0; -amf_int64 memoryIn = 0; -amf_wstring codec = pCodec; -amf_wstring workAlgorithm = L"ASAP"; -amf_wstring fileNameOut; +bool writeToFileMode = false; +amf_int64 formatType = 0; +amf_int64 memoryIn = 0; +amf_wstring codec = AMFVideoEncoderVCE_AVC; // AVC default. can set using '-codec avc' '-codec hevc' '-codec av1' command line argument +amf_wstring workAlgorithm = L"ASAP"; +amf_wstring fileNameOut; #define START_TIME_PROPERTY L"StartTimeProperty" // custom property ID to store submission time in a frame - all custom properties are copied from input to output @@ -104,7 +103,7 @@ AMF_RESULT RegisterParams(ParametersStorage* pParams) { pParams->SetParamDescription(PARAM_NAME_WORKALGORITHM, ParamCommon, L"'ASAP' or 'OneInOne' frames submission algorithm", NULL); pParams->SetParamDescription(PARAM_NAME_ENGINE, ParamCommon, L"Memory type: DX9Ex, DX11, Vulkan (h.264 only)", ParamConverterMemoryType); - pParams->SetParamDescription(PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265)", ParamConverterCodec); + pParams->SetParamDescription(PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265, AV1)", ParamConverterCodec); pParams->SetParamDescription(PARAM_NAME_INPUT_FORMAT, ParamCommon, L"Supported file formats: RGBA_F16, R10G10B10A2, NV12, P010", ParamConverterFormat); pParams->SetParamDescription(PARAM_NAME_INPUT_FRAMES, ParamCommon, L"Output number of frames", ParamConverterInt64); pParams->SetParamDescription(PARAM_NAME_PRERENDER, ParamCommon, L"Pre-render number of frames", ParamConverterInt64); @@ -130,6 +129,7 @@ AMF_RESULT ReadParams(ParametersStorage* params, int argc, char* argv[]) RegisterParams(params); RegisterEncoderParamsAVC(params); RegisterEncoderParamsHEVC(params); + RegisterEncoderParamsAV1(params); #if defined(_WIN32) if (!parseCmdLineParameters(params)) @@ -152,6 +152,11 @@ AMF_RESULT ReadParams(ParametersStorage* params, int argc, char* argv[]) RegisterEncoderParamsHEVC(¶msHEVC); LOG_INFO(paramsHEVC.GetParamUsage()); + LOG_INFO(L"+++ AV1 codec +++"); + ParametersStorage paramsAV1; + RegisterEncoderParamsAV1(¶msAV1); + LOG_INFO(paramsAV1.GetParamUsage()); + return AMF_FAIL; } @@ -171,6 +176,10 @@ AMF_RESULT ReadParams(ParametersStorage* params, int argc, char* argv[]) { RegisterEncoderParamsHEVC(params); } + else if (codec == amf_wstring(AMFVideoEncoder_AV1)) + { + RegisterEncoderParamsAV1(params); + } else { LOG_ERROR(L"Invalid codec ID"); @@ -330,13 +339,15 @@ AMF_RESULT SetEncoderDefaults(ParametersStorage* pParams, amf::AMFComponent* enc AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_QUALITY_PRESET, AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED) failed"); } + res = encoder->SetProperty(AMF_VIDEO_ENCODER_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_FRAMESIZE, %dx%d) failed", widthIn, heightIn); res = encoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, true); AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, true) failed"); res = encoder->SetProperty(AMF_VIDEO_ENCODER_QUERY_TIMEOUT, 50); //ms AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_QUERY_TIMEOUT, 50) failed"); } - else + else if (codec == amf_wstring(AMFVideoEncoder_HEVC)) { // usage parameters come first AMF_RETURN_IF_FAILED(PushParamsToPropertyStorage(pParams, ParamEncoderUsage, encoder)); @@ -371,12 +382,59 @@ AMF_RESULT SetEncoderDefaults(ParametersStorage* pParams, amf::AMFComponent* enc AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET, AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED)"); } + res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMESIZE, %dx%d) failed", widthIn, heightIn); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE, true); AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, true) failed"); res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_QUERY_TIMEOUT, 50); //ms AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_QUERY_TIMEOUT, 50) failed"); } + else if (codec == amf_wstring(AMFVideoEncoder_AV1)) + { + // usage parameters come first + AMF_RETURN_IF_FAILED(PushParamsToPropertyStorage(pParams, ParamEncoderUsage, encoder)); + + // AMF_VIDEO_ENCODER_AV1_USAGE needs to be set before the rest + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING)"); + + // initialize command line parameters + AMF_RETURN_IF_FAILED(PushParamsToPropertyStorage(pParams, ParamEncoderStatic, encoder)); + AMF_RETURN_IF_FAILED(PushParamsToPropertyStorage(pParams, ParamEncoderDynamic, encoder)); + + // if we requested to run a specific VCN instance, check + // if it's available, otherwise we can't run the test... + if (vcnInstance != -1) + { + amf::AMFCapsPtr encoderCaps; + if (encoder->GetCaps(&encoderCaps) == AMF_OK) + { + amf_uint64 vcnInstCount = 0; + AMF_RETURN_IF_FAILED(encoderCaps->GetProperty(AMF_VIDEO_ENCODER_AV1_CAP_NUM_OF_HW_INSTANCES, &vcnInstCount), L"Multiple VCN instances not supported"); + AMF_RETURN_IF_FALSE((vcnInstance >= 0) && (vcnInstance < vcnInstCount), AMF_OUT_OF_RANGE, L"Invalid VCN instance %d, requested. Only %d instances supported.", vcnInstance, vcnInstCount); + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODER_INSTANCE_INDEX, vcnInstance); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODER_INSTANCE_INDEX, %d) failed", vcnInstance); + } + } + + if (bMaximumSpeed) + { + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED)"); + } + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, %dx%d) failed", widthIn, heightIn); + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE, AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_LOWEST_LATENCY); + AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE, AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_LOWEST_LATENCY) failed"); + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_QUERY_TIMEOUT, 50); //ms + AMF_RETURN_IF_FAILED(res, L"encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_QUERY_TIMEOUT, 50) failed"); + } return AMF_OK; } @@ -583,9 +641,10 @@ int main(int argc, char* argv[]) } PipelineElementPtr pipelineElPtr(fileReader); + wprintf(L"Encoder: %s\n", codec.c_str()); // component: encoder res = g_AMFFactory.GetFactory()->CreateComponent(context, codec.c_str(), &encoder); - AMF_RETURN_IF_FAILED(res, L"CreateComponent(%s) failed", pCodec); + AMF_RETURN_IF_FAILED(res, L"CreateComponent(%s) failed", codec.c_str()); res = SetEncoderDefaults(¶ms, encoder, codec); AMF_RETURN_IF_FAILED(res, L"Could not set default values in encoder."); diff --git a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj index 5fb45304..526a3c55 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj @@ -213,6 +213,7 @@ + @@ -229,6 +230,7 @@ + diff --git a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj.filters b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj.filters index c2312411..630a2a3f 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj.filters +++ b/amf/public/samples/CPPSamples/EncoderLatency/EncoderLatency_VS2019.vcxproj.filters @@ -45,6 +45,9 @@ common + + common + @@ -87,6 +90,9 @@ common + + common + diff --git a/amf/public/samples/CPPSamples/EncoderLatency/Makefile b/amf/public/samples/CPPSamples/EncoderLatency/Makefile index a5eafbf8..dffe822e 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/Makefile +++ b/amf/public/samples/CPPSamples/EncoderLatency/Makefile @@ -48,5 +48,6 @@ src_files = \ $(samples_common_dir)/RawStreamReader.cpp \ $(samples_common_dir)/EncoderParamsAVC.cpp \ $(samples_common_dir)/EncoderParamsHEVC.cpp \ + $(samples_common_dir)/EncoderParamsAV1.cpp \ include $(amf_root)/public/make/common_rules.mak diff --git a/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.cpp b/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.cpp index 866d999f..635d63c1 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.cpp +++ b/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.cpp @@ -77,7 +77,7 @@ void FillSurfaceDX11(amf::AMFContext* context, amf::AMFSurface* surface) } #endif -static void FillNV12SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V) +void FillNV12SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V) { amf::AMFPlane* pPlaneY = surface->GetPlaneAt(0); amf::AMFPlane* pPlaneUV = surface->GetPlaneAt(1); @@ -111,7 +111,7 @@ static void FillNV12SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_ } } -static void FillRGBASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) +void FillRGBASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) { amf::AMFPlane* pPlane = surface->GetPlaneAt(0); @@ -134,7 +134,7 @@ static void FillRGBASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_ } } -static void FillBGRASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) +void FillBGRASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) { amf::AMFPlane* pPlane = surface->GetPlaneAt(0); @@ -277,7 +277,7 @@ void AMFHalfFloat::GenerateHalfFloatConversionTables() amf_uint16 AMFHalfFloat::m_basetable[512]; amf_uint8 AMFHalfFloat::m_shifttable[512]; -static void FillRGBA_F16SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) +void FillRGBA_F16SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) { amf::AMFPlane* pPlane = surface->GetPlaneAt(0); @@ -305,7 +305,7 @@ static void FillRGBA_F16SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, } } -static void FillR10G10B10A2SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) +void FillR10G10B10A2SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B) { amf::AMFPlane* pPlane = surface->GetPlaneAt(0); @@ -332,7 +332,7 @@ static void FillR10G10B10A2SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 } } -static void FillP010SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V) +void FillP010SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V) { amf::AMFPlane* pPlaneY = surface->GetPlaneAt(0); amf::AMFPlane* pPlaneUV = surface->GetPlaneAt(1); diff --git a/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.h b/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.h index 1afadba8..90d80054 100644 --- a/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.h +++ b/amf/public/samples/CPPSamples/EncoderLatency/SurfaceGenerator.h @@ -18,4 +18,9 @@ AMF_RESULT ReadSurface(PipelineElementPtr pipelineElPtr, amf::AMFSurface** surfa void FillSurfaceDX9(amf::AMFContext* context, amf::AMFSurface* surface); void FillSurfaceDX11(amf::AMFContext* context, amf::AMFSurface* surface); void FillSurfaceVulkan(amf::AMFContext* context, amf::AMFSurface* surface); - +void FillRGBASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B); +void FillNV12SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V); +void FillBGRASurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B); +void FillR10G10B10A2SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B); +void FillRGBA_F16SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 R, amf_uint8 G, amf_uint8 B); +void FillP010SurfaceWithColor(amf::AMFSurface* surface, amf_uint8 Y, amf_uint8 U, amf_uint8 V); \ No newline at end of file diff --git a/amf/public/samples/CPPSamples/SimpleConverter/SimpleConverter.cpp b/amf/public/samples/CPPSamples/SimpleConverter/SimpleConverter.cpp index 64997971..f6d06cb9 100644 --- a/amf/public/samples/CPPSamples/SimpleConverter/SimpleConverter.cpp +++ b/amf/public/samples/CPPSamples/SimpleConverter/SimpleConverter.cpp @@ -49,9 +49,9 @@ // On Win7 AMF Encoder can work on DX9 only // The next line can be used to demo DX11 input and DX9 output from converter #ifdef WIN32 -static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX9; -static amf::AMF_MEMORY_TYPE memoryTypeOut = amf::AMF_MEMORY_DX9; -//static amf::AMF_MEMORY_TYPE memoryTypeOut = amf::AMF_MEMORY_DX11; +//static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX9; +static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX11; +static amf::AMF_MEMORY_TYPE memoryTypeOut = amf::AMF_MEMORY_DX11; #else static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_VULKAN; static amf::AMF_MEMORY_TYPE memoryTypeOut = amf::AMF_MEMORY_VULKAN; @@ -192,7 +192,6 @@ int main(int argc, char* argv[]) if(memoryTypeIn == amf::AMF_MEMORY_DX11 || memoryTypeOut == amf::AMF_MEMORY_DX11) { res = context->InitDX11(NULL); // can be DX11 device - res = amf::AMFContext1Ptr(context)->InitVulkan(NULL); // can be DX11 device } #endif if(memoryTypeIn == amf::AMF_MEMORY_VULKAN || memoryTypeOut == amf::AMF_MEMORY_VULKAN) diff --git a/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder.cpp b/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder.cpp index d7e127ed..1c9a4195 100644 --- a/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder.cpp +++ b/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder.cpp @@ -31,7 +31,7 @@ // THE SOFTWARE. // -// this sample encodes NV12 frames using AMF Encoder and writes them to H.264 elmentary stream +// this sample encodes NV12 frames using AMF Encoder and writes them to H.264,H.265, or AV1 elmentary stream #include #ifdef _WIN32 @@ -42,6 +42,7 @@ #include "public/common/AMFFactory.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/common/Thread.h" #include "public/common/AMFSTL.h" #include "public/common/TraceAdapter.h" @@ -49,18 +50,23 @@ #define AMF_FACILITY L"SimpleEncoder" -//#define ENABLE_4K -//#define ENABLE_EFC // color conversion inside encoder component. Will use GFX or HW if available -//#define ENABLE_10_BIT +static const bool bEnable4K = false; +static const bool bEnable10bit = false; +static const bool bMaximumSpeed = true; // encoding speed preset -#if defined(ENABLE_10_BIT) -static const wchar_t *pCodec = AMFVideoEncoder_HEVC; -static AMF_COLOR_BIT_DEPTH_ENUM eDepth = AMF_COLOR_BIT_DEPTH_10; -#else -static const wchar_t *pCodec = AMFVideoEncoderVCE_AVC; -//static const wchar_t *pCodec = AMFVideoEncoder_HEVC; -static AMF_COLOR_BIT_DEPTH_ENUM eDepth = AMF_COLOR_BIT_DEPTH_8; -#endif +static const bool bEnableEfc = false; // color conversion inside encoder component. Will use GFX or HW if available +// Encoder Format Conversion (EFC) available for selected input formats +static const amf::AMF_SURFACE_FORMAT efcSurfaceFormat[] = { + amf::AMF_SURFACE_RGBA, + amf::AMF_SURFACE_BGRA, + amf::AMF_SURFACE_R10G10B10A2, + amf::AMF_SURFACE_RGBA_F16 }; + +static const int codecIndex = 0; // set to 0 for AVC, 1 for HEVC, 2 for AV1 +static_assert(!bEnable10bit || codecIndex != 0, "HEVC or AV1 required for 10 bit"); +static AMF_COLOR_BIT_DEPTH_ENUM eDepth = (bEnable10bit ? AMF_COLOR_BIT_DEPTH_10 : AMF_COLOR_BIT_DEPTH_8); ; +static const wchar_t* pCodecNames[] = { AMFVideoEncoderVCE_AVC, AMFVideoEncoder_HEVC, AMFVideoEncoder_AV1 }; +static const wchar_t* fileNames[] = { L"./output.h264", L"./output.h265", L"./output.av1" }; #ifdef _WIN32 static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX11; @@ -68,34 +74,18 @@ static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_DX11; static amf::AMF_MEMORY_TYPE memoryTypeIn = amf::AMF_MEMORY_VULKAN; #endif -#if defined ENABLE_EFC -static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_RGBA; -//static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_BGRA; -//static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_R10G10B10A2; -//static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_RGBA_F16; -#else -static amf::AMF_SURFACE_FORMAT formatIn = amf::AMF_SURFACE_NV12; -#endif +static amf::AMF_SURFACE_FORMAT formatIn = (bEnableEfc ? efcSurfaceFormat[0] : amf::AMF_SURFACE_NV12); -#if defined(ENABLE_4K) -static amf_int32 widthIn = 1920*2; -static amf_int32 heightIn = 1080*2; -#else -static amf_int32 widthIn = 1920; -static amf_int32 heightIn = 1080; -#endif +static amf_int32 widthIn = (bEnable4K ? 1920 * 2 : 1920); +static amf_int32 heightIn = (bEnable4K ? 1080 * 2 : 1080); static amf_int32 frameRateIn = 30; static amf_int64 bitRateIn = 5000000L; // in bits, 5MBit static amf_int32 rectSize = 50; static amf_int32 frameCount = 500; -static bool bMaximumSpeed = true; #define START_TIME_PROPERTY L"StartTimeProperty" // custom property ID to store submission time in a frame - all custom properties are copied from input to output -static const wchar_t *fileNameOut_h264 = L"./output.h264"; -static const wchar_t *fileNameOut_h265 = L"./output.h265"; - static amf_int32 xPos = 0; static amf_int32 yPos = 0; @@ -118,23 +108,35 @@ class PollingThread : public amf::AMFThread amf::AMFComponentPtr m_pEncoder; std::ofstream m_pFile; public: - PollingThread(amf::AMFContext *context, amf::AMFComponent *encoder, const wchar_t *pFileName); + PollingThread(amf::AMFContext* context, amf::AMFComponent* encoder, const wchar_t* pFileName); ~PollingThread(); virtual void Run(); }; +AMF_RESULT simpleEncode(const wchar_t* pCodec, const wchar_t* pFileNameOut); + #ifdef _WIN32 int _tmain(int argc, _TCHAR* argv[]) #else int main(int argc, char* argv[]) #endif { + AMF_RESULT result = simpleEncode(pCodecNames[codecIndex], fileNames[codecIndex]); + if (result != AMF_OK) + { + wprintf(L"%s encode failed", pCodecNames[codecIndex]); + } + return 0; +} + +// creates encoder using pCodec component id, then outputs encoded elementary stream to pFileNameOut +AMF_RESULT simpleEncode(const wchar_t* pCodec, const wchar_t* pFileNameOut) { AMF_RESULT res = AMF_OK; // error checking can be added later res = g_AMFFactory.Init(); - if(res != AMF_OK) + if (res != AMF_OK) { wprintf(L"AMF Failed to initialize"); - return 1; + return res; } ::amf_increase_timer_precision(); @@ -151,20 +153,20 @@ int main(int argc, char* argv[]) res = g_AMFFactory.GetFactory()->CreateContext(&context); AMF_RETURN_IF_FAILED(res, L"CreateContext() failed"); - if(memoryTypeIn == amf::AMF_MEMORY_VULKAN) + if (memoryTypeIn == amf::AMF_MEMORY_VULKAN) { res = amf::AMFContext1Ptr(context)->InitVulkan(NULL); AMF_RETURN_IF_FAILED(res, L"InitVulkan(NULL) failed"); PrepareFillFromHost(context); } #ifdef _WIN32 - else if(memoryTypeIn == amf::AMF_MEMORY_DX9) + else if (memoryTypeIn == amf::AMF_MEMORY_DX9) { res = context->InitDX9(NULL); // can be DX9 or DX9Ex device AMF_RETURN_IF_FAILED(res, L"InitDX9(NULL) failed"); } - else if(memoryTypeIn == amf::AMF_MEMORY_DX11) + else if (memoryTypeIn == amf::AMF_MEMORY_DX11) { res = context->InitDX11(NULL); // can be DX11 device AMF_RETURN_IF_FAILED(res, L"InitDX11(NULL) failed"); @@ -176,12 +178,12 @@ int main(int argc, char* argv[]) res = g_AMFFactory.GetFactory()->CreateComponent(context, pCodec, &encoder); AMF_RETURN_IF_FAILED(res, L"CreateComponent(%s) failed", pCodec); - if(amf_wstring(pCodec) == amf_wstring(AMFVideoEncoderVCE_AVC)) + if (amf_wstring(pCodec) == amf_wstring(AMFVideoEncoderVCE_AVC)) { res = encoder->SetProperty(AMF_VIDEO_ENCODER_USAGE, AMF_VIDEO_ENCODER_USAGE_TRANSCODING); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_USAGE, AMF_VIDEO_ENCODER_USAGE_TRANSCODING) failed"); - if(bMaximumSpeed) + if (bMaximumSpeed) { res = encoder->SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0); // do not check error for AMF_VIDEO_ENCODER_B_PIC_PATTERN - can be not supported - check Capability Manager sample @@ -191,25 +193,27 @@ int main(int argc, char* argv[]) res = encoder->SetProperty(AMF_VIDEO_ENCODER_TARGET_BITRATE, bitRateIn); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_TARGET_BITRATE, %" LPRId64 L") failed", bitRateIn); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_FRAMESIZE, %dx%d) failed", widthIn, heightIn); res = encoder->SetProperty(AMF_VIDEO_ENCODER_FRAMERATE, ::AMFConstructRate(frameRateIn, 1)); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_FRAMERATE, %dx%d) failed", frameRateIn, 1); -#if defined(ENABLE_4K) - res = encoder->SetProperty(AMF_VIDEO_ENCODER_PROFILE, AMF_VIDEO_ENCODER_PROFILE_HIGH); - AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_PROFILE, AMF_VIDEO_ENCODER_PROFILE_HIGH) failed"); + if (bEnable4K) { + res = encoder->SetProperty(AMF_VIDEO_ENCODER_PROFILE, AMF_VIDEO_ENCODER_PROFILE_HIGH); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_PROFILE, AMF_VIDEO_ENCODER_PROFILE_HIGH) failed"); - res = encoder->SetProperty(AMF_VIDEO_ENCODER_PROFILE_LEVEL, 51); - AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_PROFILE_LEVEL, 51)"); - res = encoder->SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0); - AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0)"); -#endif + res = encoder->SetProperty(AMF_VIDEO_ENCODER_PROFILE_LEVEL, 51); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_PROFILE_LEVEL, 51)"); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0)"); + } } - else + else if (amf_wstring(pCodec) == amf_wstring(AMFVideoEncoder_HEVC)) { res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_USAGE, AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_USAGE, AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING)"); - if(bMaximumSpeed) + if (bMaximumSpeed) { res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET, AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET, AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED)"); @@ -217,6 +221,8 @@ int main(int argc, char* argv[]) res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE, bitRateIn); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE, %" LPRId64 L") failed", bitRateIn); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMESIZE, %dx%d) failed", widthIn, heightIn); res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMERATE, ::AMFConstructRate(frameRateIn, 1)); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMERATE, %dx%d) failed", frameRateIn, 1); @@ -224,36 +230,68 @@ int main(int argc, char* argv[]) AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH, %d) failed", eDepth); -#if defined(ENABLE_4K) - res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_TIER, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH); - AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_TIER, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH) failed"); - res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL, AMF_LEVEL_5_1); - AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL, AMF_LEVEL_5_1) failed"); -#endif + if (bEnable4K) { + res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_TIER, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_TIER, AMF_VIDEO_ENCODER_HEVC_TIER_HIGH) failed"); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL, AMF_LEVEL_5_1); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL, AMF_LEVEL_5_1) failed"); + } } + else if (amf_wstring(pCodec) == amf_wstring(AMFVideoEncoder_AV1)) + { + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING)"); + + if (bMaximumSpeed) + { + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED)"); + } + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, bitRateIn); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, %" LPRId64 L") failed", bitRateIn); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, ::AMFConstructSize(widthIn, heightIn)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, %dx%d) failed", widthIn, heightIn); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, ::AMFConstructRate(frameRateIn, 1)); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, %dx%d) failed", frameRateIn, 1); + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH, eDepth); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH, %d) failed", eDepth); + + if (bEnable4K) { + //res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_PROFILE, AMF_VIDEO_ENCODER_AV1_PROFILE_HIGH); + //AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_PROFILE, AMF_VIDEO_ENCODER_AV1_PROFILE_HIGH) failed"); + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_LEVEL, AMF_VIDEO_ENCODER_AV1_LEVEL_5_1); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_LEVEL, AMF_VIDEO_ENCODER_AV1_LEVEL_5_1) failed"); + } + + res = encoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE, %d) failed", AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS); + } + res = encoder->Init(formatIn, widthIn, heightIn); AMF_RETURN_IF_FAILED(res, L"encoder->Init() failed"); - PollingThread thread(context, encoder, amf_wstring(pCodec) == amf_wstring(AMFVideoEncoderVCE_AVC) ? fileNameOut_h264 : fileNameOut_h265); + PollingThread thread(context, encoder, pFileNameOut); thread.Start(); // encode some frames amf_int32 submitted = 0; - while(submitted < frameCount) + while (submitted < frameCount) { - if(surfaceIn == NULL) + if (surfaceIn == NULL) { surfaceIn = NULL; res = context->AllocSurface(memoryTypeIn, formatIn, widthIn, heightIn, &surfaceIn); AMF_RETURN_IF_FAILED(res, L"AllocSurface() failed"); - if(memoryTypeIn == amf::AMF_MEMORY_VULKAN) + if (memoryTypeIn == amf::AMF_MEMORY_VULKAN) { FillSurfaceVulkan(context, surfaceIn); } #ifdef _WIN32 - else if(memoryTypeIn == amf::AMF_MEMORY_DX9) + else if (memoryTypeIn == amf::AMF_MEMORY_DX9) { FillSurfaceDX9(context, surfaceIn); } @@ -268,15 +306,15 @@ int main(int argc, char* argv[]) surfaceIn->SetProperty(START_TIME_PROPERTY, start_time); res = encoder->SubmitInput(surfaceIn); - if(res == AMF_NEED_MORE_INPUT) // handle full queue + if (res == AMF_NEED_MORE_INPUT) // handle full queue { // do nothing } - else if (res == AMF_INPUT_FULL || res == AMF_DECODER_NO_FREE_SURFACES) - { - amf_sleep(1); // input queue is full: wait, poll and submit again - } - else + else if (res == AMF_INPUT_FULL || res == AMF_DECODER_NO_FREE_SURFACES) + { + amf_sleep(1); // input queue is full: wait, poll and submit again + } + else { AMF_RETURN_IF_FAILED(res, L"SubmitInput() failed"); surfaceIn = NULL; @@ -284,10 +322,10 @@ int main(int argc, char* argv[]) } } // drain encoder; input queue can be full - while(true) + while (true) { res = encoder->Drain(); - if(res != AMF_INPUT_FULL) // handle full queue + if (res != AMF_INPUT_FULL) // handle full queue { break; } @@ -306,7 +344,7 @@ int main(int argc, char* argv[]) context = NULL; // context is the last g_AMFFactory.Terminate(); - return 0; + return AMF_OK; } #ifdef _WIN32 @@ -336,12 +374,8 @@ static void FillSurfaceDX9(amf::AMFContext *context, amf::AMFSurface *surface) yPos+=2; //DX9 NV12 surfaces do not accept odd positions - do not use ++ } - - - static void FillSurfaceDX11(amf::AMFContext *context, amf::AMFSurface *surface) { - HRESULT hr = S_OK; // fill surface with something something useful. We fill with color and color rect // get native DX objects ID3D11Device *deviceDX11 = (ID3D11Device *)context->GetDX11Device(); // no reference counting - do not Release() @@ -673,7 +707,7 @@ static void FillSurfaceVulkan(amf::AMFContext *context, amf::AMFSurface *surface yPos = 0; } - for(int p = 0; p < pColor1->GetPlanesCount(); p++) + for(amf_size p = 0; p < pColor1->GetPlanesCount(); p++) { amf::AMFPlane *plane = pColor1->GetPlaneAt(p); amf_size origin1[3] = {0, 0 , 0}; diff --git a/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder_VS2019.vcxproj b/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder_VS2019.vcxproj index f22f0eed..951096f9 100644 --- a/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/SimpleEncoder/SimpleEncoder_VS2019.vcxproj @@ -90,7 +90,7 @@ - Level3 + Level4 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) $(SolutionDir)../../;%(AdditionalIncludeDirectories) @@ -113,7 +113,7 @@ - Level3 + Level4 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) $(SolutionDir)../../;%(AdditionalIncludeDirectories) @@ -135,7 +135,7 @@ - Level3 + Level4 MaxSpeed @@ -160,7 +160,7 @@ - Level3 + Level4 MaxSpeed diff --git a/amf/public/samples/CPPSamples/TranscodeHW/Makefile b/amf/public/samples/CPPSamples/TranscodeHW/Makefile index 664d643a..7080f1b7 100644 --- a/amf/public/samples/CPPSamples/TranscodeHW/Makefile +++ b/amf/public/samples/CPPSamples/TranscodeHW/Makefile @@ -56,6 +56,7 @@ src_files = \ $(samples_common_dir)/CmdLogger.cpp \ $(samples_common_dir)/DeviceVulkan.cpp \ $(samples_common_dir)/CmdLineParser.cpp \ + $(samples_common_dir)/EncoderParamsAV1.cpp \ $(samples_common_dir)/EncoderParamsAVC.cpp \ $(samples_common_dir)/EncoderParamsHEVC.cpp \ $(samples_common_dir)/ParametersStorage.cpp \ diff --git a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW.cpp b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW.cpp index 2858a63a..56e13c68 100644 --- a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW.cpp +++ b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW.cpp @@ -251,7 +251,7 @@ static const wchar_t* PARAM_NAME_PREVIEW_MODE = L"PREVIEWMODE"; static AMF_RESULT RegisterCodecParams(ParametersStorage* pParams) { - pParams->SetParamDescription(PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265)", ParamConverterCodec); + pParams->SetParamDescription(PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265, AV1)", ParamConverterCodec); return AMF_OK; } @@ -259,23 +259,24 @@ static AMF_RESULT RegisterCodecParams(ParametersStorage* pParams) AMF_RESULT RegisterParams(ParametersStorage* pParams) { pParams->SetParamDescription(PARAM_NAME_OUTPUT, ParamCommon, L"Output file name", NULL); - pParams->SetParamDescription(PARAM_NAME_INPUT, ParamCommon, L"Input file name", NULL); + pParams->SetParamDescription(PARAM_NAME_INPUT, ParamCommon, L"Input file name", NULL); - pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_SCALE_WIDTH, ParamCommon, L"Frame width (integer, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_SCALE_WIDTH, ParamCommon, L"Frame width (integer, default = 0)", ParamConverterInt64); pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_SCALE_HEIGHT, ParamCommon, L"Frame height (integer, default = 0)", ParamConverterInt64); - pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_SCALE_TYPE, ParamCommon, L"Frame height (integer, default = 0)", ParamConverterScaleType); + pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_FRAMES, ParamCommon, L"Number of frames to render (in frames, default = 0 - means all )", ParamConverterInt64); + pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_SCALE_TYPE, ParamCommon, L"Frame height (integer, default = 0)", ParamConverterScaleType); pParams->SetParamDescription(PARAM_NAME_ADAPTERID, ParamCommon, L"Index of GPU adapter (number, default = 0)", NULL); + pParams->SetParamDescription(PARAM_NAME_ENGINE, ParamCommon, L"Specifiy engine type (DX9, DX11, Vulkan)", NULL); - pParams->SetParamDescription(PARAM_NAME_ENGINE, ParamCommon, L"Specifiy engine type (DX9, DX11, Vulkan)", NULL); - pParams->SetParamDescription(TranscodePipeline::PARAM_NAME_FRAMES, ParamCommon, L"Number of frames to render (in frames, default = 0 - means all )", ParamConverterInt64); - + pParams->SetParamDescription(PARAM_NAME_THREADCOUNT, ParamCommon, L"Number of session run ip parallel (number, default = 1)", ParamConverterInt64); + pParams->SetParamDescription(PARAM_NAME_PREVIEW_MODE, ParamCommon, L"Preview Mode (bool, default = false)", ParamConverterBoolean); + pParams->SetParamDescription(PARAM_NAME_COMPUTE_QUEUE, ParamCommon, L"Vulkan Compute Queue Index (integer, default = 0, range [0,queueCount-1])", ParamConverterInt64); + pParams->SetParamDescription(PARAM_NAME_TRACE_LEVEL, ParamCommon, L"Set the trace level (integer, default = 2 - means AMF_TRACE_INFO)", ParamConverterInt64); // to demo frame-specific properties - will be applied to each N-th frame (force IDR) pParams->SetParam(AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, amf_int64(AMF_VIDEO_ENCODER_PICTURE_TYPE_IDR)); - pParams->SetParamDescription(PARAM_NAME_THREADCOUNT, ParamCommon, L"Number of session run ip parallel (number, default = 1)", ParamConverterInt64); - pParams->SetParamDescription(PARAM_NAME_PREVIEW_MODE, ParamCommon, L"Preview Mode (bool, default = false)", ParamConverterInt64); return AMF_OK; } @@ -285,7 +286,7 @@ int _tmain(int argc, _TCHAR* argv[]) int main(int argc, char* argv[]) #endif { - AMF_RESULT res = AMF_OK; // error checking can be added later + AMF_RESULT res = AMF_OK; // error checking can be added later res = g_AMFFactory.Init(); if(res != AMF_OK) { @@ -293,18 +294,6 @@ int main(int argc, char* argv[]) return 1; } - AMFCustomTraceWriter writer(AMF_TRACE_WARNING); -#ifdef _DEBUG - g_AMFFactory.GetDebug()->AssertsEnable(true); - g_AMFFactory.GetTrace()->SetGlobalLevel(AMF_TRACE_INFO); - g_AMFFactory.GetTrace()->SetWriterLevel(AMF_TRACE_WRITER_DEBUG_OUTPUT, AMF_TRACE_INFO); - g_AMFFactory.GetTrace()->SetWriterLevel(AMF_TRACE_WRITER_CONSOLE, AMF_TRACE_INFO); - -#else - g_AMFFactory.GetDebug()->AssertsEnable(false); - g_AMFFactory.GetTrace()->SetGlobalLevel(AMF_TRACE_WARNING); -#endif - amf_increase_timer_precision(); ParametersStorage params; @@ -313,7 +302,7 @@ int main(int argc, char* argv[]) RegisterPreProcessingParams(¶ms); RegisterEncoderParamsAVC(¶ms); RegisterEncoderParamsHEVC(¶ms); - + RegisterEncoderParamsAV1(¶ms); #if defined(_WIN32) if (!parseCmdLineParameters(¶ms)) #else @@ -337,9 +326,36 @@ int main(int argc, char* argv[]) RegisterEncoderParamsHEVC(¶msHEVC); LOG_INFO(paramsHEVC.GetParamUsage()); + LOG_INFO(L"+++ AV1 codec +++"); + ParametersStorage paramsAV1; + RegisterCodecParams(¶msAV1); + RegisterEncoderParamsAV1(¶msAV1); + LOG_INFO(paramsAV1.GetParamUsage()); + return -1; } + + AMFCustomTraceWriter writer(AMF_TRACE_WARNING); + + // check if tracing level change was requested + amf_int64 traceLevel = AMF_TRACE_WARNING; + params.GetParam(PARAM_NAME_TRACE_LEVEL, traceLevel); + +#ifdef _DEBUG + g_AMFFactory.GetDebug()->AssertsEnable(true); + g_AMFFactory.GetTrace()->SetGlobalLevel(traceLevel); + g_AMFFactory.GetTrace()->EnableWriter (AMF_TRACE_WRITER_CONSOLE, true); + g_AMFFactory.GetTrace()->SetWriterLevel(AMF_TRACE_WRITER_CONSOLE, traceLevel); + g_AMFFactory.GetTrace()->EnableWriter (AMF_TRACE_WRITER_DEBUG_OUTPUT, true); + g_AMFFactory.GetTrace()->SetWriterLevel(AMF_TRACE_WRITER_DEBUG_OUTPUT, traceLevel); + +#else + g_AMFFactory.GetDebug()->AssertsEnable(false); + g_AMFFactory.GetTrace()->SetGlobalLevel(traceLevel); +#endif + + // figure out the codec std::wstring codec = AMFVideoEncoderVCE_AVC; params.GetParamWString(PARAM_NAME_CODEC, codec); @@ -359,6 +375,10 @@ int main(int argc, char* argv[]) { RegisterEncoderParamsHEVC(¶ms); } + else if (codec == AMFVideoEncoder_AV1) + { + RegisterEncoderParamsAV1(¶ms); + } else { LOG_ERROR(L"Invalid codec ID"); diff --git a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj index 4721e22f..3bdd2c06 100644 --- a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj @@ -205,6 +205,7 @@ + @@ -241,6 +242,7 @@ + diff --git a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj.filters b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj.filters index fad77bad..7769da1c 100644 --- a/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj.filters +++ b/amf/public/samples/CPPSamples/TranscodeHW/TranscodeHW_VS2019.vcxproj.filters @@ -99,11 +99,14 @@ common - common + common common + + common + @@ -220,11 +223,14 @@ common - common + common common + + common + diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/Makefile b/amf/public/samples/CPPSamples/VCEEncoderD3D/Makefile index 80d5c1fd..ac918f30 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/Makefile +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/Makefile @@ -51,6 +51,7 @@ src_files = \ $(samples_common_dir)/DeviceVulkan.cpp \ $(samples_common_dir)/EncoderParamsAVC.cpp \ $(samples_common_dir)/EncoderParamsHEVC.cpp \ + $(samples_common_dir)/EncoderParamsAV1.cpp \ $(samples_common_dir)/ParametersStorage.cpp \ $(samples_common_dir)/Pipeline.cpp \ $(samples_common_dir)/SwapChainVulkan.cpp \ diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.cpp b/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.cpp index 3f409f5e..aef10a58 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.cpp +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.cpp @@ -257,7 +257,7 @@ AMF_RESULT RenderEncodePipeline::Init(ParametersStorage* pParams, int threadID) pParams->GetParam(PARAM_NAME_ADAPTERID, adapterID); #if defined(_WIN32) - std::wstring renderType = L"DX9"; + std::wstring renderType = L"DX11"; #elif defined(__linux) std::wstring renderType = L"VULKAN"; #endif diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.h b/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.h index 941fce8c..18d6d7c4 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.h +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/RenderEncodePipeline.h @@ -36,6 +36,7 @@ #include "public/include/core/Context.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/components/VideoConverter.h" @@ -43,6 +44,7 @@ #include "../common/ParametersStorage.h" #include "../common/EncoderParamsAVC.h" #include "../common/EncoderParamsHEVC.h" +#include "../common/EncoderParamsAV1.h" #if defined(_WIN32) #include "../common/DeviceDX9.h" diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D.cpp b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D.cpp index cb812b56..73733ef9 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D.cpp +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D.cpp @@ -71,7 +71,7 @@ static AMF_RESULT ParamConverterCodec(const std::wstring& value, amf::AMFVariant */ static AMF_RESULT RegisterCodecParams(ParametersStorage* pParams) { - pParams->SetParamDescription(RenderEncodePipeline::PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265)", ParamConverterCodec); + pParams->SetParamDescription(RenderEncodePipeline::PARAM_NAME_CODEC, ParamCommon, L"Codec name (AVC or H264, HEVC or H265, AV1)", ParamConverterCodec); return AMF_OK; } @@ -137,6 +137,7 @@ int main(int argc, char* argv[]) RegisterCodecParams(¶ms); RegisterEncoderParamsAVC(¶ms); RegisterEncoderParamsHEVC(¶ms); + RegisterEncoderParamsAV1(¶ms); #if defined(_WIN32) if (!parseCmdLineParameters(¶ms)) @@ -155,6 +156,12 @@ int main(int argc, char* argv[]) RegisterCodecParams(¶msHEVC); RegisterEncoderParamsHEVC(¶msHEVC); LOG_INFO(paramsHEVC.GetParamUsage()); + + LOG_INFO(L"+++ AV1 codec +++"); + ParametersStorage paramsAV1; + RegisterCodecParams(¶msAV1); + RegisterEncoderParamsAV1(¶msAV1); + LOG_INFO(paramsAV1.GetParamUsage()); return -1; } @@ -176,6 +183,10 @@ int main(int argc, char* argv[]) { RegisterEncoderParamsHEVC(¶ms); } + else if (codec == AMFVideoEncoder_AV1) + { + RegisterEncoderParamsAV1(¶ms); + } else { LOG_ERROR(L"Invalid codec ID"); diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj index 7380b745..3bc043f0 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj @@ -107,7 +107,7 @@ - xcopy /Y "$(ProgramFiles)\Windows Kits\10\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) + xcopy /Y "$(WindowsSdkDir)\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) @@ -134,7 +134,7 @@ opengl32.lib;DXGI.lib;d3dcompiler.lib;%(AdditionalDependencies) - xcopy /Y "$(ProgramFiles)\Windows Kits\10\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) + xcopy /Y "$(WindowsSdkDir)\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) @@ -156,7 +156,7 @@ true - xcopy /Y "$(ProgramFiles)\Windows Kits\10\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) + xcopy /Y "$(WindowsSdkDir)\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) @@ -181,7 +181,7 @@ $(SolutionDir)..\..\bin\lib\vs2019x$(PlatformArchitecture)$(Configuration)\$(TargetName).lib - xcopy /Y "$(ProgramFiles)\Windows Kits\10\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) + xcopy /Y "$(WindowsSdkDir)\bin\$(TargetPlatformVersion)\$(PlatformShortName)\d3dcompiler_47.dll" $(OutDir) @@ -200,6 +200,7 @@ + @@ -251,6 +252,7 @@ + diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj.filters b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj.filters index cb84a823..77e4e0c7 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj.filters +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/VCEEncoderD3D_VS2019.vcxproj.filters @@ -120,6 +120,9 @@ public\common + + common + @@ -219,6 +222,9 @@ public\common + + common + diff --git a/amf/public/samples/CPPSamples/VCEEncoderD3D/resource.h b/amf/public/samples/CPPSamples/VCEEncoderD3D/resource.h index 14194913..6ed8a65b 100644 --- a/amf/public/samples/CPPSamples/VCEEncoderD3D/resource.h +++ b/amf/public/samples/CPPSamples/VCEEncoderD3D/resource.h @@ -36,7 +36,7 @@ // #define AMF_VERSION_MAJOR 1 #define AMF_VERSION_MINOR 4 -#define AMF_VERSION_RELEASE 26 +#define AMF_VERSION_RELEASE 28 #define AMF_VERSION_BUILD 1 // Next default values for new objects diff --git a/amf/public/samples/CPPSamples/common/AudioPresenterWin.cpp b/amf/public/samples/CPPSamples/common/AudioPresenterWin.cpp index 038d7126..154801e6 100644 --- a/amf/public/samples/CPPSamples/common/AudioPresenterWin.cpp +++ b/amf/public/samples/CPPSamples/common/AudioPresenterWin.cpp @@ -174,6 +174,10 @@ AMF_RESULT AudioPresenterWin::InitDevice() IMMDevice *pDevice = NULL; hr= pDeviceEnumerator->GetDefaultAudioEndpoint(eRender,eMultimedia,&pDevice); + if (E_NOTFOUND == hr) + { + return AMF_NO_DEVICE; + } CHECK_HR(hr); m_pDevice=pDevice; @@ -411,6 +415,7 @@ AMF_RESULT AudioPresenterWin::Present(AMFAudioBuffer *buffer,amf_pts &sleeptime) if(errPush != AMF_OK) { AMFTraceWarning(AMF_FACILITY, L"PushBuffer() failed"); + return ReactivateDevice(); } amf_size uiBufMemSize=pLastBuffer->GetSize(); if(m_uiLastBufferDataOffset>=uiBufMemSize) @@ -651,4 +656,39 @@ AMF_RESULT AudioPresenterWin::Flush() return AMF_OK; } //------------------------------------------------------------------------------------------------- +AMF_RESULT AudioPresenterWin::ReactivateDevice() +{ + amf::AMFLock lock(&m_cs); + AMF_RESULT err = AMF_OK; + + // Activate an IAudioClient object on our preferred endpoint and retrieve the mix format for that endpoint. + IAudioClient* pAudioClient = NULL; + HRESULT hr = ((IMMDevice*)m_pDevice)->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, reinterpret_cast(&pAudioClient)); + if (S_OK == hr) + { + if (m_pRenderClient != NULL) { + AMF_SAFE_RELEASE((IAudioRenderClient*&)m_pRenderClient); + } + m_pRenderClient = NULL; + if (m_pAudioClient != NULL) { + AMF_SAFE_RELEASE((IAudioClient*&)m_pAudioClient); + } + m_pAudioClient = pAudioClient; + + InitClient(); + + Flush(); + + AMFTraceInfo(AMF_FACILITY, L"Audio Device reactivated"); + + err = AMF_OK; + } + else + { + err = AMF_FAIL; + } + + return err; +} +//------------------------------------------------------------------------------------------------- #endif //#if defined(_WIN32) diff --git a/amf/public/samples/CPPSamples/common/AudioPresenterWin.h b/amf/public/samples/CPPSamples/common/AudioPresenterWin.h index 29bca5c9..ca397a7a 100644 --- a/amf/public/samples/CPPSamples/common/AudioPresenterWin.h +++ b/amf/public/samples/CPPSamples/common/AudioPresenterWin.h @@ -90,6 +90,7 @@ class AudioPresenterWin: public AudioPresenter AMF_RESULT SelectFormat(); AMF_RESULT InitClient(); AMF_RESULT PushBuffer(amf::AMFAudioBufferPtr &buffer, amf_size &uiBufferDataOffset); // uiBufferDataOffset - in/out + AMF_RESULT ReactivateDevice(); amf::amf_vector m_UnusedBuffers; diff --git a/amf/public/samples/CPPSamples/common/BitStreamParser.h b/amf/public/samples/CPPSamples/common/BitStreamParser.h index bc76d062..248d5f7c 100644 --- a/amf/public/samples/CPPSamples/common/BitStreamParser.h +++ b/amf/public/samples/CPPSamples/common/BitStreamParser.h @@ -155,7 +155,6 @@ namespace Parser amf_uint32 ue = readUe(data, startBitIdx); // se From Ue amf_uint32 mod2 = ue % 2; - amf_uint32 half = ue / 2; amf_uint32 r = ue / 2 + mod2; if (mod2 == 0) diff --git a/amf/public/samples/CPPSamples/common/BitStreamParserH264.cpp b/amf/public/samples/CPPSamples/common/BitStreamParserH264.cpp index 1b5bfaea..e1e1fa50 100644 --- a/amf/public/samples/CPPSamples/common/BitStreamParserH264.cpp +++ b/amf/public/samples/CPPSamples/common/BitStreamParserH264.cpp @@ -641,7 +641,14 @@ AvcParser::NalUnitType AvcParser::ReadNextNaluUnit(size_t *offset, size_t *nal break; // EOF } } - amf_uint8* data= m_ReadData.GetData() + *offset; + + amf_uint8* data = m_ReadData.GetData(); + if (data == nullptr) // check data before adding the offset + { + return NalUnitTypeUnspecified; // no data read + } + data += *offset; // don't forget the offset! + for(size_t i = 0; i < ready; i++) { amf_uint8 ch = *data++; diff --git a/amf/public/samples/CPPSamples/common/BitStreamParserH265.cpp b/amf/public/samples/CPPSamples/common/BitStreamParserH265.cpp index fd3138d3..0ad188cf 100644 --- a/amf/public/samples/CPPSamples/common/BitStreamParserH265.cpp +++ b/amf/public/samples/CPPSamples/common/BitStreamParserH265.cpp @@ -808,6 +808,11 @@ AMF_RESULT HevcParser::QueryOutput(amf::AMFData** ppData) amf::AMFBufferPtr pictureBuffer; AMF_RESULT ar = m_pContext->AllocBuffer(amf::AMF_MEMORY_HOST, packetSize, &pictureBuffer); + // AMF result check + if (ar != AMF_OK) { + return ar; + } + amf_uint8 *data = (amf_uint8*)pictureBuffer->GetNative(); if(m_bUseStartCodes) { @@ -820,7 +825,7 @@ AMF_RESULT HevcParser::QueryOutput(amf::AMFData** ppData) // copy size amf_uint32 naluSize= (amf_uint32)naluSizes[i]; *data++ = (naluSize >> 24); - *data++ = ((naluSize & 0x00FF0000) >> 16); + *data++ = static_cast(((naluSize & 0x00FF0000) >> 16)); *data++ = ((naluSize & 0x0000FF00) >> 8); *data++ = ((naluSize & 0x000000FF)); @@ -888,7 +893,16 @@ HevcParser::NalUnitHeader HevcParser::ReadNextNaluUnit(size_t *offset, size_t break; // EOF } } - amf_uint8* data= m_ReadData.GetData() + *offset; + + amf_uint8* data = m_ReadData.GetData(); + if (data == nullptr) // check data before adding the offset + { + NalUnitHeader header_nalu; + header_nalu.nal_unit_type = NAL_UNIT_INVALID; + return header_nalu; // no data read + } + data += *offset; // don't forget the offset! + for(size_t i = 0; i < ready; i++) { amf_uint8 ch = *data++; @@ -932,14 +946,12 @@ void HevcParser::FindSPSandPPS() { ExtraDataBuilder extraDataBuilder; - bool newPictureDetected = false; size_t dataOffset = 0; do { size_t naluSize = 0; size_t naluOffset = 0; - size_t naluAnnexBOffset = dataOffset; NalUnitHeader naluHeader = ReadNextNaluUnit(&dataOffset, &naluOffset, &naluSize); if (naluHeader.nal_unit_type == NAL_UNIT_INVALID ) @@ -1199,7 +1211,7 @@ bool HevcParser::PpsData::Parse(amf_uint8 *nalu, size_t size) return true; } //------------------------------------------------------------------------------------------------- -void HevcParser::SpsData::ParsePTL(AMFH265_profile_tier_level_t *ptl, amf_bool profilePresentFlag, amf_uint32 maxNumSubLayersMinus1, amf_uint8 *nalu, size_t size, size_t &offset) +void HevcParser::SpsData::ParsePTL(AMFH265_profile_tier_level_t *ptl, amf_bool profilePresentFlag, amf_uint32 maxNumSubLayersMinus1, amf_uint8 *nalu, size_t /*size*/, size_t& offset) { if(profilePresentFlag) { @@ -1256,7 +1268,7 @@ void HevcParser::SpsData::ParsePTL(AMFH265_profile_tier_level_t *ptl, amf_bool p } } //------------------------------------------------------------------------------------------------- -void HevcParser::SpsData::ParseSubLayerHrdParameters(AMFH265_sub_layer_hrd_parameters *sub_hrd, amf_uint32 CpbCnt, amf_bool sub_pic_hrd_params_present_flag, amf_uint8 *nalu, size_t size,size_t &offset) +void HevcParser::SpsData::ParseSubLayerHrdParameters(AMFH265_sub_layer_hrd_parameters *sub_hrd, amf_uint32 CpbCnt, amf_bool sub_pic_hrd_params_present_flag, amf_uint8 *nalu, size_t /*size*/, size_t& offset) { for (amf_uint32 i=0; i<=CpbCnt; i++) { @@ -1335,7 +1347,7 @@ void HevcParser::SpsData::ParseHrdParameters(AMFH265_hrd_parameters_t *hrd, amf_ } } //------------------------------------------------------------------------------------------------- -void HevcParser::SpsData::ParseScalingList(AMFH265_scaling_list_data_t * s_data, amf_uint8 *nalu, size_t size, size_t &offset) +void HevcParser::SpsData::ParseScalingList(AMFH265_scaling_list_data_t * s_data, amf_uint8 *nalu, size_t /*size*/, size_t& offset) { for (int sizeId=0; sizeId < 4; sizeId++) { @@ -1407,7 +1419,7 @@ void HevcParser::SpsData::ParseScalingList(AMFH265_scaling_list_data_t * s_data, } } } -void HevcParser::SpsData::ParseShortTermRefPicSet(AMFH265_short_term_RPS_t *rps, amf_int32 stRpsIdx, amf_uint32 num_short_term_ref_pic_sets, AMFH265_short_term_RPS_t rps_ref[], amf_uint8 *nalu, size_t size,size_t &offset) +void HevcParser::SpsData::ParseShortTermRefPicSet(AMFH265_short_term_RPS_t *rps, amf_int32 stRpsIdx, amf_uint32 num_short_term_ref_pic_sets, AMFH265_short_term_RPS_t rps_ref[], amf_uint8 *nalu, size_t /*size*/, size_t& offset) { amf_uint32 interRPSPred = 0; amf_uint32 delta_idx_minus1 = 0; @@ -1420,15 +1432,15 @@ void HevcParser::SpsData::ParseShortTermRefPicSet(AMFH265_short_term_RPS_t *rps, if (interRPSPred) { amf_uint32 delta_rps_sign, abs_delta_rps_minus1; - amf_bool used_by_curr_pic_flag[16], use_delta_flag[16]; - if (stRpsIdx == num_short_term_ref_pic_sets) + amf_bool used_by_curr_pic_flag[16] = {0}; + amf_bool use_delta_flag[16] = {0}; + if (unsigned(stRpsIdx) == num_short_term_ref_pic_sets) { delta_idx_minus1 = Parser::ExpGolomb::readUe(nalu, offset); } delta_rps_sign = Parser::getBit(nalu, offset); abs_delta_rps_minus1 = Parser::ExpGolomb::readUe(nalu, offset); amf_int32 delta_rps = (amf_int32) (1 - 2*delta_rps_sign) * (abs_delta_rps_minus1 + 1); - amf_int32 k=0, k0=0, k1=0, k2 = 0, k3 = 0; amf_int32 ref_idx = stRpsIdx - delta_idx_minus1 - 1; for (int j=0; j<= (rps_ref[ref_idx].num_negative_pics + rps_ref[ref_idx].num_positive_pics); j++) { @@ -1605,7 +1617,7 @@ void HevcParser::SpsData::ParseVUI(AMFH265_vui_parameters_t *vui, amf_uint32 max //------------------------------------------------------------------------------------------------- -bool HevcParser::AccessUnitSigns::Parse(amf_uint8 *nalu, size_t size, std::map &spsMap, std::map &ppsMap) +bool HevcParser::AccessUnitSigns::Parse(amf_uint8 *nalu, size_t /*size*/, std::map&/*spsMap*/, std::map& /*ppsMap*/) { size_t offset = 16; // 2 bytes NALU header @@ -1684,16 +1696,16 @@ bool HevcParser::ExtraDataBuilder::GetExtradata(AMFByteArray &extradata) *data++ = NAL_UNIT_SPS; - *data++ = Parser::getLowByte(m_SPSCount); - *data++ = Parser::getHiByte(m_SPSCount); + *data++ = Parser::getLowByte(static_cast(m_SPSCount)); + *data++ = Parser::getHiByte(static_cast(m_SPSCount)); memcpy(data, m_SPSs.GetData(), m_SPSs.GetSize()); data += m_SPSs.GetSize(); *data++ = NAL_UNIT_PPS; - *data++ = Parser::getLowByte(m_PPSCount); - *data++ = Parser::getHiByte(m_PPSCount); + *data++ = Parser::getLowByte(static_cast(m_PPSCount)); + *data++ = Parser::getHiByte(static_cast(m_PPSCount)); memcpy(data, m_PPSs.GetData(), m_PPSs.GetSize()); data += m_PPSs.GetSize(); return true; @@ -1723,7 +1735,7 @@ size_t HevcParser::EBSPtoRBSP(amf_uint8 *streamBuffer,size_t begin_bytepos, size //check the 4th amf_uint8 after 0x000003, except when cabac_zero_word is used, in which case the last three bytes of this NAL unit must be 0x000003 if((streamBuffer_i+1 != streamBuffer_end) && (streamBuffer_i[1] > 0x03)) { - return -1; + return static_cast(-1); } //if cabac_zero_word is used, the final amf_uint8 of this NAL unit(0x03) is discarded, and the last two bytes of RBSP must be 0x0000 if(streamBuffer_i+1 == streamBuffer_end) diff --git a/amf/public/samples/CPPSamples/common/BitStreamParserIVF.cpp b/amf/public/samples/CPPSamples/common/BitStreamParserIVF.cpp index 7a0e59d7..a45e6e0a 100644 --- a/amf/public/samples/CPPSamples/common/BitStreamParserIVF.cpp +++ b/amf/public/samples/CPPSamples/common/BitStreamParserIVF.cpp @@ -96,7 +96,10 @@ IVFParser::IVFParser(amf::AMFDataStream* stream, amf::AMFContext* pContext) : m_bEof(false), m_fps(0), m_maxFramesNumber(0), - m_pContext(pContext) + m_pContext(pContext), + m_codec(IVF_CODEC_UNKNOWN), + m_pheight(0), + m_pwidth(0) { stream->Seek(amf::AMF_SEEK_BEGIN, 0, NULL); size_t ready = m_HeaderData.GetSize(); diff --git a/amf/public/samples/CPPSamples/common/CmdLogger.h b/amf/public/samples/CPPSamples/common/CmdLogger.h index 5a5112ab..3b2d5d27 100644 --- a/amf/public/samples/CPPSamples/common/CmdLogger.h +++ b/amf/public/samples/CPPSamples/common/CmdLogger.h @@ -137,7 +137,7 @@ class AMFCustomTraceWriter : public amf::AMFTraceWriter g_AMFFactory.GetTrace()->UnregisterWriter(L"AMFCustomTraceWriter"); g_AMFFactory.Terminate(); } - virtual void AMF_CDECL_CALL Write(const wchar_t* scope, const wchar_t* message) override + virtual void AMF_CDECL_CALL Write(const wchar_t* /*scope*/, const wchar_t* message) override { WriteLog(message, AMFLogLevelInfo); } diff --git a/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.cpp b/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.cpp index adcef017..7f243bf0 100644 --- a/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.cpp +++ b/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.cpp @@ -1,4 +1,4 @@ -// +// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; @@ -6,9 +6,9 @@ // (collectively, the "Media Technologies"). For clarity, you will pay any // royalties due for such third party technologies, which may include the Media // Technologies that are owed as a result of AMD providing the Software to you. -// -// MIT license -// +// +// MIT license +// // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy @@ -235,15 +235,15 @@ class DisplayDvrPipeline::PipelineElementEncoder : public AMFComponentElement } m_framesSubmitted++; } - return res; + return res; } virtual AMF_RESULT QueryOutput(amf::AMFData** ppData) { AMF_RESULT res = AMFComponentElement::QueryOutput(ppData); if(res == AMF_OK && *ppData != nullptr) { - amf_pts capturePts = (*ppData)->GetPts(); - amf_pts encodedPts = m_pDisplayDvrPipeline->m_pCurrentTime->Get(); + amf_pts capturePts = (*ppData)->GetPts(); + amf_pts encodedPts = m_pDisplayDvrPipeline->m_pCurrentTime->Get(); // AMFTraceInfo(L"Latency", L"latency = %5.2f", (encodedPts - capturePts) / 10000. ); } else @@ -306,7 +306,7 @@ amf_pts DisplayDvrPipeline::GetCurrentPts() } //------------------------------------------------------------------------------------------------- -AMF_RESULT DisplayDvrPipeline::InitContext(const std::wstring& engineStr, amf::AMF_MEMORY_TYPE engineMemoryType, amf_uint32 adapterID) +AMF_RESULT DisplayDvrPipeline::InitContext(const std::wstring& /*engineStr*/, amf::AMF_MEMORY_TYPE engineMemoryType, amf_uint32 adapterID) { AMF_RESULT res = AMF_OK; @@ -389,11 +389,12 @@ AMF_RESULT DisplayDvrPipeline::InitVideo(amf::AMF_MEMORY_TYPE engineMemoryType, res = g_AMFFactory.GetFactory()->CreateComponent(m_pContext, AMFVideoConverter, &m_pConverter); CHECK_AMF_ERROR_RETURN(res, L"g_AMFFactory.GetFactory()->CreateComponent(" << AMFVideoConverter << L") failed"); - m_pConverter->SetProperty(AMF_VIDEO_CONVERTER_MEMORY_TYPE, + m_pConverter->SetProperty(AMF_VIDEO_CONVERTER_COMPUTE_DEVICE, (m_useOpenCLConverter) ? amf::AMF_MEMORY_OPENCL : engineMemoryType); + m_pConverter->SetProperty(AMF_VIDEO_CONVERTER_MEMORY_TYPE, engineMemoryType); m_pConverter->SetProperty(AMF_VIDEO_CONVERTER_OUTPUT_FORMAT, amf::AMF_SURFACE_NV12); m_pConverter->SetProperty(AMF_VIDEO_CONVERTER_OUTPUT_SIZE, AMFConstructSize(scaleWidth, scaleHeight)); - + m_pConverter->Init(m_converterSurfaceFormat, videoWidth, videoHeight); // Init encoder @@ -416,8 +417,21 @@ AMF_RESULT DisplayDvrPipeline::InitVideo(amf::AMF_MEMORY_TYPE engineMemoryType, CHECK_AMF_ERROR_RETURN(res, L"g_AMFFactory.GetFactory()->CreateComponent(" << m_szEncoderID << L") failed"); AMFRate frameRate = { kFrameRate, 1 }; - res = m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_FRAMERATE, frameRate); - CHECK_AMF_ERROR_RETURN(res, L"Failed to set video encoder frame rate"); + if (m_szEncoderID == AMFVideoEncoderVCE_AVC || m_szEncoderID == AMFVideoEncoderVCE_SVC) + { + res = m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_FRAMERATE, frameRate); + CHECK_AMF_ERROR_RETURN(res, L"Failed to set video encoder frame rate"); + } + else if (m_szEncoderID == AMFVideoEncoder_AV1) + { + res = m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, frameRate); + CHECK_AMF_ERROR_RETURN(res, L"Failed to set video encoder frame rate"); + } + else + { + res = m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMERATE, frameRate); + CHECK_AMF_ERROR_RETURN(res, L"Failed to set video encoder frame rate"); + } // Usage is preset that will set many parameters @@ -430,7 +444,18 @@ AMF_RESULT DisplayDvrPipeline::InitVideo(amf::AMF_MEMORY_TYPE engineMemoryType, if (bLowLatency) { - m_pEncoder->SetProperty(m_szEncoderID == AMFVideoEncoderVCE_AVC ? AMF_VIDEO_ENCODER_LOWLATENCY_MODE : AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE, true); + if (m_szEncoderID == AMFVideoEncoderVCE_AVC || m_szEncoderID == AMFVideoEncoderVCE_SVC) + { + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_LOWLATENCY_MODE, true); + } + else if (m_szEncoderID == AMFVideoEncoder_AV1) + { + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE, AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_LOWEST_LATENCY); + } + else + { + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_LOWLATENCY_MODE, true); + } } res = m_pEncoder->Init(amf::AMF_SURFACE_NV12, videoWidth, videoHeight); @@ -589,6 +614,23 @@ AMF_RESULT DisplayDvrPipeline::InitMuxer( m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_FRAMERATE, &frameRate); pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_RATE, frameRate); } + else if (m_szEncoderID == AMFVideoEncoder_AV1) + { + pInput->SetProperty(AMF_STREAM_CODEC_ID, AMF_STREAM_CODEC_ID_AV1); + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, &bitrate); + pInput->SetProperty(AMF_STREAM_BIT_RATE, bitrate); + amf::AMFInterfacePtr pExtraData; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_EXTRA_DATA, &pExtraData); + pInput->SetProperty(AMF_STREAM_EXTRA_DATA, pExtraData); + + AMFSize frameSize; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, &frameSize); + pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_SIZE, frameSize); + + AMFRate frameRate; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, &frameRate); + pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_RATE, frameRate); + } else { pInput->SetProperty(AMF_STREAM_CODEC_ID, AMF_STREAM_CODEC_ID_H265_HEVC); @@ -702,7 +744,7 @@ AMF_RESULT DisplayDvrPipeline::Init() } //--------------------------------------------------------------------------------------------- - // Init audio except the muxer. If audio fails to init then we still allow video to + // Init audio except the muxer. If audio fails to init then we still allow video to // be captured. res = InitAudio(); if (AMF_OK == res) @@ -884,7 +926,7 @@ AMF_RESULT DisplayDvrPipeline::SwitchConverterFormat(amf::AMF_SURFACE_FORMAT for // Init the converter m_pConverter->Init(m_converterSurfaceFormat, videoWidth, videoHeight); ((AMFComponentElementConverterInterceptor*)m_converterInterceptor)->SetBlock(false); - // + // res = AMF_OK; } return res; diff --git a/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.h b/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.h index b22f2c1d..634569a3 100644 --- a/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.h +++ b/amf/public/samples/CPPSamples/common/DisplayDvrPipeline.h @@ -37,6 +37,7 @@ #include "public/include/components/VideoConverter.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/common/CurrentTimeImpl.h" #if !defined(METRO_APP) @@ -50,6 +51,7 @@ #include "ParametersStorage.h" #include "EncoderParamsAVC.h" #include "EncoderParamsHEVC.h" +#include "EncoderParamsAV1.h" #include "BackBufferPresenter.h" diff --git a/amf/public/samples/CPPSamples/common/EncoderParamsAV1.cpp b/amf/public/samples/CPPSamples/common/EncoderParamsAV1.cpp new file mode 100644 index 00000000..1de8b7c5 --- /dev/null +++ b/amf/public/samples/CPPSamples/common/EncoderParamsAV1.cpp @@ -0,0 +1,555 @@ +// +// Notice Regarding Standards. AMD does not provide a license or sublicense to +// any Intellectual Property Rights relating to any standards, including but not +// limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; +// AVC/H.264; HEVC/H.265; AAC decode/FFMPEG; AAC encode/FFMPEG; VC-1; and MP3 +// (collectively, the "Media Technologies"). For clarity, you will pay any +// royalties due for such third party technologies, which may include the Media +// Technologies that are owed as a result of AMD providing the Software to you. +// +// MIT license +// +// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +#include "EncoderParamsAV1.h" + +#include "public/include/components/VideoEncoderAV1.h" +#include "public/samples/CPPSamples/common/CmdLogger.h" + +#include +#include +#include + + +static AMF_RESULT ParamConverterUsageAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_USAGE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"TRANSCODING" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING; + } + else if (uppValue == L"LOWLATENCY" || uppValue == L"1") + { + paramValue = AMF_VIDEO_ENCODER_AV1_USAGE_LOW_LATENCY; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_USAGE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterAlignmentModeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"64X16ONLY" || uppValue == L"1") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY; + } + else if (uppValue == L"64X16A1080P" || uppValue == L"2") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_1080P_CODED_1082; + } + else if (uppValue == L"NORESTRICTIONS" || uppValue == L"3") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterLatencyModeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_NONE; + } + else if (uppValue == L"PWRSAVING" || uppValue == L"1") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_POWER_SAVING_REAL_TIME; + } + else if (uppValue == L"REALTIME" || uppValue == L"2") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_REAL_TIME; + } + else if (uppValue == L"LOWLATENCY" || uppValue == L"3") + { + paramValue = AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_LOWEST_LATENCY; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterProfileAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"MAIN" || uppValue == L"1") + { // only main profile is supported for AV1 encoder + paramValue = AMF_VIDEO_ENCODER_AV1_PROFILE_MAIN; + } + else + { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_PROFILE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterProfileLevelAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_LEVEL_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"2.0" || uppValue == L"20" || uppValue == L"2" || uppValue == L"0") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_2_0; + } + else if (uppValue == L"2.1" || uppValue == L"21" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_2_1; + } + else if (uppValue == L"2.2" || uppValue == L"22" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_2_2; + } + else if (uppValue == L"2.3" || uppValue == L"23" || uppValue == L"3") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_2_3; + } + else if (uppValue == L"3.0" || uppValue == L"30" || uppValue == L"3" || uppValue == L"4") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_3_0; + } + else if (uppValue == L"3.1" || uppValue == L"31" || uppValue == L"5") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_3_1; + } + else if (uppValue == L"3.2" || uppValue == L"31" || uppValue == L"6") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_3_2; + } + else if (uppValue == L"3.3" || uppValue == L"31" || uppValue == L"7") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_3_3; + } + else if (uppValue == L"4.0" || uppValue == L"40" || uppValue == L"4" || uppValue == L"8") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_4_0; + } + else if (uppValue == L"4.1" || uppValue == L"41" || uppValue == L"9") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_4_1; + } + else if (uppValue == L"4.2" || uppValue == L"42" || uppValue == L"10") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_4_2; + } + else if (uppValue == L"4.3" || uppValue == L"42" || uppValue == L"11") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_4_3; + } + else if (uppValue == L"5.0" || uppValue == L"50" || uppValue == L"5" || uppValue == L"12") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_5_0; + } + else if (uppValue == L"5.1" || uppValue == L"51" || uppValue == L"13") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_5_1; + } + else if (uppValue == L"5.2" || uppValue == L"52" || uppValue == L"14") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_5_2; + } + else if (uppValue == L"5.3" || uppValue == L"53" || uppValue == L"15") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_5_3; + } + else if (uppValue == L"6.0" || uppValue == L"60" || uppValue == L"6" || uppValue == L"16") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_6_0; + } + else if (uppValue == L"6.1" || uppValue == L"61" || uppValue == L"17") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_6_1; + } + else if (uppValue == L"6.2" || uppValue == L"62" || uppValue == L"18") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_6_2; + } + else if (uppValue == L"6.3" || uppValue == L"63" || uppValue == L"19") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_6_3; + } + else if (uppValue == L"7.0" || uppValue == L"70" || uppValue == L"7" || uppValue == L"20") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_7_0; + } + else if (uppValue == L"7.1" || uppValue == L"71" || uppValue == L"21") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_7_1; + } + else if (uppValue == L"7.2" || uppValue == L"72" || uppValue == L"22") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_7_2; + } + else if (uppValue == L"7.3" || uppValue == L"73" || uppValue == L"23") { + paramValue = AMF_VIDEO_ENCODER_AV1_LEVEL_7_3; + } + else { + LOG_ERROR(L"ProfileLevel hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterCDEFMode(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_CDEF_MODE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"DISABLE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_CDEF_DISABLE; + } + else if (uppValue == L"ENABLE" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_CDEF_ENABLE_DEFAULT; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_CDEF_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterQualityAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"HIGHQUALITY" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_HIGH_QUALITY; + } + else if (uppValue == L"QUALITY" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_QUALITY; + } + else if (uppValue == L"BALANCED" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_BALANCED; + } + else if (uppValue == L"SPEED" || uppValue == L"3") { + paramValue = AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterRateControlAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"CQP" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CONSTANT_QP; + } + else if (uppValue == L"VBR_LAT" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR; + } + else if (uppValue == L"VBR" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR; + } + else if (uppValue == L"CBR" || uppValue == L"3") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CBR; + } + else if(uppValue == L"QVBR" || uppValue == L"4") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_QUALITY_VBR; + } + else if(uppValue == L"HQVBR" || uppValue == L"5") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR; + } + else if (uppValue == L"HQCBR" || uppValue == L"6") { + paramValue = AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterAQmodeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_AQ_MODE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0"){ + paramValue = AMF_VIDEO_ENCODER_AV1_AQ_MODE_NONE; + } + else if (uppValue == L"CAQ" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_AQ_MODE_CAQ; + } + else + { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_AQ_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterEndUpdateAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"DISABLE" || uppValue == L"0") { + paramValue = AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_DISABLE; + } + else if (uppValue == L"ENABLE" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENABLE_DEFAULT; + } + else + { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterInsertionModeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_NONE; + } + else if (uppValue == L"GOP" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_GOP_ALIGNED; + } + else if (uppValue == L"IDR" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_KEY_FRAME_ALIGNED; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterSwitchInsertionModeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_NONE; + } + else if (uppValue == L"GOP" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_FIXED_INTERVAL; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterFrameTypeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_NONE; + } + else if (uppValue == L"KEY" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_KEY; + } + else if (uppValue == L"INTRA" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_INTRA_ONLY; + } + else if (uppValue == L"SWITCH" || uppValue == L"3") { + paramValue = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_SWITCH; + } + else if (uppValue == L"SHOW" || uppValue == L"4") { + paramValue = AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_SHOW_EXISTING; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterIntraRefreshAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM paramValue; + std::wstring uppValue = toUpper(value); + if (uppValue == L"DISABLE" || uppValue == L"0") + { + paramValue = AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__DISABLED; + } + else if (uppValue == L"GOP" || uppValue == L"1") { + paramValue = AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__GOP_ALIGNED; + } + else if (uppValue == L"CONTINUOUS" || uppValue == L"2") { + paramValue = AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE__CONTINUOUS; + } + else { + LOG_ERROR(L"AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +static AMF_RESULT ParamConverterTAQModeAV1(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_TAQ_MODE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_PA_TAQ_MODE_NONE; + } + else if (uppValue == L"ONE" || uppValue == L"1") { + paramValue = AMF_PA_TAQ_MODE_1; + } + else if (uppValue == L"TWO" || uppValue == L"2") { + paramValue = AMF_PA_TAQ_MODE_2; + } + else { + LOG_ERROR(L"AMF_PA_TAQ_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +AMF_RESULT RegisterEncoderParamsAV1(ParametersStorage* pParams) +{ + pParams->SetParamDescription(SETFRAMEPARAMFREQ_PARAM_NAME, ParamCommon, L"Frequency of applying frame parameters (in frames, default = 0 )", ParamConverterInt64); + pParams->SetParamDescription(SETDYNAMICPARAMFREQ_PARAM_NAME, ParamCommon, L"Frequency of applying dynamic parameters. (in frames, default = 0 )", ParamConverterInt64); + + // ------------- Encoder params usage--------------- + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_USAGE, ParamEncoderUsage, L"Encoder usage type. Set many default parameters. (TRANSCODING, LOWLATENCY, default = N/A)", ParamConverterUsageAV1); + + // ------------- Encoder params static--------------- + // Encoder Engine Settings + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ENCODING_LATENCY_MODE, ParamEncoderStatic, L"Enables low latency mode ( NONE, PWRSAVING, REALTIME, LOWLATENCY, default = false)", ParamConverterLatencyModeAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ENCODER_INSTANCE_INDEX, ParamEncoderStatic, L" Index of VCN instance 0, 1 etc, default = 0", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_QUERY_TIMEOUT, ParamEncoderStatic, L" QueryOutput timeout in ms , default = 0", ParamConverterInt64); + // Session Configuration + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH, ParamEncoderStatic, L"8 bit (integer, default = 8)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_PROFILE, ParamEncoderStatic, L"AV1 profile (Main, default = Main)", ParamConverterProfileAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_TILES_PER_FRAME, ParamEncoderStatic, L"Number of tiles Per Frame. This is treated as suggestion (integer, default = 1)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_LEVEL, ParamEncoderStatic, L"AV1 profile level (float or integer, default = based on HW", ParamConverterProfileLevelAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, ParamEncoderStatic, L"Quality Preset (BALANCED, SPEED, QUALITY default = depends on USAGE)", ParamConverterQualityAV1); + // Codec Configuration + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_SCREEN_CONTENT_TOOLS, ParamEncoderStatic, L"Allow enabling screen content tools (true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ORDER_HINT, ParamEncoderStatic, L"Code order hint (true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FRAME_ID, ParamEncoderStatic, L"Code frame id (true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_TILE_GROUP_OBU, ParamEncoderStatic, L"Code FrameHeaderObu + TileGroupObu and each TileGroupObu contains one tile (true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_CDEF_MODE, ParamEncoderStatic, L"Cdef mode (ENABLE, DISABLE default = depends on USAGE)", ParamConverterCDEFMode); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ERROR_RESILIENT_MODE, ParamEncoderStatic, L"Enable error resilient mode (true, false default = depends on USAGE)", ParamConverterBoolean); + // Rate Control and Quality Enhancement + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD, ParamEncoderStatic, L"Rate Control Method (CQP, CBR, VBR, VBR_LAT default = depends on USAGE)", ParamConverterRateControlAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_INITIAL_VBV_BUFFER_FULLNESS, ParamEncoderStatic, L"Initial VBV Buffer Fullness (integer, 0=0% 64=100% ,default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_PREENCODE, ParamEncoderStatic, L"Enable pre-encode assist in rate control (true, false default = false)", ParamConverterBoolean); + //QVBR Property + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_QVBR_QUALITY_LEVEL, ParamEncoderStatic, L"QVBR Quality Level (integer, default = 23)", ParamConverterInt64); + + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_HIGH_MOTION_QUALITY_BOOST, ParamEncoderStatic, L"High motion quality boost mode enabled(true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_AQ_MODE, ParamEncoderStatic, L"AQ mode (NONE, CAQ default = depends on USAGE)", ParamConverterAQmodeAV1); + // Picture Management Configuration + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MAX_NUM_TEMPORAL_LAYERS, ParamEncoderStatic, L" Max Of LTR frames (integer, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MAX_LTR_FRAMES, ParamEncoderStatic, L" Max Of LTR frames (integer, default = depends on USAGE)", ParamConverterInt64); + + // AV1 Alignment mode + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE, ParamEncoderStatic, L"AV1 Alignment mode. (64X16ONLY=1, 64X16A1080P=2, NORESTRICTIONS=3, default = 1)", ParamConverterAlignmentModeAV1); + + // ------------- Encoder params dynamic --------------- + // Codec Configuration + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_PALETTE_MODE, ParamEncoderDynamic, L"Enable palette mode (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FORCE_INTEGER_MV, ParamEncoderDynamic, L"Enable force integer MV (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_CDF_UPDATE, ParamEncoderDynamic, L"Enable CDF update (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE, ParamEncoderDynamic, L"Enable CDF update (true, false default = false)", ParamConverterEndUpdateAV1); + // Rate Control and Quality Enhancement + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_VBV_BUFFER_SIZE, ParamEncoderDynamic, L"VBV Buffer Size (in bits, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FRAMERATE, ParamEncoderDynamic, L"Frame Rate (num,den), default = depends on USAGE)", ParamConverterRate); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_ENFORCE_HRD, ParamEncoderDynamic, L"Enforce HRD (true, false default = depends on USAGE)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FILLER_DATA, ParamEncoderDynamic, L"Filler Data Enable (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, ParamEncoderDynamic, L"Target bit rate (in bits, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_PEAK_BITRATE, ParamEncoderDynamic, L"Peak bit rate (in bits, default = depends on USAGE)", ParamConverterInt64); + + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MAX_COMPRESSED_FRAME_SIZE, ParamEncoderDynamic, L"Max compressed frame Size in bits (in bits, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTRA, ParamEncoderDynamic, L"Min QIndex for intra frame (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTRA, ParamEncoderDynamic, L"Max QIndex for intra frame (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MIN_Q_INDEX_INTER, ParamEncoderDynamic, L"Min QIndex for inter frame (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MAX_Q_INDEX_INTER, ParamEncoderDynamic, L"Max QIndex for inter frame (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTRA, ParamEncoderDynamic, L"intra-frame QIndex (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_Q_INDEX_INTER, ParamEncoderDynamic, L"inter-frame QIndex (integer 0-255, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_SKIP_FRAME, ParamEncoderDynamic, L"Rate Control Based Frame Skip (true, false default = depends on USAGE)", ParamConverterBoolean); + // Picture Management Configuration + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_GOP_SIZE, ParamEncoderDynamic, L"GOP Size (in frames, depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_HEADER_INSERTION_MODE, ParamEncoderDynamic, L"Insertion mode (none, gop, idr default = depends on USAGE)", ParamConverterInsertionModeAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INSERTION_MODE, ParamEncoderDynamic, L"Switch frame insertin mode (none, fixed default = depends on USAGE)", ParamConverterSwitchInsertionModeAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_SWITCH_FRAME_INTERVAL, ParamEncoderDynamic, L"The interval between two inserted switch frames (integer, default = depends on USAGE)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_NUM_TEMPORAL_LAYERS, ParamEncoderDynamic, L"Number of temporal layers (integer, default = depends on USAGE)", ParamConverterInt64); + //pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_TEMPORAL_LAYER_SELECT, ParamEncoderDynamic, L"Select temporal layer to apply parameter changes and queries (integer, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_INTRA_REFRESH_MODE, ParamEncoderDynamic, L"Intra Refresh mode (disable, GOP aligned, continuous, default = disable)", ParamConverterIntraRefreshAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_INTRAREFRESH_STRIPES, ParamEncoderDynamic, L"Frame numbers for an Intra Refresh cycle (integer, default = 0)", ParamConverterInt64); + // ------------- Encoder params per frame --------------- + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FORCE_FRAME_TYPE, ParamEncoderFrame, L"Generate particular frame type (key, intra, inter, switch, show default = N/A)", ParamConverterFrameTypeAV1); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FORCE_INSERT_SEQUENCE_HEADER, ParamEncoderFrame, L"Force insert sequence header (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_MARK_CURRENT_WITH_LTR_INDEX, ParamEncoderFrame, L"Mark With LTR Index (integer, default -1)", ParamConverterInt64); + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_FORCE_LTR_REFERENCE_BITFIELD, ParamEncoderFrame, L"Force LTR Reference Bitfield (integer default = 0)", ParamConverterInt64); + + + // PA parameters + pParams->SetParamDescription(AMF_VIDEO_ENCODER_AV1_PRE_ANALYSIS_ENABLE, ParamEncoderStatic, L"Enable PA (true, false default = false)", ParamConverterBoolean); + + pParams->SetParamDescription(AMF_PA_ENGINE_TYPE, ParamEncoderStatic, L"Engine Type (DX11, OPENCL, HOST default = OPENCL)", ParamConverterMemoryType); + + pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_ENABLE, ParamEncoderDynamic, L"Scene Change Detection Enable (true, false default = true)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterSceneChange); + pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_ENABLE, ParamEncoderDynamic, L"Static Scene Detection Enable (true, false default = false)", ParamConverterBoolean); + pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = HIGH)", ParamConverterStaticScene); + pParams->SetParamDescription(AMF_PA_FRAME_SAD_ENABLE, ParamEncoderDynamic, L"Enable Frame SAD algorithm (true, false default = true", ParamConverterBoolean); + pParams->SetParamDescription(AMF_PA_ACTIVITY_TYPE, ParamEncoderDynamic, L"Activity Type (Y, YUV default = Y)", ParamConverterActivityType); + pParams->SetParamDescription(AMF_PA_LTR_ENABLE, ParamEncoderStatic, L"Auto LTR Enable (true, false default = false)", ParamConverterBoolean); + + pParams->SetParamDescription(AMF_PA_INITIAL_QP_AFTER_SCENE_CHANGE, ParamEncoderDynamic, L"QP After Scene Change (integer 0-51, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(AMF_PA_MAX_QP_BEFORE_FORCE_SKIP, ParamEncoderDynamic, L"Max QP Before Force Skip (integer 0-51, default = 35)", ParamConverterInt64); + pParams->SetParamDescription(AMF_PA_CAQ_STRENGTH, ParamEncoderDynamic, L"CAQ Strength (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterCAQStrength); + pParams->SetParamDescription(AMF_PA_PAQ_MODE, ParamEncoderDynamic, L"PAQ Mode (NONE, CAQ, default = NONE)", ParamConverterPAQMode); + pParams->SetParamDescription(AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE, ParamEncoderDynamic, L"High Motion Quality Boost Mode (NONE, AUTO, default = NONE)", ParamConverterHighMotionQualityBoostMode); + + pParams->SetParamDescription(AMF_PA_LOOKAHEAD_BUFFER_DEPTH, ParamEncoderDynamic, L"PA Buffer size (integer 0 - MAX_LOOKAHEAD_DEPTH, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(AMF_PA_TAQ_MODE, ParamEncoderDynamic, L"TAQ Mode (NONE, 1, 2, default = NONE)", ParamConverterTAQModeAV1); + + + return AMF_OK; +} \ No newline at end of file diff --git a/amf/public/samples/CPPSamples/common/EncoderParamsAV1.h b/amf/public/samples/CPPSamples/common/EncoderParamsAV1.h new file mode 100644 index 00000000..e66bd8e6 --- /dev/null +++ b/amf/public/samples/CPPSamples/common/EncoderParamsAV1.h @@ -0,0 +1,6 @@ +#pragma once + +#include "public/samples/CPPSamples/common/ParametersStorage.h" + + +AMF_RESULT RegisterEncoderParamsAV1(ParametersStorage* pParams); diff --git a/amf/public/samples/CPPSamples/common/EncoderParamsAVC.cpp b/amf/public/samples/CPPSamples/common/EncoderParamsAVC.cpp index 0f1f6532..3ae6c12b 100644 --- a/amf/public/samples/CPPSamples/common/EncoderParamsAVC.cpp +++ b/amf/public/samples/CPPSamples/common/EncoderParamsAVC.cpp @@ -83,9 +83,9 @@ static AMF_RESULT ParamConverterQualityAVC(const std::wstring& value, amf::AMFVa if(uppValue == L"BALANCED" || uppValue== L"0") { paramValue = AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED; - } else if(uppValue == L"SPEED" || uppValue== L"1") { + } else if (uppValue == L"SPEED" || uppValue == L"1") { paramValue = AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED; - } else if(uppValue == L"QUALITY" || uppValue== L"2") { + } else if (uppValue == L"QUALITY" || uppValue == L"2") { paramValue = AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY; } else { LOG_ERROR(L"AMF_VIDEO_ENCODER_QUALITY_PRESET_ENUM hasn't \"" << value << L"\" value."); @@ -219,7 +219,6 @@ static AMF_RESULT ParamConverterRateControlAVC(const std::wstring& value, amf::A return AMF_OK; } - static AMF_RESULT ParamConverterPictureTypeAVC(const std::wstring& value, amf::AMFVariant& valueOut) { AMF_VIDEO_ENCODER_PICTURE_TYPE_ENUM paramValue; @@ -281,115 +280,6 @@ static AMF_RESULT ParamEncoding(const std::wstring& value, amf::AMFVariant& valu return AMF_OK; } -static AMF_RESULT ParamConverterSceneChangeAVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterStaticSceneAVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterActivityTypeAVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_ACTIVITY_TYPE_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"Y") - { - paramValue = AMF_PA_ACTIVITY_Y; - } - else if (uppValue == L"YUV") { - paramValue = AMF_PA_ACTIVITY_YUV; - } - else { - LOG_ERROR(L"AMF_PA_ACTIVITY_TYPE_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterCAQStrengthAVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_CAQ_STRENGTH_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_CAQ_STRENGTH_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_CAQ_STRENGTH_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_CAQ_STRENGTH_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_CAQ_STRENGTH_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterPAQModeAVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_PAQ_MODE_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"NONE" || uppValue == L"0") - { - paramValue = AMF_PA_PAQ_MODE_NONE; - } - else if (uppValue == L"CAQ" || uppValue == L"1") { - paramValue = AMF_PA_PAQ_MODE_CAQ; - } - else { - LOG_ERROR(L"AMF_PA_PAQ_MODE_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - static AMF_RESULT ParamConverterTAQModeAVC(const std::wstring& value, amf::AMFVariant& valueOut) { AMF_PA_TAQ_MODE_ENUM paramValue; @@ -402,6 +292,9 @@ static AMF_RESULT ParamConverterTAQModeAVC(const std::wstring& value, amf::AMFVa else if (uppValue == L"ONE" || uppValue == L"1") { paramValue = AMF_PA_TAQ_MODE_1; } + else if (uppValue == L"TWO" || uppValue == L"2") { + paramValue = AMF_PA_TAQ_MODE_2; + } else { LOG_ERROR(L"AMF_PA_TAQ_MODE_ENUM hasn't \"" << value << L"\" value."); return AMF_INVALID_ARG; @@ -418,6 +311,7 @@ AMF_RESULT RegisterEncoderParamsAVC(ParametersStorage* pParams) // ------------- Encoder params usage--------------- pParams->SetParamDescription(AMF_VIDEO_ENCODER_USAGE, ParamEncoderUsage, L"Encoder usage type. Set many default parameters. (TRANSCODING, ULTRALOWLATENCY, LOWLATENCY, WEBCAM, HIGHQUALITY (or HQ), LOWLATENCYHIGHQUALITY (or LLHQ), default = N/A)", ParamConverterUsageAVC); + // ------------- Encoder params static--------------- pParams->SetParamDescription(AMF_VIDEO_ENCODER_INSTANCE_INDEX, ParamEncoderStatic, L" Index of VCN instance 0, 1 etc, default = 0", ParamConverterInt64); pParams->SetParamDescription(AMF_VIDEO_ENCODER_QUERY_TIMEOUT, ParamEncoderStatic, L" QueryOutput timeout in ms , default = 0", ParamConverterInt64); @@ -487,21 +381,21 @@ AMF_RESULT RegisterEncoderParamsAVC(ParametersStorage* pParams) pParams->SetParamDescription(AMF_PA_ENGINE_TYPE, ParamEncoderStatic, L"Engine Type (DX11, OPENCL, HOST default = OPENCL)", ParamConverterMemoryType); pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_ENABLE, ParamEncoderDynamic, L"Scene Change Detection Enable (true, false default = true)", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterSceneChangeAVC); + pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterSceneChange); pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_ENABLE, ParamEncoderDynamic, L"Static Scene Detection Enable (true, false default = false)", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = HIGH)", ParamConverterStaticSceneAVC); + pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = HIGH)", ParamConverterStaticScene); pParams->SetParamDescription(AMF_PA_FRAME_SAD_ENABLE, ParamEncoderDynamic, L"Enable Frame SAD algorithm (true, false default = true", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_ACTIVITY_TYPE, ParamEncoderDynamic, L"Activity Type (Y, YUV default = Y)", ParamConverterActivityTypeAVC); + pParams->SetParamDescription(AMF_PA_ACTIVITY_TYPE, ParamEncoderDynamic, L"Activity Type (Y, YUV default = Y)", ParamConverterActivityType); pParams->SetParamDescription(AMF_PA_LTR_ENABLE, ParamEncoderStatic, L"Auto LTR Enable (true, false default = false)", ParamConverterBoolean); pParams->SetParamDescription(AMF_PA_INITIAL_QP_AFTER_SCENE_CHANGE, ParamEncoderDynamic, L"QP After Scene Change (integer 0-51, default = 0)", ParamConverterInt64); pParams->SetParamDescription(AMF_PA_MAX_QP_BEFORE_FORCE_SKIP, ParamEncoderDynamic, L"Max QP Before Force Skip (integer 0-51, default = 35)", ParamConverterInt64); - pParams->SetParamDescription(AMF_PA_CAQ_STRENGTH, ParamEncoderDynamic, L"CAQ Strength (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterCAQStrengthAVC); - pParams->SetParamDescription(AMF_PA_PAQ_MODE, ParamEncoderDynamic, L"PAQ Mode (NONE, CAQ, default = NONE)", ParamConverterPAQModeAVC); + pParams->SetParamDescription(AMF_PA_CAQ_STRENGTH, ParamEncoderDynamic, L"CAQ Strength (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterCAQStrength); + pParams->SetParamDescription(AMF_PA_PAQ_MODE, ParamEncoderDynamic, L"PAQ Mode (NONE, CAQ, default = NONE)", ParamConverterPAQMode); pParams->SetParamDescription(AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE, ParamEncoderDynamic, L"High Motion Quality Boost Mode (NONE, AUTO, default = NONE)", ParamConverterHighMotionQualityBoostMode); pParams->SetParamDescription(AMF_PA_LOOKAHEAD_BUFFER_DEPTH, ParamEncoderDynamic, L"PA Buffer size (integer 0 - MAX_LOOKAHEAD_DEPTH, default = 0)", ParamConverterInt64); - pParams->SetParamDescription(AMF_PA_TAQ_MODE, ParamEncoderDynamic, L"TAQ Mode (NONE, 1, default = NONE)", ParamConverterTAQModeAVC); + pParams->SetParamDescription(AMF_PA_TAQ_MODE, ParamEncoderDynamic, L"TAQ Mode (NONE, 1, 2, default = NONE)", ParamConverterTAQModeAVC); return AMF_OK; } diff --git a/amf/public/samples/CPPSamples/common/EncoderParamsHEVC.cpp b/amf/public/samples/CPPSamples/common/EncoderParamsHEVC.cpp index 23bae4f7..237d6cd6 100644 --- a/amf/public/samples/CPPSamples/common/EncoderParamsHEVC.cpp +++ b/amf/public/samples/CPPSamples/common/EncoderParamsHEVC.cpp @@ -83,9 +83,9 @@ static AMF_RESULT ParamConverterQualityHEVC(const std::wstring& value, amf::AMFV if(uppValue == L"BALANCED" || uppValue== L"0") { paramValue = AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED; - } else if(uppValue == L"SPEED" || uppValue== L"1") { + } else if (uppValue == L"SPEED" || uppValue == L"1") { paramValue = AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED; - } else if(uppValue == L"QUALITY" || uppValue== L"2") { + } else if (uppValue == L"QUALITY" || uppValue == L"2") { paramValue = AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY; } else { LOG_ERROR(L"AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_ENUM hasn't \"" << value << L"\" value."); @@ -109,7 +109,6 @@ static AMF_RESULT ParamConverterProfileHEVC(const std::wstring& value, amf::AMFV valueOut = amf_int64(paramValue); return AMF_OK; } - static AMF_RESULT ParamConverterTierHEVC(const std::wstring& value, amf::AMFVariant& valueOut) { AMF_VIDEO_ENCODER_HEVC_TIER_ENUM paramValue; @@ -181,6 +180,12 @@ static AMF_RESULT ParamConverterRateControlHEVC(const std::wstring& value, amf:: paramValue = AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR; } else if(uppValue == L"CBR" || uppValue == L"3") { paramValue = AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR; + } else if(uppValue == L"QVBR" || uppValue == L"4") { + paramValue = AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_QUALITY_VBR; + } else if(uppValue == L"HQVBR" || uppValue == L"5") { + paramValue = AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR; + } else if(uppValue == L"HQCBR" || uppValue == L"6") { + paramValue = AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR; } else { LOG_ERROR(L"AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD hasn't \"" << value << L"\" value."); return AMF_INVALID_ARG; @@ -189,7 +194,6 @@ static AMF_RESULT ParamConverterRateControlHEVC(const std::wstring& value, amf:: return AMF_OK; } - static AMF_RESULT ParamConverterPictureTypeHEVC(const std::wstring& value, amf::AMFVariant& valueOut) { AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_ENUM paramValue; @@ -232,109 +236,23 @@ static AMF_RESULT ParamConverterInsertionModeHEVC(const std::wstring& value, amf return AMF_OK; } -static AMF_RESULT ParamConverterSceneChangeHEVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterStaticSceneHEVC(const std::wstring& value, amf::AMFVariant& valueOut) +static AMF_RESULT ParamConverterTAQModeHEVC(const std::wstring& value, amf::AMFVariant& valueOut) { - AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterActivityTypeHEVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_ACTIVITY_TYPE_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"Y") - { - paramValue = AMF_PA_ACTIVITY_Y; - } - else if (uppValue == L"YUV") { - paramValue = AMF_PA_ACTIVITY_YUV; - } - else { - LOG_ERROR(L"AMF_PA_ACTIVITY_TYPE_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterCAQStrengthHEVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_CAQ_STRENGTH_ENUM paramValue; - - std::wstring uppValue = toUpper(value); - if (uppValue == L"LOW" || uppValue == L"0") - { - paramValue = AMF_PA_CAQ_STRENGTH_LOW; - } - else if (uppValue == L"MEDIUM" || uppValue == L"1") { - paramValue = AMF_PA_CAQ_STRENGTH_MEDIUM; - } - else if (uppValue == L"HIGH" || uppValue == L"2") { - paramValue = AMF_PA_CAQ_STRENGTH_HIGH; - } - else { - LOG_ERROR(L"AMF_PA_CAQ_STRENGTH_ENUM hasn't \"" << value << L"\" value."); - return AMF_INVALID_ARG; - } - valueOut = amf_int64(paramValue); - return AMF_OK; -} - -static AMF_RESULT ParamConverterPAQModeHEVC(const std::wstring& value, amf::AMFVariant& valueOut) -{ - AMF_PA_PAQ_MODE_ENUM paramValue; + AMF_PA_TAQ_MODE_ENUM paramValue; std::wstring uppValue = toUpper(value); if (uppValue == L"NONE" || uppValue == L"0") { - paramValue = AMF_PA_PAQ_MODE_NONE; + paramValue = AMF_PA_TAQ_MODE_NONE; + } + else if (uppValue == L"ONE" || uppValue == L"1") { + paramValue = AMF_PA_TAQ_MODE_1; } - else if (uppValue == L"CAQ" || uppValue == L"1") { - paramValue = AMF_PA_PAQ_MODE_CAQ; + else if (uppValue == L"TWO" || uppValue == L"2") { + paramValue = AMF_PA_TAQ_MODE_2; } else { - LOG_ERROR(L"AMF_PA_PAQ_MODE_ENUM hasn't \"" << value << L"\" value."); + LOG_ERROR(L"AMF_PA_TAQ_MODE_ENUM hasn't \"" << value << L"\" value."); return AMF_INVALID_ARG; } valueOut = amf_int64(paramValue); @@ -349,6 +267,7 @@ AMF_RESULT RegisterEncoderParamsHEVC(ParametersStorage* pParams) // ------------- Encoder params usage--------------- pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_USAGE, ParamEncoderUsage, L"Encoder usage type. Set many default parameters. (TRANSCODING, ULTRALOWLATENCY, LOWLATENCY, WEBCAM, HIGHQUALITY (or HQ), LOWLATENCYHIGHQUALITY (or LLHQ), default = N/A)", ParamConverterUsageHEVC); + // ------------- Encoder params static--------------- pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_INSTANCE_INDEX, ParamEncoderStatic, L" Index of VCN instance 0, 1 etc, default = 0", ParamConverterInt64); pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_QUERY_TIMEOUT, ParamEncoderStatic, L" QueryOutput timeout in ms , default = 0", ParamConverterInt64); @@ -374,7 +293,7 @@ AMF_RESULT RegisterEncoderParamsHEVC(ParametersStorage* pParams) // color conversion pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH, ParamEncoderStatic, L"8 or 10 bit (integer, default = 8)", ParamConverterInt64); -// Rate control properties + // Rate control properties pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_FRAMERATE, ParamEncoderStatic, L"Frame Rate (num,den), default = depends on USAGE)", ParamConverterRate); pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE, ParamEncoderStatic, L"VBV Buffer Size (in bits, default = depends on USAGE)", ParamConverterInt64); pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_INITIAL_VBV_BUFFER_FULLNESS, ParamEncoderStatic, L"Initial VBV Buffer Fullness (integer, 0=0% 64=100% , default = 64)", ParamConverterInt64); @@ -383,6 +302,9 @@ AMF_RESULT RegisterEncoderParamsHEVC(ParametersStorage* pParams) pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD, ParamEncoderStatic, L"Rate Control Method (CQP, CBR, VBR, VBR_LAT default = depends on USAGE)", ParamConverterRateControlHEVC); pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_PREENCODE_ENABLE, ParamEncoderStatic, L"Enable 2 Pass Preanalysis(true, false default = depends on USAGE)", ParamConverterBoolean); + //QVBR Property + pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_QVBR_QUALITY_LEVEL, ParamEncoderStatic, L"QVBR Quality Level (integer, default = 23)", ParamConverterInt64); + // Motion estimation pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_MOTION_HALF_PIXEL, ParamEncoderStatic, L"Half Pixel (true, false default = true)" , ParamConverterBoolean); pParams->SetParamDescription(AMF_VIDEO_ENCODER_HEVC_MOTION_QUARTERPIXEL, ParamEncoderStatic, L"Quarter Pixel (true, false default = true" , ParamConverterBoolean); @@ -417,17 +339,22 @@ AMF_RESULT RegisterEncoderParamsHEVC(ParametersStorage* pParams) pParams->SetParamDescription(AMF_PA_ENGINE_TYPE, ParamEncoderStatic, L"Engine Type (DX11, OPENCL, HOST default = OPENCL)", ParamConverterMemoryType); pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_ENABLE, ParamEncoderDynamic, L"Scene Change Detection Enable (true, false default = true)", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterSceneChangeHEVC); + pParams->SetParamDescription(AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterSceneChange); pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_ENABLE, ParamEncoderDynamic, L"Static Scene Detection Enable (true, false default = false)", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = HIGH)", ParamConverterStaticSceneHEVC); + pParams->SetParamDescription(AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY, ParamEncoderDynamic, L"Scene Change Detection Sensitivity (LOW, MEDIUM, HIGH default = HIGH)", ParamConverterStaticScene); pParams->SetParamDescription(AMF_PA_FRAME_SAD_ENABLE, ParamEncoderDynamic, L"Enable Frame SAD algorithm (true, false default = true", ParamConverterBoolean); - pParams->SetParamDescription(AMF_PA_ACTIVITY_TYPE, ParamEncoderDynamic, L"Activity Type (Y, YUV default = Y)", ParamConverterActivityTypeHEVC); + pParams->SetParamDescription(AMF_PA_ACTIVITY_TYPE, ParamEncoderDynamic, L"Activity Type (Y, YUV default = Y)", ParamConverterActivityType); pParams->SetParamDescription(AMF_PA_LTR_ENABLE, ParamEncoderStatic, L"Auto LTR Enable (true, false default = false)", ParamConverterBoolean); pParams->SetParamDescription(AMF_PA_INITIAL_QP_AFTER_SCENE_CHANGE, ParamEncoderDynamic, L"QP After Scene Change (integer 0-51, default = 0)", ParamConverterInt64); pParams->SetParamDescription(AMF_PA_MAX_QP_BEFORE_FORCE_SKIP, ParamEncoderDynamic, L"Max QP Before Force Skip (integer 0-51, default = 35)", ParamConverterInt64); - pParams->SetParamDescription(AMF_PA_CAQ_STRENGTH, ParamEncoderDynamic, L"CAQ Strength (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterCAQStrengthHEVC); - pParams->SetParamDescription(AMF_PA_PAQ_MODE, ParamEncoderDynamic, L"PAQ Mode (NONE, CAQ, default = NONE)", ParamConverterPAQModeHEVC); + pParams->SetParamDescription(AMF_PA_CAQ_STRENGTH, ParamEncoderDynamic, L"CAQ Strength (LOW, MEDIUM, HIGH default = MEDIUM)", ParamConverterCAQStrength); + pParams->SetParamDescription(AMF_PA_PAQ_MODE, ParamEncoderDynamic, L"PAQ Mode (NONE, CAQ, default = NONE)", ParamConverterPAQMode); + pParams->SetParamDescription(AMF_PA_HIGH_MOTION_QUALITY_BOOST_MODE, ParamEncoderDynamic, L"High Motion Quality Boost Mode (NONE, AUTO, default = NONE)", ParamConverterHighMotionQualityBoostMode); + + pParams->SetParamDescription(AMF_PA_LOOKAHEAD_BUFFER_DEPTH, ParamEncoderDynamic, L"PA Buffer size (integer 0 - MAX_LOOKAHEAD_DEPTH, default = 0)", ParamConverterInt64); + pParams->SetParamDescription(AMF_PA_TAQ_MODE, ParamEncoderDynamic, L"TAQ Mode (NONE, 1, default = NONE)", ParamConverterTAQModeHEVC); + return AMF_OK; } diff --git a/amf/public/samples/CPPSamples/common/ParametersStorage.cpp b/amf/public/samples/CPPSamples/common/ParametersStorage.cpp index b887e0d7..6bd8285e 100644 --- a/amf/public/samples/CPPSamples/common/ParametersStorage.cpp +++ b/amf/public/samples/CPPSamples/common/ParametersStorage.cpp @@ -38,6 +38,7 @@ #include "public/include/components/VideoDecoderUVD.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/components/VideoConverter.h" #include "public/include/components/HQScaler.h" @@ -273,10 +274,14 @@ AMF_RESULT ParamConverterMemoryType(const std::wstring& value, amf::AMFVariant& { paramValue = amf::AMF_MEMORY_HOST; }else - if (uppValue == L"VULKAN" || uppValue == L"10") - { - paramValue = amf::AMF_MEMORY_VULKAN; - } + if (uppValue == L"VULKAN" || uppValue == L"10") + { + paramValue = amf::AMF_MEMORY_VULKAN; + }else + if (uppValue == L"DX12" || uppValue == L"11") + { + paramValue = amf::AMF_MEMORY_DX12; + } valueOut = amf_int64(paramValue); return AMF_OK; } @@ -555,8 +560,8 @@ AMF_RESULT ParamConverterCodec(const std::wstring& value, amf::AMFVariant& value std::wstring paramValue; std::wstring uppValue = toUpper(value); - if (value == AMFVideoEncoderVCE_AVC || value == AMFVideoEncoder_HEVC || - uppValue == AMFVideoEncoderVCE_AVC || uppValue == AMFVideoEncoder_HEVC) + if (value == AMFVideoEncoderVCE_AVC || value == AMFVideoEncoder_HEVC || value == AMFVideoEncoder_AV1 || + uppValue == AMFVideoEncoderVCE_AVC || uppValue == AMFVideoEncoder_HEVC || uppValue == AMFVideoEncoder_AV1) { paramValue = value; } @@ -567,7 +572,11 @@ AMF_RESULT ParamConverterCodec(const std::wstring& value, amf::AMFVariant& value else if(uppValue == L"HEVC" || uppValue == L"H265" || uppValue == L"H.265") { paramValue = AMFVideoEncoder_HEVC; - } + } + else if (uppValue == L"AV1") + { + paramValue = AMFVideoEncoder_AV1; + } else { LOG_ERROR(L"Invalid codec name \"" << value << L"\" value."); @@ -595,6 +604,7 @@ const wchar_t *StreamCodecIDtoDecoderID(AMF_STREAM_CODEC_ID_ENUM eCodec) case AMF_STREAM_CODEC_ID_VP9: return AMFVideoDecoderHW_VP9; case AMF_STREAM_CODEC_ID_VP9_10BIT: return AMFVideoDecoderHW_VP9_10BIT; case AMF_STREAM_CODEC_ID_AV1: return AMFVideoDecoderHW_AV1; + case AMF_STREAM_CODEC_ID_AV1_12BIT: return AMFVideoDecoderHW_AV1_12BIT; } return L""; } @@ -603,7 +613,11 @@ AMF_RESULT ParamConverterHQScalerAlgorithm(const std::wstring& value, amf::AMFVa { amf_int64 paramValue = -1; std::wstring uppValue = toUpper(value); - if ((uppValue == L"BILINEAR") || (uppValue == L"0")) + if ((uppValue == L"POINT") || (uppValue == L"4")) + { + paramValue = AMF_HQ_SCALER_ALGORITHM_POINT; + } + else if ((uppValue == L"BILINEAR") || (uppValue == L"0")) { paramValue = AMF_HQ_SCALER_ALGORITHM_BILINEAR; } @@ -615,7 +629,6 @@ AMF_RESULT ParamConverterHQScalerAlgorithm(const std::wstring& value, amf::AMFVa { paramValue = AMF_HQ_SCALER_ALGORITHM_FSR; } - valueOut = amf_int64(paramValue); return AMF_OK; } @@ -641,3 +654,112 @@ AMF_RESULT ParamConverterHighMotionQualityBoostMode(const std::wstring& value, a valueOut = amf_int64(paramValue); return AMF_OK; } + +AMF_RESULT ParamConverterSceneChange(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"LOW" || uppValue == L"0") + { + paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_LOW; + } + else if (uppValue == L"MEDIUM" || uppValue == L"1") { + paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_MEDIUM; + } + else if (uppValue == L"HIGH" || uppValue == L"2") { + paramValue = AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_HIGH; + } + else { + LOG_ERROR(L"AMF_PA_SCENE_CHANGE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +AMF_RESULT ParamConverterStaticScene(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"LOW" || uppValue == L"0") + { + paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_LOW; + } + else if (uppValue == L"MEDIUM" || uppValue == L"1") { + paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_MEDIUM; + } + else if (uppValue == L"HIGH" || uppValue == L"2") { + paramValue = AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_HIGH; + } + else { + LOG_ERROR(L"AMF_PA_STATIC_SCENE_DETECTION_SENSITIVITY_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +AMF_RESULT ParamConverterActivityType(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_ACTIVITY_TYPE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"Y") + { + paramValue = AMF_PA_ACTIVITY_Y; + } + else if (uppValue == L"YUV") { + paramValue = AMF_PA_ACTIVITY_YUV; + } + else { + LOG_ERROR(L"AMF_PA_ACTIVITY_TYPE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +AMF_RESULT ParamConverterCAQStrength(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_CAQ_STRENGTH_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"LOW" || uppValue == L"0") + { + paramValue = AMF_PA_CAQ_STRENGTH_LOW; + } + else if (uppValue == L"MEDIUM" || uppValue == L"1") { + paramValue = AMF_PA_CAQ_STRENGTH_MEDIUM; + } + else if (uppValue == L"HIGH" || uppValue == L"2") { + paramValue = AMF_PA_CAQ_STRENGTH_HIGH; + } + else { + LOG_ERROR(L"AMF_PA_CAQ_STRENGTH_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} + +AMF_RESULT ParamConverterPAQMode(const std::wstring& value, amf::AMFVariant& valueOut) +{ + AMF_PA_PAQ_MODE_ENUM paramValue; + + std::wstring uppValue = toUpper(value); + if (uppValue == L"NONE" || uppValue == L"0") + { + paramValue = AMF_PA_PAQ_MODE_NONE; + } + else if (uppValue == L"CAQ" || uppValue == L"1") { + paramValue = AMF_PA_PAQ_MODE_CAQ; + } + else { + LOG_ERROR(L"AMF_PA_PAQ_MODE_ENUM hasn't \"" << value << L"\" value."); + return AMF_INVALID_ARG; + } + valueOut = amf_int64(paramValue); + return AMF_OK; +} \ No newline at end of file diff --git a/amf/public/samples/CPPSamples/common/ParametersStorage.h b/amf/public/samples/CPPSamples/common/ParametersStorage.h index 32983428..2effd7f8 100644 --- a/amf/public/samples/CPPSamples/common/ParametersStorage.h +++ b/amf/public/samples/CPPSamples/common/ParametersStorage.h @@ -70,6 +70,11 @@ AMF_RESULT ParamConverterColorPrimaries(const std::wstring& value, amf::AMFVaria AMF_RESULT ParamConverterColorRange(const std::wstring& value, amf::AMFVariant& valueOut); AMF_RESULT ParamConverterHQScalerAlgorithm(const std::wstring& value, amf::AMFVariant& valueOut); AMF_RESULT ParamConverterHighMotionQualityBoostMode(const std::wstring& value, amf::AMFVariant& valueOut); +AMF_RESULT ParamConverterSceneChange(const std::wstring& value, amf::AMFVariant& valueOut); +AMF_RESULT ParamConverterStaticScene(const std::wstring& value, amf::AMFVariant& valueOut); +AMF_RESULT ParamConverterActivityType(const std::wstring& value, amf::AMFVariant& valueOut); +AMF_RESULT ParamConverterCAQStrength(const std::wstring& value, amf::AMFVariant& valueOut); +AMF_RESULT ParamConverterPAQMode(const std::wstring& value, amf::AMFVariant& valueOut); std::wstring AddIndexToPath(const std::wstring& path, amf_int32 index); @@ -129,7 +134,7 @@ class ParametersStorage std::wstring GetParamUsage(); protected: - virtual void OnParamChanged(const wchar_t* name) {} + virtual void OnParamChanged(const wchar_t* /*name*/) {} std::wstring GetParamUsage(ParamType type); diff --git a/amf/public/samples/CPPSamples/common/Pipeline.cpp b/amf/public/samples/CPPSamples/common/Pipeline.cpp index 7ea0db3f..eb86c718 100644 --- a/amf/public/samples/CPPSamples/common/Pipeline.cpp +++ b/amf/public/samples/CPPSamples/common/Pipeline.cpp @@ -291,15 +291,6 @@ void Pipeline::OnEof() PipelineState Pipeline::GetState() const { amf::AMFLock lock(&m_cs); - // test code - for(ConnectorList::const_iterator it = m_connectors.begin(); it != m_connectors.end(); it++) - { - if(!(*it)->IsEof()) - { - int a = 1; - } - } - return m_state; } //------------------------------------------------------------------------------------------------- @@ -512,7 +503,7 @@ AMF_RESULT InputSlot::Drain() return AMF_EOF; } //------------------------------------------------------------------------------------------------- -AMF_RESULT InputSlot::SubmitInput(amf::AMFData* pData, amf_ulong ulTimeout, bool poll) +AMF_RESULT InputSlot::SubmitInput(amf::AMFData* pData, amf_ulong /*ulTimeout*/, bool poll) { if(m_bFrozen) { @@ -600,7 +591,7 @@ AMF_RESULT InputSlot::SubmitInput(amf::AMFData* pData, amf_ulong ulTimeout, bool } // poll output - AMF_RESULT resPoll = m_pConnector->PollAll(); + m_pConnector->PollAll(); return res; } diff --git a/amf/public/samples/CPPSamples/common/PipelineDefines.h b/amf/public/samples/CPPSamples/common/PipelineDefines.h index d5a17194..c11e67c3 100644 --- a/amf/public/samples/CPPSamples/common/PipelineDefines.h +++ b/amf/public/samples/CPPSamples/common/PipelineDefines.h @@ -72,5 +72,8 @@ #define PARAM_NAME_ENGINE L"ENGINE" #define PARAM_NAME_SEARCH_CENTER_MAP_INPUT L"SEARCH_CENTER_MAP_INPUT" +#define PARAM_NAME_COMPUTE_QUEUE L"COMPUTEQUEUE" + +#define PARAM_NAME_TRACE_LEVEL L"TRACE_LEVEL" #endif // AMF_PipelineDefines_h \ No newline at end of file diff --git a/amf/public/samples/CPPSamples/common/PipelineElement.h b/amf/public/samples/CPPSamples/common/PipelineElement.h index 257d9715..3c088b90 100644 --- a/amf/public/samples/CPPSamples/common/PipelineElement.h +++ b/amf/public/samples/CPPSamples/common/PipelineElement.h @@ -46,20 +46,20 @@ class PipelineElement public: virtual amf_int32 GetInputSlotCount() const = 0; virtual amf_int32 GetOutputSlotCount() const = 0; - virtual AMF_RESULT SubmitInput(amf::AMFData* pData, amf_int32 slot) { return SubmitInput(pData); } - virtual AMF_RESULT ReSubmitInput(amf_int32 slot) { return ReSubmitInput(); } + virtual AMF_RESULT SubmitInput(amf::AMFData* pData, amf_int32 /*slot*/) { return SubmitInput(pData); } + virtual AMF_RESULT ReSubmitInput(amf_int32 /*slot*/) { return ReSubmitInput(); } - virtual AMF_RESULT QueryOutput(amf::AMFData** ppData, amf_int32 slot) { return QueryOutput(ppData); } - virtual AMF_RESULT SubmitInput(amf::AMFData* pData) { return AMF_NOT_SUPPORTED; } + virtual AMF_RESULT QueryOutput(amf::AMFData** ppData, amf_int32 /*slot*/) { return QueryOutput(ppData); } + virtual AMF_RESULT SubmitInput(amf::AMFData* /*pData*/) { return AMF_NOT_SUPPORTED; } virtual AMF_RESULT ReSubmitInput() { return AMF_NOT_SUPPORTED; } - virtual AMF_RESULT QueryOutput(amf::AMFData** ppData) { return AMF_NOT_SUPPORTED; } + virtual AMF_RESULT QueryOutput(amf::AMFData** /*ppData*/) { return AMF_NOT_SUPPORTED; } virtual AMF_RESULT Freeze() {amf::AMFLock lock(&m_cs); m_bFrozen = true; return AMF_OK;} virtual AMF_RESULT UnFreeze() {amf::AMFLock lock(&m_cs); m_bFrozen = false; return AMF_OK;} virtual AMF_RESULT Flush() { return AMF_OK; } - virtual AMF_RESULT Drain(amf_int32 inputSlot) { return AMF_NOT_SUPPORTED; } + virtual AMF_RESULT Drain(amf_int32 /*inputSlot*/) { return AMF_NOT_SUPPORTED; } virtual AMF_RESULT OnEof() { return AMF_EOF; } virtual std::wstring GetDisplayResult() { return std::wstring(); } @@ -120,7 +120,7 @@ class StreamWriter : public PipelineElement } return res; } - virtual AMF_RESULT QueryOutput(amf::AMFData** ppData) + virtual AMF_RESULT QueryOutput(amf::AMFData** /*ppData*/) { return AMF_NOT_SUPPORTED; } @@ -190,7 +190,7 @@ class SurfaceWriter : public PipelineElement } return res; } - virtual AMF_RESULT QueryOutput(amf::AMFData** ppData) + virtual AMF_RESULT QueryOutput(amf::AMFData** /*ppData*/) { return AMF_NOT_SUPPORTED; } @@ -228,7 +228,7 @@ class DummyWriter : public PipelineElement } return AMF_OK; } - virtual AMF_RESULT QueryOutput(amf::AMFData** ppData) + virtual AMF_RESULT QueryOutput(amf::AMFData** /*ppData*/) { return AMF_NOT_SUPPORTED; } diff --git a/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.cpp b/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.cpp index d2340a25..01462052 100644 --- a/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.cpp +++ b/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.cpp @@ -55,6 +55,10 @@ const wchar_t* PlaybackPipelineBase::PARAM_NAME_PIP_ZOOM_FACTOR = L"PIPZOOMFACTO const wchar_t* PlaybackPipelineBase::PARAM_NAME_PIP_FOCUS_X = L"PIPFOCUSX"; const wchar_t* PlaybackPipelineBase::PARAM_NAME_PIP_FOCUS_Y = L"PIPFOCUSY"; const wchar_t* PlaybackPipelineBase::PARAM_NAME_SIDE_BY_SIDE = L"SIDEBYSIDE"; +const wchar_t* PlaybackPipelineBase::PARAM_NAME_HQ_SCALER_RGB = L"HQSCALERRGB"; +const wchar_t* PlaybackPipelineBase::PARAM_NAME_HQ_SCALER_RATIO = L"HQSCALERRATIO"; +const wchar_t* PlaybackPipelineBase::PARAM_NAME_ENABLE_AUDIO = L"ENABLEAUDIO"; +const wchar_t* PlaybackPipelineBase::PARAM_NAME_HQSCALER_SHARPNESS = L"HQSCALERSHARPNESS"; PlaybackPipelineBase::PlaybackPipelineBase() : m_iVideoWidth(0), @@ -78,20 +82,28 @@ PlaybackPipelineBase::PlaybackPipelineBase() : SetParamDescription(PARAM_NAME_LOWLATENCY, ParamCommon, L"Low latency mode, boolean, default = false", ParamConverterBoolean); SetParamDescription(PARAM_NAME_FULLSCREEN, ParamCommon, L"Specifies fullscreen mode, true, false, default false", ParamConverterBoolean); SetParamDescription(PARAM_NAME_SW_DECODER, ParamCommon, L"Forces sw decoder, true, false, default false", ParamConverterBoolean); - SetParamDescription(PARAM_NAME_HQ_SCALER, ParamCommon, L"Use HQ Scaler (OFF, Bilinear, Bicubic, FSR, default = OFF)", ParamConverterHQScalerAlgorithm); + SetParamDescription(PARAM_NAME_HQ_SCALER, ParamCommon, L"Use HQ Scaler (OFF, Bilinear, Bicubic, FSR, POINT, default = OFF)", ParamConverterHQScalerAlgorithm); SetParamDescription(PARAM_NAME_PIP, ParamCommon, L"Specifies Picture in Picture mode, true, false, default false", ParamConverterBoolean); SetParamDescription(PARAM_NAME_PIP_ZOOM_FACTOR, ParamCommon, L"Specifies magnification ratio of PIP image, int, default 8", ParamConverterDouble); - SetParamDescription(PARAM_NAME_PIP_FOCUS_X, ParamCommon, L"H position of foreground image, int, default 0", ParamConverterDouble); - SetParamDescription(PARAM_NAME_PIP_FOCUS_Y, ParamCommon, L"V position of foreground image, int, default 0", ParamConverterDouble); + SetParamDescription(PARAM_NAME_PIP_FOCUS_X, ParamCommon, L"H position of foreground image, int, default 0", ParamConverterInt64); + SetParamDescription(PARAM_NAME_PIP_FOCUS_Y, ParamCommon, L"V position of foreground image, int, default 0", ParamConverterInt64); SetParamDescription(PARAM_NAME_SIDE_BY_SIDE, ParamCommon, L"Specifies Side-by-Side mode, true, false, default false", ParamConverterBoolean); + SetParamDescription(PARAM_NAME_HQ_SCALER_RGB, ParamCommon, L"Force RGB scaling, true, false, default false", ParamConverterBoolean); + SetParamDescription(PARAM_NAME_HQ_SCALER_RATIO, ParamCommon, L"Scaling Ratio (1.3x, 1.5x, 1.7x, 2.0x), default 2.0x", ParamConverterRatio); + SetParamDescription(PARAM_NAME_ENABLE_AUDIO, ParamCommon, L"Enables audio playback, boolean, default = true", ParamConverterDouble); + SetParamDescription(PARAM_NAME_HQSCALER_SHARPNESS, ParamCommon, L"Specifies FSR RCAS attenuation, double, default 0.75", ParamConverterDouble); SetParam(PARAM_NAME_LISTEN_FOR_CONNECTION, false); SetParam(PARAM_NAME_FULLSCREEN, false); SetParam(PARAM_NAME_PIP, false); - SetParam(PARAM_NAME_PIP_ZOOM_FACTOR, 0.1f); - SetParam(PARAM_NAME_PIP_FOCUS_X, 0.45f); - SetParam(PARAM_NAME_PIP_FOCUS_Y, 0.45f); + SetParam(PARAM_NAME_PIP_ZOOM_FACTOR, 0.4f); + SetParam(PARAM_NAME_PIP_FOCUS_X, 0); + SetParam(PARAM_NAME_PIP_FOCUS_Y, 0); SetParam(PARAM_NAME_SIDE_BY_SIDE, false); + SetParam(PARAM_NAME_HQ_SCALER_RGB, false); + SetParam(PARAM_NAME_HQ_SCALER_RATIO, AMFRatio({ 20, 10 })); + SetParam(PARAM_NAME_ENABLE_AUDIO, true); + SetParam(PARAM_NAME_HQSCALER_SHARPNESS, 0.75); #if defined(_WIN32) SetParam(PlaybackPipelineBase::PARAM_NAME_PRESENTER, amf::AMF_MEMORY_DX11); @@ -406,7 +418,10 @@ AMF_RESULT PlaybackPipelineBase::Init() res = InitVideo(pVideoOutput, presenterEngine); CHECK_AMF_ERROR_RETURN(res, L"InitVideo() failed"); } - if(iAudioStreamIndex >= 0) + + bool bEnableAudio = true; + GetParam(PARAM_NAME_ENABLE_AUDIO, bEnableAudio); + if(bEnableAudio && iAudioStreamIndex >= 0) { res = InitAudio(pAudioOutput); if (res != AMF_OK) @@ -491,7 +506,13 @@ AMF_RESULT PlaybackPipelineBase::InitVideoPipeline(amf_uint32 iVideoStreamIndex, bool bLowlatency = false; GetParam(PARAM_NAME_LOWLATENCY, bLowlatency); - if (m_pVideoProcessor != NULL) + bool bForceScalingRGB = false; + GetParam(PARAM_NAME_HQ_SCALER_RGB, bForceScalingRGB); + bool bYUVScaling = (((m_eDecoderFormat == amf::AMF_SURFACE_NV12) || (m_eDecoderFormat == amf::AMF_SURFACE_P010)) && + (m_pScaler != nullptr) && + !bForceScalingRGB); + + if (!bYUVScaling && (m_pVideoProcessor != NULL)) { if (bLowlatency) { @@ -502,6 +523,7 @@ AMF_RESULT PlaybackPipelineBase::InitVideoPipeline(amf_uint32 iVideoStreamIndex, Connect(PipelineElementPtr(new AMFComponentElement(m_pVideoProcessor)), m_bCPUDecoder ? 4 : 1, CT_ThreadQueue); } } + if (m_pScaler != NULL) { if (m_pHQScaler2 == NULL) @@ -536,6 +558,18 @@ AMF_RESULT PlaybackPipelineBase::InitVideoPipeline(amf_uint32 iVideoStreamIndex, } } } + + if (bYUVScaling && (m_pVideoProcessor != NULL)) + { + if (bLowlatency) + { + Connect(PipelineElementPtr(new AMFComponentElement(m_pVideoProcessor)), 1, CT_Direct); + } + else + { + Connect(PipelineElementPtr(new AMFComponentElement(m_pVideoProcessor)), m_bCPUDecoder ? 4 : 1, CT_ThreadQueue); + } + } if(m_bVideoPresenterDirectConnect) { Connect(m_pVideoPresenter, 4, CT_ThreadPoll); // if back buffers are used in multithreading the video memory changes every Present() call so pointer returned by GetBackBuffer() points to wrong memory @@ -559,9 +593,19 @@ AMF_RESULT PlaybackPipelineBase::InitVideoProcessor() res = g_AMFFactory.GetFactory()->CreateComponent(m_pContext, AMFHQScaler, &m_pScaler); CHECK_AMF_ERROR_RETURN(res, L"g_AMFFactory.GetFactory()->CreateComponent(" << AMFHQScaler << L") failed"); - m_pScaler->SetProperty(AMF_HQ_SCALER_OUTPUT_SIZE, ::AMFConstructSize(m_iVideoWidth, m_iVideoHeight)); + AMFRatio scalingRatio = { 0, 0 }; + GetParam(PARAM_NAME_HQ_SCALER_RATIO, scalingRatio); + + amf_int32 oVideoWidth = m_iVideoWidth * scalingRatio.num / scalingRatio.den; + amf_int32 oVideoHeight = m_iVideoHeight * scalingRatio.num / scalingRatio.den; + + amf_double fHQScalerSharpness = 0; + GetParam(PARAM_NAME_HQSCALER_SHARPNESS, fHQScalerSharpness); + + m_pScaler->SetProperty(AMF_HQ_SCALER_OUTPUT_SIZE, ::AMFConstructSize(oVideoWidth, oVideoHeight)); m_pScaler->SetProperty(AMF_HQ_SCALER_ENGINE_TYPE, m_pVideoPresenter->GetMemoryType()); m_pScaler->SetProperty(AMF_HQ_SCALER_ALGORITHM, hqScalerMode); + m_pScaler->SetProperty(AMF_HQ_SCALER_SHARPNESS, fHQScalerSharpness); /* // If enabled side-by-side, create a separate HQ Scaler @@ -584,7 +628,9 @@ AMF_RESULT PlaybackPipelineBase::InitVideoProcessor() // initialize scaler if (m_pScaler != nullptr) { - res = m_pScaler->Init(m_pVideoPresenter->GetInputFormat(), m_iVideoWidth, m_iVideoHeight); + bool bForceScalingRGB = false; + GetParam(PARAM_NAME_HQ_SCALER_RGB, bForceScalingRGB); + res = m_pScaler->Init(bForceScalingRGB ? m_pVideoPresenter->GetInputFormat() : m_eDecoderFormat, m_iVideoWidth, m_iVideoHeight); CHECK_AMF_ERROR_RETURN(res, L"m_pScaler->Init() failed with err=%d"); } @@ -639,27 +685,41 @@ AMF_RESULT PlaybackPipelineBase::InitVideoDecoder(const wchar_t *pDecoderID, am bool bSWDecoder = false; GetParam(PARAM_NAME_SW_DECODER, bSWDecoder); + if ((surfaceFormat == amf::AMF_SURFACE_YUY2) || + (surfaceFormat == amf::AMF_SURFACE_UYVY) || + (surfaceFormat == amf::AMF_SURFACE_Y210) || + (surfaceFormat == amf::AMF_SURFACE_Y416) || + (surfaceFormat == amf::AMF_SURFACE_RGBA_F16) || + (surfaceFormat == amf::AMF_SURFACE_RGBA)) + { + bSWDecoder = true; + } + if (bSWDecoder == false) { - AMF_RESULT res = g_AMFFactory.GetFactory()->CreateComponent(m_pContext, pDecoderID, &m_pVideoDecoder); - CHECK_AMF_ERROR_RETURN(res, L"g_AMFFactory.GetFactory()->CreateComponent(" << pDecoderID << L") failed"); + const wchar_t* pHwDecoderId = pDecoderID; + if ((std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1) && + ((surfaceFormat == amf::AMF_SURFACE_P012) || (surfaceFormat == amf::AMF_SURFACE_P016))) + { + pHwDecoderId = AMFVideoDecoderHW_AV1_12BIT; + } + + AMF_RESULT res = g_AMFFactory.GetFactory()->CreateComponent(m_pContext, pHwDecoderId, &m_pVideoDecoder); + CHECK_AMF_ERROR_RETURN(res, L"g_AMFFactory.GetFactory()->CreateComponent(" << pHwDecoderId << L") failed"); } // switch to SW Decoder when the HW Decoder does not support this config amf::AMFCapsPtr pCaps; - if (m_pVideoDecoder != nullptr && m_pVideoDecoder->GetCaps(&pCaps) != AMF_OK) + if (m_pVideoDecoder != nullptr && + m_pVideoDecoder->GetCaps(&pCaps) != AMF_OK) { m_pVideoDecoder = NULL; } if (m_pVideoDecoder != nullptr) { - amf::AMFCapsPtr pCaps; - AMF_RESULT res = m_pVideoDecoder->GetCaps(&pCaps); - CHECK_AMF_ERROR_RETURN(res, L"failed to get decoder caps"); - amf::AMFIOCapsPtr pInputCaps; - res = pCaps->GetInputCaps(&pInputCaps); + AMF_RESULT res = pCaps->GetInputCaps(&pInputCaps); CHECK_AMF_ERROR_RETURN(res, L"failed to get decoder input caps"); // check resolution @@ -669,8 +729,7 @@ AMF_RESULT PlaybackPipelineBase::InitVideoDecoder(const wchar_t *pDecoderID, am amf_int32 maxHeight = 0; pInputCaps->GetWidthRange(&minWidth, &maxWidth); pInputCaps->GetHeightRange(&minHeight, &maxHeight); - if (minWidth <= m_iVideoWidth && m_iVideoWidth <= maxWidth && minHeight <= m_iVideoHeight && m_iVideoHeight <= maxHeight && - surfaceFormat != amf::AMF_SURFACE_P012 && surfaceFormat != amf::AMF_SURFACE_P016) //MM TODO Update caps + if (minWidth <= m_iVideoWidth && m_iVideoWidth <= maxWidth && minHeight <= m_iVideoHeight && m_iVideoHeight <= maxHeight) { m_pVideoDecoder->SetProperty(AMF_VIDEO_DECODER_REORDER_MODE, amf_int64(decoderMode)); m_pVideoDecoder->SetProperty(AMF_VIDEO_DECODER_EXTRADATA, amf::AMFVariant(pExtraData)); @@ -681,6 +740,10 @@ AMF_RESULT PlaybackPipelineBase::InitVideoDecoder(const wchar_t *pDecoderID, am { m_eDecoderFormat = amf::AMF_SURFACE_P010; } + if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1) + { + m_eDecoderFormat = surfaceFormat; + } res = m_pVideoDecoder->Init(m_eDecoderFormat, m_iVideoWidth, m_iVideoHeight); CHECK_AMF_ERROR_RETURN(res, L"m_pVideoDecoder->Init(" << m_iVideoWidth << L", " << m_iVideoHeight << L") failed " << pDecoderID); if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1) @@ -692,6 +755,10 @@ AMF_RESULT PlaybackPipelineBase::InitVideoDecoder(const wchar_t *pDecoderID, am m_eDecoderFormat = (amf::AMF_SURFACE_FORMAT)format; } } + else if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1_12BIT) + { + m_eDecoderFormat = amf::AMF_SURFACE_P012; + } m_bCPUDecoder = false; } else @@ -729,7 +796,11 @@ AMF_RESULT PlaybackPipelineBase::InitVideoDecoder(const wchar_t *pDecoderID, am { codecID = AMF_STREAM_CODEC_ID_AV1; } - } + else if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1_12BIT) + { + codecID = AMF_STREAM_CODEC_ID_AV1_12BIT; + } + } m_pVideoDecoder->SetProperty(VIDEO_DECODER_CODEC_ID, codecID); m_pVideoDecoder->SetProperty(VIDEO_DECODER_BITRATE, bitrate); m_pVideoDecoder->SetProperty(VIDEO_DECODER_FRAMERATE, frameRate); @@ -934,6 +1005,11 @@ AMF_RESULT PlaybackPipelineBase::Stop() void PlaybackPipelineBase::OnParamChanged(const wchar_t* name) { + //check if the pipeline will need to be recreated + if (std::wstring(name) == std::wstring(PARAM_NAME_HQ_SCALER_RGB)) + { + ReInit(); + } //check if HQScaler will need to be re-created in the pipeline if (std::wstring(name) == std::wstring(PARAM_NAME_HQ_SCALER)) { @@ -947,14 +1023,10 @@ void PlaybackPipelineBase::OnParamChanged(const wchar_t* name) amf_int64 modeHQScalerNew = -1; GetParam(PARAM_NAME_HQ_SCALER, modeHQScalerNew); - if ((modeHQScaler == -1 && modeHQScalerNew != -1) || + if ((modeHQScaler == -1 && modeHQScalerNew != -1) || (modeHQScaler != -1 && modeHQScalerNew == -1)) //need to re-build the pipeline { - if (GetState() == PipelineStateRunning) - { - Init(); - Play(); - } + ReInit(); } if (m_pScaler != nullptr && modeHQScalerNew != -1) @@ -982,19 +1054,31 @@ void PlaybackPipelineBase::OnParamChanged(const wchar_t* name) bool bEnablePIP = false; GetParam(PARAM_NAME_PIP, bEnablePIP); m_pVideoPresenter->SetEnablePIP(bEnablePIP); + + amf_int iPIPZoomFactor; + GetParam(PARAM_NAME_PIP_ZOOM_FACTOR, iPIPZoomFactor); + m_pVideoPresenter->SetPIPZoomFactor(iPIPZoomFactor); + + AMFPoint PIPFocusPos; + GetParam(PARAM_NAME_PIP_FOCUS_X, PIPFocusPos.x); + GetParam(PARAM_NAME_PIP_FOCUS_Y, PIPFocusPos.y); + + AMFFloatPoint2D fPIPFocusPos = { (amf_float)PIPFocusPos.x / (amf_float)m_iVideoWidth, (amf_float)PIPFocusPos.y / (amf_float)m_iVideoHeight }; + m_pVideoPresenter->SetPIPFocusPositions(fPIPFocusPos); } else if (std::wstring(name) == std::wstring(PARAM_NAME_PIP_ZOOM_FACTOR)) { - amf_float fPIPZoomFactor; - GetParam(PARAM_NAME_PIP_ZOOM_FACTOR, fPIPZoomFactor); - m_pVideoPresenter->SetPIPZoomFactor(fPIPZoomFactor); + amf_int iPIPZoomFactor; + GetParam(PARAM_NAME_PIP_ZOOM_FACTOR, iPIPZoomFactor); + m_pVideoPresenter->SetPIPZoomFactor(iPIPZoomFactor); } else if (std::wstring(name) == std::wstring(PARAM_NAME_PIP_FOCUS_X) || std::wstring(name) == std::wstring(PARAM_NAME_PIP_FOCUS_Y)) { - AMFFloatPoint2D fPIPFocusPos; - GetParam(PARAM_NAME_PIP_FOCUS_X, fPIPFocusPos.x); - GetParam(PARAM_NAME_PIP_FOCUS_Y, fPIPFocusPos.y); + AMFPoint PIPFocusPos; + GetParam(PARAM_NAME_PIP_FOCUS_X, PIPFocusPos.x); + GetParam(PARAM_NAME_PIP_FOCUS_Y, PIPFocusPos.y); + AMFFloatPoint2D fPIPFocusPos = { (amf_float)PIPFocusPos.x / (amf_float)m_iVideoWidth, (amf_float)PIPFocusPos.y / (amf_float)m_iVideoHeight }; m_pVideoPresenter->SetPIPFocusPositions(fPIPFocusPos); } else if (std::wstring(name) == std::wstring(PARAM_NAME_SIDE_BY_SIDE)) @@ -1003,6 +1087,28 @@ void PlaybackPipelineBase::OnParamChanged(const wchar_t* name) GetParam(PARAM_NAME_SIDE_BY_SIDE, bEnableSideBySide); m_bEnableSideBySide = bEnableSideBySide; } + else if (std::wstring(name) == std::wstring(PARAM_NAME_HQ_SCALER_RATIO)) + { + if (m_pScaler != nullptr) + { + AMFRatio scalingRatio = { 0, 0 }; + GetParam(PARAM_NAME_HQ_SCALER_RATIO, scalingRatio); + + amf_int32 oVideoWidth = m_iVideoWidth * scalingRatio.num / scalingRatio.den; + amf_int32 oVideoHeight = m_iVideoHeight * scalingRatio.num / scalingRatio.den; + m_pScaler->SetProperty(AMF_HQ_SCALER_OUTPUT_SIZE, ::AMFConstructSize(oVideoWidth, oVideoHeight)); + } + } + else if (std::wstring(name) == std::wstring(PARAM_NAME_HQSCALER_SHARPNESS)) + { + if (m_pScaler != nullptr) + { + amf_double fHQScalerSharpness = 0.0f; + GetParam(PARAM_NAME_HQSCALER_SHARPNESS, fHQScalerSharpness); + + m_pScaler->SetProperty(AMF_HQ_SCALER_SHARPNESS, fHQScalerSharpness); + } + } } if(m_pVideoProcessor == NULL) { @@ -1208,6 +1314,11 @@ AMF_RESULT PlaybackPipelineBase::InitVideo(amf::AMFOutput* pOutput, amf::AMF_ME res= pOutput->GetProperty(AMF_STREAM_CODEC_ID, &codecID); pVideoDecoderID = StreamCodecIDtoDecoderID(AMF_STREAM_CODEC_ID_ENUM(codecID)); + if (pVideoDecoderID.size() == 0) //try SW decoder + { + pOutput->GetProperty(FFMPEG_DEMUXER_VIDEO_CODEC, &codecID); + } + pOutput->SetProperty(AMF_STREAM_ENABLED, true); pOutput->GetProperty(AMF_STREAM_BIT_RATE, &bitRate); @@ -1331,9 +1442,10 @@ AMF_RESULT PlaybackPipelineBase::OnActivate(bool bActivated) GetParam(PARAM_NAME_PIP, bEnablePIP); m_pVideoPresenter->SetEnablePIP(bEnablePIP); - AMFFloatPoint2D fPIPFocusPos; - GetParam(PARAM_NAME_PIP_FOCUS_X, fPIPFocusPos.x); - GetParam(PARAM_NAME_PIP_FOCUS_Y, fPIPFocusPos.y); + AMFPoint PIPFocusPos; + GetParam(PARAM_NAME_PIP_FOCUS_X, PIPFocusPos.x); + GetParam(PARAM_NAME_PIP_FOCUS_Y, PIPFocusPos.y); + AMFFloatPoint2D fPIPFocusPos = { (amf_float)PIPFocusPos.x / (amf_float)m_iVideoWidth, (amf_float)PIPFocusPos.y / (amf_float)m_iVideoHeight }; m_pVideoPresenter->SetPIPFocusPositions(fPIPFocusPos); } else @@ -1345,3 +1457,32 @@ AMF_RESULT PlaybackPipelineBase::OnActivate(bool bActivated) } return AMF_OK; } + +AMF_RESULT PlaybackPipelineBase::ReInit() +{ + //restart the playback with possibably different pipeline + if (GetState() == PipelineStateRunning) + { + Init(); + Play(); + + //update the PIP parameters + if (m_pVideoPresenter != nullptr) + { + bool bEnablePIP = false; + GetParam(PARAM_NAME_PIP, bEnablePIP); + m_pVideoPresenter->SetEnablePIP(bEnablePIP); + + amf_int iPIPZoomFactor; + GetParam(PARAM_NAME_PIP_ZOOM_FACTOR, iPIPZoomFactor); + m_pVideoPresenter->SetPIPZoomFactor(iPIPZoomFactor); + + AMFPoint PIPFocusPos; + GetParam(PARAM_NAME_PIP_FOCUS_X, PIPFocusPos.x); + GetParam(PARAM_NAME_PIP_FOCUS_Y, PIPFocusPos.y); + AMFFloatPoint2D fPIPFocusPos = { (amf_float)PIPFocusPos.x / (amf_float)m_iVideoWidth, (amf_float)PIPFocusPos.y / (amf_float)m_iVideoHeight }; + m_pVideoPresenter->SetPIPFocusPositions(fPIPFocusPos); + } + } + return AMF_OK; +} diff --git a/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.h b/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.h index 01ab5db7..d966bbda 100644 --- a/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.h +++ b/amf/public/samples/CPPSamples/common/PlaybackPipelineBase.h @@ -77,6 +77,10 @@ class PlaybackPipelineBase : public Pipeline, public ParametersStorage static const wchar_t* PARAM_NAME_PIP_FOCUS_X; static const wchar_t* PARAM_NAME_PIP_FOCUS_Y; static const wchar_t* PARAM_NAME_SIDE_BY_SIDE; + static const wchar_t* PARAM_NAME_HQ_SCALER_RGB; + static const wchar_t* PARAM_NAME_HQ_SCALER_RATIO; + static const wchar_t* PARAM_NAME_ENABLE_AUDIO; + static const wchar_t* PARAM_NAME_HQSCALER_SHARPNESS; virtual AMF_RESULT Play(); virtual AMF_RESULT Pause(); @@ -117,6 +121,7 @@ class PlaybackPipelineBase : public Pipeline, public ParametersStorage virtual AMF_RESULT InitVideo(amf::AMFOutput* pOutput, amf::AMF_MEMORY_TYPE presenterEngine); virtual AMF_RESULT InitVideoPipeline(amf_uint32 iVideoStreamIndex, PipelineElementPtr pVideoSourceStream); virtual AMF_RESULT InitAudioPipeline(amf_uint32 iAudioStreamIndex, PipelineElementPtr pAudioSourceStream); + virtual AMF_RESULT ReInit(); amf::AMFContextPtr m_pContext; diff --git a/amf/public/samples/CPPSamples/common/PreProcessingParams.cpp b/amf/public/samples/CPPSamples/common/PreProcessingParams.cpp index 5fda1d02..432c7c76 100644 --- a/amf/public/samples/CPPSamples/common/PreProcessingParams.cpp +++ b/amf/public/samples/CPPSamples/common/PreProcessingParams.cpp @@ -51,5 +51,9 @@ AMF_RESULT RegisterPreProcessingParams(ParametersStorage* pParams) pParams->SetParamDescription(AMF_PP_ADAPTIVE_FILTER_STRENGTH, ParamCommon, L"Edge Detect filter strength (0 - 10: the lower the bitrate, the bigger the 'strength')", ParamConverterInt64); pParams->SetParamDescription(AMF_PP_ADAPTIVE_FILTER_SENSITIVITY, ParamCommon, L"Edge Detect filter sensitivity (0 - 10: the lower the bitrate, the bigger the 'sensitivity')", ParamConverterInt64); + // Adaptive pre-filter parameters + pParams->SetParamDescription(AMF_PP_TARGET_BITRATE, ParamCommon, L"Target bitrate utilized in the adaptive filter algorithm, (default: 2000000)", ParamConverterInt64); + pParams->SetParamDescription(AMF_PP_FRAME_RATE, ParamCommon, L"Frame rate utilized in the adaptive filter algorithm, (default: 30, 1)", ParamConverterRate); + pParams->SetParamDescription(AMF_PP_ADAPTIVE_FILTER_ENABLE, ParamCommon, L"Enable the adaptive filter mechanism (default: false)", ParamConverterBoolean); return AMF_OK; } diff --git a/amf/public/samples/CPPSamples/common/TranscodePipeline.cpp b/amf/public/samples/CPPSamples/common/TranscodePipeline.cpp index be1b8732..b93ac4a9 100644 --- a/amf/public/samples/CPPSamples/common/TranscodePipeline.cpp +++ b/amf/public/samples/CPPSamples/common/TranscodePipeline.cpp @@ -243,7 +243,7 @@ AMF_RESULT TranscodePipeline::Init(const wchar_t* path, IRandomAccessStream^ inp res= pParams->GetParamWString(PARAM_NAME_OUTPUT, outputPath); CHECK_AMF_ERROR_RETURN(res, L"Output Path"); #if defined(_WIN32) - std::wstring engineStr = L"DX9"; + std::wstring engineStr = L"DX11"; #else std::wstring engineStr = L"VULKAN"; #endif @@ -327,11 +327,18 @@ AMF_RESULT TranscodePipeline::Init(const wchar_t* path, IRandomAccessStream^ inp break; #endif case amf::AMF_MEMORY_VULKAN: -// res = m_deviceVulkan.Init(adapterID, m_pContext); + { + amf_int64 computeQueue = 0; + if (AMF_OK == pParams->GetParam(PARAM_NAME_COMPUTE_QUEUE, computeQueue)) + { + amf::AMFContext1Ptr(m_pContext)->SetProperty(AMF_CONTEXT_VULKAN_COMPUTE_QUEUE, computeQueue); + } + // res = m_deviceVulkan.Init(adapterID, m_pContext); res = amf::AMFContext1Ptr(m_pContext)->InitVulkan(NULL); CHECK_AMF_ERROR_RETURN(res, L"m_pContext->InitVulkan() failed"); break; } + } //--------------------------------------------------------------------------------------------- @@ -527,6 +534,23 @@ AMF_RESULT TranscodePipeline::Init(const wchar_t* path, IRandomAccessStream^ inp m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_FRAMERATE, &frameRate); pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_RATE, frameRate); } + else if (m_EncoderID == AMFVideoEncoder_AV1) + { + pInput->SetProperty(AMF_STREAM_CODEC_ID, AMF_STREAM_CODEC_ID_AV1); + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, &bitrate); + pInput->SetProperty(AMF_STREAM_BIT_RATE, bitrate); + amf::AMFInterfacePtr pExtraData; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_EXTRA_DATA, &pExtraData); + pInput->SetProperty(AMF_STREAM_EXTRA_DATA, pExtraData); + + AMFSize frameSize; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, &frameSize); + pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_SIZE, frameSize); + + AMFRate frameRate; + m_pEncoder->GetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, &frameRate); + pInput->SetProperty(AMF_STREAM_VIDEO_FRAME_RATE, frameRate); + } else { pInput->SetProperty(AMF_STREAM_CODEC_ID, AMF_STREAM_CODEC_ID_H265_HEVC); @@ -828,6 +852,10 @@ AMF_RESULT TranscodePipeline::InitVideoDecoder(const wchar_t *pDecoderID, amf_i m_eDecoderFormat = (amf::AMF_SURFACE_FORMAT)format; } } + else if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1_12BIT) + { + m_eDecoderFormat = amf::AMF_SURFACE_P012; + } //m_bCPUDecoder = false; } else @@ -869,6 +897,10 @@ AMF_RESULT TranscodePipeline::InitVideoDecoder(const wchar_t *pDecoderID, amf_i { codecID = AMF_STREAM_CODEC_ID_AV1; } + else if (std::wstring(pDecoderID) == AMFVideoDecoderHW_AV1_12BIT) + { + codecID = AMF_STREAM_CODEC_ID_AV1_12BIT; + } } m_pDecoder->SetProperty(VIDEO_DECODER_CODEC_ID, codecID); m_pDecoder->SetProperty(VIDEO_DECODER_BITRATE, 0); @@ -936,6 +968,14 @@ AMF_RESULT TranscodePipeline::InitPreProcessFilter(ParametersStorage* pParams) CHECK_AMF_ERROR_RETURN(res, L"AMFPreProcessing failed to set tor"); } + // Set adaptive filter enable + bool adaptiveFilterEnable = false; + if (pParams->GetParam(AMF_PP_ADAPTIVE_FILTER_ENABLE, adaptiveFilterEnable) == AMF_OK) + { + res = m_pPreProcFilter->SetProperty(AMF_PP_ADAPTIVE_FILTER_ENABLE, adaptiveFilterEnable); + CHECK_AMF_ERROR_RETURN(res, L"AMFPreProcessing failed to set adaptive filter enable"); + } + return AMF_OK; } @@ -1047,8 +1087,22 @@ AMF_RESULT TranscodePipeline::InitVideo(BitStreamParserPtr pParser, RawStreamRe if (preProcfilterEnable) { InitPreProcessFilter(pParams); - res = m_pPreProcFilter->Init(amf::AMF_SURFACE_NV12, scaleWidth, scaleHeight); + + // Set bitrate and framerate of adaptive filter if they're passed as parameters + amf_int64 targetBitrate = 2000000; + if (pParams->GetParam(AMF_PP_TARGET_BITRATE, targetBitrate) == AMF_OK) + { + res = m_pPreProcFilter->SetProperty(AMF_PP_TARGET_BITRATE, targetBitrate); + CHECK_AMF_ERROR_RETURN(res, L"AMFPreProcessing failed to set target bitrate for the adaptive filter mechanism"); + } + AMFRate frameRate = AMFConstructRate(30, 1); + if (pParams->GetParam(AMF_PP_FRAME_RATE, frameRate) == AMF_OK) + { + res = m_pPreProcFilter->SetProperty(AMF_PP_FRAME_RATE, frameRate); + CHECK_AMF_ERROR_RETURN(res, L"AMFPreProcessing failed to set frame rate for the adaptive filter mechanism"); + } + CHECK_AMF_ERROR_RETURN(res, L"m_pPreProcFilter->Init() failed"); } @@ -1107,6 +1161,20 @@ AMF_RESULT TranscodePipeline::InitVideo(BitStreamParserPtr pParser, RawStreamRe m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_PRE_ANALYSIS_ENABLE, enablePA); } } + else if (m_EncoderID == AMFVideoEncoder_AV1) + { + amf::AMFVariant enablePA; + if (pParams->GetParam(AMF_VIDEO_ENCODER_AV1_PRE_ANALYSIS_ENABLE, enablePA) == AMF_OK) + { + amf::AMFVariant rateControlMode; + if (pParams->GetParam(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD, rateControlMode) == AMF_OK) + { + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD, rateControlMode); + } + + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_PRE_ANALYSIS_ENABLE, enablePA); + } + } // override some usage parameters if (frameRate.den != 0 && frameRate.num != 0) @@ -1115,10 +1183,14 @@ AMF_RESULT TranscodePipeline::InitVideo(BitStreamParserPtr pParser, RawStreamRe { m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_FRAMERATE, frameRate); } - else + else if (m_EncoderID == AMFVideoEncoder_HEVC) { m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_HEVC_FRAMERATE, frameRate); } + else + { + m_pEncoder->SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, frameRate); + } } PushParamsToPropertyStorage(pParams, ParamEncoderStatic, m_pEncoder); diff --git a/amf/public/samples/CPPSamples/common/TranscodePipeline.h b/amf/public/samples/CPPSamples/common/TranscodePipeline.h index 74bfa382..73708deb 100644 --- a/amf/public/samples/CPPSamples/common/TranscodePipeline.h +++ b/amf/public/samples/CPPSamples/common/TranscodePipeline.h @@ -37,6 +37,7 @@ #include "public/include/components/VideoConverter.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/components/PreProcessing.h" #if defined(_WIN32) @@ -52,6 +53,7 @@ #include "ParametersStorage.h" #include "EncoderParamsAVC.h" #include "EncoderParamsHEVC.h" +#include "EncoderParamsAV1.h" #include "PreProcessingParams.h" #include "BackBufferPresenter.h" #include "RawStreamReader.h" diff --git a/amf/public/samples/CPPSamples/common/VideoPresenter.cpp b/amf/public/samples/CPPSamples/common/VideoPresenter.cpp index 90ec16a9..94d3db8f 100644 --- a/amf/public/samples/CPPSamples/common/VideoPresenter.cpp +++ b/amf/public/samples/CPPSamples/common/VideoPresenter.cpp @@ -62,7 +62,7 @@ VideoPresenter::VideoPresenter() : m_bFullScreen(false), m_bWaitForVSync(false), m_bEnablePIP(false), - m_fPIPZoomFactor(0.1f), + m_iPIPZoomFactor(4), m_fPIPFocusPos({ 0.45f, 0.45f }) { amf_increase_timer_precision(); @@ -266,14 +266,15 @@ void VideoPresenter::UpdateProcessor() } } - if (m_pHQScaler != NULL) - { - const amf::AMFPropertyInfo* pParamInfo = nullptr; - if ((m_pHQScaler->GetPropertyInfo(AMF_HQ_SCALER_OUTPUT_SIZE, &pParamInfo) == AMF_OK) && pParamInfo) - { - m_pHQScaler->SetProperty(AMF_HQ_SCALER_OUTPUT_SIZE, ::AMFConstructSize(m_rectClient.Width(), m_rectClient.Height())); - } - } + // Need to comment this out for now because it sets the HQScaler resolution to the window size instead of using the scaling ratio + //if (m_pHQScaler != NULL) + //{ + // const amf::AMFPropertyInfo* pParamInfo = nullptr; + // if ((m_pHQScaler->GetPropertyInfo(AMF_HQ_SCALER_OUTPUT_SIZE, &pParamInfo) == AMF_OK) && pParamInfo) + // { + // m_pHQScaler->SetProperty(AMF_HQ_SCALER_OUTPUT_SIZE, ::AMFConstructSize(m_rectClient.Width(), m_rectClient.Height())); + // } + //} } } diff --git a/amf/public/samples/CPPSamples/common/VideoPresenter.h b/amf/public/samples/CPPSamples/common/VideoPresenter.h index c1f1328a..028a6f54 100644 --- a/amf/public/samples/CPPSamples/common/VideoPresenter.h +++ b/amf/public/samples/CPPSamples/common/VideoPresenter.h @@ -99,15 +99,15 @@ class VideoPresenter: public PipelineElement, public amf::AMFDataAllocatorCB, pu // amf::AMFInterface interface virtual amf_long AMF_STD_CALL Acquire() { return 1; } virtual amf_long AMF_STD_CALL Release() { return 1; } - virtual AMF_RESULT AMF_STD_CALL QueryInterface(const amf::AMFGuid& interfaceID, void** ppInterface) { return AMF_NOT_IMPLEMENTED; } + virtual AMF_RESULT AMF_STD_CALL QueryInterface(const amf::AMFGuid& /*interfaceID*/, void** /*ppInterface*/) { return AMF_NOT_IMPLEMENTED; } // amf::AMFDataAllocatorCB interface - virtual AMF_RESULT AMF_STD_CALL AllocBuffer(amf::AMF_MEMORY_TYPE type, amf_size size, amf::AMFBuffer** ppBuffer) { return AMF_NOT_IMPLEMENTED; } - virtual AMF_RESULT AMF_STD_CALL AllocSurface(amf::AMF_MEMORY_TYPE type, amf::AMF_SURFACE_FORMAT format, - amf_int32 width, amf_int32 height, amf_int32 hPitch, amf_int32 vPitch, amf::AMFSurface** ppSurface) {return AMF_NOT_IMPLEMENTED; } + virtual AMF_RESULT AMF_STD_CALL AllocBuffer(amf::AMF_MEMORY_TYPE /*type*/, amf_size /*size*/, amf::AMFBuffer** /*ppBuffer*/) { return AMF_NOT_IMPLEMENTED; } + virtual AMF_RESULT AMF_STD_CALL AllocSurface(amf::AMF_MEMORY_TYPE /*type*/, amf::AMF_SURFACE_FORMAT /*format*/, + amf_int32 /*width*/, amf_int32 /*height*/, amf_int32 /*hPitch*/, amf_int32 /*vPitch*/, amf::AMFSurface** /*ppSurface*/) { return AMF_NOT_IMPLEMENTED; } // amf::AMFSurfaceObserver interface - virtual void AMF_STD_CALL OnSurfaceDataRelease(amf::AMFSurface* pSurface) {} + virtual void AMF_STD_CALL OnSurfaceDataRelease(amf::AMFSurface* /*pSurface*/) {} virtual void SetOrientation(int orientation) { m_iOrientation = orientation; } virtual int GetOrientation() { return m_iOrientation; } @@ -130,7 +130,7 @@ class VideoPresenter: public PipelineElement, public amf::AMFDataAllocatorCB, pu virtual void SetEnablePIP(bool bEnablePIP) { m_bEnablePIP = bEnablePIP; } virtual bool GetEnablePIP() { return m_bEnablePIP; } - virtual void SetPIPZoomFactor(amf_float fPIPZoomFactor) { m_fPIPZoomFactor = fPIPZoomFactor; } + virtual void SetPIPZoomFactor(amf_int iPIPZoomFactor) { m_iPIPZoomFactor = iPIPZoomFactor; } virtual void SetPIPFocusPositions(AMFFloatPoint2D fPIPFocusPos) { m_fPIPFocusPos = fPIPFocusPos; } protected: @@ -170,7 +170,7 @@ class VideoPresenter: public PipelineElement, public amf::AMFDataAllocatorCB, pu bool m_bWaitForVSync; bool m_bEnablePIP; - float m_fPIPZoomFactor; + amf_int32 m_iPIPZoomFactor; AMFFloatPoint2D m_fPIPFocusPos; int m_iOrientation; diff --git a/amf/public/samples/CPPSamples/common/VideoPresenterDX11.cpp b/amf/public/samples/CPPSamples/common/VideoPresenterDX11.cpp index f750744c..b4d6f757 100644 --- a/amf/public/samples/CPPSamples/common/VideoPresenterDX11.cpp +++ b/amf/public/samples/CPPSamples/common/VideoPresenterDX11.cpp @@ -516,7 +516,9 @@ AMF_RESULT VideoPresenterDX11::Init(amf_int32 width, amf_int32 height, amf::AMFS AMF_RESULT VideoPresenterDX11::Terminate() { - m_pCurrentOutput = NULL; + m_pCurrentOutput = nullptr; + + m_pOutputs.clear(); if (m_pSwapChain1 != nullptr) { @@ -574,7 +576,10 @@ AMF_RESULT VideoPresenterDX11::CreatePresentationSwapChain(amf::AMFSurface* pSur amf::AMFLock lock(&m_sect); - m_pCurrentOutput.Release(); + m_pCurrentOutput = nullptr; + + m_pOutputs.clear(); + m_pSwapChainVideo.Release(); m_pSwapChain1.Release(); m_pSwapChain.Release(); @@ -607,8 +612,6 @@ AMF_RESULT VideoPresenterDX11::CreatePresentationSwapChain(amf::AMFSurface* pSur CComPtr spIDXGIFactory2; spDXGIAdapter->GetParent(__uuidof(IDXGIFactory2), (void **)&spIDXGIFactory2); - HMONITOR hMonitor = MonitorFromWindow((HWND)m_hwnd, MONITOR_DEFAULTTONEAREST); - for (UINT i = 0;; i++) { CComPtr pOutput; @@ -617,19 +620,18 @@ AMF_RESULT VideoPresenterDX11::CreatePresentationSwapChain(amf::AMFSurface* pSur { break; } - DXGI_OUTPUT_DESC outputDesc = {}; - pOutput->GetDesc(&outputDesc); - if (outputDesc.Monitor == hMonitor) - { - m_pCurrentOutput = pOutput; - break; - } + + m_pOutputs.push_back(pOutput); } - if (m_pCurrentOutput == nullptr) + + AMF_RESULT outputUpdate = UpdateCurrentMonitorOutput(); + + if (m_pCurrentOutput == nullptr || outputUpdate == AMF_FAIL) { hr = spDXGIAdapter->EnumOutputs(0, &m_pCurrentOutput); ASSERT_RETURN_IF_HR_FAILED(hr, AMF_DIRECTX_FAILED, L"EnumOutputs(0) failed"); } + m_stereo = false;//for future if(spIDXGIFactory2!=NULL) @@ -1067,6 +1069,8 @@ AMF_RESULT VideoPresenterDX11::ResizeSwapChain() // spContext->ClearState(); spContext->OMSetRenderTargets(0, 0, 0); + UpdateCurrentMonitorOutput(); + DXGI_OUTPUT_DESC outputDesc = {}; m_pCurrentOutput->GetDesc(&outputDesc); @@ -1600,3 +1604,22 @@ AMF_RESULT VideoPresenterDX11::ApplyCSC(amf::AMFSurface* pSurface) #endif return AMF_OK; } + +inline AMF_RESULT VideoPresenterDX11::UpdateCurrentMonitorOutput() +{ + HMONITOR hMonitor = MonitorFromWindow((HWND)m_hwnd, MONITOR_DEFAULTTONEAREST); + + for (size_t i = 0; i < m_pOutputs.size(); ++i) + { + DXGI_OUTPUT_DESC outputDesc = {}; + m_pOutputs[i]->GetDesc(&outputDesc); + + if (outputDesc.Monitor == hMonitor) + { + m_pCurrentOutput = m_pOutputs[i]; + return AMF_OK; + } + } + + return AMF_FAIL; +} diff --git a/amf/public/samples/CPPSamples/common/VideoPresenterDX11.h b/amf/public/samples/CPPSamples/common/VideoPresenterDX11.h index 882540c0..7272c7a8 100644 --- a/amf/public/samples/CPPSamples/common/VideoPresenterDX11.h +++ b/amf/public/samples/CPPSamples/common/VideoPresenterDX11.h @@ -95,11 +95,15 @@ class VideoPresenterDX11 : public BackBufferPresenter AMF_RESULT ApplyCSC(amf::AMFSurface* pSurface); + inline AMF_RESULT UpdateCurrentMonitorOutput(); + + amf::AMF_SURFACE_FORMAT m_eInputFormat; CComQIPtr m_pSwapChain; CComPtr m_pSwapChain1; CComPtr m_pSwapChainVideo; CComPtr m_pCurrentOutput; + std::vector> m_pOutputs; bool m_stereo; CComPtr m_pCopyTexture_L; diff --git a/amf/public/samples/CPPSamples/common/VideoPresenterDX12.cpp b/amf/public/samples/CPPSamples/common/VideoPresenterDX12.cpp index 99a83013..015cbda6 100644 --- a/amf/public/samples/CPPSamples/common/VideoPresenterDX12.cpp +++ b/amf/public/samples/CPPSamples/common/VideoPresenterDX12.cpp @@ -808,11 +808,10 @@ AMF_RESULT VideoPresenterDX12::UpdatePIPVertices(AMFRect* srcRect, AMFSize* srcS w = (FLOAT)srcRect->Width() / srcSize->width; h = (FLOAT)srcRect->Height() / srcSize->height; - FLOAT leftSrc = m_fPIPFocusPos.x + centerX - w / 2; - FLOAT rightSrc = leftSrc + w * m_fPIPZoomFactor * c_pipSize; + FLOAT rightSrc = leftSrc + w * c_pipSize / m_iPIPZoomFactor; FLOAT topSrc = m_fPIPFocusPos.y + centerY - h / 2; - FLOAT bottomSrc = topSrc + h * m_fPIPZoomFactor * c_pipSize; + FLOAT bottomSrc = topSrc + h * c_pipSize / m_iPIPZoomFactor; vertices[0].position = XMFLOAT3(leftDst, bottomDst, 0.0f); vertices[0].texture = XMFLOAT2(leftSrc, topSrc); diff --git a/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c b/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c index 6ef151ae..c29bde2f 100644 --- a/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c +++ b/amf/public/samples/SamplesC/SimpleEncoderC/SimpleEncoderC.c @@ -46,15 +46,17 @@ #include "../common/AMFFactoryC.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "../common/ThreadC.h" #include "../common/TraceAdapterC.h" #define AMF_FACILITY L"SimpleEncoderC" -static wchar_t *pCodec = AMFVideoEncoderVCE_AVC; -//static wchar_t *pCodec = AMFVideoEncoder_HEVC; +static int codecIndex = 1; // index into pCodec/fileNameOut. set to 0 for AVC, 1 for HEVC, 2 for AV1 +static wchar_t* pCodec[] = { AMFVideoEncoderVCE_AVC, AMFVideoEncoder_HEVC, AMFVideoEncoder_AV1 }; +static wchar_t* fileNameOut[] = { L"./output.h264", L"./output.h265", L"./output.av1" }; - //#define ENABLE_4K + // #define ENABLE_4K static AMF_MEMORY_TYPE memoryTypeIn = AMF_MEMORY_DX11; static AMF_SURFACE_FORMAT formatIn = AMF_SURFACE_NV12; @@ -74,8 +76,6 @@ static amf_bool bMaximumSpeed = true; #define START_TIME_PROPERTY L"StartTimeProperty" // custom property ID to store submission time in a frame - all custom properties are copied from input to output -static wchar_t *fileNameOut = L"./output.h264"; - #define MILLISEC_TIME 10000 static amf_int32 xPos = 0; @@ -141,12 +141,12 @@ int _tmain(int argc, _TCHAR* argv[]) } // component: encoder - res = AMFFactoryHelper_GetFactory()->pVtbl->CreateComponent(AMFFactoryHelper_GetFactory(), context, pCodec, &encoder); - AMF_RETURN_IF_FAILED(res, L"CreateComponent(%s) failed", pCodec); + res = AMFFactoryHelper_GetFactory()->pVtbl->CreateComponent(AMFFactoryHelper_GetFactory(), context, pCodec[codecIndex], &encoder); + AMF_RETURN_IF_FAILED(res, L"CreateComponent(%s) failed", pCodec[codecIndex]); AMFSize size = AMFConstructSize(widthIn, heightIn); AMFRate framerate = AMFConstructRate(frameRateIn, 1); - if(wcscmp(pCodec, AMFVideoEncoderVCE_AVC) == 0) + if(wcscmp(pCodec[codecIndex], AMFVideoEncoderVCE_AVC) == 0) { AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_USAGE, AMF_VIDEO_ENCODER_USAGE_TRANSCODING); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_USAGE, AMF_VIDEO_ENCODER_USAGE_TRANSCODING) failed"); @@ -175,7 +175,7 @@ int _tmain(int argc, _TCHAR* argv[]) AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_B_PIC_PATTERN, 0)"); #endif } - else + else if (wcscmp(pCodec[codecIndex], AMFVideoEncoder_HEVC) == 0) { AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_HEVC_USAGE, AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING); AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_USAGE, AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING)"); @@ -199,10 +199,37 @@ int _tmain(int argc, _TCHAR* argv[]) AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL, AMF_LEVEL_5_1) failed"); #endif } + else if (wcscmp(pCodec[codecIndex], AMFVideoEncoder_AV1) == 0) + { + AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_AV1_USAGE_TRANSCODING); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_USAGE, AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING)"); + + if (bMaximumSpeed) + { + AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET, AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED)"); + } + AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, bitRateIn); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_TARGET_BITRATE, %" LPRId64 L") failed", bitRateIn); + AMF_ASSIGN_PROPERTY_SIZE(res, encoder, AMF_VIDEO_ENCODER_AV1_FRAMESIZE, size); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMESIZE, %dx%d) failed", widthIn, heightIn); + AMF_ASSIGN_PROPERTY_RATE(res, encoder, AMF_VIDEO_ENCODER_AV1_FRAMERATE, framerate); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_FRAMERATE, %dx%d) failed", frameRateIn, 1); + +#if defined(ENABLE_4K) + //AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_PROFILE, AMF_VIDEO_ENCODER_AV1_PROFILE_HIGH); + //AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_PROFILE, AMF_VIDEO_ENCODER_AV1_PROFILE_HIGH) failed"); + AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_LEVEL, AMF_VIDEO_ENCODER_AV1_LEVEL_5_1); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_LEVEL, AMF_VIDEO_ENCODER_AV1_LEVEL_5_1) failed"); +#endif + + AMF_ASSIGN_PROPERTY_INT64(res, encoder, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS); + AMF_RETURN_IF_FAILED(res, L"SetProperty(AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE, %d) failed", AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS); + } res = encoder->pVtbl->Init(encoder, formatIn, widthIn, heightIn); AMF_RETURN_IF_FAILED(res, L"encoder->Init() failed"); - PollingThread_Run(&s_thread, context, encoder, fileNameOut); + PollingThread_Run(&s_thread, context, encoder, fileNameOut[codecIndex]); // encode some frames amf_int32 submitted = 0; @@ -431,7 +458,7 @@ void AMF_CDECL_CALL AMFThreadProc(void* pThis) AMF_RESULT res = AMF_OK; // error checking can be added later while(true) { - AMFData* data; + AMFData* data = NULL; res = pT->m_pEncoder->pVtbl->QueryOutput(pT->m_pEncoder, &data); if(res == AMF_EOF) { diff --git a/amf/public/src/components/AudioCapture/WASAPISource.cpp b/amf/public/src/components/AudioCapture/WASAPISource.cpp index 1fb04d0d..d58e3ab8 100644 --- a/amf/public/src/components/AudioCapture/WASAPISource.cpp +++ b/amf/public/src/components/AudioCapture/WASAPISource.cpp @@ -1,4 +1,4 @@ -// +// // Notice Regarding Standards. AMD does not provide a license or sublicense to // any Intellectual Property Rights relating to any standards, including but not // limited to any audio and/or video codec technologies such as MPEG-2, MPEG-4; @@ -6,9 +6,9 @@ // (collectively, the "Media Technologies"). For clarity, you will pay any // royalties due for such third party technologies, which may include the Media // Technologies that are owed as a result of AMD providing the Software to you. -// -// MIT license -// +// +// MIT license +// // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy @@ -298,7 +298,7 @@ AMF_RESULT AMFWASAPISourceImpl::InitCaptureMicrophone(amf_int32 activeDevice, am { return CreateDeviceList(); } - + AMF_RETURN_IF_FAILED(CreateEnumerator()); ATL::CComPtr pCollection; @@ -370,7 +370,7 @@ AMF_RESULT AMFWASAPISourceImpl::InitCaptureMicrophone(amf_int32 activeDevice, am hr = m_client->Start(); AMF_RETURN_IF_FALSE(SUCCEEDED(hr), AMF_FAIL, L"Start() failed"); - + wchar_t *id; m_device->GetId(&id); if (nullptr != id) @@ -378,7 +378,7 @@ AMF_RESULT AMFWASAPISourceImpl::InitCaptureMicrophone(amf_int32 activeDevice, am m_notification.SetDeviceID(id); CoTaskMemFree(id); } - + m_enumerator->RegisterEndpointNotificationCallback(&m_notification); return AMF_OK; @@ -394,7 +394,7 @@ static amf_wstring WaveFormatToString(const WAVEFORMATEX* format) L", samples per sec: " << format->nSamplesPerSec << L", block align: " << format->nBlockAlign << L", avg bytes/sec: " << format->nAvgBytesPerSec; - + str = stream.str().c_str(); return str; } @@ -549,9 +549,7 @@ AMF_RESULT AMFWASAPISourceImpl::CreateDeviceList() AMF_RESULT amf::AMFWASAPISourceImpl::CreateEnumerator() { - HRESULT hr = CoInitialize(nullptr); - AMF_RETURN_IF_FALSE(SUCCEEDED(hr), AMF_FAIL, L"CoInitialize() failed"); - hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&m_enumerator); + HRESULT hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&m_enumerator); AMF_RETURN_IF_FALSE(SUCCEEDED(hr), AMF_FAIL, L"CoCreateInstance() failed"); return AMF_OK; @@ -600,7 +598,7 @@ ULONG STDMETHODCALLTYPE AudioDeviceNotification::Release(void) return 1; } -HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState) +HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD /*dwNewState*/) { if (0 == wcscmp(pwstrDeviceId, m_deviceId.c_str()) || m_deviceId.empty()) @@ -609,11 +607,11 @@ HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceStateChanged(LPCWSTR m_lastEvent = amf_high_precision_clock(); } - + return S_OK; } -HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceAdded(LPCWSTR pwstrDeviceId) +HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceAdded(LPCWSTR /*pwstrDeviceId*/) { // does not affect capture return S_OK; @@ -630,7 +628,7 @@ HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDeviceRemoved(LPCWSTR pwstr return S_OK; } -HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR pwstrDefaultDeviceId) +HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDefaultDeviceChanged(EDataFlow /*flow*/, ERole /*role*/, LPCWSTR pwstrDefaultDeviceId) { // match if new default is not our device if (m_deviceId.empty() || (pwstrDefaultDeviceId != nullptr && 0 != wcscmp(pwstrDefaultDeviceId, m_deviceId.c_str()))) @@ -641,7 +639,7 @@ HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnDefaultDeviceChanged(EDataF return S_OK; } -HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key) +HRESULT STDMETHODCALLTYPE AudioDeviceNotification::OnPropertyValueChanged(LPCWSTR /*pwstrDeviceId*/, const PROPERTYKEY /*key*/) { // property changes are ignored return S_OK; diff --git a/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_h.h b/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_h.h index 361d8785..efc09b0e 100644 --- a/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_h.h +++ b/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_h.h @@ -3,11 +3,11 @@ /* this ALWAYS GENERATED file contains the definitions for the interfaces */ - /* File created by MIDL compiler version 8.01.0622 */ + /* File created by MIDL compiler version 8.01.0626 */ /* at Mon Jan 18 22:14:07 2038 */ /* Compiler settings for ..\..\..\..\..\Thirdparty\BlackmagicDeckLinkSDK\10.9.10\Win\include\DeckLinkAPI.idl: - Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622 + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0626 protocol : all , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: @@ -38,6 +38,14 @@ #pragma once #endif +#ifndef DECLSPEC_XFGVIRT +#if _CONTROL_FLOW_GUARD_XFG +#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func)) +#else +#define DECLSPEC_XFGVIRT(base, func) +#endif +#endif + /* Forward Declarations */ #ifndef __IDeckLinkTimecode_FWD_DEFINED__ @@ -1871,21 +1879,26 @@ EXTERN_C const IID IID_IDeckLinkTimecode; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkTimecode * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkTimecode * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkTimecode * This); + DECLSPEC_XFGVIRT(IDeckLinkTimecode, GetBCD) BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( IDeckLinkTimecode * This); + DECLSPEC_XFGVIRT(IDeckLinkTimecode, GetComponents) HRESULT ( STDMETHODCALLTYPE *GetComponents )( IDeckLinkTimecode * This, /* [out] */ unsigned char *hours, @@ -1893,13 +1906,16 @@ EXTERN_C const IID IID_IDeckLinkTimecode; /* [out] */ unsigned char *seconds, /* [out] */ unsigned char *frames); + DECLSPEC_XFGVIRT(IDeckLinkTimecode, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkTimecode * This, /* [out] */ BSTR *timecode); + DECLSPEC_XFGVIRT(IDeckLinkTimecode, GetFlags) BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkTimecode * This); + DECLSPEC_XFGVIRT(IDeckLinkTimecode, GetTimecodeUserBits) HRESULT ( STDMETHODCALLTYPE *GetTimecodeUserBits )( IDeckLinkTimecode * This, /* [out] */ BMDTimecodeUserBits *userBits); @@ -1980,18 +1996,22 @@ EXTERN_C const IID IID_IDeckLinkDisplayModeIterator; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayModeIterator * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayModeIterator * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayModeIterator * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayModeIterator, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IDeckLinkDisplayModeIterator * This, /* [out] */ IDeckLinkDisplayMode **deckLinkDisplayMode); @@ -2074,39 +2094,49 @@ EXTERN_C const IID IID_IDeckLinkDisplayMode; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayMode * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetName) HRESULT ( STDMETHODCALLTYPE *GetName )( IDeckLinkDisplayMode * This, /* [out] */ BSTR *name); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetDisplayMode) BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetFrameRate) HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( IDeckLinkDisplayMode * This, /* [out] */ BMDTimeValue *frameDuration, /* [out] */ BMDTimeScale *timeScale); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetFieldDominance) BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( IDeckLinkDisplayMode * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode, GetFlags) BMDDisplayModeFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkDisplayMode * This); @@ -2195,22 +2225,27 @@ EXTERN_C const IID IID_IDeckLink; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLink * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLink * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLink * This); + DECLSPEC_XFGVIRT(IDeckLink, GetModelName) HRESULT ( STDMETHODCALLTYPE *GetModelName )( IDeckLink * This, /* [out] */ BSTR *modelName); + DECLSPEC_XFGVIRT(IDeckLink, GetDisplayName) HRESULT ( STDMETHODCALLTYPE *GetDisplayName )( IDeckLink * This, /* [out] */ BSTR *displayName); @@ -2313,58 +2348,70 @@ EXTERN_C const IID IID_IDeckLinkConfiguration; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkConfiguration * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkConfiguration * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkConfiguration * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkConfiguration * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration, WriteConfigurationToPreferences) HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( IDeckLinkConfiguration * This); @@ -2490,58 +2537,70 @@ EXTERN_C const IID IID_IDeckLinkEncoderConfiguration; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderConfiguration * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderConfiguration * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderConfiguration * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkEncoderConfiguration * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, @@ -2648,32 +2707,39 @@ EXTERN_C const IID IID_IDeckLinkDeckControlStatusCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeckControlStatusCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeckControlStatusCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeckControlStatusCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback, TimecodeUpdate) HRESULT ( STDMETHODCALLTYPE *TimecodeUpdate )( IDeckLinkDeckControlStatusCallback * This, /* [in] */ BMDTimecodeBCD currentTimecode); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback, VTRControlStateChanged) HRESULT ( STDMETHODCALLTYPE *VTRControlStateChanged )( IDeckLinkDeckControlStatusCallback * This, /* [in] */ BMDDeckControlVTRControlState newState, /* [in] */ BMDDeckControlError error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback, DeckControlEventReceived) HRESULT ( STDMETHODCALLTYPE *DeckControlEventReceived )( IDeckLinkDeckControlStatusCallback * This, /* [in] */ BMDDeckControlEvent event, /* [in] */ BMDDeckControlError error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback, DeckControlStatusChanged) HRESULT ( STDMETHODCALLTYPE *DeckControlStatusChanged )( IDeckLinkDeckControlStatusCallback * This, /* [in] */ BMDDeckControlStatusFlags flags, @@ -2872,18 +2938,22 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeckControl * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeckControl * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeckControl * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Open) HRESULT ( STDMETHODCALLTYPE *Open )( IDeckLinkDeckControl * This, /* [in] */ BMDTimeScale timeScale, @@ -2891,20 +2961,24 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; /* [in] */ BOOL timecodeIsDropFrame, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Close) HRESULT ( STDMETHODCALLTYPE *Close )( IDeckLinkDeckControl * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetCurrentState) HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlMode *mode, /* [out] */ BMDDeckControlVTRControlState *vtrControlState, /* [out] */ BMDDeckControlStatusFlags *flags); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SetStandby) HRESULT ( STDMETHODCALLTYPE *SetStandby )( IDeckLinkDeckControl * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SendCommand) HRESULT ( STDMETHODCALLTYPE *SendCommand )( IDeckLinkDeckControl * This, /* [in] */ unsigned char *inBuffer, @@ -2914,98 +2988,120 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; /* [in] */ unsigned int outBufferSize, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Play) HRESULT ( STDMETHODCALLTYPE *Play )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Stop) HRESULT ( STDMETHODCALLTYPE *Stop )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, TogglePlayStop) HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Eject) HRESULT ( STDMETHODCALLTYPE *Eject )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GoToTimecode) HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( IDeckLinkDeckControl * This, /* [in] */ BMDTimecodeBCD timecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, FastForward) HRESULT ( STDMETHODCALLTYPE *FastForward )( IDeckLinkDeckControl * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Rewind) HRESULT ( STDMETHODCALLTYPE *Rewind )( IDeckLinkDeckControl * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, StepForward) HRESULT ( STDMETHODCALLTYPE *StepForward )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, StepBack) HRESULT ( STDMETHODCALLTYPE *StepBack )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Jog) HRESULT ( STDMETHODCALLTYPE *Jog )( IDeckLinkDeckControl * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Shuttle) HRESULT ( STDMETHODCALLTYPE *Shuttle )( IDeckLinkDeckControl * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetTimecodeString) HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( IDeckLinkDeckControl * This, /* [out] */ BSTR *currentTimeCode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkDeckControl * This, /* [out] */ IDeckLinkTimecode **currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetTimecodeBCD) HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( IDeckLinkDeckControl * This, /* [out] */ BMDTimecodeBCD *currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SetPreroll) HRESULT ( STDMETHODCALLTYPE *SetPreroll )( IDeckLinkDeckControl * This, /* [in] */ unsigned int prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetPreroll) HRESULT ( STDMETHODCALLTYPE *GetPreroll )( IDeckLinkDeckControl * This, /* [out] */ unsigned int *prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SetExportOffset) HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( IDeckLinkDeckControl * This, /* [in] */ int exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetExportOffset) HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( IDeckLinkDeckControl * This, /* [out] */ int *exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetManualExportOffset) HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( IDeckLinkDeckControl * This, /* [out] */ int *deckManualExportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( IDeckLinkDeckControl * This, /* [in] */ int captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( IDeckLinkDeckControl * This, /* [out] */ int *captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, StartExport) HRESULT ( STDMETHODCALLTYPE *StartExport )( IDeckLinkDeckControl * This, /* [in] */ BMDTimecodeBCD inTimecode, @@ -3013,6 +3109,7 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, StartCapture) HRESULT ( STDMETHODCALLTYPE *StartCapture )( IDeckLinkDeckControl * This, /* [in] */ BOOL useVITC, @@ -3020,22 +3117,27 @@ EXTERN_C const IID IID_IDeckLinkDeckControl; /* [in] */ BMDTimecodeBCD outTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, GetDeviceID) HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( IDeckLinkDeckControl * This, /* [out] */ unsigned short *deviceId, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, Abort) HRESULT ( STDMETHODCALLTYPE *Abort )( IDeckLinkDeckControl * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, CrashRecordStart) HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, CrashRecordStop) HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( IDeckLinkDeckControl * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkDeckControl * This, /* [in] */ IDeckLinkDeckControlStatusCallback *callback); @@ -3207,26 +3309,32 @@ EXTERN_C const IID IID_IBMDStreamingDeviceNotificationCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingDeviceNotificationCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingDeviceNotificationCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingDeviceNotificationCallback * This); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceNotificationCallback, StreamingDeviceArrived) HRESULT ( STDMETHODCALLTYPE *StreamingDeviceArrived )( IBMDStreamingDeviceNotificationCallback * This, /* [in] */ IDeckLink *device); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceNotificationCallback, StreamingDeviceRemoved) HRESULT ( STDMETHODCALLTYPE *StreamingDeviceRemoved )( IBMDStreamingDeviceNotificationCallback * This, /* [in] */ IDeckLink *device); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceNotificationCallback, StreamingDeviceModeChanged) HRESULT ( STDMETHODCALLTYPE *StreamingDeviceModeChanged )( IBMDStreamingDeviceNotificationCallback * This, /* [in] */ IDeckLink *device, @@ -3314,36 +3422,45 @@ EXTERN_C const IID IID_IBMDStreamingH264InputCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingH264InputCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingH264InputCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingH264InputCallback * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, H264NALPacketArrived) HRESULT ( STDMETHODCALLTYPE *H264NALPacketArrived )( IBMDStreamingH264InputCallback * This, /* [in] */ IBMDStreamingH264NALPacket *nalPacket); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, H264AudioPacketArrived) HRESULT ( STDMETHODCALLTYPE *H264AudioPacketArrived )( IBMDStreamingH264InputCallback * This, /* [in] */ IBMDStreamingAudioPacket *audioPacket); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, MPEG2TSPacketArrived) HRESULT ( STDMETHODCALLTYPE *MPEG2TSPacketArrived )( IBMDStreamingH264InputCallback * This, /* [in] */ IBMDStreamingMPEG2TSPacket *tsPacket); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, H264VideoInputConnectorScanningChanged) HRESULT ( STDMETHODCALLTYPE *H264VideoInputConnectorScanningChanged )( IBMDStreamingH264InputCallback * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, H264VideoInputConnectorChanged) HRESULT ( STDMETHODCALLTYPE *H264VideoInputConnectorChanged )( IBMDStreamingH264InputCallback * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264InputCallback, H264VideoInputModeChanged) HRESULT ( STDMETHODCALLTYPE *H264VideoInputModeChanged )( IBMDStreamingH264InputCallback * This); @@ -3428,22 +3545,27 @@ EXTERN_C const IID IID_IBMDStreamingDiscovery; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingDiscovery * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingDiscovery * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingDiscovery * This); + DECLSPEC_XFGVIRT(IBMDStreamingDiscovery, InstallDeviceNotifications) HRESULT ( STDMETHODCALLTYPE *InstallDeviceNotifications )( IBMDStreamingDiscovery * This, /* [in] */ IBMDStreamingDeviceNotificationCallback *theCallback); + DECLSPEC_XFGVIRT(IBMDStreamingDiscovery, UninstallDeviceNotifications) HRESULT ( STDMETHODCALLTYPE *UninstallDeviceNotifications )( IBMDStreamingDiscovery * This); @@ -3547,63 +3669,79 @@ EXTERN_C const IID IID_IBMDStreamingVideoEncodingMode; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingVideoEncodingMode * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetName) HRESULT ( STDMETHODCALLTYPE *GetName )( IBMDStreamingVideoEncodingMode * This, /* [out] */ BSTR *name); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetPresetID) unsigned int ( STDMETHODCALLTYPE *GetPresetID )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourcePositionX) unsigned int ( STDMETHODCALLTYPE *GetSourcePositionX )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourcePositionY) unsigned int ( STDMETHODCALLTYPE *GetSourcePositionY )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourceWidth) unsigned int ( STDMETHODCALLTYPE *GetSourceWidth )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourceHeight) unsigned int ( STDMETHODCALLTYPE *GetSourceHeight )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetDestWidth) unsigned int ( STDMETHODCALLTYPE *GetDestWidth )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetDestHeight) unsigned int ( STDMETHODCALLTYPE *GetDestHeight )( IBMDStreamingVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IBMDStreamingVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IBMDStreamingVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IBMDStreamingVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IBMDStreamingVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, CreateMutableVideoEncodingMode) HRESULT ( STDMETHODCALLTYPE *CreateMutableVideoEncodingMode )( IBMDStreamingVideoEncodingMode * This, /* [out] */ IBMDStreamingMutableVideoEncodingMode **newEncodingMode); @@ -3731,67 +3869,84 @@ EXTERN_C const IID IID_IBMDStreamingMutableVideoEncodingMode; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetName) HRESULT ( STDMETHODCALLTYPE *GetName )( IBMDStreamingMutableVideoEncodingMode * This, /* [out] */ BSTR *name); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetPresetID) unsigned int ( STDMETHODCALLTYPE *GetPresetID )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourcePositionX) unsigned int ( STDMETHODCALLTYPE *GetSourcePositionX )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourcePositionY) unsigned int ( STDMETHODCALLTYPE *GetSourcePositionY )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourceWidth) unsigned int ( STDMETHODCALLTYPE *GetSourceWidth )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetSourceHeight) unsigned int ( STDMETHODCALLTYPE *GetSourceHeight )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetDestWidth) unsigned int ( STDMETHODCALLTYPE *GetDestWidth )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetDestHeight) unsigned int ( STDMETHODCALLTYPE *GetDestHeight )( IBMDStreamingMutableVideoEncodingMode * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingMode, CreateMutableVideoEncodingMode) HRESULT ( STDMETHODCALLTYPE *CreateMutableVideoEncodingMode )( IBMDStreamingMutableVideoEncodingMode * This, /* [out] */ IBMDStreamingMutableVideoEncodingMode **newEncodingMode); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetSourceRect) HRESULT ( STDMETHODCALLTYPE *SetSourceRect )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ unsigned int posX, @@ -3799,26 +3954,31 @@ EXTERN_C const IID IID_IBMDStreamingMutableVideoEncodingMode; /* [in] */ unsigned int width, /* [in] */ unsigned int height); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetDestSize) HRESULT ( STDMETHODCALLTYPE *SetDestSize )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ unsigned int width, /* [in] */ unsigned int height); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IBMDStreamingMutableVideoEncodingMode, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IBMDStreamingMutableVideoEncodingMode * This, /* [in] */ BMDStreamingEncodingModePropertyID cfgID, @@ -3943,18 +4103,22 @@ EXTERN_C const IID IID_IBMDStreamingVideoEncodingModePresetIterator; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingVideoEncodingModePresetIterator * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingVideoEncodingModePresetIterator * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingVideoEncodingModePresetIterator * This); + DECLSPEC_XFGVIRT(IBMDStreamingVideoEncodingModePresetIterator, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IBMDStreamingVideoEncodingModePresetIterator * This, /* [out] */ IBMDStreamingVideoEncodingMode **videoEncodingMode); @@ -4056,44 +4220,54 @@ EXTERN_C const IID IID_IBMDStreamingDeviceInput; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingDeviceInput * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingDeviceInput * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingDeviceInput * This); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, DoesSupportVideoInputMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoInputMode )( IBMDStreamingDeviceInput * This, /* [in] */ BMDDisplayMode inputMode, /* [out] */ BOOL *result); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, GetVideoInputModeIterator) HRESULT ( STDMETHODCALLTYPE *GetVideoInputModeIterator )( IBMDStreamingDeviceInput * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, SetVideoInputMode) HRESULT ( STDMETHODCALLTYPE *SetVideoInputMode )( IBMDStreamingDeviceInput * This, /* [in] */ BMDDisplayMode inputMode); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, GetCurrentDetectedVideoInputMode) HRESULT ( STDMETHODCALLTYPE *GetCurrentDetectedVideoInputMode )( IBMDStreamingDeviceInput * This, /* [out] */ BMDDisplayMode *detectedMode); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, GetVideoEncodingMode) HRESULT ( STDMETHODCALLTYPE *GetVideoEncodingMode )( IBMDStreamingDeviceInput * This, /* [out] */ IBMDStreamingVideoEncodingMode **encodingMode); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, GetVideoEncodingModePresetIterator) HRESULT ( STDMETHODCALLTYPE *GetVideoEncodingModePresetIterator )( IBMDStreamingDeviceInput * This, /* [in] */ BMDDisplayMode inputMode, /* [out] */ IBMDStreamingVideoEncodingModePresetIterator **iterator); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, DoesSupportVideoEncodingMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoEncodingMode )( IBMDStreamingDeviceInput * This, /* [in] */ BMDDisplayMode inputMode, @@ -4101,16 +4275,20 @@ EXTERN_C const IID IID_IBMDStreamingDeviceInput; /* [out] */ BMDStreamingEncodingSupport *result, /* [out] */ IBMDStreamingVideoEncodingMode **changedEncodingMode); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, SetVideoEncodingMode) HRESULT ( STDMETHODCALLTYPE *SetVideoEncodingMode )( IBMDStreamingDeviceInput * This, /* [in] */ IBMDStreamingVideoEncodingMode *encodingMode); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, StartCapture) HRESULT ( STDMETHODCALLTYPE *StartCapture )( IBMDStreamingDeviceInput * This); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, StopCapture) HRESULT ( STDMETHODCALLTYPE *StopCapture )( IBMDStreamingDeviceInput * This); + DECLSPEC_XFGVIRT(IBMDStreamingDeviceInput, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IBMDStreamingDeviceInput * This, /* [in] */ IUnknown *theCallback); @@ -4221,34 +4399,42 @@ EXTERN_C const IID IID_IBMDStreamingH264NALPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingH264NALPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingH264NALPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingH264NALPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALPacket, GetPayloadSize) long ( STDMETHODCALLTYPE *GetPayloadSize )( IBMDStreamingH264NALPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IBMDStreamingH264NALPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALPacket, GetBytesWithSizePrefix) HRESULT ( STDMETHODCALLTYPE *GetBytesWithSizePrefix )( IBMDStreamingH264NALPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALPacket, GetDisplayTime) HRESULT ( STDMETHODCALLTYPE *GetDisplayTime )( IBMDStreamingH264NALPacket * This, /* [in] */ ULONGLONG requestedTimeScale, /* [out] */ ULONGLONG *displayTime); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALPacket, GetPacketIndex) HRESULT ( STDMETHODCALLTYPE *GetPacketIndex )( IBMDStreamingH264NALPacket * This, /* [out] */ unsigned int *packetIndex); @@ -4340,33 +4526,41 @@ EXTERN_C const IID IID_IBMDStreamingAudioPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingAudioPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingAudioPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingAudioPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingAudioPacket, GetCodec) BMDStreamingAudioCodec ( STDMETHODCALLTYPE *GetCodec )( IBMDStreamingAudioPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingAudioPacket, GetPayloadSize) long ( STDMETHODCALLTYPE *GetPayloadSize )( IBMDStreamingAudioPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingAudioPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IBMDStreamingAudioPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IBMDStreamingAudioPacket, GetPlayTime) HRESULT ( STDMETHODCALLTYPE *GetPlayTime )( IBMDStreamingAudioPacket * This, /* [in] */ ULONGLONG requestedTimeScale, /* [out] */ ULONGLONG *playTime); + DECLSPEC_XFGVIRT(IBMDStreamingAudioPacket, GetPacketIndex) HRESULT ( STDMETHODCALLTYPE *GetPacketIndex )( IBMDStreamingAudioPacket * This, /* [out] */ unsigned int *packetIndex); @@ -4449,21 +4643,26 @@ EXTERN_C const IID IID_IBMDStreamingMPEG2TSPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingMPEG2TSPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingMPEG2TSPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingMPEG2TSPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingMPEG2TSPacket, GetPayloadSize) long ( STDMETHODCALLTYPE *GetPayloadSize )( IBMDStreamingMPEG2TSPacket * This); + DECLSPEC_XFGVIRT(IBMDStreamingMPEG2TSPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IBMDStreamingMPEG2TSPacket * This, /* [out] */ void **buffer); @@ -4544,26 +4743,32 @@ EXTERN_C const IID IID_IBMDStreamingH264NALParser; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IBMDStreamingH264NALParser * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IBMDStreamingH264NALParser * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IBMDStreamingH264NALParser * This); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALParser, IsNALSequenceParameterSet) HRESULT ( STDMETHODCALLTYPE *IsNALSequenceParameterSet )( IBMDStreamingH264NALParser * This, /* [in] */ IBMDStreamingH264NALPacket *nal); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALParser, IsNALPictureParameterSet) HRESULT ( STDMETHODCALLTYPE *IsNALPictureParameterSet )( IBMDStreamingH264NALParser * This, /* [in] */ IBMDStreamingH264NALPacket *nal); + DECLSPEC_XFGVIRT(IBMDStreamingH264NALParser, GetProfileAndLevelFromSPS) HRESULT ( STDMETHODCALLTYPE *GetProfileAndLevelFromSPS )( IBMDStreamingH264NALParser * This, /* [in] */ IBMDStreamingH264NALPacket *nal, @@ -4660,23 +4865,28 @@ EXTERN_C const IID IID_IDeckLinkVideoOutputCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoOutputCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoOutputCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoOutputCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoOutputCallback, ScheduledFrameCompleted) HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( IDeckLinkVideoOutputCallback * This, /* [in] */ IDeckLinkVideoFrame *completedFrame, /* [in] */ BMDOutputFrameCompletionResult result); + DECLSPEC_XFGVIRT(IDeckLinkVideoOutputCallback, ScheduledPlaybackHasStopped) HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( IDeckLinkVideoOutputCallback * This); @@ -4753,24 +4963,29 @@ EXTERN_C const IID IID_IDeckLinkInputCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInputCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInputCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInputCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback, VideoInputFormatChanged) HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( IDeckLinkInputCallback * This, /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents, /* [in] */ IDeckLinkDisplayMode *newDisplayMode, /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback, VideoInputFrameArrived) HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( IDeckLinkInputCallback * This, /* [in] */ IDeckLinkVideoInputFrame *videoFrame, @@ -4851,28 +5066,34 @@ EXTERN_C const IID IID_IDeckLinkEncoderInputCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderInputCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderInputCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderInputCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInputCallback, VideoInputSignalChanged) HRESULT ( STDMETHODCALLTYPE *VideoInputSignalChanged )( IDeckLinkEncoderInputCallback * This, /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents, /* [in] */ IDeckLinkDisplayMode *newDisplayMode, /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInputCallback, VideoPacketArrived) HRESULT ( STDMETHODCALLTYPE *VideoPacketArrived )( IDeckLinkEncoderInputCallback * This, /* [in] */ IDeckLinkEncoderVideoPacket *videoPacket); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInputCallback, AudioPacketArrived) HRESULT ( STDMETHODCALLTYPE *AudioPacketArrived )( IDeckLinkEncoderInputCallback * This, /* [in] */ IDeckLinkEncoderAudioPacket *audioPacket); @@ -4955,30 +5176,37 @@ EXTERN_C const IID IID_IDeckLinkMemoryAllocator; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkMemoryAllocator * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkMemoryAllocator * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkMemoryAllocator * This); + DECLSPEC_XFGVIRT(IDeckLinkMemoryAllocator, AllocateBuffer) HRESULT ( STDMETHODCALLTYPE *AllocateBuffer )( IDeckLinkMemoryAllocator * This, /* [in] */ unsigned int bufferSize, /* [out] */ void **allocatedBuffer); + DECLSPEC_XFGVIRT(IDeckLinkMemoryAllocator, ReleaseBuffer) HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( IDeckLinkMemoryAllocator * This, /* [in] */ void *buffer); + DECLSPEC_XFGVIRT(IDeckLinkMemoryAllocator, Commit) HRESULT ( STDMETHODCALLTYPE *Commit )( IDeckLinkMemoryAllocator * This); + DECLSPEC_XFGVIRT(IDeckLinkMemoryAllocator, Decommit) HRESULT ( STDMETHODCALLTYPE *Decommit )( IDeckLinkMemoryAllocator * This); @@ -5055,18 +5283,22 @@ EXTERN_C const IID IID_IDeckLinkAudioOutputCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkAudioOutputCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkAudioOutputCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkAudioOutputCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkAudioOutputCallback, RenderAudioSamples) HRESULT ( STDMETHODCALLTYPE *RenderAudioSamples )( IDeckLinkAudioOutputCallback * This, /* [in] */ BOOL preroll); @@ -5135,18 +5367,22 @@ EXTERN_C const IID IID_IDeckLinkIterator; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkIterator * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkIterator * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkIterator * This); + DECLSPEC_XFGVIRT(IDeckLinkIterator, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IDeckLinkIterator * This, /* [out] */ IDeckLink **deckLinkInstance); @@ -5228,33 +5464,40 @@ EXTERN_C const IID IID_IDeckLinkAPIInformation; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkAPIInformation * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkAPIInformation * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkAPIInformation * This); + DECLSPEC_XFGVIRT(IDeckLinkAPIInformation, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkAPIInformation * This, /* [in] */ BMDDeckLinkAPIInformationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkAPIInformation, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkAPIInformation * This, /* [in] */ BMDDeckLinkAPIInformationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkAPIInformation, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkAPIInformation * This, /* [in] */ BMDDeckLinkAPIInformationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkAPIInformation, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkAPIInformation * This, /* [in] */ BMDDeckLinkAPIInformationID cfgID, @@ -5443,18 +5686,22 @@ EXTERN_C const IID IID_IDeckLinkOutput; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkOutput * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkOutput * This, /* [in] */ BMDDisplayMode displayMode, @@ -5463,26 +5710,32 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [out] */ BMDDisplayModeSupport *result, /* [out] */ IDeckLinkDisplayMode **resultDisplayMode); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkOutput * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IDeckLinkOutput, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkOutput * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput, EnableVideoOutput) HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( IDeckLinkOutput * This, /* [in] */ BMDDisplayMode displayMode, /* [in] */ BMDVideoOutputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkOutput, DisableVideoOutput) HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, SetVideoOutputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( IDeckLinkOutput * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkOutput, CreateVideoFrame) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( IDeckLinkOutput * This, /* [in] */ int width, @@ -5492,15 +5745,18 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [in] */ BMDFrameFlags flags, /* [out] */ IDeckLinkMutableVideoFrame **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput, CreateAncillaryData) HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( IDeckLinkOutput * This, /* [in] */ BMDPixelFormat pixelFormat, /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer); + DECLSPEC_XFGVIRT(IDeckLinkOutput, DisplayVideoFrameSync) HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( IDeckLinkOutput * This, /* [in] */ IDeckLinkVideoFrame *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput, ScheduleVideoFrame) HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( IDeckLinkOutput * This, /* [in] */ IDeckLinkVideoFrame *theFrame, @@ -5508,14 +5764,17 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [in] */ BMDTimeValue displayDuration, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput, SetScheduledFrameCompletionCallback) HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( IDeckLinkOutput * This, /* [in] */ IDeckLinkVideoOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetBufferedVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( IDeckLinkOutput * This, /* [out] */ unsigned int *bufferedFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput, EnableAudioOutput) HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( IDeckLinkOutput * This, /* [in] */ BMDAudioSampleRate sampleRate, @@ -5523,21 +5782,26 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [in] */ unsigned int channelCount, /* [in] */ BMDAudioOutputStreamType streamType); + DECLSPEC_XFGVIRT(IDeckLinkOutput, DisableAudioOutput) HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, WriteAudioSamplesSync) HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( IDeckLinkOutput * This, /* [in] */ void *buffer, /* [in] */ unsigned int sampleFrameCount, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput, BeginAudioPreroll) HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, EndAudioPreroll) HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, ScheduleAudioSamples) HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( IDeckLinkOutput * This, /* [in] */ void *buffer, @@ -5546,43 +5810,52 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [in] */ BMDTimeScale timeScale, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkOutput * This, /* [out] */ unsigned int *bufferedSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput, FlushBufferedAudioSamples) HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( IDeckLinkOutput * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput, SetAudioCallback) HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( IDeckLinkOutput * This, /* [in] */ IDeckLinkAudioOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput, StartScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( IDeckLinkOutput * This, /* [in] */ BMDTimeValue playbackStartTime, /* [in] */ BMDTimeScale timeScale, /* [in] */ double playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput, StopScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( IDeckLinkOutput * This, /* [in] */ BMDTimeValue stopPlaybackAtTime, /* [out] */ BMDTimeValue *actualStopTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput, IsScheduledPlaybackRunning) HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( IDeckLinkOutput * This, /* [out] */ BOOL *active); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetScheduledStreamTime) HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( IDeckLinkOutput * This, /* [in] */ BMDTimeScale desiredTimeScale, /* [out] */ BMDTimeValue *streamTime, /* [out] */ double *playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetReferenceStatus) HRESULT ( STDMETHODCALLTYPE *GetReferenceStatus )( IDeckLinkOutput * This, /* [out] */ BMDReferenceStatus *referenceStatus); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkOutput * This, /* [in] */ BMDTimeScale desiredTimeScale, @@ -5590,6 +5863,7 @@ EXTERN_C const IID IID_IDeckLinkOutput; /* [out] */ BMDTimeValue *timeInFrame, /* [out] */ BMDTimeValue *ticksPerFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput, GetFrameCompletionReferenceTimestamp) HRESULT ( STDMETHODCALLTYPE *GetFrameCompletionReferenceTimestamp )( IDeckLinkOutput * This, /* [in] */ IDeckLinkVideoFrame *theFrame, @@ -5791,18 +6065,22 @@ EXTERN_C const IID IID_IDeckLinkInput; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInput * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkInput * This, /* [in] */ BMDDisplayMode displayMode, @@ -5811,60 +6089,75 @@ EXTERN_C const IID IID_IDeckLinkInput; /* [out] */ BMDDisplayModeSupport *result, /* [out] */ IDeckLinkDisplayMode **resultDisplayMode); + DECLSPEC_XFGVIRT(IDeckLinkInput, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkInput * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IDeckLinkInput, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkInput * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkInput * This, /* [in] */ BMDDisplayMode displayMode, /* [in] */ BMDPixelFormat pixelFormat, /* [in] */ BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkInput, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, GetAvailableVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( IDeckLinkInput * This, /* [out] */ unsigned int *availableFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput, SetVideoInputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoInputFrameMemoryAllocator )( IDeckLinkInput * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkInput, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkInput * This, /* [in] */ BMDAudioSampleRate sampleRate, /* [in] */ BMDAudioSampleType sampleType, /* [in] */ unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkInput, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, GetAvailableAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( IDeckLinkInput * This, /* [out] */ unsigned int *availableSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, FlushStreams) HRESULT ( STDMETHODCALLTYPE *FlushStreams )( IDeckLinkInput * This); + DECLSPEC_XFGVIRT(IDeckLinkInput, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkInput * This, /* [in] */ IDeckLinkInputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkInput * This, /* [in] */ BMDTimeScale desiredTimeScale, @@ -6029,18 +6322,22 @@ EXTERN_C const IID IID_IDeckLinkEncoderInput; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderInput * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkEncoderInput * This, /* [in] */ BMDDisplayMode displayMode, @@ -6049,27 +6346,33 @@ EXTERN_C const IID IID_IDeckLinkEncoderInput; /* [out] */ BMDDisplayModeSupport *result, /* [out] */ IDeckLinkDisplayMode **resultDisplayMode); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkEncoderInput * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkEncoderInput * This, /* [in] */ BMDDisplayMode displayMode, /* [in] */ BMDPixelFormat pixelFormat, /* [in] */ BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, GetAvailablePacketsCount) HRESULT ( STDMETHODCALLTYPE *GetAvailablePacketsCount )( IDeckLinkEncoderInput * This, /* [out] */ unsigned int *availablePacketsCount); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, SetMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetMemoryAllocator )( IDeckLinkEncoderInput * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkEncoderInput * This, /* [in] */ BMDAudioFormat audioFormat, @@ -6077,29 +6380,37 @@ EXTERN_C const IID IID_IDeckLinkEncoderInput; /* [in] */ BMDAudioSampleType sampleType, /* [in] */ unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, GetAvailableAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( IDeckLinkEncoderInput * This, /* [out] */ unsigned int *availableSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, FlushStreams) HRESULT ( STDMETHODCALLTYPE *FlushStreams )( IDeckLinkEncoderInput * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkEncoderInput * This, /* [in] */ IDeckLinkEncoderInputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkEncoderInput, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkEncoderInput * This, /* [in] */ BMDTimeScale desiredTimeScale, @@ -6230,42 +6541,53 @@ EXTERN_C const IID IID_IDeckLinkVideoFrame; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrame * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoFrame * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkVideoFrame * This, /* [in] */ BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkVideoFrame * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); @@ -6374,55 +6696,69 @@ EXTERN_C const IID IID_IDeckLinkMutableVideoFrame; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkMutableVideoFrame * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkMutableVideoFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkMutableVideoFrame * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkMutableVideoFrame * This, /* [in] */ BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkMutableVideoFrame * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame, SetFlags) HRESULT ( STDMETHODCALLTYPE *SetFlags )( IDeckLinkMutableVideoFrame * This, /* [in] */ BMDFrameFlags newFlags); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame, SetTimecode) HRESULT ( STDMETHODCALLTYPE *SetTimecode )( IDeckLinkMutableVideoFrame * This, /* [in] */ BMDTimecodeFormat format, /* [in] */ IDeckLinkTimecode *timecode); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame, SetTimecodeFromComponents) HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( IDeckLinkMutableVideoFrame * This, /* [in] */ BMDTimecodeFormat format, @@ -6432,10 +6768,12 @@ EXTERN_C const IID IID_IDeckLinkMutableVideoFrame; /* [in] */ unsigned char frames, /* [in] */ BMDTimecodeFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame, SetAncillaryData) HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( IDeckLinkMutableVideoFrame * This, /* [in] */ IDeckLinkVideoFrameAncillary *ancillary); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame, SetTimecodeUserBits) HRESULT ( STDMETHODCALLTYPE *SetTimecodeUserBits )( IDeckLinkMutableVideoFrame * This, /* [in] */ BMDTimecodeFormat format, @@ -6544,21 +6882,26 @@ EXTERN_C const IID IID_IDeckLinkVideoFrame3DExtensions; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrame3DExtensions * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrame3DExtensions * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrame3DExtensions * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame3DExtensions, Get3DPackingFormat) BMDVideo3DPackingFormat ( STDMETHODCALLTYPE *Get3DPackingFormat )( IDeckLinkVideoFrame3DExtensions * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame3DExtensions, GetFrameForRightEye) HRESULT ( STDMETHODCALLTYPE *GetFrameForRightEye )( IDeckLinkVideoFrame3DExtensions * This, /* [out] */ IDeckLinkVideoFrame **rightEyeFrame); @@ -6643,33 +6986,40 @@ EXTERN_C const IID IID_IDeckLinkVideoFrameMetadataExtensions; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrameMetadataExtensions * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrameMetadataExtensions * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrameMetadataExtensions * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameMetadataExtensions, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkVideoFrameMetadataExtensions * This, /* [in] */ BMDDeckLinkFrameMetadataID metadataID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameMetadataExtensions, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkVideoFrameMetadataExtensions * This, /* [in] */ BMDDeckLinkFrameMetadataID metadataID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameMetadataExtensions, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkVideoFrameMetadataExtensions * This, /* [in] */ BMDDeckLinkFrameMetadataID metadataID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameMetadataExtensions, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkVideoFrameMetadataExtensions * This, /* [in] */ BMDDeckLinkFrameMetadataID metadataID, @@ -6755,52 +7105,65 @@ EXTERN_C const IID IID_IDeckLinkVideoInputFrame; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoInputFrame * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoInputFrame * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoInputFrame * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkVideoInputFrame * This, /* [in] */ BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkVideoInputFrame * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkVideoInputFrame * This, /* [out] */ BMDTimeValue *frameTime, /* [out] */ BMDTimeValue *frameDuration, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame, GetHardwareReferenceTimestamp) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( IDeckLinkVideoInputFrame * This, /* [in] */ BMDTimeScale timeScale, @@ -6904,26 +7267,32 @@ EXTERN_C const IID IID_IDeckLinkVideoFrameAncillary; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrameAncillary * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrameAncillary * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrameAncillary * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameAncillary, GetBufferForVerticalBlankingLine) HRESULT ( STDMETHODCALLTYPE *GetBufferForVerticalBlankingLine )( IDeckLinkVideoFrameAncillary * This, /* [in] */ unsigned int lineNumber, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameAncillary, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoFrameAncillary * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrameAncillary, GetDisplayMode) BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( IDeckLinkVideoFrameAncillary * This); @@ -7005,30 +7374,37 @@ EXTERN_C const IID IID_IDeckLinkEncoderPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkEncoderPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetSize) long ( STDMETHODCALLTYPE *GetSize )( IDeckLinkEncoderPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkEncoderPacket * This, /* [out] */ BMDTimeValue *frameTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetPacketType) BMDPacketType ( STDMETHODCALLTYPE *GetPacketType )( IDeckLinkEncoderPacket * This); @@ -7113,42 +7489,52 @@ EXTERN_C const IID IID_IDeckLinkEncoderVideoPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderVideoPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderVideoPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderVideoPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkEncoderVideoPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetSize) long ( STDMETHODCALLTYPE *GetSize )( IDeckLinkEncoderVideoPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkEncoderVideoPacket * This, /* [out] */ BMDTimeValue *frameTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetPacketType) BMDPacketType ( STDMETHODCALLTYPE *GetPacketType )( IDeckLinkEncoderVideoPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkEncoderVideoPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetHardwareReferenceTimestamp) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( IDeckLinkEncoderVideoPacket * This, /* [in] */ BMDTimeScale timeScale, /* [out] */ BMDTimeValue *frameTime, /* [out] */ BMDTimeValue *frameDuration); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkEncoderVideoPacket * This, /* [in] */ BMDTimecodeFormat format, @@ -7236,33 +7622,41 @@ EXTERN_C const IID IID_IDeckLinkEncoderAudioPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderAudioPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderAudioPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderAudioPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkEncoderAudioPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetSize) long ( STDMETHODCALLTYPE *GetSize )( IDeckLinkEncoderAudioPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkEncoderAudioPacket * This, /* [out] */ BMDTimeValue *frameTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetPacketType) BMDPacketType ( STDMETHODCALLTYPE *GetPacketType )( IDeckLinkEncoderAudioPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderAudioPacket, GetAudioFormat) BMDAudioFormat ( STDMETHODCALLTYPE *GetAudioFormat )( IDeckLinkEncoderAudioPacket * This); @@ -7348,55 +7742,68 @@ EXTERN_C const IID IID_IDeckLinkH265NALPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkH265NALPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkH265NALPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkH265NALPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkH265NALPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetSize) long ( STDMETHODCALLTYPE *GetSize )( IDeckLinkH265NALPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkH265NALPacket * This, /* [out] */ BMDTimeValue *frameTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkEncoderPacket, GetPacketType) BMDPacketType ( STDMETHODCALLTYPE *GetPacketType )( IDeckLinkH265NALPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkH265NALPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetHardwareReferenceTimestamp) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( IDeckLinkH265NALPacket * This, /* [in] */ BMDTimeScale timeScale, /* [out] */ BMDTimeValue *frameTime, /* [out] */ BMDTimeValue *frameDuration); + DECLSPEC_XFGVIRT(IDeckLinkEncoderVideoPacket, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkH265NALPacket * This, /* [in] */ BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode **timecode); + DECLSPEC_XFGVIRT(IDeckLinkH265NALPacket, GetUnitType) HRESULT ( STDMETHODCALLTYPE *GetUnitType )( IDeckLinkH265NALPacket * This, /* [out] */ unsigned char *unitType); + DECLSPEC_XFGVIRT(IDeckLinkH265NALPacket, GetBytesNoPrefix) HRESULT ( STDMETHODCALLTYPE *GetBytesNoPrefix )( IDeckLinkH265NALPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkH265NALPacket, GetSizeNoPrefix) long ( STDMETHODCALLTYPE *GetSizeNoPrefix )( IDeckLinkH265NALPacket * This); @@ -7499,25 +7906,31 @@ EXTERN_C const IID IID_IDeckLinkAudioInputPacket; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkAudioInputPacket * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkAudioInputPacket * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkAudioInputPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket, GetSampleFrameCount) long ( STDMETHODCALLTYPE *GetSampleFrameCount )( IDeckLinkAudioInputPacket * This); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkAudioInputPacket * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket, GetPacketTime) HRESULT ( STDMETHODCALLTYPE *GetPacketTime )( IDeckLinkAudioInputPacket * This, /* [out] */ BMDTimeValue *packetTime, @@ -7593,18 +8006,22 @@ EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkScreenPreviewCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkScreenPreviewCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkScreenPreviewCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkScreenPreviewCallback, DrawFrame) HRESULT ( STDMETHODCALLTYPE *DrawFrame )( IDeckLinkScreenPreviewCallback * This, /* [in] */ IDeckLinkVideoFrame *theFrame); @@ -7680,28 +8097,35 @@ EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkGLScreenPreviewHelper * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkGLScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkGLScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper, InitializeGL) HRESULT ( STDMETHODCALLTYPE *InitializeGL )( IDeckLinkGLScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper, PaintGL) HRESULT ( STDMETHODCALLTYPE *PaintGL )( IDeckLinkGLScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper, SetFrame) HRESULT ( STDMETHODCALLTYPE *SetFrame )( IDeckLinkGLScreenPreviewHelper * This, /* [in] */ IDeckLinkVideoFrame *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper, Set3DPreviewFormat) HRESULT ( STDMETHODCALLTYPE *Set3DPreviewFormat )( IDeckLinkGLScreenPreviewHelper * This, /* [in] */ BMD3DPreviewFormat previewFormat); @@ -7788,30 +8212,37 @@ EXTERN_C const IID IID_IDeckLinkDX9ScreenPreviewHelper; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDX9ScreenPreviewHelper * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDX9ScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDX9ScreenPreviewHelper * This); + DECLSPEC_XFGVIRT(IDeckLinkDX9ScreenPreviewHelper, Initialize) HRESULT ( STDMETHODCALLTYPE *Initialize )( IDeckLinkDX9ScreenPreviewHelper * This, /* [in] */ void *device); + DECLSPEC_XFGVIRT(IDeckLinkDX9ScreenPreviewHelper, Render) HRESULT ( STDMETHODCALLTYPE *Render )( IDeckLinkDX9ScreenPreviewHelper * This, /* [in] */ RECT *rc); + DECLSPEC_XFGVIRT(IDeckLinkDX9ScreenPreviewHelper, SetFrame) HRESULT ( STDMETHODCALLTYPE *SetFrame )( IDeckLinkDX9ScreenPreviewHelper * This, /* [in] */ IDeckLinkVideoFrame *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkDX9ScreenPreviewHelper, Set3DPreviewFormat) HRESULT ( STDMETHODCALLTYPE *Set3DPreviewFormat )( IDeckLinkDX9ScreenPreviewHelper * This, /* [in] */ BMD3DPreviewFormat previewFormat); @@ -7891,18 +8322,22 @@ EXTERN_C const IID IID_IDeckLinkNotificationCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkNotificationCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkNotificationCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkNotificationCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkNotificationCallback, Notify) HRESULT ( STDMETHODCALLTYPE *Notify )( IDeckLinkNotificationCallback * This, /* [in] */ BMDNotifications topic, @@ -7978,23 +8413,28 @@ EXTERN_C const IID IID_IDeckLinkNotification; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkNotification * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkNotification * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkNotification * This); + DECLSPEC_XFGVIRT(IDeckLinkNotification, Subscribe) HRESULT ( STDMETHODCALLTYPE *Subscribe )( IDeckLinkNotification * This, /* [in] */ BMDNotifications topic, /* [in] */ IDeckLinkNotificationCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkNotification, Unsubscribe) HRESULT ( STDMETHODCALLTYPE *Unsubscribe )( IDeckLinkNotification * This, /* [in] */ BMDNotifications topic, @@ -8080,33 +8520,40 @@ EXTERN_C const IID IID_IDeckLinkAttributes; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkAttributes * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkAttributes * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkAttributes * This); + DECLSPEC_XFGVIRT(IDeckLinkAttributes, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkAttributes * This, /* [in] */ BMDDeckLinkAttributeID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkAttributes, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkAttributes * This, /* [in] */ BMDDeckLinkAttributeID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkAttributes, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkAttributes * This, /* [in] */ BMDDeckLinkAttributeID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkAttributes, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkAttributes * This, /* [in] */ BMDDeckLinkAttributeID cfgID, @@ -8203,38 +8650,46 @@ EXTERN_C const IID IID_IDeckLinkStatus; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkStatus * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkStatus * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkStatus * This); + DECLSPEC_XFGVIRT(IDeckLinkStatus, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkStatus * This, /* [in] */ BMDDeckLinkStatusID statusID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkStatus, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkStatus * This, /* [in] */ BMDDeckLinkStatusID statusID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkStatus, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkStatus * This, /* [in] */ BMDDeckLinkStatusID statusID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkStatus, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkStatus * This, /* [in] */ BMDDeckLinkStatusID statusID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkStatus, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkStatus * This, /* [in] */ BMDDeckLinkStatusID statusID, @@ -8328,34 +8783,42 @@ EXTERN_C const IID IID_IDeckLinkKeyer; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkKeyer * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkKeyer * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkKeyer * This); + DECLSPEC_XFGVIRT(IDeckLinkKeyer, Enable) HRESULT ( STDMETHODCALLTYPE *Enable )( IDeckLinkKeyer * This, /* [in] */ BOOL isExternal); + DECLSPEC_XFGVIRT(IDeckLinkKeyer, SetLevel) HRESULT ( STDMETHODCALLTYPE *SetLevel )( IDeckLinkKeyer * This, /* [in] */ unsigned char level); + DECLSPEC_XFGVIRT(IDeckLinkKeyer, RampUp) HRESULT ( STDMETHODCALLTYPE *RampUp )( IDeckLinkKeyer * This, /* [in] */ unsigned int numberOfFrames); + DECLSPEC_XFGVIRT(IDeckLinkKeyer, RampDown) HRESULT ( STDMETHODCALLTYPE *RampDown )( IDeckLinkKeyer * This, /* [in] */ unsigned int numberOfFrames); + DECLSPEC_XFGVIRT(IDeckLinkKeyer, Disable) HRESULT ( STDMETHODCALLTYPE *Disable )( IDeckLinkKeyer * This); @@ -8436,18 +8899,22 @@ EXTERN_C const IID IID_IDeckLinkVideoConversion; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoConversion * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoConversion * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoConversion * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoConversion, ConvertFrame) HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( IDeckLinkVideoConversion * This, /* [in] */ IDeckLinkVideoFrame *srcFrame, @@ -8520,22 +8987,27 @@ EXTERN_C const IID IID_IDeckLinkDeviceNotificationCallback; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeviceNotificationCallback * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeviceNotificationCallback * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeviceNotificationCallback * This); + DECLSPEC_XFGVIRT(IDeckLinkDeviceNotificationCallback, DeckLinkDeviceArrived) HRESULT ( STDMETHODCALLTYPE *DeckLinkDeviceArrived )( IDeckLinkDeviceNotificationCallback * This, /* [in] */ IDeckLink *deckLinkDevice); + DECLSPEC_XFGVIRT(IDeckLinkDeviceNotificationCallback, DeckLinkDeviceRemoved) HRESULT ( STDMETHODCALLTYPE *DeckLinkDeviceRemoved )( IDeckLinkDeviceNotificationCallback * This, /* [in] */ IDeckLink *deckLinkDevice); @@ -8609,22 +9081,27 @@ EXTERN_C const IID IID_IDeckLinkDiscovery; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDiscovery * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDiscovery * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDiscovery * This); + DECLSPEC_XFGVIRT(IDeckLinkDiscovery, InstallDeviceNotifications) HRESULT ( STDMETHODCALLTYPE *InstallDeviceNotifications )( IDeckLinkDiscovery * This, /* [in] */ IDeckLinkDeviceNotificationCallback *deviceNotificationCallback); + DECLSPEC_XFGVIRT(IDeckLinkDiscovery, UninstallDeviceNotifications) HRESULT ( STDMETHODCALLTYPE *UninstallDeviceNotifications )( IDeckLinkDiscovery * This); @@ -8774,58 +9251,70 @@ EXTERN_C const IID IID_IDeckLinkConfiguration_v10_9; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkConfiguration_v10_9 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkConfiguration_v10_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkConfiguration_v10_9 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_9, WriteConfigurationToPreferences) HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( IDeckLinkConfiguration_v10_9 * This); @@ -8975,58 +9464,70 @@ EXTERN_C const IID IID_IDeckLinkEncoderConfiguration_v10_5; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkEncoderConfiguration_v10_5 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkEncoderConfiguration_v10_5 * This); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [in] */ BMDDeckLinkEncoderConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkEncoderConfiguration_v10_5, GetDecoderConfigurationInfo) HRESULT ( STDMETHODCALLTYPE *GetDecoderConfigurationInfo )( IDeckLinkEncoderConfiguration_v10_5 * This, /* [out] */ void *buffer, @@ -9152,58 +9653,70 @@ EXTERN_C const IID IID_IDeckLinkConfiguration_v10_4; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkConfiguration_v10_4 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkConfiguration_v10_4 * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkConfiguration_v10_4 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_4, WriteConfigurationToPreferences) HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( IDeckLinkConfiguration_v10_4 * This); @@ -9326,58 +9839,70 @@ EXTERN_C const IID IID_IDeckLinkConfiguration_v10_2; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkConfiguration_v10_2 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkConfiguration_v10_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, SetFlag) HRESULT ( STDMETHODCALLTYPE *SetFlag )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BOOL value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, GetFlag) HRESULT ( STDMETHODCALLTYPE *GetFlag )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BOOL *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, SetInt) HRESULT ( STDMETHODCALLTYPE *SetInt )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ LONGLONG value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, GetInt) HRESULT ( STDMETHODCALLTYPE *GetInt )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ LONGLONG *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, SetFloat) HRESULT ( STDMETHODCALLTYPE *SetFloat )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ double value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, GetFloat) HRESULT ( STDMETHODCALLTYPE *GetFloat )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ double *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, SetString) HRESULT ( STDMETHODCALLTYPE *SetString )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [in] */ BSTR value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkConfiguration_v10_2 * This, /* [in] */ BMDDeckLinkConfigurationID cfgID, /* [out] */ BSTR *value); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v10_2, WriteConfigurationToPreferences) HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( IDeckLinkConfiguration_v10_2 * This); @@ -9574,18 +10099,22 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkOutput_v9_9 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDDisplayMode displayMode, @@ -9594,26 +10123,32 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; /* [out] */ BMDDisplayModeSupport *result, /* [out] */ IDeckLinkDisplayMode **resultDisplayMode); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkOutput_v9_9 * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, EnableVideoOutput) HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDDisplayMode displayMode, /* [in] */ BMDVideoOutputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, DisableVideoOutput) HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, SetVideoOutputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, CreateVideoFrame) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( IDeckLinkOutput_v9_9 * This, /* [in] */ int width, @@ -9623,15 +10158,18 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; /* [in] */ BMDFrameFlags flags, /* [out] */ IDeckLinkMutableVideoFrame **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, CreateAncillaryData) HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDPixelFormat pixelFormat, /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, DisplayVideoFrameSync) HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkVideoFrame *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, ScheduleVideoFrame) HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkVideoFrame *theFrame, @@ -9639,14 +10177,17 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; /* [in] */ BMDTimeValue displayDuration, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, SetScheduledFrameCompletionCallback) HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkVideoOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetBufferedVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( IDeckLinkOutput_v9_9 * This, /* [out] */ unsigned int *bufferedFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, EnableAudioOutput) HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDAudioSampleRate sampleRate, @@ -9654,21 +10195,26 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; /* [in] */ unsigned int channelCount, /* [in] */ BMDAudioOutputStreamType streamType); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, DisableAudioOutput) HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, WriteAudioSamplesSync) HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( IDeckLinkOutput_v9_9 * This, /* [in] */ void *buffer, /* [in] */ unsigned int sampleFrameCount, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, BeginAudioPreroll) HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, EndAudioPreroll) HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, ScheduleAudioSamples) HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( IDeckLinkOutput_v9_9 * This, /* [in] */ void *buffer, @@ -9677,43 +10223,52 @@ EXTERN_C const IID IID_IDeckLinkOutput_v9_9; /* [in] */ BMDTimeScale timeScale, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkOutput_v9_9 * This, /* [out] */ unsigned int *bufferedSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, FlushBufferedAudioSamples) HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( IDeckLinkOutput_v9_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, SetAudioCallback) HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( IDeckLinkOutput_v9_9 * This, /* [in] */ IDeckLinkAudioOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, StartScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDTimeValue playbackStartTime, /* [in] */ BMDTimeScale timeScale, /* [in] */ double playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, StopScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDTimeValue stopPlaybackAtTime, /* [out] */ BMDTimeValue *actualStopTime, /* [in] */ BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, IsScheduledPlaybackRunning) HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( IDeckLinkOutput_v9_9 * This, /* [out] */ BOOL *active); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetScheduledStreamTime) HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDTimeScale desiredTimeScale, /* [out] */ BMDTimeValue *streamTime, /* [out] */ double *playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetReferenceStatus) HRESULT ( STDMETHODCALLTYPE *GetReferenceStatus )( IDeckLinkOutput_v9_9 * This, /* [out] */ BMDReferenceStatus *referenceStatus); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v9_9, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkOutput_v9_9 * This, /* [in] */ BMDTimeScale desiredTimeScale, @@ -9910,18 +10465,22 @@ EXTERN_C const IID IID_IDeckLinkInput_v9_2; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInput_v9_2 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkInput_v9_2 * This, /* [in] */ BMDDisplayMode displayMode, @@ -9930,56 +10489,70 @@ EXTERN_C const IID IID_IDeckLinkInput_v9_2; /* [out] */ BMDDisplayModeSupport *result, /* [out] */ IDeckLinkDisplayMode **resultDisplayMode); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkInput_v9_2 * This, /* [out] */ IDeckLinkDisplayModeIterator **iterator); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkInput_v9_2 * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkInput_v9_2 * This, /* [in] */ BMDDisplayMode displayMode, /* [in] */ BMDPixelFormat pixelFormat, /* [in] */ BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, GetAvailableVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( IDeckLinkInput_v9_2 * This, /* [out] */ unsigned int *availableFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkInput_v9_2 * This, /* [in] */ BMDAudioSampleRate sampleRate, /* [in] */ BMDAudioSampleType sampleType, /* [in] */ unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, GetAvailableAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( IDeckLinkInput_v9_2 * This, /* [out] */ unsigned int *availableSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, FlushStreams) HRESULT ( STDMETHODCALLTYPE *FlushStreams )( IDeckLinkInput_v9_2 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkInput_v9_2 * This, /* [in] */ IDeckLinkInputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput_v9_2, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkInput_v9_2 * This, /* [in] */ BMDTimeScale desiredTimeScale, @@ -10105,32 +10678,39 @@ EXTERN_C const IID IID_IDeckLinkDeckControlStatusCallback_v8_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeckControlStatusCallback_v8_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeckControlStatusCallback_v8_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeckControlStatusCallback_v8_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback_v8_1, TimecodeUpdate) HRESULT ( STDMETHODCALLTYPE *TimecodeUpdate )( IDeckLinkDeckControlStatusCallback_v8_1 * This, /* [in] */ BMDTimecodeBCD currentTimecode); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback_v8_1, VTRControlStateChanged) HRESULT ( STDMETHODCALLTYPE *VTRControlStateChanged )( IDeckLinkDeckControlStatusCallback_v8_1 * This, /* [in] */ BMDDeckControlVTRControlState_v8_1 newState, /* [in] */ BMDDeckControlError error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback_v8_1, DeckControlEventReceived) HRESULT ( STDMETHODCALLTYPE *DeckControlEventReceived )( IDeckLinkDeckControlStatusCallback_v8_1 * This, /* [in] */ BMDDeckControlEvent event, /* [in] */ BMDDeckControlError error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControlStatusCallback_v8_1, DeckControlStatusChanged) HRESULT ( STDMETHODCALLTYPE *DeckControlStatusChanged )( IDeckLinkDeckControlStatusCallback_v8_1 * This, /* [in] */ BMDDeckControlStatusFlags flags, @@ -10329,18 +10909,22 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeckControl_v8_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeckControl_v8_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Open) HRESULT ( STDMETHODCALLTYPE *Open )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BMDTimeScale timeScale, @@ -10348,20 +10932,24 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1; /* [in] */ BOOL timecodeIsDropFrame, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Close) HRESULT ( STDMETHODCALLTYPE *Close )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetCurrentState) HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlMode *mode, /* [out] */ BMDDeckControlVTRControlState_v8_1 *vtrControlState, /* [out] */ BMDDeckControlStatusFlags *flags); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SetStandby) HRESULT ( STDMETHODCALLTYPE *SetStandby )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SendCommand) HRESULT ( STDMETHODCALLTYPE *SendCommand )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ unsigned char *inBuffer, @@ -10371,98 +10959,120 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1; /* [in] */ unsigned int outBufferSize, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Play) HRESULT ( STDMETHODCALLTYPE *Play )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Stop) HRESULT ( STDMETHODCALLTYPE *Stop )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, TogglePlayStop) HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Eject) HRESULT ( STDMETHODCALLTYPE *Eject )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GoToTimecode) HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BMDTimecodeBCD timecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, FastForward) HRESULT ( STDMETHODCALLTYPE *FastForward )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Rewind) HRESULT ( STDMETHODCALLTYPE *Rewind )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, StepForward) HRESULT ( STDMETHODCALLTYPE *StepForward )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, StepBack) HRESULT ( STDMETHODCALLTYPE *StepBack )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Jog) HRESULT ( STDMETHODCALLTYPE *Jog )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Shuttle) HRESULT ( STDMETHODCALLTYPE *Shuttle )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetTimecodeString) HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BSTR *currentTimeCode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ IDeckLinkTimecode **currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetTimecodeBCD) HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDTimecodeBCD *currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SetPreroll) HRESULT ( STDMETHODCALLTYPE *SetPreroll )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ unsigned int prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetPreroll) HRESULT ( STDMETHODCALLTYPE *GetPreroll )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ unsigned int *prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SetExportOffset) HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ int exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetExportOffset) HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ int *exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetManualExportOffset) HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ int *deckManualExportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ int captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ int *captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, StartExport) HRESULT ( STDMETHODCALLTYPE *StartExport )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BMDTimecodeBCD inTimecode, @@ -10470,6 +11080,7 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1; /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, StartCapture) HRESULT ( STDMETHODCALLTYPE *StartCapture )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ BOOL useVITC, @@ -10477,22 +11088,27 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v8_1; /* [in] */ BMDTimecodeBCD outTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, GetDeviceID) HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ unsigned short *deviceId, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, Abort) HRESULT ( STDMETHODCALLTYPE *Abort )( IDeckLinkDeckControl_v8_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, CrashRecordStart) HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, CrashRecordStop) HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( IDeckLinkDeckControl_v8_1 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v8_1, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkDeckControl_v8_1 * This, /* [in] */ IDeckLinkDeckControlStatusCallback_v8_1 *callback); @@ -10657,18 +11273,22 @@ EXTERN_C const IID IID_IDeckLink_v8_0; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLink_v8_0 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLink_v8_0 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLink_v8_0 * This); + DECLSPEC_XFGVIRT(IDeckLink_v8_0, GetModelName) HRESULT ( STDMETHODCALLTYPE *GetModelName )( IDeckLink_v8_0 * This, /* [out] */ BSTR *modelName); @@ -10737,18 +11357,22 @@ EXTERN_C const IID IID_IDeckLinkIterator_v8_0; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkIterator_v8_0 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkIterator_v8_0 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkIterator_v8_0 * This); + DECLSPEC_XFGVIRT(IDeckLinkIterator_v8_0, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IDeckLinkIterator_v8_0 * This, /* [out] */ IDeckLink_v8_0 **deckLinkInstance); @@ -10937,18 +11561,22 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDeckControl_v7_9 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDeckControl_v7_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Open) HRESULT ( STDMETHODCALLTYPE *Open )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BMDTimeScale timeScale, @@ -10956,112 +11584,137 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9; /* [in] */ BOOL timecodeIsDropFrame, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Close) HRESULT ( STDMETHODCALLTYPE *Close )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetCurrentState) HRESULT ( STDMETHODCALLTYPE *GetCurrentState )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlMode *mode, /* [out] */ BMDDeckControlVTRControlState *vtrControlState, /* [out] */ BMDDeckControlStatusFlags *flags); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, SetStandby) HRESULT ( STDMETHODCALLTYPE *SetStandby )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BOOL standbyOn); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Play) HRESULT ( STDMETHODCALLTYPE *Play )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Stop) HRESULT ( STDMETHODCALLTYPE *Stop )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, TogglePlayStop) HRESULT ( STDMETHODCALLTYPE *TogglePlayStop )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Eject) HRESULT ( STDMETHODCALLTYPE *Eject )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GoToTimecode) HRESULT ( STDMETHODCALLTYPE *GoToTimecode )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BMDTimecodeBCD timecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, FastForward) HRESULT ( STDMETHODCALLTYPE *FastForward )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Rewind) HRESULT ( STDMETHODCALLTYPE *Rewind )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BOOL viewTape, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, StepForward) HRESULT ( STDMETHODCALLTYPE *StepForward )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, StepBack) HRESULT ( STDMETHODCALLTYPE *StepBack )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Jog) HRESULT ( STDMETHODCALLTYPE *Jog )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Shuttle) HRESULT ( STDMETHODCALLTYPE *Shuttle )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ double rate, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetTimecodeString) HRESULT ( STDMETHODCALLTYPE *GetTimecodeString )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BSTR *currentTimeCode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ IDeckLinkTimecode **currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetTimecodeBCD) HRESULT ( STDMETHODCALLTYPE *GetTimecodeBCD )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDTimecodeBCD *currentTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, SetPreroll) HRESULT ( STDMETHODCALLTYPE *SetPreroll )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ unsigned int prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetPreroll) HRESULT ( STDMETHODCALLTYPE *GetPreroll )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ unsigned int *prerollSeconds); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, SetExportOffset) HRESULT ( STDMETHODCALLTYPE *SetExportOffset )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ int exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetExportOffset) HRESULT ( STDMETHODCALLTYPE *GetExportOffset )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ int *exportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetManualExportOffset) HRESULT ( STDMETHODCALLTYPE *GetManualExportOffset )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ int *deckManualExportOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, SetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *SetCaptureOffset )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ int captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetCaptureOffset) HRESULT ( STDMETHODCALLTYPE *GetCaptureOffset )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ int *captureOffsetFields); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, StartExport) HRESULT ( STDMETHODCALLTYPE *StartExport )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BMDTimecodeBCD inTimecode, @@ -11069,6 +11722,7 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9; /* [in] */ BMDDeckControlExportModeOpsFlags exportModeOps, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, StartCapture) HRESULT ( STDMETHODCALLTYPE *StartCapture )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ BOOL useVITC, @@ -11076,22 +11730,27 @@ EXTERN_C const IID IID_IDeckLinkDeckControl_v7_9; /* [in] */ BMDTimecodeBCD outTimecode, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, GetDeviceID) HRESULT ( STDMETHODCALLTYPE *GetDeviceID )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ unsigned short *deviceId, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, Abort) HRESULT ( STDMETHODCALLTYPE *Abort )( IDeckLinkDeckControl_v7_9 * This); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, CrashRecordStart) HRESULT ( STDMETHODCALLTYPE *CrashRecordStart )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, CrashRecordStop) HRESULT ( STDMETHODCALLTYPE *CrashRecordStop )( IDeckLinkDeckControl_v7_9 * This, /* [out] */ BMDDeckControlError *error); + DECLSPEC_XFGVIRT(IDeckLinkDeckControl_v7_9, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkDeckControl_v7_9 * This, /* [in] */ IDeckLinkDeckControlStatusCallback *callback); @@ -11253,18 +11912,22 @@ EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayModeIterator_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayModeIterator_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayModeIterator_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayModeIterator_v7_6, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IDeckLinkDisplayModeIterator_v7_6 * This, /* [out] */ IDeckLinkDisplayMode_v7_6 **deckLinkDisplayMode); @@ -11345,36 +12008,45 @@ EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayMode_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayMode_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayMode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetName) HRESULT ( STDMETHODCALLTYPE *GetName )( IDeckLinkDisplayMode_v7_6 * This, /* [out] */ BSTR *name); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetDisplayMode) BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( IDeckLinkDisplayMode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkDisplayMode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkDisplayMode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetFrameRate) HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( IDeckLinkDisplayMode_v7_6 * This, /* [out] */ BMDTimeValue *frameDuration, /* [out] */ BMDTimeScale *timeScale); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_6, GetFieldDominance) BMDFieldDominance ( STDMETHODCALLTYPE *GetFieldDominance )( IDeckLinkDisplayMode_v7_6 * This); @@ -11557,44 +12229,54 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkOutput_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkOutput_v7_6 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkOutput_v7_6 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, EnableVideoOutput) HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( IDeckLinkOutput_v7_6 * This, BMDDisplayMode displayMode, BMDVideoOutputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, DisableVideoOutput) HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, SetVideoOutputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, CreateVideoFrame) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( IDeckLinkOutput_v7_6 * This, int width, @@ -11604,15 +12286,18 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_6; BMDFrameFlags flags, /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, CreateAncillaryData) HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( IDeckLinkOutput_v7_6 * This, BMDPixelFormat pixelFormat, /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, DisplayVideoFrameSync) HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, ScheduleVideoFrame) HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame, @@ -11620,14 +12305,17 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_6; BMDTimeValue displayDuration, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, SetScheduledFrameCompletionCallback) HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkVideoOutputCallback_v7_6 *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, GetBufferedVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( IDeckLinkOutput_v7_6 * This, /* [out] */ unsigned int *bufferedFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, EnableAudioOutput) HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( IDeckLinkOutput_v7_6 * This, BMDAudioSampleRate sampleRate, @@ -11635,21 +12323,26 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_6; unsigned int channelCount, BMDAudioOutputStreamType streamType); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, DisableAudioOutput) HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, WriteAudioSamplesSync) HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( IDeckLinkOutput_v7_6 * This, /* [in] */ void *buffer, unsigned int sampleFrameCount, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, BeginAudioPreroll) HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, EndAudioPreroll) HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, ScheduleAudioSamples) HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( IDeckLinkOutput_v7_6 * This, /* [in] */ void *buffer, @@ -11658,39 +12351,47 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_6; BMDTimeScale timeScale, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkOutput_v7_6 * This, /* [out] */ unsigned int *bufferedSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, FlushBufferedAudioSamples) HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( IDeckLinkOutput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, SetAudioCallback) HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( IDeckLinkOutput_v7_6 * This, /* [in] */ IDeckLinkAudioOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, StartScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( IDeckLinkOutput_v7_6 * This, BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, StopScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( IDeckLinkOutput_v7_6 * This, BMDTimeValue stopPlaybackAtTime, /* [out] */ BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, IsScheduledPlaybackRunning) HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( IDeckLinkOutput_v7_6 * This, /* [out] */ BOOL *active); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, GetScheduledStreamTime) HRESULT ( STDMETHODCALLTYPE *GetScheduledStreamTime )( IDeckLinkOutput_v7_6 * This, BMDTimeScale desiredTimeScale, /* [out] */ BMDTimeValue *streamTime, /* [out] */ double *playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_6, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkOutput_v7_6 * This, BMDTimeScale desiredTimeScale, @@ -11882,74 +12583,92 @@ EXTERN_C const IID IID_IDeckLinkInput_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInput_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkInput_v7_6 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkInput_v7_6 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkInput_v7_6 * This, /* [in] */ IDeckLinkScreenPreviewCallback_v7_6 *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkInput_v7_6 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, GetAvailableVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( IDeckLinkInput_v7_6 * This, /* [out] */ unsigned int *availableFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkInput_v7_6 * This, BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, GetAvailableAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( IDeckLinkInput_v7_6 * This, /* [out] */ unsigned int *availableSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, FlushStreams) HRESULT ( STDMETHODCALLTYPE *FlushStreams )( IDeckLinkInput_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkInput_v7_6 * This, /* [in] */ IDeckLinkInputCallback_v7_6 *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_6, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkInput_v7_6 * This, BMDTimeScale desiredTimeScale, @@ -12073,21 +12792,26 @@ EXTERN_C const IID IID_IDeckLinkTimecode_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkTimecode_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkTimecode_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkTimecode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkTimecode_v7_6, GetBCD) BMDTimecodeBCD ( STDMETHODCALLTYPE *GetBCD )( IDeckLinkTimecode_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkTimecode_v7_6, GetComponents) HRESULT ( STDMETHODCALLTYPE *GetComponents )( IDeckLinkTimecode_v7_6 * This, /* [out] */ unsigned char *hours, @@ -12095,10 +12819,12 @@ EXTERN_C const IID IID_IDeckLinkTimecode_v7_6; /* [out] */ unsigned char *seconds, /* [out] */ unsigned char *frames); + DECLSPEC_XFGVIRT(IDeckLinkTimecode_v7_6, GetString) HRESULT ( STDMETHODCALLTYPE *GetString )( IDeckLinkTimecode_v7_6 * This, /* [out] */ BSTR *timecode); + DECLSPEC_XFGVIRT(IDeckLinkTimecode_v7_6, GetFlags) BMDTimecodeFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkTimecode_v7_6 * This); @@ -12192,42 +12918,53 @@ EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrame_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoFrame_v7_6 * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkVideoFrame_v7_6 * This, BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode_v7_6 **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkVideoFrame_v7_6 * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); @@ -12332,55 +13069,69 @@ EXTERN_C const IID IID_IDeckLinkMutableVideoFrame_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkMutableVideoFrame_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkMutableVideoFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkMutableVideoFrame_v7_6 * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkMutableVideoFrame_v7_6 * This, BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode_v7_6 **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkMutableVideoFrame_v7_6 * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame_v7_6, SetFlags) HRESULT ( STDMETHODCALLTYPE *SetFlags )( IDeckLinkMutableVideoFrame_v7_6 * This, BMDFrameFlags newFlags); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame_v7_6, SetTimecode) HRESULT ( STDMETHODCALLTYPE *SetTimecode )( IDeckLinkMutableVideoFrame_v7_6 * This, BMDTimecodeFormat format, /* [in] */ IDeckLinkTimecode_v7_6 *timecode); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame_v7_6, SetTimecodeFromComponents) HRESULT ( STDMETHODCALLTYPE *SetTimecodeFromComponents )( IDeckLinkMutableVideoFrame_v7_6 * This, BMDTimecodeFormat format, @@ -12390,6 +13141,7 @@ EXTERN_C const IID IID_IDeckLinkMutableVideoFrame_v7_6; unsigned char frames, BMDTimecodeFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkMutableVideoFrame_v7_6, SetAncillaryData) HRESULT ( STDMETHODCALLTYPE *SetAncillaryData )( IDeckLinkMutableVideoFrame_v7_6 * This, /* [in] */ IDeckLinkVideoFrameAncillary *ancillary); @@ -12499,52 +13251,65 @@ EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoInputFrame_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoInputFrame_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoInputFrame_v7_6 * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkVideoInputFrame_v7_6 * This, BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode_v7_6 **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkVideoInputFrame_v7_6 * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame_v7_6, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkVideoInputFrame_v7_6 * This, /* [out] */ BMDTimeValue *frameTime, /* [out] */ BMDTimeValue *frameDuration, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame_v7_6, GetHardwareReferenceTimestamp) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceTimestamp )( IDeckLinkVideoInputFrame_v7_6 * This, BMDTimeScale timeScale, @@ -12643,18 +13408,22 @@ EXTERN_C const IID IID_IDeckLinkScreenPreviewCallback_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkScreenPreviewCallback_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkScreenPreviewCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkScreenPreviewCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkScreenPreviewCallback_v7_6, DrawFrame) HRESULT ( STDMETHODCALLTYPE *DrawFrame )( IDeckLinkScreenPreviewCallback_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame); @@ -12727,24 +13496,30 @@ EXTERN_C const IID IID_IDeckLinkGLScreenPreviewHelper_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkGLScreenPreviewHelper_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkGLScreenPreviewHelper_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkGLScreenPreviewHelper_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper_v7_6, InitializeGL) HRESULT ( STDMETHODCALLTYPE *InitializeGL )( IDeckLinkGLScreenPreviewHelper_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper_v7_6, PaintGL) HRESULT ( STDMETHODCALLTYPE *PaintGL )( IDeckLinkGLScreenPreviewHelper_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkGLScreenPreviewHelper_v7_6, SetFrame) HRESULT ( STDMETHODCALLTYPE *SetFrame )( IDeckLinkGLScreenPreviewHelper_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame); @@ -12820,18 +13595,22 @@ EXTERN_C const IID IID_IDeckLinkVideoConversion_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoConversion_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoConversion_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoConversion_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoConversion_v7_6, ConvertFrame) HRESULT ( STDMETHODCALLTYPE *ConvertFrame )( IDeckLinkVideoConversion_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *srcFrame, @@ -12988,132 +13767,163 @@ EXTERN_C const IID IID_IDeckLinkConfiguration_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkConfiguration_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkConfiguration_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetConfigurationValidator) HRESULT ( STDMETHODCALLTYPE *GetConfigurationValidator )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ IDeckLinkConfiguration_v7_6 **configObject); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, WriteConfigurationToPreferences) HRESULT ( STDMETHODCALLTYPE *WriteConfigurationToPreferences )( IDeckLinkConfiguration_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetVideoOutputFormat) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFormat )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, IsVideoOutputActive) HRESULT ( STDMETHODCALLTYPE *IsVideoOutputActive )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDVideoConnection_v7_6 videoOutputConnection, /* [out] */ BOOL *active); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetAnalogVideoOutputFlags) HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoOutputFlags )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDAnalogVideoFlags analogVideoFlags); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetAnalogVideoOutputFlags) HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoOutputFlags )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDAnalogVideoFlags *analogVideoFlags); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, EnableFieldFlickerRemovalWhenPaused) HRESULT ( STDMETHODCALLTYPE *EnableFieldFlickerRemovalWhenPaused )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BOOL enable); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, IsEnabledFieldFlickerRemovalWhenPaused) HRESULT ( STDMETHODCALLTYPE *IsEnabledFieldFlickerRemovalWhenPaused )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BOOL *enabled); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Set444And3GBpsVideoOutput) HRESULT ( STDMETHODCALLTYPE *Set444And3GBpsVideoOutput )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BOOL enable444VideoOutput, /* [in] */ BOOL enable3GbsOutput); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Get444And3GBpsVideoOutput) HRESULT ( STDMETHODCALLTYPE *Get444And3GBpsVideoOutput )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BOOL *is444VideoOutputEnabled, /* [out] */ BOOL *threeGbsOutputEnabled); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetVideoOutputConversionMode) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputConversionMode )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDVideoOutputConversionMode conversionMode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetVideoOutputConversionMode) HRESULT ( STDMETHODCALLTYPE *GetVideoOutputConversionMode )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDVideoOutputConversionMode *conversionMode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Set_HD1080p24_to_HD1080i5994_Conversion) HRESULT ( STDMETHODCALLTYPE *Set_HD1080p24_to_HD1080i5994_Conversion )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BOOL enable); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Get_HD1080p24_to_HD1080i5994_Conversion) HRESULT ( STDMETHODCALLTYPE *Get_HD1080p24_to_HD1080i5994_Conversion )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BOOL *enabled); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetVideoInputFormat) HRESULT ( STDMETHODCALLTYPE *SetVideoInputFormat )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDVideoConnection_v7_6 videoInputFormat); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetVideoInputFormat) HRESULT ( STDMETHODCALLTYPE *GetVideoInputFormat )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDVideoConnection_v7_6 *videoInputFormat); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetAnalogVideoInputFlags) HRESULT ( STDMETHODCALLTYPE *SetAnalogVideoInputFlags )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDAnalogVideoFlags analogVideoFlags); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetAnalogVideoInputFlags) HRESULT ( STDMETHODCALLTYPE *GetAnalogVideoInputFlags )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDAnalogVideoFlags *analogVideoFlags); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetVideoInputConversionMode) HRESULT ( STDMETHODCALLTYPE *SetVideoInputConversionMode )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDVideoInputConversionMode conversionMode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetVideoInputConversionMode) HRESULT ( STDMETHODCALLTYPE *GetVideoInputConversionMode )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDVideoInputConversionMode *conversionMode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetBlackVideoOutputDuringCapture) HRESULT ( STDMETHODCALLTYPE *SetBlackVideoOutputDuringCapture )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BOOL blackOutInCapture); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetBlackVideoOutputDuringCapture) HRESULT ( STDMETHODCALLTYPE *GetBlackVideoOutputDuringCapture )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BOOL *blackOutInCapture); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Set32PulldownSequenceInitialTimecodeFrame) HRESULT ( STDMETHODCALLTYPE *Set32PulldownSequenceInitialTimecodeFrame )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ unsigned int aFrameTimecode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, Get32PulldownSequenceInitialTimecodeFrame) HRESULT ( STDMETHODCALLTYPE *Get32PulldownSequenceInitialTimecodeFrame )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ unsigned int *aFrameTimecode); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetVancSourceLineMapping) HRESULT ( STDMETHODCALLTYPE *SetVancSourceLineMapping )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ unsigned int activeLine1VANCsource, /* [in] */ unsigned int activeLine2VANCsource, /* [in] */ unsigned int activeLine3VANCsource); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetVancSourceLineMapping) HRESULT ( STDMETHODCALLTYPE *GetVancSourceLineMapping )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ unsigned int *activeLine1VANCsource, /* [out] */ unsigned int *activeLine2VANCsource, /* [out] */ unsigned int *activeLine3VANCsource); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, SetAudioInputFormat) HRESULT ( STDMETHODCALLTYPE *SetAudioInputFormat )( IDeckLinkConfiguration_v7_6 * This, /* [in] */ BMDAudioConnection_v10_2 audioInputFormat); + DECLSPEC_XFGVIRT(IDeckLinkConfiguration_v7_6, GetAudioInputFormat) HRESULT ( STDMETHODCALLTYPE *GetAudioInputFormat )( IDeckLinkConfiguration_v7_6 * This, /* [out] */ BMDAudioConnection_v10_2 *audioInputFormat); @@ -13266,23 +14076,28 @@ EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoOutputCallback_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoOutputCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoOutputCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoOutputCallback_v7_6, ScheduledFrameCompleted) HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( IDeckLinkVideoOutputCallback_v7_6 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *completedFrame, /* [in] */ BMDOutputFrameCompletionResult result); + DECLSPEC_XFGVIRT(IDeckLinkVideoOutputCallback_v7_6, ScheduledPlaybackHasStopped) HRESULT ( STDMETHODCALLTYPE *ScheduledPlaybackHasStopped )( IDeckLinkVideoOutputCallback_v7_6 * This); @@ -13359,24 +14174,29 @@ EXTERN_C const IID IID_IDeckLinkInputCallback_v7_6; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInputCallback_v7_6 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInputCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInputCallback_v7_6 * This); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback_v7_6, VideoInputFormatChanged) HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( IDeckLinkInputCallback_v7_6 * This, /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents, /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode, /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback_v7_6, VideoInputFrameArrived) HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( IDeckLinkInputCallback_v7_6 * This, /* [in] */ IDeckLinkVideoInputFrame_v7_6 *videoFrame, @@ -13471,24 +14291,29 @@ EXTERN_C const IID IID_IDeckLinkInputCallback_v7_3; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInputCallback_v7_3 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInputCallback_v7_3 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInputCallback_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback_v7_3, VideoInputFormatChanged) HRESULT ( STDMETHODCALLTYPE *VideoInputFormatChanged )( IDeckLinkInputCallback_v7_3 * This, /* [in] */ BMDVideoInputFormatChangedEvents notificationEvents, /* [in] */ IDeckLinkDisplayMode_v7_6 *newDisplayMode, /* [in] */ BMDDetectedVideoInputFormatFlags detectedSignalFlags); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback_v7_3, VideoInputFrameArrived) HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( IDeckLinkInputCallback_v7_3 * This, /* [in] */ IDeckLinkVideoInputFrame_v7_3 *videoFrame, @@ -13654,44 +14479,54 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_3; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkOutput_v7_3 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkOutput_v7_3 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkOutput_v7_3 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, EnableVideoOutput) HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( IDeckLinkOutput_v7_3 * This, BMDDisplayMode displayMode, BMDVideoOutputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, DisableVideoOutput) HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, SetVideoOutputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, CreateVideoFrame) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( IDeckLinkOutput_v7_3 * This, int width, @@ -13701,15 +14536,18 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_3; BMDFrameFlags flags, /* [out] */ IDeckLinkMutableVideoFrame_v7_6 **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, CreateAncillaryData) HRESULT ( STDMETHODCALLTYPE *CreateAncillaryData )( IDeckLinkOutput_v7_3 * This, BMDPixelFormat pixelFormat, /* [out] */ IDeckLinkVideoFrameAncillary **outBuffer); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, DisplayVideoFrameSync) HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, ScheduleVideoFrame) HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkVideoFrame_v7_6 *theFrame, @@ -13717,14 +14555,17 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_3; BMDTimeValue displayDuration, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, SetScheduledFrameCompletionCallback) HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkVideoOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, GetBufferedVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedVideoFrameCount )( IDeckLinkOutput_v7_3 * This, /* [out] */ unsigned int *bufferedFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, EnableAudioOutput) HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( IDeckLinkOutput_v7_3 * This, BMDAudioSampleRate sampleRate, @@ -13732,21 +14573,26 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_3; unsigned int channelCount, BMDAudioOutputStreamType streamType); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, DisableAudioOutput) HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, WriteAudioSamplesSync) HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( IDeckLinkOutput_v7_3 * This, /* [in] */ void *buffer, unsigned int sampleFrameCount, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, BeginAudioPreroll) HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, EndAudioPreroll) HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, ScheduleAudioSamples) HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( IDeckLinkOutput_v7_3 * This, /* [in] */ void *buffer, @@ -13755,33 +14601,40 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_3; BMDTimeScale timeScale, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkOutput_v7_3 * This, /* [out] */ unsigned int *bufferedSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, FlushBufferedAudioSamples) HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( IDeckLinkOutput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, SetAudioCallback) HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( IDeckLinkOutput_v7_3 * This, /* [in] */ IDeckLinkAudioOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, StartScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( IDeckLinkOutput_v7_3 * This, BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, StopScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( IDeckLinkOutput_v7_3 * This, BMDTimeValue stopPlaybackAtTime, /* [out] */ BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, IsScheduledPlaybackRunning) HRESULT ( STDMETHODCALLTYPE *IsScheduledPlaybackRunning )( IDeckLinkOutput_v7_3 * This, /* [out] */ BOOL *active); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_3, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkOutput_v7_3 * This, BMDTimeScale desiredTimeScale, @@ -13962,70 +14815,87 @@ EXTERN_C const IID IID_IDeckLinkInput_v7_3; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInput_v7_3 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkInput_v7_3 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkInput_v7_3 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_6 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, SetScreenPreviewCallback) HRESULT ( STDMETHODCALLTYPE *SetScreenPreviewCallback )( IDeckLinkInput_v7_3 * This, /* [in] */ IDeckLinkScreenPreviewCallback *previewCallback); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkInput_v7_3 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, GetAvailableVideoFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableVideoFrameCount )( IDeckLinkInput_v7_3 * This, /* [out] */ unsigned int *availableFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkInput_v7_3 * This, BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, GetAvailableAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetAvailableAudioSampleFrameCount )( IDeckLinkInput_v7_3 * This, /* [out] */ unsigned int *availableSampleFrameCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, FlushStreams) HRESULT ( STDMETHODCALLTYPE *FlushStreams )( IDeckLinkInput_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_3, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkInput_v7_3 * This, /* [in] */ IDeckLinkInputCallback_v7_3 *theCallback); @@ -14135,46 +15005,58 @@ EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_3; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoInputFrame_v7_3 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoInputFrame_v7_3 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoInputFrame_v7_3 * This, /* [out] */ void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetTimecode) HRESULT ( STDMETHODCALLTYPE *GetTimecode )( IDeckLinkVideoInputFrame_v7_3 * This, BMDTimecodeFormat format, /* [out] */ IDeckLinkTimecode_v7_6 **timecode); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_6, GetAncillaryData) HRESULT ( STDMETHODCALLTYPE *GetAncillaryData )( IDeckLinkVideoInputFrame_v7_3 * This, /* [out] */ IDeckLinkVideoFrameAncillary **ancillary); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame_v7_3, GetStreamTime) HRESULT ( STDMETHODCALLTYPE *GetStreamTime )( IDeckLinkVideoInputFrame_v7_3 * This, /* [out] */ BMDTimeValue *frameTime, @@ -14270,18 +15152,22 @@ EXTERN_C const IID IID_IDeckLinkDisplayModeIterator_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayModeIterator_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayModeIterator_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayModeIterator_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayModeIterator_v7_1, Next) HRESULT ( STDMETHODCALLTYPE *Next )( IDeckLinkDisplayModeIterator_v7_1 * This, /* [out] */ IDeckLinkDisplayMode_v7_1 **deckLinkDisplayMode); @@ -14360,31 +15246,39 @@ EXTERN_C const IID IID_IDeckLinkDisplayMode_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkDisplayMode_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkDisplayMode_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkDisplayMode_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_1, GetName) HRESULT ( STDMETHODCALLTYPE *GetName )( IDeckLinkDisplayMode_v7_1 * This, /* [out] */ BSTR *name); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_1, GetDisplayMode) BMDDisplayMode ( STDMETHODCALLTYPE *GetDisplayMode )( IDeckLinkDisplayMode_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_1, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkDisplayMode_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_1, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkDisplayMode_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkDisplayMode_v7_1, GetFrameRate) HRESULT ( STDMETHODCALLTYPE *GetFrameRate )( IDeckLinkDisplayMode_v7_1 * This, /* [out] */ BMDTimeValue *frameDuration, @@ -14476,33 +15370,42 @@ EXTERN_C const IID IID_IDeckLinkVideoFrame_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoFrame_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoFrame_v7_1 * This, void **buffer); @@ -14588,37 +15491,47 @@ EXTERN_C const IID IID_IDeckLinkVideoInputFrame_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoInputFrame_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetWidth) long ( STDMETHODCALLTYPE *GetWidth )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetHeight) long ( STDMETHODCALLTYPE *GetHeight )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetRowBytes) long ( STDMETHODCALLTYPE *GetRowBytes )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetPixelFormat) BMDPixelFormat ( STDMETHODCALLTYPE *GetPixelFormat )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetFlags) BMDFrameFlags ( STDMETHODCALLTYPE *GetFlags )( IDeckLinkVideoInputFrame_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoFrame_v7_1, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkVideoInputFrame_v7_1 * This, void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkVideoInputFrame_v7_1, GetFrameTime) HRESULT ( STDMETHODCALLTYPE *GetFrameTime )( IDeckLinkVideoInputFrame_v7_1 * This, BMDTimeValue *frameTime, @@ -14714,25 +15627,31 @@ EXTERN_C const IID IID_IDeckLinkAudioInputPacket_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkAudioInputPacket_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkAudioInputPacket_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkAudioInputPacket_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket_v7_1, GetSampleCount) long ( STDMETHODCALLTYPE *GetSampleCount )( IDeckLinkAudioInputPacket_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket_v7_1, GetBytes) HRESULT ( STDMETHODCALLTYPE *GetBytes )( IDeckLinkAudioInputPacket_v7_1 * This, void **buffer); + DECLSPEC_XFGVIRT(IDeckLinkAudioInputPacket_v7_1, GetAudioPacketTime) HRESULT ( STDMETHODCALLTYPE *GetAudioPacketTime )( IDeckLinkAudioInputPacket_v7_1 * This, BMDTimeValue *packetTime, @@ -14809,18 +15728,22 @@ EXTERN_C const IID IID_IDeckLinkVideoOutputCallback_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkVideoOutputCallback_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkVideoOutputCallback_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkVideoOutputCallback_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkVideoOutputCallback_v7_1, ScheduledFrameCompleted) HRESULT ( STDMETHODCALLTYPE *ScheduledFrameCompleted )( IDeckLinkVideoOutputCallback_v7_1 * This, /* [in] */ IDeckLinkVideoFrame_v7_1 *completedFrame, @@ -14891,18 +15814,22 @@ EXTERN_C const IID IID_IDeckLinkInputCallback_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInputCallback_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInputCallback_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInputCallback_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInputCallback_v7_1, VideoInputFrameArrived) HRESULT ( STDMETHODCALLTYPE *VideoInputFrameArrived )( IDeckLinkInputCallback_v7_1 * This, /* [in] */ IDeckLinkVideoInputFrame_v7_1 *videoFrame, @@ -15059,39 +15986,48 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkOutput_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkOutput_v7_1 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkOutput_v7_1 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, EnableVideoOutput) HRESULT ( STDMETHODCALLTYPE *EnableVideoOutput )( IDeckLinkOutput_v7_1 * This, BMDDisplayMode displayMode); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, DisableVideoOutput) HRESULT ( STDMETHODCALLTYPE *DisableVideoOutput )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, SetVideoOutputFrameMemoryAllocator) HRESULT ( STDMETHODCALLTYPE *SetVideoOutputFrameMemoryAllocator )( IDeckLinkOutput_v7_1 * This, /* [in] */ IDeckLinkMemoryAllocator *theAllocator); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, CreateVideoFrame) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrame )( IDeckLinkOutput_v7_1 * This, int width, @@ -15101,6 +16037,7 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_1; BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1 **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, CreateVideoFrameFromBuffer) HRESULT ( STDMETHODCALLTYPE *CreateVideoFrameFromBuffer )( IDeckLinkOutput_v7_1 * This, void *buffer, @@ -15111,10 +16048,12 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_1; BMDFrameFlags flags, IDeckLinkVideoFrame_v7_1 **outFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, DisplayVideoFrameSync) HRESULT ( STDMETHODCALLTYPE *DisplayVideoFrameSync )( IDeckLinkOutput_v7_1 * This, IDeckLinkVideoFrame_v7_1 *theFrame); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, ScheduleVideoFrame) HRESULT ( STDMETHODCALLTYPE *ScheduleVideoFrame )( IDeckLinkOutput_v7_1 * This, IDeckLinkVideoFrame_v7_1 *theFrame, @@ -15122,31 +16061,38 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_1; BMDTimeValue displayDuration, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, SetScheduledFrameCompletionCallback) HRESULT ( STDMETHODCALLTYPE *SetScheduledFrameCompletionCallback )( IDeckLinkOutput_v7_1 * This, /* [in] */ IDeckLinkVideoOutputCallback_v7_1 *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, EnableAudioOutput) HRESULT ( STDMETHODCALLTYPE *EnableAudioOutput )( IDeckLinkOutput_v7_1 * This, BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, DisableAudioOutput) HRESULT ( STDMETHODCALLTYPE *DisableAudioOutput )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, WriteAudioSamplesSync) HRESULT ( STDMETHODCALLTYPE *WriteAudioSamplesSync )( IDeckLinkOutput_v7_1 * This, void *buffer, unsigned int sampleFrameCount, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, BeginAudioPreroll) HRESULT ( STDMETHODCALLTYPE *BeginAudioPreroll )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, EndAudioPreroll) HRESULT ( STDMETHODCALLTYPE *EndAudioPreroll )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, ScheduleAudioSamples) HRESULT ( STDMETHODCALLTYPE *ScheduleAudioSamples )( IDeckLinkOutput_v7_1 * This, void *buffer, @@ -15155,29 +16101,35 @@ EXTERN_C const IID IID_IDeckLinkOutput_v7_1; BMDTimeScale timeScale, /* [out] */ unsigned int *sampleFramesWritten); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkOutput_v7_1 * This, /* [out] */ unsigned int *bufferedSampleCount); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, FlushBufferedAudioSamples) HRESULT ( STDMETHODCALLTYPE *FlushBufferedAudioSamples )( IDeckLinkOutput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, SetAudioCallback) HRESULT ( STDMETHODCALLTYPE *SetAudioCallback )( IDeckLinkOutput_v7_1 * This, /* [in] */ IDeckLinkAudioOutputCallback *theCallback); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, StartScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StartScheduledPlayback )( IDeckLinkOutput_v7_1 * This, BMDTimeValue playbackStartTime, BMDTimeScale timeScale, double playbackSpeed); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, StopScheduledPlayback) HRESULT ( STDMETHODCALLTYPE *StopScheduledPlayback )( IDeckLinkOutput_v7_1 * This, BMDTimeValue stopPlaybackAtTime, BMDTimeValue *actualStopTime, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkOutput_v7_1, GetHardwareReferenceClock) HRESULT ( STDMETHODCALLTYPE *GetHardwareReferenceClock )( IDeckLinkOutput_v7_1 * This, BMDTimeScale desiredTimeScale, @@ -15348,46 +16300,56 @@ EXTERN_C const IID IID_IDeckLinkInput_v7_1; { BEGIN_INTERFACE + DECLSPEC_XFGVIRT(IUnknown, QueryInterface) HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IDeckLinkInput_v7_1 * This, /* [in] */ REFIID riid, /* [annotation][iid_is][out] */ _COM_Outptr_ void **ppvObject); + DECLSPEC_XFGVIRT(IUnknown, AddRef) ULONG ( STDMETHODCALLTYPE *AddRef )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IUnknown, Release) ULONG ( STDMETHODCALLTYPE *Release )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, DoesSupportVideoMode) HRESULT ( STDMETHODCALLTYPE *DoesSupportVideoMode )( IDeckLinkInput_v7_1 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, /* [out] */ BMDDisplayModeSupport *result); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, GetDisplayModeIterator) HRESULT ( STDMETHODCALLTYPE *GetDisplayModeIterator )( IDeckLinkInput_v7_1 * This, /* [out] */ IDeckLinkDisplayModeIterator_v7_1 **iterator); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, EnableVideoInput) HRESULT ( STDMETHODCALLTYPE *EnableVideoInput )( IDeckLinkInput_v7_1 * This, BMDDisplayMode displayMode, BMDPixelFormat pixelFormat, BMDVideoInputFlags flags); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, DisableVideoInput) HRESULT ( STDMETHODCALLTYPE *DisableVideoInput )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, EnableAudioInput) HRESULT ( STDMETHODCALLTYPE *EnableAudioInput )( IDeckLinkInput_v7_1 * This, BMDAudioSampleRate sampleRate, BMDAudioSampleType sampleType, unsigned int channelCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, DisableAudioInput) HRESULT ( STDMETHODCALLTYPE *DisableAudioInput )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, ReadAudioSamples) HRESULT ( STDMETHODCALLTYPE *ReadAudioSamples )( IDeckLinkInput_v7_1 * This, void *buffer, @@ -15396,19 +16358,24 @@ EXTERN_C const IID IID_IDeckLinkInput_v7_1; /* [out] */ BMDTimeValue *audioPacketTime, BMDTimeScale timeScale); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, GetBufferedAudioSampleFrameCount) HRESULT ( STDMETHODCALLTYPE *GetBufferedAudioSampleFrameCount )( IDeckLinkInput_v7_1 * This, /* [out] */ unsigned int *bufferedSampleCount); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, StartStreams) HRESULT ( STDMETHODCALLTYPE *StartStreams )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, StopStreams) HRESULT ( STDMETHODCALLTYPE *StopStreams )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, PauseStreams) HRESULT ( STDMETHODCALLTYPE *PauseStreams )( IDeckLinkInput_v7_1 * This); + DECLSPEC_XFGVIRT(IDeckLinkInput_v7_1, SetCallback) HRESULT ( STDMETHODCALLTYPE *SetCallback )( IDeckLinkInput_v7_1 * This, /* [in] */ IDeckLinkInputCallback_v7_1 *theCallback); diff --git a/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_i.c b/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_i.c index 0833b868..cbf3e1f1 100644 --- a/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_i.c +++ b/amf/public/src/components/Capture/DeckLinkMedia/DeckLinkAPI_i.c @@ -5,11 +5,11 @@ /* link this file in with the server and any clients */ - /* File created by MIDL compiler version 8.01.0622 */ + /* File created by MIDL compiler version 8.01.0626 */ /* at Mon Jan 18 22:14:07 2038 */ /* Compiler settings for ..\..\..\..\..\Thirdparty\BlackmagicDeckLinkSDK\10.9.10\Win\include\DeckLinkAPI.idl: - Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622 + Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0626 protocol : all , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: diff --git a/amf/public/src/components/ComponentsFFMPEG/AudioConverterFFMPEGImpl.cpp b/amf/public/src/components/ComponentsFFMPEG/AudioConverterFFMPEGImpl.cpp index 3a536aa8..b57e9c3d 100644 --- a/amf/public/src/components/ComponentsFFMPEG/AudioConverterFFMPEGImpl.cpp +++ b/amf/public/src/components/ComponentsFFMPEG/AudioConverterFFMPEGImpl.cpp @@ -345,9 +345,8 @@ AMF_RESULT AMF_STD_CALL AMFAudioConverterFFMPEGImpl::QueryOutput(AMFData** ppDa //if there are no more samples, we have drained if (iSamplesOut == 0 && m_bEof == true) { - m_bEof = false; m_bDrained = true; - return AMF_OK; + return AMF_EOF; } amf_int64 new_size = (amf_int64) iSamplesOut * m_outChannels * iSampleSizeOut; diff --git a/amf/public/src/components/ComponentsFFMPEG/AudioEncoderFFMPEGImpl.cpp b/amf/public/src/components/ComponentsFFMPEG/AudioEncoderFFMPEGImpl.cpp index 6c28f9bf..87132d0c 100644 --- a/amf/public/src/components/ComponentsFFMPEG/AudioEncoderFFMPEGImpl.cpp +++ b/amf/public/src/components/ComponentsFFMPEG/AudioEncoderFFMPEGImpl.cpp @@ -157,13 +157,30 @@ AMF_RESULT AMF_STD_CALL AMFAudioEncoderFFMPEGImpl::Init(AMF_SURFACE_FORMAT /*fo // initialize the codec context from the component properties AMF_RETURN_IF_FAILED(GetProperty(AUDIO_ENCODER_IN_AUDIO_CHANNELS, &m_iChannelCount)); - m_pCodecContext->channels = m_iChannelCount; AMF_RETURN_IF_FAILED(GetProperty(AUDIO_ENCODER_IN_AUDIO_CHANNEL_LAYOUT, &m_pCodecContext->channel_layout)); AMF_RETURN_IF_FAILED(GetProperty(AUDIO_ENCODER_IN_AUDIO_SAMPLE_RATE, &m_iSampleRate)); - m_pCodecContext->sample_rate = m_iSampleRate; AMF_RETURN_IF_FAILED(GetProperty(AUDIO_ENCODER_OUT_AUDIO_BIT_RATE, &m_pCodecContext->bit_rate)); AMF_RETURN_IF_FAILED(GetProperty(AUDIO_ENCODER_IN_AUDIO_BLOCK_ALIGN, &m_pCodecContext->block_align)); + //choose closest sample rate to requested + int bestSampleRate = 0; + + for (const int* sampleRate = codec->supported_samplerates; sampleRate != nullptr && *sampleRate != 0; sampleRate++) + { + if (abs(*sampleRate - m_iSampleRate) < abs(bestSampleRate - m_iSampleRate)) + { + bestSampleRate = *sampleRate; + } + } + if (m_iSampleRate != bestSampleRate && bestSampleRate != 0) + { + AMFTraceWarning(AMF_FACILITY, L"Codec didn't have sample rate %d Hz, using %d Hz instead", m_iSampleRate, bestSampleRate); + m_iSampleRate = bestSampleRate; + } + + m_pCodecContext->channels = m_iChannelCount; + m_pCodecContext->sample_rate = m_iSampleRate; + // figure out the surface format conversion amf_int64 format; @@ -207,7 +224,7 @@ AMF_RESULT AMF_STD_CALL AMFAudioEncoderFFMPEGImpl::Init(AMF_SURFACE_FORMAT /*fo if (avcodec_open2(m_pCodecContext, codec, NULL) < 0 || m_pCodecContext->codec == 0) { Terminate(); - return AMF_DECODER_NOT_PRESENT; + return AMF_ENCODER_NOT_PRESENT; } // allocate required buffers if (m_pCompressedBuffer==NULL) @@ -551,6 +568,7 @@ AMF_RESULT AMF_STD_CALL AMFAudioEncoderFFMPEGImpl::QueryOutput(AMFData** ppData m_audioFrameQueryCount++; m_iSamplesInPackaet = 0; + return AMF_OK; } } diff --git a/amf/public/src/components/ComponentsFFMPEG/FileMuxerFFMPEGImpl.cpp b/amf/public/src/components/ComponentsFFMPEG/FileMuxerFFMPEGImpl.cpp index d0454be5..c28666ff 100644 --- a/amf/public/src/components/ComponentsFFMPEG/FileMuxerFFMPEGImpl.cpp +++ b/amf/public/src/components/ComponentsFFMPEG/FileMuxerFFMPEGImpl.cpp @@ -58,6 +58,7 @@ extern "C" #include "public/include/components/VideoDecoderUVD.h" #include "public/include/components/VideoEncoderVCE.h" #include "public/include/components/VideoEncoderHEVC.h" +#include "public/include/components/VideoEncoderAV1.h" #include "public/include/core/Context.h" #include "public/include/core/Trace.h" #include "public/common/TraceAdapter.h" @@ -816,7 +817,13 @@ AMF_RESULT AMF_STD_CALL AMFFileMuxerFFMPEGImpl::WriteData(AMFData* pData, amf_i pkt.flags |= AV_PKT_FLAG_KEY; } } - + else if (AMF_OK == pData->GetProperty(AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE, &outputDataType)) + { + if (outputDataType == AMF_VIDEO_ENCODER_AV1_OUTPUT_FRAME_TYPE_KEY) + { + pkt.flags |= AV_PKT_FLAG_KEY; + } + } // resample pts amf_pts pts = pData->GetPts(); amf_pts duration = pData->GetDuration(); @@ -870,7 +877,8 @@ AMF_RESULT AMF_STD_CALL AMFFileMuxerFFMPEGImpl::WriteData(AMFData* pData, amf_i { pkt.dts = pkt.pts; } - + //pkt.pts = AV_NOPTS_VALUE; + //pkt.dts = AV_NOPTS_VALUE; // amf_int64 ptsFFmpeg = pkt.pts; if (av_interleaved_write_frame(m_pOutputContext,&pkt)<0) { diff --git a/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.cpp b/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.cpp index 5f3a065b..1bf0e8f2 100644 --- a/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.cpp +++ b/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.cpp @@ -43,7 +43,7 @@ extern "C" { // Function called from application code to create the component - AMF_RESULT AMF_CDECL_CALL AMFCreateComponentDisplayCapture(amf::AMFContext* pContext, void* reserved, amf::AMFComponent** ppComponent) + AMF_RESULT AMF_CDECL_CALL AMFCreateComponentDisplayCapture(amf::AMFContext* pContext, void* /*reserved*/, amf::AMFComponent** ppComponent) { *ppComponent = new amf::AMFInterfaceMultiImpl< amf::AMFDisplayCaptureImpl, amf::AMFComponent, amf::AMFContext* >(pContext); (*ppComponent)->Acquire(); @@ -231,7 +231,7 @@ AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::Flush() } //------------------------------------------------------------------------------------------------- -AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::SubmitInput(AMFData* pData) +AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::SubmitInput(AMFData* /*pData*/) { AMFLock lock(&m_sync); @@ -314,7 +314,7 @@ AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::QueryOutput(AMFData** ppData) } //------------------------------------------------------------------------------- -AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::GetCaps(AMFCaps** ppCaps) +AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::GetCaps(AMFCaps** /*ppCaps*/) { AMFLock lock(&m_sync); ///////////TODO://///////////////////////////// @@ -322,7 +322,7 @@ AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::GetCaps(AMFCaps** ppCaps) } //------------------------------------------------------------------------------- -AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::Optimize(AMFComponentOptimizationCallback* pCallback) +AMF_RESULT AMF_STD_CALL AMFDisplayCaptureImpl::Optimize(AMFComponentOptimizationCallback* /*pCallback*/) { ///////////TODO://///////////////////////////// return AMF_NOT_IMPLEMENTED; diff --git a/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.h b/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.h index 7c27644b..04e765dc 100644 --- a/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.h +++ b/amf/public/src/components/DisplayCapture/DisplayCaptureImpl.h @@ -61,7 +61,7 @@ namespace amf virtual AMF_RESULT AMF_STD_CALL SubmitInput(AMFData* pData); virtual AMF_RESULT AMF_STD_CALL QueryOutput(AMFData** ppData); virtual AMFContext* AMF_STD_CALL GetContext() { return m_pContext; } - virtual AMF_RESULT AMF_STD_CALL SetOutputDataAllocatorCB(AMFDataAllocatorCB* callback) { return AMF_NOT_SUPPORTED; } + virtual AMF_RESULT AMF_STD_CALL SetOutputDataAllocatorCB(AMFDataAllocatorCB* /*callback*/) { return AMF_NOT_SUPPORTED; } virtual AMF_RESULT AMF_STD_CALL GetCaps(AMFCaps** ppCaps); virtual AMF_RESULT AMF_STD_CALL Optimize(AMFComponentOptimizationCallback* pCallback);